Files
kefu/deploy/ark-chat-config-20260917/payload/admin-web/apps/web-antd/dist/js/vc-trigger-BzbjrH10.js
T
2026-09-21 10:34:06 +08:00

1 line
41 KiB
JavaScript

import{Ct as e,D as t,Ht as n,J as r,Yt as i,ct as a,ft as o,g as s,gt as c,it as l,k as u,o as d,pt as f,tt as p,vn as m,wn as h,xn as g}from"./runtime-core.esm-bundler-DkysjgTd.js";import{S as _,t as v,w as y}from"./runtime-dom.esm-bundler-CirRHyjC.js";import{r as b}from"./en_US-Cv9hrLhb.js";import{Tt as x,at as S,dt as C,et as w,j as T,lt as E,nt as D,ot as O,rt as ee,st as te,vt as ne}from"./useConfigInject-z_xeO0pP.js";import{t as k}from"./ResizeObserver.es-DbHj_W6-.js";import{t as A}from"./raf-CR9Bw2Uc.js";import{a as j,n as re,o as M}from"./motion-BmOd6fTF.js";import{t as N}from"./vue-types-CFReUAWV.js";import{t as ie}from"./motionUtil-BeNb4tZl.js";import{t as ae}from"./vnode-CRVBf7wj.js";import{t as oe}from"./isVisible-B1N4qR6W.js";import{i as se,r as ce,t as le}from"./isObjectLike-DNah0Hql.js";import{d as ue,f as de,h as fe,i as pe,m as me,p as P,r as he,s as ge,t as _e}from"./_getTag-2z2WZcIh.js";import{n as ve,o as ye}from"./Portal-jWUJieln.js";function be(){return``}function xe(e){return e?e.ownerDocument:window.document}function Se(){}var Ce=()=>({action:N.oneOfType([N.string,N.arrayOf(N.string)]).def([]),showAction:N.any.def([]),hideAction:N.any.def([]),getPopupClassNameFromAlign:N.any.def(be),onPopupVisibleChange:Function,afterPopupVisibleChange:N.func.def(Se),popup:N.any,arrow:N.bool.def(!0),popupStyle:{type:Object,default:void 0},prefixCls:N.string.def(`rc-trigger-popup`),popupClassName:N.string.def(``),popupPlacement:String,builtinPlacements:N.object,popupTransitionName:String,popupAnimation:N.any,mouseEnterDelay:N.number.def(0),mouseLeaveDelay:N.number.def(.1),zIndex:Number,focusDelay:N.number.def(0),blurDelay:N.number.def(.15),getPopupContainer:Function,getDocument:N.func.def(xe),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:N.object.def(()=>({})),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function}),we={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,arrow:{type:Boolean,default:!0},animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},Te=b(b({},we),{mobile:{type:Object}}),Ee=b(b({},we),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function De(n){let{prefixCls:r,visible:a,zIndex:o,mask:s,maskAnimation:c,maskTransitionName:l}=n;if(!s)return null;let u={};return(l||c)&&(u=ie({prefixCls:r,transitionName:l,animation:c})),t(v,x({appear:!0},u),{default:()=>[i(t(`div`,{style:{zIndex:o},class:`${r}-mask`},null),[[e(`if`),a]])]})}De.displayName=`Mask`;var Oe=u({compatConfig:{MODE:3},name:`MobilePopupInner`,inheritAttrs:!1,props:Te,emits:[`mouseenter`,`mouseleave`,`mousedown`,`touchstart`,`align`],setup(e,n){let{expose:r,slots:i}=n,a=m();return r({forceAlign:()=>{},getElement:()=>a.value}),()=>{var n;let{zIndex:r,visible:o,prefixCls:s,mobile:{popupClassName:c,popupStyle:l,popupMotion:u={},popupRender:d}={}}=e,f=b({zIndex:r},l),p=ee((n=i.default)==null?void 0:n.call(i));p.length>1&&(p=t(`div`,{class:`${s}-content`},[p])),d&&(p=d(p));let m=ne(s,c);return t(v,x({ref:a},u),{default:()=>[o?t(`div`,{class:m,style:f},[p]):null]})}}}),ke=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Ae=[`measure`,`align`,null,`motion`],je=((e,t)=>{let r=g(null),i=g(),o=g(!1);function s(e){o.value||(r.value=e)}function c(){A.cancel(i.value)}function u(e){c(),i.value=A(()=>{let t=r.value;switch(r.value){case`align`:t=`motion`;break;case`motion`:t=`stable`}s(t),e==null||e()})}return n(e,()=>{s(`measure`)},{immediate:!0,flush:`post`}),a(()=>{n(r,()=>{r.value===`measure`&&t(),r.value&&(i.value=A(()=>ke(void 0,void 0,void 0,function*(){let e=Ae.indexOf(r.value),t=Ae[e+1];t&&e!==-1&&s(t)})))},{immediate:!0,flush:`post`})}),l(()=>{o.value=!0,c()}),[r,u]}),Me=(e=>{let t=g({width:0,height:0});function n(e){t.value={width:e.offsetWidth,height:e.offsetHeight}}return[s(()=>{let n={};if(e.value){let{width:r,height:i}=t.value;e.value.indexOf(`height`)!==-1&&i?n.height=`${i}px`:e.value.indexOf(`minHeight`)!==-1&&i&&(n.minHeight=`${i}px`),e.value.indexOf(`width`)!==-1&&r?n.width=`${r}px`:e.value.indexOf(`minWidth`)!==-1&&r&&(n.minWidth=`${r}px`)}return n}),n]});function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ne(Object(n),!0).forEach(function(t){Ie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fe(e){"@babel/helpers - typeof";return Fe=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Fe(e)}function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F,Le={Webkit:`-webkit-`,Moz:`-moz-`,ms:`-ms-`,O:`-o-`};function Re(){if(F!==void 0)return F;F=``;var e=document.createElement(`p`).style,t=`Transform`;for(var n in Le)n+t in e&&(F=n);return F}function ze(){return Re()?`${Re()}TransitionProperty`:`transitionProperty`}function Be(){return Re()?`${Re()}Transform`:`transform`}function Ve(e,t){var n=ze();n&&(e.style[n]=t,n!==`transitionProperty`&&(e.style.transitionProperty=t))}function He(e,t){var n=Be();n&&(e.style[n]=t,n!==`transform`&&(e.style.transform=t))}function Ue(e){return e.style.transitionProperty||e.style[ze()]}function We(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue(`transform`)||t.getPropertyValue(Be());if(n&&n!==`none`){var r=n.replace(/[^0-9\-.,]/g,``).split(`,`);return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}var Ge=/matrix\((.*)\)/,Ke=/matrix3d\((.*)\)/;function qe(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue(`transform`)||n.getPropertyValue(Be());if(r&&r!==`none`){var i,a=r.match(Ge);a?(a=a[1],i=a.split(`,`).map(function(e){return parseFloat(e,10)}),i[4]=t.x,i[5]=t.y,He(e,`matrix(${i.join(`,`)})`)):(i=r.match(Ke)[1].split(`,`).map(function(e){return parseFloat(e,10)}),i[12]=t.x,i[13]=t.y,He(e,`matrix3d(${i.join(`,`)})`))}else He(e,`translateX(${t.x}px) translateY(${t.y}px) translateZ(0)`)}var Je=`[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)`,I;function Ye(e){var t=e.style.display;e.style.display=`none`,e.offsetHeight,e.style.display=t}function L(e,t,n){var r=n;if(Fe(t)===`object`){for(var i in t)t.hasOwnProperty(i)&&L(e,i,t[i]);return}if(r!==void 0){typeof r==`number`&&(r=`${r}px`),e.style[t]=r;return}return I(e,t)}function Xe(e){var t,n,r,i=e.ownerDocument,a=i.body,o=i&&i.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),r=Math.floor(t.top),n-=o.clientLeft||a.clientLeft||0,r-=o.clientTop||a.clientTop||0,{left:n,top:r}}function Ze(e,t){var n=e[`page${t?`Y`:`X`}Offset`],r=`scroll${t?`Top`:`Left`}`;if(typeof n!=`number`){var i=e.document;n=i.documentElement[r],typeof n!=`number`&&(n=i.body[r])}return n}function Qe(e){return Ze(e)}function $e(e){return Ze(e,!0)}function R(e){var t=Xe(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=Qe(r),t.top+=$e(r),t}function et(e){return e!=null&&e==e.window}function tt(e){return et(e)?e.document:e.nodeType===9?e:e.ownerDocument}function nt(e,t,n){var r=n,i=``,a=tt(e);return r=r||a.defaultView.getComputedStyle(e,null),r&&(i=r.getPropertyValue(t)||r[t]),i}var rt=RegExp(`^(${Je})(?!px)[a-z%]+\$`,`i`),it=/^(top|right|bottom|left)$/,at=`currentStyle`,ot=`runtimeStyle`,z=`left`,st=`px`;function ct(e,t){var n=e[at]&&e[at][t];if(rt.test(n)&&!it.test(t)){var r=e.style,i=r[z],a=e[ot][z];e[ot][z]=e[at][z],r[z]=t===`fontSize`?`1em`:n||0,n=r.pixelLeft+st,r[z]=i,e[ot][z]=a}return n===``?`auto`:n}typeof window<`u`&&(I=window.getComputedStyle?nt:ct);function B(e,t){return e===`left`?t.useCssRight?`right`:e:t.useCssBottom?`bottom`:e}function lt(e){if(e===`left`)return`right`;if(e===`right`)return`left`;if(e===`top`)return`bottom`;if(e===`bottom`)return`top`}function ut(e,t,n){L(e,`position`)===`static`&&(e.style.position=`relative`);var r=-999,i=-999,a=B(`left`,n),o=B(`top`,n),s=lt(a),c=lt(o);a!==`left`&&(r=999),o!==`top`&&(i=999);var l=``,u=R(e);(`left`in t||`top`in t)&&(l=Ue(e)||``,Ve(e,`none`)),`left`in t&&(e.style[s]=``,e.style[a]=`${r}px`),`top`in t&&(e.style[c]=``,e.style[o]=`${i}px`),Ye(e);var d=R(e),f={};for(var p in t)if(t.hasOwnProperty(p)){var m=B(p,n),h=p===`left`?r:i,g=u[p]-d[p];f[m]=m===p?h+g:h-g}L(e,f),Ye(e),(`left`in t||`top`in t)&&Ve(e,l);var _={};for(var v in t)if(t.hasOwnProperty(v)){var y=B(v,n),b=t[v]-u[v];_[y]=v===y?f[y]+b:f[y]-b}L(e,_)}function dt(e,t){var n=R(e),r=We(e),i={x:r.x,y:r.y};`left`in t&&(i.x=r.x+t.left-n.left),`top`in t&&(i.y=r.y+t.top-n.top),qe(e,i)}function ft(e,t,n){if(n.ignoreShake){var r=R(e),i=r.left.toFixed(0),a=r.top.toFixed(0),o=t.left.toFixed(0),s=t.top.toFixed(0);if(i===o&&a===s)return}n.useCssRight||n.useCssBottom?ut(e,t,n):n.useCssTransform&&Be()in document.body.style?dt(e,t):ut(e,t,n)}function pt(e,t){for(var n=0;n<e.length;n++)t(e[n])}function mt(e){return I(e,`boxSizing`)===`border-box`}var ht=[`margin`,`border`,`padding`],gt=-1,_t=2,vt=1,yt=0;function bt(e,t,n){var r={},i=e.style,a;for(a in t)t.hasOwnProperty(a)&&(r[a]=i[a],i[a]=t[a]);for(a in n.call(e),t)t.hasOwnProperty(a)&&(i[a]=r[a])}function V(e,t,n){var r=0,i,a,o;for(a=0;a<t.length;a++)if(i=t[a],i)for(o=0;o<n.length;o++){var s=void 0;s=i===`border`?`${i}${n[o]}Width`:i+n[o],r+=parseFloat(I(e,s))||0}return r}var H={getParent:function(e){var t=e;do t=t.nodeType===11&&t.host?t.host:t.parentNode;while(t&&t.nodeType!==1&&t.nodeType!==9);return t}};pt([`Width`,`Height`],function(e){H[`doc${e}`]=function(t){var n=t.document;return Math.max(n.documentElement[`scroll${e}`],n.body[`scroll${e}`],H[`viewport${e}`](n))},H[`viewport${e}`]=function(t){var n=`client${e}`,r=t.document,i=r.body,a=r.documentElement[n];return r.compatMode===`CSS1Compat`&&a||i&&i[n]||a}});function xt(e,t,n){var r=n;if(et(e))return t===`width`?H.viewportWidth(e):H.viewportHeight(e);if(e.nodeType===9)return t===`width`?H.docWidth(e):H.docHeight(e);var i=t===`width`?[`Left`,`Right`]:[`Top`,`Bottom`],a=Math.floor(t===`width`?e.getBoundingClientRect().width:e.getBoundingClientRect().height),o=mt(e),s=0;(a==null||a<=0)&&(a=void 0,s=I(e,t),(s==null||Number(s)<0)&&(s=e.style[t]||0),s=Math.floor(parseFloat(s))||0),r===void 0&&(r=o?vt:gt);var c=a!==void 0||o,l=a||s;return r===gt?c?l-V(e,[`border`,`padding`],i):s:c?r===vt?l:l+(r===_t?-V(e,[`border`],i):V(e,[`margin`],i)):s+V(e,ht.slice(r),i)}var St={position:`absolute`,visibility:`hidden`,display:`block`};function Ct(){var e=[...arguments],t,n=e[0];return n.offsetWidth===0?bt(n,St,function(){t=xt.apply(void 0,e)}):t=xt.apply(void 0,e),t}pt([`width`,`height`],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);H[`outer${t}`]=function(t,n){return t&&Ct(t,e,n?yt:vt)};var n=e===`width`?[`Left`,`Right`]:[`Top`,`Bottom`];H[e]=function(t,r){var i=r;return i===void 0?t&&Ct(t,e,gt):t?(mt(t)&&(i+=V(t,[`padding`,`border`],n)),L(t,e,i)):void 0}});function wt(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var U={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:tt,offset:function(e,t,n){if(t!==void 0)ft(e,t,n||{});else return R(e)},isWindow:et,each:pt,css:L,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:wt,getWindowScrollLeft:function(e){return Qe(e)},getWindowScrollTop:function(e){return $e(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)U.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};wt(U,H);var Tt=U.getParent;function Et(e){if(U.isWindow(e)||e.nodeType===9)return null;var t=U.getDocument(e).body,n,r=U.css(e,`position`);if(r!==`fixed`&&r!==`absolute`)return e.nodeName.toLowerCase()===`html`?null:Tt(e);for(n=Tt(e);n&&n!==t&&n.nodeType!==9;n=Tt(n))if(r=U.css(n,`position`),r!==`static`)return n;return null}var Dt=U.getParent;function Ot(e){if(U.isWindow(e)||e.nodeType===9)return!1;var t=U.getDocument(e),n=t.body,r=null;for(r=Dt(e);r&&r!==n&&r!==t;r=Dt(r))if(U.css(r,`position`)===`fixed`)return!0;return!1}function kt(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=Et(e),i=U.getDocument(e),a=i.defaultView||i.parentWindow,o=i.body,s=i.documentElement;r;){if((navigator.userAgent.indexOf(`MSIE`)===-1||r.clientWidth!==0)&&r!==o&&r!==s&&U.css(r,`overflow`)!==`visible`){var c=U.offset(r);c.left+=r.clientLeft,c.top+=r.clientTop,n.top=Math.max(n.top,c.top),n.right=Math.min(n.right,c.left+r.clientWidth),n.bottom=Math.min(n.bottom,c.top+r.clientHeight),n.left=Math.max(n.left,c.left)}else if(r===o||r===s)break;r=Et(r)}var l=null;!U.isWindow(e)&&e.nodeType!==9&&(l=e.style.position,U.css(e,`position`)===`absolute`&&(e.style.position=`fixed`));var u=U.getWindowScrollLeft(a),d=U.getWindowScrollTop(a),f=U.viewportWidth(a),p=U.viewportHeight(a),m=s.scrollWidth,h=s.scrollHeight,g=window.getComputedStyle(o);if(g.overflowX===`hidden`&&(m=a.innerWidth),g.overflowY===`hidden`&&(h=a.innerHeight),e.style&&(e.style.position=l),t||Ot(e))n.left=Math.max(n.left,u),n.top=Math.max(n.top,d),n.right=Math.min(n.right,u+f),n.bottom=Math.min(n.bottom,d+p);else{var _=Math.max(m,u+f);n.right=Math.min(n.right,_);var v=Math.max(h,d+p);n.bottom=Math.min(n.bottom,v)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function At(e,t,n,r){var i=U.clone(e),a={width:t.width,height:t.height};return r.adjustX&&i.left<n.left&&(i.left=n.left),r.resizeWidth&&i.left>=n.left&&i.left+a.width>n.right&&(a.width-=i.left+a.width-n.right),r.adjustX&&i.left+a.width>n.right&&(i.left=Math.max(n.right-a.width,n.left)),r.adjustY&&i.top<n.top&&(i.top=n.top),r.resizeHeight&&i.top>=n.top&&i.top+a.height>n.bottom&&(a.height-=i.top+a.height-n.bottom),r.adjustY&&i.top+a.height>n.bottom&&(i.top=Math.max(n.bottom-a.height,n.top)),U.mix(i,a)}function jt(e){var t,n,r;if(!U.isWindow(e)&&e.nodeType!==9)t=U.offset(e),n=U.outerWidth(e),r=U.outerHeight(e);else{var i=U.getWindow(e);t={left:U.getWindowScrollLeft(i),top:U.getWindowScrollTop(i)},n=U.viewportWidth(i),r=U.viewportHeight(i)}return t.width=n,t.height=r,t}function Mt(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,a=e.height,o=e.left,s=e.top;return n===`c`?s+=a/2:n===`b`&&(s+=a),r===`c`?o+=i/2:r===`r`&&(o+=i),{left:o,top:s}}function W(e,t,n,r,i){var a=Mt(t,n[1]),o=Mt(e,n[0]),s=[o.left-a.left,o.top-a.top];return{left:Math.round(e.left-s[0]+r[0]-i[0]),top:Math.round(e.top-s[1]+r[1]-i[1])}}function Nt(e,t,n){return e.left<n.left||e.left+t.width>n.right}function Pt(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function Ft(e,t,n){return e.left>n.right||e.left+t.width<n.left}function It(e,t,n){return e.top>n.bottom||e.top+t.height<n.top}function G(e,t,n){var r=[];return U.each(e,function(e){r.push(e.replace(t,function(e){return n[e]}))}),r}function K(e,t){return e[t]=-e[t],e}function Lt(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Rt(e,t){e[0]=Lt(e[0],t.width),e[1]=Lt(e[1],t.height)}function zt(e,t,n,r){var i=n.points,a=n.offset||[0,0],o=n.targetOffset||[0,0],s=n.overflow,c=n.source||e;a=[].concat(a),o=[].concat(o),s=s||{};var l={},u=0,d=kt(c,!!(s&&s.alwaysByViewport)),f=jt(c);Rt(a,f),Rt(o,t);var p=W(f,t,i,a,o),m=U.merge(f,p);if(d&&(s.adjustX||s.adjustY)&&r){if(s.adjustX&&Nt(p,f,d)){var h=G(i,/[lr]/gi,{l:`r`,r:`l`}),g=K(a,0),_=K(o,0);Ft(W(f,t,h,g,_),f,d)||(u=1,i=h,a=g,o=_)}if(s.adjustY&&Pt(p,f,d)){var v=G(i,/[tb]/gi,{t:`b`,b:`t`}),y=K(a,1),b=K(o,1);It(W(f,t,v,y,b),f,d)||(u=1,i=v,a=y,o=b)}u&&(p=W(f,t,i,a,o),U.mix(m,p));var x=Nt(p,f,d),S=Pt(p,f,d);if(x||S){var C=i;x&&(C=G(i,/[lr]/gi,{l:`r`,r:`l`})),S&&(C=G(i,/[tb]/gi,{t:`b`,b:`t`})),i=C,a=n.offset||[0,0],o=n.targetOffset||[0,0]}l.adjustX=s.adjustX&&x,l.adjustY=s.adjustY&&S,(l.adjustX||l.adjustY)&&(m=At(p,f,d,l))}return m.width!==f.width&&U.css(c,`width`,U.width(c)+m.width-f.width),m.height!==f.height&&U.css(c,`height`,U.height(c)+m.height-f.height),U.offset(c,{left:m.left,top:m.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:a,targetOffset:o,overflow:l}}function Bt(e,t){var n=kt(e,t),r=jt(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}function Vt(e,t,n){var r=n.target||t;return zt(e,jt(r),n,!Bt(r,n.overflow&&n.overflow.alwaysByViewport))}Vt.__getOffsetParent=Et,Vt.__getVisibleRectForElement=kt;function Ht(e,t,n){var r,i,a=U.getDocument(e),o=a.defaultView||a.parentWindow,s=U.getWindowScrollLeft(o),c=U.getWindowScrollTop(o),l=U.viewportWidth(o),u=U.viewportHeight(o);r=`pageX`in t?t.pageX:s+t.clientX,i=`pageY`in t?t.pageY:c+t.clientY;var d={left:r,top:i,width:0,height:0},f=r>=0&&r<=s+l&&i>=0&&i<=c+u,p=[n.points[0],`cc`];return zt(e,d,Pe(Pe({},n),{},{points:p}),f)}function Ut(e,t){return e===t?!0:!e||!t?!1:`pageX`in t&&`pageY`in t?e.pageX===t.pageX&&e.pageY===t.pageY:`clientX`in t&&`clientY`in t&&e.clientX===t.clientX&&e.clientY===t.clientY}function Wt(e,t){e!==document.activeElement&&T(t,e)&&typeof e.focus==`function`&&e.focus()}function Gt(e,t){let n=null,r=null;function i(e){let[{target:i}]=e;if(!document.documentElement.contains(i))return;let{width:a,height:o}=i.getBoundingClientRect(),s=Math.floor(a),c=Math.floor(o);(n!==s||r!==c)&&Promise.resolve().then(()=>{t({width:s,height:c})}),n=s,r=c}let a=new k(i);return e&&a.observe(e),()=>{a.disconnect()}}var Kt=((e,t)=>{let n=!1,r=null;function i(){clearTimeout(r)}function a(o){if(!n||o===!0){if(e()===!1)return;n=!0,i(),r=setTimeout(()=>{n=!1},t.value)}else i(),r=setTimeout(()=>{n=!1,a()},t.value)}return[a,()=>{n=!1,i()}]});function qt(){this.__data__=[],this.size=0}function Jt(e,t){return e===t||e!==e&&t!==t}function q(e,t){for(var n=e.length;n--;)if(Jt(e[n][0],t))return n;return-1}var Yt=Array.prototype.splice;function Xt(e){var t=this.__data__,n=q(t,e);return n<0?!1:(n==t.length-1?t.pop():Yt.call(t,n,1),--this.size,!0)}function Zt(e){var t=this.__data__,n=q(t,e);return n<0?void 0:t[n][1]}function Qt(e){return q(this.__data__,e)>-1}function $t(e,t){var n=this.__data__,r=q(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function J(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}J.prototype.clear=qt,J.prototype.delete=Xt,J.prototype.get=Zt,J.prototype.has=Qt,J.prototype.set=$t;function en(){this.__data__=new J,this.size=0}function tn(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function nn(e){return this.__data__.get(e)}function rn(e){return this.__data__.has(e)}var Y=fe(Object,`create`);function an(){this.__data__=Y?Y(null):{},this.size=0}function on(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var sn=`__lodash_hash_undefined__`,cn=Object.prototype.hasOwnProperty;function ln(e){var t=this.__data__;if(Y){var n=t[e];return n===sn?void 0:n}return cn.call(t,e)?t[e]:void 0}var un=Object.prototype.hasOwnProperty;function dn(e){var t=this.__data__;return Y?t[e]!==void 0:un.call(t,e)}var fn=`__lodash_hash_undefined__`;function pn(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Y&&t===void 0?fn:t,this}function X(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}X.prototype.clear=an,X.prototype.delete=on,X.prototype.get=ln,X.prototype.has=dn,X.prototype.set=pn;function mn(){this.size=0,this.__data__={hash:new X,map:new(me||J),string:new X}}function hn(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function gn(e,t){var n=e.__data__;return hn(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function _n(e){var t=gn(this,e).delete(e);return this.size-=+!!t,t}function vn(e){return gn(this,e).get(e)}function yn(e){return gn(this,e).has(e)}function bn(e,t){var n=gn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Z(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Z.prototype.clear=mn,Z.prototype.delete=_n,Z.prototype.get=vn,Z.prototype.has=yn,Z.prototype.set=bn;var xn=200;function Sn(e,t){var n=this.__data__;if(n instanceof J){var r=n.__data__;if(!me||r.length<xn-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Z(r)}return n.set(e,t),this.size=n.size,this}function Q(e){var t=this.__data__=new J(e);this.size=t.size}Q.prototype.clear=en,Q.prototype.delete=tn,Q.prototype.get=nn,Q.prototype.has=rn,Q.prototype.set=Sn;var Cn=`__lodash_hash_undefined__`;function wn(e){return this.__data__.set(e,Cn),this}function Tn(e){return this.__data__.has(e)}function $(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Z;++t<n;)this.add(e[t])}$.prototype.add=$.prototype.push=wn,$.prototype.has=Tn;function En(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Dn(e,t){return e.has(t)}var On=1,kn=2;function An(e,t,n,r,i,a){var o=n&On,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&kn?new $:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!En(t,function(e,t){if(!Dn(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var jn=se.Uint8Array;function Mn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Nn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Pn=1,Fn=2,In=`[object Boolean]`,Ln=`[object Date]`,Rn=`[object Error]`,zn=`[object Map]`,Bn=`[object Number]`,Vn=`[object RegExp]`,Hn=`[object Set]`,Un=`[object String]`,Wn=`[object Symbol]`,Gn=`[object ArrayBuffer]`,Kn=`[object DataView]`,qn=ce?ce.prototype:void 0,Jn=qn?qn.valueOf:void 0;function Yn(e,t,n,r,i,a,o){switch(n){case Kn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Gn:return!(e.byteLength!=t.byteLength||!a(new jn(e),new jn(t)));case In:case Ln:case Bn:return Jt(+e,+t);case Rn:return e.name==t.name&&e.message==t.message;case Vn:case Un:return e==t+``;case zn:var s=Mn;case Hn:var c=r&Pn;if(s||(s=Nn),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Fn,o.set(e,t);var u=An(s(e),s(t),r,i,a,o);return o.delete(e),u;case Wn:if(Jn)return Jn.call(e)==Jn.call(t)}return!1}function Xn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Zn(e,t,n){var r=t(e);return P(e)?r:Xn(r,n(e))}function Qn(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function $n(){return[]}var er=Object.prototype.propertyIsEnumerable,tr=Object.getOwnPropertySymbols,nr=tr?function(e){return e==null?[]:(e=Object(e),Qn(tr(e),function(t){return er.call(e,t)}))}:$n;function rr(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ir=9007199254740991,ar=/^(?:0|[1-9]\d*)$/;function or(e,t){var n=typeof e;return t=t==null?ir:t,!!t&&(n==`number`||n!=`symbol`&&ar.test(e))&&e>-1&&e%1==0&&e<t}var sr=Object.prototype.hasOwnProperty;function cr(e,t){var n=P(e),r=!n&&de(e),i=!n&&!r&&ue(e),a=!n&&!r&&!i&&ge(e),o=n||r||i||a,s=o?rr(e.length,String):[],c=s.length;for(var l in e)(t||sr.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||or(l,c)))&&s.push(l);return s}function lr(e){return he(e)?cr(e):pe(e)}function ur(e){return Zn(e,lr,nr)}var dr=1,fr=Object.prototype.hasOwnProperty;function pr(e,t,n,r,i,a){var o=n&dr,s=ur(e),c=s.length;if(c!=ur(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:fr.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||(m=u==`constructor`)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var mr=1,hr=`[object Arguments]`,gr=`[object Array]`,_r=`[object Object]`,vr=Object.prototype.hasOwnProperty;function yr(e,t,n,r,i,a){var o=P(e),s=P(t),c=o?gr:_e(e),l=s?gr:_e(t);c=c==hr?_r:c,l=l==hr?_r:l;var u=c==_r,d=l==_r,f=c==l;if(f&&ue(e)){if(!ue(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new Q),o||ge(e)?An(e,t,n,r,i,a):Yn(e,t,c,n,r,i,a);if(!(n&mr)){var p=u&&vr.call(e,`__wrapped__`),m=d&&vr.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new Q),i(h,g,n,r,a)}}return f?(a||(a=new Q),pr(e,t,n,r,i,a)):!1}function br(e,t,n,r,i){return e===t?!0:e==null||t==null||!le(e)&&!le(t)?e!==e&&t!==t:yr(e,t,n,r,br,i)}function xr(e,t){return br(e,t)}var Sr={align:Object,target:[Object,Function],onAlign:Function,monitorBufferTime:Number,monitorWindowResize:Boolean,disabled:Boolean};function Cr(e){return typeof e==`function`?e():null}function wr(e){return typeof e!=`object`||!e?null:e}var Tr=u({compatConfig:{MODE:3},name:`Align`,props:Sr,emits:[`align`],setup(e,t){let{expose:r,slots:i}=t,c=m({}),l=m(),[u,d]=Kt(()=>{let{disabled:t,target:n,align:r,onAlign:i}=e;if(!t&&n&&l.value){let e=l.value,t,a=Cr(n),o=wr(n);c.value.element=a,c.value.point=o,c.value.align=r;let{activeElement:s}=document;return a&&oe(a)?t=Vt(e,a,r):o&&(t=Ht(e,o,r)),Wt(s,e),i&&t&&i(e,t),!0}return!1},s(()=>e.monitorBufferTime)),h=m({cancel:()=>{}}),g=m({cancel:()=>{}}),_=()=>{let t=e.target,n=Cr(t),r=wr(t);l.value!==g.value.element&&(g.value.cancel(),g.value.element=l.value,g.value.cancel=Gt(l.value,u)),(c.value.element!==n||!Ut(c.value.point,r)||!xr(c.value.align,e.align))&&(u(),h.value.element!==n&&(h.value.cancel(),h.value.element=n,h.value.cancel=Gt(n,u)))};a(()=>{p(()=>{_()})}),f(()=>{p(()=>{_()})}),n(()=>e.disabled,e=>{e?d():u()},{immediate:!0,flush:`post`});let v=m(null);return n(()=>e.monitorWindowResize,e=>{e?v.value||(v.value=j(window,`resize`,u)):v.value&&(v.value.remove(),v.value=null)},{flush:`post`}),o(()=>{h.value.cancel(),g.value.cancel(),v.value&&v.value.remove(),d()}),r({forceAlign:()=>u(!0)}),()=>{let e=i==null?void 0:i.default();return e?ae(e[0],{ref:l},!0,!0):null}}}),Er=u({compatConfig:{MODE:3},name:`PopupInner`,inheritAttrs:!1,props:we,emits:[`mouseenter`,`mouseleave`,`mousedown`,`touchstart`,`align`],setup(e,r){let{expose:a,attrs:o,slots:c}=r,l=g(),u=g(),d=g(),[f,p]=Me(h(e,`stretch`)),m=()=>{e.stretch&&p(e.getRootDomNode())},S=g(!1),C;n(()=>e.visible,t=>{clearTimeout(C),t?C=setTimeout(()=>{S.value=e.visible}):S.value=!1},{immediate:!0});let[w,T]=je(S,m),E=g(),D=()=>e.point?e.point:e.getRootDomNode,O=()=>{var e;(e=l.value)==null||e.forceAlign()},te=(t,n)=>{var r;let i=e.getClassNameFromAlign(n),a=d.value;d.value!==i&&(d.value=i),w.value===`align`&&(a===i?T(()=>{var e;(e=E.value)==null||e.call(E)}):Promise.resolve().then(()=>{O()}),(r=e.onAlign)==null||r.call(e,t,n))},k=s(()=>{let t=typeof e.animation==`object`?e.animation:ie(e);return[`onAfterEnter`,`onAfterLeave`].forEach(e=>{let n=t[e];t[e]=e=>{T(),w.value=`stable`,n==null||n(e)}}),t}),A=()=>new Promise(e=>{E.value=e});n([k,w],()=>{!k.value&&w.value===`motion`&&T()},{immediate:!0}),a({forceAlign:O,getElement:()=>u.value.$el||u.value});let j=s(()=>{var t;return!((t=e.align)!=null&&t.points&&(w.value===`align`||w.value===`stable`))});return()=>{var n;let{zIndex:r,align:a,prefixCls:s,destroyPopupOnHide:p,onMouseenter:m,onMouseleave:h,onTouchstart:g=()=>{},onMousedown:C}=e,T=w.value,E=[b(b({},f.value),{zIndex:r,opacity:T===`motion`||T===`stable`||!S.value?null:0,pointerEvents:!S.value&&T!==`stable`?`none`:null}),o.style],O=ee((n=c.default)==null?void 0:n.call(c,{visible:e.visible}));O.length>1&&(O=t(`div`,{class:`${s}-content`},[O]));let re=ne(s,o.class,d.value,!e.arrow&&`${s}-arrow-hidden`),N=S.value||!e.visible?ye(k.value.name,k.value):{};return t(v,x(x({ref:u},N),{},{onBeforeEnter:A}),{default:()=>!p||e.visible?i(t(Tr,{target:D(),key:`popup`,ref:l,monitorWindowResize:!0,disabled:j.value,align:a,onAlign:te},{default:()=>t(`div`,{class:re,onMouseenter:m,onMouseleave:h,onMousedown:y(C,[`capture`]),[M?`onTouchstartPassive`:`onTouchstart`]:y(g,[`capture`]),style:E},[O])}),[[_,S.value]]):null})}}}),Dr=u({compatConfig:{MODE:3},name:`Popup`,inheritAttrs:!1,props:Ee,setup(e,r){let{attrs:i,slots:a,expose:o}=r,s=g(!1),c=g(!1),l=g(),u=g();return n([()=>e.visible,()=>e.mobile],()=>{s.value=e.visible,e.visible&&e.mobile&&(c.value=!0)},{immediate:!0,flush:`post`}),o({forceAlign:()=>{var e;(e=l.value)==null||e.forceAlign()},getElement:()=>{var e;return(e=l.value)==null?void 0:e.getElement()}}),()=>{let n=b(b(b({},e),i),{visible:s.value}),r=c.value?t(Oe,x(x({},n),{},{mobile:e.mobile,ref:l}),{default:a.default}):t(Er,x(x({},n),{},{ref:l}),{default:a.default});return t(`div`,{ref:u},[t(De,n,null),r])}}});function Or(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function kr(e,t,n){let r=e[t]||{};return b(b({},r),n)}function Ar(e,t,n,r){let{points:i}=n,a=Object.keys(e);for(let n=0;n<a.length;n+=1){let o=a[n];if(Or(e[o].points,i,r))return`${t}-placement-${o}`}return``}var jr={methods:{setState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=typeof e==`function`?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){let e=this.getDerivedStateFromProps(te(this),b(b({},this.$data),n));if(e===null)return;n=b(b({},n),e||{})}b(this.$data,n),this._.isMounted&&this.$forceUpdate(),p(()=>{t&&t()})},__emit(){let e=[].slice.call(arguments,0),t=e[0];t=`on${t[0].toUpperCase()}${t.substring(1)}`;let n=this.$props[t]||this.$attrs[t];if(e.length&&n){if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++)n[t](...e.slice(1));else n(...e.slice(1))}}}},Mr=[`onClick`,`onMousedown`,`onTouchstart`,`onMouseenter`,`onMouseleave`,`onFocus`,`onBlur`,`onContextmenu`],Nr=u({compatConfig:{MODE:3},name:`Trigger`,mixins:[jr],inheritAttrs:!1,props:Ce(),setup(e){let t=s(()=>{let{popupPlacement:t,popupAlign:n,builtinPlacements:r}=e;return t&&r?kr(r,t,n):n}),n=g(null);return{vcTriggerContext:r(`vcTriggerContext`,{}),popupRef:n,setPopupRef:e=>{n.value=e},triggerRef:g(null),align:t,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data(){let e=this.$props,t;return t=this.popupVisible===void 0?!!e.defaultPopupVisible:!!e.popupVisible,Mr.forEach(e=>{this[`fire${e}`]=t=>{this.fireEvents(e,t)}}),{prevPopupVisible:t,sPopupVisible:t,point:null}},watch:{popupVisible(e){e!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=e)}},created(){c(`vcTriggerContext`,{onPopupMouseDown:this.onPopupMouseDown,onPopupMouseenter:this.onPopupMouseenter,onPopupMouseleave:this.onPopupMouseleave}),ve(this)},deactivated(){this.setPopupVisible(!1)},mounted(){this.$nextTick(()=>{this.updatedCal()})},updated(){this.$nextTick(()=>{this.updatedCal()})},beforeUnmount(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),A.cancel(this.attachId)},methods:{updatedCal(){let e=this.$props;if(this.$data.sPopupVisible){let t;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(t=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=j(t,`mousedown`,this.onDocumentClick)),this.touchOutsideHandler||(t=t||e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=j(t,`touchstart`,this.onDocumentClick,M?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(t=t||e.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=j(t,`scroll`,this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=j(window,`blur`,this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter(e){let{mouseEnterDelay:t}=this.$props;this.fireEvents(`onMouseenter`,e),this.delaySetPopupVisible(!0,t,t?null:e)},onMouseMove(e){this.fireEvents(`onMousemove`,e),this.setPoint(e)},onMouseleave(e){this.fireEvents(`onMouseleave`,e),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter(){let{vcTriggerContext:e={}}=this;e.onPopupMouseenter&&e.onPopupMouseenter(),this.clearDelayTimer()},onPopupMouseleave(e){var t;if(e&&e.relatedTarget&&!e.relatedTarget.setTimeout&&T((t=this.popupRef)==null?void 0:t.getElement(),e.relatedTarget))return;this.isMouseLeaveToHide()&&this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay);let{vcTriggerContext:n={}}=this;n.onPopupMouseleave&&n.onPopupMouseleave(e)},onFocus(e){this.fireEvents(`onFocus`,e),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown(e){this.fireEvents(`onMousedown`,e),this.preClickTime=Date.now()},onTouchstart(e){this.fireEvents(`onTouchstart`,e),this.preTouchTime=Date.now()},onBlur(e){T(e.target,e.relatedTarget||document.activeElement)||(this.fireEvents(`onBlur`,e),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu(e){e.preventDefault(),this.fireEvents(`onContextmenu`,e),this.setPopupVisible(!0,e)},onContextmenuClose(){this.isContextmenuToShow()&&this.close()},onClick(e){if(this.fireEvents(`onClick`,e),this.focusTime){let e;if(this.preClickTime&&this.preTouchTime?e=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?e=this.preClickTime:this.preTouchTime&&(e=this.preTouchTime),Math.abs(e-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault(),e&&e.domEvent&&e.domEvent.preventDefault();let t=!this.$data.sPopupVisible;(this.isClickToHide()&&!t||t&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,e)},onPopupMouseDown(){let{vcTriggerContext:e={}}=this;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(()=>{this.hasPopupMouseDown=!1},0),e.onPopupMouseDown&&e.onPopupMouseDown(...arguments)},onDocumentClick(e){if(this.$props.mask&&!this.$props.maskClosable)return;let t=e.target,n=this.getRootDomNode(),r=this.getPopupDomNode();(!T(n,t)||this.isContextMenuOnly())&&!T(r,t)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)},getPopupDomNode(){var e;return((e=this.popupRef)==null?void 0:e.getElement())||null},getRootDomNode(){var e,t,n,r;let{getTriggerDOMNode:i}=this.$props;if(i){let n=((t=(e=this.triggerRef)==null?void 0:e.$el)==null?void 0:t.nodeName)===`#comment`?null:D(this.triggerRef);return D(i(n))}try{let e=((r=(n=this.triggerRef)==null?void 0:n.$el)==null?void 0:r.nodeName)===`#comment`?null:D(this.triggerRef);if(e)return e}catch(e){}return D(this)},handleGetPopupClassFromAlign(e){let t=[],{popupPlacement:n,builtinPlacements:r,prefixCls:i,alignPoint:a,getPopupClassNameFromAlign:o}=this.$props;return n&&r&&t.push(Ar(r,i,e,a)),o&&t.push(o(e)),t.join(` `)},getPopupAlign(){let{popupPlacement:e,popupAlign:t,builtinPlacements:n}=this.$props;return e&&n?kr(n,e,t):t},getComponent(){let e={};this.isMouseEnterToShow()&&(e.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(e.onMouseleave=this.onPopupMouseleave),e.onMousedown=this.onPopupMouseDown,e[M?`onTouchstartPassive`:`onTouchstart`]=this.onPopupMouseDown;let{handleGetPopupClassFromAlign:n,getRootDomNode:r,$attrs:i}=this,{prefixCls:a,destroyPopupOnHide:o,popupClassName:s,popupAnimation:c,popupTransitionName:l,popupStyle:u,mask:d,maskAnimation:f,maskTransitionName:p,zIndex:m,stretch:h,alignPoint:g,mobile:_,arrow:v,forceRender:y}=this.$props,{sPopupVisible:x,point:C}=this.$data,w=b(b({prefixCls:a,arrow:v,destroyPopupOnHide:o,visible:x,point:g?C:null,align:this.align,animation:c,getClassNameFromAlign:n,stretch:h,getRootDomNode:r,mask:d,zIndex:m,transitionName:l,maskAnimation:f,maskTransitionName:p,class:s,style:u,onAlign:i.onPopupAlign||Se},e),{ref:this.setPopupRef,mobile:_,forceRender:y});return t(Dr,w,{default:this.$slots.popup||(()=>S(this,`popup`))})},attachParent(e){A.cancel(this.attachId);let{getPopupContainer:t,getDocument:n}=this.$props,r=this.getRootDomNode(),i;t?(r||t.length===0)&&(i=t(r)):i=n(this.getRootDomNode()).body,i?i.appendChild(e):this.attachId=A(()=>{this.attachParent(e)})},getContainer(){let{$props:e}=this,{getDocument:t}=e,n=t(this.getRootDomNode()).createElement(`div`);return n.style.position=`absolute`,n.style.top=`0`,n.style.left=`0`,n.style.width=`100%`,this.attachParent(n),n},setPopupVisible(e,t){let{alignPoint:n,sPopupVisible:r,onPopupVisibleChange:i}=this;this.clearDelayTimer(),r!==e&&(C(this,`popupVisible`)||this.setState({sPopupVisible:e,prevPopupVisible:r}),i&&i(e)),n&&t&&e&&this.setPoint(t)},setPoint(e){let{alignPoint:t}=this.$props;!t||!e||this.setState({point:{pageX:e.pageX,pageY:e.pageY}})},handlePortalUpdate(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible(e,t,n){let r=t*1e3;if(this.clearDelayTimer(),r){let t=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(()=>{this.setPopupVisible(e,t),this.clearDelayTimer()},r)}else this.setPopupVisible(e,n)},clearDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},clearOutsideHandler(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextmenuOutsideHandler1&&(this.contextmenuOutsideHandler1.remove(),this.contextmenuOutsideHandler1=null),this.contextmenuOutsideHandler2&&(this.contextmenuOutsideHandler2.remove(),this.contextmenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},createTwoChains(e){let t=()=>{},n=O(this);return this.childOriginEvents[e]&&n[e]?this[`fire${e}`]:(t=this.childOriginEvents[e]||n[e]||t,t)},isClickToShow(){let{action:e,showAction:t}=this.$props;return e.indexOf(`click`)!==-1||t.indexOf(`click`)!==-1},isContextMenuOnly(){let{action:e}=this.$props;return e===`contextmenu`||e.length===1&&e[0]===`contextmenu`},isContextmenuToShow(){let{action:e,showAction:t}=this.$props;return e.indexOf(`contextmenu`)!==-1||t.indexOf(`contextmenu`)!==-1},isClickToHide(){let{action:e,hideAction:t}=this.$props;return e.indexOf(`click`)!==-1||t.indexOf(`click`)!==-1},isMouseEnterToShow(){let{action:e,showAction:t}=this.$props;return e.indexOf(`hover`)!==-1||t.indexOf(`mouseenter`)!==-1},isMouseLeaveToHide(){let{action:e,hideAction:t}=this.$props;return e.indexOf(`hover`)!==-1||t.indexOf(`mouseleave`)!==-1},isFocusToShow(){let{action:e,showAction:t}=this.$props;return e.indexOf(`focus`)!==-1||t.indexOf(`focus`)!==-1},isBlurToHide(){let{action:e,hideAction:t}=this.$props;return e.indexOf(`focus`)!==-1||t.indexOf(`blur`)!==-1},forcePopupAlign(){var e;this.$data.sPopupVisible&&((e=this.popupRef)==null||e.forceAlign())},fireEvents(e,t){this.childOriginEvents[e]&&this.childOriginEvents[e](t);let n=this.$props[e]||this.$attrs[e];n&&n(t)},close(){this.setPopupVisible(!1)}},render(){let{$attrs:e}=this,n=w(E(this)),{alignPoint:r,getPopupContainer:i}=this.$props,a=n[0];this.childOriginEvents=O(a);let o={key:`trigger`};o.onContextmenu=this.isContextmenuToShow()?this.onContextmenu:this.createTwoChains(`onContextmenu`),this.isClickToHide()||this.isClickToShow()?(o.onClick=this.onClick,o.onMousedown=this.onMousedown,o[M?`onTouchstartPassive`:`onTouchstart`]=this.onTouchstart):(o.onClick=this.createTwoChains(`onClick`),o.onMousedown=this.createTwoChains(`onMousedown`),o[M?`onTouchstartPassive`:`onTouchstart`]=this.createTwoChains(`onTouchstart`)),this.isMouseEnterToShow()?(o.onMouseenter=this.onMouseenter,r&&(o.onMousemove=this.onMouseMove)):o.onMouseenter=this.createTwoChains(`onMouseenter`),o.onMouseleave=this.isMouseLeaveToHide()?this.onMouseleave:this.createTwoChains(`onMouseleave`),this.isFocusToShow()||this.isBlurToHide()?(o.onFocus=this.onFocus,o.onBlur=this.onBlur):(o.onFocus=this.createTwoChains(`onFocus`),o.onBlur=e=>{e&&(!e.relatedTarget||!T(e.target,e.relatedTarget))&&this.createTwoChains(`onBlur`)(e)});let s=ne(a&&a.props&&a.props.class,e.class);s&&(o.class=s);let c=ae(a,b(b({},o),{ref:`triggerRef`}),!0,!0),l=t(re,{key:`portal`,getContainer:i&&(()=>i(this.getRootDomNode())),didUpdate:this.handlePortalUpdate,visible:this.$data.sPopupVisible},{default:this.getComponent});return t(d,null,[c,l])}});export{Q as _,ur as a,or as c,Zn as d,Xn as f,$ as g,Dn as h,br as i,nr as l,jn as m,jr as n,lr as o,Nn as p,xr as r,cr as s,Nr as t,$n as u,Z as v,Jt as y};