import{am as K,an as Q,ao as H,ap as U,aq as Y,e as Z,ar as v,as as ee,s as w,b as oe,at as ne,au as te,av as le,aw as ae,ax as ie,ay as se,az as re,aA as ce,aB as de,q as s,aC as ue,aD as ge,aE as fe,aF as pe,aG as me,aH as ve,aI as $e,aJ as ye,aK as k}from"./jwt-decode.esm-C7p7KYmD.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="4936dad9-f52e-4c08-be6c-0cd6e1a60f52",e._sentryDebugIdIdentifier="sentry-dbid-4936dad9-f52e-4c08-be6c-0cd6e1a60f52")}catch{}})();const B=(e,o,n,a,i)=>({backgroundColor:e,border:`${a.lineWidth}px ${a.lineType} ${o}`,[`${i}-icon`]:{color:n}}),he=e=>{const{componentCls:o,motionDurationSlow:n,marginXS:a,marginSM:i,fontSize:u,fontSizeLG:r,lineHeight:g,borderRadiusLG:$,motionEaseInOutCirc:c,alertIconSizeLG:d,colorText:p,paddingContentVerticalSM:m,alertPaddingHorizontal:y,paddingMD:C,paddingContentHorizontalLG:b}=e;return{[o]:H(H({},U(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${m}px ${y}px`,wordWrap:"break-word",borderRadius:$,[`&${o}-rtl`]:{direction:"rtl"},[`${o}-content`]:{flex:1,minWidth:0},[`${o}-icon`]:{marginInlineEnd:a,lineHeight:0},"&-description":{display:"none",fontSize:u,lineHeight:g},"&-message":{color:p},[`&${o}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},
        padding-top ${n} ${c}, padding-bottom ${n} ${c},
        margin-bottom ${n} ${c}`},[`&${o}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${o}-with-description`]:{alignItems:"flex-start",paddingInline:b,paddingBlock:C,[`${o}-icon`]:{marginInlineEnd:i,fontSize:d,lineHeight:0},[`${o}-message`]:{display:"block",marginBottom:a,color:p,fontSize:r},[`${o}-description`]:{display:"block"}},[`${o}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},Ce=e=>{const{componentCls:o,colorSuccess:n,colorSuccessBorder:a,colorSuccessBg:i,colorWarning:u,colorWarningBorder:r,colorWarningBg:g,colorError:$,colorErrorBorder:c,colorErrorBg:d,colorInfo:p,colorInfoBorder:m,colorInfoBg:y}=e;return{[o]:{"&-success":B(i,a,n,e,o),"&-info":B(y,m,p,e,o),"&-warning":B(g,r,u,e,o),"&-error":H(H({},B(d,c,$,e,o)),{[`${o}-description > pre`]:{margin:0,padding:0}})}}},be=e=>{const{componentCls:o,iconCls:n,motionDurationMid:a,marginXS:i,fontSizeIcon:u,colorIcon:r,colorIconHover:g}=e;return{[o]:{"&-action":{marginInlineStart:i},[`${o}-close-icon`]:{marginInlineStart:i,padding:0,overflow:"hidden",fontSize:u,lineHeight:`${u}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:r,transition:`color ${a}`,"&:hover":{color:g}}},"&-close-text":{color:r,transition:`color ${a}`,"&:hover":{color:g}}}}},Ie=e=>[he(e),Ce(e),be(e)],xe=K("Alert",e=>{const{fontSizeHeading3:o}=e,n=Q(e,{alertIconSizeLG:o,alertPaddingHorizontal:12});return[Ie(n)]}),Se={success:ce,info:re,error:se,warning:ie},we={success:ae,info:le,error:te,warning:ne},Be=ve("success","info","warning","error"),He=()=>({type:v.oneOf(Be),closable:{type:Boolean,default:void 0},closeText:v.any,message:v.any,description:v.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:v.any,closeIcon:v.any,onClose:Function}),_e=Z({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:He(),setup(e,o){let{slots:n,emit:a,attrs:i,expose:u}=o;const{prefixCls:r,direction:g}=ee("alert",e),[$,c]=xe(r),d=w(!1),p=w(!1),m=w(),y=l=>{l.preventDefault();const f=m.value;f.style.height=`${f.offsetHeight}px`,f.style.height=`${f.offsetHeight}px`,d.value=!0,a("close",l)},C=()=>{var l;d.value=!1,p.value=!0,(l=e.afterClose)===null||l===void 0||l.call(e)},b=oe(()=>{const{type:l}=e;return l!==void 0?l:e.banner?"warning":"info"});u({animationEnd:C});const N=w({});return()=>{var l,f,_,T,A,E,z,D,O,F;const{banner:G,closeIcon:P=(l=n.closeIcon)===null||l===void 0?void 0:l.call(n)}=e;let{closable:L,showIcon:h}=e;const M=(f=e.closeText)!==null&&f!==void 0?f:(_=n.closeText)===null||_===void 0?void 0:_.call(n),I=(T=e.description)!==null&&T!==void 0?T:(A=n.description)===null||A===void 0?void 0:A.call(n),W=(E=e.message)!==null&&E!==void 0?E:(z=n.message)===null||z===void 0?void 0:z.call(n),x=(D=e.icon)!==null&&D!==void 0?D:(O=n.icon)===null||O===void 0?void 0:O.call(n),R=(F=n.action)===null||F===void 0?void 0:F.call(n);h=G&&h===void 0?!0:h;const V=(I?we:Se)[b.value]||null;M&&(L=!0);const t=r.value,j=de(t,{[`${t}-${b.value}`]:!0,[`${t}-closing`]:d.value,[`${t}-with-description`]:!!I,[`${t}-no-icon`]:!h,[`${t}-banner`]:!!G,[`${t}-closable`]:L,[`${t}-rtl`]:g.value==="rtl",[c.value]:!0}),q=L?s("button",{type:"button",onClick:y,class:`${t}-close-icon`,tabindex:0},[M?s("span",{class:`${t}-close-text`},[M]):P===void 0?s(ue,null,null):P]):null,X=x&&(ge(x)?fe(x,{class:`${t}-icon`}):s("span",{class:`${t}-icon`},[x]))||s(V,{class:`${t}-icon`},null),J=pe(`${t}-motion`,{appear:!1,css:!0,onAfterLeave:C,onBeforeLeave:S=>{S.style.maxHeight=`${S.offsetHeight}px`},onLeave:S=>{S.style.maxHeight="0px"}});return $(p.value?null:s(me,J,{default:()=>[$e(s("div",k(k({role:"alert"},i),{},{style:[i.style,N.value],class:[i.class,j],"data-show":!d.value,ref:m}),[h?X:null,s("div",{class:`${t}-content`},[W?s("div",{class:`${t}-message`},[W]):null,I?s("div",{class:`${t}-description`},[I]):null]),R?s("div",{class:`${t}-action`},[R]):null,q]),[[ye,!d.value]])]}))}}}),Ae=Y(_e);export{Ae as A};
//# sourceMappingURL=index-CEiA6CH7.js.map
