/
home
/
pay
/
admin
/
assets
/
File Upload :
llllll
Current File: /home/pay/admin/assets/PortalWrapper-6077b17d.js
import{V as N,Y as B,d as V,P as Y,r as E,ay as G,i as I,S as X,G as O,B as q,a0 as K,b as F,aE as J,R as Q,az as Z}from"./index-b975ac28.js";import{P as ee}from"./KeyCode-36d00781.js";import{_ as te,a as ne}from"./classCallCheck-06c4d224.js";import{w as z}from"./omit-c26c4229.js";var S;function L(i){if(typeof document>"u")return 0;if(i||S===void 0){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div"),n=t.style;n.position="absolute",n.top="0",n.left="0",n.pointerEvents="none",n.visibility="hidden",n.width="200px",n.height="150px",n.overflow="hidden",t.appendChild(e),document.body.appendChild(t);var o=e.offsetWidth;t.style.overflow="scroll";var r=e.offsetWidth;o===r&&(r=t.clientWidth),document.body.removeChild(t),S=o-r}return S}function H(i){var e=i.match(/^(.*)px$/),t=Number(e==null?void 0:e[1]);return Number.isNaN(t)?L():t}function ue(i){if(typeof document>"u"||!i||!(i instanceof Element))return{width:0,height:0};var e=getComputedStyle(i,"::-webkit-scrollbar"),t=e.width,n=e.height;return{width:H(t),height:H(n)}}function C(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.element,n=t===void 0?document.body:t,o={},r=Object.keys(i);return r.forEach(function(l){o[l]=n.style[l]}),r.forEach(function(l){n.style[l]=i[l]}),o}function oe(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var T={};const A=function(i){if(!(!oe()&&!i)){var e="ant-scrolling-effect",t=new RegExp("".concat(e),"g"),n=document.body.className;if(i){if(!t.test(n))return;C(T),T={},document.body.className=n.replace(t,"").trim();return}var o=L();if(o&&(T=C({position:"relative",width:"calc(100% - ".concat(o,"px)")}),!t.test(n))){var r="".concat(n," ").concat(e);document.body.className=r.trim()}}};var f=[],M="ant-scrolling-effect",$=new RegExp("".concat(M),"g"),re=0,P=new Map,ie=te(function i(e){var t=this;ne(this,i),N(this,"getContainer",function(){var n;return(n=t.options)===null||n===void 0?void 0:n.container}),N(this,"reLock",function(n){var o=f.find(function(r){var l=r.target;return l===t.lockTarget});o&&t.unLock(),t.options=n,o&&(o.options=n,t.lock())}),N(this,"lock",function(){var n;if(!f.some(function(c){var a=c.target;return a===t.lockTarget})){if(f.some(function(c){var a,m=c.options;return(m==null?void 0:m.container)===((a=t.options)===null||a===void 0?void 0:a.container)})){f=[].concat(B(f),[{target:t.lockTarget,options:t.options}]);return}var o=0,r=((n=t.options)===null||n===void 0?void 0:n.container)||document.body;(r===document.body&&window.innerWidth-document.documentElement.clientWidth>0||r.scrollHeight>r.clientHeight)&&(o=L());var l=r.className;if(f.filter(function(c){var a,m=c.options;return(m==null?void 0:m.container)===((a=t.options)===null||a===void 0?void 0:a.container)}).length===0&&P.set(r,C({width:o!==0?"calc(100% - ".concat(o,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:r})),!$.test(l)){var d="".concat(l," ").concat(M);r.className=d.trim()}f=[].concat(B(f),[{target:t.lockTarget,options:t.options}])}}),N(this,"unLock",function(){var n,o=f.find(function(d){var c=d.target;return c===t.lockTarget});if(f=f.filter(function(d){var c=d.target;return c!==t.lockTarget}),!(!o||f.some(function(d){var c,a=d.options;return(a==null?void 0:a.container)===((c=o.options)===null||c===void 0?void 0:c.container)}))){var r=((n=t.options)===null||n===void 0?void 0:n.container)||document.body,l=r.className;$.test(l)&&(C(P.get(r),{element:r}),P.delete(r),r.className=r.className.replace($,"").trim())}}),this.lockTarget=re++,this.options=e}),h=0,w=J(),k={},g=function(e){if(!w)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(Q(e)==="object"&&e instanceof window.HTMLElement)return e}return document.body};const fe=V({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:Y.any,visible:{type:Boolean,default:void 0}},setup:function(e,t){var n=t.slots,o=E(),r=E(),l=E(),d=new ie({container:g(e.getContainer)}),c=function(){var s,v;(s=o.value)===null||s===void 0||(v=s.parentNode)===null||v===void 0||v.removeChild(o.value)},a=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(s||o.value&&!o.value.parentNode){var v=g(e.getContainer);return v?(v.appendChild(o.value),!0):!1}return!0},m=function(){return w?(o.value||(o.value=document.createElement("div"),a(!0)),x(),o.value):null},x=function(){var s=e.wrapperClassName;o.value&&s&&s!==o.value.className&&(o.value.className=s)};G(function(){x(),a()});var j=function(){h===1&&!Object.keys(k).length?(A(),k=C({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"})):h||(C(k),k={},A(!0))},D=Z();return I(function(){var u=!1;X([function(){return e.visible},function(){return e.getContainer}],function(s,v){var b=O(s,2),y=b[0],p=b[1],R=O(v,2),W=R[0],_=R[1];if(w&&g(e.getContainer)===document.body&&(y&&!W?h+=1:u&&(h-=1)),u){var U=typeof p=="function"&&typeof _=="function";(U?p.toString()!==_.toString():p!==_)&&c(),y&&y!==W&&w&&g(p)!==d.getContainer()&&d.reLock({container:g(p)})}u=!0},{immediate:!0,flush:"post"}),q(function(){a()||(l.value=z(function(){D.update()}))})}),K(function(){var u=e.visible,s=e.getContainer;w&&g(s)===document.body&&(h=u&&h?h-1:h),c(),z.cancel(l.value)}),function(){var u=e.forceRender,s=e.visible,v=null,b={getOpenCount:function(){return h},getContainer:m,switchScrollingEffect:j,scrollLocker:d};return(u||s||r.value)&&(v=F(ee,{getContainer:m,ref:r},{default:function(){var p;return(p=n.default)===null||p===void 0?void 0:p.call(n,b)}})),v}}});export{fe as P,ue as a,L as g};
Copyright ©2k19 -
Hexid
|
Tex7ure