2 lines
27 KiB
JavaScript
2 lines
27 KiB
JavaScript
import{d as X,i as H,a8 as ee,j as Z,ad as Ge,y as U,U as q,x as me,am as ne,ae as M,e as v,aj as y,aa as h,an as He,ao as Ze,ap as Ee,F as Je,ai as Qe,h as qe,P as Fe,aq as ve,ar as oe,as as fe,at as Ie,ag as pe,au as Se,av as et,aw as tt,ax as at,M as nt,ay as rt}from"./index-0ae7844c.js";import{u as ot,e as lt}from"./index-0c08cf04.js";import{r as it}from"./styleChecker-918e9a0f.js";import{R as st}from"./index-c2776ddf.js";import{u as ct,a as ut}from"./index-936e9d5d.js";import{c as dt}from"./vnode-454b4aa7.js";import{t as vt,T as ft,a as mt,s as ht}from"./isSymbol-d0ec885c.js";import{o as xe}from"./omit-e036f60c.js";import{i as he}from"./_plugin-vue_export-helper-277b1c3f.js";import{g as yt,P as gt,R as Te,L as De}from"./DialogWrap-930ec585.js";import{K as pt}from"./shallowequal-a089597b.js";import{S as We,c as Ct}from"./index-02b92135.js";import{i as bt}from"./isNumeric-3f69e2aa.js";var wt=function(){return{prefixCls:String,shape:{type:String,default:"circle"},size:{type:[Number,String,Object],default:function(){return"default"}},src:String,srcset:String,icon:h.any,alt:String,gap:Number,draggable:{type:Boolean,default:void 0},crossOrigin:String,loadError:{type:Function}}},St=X({compatConfig:{MODE:3},name:"AAvatar",inheritAttrs:!1,props:wt(),slots:["icon"],setup:function(e,a){var d=a.slots,l=a.attrs,k=H(!0),P=H(!1),O=H(1),i=H(null),r=H(null),N=ee("avatar",e),w=N.prefixCls,E=ct(),m=Z(function(){return e.size==="default"?E.value:e.size}),j=ot(),D=lt(function(){if(Ge(e.size)==="object"){var x=it.find(function(L){return j.value[L]}),p=e.size[x];return p}}),F=function(p){return D.value?{width:"".concat(D.value,"px"),height:"".concat(D.value,"px"),lineHeight:"".concat(D.value,"px"),fontSize:"".concat(p?D.value/2:18,"px")}:{}},f=function(){if(!(!i.value||!r.value)){var p=i.value.offsetWidth,L=r.value.offsetWidth;if(p!==0&&L!==0){var W=e.gap,V=W===void 0?4:W;V*2<L&&(O.value=L-V*2<p?(L-V*2)/p:1)}}},S=function(){var p=e.loadError,L=p==null?void 0:p();L!==!1&&(k.value=!1)};return U(function(){return e.src},function(){q(function(){k.value=!0,O.value=1})}),U(function(){return e.gap},function(){q(function(){f()})}),me(function(){q(function(){f(),P.value=!0})}),function(){var x,p,L=e.shape,W=e.src,V=e.alt,Y=e.srcset,G=e.draggable,C=e.crossOrigin,c=ne(d,e,"icon"),u=w.value,z=(x={},M(x,"".concat(l.class),!!l.class),M(x,u,!0),M(x,"".concat(u,"-lg"),m.value==="large"),M(x,"".concat(u,"-sm"),m.value==="small"),M(x,"".concat(u,"-").concat(L),L),M(x,"".concat(u,"-image"),W&&k.value),M(x,"".concat(u,"-icon"),c),x),T=typeof m.value=="number"?{width:"".concat(m.value,"px"),height:"".concat(m.value,"px"),lineHeight:"".concat(m.value,"px"),fontSize:c?"".concat(m.value/2,"px"):"18px"}:{},B=(p=d.default)===null||p===void 0?void 0:p.call(d),I;if(W&&k.value)I=v("img",{draggable:G,src:W,srcset:Y,onError:S,alt:V,crossorigin:C},null);else if(c)I=c;else if(P.value||O.value!==1){var o="scale(".concat(O.value,") translateX(-50%)"),t={msTransform:o,WebkitTransform:o,transform:o},s=typeof m.value=="number"?{lineHeight:"".concat(m.value,"px")}:{};I=v(st,{onResize:f},{default:function(){return[v("span",{class:"".concat(u,"-string"),ref:i,style:y(y({},s),t)},[B])]}})}else I=v("span",{class:"".concat(u,"-string"),ref:i,style:{opacity:0}},[B]);return v("span",y(y({},l),{},{ref:r,class:z,style:[T,F(!!c),l.style]}),[I])}}});const re=St;var xt=function(){return y(y({},mt()),{},{content:h.any,title:h.any})},kt=X({compatConfig:{MODE:3},name:"APopover",props:he(xt(),y(y({},vt()),{},{trigger:"hover",transitionName:"zoom-big",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup:function(e,a){var d=a.expose,l=a.slots,k=H();d({getPopupDomNode:function(){var E,m;return(E=k.value)===null||E===void 0||(m=E.getPopupDomNode)===null||m===void 0?void 0:m.call(E)}});var P=ee("popover",e),O=P.prefixCls,i=P.configProvider,r=Z(function(){return i.getPrefixCls()}),N=function(){var E,m,j=e.title,D=j===void 0?Ee((E=l.title)===null||E===void 0?void 0:E.call(l)):j,F=e.content,f=F===void 0?Ee((m=l.content)===null||m===void 0?void 0:m.call(l)):F,S=!!(Array.isArray(D)?D.length:D),x=!!(Array.isArray(f)?f.length:D);if(!(!S&&!x))return v(Je,null,[S&&v("div",{class:"".concat(O.value,"-title")},[D]),v("div",{class:"".concat(O.value,"-inner-content")},[f])])};return function(){return v(ft,y(y({},xe(e,["title","content"])),{},{prefixCls:O.value,ref:k,transitionName:Ze(r.value,"zoom-big",e.transitionName)}),{title:N,default:l.default})}}});const Pt=He(kt);var Ot=function(){return{prefixCls:String,maxCount:Number,maxStyle:{type:Object,default:void 0},maxPopoverPlacement:{type:String,default:"top"},maxPopoverTrigger:String,size:{type:[Number,String,Object],default:"default"}}},Nt=X({compatConfig:{MODE:3},name:"AAvatarGroup",inheritAttrs:!1,props:Ot(),setup:function(e,a){var d=a.slots,l=a.attrs,k=ee("avatar-group",e),P=k.prefixCls,O=k.direction;return ut(e),function(){var i,r=e.maxPopoverPlacement,N=r===void 0?"top":r,w=e.maxCount,E=e.maxStyle,m=e.maxPopoverTrigger,j=m===void 0?"hover":m,D=(i={},M(i,P.value,!0),M(i,"".concat(P.value,"-rtl"),O.value==="rtl"),M(i,"".concat(l.class),!!l.class),i),F=ne(d,e),f=Qe(F).map(function(L,W){return dt(L,{key:"avatar-key-".concat(W)})}),S=f.length;if(w&&w<S){var x=f.slice(0,w),p=f.slice(w,S);return x.push(v(Pt,{key:"avatar-popover-key",content:p,trigger:j,placement:N,overlayClassName:"".concat(P.value,"-popover")},{default:function(){return[v(re,{style:E},{default:function(){return["+".concat(S-w)]}})]}})),v("div",y(y({},l),{},{class:D,style:l.style}),[x])}return v("div",y(y({},l),{},{class:D,style:l.style}),[f])}}});const we=Nt;re.Group=we;re.install=function(n){return n.component(re.name,re),n.component(we.name,we),n};var Ve=function(){return{prefixCls:String,width:h.oneOfType([h.string,h.number]),height:h.oneOfType([h.string,h.number]),style:{type:Object,default:void 0},class:String,placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:{type:Object,default:void 0},autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0}}},Et=function(){return y(y({},Ve()),{},{forceRender:{type:Boolean,default:void 0},getContainer:h.oneOfType([h.string,h.func,h.object,h.looseBool])})},Tt=function(){return y(y({},Ve()),{},{getContainer:Function,getOpenCount:Function,scrollLocker:h.any,switchScrollingEffect:Function})};function Dt(n){return Array.isArray(n)?n:[n]}var Re={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},At=Object.keys(Re).filter(function(n){if(typeof document>"u")return!1;var e=document.getElementsByTagName("html")[0];return n in(e?e.style:{})})[0],Ae=Re[At];function ze(n,e,a,d){n.addEventListener?n.addEventListener(e,a,d):n.attachEvent&&n.attachEvent("on".concat(e),a)}function Me(n,e,a,d){n.removeEventListener?n.removeEventListener(e,a,d):n.attachEvent&&n.detachEvent("on".concat(e),a)}function zt(n,e){var a=typeof n=="function"?n(e):n;return Array.isArray(a)?a.length===2?a:[a[0],a[1]]:[a]}var Le=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},Ce=!(typeof window<"u"&&window.document&&window.document.createElement),Mt=function n(e,a,d,l){if(!a||a===document||a instanceof Document)return!1;if(a===e.parentNode)return!0;var k=Math.max(Math.abs(d),Math.abs(l))===Math.abs(l),P=Math.max(Math.abs(d),Math.abs(l))===Math.abs(d),O=a.scrollHeight-a.clientHeight,i=a.scrollWidth-a.clientWidth,r=document.defaultView.getComputedStyle(a),N=r.overflowY==="auto"||r.overflowY==="scroll",w=r.overflowX==="auto"||r.overflowX==="scroll",E=O&&N,m=i&&w;return k&&(!E||E&&(a.scrollTop>=O&&l<0||a.scrollTop<=0&&l>0))||P&&(!m||m&&(a.scrollLeft>=i&&d<0||a.scrollLeft<=0&&d>0))?n(e,a.parentNode,d,l):!1},Lt=["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class"],ae={},Bt=X({compatConfig:{MODE:3},inheritAttrs:!1,props:Tt(),emits:["close","handleClick","change"],setup:function(e,a){var d=a.emit,l=a.slots,k=qe({startPos:{x:null,y:null}}),P,O=H(),i=H(),r=H(),N=H(),w=H(),E=[],m="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),j=!Ce&&ht?{passive:!1}:!1;me(function(){q(function(){var o=e.open,t=e.getContainer,s=e.showMask,g=e.autofocus,b=t==null?void 0:t();if(T(e),o&&(b&&b.parentNode===document.body&&(ae[m]=o),V(),q(function(){g&&D()}),s)){var A;(A=e.scrollLocker)===null||A===void 0||A.lock()}})}),U(function(){return e.level},function(){T(e)},{flush:"post"}),U(function(){return e.open},function(){var o=e.open,t=e.getContainer,s=e.scrollLocker,g=e.showMask,b=e.autofocus,A=t==null?void 0:t();A&&A.parentNode===document.body&&(ae[m]=!!o),V(),o?(b&&D(),g&&(s==null||s.lock())):s==null||s.unLock()},{flush:"post"}),Fe(function(){var o,t=e.open;delete ae[m],t&&(Y(!1),document.body.style.touchAction=""),(o=e.scrollLocker)===null||o===void 0||o.unLock()}),U(function(){return e.placement},function(o){o&&(w.value=null)});var D=function(){var t,s;(t=i.value)===null||t===void 0||(s=t.focus)===null||s===void 0||s.call(t)},F=function(t){t.touches.length>1||(k.startPos={x:t.touches[0].clientX,y:t.touches[0].clientY})},f=function(t){if(!(t.changedTouches.length>1)){var s=t.currentTarget,g=t.changedTouches[0].clientX-k.startPos.x,b=t.changedTouches[0].clientY-k.startPos.y;(s===r.value||s===N.value||s===w.value&&Mt(s,t.target,g,b))&&t.cancelable&&t.preventDefault()}},S=function o(t){var s=t.target;Me(s,Ae,o),s.style.transition=""},x=function(t){d("close",t)},p=function(t){t.keyCode===pt.ESC&&(t.stopPropagation(),x(t))},L=function(t){var s=e.open,g=e.afterVisibleChange;t.target===O.value&&t.propertyName.match(/transform$/)&&(i.value.style.transition="",!s&&z()&&(document.body.style.overflowX="",r.value&&(r.value.style.left="",r.value.style.width="")),g&&g(!!s))},W=Z(function(){var o=e.placement,t=o==="left"||o==="right",s="translate".concat(t?"X":"Y");return{isHorizontal:t,placementName:s}}),V=function(){var t=e.open,s=e.width,g=e.height,b=W.value,A=b.isHorizontal,_=b.placementName,$=w.value?w.value.getBoundingClientRect()[A?"width":"height"]:0,R=(A?s:g)||$;G(t,_,R)},Y=function(t,s,g,b){var A=e.placement,_=e.levelMove,$=e.duration,R=e.ease,K=e.showMask;E.forEach(function(te){te.style.transition="transform ".concat($," ").concat(R),ze(te,Ae,S);var J=t?g:0;if(_){var le=zt(_,{target:te,open:t});J=t?le[0]:le[1]||0}var ie=typeof J=="number"?"".concat(J,"px"):J,Q=A==="left"||A==="top"?ie:"-".concat(ie);Q=K&&A==="right"&&b?"calc(".concat(Q," + ").concat(b,"px)"):Q,te.style.transform=J?"".concat(s,"(").concat(Q,")"):""})},G=function(t,s,g){if(!Ce){var b=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?yt(!0):0;Y(t,s,g,b),C(b)}d("change",t)},C=function(t){var s=e.getContainer,g=e.showMask,b=e.open,A=s==null?void 0:s();if(A&&A.parentNode===document.body&&g){var _=["touchstart"],$=[document.body,r.value,N.value,w.value];b&&document.body.style.overflow!=="hidden"?(t&&c(t),document.body.style.touchAction="none",$.forEach(function(R,K){R&&ze(R,_[K]||"touchmove",K?f:F,j)})):z()&&(document.body.style.touchAction="",t&&u(t),$.forEach(function(R,K){R&&Me(R,_[K]||"touchmove",K?f:F,j)}))}},c=function(t){var s=e.placement,g=e.duration,b=e.ease,A="width ".concat(g," ").concat(b),_="transform ".concat(g," ").concat(b);switch(i.value.style.transition="none",s){case"right":i.value.style.transform="translateX(-".concat(t,"px)");break;case"top":case"bottom":i.value.style.width="calc(100% - ".concat(t,"px)"),i.value.style.transform="translateZ(0)";break}clearTimeout(P),P=setTimeout(function(){i.value&&(i.value.style.transition="".concat(_,",").concat(A),i.value.style.width="",i.value.style.transform="")})},u=function(t){var s=e.placement,g=e.duration,b=e.ease;i.value.style.transition="none";var A,_="width ".concat(g," ").concat(b),$="transform ".concat(g," ").concat(b);switch(s){case"left":{i.value.style.width="100%",_="width 0s ".concat(b," ").concat(g);break}case"right":{i.value.style.transform="translateX(".concat(t,"px)"),i.value.style.width="100%",_="width 0s ".concat(b," ").concat(g),r.value&&(r.value.style.left="-".concat(t,"px"),r.value.style.width="calc(100% + ".concat(t,"px)"));break}case"top":case"bottom":{i.value.style.width="calc(100% + ".concat(t,"px)"),i.value.style.height="100%",i.value.style.transform="translateZ(0)",A="height 0s ".concat(b," ").concat(g);break}}clearTimeout(P),P=setTimeout(function(){i.value&&(i.value.style.transition="".concat($,",").concat(A?"".concat(A,","):"").concat(_),i.value.style.transform="",i.value.style.width="",i.value.style.height="")})},z=function(){return!Object.keys(ae).some(function(t){return ae[t]})},T=function(t){var s=t.level,g=t.getContainer;if(!Ce){var b=g==null?void 0:g(),A=b?b.parentNode:null;if(E=[],s==="all"){var _=A?Array.prototype.slice.call(A.children):[];_.forEach(function($){$.nodeName!=="SCRIPT"&&$.nodeName!=="STYLE"&&$.nodeName!=="LINK"&&$!==b&&E.push($)})}else s&&Dt(s).forEach(function($){document.querySelectorAll($).forEach(function(R){E.push(R)})})}},B=function(t){d("handleClick",t)},I=H(!1);return U(i,function(){q(function(){I.value=!0})}),function(){var o,t,s,g=e.width,b=e.height,A=e.open,_=e.prefixCls,$=e.placement;e.level,e.levelMove,e.ease,e.duration,e.getContainer,e.onChange,e.afterVisibleChange;var R=e.showMask,K=e.maskClosable,te=e.maskStyle,J=e.keyboard;e.getOpenCount,e.scrollLocker;var le=e.contentWrapperStyle,ie=e.style,Q=e.class,Xe=ve(e,Lt),ge=A&&I.value,Ke=oe(_,(o={},M(o,"".concat(_,"-").concat($),!0),M(o,"".concat(_,"-open"),ge),M(o,Q,!!Q),M(o,"no-mask",!R),o)),Ue=W.value.placementName,Ye=$==="left"||$==="top"?"-100%":"100%",Ne=ge?"":"".concat(Ue,"(").concat(Ye,")");return v("div",y(y({},xe(Xe,["switchScrollingEffect","autofocus"])),{},{tabindex:-1,class:Ke,style:ie,ref:i,onKeydown:ge&&J?p:void 0,onTransitionend:L}),[R&&v("div",{class:"".concat(_,"-mask"),onClick:K?x:void 0,style:te,ref:r},null),v("div",{class:"".concat(_,"-content-wrapper"),style:y({transform:Ne,msTransform:Ne,width:Le(g)?"".concat(g,"px"):g,height:Le(b)?"".concat(b,"px"):b},le),ref:O},[v("div",{class:"".concat(_,"-content"),ref:w},[(t=l.default)===null||t===void 0?void 0:t.call(l)]),l.handler?v("div",{onClick:B,ref:N},[(s=l.handler)===null||s===void 0?void 0:s.call(l)]):null])])}}});const Be=Bt;var _t=["afterVisibleChange","getContainer","wrapperClassName","forceRender"],jt=["visible","afterClose"],$t=X({compatConfig:{MODE:3},inheritAttrs:!1,props:he(Et(),{prefixCls:"drawer",placement:"left",getContainer:"body",level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",afterVisibleChange:function(){},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],slots:["handler"],setup:function(e,a){var d=a.emit,l=a.slots,k=H(null),P=function(r){d("handleClick",r)},O=function(r){d("close",r)};return function(){e.afterVisibleChange;var i=e.getContainer,r=e.wrapperClassName,N=e.forceRender,w=ve(e,_t),E=null;if(!i)return v("div",{class:r,ref:k},[v(Be,y(y({},w),{},{open:e.open,getContainer:function(){return k.value},onClose:O,onHandleClick:P}),l)]);var m=!!l.handler||N;return(m||e.open||k.value)&&(E=v(gt,{visible:e.open,forceRender:m,getContainer:i,wrapperClassName:r},{default:function(D){var F=D.visible,f=D.afterClose,S=ve(D,jt);return v(Be,y(y(y({ref:k},w),S),{},{open:F!==void 0?F:e.open,afterVisibleChange:f!==void 0?f:e.afterVisibleChange,onClose:O,onHandleClick:P}),l)}})),E}}});const Ht=$t;var Ft=["width","height","visible","placement","mask","wrapClassName","class"],It=fe("top","right","bottom","left");fe("default","large");var _e={distance:180},Wt=function(){return{autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:h.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:h.any,maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},wrapStyle:{type:Object,default:void 0},style:{type:Object,default:void 0},class:h.any,wrapClassName:String,size:{type:String},drawerStyle:{type:Object,default:void 0},headerStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},contentWrapperStyle:{type:Object,default:void 0},title:h.any,visible:{type:Boolean,default:void 0},width:h.oneOfType([h.string,h.number]),height:h.oneOfType([h.string,h.number]),zIndex:Number,prefixCls:String,push:h.oneOfType([h.looseBool,{type:Object}]),placement:h.oneOf(It),keyboard:{type:Boolean,default:void 0},extra:h.any,footer:h.any,footerStyle:{type:Object,default:void 0},level:h.any,levelMove:{type:[Number,Array,Function]},handle:h.any,afterVisibleChange:Function,onAfterVisibleChange:Function,"onUpdate:visible":Function,onClose:Function}},Vt=X({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:he(Wt(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:_e}),slots:["closeIcon","title","extra","footer","handle"],setup:function(e,a){var d=a.emit,l=a.slots,k=a.attrs,P=H(!1),O=H(!1),i=H(null),r=Ie("parentDrawerOpts",null),N=ee("drawer",e),w=N.prefixCls;pe(!e.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),pe(e.wrapStyle===void 0,"Drawer","`wrapStyle` prop is deprecated, please use `style` instead"),pe(e.wrapClassName===void 0,"Drawer","`wrapClassName` prop is deprecated, please use `class` instead");var E=function(){P.value=!0},m=function(){P.value=!1,q(function(){j()})};Se("parentDrawerOpts",{setPush:E,setPull:m}),me(function(){var C=e.visible;C&&r&&r.setPush()}),Fe(function(){r&&r.setPull()}),U(function(){return e.visible},function(C){r&&(C?r.setPush():r.setPull())},{flush:"post"});var j=function(){var c,u;(c=i.value)===null||c===void 0||(u=c.domFocus)===null||u===void 0||u.call(c)},D=function(c){d("update:visible",!1),d("close",c)},F=function(c){var u;(u=e.afterVisibleChange)===null||u===void 0||u.call(e,c),d("afterVisibleChange",c)},f=Z(function(){return e.destroyOnClose&&!e.visible}),S=function(){var c=f.value;c&&(e.visible||(O.value=!0))},x=Z(function(){var C=e.push,c=e.placement,u;return typeof C=="boolean"?u=C?_e.distance:0:u=C.distance,u=parseFloat(String(u||0)),c==="left"||c==="right"?"translateX(".concat(c==="left"?u:-u,"px)"):c==="top"||c==="bottom"?"translateY(".concat(c==="top"?u:-u,"px)"):null}),p=Z(function(){var C=e.visible,c=e.mask,u=e.placement,z=e.size,T=z===void 0?"default":z,B=e.width,I=e.height;if(!C&&!c)return{};var o={};if(u==="left"||u==="right"){var t=T==="large"?736:378;o.width=typeof B>"u"?t:B,o.width=typeof o.width=="string"?o.width:"".concat(o.width,"px")}else{var s=T==="large"?736:378;o.height=typeof I>"u"?s:I,o.height=typeof o.height=="string"?o.height:"".concat(o.height,"px")}return o}),L=Z(function(){var C=e.zIndex,c=e.wrapStyle,u=e.mask,z=e.style,T=u?{}:p.value;return y(y(y({zIndex:C,transform:P.value?x.value:void 0},T),c),z)}),W=function(c){var u=e.closable,z=e.headerStyle,T=ne(l,e,"extra"),B=ne(l,e,"title");return!B&&!u?null:v("div",{class:oe("".concat(c,"-header"),M({},"".concat(c,"-header-close-only"),u&&!B&&!T)),style:z},[v("div",{class:"".concat(c,"-header-title")},[V(c),B&&v("div",{class:"".concat(c,"-title")},[B])]),T&&v("div",{class:"".concat(c,"-extra")},[T])])},V=function(c){var u,z=e.closable,T=l.closeIcon?(u=l.closeIcon)===null||u===void 0?void 0:u.call(l):e.closeIcon;return z&&v("button",{key:"closer",onClick:D,"aria-label":"Close",class:"".concat(c,"-close")},[T===void 0?v(et,null,null):T])},Y=function(c){var u;if(O.value&&!e.visible)return null;O.value=!1;var z=e.bodyStyle,T=e.drawerStyle,B={},I=f.value;return I&&(B.opacity=0,B.transition="opacity .3s"),v("div",{class:"".concat(c,"-wrapper-body"),style:y(y({},B),T),onTransitionend:S},[W(c),v("div",{key:"body",class:"".concat(c,"-body"),style:z},[(u=l.default)===null||u===void 0?void 0:u.call(l)]),G(c)])},G=function(c){var u=ne(l,e,"footer");if(!u)return null;var z="".concat(c,"-footer");return v("div",{class:z,style:e.footerStyle},[u])};return function(){var C;e.width,e.height;var c=e.visible,u=e.placement,z=e.mask,T=e.wrapClassName,B=e.class,I=ve(e,Ft),o=z?p.value:{},t=z?"":"no-mask",s=y(y(y(y({},k),xe(I,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","wrapStyle","onAfterVisibleChange","onClose","onUpdate:visible"])),o),{},{onClose:D,afterVisibleChange:F,handler:!1,prefixCls:w.value,open:c,showMask:z,placement:u,class:oe((C={},M(C,B,B),M(C,T,!!T),M(C,t,!!t),C)),style:L.value,ref:i});return v(Ht,s,{handler:e.handle?function(){return e.handle}:l.handle,default:function(){return Y(w.value)}})}}});const da=He(Vt);var ke=function(){return{prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String}};function ye(n){var e=n.suffixCls,a=n.tagName,d=n.name;return function(l){var k=X({compatConfig:{MODE:3},name:d,props:ke(),setup:function(O,i){var r=i.slots,N=ee(e,O),w=N.prefixCls;return function(){var E=y(y({},O),{},{prefixCls:w.value,tagName:a});return v(l,E,r)}}});return k}}var Pe=X({compatConfig:{MODE:3},props:ke(),setup:function(e,a){var d=a.slots;return function(){return v(e.tagName,{class:e.prefixCls},d)}}}),Rt=X({compatConfig:{MODE:3},props:ke(),setup:function(e,a){var d=a.slots,l=ee("",e),k=l.direction,P=H([]),O={addSider:function(N){P.value=[].concat(tt(P.value),[N])},removeSider:function(N){P.value=P.value.filter(function(w){return w!==N})}};Se(We,O);var i=Z(function(){var r,N=e.prefixCls,w=e.hasSider;return r={},M(r,"".concat(N),!0),M(r,"".concat(N,"-has-sider"),typeof w=="boolean"?w:P.value.length>0),M(r,"".concat(N,"-rtl"),k.value==="rtl"),r});return function(){var r=e.tagName;return v(r,{class:i.value},d)}}}),Xt=ye({suffixCls:"layout",tagName:"section",name:"ALayout"})(Rt),se=ye({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(Pe),ce=ye({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(Pe),ue=ye({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(Pe);const be=Xt;var Kt={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};const Ut=Kt;function je(n){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(l){return Object.getOwnPropertyDescriptor(a,l).enumerable}))),d.forEach(function(l){Yt(n,l,a[l])})}return n}function Yt(n,e,a){return e in n?Object.defineProperty(n,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[e]=a,n}var Oe=function(e,a){var d=je({},e,a.attrs);return v(at,je({},d,{icon:Ut}),null)};Oe.displayName="BarsOutlined";Oe.inheritAttrs=!1;const Gt=Oe;var $e={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1999.98px"},Zt=function(){return{prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:h.any,width:h.oneOfType([h.number,h.string]),collapsedWidth:h.oneOfType([h.number,h.string]),breakpoint:h.oneOf(fe("xs","sm","md","lg","xl","xxl","xxxl")),theme:h.oneOf(fe("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}},Jt=function(){var n=0;return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n+=1,"".concat(e).concat(n)}}();const de=X({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:he(Zt(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup:function(e,a){var d=a.emit,l=a.attrs,k=a.slots,P=ee("layout-sider",e),O=P.prefixCls,i=Ie(We,void 0),r=H(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),N=H(!1);U(function(){return e.collapsed},function(){r.value=!!e.collapsed}),Se(Ct,r);var w=function(S,x){e.collapsed===void 0&&(r.value=S),d("update:collapsed",S),d("collapse",S,x)},E=H(function(f){N.value=f.matches,d("breakpoint",f.matches),r.value!==f.matches&&w(f.matches,"responsive")}),m;function j(f){return E.value(f)}var D=Jt("ant-sider-");i&&i.addSider(D),me(function(){U(function(){return e.breakpoint},function(){try{var f;(f=m)===null||f===void 0||f.removeEventListener("change",j)}catch{var S;(S=m)===null||S===void 0||S.removeListener(j)}if(typeof window<"u"){var x=window,p=x.matchMedia;if(p&&e.breakpoint&&e.breakpoint in $e){m=p("(max-width: ".concat($e[e.breakpoint],")"));try{m.addEventListener("change",j)}catch{m.addListener(j)}j(m)}}},{immediate:!0})}),nt(function(){try{var f;(f=m)===null||f===void 0||f.removeEventListener("change",j)}catch{var S;(S=m)===null||S===void 0||S.removeListener(j)}i&&i.removeSider(D)});var F=function(){w(!r.value,"clickTrigger")};return function(){var f,S,x,p=O.value,L=e.collapsedWidth,W=e.width,V=e.reverseArrow,Y=e.zeroWidthTriggerStyle,G=e.trigger,C=G===void 0?(f=k.trigger)===null||f===void 0?void 0:f.call(k):G,c=e.collapsible,u=e.theme,z=r.value?L:W,T=bt(z)?"".concat(z,"px"):String(z),B=parseFloat(String(L||0))===0?v("span",{onClick:F,class:oe("".concat(p,"-zero-width-trigger"),"".concat(p,"-zero-width-trigger-").concat(V?"right":"left")),style:Y},[C||v(Gt,null,null)]):null,I={expanded:V?v(Te,null,null):v(De,null,null),collapsed:V?v(De,null,null):v(Te,null,null)},o=r.value?"collapsed":"expanded",t=I[o],s=C!==null?B||v("div",{class:"".concat(p,"-trigger"),onClick:F,style:{width:T}},[C||t]):null,g=[l.style,{flex:"0 0 ".concat(T),maxWidth:T,minWidth:T,width:T}],b=oe(p,"".concat(p,"-").concat(u),(S={},M(S,"".concat(p,"-collapsed"),!!r.value),M(S,"".concat(p,"-has-trigger"),c&&C!==null&&!B),M(S,"".concat(p,"-below"),!!N.value),M(S,"".concat(p,"-zero-width"),parseFloat(T)===0),S),l.class);return v("aside",y(y({},l),{},{class:b,style:g}),[v("div",{class:"".concat(p,"-children")},[(x=k.default)===null||x===void 0?void 0:x.call(k)]),c||N.value&&B?s:null])}}});var va=se,fa=ce,ma=de,ha=ue;const ya=rt(be,{Header:se,Footer:ce,Content:ue,Sider:de,install:function(e){return e.component(be.name,be),e.component(se.name,se),e.component(ce.name,ce),e.component(de.name,de),e.component(ue.name,ue),e}});export{re as A,we as G,ma as L,Pt as P,da as _,va as a,ha as b,ya as c,fa as d};
|