import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Ct as n,Dr as r,Er as i,Et as a,Ft as o,Gt as s,Jt as c,Ln as l,Nt as u,Pn as d,Ut as f,Vn as p,Wt as m,Yn as h,Zt as g,bt as _,mr as v,nt as y,vr as b,wr as x,wt as S,xn as C,xt as w,yt as T,zn as E}from"./jsx-runtime-CRBytmvs.js";import{v as D,w as O}from"./tooltip-SaeG1Uv7.js";import{t as k}from"./CheckCircleFilled-DcF3PzkE.js";import{t as A}from"./CloseCircleFilled-C_pAsEWy.js";import{t as j}from"./ExclamationCircleFilled-B0FwC6ZE.js";var M=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`info-circle`,theme:`filled`}})),N=e(i()),P=e(r()),F=e(M());function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;tP.createElement(o,I({},e,{ref:t,icon:F.default})));function R(){let[e,t]=P.useState({});return[e,P.useCallback((e,n)=>{if(!n){t(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n});return}let r={width:n.offsetWidth,height:n.offsetHeight};t(t=>{let n=t[e];return n&&n.width===r.width&&n.height===r.height?t:{...t,[e]:r}})},[])]}function z(e,t,n=0){let[r,i]=R(),[a,o,s,c]=P.useMemo(()=>{let i=0,a=0,o=t?.threshold??0,s=new Map,c,l;return e.slice().reverse().forEach((e,u)=>{let d=String(e.key),f=r[d]?.height??0,p=t&&u>0?i+(t.offset??0)-f:i;s.set(d,p),u===0&&(c=f,l=r[d]?.width??0),(!t||u{let t={offset:B,threshold:V};return e&&typeof e==`object`&&(t.offset=e.offset??B,t.threshold=e.threshold??V),[!!e,t]};function te(e,t,n){let r=Math.max(typeof e==`number`?e:0,0)*1e3,i=x(t),a=x(n),[o,s]=P.useState(r>0),c=P.useRef(0),l=P.useRef(null);function u(){let e=Date.now(),t=l.current;t!==null&&(c.current+=e-t),l.current=e}let d=P.useCallback(()=>{u(),s(!1)},[]),f=P.useCallback(()=>{r>0?(l.current=Date.now(),s(!0)):a(0)},[r]);return P.useEffect(()=>{c.current=0,s(r>0)},[r]),P.useEffect(()=>{if(!o)return;let e=null;function t(){u(),c.current>=r?(a(1),i()):(a(Math.min(c.current/r,1)),e=b(t))}return t(),()=>{b.cancel(e)}},[r,o]),[f,d]}function ne(e){let t=P.useMemo(()=>e===!1?{closeIcon:null,disabled:!0}:typeof e==`object`&&e?e:{},[e]),n=P.useMemo(()=>({...t,closeIcon:`closeIcon`in t?t.closeIcon:`×`,disabled:t.disabled??!1}),[t]),r=P.useMemo(()=>h(n,!0),[n]);return[!!e,n,r]}var re=({className:e,style:t,percent:n})=>P.createElement(`progress`,{className:e,max:`100`,value:n,style:t});function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,className:r,style:i,classNames:a,styles:o,components:s,title:c,description:l,icon:u,actions:d,role:f,closable:m,offset:h,notificationIndex:g,stackInThreshold:_,props:v,duration:y=4.5,showProgress:b,hovering:S,pauseOnHover:C=!0,onClick:w,onMouseEnter:T,onMouseLeave:E,onClose:D}=e,[O,k]=P.useState(0),A=`${n}-notice`,[j,M,N]=ne(m),F=x(()=>{M.onClose?.(),D?.()}),[I,L]=P.useState(!1),[R,z]=te(y,F,k),B=100-Math.min(Math.max(O*100,0),100),V=s?.progress||re;P.useEffect(()=>{C&&(S?z():I||R())},[S,I,z,R,C]);function ee(e){L(!0),C&&z(),T?.(e)}function U(e){L(!1),C&&!S&&R(),E?.(e)}function W(e){e.preventDefault(),e.stopPropagation(),F()}let G=P.useRef(h);h!==void 0&&(G.current=h);let K=P.useRef(g);g!==void 0&&(K.current=g);let q=h??G.current,J=g??K.current??0,Y=c==null?null:P.createElement(`div`,{className:p(`${A}-title`,a?.title),style:o?.title},c),X=l==null?null:P.createElement(`div`,{className:p(`${A}-description`,a?.description),style:o?.description},l),ie=Y!==null,ae=X!==null,Z=null;Z=ie&&ae?P.createElement(`div`,{className:p(`${A}-section`,a?.section),style:o?.section},Y,X):Y||X,u!=null&&(Z=P.createElement(`div`,{className:p(`${A}-wrapper`,a?.wrapper),style:o?.wrapper},P.createElement(`div`,{className:p(`${A}-icon`,a?.icon),style:o?.icon},u),Z));let Q=d?P.createElement(`div`,{className:p(`${A}-actions`,a?.actions),style:o?.actions},d):null,$={"--notification-index":J,...o?.root,...i};q!==void 0&&($[`--notification-y`]=`${q}px`);let oe=f??v?.role??`alert`;return P.createElement(`div`,H({},v,{ref:t,role:oe,"data-notification-index":J,className:p(A,r,a?.root,{[`${A}-closable`]:j,[`${A}-stack-in-threshold`]:_}),style:$,onClick:w,onMouseEnter:ee,onMouseLeave:U}),Z,Q,j&&P.createElement(`button`,H({className:p(`${A}-close`,a?.close),"aria-label":`Close`},N,{style:o?.close,onClick:W}),M.closeIcon),b&&typeof y==`number`&&y>0&&P.createElement(V,{className:p(`${A}-progress`,a?.progress),percent:B,style:o?.progress}))}),W=P.createContext({}),G=({children:e,classNames:t})=>{let n=P.useMemo(()=>({classNames:t}),[t]);return P.createElement(W.Provider,{value:n},e)};function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{listPrefixCls:n,height:r,topNoticeHeight:i=0,topNoticeWidth:a=0,className:o,style:s,...c}=e,l=`${n}-content`,u=P.useRef(r),d=r(t[n]=p(...e.map(e=>e?.[n])),t),{})}function ie(e){return Y.reduce((t,n)=>(t[n]=Object.assign({},...e.map(e=>e?.[n])),t),{})}function ae(e,t){let n=String(t),r=e.findIndex(e=>e.key===n);if(r!==-1)return e.length-r-1}var Z=e=>{let{config:t,components:n,contextClassNames:r,classNames:i,styles:a,className:o,style:s,nodeRef:c,listHovering:l,stackEnabled:u,pauseOnHover:d,setNodeSize:f,onNoticeClose:m,...h}=e,{key:g,placement:_,...y}=t,b=String(g),x=v(c,P.useCallback(e=>{f(b,e)},[f,b]));return P.createElement(U,J({},y,h,{ref:x,className:p(r?.notice,t.className,o),style:{...s,...t.style},classNames:X([i,t.classNames]),styles:ie([a,t.styles]),components:{...n,...t.components},hovering:u&&l,pauseOnHover:t.pauseOnHover??d,onClose:()=>{t.onClose?.(),m?.(g)}}))},Q=e=>{let{configList:t=[],prefixCls:n=`rc-notification`,pauseOnHover:r,classNames:i,styles:a,components:o,stack:s,motion:c,placement:l,className:d,style:f,onNoticeClose:m,onAllRemoved:h}=e,{classNames:g}=P.useContext(W),_=P.useMemo(()=>t.map(e=>({config:e,key:String(e.key)})),[t]),v=typeof c==`function`?c(l):c,[y,{offset:b,threshold:x}]=ee(s),[S,C]=P.useState(!1),w=y&&(S||_.length<=x),T=P.useMemo(()=>{if(!(!y||w))return{offset:b,threshold:x}},[w,b,y,x]),[E,D]=P.useState(0),O=P.useRef(null),[k,A,j,M,N]=z(t,T,E),F=!!t.length;P.useEffect(()=>{let e=O.current;if(!e)return;let{gap:t,rowGap:n}=window.getComputedStyle(e),r=parseFloat(n||t)||0;D(e=>e===r?e:r)},[F]);let I=`${n}-list`;return P.createElement(`div`,{className:p(n,I,`${n}-${l}`,g?.list,d,i?.list,{[`${n}-stack`]:y,[`${n}-stack-expanded`]:w,[`${I}-hovered`]:S}),onMouseEnter:()=>{C(!0)},onMouseLeave:()=>{C(!1)},style:{...a?.list,...f}},P.createElement(q,{listPrefixCls:I,height:j,topNoticeHeight:M,topNoticeWidth:N,className:i?.listContent,style:a?.listContent,ref:O},P.createElement(u,J({component:!1,keys:_,motionAppear:!0},v,{onAllRemoved:()=>{l&&h?.(l)}}),({config:e,className:t,style:s},c)=>{let{key:l}=e,u=String(l),d=ae(_,l),f=y&&d!==void 0&&d{let{prefixCls:n=`rc-notification`,container:r,motion:i,maxCount:a,pauseOnHover:o,classNames:s,styles:c,components:l,className:u,style:d,onAllRemoved:f,stack:p,renderNotifications:m}=e,[h,g]=P.useState([]),[_,v]=P.useState({}),y=P.useRef(!1);P.useImperativeHandle(t,()=>({open:e=>{g(t=>{let n=[...t],r=n.findIndex(t=>t.key===e.key),i={...e};return r>=0?(i.times=(t[r]?.times??0)+1,n[r]=i):(i.times=0,n.push(i)),a&&a>0&&n.length>a&&(n=n.slice(-a)),n})},close:e=>{g(t=>t.filter(t=>t.key!==e))},destroy:()=>{g([])}})),P.useEffect(()=>{let e={};h.forEach(t=>{let n=t.placement??`topRight`;e[n]=e[n]||[],e[n].push(t)}),Object.keys(_).forEach(t=>{e[t]=e[t]||[]}),v(e)},[h]);let b=x(e=>{v(t=>{let n={...t};return(n[e]||[]).length||delete n[e],n})});if(P.useEffect(()=>{Object.keys(_).length>0?y.current=!0:y.current&&=(f?.(),!1)},[_,f]),!r)return null;let S=Object.keys(_);return(0,N.createPortal)(P.createElement(P.Fragment,null,S.map(e=>{let t=P.createElement(Q,{key:e,configList:_[e],placement:e,prefixCls:n,pauseOnHover:o,classNames:s,styles:c,components:l,className:u?.(e),style:d?.(e),motion:i,stack:p,onNoticeClose:e=>{g(t=>t.filter(t=>t.key!==e))},onAllRemoved:b});return m?P.cloneElement(m(t,{prefixCls:n,key:e}),{key:e}):t})),r)}),oe=()=>document.body,se=0;function ce(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{let r=e[n];r!==void 0&&(t[n]=r)})}),t}function le(e={}){let{getContainer:t=oe,motion:n,prefixCls:r,placement:i,closable:a,duration:o,showProgress:s,pauseOnHover:c,classNames:l,styles:u,components:d,maxCount:f,className:p,style:m,onAllRemoved:h,stack:g,renderNotifications:_}=e,v={placement:i,closable:a,duration:o,showProgress:s},[y,b]=P.useState(),S=P.useRef(null),[C,w]=P.useState([]),T=P.createElement($,{container:y,ref:S,prefixCls:r,motion:n,maxCount:f,pauseOnHover:c,classNames:l,styles:u,components:d,className:p,style:m,onAllRemoved:h,stack:g,renderNotifications:_}),E=x(e=>{let t=ce(v,e);(t.key===null||t.key===void 0)&&(t.key=`rc-notification-${se}`,se+=1),w(e=>[...e,{type:`open`,config:t}])}),D=P.useMemo(()=>({open:E,close:e=>{w(t=>[...t,{type:`close`,key:e}])},destroy:()=>{w(e=>[...e,{type:`destroy`}])}}),[]);return P.useEffect(()=>{b(t())}),P.useEffect(()=>{S.current&&C.length&&(C.forEach(e=>{switch(e.type){case`open`:S.current?.open(e.config);break;case`close`:S.current?.close(e.key);break;case`destroy`:S.current?.destroy();break}}),w(e=>{let t=e.filter(e=>!C.includes(e));return t.length===e.length?e:t}))},[C]),[D,T]}var ue=(e,t)=>P.useMemo(()=>{let n=e??t;return n?{...a(t)?t:{},...a(n)?n:{}}:!1},[e,t]);function de(e,t){return{...S(e)&&{"--notification-top":d(e)},...S(t)&&{"--notification-bottom":d(t)}}}function fe(e){return{motionName:`${e}-fade`}}function pe(e,t,n){return e===void 0?t?.closeIcon===void 0?n?.closeIcon:t.closeIcon:e}var me=e=>{let{motionDurationMid:t,motionEaseInOut:n}=e,r=`${t} ${n}`;return{transform:`scale(var(--notification-scale, 1))`,transition:[`transform`,`inset`,`clip-path`,`opacity`].map(e=>`${e} ${r}`).join(`, `)}},he=(e,t)=>{let{componentCls:n,antCls:r,colorSuccess:i,colorInfo:a,colorWarning:o,colorError:s,colorTextHeading:c,colorText:l,boxShadow:u,borderRadiusLG:p,fontSize:m,lineHeight:h,notificationBg:g,notificationPadding:_,notificationMarginEdge:v,margin:y,calc:b}=e,x=`${n}-notice`,[S,C]=f(r,`notification`);return{[x]:{position:`absolute`,width:t.width,maxWidth:`calc(100vw - ${d(b(v).mul(2).equal())})`,padding:_,pointerEvents:`auto`,[S(`icon-font-size`)]:t.iconFontSize,[S(`title-font-size`)]:t.titleFontSize,[S(`title-line-height`)]:t.titleLineHeight,boxSizing:`border-box`,color:l,background:g,borderRadius:p,boxShadow:u,fontSize:m,lineHeight:h,wordWrap:`break-word`,overflow:`visible`,...me(e),...t.noticeStyle,"&::after":{position:`absolute`,insetInline:0,top:b(y).mul(-1).equal(),height:y,content:`""`},...t.typeStyle&&{"&-success":{background:C(`color-success-bg`,g)},"&-error":{background:C(`color-error-bg`,g)},"&-info":{background:C(`color-info-bg`,g)},"&-warning":{background:C(`color-warning-bg`,g)}}},[`${x}-wrapper`]:{display:`flex`,...t.contentStyle},[`${x}-title`]:{color:c,fontSize:C(`title-font-size`),lineHeight:C(`title-line-height`)},[`${x}-icon`]:{flex:`none`,fontSize:C(`icon-font-size`),lineHeight:1,[`&${x}-icon-success`]:{color:i},[`&${x}-icon-info, &${x}-icon-loading`]:{color:a},[`&${x}-icon-warning`]:{color:o},[`&${x}-icon-error`]:{color:s}}}},ge=e=>{let{componentCls:t,progressBg:n,notificationProgressHeight:r,fontSize:i,borderRadiusLG:a,width:o,notificationIconSize:s,colorText:l,motionDurationMid:u,fontSizeLG:f,lineHeightLG:p,marginSM:m,marginXS:h,paddingLG:g,notificationPaddingVertical:_,notificationPaddingHorizontal:v,notificationCloseButtonSize:y,colorIcon:b,borderRadiusSM:x,colorIconHover:S,colorBgTextHover:C,colorBgTextActive:w}=e,T=`${t}-notice`;return{...he(e,{width:o,iconFontSize:s,titleFontSize:f,titleLineHeight:p,contentStyle:{alignItems:`flex-start`,gap:m},typeStyle:!0}),[`${T}-section`]:{display:`flex`,flexDirection:`column`,flex:`auto`,gap:h,minWidth:0},[`${T}-description`]:{color:l,fontSize:i},[`${T}-closable`]:{[`${T}-title, ${T}-description`]:{paddingInlineEnd:g},[`${T}-title + ${T}-description`]:{paddingInlineEnd:0}},[`${T}-close`]:{position:`absolute`,top:_,insetInlineEnd:v,display:`flex`,alignItems:`center`,justifyContent:`center`,width:y,height:y,color:b,background:`none`,border:`none`,borderRadius:x,outline:`none`,transition:[`color`,`background-color`].map(e=>`${e} ${u}`).join(`, `),"&:hover":{color:S,backgroundColor:C},"&:active":{backgroundColor:w},...c(e)},[`${T}-progress`]:{position:`absolute`,bottom:0,display:`block`,appearance:`none`,inlineSize:`calc(100% - ${d(a)} * 2)`,blockSize:r,border:0,left:{_skip_check_:!0,value:a},right:{_skip_check_:!0,value:a},"&, &::-webkit-progress-bar":{borderRadius:a,backgroundColor:`rgba(0, 0, 0, 0.04)`},"&::-moz-progress-bar":{background:n},"&::-webkit-progress-value":{borderRadius:a,background:n}},[`${T}-actions`]:{float:`right`,marginTop:m}}},_e=e=>{let{componentCls:t,width:n}=e,r=`${t}-notice`,i=`${r}-actions`,a=ge(e);return{[`${r}-pure-panel`]:{width:n,maxWidth:`100%`,...a,[r]:{...a[r],position:`relative`,width:`100%`,maxWidth:`100%`},[i]:{...a[i],float:`none`,textAlign:`end`}}}},ve=e=>{let{componentCls:t}=e;return{[t]:ge(e)}},ye=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],be=`--notification-margin-edge`,xe=(e,t)=>({blockEnd:e===`top`?`bottom`:`top`,inlineEnd:t===`left`?`right`:`left`}),Se=e=>`translate3d(${e?.x??`0`}, ${e?.y??`0`}, 0) scale(var(--notification-scale, 1))`,Ce=(e,t)=>{let n=e.startsWith(`bottom`)?`bottom`:`top`,r=e.endsWith(`Right`)?`right`:`left`,{blockEnd:i,inlineEnd:a}=xe(n,r),o=e===`top`||e===`bottom`,s=e===`top`||e.endsWith(`Left`)?`-${t}`:t;return{placement:e,vertical:n,blockEnd:i,horizontal:r,inlineEnd:a,motionOffset:o?{x:`-50%`,y:s}:{x:s},baseMotionOffset:o?{x:`-50%`}:void 0,isCenterPlacement:o}},we=e=>e===`bottom`?`column-reverse`:`column`,Te=e=>{let t=`var(${be}, 0px)`;return`calc(var(--notification-${e}, ${t}) - ${t})`},Ee=e=>e===`bottom`?`center top`:`center bottom`,De=e=>d(e.calc(e.marginXXL).mul(-1).equal()),Oe=e=>{let t=De(e);return`inset(${t} ${t} ${t} ${t})`},ke=(e,t)=>{let n=De(e);return t===`bottom`?`inset(${n} ${n} 50% ${n})`:`inset(50% ${n} ${n} ${n})`},Ae=(e,t)=>{let{componentCls:n}=e,{placement:r,vertical:i,blockEnd:a,horizontal:o,inlineEnd:s,isCenterPlacement:c}=t,l=`${n}-notice`,u=`${l}${n}-fade`,d=Se(t.motionOffset),f=Se(t.baseMotionOffset),p=Ee(i);return{[`&${n}-${r}`]:{[i]:Te(i),[a]:`auto`,display:`flex`,flexDirection:we(i),...c?{marginInline:0,left:`50%`,right:`auto`,transform:`translateX(-50%)`}:{[o]:0,[s]:`auto`},[l]:{[i]:`var(--notification-y, 0)`,...c?{left:`50%`,transform:f}:{[o]:`var(--notification-x, 0)`},transformOrigin:p},[`${u}-appear-prepare, ${u}-enter-prepare`]:{opacity:0,transform:d,transition:`none`},[`${u}-appear-start, ${u}-enter-start`]:{opacity:0,transform:d},[`${u}-appear-active, ${u}-enter-active`]:{opacity:1,transform:f},[`${u}-leave-start`]:{opacity:1,transform:f},[`${u}-leave-active`]:{opacity:0,transform:d},[`&${n}-stack:not(${n}-stack-expanded)`]:{[l]:{clipPath:ke(e,i)},[`${l}[data-notification-index='0']`]:{clipPath:Oe(e)}}}}},je=(e,t=ye)=>{let{notificationMotionOffset:n}=e,r=d(n);return{...t.reduce((t,n)=>({...t,...Ae(e,Ce(n,r))}),{})}},Me=e=>{let{componentCls:t}=e;return{[t]:je(e)}},Ne=3,Pe=e=>({zIndexPopup:e.zIndexPopupBase+D+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),Fe=e=>{let t=e.paddingMD,n=e.paddingLG;return C(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${d(e.paddingMD)} ${d(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,notificationProgressHeight:2,notificationMotionOffset:64})},Ie=e=>`inset(${e} ${e} ${e} ${e})`,Le=e=>{let{componentCls:t,motionDurationMid:n,motionDurationSlow:r,motionEaseInOut:i}=e,a=`${`${t}-list`}-content`;return{[a]:{position:`relative`,display:`flex`,flexShrink:0,flexDirection:`column`,gap:e.notificationMarginBottom,width:`100%`,willChange:`height, transform`,transition:`none`,[`&${a}-decrease`]:{transition:`height calc(${r} * 2) ${i} ${n}`}},[`${t}-fade`]:{backfaceVisibility:`hidden`,willChange:`transform, opacity`}}},Re=(e,t)=>{let{componentCls:n,notificationMarginEdge:r}=e,i=`--notification-margin-edge`,a=`${n}-notice`,o=`${n}-list`,s=t.listWidthKey?e.calc(e[t.listWidthKey]).add(e.calc(r).mul(2)).equal():`100%`,c=`${a}:nth-last-child(n + ${(t.stackVisibleCount??Ne)+1})`,l=Ie(d(e.calc(e.marginXXL).mul(-1).equal()));return{[n]:{...g(e),[i]:d(r),position:`fixed`,zIndex:e.zIndexPopup,width:s,maxWidth:`100vw`,height:`100vh`,overflow:`hidden`,overscrollBehavior:`contain`,[`${n}-hook-holder`]:{position:`relative`},[`&${o}`]:{maxHeight:`100vh`,padding:`var(${i})`,overflowX:`hidden`,overflowY:`auto`,overscrollBehavior:`contain`,scrollbarWidth:`none`,msOverflowStyle:`none`,pointerEvents:`none`,"&::-webkit-scrollbar":{display:`none`,width:0,height:0}},...Le(e),[`&${n}-stack`]:{[a]:{clipPath:l},[`&:not(${n}-stack-expanded)`]:{[a]:{"--notification-scale":`calc(1 - min(var(--notification-index, 0), 2) * 0.06)`},[`${a}:not(${a}-stack-in-threshold)`]:{opacity:0,pointerEvents:`none`},[c]:{opacity:0,pointerEvents:`none`}}},"&-rtl":{direction:`rtl`,[`${a}-actions`]:{float:`left`}}}}};s([`Notification`,`PurePanel`],e=>_e(Fe(e)),Pe);var ze=(e,t)=>{let n=t.itemStyle??ve;return[Re(e,t),n(e),Me(e)]},Be=m(`Notification`,e=>ze(Fe(e),{listWidthKey:`width`}),Pe),Ve=e=>{let t=e.calc(e.controlHeightLG).sub(e.calc(e.fontSize).mul(e.lineHeight)).div(2).equal(),n=e.paddingSM;return C(Fe(e),{notificationBg:e.contentBg,notificationPadding:e.contentPadding,notificationPaddingVertical:t,notificationPaddingHorizontal:n})},He=e=>({zIndexPopup:e.zIndexPopupBase+D+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),Ue=e=>{let{fontSize:t,fontSizeLG:n,lineHeight:r}=e;return he(e,{width:`max-content`,iconFontSize:n,titleFontSize:t,titleLineHeight:r,contentStyle:{alignItems:`center`,gap:e.marginXS},noticeStyle:{zIndex:1}})},We=e=>{let{componentCls:t}=e,n=`${t}-notice`,r=`${t}-list-content`,{"&::after":i,...a}=Ue(e)[n],o={...a,position:`absolute`,zIndex:-1,left:`50%`,height:e.calc(e.marginXS).mul(2).equal(),padding:0,boxShadow:e.boxShadowTertiary,opacity:0,pointerEvents:`none`,transform:`translateX(-50%) translateY(100%)`,transition:[`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,`transform ${e.motionDurationFast} ${e.motionEaseInOut}`,`width ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(`, `),content:`""`};return{[t]:{[`&${t}-stack`]:{[r]:{isolation:`isolate`,"&::before":{...o,top:`calc(var(--top-notificiation-height) - ${d(e.marginXS)})`,width:`calc(var(--top-notificiation-width) - ${d(e.margin)})`},"&::after":{...o,zIndex:-2,top:`var(--top-notificiation-height)`,width:`calc(var(--top-notificiation-width) - ${d(e.calc(e.margin).mul(2).equal())})`}},[`&:not(${t}-stack-expanded)`]:{[r]:{"&::before, &::after":{opacity:1,transform:`translateX(-50%) translateY(0)`}}}}}}},Ge=e=>{let{componentCls:t}=e,n=`${t}-notice`,r=Ue(e);return{[`${n}-pure-panel`]:{width:`max-content`,maxWidth:`100%`,...r,[n]:{...r[n],position:`relative`,width:`max-content`,maxWidth:`100%`}}}},Ke=s([`Message`,`PurePanel`],e=>Ge(Ve(e)),He),qe=e=>({[e.componentCls]:Ue(e)}),Je=m(`Message`,e=>{let t=Ve(e);return[ze(t,{stackVisibleCount:1,itemStyle:qe}),We(t)]},He),Ye={info:P.createElement(L,null),success:P.createElement(k,null),error:P.createElement(A,null),warning:P.createElement(j,null),loading:P.createElement(y,null)},Xe=(e,t)=>t||e&&Ye[e]||null,Ze=e=>{let{prefixCls:t,className:n,style:r,type:i,icon:a,content:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:m,styles:h}=E(`message`),g=t||u(`message`),_=`${g}-notice`,v=T(g),[y,b]=Je(g,v),[x,S]=w([m,s],[h,c],{props:e}),C=Xe(i,a),D=i?`${_}-icon-${i}`:void 0,O={wrapper:p(i&&`${g}-${i}`,x.wrapper),icon:p(D,x.icon),title:x.title},k={wrapper:S.wrapper,icon:S.icon,title:S.title};return P.createElement(`div`,{className:p(`${_}-pure-panel`,y,n,b,v,x.root),style:S.root},P.createElement(Ke,{prefixCls:g}),P.createElement(U,{...l,prefixCls:g,className:d,style:{...f,...r},duration:null,icon:C,title:o,classNames:O,styles:k}))};function Qe(e,t){return{motionName:t??`${e}-fade`}}function $e(e){let t,n=new Promise(n=>{t=e(()=>{n(!0)})}),r=()=>{t?.()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}var et=8,tt=3,nt=!1,rt=({children:e,prefixCls:t})=>{let n=T(t),[r,i]=Je(t,n);return P.createElement(G,{classNames:{list:p(r,i,n)}},e)},it=(e,{prefixCls:t,key:n})=>P.createElement(rt,{prefixCls:t,key:n},e),at=P.forwardRef((e,t)=>{let{top:n,prefixCls:r,getContainer:i,maxCount:a,duration:o=tt,rtl:s,classNames:c,styles:u,transitionName:d,pauseOnHover:f=!0,stack:m,onAllRemoved:h}=e,{getPrefixCls:g,direction:_,getPopupContainer:v}=E(`message`),{message:y}=P.useContext(l),b=r||g(`message`),[x,S]=w([y?.classNames,c],[y?.styles,u],{props:e}),[C,T]=le({prefixCls:b,style:()=>de(n??et),className:()=>p({[`${b}-rtl`]:s??_===`rtl`}),motion:()=>Qe(b,d),closable:!1,duration:o,getContainer:()=>i?.()||v?.()||document.body,maxCount:a,onAllRemoved:h,classNames:x,styles:S,renderNotifications:it,pauseOnHover:f,stack:ue(m,nt)});return P.useImperativeHandle(t,()=>({...C,prefixCls:b,message:y})),T}),ot=0;function st(e){let t=P.useRef(null);return O(`Message`),[P.useMemo(()=>{let r=e=>{t.current?.close(e)},i=n=>{if(!t.current){let e=()=>{};return e.then=()=>{},e}let{open:i,prefixCls:a,message:o}=t.current,s=o?.className||{},c=o?.style||{},l=`${a}-notice`,{content:u,icon:d,type:f,key:m,className:h,style:g,onClose:v,classNames:y={},styles:b={},...x}=n,C=m;S(C)||(ot+=1,C=`antd-message-${ot}`);let w={...e,...n},T=_(y,{props:w}),E=_(b,{props:w}),D=Xe(f,d),O=f?`${l}-icon-${f}`:void 0;return $e(e=>(i({...x,key:C,icon:D,title:u,classNames:{...T,wrapper:p(f&&`${a}-${f}`,T.wrapper),icon:p(O,T.icon)},styles:E,placement:`top`,className:p({[`${l}-${f}`]:f},h,s),style:{...c,...g},onClose:()=>{v?.(),e()}}),()=>{r(C)}))},o={open:i,destroy:e=>{e===void 0?t.current?.destroy():r(e)}};return[`info`,`success`,`warning`,`error`,`loading`].forEach(e=>{o[e]=(t,r,o)=>{let s;s=a(t)&&`content`in t?t:{content:t};let c,l;n(r)?l=r:(c=r,l=o);let u={onClose:l,duration:c,...s,type:e};return i(u)}}),o},[]),P.createElement(at,{key:`message-holder`,...e,ref:t})]}function ct(e){return st(e)}var lt=P.createContext({}),ut=P.createContext({message:{},notification:{},modal:{}});export{L as _,$e as a,Je as c,fe as d,de as f,G as g,Q as h,ct as i,Be as l,le as m,ut as n,Ze as o,ue as p,st as r,Xe as s,lt as t,pe as u};