diff --git a/video-gen-app/dist/assets/index-JDcJqWtB.js b/video-gen-app/dist/assets/index-Bc_ErQq7.js similarity index 72% rename from video-gen-app/dist/assets/index-JDcJqWtB.js rename to video-gen-app/dist/assets/index-Bc_ErQq7.js index 36814e43..78b331cd 100644 --- a/video-gen-app/dist/assets/index-JDcJqWtB.js +++ b/video-gen-app/dist/assets/index-Bc_ErQq7.js @@ -124,39 +124,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho html body { overflow-y: hidden; ${mp()?`width: calc(100% - ${e}px);`:``} -}`,n)}else Tr(n);return()=>{Tr(n)}},[t,n])}var vp=[],yp=200,bp=0,xp=e=>{if(e.key===`Escape`&&!e.isComposing){if(Date.now()-bp=0;--n)vp[n].onEsc({top:n===t-1,event:e})}},Sp=()=>{bp=Date.now()};function Cp(){window.addEventListener(`keydown`,xp),window.addEventListener(`compositionend`,Sp)}function wp(){vp.length===0&&(window.removeEventListener(`keydown`,xp),window.removeEventListener(`compositionend`,Sp))}function Tp(e,t){let n=Xn(),r=zn(t),i=()=>{vp.find(e=>e.id===n)||vp.push({id:n,onEsc:r})},a=()=>{vp=vp.filter(e=>e.id!==n)};(0,S.useMemo)(()=>{e?i():e||a()},[e]),(0,S.useEffect)(()=>{if(e)return i(),Cp(),()=>{a(),wp()}},[e])}var Ep=e=>e===!1?!1:!Bn()||!e?null:typeof e==`string`?document.querySelector(e):typeof e==`function`?e():e,Dp=S.forwardRef((e,t)=>{let{open:n,autoLock:r,getContainer:i,debug:a,autoDestroy:o=!0,children:s,onEsc:c}=e,[l,u]=S.useState(n),d=l||n;S.useEffect(()=>{(o||n)&&u(n)},[n,o]);let[f,p]=S.useState(()=>Ep(i));S.useEffect(()=>{let e=Ep(i);p(()=>e??null)});let[m,h]=pp(d&&!f,a),g=f??m;_p(r&&n&&Bn()&&(g===m||g===document.body)),Tp(n,c);let _=null;s&&ur(s)&&t&&(_=pr(s));let v=lr(_,t);if(!d||!Bn()||f===void 0)return null;let y=g===!1||dp(),b=s;return t&&(b=S.cloneElement(s,{ref:v})),S.createElement(lp.Provider,{value:h},y?b:(0,Vi.createPortal)(b,g))});function Op(e){let{prefixCls:t,align:n,arrow:r,arrowPos:i}=e,{className:a,content:o,style:s}=r||{},{x:c=0,y:l=0}=i,u=S.useRef(null);if(!n||!n.points)return null;let d={position:`absolute`};if(n.autoArrow!==!1){let e=n.points[0],t=n.points[1],r=e[0],i=e[1],a=t[0],o=t[1];r===a||![`t`,`b`].includes(r)?d.top=l:r===`t`?d.top=0:d.bottom=0,i===o||![`l`,`r`].includes(i)?d.left=c:i===`l`?d.left=0:d.right=0}return S.createElement(`div`,{ref:u,className:J(`${t}-arrow`,a),style:{...d,...s}},o)}function kp(){return kp=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(`div`,{style:{zIndex:r},className:J(`${t}-mask`,o&&`${t}-mobile-mask`,e)})):null}var jp=S.memo(({children:e})=>e,(e,t)=>t.cache);function Mp(e,t,n,r,i,a,o,s){let c=`auto`,l=e?{}:{left:`-1000vw`,top:`-1000vh`,right:c,bottom:c};if(!e&&(t||!n)){let{points:e}=r,t=r.dynamicInset||r._experimental?.dynamicInset,n=t&&e[0][1]===`r`,u=t&&e[0][0]===`b`;n?(l.right=i,l.left=c):(l.left=o,l.right=c),u?(l.bottom=a,l.top=c):(l.top=s,l.bottom=c)}return l}function Np(){return Np=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{onEsc:n,popup:r,className:i,prefixCls:a,style:o,target:s,onVisibleChanged:c,open:l,keepDom:u,fresh:d,onClick:f,mask:p,arrow:m,arrowPos:h,align:g,motion:_,maskMotion:v,mobile:y,forceRender:b,getPopupContainer:x,autoDestroy:C,portal:w,children:T,zIndex:E,onMouseEnter:D,onMouseLeave:O,onPointerEnter:k,onPointerDownCapture:A,ready:j,offsetX:M,offsetY:N,offsetR:P,offsetB:F,onAlign:I,onPrepare:L,onResize:R,stretch:z,targetWidth:B,targetHeight:V}=e,H=typeof r==`function`?r():r,U=l||u,ee=!!y,[W,te,G]=S.useMemo(()=>y?[y.mask,y.maskMotion,y.motion]:[p,v,_],[y,p,v,_]),ne=x?.length>0,[K,re]=S.useState(!x||!ne);Hn(()=>{!K&&ne&&s&&re(!0)},[K,ne,s]);let ie=zn((e,t)=>{R?.(e,t),I()}),ae=Mp(ee,j,l,g,P,F,M,N);if(!K)return null;let q={};return z&&(z.includes(`height`)&&V?q.height=V:z.includes(`minHeight`)&&V&&(q.minHeight=V),z.includes(`width`)&&B?q.width=B:z.includes(`minWidth`)&&B&&(q.minWidth=B)),l||(q.pointerEvents=`none`),S.createElement(w,{open:b||U,getContainer:x&&(()=>x(s)),autoDestroy:C,onEsc:n},S.createElement(Ap,{prefixCls:a,open:l,zIndex:E,mask:W,motion:te,mobile:ee}),S.createElement(oa,{onResize:ie,disabled:!l},e=>S.createElement(Od,Np({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:`${a}-hidden`},G,{onAppearPrepare:L,onEnterPrepare:L,visible:l,onVisibleChanged:e=>{_?.onVisibleChanged?.(e),c(e)}}),({className:n,style:r},s)=>{let c=J(a,n,i,{[`${a}-mobile`]:ee});return S.createElement(`div`,{ref:cr(e,t,s),className:c,style:{"--arrow-x":`${h.x||0}px`,"--arrow-y":`${h.y||0}px`,...ae,...q,...r,boxSizing:`border-box`,zIndex:E,...o},onMouseEnter:D,onMouseLeave:O,onPointerEnter:k,onClick:f,onPointerDownCapture:A},m&&S.createElement(Op,{prefixCls:a,arrow:m,arrowPos:h,align:g}),S.createElement(jp,{cache:!l&&!d},H))})),T)}),Fp=S.createContext(null),Ip=S.createContext(null);function Lp(e){return e?Array.isArray(e)?e:[e]:[]}function Rp(e,t,n){return S.useMemo(()=>{let r=Lp(t??e),i=Lp(n??e),a=new Set(r),o=new Set(i);return a.has(`hover`)&&!a.has(`click`)&&a.add(`touch`),o.has(`hover`)&&!o.has(`click`)&&o.add(`touch`),[a,o]},[e,t,n])}function zp(e=[],t=[],n){let r=(e,t)=>e[t]||``;return n?r(e,0)===r(t,0):r(e,0)===r(t,0)&&r(e,1)===r(t,1)}function Bp(e,t,n,r){let{points:i}=n,a=Object.keys(e);for(let n=0;nr.includes(e))&&t.push(n),n=n.parentElement}return t}function Up(e,t=1){return Number.isNaN(e)?t:e}function Wp(e){return Up(parseFloat(e),0)}function Gp(e,t){let n={...e};return(t||[]).forEach(e=>{if(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)return;let{overflow:t,overflowClipMargin:r,borderTopWidth:i,borderBottomWidth:a,borderLeftWidth:o,borderRightWidth:s}=Vp(e).getComputedStyle(e),c=e.getBoundingClientRect(),{offsetHeight:l,clientHeight:u,offsetWidth:d,clientWidth:f}=e,p=Wp(i),m=Wp(a),h=Wp(o),g=Wp(s),_=Up(Math.round(c.width/d*1e3)/1e3),v=Up(Math.round(c.height/l*1e3)/1e3),y=(d-f-h-g)*_,b=(l-u-p-m)*v,x=p*v,S=m*v,C=h*_,w=g*_,T=0,E=0;if(t===`clip`){let e=Wp(r);T=e*_,E=e*v}let D=c.x+C-T,O=c.y+x-E,k=D+c.width+2*T-C-w-y,A=O+c.height+2*E-x-S-b;n.left=Math.max(n.left,D),n.top=Math.max(n.top,O),n.right=Math.min(n.right,k),n.bottom=Math.min(n.bottom,A)}),n}function Kp(e,t=0){let n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function qp(e,t){let[n,r]=t||[];return[Kp(e.width,n),Kp(e.height,r)]}function Jp(e=``){return[e[0],e[1]]}function Yp(e,t){let n=t[0],r=t[1],i,a;return a=n===`t`?e.y:n===`b`?e.y+e.height:e.y+e.height/2,i=r===`l`?e.x:r===`r`?e.x+e.width:e.x+e.width/2,{x:i,y:a}}function Xp(e,t){let n={t:`b`,b:`t`,l:`r`,r:`l`},r=[...e];return r[t]=n[e[t]]||`c`,r}function Zp(e){return e.join(``)}function Qp(e,t,n,r,i,a,o,s){let[c,l]=S.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),u=S.useRef(0),d=S.useMemo(()=>!t||s?[]:Hp(t),[t]),f=S.useRef({});e||(f.current={});let p=zn(()=>{if(t&&n&&e&&!s){let e=t,s=e.ownerDocument,c=Vp(e),{position:u}=c.getComputedStyle(e),p=e.style.left,m=e.style.top,h=e.style.right,g=e.style.bottom,_=e.style.overflow,v={...i[r],...a},y=s.createElement(`div`);e.parentElement?.appendChild(y),y.style.left=`${e.offsetLeft}px`,y.style.top=`${e.offsetTop}px`,y.style.position=u,y.style.height=`${e.offsetHeight}px`,y.style.width=`${e.offsetWidth}px`,e.style.left=`0`,e.style.top=`0`,e.style.right=`auto`,e.style.bottom=`auto`,e.style.overflow=`hidden`;let b;if(Array.isArray(n))b={x:n[0],y:n[1],width:0,height:0};else{let e=n.getBoundingClientRect();e.x=e.x??e.left,e.y=e.y??e.top,b={x:e.x,y:e.y,width:e.width,height:e.height}}let x=e.getBoundingClientRect(),{height:S,width:C}=c.getComputedStyle(e);x.x=x.x??x.left,x.y=x.y??x.top;let{clientWidth:w,clientHeight:T,scrollWidth:E,scrollHeight:D,scrollTop:O,scrollLeft:k}=s.documentElement,A=x.height,j=x.width,M=b.height,N=b.width,P={left:0,top:0,right:w,bottom:T},F={left:-k,top:-O,right:E-k,bottom:D-O},{htmlRegion:I}=v,L=`visible`,R=`visibleFirst`;I!==`scroll`&&I!==R&&(I=L);let z=I===R,B=Gp(F,d),V=Gp(P,d),H=I===L?V:B,U=z?V:H;e.style.left=`auto`,e.style.top=`auto`,e.style.right=`0`,e.style.bottom=`0`;let ee=e.getBoundingClientRect();e.style.left=p,e.style.top=m,e.style.right=h,e.style.bottom=g,e.style.overflow=_,e.parentElement?.removeChild(y);let W=Up(Math.round(j/parseFloat(C)*1e3)/1e3),te=Up(Math.round(A/parseFloat(S)*1e3)/1e3);if(W===0||te===0||Or(n)&&!Ar(n))return;let{offset:G,targetOffset:ne}=v,[K,re]=qp(x,G),[ie,ae]=qp(b,ne);b.x-=ie,b.y-=ae;let[q,oe]=v.points||[],se=Jp(oe),ce=Jp(q),le=Yp(b,se),ue=Yp(x,ce),de={...v},fe=[ce,se],pe=le.x-ue.x+K,me=le.y-ue.y+re;function he(e,t,n=H){let r=x.x+e,i=x.y+t,a=r+j,o=i+A,s=Math.max(r,n.left),c=Math.max(i,n.top),l=Math.min(a,n.right),u=Math.min(o,n.bottom);return Math.max(0,(l-s)*(u-c))}let ge=he(pe,me),_e=he(pe,me,V),ve=Yp(b,[`t`,`l`]),ye=Yp(x,[`t`,`l`]),be=Yp(b,[`b`,`r`]),xe=Yp(x,[`b`,`r`]),{adjustX:Se,adjustY:Ce,shiftX:we,shiftY:Te}=v.overflow||{},Ee=e=>typeof e==`boolean`?e:e>=0,De,Oe,ke,Ae;function je(){De=x.y+me,Oe=De+A,ke=x.x+pe,Ae=ke+j}je();let Me=Ee(Ce),Ne=ce[0]===se[0];if(Me&&ce[0]===`t`&&(Oe>U.bottom||f.current.bt)){let e=me;Ne?e-=A-M:e=ve.y-xe.y-re;let t=he(pe,e),n=he(pe,e,V);t>ge||t===ge&&(!z||n>=_e)?(f.current.bt=!0,me=e,re=-re,fe=[Xp(fe[0],0),Xp(fe[1],0)]):f.current.bt=!1}if(Me&&ce[0]===`b`&&(Dege||t===ge&&(!z||n>=_e)?(f.current.tb=!0,me=e,re=-re,fe=[Xp(fe[0],0),Xp(fe[1],0)]):f.current.tb=!1}let Pe=Ee(Se),Fe=ce[1]===se[1];if(Pe&&ce[1]===`l`&&(Ae>U.right||f.current.rl)){let e=pe;Fe?e-=j-N:e=ve.x-xe.x-K;let t=he(e,me),n=he(e,me,V);t>ge||t===ge&&(!z||n>=_e)?(f.current.rl=!0,pe=e,K=-K,fe=[Xp(fe[0],1),Xp(fe[1],1)]):f.current.rl=!1}if(Pe&&ce[1]===`r`&&(kege||t===ge&&(!z||n>=_e)?(f.current.lr=!0,pe=e,K=-K,fe=[Xp(fe[0],1),Xp(fe[1],1)]):f.current.lr=!1}de.points=[Zp(fe[0]),Zp(fe[1])],je();let Ie=we===!0?0:we;typeof Ie==`number`&&(keV.right&&(pe-=Ae-V.right-K,b.x>V.right-Ie&&(pe+=b.x-V.right+Ie)));let Le=Te===!0?0:Te;typeof Le==`number`&&(DeV.bottom&&(me-=Oe-V.bottom-re,b.y>V.bottom-Le&&(me+=b.y-V.bottom+Le)));let Re=x.x+pe,ze=Re+j,Be=x.y+me,Ve=Be+A,He=b.x,Ue=He+N,We=b.y,Ge=We+M,Ke=(Math.max(Re,He)+Math.min(ze,Ue))/2-Re,qe=(Math.max(Be,We)+Math.min(Ve,Ge))/2-Be;o?.(t,de);let Je=ee.right-x.x-(pe+x.width),Ye=ee.bottom-x.y-(me+x.height);W===1&&(pe=Math.floor(pe),Je=Math.floor(Je)),te===1&&(me=Math.floor(me),Ye=Math.floor(Ye)),l({ready:!0,offsetX:pe/W,offsetY:me/te,offsetR:Je/W,offsetB:Ye/te,arrowX:Ke/W,arrowY:qe/te,scaleX:W,scaleY:te,align:de})}}),m=()=>{u.current+=1;let e=u.current;Promise.resolve().then(()=>{u.current===e&&p()})},h=()=>{l(e=>({...e,ready:!1}))};return Hn(h,[r]),Hn(()=>{e||h()},[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,m]}function $p(){let e=S.useRef(null),t=()=>{e.current&&=(clearTimeout(e.current),null)};return S.useEffect(()=>()=>{t()},[]),(n,r)=>{t(),r===0?n():e.current=setTimeout(()=>{n()},r*1e3)}}function em(e,t,n,r,i){Hn(()=>{if(e&&t&&n){let e=t,a=n,o=Hp(e),s=Hp(a),c=Vp(a),l=new Set([c,...o,...s]);function u(){r(),i()}return l.forEach(e=>{e.addEventListener(`scroll`,u,{passive:!0})}),c.addEventListener(`resize`,u,{passive:!0}),r(),()=>{l.forEach(e=>{e.removeEventListener(`scroll`,u),c.removeEventListener(`resize`,u)})}}},[e,t,n])}function tm(e,t,n,r,i,a,o,s){let c=S.useRef(e);c.current=e;let l=S.useRef(!1);S.useEffect(()=>{if(t&&r&&(!i||a)){let e=()=>{l.current=!1},t=e=>{c.current&&!o(e.composedPath?.()?.[0]||e.target)&&!l.current&&s(!1)},i=Vp(r);i.addEventListener(`pointerdown`,e,!0),i.addEventListener(`mousedown`,t,!0),i.addEventListener(`contextmenu`,t,!0);let a=Jr(n);return a&&(a.addEventListener(`mousedown`,t,!0),a.addEventListener(`contextmenu`,t,!0)),()=>{i.removeEventListener(`pointerdown`,e,!0),i.removeEventListener(`mousedown`,t,!0),i.removeEventListener(`contextmenu`,t,!0),a&&(a.removeEventListener(`mousedown`,t,!0),a.removeEventListener(`contextmenu`,t,!0))}}},[t,n,r,i,a]);function u(){l.current=!0}return u}function nm(){let[e,t]=S.useState(null),[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null);return[zn(e=>{e===!1?(o.current=null,r(!1)):i&&n?o.current=e:(r(!0),t(e),o.current=null,n||a(!0))}),n,e,zn(e=>{e?(a(!1),o.current&&=(t(o.current),null)):(a(!1),o.current=null)})]}function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,isMobile:n,ready:r,open:i,align:a,offsetR:o,offsetB:s,offsetX:c,offsetY:l,arrowPos:u,popupSize:d,motion:f,uniqueContainerClassName:p,uniqueContainerStyle:m}=e,h=`${t}-unique-container`,[g,_]=S.useState(!1),v=Mp(n,r,i,a,o,s,c,l),y=S.useRef(v);r&&(y.current=v);let b={};return d&&(b.width=d.width,b.height=d.height),S.createElement(Od,rm({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${h}-hidden`},f,{visible:i,onVisibleChanged:e=>{_(e)}}),({className:e,style:t})=>{let n=J(h,e,p,{[`${h}-visible`]:g});return S.createElement(`div`,{className:n,style:{"--arrow-x":`${u?.x||0}px`,"--arrow-y":`${u?.y||0}px`,...y.current,...b,...t,...m}})})},am=({children:e,postTriggerProps:t})=>{let[n,r,i,a]=nm(),o=S.useMemo(()=>!i||!t?i:t(i),[i,t]),[s,c]=S.useState(null),[l,u]=S.useState(null),d=S.useRef(null),f=zn(e=>{d.current=e,Or(e)&&s!==e&&c(e)}),p=S.useRef(null),m=$p(),h=zn((e,t)=>{p.current=t,m(()=>{n(e)},e.delay)}),g=e=>{m(()=>{p.current?.()||n(!1)},e)},_=zn(e=>{a(e)}),[v,y,b,x,C,w,T,,,E,D]=Qp(r,s,o?.target,o?.popupPlacement,o?.builtinPlacements||{},o?.popupAlign,void 0,!1),O=S.useMemo(()=>o?J(Bp(o.builtinPlacements||{},o.prefixCls||``,E,!1),o.getPopupClassNameFromAlign?.(E)):``,[E,o?.getPopupClassNameFromAlign,o?.builtinPlacements,o?.prefixCls]),k=S.useMemo(()=>({show:h,hide:g}),[]);S.useEffect(()=>{D()},[o?.target]);let A=zn(()=>(D(),Promise.resolve())),j=S.useRef({}),M=S.useContext(Fp),N=S.useMemo(()=>({registerSubPopup:(e,t)=>{j.current[e]=t,M?.registerSubPopup(e,t)}}),[M]),P=o?.prefixCls;return S.createElement(Ip.Provider,{value:k},e,o&&S.createElement(Fp.Provider,{value:N},S.createElement(Pp,{ref:f,portal:Dp,onEsc:o.onEsc,prefixCls:P,popup:o.popup,className:J(o.popupClassName,O,`${P}-unique-controlled`),style:o.popupStyle,target:o.target,open:r,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:_,ready:v,offsetX:y,offsetY:b,offsetR:x,offsetB:C,onAlign:D,onPrepare:A,onResize:e=>u({width:e.offsetWidth,height:e.offsetHeight}),arrowPos:{x:w,y:T},align:E,zIndex:o.zIndex,mask:o.mask,arrow:o.arrow,motion:o.popupMotion,maskMotion:o.maskMotion,getPopupContainer:o.getPopupContainer},S.createElement(im,{prefixCls:P,isMobile:!1,ready:v,open:r,align:E,offsetR:x,offsetB:C,offsetX:y,offsetY:b,arrowPos:{x:w,y:T},popupSize:l,motion:o.popupMotion,uniqueContainerClassName:J(o.uniqueContainerClassName,O),uniqueContainerStyle:o.uniqueContainerStyle}))))};function om(e=Dp){return S.forwardRef((t,n)=>{let{prefixCls:r=`rc-trigger-popup`,children:i,action:a=`hover`,showAction:o,hideAction:s,popupVisible:c,defaultPopupVisible:l,onOpenChange:u,afterOpenChange:d,onPopupVisibleChange:f,afterPopupVisibleChange:p,mouseEnterDelay:m,mouseLeaveDelay:h=.1,focusDelay:g,blurDelay:_,mask:v,maskClosable:y=!0,getPopupContainer:b,forceRender:x,autoDestroy:C,popup:w,popupClassName:T,uniqueContainerClassName:E,uniqueContainerStyle:D,popupStyle:O,popupPlacement:k,builtinPlacements:A={},popupAlign:j,zIndex:M,stretch:N,getPopupClassNameFromAlign:P,fresh:F,unique:I,alignPoint:L,onPopupClick:R,onPopupAlign:z,arrow:B,popupMotion:V,maskMotion:H,mobile:U,...ee}=t,W=C||!1,te=c===void 0,G=!!U,ne=S.useRef({}),K=S.useContext(Fp),re=S.useMemo(()=>({registerSubPopup:(e,t)=>{ne.current[e]=t,K?.registerSubPopup(e,t)}}),[K]),ie=S.useContext(Ip),ae=Xn(),[q,oe]=S.useState(null),se=S.useRef(null),ce=zn(e=>{se.current=e,Or(e)&&q!==e&&oe(e),K?.registerSubPopup(ae,e)}),[le,ue]=S.useState(null),de=S.useRef(null),fe=zn(e=>{let t=kr(e);Or(t)&&le!==t&&(ue(t),de.current=t)}),pe={},me=zn(e=>{let t=le;return t?.contains(e)||Jr(t)?.host===e||e===t||q?.contains(e)||Jr(q)?.host===e||e===q||Object.values(ne.current).some(t=>t?.contains(e)||e===t)}),he=B?{...B===!0?{}:B}:null,[ge,_e]=Gn(l||!1,c),ve=ge||!1,ye=S.useMemo(()=>{let e=typeof i==`function`?i({open:ve}):i;return S.Children.only(e)},[i,ve]),be=ye?.props||{},xe=zn(()=>ve),Se=zn((e=0)=>({popup:w,target:le,delay:e,prefixCls:r,popupClassName:T,uniqueContainerClassName:E,uniqueContainerStyle:D,popupStyle:O,popupPlacement:k,builtinPlacements:A,popupAlign:j,zIndex:M,mask:v,maskClosable:y,popupMotion:V,maskMotion:H,arrow:he,getPopupContainer:b,getPopupClassNameFromAlign:P,id:ae,onEsc:De}));Hn(()=>{ie&&I&&le&&!te&&!K&&(ve?ie.show(Se(m),xe):ie.hide(h))},[ve,le]);let Ce=S.useRef(ve);Ce.current=ve;let we=zn(e=>{(0,Vi.flushSync)(()=>{ve!==e&&(_e(e),u?.(e),f?.(e))})}),Te=$p(),Ee=(e,t=0)=>{if(c!==void 0){Te(()=>{we(e)},t);return}if(ie&&I&&te&&!K){e?ie.show(Se(t),xe):ie.hide(t);return}Te(()=>{we(e)},t)};function De({top:e}){e&&Ee(!1)}let[Oe,ke]=S.useState(!1);Hn(e=>{(!e||ve)&&ke(!0)},[ve]);let[Ae,je]=S.useState(null),[Me,Ne]=S.useState(null),Pe=e=>{Ne([e.clientX,e.clientY])},[Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge]=Qp(ve,q,L&&Me!==null?Me:le,k,A,j,z,G),[Ke,qe]=Rp(a,o,s),Je=Ke.has(`click`),Ye=qe.has(`click`)||qe.has(`contextMenu`),Xe=zn(()=>{Oe||Ge()});em(ve,le,q,Xe,()=>{Ce.current&&L&&Ye&&Ee(!1)}),Hn(()=>{Xe()},[Me,k]),Hn(()=>{ve&&!A?.[k]&&Xe()},[JSON.stringify(j)]);let Ze=S.useMemo(()=>J(Bp(A,r,We,L),P?.(We)),[We,P,A,r,L]);S.useImperativeHandle(n,()=>({nativeElement:de.current,popupElement:se.current,forceAlign:Xe}));let[Qe,$e]=S.useState(0),[et,tt]=S.useState(0),nt=()=>{if(N&&le){let e=le.getBoundingClientRect();$e(e.width),tt(e.height)}},rt=()=>{nt(),Xe()},it=e=>{ke(!1),Ge(),d?.(e),p?.(e)},at=()=>new Promise(e=>{nt(),je(()=>e)});Hn(()=>{Ae&&(Ge(),Ae(),je(null))},[Ae]);function ot(e,t,n,r,i){pe[e]=(a,...o)=>{(!i||!i())&&(r?.(a),Ee(t,n)),be[e]?.(a,...o)}}let st=Ke.has(`touch`),ct=qe.has(`touch`),lt=S.useRef(!1);(st||ct)&&(pe.onTouchStart=(...e)=>{lt.current=!0,Ce.current&&ct?Ee(!1):!Ce.current&&st&&Ee(!0),be.onTouchStart?.(...e)}),(Je||Ye)&&(pe.onClick=(e,...t)=>{Ce.current&&Ye?Ee(!1):!Ce.current&&Je&&(Pe(e),Ee(!0)),be.onClick?.(e,...t),lt.current=!1});let ut=tm(ve,Ye||ct,le,q,v,y,me,Ee),dt=Ke.has(`hover`),ft=qe.has(`hover`),pt,mt,ht=()=>lt.current;if(dt){let e=e=>{Pe(e)};ot(`onMouseEnter`,!0,m,e,ht),ot(`onPointerEnter`,!0,m,e,ht),pt=e=>{(ve||Oe)&&q?.contains(e.target)&&Ee(!0,m)},L&&(pe.onMouseMove=e=>{be.onMouseMove?.(e)})}ft&&(ot(`onMouseLeave`,!1,h,void 0,ht),ot(`onPointerLeave`,!1,h,void 0,ht),mt=()=>{Ee(!1,h)}),Ke.has(`focus`)&&ot(`onFocus`,!0,g),qe.has(`focus`)&&ot(`onBlur`,!1,_),Ke.has(`contextMenu`)&&(pe.onContextMenu=(e,...t)=>{Ce.current&&qe.has(`contextMenu`)?Ee(!1):(Pe(e),Ee(!0)),e.preventDefault(),be.onContextMenu?.(e,...t)});let gt=S.useRef(!1);gt.current||=x||ve||Oe;let _t={...be,...pe},vt={};[`onContextMenu`,`onClick`,`onMouseDown`,`onTouchStart`,`onMouseEnter`,`onMouseLeave`,`onFocus`,`onBlur`].forEach(e=>{ee[e]&&(vt[e]=(...t)=>{_t[e]?.(...t),ee[e](...t)})});let yt={x:Be,y:Ve};ea(ve,le,rt);let bt=lr(fe,pr(ye)),xt=S.cloneElement(ye,{..._t,...vt,ref:bt});return S.createElement(S.Fragment,null,xt,gt.current&&(!ie||!I)&&S.createElement(Fp.Provider,{value:re},S.createElement(Pp,{portal:e,ref:ce,prefixCls:r,popup:w,className:J(T,!G&&Ze),style:O,target:le,onMouseEnter:pt,onMouseLeave:mt,onPointerEnter:pt,zIndex:M,open:ve,keepDom:Oe,fresh:F,onClick:R,onPointerDownCapture:ut,mask:v,motion:V,maskMotion:H,onVisibleChanged:it,onPrepare:at,forceRender:x,autoDestroy:W,getPopupContainer:b,onEsc:De,align:We,arrow:he,arrowPos:yt,ready:Fe,offsetX:Ie,offsetY:Le,offsetR:Re,offsetB:ze,onAlign:Xe,stretch:N,targetWidth:Qe/He,targetHeight:et/Ue,mobile:U})))})}var sm=om(Dp);function cm(e){return e&&S.isValidElement(e)&&e.type===S.Fragment}var lm=(e,t,n)=>S.isValidElement(e)?S.cloneElement(e,rf(n)?n(e.props||{}):n):t;function um(e,t){return lm(e,e,t)}var dm=({children:e})=>{let{getPrefixCls:t}=S.useContext(ga),n=t();return S.isValidElement(e)?S.createElement(Od,{visible:!0,motionName:`${n}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:t,className:n})=>um(e,e=>({className:J(e.className,n),style:{...e.style,...t}}))):e},fm=[null,null];function eee(e){if(fm[0]!==e){let t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:!1}}),fm[0]=e,fm[1]=t}return fm[1]}var pm=({children:e})=>S.createElement(am,{postTriggerProps:e=>{let{id:t,builtinPlacements:n,popup:r}=e,i=typeof r==`function`?r():r,a=eee(n);return{...e,getPopupContainer:null,arrow:!1,popup:S.createElement(dm,{key:t},i),builtinPlacements:a}}},e),mm=S.createContext(!1),hm=({children:e,disabled:t})=>{let n=S.useContext(mm);return S.createElement(mm.Provider,{value:t??n},e)},gm=S.createContext(void 0),tee=({children:e,size:t})=>{let n=S.useContext(gm);return S.createElement(gm.Provider,{value:t||n},e)};function _m(){return{componentDisabled:(0,S.useContext)(mm),componentSize:(0,S.useContext)(gm)}}function vm(e,t,n){Gi(`ConfigProvider`);let r=e||{},i=r.inherit===!1||!t?{...Ml,hashed:t?.hashed??Ml.hashed,cssVar:t?.cssVar}:t,a=(0,S.useId)();return Zn(()=>{if(!e)return t;let o={...i.components};Object.keys(e.components||{}).forEach(t=>{o[t]={...o[t],...e.components[t]}});let s=`css-var-${a.replace(/:/g,``)}`,c={prefix:n?.prefixCls,...i.cssVar,...r.cssVar,key:r.cssVar?.key||s};return{...i,...r,token:{...i.token,...r.token},components:o,cssVar:c}},[r,i],(e,t)=>e.some((e,n)=>{let r=t[n];return!fi(e,r,!0)}))}var ym=S.createContext(!0);function bm(e){let t=S.useContext(ym),{children:n}=e,[,r]=Vl(),{motion:i}=r,a=S.useRef(!1);return a.current||=t!==i,a.current?S.createElement(ym.Provider,{value:i},S.createElement(zu,{motion:i},n)):n}var xm=()=>null,Sm=({iconPrefixCls:e,csp:t})=>(ru(e,t),null),Cm=[`getTargetContainer`,`getPopupContainer`,`renderEmpty`,`input`,`pagination`,`form`,`select`,`button`],wm,Tm,Em,Dm;function Om(){return wm||`ant`}function km(){return Tm||`anticon`}var Am=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:i}=e;t!==void 0&&(wm=t),n!==void 0&&(Tm=n),`holderRender`in e&&(Dm=i),r&&(Em=r)},jm=()=>({getPrefixCls:(e,t)=>t||(e?`${Om()}-${e}`:Om()),getIconPrefixCls:km,getRootPrefixCls:()=>wm||Om(),getTheme:()=>Em,holderRender:Dm}),nee=e=>{let{children:t,csp:n,autoInsertSpaceInButton:r,alert:i,affix:a,anchor:o,app:s,form:c,locale:l,componentSize:u,direction:d,space:f,splitter:p,virtual:m,dropdownMatchSelectWidth:h,popupMatchSelectWidth:g,popupOverflow:_,legacyLocale:v,parentContext:y,iconPrefixCls:b,theme:x,componentDisabled:C,segmented:w,statistic:T,spin:E,calendar:D,carousel:O,cascader:k,collapse:A,typography:j,checkbox:M,descriptions:N,divider:P,drawer:F,skeleton:I,steps:L,image:R,layout:z,list:B,mentions:V,modal:H,progress:U,result:ee,slider:W,breadcrumb:te,masonry:G,menu:ne,pagination:K,input:re,textArea:ie,otp:ae,empty:q,badge:oe,radio:se,rate:ce,ribbon:le,switch:ue,transfer:de,avatar:fe,message:pe,tag:me,table:he,card:ge,cardMeta:_e,tabs:ve,timeline:ye,timePicker:be,upload:xe,notification:Se,tree:Ce,colorPicker:we,datePicker:Te,rangePicker:Ee,flex:De,wave:Oe,dropdown:ke,warning:Ae,tour:je,tooltip:Me,popover:Ne,popconfirm:Pe,qrcode:Fe,floatButton:Ie,floatButtonGroup:Le,variant:Re,inputNumber:ze,treeSelect:Be,watermark:Ve}=e,He=S.useMemo(()=>nf(l)&&Object.prototype.hasOwnProperty.call(l,`default`)&&l.default?.locale?l.default:l,[l]),Ue=S.useCallback((t,n)=>{let{prefixCls:r}=e;if(n)return n;let i=r||y.getPrefixCls(``);return t?`${i}-${t}`:i},[y.getPrefixCls,e.prefixCls]),We=b||y.iconPrefixCls||`anticon`,Ge=n||y.csp,Ke=vm(x,y.theme,{prefixCls:Ue(``)}),qe={csp:Ge,autoInsertSpaceInButton:r,alert:i,affix:a,anchor:o,app:s,locale:He||v,direction:d,space:f,splitter:p,virtual:m,popupMatchSelectWidth:g??h,popupOverflow:_,getPrefixCls:Ue,iconPrefixCls:We,theme:Ke,segmented:w,statistic:T,spin:E,calendar:D,carousel:O,cascader:k,collapse:A,typography:j,checkbox:M,descriptions:N,divider:P,drawer:F,skeleton:I,steps:L,image:R,input:re,textArea:ie,otp:ae,layout:z,list:B,mentions:V,modal:H,progress:U,result:ee,slider:W,breadcrumb:te,masonry:G,menu:ne,pagination:K,empty:q,badge:oe,radio:se,rate:ce,ribbon:le,switch:ue,transfer:de,avatar:fe,message:pe,tag:me,table:he,card:ge,cardMeta:_e,tabs:ve,timeline:ye,timePicker:be,upload:xe,notification:Se,tree:Ce,colorPicker:we,datePicker:Te,rangePicker:Ee,flex:De,wave:Oe,dropdown:ke,warning:Ae,tour:je,tooltip:Me,popover:Ne,popconfirm:Pe,qrcode:Fe,floatButton:Ie,floatButtonGroup:Le,variant:Re,inputNumber:ze,treeSelect:Be,watermark:Ve},Je={...y};Object.keys(qe).forEach(e=>{qe[e]!==void 0&&(Je[e]=qe[e])}),Cm.forEach(t=>{let n=e[t];n&&(Je[t]=n)}),r!==void 0&&(Je.button={autoInsertSpace:r,...Je.button});let Ye=Zn(()=>Je,Je,(e,t)=>{let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some(n=>e[n]!==t[n])}),{layer:Xe}=S.useContext(ka),Ze=S.useMemo(()=>({prefixCls:We,csp:Ge,layer:Xe?`antd`:void 0}),[We,Ge,Xe]),Qe=S.createElement(S.Fragment,null,S.createElement(Sm,{iconPrefixCls:We,csp:Ge}),S.createElement(xm,{dropdownMatchSelectWidth:h}),t),$e=S.useMemo(()=>Li(Hd.Form?.defaultValidateMessages||{},Ye.locale?.Form?.defaultValidateMessages||{},Ye.form?.validateMessages||{},c?.validateMessages||{}),[Ye,c?.validateMessages]);Object.keys($e).length>0&&(Qe=S.createElement(cp.Provider,{value:$e},Qe)),He&&(Qe=S.createElement(Zd,{locale:He,_ANT_MARK__:Xd},Qe)),(We||Ge)&&(Qe=S.createElement(au.Provider,{value:Ze},Qe)),u&&(Qe=S.createElement(tee,{size:u},Qe)),Qe=S.createElement(bm,null,Qe),Me?.unique&&(Qe=S.createElement(pm,null,Qe));let et=S.useMemo(()=>{let{algorithm:e,token:t,components:n,cssVar:r,...i}=Ke||{},a=e&&(!Array.isArray(e)||e.length>0)?Fa(e):jl,o={};Object.entries(n||{}).forEach(([e,t])=>{let n={...t};`algorithm`in n&&(n.algorithm===!0?n.theme=a:(Array.isArray(n.algorithm)||typeof n.algorithm==`function`)&&(n.theme=Fa(n.algorithm)),delete n.algorithm),o[e]=n});let s={...Dc,...t};return{...i,theme:a,token:s,components:o,override:{override:s,...o},cssVar:r}},[Ke]);return x&&(Qe=S.createElement(Nl.Provider,{value:et},Qe)),Ye.warning&&(Qe=S.createElement(Wi.Provider,{value:Ye.warning},Qe)),C!==void 0&&(Qe=S.createElement(hm,{disabled:C},Qe)),S.createElement(ga.Provider,{value:Ye},Qe)},Mm=e=>{let t=S.useContext(ga),n=S.useContext(Jd);return S.createElement(nee,{parentContext:t,legacyLocale:n,...e})};Mm.ConfigContext=ga,Mm.SizeContext=gm,Mm.config=Am,Mm.useConfig=_m,Object.defineProperty(Mm,`SizeContext`,{get:()=>gm});function Nm(){return Nm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,style:r,className:i,duration:a=4.5,showProgress:o,pauseOnHover:s=!0,eventKey:c,content:l,closable:u,props:d,onClick:f,onNoticeClose:p,times:m,hovering:h}=e,[g,_]=S.useState(!1),[v,y]=S.useState(0),[b,x]=S.useState(0),C=h||g,w=typeof a==`number`?a:0,T=w>0&&o,E=()=>{p(c)},D=e=>{(e.key===`Enter`||e.code===`Enter`||e.keyCode===Qr.ENTER)&&E()};S.useEffect(()=>{if(!C&&w>0){let e=Date.now()-b,t=setTimeout(()=>{E()},w*1e3-b);return()=>{s&&clearTimeout(t),x(Date.now()-e)}}},[w,C,m]),S.useEffect(()=>{if(!C&&T&&(s||b===0)){let e=performance.now(),t,n=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(t=>{let r=t+b-e,i=Math.min(r/(w*1e3),1);y(i*100),i<1&&n()})};return n(),()=>{s&&cancelAnimationFrame(t)}}},[w,b,C,T,m]);let O=S.useMemo(()=>typeof u==`object`&&u?u:{},[u]),k=xi(O,!0),A=100-(!v||v<0?0:v>100?100:v),j=`${n}-notice`;return S.createElement(`div`,Nm({},d,{ref:t,className:J(j,i,{[`${j}-closable`]:u}),style:r,onMouseEnter:e=>{_(!0),d?.onMouseEnter?.(e)},onMouseLeave:e=>{_(!1),d?.onMouseLeave?.(e)},onClick:f}),S.createElement(`div`,{className:`${j}-content`},l),u&&S.createElement(`button`,Nm({className:`${j}-close`,onKeyDown:D,"aria-label":`Close`},k,{onClick:e=>{e.preventDefault(),e.stopPropagation(),E()}}),O.closeIcon??`x`),T&&S.createElement(`progress`,{className:`${j}-progress`,max:`100`,value:A},A+`%`))}),Fm=S.createContext({}),Im=({children:e,classNames:t})=>S.createElement(Fm.Provider,{value:{classNames:t}},e),Lm=8,Rm=3,zm=16,Bm=e=>{let t={offset:Lm,threshold:Rm,gap:zm};return e&&typeof e==`object`&&(t.offset=e.offset??Lm,t.threshold=e.threshold??Rm,t.gap=e.gap??zm),[!!e,t]};function Vm(){return Vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{configList:t,placement:n,prefixCls:r,className:i,style:a,motion:o,onAllNoticeRemoved:s,onNoticeClose:c,stack:l}=e,{classNames:u}=(0,S.useContext)(Fm),d=(0,S.useRef)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)([]),g=t.map(e=>({config:e,key:String(e.key)})),[_,{offset:v,threshold:y,gap:b}]=Bm(l),x=_&&(m.length>0||g.length<=y),C=typeof o==`function`?o(n):o;return(0,S.useEffect)(()=>{_&&m.length>1&&h(e=>e.filter(e=>g.some(({key:t})=>e===t)))},[m,g,_]),(0,S.useEffect)(()=>{_&&d.current[g[g.length-1]?.key]&&p(d.current[g[g.length-1]?.key])},[g,_]),S.createElement(Dd,Vm({key:n,className:J(r,`${r}-${n}`,u?.list,i,{[`${r}-stack`]:!!_,[`${r}-stack-expanded`]:x}),style:a,keys:g,motionAppear:!0},C,{onAllRemoved:()=>{s(n)}}),({config:e,className:t,style:i,index:a},o)=>{let{key:s,times:l}=e,p=String(s),{className:y,style:C,classNames:w,styles:T,...E}=e,D=g.findIndex(e=>e.key===p),O={};if(_){let e=g.length-1-(D>-1?D:a-1),t=n===`top`||n===`bottom`?`-50%`:`0`;if(e>0){O.height=x?d.current[p]?.offsetHeight:f?.offsetHeight;let r=0;for(let t=0;th(e=>e.includes(p)?e:[...e,p]),onMouseLeave:()=>h(e=>e.filter(e=>e!==p))},S.createElement(Pm,Vm({},E,{ref:e=>{D>-1?d.current[p]=e:delete d.current[p]},prefixCls:r,classNames:w,styles:T,className:J(y,u?.notice),style:C,times:l,key:s,eventKey:s,onNoticeClose:c,hovering:_&&m.length>0})))})},Um=S.forwardRef((e,t)=>{let{prefixCls:n=`rc-notification`,container:r,motion:i,maxCount:a,className:o,style:s,onAllRemoved:c,stack:l,renderNotifications:u}=e,[d,f]=S.useState([]),p=e=>{let t=d.find(t=>t.key===e),n=t?.closable,{onClose:r}=n&&typeof n==`object`?n:{};r?.(),t?.onClose?.(),f(t=>t.filter(t=>t.key!==e))};S.useImperativeHandle(t,()=>({open:e=>{f(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>0&&n.length>a&&(n=n.slice(-a)),n})},close:e=>{p(e)},destroy:()=>{f([])}}));let[m,h]=S.useState({});S.useEffect(()=>{let e={};d.forEach(t=>{let{placement:n=`topRight`}=t;n&&(e[n]=e[n]||[],e[n].push(t))}),Object.keys(m).forEach(t=>{e[t]=e[t]||[]}),h(e)},[d]);let g=e=>{h(t=>{let n={...t};return(n[e]||[]).length||delete n[e],n})},_=S.useRef(!1);if(S.useEffect(()=>{Object.keys(m).length>0?_.current=!0:_.current&&=(c?.(),!1)},[m]),!r)return null;let v=Object.keys(m);return(0,Vi.createPortal)(S.createElement(S.Fragment,null,v.map(e=>{let t=m[e],r=S.createElement(Hm,{key:e,configList:t,placement:e,prefixCls:n,className:o?.(e),style:s?.(e),motion:i,onNoticeClose:p,onAllNoticeRemoved:g,stack:l});return u?u(r,{prefixCls:n,key:e}):r})),r)}),Wm=()=>document.body,Gm=0;function Km(...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 qm(e={}){let{getContainer:t=Wm,motion:n,prefixCls:r,maxCount:i,className:a,style:o,onAllRemoved:s,stack:c,renderNotifications:l,...u}=e,[d,f]=S.useState(),p=S.useRef(),m=S.createElement(Um,{container:d,ref:p,prefixCls:r,motion:n,maxCount:i,className:a,style:o,onAllRemoved:s,stack:c,renderNotifications:l}),[h,g]=S.useState([]),_=zn(e=>{let t=Km(u,e);(t.key===null||t.key===void 0)&&(t.key=`rc-notification-${Gm}`,Gm+=1),g(e=>[...e,{type:`open`,config:t}])}),v=S.useMemo(()=>({open:_,close:e=>{g(t=>[...t,{type:`close`,key:e}])},destroy:()=>{g(e=>[...e,{type:`destroy`}])}}),[]);return S.useEffect(()=>{f(t())}),S.useEffect(()=>{if(p.current&&h.length){h.forEach(e=>{switch(e.type){case`open`:p.current.open(e.config);break;case`close`:p.current.close(e.key);break;case`destroy`:p.current.destroy();break}});let e,t;g(n=>((e!==n||!t)&&(e=n,t=n.filter(e=>!h.includes(e))),t))}},[h]),[v,m]}var Jm=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z`}}]},name:`loading`,theme:`outlined`}}))());function Ym(){return Ym=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Ym({},e,{ref:t,icon:Jm.default}))),Zm=e=>{let{componentCls:t,iconCls:n,boxShadow:r,colorText:i,colorSuccess:a,colorError:o,colorWarning:s,colorInfo:c,fontSizeLG:l,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:f,paddingXS:p,borderRadiusLG:m,zIndexPopup:h,contentPadding:g,contentBg:_}=e,v=`${t}-notice`,y=new Ms(`MessageMoveIn`,{"0%":{padding:0,transform:`translateY(-100%)`,opacity:0},"100%":{padding:p,transform:`translateY(0)`,opacity:1}}),b=new Ms(`MessageMoveOut`,{"0%":{maxHeight:e.height,padding:p,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),x={padding:p,textAlign:`center`,[`${t}-custom-content`]:{display:`flex`,alignItems:`center`},[`${t}-custom-content > ${n}`]:{marginInlineEnd:f,fontSize:l},[`${v}-content`]:{display:`inline-block`,padding:g,background:_,borderRadius:m,boxShadow:r,pointerEvents:`all`},[`${t}-success > ${n}`]:{color:a},[`${t}-error > ${n}`]:{color:o},[`${t}-warning > ${n}`]:{color:s},[`${t}-info > ${n}, +}`,n)}else Tr(n);return()=>{Tr(n)}},[t,n])}var vp=[],yp=200,bp=0,xp=e=>{if(e.key===`Escape`&&!e.isComposing){if(Date.now()-bp=0;--n)vp[n].onEsc({top:n===t-1,event:e})}},Sp=()=>{bp=Date.now()};function Cp(){window.addEventListener(`keydown`,xp),window.addEventListener(`compositionend`,Sp)}function wp(){vp.length===0&&(window.removeEventListener(`keydown`,xp),window.removeEventListener(`compositionend`,Sp))}function Tp(e,t){let n=Xn(),r=zn(t),i=()=>{vp.find(e=>e.id===n)||vp.push({id:n,onEsc:r})},a=()=>{vp=vp.filter(e=>e.id!==n)};(0,S.useMemo)(()=>{e?i():e||a()},[e]),(0,S.useEffect)(()=>{if(e)return i(),Cp(),()=>{a(),wp()}},[e])}var Ep=e=>e===!1?!1:!Bn()||!e?null:typeof e==`string`?document.querySelector(e):typeof e==`function`?e():e,Dp=S.forwardRef((e,t)=>{let{open:n,autoLock:r,getContainer:i,debug:a,autoDestroy:o=!0,children:s,onEsc:c}=e,[l,u]=S.useState(n),d=l||n;S.useEffect(()=>{(o||n)&&u(n)},[n,o]);let[f,p]=S.useState(()=>Ep(i));S.useEffect(()=>{let e=Ep(i);p(()=>e??null)});let[m,h]=pp(d&&!f,a),g=f??m;_p(r&&n&&Bn()&&(g===m||g===document.body)),Tp(n,c);let _=null;s&&ur(s)&&t&&(_=pr(s));let v=lr(_,t);if(!d||!Bn()||f===void 0)return null;let y=g===!1||dp(),b=s;return t&&(b=S.cloneElement(s,{ref:v})),S.createElement(lp.Provider,{value:h},y?b:(0,Vi.createPortal)(b,g))});function Op(e){let{prefixCls:t,align:n,arrow:r,arrowPos:i}=e,{className:a,content:o,style:s}=r||{},{x:c=0,y:l=0}=i,u=S.useRef(null);if(!n||!n.points)return null;let d={position:`absolute`};if(n.autoArrow!==!1){let e=n.points[0],t=n.points[1],r=e[0],i=e[1],a=t[0],o=t[1];r===a||![`t`,`b`].includes(r)?d.top=l:r===`t`?d.top=0:d.bottom=0,i===o||![`l`,`r`].includes(i)?d.left=c:i===`l`?d.left=0:d.right=0}return S.createElement(`div`,{ref:u,className:J(`${t}-arrow`,a),style:{...d,...s}},o)}function kp(){return kp=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(`div`,{style:{zIndex:r},className:J(`${t}-mask`,o&&`${t}-mobile-mask`,e)})):null}var jp=S.memo(({children:e})=>e,(e,t)=>t.cache);function Mp(e,t,n,r,i,a,o,s){let c=`auto`,l=e?{}:{left:`-1000vw`,top:`-1000vh`,right:c,bottom:c};if(!e&&(t||!n)){let{points:e}=r,t=r.dynamicInset||r._experimental?.dynamicInset,n=t&&e[0][1]===`r`,u=t&&e[0][0]===`b`;n?(l.right=i,l.left=c):(l.left=o,l.right=c),u?(l.bottom=a,l.top=c):(l.top=s,l.bottom=c)}return l}function Np(){return Np=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{onEsc:n,popup:r,className:i,prefixCls:a,style:o,target:s,onVisibleChanged:c,open:l,keepDom:u,fresh:d,onClick:f,mask:p,arrow:m,arrowPos:h,align:g,motion:_,maskMotion:v,mobile:y,forceRender:b,getPopupContainer:x,autoDestroy:C,portal:w,children:T,zIndex:E,onMouseEnter:D,onMouseLeave:O,onPointerEnter:k,onPointerDownCapture:A,ready:j,offsetX:M,offsetY:N,offsetR:P,offsetB:F,onAlign:I,onPrepare:L,onResize:R,stretch:z,targetWidth:B,targetHeight:V}=e,H=typeof r==`function`?r():r,U=l||u,ee=!!y,[W,te,G]=S.useMemo(()=>y?[y.mask,y.maskMotion,y.motion]:[p,v,_],[y,p,v,_]),ne=x?.length>0,[K,re]=S.useState(!x||!ne);Hn(()=>{!K&&ne&&s&&re(!0)},[K,ne,s]);let ie=zn((e,t)=>{R?.(e,t),I()}),ae=Mp(ee,j,l,g,P,F,M,N);if(!K)return null;let q={};return z&&(z.includes(`height`)&&V?q.height=V:z.includes(`minHeight`)&&V&&(q.minHeight=V),z.includes(`width`)&&B?q.width=B:z.includes(`minWidth`)&&B&&(q.minWidth=B)),l||(q.pointerEvents=`none`),S.createElement(w,{open:b||U,getContainer:x&&(()=>x(s)),autoDestroy:C,onEsc:n},S.createElement(Ap,{prefixCls:a,open:l,zIndex:E,mask:W,motion:te,mobile:ee}),S.createElement(oa,{onResize:ie,disabled:!l},e=>S.createElement(Od,Np({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:`${a}-hidden`},G,{onAppearPrepare:L,onEnterPrepare:L,visible:l,onVisibleChanged:e=>{_?.onVisibleChanged?.(e),c(e)}}),({className:n,style:r},s)=>{let c=J(a,n,i,{[`${a}-mobile`]:ee});return S.createElement(`div`,{ref:cr(e,t,s),className:c,style:{"--arrow-x":`${h.x||0}px`,"--arrow-y":`${h.y||0}px`,...ae,...q,...r,boxSizing:`border-box`,zIndex:E,...o},onMouseEnter:D,onMouseLeave:O,onPointerEnter:k,onClick:f,onPointerDownCapture:A},m&&S.createElement(Op,{prefixCls:a,arrow:m,arrowPos:h,align:g}),S.createElement(jp,{cache:!l&&!d},H))})),T)}),Fp=S.createContext(null),Ip=S.createContext(null);function Lp(e){return e?Array.isArray(e)?e:[e]:[]}function Rp(e,t,n){return S.useMemo(()=>{let r=Lp(t??e),i=Lp(n??e),a=new Set(r),o=new Set(i);return a.has(`hover`)&&!a.has(`click`)&&a.add(`touch`),o.has(`hover`)&&!o.has(`click`)&&o.add(`touch`),[a,o]},[e,t,n])}function zp(e=[],t=[],n){let r=(e,t)=>e[t]||``;return n?r(e,0)===r(t,0):r(e,0)===r(t,0)&&r(e,1)===r(t,1)}function Bp(e,t,n,r){let{points:i}=n,a=Object.keys(e);for(let n=0;nr.includes(e))&&t.push(n),n=n.parentElement}return t}function Up(e,t=1){return Number.isNaN(e)?t:e}function Wp(e){return Up(parseFloat(e),0)}function Gp(e,t){let n={...e};return(t||[]).forEach(e=>{if(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)return;let{overflow:t,overflowClipMargin:r,borderTopWidth:i,borderBottomWidth:a,borderLeftWidth:o,borderRightWidth:s}=Vp(e).getComputedStyle(e),c=e.getBoundingClientRect(),{offsetHeight:l,clientHeight:u,offsetWidth:d,clientWidth:f}=e,p=Wp(i),m=Wp(a),h=Wp(o),g=Wp(s),_=Up(Math.round(c.width/d*1e3)/1e3),v=Up(Math.round(c.height/l*1e3)/1e3),y=(d-f-h-g)*_,b=(l-u-p-m)*v,x=p*v,S=m*v,C=h*_,w=g*_,T=0,E=0;if(t===`clip`){let e=Wp(r);T=e*_,E=e*v}let D=c.x+C-T,O=c.y+x-E,k=D+c.width+2*T-C-w-y,A=O+c.height+2*E-x-S-b;n.left=Math.max(n.left,D),n.top=Math.max(n.top,O),n.right=Math.min(n.right,k),n.bottom=Math.min(n.bottom,A)}),n}function Kp(e,t=0){let n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function qp(e,t){let[n,r]=t||[];return[Kp(e.width,n),Kp(e.height,r)]}function Jp(e=``){return[e[0],e[1]]}function Yp(e,t){let n=t[0],r=t[1],i,a;return a=n===`t`?e.y:n===`b`?e.y+e.height:e.y+e.height/2,i=r===`l`?e.x:r===`r`?e.x+e.width:e.x+e.width/2,{x:i,y:a}}function Xp(e,t){let n={t:`b`,b:`t`,l:`r`,r:`l`},r=[...e];return r[t]=n[e[t]]||`c`,r}function Zp(e){return e.join(``)}function Qp(e,t,n,r,i,a,o,s){let[c,l]=S.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),u=S.useRef(0),d=S.useMemo(()=>!t||s?[]:Hp(t),[t]),f=S.useRef({});e||(f.current={});let p=zn(()=>{if(t&&n&&e&&!s){let e=t,s=e.ownerDocument,c=Vp(e),{position:u}=c.getComputedStyle(e),p=e.style.left,m=e.style.top,h=e.style.right,g=e.style.bottom,_=e.style.overflow,v={...i[r],...a},y=s.createElement(`div`);e.parentElement?.appendChild(y),y.style.left=`${e.offsetLeft}px`,y.style.top=`${e.offsetTop}px`,y.style.position=u,y.style.height=`${e.offsetHeight}px`,y.style.width=`${e.offsetWidth}px`,e.style.left=`0`,e.style.top=`0`,e.style.right=`auto`,e.style.bottom=`auto`,e.style.overflow=`hidden`;let b;if(Array.isArray(n))b={x:n[0],y:n[1],width:0,height:0};else{let e=n.getBoundingClientRect();e.x=e.x??e.left,e.y=e.y??e.top,b={x:e.x,y:e.y,width:e.width,height:e.height}}let x=e.getBoundingClientRect(),{height:S,width:C}=c.getComputedStyle(e);x.x=x.x??x.left,x.y=x.y??x.top;let{clientWidth:w,clientHeight:T,scrollWidth:E,scrollHeight:D,scrollTop:O,scrollLeft:k}=s.documentElement,A=x.height,j=x.width,M=b.height,N=b.width,P={left:0,top:0,right:w,bottom:T},F={left:-k,top:-O,right:E-k,bottom:D-O},{htmlRegion:I}=v,L=`visible`,R=`visibleFirst`;I!==`scroll`&&I!==R&&(I=L);let z=I===R,B=Gp(F,d),V=Gp(P,d),H=I===L?V:B,U=z?V:H;e.style.left=`auto`,e.style.top=`auto`,e.style.right=`0`,e.style.bottom=`0`;let ee=e.getBoundingClientRect();e.style.left=p,e.style.top=m,e.style.right=h,e.style.bottom=g,e.style.overflow=_,e.parentElement?.removeChild(y);let W=Up(Math.round(j/parseFloat(C)*1e3)/1e3),te=Up(Math.round(A/parseFloat(S)*1e3)/1e3);if(W===0||te===0||Or(n)&&!Ar(n))return;let{offset:G,targetOffset:ne}=v,[K,re]=qp(x,G),[ie,ae]=qp(b,ne);b.x-=ie,b.y-=ae;let[q,oe]=v.points||[],se=Jp(oe),ce=Jp(q),le=Yp(b,se),ue=Yp(x,ce),de={...v},fe=[ce,se],pe=le.x-ue.x+K,me=le.y-ue.y+re;function he(e,t,n=H){let r=x.x+e,i=x.y+t,a=r+j,o=i+A,s=Math.max(r,n.left),c=Math.max(i,n.top),l=Math.min(a,n.right),u=Math.min(o,n.bottom);return Math.max(0,(l-s)*(u-c))}let ge=he(pe,me),_e=he(pe,me,V),ve=Yp(b,[`t`,`l`]),ye=Yp(x,[`t`,`l`]),be=Yp(b,[`b`,`r`]),xe=Yp(x,[`b`,`r`]),{adjustX:Se,adjustY:Ce,shiftX:we,shiftY:Te}=v.overflow||{},Ee=e=>typeof e==`boolean`?e:e>=0,De,Oe,ke,Ae;function je(){De=x.y+me,Oe=De+A,ke=x.x+pe,Ae=ke+j}je();let Me=Ee(Ce),Ne=ce[0]===se[0];if(Me&&ce[0]===`t`&&(Oe>U.bottom||f.current.bt)){let e=me;Ne?e-=A-M:e=ve.y-xe.y-re;let t=he(pe,e),n=he(pe,e,V);t>ge||t===ge&&(!z||n>=_e)?(f.current.bt=!0,me=e,re=-re,fe=[Xp(fe[0],0),Xp(fe[1],0)]):f.current.bt=!1}if(Me&&ce[0]===`b`&&(Dege||t===ge&&(!z||n>=_e)?(f.current.tb=!0,me=e,re=-re,fe=[Xp(fe[0],0),Xp(fe[1],0)]):f.current.tb=!1}let Pe=Ee(Se),Fe=ce[1]===se[1];if(Pe&&ce[1]===`l`&&(Ae>U.right||f.current.rl)){let e=pe;Fe?e-=j-N:e=ve.x-xe.x-K;let t=he(e,me),n=he(e,me,V);t>ge||t===ge&&(!z||n>=_e)?(f.current.rl=!0,pe=e,K=-K,fe=[Xp(fe[0],1),Xp(fe[1],1)]):f.current.rl=!1}if(Pe&&ce[1]===`r`&&(kege||t===ge&&(!z||n>=_e)?(f.current.lr=!0,pe=e,K=-K,fe=[Xp(fe[0],1),Xp(fe[1],1)]):f.current.lr=!1}de.points=[Zp(fe[0]),Zp(fe[1])],je();let Ie=we===!0?0:we;typeof Ie==`number`&&(keV.right&&(pe-=Ae-V.right-K,b.x>V.right-Ie&&(pe+=b.x-V.right+Ie)));let Le=Te===!0?0:Te;typeof Le==`number`&&(DeV.bottom&&(me-=Oe-V.bottom-re,b.y>V.bottom-Le&&(me+=b.y-V.bottom+Le)));let Re=x.x+pe,ze=Re+j,Be=x.y+me,Ve=Be+A,He=b.x,Ue=He+N,We=b.y,Ge=We+M,Ke=(Math.max(Re,He)+Math.min(ze,Ue))/2-Re,qe=(Math.max(Be,We)+Math.min(Ve,Ge))/2-Be;o?.(t,de);let Je=ee.right-x.x-(pe+x.width),Ye=ee.bottom-x.y-(me+x.height);W===1&&(pe=Math.floor(pe),Je=Math.floor(Je)),te===1&&(me=Math.floor(me),Ye=Math.floor(Ye)),l({ready:!0,offsetX:pe/W,offsetY:me/te,offsetR:Je/W,offsetB:Ye/te,arrowX:Ke/W,arrowY:qe/te,scaleX:W,scaleY:te,align:de})}}),m=()=>{u.current+=1;let e=u.current;Promise.resolve().then(()=>{u.current===e&&p()})},h=()=>{l(e=>({...e,ready:!1}))};return Hn(h,[r]),Hn(()=>{e||h()},[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,m]}function $p(){let e=S.useRef(null),t=()=>{e.current&&=(clearTimeout(e.current),null)};return S.useEffect(()=>()=>{t()},[]),(n,r)=>{t(),r===0?n():e.current=setTimeout(()=>{n()},r*1e3)}}function em(e,t,n,r,i){Hn(()=>{if(e&&t&&n){let e=t,a=n,o=Hp(e),s=Hp(a),c=Vp(a),l=new Set([c,...o,...s]);function u(){r(),i()}return l.forEach(e=>{e.addEventListener(`scroll`,u,{passive:!0})}),c.addEventListener(`resize`,u,{passive:!0}),r(),()=>{l.forEach(e=>{e.removeEventListener(`scroll`,u),c.removeEventListener(`resize`,u)})}}},[e,t,n])}function tm(e,t,n,r,i,a,o,s){let c=S.useRef(e);c.current=e;let l=S.useRef(!1);S.useEffect(()=>{if(t&&r&&(!i||a)){let e=()=>{l.current=!1},t=e=>{c.current&&!o(e.composedPath?.()?.[0]||e.target)&&!l.current&&s(!1)},i=Vp(r);i.addEventListener(`pointerdown`,e,!0),i.addEventListener(`mousedown`,t,!0),i.addEventListener(`contextmenu`,t,!0);let a=Jr(n);return a&&(a.addEventListener(`mousedown`,t,!0),a.addEventListener(`contextmenu`,t,!0)),()=>{i.removeEventListener(`pointerdown`,e,!0),i.removeEventListener(`mousedown`,t,!0),i.removeEventListener(`contextmenu`,t,!0),a&&(a.removeEventListener(`mousedown`,t,!0),a.removeEventListener(`contextmenu`,t,!0))}}},[t,n,r,i,a]);function u(){l.current=!0}return u}function nm(){let[e,t]=S.useState(null),[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null);return[zn(e=>{e===!1?(o.current=null,r(!1)):i&&n?o.current=e:(r(!0),t(e),o.current=null,n||a(!0))}),n,e,zn(e=>{e?(a(!1),o.current&&=(t(o.current),null)):(a(!1),o.current=null)})]}function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,isMobile:n,ready:r,open:i,align:a,offsetR:o,offsetB:s,offsetX:c,offsetY:l,arrowPos:u,popupSize:d,motion:f,uniqueContainerClassName:p,uniqueContainerStyle:m}=e,h=`${t}-unique-container`,[g,_]=S.useState(!1),v=Mp(n,r,i,a,o,s,c,l),y=S.useRef(v);r&&(y.current=v);let b={};return d&&(b.width=d.width,b.height=d.height),S.createElement(Od,rm({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${h}-hidden`},f,{visible:i,onVisibleChanged:e=>{_(e)}}),({className:e,style:t})=>{let n=J(h,e,p,{[`${h}-visible`]:g});return S.createElement(`div`,{className:n,style:{"--arrow-x":`${u?.x||0}px`,"--arrow-y":`${u?.y||0}px`,...y.current,...b,...t,...m}})})},am=({children:e,postTriggerProps:t})=>{let[n,r,i,a]=nm(),o=S.useMemo(()=>!i||!t?i:t(i),[i,t]),[s,c]=S.useState(null),[l,u]=S.useState(null),d=S.useRef(null),f=zn(e=>{d.current=e,Or(e)&&s!==e&&c(e)}),p=S.useRef(null),m=$p(),h=zn((e,t)=>{p.current=t,m(()=>{n(e)},e.delay)}),g=e=>{m(()=>{p.current?.()||n(!1)},e)},_=zn(e=>{a(e)}),[v,y,b,x,C,w,T,,,E,D]=Qp(r,s,o?.target,o?.popupPlacement,o?.builtinPlacements||{},o?.popupAlign,void 0,!1),O=S.useMemo(()=>o?J(Bp(o.builtinPlacements||{},o.prefixCls||``,E,!1),o.getPopupClassNameFromAlign?.(E)):``,[E,o?.getPopupClassNameFromAlign,o?.builtinPlacements,o?.prefixCls]),k=S.useMemo(()=>({show:h,hide:g}),[]);S.useEffect(()=>{D()},[o?.target]);let A=zn(()=>(D(),Promise.resolve())),j=S.useRef({}),M=S.useContext(Fp),N=S.useMemo(()=>({registerSubPopup:(e,t)=>{j.current[e]=t,M?.registerSubPopup(e,t)}}),[M]),P=o?.prefixCls;return S.createElement(Ip.Provider,{value:k},e,o&&S.createElement(Fp.Provider,{value:N},S.createElement(Pp,{ref:f,portal:Dp,onEsc:o.onEsc,prefixCls:P,popup:o.popup,className:J(o.popupClassName,O,`${P}-unique-controlled`),style:o.popupStyle,target:o.target,open:r,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:_,ready:v,offsetX:y,offsetY:b,offsetR:x,offsetB:C,onAlign:D,onPrepare:A,onResize:e=>u({width:e.offsetWidth,height:e.offsetHeight}),arrowPos:{x:w,y:T},align:E,zIndex:o.zIndex,mask:o.mask,arrow:o.arrow,motion:o.popupMotion,maskMotion:o.maskMotion,getPopupContainer:o.getPopupContainer},S.createElement(im,{prefixCls:P,isMobile:!1,ready:v,open:r,align:E,offsetR:x,offsetB:C,offsetX:y,offsetY:b,arrowPos:{x:w,y:T},popupSize:l,motion:o.popupMotion,uniqueContainerClassName:J(o.uniqueContainerClassName,O),uniqueContainerStyle:o.uniqueContainerStyle}))))};function om(e=Dp){return S.forwardRef((t,n)=>{let{prefixCls:r=`rc-trigger-popup`,children:i,action:a=`hover`,showAction:o,hideAction:s,popupVisible:c,defaultPopupVisible:l,onOpenChange:u,afterOpenChange:d,onPopupVisibleChange:f,afterPopupVisibleChange:p,mouseEnterDelay:m,mouseLeaveDelay:h=.1,focusDelay:g,blurDelay:_,mask:v,maskClosable:y=!0,getPopupContainer:b,forceRender:x,autoDestroy:C,popup:w,popupClassName:T,uniqueContainerClassName:E,uniqueContainerStyle:D,popupStyle:O,popupPlacement:k,builtinPlacements:A={},popupAlign:j,zIndex:M,stretch:N,getPopupClassNameFromAlign:P,fresh:F,unique:I,alignPoint:L,onPopupClick:R,onPopupAlign:z,arrow:B,popupMotion:V,maskMotion:H,mobile:U,...ee}=t,W=C||!1,te=c===void 0,G=!!U,ne=S.useRef({}),K=S.useContext(Fp),re=S.useMemo(()=>({registerSubPopup:(e,t)=>{ne.current[e]=t,K?.registerSubPopup(e,t)}}),[K]),ie=S.useContext(Ip),ae=Xn(),[q,oe]=S.useState(null),se=S.useRef(null),ce=zn(e=>{se.current=e,Or(e)&&q!==e&&oe(e),K?.registerSubPopup(ae,e)}),[le,ue]=S.useState(null),de=S.useRef(null),fe=zn(e=>{let t=kr(e);Or(t)&&le!==t&&(ue(t),de.current=t)}),pe={},me=zn(e=>{let t=le;return t?.contains(e)||Jr(t)?.host===e||e===t||q?.contains(e)||Jr(q)?.host===e||e===q||Object.values(ne.current).some(t=>t?.contains(e)||e===t)}),he=B?{...B===!0?{}:B}:null,[ge,_e]=Gn(l||!1,c),ve=ge||!1,ye=S.useMemo(()=>{let e=typeof i==`function`?i({open:ve}):i;return S.Children.only(e)},[i,ve]),be=ye?.props||{},xe=zn(()=>ve),Se=zn((e=0)=>({popup:w,target:le,delay:e,prefixCls:r,popupClassName:T,uniqueContainerClassName:E,uniqueContainerStyle:D,popupStyle:O,popupPlacement:k,builtinPlacements:A,popupAlign:j,zIndex:M,mask:v,maskClosable:y,popupMotion:V,maskMotion:H,arrow:he,getPopupContainer:b,getPopupClassNameFromAlign:P,id:ae,onEsc:De}));Hn(()=>{ie&&I&&le&&!te&&!K&&(ve?ie.show(Se(m),xe):ie.hide(h))},[ve,le]);let Ce=S.useRef(ve);Ce.current=ve;let we=zn(e=>{(0,Vi.flushSync)(()=>{ve!==e&&(_e(e),u?.(e),f?.(e))})}),Te=$p(),Ee=(e,t=0)=>{if(c!==void 0){Te(()=>{we(e)},t);return}if(ie&&I&&te&&!K){e?ie.show(Se(t),xe):ie.hide(t);return}Te(()=>{we(e)},t)};function De({top:e}){e&&Ee(!1)}let[Oe,ke]=S.useState(!1);Hn(e=>{(!e||ve)&&ke(!0)},[ve]);let[Ae,je]=S.useState(null),[Me,Ne]=S.useState(null),Pe=e=>{Ne([e.clientX,e.clientY])},[Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge]=Qp(ve,q,L&&Me!==null?Me:le,k,A,j,z,G),[Ke,qe]=Rp(a,o,s),Je=Ke.has(`click`),Ye=qe.has(`click`)||qe.has(`contextMenu`),Xe=zn(()=>{Oe||Ge()});em(ve,le,q,Xe,()=>{Ce.current&&L&&Ye&&Ee(!1)}),Hn(()=>{Xe()},[Me,k]),Hn(()=>{ve&&!A?.[k]&&Xe()},[JSON.stringify(j)]);let Ze=S.useMemo(()=>J(Bp(A,r,We,L),P?.(We)),[We,P,A,r,L]);S.useImperativeHandle(n,()=>({nativeElement:de.current,popupElement:se.current,forceAlign:Xe}));let[Qe,$e]=S.useState(0),[et,tt]=S.useState(0),nt=()=>{if(N&&le){let e=le.getBoundingClientRect();$e(e.width),tt(e.height)}},rt=()=>{nt(),Xe()},it=e=>{ke(!1),Ge(),d?.(e),p?.(e)},at=()=>new Promise(e=>{nt(),je(()=>e)});Hn(()=>{Ae&&(Ge(),Ae(),je(null))},[Ae]);function ot(e,t,n,r,i){pe[e]=(a,...o)=>{(!i||!i())&&(r?.(a),Ee(t,n)),be[e]?.(a,...o)}}let st=Ke.has(`touch`),ct=qe.has(`touch`),lt=S.useRef(!1);(st||ct)&&(pe.onTouchStart=(...e)=>{lt.current=!0,Ce.current&&ct?Ee(!1):!Ce.current&&st&&Ee(!0),be.onTouchStart?.(...e)}),(Je||Ye)&&(pe.onClick=(e,...t)=>{Ce.current&&Ye?Ee(!1):!Ce.current&&Je&&(Pe(e),Ee(!0)),be.onClick?.(e,...t),lt.current=!1});let ut=tm(ve,Ye||ct,le,q,v,y,me,Ee),dt=Ke.has(`hover`),ft=qe.has(`hover`),pt,mt,ht=()=>lt.current;if(dt){let e=e=>{Pe(e)};ot(`onMouseEnter`,!0,m,e,ht),ot(`onPointerEnter`,!0,m,e,ht),pt=e=>{(ve||Oe)&&q?.contains(e.target)&&Ee(!0,m)},L&&(pe.onMouseMove=e=>{be.onMouseMove?.(e)})}ft&&(ot(`onMouseLeave`,!1,h,void 0,ht),ot(`onPointerLeave`,!1,h,void 0,ht),mt=()=>{Ee(!1,h)}),Ke.has(`focus`)&&ot(`onFocus`,!0,g),qe.has(`focus`)&&ot(`onBlur`,!1,_),Ke.has(`contextMenu`)&&(pe.onContextMenu=(e,...t)=>{Ce.current&&qe.has(`contextMenu`)?Ee(!1):(Pe(e),Ee(!0)),e.preventDefault(),be.onContextMenu?.(e,...t)});let gt=S.useRef(!1);gt.current||=x||ve||Oe;let _t={...be,...pe},vt={};[`onContextMenu`,`onClick`,`onMouseDown`,`onTouchStart`,`onMouseEnter`,`onMouseLeave`,`onFocus`,`onBlur`].forEach(e=>{ee[e]&&(vt[e]=(...t)=>{_t[e]?.(...t),ee[e](...t)})});let yt={x:Be,y:Ve};ea(ve,le,rt);let bt=lr(fe,pr(ye)),xt=S.cloneElement(ye,{..._t,...vt,ref:bt});return S.createElement(S.Fragment,null,xt,gt.current&&(!ie||!I)&&S.createElement(Fp.Provider,{value:re},S.createElement(Pp,{portal:e,ref:ce,prefixCls:r,popup:w,className:J(T,!G&&Ze),style:O,target:le,onMouseEnter:pt,onMouseLeave:mt,onPointerEnter:pt,zIndex:M,open:ve,keepDom:Oe,fresh:F,onClick:R,onPointerDownCapture:ut,mask:v,motion:V,maskMotion:H,onVisibleChanged:it,onPrepare:at,forceRender:x,autoDestroy:W,getPopupContainer:b,onEsc:De,align:We,arrow:he,arrowPos:yt,ready:Fe,offsetX:Ie,offsetY:Le,offsetR:Re,offsetB:ze,onAlign:Xe,stretch:N,targetWidth:Qe/He,targetHeight:et/Ue,mobile:U})))})}var sm=om(Dp);function cm(e){return e&&S.isValidElement(e)&&e.type===S.Fragment}var lm=(e,t,n)=>S.isValidElement(e)?S.cloneElement(e,rf(n)?n(e.props||{}):n):t;function um(e,t){return lm(e,e,t)}var dm=({children:e})=>{let{getPrefixCls:t}=S.useContext(ga),n=t();return S.isValidElement(e)?S.createElement(Od,{visible:!0,motionName:`${n}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:t,className:n})=>um(e,e=>({className:J(e.className,n),style:{...e.style,...t}}))):e},fm=[null,null];function eee(e){if(fm[0]!==e){let t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:!1}}),fm[0]=e,fm[1]=t}return fm[1]}var pm=({children:e})=>S.createElement(am,{postTriggerProps:e=>{let{id:t,builtinPlacements:n,popup:r}=e,i=typeof r==`function`?r():r,a=eee(n);return{...e,getPopupContainer:null,arrow:!1,popup:S.createElement(dm,{key:t},i),builtinPlacements:a}}},e),mm=S.createContext(!1),hm=({children:e,disabled:t})=>{let n=S.useContext(mm);return S.createElement(mm.Provider,{value:t??n},e)},gm=S.createContext(void 0),tee=({children:e,size:t})=>{let n=S.useContext(gm);return S.createElement(gm.Provider,{value:t||n},e)};function _m(){return{componentDisabled:(0,S.useContext)(mm),componentSize:(0,S.useContext)(gm)}}function vm(e,t,n){Gi(`ConfigProvider`);let r=e||{},i=r.inherit===!1||!t?{...Ml,hashed:t?.hashed??Ml.hashed,cssVar:t?.cssVar}:t,a=(0,S.useId)();return Zn(()=>{if(!e)return t;let o={...i.components};Object.keys(e.components||{}).forEach(t=>{o[t]={...o[t],...e.components[t]}});let s=`css-var-${a.replace(/:/g,``)}`,c={prefix:n?.prefixCls,...i.cssVar,...r.cssVar,key:r.cssVar?.key||s};return{...i,...r,token:{...i.token,...r.token},components:o,cssVar:c}},[r,i],(e,t)=>e.some((e,n)=>{let r=t[n];return!fi(e,r,!0)}))}var ym=S.createContext(!0);function bm(e){let t=S.useContext(ym),{children:n}=e,[,r]=Vl(),{motion:i}=r,a=S.useRef(!1);return a.current||=t!==i,a.current?S.createElement(ym.Provider,{value:i},S.createElement(zu,{motion:i},n)):n}var nee=()=>null,xm=({iconPrefixCls:e,csp:t})=>(ru(e,t),null),Sm=[`getTargetContainer`,`getPopupContainer`,`renderEmpty`,`input`,`pagination`,`form`,`select`,`button`],Cm,wm,Tm,Em;function Dm(){return Cm||`ant`}function Om(){return wm||`anticon`}var km=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:i}=e;t!==void 0&&(Cm=t),n!==void 0&&(wm=n),`holderRender`in e&&(Em=i),r&&(Tm=r)},Am=()=>({getPrefixCls:(e,t)=>t||(e?`${Dm()}-${e}`:Dm()),getIconPrefixCls:Om,getRootPrefixCls:()=>Cm||Dm(),getTheme:()=>Tm,holderRender:Em}),ree=e=>{let{children:t,csp:n,autoInsertSpaceInButton:r,alert:i,affix:a,anchor:o,app:s,form:c,locale:l,componentSize:u,direction:d,space:f,splitter:p,virtual:m,dropdownMatchSelectWidth:h,popupMatchSelectWidth:g,popupOverflow:_,legacyLocale:v,parentContext:y,iconPrefixCls:b,theme:x,componentDisabled:C,segmented:w,statistic:T,spin:E,calendar:D,carousel:O,cascader:k,collapse:A,typography:j,checkbox:M,descriptions:N,divider:P,drawer:F,skeleton:I,steps:L,image:R,layout:z,list:B,mentions:V,modal:H,progress:U,result:ee,slider:W,breadcrumb:te,masonry:G,menu:ne,pagination:K,input:re,textArea:ie,otp:ae,empty:q,badge:oe,radio:se,rate:ce,ribbon:le,switch:ue,transfer:de,avatar:fe,message:pe,tag:me,table:he,card:ge,cardMeta:_e,tabs:ve,timeline:ye,timePicker:be,upload:xe,notification:Se,tree:Ce,colorPicker:we,datePicker:Te,rangePicker:Ee,flex:De,wave:Oe,dropdown:ke,warning:Ae,tour:je,tooltip:Me,popover:Ne,popconfirm:Pe,qrcode:Fe,floatButton:Ie,floatButtonGroup:Le,variant:Re,inputNumber:ze,treeSelect:Be,watermark:Ve}=e,He=S.useMemo(()=>nf(l)&&Object.prototype.hasOwnProperty.call(l,`default`)&&l.default?.locale?l.default:l,[l]),Ue=S.useCallback((t,n)=>{let{prefixCls:r}=e;if(n)return n;let i=r||y.getPrefixCls(``);return t?`${i}-${t}`:i},[y.getPrefixCls,e.prefixCls]),We=b||y.iconPrefixCls||`anticon`,Ge=n||y.csp,Ke=vm(x,y.theme,{prefixCls:Ue(``)}),qe={csp:Ge,autoInsertSpaceInButton:r,alert:i,affix:a,anchor:o,app:s,locale:He||v,direction:d,space:f,splitter:p,virtual:m,popupMatchSelectWidth:g??h,popupOverflow:_,getPrefixCls:Ue,iconPrefixCls:We,theme:Ke,segmented:w,statistic:T,spin:E,calendar:D,carousel:O,cascader:k,collapse:A,typography:j,checkbox:M,descriptions:N,divider:P,drawer:F,skeleton:I,steps:L,image:R,input:re,textArea:ie,otp:ae,layout:z,list:B,mentions:V,modal:H,progress:U,result:ee,slider:W,breadcrumb:te,masonry:G,menu:ne,pagination:K,empty:q,badge:oe,radio:se,rate:ce,ribbon:le,switch:ue,transfer:de,avatar:fe,message:pe,tag:me,table:he,card:ge,cardMeta:_e,tabs:ve,timeline:ye,timePicker:be,upload:xe,notification:Se,tree:Ce,colorPicker:we,datePicker:Te,rangePicker:Ee,flex:De,wave:Oe,dropdown:ke,warning:Ae,tour:je,tooltip:Me,popover:Ne,popconfirm:Pe,qrcode:Fe,floatButton:Ie,floatButtonGroup:Le,variant:Re,inputNumber:ze,treeSelect:Be,watermark:Ve},Je={...y};Object.keys(qe).forEach(e=>{qe[e]!==void 0&&(Je[e]=qe[e])}),Sm.forEach(t=>{let n=e[t];n&&(Je[t]=n)}),r!==void 0&&(Je.button={autoInsertSpace:r,...Je.button});let Ye=Zn(()=>Je,Je,(e,t)=>{let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some(n=>e[n]!==t[n])}),{layer:Xe}=S.useContext(ka),Ze=S.useMemo(()=>({prefixCls:We,csp:Ge,layer:Xe?`antd`:void 0}),[We,Ge,Xe]),Qe=S.createElement(S.Fragment,null,S.createElement(xm,{iconPrefixCls:We,csp:Ge}),S.createElement(nee,{dropdownMatchSelectWidth:h}),t),$e=S.useMemo(()=>Li(Hd.Form?.defaultValidateMessages||{},Ye.locale?.Form?.defaultValidateMessages||{},Ye.form?.validateMessages||{},c?.validateMessages||{}),[Ye,c?.validateMessages]);Object.keys($e).length>0&&(Qe=S.createElement(cp.Provider,{value:$e},Qe)),He&&(Qe=S.createElement(Zd,{locale:He,_ANT_MARK__:Xd},Qe)),(We||Ge)&&(Qe=S.createElement(au.Provider,{value:Ze},Qe)),u&&(Qe=S.createElement(tee,{size:u},Qe)),Qe=S.createElement(bm,null,Qe),Me?.unique&&(Qe=S.createElement(pm,null,Qe));let et=S.useMemo(()=>{let{algorithm:e,token:t,components:n,cssVar:r,...i}=Ke||{},a=e&&(!Array.isArray(e)||e.length>0)?Fa(e):jl,o={};Object.entries(n||{}).forEach(([e,t])=>{let n={...t};`algorithm`in n&&(n.algorithm===!0?n.theme=a:(Array.isArray(n.algorithm)||typeof n.algorithm==`function`)&&(n.theme=Fa(n.algorithm)),delete n.algorithm),o[e]=n});let s={...Dc,...t};return{...i,theme:a,token:s,components:o,override:{override:s,...o},cssVar:r}},[Ke]);return x&&(Qe=S.createElement(Nl.Provider,{value:et},Qe)),Ye.warning&&(Qe=S.createElement(Wi.Provider,{value:Ye.warning},Qe)),C!==void 0&&(Qe=S.createElement(hm,{disabled:C},Qe)),S.createElement(ga.Provider,{value:Ye},Qe)},jm=e=>{let t=S.useContext(ga),n=S.useContext(Jd);return S.createElement(ree,{parentContext:t,legacyLocale:n,...e})};jm.ConfigContext=ga,jm.SizeContext=gm,jm.config=km,jm.useConfig=_m,Object.defineProperty(jm,`SizeContext`,{get:()=>gm});function Mm(){return Mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,style:r,className:i,duration:a=4.5,showProgress:o,pauseOnHover:s=!0,eventKey:c,content:l,closable:u,props:d,onClick:f,onNoticeClose:p,times:m,hovering:h}=e,[g,_]=S.useState(!1),[v,y]=S.useState(0),[b,x]=S.useState(0),C=h||g,w=typeof a==`number`?a:0,T=w>0&&o,E=()=>{p(c)},D=e=>{(e.key===`Enter`||e.code===`Enter`||e.keyCode===Qr.ENTER)&&E()};S.useEffect(()=>{if(!C&&w>0){let e=Date.now()-b,t=setTimeout(()=>{E()},w*1e3-b);return()=>{s&&clearTimeout(t),x(Date.now()-e)}}},[w,C,m]),S.useEffect(()=>{if(!C&&T&&(s||b===0)){let e=performance.now(),t,n=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(t=>{let r=t+b-e,i=Math.min(r/(w*1e3),1);y(i*100),i<1&&n()})};return n(),()=>{s&&cancelAnimationFrame(t)}}},[w,b,C,T,m]);let O=S.useMemo(()=>typeof u==`object`&&u?u:{},[u]),k=xi(O,!0),A=100-(!v||v<0?0:v>100?100:v),j=`${n}-notice`;return S.createElement(`div`,Mm({},d,{ref:t,className:J(j,i,{[`${j}-closable`]:u}),style:r,onMouseEnter:e=>{_(!0),d?.onMouseEnter?.(e)},onMouseLeave:e=>{_(!1),d?.onMouseLeave?.(e)},onClick:f}),S.createElement(`div`,{className:`${j}-content`},l),u&&S.createElement(`button`,Mm({className:`${j}-close`,onKeyDown:D,"aria-label":`Close`},k,{onClick:e=>{e.preventDefault(),e.stopPropagation(),E()}}),O.closeIcon??`x`),T&&S.createElement(`progress`,{className:`${j}-progress`,max:`100`,value:A},A+`%`))}),Pm=S.createContext({}),Fm=({children:e,classNames:t})=>S.createElement(Pm.Provider,{value:{classNames:t}},e),Im=8,Lm=3,Rm=16,zm=e=>{let t={offset:Im,threshold:Lm,gap:Rm};return e&&typeof e==`object`&&(t.offset=e.offset??Im,t.threshold=e.threshold??Lm,t.gap=e.gap??Rm),[!!e,t]};function Bm(){return Bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{configList:t,placement:n,prefixCls:r,className:i,style:a,motion:o,onAllNoticeRemoved:s,onNoticeClose:c,stack:l}=e,{classNames:u}=(0,S.useContext)(Pm),d=(0,S.useRef)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)([]),g=t.map(e=>({config:e,key:String(e.key)})),[_,{offset:v,threshold:y,gap:b}]=zm(l),x=_&&(m.length>0||g.length<=y),C=typeof o==`function`?o(n):o;return(0,S.useEffect)(()=>{_&&m.length>1&&h(e=>e.filter(e=>g.some(({key:t})=>e===t)))},[m,g,_]),(0,S.useEffect)(()=>{_&&d.current[g[g.length-1]?.key]&&p(d.current[g[g.length-1]?.key])},[g,_]),S.createElement(Dd,Bm({key:n,className:J(r,`${r}-${n}`,u?.list,i,{[`${r}-stack`]:!!_,[`${r}-stack-expanded`]:x}),style:a,keys:g,motionAppear:!0},C,{onAllRemoved:()=>{s(n)}}),({config:e,className:t,style:i,index:a},o)=>{let{key:s,times:l}=e,p=String(s),{className:y,style:C,classNames:w,styles:T,...E}=e,D=g.findIndex(e=>e.key===p),O={};if(_){let e=g.length-1-(D>-1?D:a-1),t=n===`top`||n===`bottom`?`-50%`:`0`;if(e>0){O.height=x?d.current[p]?.offsetHeight:f?.offsetHeight;let r=0;for(let t=0;th(e=>e.includes(p)?e:[...e,p]),onMouseLeave:()=>h(e=>e.filter(e=>e!==p))},S.createElement(Nm,Bm({},E,{ref:e=>{D>-1?d.current[p]=e:delete d.current[p]},prefixCls:r,classNames:w,styles:T,className:J(y,u?.notice),style:C,times:l,key:s,eventKey:s,onNoticeClose:c,hovering:_&&m.length>0})))})},Hm=S.forwardRef((e,t)=>{let{prefixCls:n=`rc-notification`,container:r,motion:i,maxCount:a,className:o,style:s,onAllRemoved:c,stack:l,renderNotifications:u}=e,[d,f]=S.useState([]),p=e=>{let t=d.find(t=>t.key===e),n=t?.closable,{onClose:r}=n&&typeof n==`object`?n:{};r?.(),t?.onClose?.(),f(t=>t.filter(t=>t.key!==e))};S.useImperativeHandle(t,()=>({open:e=>{f(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>0&&n.length>a&&(n=n.slice(-a)),n})},close:e=>{p(e)},destroy:()=>{f([])}}));let[m,h]=S.useState({});S.useEffect(()=>{let e={};d.forEach(t=>{let{placement:n=`topRight`}=t;n&&(e[n]=e[n]||[],e[n].push(t))}),Object.keys(m).forEach(t=>{e[t]=e[t]||[]}),h(e)},[d]);let g=e=>{h(t=>{let n={...t};return(n[e]||[]).length||delete n[e],n})},_=S.useRef(!1);if(S.useEffect(()=>{Object.keys(m).length>0?_.current=!0:_.current&&=(c?.(),!1)},[m]),!r)return null;let v=Object.keys(m);return(0,Vi.createPortal)(S.createElement(S.Fragment,null,v.map(e=>{let t=m[e],r=S.createElement(Vm,{key:e,configList:t,placement:e,prefixCls:n,className:o?.(e),style:s?.(e),motion:i,onNoticeClose:p,onAllNoticeRemoved:g,stack:l});return u?u(r,{prefixCls:n,key:e}):r})),r)}),Um=()=>document.body,Wm=0;function Gm(...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 Km(e={}){let{getContainer:t=Um,motion:n,prefixCls:r,maxCount:i,className:a,style:o,onAllRemoved:s,stack:c,renderNotifications:l,...u}=e,[d,f]=S.useState(),p=S.useRef(),m=S.createElement(Hm,{container:d,ref:p,prefixCls:r,motion:n,maxCount:i,className:a,style:o,onAllRemoved:s,stack:c,renderNotifications:l}),[h,g]=S.useState([]),_=zn(e=>{let t=Gm(u,e);(t.key===null||t.key===void 0)&&(t.key=`rc-notification-${Wm}`,Wm+=1),g(e=>[...e,{type:`open`,config:t}])}),v=S.useMemo(()=>({open:_,close:e=>{g(t=>[...t,{type:`close`,key:e}])},destroy:()=>{g(e=>[...e,{type:`destroy`}])}}),[]);return S.useEffect(()=>{f(t())}),S.useEffect(()=>{if(p.current&&h.length){h.forEach(e=>{switch(e.type){case`open`:p.current.open(e.config);break;case`close`:p.current.close(e.key);break;case`destroy`:p.current.destroy();break}});let e,t;g(n=>((e!==n||!t)&&(e=n,t=n.filter(e=>!h.includes(e))),t))}},[h]),[v,m]}var qm=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z`}}]},name:`loading`,theme:`outlined`}}))());function Jm(){return Jm=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Jm({},e,{ref:t,icon:qm.default}))),Xm=e=>{let{componentCls:t,iconCls:n,boxShadow:r,colorText:i,colorSuccess:a,colorError:o,colorWarning:s,colorInfo:c,fontSizeLG:l,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:f,paddingXS:p,borderRadiusLG:m,zIndexPopup:h,contentPadding:g,contentBg:_}=e,v=`${t}-notice`,y=new Ms(`MessageMoveIn`,{"0%":{padding:0,transform:`translateY(-100%)`,opacity:0},"100%":{padding:p,transform:`translateY(0)`,opacity:1}}),b=new Ms(`MessageMoveOut`,{"0%":{maxHeight:e.height,padding:p,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),x={padding:p,textAlign:`center`,[`${t}-custom-content`]:{display:`flex`,alignItems:`center`},[`${t}-custom-content > ${n}`]:{marginInlineEnd:f,fontSize:l},[`${v}-content`]:{display:`inline-block`,padding:g,background:_,borderRadius:m,boxShadow:r,pointerEvents:`all`},[`${t}-success > ${n}`]:{color:a},[`${t}-error > ${n}`]:{color:o},[`${t}-warning > ${n}`]:{color:s},[`${t}-info > ${n}, ${t}-loading > ${n}`]:{color:c}};return[{[t]:{...Ul(e),color:i,position:`fixed`,top:f,width:`100%`,pointerEvents:`none`,zIndex:h,[`${t}-move-up`]:{animationFillMode:`forwards`},[` ${t}-move-up-appear, ${t}-move-up-enter `]:{animationName:y,animationDuration:d,animationPlayState:`paused`,animationTimingFunction:u},[` ${t}-move-up-appear${t}-move-up-appear-active, ${t}-move-up-enter${t}-move-up-enter-active - `]:{animationPlayState:`running`},[`${t}-move-up-leave`]:{animationName:b,animationDuration:d,animationPlayState:`paused`,animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:`running`},"&-rtl":{direction:`rtl`,span:{direction:`rtl`}}}},{[t]:{[`${v}-wrapper`]:{...x}}},{[`${t}-notice-pure-panel`]:{...x,padding:0,textAlign:`start`}}]},Qm=Ql(`Message`,e=>Zm(dc(e,{height:150})),e=>({zIndexPopup:e.zIndexPopupBase+Nf+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})),$m={info:S.createElement(Lu,null),success:S.createElement(Tu,null),error:S.createElement(Ou,null),warning:S.createElement(Pu,null),loading:S.createElement(Xm,null)},eh=e=>{let{prefixCls:t,type:n,icon:r,children:i,classNames:a,styles:o}=e,s=um(r||n&&$m[n],e=>{let t={...e?.style,...o?.icon};return{className:J(e.className,a?.icon),style:t}});return S.createElement(`div`,{className:J(`${t}-custom-content`,`${t}-${n}`)},s,S.createElement(`span`,{className:a?.content,style:o?.content},i))},th=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:p,styles:m}=ya(`message`),h=t||u(`message`),g=sp(h),[_,v]=Qm(h,g),[y,b]=Cf([p,s],[m,c],{props:e});return S.createElement(Pm,{...l,prefixCls:h,className:J(d,y.root,n,_,`${h}-notice-pure-panel`,v,g),style:{...b.root,...f,...r},eventKey:`pure`,duration:null,content:S.createElement(eh,{prefixCls:h,type:i,icon:a,classNames:y,styles:b},o)})};function nh(e,t){return{motionName:t??`${e}-move-up`}}function rh(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 ih=8,ah=3,oh=({children:e,prefixCls:t})=>{let n=sp(t),[r,i]=Qm(t,n);return S.createElement(Im,{classNames:{list:J(r,i,n)}},e)},sh=(e,{prefixCls:t,key:n})=>S.createElement(oh,{prefixCls:t,key:n},e),ch=S.forwardRef((e,t)=>{let{top:n,prefixCls:r,getContainer:i,maxCount:a,duration:o=ah,rtl:s,transitionName:c,onAllRemoved:l,pauseOnHover:u=!0}=e,{getPrefixCls:d,direction:f,getPopupContainer:p}=ya(`message`),{message:m}=S.useContext(ga),h=r||d(`message`),g=()=>({left:`50%`,transform:`translateX(-50%)`,top:n??ih}),_=()=>J({[`${h}-rtl`]:s??f===`rtl`}),v=()=>nh(h,c),[y,b]=Cf([e?.classNames,m?.classNames],[e?.styles,m?.styles],{props:e}),[x,C]=qm({prefixCls:h,style:g,className:_,motion:v,closable:!1,duration:o,getContainer:()=>i?.()||p?.()||document.body,maxCount:a,onAllRemoved:l,renderNotifications:sh,pauseOnHover:u});return S.useImperativeHandle(t,()=>({...x,prefixCls:h,message:m,classNames:y,styles:b})),C}),lh=0;function uh(e){let t=S.useRef(null);return Gi(`Message`),[S.useMemo(()=>{let n=e=>{t.current?.close(e)},r=r=>{if(!t.current){let e=()=>{};return e.then=()=>{},e}let{open:i,prefixCls:a,message:o,classNames:s,styles:c}=t.current,l=o?.className||{},u=o?.style||{},d=o?.classNames||{},f=o?.styles||{},p=`${a}-notice`,{content:m,icon:h,type:g,key:_,className:v,style:y,onClose:b,classNames:x={},styles:C={},...w}=r,T=_;$d(T)||(lh+=1,T=`antd-message-${lh}`);let E={...e,...r},D=Sf(d,{props:E}),O=Sf(x,{props:E}),k=Sf(f,{props:E}),A=Sf(C,{props:E}),j=_f(void 0,D,O,s),M=yf(k,A,c);return rh(e=>(i({...w,key:T,content:S.createElement(eh,{prefixCls:a,type:g,icon:h,classNames:j,styles:M},m),placement:`top`,className:J({[`${p}-${g}`]:g},v,l,j.root),style:{...M.root,...u,...y},onClose:()=>{b?.(),e()}}),()=>{n(T)}))},i={open:r,destroy:e=>{e===void 0?t.current?.destroy():n(e)}};return[`info`,`success`,`warning`,`error`,`loading`].forEach(e=>{i[e]=(t,n,i)=>{let a;a=nf(t)&&`content`in t?t:{content:t};let o,s;return typeof n==`function`?s=n:(o=n,s=i),r({onClose:s,duration:o,...a,type:e})}}),i},[]),S.createElement(ch,{key:`message-holder`,...e,ref:t})]}function dh(e){return uh(e)}var fh=()=>({height:0,opacity:0}),ph=e=>({height:e?.scrollHeight??0,opacity:+!!e}),ree=e=>({height:e?.offsetHeight??0}),iee=e=>nf(e)&&`propertyName`in e,mh=(e,t)=>t?.deadline===!0||(iee(t)?t.propertyName===`height`:!1),hh=(e=`ant`)=>({motionName:`${e}-motion-collapse`,onAppearStart:fh,onEnterStart:fh,onAppearActive:ph,onEnterActive:ph,onLeaveStart:ree,onLeaveActive:fh,onAppearEnd:mh,onEnterEnd:mh,onLeaveEnd:mh,motionDeadline:500}),gh=(e,t,n)=>n===void 0?`${e}-${t}`:n,_h=$l(`Wave`,e=>{let{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:i,motionEaseOutCirc:a,antCls:o}=e,[,s]=tu(o,`wave`);return{[t]:{position:`absolute`,background:`transparent`,pointerEvents:`none`,boxSizing:`border-box`,color:s(`color`,n),boxShadow:`0 0 0 0 currentcolor`,opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s`,`opacity 2s`].map(e=>`${e} ${a}`).join(`,`),"&-active":{boxShadow:`0 0 0 6px currentcolor`,opacity:0},"&.wave-quick":{transition:[`box-shadow`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`,`)}}}}}),vh=`ant-wave-target`;function yh(e){return e&&typeof e==`string`&&e!==`#fff`&&e!==`#ffffff`&&e!==`rgb(255, 255, 255)`&&e!==`rgba(255, 255, 255, 1)`&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!==`transparent`&&e!==`canvastext`}function bh(e,t=null){let n=getComputedStyle(e),{borderTopColor:r,borderColor:i,backgroundColor:a}=n;return t&&yh(n[t])?n[t]:[r,i,a].find(yh)??null}function xh(e){return Number.isNaN(e)?0:e}var Sh=e=>{let{className:t,target:n,component:r,colorSource:i}=e,a=S.useRef(null),{getPrefixCls:o}=S.useContext(ga),[s]=tu(o(),`wave`),[c,l]=S.useState(null),[u,d]=S.useState([]),[f,p]=S.useState(0),[m,h]=S.useState(0),[g,_]=S.useState(0),[v,y]=S.useState(0),[b,x]=S.useState(!1),C={left:f,top:m,width:g,height:v,borderRadius:u.map(e=>`${e}px`).join(` `)};c&&(C[s(`color`)]=c);function w(){let e=getComputedStyle(n);l(bh(n,i));let t=e.position===`static`,{borderLeftWidth:r,borderTopWidth:a}=e;p(t?n.offsetLeft:xh(-Number.parseFloat(r))),h(t?n.offsetTop:xh(-Number.parseFloat(a))),_(n.offsetWidth),y(n.offsetHeight);let{borderTopLeftRadius:o,borderTopRightRadius:s,borderBottomLeftRadius:c,borderBottomRightRadius:u}=e;d([o,s,u,c].map(e=>xh(Number.parseFloat(e))))}if(S.useEffect(()=>{if(n){let e=Oi(()=>{w(),x(!0)}),t;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(w),t.observe(n)),()=>{Oi.cancel(e),t?.disconnect()}}},[n]),!b)return null;let T=(r===`Checkbox`||r===`Radio`)&&n?.classList.contains(vh);return S.createElement(Od,{visible:!0,motionAppear:!0,motionName:`wave-motion`,motionDeadline:5e3,onAppearEnd:(e,t)=>{if(t.deadline||t.propertyName===`opacity`){let e=a.current?.parentElement;Bi(e).then(()=>{e?.remove()})}return!1}},({className:e},n)=>S.createElement(`div`,{ref:cr(a,n),className:J(t,e,{"wave-quick":T}),style:C}))},Ch=(e,t)=>{let{component:n}=t;if(n===`Checkbox`&&!e.querySelector(`input`)?.checked)return;let r=document.createElement(`div`);r.style.position=`absolute`,r.style.left=`0px`,r.style.top=`0px`,e?.insertBefore(r,e?.firstChild),zi(S.createElement(Sh,{...t,target:e}),r)},wh=(e,t,n,r)=>{let{wave:i}=S.useContext(ga),[,a,o]=Vl(),s=zn(s=>{let c=e.current;if(i?.disabled||!c)return;let l=c.querySelector(`.${vh}`)||c,{showEffect:u}=i||{};(u||Ch)(l,{className:t,token:a,component:n,event:s,hashId:o,colorSource:r})}),c=S.useRef(null);return S.useEffect(()=>()=>{Oi.cancel(c.current)},[]),e=>{Oi.cancel(c.current),c.current=Oi(()=>{s(e)})}},Th=e=>{let{children:t,disabled:n,component:r,colorSource:i}=e,{getPrefixCls:a}=(0,S.useContext)(ga),o=(0,S.useRef)(null),s=a(`wave`),c=wh(o,J(s,_h(s)),r,i);return S.useEffect(()=>{let e=o.current;if(!e||e.nodeType!==window.Node.ELEMENT_NODE||n)return;let t=t=>{!Ar(t.target)||!e.getAttribute||e.getAttribute(`disabled`)||e.disabled||e.className.includes(`disabled`)&&!e.className.includes(`disabled:`)||e.getAttribute(`aria-disabled`)===`true`||e.className.includes(`-leave`)||c(t)};return e.addEventListener(`click`,t,!0),()=>{e.removeEventListener(`click`,t,!0)}},[n]),S.isValidElement(t)?um(t,{ref:ur(t)?cr(pr(t),o):o}):t??null},Eh=e=>{let t=S.useContext(gm);return S.useMemo(()=>e?typeof e==`string`?e??t:typeof e==`function`?e(t):t:t,[e,t])},Dh=Ql([`Space`,`Compact`],e=>{let{componentCls:t}=e;return{[t]:{display:`inline-flex`,"&-block":{display:`flex`,width:`100%`},"&-vertical":{flexDirection:`column`},"&-rtl":{direction:`rtl`}}}},()=>({}),{resetStyle:!1}),Oh=S.createContext(null),kh=(e,t)=>{let n=S.useContext(Oh),r=S.useMemo(()=>{if(!n)return``;let{compactDirection:r,isFirstItem:i,isLastItem:a}=n,o=r===`vertical`?`-vertical-`:`-`;return J(`${e}-compact${o}item`,{[`${e}-compact${o}first-item`]:i,[`${e}-compact${o}last-item`]:a,[`${e}-compact${o}item-rtl`]:t===`rtl`})},[e,t,n]);return{compactSize:n?.compactSize,compactDirection:n?.compactDirection,compactItemClassnames:r}},Ah=e=>{let{children:t}=e;return S.createElement(Oh.Provider,{value:null},t)},jh=e=>{let{children:t,...n}=e;return S.createElement(Oh.Provider,{value:S.useMemo(()=>n,[n])},t)},Mh=e=>{let{getPrefixCls:t,direction:n}=S.useContext(ga),{size:r,direction:i,orientation:a,block:o,prefixCls:s,className:c,rootClassName:l,children:u,vertical:d,...f}=e,[p,m]=Ef(a,d,i),h=Eh(e=>r??e),g=t(`space-compact`,s),[_]=Dh(g),v=J(g,_,{[`${g}-rtl`]:n===`rtl`,[`${g}-block`]:o,[`${g}-vertical`]:m},c,l),y=S.useContext(Oh),b=ki(u),x=S.useMemo(()=>b.map((e,t)=>{let n=e?.key||`${g}-item-${t}`;return S.createElement(jh,{key:n,compactSize:h,compactDirection:p,isFirstItem:t===0&&(!y||y?.isFirstItem),isLastItem:t===b.length-1&&(!y||y?.isLastItem)},e)}),[b,y,p,h,g]);return b.length===0?null:S.createElement(`div`,{className:v,...f},x)},Nh=S.createContext(void 0),Ph=e=>{let{getPrefixCls:t,direction:n}=S.useContext(ga),{prefixCls:r,size:i,className:a,...o}=e,s=t(`btn-group`,r),[,,c]=Vl(),l=S.useMemo(()=>{switch(i){case`large`:return`lg`;case`small`:return`sm`;default:return``}},[i]),u=J(s,{[`${s}-${l}`]:l,[`${s}-rtl`]:n===`rtl`},a,c);return S.createElement(Nh.Provider,{value:i},S.createElement(`div`,{...o,className:u}))},Fh=/^[\u4E00-\u9FA5]{2}$/,Ih=Fh.test.bind(Fh);function Lh(e){return e===`danger`?{danger:!0}:{type:e}}function Rh(e){return e===`text`||e===`link`}function zh(e,t,n,r){if(!$d(e)||e===``)return;let i=t?` `:``;return typeof e!=`string`&&typeof e!=`number`&&tf(e.type)&&Ih(e.props.children)?um(e,e=>{let t=J(e.className,r)||void 0,a={...n,...e.style};return{...e,children:e.children.split(``).join(i),className:t,style:a}}):tf(e)?S.createElement(`span`,{className:r,style:n},Ih(e)?e.split(``).join(i):e):cm(e)?S.createElement(`span`,{className:r,style:n},e):um(e,e=>({...e,className:J(e.className,r)||void 0,style:{...e.style,...n}}))}function Bh(e,t,n,r){let i=!1,a=[];return S.Children.forEach(e,e=>{let t=typeof e,n=t===`string`||t===`number`;if(i&&n){let t=a.length-1;a[t]=`${a[t]}${e}`}else a.push(e);i=n}),S.Children.map(a,e=>zh(e,t,n,r))}[`default`,`primary`,`danger`].concat(pa(Sc));var Vh=(0,S.forwardRef)((e,t)=>{let{className:n,style:r,children:i,prefixCls:a}=e,o=J(`${a}-icon`,n);return S.createElement(`span`,{ref:t,className:o,style:r},i)}),Hh=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,className:r,style:i,iconClassName:a}=e,o=J(`${n}-loading-icon`,r);return S.createElement(Vh,{prefixCls:n,className:o,style:i,ref:t},S.createElement(Xm,{className:a}))}),Uh=()=>({width:0,opacity:0,transform:`scale(0)`}),Wh=e=>({width:e.scrollWidth,opacity:1,transform:`scale(1)`}),Gh=e=>{let{prefixCls:t,loading:n,existIcon:r,className:i,style:a,mount:o}=e,s=!!n;return r?S.createElement(Hh,{prefixCls:t,className:i,style:a}):S.createElement(Od,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!o,motionEnter:!o,motionLeave:!o,removeOnLeave:!0,onAppearStart:Uh,onAppearActive:Wh,onEnterStart:Uh,onEnterActive:Wh,onLeaveStart:Wh,onLeaveActive:Uh},({className:e,style:n},r)=>{let o={...a,...n};return S.createElement(Hh,{prefixCls:t,className:J(i,e),style:o,ref:r})})},Kh=e=>{let{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:i}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:`hidden`,"&-active":{transition:`${[`height`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`, `)} !important`}},[`${n}-motion-collapse`]:{overflow:`hidden`,transition:`${[`height`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`, `)} !important`}}}},qh=e=>({animationDuration:e,animationFillMode:`both`}),Jh=(e,t,n,r,i=!1)=>{let a=i?`&`:``;return{[` + `]:{animationPlayState:`running`},[`${t}-move-up-leave`]:{animationName:b,animationDuration:d,animationPlayState:`paused`,animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:`running`},"&-rtl":{direction:`rtl`,span:{direction:`rtl`}}}},{[t]:{[`${v}-wrapper`]:{...x}}},{[`${t}-notice-pure-panel`]:{...x,padding:0,textAlign:`start`}}]},Zm=Ql(`Message`,e=>Xm(dc(e,{height:150})),e=>({zIndexPopup:e.zIndexPopupBase+Nf+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})),Qm={info:S.createElement(Lu,null),success:S.createElement(Tu,null),error:S.createElement(Ou,null),warning:S.createElement(Pu,null),loading:S.createElement(Ym,null)},$m=e=>{let{prefixCls:t,type:n,icon:r,children:i,classNames:a,styles:o}=e,s=um(r||n&&Qm[n],e=>{let t={...e?.style,...o?.icon};return{className:J(e.className,a?.icon),style:t}});return S.createElement(`div`,{className:J(`${t}-custom-content`,`${t}-${n}`)},s,S.createElement(`span`,{className:a?.content,style:o?.content},i))},eh=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:p,styles:m}=ya(`message`),h=t||u(`message`),g=sp(h),[_,v]=Zm(h,g),[y,b]=Cf([p,s],[m,c],{props:e});return S.createElement(Nm,{...l,prefixCls:h,className:J(d,y.root,n,_,`${h}-notice-pure-panel`,v,g),style:{...b.root,...f,...r},eventKey:`pure`,duration:null,content:S.createElement($m,{prefixCls:h,type:i,icon:a,classNames:y,styles:b},o)})};function th(e,t){return{motionName:t??`${e}-move-up`}}function nh(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 rh=8,ih=3,ah=({children:e,prefixCls:t})=>{let n=sp(t),[r,i]=Zm(t,n);return S.createElement(Fm,{classNames:{list:J(r,i,n)}},e)},oh=(e,{prefixCls:t,key:n})=>S.createElement(ah,{prefixCls:t,key:n},e),sh=S.forwardRef((e,t)=>{let{top:n,prefixCls:r,getContainer:i,maxCount:a,duration:o=ih,rtl:s,transitionName:c,onAllRemoved:l,pauseOnHover:u=!0}=e,{getPrefixCls:d,direction:f,getPopupContainer:p}=ya(`message`),{message:m}=S.useContext(ga),h=r||d(`message`),g=()=>({left:`50%`,transform:`translateX(-50%)`,top:n??rh}),_=()=>J({[`${h}-rtl`]:s??f===`rtl`}),v=()=>th(h,c),[y,b]=Cf([e?.classNames,m?.classNames],[e?.styles,m?.styles],{props:e}),[x,C]=Km({prefixCls:h,style:g,className:_,motion:v,closable:!1,duration:o,getContainer:()=>i?.()||p?.()||document.body,maxCount:a,onAllRemoved:l,renderNotifications:oh,pauseOnHover:u});return S.useImperativeHandle(t,()=>({...x,prefixCls:h,message:m,classNames:y,styles:b})),C}),ch=0;function lh(e){let t=S.useRef(null);return Gi(`Message`),[S.useMemo(()=>{let n=e=>{t.current?.close(e)},r=r=>{if(!t.current){let e=()=>{};return e.then=()=>{},e}let{open:i,prefixCls:a,message:o,classNames:s,styles:c}=t.current,l=o?.className||{},u=o?.style||{},d=o?.classNames||{},f=o?.styles||{},p=`${a}-notice`,{content:m,icon:h,type:g,key:_,className:v,style:y,onClose:b,classNames:x={},styles:C={},...w}=r,T=_;$d(T)||(ch+=1,T=`antd-message-${ch}`);let E={...e,...r},D=Sf(d,{props:E}),O=Sf(x,{props:E}),k=Sf(f,{props:E}),A=Sf(C,{props:E}),j=_f(void 0,D,O,s),M=yf(k,A,c);return nh(e=>(i({...w,key:T,content:S.createElement($m,{prefixCls:a,type:g,icon:h,classNames:j,styles:M},m),placement:`top`,className:J({[`${p}-${g}`]:g},v,l,j.root),style:{...M.root,...u,...y},onClose:()=>{b?.(),e()}}),()=>{n(T)}))},i={open:r,destroy:e=>{e===void 0?t.current?.destroy():n(e)}};return[`info`,`success`,`warning`,`error`,`loading`].forEach(e=>{i[e]=(t,n,i)=>{let a;a=nf(t)&&`content`in t?t:{content:t};let o,s;return typeof n==`function`?s=n:(o=n,s=i),r({onClose:s,duration:o,...a,type:e})}}),i},[]),S.createElement(sh,{key:`message-holder`,...e,ref:t})]}function uh(e){return lh(e)}var dh=()=>({height:0,opacity:0}),fh=e=>({height:e?.scrollHeight??0,opacity:+!!e}),iee=e=>({height:e?.offsetHeight??0}),aee=e=>nf(e)&&`propertyName`in e,ph=(e,t)=>t?.deadline===!0||(aee(t)?t.propertyName===`height`:!1),mh=(e=`ant`)=>({motionName:`${e}-motion-collapse`,onAppearStart:dh,onEnterStart:dh,onAppearActive:fh,onEnterActive:fh,onLeaveStart:iee,onLeaveActive:dh,onAppearEnd:ph,onEnterEnd:ph,onLeaveEnd:ph,motionDeadline:500}),hh=(e,t,n)=>n===void 0?`${e}-${t}`:n,gh=$l(`Wave`,e=>{let{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:i,motionEaseOutCirc:a,antCls:o}=e,[,s]=tu(o,`wave`);return{[t]:{position:`absolute`,background:`transparent`,pointerEvents:`none`,boxSizing:`border-box`,color:s(`color`,n),boxShadow:`0 0 0 0 currentcolor`,opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s`,`opacity 2s`].map(e=>`${e} ${a}`).join(`,`),"&-active":{boxShadow:`0 0 0 6px currentcolor`,opacity:0},"&.wave-quick":{transition:[`box-shadow`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`,`)}}}}}),_h=`ant-wave-target`;function vh(e){return e&&typeof e==`string`&&e!==`#fff`&&e!==`#ffffff`&&e!==`rgb(255, 255, 255)`&&e!==`rgba(255, 255, 255, 1)`&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!==`transparent`&&e!==`canvastext`}function yh(e,t=null){let n=getComputedStyle(e),{borderTopColor:r,borderColor:i,backgroundColor:a}=n;return t&&vh(n[t])?n[t]:[r,i,a].find(vh)??null}function bh(e){return Number.isNaN(e)?0:e}var xh=e=>{let{className:t,target:n,component:r,colorSource:i}=e,a=S.useRef(null),{getPrefixCls:o}=S.useContext(ga),[s]=tu(o(),`wave`),[c,l]=S.useState(null),[u,d]=S.useState([]),[f,p]=S.useState(0),[m,h]=S.useState(0),[g,_]=S.useState(0),[v,y]=S.useState(0),[b,x]=S.useState(!1),C={left:f,top:m,width:g,height:v,borderRadius:u.map(e=>`${e}px`).join(` `)};c&&(C[s(`color`)]=c);function w(){let e=getComputedStyle(n);l(yh(n,i));let t=e.position===`static`,{borderLeftWidth:r,borderTopWidth:a}=e;p(t?n.offsetLeft:bh(-Number.parseFloat(r))),h(t?n.offsetTop:bh(-Number.parseFloat(a))),_(n.offsetWidth),y(n.offsetHeight);let{borderTopLeftRadius:o,borderTopRightRadius:s,borderBottomLeftRadius:c,borderBottomRightRadius:u}=e;d([o,s,u,c].map(e=>bh(Number.parseFloat(e))))}if(S.useEffect(()=>{if(n){let e=Oi(()=>{w(),x(!0)}),t;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(w),t.observe(n)),()=>{Oi.cancel(e),t?.disconnect()}}},[n]),!b)return null;let T=(r===`Checkbox`||r===`Radio`)&&n?.classList.contains(_h);return S.createElement(Od,{visible:!0,motionAppear:!0,motionName:`wave-motion`,motionDeadline:5e3,onAppearEnd:(e,t)=>{if(t.deadline||t.propertyName===`opacity`){let e=a.current?.parentElement;Bi(e).then(()=>{e?.remove()})}return!1}},({className:e},n)=>S.createElement(`div`,{ref:cr(a,n),className:J(t,e,{"wave-quick":T}),style:C}))},Sh=(e,t)=>{let{component:n}=t;if(n===`Checkbox`&&!e.querySelector(`input`)?.checked)return;let r=document.createElement(`div`);r.style.position=`absolute`,r.style.left=`0px`,r.style.top=`0px`,e?.insertBefore(r,e?.firstChild),zi(S.createElement(xh,{...t,target:e}),r)},Ch=(e,t,n,r)=>{let{wave:i}=S.useContext(ga),[,a,o]=Vl(),s=zn(s=>{let c=e.current;if(i?.disabled||!c)return;let l=c.querySelector(`.${_h}`)||c,{showEffect:u}=i||{};(u||Sh)(l,{className:t,token:a,component:n,event:s,hashId:o,colorSource:r})}),c=S.useRef(null);return S.useEffect(()=>()=>{Oi.cancel(c.current)},[]),e=>{Oi.cancel(c.current),c.current=Oi(()=>{s(e)})}},wh=e=>{let{children:t,disabled:n,component:r,colorSource:i}=e,{getPrefixCls:a}=(0,S.useContext)(ga),o=(0,S.useRef)(null),s=a(`wave`),c=Ch(o,J(s,gh(s)),r,i);return S.useEffect(()=>{let e=o.current;if(!e||e.nodeType!==window.Node.ELEMENT_NODE||n)return;let t=t=>{!Ar(t.target)||!e.getAttribute||e.getAttribute(`disabled`)||e.disabled||e.className.includes(`disabled`)&&!e.className.includes(`disabled:`)||e.getAttribute(`aria-disabled`)===`true`||e.className.includes(`-leave`)||c(t)};return e.addEventListener(`click`,t,!0),()=>{e.removeEventListener(`click`,t,!0)}},[n]),S.isValidElement(t)?um(t,{ref:ur(t)?cr(pr(t),o):o}):t??null},Th=e=>{let t=S.useContext(gm);return S.useMemo(()=>e?typeof e==`string`?e??t:typeof e==`function`?e(t):t:t,[e,t])},Eh=Ql([`Space`,`Compact`],e=>{let{componentCls:t}=e;return{[t]:{display:`inline-flex`,"&-block":{display:`flex`,width:`100%`},"&-vertical":{flexDirection:`column`},"&-rtl":{direction:`rtl`}}}},()=>({}),{resetStyle:!1}),Dh=S.createContext(null),Oh=(e,t)=>{let n=S.useContext(Dh),r=S.useMemo(()=>{if(!n)return``;let{compactDirection:r,isFirstItem:i,isLastItem:a}=n,o=r===`vertical`?`-vertical-`:`-`;return J(`${e}-compact${o}item`,{[`${e}-compact${o}first-item`]:i,[`${e}-compact${o}last-item`]:a,[`${e}-compact${o}item-rtl`]:t===`rtl`})},[e,t,n]);return{compactSize:n?.compactSize,compactDirection:n?.compactDirection,compactItemClassnames:r}},kh=e=>{let{children:t}=e;return S.createElement(Dh.Provider,{value:null},t)},Ah=e=>{let{children:t,...n}=e;return S.createElement(Dh.Provider,{value:S.useMemo(()=>n,[n])},t)},jh=e=>{let{getPrefixCls:t,direction:n}=S.useContext(ga),{size:r,direction:i,orientation:a,block:o,prefixCls:s,className:c,rootClassName:l,children:u,vertical:d,...f}=e,[p,m]=Ef(a,d,i),h=Th(e=>r??e),g=t(`space-compact`,s),[_]=Eh(g),v=J(g,_,{[`${g}-rtl`]:n===`rtl`,[`${g}-block`]:o,[`${g}-vertical`]:m},c,l),y=S.useContext(Dh),b=ki(u),x=S.useMemo(()=>b.map((e,t)=>{let n=e?.key||`${g}-item-${t}`;return S.createElement(Ah,{key:n,compactSize:h,compactDirection:p,isFirstItem:t===0&&(!y||y?.isFirstItem),isLastItem:t===b.length-1&&(!y||y?.isLastItem)},e)}),[b,y,p,h,g]);return b.length===0?null:S.createElement(`div`,{className:v,...f},x)},Mh=S.createContext(void 0),Nh=e=>{let{getPrefixCls:t,direction:n}=S.useContext(ga),{prefixCls:r,size:i,className:a,...o}=e,s=t(`btn-group`,r),[,,c]=Vl(),l=S.useMemo(()=>{switch(i){case`large`:return`lg`;case`small`:return`sm`;default:return``}},[i]),u=J(s,{[`${s}-${l}`]:l,[`${s}-rtl`]:n===`rtl`},a,c);return S.createElement(Mh.Provider,{value:i},S.createElement(`div`,{...o,className:u}))},Ph=/^[\u4E00-\u9FA5]{2}$/,Fh=Ph.test.bind(Ph);function Ih(e){return e===`danger`?{danger:!0}:{type:e}}function Lh(e){return e===`text`||e===`link`}function Rh(e,t,n,r){if(!$d(e)||e===``)return;let i=t?` `:``;return typeof e!=`string`&&typeof e!=`number`&&tf(e.type)&&Fh(e.props.children)?um(e,e=>{let t=J(e.className,r)||void 0,a={...n,...e.style};return{...e,children:e.children.split(``).join(i),className:t,style:a}}):tf(e)?S.createElement(`span`,{className:r,style:n},Fh(e)?e.split(``).join(i):e):cm(e)?S.createElement(`span`,{className:r,style:n},e):um(e,e=>({...e,className:J(e.className,r)||void 0,style:{...e.style,...n}}))}function zh(e,t,n,r){let i=!1,a=[];return S.Children.forEach(e,e=>{let t=typeof e,n=t===`string`||t===`number`;if(i&&n){let t=a.length-1;a[t]=`${a[t]}${e}`}else a.push(e);i=n}),S.Children.map(a,e=>Rh(e,t,n,r))}[`default`,`primary`,`danger`].concat(pa(Sc));var Bh=(0,S.forwardRef)((e,t)=>{let{className:n,style:r,children:i,prefixCls:a}=e,o=J(`${a}-icon`,n);return S.createElement(`span`,{ref:t,className:o,style:r},i)}),Vh=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,className:r,style:i,iconClassName:a}=e,o=J(`${n}-loading-icon`,r);return S.createElement(Bh,{prefixCls:n,className:o,style:i,ref:t},S.createElement(Ym,{className:a}))}),Hh=()=>({width:0,opacity:0,transform:`scale(0)`}),Uh=e=>({width:e.scrollWidth,opacity:1,transform:`scale(1)`}),Wh=e=>{let{prefixCls:t,loading:n,existIcon:r,className:i,style:a,mount:o}=e,s=!!n;return r?S.createElement(Vh,{prefixCls:t,className:i,style:a}):S.createElement(Od,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!o,motionEnter:!o,motionLeave:!o,removeOnLeave:!0,onAppearStart:Hh,onAppearActive:Uh,onEnterStart:Hh,onEnterActive:Uh,onLeaveStart:Uh,onLeaveActive:Hh},({className:e,style:n},r)=>{let o={...a,...n};return S.createElement(Vh,{prefixCls:t,className:J(i,e),style:o,ref:r})})},Gh=e=>{let{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:i}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:`hidden`,"&-active":{transition:`${[`height`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`, `)} !important`}},[`${n}-motion-collapse`]:{overflow:`hidden`,transition:`${[`height`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`, `)} !important`}}}},Kh=e=>({animationDuration:e,animationFillMode:`both`}),qh=(e,t,n,r,i=!1)=>{let a=i?`&`:``;return{[` ${a}${e}-enter, ${a}${e}-appear - `]:{...qh(r),animationPlayState:`paused`},[`${a}${e}-leave`]:{...qh(r),animationPlayState:`paused`},[` + `]:{...Kh(r),animationPlayState:`paused`},[`${a}${e}-leave`]:{...Kh(r),animationPlayState:`paused`},[` ${a}${e}-enter${e}-enter-active, ${a}${e}-appear${e}-appear-active - `]:{animationName:t,animationPlayState:`running`},[`${a}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:`running`,pointerEvents:`none`}}},Yh=new Ms(`antFadeIn`,{"0%":{opacity:0},"100%":{opacity:1}}),Xh=new Ms(`antFadeOut`,{"0%":{opacity:1},"100%":{opacity:0}}),Zh=(e,t=!1)=>{let{antCls:n}=e,r=`${n}-fade`,i=t?`&`:``;return[Jh(r,Yh,Xh,e.motionDurationMid,t),{[` + `]:{animationName:t,animationPlayState:`running`},[`${a}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:`running`,pointerEvents:`none`}}},Jh=new Ms(`antFadeIn`,{"0%":{opacity:0},"100%":{opacity:1}}),Yh=new Ms(`antFadeOut`,{"0%":{opacity:1},"100%":{opacity:0}}),Xh=(e,t=!1)=>{let{antCls:n}=e,r=`${n}-fade`,i=t?`&`:``;return[qh(r,Jh,Yh,e.motionDurationMid,t),{[` ${i}${r}-enter, ${i}${r}-appear - `]:{opacity:0,animationTimingFunction:`linear`},[`${i}${r}-leave`]:{animationTimingFunction:`linear`}}]},Qh=new Ms(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),$h=new Ms(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),eg=new Ms(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),tg=new Ms(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),ng=new Ms(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),rg=new Ms(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),ig={"move-up":{inKeyframes:new Ms(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new Ms(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:Qh,outKeyframes:$h},"move-left":{inKeyframes:eg,outKeyframes:tg},"move-right":{inKeyframes:ng,outKeyframes:rg}},ag=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=ig[t];return[Jh(r,i,a,e.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:`linear`},[`${i}${r}-leave`]:{animationTimingFunction:`linear`}}]},Zh=new Ms(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),Qh=new Ms(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),$h=new Ms(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),eg=new Ms(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),tg=new Ms(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),ng=new Ms(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),rg={"move-up":{inKeyframes:new Ms(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new Ms(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:Zh,outKeyframes:Qh},"move-left":{inKeyframes:$h,outKeyframes:eg},"move-right":{inKeyframes:tg,outKeyframes:ng}},ig=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=rg[t];return[qh(r,i,a,e.motionDurationMid),{[` ${r}-enter, ${r}-appear - `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},og=new Ms(`antSlideUpIn`,{"0%":{transform:`scaleY(0.8)`,transformOrigin:`0% 0%`,opacity:0},"100%":{transform:`scaleY(1)`,transformOrigin:`0% 0%`,opacity:1}}),sg=new Ms(`antSlideUpOut`,{"0%":{transform:`scaleY(1)`,transformOrigin:`0% 0%`,opacity:1},"100%":{transform:`scaleY(0.8)`,transformOrigin:`0% 0%`,opacity:0}}),cg=new Ms(`antSlideDownIn`,{"0%":{transform:`scaleY(0.8)`,transformOrigin:`100% 100%`,opacity:0},"100%":{transform:`scaleY(1)`,transformOrigin:`100% 100%`,opacity:1}}),lg=new Ms(`antSlideDownOut`,{"0%":{transform:`scaleY(1)`,transformOrigin:`100% 100%`,opacity:1},"100%":{transform:`scaleY(0.8)`,transformOrigin:`100% 100%`,opacity:0}}),ug=new Ms(`antSlideLeftIn`,{"0%":{transform:`scaleX(0.8)`,transformOrigin:`0% 0%`,opacity:0},"100%":{transform:`scaleX(1)`,transformOrigin:`0% 0%`,opacity:1}}),dg=new Ms(`antSlideLeftOut`,{"0%":{transform:`scaleX(1)`,transformOrigin:`0% 0%`,opacity:1},"100%":{transform:`scaleX(0.8)`,transformOrigin:`0% 0%`,opacity:0}}),fg=new Ms(`antSlideRightIn`,{"0%":{transform:`scaleX(0.8)`,transformOrigin:`100% 0%`,opacity:0},"100%":{transform:`scaleX(1)`,transformOrigin:`100% 0%`,opacity:1}}),pg=new Ms(`antSlideRightOut`,{"0%":{transform:`scaleX(1)`,transformOrigin:`100% 0%`,opacity:1},"100%":{transform:`scaleX(0.8)`,transformOrigin:`100% 0%`,opacity:0}}),mg={"slide-up":{inKeyframes:og,outKeyframes:sg},"slide-down":{inKeyframes:cg,outKeyframes:lg},"slide-left":{inKeyframes:ug,outKeyframes:dg},"slide-right":{inKeyframes:fg,outKeyframes:pg}},hg=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=mg[t];return[Jh(r,i,a,e.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},ag=new Ms(`antSlideUpIn`,{"0%":{transform:`scaleY(0.8)`,transformOrigin:`0% 0%`,opacity:0},"100%":{transform:`scaleY(1)`,transformOrigin:`0% 0%`,opacity:1}}),og=new Ms(`antSlideUpOut`,{"0%":{transform:`scaleY(1)`,transformOrigin:`0% 0%`,opacity:1},"100%":{transform:`scaleY(0.8)`,transformOrigin:`0% 0%`,opacity:0}}),sg=new Ms(`antSlideDownIn`,{"0%":{transform:`scaleY(0.8)`,transformOrigin:`100% 100%`,opacity:0},"100%":{transform:`scaleY(1)`,transformOrigin:`100% 100%`,opacity:1}}),cg=new Ms(`antSlideDownOut`,{"0%":{transform:`scaleY(1)`,transformOrigin:`100% 100%`,opacity:1},"100%":{transform:`scaleY(0.8)`,transformOrigin:`100% 100%`,opacity:0}}),lg=new Ms(`antSlideLeftIn`,{"0%":{transform:`scaleX(0.8)`,transformOrigin:`0% 0%`,opacity:0},"100%":{transform:`scaleX(1)`,transformOrigin:`0% 0%`,opacity:1}}),ug=new Ms(`antSlideLeftOut`,{"0%":{transform:`scaleX(1)`,transformOrigin:`0% 0%`,opacity:1},"100%":{transform:`scaleX(0.8)`,transformOrigin:`0% 0%`,opacity:0}}),dg=new Ms(`antSlideRightIn`,{"0%":{transform:`scaleX(0.8)`,transformOrigin:`100% 0%`,opacity:0},"100%":{transform:`scaleX(1)`,transformOrigin:`100% 0%`,opacity:1}}),fg=new Ms(`antSlideRightOut`,{"0%":{transform:`scaleX(1)`,transformOrigin:`100% 0%`,opacity:1},"100%":{transform:`scaleX(0.8)`,transformOrigin:`100% 0%`,opacity:0}}),pg={"slide-up":{inKeyframes:ag,outKeyframes:og},"slide-down":{inKeyframes:sg,outKeyframes:cg},"slide-left":{inKeyframes:lg,outKeyframes:ug},"slide-right":{inKeyframes:dg,outKeyframes:fg}},mg=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=pg[t];return[qh(r,i,a,e.motionDurationMid),{[` ${r}-enter, ${r}-appear - `]:{transform:`scale(0)`,transformOrigin:`0% 0%`,opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:`scale(1)`}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},gg=()=>({"@media (prefers-reduced-motion: reduce)":{transition:`none`,animation:`none`}}),_g=new Ms(`antZoomIn`,{"0%":{transform:`scale(0.2)`,opacity:0},"100%":{transform:`scale(1)`,opacity:1}}),vg=new Ms(`antZoomOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0.2)`,opacity:0}}),yg=new Ms(`antZoomBigIn`,{"0%":{transform:`scale(0.8)`,opacity:0},"100%":{transform:`scale(1)`,opacity:1}}),bg=new Ms(`antZoomBigOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0.8)`,opacity:0}}),xg=new Ms(`antZoomUpIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`50% 0%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`50% 0%`}}),Sg=new Ms(`antZoomUpOut`,{"0%":{transform:`scale(1)`,transformOrigin:`50% 0%`},"100%":{transform:`scale(0.8)`,transformOrigin:`50% 0%`,opacity:0}}),Cg=new Ms(`antZoomLeftIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`0% 50%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`0% 50%`}}),wg=new Ms(`antZoomLeftOut`,{"0%":{transform:`scale(1)`,transformOrigin:`0% 50%`},"100%":{transform:`scale(0.8)`,transformOrigin:`0% 50%`,opacity:0}}),Tg=new Ms(`antZoomRightIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`100% 50%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`100% 50%`}}),Eg=new Ms(`antZoomRightOut`,{"0%":{transform:`scale(1)`,transformOrigin:`100% 50%`},"100%":{transform:`scale(0.8)`,transformOrigin:`100% 50%`,opacity:0}}),Dg=new Ms(`antZoomDownIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`50% 100%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`50% 100%`}}),Og=new Ms(`antZoomDownOut`,{"0%":{transform:`scale(1)`,transformOrigin:`50% 100%`},"100%":{transform:`scale(0.8)`,transformOrigin:`50% 100%`,opacity:0}}),kg={zoom:{inKeyframes:_g,outKeyframes:vg},"zoom-big":{inKeyframes:yg,outKeyframes:bg},"zoom-big-fast":{inKeyframes:yg,outKeyframes:bg},"zoom-left":{inKeyframes:Cg,outKeyframes:wg},"zoom-right":{inKeyframes:Tg,outKeyframes:Eg},"zoom-up":{inKeyframes:xg,outKeyframes:Sg},"zoom-down":{inKeyframes:Dg,outKeyframes:Og}},Ag=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=kg[t];return[Jh(r,i,a,t===`zoom-big-fast`?e.motionDurationFast:e.motionDurationMid),{[` + `]:{transform:`scale(0)`,transformOrigin:`0% 0%`,opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:`scale(1)`}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},hg=()=>({"@media (prefers-reduced-motion: reduce)":{transition:`none`,animation:`none`}}),gg=new Ms(`antZoomIn`,{"0%":{transform:`scale(0.2)`,opacity:0},"100%":{transform:`scale(1)`,opacity:1}}),_g=new Ms(`antZoomOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0.2)`,opacity:0}}),vg=new Ms(`antZoomBigIn`,{"0%":{transform:`scale(0.8)`,opacity:0},"100%":{transform:`scale(1)`,opacity:1}}),yg=new Ms(`antZoomBigOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0.8)`,opacity:0}}),bg=new Ms(`antZoomUpIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`50% 0%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`50% 0%`}}),xg=new Ms(`antZoomUpOut`,{"0%":{transform:`scale(1)`,transformOrigin:`50% 0%`},"100%":{transform:`scale(0.8)`,transformOrigin:`50% 0%`,opacity:0}}),Sg=new Ms(`antZoomLeftIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`0% 50%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`0% 50%`}}),Cg=new Ms(`antZoomLeftOut`,{"0%":{transform:`scale(1)`,transformOrigin:`0% 50%`},"100%":{transform:`scale(0.8)`,transformOrigin:`0% 50%`,opacity:0}}),wg=new Ms(`antZoomRightIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`100% 50%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`100% 50%`}}),Tg=new Ms(`antZoomRightOut`,{"0%":{transform:`scale(1)`,transformOrigin:`100% 50%`},"100%":{transform:`scale(0.8)`,transformOrigin:`100% 50%`,opacity:0}}),Eg=new Ms(`antZoomDownIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`50% 100%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`50% 100%`}}),Dg=new Ms(`antZoomDownOut`,{"0%":{transform:`scale(1)`,transformOrigin:`50% 100%`},"100%":{transform:`scale(0.8)`,transformOrigin:`50% 100%`,opacity:0}}),Og={zoom:{inKeyframes:gg,outKeyframes:_g},"zoom-big":{inKeyframes:vg,outKeyframes:yg},"zoom-big-fast":{inKeyframes:vg,outKeyframes:yg},"zoom-left":{inKeyframes:Sg,outKeyframes:Cg},"zoom-right":{inKeyframes:wg,outKeyframes:Tg},"zoom-up":{inKeyframes:bg,outKeyframes:xg},"zoom-down":{inKeyframes:Eg,outKeyframes:Dg}},kg=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=Og[t];return[qh(r,i,a,t===`zoom-big-fast`?e.motionDurationFast:e.motionDurationMid),{[` ${r}-enter, ${r}-appear - `]:{transform:`scale(0)`,opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:`none`}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},jg=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),Mg=e=>{let{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:a}=e;return{[`${t}-group`]:[{position:`relative`,display:`inline-flex`,[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:`relative`,zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},jg(`${t}-primary`,i),jg(`${t}-danger`,a)]}},Ng=e=>Math.round(Number(e||0)),Pg=e=>{if(e instanceof Nc)return e;if(e&&typeof e==`object`&&`h`in e&&`b`in e){let{b:t,...n}=e;return{...n,v:t}}return typeof e==`string`&&/hsb/.test(e)?e.replace(/hsb/,`hsv`):e},Fg=class extends Nc{constructor(e){super(Pg(e))}toHsbString(){let e=this.toHsb(),t=Ng(e.s*100),n=Ng(e.b*100),r=Ng(e.h),i=e.a,a=`hsb(${r}, ${t}%, ${n}%)`,o=`hsba(${r}, ${t}%, ${n}%, ${i.toFixed(i===0?0:2)})`;return i===1?a:o}toHsb(){let{v:e,...t}=this.toHsv();return{...t,b:e,a:this.a}}};(e=>e instanceof Fg?e:new Fg(e))(`#1677ff`);var Ig=(e,t)=>e?.replace(/[^0-9a-f]/gi,``).slice(0,t?8:6)||``,Lg=(e,t)=>e?Ig(e,t):``,Rg=function(){function e(t){if(Ws(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=t.colors?.map(t=>({color:new e(t.color),percent:t.percent})),this.cleared=t.cleared;return}let n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:t,percent:n})=>({color:new e(t),percent:n})),this.metaColor=new Fg(this.colors[0].color.metaColor)):this.metaColor=new Fg(n?``:t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Ks(e,[{key:`toHsb`,value:function(){return this.metaColor.toHsb()}},{key:`toHsbString`,value:function(){return this.metaColor.toHsbString()}},{key:`toHex`,value:function(){return Lg(this.toHexString(),this.metaColor.a<1)}},{key:`toHexString`,value:function(){return this.metaColor.toHexString()}},{key:`toRgb`,value:function(){return this.metaColor.toRgb()}},{key:`toRgbString`,value:function(){return this.metaColor.toRgbString()}},{key:`isGradient`,value:function(){return!!this.colors&&!this.cleared}},{key:`getColors`,value:function(){return this.colors||[{color:this,percent:0}]}},{key:`toCssString`,value:function(){let{colors:e}=this;return e?`linear-gradient(90deg, ${e.map(e=>`${e.color.toRgbString()} ${e.percent}%`).join(`, `)})`:this.metaColor.toRgbString()}},{key:`equals`,value:function(e){return!e||this.isGradient()!==e.isGradient()?!1:this.isGradient()?this.colors.length===e.colors.length&&this.colors.every((t,n)=>{let r=e.colors[n];return t.percent===r.percent&&t.color.equals(r.color)}):this.toHexString()===e.toHexString()}}])}(),zg=c(o((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:`M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z`}}]},name:`right`,theme:`outlined`}}))());function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Bg({},e,{ref:t,icon:zg.default})));function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,forceRender:r,className:i,style:a,children:o,isActive:s,role:c,classNames:l,styles:u}=e,[d,f]=S.useState(s||r);return S.useEffect(()=>{(r||s)&&f(!0)},[r,s]),d?S.createElement(`div`,{ref:t,className:J(`${n}-panel`,{[`${n}-panel-active`]:s,[`${n}-panel-inactive`]:!s},i),style:a,role:c},S.createElement(`div`,{className:J(`${n}-body`,l?.body),style:u?.body},o)):null}),Wg=S.forwardRef((e,t)=>{let{showArrow:n=!0,headerClass:r,isActive:i,onItemClick:a,forceRender:o,className:s,classNames:c={},styles:l={},prefixCls:u,collapsible:d,accordion:f,panelKey:p,extra:m,header:h,expandIcon:g,openMotion:_,destroyOnHidden:v,children:y,...b}=e,x=d===`disabled`,C=m!=null&&typeof m!=`boolean`,w={onClick:()=>{a?.(p)},onKeyDown:e=>{(e.key===`Enter`||e.keyCode===Qr.ENTER||e.which===Qr.ENTER)&&a?.(p)},role:f?`tab`:`button`,"aria-expanded":i,"aria-disabled":x,tabIndex:x?-1:0},T=typeof g==`function`?g(e):S.createElement(`i`,{className:`arrow`}),E=T&&S.createElement(`div`,Hg({className:J(`${u}-expand-icon`,c?.icon),style:l?.icon},[`header`,`icon`].includes(d)?w:{}),T),D=J(`${u}-item`,{[`${u}-item-active`]:i,[`${u}-item-disabled`]:x},s),O={className:J(r,`${u}-header`,{[`${u}-collapsible-${d}`]:!!d},c?.header),style:l?.header,...[`header`,`icon`].includes(d)?{}:w};return S.createElement(`div`,Hg({},b,{ref:t,className:D}),S.createElement(`div`,O,n&&E,S.createElement(`span`,Hg({className:J(`${u}-title`,c?.title),style:l?.title},d===`header`?w:{}),h),C&&S.createElement(`div`,{className:`${u}-extra`},m)),S.createElement(Od,Hg({visible:i,leavedClassName:`${u}-panel-hidden`},_,{forceRender:o,removeOnLeave:v}),({className:e,style:t},n)=>S.createElement(Ug,{ref:n,prefixCls:u,className:e,classNames:c,style:t,styles:l,isActive:i,forceRender:o,role:f?`tabpanel`:void 0},y)))});function Gg(e,t,n){if(!e||!t)return e||t;let r=Array.from(new Set([...Object.keys(e),...Object.keys(t)])),i={};return r.forEach(r=>{i[r]=n(e[r],t[r])}),i}function Kg(e,t){return Gg(e,t,(e,t)=>J(e,t))}function qg(e,t){return Gg(e,t,(e,t)=>({...e,...t}))}var Jg=(e,t)=>{let{prefixCls:n,accordion:r,collapsible:i,destroyOnHidden:a,onItemClick:o,activeKey:s,openMotion:c,expandIcon:l,classNames:u,styles:d}=t;return e.map((e,t)=>{let{children:f,label:p,key:m,collapsible:h,onItemClick:g,destroyOnHidden:_,classNames:v,styles:y,...b}=e,x=String(m??t),C=h??i,w=_??a,T=e=>{C!==`disabled`&&(o(e),g?.(e))},E=!1;return E=r?s[0]===x:s.indexOf(x)>-1,S.createElement(Wg,Hg({},b,{classNames:Kg(u,v),styles:qg(d,y),prefixCls:n,key:x,panelKey:x,isActive:E,accordion:r,openMotion:c,expandIcon:l,header:p,collapsible:C,onItemClick:T,destroyOnHidden:w}),f)})},Yg=(e,t,n)=>{if(!e)return null;let{prefixCls:r,accordion:i,collapsible:a,destroyOnHidden:o,onItemClick:s,activeKey:c,openMotion:l,expandIcon:u,classNames:d,styles:f}=n,p=e.key||String(t),{header:m,headerClass:h,destroyOnHidden:g,collapsible:_,onItemClick:v}=e.props,y=!1;y=i?c[0]===p:c.indexOf(p)>-1;let b=_??a,x={key:p,panelKey:p,header:m,headerClass:h,classNames:d,styles:f,isActive:y,prefixCls:r,destroyOnHidden:g??o,openMotion:l,accordion:i,children:e.props.children,onItemClick:e=>{b!==`disabled`&&(s(e),v?.(e))},expandIcon:u,collapsible:b};return typeof e.type==`string`?e:(Object.keys(x).forEach(e=>{x[e]===void 0&&delete x[e]}),S.cloneElement(e,x))};function Xg(e,t,n){return Array.isArray(e)?Jg(e,n):ki(t).map((e,t)=>Yg(e,t,n))}function Zg(e){let t=e;if(!Array.isArray(t)){let e=typeof t;t=e===`number`||e===`string`?[t]:[]}return t.map(e=>String(e))}var Qg=Object.assign(S.forwardRef((e,t)=>{let{prefixCls:n=`rc-collapse`,destroyOnHidden:r=!1,style:i,accordion:a,className:o,children:s,collapsible:c,openMotion:l,expandIcon:u,activeKey:d,defaultActiveKey:f,onChange:p,items:m,classNames:h,styles:g}=e,_=J(n,o),[v,y]=Gn(f,d),b=Zg(v),x=zn(e=>{let t=Zg(e);y(t),p?.(t)}),C=e=>{x(a?b[0]===e?[]:[e]:b.includes(e)?b.filter(t=>t!==e):[...b,e])};ui(!s,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");let w=Xg(m,s,{prefixCls:n,accordion:a,openMotion:l,expandIcon:u,collapsible:c,destroyOnHidden:r,onItemClick:C,activeKey:b,classNames:h,styles:g});return S.createElement(`div`,Hg({ref:t,className:_,style:i,role:a?`tablist`:void 0},xi(e,{aria:!0,data:!0})),w)}),{Panel:Wg}),$g=Qg,{Panel:aee}=Qg,e_=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(ga),{prefixCls:r,className:i,showArrow:a=!0}=e,o=n(`collapse`,r),s=J({[`${o}-no-arrow`]:!a},i);return S.createElement($g.Panel,{ref:t,...e,prefixCls:o,className:s})}),t_=e=>{let{componentCls:t,contentBg:n,padding:r,headerBg:i,headerPadding:a,collapseHeaderPaddingSM:o,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:c,lineWidth:l,lineType:u,colorBorder:d,colorText:f,colorTextHeading:p,colorTextDisabled:m,fontSizeLG:h,lineHeight:g,lineHeightLG:_,marginSM:v,paddingSM:y,paddingLG:b,paddingXS:x,motionDurationSlow:S,fontSizeIcon:C,contentPadding:w,fontHeight:T,fontHeightLG:E}=e,D=`${Y(l)} ${u} ${d}`;return{[t]:{...Ul(e),backgroundColor:i,border:D,borderRadius:c,"&-rtl":{direction:`rtl`},[`& > ${t}-item`]:{borderBottom:D,"&:first-child":{[` + `]:{transform:`scale(0)`,opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:`none`}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Ag=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),jg=e=>{let{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:a}=e;return{[`${t}-group`]:[{position:`relative`,display:`inline-flex`,[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:`relative`,zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},Ag(`${t}-primary`,i),Ag(`${t}-danger`,a)]}},Mg=e=>Math.round(Number(e||0)),Ng=e=>{if(e instanceof Nc)return e;if(e&&typeof e==`object`&&`h`in e&&`b`in e){let{b:t,...n}=e;return{...n,v:t}}return typeof e==`string`&&/hsb/.test(e)?e.replace(/hsb/,`hsv`):e},Pg=class extends Nc{constructor(e){super(Ng(e))}toHsbString(){let e=this.toHsb(),t=Mg(e.s*100),n=Mg(e.b*100),r=Mg(e.h),i=e.a,a=`hsb(${r}, ${t}%, ${n}%)`,o=`hsba(${r}, ${t}%, ${n}%, ${i.toFixed(i===0?0:2)})`;return i===1?a:o}toHsb(){let{v:e,...t}=this.toHsv();return{...t,b:e,a:this.a}}};(e=>e instanceof Pg?e:new Pg(e))(`#1677ff`);var Fg=(e,t)=>e?.replace(/[^0-9a-f]/gi,``).slice(0,t?8:6)||``,Ig=(e,t)=>e?Fg(e,t):``,Lg=function(){function e(t){if(Ws(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=t.colors?.map(t=>({color:new e(t.color),percent:t.percent})),this.cleared=t.cleared;return}let n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:t,percent:n})=>({color:new e(t),percent:n})),this.metaColor=new Pg(this.colors[0].color.metaColor)):this.metaColor=new Pg(n?``:t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Ks(e,[{key:`toHsb`,value:function(){return this.metaColor.toHsb()}},{key:`toHsbString`,value:function(){return this.metaColor.toHsbString()}},{key:`toHex`,value:function(){return Ig(this.toHexString(),this.metaColor.a<1)}},{key:`toHexString`,value:function(){return this.metaColor.toHexString()}},{key:`toRgb`,value:function(){return this.metaColor.toRgb()}},{key:`toRgbString`,value:function(){return this.metaColor.toRgbString()}},{key:`isGradient`,value:function(){return!!this.colors&&!this.cleared}},{key:`getColors`,value:function(){return this.colors||[{color:this,percent:0}]}},{key:`toCssString`,value:function(){let{colors:e}=this;return e?`linear-gradient(90deg, ${e.map(e=>`${e.color.toRgbString()} ${e.percent}%`).join(`, `)})`:this.metaColor.toRgbString()}},{key:`equals`,value:function(e){return!e||this.isGradient()!==e.isGradient()?!1:this.isGradient()?this.colors.length===e.colors.length&&this.colors.every((t,n)=>{let r=e.colors[n];return t.percent===r.percent&&t.color.equals(r.color)}):this.toHexString()===e.toHexString()}}])}(),Rg=c(o((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:`M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z`}}]},name:`right`,theme:`outlined`}}))());function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,zg({},e,{ref:t,icon:Rg.default})));function Vg(){return Vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,forceRender:r,className:i,style:a,children:o,isActive:s,role:c,classNames:l,styles:u}=e,[d,f]=S.useState(s||r);return S.useEffect(()=>{(r||s)&&f(!0)},[r,s]),d?S.createElement(`div`,{ref:t,className:J(`${n}-panel`,{[`${n}-panel-active`]:s,[`${n}-panel-inactive`]:!s},i),style:a,role:c},S.createElement(`div`,{className:J(`${n}-body`,l?.body),style:u?.body},o)):null}),Ug=S.forwardRef((e,t)=>{let{showArrow:n=!0,headerClass:r,isActive:i,onItemClick:a,forceRender:o,className:s,classNames:c={},styles:l={},prefixCls:u,collapsible:d,accordion:f,panelKey:p,extra:m,header:h,expandIcon:g,openMotion:_,destroyOnHidden:v,children:y,...b}=e,x=d===`disabled`,C=m!=null&&typeof m!=`boolean`,w={onClick:()=>{a?.(p)},onKeyDown:e=>{(e.key===`Enter`||e.keyCode===Qr.ENTER||e.which===Qr.ENTER)&&a?.(p)},role:f?`tab`:`button`,"aria-expanded":i,"aria-disabled":x,tabIndex:x?-1:0},T=typeof g==`function`?g(e):S.createElement(`i`,{className:`arrow`}),E=T&&S.createElement(`div`,Vg({className:J(`${u}-expand-icon`,c?.icon),style:l?.icon},[`header`,`icon`].includes(d)?w:{}),T),D=J(`${u}-item`,{[`${u}-item-active`]:i,[`${u}-item-disabled`]:x},s),O={className:J(r,`${u}-header`,{[`${u}-collapsible-${d}`]:!!d},c?.header),style:l?.header,...[`header`,`icon`].includes(d)?{}:w};return S.createElement(`div`,Vg({},b,{ref:t,className:D}),S.createElement(`div`,O,n&&E,S.createElement(`span`,Vg({className:J(`${u}-title`,c?.title),style:l?.title},d===`header`?w:{}),h),C&&S.createElement(`div`,{className:`${u}-extra`},m)),S.createElement(Od,Vg({visible:i,leavedClassName:`${u}-panel-hidden`},_,{forceRender:o,removeOnLeave:v}),({className:e,style:t},n)=>S.createElement(Hg,{ref:n,prefixCls:u,className:e,classNames:c,style:t,styles:l,isActive:i,forceRender:o,role:f?`tabpanel`:void 0},y)))});function Wg(e,t,n){if(!e||!t)return e||t;let r=Array.from(new Set([...Object.keys(e),...Object.keys(t)])),i={};return r.forEach(r=>{i[r]=n(e[r],t[r])}),i}function Gg(e,t){return Wg(e,t,(e,t)=>J(e,t))}function Kg(e,t){return Wg(e,t,(e,t)=>({...e,...t}))}var qg=(e,t)=>{let{prefixCls:n,accordion:r,collapsible:i,destroyOnHidden:a,onItemClick:o,activeKey:s,openMotion:c,expandIcon:l,classNames:u,styles:d}=t;return e.map((e,t)=>{let{children:f,label:p,key:m,collapsible:h,onItemClick:g,destroyOnHidden:_,classNames:v,styles:y,...b}=e,x=String(m??t),C=h??i,w=_??a,T=e=>{C!==`disabled`&&(o(e),g?.(e))},E=!1;return E=r?s[0]===x:s.indexOf(x)>-1,S.createElement(Ug,Vg({},b,{classNames:Gg(u,v),styles:Kg(d,y),prefixCls:n,key:x,panelKey:x,isActive:E,accordion:r,openMotion:c,expandIcon:l,header:p,collapsible:C,onItemClick:T,destroyOnHidden:w}),f)})},Jg=(e,t,n)=>{if(!e)return null;let{prefixCls:r,accordion:i,collapsible:a,destroyOnHidden:o,onItemClick:s,activeKey:c,openMotion:l,expandIcon:u,classNames:d,styles:f}=n,p=e.key||String(t),{header:m,headerClass:h,destroyOnHidden:g,collapsible:_,onItemClick:v}=e.props,y=!1;y=i?c[0]===p:c.indexOf(p)>-1;let b=_??a,x={key:p,panelKey:p,header:m,headerClass:h,classNames:d,styles:f,isActive:y,prefixCls:r,destroyOnHidden:g??o,openMotion:l,accordion:i,children:e.props.children,onItemClick:e=>{b!==`disabled`&&(s(e),v?.(e))},expandIcon:u,collapsible:b};return typeof e.type==`string`?e:(Object.keys(x).forEach(e=>{x[e]===void 0&&delete x[e]}),S.cloneElement(e,x))};function Yg(e,t,n){return Array.isArray(e)?qg(e,n):ki(t).map((e,t)=>Jg(e,t,n))}function Xg(e){let t=e;if(!Array.isArray(t)){let e=typeof t;t=e===`number`||e===`string`?[t]:[]}return t.map(e=>String(e))}var Zg=Object.assign(S.forwardRef((e,t)=>{let{prefixCls:n=`rc-collapse`,destroyOnHidden:r=!1,style:i,accordion:a,className:o,children:s,collapsible:c,openMotion:l,expandIcon:u,activeKey:d,defaultActiveKey:f,onChange:p,items:m,classNames:h,styles:g}=e,_=J(n,o),[v,y]=Gn(f,d),b=Xg(v),x=zn(e=>{let t=Xg(e);y(t),p?.(t)}),C=e=>{x(a?b[0]===e?[]:[e]:b.includes(e)?b.filter(t=>t!==e):[...b,e])};ui(!s,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");let w=Yg(m,s,{prefixCls:n,accordion:a,openMotion:l,expandIcon:u,collapsible:c,destroyOnHidden:r,onItemClick:C,activeKey:b,classNames:h,styles:g});return S.createElement(`div`,Vg({ref:t,className:_,style:i,role:a?`tablist`:void 0},xi(e,{aria:!0,data:!0})),w)}),{Panel:Ug}),Qg=Zg,{Panel:oee}=Zg,$g=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(ga),{prefixCls:r,className:i,showArrow:a=!0}=e,o=n(`collapse`,r),s=J({[`${o}-no-arrow`]:!a},i);return S.createElement(Qg.Panel,{ref:t,...e,prefixCls:o,className:s})}),e_=e=>{let{componentCls:t,contentBg:n,padding:r,headerBg:i,headerPadding:a,collapseHeaderPaddingSM:o,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:c,lineWidth:l,lineType:u,colorBorder:d,colorText:f,colorTextHeading:p,colorTextDisabled:m,fontSizeLG:h,lineHeight:g,lineHeightLG:_,marginSM:v,paddingSM:y,paddingLG:b,paddingXS:x,motionDurationSlow:S,fontSizeIcon:C,contentPadding:w,fontHeight:T,fontHeightLG:E}=e,D=`${Y(l)} ${u} ${d}`;return{[t]:{...Ul(e),backgroundColor:i,border:D,borderRadius:c,"&-rtl":{direction:`rtl`},[`& > ${t}-item`]:{borderBottom:D,"&:first-child":{[` &, & > ${t}-header`]:{borderRadius:`${Y(c)} ${Y(c)} 0 0`}},"&:last-child":{[` &, - & > ${t}-header`]:{borderRadius:`0 0 ${Y(c)} ${Y(c)}`}},[`> ${t}-header`]:{position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:a,color:p,lineHeight:g,cursor:`pointer`,transition:`all ${S}, visibility 0s`,...ql(e),[`> ${t}-title`]:{flex:`auto`},[`${t}-expand-icon`]:{height:T,display:`flex`,alignItems:`center`,marginInlineEnd:v},[`${t}-arrow`]:{...Wl(),fontSize:C,transition:`transform ${S}`,svg:{transition:`transform ${S}`}},[`${t}-title`]:{marginInlineEnd:`auto`}},[`${t}-collapsible-header`]:{cursor:`default`,[`${t}-title`]:{flex:`none`,cursor:`pointer`},[`${t}-expand-icon`]:{cursor:`pointer`}},[`${t}-collapsible-icon`]:{cursor:`unset`,[`${t}-expand-icon`]:{cursor:`pointer`}}},[`${t}-panel`]:{color:f,backgroundColor:n,borderTop:D,[`& > ${t}-body`]:{padding:w},"&-hidden":{display:`none`}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:o,paddingInlineStart:x,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(y).sub(x).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:y}}},"&-large":{[`> ${t}-item`]:{fontSize:h,lineHeight:_,[`> ${t}-header`]:{padding:s,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:E,marginInlineStart:e.calc(b).sub(r).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:b}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${Y(c)} ${Y(c)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"&, & > .arrow":{color:m,cursor:`not-allowed`}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:v}}}}}}},n_=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},r_=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:a}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${a}`},[` + & > ${t}-header`]:{borderRadius:`0 0 ${Y(c)} ${Y(c)}`}},[`> ${t}-header`]:{position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:a,color:p,lineHeight:g,cursor:`pointer`,transition:`all ${S}, visibility 0s`,...ql(e),[`> ${t}-title`]:{flex:`auto`},[`${t}-expand-icon`]:{height:T,display:`flex`,alignItems:`center`,marginInlineEnd:v},[`${t}-arrow`]:{...Wl(),fontSize:C,transition:`transform ${S}`,svg:{transition:`transform ${S}`}},[`${t}-title`]:{marginInlineEnd:`auto`}},[`${t}-collapsible-header`]:{cursor:`default`,[`${t}-title`]:{flex:`none`,cursor:`pointer`},[`${t}-expand-icon`]:{cursor:`pointer`}},[`${t}-collapsible-icon`]:{cursor:`unset`,[`${t}-expand-icon`]:{cursor:`pointer`}}},[`${t}-panel`]:{color:f,backgroundColor:n,borderTop:D,[`& > ${t}-body`]:{padding:w},"&-hidden":{display:`none`}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:o,paddingInlineStart:x,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(y).sub(x).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:y}}},"&-large":{[`> ${t}-item`]:{fontSize:h,lineHeight:_,[`> ${t}-header`]:{padding:s,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:E,marginInlineStart:e.calc(b).sub(r).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:b}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${Y(c)} ${Y(c)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"&, & > .arrow":{color:m,cursor:`not-allowed`}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:v}}}}}}},t_=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},n_=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:a}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${a}`},[` > ${t}-item:last-child, > ${t}-item:last-child ${t}-header - `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},i_=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:`transparent`,border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},a_=Ql(`Collapse`,e=>{let t=dc(e,{collapseHeaderPaddingSM:`${Y(e.paddingXS)} ${Y(e.paddingSM)}`,collapseHeaderPaddingLG:`${Y(e.padding)} ${Y(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[t_(t),r_(t),i_(t),n_(t),Kh(t)]},e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:`transparent`})),o_=Object.assign(S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o,classNames:s,styles:c}=ya(`collapse`),{prefixCls:l,className:u,rootClassName:d,style:f,bordered:p=!0,ghost:m,size:h,expandIconPlacement:g,expandIconPosition:_,children:v,destroyInactivePanel:y,destroyOnHidden:b,expandIcon:x,classNames:C,styles:w}=e,T=Eh(e=>h??e??`middle`),E=n(`collapse`,l),D=n(),[O,k]=a_(E),A=g??_??`start`,j={...e,size:T,bordered:p,expandIconPlacement:A},[M,N]=Cf([s,C],[c,w],{props:j}),P=x??i,F=S.useCallback((e={})=>um(typeof P==`function`?P(e):S.createElement(Vg,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`}),e=>({className:J(e.className,`${E}-arrow`)})),[P,E,r]),I=J(`${E}-icon-placement-${A}`,{[`${E}-borderless`]:!p,[`${E}-rtl`]:r===`rtl`,[`${E}-ghost`]:!!m,[`${E}-large`]:T===`large`,[`${E}-small`]:T===`small`},a,u,d,O,k,M.root),L=S.useMemo(()=>({...hh(D),motionAppear:!1,leavedClassName:`${E}-panel-hidden`}),[D,E]),R=S.useMemo(()=>v?ki(v).map(e=>e):null,[v]);return S.createElement($g,{ref:t,openMotion:L,...gi(e,[`rootClassName`]),expandIcon:F,prefixCls:E,className:I,style:{...N.root,...o,...f},classNames:M,styles:N,destroyOnHidden:b??y},R)}),{Panel:e_}),s_=e=>e instanceof Rg?e:new Rg(e),c_=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new Fg(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},l_=e=>{let{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return dc(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},u_=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??Cc(t),a=e.contentLineHeightSM??Cc(n),o=e.contentLineHeightLG??Cc(r),s=c_(new Rg(e.colorBgSolid),`#fff`)?`#000`:`#fff`,c=Sc.reduce((t,n)=>({...t,[`${n}ShadowColor`]:`0 ${Y(e.controlOutlineWidth)} 0 ${Fl(e[`${n}1`],e.colorBgContainer)}`}),{}),l=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...c,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:i,contentLineHeightSM:a,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0),defaultBgDisabled:l,dashedBgDisabled:u}},d_=e=>{let{componentCls:t,antCls:n,lineWidth:r}=e,[i,a]=tu(n,`btn`);return{[t]:[{[i(`border-width`)]:r,[i(`border-color`)]:`#000`,[i(`border-color-hover`)]:a(`border-color`),[i(`border-color-active`)]:a(`border-color`),[i(`border-color-disabled`)]:a(`border-color`),[i(`border-style`)]:`solid`,[i(`text-color`)]:`#000`,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`),[i(`text-color-disabled`)]:a(`text-color`),[i(`bg-color`)]:`#ddd`,[i(`bg-color-hover`)]:a(`bg-color`),[i(`bg-color-active`)]:a(`bg-color`),[i(`bg-color-disabled`)]:e.colorBgContainerDisabled,[i(`bg-color-container`)]:e.colorBgContainer,[i(`shadow`)]:`none`},{border:[a(`border-width`),a(`border-style`),a(`border-color`)].join(` `),color:a(`text-color`),backgroundColor:a(`bg-color`),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a(`border-width`),a(`border-style`),a(`border-color-hover`)].join(` `),color:a(`text-color-hover`),backgroundColor:a(`bg-color-hover`)},"&:active":{border:[a(`border-width`),a(`border-style`),a(`border-color-active`)].join(` `),color:a(`text-color-active`),backgroundColor:a(`bg-color-active`)}}},{[`&${t}-variant-solid`]:{[i(`solid-bg-color`)]:a(`color-base`),[i(`solid-bg-color-hover`)]:a(`color-hover`),[i(`solid-bg-color-active`)]:a(`color-active`),[i(`border-color`)]:`transparent`,[i(`text-color`)]:e.colorTextLightSolid,[i(`bg-color`)]:a(`solid-bg-color`),[i(`bg-color-hover`)]:a(`solid-bg-color-hover`),[i(`bg-color-active`)]:a(`solid-bg-color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`border-color`)]:a(`color-base`),[i(`border-color-hover`)]:a(`color-hover`),[i(`border-color-active`)]:a(`color-active`),[i(`bg-color`)]:a(`bg-color-container`),[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-dashed`]:{[i(`border-style`)]:`dashed`,[i(`bg-color-disabled`)]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`bg-color`)]:a(`color-light`),[i(`bg-color-hover`)]:a(`color-light-hover`),[i(`bg-color-active`)]:a(`color-light-active`)},[`&${t}-variant-text, &${t}-variant-link`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),[i(`bg-color`)]:`transparent`,[i(`bg-color-hover`)]:`transparent`,[i(`bg-color-active`)]:`transparent`,[`&:disabled, &${e.componentCls}-disabled`]:{background:`transparent`,borderColor:`transparent`}},[`&${t}-variant-text`]:{[i(`bg-color-hover`)]:a(`color-light`),[i(`bg-color-active`)]:a(`color-light-active`)}},{[`&${t}-variant-link`]:{[i(`color-base`)]:e.colorLink,[i(`color-hover`)]:e.colorLinkHover,[i(`color-active`)]:e.colorLinkActive,[i(`bg-color-hover`)]:e.linkHoverBg},[`&${t}-color-primary`]:{[i(`color-base`)]:e.colorPrimary,[i(`color-hover`)]:e.colorPrimaryHover,[i(`color-active`)]:e.colorPrimaryActive,[i(`color-light`)]:e.colorPrimaryBg,[i(`color-light-hover`)]:e.colorPrimaryBgHover,[i(`color-light-active`)]:e.colorPrimaryBorder,[i(`shadow`)]:e.primaryShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.primaryColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-dangerous`]:{[i(`color-base`)]:e.colorError,[i(`color-hover`)]:e.colorErrorHover,[i(`color-active`)]:e.colorErrorActive,[i(`color-light`)]:e.colorErrorBg,[i(`color-light-hover`)]:e.colorErrorBgFilledHover,[i(`color-light-active`)]:e.colorErrorBgActive,[i(`shadow`)]:e.dangerShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.dangerColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-default`]:{[i(`solid-bg-color`)]:e.colorBgSolid,[i(`solid-bg-color-hover`)]:e.colorBgSolidHover,[i(`solid-bg-color-active`)]:e.colorBgSolidActive,[i(`color-base`)]:e.defaultBorderColor,[i(`color-hover`)]:e.defaultHoverBorderColor,[i(`color-active`)]:e.defaultActiveBorderColor,[i(`color-light`)]:e.colorFillTertiary,[i(`color-light-hover`)]:e.colorFillSecondary,[i(`color-light-active`)]:e.colorFill,[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`shadow`)]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i(`bg-color-disabled`)]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i(`text-color`)]:e.solidTextColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-filled, &${t}-variant-text`]:{[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`bg-color-container`)]:e.defaultBg,[i(`bg-color-hover`)]:e.defaultHoverBg,[i(`bg-color-active`)]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i(`text-color`)]:e.textTextColor,[i(`text-color-hover`)]:e.textTextHoverColor,[i(`text-color-active`)]:e.textTextActiveColor,[i(`bg-color-hover`)]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultGhostColor,[i(`border-color`)]:e.defaultGhostBorderColor}}}},Sc.map(n=>{let r=e[`${n}6`],a=e[`${n}1`],o=e[`${n}Hover`],s=e[`${n}2`],c=e[`${n}3`],l=e[`${n}Active`],u=e[`${n}ShadowColor`];return{[`&${t}-color-${n}`]:{[i(`color-base`)]:r,[i(`color-hover`)]:o,[i(`color-active`)]:l,[i(`color-light`)]:a,[i(`color-light-hover`)]:s,[i(`color-light-active`)]:c,[i(`shadow`)]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:`not-allowed`,borderColor:e.colorBorderDisabled,background:a(`bg-color-disabled`),color:e.colorTextDisabled,boxShadow:`none`}},{[`&${t}-background-ghost`]:{[i(`bg-color`)]:e.ghostBg,[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg,[i(`shadow`)]:`none`,[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg}}}]}},f_=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:s,calc:c}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:s,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:`none`,touchAction:`manipulation`,...gg(),"&:disabled > *":{pointerEvents:`none`},[`${t}-icon > svg`]:Wl(),"> a":{color:`currentColor`},"&:not(:disabled)":ql(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:`0.34em`},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:`-0.34em`,letterSpacing:`0.34em`},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:`none`}},[`&${t}-loading`]:{opacity:i,cursor:`default`},[`${t}-loading-icon`]:{transition:[`width`,`opacity`,`margin`].map(e=>`${e} ${a} ${o}`).join(`,`)},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:`row-reverse`,[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(s).mul(-1).equal()}}}}}},p_=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:`50%`}),m_=(e,t=``)=>{let{componentCls:n,controlHeight:r,fontSize:i,borderRadius:a,buttonPaddingHorizontal:o,iconCls:s,buttonPaddingVertical:c,buttonIconOnlyFontSize:l}=e;return[{[t]:{fontSize:i,height:r,padding:`${Y(c)} ${Y(o)}`,borderRadius:a,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:l}}}},{[`${n}${n}-circle${t}`]:p_(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},oee=e=>m_(dc(e,{fontSize:e.contentFontSize}),e.componentCls),see=e=>m_(dc(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`),cee=e=>m_(dc(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`),lee=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:`100%`}}}},uee=Ql(`Button`,e=>{let t=l_(e);return[f_(t),oee(t),see(t),cee(t),lee(t),d_(t),Mg(t)]},u_,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function dee(e,t,n,r){let{focusElCls:i,focus:a,borderElCls:o}=n,s=o?`> *`:``,c=[`hover`,a?`focus`:null,`active`].filter(Boolean).map(e=>`&:${e} ${s}`).join(`,`);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[c]:{zIndex:3},...i?{[`&${i}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function fee(e,t,n){let{borderElCls:r}=n,i=r?`> ${r}`:``;return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function h_(e,t={focus:!0}){let{componentCls:n}=e,{componentCls:r}=t,i=r||n,a=`${i}-compact`;return{[a]:{...dee(e,a,t,i),...fee(i,a,t)}}}function pee(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function mee(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function hee(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...pee(e,t,e.componentCls),...mee(e.componentCls,t)}}}var gee=e=>{let{antCls:t,componentCls:n,lineWidth:r,calc:i,colorBgContainer:a}=e,o=`${n}-variant-solid:not([disabled])`,s=i(r).mul(-1).equal(),[c,l]=tu(t,`btn`),u=e=>({[`${n}-compact${e?`-vertical`:``}-item`]:{[c(`compact-connect-border-color`)]:l(`bg-color-hover`),[`&${o}`]:{transition:`none`,[`& + ${o}:before`]:[{position:`absolute`,backgroundColor:l(`compact-connect-border-color`),content:`""`},e?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:`none`}}}});return[u(),u(!0),{[`${o}${n}-color-default`]:{[c(`compact-connect-border-color`)]:`color-mix(in srgb, ${l(`bg-color-hover`)} 75%, ${a})`}}]},_ee=eu([`Button`,`compact`],e=>{let t=l_(e);return[h_(t),hee(t),gee(t)]},u_);function vee(e){if(nf(e)){let t=e?.delay;return t=ef(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var yee={default:[`default`,`outlined`],primary:[`primary`,`solid`],dashed:[`default`,`dashed`],link:[`link`,`link`],text:[`default`,`text`]},g_=S.forwardRef((e,t)=>{let{_skipSemantic:n,loading:r=!1,prefixCls:i,color:a,variant:o,type:s,danger:c=!1,shape:l,size:u,disabled:d,className:f,rootClassName:p,children:m,icon:h,iconPosition:g,iconPlacement:_,ghost:v=!1,block:y=!1,htmlType:b=`button`,classNames:x,styles:C,style:w,autoInsertSpace:T,autoFocus:E,...D}=e,O=ki(m),k=s||`default`,{getPrefixCls:A,direction:j,autoInsertSpace:M,className:N,style:P,classNames:F,styles:I,loadingIcon:L,shape:R,color:z,variant:B}=ya(`button`),V=l||R||`default`,[H,U]=(0,S.useMemo)(()=>{if(a&&o)return[a,o];if(s||c){let e=yee[k]||[];return c?[`danger`,e[1]]:e}return z&&B?[z,B]:[`default`,`outlined`]},[a,o,s,c,z,B,k]),[ee,W]=(0,S.useMemo)(()=>v&&U===`solid`?[H,`outlined`]:[H,U],[H,U,v]),te=ee===`danger`,G=te?`dangerous`:ee,ne=T??M??!0,K=A(`btn`,i),[re,ie]=uee(K),ae=(0,S.useContext)(mm),q=d??ae,oe=(0,S.useContext)(Nh),se=(0,S.useMemo)(()=>vee(r),[r]),[ce,le]=(0,S.useState)(se.loading),[ue,de]=(0,S.useState)(!1),fe=(0,S.useRef)(null),pe=lr(t,fe),me=O.length===1&&!h&&!Rh(W),he=(0,S.useRef)(!0);S.useEffect(()=>(he.current=!1,()=>{he.current=!0}),[]),Hn(()=>{let e=null;se.delay>0?e=setTimeout(()=>{e=null,le(!0)},se.delay):le(se.loading);function t(){e&&=(clearTimeout(e),null)}return t},[se.delay,se.loading]),(0,S.useEffect)(()=>{if(!fe.current||!ne)return;let e=fe.current.textContent||``;me&&Ih(e)?ue||de(!0):ue&&de(!1)}),(0,S.useEffect)(()=>{E&&fe.current&&fe.current.focus()},[]);let ge=S.useCallback(t=>{if(ce||q){t.preventDefault();return}e.onClick?.((`href`in e,t))},[e.onClick,ce,q]),{compactSize:_e,compactItemClassnames:ve}=kh(K,j),ye=Eh(e=>u??_e??oe??e),be=ce?`loading`:h,xe=_??g??`start`,Se=gi(D,[`navigate`]),Ce={...e,type:k,color:ee,variant:W,danger:te,shape:V,size:ye,disabled:q,loading:ce,iconPlacement:xe},[we,Te]=Cf([n?void 0:F,x],[n?void 0:I,C],{props:Ce}),Ee=J(K,re,ie,{[`${K}-${V}`]:V!==`default`&&V!==`square`&&V,[`${K}-${k}`]:k,[`${K}-dangerous`]:c,[`${K}-color-${G}`]:G,[`${K}-variant-${W}`]:W,[`${K}-lg`]:ye===`large`,[`${K}-sm`]:ye===`small`,[`${K}-icon-only`]:!m&&m!==0&&!!be,[`${K}-background-ghost`]:v&&!Rh(W),[`${K}-loading`]:ce,[`${K}-two-chinese-chars`]:ue&&ne&&!ce,[`${K}-block`]:y,[`${K}-rtl`]:j===`rtl`,[`${K}-icon-end`]:xe===`end`},ve,f,p,N,we.root),De={...Te.root,...P,...w},Oe={className:we.icon,style:Te.icon},ke=e=>S.createElement(Vh,{prefixCls:K,...Oe},e),Ae=S.createElement(Gh,{existIcon:!!h,prefixCls:K,loading:ce,mount:he.current,...Oe}),je=nf(r)&&r.icon||L,Me;Me=h&&!ce?ke(h):r&&je?ke(je):Ae;let Ne=$d(m)?Bh(m,me&&ne,Te.content,we.content):null;if(Se.href!==void 0)return S.createElement(`a`,{...Se,className:J(Ee,{[`${K}-disabled`]:q}),href:q?void 0:Se.href,style:De,onClick:ge,ref:pe,tabIndex:q?-1:0,"aria-disabled":q},Me,Ne);let Pe=S.createElement(`button`,{...D,type:b,className:Ee,style:De,onClick:ge,disabled:q,ref:pe},Me,Ne,ve&&S.createElement(_ee,{prefixCls:K}));return Rh(W)||(Pe=S.createElement(Th,{component:`Button`,disabled:ce},Pe)),Pe});g_.Group=Ph,g_.__ANT_BUTTON=!0;var __=e=>{let{type:t,children:n,prefixCls:r,buttonProps:i,close:a,autoFocus:o,emitEvent:s,isSilent:c,quitOnNullishReturnValue:l,actionFn:u}=e,d=S.useRef(!1),f=S.useRef(null),[p,m]=Wn(!1),h=(...e)=>{a?.(...e)};S.useEffect(()=>{let e=null;return o&&(e=setTimeout(()=>{f.current?.focus({preventScroll:!0})})),()=>{e&&clearTimeout(e)}},[o]);let g=e=>{af(e)&&(m(!0),e.then((...e)=>{m(!1,!0),h.apply(void 0,e),d.current=!1},e=>{if(m(!1,!0),d.current=!1,!c?.())return Promise.reject(e)}))},_=e=>{if(d.current)return;if(d.current=!0,!u){h();return}let t;if(s){if(t=u(e),l&&!af(t)){d.current=!1,h(e);return}}else if(u.length)t=u(a),d.current=!1;else if(t=u(),!af(t)){h();return}g(t)};return S.createElement(g_,{...Lh(t),onClick:_,loading:p,prefixCls:r,...i,ref:f},n)},v_=S.createContext({}),{Provider:y_}=v_,b_=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:a,close:o,onCancel:s,onConfirm:c,onClose:l}=(0,S.useContext)(v_);return i?S.createElement(__,{isSilent:r,actionFn:s,close:(...e)=>{o?.(...e),c?.(!1),l?.()},autoFocus:e===`cancel`,buttonProps:t,prefixCls:`${a}-btn`},n):null},x_=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:a,okType:o,onConfirm:s,onOk:c,onClose:l}=(0,S.useContext)(v_);return S.createElement(__,{isSilent:n,type:o||`primary`,actionFn:c,close:(...e)=>{t?.(...e),s?.(!0),l?.()},autoFocus:e===`ok`,buttonProps:r,prefixCls:`${i}-btn`},a)},S_=S.createContext({});function C_(e,t,n){let r=t;return!r&&n&&(r=`${e}-${n}`),r}function w_(e,t){let n=e[`page${t?`Y`:`X`}Offset`],r=`scroll${t?`Top`:`Left`}`;if(typeof n!=`number`){let t=e.document;n=t.documentElement[r],typeof n!=`number`&&(n=t.body[r])}return n}function bee(e){let t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=w_(i),n.top+=w_(i,!0),n}var xee=S.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function T_(){return T_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,className:r,style:i,title:a,ariaId:o,footer:s,closable:c,closeIcon:l,onClose:u,children:d,bodyStyle:f,bodyProps:p,modalRender:m,onMouseDown:h,onMouseUp:g,holderRef:_,visible:v,forceRender:y,width:b,height:x,classNames:C,styles:w,isFixedPos:T,focusTrap:E}=e,{panel:D}=S.useContext(S_),O=(0,S.useRef)(null),k=lr(_,D,O),[A]=Gr(v&&T&&E!==!1,()=>O.current);S.useImperativeHandle(t,()=>({focus:()=>{O.current?.focus({preventScroll:!0})}}));let j={};b!==void 0&&(j.width=b),x!==void 0&&(j.height=x);let M=s?S.createElement(`div`,{className:J(`${n}-footer`,C?.footer),style:{...w?.footer}},s):null,N=a?S.createElement(`div`,{className:J(`${n}-header`,C?.header),style:{...w?.header}},S.createElement(`div`,{className:J(`${n}-title`,C?.title),id:o,style:{...w?.title}},a)):null,P=(0,S.useMemo)(()=>typeof c==`object`&&c?c:c?{closeIcon:l??S.createElement(`span`,{className:`${n}-close-x`})}:{},[c,l,n]),F=xi(P,!0),I=typeof c==`object`&&c.disabled,L=c?S.createElement(`button`,T_({type:`button`,onClick:u,"aria-label":`Close`},F,{className:`${n}-close`,disabled:I}),P.closeIcon):null,R=S.createElement(`div`,{className:J(`${n}-container`,C?.container),style:w?.container},L,N,S.createElement(`div`,T_({className:J(`${n}-body`,C?.body),style:{...f,...w?.body}},p),d),M);return S.createElement(`div`,{key:`dialog-element`,role:`dialog`,"aria-labelledby":a?o:null,"aria-modal":`true`,ref:k,style:{...i,...j},className:J(n,r),onMouseDown:h,onMouseUp:g,tabIndex:-1,onFocus:e=>{A(e.target)}},S.createElement(xee,{shouldUpdate:v||y},m?m(R):R))});function D_(){return D_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,title:r,style:i,className:a,visible:o,forceRender:s,destroyOnHidden:c,motionName:l,ariaId:u,onVisibleChanged:d,mousePosition:f}=e,p=(0,S.useRef)(null),m=(0,S.useRef)(null);S.useImperativeHandle(t,()=>({...m.current,inMotion:p.current.inMotion,enableMotion:p.current.enableMotion}));let[h,g]=S.useState(),_={};h&&(_.transformOrigin=h);function v(){if(!p.current?.nativeElement)return;let e=bee(p.current.nativeElement);g(f&&(f.x||f.y)?`${f.x-e.left}px ${f.y-e.top}px`:``)}return S.createElement(Od,{visible:o,onVisibleChanged:d,onAppearPrepare:v,onEnterPrepare:v,forceRender:s,motionName:l,removeOnLeave:c,ref:p},({className:t,style:o},s)=>S.createElement(E_,D_({},e,{ref:m,title:r,ariaId:u,prefixCls:n,holderRef:s,style:{...o,...i,..._},className:J(a,t)})))});function O_(){return O_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,style:n,visible:r,maskProps:i,motionName:a,className:o}=e;return S.createElement(Od,{key:`mask`,visible:r,motionName:a,leavedClassName:`${t}-mask-hidden`},({className:e,style:r},a)=>S.createElement(`div`,O_({ref:a,style:{...r,...n},className:J(`${t}-mask`,e,o)},i)))};function A_(){return A_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-dialog`,zIndex:n,visible:r=!1,focusTriggerAfterClose:i=!0,wrapStyle:a,wrapClassName:o,wrapProps:s,onClose:c,afterOpenChange:l,afterClose:u,transitionName:d,animation:f,closable:p=!0,mask:m=!0,maskTransitionName:h,maskAnimation:g,maskClosable:_=!0,maskStyle:v,maskProps:y,rootClassName:b,rootStyle:x,classNames:C,styles:w}=e,T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),[O,k]=S.useState(r),[A,j]=S.useState(!1),M=Xn();function N(){mr(E.current,document.activeElement)||(T.current=document.activeElement)}function P(){mr(E.current,document.activeElement)||D.current?.focus()}function F(){if(k(!1),m&&T.current&&i){try{T.current.focus({preventScroll:!0})}catch{}T.current=null}O&&u?.()}function I(e){e?P():F(),l?.(e)}function L(e){c?.(e)}let R=(0,S.useRef)(!1),z=null;_&&(z=e=>{E.current===e.target&&R.current&&L(e)});function B(e){R.current=e.target===E.current}(0,S.useEffect)(()=>{r?(R.current=!1,k(!0),N(),E.current&&j(getComputedStyle(E.current).position===`fixed`)):O&&D.current.enableMotion()&&!D.current.inMotion()&&F()},[r]);let V={zIndex:n,...a,...w?.wrapper,display:O?null:`none`};return S.createElement(`div`,A_({className:J(`${t}-root`,b),style:x},xi(e,{data:!0})),S.createElement(k_,{prefixCls:t,visible:m&&r,motionName:C_(t,h,g),style:{zIndex:n,...v,...w?.mask},maskProps:y,className:C?.mask}),S.createElement(`div`,A_({className:J(`${t}-wrap`,o,C?.wrapper),ref:E,onClick:z,onMouseDown:B,style:V},s),S.createElement(See,A_({},e,{isFixedPos:A,ref:D,closable:p,ariaId:M,prefixCls:t,visible:r&&O,onClose:L,onVisibleChanged:I,motionName:C_(t,d,f)}))))};function M_(){return M_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{visible:t,getContainer:n,forceRender:r,destroyOnHidden:i=!1,afterClose:a,closable:o,panelRef:s,keyboard:c=!0,onClose:l}=e,[u,d]=S.useState(t),f=S.useMemo(()=>({panel:s}),[s]);return S.useEffect(()=>{t&&d(!0)},[t]),!r&&i&&!u?null:S.createElement(S_.Provider,{value:f},S.createElement(Dp,{open:t||r||u,onEsc:({top:e,event:t})=>{if(e&&c){t.stopPropagation(),l?.(t);return}},autoDestroy:!1,getContainer:n,autoLock:t||u},S.createElement(j_,M_({},e,{destroyOnHidden:i,afterClose:()=>{let{afterClose:e}=(o&&typeof o==`object`?o:{})||{};e?.(),a?.(),d(!1)}}))))},P_=`RC_FORM_INTERNAL_HOOKS`,F_=()=>{ui(!1,`Can not find FormContext. Please make sure you wrap Field under Form.`)},I_=S.createContext({getFieldValue:F_,getFieldsValue:F_,getFieldError:F_,getFieldWarning:F_,getFieldsError:F_,isFieldsTouched:F_,isFieldTouched:F_,isFieldValidating:F_,isFieldsValidating:F_,resetFields:F_,setFields:F_,setFieldValue:F_,setFieldsValue:F_,validateFields:F_,submit:F_,getInternalHooks:()=>(F_(),{dispatch:F_,initEntityValue:F_,registerField:F_,useSubscribe:F_,setInitialValues:F_,destroyForm:F_,setCallbacks:F_,registerWatch:F_,getFields:F_,setValidateMessages:F_,setPreserve:F_,getInitialValue:F_})}),L_=S.createContext(null);function R_(e){return e==null?[]:Array.isArray(e)?e:[e]}function Cee(e){return e&&!!e._init}function z_(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,tel:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var B_=z_();function V_(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function H_(e,t,n){if(Zs())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Js(i,n.prototype),i}function U_(e){var t=typeof Map==`function`?new Map:void 0;return U_=function(e){if(e===null||!V_(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return H_(e,arguments,Xs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Js(n,e)},U_(e)}var W_=/%[sdj%]/g,G_=function(){};function K_(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function q_(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(W_,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}break;default:return e}}):e}function J_(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`||e===`tel`}function Y_(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||J_(t)&&typeof e==`string`&&!e)}function X_(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,pa(e||[])),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function Z_(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length){n(o);return}var s=r;r+=1,se.max?r.push(q_(i.messages[u].max,e.fullField,e.max)):o&&s&&(le.max)&&r.push(q_(i.messages[u].range,e.fullField,e.min,e.max))},ov=function(e,t,n,r,i,a){e.required&&(!n.hasOwnProperty(e.field)||Y_(t,a||e.type))&&r.push(q_(i.messages.required,e.fullField))},sv,Dee=(function(){if(sv)return sv;var e=`[a-fA-F\\d:]`,t=function(t){return t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|\$))`:``},n=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}`,r=`[a-fA-F\\d]{1,4}`,i=`(?:${[`(?:${r}:){7}(?:${r}|:)`,`(?:${r}:){6}(?:${n}|:${r}|:)`,`(?:${r}:){5}(?::${n}|(?::${r}){1,2}|:)`,`(?:${r}:){4}(?:(?::${r}){0,1}:${n}|(?::${r}){1,3}|:)`,`(?:${r}:){3}(?:(?::${r}){0,2}:${n}|(?::${r}){1,4}|:)`,`(?:${r}:){2}(?:(?::${r}){0,3}:${n}|(?::${r}){1,5}|:)`,`(?:${r}:){1}(?:(?::${r}){0,4}:${n}|(?::${r}){1,6}|:)`,`(?::(?:(?::${r}){0,5}:${n}|(?::${r}){1,7}|:))`].join(`|`)})(?:%[0-9a-zA-Z]{1,})?`,a=RegExp(`(?:^${n}\$)|(?:^${i}\$)`),o=RegExp(`^${n}\$`),s=RegExp(`^${i}\$`),c=function(e){return e&&e.exact?a:RegExp(`(?:${t(e)}${n}${t(e)})|(?:${t(e)}${i}${t(e)})`,`g`)};c.v4=function(e){return e&&e.exact?o:RegExp(`${t(e)}${n}${t(e)}`,`g`)},c.v6=function(e){return e&&e.exact?s:RegExp(`${t(e)}${i}${t(e)}`,`g`)};var l=`(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${c.v4().source}|${c.v6().source}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return sv=RegExp(`(?:^${l}\$)`,`i`),sv}),cv={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},lv={integer:function(e){return lv.number(e)&&parseInt(e,10)===e},float:function(e){return lv.number(e)&&!lv.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime==`function`&&typeof e.getMonth==`function`&&typeof e.getYear==`function`&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e==`number`},object:function(e){return Ps(e)===`object`&&!lv.array(e)},method:function(e){return typeof e==`function`},email:function(e){return typeof e==`string`&&e.length<=320&&!!e.match(cv.email)},tel:function(e){return typeof e==`string`&&e.length<=32&&!!e.match(cv.tel)},url:function(e){return typeof e==`string`&&e.length<=2048&&!!e.match(Dee())},hex:function(e){return typeof e==`string`&&!!e.match(cv.hex)}},uv={required:ov,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||t===``)&&r.push(q_(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&t===void 0){ov(e,t,n,r,i);return}var a=[`integer`,`float`,`array`,`regexp`,`object`,`method`,`email`,`tel`,`number`,`date`,`url`,`hex`],o=e.type;a.indexOf(o)>-1?lv[o](t)||r.push(q_(i.messages.types[o],e.fullField,e.type)):o&&Ps(t)!==e.type&&r.push(q_(i.messages.types[o],e.fullField,e.type))},range:Eee,enum:wee,pattern:Tee},Oee=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();uv.required(e,t,r,a,i)}n(a)},kee=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();uv.required(e,t,r,a,i,`array`),t!=null&&(uv.type(e,t,r,a,i),uv.range(e,t,r,a,i))}n(a)},dv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();uv.required(e,t,r,a,i),t!==void 0&&uv.type(e,t,r,a,i)}n(a)},fv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,`date`)&&!e.required)return n();if(uv.required(e,t,r,a,i),!Y_(t,`date`)){var o=t instanceof Date?t:new Date(t);uv.type(e,o,r,a,i),o&&uv.range(e,o.getTime(),r,a,i)}}n(a)},pv=`enum`,mv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();uv.required(e,t,r,a,i),t!==void 0&&uv[pv](e,t,r,a,i)}n(a)},hv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();uv.required(e,t,r,a,i),t!==void 0&&(uv.type(e,t,r,a,i),uv.range(e,t,r,a,i))}n(a)},gv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();uv.required(e,t,r,a,i),t!==void 0&&(uv.type(e,t,r,a,i),uv.range(e,t,r,a,i))}n(a)},_v=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();uv.required(e,t,r,a,i),t!==void 0&&uv.type(e,t,r,a,i)}n(a)},vv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===``&&(t=void 0),Y_(t)&&!e.required)return n();uv.required(e,t,r,a,i),t!==void 0&&(uv.type(e,t,r,a,i),uv.range(e,t,r,a,i))}n(a)},yv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();uv.required(e,t,r,a,i),t!==void 0&&uv.type(e,t,r,a,i)}n(a)},bv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,`string`)&&!e.required)return n();uv.required(e,t,r,a,i),Y_(t,`string`)||uv.pattern(e,t,r,a,i)}n(a)},xv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t)&&!e.required)return n();uv.required(e,t,r,a,i),Y_(t)||uv.type(e,t,r,a,i)}n(a)},Sv=function(e,t,n,r,i){var a=[],o=Array.isArray(t)?`array`:Ps(t);uv.required(e,t,r,a,i,o),n(a)},Cv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,`string`)&&!e.required)return n();uv.required(e,t,r,a,i,`string`),Y_(t,`string`)||(uv.type(e,t,r,a,i),uv.range(e,t,r,a,i),uv.pattern(e,t,r,a,i),e.whitespace===!0&&uv.whitespace(e,t,r,a,i))}n(a)},wv=function(e,t,n,r,i){var a=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Y_(t,a)&&!e.required)return n();uv.required(e,t,r,o,i,a),Y_(t,a)||uv.type(e,t,r,o,i)}n(o)},Tv={string:Cv,method:_v,number:vv,boolean:dv,regexp:xv,integer:gv,float:hv,array:kee,object:yv,enum:mv,pattern:bv,date:fv,url:wv,hex:wv,email:wv,tel:wv,required:Sv,any:Oee},Ev=function(){function e(t){Ws(this,e),Vs(this,`rules`,null),Vs(this,`_messages`,B_),this.define(t)}return Ks(e,[{key:`define`,value:function(e){var t=this;if(!e)throw Error(`Cannot configure a schema with no rules`);if(Ps(e)!==`object`||Array.isArray(e))throw Error(`Rules must be an object`);this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})}},{key:`messages`,value:function(e){return e&&(this._messages=iv(z_(),e)),this._messages}},{key:`validate`,value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=t,o=r,s=i;if(typeof o==`function`&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);function c(e){var t=[],n={};function r(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,pa(e))}else t.push(e)}for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:[],l=Array.isArray(c)?c:[c];!o.suppressWarning&&l.length&&e.warning(`async-validator:`,l),l.length&&r.message!==void 0&&r.message!==null&&(l=[].concat(r.message));var u=l.map(rv(r,a));if(o.first&&u.length)return d[r.field]=1,n(u);if(!i)n(u);else{if(r.required&&!t.value)return r.message===void 0?o.error&&(u=[o.error(r,q_(o.messages.required,r.field))]):u=[].concat(r.message).map(rv(r,a)),n(u);var f={};r.defaultField&&Object.keys(t.value).map(function(e){f[e]=r.defaultField}),f=Us(Us({},f),t.rule.fields);var p={};Object.keys(f).forEach(function(e){var t=f[e];p[e]=(Array.isArray(t)?t:[t]).map(s.bind(null,e))});var m=new e(p);m.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),m.validate(t.value,t.rule.options||o,function(e){var t=[];u&&u.length&&t.push.apply(t,pa(u)),e&&e.length&&t.push.apply(t,pa(e)),n(t.length?t:null)})}}var l;if(r.asyncValidator)l=r.asyncValidator(r,t.value,c,t.source,o);else if(r.validator){try{l=r.validator(r,t.value,c,t.source,o)}catch(e){var u,f;(u=(f=console).error)==null||u.call(f,e),o.suppressValidatorError||setTimeout(function(){throw e},0),c(e.message)}l===!0?c():l===!1?c(typeof r.message==`function`?r.message(r.fullField||r.field):r.message||`${r.fullField||r.field} fails`):l instanceof Array?c(l):l instanceof Error&&c(l.message)}l&&l.then&&l.then(function(){return c()},function(e){return c(e)})},function(e){c(e)},a)}},{key:`getType`,value:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type=`pattern`),typeof e.validator!=`function`&&e.type&&!Tv.hasOwnProperty(e.type))throw Error(q_(`Unknown rule type %s`,e.type));return e.type||`string`}},{key:`getValidationMethod`,value:function(e){if(typeof e.validator==`function`)return e.validator;var t=Object.keys(e),n=t.indexOf(`message`);return n!==-1&&t.splice(n,1),t.length===1&&t[0]===`required`?Tv.required:Tv[this.getType(e)]||void 0}}]),e}();Vs(Ev,`register`,function(e,t){if(typeof t!=`function`)throw Error(`Cannot register a validator by type, validator is not a function`);Tv[e]=t}),Vs(Ev,`warning`,G_),Vs(Ev,`messages`,B_),Vs(Ev,`validators`,Tv);var Dv="'${name}' is not a valid ${type}",Ov={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Dv,method:Dv,array:Dv,object:Dv,number:Dv,date:Dv,boolean:Dv,integer:Dv,float:Dv,regexp:Dv,email:Dv,tel:Dv,url:Dv,hex:Dv},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},kv=Ev;function Av(e,t){return e.replace(/\\?\$\{\w+\}/g,e=>e.startsWith(`\\`)?e.slice(1):t[e.slice(2,-1)])}var jv=`CODE_LOGIC_ERROR`;async function Mv(e,t,n,r,i){let a={...n};if(delete a.ruleIndex,kv.warning=()=>void 0,a.validator){let e=a.validator;a.validator=(...t)=>{try{return e(...t)}catch(e){return console.error(e),Promise.reject(jv)}}}let o=null;a&&a.type===`array`&&a.defaultField&&(o=a.defaultField,delete a.defaultField);let s=new kv({[e]:[a]}),c=Li(Ov,r.validateMessages);s.messages(c);let l=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(e){e.errors&&(l=e.errors.map(({message:e},t)=>{let n=e===jv?c.default:e;return S.isValidElement(n)?S.cloneElement(n,{key:`error_${t}`}):n}))}if(!l.length&&o&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((t,n)=>Mv(`${e}.${n}`,t,o,r,i)))).reduce((e,t)=>[...e,...t],[]);let u={...n,name:e,enum:(n.enum||[]).join(`, `),...i};return l.map(e=>typeof e==`string`?Av(e,u):e)}function Nv(e,t,n,r,i,a){let o=e.join(`.`),s=n.map((e,t)=>{let n=e.validator,r={...e,ruleIndex:t};return n&&(r.validator=(e,t,r)=>{let i=!1,a=n(e,t,(...e)=>{Promise.resolve().then(()=>{ui(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||r(...e)})});i=a&&typeof a.then==`function`&&typeof a.catch==`function`,ui(i,"`callback` is deprecated. Please return a promise instead."),i&&a.then(()=>{r()}).catch(e=>{r(e||` `)})}),r}).sort(({warningOnly:e,ruleIndex:t},{warningOnly:n,ruleIndex:r})=>!!e==!!n?t-r:e?1:-1),c;if(i===!0)c=new Promise(async(e,n)=>{for(let e=0;eMv(o,t,e,r,a).then(t=>({errors:t,rule:e})));c=(i?Fv(e):Pv(e)).then(e=>Promise.reject(e))}return c.catch(e=>e),c}async function Pv(e){return Promise.all(e).then(e=>[].concat(...e))}async function Fv(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})}function Iv(e){return R_(e)}function Lv(e,t){let n={};return t.forEach(t=>{let r=Ai(e,t);n=Mi(n,t,r)}),n}function Rv(e,t,n=!1){return e&&e.some(e=>zv(t,e,n))}function zv(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((t,n)=>e[n]===t)}function Bv(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(n=>{let r=e[n],i=t[n];return typeof r==`function`&&typeof i==`function`?!0:r===i})}function Vv(e,...t){let n=t[0];return n&&n.target&&typeof n.target==`object`&&e in n.target?n.target[e]:n}function Hv(e,t,n){let{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;let i=e[t],a=t-n;return a>0?[...e.slice(0,n),i,...e.slice(n,t),...e.slice(t+1,r)]:a<0?[...e.slice(0,t),...e.slice(t+1,n+1),i,...e.slice(n+1,r)]:e}var Uv=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Wv=class{namePathList=[];taskId=0;watcherList=new Set;form;constructor(e){this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(e=>{this.namePathList.every(t=>!zv(t,e))&&this.namePathList.push(e)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;Uv(()=>{if(e===this.taskId&&this.watcherList.size){let e=this.form.getForm(),t=e.getFieldsValue(),n=e.getFieldsValue(!0);this.watcherList.forEach(e=>{e(t,n,this.namePathList)}),this.namePathList=[]}})}};async function Gv(){return new Promise(e=>{Uv(()=>{Oi(()=>{e()})})})}function Kv(){return Kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{preserve:e,isListField:t,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(t,e,Iv(n)),this.cancelRegisterFunc=null};getNamePath=()=>{let{name:e,fieldContext:t}=this.props,{prefixName:n=[]}=t;return e===void 0?[]:[...n,...e]};getRules=()=>{let{rules:e=[],fieldContext:t}=this.props;return e.map(e=>typeof e==`function`?e(t):e)};reRender(){this.mounted&&this.forceUpdate()}refresh=()=>{this.mounted&&this.setState(({resetCount:e})=>({resetCount:e+1}))};metaCache=null;triggerMetaEvent=e=>{let{onMetaChange:t}=this.props;if(t){let n={...this.getMeta(),destroy:e};fi(this.metaCache,n)||t(n),this.metaCache=n}else this.metaCache=null};onStoreChange=(e,t,n)=>{let{shouldUpdate:r,dependencies:i=[],onReset:a}=this.props,{store:o}=n,s=this.getNamePath(),c=this.getValue(e),l=this.getValue(o),u=t&&Rv(t,s);switch(n.type===`valueUpdate`&&n.source===`external`&&!fi(c,l)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=qv,this.warnings=Jv,this.triggerMetaEvent()),n.type){case`reset`:if(!t||u){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=qv,this.warnings=Jv,this.triggerMetaEvent(),a?.(),this.refresh();return}break;case`remove`:if(r&&Yv(r,e,o,c,l,n)){this.reRender();return}break;case`setField`:{let{data:i}=n;if(u){`touched`in i&&(this.touched=i.touched),`validating`in i&&!(`originRCField`in i)&&(this.validatePromise=i.validating?Promise.resolve([]):null),`errors`in i&&(this.errors=i.errors||qv),`warnings`in i&&(this.warnings=i.warnings||Jv),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if(`value`in i&&Rv(t,s,!0)){this.reRender();return}if(r&&!s.length&&Yv(r,e,o,c,l,n)){this.reRender();return}break}case`dependenciesUpdate`:if(i.map(Iv).some(e=>Rv(n.relatedFields,e))){this.reRender();return}break;default:if(u||(!i.length||s.length||r)&&Yv(r,e,o,c,l,n)){this.reRender();return}break}r===!0&&this.reRender()};validateRules=e=>{let t=this.getNamePath(),n=this.getValue(),{triggerName:r,validateOnly:i=!1,delayFrame:a}=e||{},o=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:i=!1,messageVariables:s,validateDebounce:c}=this.props;a&&await Gv();let l=this.getRules();if(r&&(l=l.filter(e=>e).filter(e=>{let{validateTrigger:t}=e;return t?R_(t).includes(r):!0})),c&&r&&(await new Promise(e=>{setTimeout(e,c)}),this.validatePromise!==o))return[];let u=Nv(t,n,l,e,i,s);return u.catch(e=>e).then((e=qv)=>{if(this.validatePromise===o){this.validatePromise=null;let t=[],n=[];e.forEach?.(({rule:{warningOnly:e},errors:r=qv})=>{e?n.push(...r):t.push(...r)}),this.errors=t,this.warnings=n,this.triggerMetaEvent(),this.reRender()}}),u});return i?o:(this.validatePromise=o,this.dirty=!0,this.errors=qv,this.warnings=Jv,this.triggerMetaEvent(),this.reRender(),o)};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:e}=this.props,{getInitialValue:t}=e.getInternalHooks(P_);return t(this.getNamePath())!==void 0};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null});getOnlyChild=e=>{if(typeof e==`function`){let t=this.getMeta();return{...this.getOnlyChild(e(this.getControlled(),t,this.props.fieldContext)),isFunction:!0}}let t=ki(e);return t.length!==1||!S.isValidElement(t[0])?{child:t,isFunction:!1}:{child:t[0],isFunction:!1}};getValue=e=>{let{getFieldsValue:t}=this.props.fieldContext,n=this.getNamePath();return Ai(e||t(!0),n)};getControlled=(e={})=>{let{name:t,trigger:n=`onChange`,validateTrigger:r,getValueFromEvent:i,normalize:a,valuePropName:o=`value`,getValueProps:s,fieldContext:c}=this.props,l=r===void 0?c.validateTrigger:r,u=this.getNamePath(),{getInternalHooks:d,getFieldsValue:f}=c,{dispatch:p}=d(P_),m=this.getValue(),h=s||(e=>({[o]:e})),g=e[n],_=t===void 0?{}:h(m),v={...e,..._};return v[n]=(...e)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let t;t=i?i(...e):Vv(o,...e),a&&(t=a(t,m,f(!0))),t!==m&&p({type:`updateValue`,namePath:u,value:t}),g&&g(...e)},R_(l||[]).forEach(e=>{let t=v[e];v[e]=(...n)=>{t&&t(...n);let{rules:r}=this.props;r&&r.length&&p({type:`validateField`,namePath:u,triggerName:e})}}),v};render(){let{resetCount:e}=this.state,{children:t}=this.props,{child:n,isFunction:r}=this.getOnlyChild(t),i;return r?i=n:S.isValidElement(n)?i=S.cloneElement(n,this.getControlled(n.props)):(ui(!n,"`children` of Field is not validate ReactElement."),i=n),S.createElement(S.Fragment,{key:e},i)}};function Zv({name:e,...t}){let n=S.useContext(I_),r=S.useContext(L_),i=e===void 0?void 0:Iv(e),a=t.isListField??!!r,o=`keep`;return a||(o=`_${(i||[]).join(`_`)}`),S.createElement(Xv,Kv({key:o,name:i,isListField:a},t,{fieldContext:n}))}function Qv({name:e,initialValue:t,children:n,rules:r,validateTrigger:i,isListField:a}){let o=S.useContext(I_),s=S.useContext(L_),c=S.useRef({keys:[],id:0}).current,l=S.useMemo(()=>[...Iv(o.prefixName)||[],...Iv(e)],[o.prefixName,e]),u=S.useMemo(()=>({...o,prefixName:l}),[o,l]),d=S.useMemo(()=>({getKey:e=>{let t=l.length,n=e[t];return[c.keys[n],e.slice(t+1)]}}),[c,l]);return typeof n==`function`?S.createElement(L_.Provider,{value:d},S.createElement(I_.Provider,{value:u},S.createElement(Zv,{name:[],shouldUpdate:(e,t,{source:n})=>n===`internal`?!1:e!==t,rules:r,validateTrigger:i,initialValue:t,isList:!0,isListField:a??!!s},({value:e=[],onChange:t},r)=>{let{getFieldValue:i}=o,a=()=>i(l||[])||[],s={add:(e,n)=>{let r=a();n>=0&&n<=r.length?(c.keys=[...c.keys.slice(0,n),c.id,...c.keys.slice(n)],t([...r.slice(0,n),e,...r.slice(n)])):(c.keys=[...c.keys,c.id],t([...r,e])),c.id+=1},remove:e=>{let n=a(),r=new Set(Array.isArray(e)?e:[e]);r.size<=0||(c.keys=c.keys.filter((e,t)=>!r.has(t)),t(n.filter((e,t)=>!r.has(t))))},move(e,n){if(e===n)return;let r=a();e<0||e>=r.length||n<0||n>=r.length||(c.keys=Hv(c.keys,e,n),t(Hv(r,e,n)))}},u=e||[];return Array.isArray(u)||(u=[]),n(u.map((e,t)=>{let n=c.keys[t];return n===void 0&&(c.keys[t]=c.id,n=c.keys[t],c.id+=1),{name:t,key:n,isListField:!0}}),s,r)}))):(ui(!1,`Form.List only accepts function as children.`),null)}function $v(e){let t=!1,n=e.length,r=[];return e.length?new Promise((i,a)=>{e.forEach((e,o)=>{e.catch(e=>(t=!0,e)).then(e=>{--n,r[o]=e,!(n>0)&&(t&&a(r),i(r))})})}):Promise.resolve([])}var ey=`__@field_split__`;function ty(e){return e.map(e=>`${typeof e}:${e}`).join(ey)}var ny=class{kvs=new Map;set(e,t){this.kvs.set(ty(e),t)}get(e){return this.kvs.get(ty(e))}getAsPrefix(e){let t=ty(e),n=t+ey,r=[],i=this.kvs.get(t);return i!==void 0&&r.push(i),this.kvs.forEach((e,t)=>{t.startsWith(n)&&r.push(e)}),r}update(e,t){let n=t(this.get(e));n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete(ty(e))}map(e){return[...this.kvs.entries()].map(([t,n])=>e({key:t.split(ey).map(e=>{let[,t,n]=e.match(/^([^:]*):(.*)$/);return t===`number`?Number(n):n}),value:n}))}toJSON(){let e={};return this.map(({key:t,value:n})=>(e[t.join(`.`)]=n,null)),e}},ry=class{formHooked=!1;forceRootUpdate;subscribable=!0;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new Wv(this);constructor(e){this.forceRootUpdate=e}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks});getInternalHooks=e=>e===`RC_FORM_INTERNAL_HOOKS`?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(ui(!1,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=e=>{this.subscribable=e};prevWithoutPreserves=null;setInitialValues=(e,t)=>{if(this.initialValues=e||{},t){let t=Li(e,this.store);this.prevWithoutPreserves?.map(({key:n})=>{t=Mi(t,n,Ai(e,n))}),this.prevWithoutPreserves=null,this.updateStore(t)}};destroyForm=e=>{if(e)this.updateStore({});else{let e=new ny;this.getFieldEntities(!0).forEach(t=>{this.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)}),this.prevWithoutPreserves=e}};getInitialValue=e=>{let t=Ai(this.initialValues,e);return e.length?Li(t):t};setCallbacks=e=>{this.callbacks=e};setValidateMessages=e=>{this.validateMessages=e};setPreserve=e=>{this.preserve=e};registerWatch=e=>this.watcherCenter.register(e);notifyWatch=(e=[])=>{this.watcherCenter.notify(e)};timeoutId=null;warningUnhooked=()=>{};updateStore=e=>{this.store=e};getFieldEntities=(e=!1)=>e?this.fieldEntities.filter(e=>e.getNamePath().length):this.fieldEntities;getFieldsMap=(e=!1)=>{let t=new ny;return this.getFieldEntities(e).forEach(e=>{let n=e.getNamePath();t.set(n,e)}),t};getFieldEntitiesForNamePathList=(e,t=!1)=>{if(!e)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return t?e.flatMap(e=>{let t=Iv(e),r=n.getAsPrefix(t);return r.length?r:[{INVALIDATE_NAME_PATH:t}]}):e.map(e=>{let t=Iv(e);return n.get(t)||{INVALIDATE_NAME_PATH:Iv(e)}})};getFieldsValue=(e,t)=>{this.warningUnhooked();let n,r;if(e===!0||Array.isArray(e)?(n=e,r=t):e&&typeof e==`object`&&(r=e.filter),n===!0&&!r)return this.store;let i=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),a=[],o=[];i.forEach(e=>{let t=e.INVALIDATE_NAME_PATH||e.getNamePath();if(e.isList?.()){o.push(t);return}if(!r)a.push(t);else{let n=`getMeta`in e?e.getMeta():null;r(n)&&a.push(t)}});let s=Lv(this.store,a.map(Iv));return o.forEach(e=>{Ai(s,e)||(s=Mi(s,e,[]))}),s};getFieldValue=e=>{this.warningUnhooked();let t=Iv(e);return Ai(this.store,t)};getFieldsError=e=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(e).map((t,n)=>t&&!t.INVALIDATE_NAME_PATH?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:Iv(e[n]),errors:[],warnings:[]}));getFieldError=e=>{this.warningUnhooked();let t=Iv(e);return this.getFieldsError([t])[0].errors};getFieldWarning=e=>{this.warningUnhooked();let t=Iv(e);return this.getFieldsError([t])[0].warnings};isFieldsTouched=(...e)=>{this.warningUnhooked();let[t,n]=e,r,i=!1;e.length===0?r=null:e.length===1?Array.isArray(t)?(r=t.map(Iv),i=!1):(r=null,i=t):(r=t.map(Iv),i=n);let a=this.getFieldEntities(!0),o=e=>e.isFieldTouched();if(!r)return i?a.every(e=>o(e)||e.isList()):a.some(o);let s=new ny;r.forEach(e=>{s.set(e,[])}),a.forEach(e=>{let t=e.getNamePath();r.forEach(n=>{n.every((e,n)=>t[n]===e)&&s.update(n,t=>[...t,e])})});let c=e=>e.some(o),l=s.map(({value:e})=>e);return i?l.every(c):l.some(c)};isFieldTouched=e=>(this.warningUnhooked(),this.isFieldsTouched([e]));isFieldsValidating=e=>{this.warningUnhooked();let t=this.getFieldEntities();if(!e)return t.some(e=>e.isFieldValidating());let n=e.map(Iv);return t.some(e=>Rv(n,e.getNamePath())&&e.isFieldValidating())};isFieldValidating=e=>(this.warningUnhooked(),this.isFieldsValidating([e]));resetWithFieldInitialValue=(e={})=>{let t=new ny,n=this.getFieldEntities(!0);n.forEach(e=>{let{initialValue:n}=e.props,r=e.getNamePath();if(n!==void 0){let i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}});let r=n=>{n.forEach(n=>{let{initialValue:r}=n.props;if(r!==void 0){let r=n.getNamePath();if(this.getInitialValue(r)!==void 0)ui(!1,`Form already set 'initialValues' with path '${r.join(`.`)}'. Field can not overwrite it.`);else{let i=t.get(r);if(i&&i.size>1)ui(!1,`Multiple Field with path '${r.join(`.`)}' set 'initialValue'. Can not decide which one to pick.`);else if(i){let t=this.getFieldValue(r);!n.isListField()&&(!e.skipExist||t===void 0)&&this.updateStore(Mi(this.store,r,[...i][0].value))}}}})},i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach(e=>{let n=t.get(e);n&&i.push(...[...n].map(e=>e.entity))})):i=n,r(i)};resetFields=e=>{this.warningUnhooked();let t=this.store;if(!e){this.updateStore(Li(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(t,null,{type:`reset`}),this.notifyWatch();return}let n=e.map(Iv);n.forEach(e=>{let t=this.getInitialValue(e);this.updateStore(Mi(this.store,e,t))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(t,n,{type:`reset`}),this.notifyWatch(n)};setFields=e=>{this.warningUnhooked();let t=this.store,n=[];e.forEach(e=>{let{name:r,...i}=e,a=Iv(r);n.push(a),`value`in i&&this.updateStore(Mi(this.store,a,i.value)),this.notifyObservers(t,[a],{type:`setField`,data:e})}),this.notifyWatch(n)};getFields=()=>this.getFieldEntities(!0).map(e=>{let t=e.getNamePath(),n={...e.getMeta(),name:t,value:this.getFieldValue(t)};return Object.defineProperty(n,`originRCField`,{value:!0}),n});initEntityValue=e=>{let{initialValue:t}=e.props;if(t!==void 0){let n=e.getNamePath();Ai(this.store,n)===void 0&&this.updateStore(Mi(this.store,n,t))}};isMergedPreserve=e=>(e===void 0?this.preserve:e)??!0;registerField=e=>{this.fieldEntities.push(e);let t=e.getNamePath();if(this.notifyWatch([t]),e.props.initialValue!==void 0){let t=this.store;this.resetWithFieldInitialValue({entities:[e],skipExist:!0}),this.notifyObservers(t,[e.getNamePath()],{type:`valueUpdate`,source:`internal`})}return(n,r,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(t=>t!==e),!this.isMergedPreserve(r)&&(!n||i.length>1)){let e=n?void 0:this.getInitialValue(t);if(t.length&&this.getFieldValue(t)!==e&&this.fieldEntities.every(e=>!zv(e.getNamePath(),t))){let n=this.store;this.updateStore(Mi(n,t,e,!0)),this.notifyObservers(n,[t],{type:`remove`}),this.triggerDependenciesUpdate(n,t)}}this.notifyWatch([t])}};dispatch=e=>{switch(e.type){case`updateValue`:{let{namePath:t,value:n}=e;this.updateValue(t,n);break}case`validateField`:{let{namePath:t,triggerName:n}=e;this.validateFields([t],{triggerName:n});break}default:}};notifyObservers=(e,t,n)=>{if(this.subscribable){let r={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:n})=>{n(e,t,r)})}else this.forceRootUpdate()};triggerDependenciesUpdate=(e,t)=>{let n=this.getDependencyChildrenFields(t);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(e,n,{type:`dependenciesUpdate`,relatedFields:[t,...n]}),n};updateValue=(e,t)=>{let n=Iv(e),r=this.store;this.updateStore(Mi(this.store,n,t)),this.notifyObservers(r,[n],{type:`valueUpdate`,source:`internal`}),this.notifyWatch([n]);let i=this.triggerDependenciesUpdate(r,n),{onValuesChange:a}=this.callbacks;if(a){let e=Lv(this.store,[n]);a(e,Mi(this.getFieldsValue(),n,Ai(e,n)))}this.triggerOnFieldsChange([n,...i])};setFieldsValue=e=>{this.warningUnhooked();let t=this.store;if(e){let t=Li(this.store,e);this.updateStore(t)}this.notifyObservers(t,null,{type:`valueUpdate`,source:`external`}),this.notifyWatch()};setFieldValue=(e,t)=>{this.setFields([{name:e,value:t,errors:[],warnings:[],touched:!0}])};getDependencyChildrenFields=e=>{let t=new Set,n=[],r=new ny;this.getFieldEntities().forEach(e=>{let{dependencies:t}=e.props;(t||[]).forEach(t=>{let n=Iv(t);r.update(n,(t=new Set)=>(t.add(e),t))})});let i=e=>{(r.get(e)||new Set).forEach(e=>{if(!t.has(e)){t.add(e);let r=e.getNamePath();e.isFieldDirty()&&r.length&&(n.push(r),i(r))}})};return i(e),n};triggerOnFieldsChange=(e,t)=>{let{onFieldsChange:n}=this.callbacks;if(n){let r=this.getFields();if(t){let e=new ny;t.forEach(({name:t,errors:n})=>{e.set(t,n)}),r.forEach(t=>{t.errors=e.get(t.name)||t.errors})}let i=r.filter(({name:t})=>Rv(e,t));i.length&&n(i,r)}};validateFields=(e,t)=>{this.warningUnhooked();let n,r;Array.isArray(e)||typeof e==`string`||typeof t==`string`?(n=e,r=t):r=e;let i=!!n,a=i?n.map(Iv):[],o=[...a],s=[],c=String(Date.now()),l=new Set,{recursive:u,dirty:d}=r||{};this.getFieldEntities(!0).forEach(e=>{let t=e.getNamePath();if(i||((!e.isList()||!a.some(e=>zv(e,t,!0)))&&o.push(t),a.push(t)),!(!e.props.rules||!e.props.rules.length)&&!(d&&!e.isFieldDirty())&&(l.add(t.join(c)),!i||Rv(a,t,u))){let n=e.validateRules({validateMessages:{...Ov,...this.validateMessages},...r});s.push(n.then(()=>({name:t,errors:[],warnings:[]})).catch(e=>{let n=[],r=[];return e.forEach?.(({rule:{warningOnly:e},errors:t})=>{e?r.push(...t):n.push(...t)}),n.length?Promise.reject({name:t,errors:n,warnings:r}):{name:t,errors:n,warnings:r}}))}});let f=$v(s);this.lastValidatePromise=f,f.catch(e=>e).then(e=>{let t=e.map(({name:e})=>e);this.notifyObservers(this.store,t,{type:`validateFinish`}),this.triggerOnFieldsChange(t,e)});let p=f.then(()=>this.lastValidatePromise===f?Promise.resolve(this.getFieldsValue(o)):Promise.reject([])).catch(e=>{let t=e.filter(e=>e&&e.errors.length),n=t[0]?.errors?.[0];return Promise.reject({message:n,values:this.getFieldsValue(a),errorFields:t,outOfDate:this.lastValidatePromise!==f})});p.catch(e=>e);let m=a.filter(e=>l.has(e.join(c)));return this.triggerOnFieldsChange(m),p};submit=()=>{this.warningUnhooked(),this.validateFields().then(e=>{let{onFinish:t}=this.callbacks;if(t)try{t(e)}catch(e){console.error(e)}}).catch(e=>{let{onFinishFailed:t}=this.callbacks;t&&t(e)})}};function iy(e){let t=S.useRef(null),[,n]=S.useState({});return t.current||(e?t.current=e:t.current=new ry(()=>{n({})}).getForm()),[t.current]}var ay=S.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),oy=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{let i=S.useContext(ay),a=S.useRef({});return S.createElement(ay.Provider,{value:{...i,validateMessages:{...i.validateMessages,...e},triggerFormChange:(e,n)=>{t&&t(e,{changedFields:n,forms:a.current}),i.triggerFormChange(e,n)},triggerFormFinish:(e,t)=>{n&&n(e,{values:t,forms:a.current}),i.triggerFormFinish(e,t)},registerForm:(e,t)=>{e&&(a.current={...a.current,[e]:t}),i.registerForm(e,t)},unregisterForm:e=>{let t={...a.current};delete t[e],a.current=t,i.unregisterForm(e)}}},r)};function sy(){return sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let g=S.useRef(null),_=S.useContext(ay),[v]=iy(r),{useSubscribe:y,setInitialValues:b,setCallbacks:x,setValidateMessages:C,setPreserve:w,destroyForm:T}=v.getInternalHooks(P_);S.useImperativeHandle(h,()=>({...v,nativeElement:g.current})),S.useEffect(()=>(_.registerForm(e,v),()=>{_.unregisterForm(e)}),[_,v,e]),C({..._.validateMessages,...s}),x({onValuesChange:l,onFieldsChange:(t,...n)=>{_.triggerFormChange(e,t),u&&u(t,...n)},onFinish:t=>{_.triggerFormFinish(e,t),d&&d(t)},onFinishFailed:f}),w(i);let E=S.useRef(null);b(t,!E.current),E.current||=!0,S.useEffect(()=>()=>T(p),[]);let D,O=typeof a==`function`;D=O?a(v.getFieldsValue(!0),v):a,y(!O);let k=S.useRef(null);S.useEffect(()=>{Bv(k.current||[],n||[])||v.setFields(n||[]),k.current=n},[n,v]);let A=S.useMemo(()=>({...v,validateTrigger:c}),[v,c]),j=S.createElement(L_.Provider,{value:null},S.createElement(I_.Provider,{value:A},D));return o===!1?j:S.createElement(o,sy({},m,{ref:g,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),v.submit()},onReset:e=>{e.preventDefault(),v.resetFields(),m.onReset?.(e)}}),j)};function ly(e){try{return JSON.stringify(e)}catch{return Math.random()}}function uy(...e){let[t,n={}]=e,r=Cee(n)?{form:n}:n,i=r.form,[a,o]=(0,S.useState)(()=>typeof t==`function`?t({}):void 0),s=(0,S.useMemo)(()=>ly(a),[a]),c=(0,S.useRef)(s);c.current=s;let l=(0,S.useContext)(I_),u=i||l,d=u&&u._init,{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:m}=p(P_),h=zn((e,n)=>{let i=r.preserve?n??f(!0):e??f(),s=typeof t==`function`?t(i):Ai(i,Iv(t));ly(a)!==ly(s)&&o(s)});return(0,S.useEffect)(()=>{d&&h()},[d,typeof t==`function`?t:JSON.stringify(t)]),(0,S.useEffect)(()=>{if(d)return m((e,t)=>{h(e,t)})},[d]),a}var dy=S.forwardRef(cy);dy.FormProvider=oy,dy.Field=Zv,dy.List=Qv,dy.useForm=iy,dy.useWatch=uy;var fy=S.createContext({labelAlign:`right`,layout:`horizontal`,itemRef:()=>{}}),py=S.createContext(null),my=e=>{let t=gi(e,[`prefixCls`]);return S.createElement(oy,{...t})},hy=S.createContext({prefixCls:``}),gy=S.createContext({}),_y=({children:e,status:t,override:n})=>{let r=S.useContext(gy),i=S.useMemo(()=>{let e={...r};return n&&delete e.isFormItemInput,t&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e},[t,n,r]);return S.createElement(gy.Provider,{value:i},e)},vy=S.createContext(void 0),yy=e=>{let{space:t,form:n,children:r}=e;if(!$d(r))return null;let i=r;return n&&(i=S.createElement(_y,{override:!0,status:!0},i)),t&&(i=S.createElement(Ah,null,i)),i},by=()=>Bn()&&window.document.documentElement;function xy(e,t,n){return(0,S.useMemo)(()=>({trap:t??!0,focusTriggerAfterClose:n??!0,...e}),[e,t,n])}var Sy=e=>{let{prefixCls:t,className:n,style:r,size:i,shape:a}=e,o=J({[`${t}-lg`]:i===`large`,[`${t}-sm`]:i===`small`}),s=J({[`${t}-circle`]:a===`circle`,[`${t}-square`]:a===`square`,[`${t}-round`]:a===`round`}),c=S.useMemo(()=>ef(i)?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return S.createElement(`span`,{className:J(t,o,s,n),style:{...c,...r}})},Cy=new Ms(`ant-skeleton-loading`,{"0%":{backgroundPosition:`100% 50%`},"100%":{backgroundPosition:`0 50%`}}),wy=e=>({height:e,lineHeight:Y(e)}),Ty=e=>({width:e,...wy(e)}),Ey=e=>({background:e.skeletonLoadingBackground,backgroundSize:`400% 100%`,animationName:Cy,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:`ease`,animationIterationCount:`infinite`}),Dy=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...wy(e)}),Oy=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a}=e;return{[t]:{display:`inline-block`,verticalAlign:`top`,background:n,...Ty(r)},[`${t}${t}-circle`]:{borderRadius:`50%`},[`${t}${t}-lg`]:{...Ty(i)},[`${t}${t}-sm`]:{...Ty(a)}}},ky=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[r]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:n,...Dy(t,s)},[`${r}-lg`]:{...Dy(i,s)},[`${r}-sm`]:{...Dy(a,s)}}},Ay=e=>{let{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:i}=e;return{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,verticalAlign:`middle`,background:t,borderRadius:n,...Ty(i(r).mul(2).equal())}},jy=e=>({[e.skeletonNodeCls]:{...Ay(e)}}),My=e=>{let{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...Ay(e),[`${t}-path`]:{fill:`#bfbfbf`},[`${t}-svg`]:{...Ty(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:`50%`}},[`${t}${t}-circle`]:{borderRadius:`50%`}}},Ny=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:`50%`},[`${n}${r}-round`]:{borderRadius:t}}},Py=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...wy(e)}),Fy=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[n]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal(),...Py(r,s)},...Ny(e,r,n),[`${n}-lg`]:{...Py(i,s)},...Ny(e,i,`${n}-lg`),[`${n}-sm`]:{...Py(a,s)},...Ny(e,a,`${n}-sm`)}},Aee=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:a,skeletonInputCls:o,skeletonNodeCls:s,skeletonImageCls:c,controlHeight:l,controlHeightLG:u,controlHeightSM:d,gradientFromColor:f,padding:p,marginSM:m,borderRadius:h,titleHeight:g,blockRadius:_,paragraphLiHeight:v,controlHeightXS:y,paragraphMarginTop:b}=e;return{[t]:{display:`table`,width:`100%`,[`${t}-header`]:{display:`table-cell`,paddingInlineEnd:p,verticalAlign:`top`,[n]:{display:`inline-block`,verticalAlign:`top`,background:f,...Ty(l)},[`${n}-circle`]:{borderRadius:`50%`},[`${n}-lg`]:{...Ty(u)},[`${n}-sm`]:{...Ty(d)}},[`${t}-section`]:{display:`table-cell`,width:`100%`,verticalAlign:`top`,[r]:{width:`100%`,height:g,background:f,borderRadius:_,[`+ ${i}`]:{marginBlockStart:d}},[i]:{padding:0,"> li":{width:`100%`,height:v,listStyle:`none`,background:f,borderRadius:_,"+ li":{marginBlockStart:y}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:`61%`}},[`&-round ${t}-section`]:{[`${r}, ${i} > li`]:{borderRadius:h}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:m,[`+ ${i}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:{display:`inline-block`,width:`auto`,...Fy(e),...Oy(e),...ky(e),...jy(e),...My(e)},[`${t}${t}-block`]:{width:`100%`,[a]:{width:`100%`},[o]:{width:`100%`}},[`${t}${t}-active`]:{[` + `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},r_=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:`transparent`,border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},i_=Ql(`Collapse`,e=>{let t=dc(e,{collapseHeaderPaddingSM:`${Y(e.paddingXS)} ${Y(e.paddingSM)}`,collapseHeaderPaddingLG:`${Y(e.padding)} ${Y(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[e_(t),n_(t),r_(t),t_(t),Gh(t)]},e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:`transparent`})),a_=Object.assign(S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o,classNames:s,styles:c}=ya(`collapse`),{prefixCls:l,className:u,rootClassName:d,style:f,bordered:p=!0,ghost:m,size:h,expandIconPlacement:g,expandIconPosition:_,children:v,destroyInactivePanel:y,destroyOnHidden:b,expandIcon:x,classNames:C,styles:w}=e,T=Th(e=>h??e??`middle`),E=n(`collapse`,l),D=n(),[O,k]=i_(E),A=g??_??`start`,j={...e,size:T,bordered:p,expandIconPlacement:A},[M,N]=Cf([s,C],[c,w],{props:j}),P=x??i,F=S.useCallback((e={})=>um(typeof P==`function`?P(e):S.createElement(Bg,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`}),e=>({className:J(e.className,`${E}-arrow`)})),[P,E,r]),I=J(`${E}-icon-placement-${A}`,{[`${E}-borderless`]:!p,[`${E}-rtl`]:r===`rtl`,[`${E}-ghost`]:!!m,[`${E}-large`]:T===`large`,[`${E}-small`]:T===`small`},a,u,d,O,k,M.root),L=S.useMemo(()=>({...mh(D),motionAppear:!1,leavedClassName:`${E}-panel-hidden`}),[D,E]),R=S.useMemo(()=>v?ki(v).map(e=>e):null,[v]);return S.createElement(Qg,{ref:t,openMotion:L,...gi(e,[`rootClassName`]),expandIcon:F,prefixCls:E,className:I,style:{...N.root,...o,...f},classNames:M,styles:N,destroyOnHidden:b??y},R)}),{Panel:$g}),o_=e=>e instanceof Lg?e:new Lg(e),s_=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new Pg(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},c_=e=>{let{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return dc(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},l_=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??Cc(t),a=e.contentLineHeightSM??Cc(n),o=e.contentLineHeightLG??Cc(r),s=s_(new Lg(e.colorBgSolid),`#fff`)?`#000`:`#fff`,c=Sc.reduce((t,n)=>({...t,[`${n}ShadowColor`]:`0 ${Y(e.controlOutlineWidth)} 0 ${Fl(e[`${n}1`],e.colorBgContainer)}`}),{}),l=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...c,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:i,contentLineHeightSM:a,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0),defaultBgDisabled:l,dashedBgDisabled:u}},u_=e=>{let{componentCls:t,antCls:n,lineWidth:r}=e,[i,a]=tu(n,`btn`);return{[t]:[{[i(`border-width`)]:r,[i(`border-color`)]:`#000`,[i(`border-color-hover`)]:a(`border-color`),[i(`border-color-active`)]:a(`border-color`),[i(`border-color-disabled`)]:a(`border-color`),[i(`border-style`)]:`solid`,[i(`text-color`)]:`#000`,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`),[i(`text-color-disabled`)]:a(`text-color`),[i(`bg-color`)]:`#ddd`,[i(`bg-color-hover`)]:a(`bg-color`),[i(`bg-color-active`)]:a(`bg-color`),[i(`bg-color-disabled`)]:e.colorBgContainerDisabled,[i(`bg-color-container`)]:e.colorBgContainer,[i(`shadow`)]:`none`},{border:[a(`border-width`),a(`border-style`),a(`border-color`)].join(` `),color:a(`text-color`),backgroundColor:a(`bg-color`),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a(`border-width`),a(`border-style`),a(`border-color-hover`)].join(` `),color:a(`text-color-hover`),backgroundColor:a(`bg-color-hover`)},"&:active":{border:[a(`border-width`),a(`border-style`),a(`border-color-active`)].join(` `),color:a(`text-color-active`),backgroundColor:a(`bg-color-active`)}}},{[`&${t}-variant-solid`]:{[i(`solid-bg-color`)]:a(`color-base`),[i(`solid-bg-color-hover`)]:a(`color-hover`),[i(`solid-bg-color-active`)]:a(`color-active`),[i(`border-color`)]:`transparent`,[i(`text-color`)]:e.colorTextLightSolid,[i(`bg-color`)]:a(`solid-bg-color`),[i(`bg-color-hover`)]:a(`solid-bg-color-hover`),[i(`bg-color-active`)]:a(`solid-bg-color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`border-color`)]:a(`color-base`),[i(`border-color-hover`)]:a(`color-hover`),[i(`border-color-active`)]:a(`color-active`),[i(`bg-color`)]:a(`bg-color-container`),[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-dashed`]:{[i(`border-style`)]:`dashed`,[i(`bg-color-disabled`)]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`bg-color`)]:a(`color-light`),[i(`bg-color-hover`)]:a(`color-light-hover`),[i(`bg-color-active`)]:a(`color-light-active`)},[`&${t}-variant-text, &${t}-variant-link`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),[i(`bg-color`)]:`transparent`,[i(`bg-color-hover`)]:`transparent`,[i(`bg-color-active`)]:`transparent`,[`&:disabled, &${e.componentCls}-disabled`]:{background:`transparent`,borderColor:`transparent`}},[`&${t}-variant-text`]:{[i(`bg-color-hover`)]:a(`color-light`),[i(`bg-color-active`)]:a(`color-light-active`)}},{[`&${t}-variant-link`]:{[i(`color-base`)]:e.colorLink,[i(`color-hover`)]:e.colorLinkHover,[i(`color-active`)]:e.colorLinkActive,[i(`bg-color-hover`)]:e.linkHoverBg},[`&${t}-color-primary`]:{[i(`color-base`)]:e.colorPrimary,[i(`color-hover`)]:e.colorPrimaryHover,[i(`color-active`)]:e.colorPrimaryActive,[i(`color-light`)]:e.colorPrimaryBg,[i(`color-light-hover`)]:e.colorPrimaryBgHover,[i(`color-light-active`)]:e.colorPrimaryBorder,[i(`shadow`)]:e.primaryShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.primaryColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-dangerous`]:{[i(`color-base`)]:e.colorError,[i(`color-hover`)]:e.colorErrorHover,[i(`color-active`)]:e.colorErrorActive,[i(`color-light`)]:e.colorErrorBg,[i(`color-light-hover`)]:e.colorErrorBgFilledHover,[i(`color-light-active`)]:e.colorErrorBgActive,[i(`shadow`)]:e.dangerShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.dangerColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-default`]:{[i(`solid-bg-color`)]:e.colorBgSolid,[i(`solid-bg-color-hover`)]:e.colorBgSolidHover,[i(`solid-bg-color-active`)]:e.colorBgSolidActive,[i(`color-base`)]:e.defaultBorderColor,[i(`color-hover`)]:e.defaultHoverBorderColor,[i(`color-active`)]:e.defaultActiveBorderColor,[i(`color-light`)]:e.colorFillTertiary,[i(`color-light-hover`)]:e.colorFillSecondary,[i(`color-light-active`)]:e.colorFill,[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`shadow`)]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i(`bg-color-disabled`)]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i(`text-color`)]:e.solidTextColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-filled, &${t}-variant-text`]:{[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`bg-color-container`)]:e.defaultBg,[i(`bg-color-hover`)]:e.defaultHoverBg,[i(`bg-color-active`)]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i(`text-color`)]:e.textTextColor,[i(`text-color-hover`)]:e.textTextHoverColor,[i(`text-color-active`)]:e.textTextActiveColor,[i(`bg-color-hover`)]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultGhostColor,[i(`border-color`)]:e.defaultGhostBorderColor}}}},Sc.map(n=>{let r=e[`${n}6`],a=e[`${n}1`],o=e[`${n}Hover`],s=e[`${n}2`],c=e[`${n}3`],l=e[`${n}Active`],u=e[`${n}ShadowColor`];return{[`&${t}-color-${n}`]:{[i(`color-base`)]:r,[i(`color-hover`)]:o,[i(`color-active`)]:l,[i(`color-light`)]:a,[i(`color-light-hover`)]:s,[i(`color-light-active`)]:c,[i(`shadow`)]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:`not-allowed`,borderColor:e.colorBorderDisabled,background:a(`bg-color-disabled`),color:e.colorTextDisabled,boxShadow:`none`}},{[`&${t}-background-ghost`]:{[i(`bg-color`)]:e.ghostBg,[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg,[i(`shadow`)]:`none`,[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg}}}]}},d_=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:s,calc:c}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:s,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:`none`,touchAction:`manipulation`,...hg(),"&:disabled > *":{pointerEvents:`none`},[`${t}-icon > svg`]:Wl(),"> a":{color:`currentColor`},"&:not(:disabled)":ql(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:`0.34em`},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:`-0.34em`,letterSpacing:`0.34em`},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:`none`}},[`&${t}-loading`]:{opacity:i,cursor:`default`},[`${t}-loading-icon`]:{transition:[`width`,`opacity`,`margin`].map(e=>`${e} ${a} ${o}`).join(`,`)},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:`row-reverse`,[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(s).mul(-1).equal()}}}}}},f_=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:`50%`}),p_=(e,t=``)=>{let{componentCls:n,controlHeight:r,fontSize:i,borderRadius:a,buttonPaddingHorizontal:o,iconCls:s,buttonPaddingVertical:c,buttonIconOnlyFontSize:l}=e;return[{[t]:{fontSize:i,height:r,padding:`${Y(c)} ${Y(o)}`,borderRadius:a,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:l}}}},{[`${n}${n}-circle${t}`]:f_(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},see=e=>p_(dc(e,{fontSize:e.contentFontSize}),e.componentCls),cee=e=>p_(dc(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`),lee=e=>p_(dc(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`),uee=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:`100%`}}}},dee=Ql(`Button`,e=>{let t=c_(e);return[d_(t),see(t),cee(t),lee(t),uee(t),u_(t),jg(t)]},l_,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function fee(e,t,n,r){let{focusElCls:i,focus:a,borderElCls:o}=n,s=o?`> *`:``,c=[`hover`,a?`focus`:null,`active`].filter(Boolean).map(e=>`&:${e} ${s}`).join(`,`);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[c]:{zIndex:3},...i?{[`&${i}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function pee(e,t,n){let{borderElCls:r}=n,i=r?`> ${r}`:``;return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function m_(e,t={focus:!0}){let{componentCls:n}=e,{componentCls:r}=t,i=r||n,a=`${i}-compact`;return{[a]:{...fee(e,a,t,i),...pee(i,a,t)}}}function mee(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function hee(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function gee(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...mee(e,t,e.componentCls),...hee(e.componentCls,t)}}}var _ee=e=>{let{antCls:t,componentCls:n,lineWidth:r,calc:i,colorBgContainer:a}=e,o=`${n}-variant-solid:not([disabled])`,s=i(r).mul(-1).equal(),[c,l]=tu(t,`btn`),u=e=>({[`${n}-compact${e?`-vertical`:``}-item`]:{[c(`compact-connect-border-color`)]:l(`bg-color-hover`),[`&${o}`]:{transition:`none`,[`& + ${o}:before`]:[{position:`absolute`,backgroundColor:l(`compact-connect-border-color`),content:`""`},e?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:`none`}}}});return[u(),u(!0),{[`${o}${n}-color-default`]:{[c(`compact-connect-border-color`)]:`color-mix(in srgb, ${l(`bg-color-hover`)} 75%, ${a})`}}]},vee=eu([`Button`,`compact`],e=>{let t=c_(e);return[m_(t),gee(t),_ee(t)]},l_);function yee(e){if(nf(e)){let t=e?.delay;return t=ef(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var bee={default:[`default`,`outlined`],primary:[`primary`,`solid`],dashed:[`default`,`dashed`],link:[`link`,`link`],text:[`default`,`text`]},h_=S.forwardRef((e,t)=>{let{_skipSemantic:n,loading:r=!1,prefixCls:i,color:a,variant:o,type:s,danger:c=!1,shape:l,size:u,disabled:d,className:f,rootClassName:p,children:m,icon:h,iconPosition:g,iconPlacement:_,ghost:v=!1,block:y=!1,htmlType:b=`button`,classNames:x,styles:C,style:w,autoInsertSpace:T,autoFocus:E,...D}=e,O=ki(m),k=s||`default`,{getPrefixCls:A,direction:j,autoInsertSpace:M,className:N,style:P,classNames:F,styles:I,loadingIcon:L,shape:R,color:z,variant:B}=ya(`button`),V=l||R||`default`,[H,U]=(0,S.useMemo)(()=>{if(a&&o)return[a,o];if(s||c){let e=bee[k]||[];return c?[`danger`,e[1]]:e}return z&&B?[z,B]:[`default`,`outlined`]},[a,o,s,c,z,B,k]),[ee,W]=(0,S.useMemo)(()=>v&&U===`solid`?[H,`outlined`]:[H,U],[H,U,v]),te=ee===`danger`,G=te?`dangerous`:ee,ne=T??M??!0,K=A(`btn`,i),[re,ie]=dee(K),ae=(0,S.useContext)(mm),q=d??ae,oe=(0,S.useContext)(Mh),se=(0,S.useMemo)(()=>yee(r),[r]),[ce,le]=(0,S.useState)(se.loading),[ue,de]=(0,S.useState)(!1),fe=(0,S.useRef)(null),pe=lr(t,fe),me=O.length===1&&!h&&!Lh(W),he=(0,S.useRef)(!0);S.useEffect(()=>(he.current=!1,()=>{he.current=!0}),[]),Hn(()=>{let e=null;se.delay>0?e=setTimeout(()=>{e=null,le(!0)},se.delay):le(se.loading);function t(){e&&=(clearTimeout(e),null)}return t},[se.delay,se.loading]),(0,S.useEffect)(()=>{if(!fe.current||!ne)return;let e=fe.current.textContent||``;me&&Fh(e)?ue||de(!0):ue&&de(!1)}),(0,S.useEffect)(()=>{E&&fe.current&&fe.current.focus()},[]);let ge=S.useCallback(t=>{if(ce||q){t.preventDefault();return}e.onClick?.((`href`in e,t))},[e.onClick,ce,q]),{compactSize:_e,compactItemClassnames:ve}=Oh(K,j),ye=Th(e=>u??_e??oe??e),be=ce?`loading`:h,xe=_??g??`start`,Se=gi(D,[`navigate`]),Ce={...e,type:k,color:ee,variant:W,danger:te,shape:V,size:ye,disabled:q,loading:ce,iconPlacement:xe},[we,Te]=Cf([n?void 0:F,x],[n?void 0:I,C],{props:Ce}),Ee=J(K,re,ie,{[`${K}-${V}`]:V!==`default`&&V!==`square`&&V,[`${K}-${k}`]:k,[`${K}-dangerous`]:c,[`${K}-color-${G}`]:G,[`${K}-variant-${W}`]:W,[`${K}-lg`]:ye===`large`,[`${K}-sm`]:ye===`small`,[`${K}-icon-only`]:!m&&m!==0&&!!be,[`${K}-background-ghost`]:v&&!Lh(W),[`${K}-loading`]:ce,[`${K}-two-chinese-chars`]:ue&&ne&&!ce,[`${K}-block`]:y,[`${K}-rtl`]:j===`rtl`,[`${K}-icon-end`]:xe===`end`},ve,f,p,N,we.root),De={...Te.root,...P,...w},Oe={className:we.icon,style:Te.icon},ke=e=>S.createElement(Bh,{prefixCls:K,...Oe},e),Ae=S.createElement(Wh,{existIcon:!!h,prefixCls:K,loading:ce,mount:he.current,...Oe}),je=nf(r)&&r.icon||L,Me;Me=h&&!ce?ke(h):r&&je?ke(je):Ae;let Ne=$d(m)?zh(m,me&&ne,Te.content,we.content):null;if(Se.href!==void 0)return S.createElement(`a`,{...Se,className:J(Ee,{[`${K}-disabled`]:q}),href:q?void 0:Se.href,style:De,onClick:ge,ref:pe,tabIndex:q?-1:0,"aria-disabled":q},Me,Ne);let Pe=S.createElement(`button`,{...D,type:b,className:Ee,style:De,onClick:ge,disabled:q,ref:pe},Me,Ne,ve&&S.createElement(vee,{prefixCls:K}));return Lh(W)||(Pe=S.createElement(wh,{component:`Button`,disabled:ce},Pe)),Pe});h_.Group=Nh,h_.__ANT_BUTTON=!0;var g_=e=>{let{type:t,children:n,prefixCls:r,buttonProps:i,close:a,autoFocus:o,emitEvent:s,isSilent:c,quitOnNullishReturnValue:l,actionFn:u}=e,d=S.useRef(!1),f=S.useRef(null),[p,m]=Wn(!1),h=(...e)=>{a?.(...e)};S.useEffect(()=>{let e=null;return o&&(e=setTimeout(()=>{f.current?.focus({preventScroll:!0})})),()=>{e&&clearTimeout(e)}},[o]);let g=e=>{af(e)&&(m(!0),e.then((...e)=>{m(!1,!0),h.apply(void 0,e),d.current=!1},e=>{if(m(!1,!0),d.current=!1,!c?.())return Promise.reject(e)}))},_=e=>{if(d.current)return;if(d.current=!0,!u){h();return}let t;if(s){if(t=u(e),l&&!af(t)){d.current=!1,h(e);return}}else if(u.length)t=u(a),d.current=!1;else if(t=u(),!af(t)){h();return}g(t)};return S.createElement(h_,{...Ih(t),onClick:_,loading:p,prefixCls:r,...i,ref:f},n)},__=S.createContext({}),{Provider:v_}=__,y_=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:a,close:o,onCancel:s,onConfirm:c,onClose:l}=(0,S.useContext)(__);return i?S.createElement(g_,{isSilent:r,actionFn:s,close:(...e)=>{o?.(...e),c?.(!1),l?.()},autoFocus:e===`cancel`,buttonProps:t,prefixCls:`${a}-btn`},n):null},b_=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:a,okType:o,onConfirm:s,onOk:c,onClose:l}=(0,S.useContext)(__);return S.createElement(g_,{isSilent:n,type:o||`primary`,actionFn:c,close:(...e)=>{t?.(...e),s?.(!0),l?.()},autoFocus:e===`ok`,buttonProps:r,prefixCls:`${i}-btn`},a)},x_=S.createContext({});function S_(e,t,n){let r=t;return!r&&n&&(r=`${e}-${n}`),r}function C_(e,t){let n=e[`page${t?`Y`:`X`}Offset`],r=`scroll${t?`Top`:`Left`}`;if(typeof n!=`number`){let t=e.document;n=t.documentElement[r],typeof n!=`number`&&(n=t.body[r])}return n}function xee(e){let t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=C_(i),n.top+=C_(i,!0),n}var See=S.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,className:r,style:i,title:a,ariaId:o,footer:s,closable:c,closeIcon:l,onClose:u,children:d,bodyStyle:f,bodyProps:p,modalRender:m,onMouseDown:h,onMouseUp:g,holderRef:_,visible:v,forceRender:y,width:b,height:x,classNames:C,styles:w,isFixedPos:T,focusTrap:E}=e,{panel:D}=S.useContext(x_),O=(0,S.useRef)(null),k=lr(_,D,O),[A]=Gr(v&&T&&E!==!1,()=>O.current);S.useImperativeHandle(t,()=>({focus:()=>{O.current?.focus({preventScroll:!0})}}));let j={};b!==void 0&&(j.width=b),x!==void 0&&(j.height=x);let M=s?S.createElement(`div`,{className:J(`${n}-footer`,C?.footer),style:{...w?.footer}},s):null,N=a?S.createElement(`div`,{className:J(`${n}-header`,C?.header),style:{...w?.header}},S.createElement(`div`,{className:J(`${n}-title`,C?.title),id:o,style:{...w?.title}},a)):null,P=(0,S.useMemo)(()=>typeof c==`object`&&c?c:c?{closeIcon:l??S.createElement(`span`,{className:`${n}-close-x`})}:{},[c,l,n]),F=xi(P,!0),I=typeof c==`object`&&c.disabled,L=c?S.createElement(`button`,w_({type:`button`,onClick:u,"aria-label":`Close`},F,{className:`${n}-close`,disabled:I}),P.closeIcon):null,R=S.createElement(`div`,{className:J(`${n}-container`,C?.container),style:w?.container},L,N,S.createElement(`div`,w_({className:J(`${n}-body`,C?.body),style:{...f,...w?.body}},p),d),M);return S.createElement(`div`,{key:`dialog-element`,role:`dialog`,"aria-labelledby":a?o:null,"aria-modal":`true`,ref:k,style:{...i,...j},className:J(n,r),onMouseDown:h,onMouseUp:g,tabIndex:-1,onFocus:e=>{A(e.target)}},S.createElement(See,{shouldUpdate:v||y},m?m(R):R))});function E_(){return E_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,title:r,style:i,className:a,visible:o,forceRender:s,destroyOnHidden:c,motionName:l,ariaId:u,onVisibleChanged:d,mousePosition:f}=e,p=(0,S.useRef)(null),m=(0,S.useRef)(null);S.useImperativeHandle(t,()=>({...m.current,inMotion:p.current.inMotion,enableMotion:p.current.enableMotion}));let[h,g]=S.useState(),_={};h&&(_.transformOrigin=h);function v(){if(!p.current?.nativeElement)return;let e=xee(p.current.nativeElement);g(f&&(f.x||f.y)?`${f.x-e.left}px ${f.y-e.top}px`:``)}return S.createElement(Od,{visible:o,onVisibleChanged:d,onAppearPrepare:v,onEnterPrepare:v,forceRender:s,motionName:l,removeOnLeave:c,ref:p},({className:t,style:o},s)=>S.createElement(T_,E_({},e,{ref:m,title:r,ariaId:u,prefixCls:n,holderRef:s,style:{...o,...i,..._},className:J(a,t)})))});function D_(){return D_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,style:n,visible:r,maskProps:i,motionName:a,className:o}=e;return S.createElement(Od,{key:`mask`,visible:r,motionName:a,leavedClassName:`${t}-mask-hidden`},({className:e,style:r},a)=>S.createElement(`div`,D_({ref:a,style:{...r,...n},className:J(`${t}-mask`,e,o)},i)))};function O_(){return O_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-dialog`,zIndex:n,visible:r=!1,focusTriggerAfterClose:i=!0,wrapStyle:a,wrapClassName:o,wrapProps:s,onClose:c,afterOpenChange:l,afterClose:u,transitionName:d,animation:f,closable:p=!0,mask:m=!0,maskTransitionName:h,maskAnimation:g,maskClosable:_=!0,maskStyle:v,maskProps:y,rootClassName:b,rootStyle:x,classNames:C,styles:w}=e,T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),[O,k]=S.useState(r),[A,j]=S.useState(!1),M=Xn();function N(){mr(E.current,document.activeElement)||(T.current=document.activeElement)}function P(){mr(E.current,document.activeElement)||D.current?.focus()}function F(){if(k(!1),m&&T.current&&i){try{T.current.focus({preventScroll:!0})}catch{}T.current=null}O&&u?.()}function I(e){e?P():F(),l?.(e)}function L(e){c?.(e)}let R=(0,S.useRef)(!1),z=null;_&&(z=e=>{E.current===e.target&&R.current&&L(e)});function B(e){R.current=e.target===E.current}(0,S.useEffect)(()=>{r?(R.current=!1,k(!0),N(),E.current&&j(getComputedStyle(E.current).position===`fixed`)):O&&D.current.enableMotion()&&!D.current.inMotion()&&F()},[r]);let V={zIndex:n,...a,...w?.wrapper,display:O?null:`none`};return S.createElement(`div`,O_({className:J(`${t}-root`,b),style:x},xi(e,{data:!0})),S.createElement(wee,{prefixCls:t,visible:m&&r,motionName:S_(t,h,g),style:{zIndex:n,...v,...w?.mask},maskProps:y,className:C?.mask}),S.createElement(`div`,O_({className:J(`${t}-wrap`,o,C?.wrapper),ref:E,onClick:z,onMouseDown:B,style:V},s),S.createElement(Cee,O_({},e,{isFixedPos:A,ref:D,closable:p,ariaId:M,prefixCls:t,visible:r&&O,onClose:L,onVisibleChanged:I,motionName:S_(t,d,f)}))))};function A_(){return A_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{visible:t,getContainer:n,forceRender:r,destroyOnHidden:i=!1,afterClose:a,closable:o,panelRef:s,keyboard:c=!0,onClose:l}=e,[u,d]=S.useState(t),f=S.useMemo(()=>({panel:s}),[s]);return S.useEffect(()=>{t&&d(!0)},[t]),!r&&i&&!u?null:S.createElement(x_.Provider,{value:f},S.createElement(Dp,{open:t||r||u,onEsc:({top:e,event:t})=>{if(e&&c){t.stopPropagation(),l?.(t);return}},autoDestroy:!1,getContainer:n,autoLock:t||u},S.createElement(k_,A_({},e,{destroyOnHidden:i,afterClose:()=>{let{afterClose:e}=(o&&typeof o==`object`?o:{})||{};e?.(),a?.(),d(!1)}}))))},M_=`RC_FORM_INTERNAL_HOOKS`,N_=()=>{ui(!1,`Can not find FormContext. Please make sure you wrap Field under Form.`)},P_=S.createContext({getFieldValue:N_,getFieldsValue:N_,getFieldError:N_,getFieldWarning:N_,getFieldsError:N_,isFieldsTouched:N_,isFieldTouched:N_,isFieldValidating:N_,isFieldsValidating:N_,resetFields:N_,setFields:N_,setFieldValue:N_,setFieldsValue:N_,validateFields:N_,submit:N_,getInternalHooks:()=>(N_(),{dispatch:N_,initEntityValue:N_,registerField:N_,useSubscribe:N_,setInitialValues:N_,destroyForm:N_,setCallbacks:N_,registerWatch:N_,getFields:N_,setValidateMessages:N_,setPreserve:N_,getInitialValue:N_})}),F_=S.createContext(null);function I_(e){return e==null?[]:Array.isArray(e)?e:[e]}function Tee(e){return e&&!!e._init}function L_(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,tel:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var R_=L_();function z_(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function B_(e,t,n){if(Zs())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Js(i,n.prototype),i}function V_(e){var t=typeof Map==`function`?new Map:void 0;return V_=function(e){if(e===null||!z_(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return B_(e,arguments,Xs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Js(n,e)},V_(e)}var H_=/%[sdj%]/g,U_=function(){};function W_(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function G_(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(H_,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}break;default:return e}}):e}function K_(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`||e===`tel`}function q_(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||K_(t)&&typeof e==`string`&&!e)}function J_(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,pa(e||[])),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function Y_(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length){n(o);return}var s=r;r+=1,se.max?r.push(G_(i.messages[u].max,e.fullField,e.max)):o&&s&&(le.max)&&r.push(G_(i.messages[u].range,e.fullField,e.min,e.max))},iv=function(e,t,n,r,i,a){e.required&&(!n.hasOwnProperty(e.field)||q_(t,a||e.type))&&r.push(G_(i.messages.required,e.fullField))},av,kee=(function(){if(av)return av;var e=`[a-fA-F\\d:]`,t=function(t){return t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|\$))`:``},n=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}`,r=`[a-fA-F\\d]{1,4}`,i=`(?:${[`(?:${r}:){7}(?:${r}|:)`,`(?:${r}:){6}(?:${n}|:${r}|:)`,`(?:${r}:){5}(?::${n}|(?::${r}){1,2}|:)`,`(?:${r}:){4}(?:(?::${r}){0,1}:${n}|(?::${r}){1,3}|:)`,`(?:${r}:){3}(?:(?::${r}){0,2}:${n}|(?::${r}){1,4}|:)`,`(?:${r}:){2}(?:(?::${r}){0,3}:${n}|(?::${r}){1,5}|:)`,`(?:${r}:){1}(?:(?::${r}){0,4}:${n}|(?::${r}){1,6}|:)`,`(?::(?:(?::${r}){0,5}:${n}|(?::${r}){1,7}|:))`].join(`|`)})(?:%[0-9a-zA-Z]{1,})?`,a=RegExp(`(?:^${n}\$)|(?:^${i}\$)`),o=RegExp(`^${n}\$`),s=RegExp(`^${i}\$`),c=function(e){return e&&e.exact?a:RegExp(`(?:${t(e)}${n}${t(e)})|(?:${t(e)}${i}${t(e)})`,`g`)};c.v4=function(e){return e&&e.exact?o:RegExp(`${t(e)}${n}${t(e)}`,`g`)},c.v6=function(e){return e&&e.exact?s:RegExp(`${t(e)}${i}${t(e)}`,`g`)};var l=`(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${c.v4().source}|${c.v6().source}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return av=RegExp(`(?:^${l}\$)`,`i`),av}),ov={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},sv={integer:function(e){return sv.number(e)&&parseInt(e,10)===e},float:function(e){return sv.number(e)&&!sv.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime==`function`&&typeof e.getMonth==`function`&&typeof e.getYear==`function`&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e==`number`},object:function(e){return Ps(e)===`object`&&!sv.array(e)},method:function(e){return typeof e==`function`},email:function(e){return typeof e==`string`&&e.length<=320&&!!e.match(ov.email)},tel:function(e){return typeof e==`string`&&e.length<=32&&!!e.match(ov.tel)},url:function(e){return typeof e==`string`&&e.length<=2048&&!!e.match(kee())},hex:function(e){return typeof e==`string`&&!!e.match(ov.hex)}},cv={required:iv,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||t===``)&&r.push(G_(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&t===void 0){iv(e,t,n,r,i);return}var a=[`integer`,`float`,`array`,`regexp`,`object`,`method`,`email`,`tel`,`number`,`date`,`url`,`hex`],o=e.type;a.indexOf(o)>-1?sv[o](t)||r.push(G_(i.messages.types[o],e.fullField,e.type)):o&&Ps(t)!==e.type&&r.push(G_(i.messages.types[o],e.fullField,e.type))},range:Oee,enum:Eee,pattern:Dee},Aee=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t)&&!e.required)return n();cv.required(e,t,r,a,i)}n(a)},jee=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();cv.required(e,t,r,a,i,`array`),t!=null&&(cv.type(e,t,r,a,i),cv.range(e,t,r,a,i))}n(a)},lv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t)&&!e.required)return n();cv.required(e,t,r,a,i),t!==void 0&&cv.type(e,t,r,a,i)}n(a)},uv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t,`date`)&&!e.required)return n();if(cv.required(e,t,r,a,i),!q_(t,`date`)){var o=t instanceof Date?t:new Date(t);cv.type(e,o,r,a,i),o&&cv.range(e,o.getTime(),r,a,i)}}n(a)},dv=`enum`,fv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t)&&!e.required)return n();cv.required(e,t,r,a,i),t!==void 0&&cv[dv](e,t,r,a,i)}n(a)},pv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t)&&!e.required)return n();cv.required(e,t,r,a,i),t!==void 0&&(cv.type(e,t,r,a,i),cv.range(e,t,r,a,i))}n(a)},mv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t)&&!e.required)return n();cv.required(e,t,r,a,i),t!==void 0&&(cv.type(e,t,r,a,i),cv.range(e,t,r,a,i))}n(a)},hv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t)&&!e.required)return n();cv.required(e,t,r,a,i),t!==void 0&&cv.type(e,t,r,a,i)}n(a)},gv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===``&&(t=void 0),q_(t)&&!e.required)return n();cv.required(e,t,r,a,i),t!==void 0&&(cv.type(e,t,r,a,i),cv.range(e,t,r,a,i))}n(a)},_v=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t)&&!e.required)return n();cv.required(e,t,r,a,i),t!==void 0&&cv.type(e,t,r,a,i)}n(a)},vv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t,`string`)&&!e.required)return n();cv.required(e,t,r,a,i),q_(t,`string`)||cv.pattern(e,t,r,a,i)}n(a)},yv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t)&&!e.required)return n();cv.required(e,t,r,a,i),q_(t)||cv.type(e,t,r,a,i)}n(a)},bv=function(e,t,n,r,i){var a=[],o=Array.isArray(t)?`array`:Ps(t);cv.required(e,t,r,a,i,o),n(a)},xv=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t,`string`)&&!e.required)return n();cv.required(e,t,r,a,i,`string`),q_(t,`string`)||(cv.type(e,t,r,a,i),cv.range(e,t,r,a,i),cv.pattern(e,t,r,a,i),e.whitespace===!0&&cv.whitespace(e,t,r,a,i))}n(a)},Sv=function(e,t,n,r,i){var a=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(q_(t,a)&&!e.required)return n();cv.required(e,t,r,o,i,a),q_(t,a)||cv.type(e,t,r,o,i)}n(o)},Cv={string:xv,method:hv,number:gv,boolean:lv,regexp:yv,integer:mv,float:pv,array:jee,object:_v,enum:fv,pattern:vv,date:uv,url:Sv,hex:Sv,email:Sv,tel:Sv,required:bv,any:Aee},wv=function(){function e(t){Ws(this,e),Vs(this,`rules`,null),Vs(this,`_messages`,R_),this.define(t)}return Ks(e,[{key:`define`,value:function(e){var t=this;if(!e)throw Error(`Cannot configure a schema with no rules`);if(Ps(e)!==`object`||Array.isArray(e))throw Error(`Rules must be an object`);this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})}},{key:`messages`,value:function(e){return e&&(this._messages=nv(L_(),e)),this._messages}},{key:`validate`,value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=t,o=r,s=i;if(typeof o==`function`&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);function c(e){var t=[],n={};function r(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,pa(e))}else t.push(e)}for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:[],l=Array.isArray(c)?c:[c];!o.suppressWarning&&l.length&&e.warning(`async-validator:`,l),l.length&&r.message!==void 0&&r.message!==null&&(l=[].concat(r.message));var u=l.map(tv(r,a));if(o.first&&u.length)return d[r.field]=1,n(u);if(!i)n(u);else{if(r.required&&!t.value)return r.message===void 0?o.error&&(u=[o.error(r,G_(o.messages.required,r.field))]):u=[].concat(r.message).map(tv(r,a)),n(u);var f={};r.defaultField&&Object.keys(t.value).map(function(e){f[e]=r.defaultField}),f=Us(Us({},f),t.rule.fields);var p={};Object.keys(f).forEach(function(e){var t=f[e];p[e]=(Array.isArray(t)?t:[t]).map(s.bind(null,e))});var m=new e(p);m.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),m.validate(t.value,t.rule.options||o,function(e){var t=[];u&&u.length&&t.push.apply(t,pa(u)),e&&e.length&&t.push.apply(t,pa(e)),n(t.length?t:null)})}}var l;if(r.asyncValidator)l=r.asyncValidator(r,t.value,c,t.source,o);else if(r.validator){try{l=r.validator(r,t.value,c,t.source,o)}catch(e){var u,f;(u=(f=console).error)==null||u.call(f,e),o.suppressValidatorError||setTimeout(function(){throw e},0),c(e.message)}l===!0?c():l===!1?c(typeof r.message==`function`?r.message(r.fullField||r.field):r.message||`${r.fullField||r.field} fails`):l instanceof Array?c(l):l instanceof Error&&c(l.message)}l&&l.then&&l.then(function(){return c()},function(e){return c(e)})},function(e){c(e)},a)}},{key:`getType`,value:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type=`pattern`),typeof e.validator!=`function`&&e.type&&!Cv.hasOwnProperty(e.type))throw Error(G_(`Unknown rule type %s`,e.type));return e.type||`string`}},{key:`getValidationMethod`,value:function(e){if(typeof e.validator==`function`)return e.validator;var t=Object.keys(e),n=t.indexOf(`message`);return n!==-1&&t.splice(n,1),t.length===1&&t[0]===`required`?Cv.required:Cv[this.getType(e)]||void 0}}]),e}();Vs(wv,`register`,function(e,t){if(typeof t!=`function`)throw Error(`Cannot register a validator by type, validator is not a function`);Cv[e]=t}),Vs(wv,`warning`,U_),Vs(wv,`messages`,R_),Vs(wv,`validators`,Cv);var Tv="'${name}' is not a valid ${type}",Ev={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Tv,method:Tv,array:Tv,object:Tv,number:Tv,date:Tv,boolean:Tv,integer:Tv,float:Tv,regexp:Tv,email:Tv,tel:Tv,url:Tv,hex:Tv},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Dv=wv;function Ov(e,t){return e.replace(/\\?\$\{\w+\}/g,e=>e.startsWith(`\\`)?e.slice(1):t[e.slice(2,-1)])}var kv=`CODE_LOGIC_ERROR`;async function Av(e,t,n,r,i){let a={...n};if(delete a.ruleIndex,Dv.warning=()=>void 0,a.validator){let e=a.validator;a.validator=(...t)=>{try{return e(...t)}catch(e){return console.error(e),Promise.reject(kv)}}}let o=null;a&&a.type===`array`&&a.defaultField&&(o=a.defaultField,delete a.defaultField);let s=new Dv({[e]:[a]}),c=Li(Ev,r.validateMessages);s.messages(c);let l=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(e){e.errors&&(l=e.errors.map(({message:e},t)=>{let n=e===kv?c.default:e;return S.isValidElement(n)?S.cloneElement(n,{key:`error_${t}`}):n}))}if(!l.length&&o&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((t,n)=>Av(`${e}.${n}`,t,o,r,i)))).reduce((e,t)=>[...e,...t],[]);let u={...n,name:e,enum:(n.enum||[]).join(`, `),...i};return l.map(e=>typeof e==`string`?Ov(e,u):e)}function jv(e,t,n,r,i,a){let o=e.join(`.`),s=n.map((e,t)=>{let n=e.validator,r={...e,ruleIndex:t};return n&&(r.validator=(e,t,r)=>{let i=!1,a=n(e,t,(...e)=>{Promise.resolve().then(()=>{ui(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||r(...e)})});i=a&&typeof a.then==`function`&&typeof a.catch==`function`,ui(i,"`callback` is deprecated. Please return a promise instead."),i&&a.then(()=>{r()}).catch(e=>{r(e||` `)})}),r}).sort(({warningOnly:e,ruleIndex:t},{warningOnly:n,ruleIndex:r})=>!!e==!!n?t-r:e?1:-1),c;if(i===!0)c=new Promise(async(e,n)=>{for(let e=0;eAv(o,t,e,r,a).then(t=>({errors:t,rule:e})));c=(i?Nv(e):Mv(e)).then(e=>Promise.reject(e))}return c.catch(e=>e),c}async function Mv(e){return Promise.all(e).then(e=>[].concat(...e))}async function Nv(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})}function Pv(e){return I_(e)}function Fv(e,t){let n={};return t.forEach(t=>{let r=Ai(e,t);n=Mi(n,t,r)}),n}function Iv(e,t,n=!1){return e&&e.some(e=>Lv(t,e,n))}function Lv(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((t,n)=>e[n]===t)}function Rv(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(n=>{let r=e[n],i=t[n];return typeof r==`function`&&typeof i==`function`?!0:r===i})}function zv(e,...t){let n=t[0];return n&&n.target&&typeof n.target==`object`&&e in n.target?n.target[e]:n}function Bv(e,t,n){let{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;let i=e[t],a=t-n;return a>0?[...e.slice(0,n),i,...e.slice(n,t),...e.slice(t+1,r)]:a<0?[...e.slice(0,t),...e.slice(t+1,n+1),i,...e.slice(n+1,r)]:e}var Vv=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Hv=class{namePathList=[];taskId=0;watcherList=new Set;form;constructor(e){this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(e=>{this.namePathList.every(t=>!Lv(t,e))&&this.namePathList.push(e)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;Vv(()=>{if(e===this.taskId&&this.watcherList.size){let e=this.form.getForm(),t=e.getFieldsValue(),n=e.getFieldsValue(!0);this.watcherList.forEach(e=>{e(t,n,this.namePathList)}),this.namePathList=[]}})}};async function Uv(){return new Promise(e=>{Vv(()=>{Oi(()=>{e()})})})}function Wv(){return Wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{preserve:e,isListField:t,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(t,e,Pv(n)),this.cancelRegisterFunc=null};getNamePath=()=>{let{name:e,fieldContext:t}=this.props,{prefixName:n=[]}=t;return e===void 0?[]:[...n,...e]};getRules=()=>{let{rules:e=[],fieldContext:t}=this.props;return e.map(e=>typeof e==`function`?e(t):e)};reRender(){this.mounted&&this.forceUpdate()}refresh=()=>{this.mounted&&this.setState(({resetCount:e})=>({resetCount:e+1}))};metaCache=null;triggerMetaEvent=e=>{let{onMetaChange:t}=this.props;if(t){let n={...this.getMeta(),destroy:e};fi(this.metaCache,n)||t(n),this.metaCache=n}else this.metaCache=null};onStoreChange=(e,t,n)=>{let{shouldUpdate:r,dependencies:i=[],onReset:a}=this.props,{store:o}=n,s=this.getNamePath(),c=this.getValue(e),l=this.getValue(o),u=t&&Iv(t,s);switch(n.type===`valueUpdate`&&n.source===`external`&&!fi(c,l)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=Gv,this.warnings=Kv,this.triggerMetaEvent()),n.type){case`reset`:if(!t||u){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=Gv,this.warnings=Kv,this.triggerMetaEvent(),a?.(),this.refresh();return}break;case`remove`:if(r&&qv(r,e,o,c,l,n)){this.reRender();return}break;case`setField`:{let{data:i}=n;if(u){`touched`in i&&(this.touched=i.touched),`validating`in i&&!(`originRCField`in i)&&(this.validatePromise=i.validating?Promise.resolve([]):null),`errors`in i&&(this.errors=i.errors||Gv),`warnings`in i&&(this.warnings=i.warnings||Kv),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if(`value`in i&&Iv(t,s,!0)){this.reRender();return}if(r&&!s.length&&qv(r,e,o,c,l,n)){this.reRender();return}break}case`dependenciesUpdate`:if(i.map(Pv).some(e=>Iv(n.relatedFields,e))){this.reRender();return}break;default:if(u||(!i.length||s.length||r)&&qv(r,e,o,c,l,n)){this.reRender();return}break}r===!0&&this.reRender()};validateRules=e=>{let t=this.getNamePath(),n=this.getValue(),{triggerName:r,validateOnly:i=!1,delayFrame:a}=e||{},o=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:i=!1,messageVariables:s,validateDebounce:c}=this.props;a&&await Uv();let l=this.getRules();if(r&&(l=l.filter(e=>e).filter(e=>{let{validateTrigger:t}=e;return t?I_(t).includes(r):!0})),c&&r&&(await new Promise(e=>{setTimeout(e,c)}),this.validatePromise!==o))return[];let u=jv(t,n,l,e,i,s);return u.catch(e=>e).then((e=Gv)=>{if(this.validatePromise===o){this.validatePromise=null;let t=[],n=[];e.forEach?.(({rule:{warningOnly:e},errors:r=Gv})=>{e?n.push(...r):t.push(...r)}),this.errors=t,this.warnings=n,this.triggerMetaEvent(),this.reRender()}}),u});return i?o:(this.validatePromise=o,this.dirty=!0,this.errors=Gv,this.warnings=Kv,this.triggerMetaEvent(),this.reRender(),o)};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:e}=this.props,{getInitialValue:t}=e.getInternalHooks(M_);return t(this.getNamePath())!==void 0};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null});getOnlyChild=e=>{if(typeof e==`function`){let t=this.getMeta();return{...this.getOnlyChild(e(this.getControlled(),t,this.props.fieldContext)),isFunction:!0}}let t=ki(e);return t.length!==1||!S.isValidElement(t[0])?{child:t,isFunction:!1}:{child:t[0],isFunction:!1}};getValue=e=>{let{getFieldsValue:t}=this.props.fieldContext,n=this.getNamePath();return Ai(e||t(!0),n)};getControlled=(e={})=>{let{name:t,trigger:n=`onChange`,validateTrigger:r,getValueFromEvent:i,normalize:a,valuePropName:o=`value`,getValueProps:s,fieldContext:c}=this.props,l=r===void 0?c.validateTrigger:r,u=this.getNamePath(),{getInternalHooks:d,getFieldsValue:f}=c,{dispatch:p}=d(M_),m=this.getValue(),h=s||(e=>({[o]:e})),g=e[n],_=t===void 0?{}:h(m),v={...e,..._};return v[n]=(...e)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let t;t=i?i(...e):zv(o,...e),a&&(t=a(t,m,f(!0))),t!==m&&p({type:`updateValue`,namePath:u,value:t}),g&&g(...e)},I_(l||[]).forEach(e=>{let t=v[e];v[e]=(...n)=>{t&&t(...n);let{rules:r}=this.props;r&&r.length&&p({type:`validateField`,namePath:u,triggerName:e})}}),v};render(){let{resetCount:e}=this.state,{children:t}=this.props,{child:n,isFunction:r}=this.getOnlyChild(t),i;return r?i=n:S.isValidElement(n)?i=S.cloneElement(n,this.getControlled(n.props)):(ui(!n,"`children` of Field is not validate ReactElement."),i=n),S.createElement(S.Fragment,{key:e},i)}};function Yv({name:e,...t}){let n=S.useContext(P_),r=S.useContext(F_),i=e===void 0?void 0:Pv(e),a=t.isListField??!!r,o=`keep`;return a||(o=`_${(i||[]).join(`_`)}`),S.createElement(Jv,Wv({key:o,name:i,isListField:a},t,{fieldContext:n}))}function Xv({name:e,initialValue:t,children:n,rules:r,validateTrigger:i,isListField:a}){let o=S.useContext(P_),s=S.useContext(F_),c=S.useRef({keys:[],id:0}).current,l=S.useMemo(()=>[...Pv(o.prefixName)||[],...Pv(e)],[o.prefixName,e]),u=S.useMemo(()=>({...o,prefixName:l}),[o,l]),d=S.useMemo(()=>({getKey:e=>{let t=l.length,n=e[t];return[c.keys[n],e.slice(t+1)]}}),[c,l]);return typeof n==`function`?S.createElement(F_.Provider,{value:d},S.createElement(P_.Provider,{value:u},S.createElement(Yv,{name:[],shouldUpdate:(e,t,{source:n})=>n===`internal`?!1:e!==t,rules:r,validateTrigger:i,initialValue:t,isList:!0,isListField:a??!!s},({value:e=[],onChange:t},r)=>{let{getFieldValue:i}=o,a=()=>i(l||[])||[],s={add:(e,n)=>{let r=a();n>=0&&n<=r.length?(c.keys=[...c.keys.slice(0,n),c.id,...c.keys.slice(n)],t([...r.slice(0,n),e,...r.slice(n)])):(c.keys=[...c.keys,c.id],t([...r,e])),c.id+=1},remove:e=>{let n=a(),r=new Set(Array.isArray(e)?e:[e]);r.size<=0||(c.keys=c.keys.filter((e,t)=>!r.has(t)),t(n.filter((e,t)=>!r.has(t))))},move(e,n){if(e===n)return;let r=a();e<0||e>=r.length||n<0||n>=r.length||(c.keys=Bv(c.keys,e,n),t(Bv(r,e,n)))}},u=e||[];return Array.isArray(u)||(u=[]),n(u.map((e,t)=>{let n=c.keys[t];return n===void 0&&(c.keys[t]=c.id,n=c.keys[t],c.id+=1),{name:t,key:n,isListField:!0}}),s,r)}))):(ui(!1,`Form.List only accepts function as children.`),null)}function Zv(e){let t=!1,n=e.length,r=[];return e.length?new Promise((i,a)=>{e.forEach((e,o)=>{e.catch(e=>(t=!0,e)).then(e=>{--n,r[o]=e,!(n>0)&&(t&&a(r),i(r))})})}):Promise.resolve([])}var Qv=`__@field_split__`;function $v(e){return e.map(e=>`${typeof e}:${e}`).join(Qv)}var ey=class{kvs=new Map;set(e,t){this.kvs.set($v(e),t)}get(e){return this.kvs.get($v(e))}getAsPrefix(e){let t=$v(e),n=t+Qv,r=[],i=this.kvs.get(t);return i!==void 0&&r.push(i),this.kvs.forEach((e,t)=>{t.startsWith(n)&&r.push(e)}),r}update(e,t){let n=t(this.get(e));n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete($v(e))}map(e){return[...this.kvs.entries()].map(([t,n])=>e({key:t.split(Qv).map(e=>{let[,t,n]=e.match(/^([^:]*):(.*)$/);return t===`number`?Number(n):n}),value:n}))}toJSON(){let e={};return this.map(({key:t,value:n})=>(e[t.join(`.`)]=n,null)),e}},ty=class{formHooked=!1;forceRootUpdate;subscribable=!0;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new Hv(this);constructor(e){this.forceRootUpdate=e}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks});getInternalHooks=e=>e===`RC_FORM_INTERNAL_HOOKS`?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(ui(!1,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=e=>{this.subscribable=e};prevWithoutPreserves=null;setInitialValues=(e,t)=>{if(this.initialValues=e||{},t){let t=Li(e,this.store);this.prevWithoutPreserves?.map(({key:n})=>{t=Mi(t,n,Ai(e,n))}),this.prevWithoutPreserves=null,this.updateStore(t)}};destroyForm=e=>{if(e)this.updateStore({});else{let e=new ey;this.getFieldEntities(!0).forEach(t=>{this.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)}),this.prevWithoutPreserves=e}};getInitialValue=e=>{let t=Ai(this.initialValues,e);return e.length?Li(t):t};setCallbacks=e=>{this.callbacks=e};setValidateMessages=e=>{this.validateMessages=e};setPreserve=e=>{this.preserve=e};registerWatch=e=>this.watcherCenter.register(e);notifyWatch=(e=[])=>{this.watcherCenter.notify(e)};timeoutId=null;warningUnhooked=()=>{};updateStore=e=>{this.store=e};getFieldEntities=(e=!1)=>e?this.fieldEntities.filter(e=>e.getNamePath().length):this.fieldEntities;getFieldsMap=(e=!1)=>{let t=new ey;return this.getFieldEntities(e).forEach(e=>{let n=e.getNamePath();t.set(n,e)}),t};getFieldEntitiesForNamePathList=(e,t=!1)=>{if(!e)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return t?e.flatMap(e=>{let t=Pv(e),r=n.getAsPrefix(t);return r.length?r:[{INVALIDATE_NAME_PATH:t}]}):e.map(e=>{let t=Pv(e);return n.get(t)||{INVALIDATE_NAME_PATH:Pv(e)}})};getFieldsValue=(e,t)=>{this.warningUnhooked();let n,r;if(e===!0||Array.isArray(e)?(n=e,r=t):e&&typeof e==`object`&&(r=e.filter),n===!0&&!r)return this.store;let i=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),a=[],o=[];i.forEach(e=>{let t=e.INVALIDATE_NAME_PATH||e.getNamePath();if(e.isList?.()){o.push(t);return}if(!r)a.push(t);else{let n=`getMeta`in e?e.getMeta():null;r(n)&&a.push(t)}});let s=Fv(this.store,a.map(Pv));return o.forEach(e=>{Ai(s,e)||(s=Mi(s,e,[]))}),s};getFieldValue=e=>{this.warningUnhooked();let t=Pv(e);return Ai(this.store,t)};getFieldsError=e=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(e).map((t,n)=>t&&!t.INVALIDATE_NAME_PATH?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:Pv(e[n]),errors:[],warnings:[]}));getFieldError=e=>{this.warningUnhooked();let t=Pv(e);return this.getFieldsError([t])[0].errors};getFieldWarning=e=>{this.warningUnhooked();let t=Pv(e);return this.getFieldsError([t])[0].warnings};isFieldsTouched=(...e)=>{this.warningUnhooked();let[t,n]=e,r,i=!1;e.length===0?r=null:e.length===1?Array.isArray(t)?(r=t.map(Pv),i=!1):(r=null,i=t):(r=t.map(Pv),i=n);let a=this.getFieldEntities(!0),o=e=>e.isFieldTouched();if(!r)return i?a.every(e=>o(e)||e.isList()):a.some(o);let s=new ey;r.forEach(e=>{s.set(e,[])}),a.forEach(e=>{let t=e.getNamePath();r.forEach(n=>{n.every((e,n)=>t[n]===e)&&s.update(n,t=>[...t,e])})});let c=e=>e.some(o),l=s.map(({value:e})=>e);return i?l.every(c):l.some(c)};isFieldTouched=e=>(this.warningUnhooked(),this.isFieldsTouched([e]));isFieldsValidating=e=>{this.warningUnhooked();let t=this.getFieldEntities();if(!e)return t.some(e=>e.isFieldValidating());let n=e.map(Pv);return t.some(e=>Iv(n,e.getNamePath())&&e.isFieldValidating())};isFieldValidating=e=>(this.warningUnhooked(),this.isFieldsValidating([e]));resetWithFieldInitialValue=(e={})=>{let t=new ey,n=this.getFieldEntities(!0);n.forEach(e=>{let{initialValue:n}=e.props,r=e.getNamePath();if(n!==void 0){let i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}});let r=n=>{n.forEach(n=>{let{initialValue:r}=n.props;if(r!==void 0){let r=n.getNamePath();if(this.getInitialValue(r)!==void 0)ui(!1,`Form already set 'initialValues' with path '${r.join(`.`)}'. Field can not overwrite it.`);else{let i=t.get(r);if(i&&i.size>1)ui(!1,`Multiple Field with path '${r.join(`.`)}' set 'initialValue'. Can not decide which one to pick.`);else if(i){let t=this.getFieldValue(r);!n.isListField()&&(!e.skipExist||t===void 0)&&this.updateStore(Mi(this.store,r,[...i][0].value))}}}})},i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach(e=>{let n=t.get(e);n&&i.push(...[...n].map(e=>e.entity))})):i=n,r(i)};resetFields=e=>{this.warningUnhooked();let t=this.store;if(!e){this.updateStore(Li(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(t,null,{type:`reset`}),this.notifyWatch();return}let n=e.map(Pv);n.forEach(e=>{let t=this.getInitialValue(e);this.updateStore(Mi(this.store,e,t))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(t,n,{type:`reset`}),this.notifyWatch(n)};setFields=e=>{this.warningUnhooked();let t=this.store,n=[];e.forEach(e=>{let{name:r,...i}=e,a=Pv(r);n.push(a),`value`in i&&this.updateStore(Mi(this.store,a,i.value)),this.notifyObservers(t,[a],{type:`setField`,data:e})}),this.notifyWatch(n)};getFields=()=>this.getFieldEntities(!0).map(e=>{let t=e.getNamePath(),n={...e.getMeta(),name:t,value:this.getFieldValue(t)};return Object.defineProperty(n,`originRCField`,{value:!0}),n});initEntityValue=e=>{let{initialValue:t}=e.props;if(t!==void 0){let n=e.getNamePath();Ai(this.store,n)===void 0&&this.updateStore(Mi(this.store,n,t))}};isMergedPreserve=e=>(e===void 0?this.preserve:e)??!0;registerField=e=>{this.fieldEntities.push(e);let t=e.getNamePath();if(this.notifyWatch([t]),e.props.initialValue!==void 0){let t=this.store;this.resetWithFieldInitialValue({entities:[e],skipExist:!0}),this.notifyObservers(t,[e.getNamePath()],{type:`valueUpdate`,source:`internal`})}return(n,r,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(t=>t!==e),!this.isMergedPreserve(r)&&(!n||i.length>1)){let e=n?void 0:this.getInitialValue(t);if(t.length&&this.getFieldValue(t)!==e&&this.fieldEntities.every(e=>!Lv(e.getNamePath(),t))){let n=this.store;this.updateStore(Mi(n,t,e,!0)),this.notifyObservers(n,[t],{type:`remove`}),this.triggerDependenciesUpdate(n,t)}}this.notifyWatch([t])}};dispatch=e=>{switch(e.type){case`updateValue`:{let{namePath:t,value:n}=e;this.updateValue(t,n);break}case`validateField`:{let{namePath:t,triggerName:n}=e;this.validateFields([t],{triggerName:n});break}default:}};notifyObservers=(e,t,n)=>{if(this.subscribable){let r={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:n})=>{n(e,t,r)})}else this.forceRootUpdate()};triggerDependenciesUpdate=(e,t)=>{let n=this.getDependencyChildrenFields(t);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(e,n,{type:`dependenciesUpdate`,relatedFields:[t,...n]}),n};updateValue=(e,t)=>{let n=Pv(e),r=this.store;this.updateStore(Mi(this.store,n,t)),this.notifyObservers(r,[n],{type:`valueUpdate`,source:`internal`}),this.notifyWatch([n]);let i=this.triggerDependenciesUpdate(r,n),{onValuesChange:a}=this.callbacks;if(a){let e=Fv(this.store,[n]);a(e,Mi(this.getFieldsValue(),n,Ai(e,n)))}this.triggerOnFieldsChange([n,...i])};setFieldsValue=e=>{this.warningUnhooked();let t=this.store;if(e){let t=Li(this.store,e);this.updateStore(t)}this.notifyObservers(t,null,{type:`valueUpdate`,source:`external`}),this.notifyWatch()};setFieldValue=(e,t)=>{this.setFields([{name:e,value:t,errors:[],warnings:[],touched:!0}])};getDependencyChildrenFields=e=>{let t=new Set,n=[],r=new ey;this.getFieldEntities().forEach(e=>{let{dependencies:t}=e.props;(t||[]).forEach(t=>{let n=Pv(t);r.update(n,(t=new Set)=>(t.add(e),t))})});let i=e=>{(r.get(e)||new Set).forEach(e=>{if(!t.has(e)){t.add(e);let r=e.getNamePath();e.isFieldDirty()&&r.length&&(n.push(r),i(r))}})};return i(e),n};triggerOnFieldsChange=(e,t)=>{let{onFieldsChange:n}=this.callbacks;if(n){let r=this.getFields();if(t){let e=new ey;t.forEach(({name:t,errors:n})=>{e.set(t,n)}),r.forEach(t=>{t.errors=e.get(t.name)||t.errors})}let i=r.filter(({name:t})=>Iv(e,t));i.length&&n(i,r)}};validateFields=(e,t)=>{this.warningUnhooked();let n,r;Array.isArray(e)||typeof e==`string`||typeof t==`string`?(n=e,r=t):r=e;let i=!!n,a=i?n.map(Pv):[],o=[...a],s=[],c=String(Date.now()),l=new Set,{recursive:u,dirty:d}=r||{};this.getFieldEntities(!0).forEach(e=>{let t=e.getNamePath();if(i||((!e.isList()||!a.some(e=>Lv(e,t,!0)))&&o.push(t),a.push(t)),!(!e.props.rules||!e.props.rules.length)&&!(d&&!e.isFieldDirty())&&(l.add(t.join(c)),!i||Iv(a,t,u))){let n=e.validateRules({validateMessages:{...Ev,...this.validateMessages},...r});s.push(n.then(()=>({name:t,errors:[],warnings:[]})).catch(e=>{let n=[],r=[];return e.forEach?.(({rule:{warningOnly:e},errors:t})=>{e?r.push(...t):n.push(...t)}),n.length?Promise.reject({name:t,errors:n,warnings:r}):{name:t,errors:n,warnings:r}}))}});let f=Zv(s);this.lastValidatePromise=f,f.catch(e=>e).then(e=>{let t=e.map(({name:e})=>e);this.notifyObservers(this.store,t,{type:`validateFinish`}),this.triggerOnFieldsChange(t,e)});let p=f.then(()=>this.lastValidatePromise===f?Promise.resolve(this.getFieldsValue(o)):Promise.reject([])).catch(e=>{let t=e.filter(e=>e&&e.errors.length),n=t[0]?.errors?.[0];return Promise.reject({message:n,values:this.getFieldsValue(a),errorFields:t,outOfDate:this.lastValidatePromise!==f})});p.catch(e=>e);let m=a.filter(e=>l.has(e.join(c)));return this.triggerOnFieldsChange(m),p};submit=()=>{this.warningUnhooked(),this.validateFields().then(e=>{let{onFinish:t}=this.callbacks;if(t)try{t(e)}catch(e){console.error(e)}}).catch(e=>{let{onFinishFailed:t}=this.callbacks;t&&t(e)})}};function ny(e){let t=S.useRef(null),[,n]=S.useState({});return t.current||(e?t.current=e:t.current=new ty(()=>{n({})}).getForm()),[t.current]}var ry=S.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),iy=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{let i=S.useContext(ry),a=S.useRef({});return S.createElement(ry.Provider,{value:{...i,validateMessages:{...i.validateMessages,...e},triggerFormChange:(e,n)=>{t&&t(e,{changedFields:n,forms:a.current}),i.triggerFormChange(e,n)},triggerFormFinish:(e,t)=>{n&&n(e,{values:t,forms:a.current}),i.triggerFormFinish(e,t)},registerForm:(e,t)=>{e&&(a.current={...a.current,[e]:t}),i.registerForm(e,t)},unregisterForm:e=>{let t={...a.current};delete t[e],a.current=t,i.unregisterForm(e)}}},r)};function ay(){return ay=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let g=S.useRef(null),_=S.useContext(ry),[v]=ny(r),{useSubscribe:y,setInitialValues:b,setCallbacks:x,setValidateMessages:C,setPreserve:w,destroyForm:T}=v.getInternalHooks(M_);S.useImperativeHandle(h,()=>({...v,nativeElement:g.current})),S.useEffect(()=>(_.registerForm(e,v),()=>{_.unregisterForm(e)}),[_,v,e]),C({..._.validateMessages,...s}),x({onValuesChange:l,onFieldsChange:(t,...n)=>{_.triggerFormChange(e,t),u&&u(t,...n)},onFinish:t=>{_.triggerFormFinish(e,t),d&&d(t)},onFinishFailed:f}),w(i);let E=S.useRef(null);b(t,!E.current),E.current||=!0,S.useEffect(()=>()=>T(p),[]);let D,O=typeof a==`function`;D=O?a(v.getFieldsValue(!0),v):a,y(!O);let k=S.useRef(null);S.useEffect(()=>{Rv(k.current||[],n||[])||v.setFields(n||[]),k.current=n},[n,v]);let A=S.useMemo(()=>({...v,validateTrigger:c}),[v,c]),j=S.createElement(F_.Provider,{value:null},S.createElement(P_.Provider,{value:A},D));return o===!1?j:S.createElement(o,ay({},m,{ref:g,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),v.submit()},onReset:e=>{e.preventDefault(),v.resetFields(),m.onReset?.(e)}}),j)};function sy(e){try{return JSON.stringify(e)}catch{return Math.random()}}function cy(...e){let[t,n={}]=e,r=Tee(n)?{form:n}:n,i=r.form,[a,o]=(0,S.useState)(()=>typeof t==`function`?t({}):void 0),s=(0,S.useMemo)(()=>sy(a),[a]),c=(0,S.useRef)(s);c.current=s;let l=(0,S.useContext)(P_),u=i||l,d=u&&u._init,{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:m}=p(M_),h=zn((e,n)=>{let i=r.preserve?n??f(!0):e??f(),s=typeof t==`function`?t(i):Ai(i,Pv(t));sy(a)!==sy(s)&&o(s)});return(0,S.useEffect)(()=>{d&&h()},[d,typeof t==`function`?t:JSON.stringify(t)]),(0,S.useEffect)(()=>{if(d)return m((e,t)=>{h(e,t)})},[d]),a}var ly=S.forwardRef(oy);ly.FormProvider=iy,ly.Field=Yv,ly.List=Xv,ly.useForm=ny,ly.useWatch=cy;var uy=S.createContext({labelAlign:`right`,layout:`horizontal`,itemRef:()=>{}}),dy=S.createContext(null),fy=e=>{let t=gi(e,[`prefixCls`]);return S.createElement(iy,{...t})},py=S.createContext({prefixCls:``}),my=S.createContext({}),hy=({children:e,status:t,override:n})=>{let r=S.useContext(my),i=S.useMemo(()=>{let e={...r};return n&&delete e.isFormItemInput,t&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e},[t,n,r]);return S.createElement(my.Provider,{value:i},e)},gy=S.createContext(void 0),_y=e=>{let{space:t,form:n,children:r}=e;if(!$d(r))return null;let i=r;return n&&(i=S.createElement(hy,{override:!0,status:!0},i)),t&&(i=S.createElement(kh,null,i)),i},vy=()=>Bn()&&window.document.documentElement;function yy(e,t,n){return(0,S.useMemo)(()=>({trap:t??!0,focusTriggerAfterClose:n??!0,...e}),[e,t,n])}var by=e=>{let{prefixCls:t,className:n,style:r,size:i,shape:a}=e,o=J({[`${t}-lg`]:i===`large`,[`${t}-sm`]:i===`small`}),s=J({[`${t}-circle`]:a===`circle`,[`${t}-square`]:a===`square`,[`${t}-round`]:a===`round`}),c=S.useMemo(()=>ef(i)?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return S.createElement(`span`,{className:J(t,o,s,n),style:{...c,...r}})},xy=new Ms(`ant-skeleton-loading`,{"0%":{backgroundPosition:`100% 50%`},"100%":{backgroundPosition:`0 50%`}}),Sy=e=>({height:e,lineHeight:Y(e)}),Cy=e=>({width:e,...Sy(e)}),wy=e=>({background:e.skeletonLoadingBackground,backgroundSize:`400% 100%`,animationName:xy,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:`ease`,animationIterationCount:`infinite`}),Ty=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...Sy(e)}),Ey=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a}=e;return{[t]:{display:`inline-block`,verticalAlign:`top`,background:n,...Cy(r)},[`${t}${t}-circle`]:{borderRadius:`50%`},[`${t}${t}-lg`]:{...Cy(i)},[`${t}${t}-sm`]:{...Cy(a)}}},Dy=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[r]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:n,...Ty(t,s)},[`${r}-lg`]:{...Ty(i,s)},[`${r}-sm`]:{...Ty(a,s)}}},Oy=e=>{let{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:i}=e;return{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,verticalAlign:`middle`,background:t,borderRadius:n,...Cy(i(r).mul(2).equal())}},ky=e=>({[e.skeletonNodeCls]:{...Oy(e)}}),Ay=e=>{let{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...Oy(e),[`${t}-path`]:{fill:`#bfbfbf`},[`${t}-svg`]:{...Cy(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:`50%`}},[`${t}${t}-circle`]:{borderRadius:`50%`}}},jy=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:`50%`},[`${n}${r}-round`]:{borderRadius:t}}},My=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...Sy(e)}),Ny=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[n]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal(),...My(r,s)},...jy(e,r,n),[`${n}-lg`]:{...My(i,s)},...jy(e,i,`${n}-lg`),[`${n}-sm`]:{...My(a,s)},...jy(e,a,`${n}-sm`)}},Mee=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:a,skeletonInputCls:o,skeletonNodeCls:s,skeletonImageCls:c,controlHeight:l,controlHeightLG:u,controlHeightSM:d,gradientFromColor:f,padding:p,marginSM:m,borderRadius:h,titleHeight:g,blockRadius:_,paragraphLiHeight:v,controlHeightXS:y,paragraphMarginTop:b}=e;return{[t]:{display:`table`,width:`100%`,[`${t}-header`]:{display:`table-cell`,paddingInlineEnd:p,verticalAlign:`top`,[n]:{display:`inline-block`,verticalAlign:`top`,background:f,...Cy(l)},[`${n}-circle`]:{borderRadius:`50%`},[`${n}-lg`]:{...Cy(u)},[`${n}-sm`]:{...Cy(d)}},[`${t}-section`]:{display:`table-cell`,width:`100%`,verticalAlign:`top`,[r]:{width:`100%`,height:g,background:f,borderRadius:_,[`+ ${i}`]:{marginBlockStart:d}},[i]:{padding:0,"> li":{width:`100%`,height:v,listStyle:`none`,background:f,borderRadius:_,"+ li":{marginBlockStart:y}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:`61%`}},[`&-round ${t}-section`]:{[`${r}, ${i} > li`]:{borderRadius:h}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:m,[`+ ${i}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:{display:`inline-block`,width:`auto`,...Ny(e),...Ey(e),...Dy(e),...ky(e),...Ay(e)},[`${t}${t}-block`]:{width:`100%`,[a]:{width:`100%`},[o]:{width:`100%`}},[`${t}${t}-active`]:{[` ${r}, ${i} > li, ${n}, @@ -164,89 +164,89 @@ html body { ${o}, ${s}, ${c} - `]:{...Ey(e)}}}},Iy=Ql(`Skeleton`,e=>{let{componentCls:t,calc:n}=e;return Aee(dc(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:`1.4s`}))},e=>{let{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[[`color`,`gradientFromColor`],[`colorGradientEnd`,`gradientToColor`]]}),jee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,style:o,styles:s,shape:c=`circle`,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ga),f=d(`skeleton`,t),[p,m]=Iy(f),h=Eh(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(Sy,{prefixCls:`${f}-avatar`,className:r?.content,style:{...s?.content,...o},shape:c,size:h,...u}))},Mee=e=>{let{prefixCls:t,className:n,rootClassName:r,classNames:i,active:a,style:o,styles:s,block:c=!1,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ga),f=d(`skeleton`,t),[p,m]=Iy(f),h=Eh(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:c},i?.root,n,r,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(Sy,{prefixCls:`${f}-button`,className:i?.content,style:{...s?.content,...o},size:h,...u}))},Ly=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,internalClassName:a,style:o,styles:s,active:c,children:l}=e,{getPrefixCls:u}=S.useContext(ga),d=u(`skeleton`,t),[f,p]=Iy(d),m=J(d,`${d}-element`,{[`${d}-active`]:c},f,r?.root,n,i,p);return S.createElement(`div`,{className:m,style:s?.root},S.createElement(`div`,{className:J(r?.content,a||`${d}-node`),style:{...s?.content,...o}},l))},Nee=e=>{let{getPrefixCls:t}=S.useContext(ga),n=t(`skeleton`,e.prefixCls);return S.createElement(Ly,{...e,internalClassName:`${n}-image`},S.createElement(`svg`,{viewBox:`0 0 1098 1024`,xmlns:`http://www.w3.org/2000/svg`,className:`${n}-image-svg`},S.createElement(`title`,null,`Image placeholder`),S.createElement(`path`,{d:`M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6`,className:`${n}-image-path`})))},Pee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,block:o,style:s,styles:c,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ga),f=d(`skeleton`,t),[p,m]=Iy(f),h=Eh(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:o},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:c?.root},S.createElement(Sy,{prefixCls:`${f}-input`,className:r?.content,style:{...c?.content,...s},size:h,...u}))},Fee=(e,t)=>{let{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},Iee=e=>{let{prefixCls:t,className:n,style:r,rows:i=0}=e,a=Array.from({length:i}).map((t,n)=>S.createElement(`li`,{key:n,style:{width:Fee(n,e)}}));return S.createElement(`ul`,{className:J(t,n),style:r},a)},Lee=({prefixCls:e,className:t,width:n,style:r})=>S.createElement(`h3`,{className:J(e,t),style:{width:n,...r}});function Ry(e){return nf(e)?e:{}}function Ree(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function zee(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function Bee(e,t){let n={};return(!e||!t)&&(n.width=`61%`),!e&&t?n.rows=3:n.rows=2,n}var zy=e=>{let{prefixCls:t,loading:n,className:r,rootClassName:i,classNames:a,style:o,styles:s,children:c,avatar:l=!1,title:u=!0,paragraph:d=!0,active:f,round:p}=e,{getPrefixCls:m,direction:h,className:g,style:_,classNames:v,styles:y}=ya(`skeleton`),b=m(`skeleton`,t),[x,C]=Iy(b),w={...e,avatar:l,title:u,paragraph:d},[T,E]=Cf([v,a],[y,s],{props:w});if(n||!(`loading`in e)){let e=!!l,t=!!u,n=!!d,a;if(e){let e={className:T.avatar,prefixCls:`${b}-avatar`,...Ree(t,n),...Ry(l),style:E.avatar};a=S.createElement(`div`,{className:J(T.header,`${b}-header`),style:E.header},S.createElement(Sy,{...e}))}let s;if(t||n){let r;if(t){let t={className:T.title,prefixCls:`${b}-title`,...zee(e,n),...Ry(u),style:E.title};r=S.createElement(Lee,{...t})}let i;if(n){let n={className:T.paragraph,prefixCls:`${b}-paragraph`,...Bee(e,t),...Ry(d),style:E.paragraph};i=S.createElement(Iee,{...n})}s=S.createElement(`div`,{className:J(T.section,`${b}-section`),style:E.section},r,i)}let c=J(b,{[`${b}-with-avatar`]:e,[`${b}-active`]:f,[`${b}-rtl`]:h===`rtl`,[`${b}-round`]:p},T.root,g,r,i,x,C);return S.createElement(`div`,{className:c,style:{...E.root,..._,...o}},a,s)}return c??null};zy.Button=Mee,zy.Avatar=jee,zy.Input=Pee,zy.Image=Nee,zy.Node=Ly;var By=zy;function Vy(){}var Vee=S.createContext({add:Vy,remove:Vy});function Hy(e){let t=S.useContext(Vee),n=S.useRef(null);return zn(r=>{if(r){let i=e?r.querySelector(e):r;i&&(t.add(i),n.current=i)}else t.remove(n.current)})}var Uy=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,S.useContext)(v_);return S.createElement(g_,{onClick:n,...e},t)},Wy=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:i}=(0,S.useContext)(v_);return S.createElement(g_,{...Lh(n),loading:e,onClick:i,...t},r)};function Gy(e,t){return S.createElement(`span`,{className:`${e}-close-x`},t||S.createElement(ju,{className:`${e}-close-icon`}))}var Ky=e=>{let{okText:t,okType:n=`primary`,cancelText:r,confirmLoading:i,onOk:a,onCancel:o,okButtonProps:s,cancelButtonProps:c,footer:l}=e,[u]=Yd(`Modal`,qd()),d=t||u?.okText,f=r||u?.cancelText,p=S.useMemo(()=>({confirmLoading:i,okButtonProps:s,cancelButtonProps:c,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:a,onCancel:o}),[i,s,c,d,f,n,a,o]),m;return typeof l==`function`||l===void 0?(m=S.createElement(S.Fragment,null,S.createElement(Uy,null),S.createElement(Wy,null)),typeof l==`function`&&(m=l(m,{OkBtn:Wy,CancelBtn:Uy})),m=S.createElement(y_,{value:p},m)):m=l,S.createElement(hm,{disabled:!1},m)},Hee=e=>{let{componentCls:t}=e;return{[t]:{display:`flex`,flexFlow:`row wrap`,minWidth:0,"&::before, &::after":{display:`flex`},"&-no-wrap":{flexWrap:`nowrap`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`},"&-space-between":{justifyContent:`space-between`},"&-space-around":{justifyContent:`space-around`},"&-space-evenly":{justifyContent:`space-evenly`},"&-top":{alignItems:`flex-start`},"&-middle":{alignItems:`center`},"&-bottom":{alignItems:`flex-end`}}}},Uee=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,maxWidth:`100%`,minHeight:1}}},Wee=(e,t)=>{let{componentCls:n,gridColumns:r,antCls:i}=e,[a,o]=tu(i,`grid`),[,s]=tu(i,`col`),c={};for(let e=r;e>=0;e--)e===0?(c[`${n}${t}-${e}`]={display:`none`},c[`${n}-push-${e}`]={insetInlineStart:`auto`},c[`${n}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-push-${e}`]={insetInlineStart:`auto`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-offset-${e}`]={marginInlineStart:0},c[`${n}${t}-order-${e}`]={order:0}):(c[`${n}${t}-${e}`]=[{[a(`display`)]:`block`,display:`block`},{display:o(`display`),flex:`0 0 ${e/r*100}%`,maxWidth:`${e/r*100}%`}],c[`${n}${t}-push-${e}`]={insetInlineStart:`${e/r*100}%`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`${e/r*100}%`},c[`${n}${t}-offset-${e}`]={marginInlineStart:`${e/r*100}%`},c[`${n}${t}-order-${e}`]={order:e});return c[`${n}${t}-flex`]={flex:s(`${t.replace(/-/,``)}-flex`)},c},qy=(e,t)=>Wee(e,t),Gee=(e,t,n)=>({[`@media (min-width: ${Y(t)})`]:{...qy(e,n)}}),Kee=()=>({}),qee=()=>({}),Jee=Ql(`Grid`,Hee,Kee),Jy=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),Yee=Ql(`Grid`,e=>{let t=dc(e,{gridColumns:24}),n=Jy(t);return delete n.xs,[Uee(t),qy(t,``),qy(t,`-xs`),Object.keys(n).map(e=>Gee(t,n[e],`-${e}`)).reduce((e,t)=>({...e,...t}),{})]},qee);function Yy(e){return{position:e,inset:0}}var Xy=e=>{let{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:`none`,opacity:0,animationDuration:e.motionDurationSlow,userSelect:`none`},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:`none`},[`${t}-mask`]:{...Yy(`fixed`),zIndex:e.zIndexPopupBase,height:`100%`,backgroundColor:e.colorBgMask,pointerEvents:`none`,[`&${t}-mask-blur`]:{backdropFilter:`blur(4px)`},[`${t}-hidden`]:{display:`none`}},[`${t}-wrap`]:{...Yy(`fixed`),zIndex:e.zIndexPopupBase,overflow:`auto`,outline:0,WebkitOverflowScrolling:`touch`}}},{[`${t}-root`]:Zh(e)}]},Zy=e=>{let{componentCls:t,motionDurationMid:n}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`},[`${t}-centered`]:{textAlign:`center`,"&::before":{display:`inline-block`,width:0,height:`100%`,verticalAlign:`middle`,content:`""`},[t]:{top:0,display:`inline-block`,paddingBottom:0,textAlign:`start`,verticalAlign:`middle`}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:`calc(100vw - 16px)`,margin:`${Y(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...Ul(e),pointerEvents:`none`,position:`relative`,top:100,width:`auto`,maxWidth:`calc(100vw - ${Y(e.calc(e.margin).mul(2).equal())})`,margin:`0 auto`,"&:focus-visible":{borderRadius:e.borderRadiusLG,...Kl(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:`break-word`},[`${t}-container`]:{position:`relative`,backgroundColor:e.contentBg,backgroundClip:`padding-box`,border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:`auto`,padding:e.contentPadding},[`${t}-close`]:{position:`absolute`,top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:`none`,background:`transparent`,borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:`pointer`,transition:[`color`,`background-color`].map(e=>`${e} ${n}`).join(`, `),"&-x":{display:`flex`,fontSize:e.fontSizeLG,fontStyle:`normal`,lineHeight:Y(e.modalCloseBtnSize),justifyContent:`center`,textTransform:`none`,textRendering:`auto`},"&:disabled":{pointerEvents:`none`},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:`none`},"&:active":{backgroundColor:e.colorBgTextActive},...ql(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:`break-word`,padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`${Y(e.margin)} auto`}},[`${t}-footer`]:{textAlign:`end`,background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:`hidden`}}},{[`${t}-pure-panel`]:{top:`auto`,padding:0,display:`flex`,flexDirection:`column`,[`${t}-container, + `]:{...wy(e)}}}},Py=Ql(`Skeleton`,e=>{let{componentCls:t,calc:n}=e;return Mee(dc(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:`1.4s`}))},e=>{let{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[[`color`,`gradientFromColor`],[`colorGradientEnd`,`gradientToColor`]]}),Nee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,style:o,styles:s,shape:c=`circle`,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ga),f=d(`skeleton`,t),[p,m]=Py(f),h=Th(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(by,{prefixCls:`${f}-avatar`,className:r?.content,style:{...s?.content,...o},shape:c,size:h,...u}))},Pee=e=>{let{prefixCls:t,className:n,rootClassName:r,classNames:i,active:a,style:o,styles:s,block:c=!1,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ga),f=d(`skeleton`,t),[p,m]=Py(f),h=Th(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:c},i?.root,n,r,p,m);return S.createElement(`div`,{className:g,style:s?.root},S.createElement(by,{prefixCls:`${f}-button`,className:i?.content,style:{...s?.content,...o},size:h,...u}))},Fy=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,internalClassName:a,style:o,styles:s,active:c,children:l}=e,{getPrefixCls:u}=S.useContext(ga),d=u(`skeleton`,t),[f,p]=Py(d),m=J(d,`${d}-element`,{[`${d}-active`]:c},f,r?.root,n,i,p);return S.createElement(`div`,{className:m,style:s?.root},S.createElement(`div`,{className:J(r?.content,a||`${d}-node`),style:{...s?.content,...o}},l))},Fee=e=>{let{getPrefixCls:t}=S.useContext(ga),n=t(`skeleton`,e.prefixCls);return S.createElement(Fy,{...e,internalClassName:`${n}-image`},S.createElement(`svg`,{viewBox:`0 0 1098 1024`,xmlns:`http://www.w3.org/2000/svg`,className:`${n}-image-svg`},S.createElement(`title`,null,`Image placeholder`),S.createElement(`path`,{d:`M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6`,className:`${n}-image-path`})))},Iee=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,block:o,style:s,styles:c,size:l,...u}=e,{getPrefixCls:d}=S.useContext(ga),f=d(`skeleton`,t),[p,m]=Py(f),h=Th(e=>l??e),g=J(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:o},r?.root,n,i,p,m);return S.createElement(`div`,{className:g,style:c?.root},S.createElement(by,{prefixCls:`${f}-input`,className:r?.content,style:{...c?.content,...s},size:h,...u}))},Lee=(e,t)=>{let{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},Ree=e=>{let{prefixCls:t,className:n,style:r,rows:i=0}=e,a=Array.from({length:i}).map((t,n)=>S.createElement(`li`,{key:n,style:{width:Lee(n,e)}}));return S.createElement(`ul`,{className:J(t,n),style:r},a)},zee=({prefixCls:e,className:t,width:n,style:r})=>S.createElement(`h3`,{className:J(e,t),style:{width:n,...r}});function Iy(e){return nf(e)?e:{}}function Bee(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function Vee(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function Hee(e,t){let n={};return(!e||!t)&&(n.width=`61%`),!e&&t?n.rows=3:n.rows=2,n}var Ly=e=>{let{prefixCls:t,loading:n,className:r,rootClassName:i,classNames:a,style:o,styles:s,children:c,avatar:l=!1,title:u=!0,paragraph:d=!0,active:f,round:p}=e,{getPrefixCls:m,direction:h,className:g,style:_,classNames:v,styles:y}=ya(`skeleton`),b=m(`skeleton`,t),[x,C]=Py(b),w={...e,avatar:l,title:u,paragraph:d},[T,E]=Cf([v,a],[y,s],{props:w});if(n||!(`loading`in e)){let e=!!l,t=!!u,n=!!d,a;if(e){let e={className:T.avatar,prefixCls:`${b}-avatar`,...Bee(t,n),...Iy(l),style:E.avatar};a=S.createElement(`div`,{className:J(T.header,`${b}-header`),style:E.header},S.createElement(by,{...e}))}let s;if(t||n){let r;if(t){let t={className:T.title,prefixCls:`${b}-title`,...Vee(e,n),...Iy(u),style:E.title};r=S.createElement(zee,{...t})}let i;if(n){let n={className:T.paragraph,prefixCls:`${b}-paragraph`,...Hee(e,t),...Iy(d),style:E.paragraph};i=S.createElement(Ree,{...n})}s=S.createElement(`div`,{className:J(T.section,`${b}-section`),style:E.section},r,i)}let c=J(b,{[`${b}-with-avatar`]:e,[`${b}-active`]:f,[`${b}-rtl`]:h===`rtl`,[`${b}-round`]:p},T.root,g,r,i,x,C);return S.createElement(`div`,{className:c,style:{...E.root,..._,...o}},a,s)}return c??null};Ly.Button=Pee,Ly.Avatar=Nee,Ly.Input=Iee,Ly.Image=Fee,Ly.Node=Fy;var Ry=Ly;function zy(){}var Uee=S.createContext({add:zy,remove:zy});function By(e){let t=S.useContext(Uee),n=S.useRef(null);return zn(r=>{if(r){let i=e?r.querySelector(e):r;i&&(t.add(i),n.current=i)}else t.remove(n.current)})}var Vy=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,S.useContext)(__);return S.createElement(h_,{onClick:n,...e},t)},Hy=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:i}=(0,S.useContext)(__);return S.createElement(h_,{...Ih(n),loading:e,onClick:i,...t},r)};function Uy(e,t){return S.createElement(`span`,{className:`${e}-close-x`},t||S.createElement(ju,{className:`${e}-close-icon`}))}var Wy=e=>{let{okText:t,okType:n=`primary`,cancelText:r,confirmLoading:i,onOk:a,onCancel:o,okButtonProps:s,cancelButtonProps:c,footer:l}=e,[u]=Yd(`Modal`,qd()),d=t||u?.okText,f=r||u?.cancelText,p=S.useMemo(()=>({confirmLoading:i,okButtonProps:s,cancelButtonProps:c,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:a,onCancel:o}),[i,s,c,d,f,n,a,o]),m;return typeof l==`function`||l===void 0?(m=S.createElement(S.Fragment,null,S.createElement(Vy,null),S.createElement(Hy,null)),typeof l==`function`&&(m=l(m,{OkBtn:Hy,CancelBtn:Vy})),m=S.createElement(v_,{value:p},m)):m=l,S.createElement(hm,{disabled:!1},m)},Wee=e=>{let{componentCls:t}=e;return{[t]:{display:`flex`,flexFlow:`row wrap`,minWidth:0,"&::before, &::after":{display:`flex`},"&-no-wrap":{flexWrap:`nowrap`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`},"&-space-between":{justifyContent:`space-between`},"&-space-around":{justifyContent:`space-around`},"&-space-evenly":{justifyContent:`space-evenly`},"&-top":{alignItems:`flex-start`},"&-middle":{alignItems:`center`},"&-bottom":{alignItems:`flex-end`}}}},Gee=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,maxWidth:`100%`,minHeight:1}}},Kee=(e,t)=>{let{componentCls:n,gridColumns:r,antCls:i}=e,[a,o]=tu(i,`grid`),[,s]=tu(i,`col`),c={};for(let e=r;e>=0;e--)e===0?(c[`${n}${t}-${e}`]={display:`none`},c[`${n}-push-${e}`]={insetInlineStart:`auto`},c[`${n}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-push-${e}`]={insetInlineStart:`auto`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-offset-${e}`]={marginInlineStart:0},c[`${n}${t}-order-${e}`]={order:0}):(c[`${n}${t}-${e}`]=[{[a(`display`)]:`block`,display:`block`},{display:o(`display`),flex:`0 0 ${e/r*100}%`,maxWidth:`${e/r*100}%`}],c[`${n}${t}-push-${e}`]={insetInlineStart:`${e/r*100}%`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`${e/r*100}%`},c[`${n}${t}-offset-${e}`]={marginInlineStart:`${e/r*100}%`},c[`${n}${t}-order-${e}`]={order:e});return c[`${n}${t}-flex`]={flex:s(`${t.replace(/-/,``)}-flex`)},c},Gy=(e,t)=>Kee(e,t),qee=(e,t,n)=>({[`@media (min-width: ${Y(t)})`]:{...Gy(e,n)}}),Jee=()=>({}),Yee=()=>({}),Xee=Ql(`Grid`,Wee,Jee),Ky=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),Zee=Ql(`Grid`,e=>{let t=dc(e,{gridColumns:24}),n=Ky(t);return delete n.xs,[Gee(t),Gy(t,``),Gy(t,`-xs`),Object.keys(n).map(e=>qee(t,n[e],`-${e}`)).reduce((e,t)=>({...e,...t}),{})]},Yee);function qy(e){return{position:e,inset:0}}var Jy=e=>{let{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:`none`,opacity:0,animationDuration:e.motionDurationSlow,userSelect:`none`},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:`none`},[`${t}-mask`]:{...qy(`fixed`),zIndex:e.zIndexPopupBase,height:`100%`,backgroundColor:e.colorBgMask,pointerEvents:`none`,[`&${t}-mask-blur`]:{backdropFilter:`blur(4px)`},[`${t}-hidden`]:{display:`none`}},[`${t}-wrap`]:{...qy(`fixed`),zIndex:e.zIndexPopupBase,overflow:`auto`,outline:0,WebkitOverflowScrolling:`touch`}}},{[`${t}-root`]:Xh(e)}]},Yy=e=>{let{componentCls:t,motionDurationMid:n}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`},[`${t}-centered`]:{textAlign:`center`,"&::before":{display:`inline-block`,width:0,height:`100%`,verticalAlign:`middle`,content:`""`},[t]:{top:0,display:`inline-block`,paddingBottom:0,textAlign:`start`,verticalAlign:`middle`}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:`calc(100vw - 16px)`,margin:`${Y(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...Ul(e),pointerEvents:`none`,position:`relative`,top:100,width:`auto`,maxWidth:`calc(100vw - ${Y(e.calc(e.margin).mul(2).equal())})`,margin:`0 auto`,"&:focus-visible":{borderRadius:e.borderRadiusLG,...Kl(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:`break-word`},[`${t}-container`]:{position:`relative`,backgroundColor:e.contentBg,backgroundClip:`padding-box`,border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:`auto`,padding:e.contentPadding},[`${t}-close`]:{position:`absolute`,top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:`none`,background:`transparent`,borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:`pointer`,transition:[`color`,`background-color`].map(e=>`${e} ${n}`).join(`, `),"&-x":{display:`flex`,fontSize:e.fontSizeLG,fontStyle:`normal`,lineHeight:Y(e.modalCloseBtnSize),justifyContent:`center`,textTransform:`none`,textRendering:`auto`},"&:disabled":{pointerEvents:`none`},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:`none`},"&:active":{backgroundColor:e.colorBgTextActive},...ql(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:`break-word`,padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`${Y(e.margin)} auto`}},[`${t}-footer`]:{textAlign:`end`,background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:`hidden`}}},{[`${t}-pure-panel`]:{top:`auto`,padding:0,display:`flex`,flexDirection:`column`,[`${t}-container, ${t}-body, - ${t}-confirm-body-wrapper`]:{display:`flex`,flexDirection:`column`,flex:`auto`},[`${t}-confirm-body`]:{marginBottom:`auto`}}}]},Qy=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`,[`${t}-confirm-body`]:{direction:`rtl`}}}}},$y=e=>{let{componentCls:t}=e,n=Jy(e),r={...n};delete r.xs;let i=`--${t.replace(`.`,``)}-`,a=Object.keys(r).map(e=>({[`@media (min-width: ${Y(r[e])})`]:{width:`var(${i}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(pa(Object.keys(n).map((e,t)=>{let r=Object.keys(n)[t-1];return r?{[`${i}${e}-width`]:`var(${i}${r}-width)`}:null})),[{width:`var(${i}xs-width)`}],pa(a))}}},eb=e=>{let t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return dc(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},tb=e=>({footerBg:`transparent`,headerBg:`transparent`,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${Y(e.paddingMD)} ${Y(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${Y(e.padding)} ${Y(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${Y(e.paddingXS)} ${Y(e.padding)}`:0,footerBorderTop:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,footerBorderRadius:e.wireframe?`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${Y(e.padding*2)} ${Y(e.padding*2)} ${Y(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),nb=Ql(`Modal`,e=>{let t=eb(e);return[Zy(t),Qy(t),Xy(t),Ag(t,`zoom`),$y(t)]},tb,{unitless:{titleLineHeight:!0}}),rb;by()&&document.documentElement.addEventListener(`click`,e=>{rb={x:e.pageX,y:e.pageY},setTimeout(()=>{rb=null},100)},!0);var ib=e=>{let{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:a,centered:o,getContainer:s,style:c,width:l=520,footer:u,classNames:d,styles:f,children:p,loading:m,confirmLoading:h,zIndex:g,mousePosition:_,onOk:v,onCancel:y,okButtonProps:b,cancelButtonProps:x,destroyOnHidden:C,destroyOnClose:w,panelRef:T=null,closable:E,mask:D,modalRender:O,maskClosable:k,focusTriggerAfterClose:A,focusable:j,...M}=e,{getPopupContainer:N,getPrefixCls:P,direction:F,className:I,style:L,classNames:R,styles:z,centered:B,cancelButtonProps:V,okButtonProps:H,mask:U}=ya(`modal`),{modal:ee}=S.useContext(ga),[W,te]=S.useMemo(()=>typeof E==`boolean`?[void 0,void 0]:[E?.afterClose,E?.onClose],[E]),G=P(`modal`,t),ne=P(),[K,re,ie]=gf(D,U,G,k),ae=xy(j,K,A),q=e=>{h||(y?.(e),te?.())},oe=e=>{v?.(e),te?.()},se=sp(G),[ce,le]=nb(G,se),ue=J(a,{[`${G}-centered`]:o??B,[`${G}-wrap-rtl`]:F===`rtl`}),de=u!==null&&!m?S.createElement(Ky,{...e,okButtonProps:{...H,...b},onOk:oe,cancelButtonProps:{...V,...x},onCancel:q}):null,[fe,pe,me,he]=pf(sf(e),sf(ee),{closable:!0,closeIcon:S.createElement(ju,{className:`${G}-close-icon`}),closeIconRender:e=>Gy(G,e)}),ge=fe?{disabled:me,closeIcon:pe,afterClose:W,...he}:!1,_e=O?e=>S.createElement(`div`,{className:`${G}-render`},O(e)):void 0,ve=cr(T,Hy(`.${G}-${O?`render`:`container`}`)),[ye,be]=Lf(`Modal`,g),xe={...e,width:l,panelRef:T,focusTriggerAfterClose:ae.focusTriggerAfterClose,focusable:ae,mask:K,maskClosable:ie,zIndex:ye},[Se,Ce]=Cf([R,d,re],[z,f],{props:xe}),[we,Te]=S.useMemo(()=>nf(l)?[void 0,l]:[l,void 0],[l]),Ee=S.useMemo(()=>{let e={};return Te&&Object.keys(Te).forEach(t=>{let n=Te[t];$d(n)&&(e[`--${G}-${t}-width`]=ef(n)?`${n}px`:n)}),e},[G,Te]);return S.createElement(yy,{form:!0,space:!0},S.createElement(jf.Provider,{value:be},S.createElement(N_,{width:we,...M,zIndex:ye,getContainer:s===void 0?N:s,prefixCls:G,rootClassName:J(ce,r,le,se,Se.root),rootStyle:Ce.root,footer:de,visible:i,mousePosition:_??rb,onClose:q,closable:ge,closeIcon:pe,transitionName:gh(ne,`zoom`,e.transitionName),maskTransitionName:gh(ne,`fade`,e.maskTransitionName),mask:K,maskClosable:ie,className:J(ce,n,I),style:{...L,...c,...Ee},classNames:{...Se,wrapper:J(Se.wrapper,ue)},styles:Ce,panelRef:ve,destroyOnHidden:C??w,modalRender:_e,focusTriggerAfterClose:ae.focusTriggerAfterClose,focusTrap:ae.trap},m?S.createElement(By,{active:!0,title:!1,paragraph:{rows:4},className:`${G}-body-skeleton`}):p)))},ab=e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:a,lineHeight:o,modalTitleHeight:s,fontHeight:c,confirmBodyPadding:l}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:`rtl`},[`${e.antCls}-modal-header`]:{display:`none`},[`${u}-body-wrapper`]:{...Gl()},[`&${t} ${t}-body`]:{padding:l},[`${u}-body`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${e.iconCls}`]:{flex:`none`,fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:`flex`,flexDirection:`column`,flex:`auto`,rowGap:e.marginXS,maxWidth:`calc(100% - ${Y(e.marginSM)})`},[`${u}-body-no-icon ${u}-paragraph`]:{maxWidth:`100%`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${Y(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-container`]:{color:e.colorText,fontSize:a,lineHeight:o},[`${u}-btns`]:{textAlign:`end`,marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, - ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},ob=eu([`Modal`,`confirm`],e=>ab(eb(e)),tb,{order:-1e3}),sb=e=>{let{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:a,type:o,okCancel:s,footer:c,locale:l,autoFocusButton:u,focusable:d,...f}=e,p=n;if(!n&&n!==null)switch(o){case`info`:p=S.createElement(Lu,null);break;case`success`:p=S.createElement(Tu,null);break;case`error`:p=S.createElement(Ou,null);break;default:p=S.createElement(Pu,null)}let m=s??o===`confirm`,h=S.useMemo(()=>{let e=d?.autoFocusButton||u;return e||e===null?e:`ok`},[u,d?.autoFocusButton]),[g]=Yd(`Modal`),_=l||g,v=r||(m?_?.okText:_?.justOkText),y=i||_?.cancelText,{closable:b}=f,{onClose:x}=nf(b)?b:{},C=S.useMemo(()=>({autoFocusButton:h,cancelTextLocale:y,okTextLocale:v,mergedOkCancel:m,onClose:x,...f}),[h,y,v,m,x,f]),w=S.createElement(S.Fragment,null,S.createElement(b_,null),S.createElement(x_,null)),T=$d(e.title)&&e.title!==``,E=$d(p),D=`${a}-body`;return S.createElement(`div`,{className:`${a}-body-wrapper`},S.createElement(`div`,{className:J(D,{[`${D}-has-title`]:T,[`${D}-no-icon`]:!E})},p,S.createElement(`div`,{className:`${a}-paragraph`},T&&S.createElement(`span`,{className:`${a}-title`},e.title),S.createElement(`div`,{className:`${a}-content`},e.content))),c===void 0||typeof c==`function`?S.createElement(y_,{value:C},S.createElement(`div`,{className:`${a}-btns`},typeof c==`function`?c(w,{OkBtn:x_,CancelBtn:b_}):w)):c,S.createElement(ob,{prefixCls:t}))},cb=e=>{let{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:a,wrapClassName:o,rootPrefixCls:s,bodyStyle:c,closable:l=!1,onConfirm:u,styles:d,title:f,mask:p,maskClosable:m,okButtonProps:h,cancelButtonProps:g}=e,{cancelButtonProps:_,okButtonProps:v}=ya(`modal`),y=`${a}-confirm`,b=e.width||416,x=e.style||{},C=J(y,`${y}-${e.type}`,{[`${y}-rtl`]:i===`rtl`},e.className),w=S.useMemo(()=>{let e=hf(p,m);return e.closable??=!1,e},[p,m]),[,T]=Vl(),E=S.useMemo(()=>n===void 0?T.zIndexPopupBase+Nf:n,[n,T]);return S.createElement(ib,{...e,className:C,wrapClassName:J({[`${y}-centered`]:!!e.centered},o),onCancel:()=>{t?.({triggerCancel:!0}),u?.(!1)},title:f,footer:null,transitionName:gh(s||``,`zoom`,e.transitionName),maskTransitionName:gh(s||``,`fade`,e.maskTransitionName),mask:w,style:x,styles:{body:c,mask:r,...d},width:b,zIndex:E,closable:l},S.createElement(sb,{...e,confirmPrefixCls:y,okButtonProps:{...v,...h},cancelButtonProps:{..._,...g}}))},lb=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return S.createElement(Mm,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},S.createElement(cb,{...e}))},ub=[],db=``;function fb(){return db}var pb=e=>{let{prefixCls:t,getContainer:n,direction:r}=e,i=qd(),a=(0,S.useContext)(ga),o=fb()||a.getPrefixCls(),s=t||`${o}-modal`,c=n;return c===!1&&(c=void 0),S.createElement(lb,{...e,rootPrefixCls:o,prefixCls:s,iconPrefixCls:a.iconPrefixCls,theme:a.theme,direction:r??a.direction,locale:a.locale?.Modal??i,getContainer:c})};function mb(e){let t=jm(),n=document.createDocumentFragment(),r={...e,close:s,open:!0},i;function a(...t){t.some(e=>e?.triggerCancel)&&e.onCancel?.(()=>{},...t.slice(1));for(let e=0;e{})}let o=e=>{clearTimeout(i),i=setTimeout(()=>{let r=t.getPrefixCls(void 0,fb()),i=t.getIconPrefixCls(),a=t.getTheme(),o=S.createElement(pb,{...e});zi(S.createElement(Mm,{prefixCls:r,iconPrefixCls:i,theme:a},typeof t.holderRender==`function`?t.holderRender(o):o),n)})};function s(...t){r={...r,open:!1,afterClose:()=>{typeof e.afterClose==`function`&&e.afterClose(),a.apply(this,t)}},o(r)}function c(e){r=typeof e==`function`?e(r):{...r,...e},o(r)}return o(r),ub.push(s),{destroy:s,update:c}}function hb(e){return{...e,type:`warning`}}function gb(e){return{...e,type:`info`}}function _b(e){return{...e,type:`success`}}function vb(e){return{...e,type:`error`}}function yb(e){return{...e,type:`confirm`}}function bb({rootPrefixCls:e}){db=e}var xb=S.forwardRef((e,t)=>{let{afterClose:n,config:r,...i}=e,[a,o]=S.useState(!0),[s,c]=S.useState(r),{direction:l,getPrefixCls:u}=S.useContext(ga),d=u(`modal`),f=u(),p=()=>{n(),s.afterClose?.()},m=(...e)=>{o(!1),e.some(e=>e?.triggerCancel)&&s.onCancel?.(()=>{},...e.slice(1))};S.useImperativeHandle(t,()=>({destroy:m,update:e=>{c(t=>{let n=typeof e==`function`?e(t):e;return{...t,...n}})}}));let h=s.okCancel??s.type===`confirm`,[g]=Yd(`Modal`,Hd.Modal);return S.createElement(lb,{prefixCls:d,rootPrefixCls:f,...s,close:m,open:a,afterClose:p,okText:s.okText||(h?g?.okText:g?.justOkText),direction:s.direction||l,cancelText:s.cancelText||g?.cancelText,...i})}),Sb=0,Cb=S.memo(S.forwardRef((e,t)=>{let[n,r]=Df();return S.useImperativeHandle(t,()=>({patchElement:r}),[r]),S.createElement(S.Fragment,null,n)}));function wb(){let e=S.useRef(null),[t,n]=S.useState([]);S.useEffect(()=>{t.length&&(pa(t).forEach(e=>{e()}),n([]))},[t]);let r=S.useCallback(t=>function(r){Sb+=1;let i=S.createRef(),a,o=new Promise(e=>{a=e}),s=!1,c,l=S.createElement(xb,{key:`modal-${Sb}`,config:t(r),ref:i,afterClose:()=>{c?.()},isSilent:()=>s,onConfirm:e=>{a(e)}});return c=e.current?.patchElement(l),c&&ub.push(c),{destroy:()=>{function e(){i.current?.destroy()}i.current?e():n(t=>[].concat(pa(t),[e]))},update:e=>{function t(){i.current?.update(e)}i.current?t():n(e=>[].concat(pa(e),[t]))},then:e=>(s=!0,o.then(e))}},[]);return[S.useMemo(()=>({info:r(gb),success:r(_b),error:r(vb),warning:r(hb),confirm:r(yb)}),[r]),S.createElement(Cb,{key:`modal-holder`,ref:e})]}var Tb=e=>{let{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,i=`${t}-notice`,a=new Ms(`antNotificationFadeIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}}),o=new Ms(`antNotificationTopFadeIn`,{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new Ms(`antNotificationBottomFadeIn`,{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),c=new Ms(`antNotificationLeftFadeIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}});return{[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[i]:{marginInline:`auto auto`}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:`auto`,marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:c}}}}},Eb=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],Db={topLeft:`left`,topRight:`right`,bottomLeft:`left`,bottomRight:`right`,top:`left`,bottom:`left`},Ob=(e,t)=>{let{componentCls:n}=e;return{[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith(`top`)?`top`:`bottom`]:0,[Db[t]]:{value:0,_skip_check_:!0}}}}},kb=e=>{let t={};for(let n=1;n ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return{[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:`hidden`,color:`transparent`,pointerEvents:`none`},...t}},Ab=e=>{let t={};for(let n=1;n{let{componentCls:t}=e;return{[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:`transform, opacity`,position:`absolute`,...kb(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...Ab(e)}},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:`unset`,color:`inherit`,pointerEvents:`auto`,[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:`""`,position:`absolute`,height:e.margin,width:`100%`,insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:`transparent`,pointerEvents:`auto`}}},...Eb.map(t=>Ob(e,t)).reduce((e,t)=>({...e,...t}),{})}},Mb=e=>{let{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:a,borderRadiusLG:o,colorSuccess:s,colorInfo:c,colorWarning:l,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:p,notificationMarginEdge:m,progressBg:h,notificationProgressHeight:g,fontSize:_,lineHeight:v,width:y,notificationIconSize:b,colorText:x,colorSuccessBg:S,colorErrorBg:C,colorInfoBg:w,colorWarningBg:T,motionDurationMid:E}=e,D=`${n}-notice`;return{position:`relative`,marginBottom:a,marginInlineStart:`auto`,background:f,borderRadius:o,boxShadow:r,[D]:{padding:p,width:y,maxWidth:`calc(100vw - ${Y(e.calc(m).mul(2).equal())})`,lineHeight:v,wordWrap:`break-word`,borderRadius:o,overflow:`hidden`,"&-success":S?{background:S}:{},"&-error":C?{background:C}:{},"&-info":w?{background:w}:{},"&-warning":T?{background:T}:{}},[`${D}-title`]:{marginBottom:e.marginXS,color:d,fontSize:i,lineHeight:e.lineHeightLG},[`${D}-description`]:{fontSize:_,color:x,marginTop:e.marginXS,"&:first-child":{marginTop:0,marginInlineEnd:e.marginSM}},[`${D}-closable ${D}-title`]:{paddingInlineEnd:e.paddingLG},[`${D}-with-icon ${D}-title`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:i},[`${D}-with-icon ${D}-description`]:{marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:_},[`${D}-icon`]:{position:`absolute`,fontSize:b,lineHeight:1,[`&-success${t}`]:{color:s},[`&-info${t}`]:{color:c},[`&-warning${t}`]:{color:l},[`&-error${t}`]:{color:u}},[`${D}-close`]:{position:`absolute`,top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:`none`,width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:[`color`,`background-color`].map(e=>`${e} ${E}`).join(`, `),display:`flex`,alignItems:`center`,justifyContent:`center`,background:`none`,border:`none`,"&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},...ql(e)},[`${D}-progress`]:{position:`absolute`,display:`block`,appearance:`none`,inlineSize:`calc(100% - ${Y(o)} * 2)`,left:{_skip_check_:!0,value:o},right:{_skip_check_:!0,value:o},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:o,backgroundColor:`rgba(0, 0, 0, 0.04)`},"&::-moz-progress-bar":{background:h},"&::-webkit-progress-value":{borderRadius:o,background:h}},[`${D}-actions`]:{float:`right`,marginTop:e.marginSM}}},Nb=e=>{let{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:a}=e,o=`${t}-notice`,s=new Ms(`antNotificationFadeOut`,{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:{...Ul(e),position:`fixed`,zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${t}-hook-holder`]:{position:`relative`},[`${t}-fade-appear-prepare`]:{opacity:`0 !important`},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:a,animationFillMode:`both`,opacity:0,animationPlayState:`paused`},[`${t}-fade-leave`]:{animationTimingFunction:a,animationFillMode:`both`,animationDuration:i,animationPlayState:`paused`},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:`running`},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:s,animationPlayState:`running`},"&-rtl":{direction:`rtl`,[`${o}-actions`]:{float:`left`}}}},{[t]:{[`${o}-wrapper`]:Mb(e)}}]},Pb=e=>({zIndexPopup:e.zIndexPopupBase+Nf+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),Fb=e=>{let t=e.paddingMD,n=e.paddingLG;return dc(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:`${Y(e.paddingMD)} ${Y(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},Ib=Ql(`Notification`,e=>{let t=Fb(e);return[Nb(t),Tb(t),jb(t)]},Pb);function Lb(e,t){return t===null||t===!1?null:t||S.createElement(ju,{className:`${e}-close-icon`})}var Rb={success:Tu,info:Lu,error:Ou,warning:Pu},zb=e=>{let{prefixCls:t,icon:n,type:r,title:i,description:a,actions:o,role:s=`alert`,styles:c,classNames:l}=e,u=null;return n?u=S.createElement(`span`,{className:J(`${t}-icon`,l.icon),style:c.icon},n):r&&(u=S.createElement(Rb[r]||null,{className:J(`${t}-icon`,l.icon,`${t}-icon-${r}`),style:c.icon})),S.createElement(`div`,{className:J({[`${t}-with-icon`]:u}),role:s},u,i&&S.createElement(`div`,{className:J(`${t}-title`,l.title),style:c.title},i),a&&S.createElement(`div`,{className:J(`${t}-description`,l.description),style:c.description},a),o&&S.createElement(`div`,{className:J(`${t}-actions`,l.actions),style:c.actions},o))};function Bb(e,t,n){let r;switch(e){case`top`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:t,bottom:`auto`};break;case`topLeft`:r={left:0,top:t,bottom:`auto`};break;case`topRight`:r={right:0,top:t,bottom:`auto`};break;case`bottom`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:`auto`,bottom:n};break;case`bottomLeft`:r={left:0,top:`auto`,bottom:n};break;default:r={right:0,top:`auto`,bottom:n};break}return r}function Vb(e){return{motionName:`${e}-fade`}}function Hb(e,t,n){return e===void 0?t?.closeIcon===void 0?n?.closeIcon:t.closeIcon:e}var Ub=24,Wb=4.5,Gb=`topRight`,Kb=({children:e,prefixCls:t})=>{let n=sp(t),[r,i]=Ib(t,n);return S.createElement(Im,{classNames:{list:J(r,i,n)}},e)},qb=(e,{prefixCls:t,key:n})=>S.createElement(Kb,{prefixCls:t,key:n},e),Jb=S.forwardRef((e,t)=>{let{top:n,bottom:r,prefixCls:i,getContainer:a,maxCount:o,rtl:s,onAllRemoved:c,stack:l,duration:u=Wb,pauseOnHover:d=!0,showProgress:f}=e,{getPrefixCls:p,getPopupContainer:m,direction:h}=ya(`notification`),{notification:g}=(0,S.useContext)(ga),[,_]=Vl(),v=i||p(`notification`),y=(0,S.useMemo)(()=>ef(u)&&u>0?u:!1,[u]),[b,x]=qm({prefixCls:v,style:e=>Bb(e,n??Ub,r??Ub),className:()=>J({[`${v}-rtl`]:s??h===`rtl`}),motion:()=>Vb(v),closable:{closeIcon:Lb(v)},duration:y,getContainer:()=>a?.()||m?.()||document.body,maxCount:o,pauseOnHover:d,showProgress:f,onAllRemoved:c,renderNotifications:qb,stack:l===!1?!1:{threshold:nf(l)?l?.threshold:void 0,offset:8,gap:_.margin}}),[C,w]=Cf([g?.classNames,e?.classNames],[g?.styles,e?.styles],{props:e});return S.useImperativeHandle(t,()=>({...b,prefixCls:v,notification:g,classNames:C,styles:w})),x});function Yb(e){let t=S.useRef(null);Gi(`Notification`);let{notification:n}=S.useContext(ga);return[S.useMemo(()=>{let r=r=>{if(!t.current)return;let{open:i,prefixCls:a,notification:o,classNames:s,styles:c}=t.current,l=o?.className||{},u=o?.style||{},d=`${a}-notice`,{title:f,message:p,description:m,icon:h,type:g,btn:_,actions:v,className:y,style:b,role:x=`alert`,closeIcon:C,closable:w,classNames:T={},styles:E={},...D}=r,O=f??p,k=v??_,A=Lb(d,Hb(C,e,o)),[j,M,,N]=ff(sf({...e||{},...r}),sf(n),{closable:!0,closeIcon:A}),P=j?{onClose:nf(w)?w.onClose:void 0,closeIcon:M,...N}:!1,F=Sf(T,{props:r}),I=Sf(E,{props:r}),L=_f(void 0,s,F),R=yf(c,I);return i({placement:e?.placement??Gb,...D,content:S.createElement(zb,{prefixCls:d,icon:h,type:g,title:O,description:m,actions:k,role:x,classNames:L,styles:R}),className:J({[`${d}-${g}`]:g},y,l,L.root),style:{...u,...R.root,...b},closable:P})},i={open:r,destroy:e=>{e===void 0?t.current?.destroy():t.current?.close(e)}};return[`success`,`info`,`warning`,`error`].forEach(e=>{i[e]=t=>r({...t,type:e})}),i},[e,n]),S.createElement(Jb,{key:`notification-holder`,...e,ref:t})]}function Xb(e){return Yb(e)}var Zb=S.createContext({}),Qb=S.createContext({message:{},notification:{},modal:{}}),$b=Ql(`App`,e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a,[`&${t}-rtl`]:{direction:`rtl`}}}},()=>({})),ex=e=>{let{prefixCls:t,children:n,className:r,rootClassName:i,message:a,notification:o,style:s,component:c=`div`}=e,{direction:l,getPrefixCls:u,className:d,style:f}=ya(`app`),p=u(`app`,t),[m,h]=$b(p),g=J(m,p,r,i,h,{[`${p}-rtl`]:l===`rtl`}),_=(0,S.useContext)(Zb),v=S.useMemo(()=>({message:{..._.message,...a},notification:{..._.notification,...o}}),[a,o,_.message,_.notification]),[y,b]=dh(v.message),[x,C]=Xb(v.notification),[w,T]=wb(),E=S.useMemo(()=>({message:y,notification:x,modal:w}),[y,x,w]);Gi(`App`)(!(h&&c===!1),`usage`,"When using cssVar, ensure `component` is assigned a valid React component string.");let D=c===!1?S.Fragment:c,O={className:J(d,g),style:{...f,...s}};return S.createElement(Qb.Provider,{value:E},S.createElement(Zb.Provider,{value:v},S.createElement(D,{...c===!1?void 0:O},T,b,C,n)))},tx=()=>S.useContext(Qb),nx=ex;nx.useApp=tx;function rx(e){return t=>S.createElement(Mm,{theme:{token:{motion:!1,zIndexPopupBase:0}}},S.createElement(e,{...t}))}var ix=(e,t,n,r,i)=>rx(a=>{let{prefixCls:o,style:s}=a,c=S.useRef(null),[l,u]=S.useState(0),[d,f]=S.useState(0),[p,m]=Gn(!1,a.open),{getPrefixCls:h}=S.useContext(ga),g=h(r||`select`,o);S.useEffect(()=>{if(m(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)}),t=setInterval(()=>{let n=i?`.${i(g)}`:`.${g}-dropdown`,r=c.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[g]);let _={...a,style:{...s,margin:0},open:p,getPopupContainer:()=>c.current};n&&(_=n(_)),t&&(_={..._,[t]:{overflow:{adjustX:!1,adjustY:!1}}});let v={paddingBottom:l,position:`relative`,minWidth:d};return S.createElement(`div`,{ref:c,style:v},S.createElement(e,{..._}))}),ax=(e,t,n,r,i=!1,a,o)=>{let s=(0,S.useMemo)(()=>typeof n==`boolean`?{allowClear:n}:n&&typeof n==`object`?n:{allowClear:!1},[n]);return(0,S.useMemo)(()=>{let e=!i&&s.allowClear!==!1&&(t.length||a)&&!(o===`combobox`&&a===``);return{allowClear:e,clearIcon:e?s.clearIcon||r||`×`:null}},[s,r,i,t.length,a,o])},ox=S.createContext(null);function sx(){return S.useContext(ox)}function cx(e=250){let t=S.useRef(null),n=S.useRef(null);S.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function lx(e,t){return e.filter(e=>e).some(e=>e.contains(t)||e===t)}function ux(e,t,n,r){let i=zn(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!lx(e(),a)&&n(!1)});S.useEffect(()=>(window.addEventListener(`mousedown`,i),()=>window.removeEventListener(`mousedown`,i)),[i])}function dx(){return dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=e===!0?0:1;return{bottomLeft:{points:[`tl`,`bl`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},bottomRight:{points:[`tr`,`br`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topLeft:{points:[`bl`,`tl`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topRight:{points:[`br`,`tr`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`}}},px=S.forwardRef((e,t)=>{let{prefixCls:n,disabled:r,visible:i,children:a,popupElement:o,animation:s,transitionName:c,popupStyle:l,popupClassName:u,direction:d=`ltr`,placement:f,builtinPlacements:p,popupMatchSelectWidth:m,popupRender:h,popupAlign:g,getPopupContainer:_,empty:v,onPopupVisibleChange:y,onPopupMouseEnter:b,onPopupMouseDown:x,onPopupBlur:C,...w}=e,T=`${n}-dropdown`,E=o;h&&(E=h(o));let D=S.useMemo(()=>p||fx(m),[p,m]),O=s?`${T}-${s}`:c,k=typeof m==`number`,A=S.useMemo(()=>k?null:m===!1?`minWidth`:`width`,[m,k]),j=l;k&&(j={...l,width:m});let M=S.useRef(null);return S.useImperativeHandle(t,()=>({getPopupElement:()=>M.current?.popupElement})),S.createElement(sm,dx({},w,{showAction:y?[`click`]:[],hideAction:y?[`click`]:[],popupPlacement:f||(d===`rtl`?`bottomRight`:`bottomLeft`),builtinPlacements:D,prefixCls:T,popupMotion:{motionName:O},popup:S.createElement(`div`,{onMouseEnter:b,onMouseDown:x,onBlur:C},E),ref:M,stretch:A,popupAlign:g,popupVisible:i,getPopupContainer:_,popupClassName:J(u,{[`${T}-empty`]:v}),popupStyle:j,onPopupVisibleChange:y}),a)});function mx(e,t){let{key:n}=e,r;return`value`in e&&({value:r}=e),n??(r===void 0?`rc-index-key-${t}`:r)}function hx(e){return e!==void 0&&!Number.isNaN(e)}function gx(e,t){let{label:n,value:r,options:i,groupLabel:a}=e||{},o=n||(t?`children`:`label`);return{label:o,value:r||`value`,options:i||`options`,groupLabel:a||o}}function _x(e,{fieldNames:t,childrenAsData:n}={}){let r=[],{label:i,value:a,options:o,groupLabel:s}=gx(t,!1);function c(e,t){Array.isArray(e)&&e.forEach(e=>{if(t||!(o in e)){let n=e[a];r.push({key:mx(e,r.length),groupOption:t,data:e,label:e[i],value:n})}else{let t=e[s];t===void 0&&n&&(t=e.label),r.push({key:mx(e,r.length),group:!0,data:e,label:t}),c(e[o],!0)}})}return c(e,!1),r}function vx(e){let t={...e};return`props`in t||Object.defineProperty(t,`props`,{get(){return ui(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var yx=(e,t,n)=>{if(!t||!t.length)return null;let r=!1,i=(e,[t,...n])=>{if(!t)return[e];let a=e.split(t);return r||=a.length>1,a.reduce((e,t)=>[...e,...i(t,n)],[]).filter(Boolean)},a=i(e,t);return r?n===void 0?a:a.slice(0,n):null};function bx(e){let{visible:t,values:n}=e;return t?S.createElement(`span`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`${n.slice(0,50).map(({label:e,value:t})=>[`number`,`string`].includes(typeof e)?e:t).join(`, `)}`,n.length>50?`, ...`:null):null}var xx=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Sx=(e,t=1)=>{if(t<=0){e();return}xx(()=>{Sx(e,t-1)})};function Cx(e,t,n,r){let[i,a]=(0,S.useState)(!1);(0,S.useEffect)(()=>{a(!0)},[]);let[o,s]=Gn(e,t),[c,l]=(0,S.useState)(!1),u=i?o:!1,d=r(u),f=(0,S.useRef)(0),p=zn(e=>{n&&d!==e&&n(e),s(e)});return[u,d,zn((e,t={})=>{let{cancelFun:n}=t;f.current+=1;let r=f.current,i=typeof e==`boolean`?e:!d;l(!i);function a(){r===f.current&&!n?.()&&(p(i),l(!1))}i?a():Sx(()=>{a()})}),c]}function wx(e){let{children:t,...n}=e;return t?S.createElement(`div`,n,t):null}var Tx=S.createContext(null);function Ex(){return S.useContext(Tx)}var Dx=S.forwardRef((e,t)=>{let{onChange:n,onKeyDown:r,onBlur:i,style:a,syncWidth:o,value:s,className:c,autoComplete:l,...u}=e,{prefixCls:d,mode:f,onSearch:p,onSearchSubmit:m,onInputBlur:h,autoFocus:g,tokenWithEnter:_,placeholder:v,components:{input:y=`input`}}=Ex(),{id:b,classNames:x,styles:C,open:w,activeDescendantId:T,role:E,disabled:D}=sx()||{},O=J(`${d}-input`,x?.input,c),k=S.useRef(!1),A=S.useRef(null),j=S.useRef(null);S.useImperativeHandle(t,()=>j.current);let M=e=>{let{value:t}=e.target;if(_&&A.current&&/[\r\n]/.test(A.current)){let e=A.current.replace(/[\r\n]+$/,``).replace(/\r\n/g,` `).replace(/[\r\n]/g,` `);t=t.replace(e,A.current)}A.current=null,p&&p(t,!0,k.current),n?.(e)},N=e=>{let{key:t}=e,{value:n}=e.currentTarget;t===`Enter`&&f===`tags`&&!w&&!k.current&&m&&m(n),r?.(e)},P=e=>{h?.(),i?.(e)},F=()=>{k.current=!0},I=e=>{if(k.current=!1,f!==`combobox`){let{value:t}=e.currentTarget;p?.(t,!0,!1)}},L=e=>{let{clipboardData:t}=e;A.current=t?.getData(`text`)||``},[R,z]=S.useState(void 0);Hn(()=>{let e=j.current;if(o&&e){e.style.width=`0px`;let t=e.scrollWidth;z(t),e.style.width=``}},[o,s]);let B={id:b,type:f===`combobox`?`text`:`search`,...u,ref:j,style:{...C?.input,...a,"--select-input-width":R},autoFocus:g,autoComplete:l||`off`,className:O,disabled:D,value:s||``,onChange:M,onKeyDown:N,onBlur:P,onPaste:L,onCompositionStart:F,onCompositionEnd:I,role:E||`combobox`,"aria-expanded":w||!1,"aria-haspopup":`listbox`,"aria-owns":w?`${b}_list`:void 0,"aria-autocomplete":`list`,"aria-controls":w?`${b}_list`:void 0,"aria-activedescendant":w?T:void 0};if(S.isValidElement(y)){let t=y.props||{},n={placeholder:e.placeholder||v,...B,...t};return Object.keys(t).forEach(e=>{let r=t[e];typeof r==`function`&&(n[e]=(...t)=>{r(...t),B[e]?.(...t)})}),n.ref=cr(y.ref,B.ref),S.cloneElement(y,n)}let V=y;return S.createElement(V,B)});function Ox(e){let{prefixCls:t,placeholder:n,displayValues:r}=Ex(),{classNames:i,styles:a}=sx(),{show:o=!0}=e;return r.length?null:S.createElement(`div`,{className:J(`${t}-placeholder`,i?.placeholder),style:{visibility:o?`visible`:`hidden`,...a?.placeholder}},n)}var kx=S.createContext(null);function Ax(e){return Array.isArray(e)?e:e===void 0?[]:[e]}typeof window<`u`&&window.document&&window.document.documentElement;function jx(e){return e!=null}function Mx(e){return!e&&e!==0}function Nx(e){return[`string`,`number`].includes(typeof e)}function Px(e){let t;return e&&(Nx(e.title)?t=e.title.toString():Nx(e.label)&&(t=e.label.toString())),t}function Fx(){return Fx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,searchValue:r,activeValue:i,displayValues:a,maxLength:o,mode:s,components:c}=Ex(),{triggerOpen:l,title:u,showSearch:d,classNames:f,styles:p}=sx(),m=S.useContext(kx),[h,g]=S.useState(!1),_=s===`combobox`,v=a[0],y=S.useMemo(()=>_&&i&&!h&&l?i:d?r:``,[_,i,h,l,r,d]),[b,x,C,w]=S.useMemo(()=>{let e,t,n;if(v&&m?.flattenOptions){let r=m.flattenOptions.find(e=>e.value===v.value);r?.data&&(e=r.data.className,t=r.data.style,n=Px(r.data))}return v&&!n&&(n=Px(v)),u!==void 0&&(n=u),[e,t,n,!!e||!!t]},[v,m?.flattenOptions,u]);S.useEffect(()=>{_&&g(!1)},[_,i]);let T=v&&v.label!==null&&v.label!==void 0&&String(v.label).trim()!==``,E=_&&c?.input?null:v?w?S.createElement(`div`,{className:J(`${n}-content-value`,b),style:{...y?{visibility:`hidden`}:{},...x},title:C},v.label):v.label:S.createElement(Ox,{show:!y});return S.createElement(`div`,{className:J(`${n}-content`,T&&`${n}-content-has-value`,y&&`${n}-content-has-search-value`,w&&`${n}-content-has-option-style`,f?.content),style:p?.content,title:w?void 0:C},E,S.createElement(Dx,Fx({ref:t},e,{value:y,maxLength:s===`combobox`?o:void 0,onChange:t=>{g(!0),e.onChange?.(t)}})))}),Lx=void 0;function Rx(e,t){let{prefixCls:n,invalidate:r,item:i,renderItem:a,responsive:o,responsiveDisabled:s,registerSize:c,itemKey:l,className:u,style:d,children:f,display:p,order:m,component:h=`div`,...g}=e,_=o&&!p;function v(e){c(l,e)}S.useEffect(()=>()=>{v(null)},[]);let y=a&&i!==Lx?a(i,{index:m}):f,b;r||(b={opacity:+!_,height:_?0:Lx,overflowY:_?`hidden`:Lx,order:o?m:Lx,pointerEvents:_?`none`:Lx,position:_?`absolute`:Lx});let x={};_&&(x[`aria-hidden`]=!0);let C=S.createElement(h,Hg({className:J(!r&&n,u),style:{...b,...d}},x,g,{ref:t}),y);return o&&(C=S.createElement(oa,{onResize:({offsetWidth:e})=>{v(e)},disabled:s},C)),C}var zx=S.forwardRef(Rx);function Bx(e){if(typeof MessageChannel>`u`)Oi(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function Vx(){let e=S.useRef(null);return t=>{e.current||(e.current=[],Bx(()=>{(0,Vi.unstable_batchedUpdates)(()=>{e.current.forEach(e=>{e()}),e.current=null})})),e.current.push(t)}}function Hx(e,t){let[n,r]=S.useState(t);return[n,zn(t=>{e(()=>{r(t)})})]}var Ux=S.createContext(null),Wx=S.forwardRef((e,t)=>{let n=S.useContext(Ux);if(!n){let{component:n=`div`,...r}=e;return S.createElement(n,Hg({},r,{ref:t}))}let{className:r,...i}=n,{className:a,...o}=e;return S.createElement(Ux.Provider,{value:null},S.createElement(zx,Hg({ref:t,className:J(r,a)},i,o)))}),Gx=`responsive`,Kx=`invalidate`;function qx(e){return`+ ${e.length} ...`}function Jx(e,t){let{prefixCls:n=`rc-overflow`,data:r=[],renderItem:i,renderRawItem:a,itemKey:o,itemWidth:s=10,ssr:c,style:l,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:m,suffix:h,component:g=`div`,itemComponent:_,onVisibleChange:v,...y}=e,b=c===`full`,x=Vx(),[C,w]=Hx(x,null),T=C||0,[E,D]=Hx(x,new Map),[O,k]=Hx(x,0),[A,j]=Hx(x,0),[M,N]=Hx(x,0),[P,F]=Hx(x,0),[I,L]=(0,S.useState)(null),[R,z]=(0,S.useState)(null),B=S.useMemo(()=>R===null&&b?2**53-1:R||0,[R,C]),[V,H]=(0,S.useState)(!1),U=`${n}-item`,ee=Math.max(O,A),W=d===Gx,te=r.length&&W,G=d===Kx,ne=te||typeof d==`number`&&r.length>d,K=(0,S.useMemo)(()=>{let e=r;return te?e=C===null&&b?r:r.slice(0,Math.min(r.length,T/s)):typeof d==`number`&&(e=r.slice(0,d)),e},[r,s,C,d,te]),re=(0,S.useMemo)(()=>te?r.slice(B+1):r.slice(K.length),[r,K,te,B]),ie=(0,S.useCallback)((e,t)=>typeof o==`function`?o(e):(o&&e?.[o])??t,[o]),ae=(0,S.useCallback)(i||(e=>e),[i]);function q(e,t,n){R===e&&(t===void 0||t===I)||(z(e),n||(H(e{let r=new Map(n);return t===null?r.delete(e):r.set(e,t),r})}function ce(e,t){j(t),k(A)}function le(e,t){N(t)}function ue(e,t){F(t)}function de(e){return E.get(ie(K[e],e))}Hn(()=>{if(T&&typeof ee==`number`&&K){let e=M+P,t=K.length,n=t-1;if(!t){q(0,null);return}for(let r=0;rT){q(r-1,e-t-P+A);break}}h&&de(0)+P>T&&L(null)}},[T,E,A,M,P,ie,K]);let fe=V&&!!re.length,pe={};I!==null&&te&&(pe={position:`absolute`,top:0,insetInlineStart:I});let me={prefixCls:U,responsive:te,component:_,invalidate:G},he=a?(e,t)=>{let n=ie(e,t);return S.createElement(Ux.Provider,{key:n,value:{...me,order:t,item:e,itemKey:n,registerSize:se,display:t<=B}},a(e,t))}:(e,t)=>{let n=ie(e,t);return S.createElement(zx,Hg({},me,{order:t,key:n,item:e,renderItem:ae,itemKey:n,registerSize:se,display:t<=B}))},ge={order:fe?B:2**53-1,className:`${U}-rest`,registerSize:ce,display:fe},_e=f||qx,ve=p?S.createElement(Ux.Provider,{value:{...me,...ge}},p(re)):S.createElement(zx,Hg({},me,ge),typeof _e==`function`?_e(re):_e),ye=S.createElement(g,Hg({className:J(!G&&n,u),style:l,ref:t},y),m&&S.createElement(zx,Hg({},me,{responsive:W,responsiveDisabled:!te,order:-1,className:`${U}-prefix`,registerSize:le,display:!0}),m),K.map(he),ne?ve:null,h&&S.createElement(zx,Hg({},me,{responsive:W,responsiveDisabled:!te,order:B,className:`${U}-suffix`,registerSize:ue,display:!0,style:pe}),h));return W?S.createElement(oa,{onResize:oe,disabled:!te},ye):ye}var Yx=S.forwardRef(Jx);Yx.Item=Wx,Yx.RESPONSIVE=Gx,Yx.INVALIDATE=Kx;var Xx=Yx,Zx=e=>{let{className:t,style:n,customizeIcon:r,customizeIconProps:i,children:a,onMouseDown:o,onClick:s}=e,c=typeof r==`function`?r(i):r;return S.createElement(`span`,{className:t,onMouseDown:e=>{e.preventDefault(),o?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`,...n},unselectable:`on`,onClick:s,"aria-hidden":!0},c===void 0?S.createElement(`span`,{className:J(t.split(/\s+/).map(e=>`${e}-icon`))},a):c)};function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},tS=S.forwardRef(function({inputProps:e},t){let{prefixCls:n,displayValues:r,searchValue:i,mode:a,onSelectorRemove:o,removeIcon:s}=Ex(),{disabled:c,showSearch:l,triggerOpen:u,rawOpen:d,toggleOpen:f,autoClearSearchValue:p,tagRender:m,maxTagPlaceholder:h,maxTagTextLength:g,maxTagCount:_,classNames:v,styles:y}=sx(),b=`${n}-selection-item`,x=i;!d&&a===`multiple`&&p!==!1&&(x=``);let C=l&&x||``,w=l&&!c,T=s??`×`,E=h??(e=>`+ ${e.length} ...`),D=m,O=e=>{f(e)},k=e=>{o?.(e)},A=(e,t,n,r,i)=>S.createElement(`span`,{title:Px(e),className:J(b,{[`${b}-disabled`]:n},v?.item),style:y?.item},S.createElement(`span`,{className:J(`${b}-content`,v?.itemContent),style:y?.itemContent},t),r&&S.createElement(Zx,{className:J(`${b}-remove`,v?.itemRemove),style:y?.itemRemove,onMouseDown:eS,onClick:i,customizeIcon:T},`×`)),j=(e,t,n,r,i,a,o)=>S.createElement(`span`,{onMouseDown:e=>{eS(e),O(!u)}},D({label:t,value:e,index:o?.index,disabled:n,closable:r,onClose:i,isMaxTag:!!a}));return S.createElement(Xx,{prefixCls:`${n}-content`,className:v?.content,style:y?.content,prefix:!r.length&&!C&&S.createElement(Ox,null),data:r,renderItem:(e,t)=>{let{disabled:n,label:r,value:i}=e,a=!c&&!n,o=r;if(typeof g==`number`&&(typeof r==`string`||typeof r==`number`)){let e=String(o);e.length>g&&(o=`${e.slice(0,g)}...`)}let s=t=>{t&&t.stopPropagation(),k(e)};return typeof D==`function`?j(i,o,n,a,s,void 0,t):A(e,o,n,a,s)},renderRest:e=>{if(!r.length)return null;let t=typeof E==`function`?E(e):E;return typeof D==`function`?j(void 0,t,!1,!1,void 0,!0):A({title:t},t,!1)},suffix:S.createElement(Dx,Qx({ref:t,disabled:c,readOnly:!w},e,{value:C||``,syncWidth:!0})),itemKey:$x,maxCount:_})}),nS=S.forwardRef(function(e,t){let{multiple:n,onInputKeyDown:r,tabIndex:i}=Ex(),a=sx(),{showSearch:o}=a,s={...xi(a,{aria:!0}),onKeyDown:r,readOnly:!o,tabIndex:i};return n?S.createElement(tS,{ref:t,inputProps:s}):S.createElement(Ix,{ref:t,inputProps:s})});function rS(e){return e&&![Qr.ESC,Qr.SHIFT,Qr.BACKSPACE,Qr.TAB,Qr.WIN_KEY,Qr.ALT,Qr.META,Qr.WIN_KEY_RIGHT,Qr.CTRL,Qr.SEMICOLON,Qr.EQUALS,Qr.CAPS_LOCK,Qr.CONTEXT_MENU,Qr.UP,Qr.LEFT,Qr.RIGHT,Qr.F1,Qr.F2,Qr.F3,Qr.F4,Qr.F5,Qr.F6,Qr.F7,Qr.F8,Qr.F9,Qr.F10,Qr.F11,Qr.F12].includes(e)}function iS(){return iS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{which:t}=e,n=F.current instanceof HTMLTextAreaElement;!n&&D&&(t===Qr.UP||t===Qr.DOWN)&&e.preventDefault(),x&&x(e),!(n&&!D&&~[Qr.UP,Qr.DOWN,Qr.LEFT,Qr.RIGHT].indexOf(t))&&!(e.ctrlKey||e.altKey||e.metaKey)&&rS(t)&&O(!0)});S.useImperativeHandle(t,()=>({focus:e=>{(F.current||P.current).focus?.(e)},blur:()=>{(F.current||P.current).blur?.()},nativeElement:kr(P.current)}));let L=zn(e=>{if(!A){let t=kr(F.current);e.nativeEvent._ori_target=t;let n=t===e.target||t?.contains(e.target);t&&!n&&e.preventDefault();let r=D&&!l&&(f===`combobox`||k)||D&&l&&n;e.nativeEvent._select_lazy?D&&O(!1):(F.current?.focus(),r||O())}y?.(e)}),{root:R}=T,z=gi(E,aS),B=xi(z,{aria:!0}),V=Object.keys(B),H={...e,onInputKeyDown:I};if(R){let e=R.props||{},t={...e,...z};return Object.keys(e).forEach(n=>{let r=e[n],i=z[n];typeof r==`function`&&typeof i==`function`&&(t[n]=(...e)=>{i(...e),r(...e)})}),S.isValidElement(R)?S.cloneElement(R,{...t,ref:cr(R.ref,P)}):S.createElement(R,iS({},t,{ref:P}))}return S.createElement(Tx.Provider,{value:H},S.createElement(`div`,iS({},gi(z,V),{ref:P,className:r,style:i,onMouseDown:L}),S.createElement(wx,{className:J(`${n}-prefix`,M?.prefix),style:N?.prefix},a),S.createElement(nS,{ref:F}),S.createElement(wx,{className:J(`${n}-suffix`,{[`${n}-suffix-loading`]:j},M?.suffix),style:N?.suffix},o),s&&S.createElement(wx,{className:J(`${n}-clear`,M?.clear),style:N?.clear,onMouseDown:e=>{e.nativeEvent._select_lazy=!0,b?.(e)}},s),c))});function sS(e,t,n){return S.useMemo(()=>{let{root:r,input:i}=e||{};return n&&(r=n()),t&&(i=t()),{root:r,input:i}},[e,t,n])}function cS(){return cS=Object.assign?Object.assign.bind():function(e){for(var t=1;te===`tags`||e===`multiple`,uS=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,className:i,styles:a,classNames:o,showSearch:s,tagRender:c,showScrollBar:l=`optional`,direction:u,omitDomProps:d,displayValues:f,onDisplayValuesChange:p,emptyOptions:m,notFoundContent:h=`Not Found`,onClear:g,maxCount:_,placeholder:v,mode:y,disabled:b,loading:x,getInputElement:C,getRawInputElement:w,open:T,defaultOpen:E,onPopupVisibleChange:D,activeValue:O,onActiveValueChange:k,activeDescendantId:A,searchValue:j,autoClearSearchValue:M,onSearch:N,onSearchSplit:P,tokenSeparators:F,allowClear:I,prefix:L,suffix:R,suffixIcon:z,clearIcon:B,OptionList:V,animation:H,transitionName:U,popupStyle:ee,popupClassName:W,popupMatchSelectWidth:te,popupRender:G,popupAlign:ne,placement:K,builtinPlacements:re,getPopupContainer:ie,showAction:ae=[],onFocus:q,onBlur:oe,onKeyUp:se,onKeyDown:ce,onMouseDown:le,components:ue,...de}=e,fe=lS(y),pe=S.useRef(null),me=S.useRef(null),he=S.useRef(null),[ge,_e]=S.useState(!1);S.useImperativeHandle(t,()=>({focus:pe.current?.focus,blur:pe.current?.blur,scrollTo:e=>he.current?.scrollTo(e),nativeElement:kr(pe.current)}));let ve=sS(ue,C,w),ye=S.useMemo(()=>{if(y!==`combobox`)return j;let e=f[0]?.value;return typeof e==`string`||typeof e==`number`?String(e):``},[j,y,f]),be=y===`combobox`&&typeof C==`function`&&C()||null,xe=!h&&m,[Se,Ce,we,Te]=Cx(E||!1,T,D,e=>b||xe?!1:e),Ee=S.useMemo(()=>(F||[]).some(e=>[` + ${t}-confirm-body-wrapper`]:{display:`flex`,flexDirection:`column`,flex:`auto`},[`${t}-confirm-body`]:{marginBottom:`auto`}}}]},Xy=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`,[`${t}-confirm-body`]:{direction:`rtl`}}}}},Zy=e=>{let{componentCls:t}=e,n=Ky(e),r={...n};delete r.xs;let i=`--${t.replace(`.`,``)}-`,a=Object.keys(r).map(e=>({[`@media (min-width: ${Y(r[e])})`]:{width:`var(${i}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(pa(Object.keys(n).map((e,t)=>{let r=Object.keys(n)[t-1];return r?{[`${i}${e}-width`]:`var(${i}${r}-width)`}:null})),[{width:`var(${i}xs-width)`}],pa(a))}}},Qy=e=>{let t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return dc(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},$y=e=>({footerBg:`transparent`,headerBg:`transparent`,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${Y(e.paddingMD)} ${Y(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${Y(e.padding)} ${Y(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${Y(e.paddingXS)} ${Y(e.padding)}`:0,footerBorderTop:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,footerBorderRadius:e.wireframe?`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${Y(e.padding*2)} ${Y(e.padding*2)} ${Y(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),eb=Ql(`Modal`,e=>{let t=Qy(e);return[Yy(t),Xy(t),Jy(t),kg(t,`zoom`),Zy(t)]},$y,{unitless:{titleLineHeight:!0}}),tb;vy()&&document.documentElement.addEventListener(`click`,e=>{tb={x:e.pageX,y:e.pageY},setTimeout(()=>{tb=null},100)},!0);var nb=e=>{let{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:a,centered:o,getContainer:s,style:c,width:l=520,footer:u,classNames:d,styles:f,children:p,loading:m,confirmLoading:h,zIndex:g,mousePosition:_,onOk:v,onCancel:y,okButtonProps:b,cancelButtonProps:x,destroyOnHidden:C,destroyOnClose:w,panelRef:T=null,closable:E,mask:D,modalRender:O,maskClosable:k,focusTriggerAfterClose:A,focusable:j,...M}=e,{getPopupContainer:N,getPrefixCls:P,direction:F,className:I,style:L,classNames:R,styles:z,centered:B,cancelButtonProps:V,okButtonProps:H,mask:U}=ya(`modal`),{modal:ee}=S.useContext(ga),[W,te]=S.useMemo(()=>typeof E==`boolean`?[void 0,void 0]:[E?.afterClose,E?.onClose],[E]),G=P(`modal`,t),ne=P(),[K,re,ie]=gf(D,U,G,k),ae=yy(j,K,A),q=e=>{h||(y?.(e),te?.())},oe=e=>{v?.(e),te?.()},se=sp(G),[ce,le]=eb(G,se),ue=J(a,{[`${G}-centered`]:o??B,[`${G}-wrap-rtl`]:F===`rtl`}),de=u!==null&&!m?S.createElement(Wy,{...e,okButtonProps:{...H,...b},onOk:oe,cancelButtonProps:{...V,...x},onCancel:q}):null,[fe,pe,me,he]=pf(sf(e),sf(ee),{closable:!0,closeIcon:S.createElement(ju,{className:`${G}-close-icon`}),closeIconRender:e=>Uy(G,e)}),ge=fe?{disabled:me,closeIcon:pe,afterClose:W,...he}:!1,_e=O?e=>S.createElement(`div`,{className:`${G}-render`},O(e)):void 0,ve=cr(T,By(`.${G}-${O?`render`:`container`}`)),[ye,be]=Lf(`Modal`,g),xe={...e,width:l,panelRef:T,focusTriggerAfterClose:ae.focusTriggerAfterClose,focusable:ae,mask:K,maskClosable:ie,zIndex:ye},[Se,Ce]=Cf([R,d,re],[z,f],{props:xe}),[we,Te]=S.useMemo(()=>nf(l)?[void 0,l]:[l,void 0],[l]),Ee=S.useMemo(()=>{let e={};return Te&&Object.keys(Te).forEach(t=>{let n=Te[t];$d(n)&&(e[`--${G}-${t}-width`]=ef(n)?`${n}px`:n)}),e},[G,Te]);return S.createElement(_y,{form:!0,space:!0},S.createElement(jf.Provider,{value:be},S.createElement(j_,{width:we,...M,zIndex:ye,getContainer:s===void 0?N:s,prefixCls:G,rootClassName:J(ce,r,le,se,Se.root),rootStyle:Ce.root,footer:de,visible:i,mousePosition:_??tb,onClose:q,closable:ge,closeIcon:pe,transitionName:hh(ne,`zoom`,e.transitionName),maskTransitionName:hh(ne,`fade`,e.maskTransitionName),mask:K,maskClosable:ie,className:J(ce,n,I),style:{...L,...c,...Ee},classNames:{...Se,wrapper:J(Se.wrapper,ue)},styles:Ce,panelRef:ve,destroyOnHidden:C??w,modalRender:_e,focusTriggerAfterClose:ae.focusTriggerAfterClose,focusTrap:ae.trap},m?S.createElement(Ry,{active:!0,title:!1,paragraph:{rows:4},className:`${G}-body-skeleton`}):p)))},rb=e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:a,lineHeight:o,modalTitleHeight:s,fontHeight:c,confirmBodyPadding:l}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:`rtl`},[`${e.antCls}-modal-header`]:{display:`none`},[`${u}-body-wrapper`]:{...Gl()},[`&${t} ${t}-body`]:{padding:l},[`${u}-body`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${e.iconCls}`]:{flex:`none`,fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:`flex`,flexDirection:`column`,flex:`auto`,rowGap:e.marginXS,maxWidth:`calc(100% - ${Y(e.marginSM)})`},[`${u}-body-no-icon ${u}-paragraph`]:{maxWidth:`100%`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${Y(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-container`]:{color:e.colorText,fontSize:a,lineHeight:o},[`${u}-btns`]:{textAlign:`end`,marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, + ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},ib=eu([`Modal`,`confirm`],e=>rb(Qy(e)),$y,{order:-1e3}),ab=e=>{let{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:a,type:o,okCancel:s,footer:c,locale:l,autoFocusButton:u,focusable:d,...f}=e,p=n;if(!n&&n!==null)switch(o){case`info`:p=S.createElement(Lu,null);break;case`success`:p=S.createElement(Tu,null);break;case`error`:p=S.createElement(Ou,null);break;default:p=S.createElement(Pu,null)}let m=s??o===`confirm`,h=S.useMemo(()=>{let e=d?.autoFocusButton||u;return e||e===null?e:`ok`},[u,d?.autoFocusButton]),[g]=Yd(`Modal`),_=l||g,v=r||(m?_?.okText:_?.justOkText),y=i||_?.cancelText,{closable:b}=f,{onClose:x}=nf(b)?b:{},C=S.useMemo(()=>({autoFocusButton:h,cancelTextLocale:y,okTextLocale:v,mergedOkCancel:m,onClose:x,...f}),[h,y,v,m,x,f]),w=S.createElement(S.Fragment,null,S.createElement(y_,null),S.createElement(b_,null)),T=$d(e.title)&&e.title!==``,E=$d(p),D=`${a}-body`;return S.createElement(`div`,{className:`${a}-body-wrapper`},S.createElement(`div`,{className:J(D,{[`${D}-has-title`]:T,[`${D}-no-icon`]:!E})},p,S.createElement(`div`,{className:`${a}-paragraph`},T&&S.createElement(`span`,{className:`${a}-title`},e.title),S.createElement(`div`,{className:`${a}-content`},e.content))),c===void 0||typeof c==`function`?S.createElement(v_,{value:C},S.createElement(`div`,{className:`${a}-btns`},typeof c==`function`?c(w,{OkBtn:b_,CancelBtn:y_}):w)):c,S.createElement(ib,{prefixCls:t}))},ob=e=>{let{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:a,wrapClassName:o,rootPrefixCls:s,bodyStyle:c,closable:l=!1,onConfirm:u,styles:d,title:f,mask:p,maskClosable:m,okButtonProps:h,cancelButtonProps:g}=e,{cancelButtonProps:_,okButtonProps:v}=ya(`modal`),y=`${a}-confirm`,b=e.width||416,x=e.style||{},C=J(y,`${y}-${e.type}`,{[`${y}-rtl`]:i===`rtl`},e.className),w=S.useMemo(()=>{let e=hf(p,m);return e.closable??=!1,e},[p,m]),[,T]=Vl(),E=S.useMemo(()=>n===void 0?T.zIndexPopupBase+Nf:n,[n,T]);return S.createElement(nb,{...e,className:C,wrapClassName:J({[`${y}-centered`]:!!e.centered},o),onCancel:()=>{t?.({triggerCancel:!0}),u?.(!1)},title:f,footer:null,transitionName:hh(s||``,`zoom`,e.transitionName),maskTransitionName:hh(s||``,`fade`,e.maskTransitionName),mask:w,style:x,styles:{body:c,mask:r,...d},width:b,zIndex:E,closable:l},S.createElement(ab,{...e,confirmPrefixCls:y,okButtonProps:{...v,...h},cancelButtonProps:{..._,...g}}))},sb=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return S.createElement(jm,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},S.createElement(ob,{...e}))},cb=[],lb=``;function ub(){return lb}var db=e=>{let{prefixCls:t,getContainer:n,direction:r}=e,i=qd(),a=(0,S.useContext)(ga),o=ub()||a.getPrefixCls(),s=t||`${o}-modal`,c=n;return c===!1&&(c=void 0),S.createElement(sb,{...e,rootPrefixCls:o,prefixCls:s,iconPrefixCls:a.iconPrefixCls,theme:a.theme,direction:r??a.direction,locale:a.locale?.Modal??i,getContainer:c})};function fb(e){let t=Am(),n=document.createDocumentFragment(),r={...e,close:s,open:!0},i;function a(...t){t.some(e=>e?.triggerCancel)&&e.onCancel?.(()=>{},...t.slice(1));for(let e=0;e{})}let o=e=>{clearTimeout(i),i=setTimeout(()=>{let r=t.getPrefixCls(void 0,ub()),i=t.getIconPrefixCls(),a=t.getTheme(),o=S.createElement(db,{...e});zi(S.createElement(jm,{prefixCls:r,iconPrefixCls:i,theme:a},typeof t.holderRender==`function`?t.holderRender(o):o),n)})};function s(...t){r={...r,open:!1,afterClose:()=>{typeof e.afterClose==`function`&&e.afterClose(),a.apply(this,t)}},o(r)}function c(e){r=typeof e==`function`?e(r):{...r,...e},o(r)}return o(r),cb.push(s),{destroy:s,update:c}}function pb(e){return{...e,type:`warning`}}function mb(e){return{...e,type:`info`}}function hb(e){return{...e,type:`success`}}function gb(e){return{...e,type:`error`}}function _b(e){return{...e,type:`confirm`}}function vb({rootPrefixCls:e}){lb=e}var yb=S.forwardRef((e,t)=>{let{afterClose:n,config:r,...i}=e,[a,o]=S.useState(!0),[s,c]=S.useState(r),{direction:l,getPrefixCls:u}=S.useContext(ga),d=u(`modal`),f=u(),p=()=>{n(),s.afterClose?.()},m=(...e)=>{o(!1),e.some(e=>e?.triggerCancel)&&s.onCancel?.(()=>{},...e.slice(1))};S.useImperativeHandle(t,()=>({destroy:m,update:e=>{c(t=>{let n=typeof e==`function`?e(t):e;return{...t,...n}})}}));let h=s.okCancel??s.type===`confirm`,[g]=Yd(`Modal`,Hd.Modal);return S.createElement(sb,{prefixCls:d,rootPrefixCls:f,...s,close:m,open:a,afterClose:p,okText:s.okText||(h?g?.okText:g?.justOkText),direction:s.direction||l,cancelText:s.cancelText||g?.cancelText,...i})}),bb=0,xb=S.memo(S.forwardRef((e,t)=>{let[n,r]=Df();return S.useImperativeHandle(t,()=>({patchElement:r}),[r]),S.createElement(S.Fragment,null,n)}));function Sb(){let e=S.useRef(null),[t,n]=S.useState([]);S.useEffect(()=>{t.length&&(pa(t).forEach(e=>{e()}),n([]))},[t]);let r=S.useCallback(t=>function(r){bb+=1;let i=S.createRef(),a,o=new Promise(e=>{a=e}),s=!1,c,l=S.createElement(yb,{key:`modal-${bb}`,config:t(r),ref:i,afterClose:()=>{c?.()},isSilent:()=>s,onConfirm:e=>{a(e)}});return c=e.current?.patchElement(l),c&&cb.push(c),{destroy:()=>{function e(){i.current?.destroy()}i.current?e():n(t=>[].concat(pa(t),[e]))},update:e=>{function t(){i.current?.update(e)}i.current?t():n(e=>[].concat(pa(e),[t]))},then:e=>(s=!0,o.then(e))}},[]);return[S.useMemo(()=>({info:r(mb),success:r(hb),error:r(gb),warning:r(pb),confirm:r(_b)}),[r]),S.createElement(xb,{key:`modal-holder`,ref:e})]}var Cb=e=>{let{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,i=`${t}-notice`,a=new Ms(`antNotificationFadeIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}}),o=new Ms(`antNotificationTopFadeIn`,{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new Ms(`antNotificationBottomFadeIn`,{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),c=new Ms(`antNotificationLeftFadeIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,opacity:1}});return{[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[i]:{marginInline:`auto auto`}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:`auto`,marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:c}}}}},wb=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],Tb={topLeft:`left`,topRight:`right`,bottomLeft:`left`,bottomRight:`right`,top:`left`,bottom:`left`},Eb=(e,t)=>{let{componentCls:n}=e;return{[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith(`top`)?`top`:`bottom`]:0,[Tb[t]]:{value:0,_skip_check_:!0}}}}},Db=e=>{let t={};for(let n=1;n ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return{[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:`hidden`,color:`transparent`,pointerEvents:`none`},...t}},Ob=e=>{let t={};for(let n=1;n{let{componentCls:t}=e;return{[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:`transform, opacity`,position:`absolute`,...Db(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...Ob(e)}},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:`unset`,color:`inherit`,pointerEvents:`auto`,[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:`""`,position:`absolute`,height:e.margin,width:`100%`,insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:`transparent`,pointerEvents:`auto`}}},...wb.map(t=>Eb(e,t)).reduce((e,t)=>({...e,...t}),{})}},Ab=e=>{let{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:a,borderRadiusLG:o,colorSuccess:s,colorInfo:c,colorWarning:l,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:p,notificationMarginEdge:m,progressBg:h,notificationProgressHeight:g,fontSize:_,lineHeight:v,width:y,notificationIconSize:b,colorText:x,colorSuccessBg:S,colorErrorBg:C,colorInfoBg:w,colorWarningBg:T,motionDurationMid:E}=e,D=`${n}-notice`;return{position:`relative`,marginBottom:a,marginInlineStart:`auto`,background:f,borderRadius:o,boxShadow:r,[D]:{padding:p,width:y,maxWidth:`calc(100vw - ${Y(e.calc(m).mul(2).equal())})`,lineHeight:v,wordWrap:`break-word`,borderRadius:o,overflow:`hidden`,"&-success":S?{background:S}:{},"&-error":C?{background:C}:{},"&-info":w?{background:w}:{},"&-warning":T?{background:T}:{}},[`${D}-title`]:{marginBottom:e.marginXS,color:d,fontSize:i,lineHeight:e.lineHeightLG},[`${D}-description`]:{fontSize:_,color:x,marginTop:e.marginXS,"&:first-child":{marginTop:0,marginInlineEnd:e.marginSM}},[`${D}-closable ${D}-title`]:{paddingInlineEnd:e.paddingLG},[`${D}-with-icon ${D}-title`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:i},[`${D}-with-icon ${D}-description`]:{marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:_},[`${D}-icon`]:{position:`absolute`,fontSize:b,lineHeight:1,[`&-success${t}`]:{color:s},[`&-info${t}`]:{color:c},[`&-warning${t}`]:{color:l},[`&-error${t}`]:{color:u}},[`${D}-close`]:{position:`absolute`,top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:`none`,width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:[`color`,`background-color`].map(e=>`${e} ${E}`).join(`, `),display:`flex`,alignItems:`center`,justifyContent:`center`,background:`none`,border:`none`,"&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},...ql(e)},[`${D}-progress`]:{position:`absolute`,display:`block`,appearance:`none`,inlineSize:`calc(100% - ${Y(o)} * 2)`,left:{_skip_check_:!0,value:o},right:{_skip_check_:!0,value:o},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:o,backgroundColor:`rgba(0, 0, 0, 0.04)`},"&::-moz-progress-bar":{background:h},"&::-webkit-progress-value":{borderRadius:o,background:h}},[`${D}-actions`]:{float:`right`,marginTop:e.marginSM}}},jb=e=>{let{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:a}=e,o=`${t}-notice`,s=new Ms(`antNotificationFadeOut`,{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:{...Ul(e),position:`fixed`,zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${t}-hook-holder`]:{position:`relative`},[`${t}-fade-appear-prepare`]:{opacity:`0 !important`},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:a,animationFillMode:`both`,opacity:0,animationPlayState:`paused`},[`${t}-fade-leave`]:{animationTimingFunction:a,animationFillMode:`both`,animationDuration:i,animationPlayState:`paused`},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:`running`},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:s,animationPlayState:`running`},"&-rtl":{direction:`rtl`,[`${o}-actions`]:{float:`left`}}}},{[t]:{[`${o}-wrapper`]:Ab(e)}}]},Mb=e=>({zIndexPopup:e.zIndexPopupBase+Nf+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),Nb=e=>{let t=e.paddingMD,n=e.paddingLG;return dc(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:`${Y(e.paddingMD)} ${Y(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},Pb=Ql(`Notification`,e=>{let t=Nb(e);return[jb(t),Cb(t),kb(t)]},Mb);function Fb(e,t){return t===null||t===!1?null:t||S.createElement(ju,{className:`${e}-close-icon`})}var Ib={success:Tu,info:Lu,error:Ou,warning:Pu},Lb=e=>{let{prefixCls:t,icon:n,type:r,title:i,description:a,actions:o,role:s=`alert`,styles:c,classNames:l}=e,u=null;return n?u=S.createElement(`span`,{className:J(`${t}-icon`,l.icon),style:c.icon},n):r&&(u=S.createElement(Ib[r]||null,{className:J(`${t}-icon`,l.icon,`${t}-icon-${r}`),style:c.icon})),S.createElement(`div`,{className:J({[`${t}-with-icon`]:u}),role:s},u,i&&S.createElement(`div`,{className:J(`${t}-title`,l.title),style:c.title},i),a&&S.createElement(`div`,{className:J(`${t}-description`,l.description),style:c.description},a),o&&S.createElement(`div`,{className:J(`${t}-actions`,l.actions),style:c.actions},o))};function Rb(e,t,n){let r;switch(e){case`top`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:t,bottom:`auto`};break;case`topLeft`:r={left:0,top:t,bottom:`auto`};break;case`topRight`:r={right:0,top:t,bottom:`auto`};break;case`bottom`:r={left:`50%`,transform:`translateX(-50%)`,right:`auto`,top:`auto`,bottom:n};break;case`bottomLeft`:r={left:0,top:`auto`,bottom:n};break;default:r={right:0,top:`auto`,bottom:n};break}return r}function zb(e){return{motionName:`${e}-fade`}}function Bb(e,t,n){return e===void 0?t?.closeIcon===void 0?n?.closeIcon:t.closeIcon:e}var Vb=24,Hb=4.5,Ub=`topRight`,Wb=({children:e,prefixCls:t})=>{let n=sp(t),[r,i]=Pb(t,n);return S.createElement(Fm,{classNames:{list:J(r,i,n)}},e)},Gb=(e,{prefixCls:t,key:n})=>S.createElement(Wb,{prefixCls:t,key:n},e),Kb=S.forwardRef((e,t)=>{let{top:n,bottom:r,prefixCls:i,getContainer:a,maxCount:o,rtl:s,onAllRemoved:c,stack:l,duration:u=Hb,pauseOnHover:d=!0,showProgress:f}=e,{getPrefixCls:p,getPopupContainer:m,direction:h}=ya(`notification`),{notification:g}=(0,S.useContext)(ga),[,_]=Vl(),v=i||p(`notification`),y=(0,S.useMemo)(()=>ef(u)&&u>0?u:!1,[u]),[b,x]=Km({prefixCls:v,style:e=>Rb(e,n??Vb,r??Vb),className:()=>J({[`${v}-rtl`]:s??h===`rtl`}),motion:()=>zb(v),closable:{closeIcon:Fb(v)},duration:y,getContainer:()=>a?.()||m?.()||document.body,maxCount:o,pauseOnHover:d,showProgress:f,onAllRemoved:c,renderNotifications:Gb,stack:l===!1?!1:{threshold:nf(l)?l?.threshold:void 0,offset:8,gap:_.margin}}),[C,w]=Cf([g?.classNames,e?.classNames],[g?.styles,e?.styles],{props:e});return S.useImperativeHandle(t,()=>({...b,prefixCls:v,notification:g,classNames:C,styles:w})),x});function qb(e){let t=S.useRef(null);Gi(`Notification`);let{notification:n}=S.useContext(ga);return[S.useMemo(()=>{let r=r=>{if(!t.current)return;let{open:i,prefixCls:a,notification:o,classNames:s,styles:c}=t.current,l=o?.className||{},u=o?.style||{},d=`${a}-notice`,{title:f,message:p,description:m,icon:h,type:g,btn:_,actions:v,className:y,style:b,role:x=`alert`,closeIcon:C,closable:w,classNames:T={},styles:E={},...D}=r,O=f??p,k=v??_,A=Fb(d,Bb(C,e,o)),[j,M,,N]=ff(sf({...e||{},...r}),sf(n),{closable:!0,closeIcon:A}),P=j?{onClose:nf(w)?w.onClose:void 0,closeIcon:M,...N}:!1,F=Sf(T,{props:r}),I=Sf(E,{props:r}),L=_f(void 0,s,F),R=yf(c,I);return i({placement:e?.placement??Ub,...D,content:S.createElement(Lb,{prefixCls:d,icon:h,type:g,title:O,description:m,actions:k,role:x,classNames:L,styles:R}),className:J({[`${d}-${g}`]:g},y,l,L.root),style:{...u,...R.root,...b},closable:P})},i={open:r,destroy:e=>{e===void 0?t.current?.destroy():t.current?.close(e)}};return[`success`,`info`,`warning`,`error`].forEach(e=>{i[e]=t=>r({...t,type:e})}),i},[e,n]),S.createElement(Kb,{key:`notification-holder`,...e,ref:t})]}function Jb(e){return qb(e)}var Yb=S.createContext({}),Xb=S.createContext({message:{},notification:{},modal:{}}),Zb=Ql(`App`,e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a,[`&${t}-rtl`]:{direction:`rtl`}}}},()=>({})),Qb=e=>{let{prefixCls:t,children:n,className:r,rootClassName:i,message:a,notification:o,style:s,component:c=`div`}=e,{direction:l,getPrefixCls:u,className:d,style:f}=ya(`app`),p=u(`app`,t),[m,h]=Zb(p),g=J(m,p,r,i,h,{[`${p}-rtl`]:l===`rtl`}),_=(0,S.useContext)(Yb),v=S.useMemo(()=>({message:{..._.message,...a},notification:{..._.notification,...o}}),[a,o,_.message,_.notification]),[y,b]=uh(v.message),[x,C]=Jb(v.notification),[w,T]=Sb(),E=S.useMemo(()=>({message:y,notification:x,modal:w}),[y,x,w]);Gi(`App`)(!(h&&c===!1),`usage`,"When using cssVar, ensure `component` is assigned a valid React component string.");let D=c===!1?S.Fragment:c,O={className:J(d,g),style:{...f,...s}};return S.createElement(Xb.Provider,{value:E},S.createElement(Yb.Provider,{value:v},S.createElement(D,{...c===!1?void 0:O},T,b,C,n)))},$b=()=>S.useContext(Xb),ex=Qb;ex.useApp=$b;function tx(e){return t=>S.createElement(jm,{theme:{token:{motion:!1,zIndexPopupBase:0}}},S.createElement(e,{...t}))}var nx=(e,t,n,r,i)=>tx(a=>{let{prefixCls:o,style:s}=a,c=S.useRef(null),[l,u]=S.useState(0),[d,f]=S.useState(0),[p,m]=Gn(!1,a.open),{getPrefixCls:h}=S.useContext(ga),g=h(r||`select`,o);S.useEffect(()=>{if(m(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)}),t=setInterval(()=>{let n=i?`.${i(g)}`:`.${g}-dropdown`,r=c.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[g]);let _={...a,style:{...s,margin:0},open:p,getPopupContainer:()=>c.current};n&&(_=n(_)),t&&(_={..._,[t]:{overflow:{adjustX:!1,adjustY:!1}}});let v={paddingBottom:l,position:`relative`,minWidth:d};return S.createElement(`div`,{ref:c,style:v},S.createElement(e,{..._}))}),rx=(e,t,n,r,i=!1,a,o)=>{let s=(0,S.useMemo)(()=>typeof n==`boolean`?{allowClear:n}:n&&typeof n==`object`?n:{allowClear:!1},[n]);return(0,S.useMemo)(()=>{let e=!i&&s.allowClear!==!1&&(t.length||a)&&!(o===`combobox`&&a===``);return{allowClear:e,clearIcon:e?s.clearIcon||r||`×`:null}},[s,r,i,t.length,a,o])},ix=S.createContext(null);function ax(){return S.useContext(ix)}function ox(e=250){let t=S.useRef(null),n=S.useRef(null);S.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function sx(e,t){return e.filter(e=>e).some(e=>e.contains(t)||e===t)}function cx(e,t,n,r){let i=zn(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!sx(e(),a)&&n(!1)});S.useEffect(()=>(window.addEventListener(`mousedown`,i),()=>window.removeEventListener(`mousedown`,i)),[i])}function lx(){return lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=e===!0?0:1;return{bottomLeft:{points:[`tl`,`bl`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},bottomRight:{points:[`tr`,`br`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topLeft:{points:[`bl`,`tl`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topRight:{points:[`br`,`tr`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`}}},dx=S.forwardRef((e,t)=>{let{prefixCls:n,disabled:r,visible:i,children:a,popupElement:o,animation:s,transitionName:c,popupStyle:l,popupClassName:u,direction:d=`ltr`,placement:f,builtinPlacements:p,popupMatchSelectWidth:m,popupRender:h,popupAlign:g,getPopupContainer:_,empty:v,onPopupVisibleChange:y,onPopupMouseEnter:b,onPopupMouseDown:x,onPopupBlur:C,...w}=e,T=`${n}-dropdown`,E=o;h&&(E=h(o));let D=S.useMemo(()=>p||ux(m),[p,m]),O=s?`${T}-${s}`:c,k=typeof m==`number`,A=S.useMemo(()=>k?null:m===!1?`minWidth`:`width`,[m,k]),j=l;k&&(j={...l,width:m});let M=S.useRef(null);return S.useImperativeHandle(t,()=>({getPopupElement:()=>M.current?.popupElement})),S.createElement(sm,lx({},w,{showAction:y?[`click`]:[],hideAction:y?[`click`]:[],popupPlacement:f||(d===`rtl`?`bottomRight`:`bottomLeft`),builtinPlacements:D,prefixCls:T,popupMotion:{motionName:O},popup:S.createElement(`div`,{onMouseEnter:b,onMouseDown:x,onBlur:C},E),ref:M,stretch:A,popupAlign:g,popupVisible:i,getPopupContainer:_,popupClassName:J(u,{[`${T}-empty`]:v}),popupStyle:j,onPopupVisibleChange:y}),a)});function fx(e,t){let{key:n}=e,r;return`value`in e&&({value:r}=e),n??(r===void 0?`rc-index-key-${t}`:r)}function px(e){return e!==void 0&&!Number.isNaN(e)}function mx(e,t){let{label:n,value:r,options:i,groupLabel:a}=e||{},o=n||(t?`children`:`label`);return{label:o,value:r||`value`,options:i||`options`,groupLabel:a||o}}function hx(e,{fieldNames:t,childrenAsData:n}={}){let r=[],{label:i,value:a,options:o,groupLabel:s}=mx(t,!1);function c(e,t){Array.isArray(e)&&e.forEach(e=>{if(t||!(o in e)){let n=e[a];r.push({key:fx(e,r.length),groupOption:t,data:e,label:e[i],value:n})}else{let t=e[s];t===void 0&&n&&(t=e.label),r.push({key:fx(e,r.length),group:!0,data:e,label:t}),c(e[o],!0)}})}return c(e,!1),r}function gx(e){let t={...e};return`props`in t||Object.defineProperty(t,`props`,{get(){return ui(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var _x=(e,t,n)=>{if(!t||!t.length)return null;let r=!1,i=(e,[t,...n])=>{if(!t)return[e];let a=e.split(t);return r||=a.length>1,a.reduce((e,t)=>[...e,...i(t,n)],[]).filter(Boolean)},a=i(e,t);return r?n===void 0?a:a.slice(0,n):null};function vx(e){let{visible:t,values:n}=e;return t?S.createElement(`span`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`${n.slice(0,50).map(({label:e,value:t})=>[`number`,`string`].includes(typeof e)?e:t).join(`, `)}`,n.length>50?`, ...`:null):null}var yx=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},bx=(e,t=1)=>{if(t<=0){e();return}yx(()=>{bx(e,t-1)})};function xx(e,t,n,r){let[i,a]=(0,S.useState)(!1);(0,S.useEffect)(()=>{a(!0)},[]);let[o,s]=Gn(e,t),[c,l]=(0,S.useState)(!1),u=i?o:!1,d=r(u),f=(0,S.useRef)(0),p=zn(e=>{n&&d!==e&&n(e),s(e)});return[u,d,zn((e,t={})=>{let{cancelFun:n}=t;f.current+=1;let r=f.current,i=typeof e==`boolean`?e:!d;l(!i);function a(){r===f.current&&!n?.()&&(p(i),l(!1))}i?a():bx(()=>{a()})}),c]}function Sx(e){let{children:t,...n}=e;return t?S.createElement(`div`,n,t):null}var Cx=S.createContext(null);function wx(){return S.useContext(Cx)}var Tx=S.forwardRef((e,t)=>{let{onChange:n,onKeyDown:r,onBlur:i,style:a,syncWidth:o,value:s,className:c,autoComplete:l,...u}=e,{prefixCls:d,mode:f,onSearch:p,onSearchSubmit:m,onInputBlur:h,autoFocus:g,tokenWithEnter:_,placeholder:v,components:{input:y=`input`}}=wx(),{id:b,classNames:x,styles:C,open:w,activeDescendantId:T,role:E,disabled:D}=ax()||{},O=J(`${d}-input`,x?.input,c),k=S.useRef(!1),A=S.useRef(null),j=S.useRef(null);S.useImperativeHandle(t,()=>j.current);let M=e=>{let{value:t}=e.target;if(_&&A.current&&/[\r\n]/.test(A.current)){let e=A.current.replace(/[\r\n]+$/,``).replace(/\r\n/g,` `).replace(/[\r\n]/g,` `);t=t.replace(e,A.current)}A.current=null,p&&p(t,!0,k.current),n?.(e)},N=e=>{let{key:t}=e,{value:n}=e.currentTarget;t===`Enter`&&f===`tags`&&!w&&!k.current&&m&&m(n),r?.(e)},P=e=>{h?.(),i?.(e)},F=()=>{k.current=!0},I=e=>{if(k.current=!1,f!==`combobox`){let{value:t}=e.currentTarget;p?.(t,!0,!1)}},L=e=>{let{clipboardData:t}=e;A.current=t?.getData(`text`)||``},[R,z]=S.useState(void 0);Hn(()=>{let e=j.current;if(o&&e){e.style.width=`0px`;let t=e.scrollWidth;z(t),e.style.width=``}},[o,s]);let B={id:b,type:f===`combobox`?`text`:`search`,...u,ref:j,style:{...C?.input,...a,"--select-input-width":R},autoFocus:g,autoComplete:l||`off`,className:O,disabled:D,value:s||``,onChange:M,onKeyDown:N,onBlur:P,onPaste:L,onCompositionStart:F,onCompositionEnd:I,role:E||`combobox`,"aria-expanded":w||!1,"aria-haspopup":`listbox`,"aria-owns":w?`${b}_list`:void 0,"aria-autocomplete":`list`,"aria-controls":w?`${b}_list`:void 0,"aria-activedescendant":w?T:void 0};if(S.isValidElement(y)){let t=y.props||{},n={placeholder:e.placeholder||v,...B,...t};return Object.keys(t).forEach(e=>{let r=t[e];typeof r==`function`&&(n[e]=(...t)=>{r(...t),B[e]?.(...t)})}),n.ref=cr(y.ref,B.ref),S.cloneElement(y,n)}let V=y;return S.createElement(V,B)});function Ex(e){let{prefixCls:t,placeholder:n,displayValues:r}=wx(),{classNames:i,styles:a}=ax(),{show:o=!0}=e;return r.length?null:S.createElement(`div`,{className:J(`${t}-placeholder`,i?.placeholder),style:{visibility:o?`visible`:`hidden`,...a?.placeholder}},n)}var Dx=S.createContext(null);function Ox(e){return Array.isArray(e)?e:e===void 0?[]:[e]}typeof window<`u`&&window.document&&window.document.documentElement;function kx(e){return e!=null}function Ax(e){return!e&&e!==0}function jx(e){return[`string`,`number`].includes(typeof e)}function Mx(e){let t;return e&&(jx(e.title)?t=e.title.toString():jx(e.label)&&(t=e.label.toString())),t}function Nx(){return Nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,searchValue:r,activeValue:i,displayValues:a,maxLength:o,mode:s,components:c}=wx(),{triggerOpen:l,title:u,showSearch:d,classNames:f,styles:p}=ax(),m=S.useContext(Dx),[h,g]=S.useState(!1),_=s===`combobox`,v=a[0],y=S.useMemo(()=>_&&i&&!h&&l?i:d?r:``,[_,i,h,l,r,d]),[b,x,C,w]=S.useMemo(()=>{let e,t,n;if(v&&m?.flattenOptions){let r=m.flattenOptions.find(e=>e.value===v.value);r?.data&&(e=r.data.className,t=r.data.style,n=Mx(r.data))}return v&&!n&&(n=Mx(v)),u!==void 0&&(n=u),[e,t,n,!!e||!!t]},[v,m?.flattenOptions,u]);S.useEffect(()=>{_&&g(!1)},[_,i]);let T=v&&v.label!==null&&v.label!==void 0&&String(v.label).trim()!==``,E=_&&c?.input?null:v?w?S.createElement(`div`,{className:J(`${n}-content-value`,b),style:{...y?{visibility:`hidden`}:{},...x},title:C},v.label):v.label:S.createElement(Ex,{show:!y});return S.createElement(`div`,{className:J(`${n}-content`,T&&`${n}-content-has-value`,y&&`${n}-content-has-search-value`,w&&`${n}-content-has-option-style`,f?.content),style:p?.content,title:w?void 0:C},E,S.createElement(Tx,Nx({ref:t},e,{value:y,maxLength:s===`combobox`?o:void 0,onChange:t=>{g(!0),e.onChange?.(t)}})))}),Fx=void 0;function Ix(e,t){let{prefixCls:n,invalidate:r,item:i,renderItem:a,responsive:o,responsiveDisabled:s,registerSize:c,itemKey:l,className:u,style:d,children:f,display:p,order:m,component:h=`div`,...g}=e,_=o&&!p;function v(e){c(l,e)}S.useEffect(()=>()=>{v(null)},[]);let y=a&&i!==Fx?a(i,{index:m}):f,b;r||(b={opacity:+!_,height:_?0:Fx,overflowY:_?`hidden`:Fx,order:o?m:Fx,pointerEvents:_?`none`:Fx,position:_?`absolute`:Fx});let x={};_&&(x[`aria-hidden`]=!0);let C=S.createElement(h,Vg({className:J(!r&&n,u),style:{...b,...d}},x,g,{ref:t}),y);return o&&(C=S.createElement(oa,{onResize:({offsetWidth:e})=>{v(e)},disabled:s},C)),C}var Lx=S.forwardRef(Ix);function Rx(e){if(typeof MessageChannel>`u`)Oi(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function zx(){let e=S.useRef(null);return t=>{e.current||(e.current=[],Rx(()=>{(0,Vi.unstable_batchedUpdates)(()=>{e.current.forEach(e=>{e()}),e.current=null})})),e.current.push(t)}}function Bx(e,t){let[n,r]=S.useState(t);return[n,zn(t=>{e(()=>{r(t)})})]}var Vx=S.createContext(null),Hx=S.forwardRef((e,t)=>{let n=S.useContext(Vx);if(!n){let{component:n=`div`,...r}=e;return S.createElement(n,Vg({},r,{ref:t}))}let{className:r,...i}=n,{className:a,...o}=e;return S.createElement(Vx.Provider,{value:null},S.createElement(Lx,Vg({ref:t,className:J(r,a)},i,o)))}),Ux=`responsive`,Wx=`invalidate`;function Gx(e){return`+ ${e.length} ...`}function Kx(e,t){let{prefixCls:n=`rc-overflow`,data:r=[],renderItem:i,renderRawItem:a,itemKey:o,itemWidth:s=10,ssr:c,style:l,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:m,suffix:h,component:g=`div`,itemComponent:_,onVisibleChange:v,...y}=e,b=c===`full`,x=zx(),[C,w]=Bx(x,null),T=C||0,[E,D]=Bx(x,new Map),[O,k]=Bx(x,0),[A,j]=Bx(x,0),[M,N]=Bx(x,0),[P,F]=Bx(x,0),[I,L]=(0,S.useState)(null),[R,z]=(0,S.useState)(null),B=S.useMemo(()=>R===null&&b?2**53-1:R||0,[R,C]),[V,H]=(0,S.useState)(!1),U=`${n}-item`,ee=Math.max(O,A),W=d===Ux,te=r.length&&W,G=d===Wx,ne=te||typeof d==`number`&&r.length>d,K=(0,S.useMemo)(()=>{let e=r;return te?e=C===null&&b?r:r.slice(0,Math.min(r.length,T/s)):typeof d==`number`&&(e=r.slice(0,d)),e},[r,s,C,d,te]),re=(0,S.useMemo)(()=>te?r.slice(B+1):r.slice(K.length),[r,K,te,B]),ie=(0,S.useCallback)((e,t)=>typeof o==`function`?o(e):(o&&e?.[o])??t,[o]),ae=(0,S.useCallback)(i||(e=>e),[i]);function q(e,t,n){R===e&&(t===void 0||t===I)||(z(e),n||(H(e{let r=new Map(n);return t===null?r.delete(e):r.set(e,t),r})}function ce(e,t){j(t),k(A)}function le(e,t){N(t)}function ue(e,t){F(t)}function de(e){return E.get(ie(K[e],e))}Hn(()=>{if(T&&typeof ee==`number`&&K){let e=M+P,t=K.length,n=t-1;if(!t){q(0,null);return}for(let r=0;rT){q(r-1,e-t-P+A);break}}h&&de(0)+P>T&&L(null)}},[T,E,A,M,P,ie,K]);let fe=V&&!!re.length,pe={};I!==null&&te&&(pe={position:`absolute`,top:0,insetInlineStart:I});let me={prefixCls:U,responsive:te,component:_,invalidate:G},he=a?(e,t)=>{let n=ie(e,t);return S.createElement(Vx.Provider,{key:n,value:{...me,order:t,item:e,itemKey:n,registerSize:se,display:t<=B}},a(e,t))}:(e,t)=>{let n=ie(e,t);return S.createElement(Lx,Vg({},me,{order:t,key:n,item:e,renderItem:ae,itemKey:n,registerSize:se,display:t<=B}))},ge={order:fe?B:2**53-1,className:`${U}-rest`,registerSize:ce,display:fe},_e=f||Gx,ve=p?S.createElement(Vx.Provider,{value:{...me,...ge}},p(re)):S.createElement(Lx,Vg({},me,ge),typeof _e==`function`?_e(re):_e),ye=S.createElement(g,Vg({className:J(!G&&n,u),style:l,ref:t},y),m&&S.createElement(Lx,Vg({},me,{responsive:W,responsiveDisabled:!te,order:-1,className:`${U}-prefix`,registerSize:le,display:!0}),m),K.map(he),ne?ve:null,h&&S.createElement(Lx,Vg({},me,{responsive:W,responsiveDisabled:!te,order:B,className:`${U}-suffix`,registerSize:ue,display:!0,style:pe}),h));return W?S.createElement(oa,{onResize:oe,disabled:!te},ye):ye}var qx=S.forwardRef(Kx);qx.Item=Hx,qx.RESPONSIVE=Ux,qx.INVALIDATE=Wx;var Jx=qx,Yx=e=>{let{className:t,style:n,customizeIcon:r,customizeIconProps:i,children:a,onMouseDown:o,onClick:s}=e,c=typeof r==`function`?r(i):r;return S.createElement(`span`,{className:t,onMouseDown:e=>{e.preventDefault(),o?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`,...n},unselectable:`on`,onClick:s,"aria-hidden":!0},c===void 0?S.createElement(`span`,{className:J(t.split(/\s+/).map(e=>`${e}-icon`))},a):c)};function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},$x=S.forwardRef(function({inputProps:e},t){let{prefixCls:n,displayValues:r,searchValue:i,mode:a,onSelectorRemove:o,removeIcon:s}=wx(),{disabled:c,showSearch:l,triggerOpen:u,rawOpen:d,toggleOpen:f,autoClearSearchValue:p,tagRender:m,maxTagPlaceholder:h,maxTagTextLength:g,maxTagCount:_,classNames:v,styles:y}=ax(),b=`${n}-selection-item`,x=i;!d&&a===`multiple`&&p!==!1&&(x=``);let C=l&&x||``,w=l&&!c,T=s??`×`,E=h??(e=>`+ ${e.length} ...`),D=m,O=e=>{f(e)},k=e=>{o?.(e)},A=(e,t,n,r,i)=>S.createElement(`span`,{title:Mx(e),className:J(b,{[`${b}-disabled`]:n},v?.item),style:y?.item},S.createElement(`span`,{className:J(`${b}-content`,v?.itemContent),style:y?.itemContent},t),r&&S.createElement(Yx,{className:J(`${b}-remove`,v?.itemRemove),style:y?.itemRemove,onMouseDown:Qx,onClick:i,customizeIcon:T},`×`)),j=(e,t,n,r,i,a,o)=>S.createElement(`span`,{onMouseDown:e=>{Qx(e),O(!u)}},D({label:t,value:e,index:o?.index,disabled:n,closable:r,onClose:i,isMaxTag:!!a}));return S.createElement(Jx,{prefixCls:`${n}-content`,className:v?.content,style:y?.content,prefix:!r.length&&!C&&S.createElement(Ex,null),data:r,renderItem:(e,t)=>{let{disabled:n,label:r,value:i}=e,a=!c&&!n,o=r;if(typeof g==`number`&&(typeof r==`string`||typeof r==`number`)){let e=String(o);e.length>g&&(o=`${e.slice(0,g)}...`)}let s=t=>{t&&t.stopPropagation(),k(e)};return typeof D==`function`?j(i,o,n,a,s,void 0,t):A(e,o,n,a,s)},renderRest:e=>{if(!r.length)return null;let t=typeof E==`function`?E(e):E;return typeof D==`function`?j(void 0,t,!1,!1,void 0,!0):A({title:t},t,!1)},suffix:S.createElement(Tx,Xx({ref:t,disabled:c,readOnly:!w},e,{value:C||``,syncWidth:!0})),itemKey:Zx,maxCount:_})}),eS=S.forwardRef(function(e,t){let{multiple:n,onInputKeyDown:r,tabIndex:i}=wx(),a=ax(),{showSearch:o}=a,s={...xi(a,{aria:!0}),onKeyDown:r,readOnly:!o,tabIndex:i};return n?S.createElement($x,{ref:t,inputProps:s}):S.createElement(Px,{ref:t,inputProps:s})});function tS(e){return e&&![Qr.ESC,Qr.SHIFT,Qr.BACKSPACE,Qr.TAB,Qr.WIN_KEY,Qr.ALT,Qr.META,Qr.WIN_KEY_RIGHT,Qr.CTRL,Qr.SEMICOLON,Qr.EQUALS,Qr.CAPS_LOCK,Qr.CONTEXT_MENU,Qr.UP,Qr.LEFT,Qr.RIGHT,Qr.F1,Qr.F2,Qr.F3,Qr.F4,Qr.F5,Qr.F6,Qr.F7,Qr.F8,Qr.F9,Qr.F10,Qr.F11,Qr.F12].includes(e)}function nS(){return nS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{which:t}=e,n=F.current instanceof HTMLTextAreaElement;!n&&D&&(t===Qr.UP||t===Qr.DOWN)&&e.preventDefault(),x&&x(e),!(n&&!D&&~[Qr.UP,Qr.DOWN,Qr.LEFT,Qr.RIGHT].indexOf(t))&&!(e.ctrlKey||e.altKey||e.metaKey)&&tS(t)&&O(!0)});S.useImperativeHandle(t,()=>({focus:e=>{(F.current||P.current).focus?.(e)},blur:()=>{(F.current||P.current).blur?.()},nativeElement:kr(P.current)}));let L=zn(e=>{if(!A){let t=kr(F.current);e.nativeEvent._ori_target=t;let n=t===e.target||t?.contains(e.target);t&&!n&&e.preventDefault();let r=D&&!l&&(f===`combobox`||k)||D&&l&&n;e.nativeEvent._select_lazy?D&&O(!1):(F.current?.focus(),r||O())}y?.(e)}),{root:R}=T,z=gi(E,rS),B=xi(z,{aria:!0}),V=Object.keys(B),H={...e,onInputKeyDown:I};if(R){let e=R.props||{},t={...e,...z};return Object.keys(e).forEach(n=>{let r=e[n],i=z[n];typeof r==`function`&&typeof i==`function`&&(t[n]=(...e)=>{i(...e),r(...e)})}),S.isValidElement(R)?S.cloneElement(R,{...t,ref:cr(R.ref,P)}):S.createElement(R,nS({},t,{ref:P}))}return S.createElement(Cx.Provider,{value:H},S.createElement(`div`,nS({},gi(z,V),{ref:P,className:r,style:i,onMouseDown:L}),S.createElement(Sx,{className:J(`${n}-prefix`,M?.prefix),style:N?.prefix},a),S.createElement(eS,{ref:F}),S.createElement(Sx,{className:J(`${n}-suffix`,{[`${n}-suffix-loading`]:j},M?.suffix),style:N?.suffix},o),s&&S.createElement(Sx,{className:J(`${n}-clear`,M?.clear),style:N?.clear,onMouseDown:e=>{e.nativeEvent._select_lazy=!0,b?.(e)}},s),c))});function aS(e,t,n){return S.useMemo(()=>{let{root:r,input:i}=e||{};return n&&(r=n()),t&&(i=t()),{root:r,input:i}},[e,t,n])}function oS(){return oS=Object.assign?Object.assign.bind():function(e){for(var t=1;te===`tags`||e===`multiple`,cS=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,className:i,styles:a,classNames:o,showSearch:s,tagRender:c,showScrollBar:l=`optional`,direction:u,omitDomProps:d,displayValues:f,onDisplayValuesChange:p,emptyOptions:m,notFoundContent:h=`Not Found`,onClear:g,maxCount:_,placeholder:v,mode:y,disabled:b,loading:x,getInputElement:C,getRawInputElement:w,open:T,defaultOpen:E,onPopupVisibleChange:D,activeValue:O,onActiveValueChange:k,activeDescendantId:A,searchValue:j,autoClearSearchValue:M,onSearch:N,onSearchSplit:P,tokenSeparators:F,allowClear:I,prefix:L,suffix:R,suffixIcon:z,clearIcon:B,OptionList:V,animation:H,transitionName:U,popupStyle:ee,popupClassName:W,popupMatchSelectWidth:te,popupRender:G,popupAlign:ne,placement:K,builtinPlacements:re,getPopupContainer:ie,showAction:ae=[],onFocus:q,onBlur:oe,onKeyUp:se,onKeyDown:ce,onMouseDown:le,components:ue,...de}=e,fe=sS(y),pe=S.useRef(null),me=S.useRef(null),he=S.useRef(null),[ge,_e]=S.useState(!1);S.useImperativeHandle(t,()=>({focus:pe.current?.focus,blur:pe.current?.blur,scrollTo:e=>he.current?.scrollTo(e),nativeElement:kr(pe.current)}));let ve=aS(ue,C,w),ye=S.useMemo(()=>{if(y!==`combobox`)return j;let e=f[0]?.value;return typeof e==`string`||typeof e==`number`?String(e):``},[j,y,f]),be=y===`combobox`&&typeof C==`function`&&C()||null,xe=!h&&m,[Se,Ce,we,Te]=xx(E||!1,T,D,e=>b||xe?!1:e),Ee=S.useMemo(()=>(F||[]).some(e=>[` `,`\r -`].includes(e)),[F]),De=(e,t,n)=>{if(fe&&hx(_)&&f.length>=_)return;let r=!0,i=e;k?.(null);let a=yx(e,F,hx(_)?_-f.length:void 0),o=n?null:a;return y!==`combobox`&&o&&(i=``,P?.(o),we(!1),r=!1),N&&ye!==i&&N(i,{source:t?`typing`:`effect`}),e&&t&&r&&we(!0),r},Oe=e=>{!e||!e.trim()||N(e,{source:`submit`})};S.useEffect(()=>{!Se&&!fe&&y!==`combobox`&&De(``,!1,!1)},[Se]),S.useEffect(()=>{b&&(we(!1),_e(!1))},[b,Ce]);let[ke,Ae]=cx(),je=S.useRef(!1),Me=e=>{let t=ke(),{key:n}=e,r=n===`Enter`,i=n===` `;if(r||i){let t=y===`combobox`;(i&&!(t||s)||r&&!t)&&e.preventDefault(),Ce||we(!0)}if(Ae(!!ye),n===`Backspace`&&!t&&fe&&!ye&&f.length){let e=[...f],t=null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(!r.disabled){e.splice(n,1),t=r;break}}t&&p(e,{type:`remove`,values:[t]})}Ce&&(!r||!je.current)&&!i&&(r&&(je.current=!0),he.current?.onKeyDown(e)),ce?.(e)},Ne=(e,...t)=>{Ce&&he.current?.onKeyUp(e,...t),e.key===`Enter`&&(je.current=!1),se?.(e,...t)},Pe=zn(e=>{p(f.filter(t=>t!==e),{type:`remove`,values:[e]})}),Fe=()=>{je.current=!1},Ie=()=>[kr(pe.current),me.current?.getPopupElement()];ux(Ie,Ce,we,!!ve.root);let Le=S.useRef(!1),Re=e=>{_e(!0),b||(ae.includes(`focus`)&&we(!0),q?.(e))},ze=()=>{Ce&&!Le.current&&we(!1,{cancelFun:()=>lx(Ie(),document.activeElement)})},Be=e=>{_e(!1),ye&&(y===`tags`?N(ye,{source:`submit`}):y===`multiple`&&N(``,{source:`blur`})),ze(),b||oe?.(e)},Ve=(e,...t)=>{let{target:n}=e;(me.current?.getPopupElement())?.contains(n)&&we&&we(!0),le?.(e,...t),Le.current=!0,Sx(()=>{Le.current=!1})},[,He]=S.useState({});function Ue(){He({})}let We;ve.root&&(We=e=>{we(e)});let Ge=S.useMemo(()=>({...e,notFoundContent:h,open:Ce,triggerOpen:Ce,rawOpen:Se,id:n,showSearch:s,multiple:fe,toggleOpen:we,showScrollBar:l,styles:a,classNames:o,lockOptions:Te}),[e,h,we,n,s,fe,Ce,Se,l,a,o,Te]),Ke=S.useMemo(()=>{let e=R??z;return typeof e==`function`?e({searchValue:ye,open:Ce,focused:ge,showSearch:s,loading:x}):e},[R,z,ye,Ce,ge,s,x]),qe=()=>{g?.(),pe.current?.focus(),p([],{type:`clear`,values:f}),De(``,!1,!1)},{allowClear:Je,clearIcon:Ye}=ax(r,f,I,B,b,ye,y),Xe=S.createElement(V,{ref:he}),Ze=J(r,i,{[`${r}-focused`]:ge,[`${r}-multiple`]:fe,[`${r}-single`]:!fe,[`${r}-allow-clear`]:Je,[`${r}-show-arrow`]:Ke!=null,[`${r}-disabled`]:b,[`${r}-loading`]:x,[`${r}-open`]:Ce,[`${r}-customize-input`]:be,[`${r}-show-search`]:s}),Qe=S.createElement(oS,cS({},de,{ref:pe,prefixCls:r,className:Ze,focused:ge,prefix:L,suffix:Ke,clearIcon:Ye,multiple:fe,mode:y,displayValues:f,placeholder:v,searchValue:ye,activeValue:O,onSearch:De,onSearchSubmit:Oe,onInputBlur:Fe,onFocus:Re,onBlur:Be,onClearMouseDown:qe,onKeyDown:Me,onKeyUp:Ne,onSelectorRemove:Pe,tokenWithEnter:Ee,onMouseDown:Ve,components:ve}));return Qe=S.createElement(px,{ref:me,disabled:b,prefixCls:r,visible:Ce,popupElement:Xe,animation:H,transitionName:U,popupStyle:ee,popupClassName:W,direction:u,popupMatchSelectWidth:te,popupRender:G,popupAlign:ne,placement:K,builtinPlacements:re,getPopupContainer:ie,empty:m,onPopupVisibleChange:We,onPopupMouseEnter:Ue,onPopupMouseDown:Ve,onPopupBlur:ze},Qe),S.createElement(ox.Provider,{value:Ge},S.createElement(bx,{visible:ge&&!Ce,values:f}),Qe)}),dS=()=>null;dS.isSelectOptGroup=!0;var fS=()=>null;fS.isSelectOption=!0;var pS=S.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:i,onInnerResize:a,innerProps:o,rtl:s,extra:c},l)=>{let u={},d={display:`flex`,flexDirection:`column`};return t!==void 0&&(u={height:e,position:`relative`,overflow:`hidden`},d={...d,transform:`translateY(${t}px)`,[s?`marginRight`:`marginLeft`]:-n,position:`absolute`,left:0,right:0,top:0}),S.createElement(`div`,{style:u},S.createElement(oa,{onResize:({offsetHeight:e})=>{e&&a&&a()}},S.createElement(`div`,Hg({style:d,className:J({[`${i}-holder-inner`]:i}),ref:l},o),r,c)))});pS.displayName=`Filler`;function mS({children:e,setRef:t}){let n=S.useCallback(e=>{t(e)},[]);return S.cloneElement(e,{ref:n})}function hS(e,t,n,r,i,a,o,{getKey:s}){return e.slice(t,n+1).map((e,n)=>{let c=o(e,t+n,{style:{width:r},offsetX:i}),l=s(e);return S.createElement(mS,{key:l,setRef:t=>a(e,t)},c)})}function gS(e,t,n){let r=e.length,i=t.length,a,o;if(r===0&&i===0)return null;r{let a=gS(r||[],e||[],t);a?.index!==void 0&&(n?.(a.index),o(e[a.index])),i(e)},[e]),[a]}var vS=typeof navigator==`object`&&/Firefox/i.test(navigator.userAgent),yS=((e,t,n,r)=>{let i=(0,S.useRef)(!1),a=(0,S.useRef)(null);function o(){clearTimeout(a.current),i.current=!0,a.current=setTimeout(()=>{i.current=!1},50)}let s=(0,S.useRef)({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,(e,t,n=!1)=>{let r=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&r?(clearTimeout(a.current),i.current=!1):(!r||i.current)&&o(),!i.current&&r}});function bS(e,t,n,r,i,a,o){let s=(0,S.useRef)(0),c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(!1),d=yS(t,n,r,i);function f(e,t){if(Oi.cancel(c.current),d(!1,t))return;let n=e;if(!n._virtualHandled)n._virtualHandled=!0;else return;s.current+=t,l.current=t,vS||n.preventDefault(),c.current=Oi(()=>{let e=u.current?10:1;o(s.current*e,!1),s.current=0})}function p(e,t){o(t,!0),vS||e.preventDefault()}let m=(0,S.useRef)(null),h=(0,S.useRef)(null);function g(t){if(!e)return;Oi.cancel(h.current),h.current=Oi(()=>{m.current=null},2);let{deltaX:n,deltaY:r,shiftKey:i}=t,o=n,s=r;(m.current===`sx`||!m.current&&i&&r&&!n)&&(o=r,s=0,m.current=`sx`);let c=Math.abs(o),l=Math.abs(s);m.current===null&&(m.current=a&&c>l?`x`:`y`),m.current===`y`?f(t,s):p(t,o)}function _(t){e&&(u.current=t.detail===l.current)}return[g,_]}function xS(e,t,n,r){let[i,a]=S.useMemo(()=>[new Map,[]],[e,n.id,r]);return(o,s=o)=>{let c=i.get(o),l=i.get(s);if(c===void 0||l===void 0){let u=e.length;for(let d=a.length;d{let e=!1;a.current.forEach((t,n)=>{if(t&&t.offsetParent){let{offsetHeight:r}=t,{marginTop:i,marginBottom:a}=getComputedStyle(t),s=CS(i),c=CS(a),l=r+s+c;o.current.get(n)!==l&&(o.current.set(n,l),e=!0)}}),e&&i(e=>e+1)};if(e)t();else{s.current+=1;let e=s.current;Promise.resolve().then(()=>{e===s.current&&t()})}}function u(r,i){let o=e(r),s=a.current.get(o);i?(a.current.set(o,i),l()):a.current.delete(o),!s!=!i&&(i?t?.(r):n?.(r))}return(0,S.useEffect)(()=>c,[]),[u,l,o.current,r]}var TS=14/15;function ES(e,t,n){let r=(0,S.useRef)(!1),i=(0,S.useRef)(0),a=(0,S.useRef)(0),o=(0,S.useRef)(null),s=(0,S.useRef)(null),c,l=e=>{if(r.current){let t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),o=i.current-t,c=a.current-r,l=Math.abs(o)>Math.abs(c);l?i.current=t:a.current=r;let u=n(l,l?o:c,!1,e);u&&e.preventDefault(),clearInterval(s.current),u&&(s.current=setInterval(()=>{l?o*=TS:c*=TS;let e=Math.floor(l?o:c);(!n(l,e,!0)||Math.abs(e)<=.1)&&clearInterval(s.current)},16))}},u=()=>{r.current=!1,c()},d=e=>{c(),e.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),o.current=e.target,o.current.addEventListener(`touchmove`,l,{passive:!1}),o.current.addEventListener(`touchend`,u,{passive:!0}))};c=()=>{o.current&&(o.current.removeEventListener(`touchmove`,l),o.current.removeEventListener(`touchend`,u))},Hn(()=>(e&&t.current.addEventListener(`touchstart`,d,{passive:!0}),()=>{t.current?.removeEventListener(`touchstart`,d),c(),clearInterval(s.current)}),[e])}function DS(e){return Math.floor(e**.5)}function OS(e,t){return(`touches`in e?e.touches[0]:e)[t?`pageX`:`pageY`]-window[t?`scrollX`:`scrollY`]}function kS(e,t,n){S.useEffect(()=>{let r=t.current;if(e&&r){let e=!1,t,i,a=()=>{Oi.cancel(t)},o=()=>{a(),t=Oi(()=>{n(i),o()})},s=()=>{e=!1,a()},c=t=>{if(t.target.draggable||t.button!==0)return;let n=t;n._virtualHandled||(n._virtualHandled=!0,e=!0)},l=t=>{if(e){let e=OS(t,!1),{top:n,bottom:s}=r.getBoundingClientRect();e<=n?(i=-DS(n-e),o()):e>=s?(i=DS(e-s),o()):a()}};return r.addEventListener(`mousedown`,c),r.ownerDocument.addEventListener(`mouseup`,s),r.ownerDocument.addEventListener(`mousemove`,l),r.ownerDocument.addEventListener(`dragend`,s),()=>{r.removeEventListener(`mousedown`,c),r.ownerDocument.removeEventListener(`mouseup`,s),r.ownerDocument.removeEventListener(`mousemove`,l),r.ownerDocument.removeEventListener(`dragend`,s),a()}}},[e])}var AS=10;function jS(e,t,n,r,i,a,o,s){let c=S.useRef(),[l,u]=S.useState(null);return Hn(()=>{if(l&&l.times({...e}));return}a();let{targetAlign:s,originAlign:c,index:d,offset:f}=l,p=e.current.clientHeight,m=!1,h=s,g=null;if(p){let a=s||c,u=0,_=0,v=0,y=Math.min(t.length-1,d);for(let e=0;e<=y;e+=1){let a=i(t[e]);_=u;let o=n.get(a);v=_+(o===void 0?r:o),u=v}let b=a===`top`?f:p-f;for(let e=y;e>=0;--e){let r=i(t[e]),a=n.get(r);if(a===void 0){m=!0;break}if(b-=a,b<=0)break}switch(a){case`top`:g=_-f;break;case`bottom`:g=v-p+f;break;default:{let{scrollTop:t}=e.current,n=t+p;_n&&(h=`bottom`)}}g!==null&&o(g),g!==l.lastTop&&(m=!0)}m&&u({...l,times:l.times+1,targetAlign:h,lastTop:g})}},[l,e.current]),e=>{if(e==null){s();return}if(Oi.cancel(c.current),typeof e==`number`)o(e);else if(e&&typeof e==`object`){let n,{align:r}=e;`index`in e?{index:n}=e:n=t.findIndex(t=>i(t)===e.key);let{offset:a=0}=e;u({times:0,index:n,offset:a,originAlign:r})}}}var MS=S.forwardRef((e,t)=>{let{prefixCls:n,rtl:r,scrollOffset:i,scrollRange:a,onStartMove:o,onStopMove:s,onScroll:c,horizontal:l,spinSize:u,containerSize:d,style:f,thumbStyle:p,showScrollBar:m}=e,[h,g]=S.useState(!1),[_,v]=S.useState(null),[y,b]=S.useState(null),x=!r,C=S.useRef(),w=S.useRef(),[T,E]=S.useState(m),D=S.useRef(),O=()=>{m===!0||m===!1||(clearTimeout(D.current),E(!0),D.current=setTimeout(()=>{E(!1)},3e3))},k=a-d||0,A=d-u||0,j=S.useMemo(()=>i===0||k===0?0:i/k*A,[i,k,A]),M=e=>{e.stopPropagation(),e.preventDefault()},N=S.useRef({top:j,dragging:h,pageY:_,startTop:y});N.current={top:j,dragging:h,pageY:_,startTop:y};let P=e=>{g(!0),v(OS(e,l)),b(N.current.top),o(),e.stopPropagation(),e.preventDefault()};S.useEffect(()=>{let e=e=>{e.preventDefault()},t=C.current,n=w.current;return t.addEventListener(`touchstart`,e,{passive:!1}),n.addEventListener(`touchstart`,P,{passive:!1}),()=>{t.removeEventListener(`touchstart`,e),n.removeEventListener(`touchstart`,P)}},[]);let F=S.useRef();F.current=k;let I=S.useRef();I.current=A,S.useEffect(()=>{if(h){let e,t=t=>{let{dragging:n,pageY:r,startTop:i}=N.current;Oi.cancel(e);let a=C.current.getBoundingClientRect(),o=d/(l?a.width:a.height);if(n){let n=(OS(t,l)-r)*o,a=i;!x&&l?a-=n:a+=n;let s=F.current,u=I.current,d=u?a/u:0,f=Math.ceil(d*s);f=Math.max(f,0),f=Math.min(f,s),e=Oi(()=>{c(f,l)})}},n=()=>{g(!1),s()};return window.addEventListener(`mousemove`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`mouseup`,n,{passive:!0}),window.addEventListener(`touchend`,n,{passive:!0}),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`mouseup`,n),window.removeEventListener(`touchend`,n),Oi.cancel(e)}}},[h]),S.useEffect(()=>(O(),()=>{clearTimeout(D.current)}),[i]),S.useImperativeHandle(t,()=>({delayHidden:O}));let L=`${n}-scrollbar`,R={position:`absolute`,visibility:T?null:`hidden`},z={position:`absolute`,borderRadius:99,background:`var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))`,cursor:`pointer`,userSelect:`none`};return l?(Object.assign(R,{height:8,left:0,right:0,bottom:0}),Object.assign(z,{height:`100%`,width:u,[x?`left`:`right`]:j})):(Object.assign(R,{width:8,top:0,bottom:0,[x?`right`:`left`]:0}),Object.assign(z,{width:`100%`,height:u,top:j})),S.createElement(`div`,{ref:C,className:J(L,{[`${L}-horizontal`]:l,[`${L}-vertical`]:!l,[`${L}-visible`]:T}),style:{...R,...f},onMouseDown:M,onMouseMove:O},S.createElement(`div`,{ref:w,className:J(`${L}-thumb`,{[`${L}-thumb-moving`]:h}),style:{...z,...p},onMouseDown:P}))}),NS=20;function PS(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,NS),Math.floor(n)}var FS=[],IS={overflowY:`auto`,overflowAnchor:`none`};function LS(e,t){let{prefixCls:n=`rc-virtual-list`,className:r,height:i,itemHeight:a,fullHeight:o=!0,style:s,data:c,children:l,itemKey:u,virtual:d,direction:f,scrollWidth:p,component:m=`div`,onScroll:h,onVirtualScroll:g,onVisibleChange:_,innerProps:v,extraRender:y,styles:b,showScrollBar:x=`optional`,...C}=e,w=S.useCallback(e=>typeof u==`function`?u(e):e?.[u],[u]),[T,E,D,O]=wS(w,null,null),k=!!(d!==!1&&i&&a),A=S.useMemo(()=>Object.values(D.maps).reduce((e,t)=>e+t,0),[D.id,D.maps]),j=k&&c&&(Math.max(a*c.length,A)>i||!!p),M=f===`rtl`,N=J(n,{[`${n}-rtl`]:M},r),P=c||FS,F=(0,S.useRef)(),I=(0,S.useRef)(),L=(0,S.useRef)(),[R,z]=(0,S.useState)(0),[B,V]=(0,S.useState)(0),[H,U]=(0,S.useState)(!1),ee=()=>{U(!0)},W=()=>{U(!1)},te={getKey:w};function G(e){z(t=>{let n;n=typeof e==`function`?e(t):e;let r=ge(n);return F.current.scrollTop=r,r})}let ne=(0,S.useRef)({start:0,end:P.length}),K=(0,S.useRef)(),[re]=_S(P,w);K.current=re;let{scrollHeight:ie,start:ae,end:q,offset:oe}=S.useMemo(()=>{if(!k)return{scrollHeight:void 0,start:0,end:P.length-1,offset:void 0};if(!j)return{scrollHeight:I.current?.offsetHeight||0,start:0,end:P.length-1,offset:void 0};let e=0,t,n,r,o=P.length;for(let s=0;s=R&&t===void 0&&(t=s,n=e),u>R+i&&r===void 0&&(r=s),e=u}return t===void 0&&(t=0,n=0,r=Math.ceil(i/a)),r===void 0&&(r=P.length-1),r=Math.min(r+1,P.length-1),{scrollHeight:e,start:t,end:r,offset:n}},[j,k,R,P,O,i]);ne.current.start=ae,ne.current.end=q,S.useLayoutEffect(()=>{let e=D.getRecord();if(e.size===1){let t=Array.from(e.keys())[0],n=e.get(t),r=P[ae];if(r&&n===void 0&&w(r)===t){let e=D.get(t)-a;G(t=>t+e)}}D.resetRecord()},[ie]);let[se,ce]=S.useState({width:0,height:i}),le=e=>{ce({width:e.offsetWidth,height:e.offsetHeight})},ue=(0,S.useRef)(),de=(0,S.useRef)(),fe=S.useMemo(()=>PS(se.width,p),[se.width,p]),pe=S.useMemo(()=>PS(se.height,ie),[se.height,ie]),me=ie-i,he=(0,S.useRef)(me);he.current=me;function ge(e){let t=e;return Number.isNaN(he.current)||(t=Math.min(t,he.current)),t=Math.max(t,0),t}let _e=R<=0,ve=R>=me,ye=B<=0,be=B>=p,xe=yS(_e,ve,ye,be),Se=()=>({x:M?-B:B,y:R}),Ce=(0,S.useRef)(Se()),we=zn(e=>{if(g){let t={...Se(),...e};(Ce.current.x!==t.x||Ce.current.y!==t.y)&&(g(t),Ce.current=t)}});function Te(e,t){let n=e;t?((0,Vi.flushSync)(()=>{V(n)}),we()):G(n)}function Ee(e){let{scrollTop:t}=e.currentTarget;t!==R&&G(t),h?.(e),we()}let De=e=>{let t=e,n=p?p-se.width:0;return t=Math.max(t,0),t=Math.min(t,n),t},Oe=zn((e,t)=>{t?((0,Vi.flushSync)(()=>{V(t=>De(t+(M?-e:e)))}),we()):G(t=>t+e)}),[ke,Ae]=bS(k,_e,ve,ye,be,!!p,Oe);ES(k,F,(e,t,n,r)=>{let i=r;return xe(e,t,n)?!1:!i||!i._virtualHandled?(i&&(i._virtualHandled=!0),ke({preventDefault(){},deltaX:e?t:0,deltaY:e?0:t}),!0):!1}),kS(j,F,e=>{G(t=>t+e)}),Hn(()=>{function e(e){let t=_e&&e.detail<0,n=ve&&e.detail>0;k&&!t&&!n&&e.preventDefault()}let t=F.current;return t.addEventListener(`wheel`,ke,{passive:!1}),t.addEventListener(`DOMMouseScroll`,Ae,{passive:!0}),t.addEventListener(`MozMousePixelScroll`,e,{passive:!1}),()=>{t.removeEventListener(`wheel`,ke),t.removeEventListener(`DOMMouseScroll`,Ae),t.removeEventListener(`MozMousePixelScroll`,e)}},[k,_e,ve]),Hn(()=>{if(p){let e=De(B);V(e),we({x:e})}},[se.width,p]);let je=()=>{ue.current?.delayHidden(),de.current?.delayHidden()},Me=jS(F,P,D,a,w,()=>E(!0),G,je);S.useImperativeHandle(t,()=>({nativeElement:L.current,getScrollInfo:Se,scrollTo:e=>{function t(e){return e&&typeof e==`object`&&(`left`in e||`top`in e)}t(e)?(e.left!==void 0&&V(De(e.left)),Me(e.top)):Me(e)}})),Hn(()=>{_&&_(P.slice(ae,q+1),P)},[ae,q,P]);let Ne=xS(P,w,D,a),Pe=y?.({start:ae,end:q,virtual:j,offsetX:B,offsetY:oe,rtl:M,getSize:Ne}),Fe=hS(P,ae,q,p,B,T,l,te),Ie=null;i&&(Ie={[o?`height`:`maxHeight`]:i,...IS},k&&(Ie.overflowY=`hidden`,p&&(Ie.overflowX=`hidden`),H&&(Ie.pointerEvents=`none`)));let Le={};return M&&(Le.dir=`rtl`),S.createElement(`div`,Hg({ref:L,style:{...s,position:`relative`},className:N},Le,C),S.createElement(oa,{onResize:le},S.createElement(m,{className:`${n}-holder`,style:Ie,ref:F,onScroll:Ee,onMouseEnter:je},S.createElement(pS,{prefixCls:n,height:ie,offsetX:B,offsetY:oe,scrollWidth:p,onInnerResize:E,ref:I,innerProps:v,rtl:M,extra:Pe},Fe))),j&&ie>i&&S.createElement(MS,{ref:ue,prefixCls:n,scrollOffset:R,scrollRange:ie,rtl:M,onScroll:Te,onStartMove:ee,onStopMove:W,spinSize:pe,containerSize:se.height,style:b?.verticalScrollBar,thumbStyle:b?.verticalScrollBarThumb,showScrollBar:x}),j&&p>se.width&&S.createElement(MS,{ref:de,prefixCls:n,scrollOffset:B,scrollRange:p,rtl:M,onScroll:Te,onStartMove:ee,onStopMove:W,spinSize:fe,containerSize:se.width,horizontal:!0,style:b?.horizontalScrollBar,thumbStyle:b?.horizontalScrollBarThumb,showScrollBar:x}))}var RS=S.forwardRef(LS);RS.displayName=`List`;var zS=RS;function BS(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function VS(){return VS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,open:i,multiple:a,mode:o,searchValue:s,toggleOpen:c,notFoundContent:l,onPopupScroll:u,showScrollBar:d,lockOptions:f}=sx(),{maxCount:p,flattenOptions:m,onActiveValue:h,defaultActiveFirstOption:g,onSelect:_,menuItemSelectedIcon:v,rawValues:y,fieldNames:b,virtual:x,direction:C,listHeight:w,listItemHeight:T,optionRender:E,classNames:D,styles:O}=S.useContext(kx),k=`${n}-item`,A=Zn(()=>m,[i,f],(e,t)=>t[0]&&!t[1]),j=S.useRef(null),M=S.useMemo(()=>a&&hx(p)&&y?.size>=p,[a,p,y?.size]),N=e=>{e.preventDefault()},P=e=>{j.current?.scrollTo(typeof e==`number`?{index:e}:e)},F=S.useCallback(e=>o===`combobox`?!1:y.has(e),[o,[...y].toString(),y.size]),I=(e,t=1)=>{let n=A.length;for(let r=0;rI(0)),z=(e,t=!1)=>{R(e);let n={source:t?`keyboard`:`mouse`},r=A[e];if(!r){h(null,-1,n);return}h(r.value,e,n)};(0,S.useEffect)(()=>{z(g===!1?-1:I(0))},[A.length,s]);let B=S.useCallback(e=>o===`combobox`?String(e).toLowerCase()===s.toLowerCase():y.has(e),[o,s,[...y].toString(),y.size]);(0,S.useEffect)(()=>{let e;if(!a&&i&&y.size===1){let t=Array.from(y)[0],n=A.findIndex(({data:e})=>s?String(e.value).startsWith(s):e.value===t);n!==-1&&(z(n),e=setTimeout(()=>{P(n)}))}return i&&j.current?.scrollTo(void 0),()=>clearTimeout(e)},[i,s]);let V=e=>{e!==void 0&&_(e,{selected:!y.has(e)}),a||c(!1)};if(S.useImperativeHandle(t,()=>({onKeyDown:e=>{let{which:t,ctrlKey:n}=e;switch(t){case Qr.N:case Qr.P:case Qr.UP:case Qr.DOWN:{let e=0;if(t===Qr.UP?e=-1:t===Qr.DOWN?e=1:BS()&&n&&(t===Qr.N?e=1:t===Qr.P&&(e=-1)),e!==0){let t=I(L+e,e);P(t),z(t,!0)}break}case Qr.TAB:case Qr.ENTER:{let t=A[L];if(!t||t.data.disabled)return V(void 0);!M||y.has(t.value)?V(t.value):V(void 0),i&&e.preventDefault();break}case Qr.ESC:c(!1),i&&e.stopPropagation()}},onKeyUp:()=>{},scrollTo:e=>{P(e)}})),A.length===0)return S.createElement(`div`,{role:`listbox`,id:`${r}_list`,className:`${k}-empty`,onMouseDown:N},l);let H=Object.keys(b).map(e=>b[e]),U=e=>e.label;function ee(e,t){let{group:n}=e;return{role:n?`presentation`:`option`,id:`${r}_list_${t}`}}let W=e=>{let t=A[e];if(!t)return null;let n=t.data||{},{value:r,disabled:i}=n,{group:a}=t,o=xi(n,!0),s=U(t);return t?S.createElement(`div`,VS({"aria-label":typeof s==`string`&&!a?s:null},o,{key:e},ee(t,e),{"aria-selected":B(r),"aria-disabled":i}),r):null},te={role:`listbox`,id:`${r}_list`};return S.createElement(S.Fragment,null,x&&S.createElement(`div`,VS({},te,{style:{height:0,width:0,overflow:`hidden`}}),W(L-1),W(L),W(L+1)),S.createElement(zS,{itemKey:`key`,ref:j,data:A,height:w,itemHeight:T,fullHeight:!1,onMouseDown:N,onScroll:u,virtual:x,direction:C,innerProps:x?null:te,showScrollBar:d,className:D?.popup?.list,style:O?.popup?.list},(e,t)=>{let{group:n,groupOption:r,data:i,label:a,value:o}=e,{key:s}=i;if(n){let e=i.title??(HS(a)?a.toString():void 0);return S.createElement(`div`,{className:J(k,`${k}-group`,i.className),title:e},a===void 0?s:a)}let{disabled:c,title:l,children:u,style:d,className:f,...p}=i,m=gi(p,H),h=F(o),g=c||!h&&M,_=`${k}-option`,y=J(k,_,f,D?.popup?.listItem,{[`${_}-grouped`]:r,[`${_}-active`]:L===t&&!g,[`${_}-disabled`]:g,[`${_}-selected`]:h}),b=U(e),C=!v||typeof v==`function`||h,w=typeof b==`number`?b:b||o,T=HS(w)?w.toString():void 0;return l!==void 0&&(T=l),S.createElement(`div`,VS({},xi(m),x?{}:ee(e,t),{"aria-selected":x?void 0:B(o),"aria-disabled":g,className:y,title:T,onMouseMove:()=>{L===t||g||z(t)},onClick:()=>{g||V(o)},style:{...O?.popup?.listItem,...d}}),S.createElement(`div`,{className:`${_}-content`},typeof E==`function`?E(e,{index:t}):w),S.isValidElement(v)||h,C&&S.createElement(Zx,{className:`${k}-option-state`,customizeIcon:v,customizeIconProps:{value:o,disabled:g,isSelected:h}},h?`✓`:null))}))}),WS=((e,t)=>{let n=S.useRef({values:new Map,options:new Map});return[S.useMemo(()=>{let{values:r,options:i}=n.current,a=e.map(e=>e.label===void 0?{...e,label:r.get(e.value)?.label}:e),o=new Map,s=new Map;return a.forEach(e=>{o.set(e.value,e),s.set(e.value,t.get(e.value)||i.get(e.value))}),n.current.values=o,n.current.options=s,a},[e,t]),S.useCallback(e=>t.get(e)||n.current.options.get(e),[t])]});function GS(e,t){return Ax(e).join(``).toUpperCase().includes(t)}var KS=((e,t,n,r,i)=>S.useMemo(()=>{if(!n||r===!1)return e;let{options:a,label:o,value:s}=t,c=[],l=typeof r==`function`,u=n.toUpperCase(),d=l?r:(e,t)=>i&&i.length?i.some(e=>GS(t[e],u)):t[a]?GS(t[o===`children`?`label`:o],u):GS(t[s],u),f=l?e=>vx(e):e=>e;return e.forEach(e=>{if(e[a]){if(d(n,f(e)))c.push(e);else{let t=e[a].filter(e=>d(n,f(e)));t.length&&c.push({...e,[a]:t})}return}d(n,f(e))&&c.push(e)}),c},[e,r,i,n,t]));function qS(e){let{key:t,props:{children:n,value:r,...i}}=e;return{key:t,value:r===void 0?t:r,children:n,...i}}function JS(e,t=!1){return ki(e).map((e,n)=>{if(!S.isValidElement(e)||!e.type)return null;let{type:{isSelectOptGroup:r},key:i,props:{children:a,...o}}=e;return t||!r?qS(e):{key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i,...o,options:JS(a)}}).filter(e=>e)}var YS=(e,t,n,r,i)=>S.useMemo(()=>{let a=e;e||(a=JS(t));let o=new Map,s=new Map,c=(e,t,n)=>{n&&typeof n==`string`&&e.set(t[n],t)},l=(e,t=!1)=>{for(let a=0;a{c(s,u,e)}),c(s,u,i)):l(u[n.options],!0)}};return l(a),{options:a,valueOptions:o,labelOptions:s}},[e,t,n,r,i]);function XS(e){let t=S.useRef();return t.current=e,S.useCallback((...e)=>t.current(...e),[])}function ZS(e,t,n){let{filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c}=t;return S.useMemo(()=>{let t=typeof e==`object`,l={filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c,...t?e:{}};return[t||n===`combobox`||n===`tags`||n===`multiple`&&e===void 0?!0:e,l]},[n,e,r,i,a,o,s,c])}function QS(){return QS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,mode:r,prefixCls:i=`rc-select`,backfill:a,fieldNames:o,showSearch:s,searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p,onSelect:m,onDeselect:h,onActive:g,popupMatchSelectWidth:_=!0,optionLabelProp:v,options:y,optionRender:b,children:x,defaultActiveFirstOption:C,menuItemSelectedIcon:w,virtual:T,direction:E,listHeight:D=200,listItemHeight:O=20,labelRender:k,value:A,defaultValue:j,labelInValue:M,onChange:N,maxCount:P,classNames:F,styles:I,...L}=e,[R,z]=ZS(s,{searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p},r),{filterOption:B,searchValue:V,optionFilterProp:H,filterSort:U,onSearch:ee,autoClearSearchValue:W=!0}=z,te=S.useMemo(()=>H?Array.isArray(H)?H:[H]:[],[H]),G=Xn(n),ne=lS(r),K=!!(!y&&x),re=S.useMemo(()=>B===void 0&&r===`combobox`?!1:B,[B,r]),ie=S.useMemo(()=>gx(o,K),[JSON.stringify(o),K]),[ae,q]=Gn(``,V),oe=ae||``,se=YS(y,x,ie,te,v),{valueOptions:ce,labelOptions:le,options:ue}=se,de=S.useCallback(e=>Ax(e).map(e=>{let t,n,r,i;eC(e)?t=e:(n=e.label,t=e.value);let a=ce.get(t);return a&&(n===void 0&&(n=a?.[v||ie.label]),r=a?.disabled,i=a?.title),{label:n,value:t,key:t,disabled:r,title:i}}),[ie,v,ce]),[fe,pe]=Gn(j,A),[me,he]=WS(S.useMemo(()=>{let e=de(ne&&fe===null?[]:fe);return r===`combobox`&&Mx(e[0]?.value)?[]:e},[fe,de,r,ne]),ce),ge=S.useMemo(()=>{if(!r&&me.length===1){let e=me[0];if(e.value===null&&(e.label===null||e.label===void 0))return[]}return me.map(e=>({...e,label:(typeof k==`function`?k(e):e.label)??e.value}))},[r,me,k]),_e=S.useMemo(()=>new Set(me.map(e=>e.value)),[me]);S.useEffect(()=>{if(r===`combobox`){let e=me[0]?.value;q(jx(e)?String(e):``)}},[me]);let ve=XS((e,t)=>{let n=t??e;return{[ie.value]:e,[ie.label]:n}}),ye=KS(S.useMemo(()=>{if(r!==`tags`)return ue;let e=[...ue],t=e=>ce.has(e);return[...me].sort((e,t)=>e.value{let r=n.value;t(r)||e.push(ve(r,n.label))}),e},[ve,ue,ce,me,r]),ie,oe,re,te),be=S.useMemo(()=>{let e=e=>te.length?te.some(t=>e?.[t]===oe):e?.value===oe;return r!==`tags`||!oe||ye.some(t=>e(t))||ye.some(e=>e[ie.value]===oe)?ye:[ve(oe),...ye]},[ve,te,r,ye,oe,ie]),xe=e=>[...e].sort((e,t)=>U(e,t,{searchValue:oe})).map(e=>Array.isArray(e.options)?{...e,options:e.options.length>0?xe(e.options):e.options}:e),Se=S.useMemo(()=>U?xe(be):be,[be,U,oe]),Ce=S.useMemo(()=>_x(Se,{fieldNames:ie,childrenAsData:K}),[Se,ie,K]),we=e=>{let t=de(e);if(pe(t),N&&(t.length!==me.length||t.some((e,t)=>me[t]?.value!==e?.value))){let e=M?t.map(({label:e,value:t})=>({label:e,value:t})):t.map(e=>e.value),n=t.map(e=>vx(he(e.value)));N(ne?e:e[0],ne?n:n[0])}},[Te,Ee]=S.useState(null),[De,Oe]=S.useState(0),ke=C===void 0?r!==`combobox`:C,Ae=S.useRef(),je=S.useCallback((e,t,{source:n=`keyboard`}={})=>{Oe(t),a&&r===`combobox`&&e!==null&&n===`keyboard`&&Ee(String(e));let i=Promise.resolve().then(()=>{Ae.current===i&&g?.(e)});Ae.current=i},[a,r,g]),Me=(e,t,n)=>{let r=()=>{let t=he(e);return[M?{label:t?.[ie.label],value:e}:e,vx(t)]};if(t&&m){let[e,t]=r();m(e,t)}else if(!t&&h&&n!==`clear`){let[e,t]=r();h(e,t)}},Ne=XS((e,t)=>{let n,i=ne?t.selected:!0;n=i?ne?[...me,e]:[e]:me.filter(t=>t.value!==e),we(n),Me(e,i),r===`combobox`?Ee(``):(!lS||W)&&(q(``),Ee(``))}),Pe=(e,t)=>{we(e);let{type:n,values:r}=t;(n===`remove`||n===`clear`)&&r.forEach(e=>{Me(e.value,!1,n)})},Fe=(e,t)=>{if(q(e),Ee(null),t.source===`submit`){let t=(e||``).trim();t&&(we(Array.from(new Set([..._e,t]))),Me(t,!0),q(``));return}t.source!==`blur`&&(r===`combobox`&&we(e),ee?.(e))},Ie=e=>{let t=e;r!==`tags`&&(t=e.map(e=>le.get(e)?.value).filter(e=>e!==void 0));let n=Array.from(new Set([..._e,...t]));we(n),n.forEach(e=>{Me(e,!0)})},Le=S.useMemo(()=>{let e=T!==!1&&_!==!1;return{...se,flattenOptions:Ce,onActiveValue:je,defaultActiveFirstOption:ke,onSelect:Ne,menuItemSelectedIcon:w,rawValues:_e,fieldNames:ie,virtual:e,direction:E,listHeight:D,listItemHeight:O,childrenAsData:K,maxCount:P,optionRender:b,classNames:F,styles:I}},[P,se,Ce,je,ke,Ne,w,_e,ie,T,_,E,D,O,K,b,F,I]);return S.createElement(kx.Provider,{value:Le},S.createElement(uS,QS({},L,{id:G,prefixCls:i,ref:t,omitDomProps:$S,mode:r,classNames:F,styles:I,displayValues:ge,onDisplayValuesChange:Pe,maxCount:P,direction:E,showSearch:R,searchValue:oe,onSearch:Fe,autoClearSearchValue:W,onSearchSplit:Ie,popupMatchSelectWidth:_,OptionList:US,emptyOptions:!Ce.length,activeValue:Te,activeDescendantId:`${G}_list_${De}`})))});tC.Option=fS,tC.OptGroup=dS;var nC=tC,rC=(e,t,n)=>J({[`${e}-status-success`]:t===`success`,[`${e}-status-warning`]:t===`warning`,[`${e}-status-error`]:t===`error`,[`${e}-status-validating`]:t===`validating`,[`${e}-has-feedback`]:n}),iC=(e,t)=>t||e,aC=()=>{let[,e]=Vl(),[t]=Yd(`Empty`),n=new Nc(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return S.createElement(`svg`,{style:n,width:`184`,height:`152`,viewBox:`0 0 184 152`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`g`,{transform:`translate(24 31.7)`},S.createElement(`ellipse`,{fillOpacity:`.8`,fill:`#F5F5F7`,cx:`67.8`,cy:`106.9`,rx:`67.8`,ry:`12.7`}),S.createElement(`path`,{fill:`#aeb8c2`,d:`M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z`}),S.createElement(`path`,{fill:`#f5f5f7`,d:`M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4`}),S.createElement(`path`,{fill:`#dce0e6`,d:`M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8`})),S.createElement(`path`,{fill:`#dce0e6`,d:`m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8`}),S.createElement(`g`,{fill:`#fff`,transform:`translate(149.7 15.4)`},S.createElement(`circle`,{cx:`20.7`,cy:`3.2`,r:`2.8`}),S.createElement(`path`,{d:`M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z`}))))},oC=()=>{let[,e]=Vl(),[t]=Yd(`Empty`),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:a}=e,{borderColor:o,shadowColor:s,contentColor:c}=(0,S.useMemo)(()=>({borderColor:new Nc(n).onBackground(a).toHexString(),shadowColor:new Nc(r).onBackground(a).toHexString(),contentColor:new Nc(i).onBackground(a).toHexString()}),[n,r,i,a]);return S.createElement(`svg`,{width:`64`,height:`41`,viewBox:`0 0 64 41`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{transform:`translate(0 1)`,fill:`none`,fillRule:`evenodd`},S.createElement(`ellipse`,{fill:s,cx:`32`,cy:`33`,rx:`32`,ry:`7`}),S.createElement(`g`,{fillRule:`nonzero`,stroke:o},S.createElement(`path`,{d:`M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z`}),S.createElement(`path`,{d:`M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3`,fill:c}))))},sC=e=>{let{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:a,lineHeight:o}=e;return{[t]:{marginInline:r,fontSize:a,lineHeight:o,textAlign:`center`,[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:`100%`},svg:{maxWidth:`100%`,height:`100%`,margin:`auto`}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},cC=Ql(`Empty`,e=>{let{componentCls:t,controlHeightLG:n,calc:r}=e;return sC(dc(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()}))}),lC=S.createElement(aC,null),uC=S.createElement(oC,null),dC=e=>{let{className:t,rootClassName:n,prefixCls:r,image:i,description:a,children:o,imageStyle:s,style:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f,direction:p,className:m,style:h,classNames:g,styles:_,image:v}=ya(`empty`),y=f(`empty`,r),[b,x]=cC(y),[C,w]=Cf([g,l],[_,u],{props:e}),[T]=Yd(`Empty`),E=a===void 0?T?.description:a,D=typeof E==`string`?E:`empty`,O=i??v??lC,k=null;return k=typeof O==`string`?S.createElement(`img`,{draggable:!1,alt:D,src:O}):O,S.createElement(`div`,{className:J(b,x,y,m,{[`${y}-normal`]:O===uC,[`${y}-rtl`]:p===`rtl`},t,n,C.root),style:{...w.root,...h,...c},...d},S.createElement(`div`,{className:J(`${y}-image`,C.image),style:{...s,...w.image}},k),E&&S.createElement(`div`,{className:J(`${y}-description`,C.description),style:w.description},E),o&&S.createElement(`div`,{className:J(`${y}-footer`,C.footer),style:w.footer},o))};dC.PRESENTED_IMAGE_DEFAULT=lC,dC.PRESENTED_IMAGE_SIMPLE=uC;var fC=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,S.useContext)(ga),r=n(`empty`);switch(t){case`Table`:case`List`:return S.createElement(dC,{image:dC.PRESENTED_IMAGE_SIMPLE});case`Select`:case`TreeSelect`:case`Cascader`:case`Transfer`:case`Mentions`:return S.createElement(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case`Table.filter`:return null;default:return S.createElement(dC,null)}},pC=(e,t,n)=>{let{variant:r,[e]:i}=S.useContext(ga),a=S.useContext(vy),o=i?.variant,s;s=t===void 0?n===!1?`borderless`:a??o??r??`outlined`:t;let c=ha.includes(s);return[s,c]},mC=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e===`scroll`?`scroll`:`visible`,dynamicInset:!0};return{bottomLeft:{...t,points:[`tl`,`bl`],offset:[0,4]},bottomRight:{...t,points:[`tr`,`br`],offset:[0,4]},topLeft:{...t,points:[`bl`,`tl`],offset:[0,-4]},topRight:{...t,points:[`br`,`tr`],offset:[0,-4]}}};function hC(e,t){return e||mC(t)}var gC=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:`relative`,display:`block`,minHeight:t,padding:i,color:e.colorText,fontWeight:`normal`,fontSize:n,lineHeight:r,boxSizing:`border-box`}},_C=e=>{let{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,a=`&${t}-slide-up-appear${t}-slide-up-appear-active`,o=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,c=`${r}-option-selected`;return[{[`${n}-dropdown`]:{...Ul(e),position:`absolute`,top:-9999,zIndex:e.zIndexPopup,boxSizing:`border-box`,padding:e.paddingXXS,overflow:`hidden`,fontSize:e.fontSize,fontVariant:`initial`,backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,[` +`].includes(e)),[F]),De=(e,t,n)=>{if(fe&&px(_)&&f.length>=_)return;let r=!0,i=e;k?.(null);let a=_x(e,F,px(_)?_-f.length:void 0),o=n?null:a;return y!==`combobox`&&o&&(i=``,P?.(o),we(!1),r=!1),N&&ye!==i&&N(i,{source:t?`typing`:`effect`}),e&&t&&r&&we(!0),r},Oe=e=>{!e||!e.trim()||N(e,{source:`submit`})};S.useEffect(()=>{!Se&&!fe&&y!==`combobox`&&De(``,!1,!1)},[Se]),S.useEffect(()=>{b&&(we(!1),_e(!1))},[b,Ce]);let[ke,Ae]=ox(),je=S.useRef(!1),Me=e=>{let t=ke(),{key:n}=e,r=n===`Enter`,i=n===` `;if(r||i){let t=y===`combobox`;(i&&!(t||s)||r&&!t)&&e.preventDefault(),Ce||we(!0)}if(Ae(!!ye),n===`Backspace`&&!t&&fe&&!ye&&f.length){let e=[...f],t=null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(!r.disabled){e.splice(n,1),t=r;break}}t&&p(e,{type:`remove`,values:[t]})}Ce&&(!r||!je.current)&&!i&&(r&&(je.current=!0),he.current?.onKeyDown(e)),ce?.(e)},Ne=(e,...t)=>{Ce&&he.current?.onKeyUp(e,...t),e.key===`Enter`&&(je.current=!1),se?.(e,...t)},Pe=zn(e=>{p(f.filter(t=>t!==e),{type:`remove`,values:[e]})}),Fe=()=>{je.current=!1},Ie=()=>[kr(pe.current),me.current?.getPopupElement()];cx(Ie,Ce,we,!!ve.root);let Le=S.useRef(!1),Re=e=>{_e(!0),b||(ae.includes(`focus`)&&we(!0),q?.(e))},ze=()=>{Ce&&!Le.current&&we(!1,{cancelFun:()=>sx(Ie(),document.activeElement)})},Be=e=>{_e(!1),ye&&(y===`tags`?N(ye,{source:`submit`}):y===`multiple`&&N(``,{source:`blur`})),ze(),b||oe?.(e)},Ve=(e,...t)=>{let{target:n}=e;(me.current?.getPopupElement())?.contains(n)&&we&&we(!0),le?.(e,...t),Le.current=!0,bx(()=>{Le.current=!1})},[,He]=S.useState({});function Ue(){He({})}let We;ve.root&&(We=e=>{we(e)});let Ge=S.useMemo(()=>({...e,notFoundContent:h,open:Ce,triggerOpen:Ce,rawOpen:Se,id:n,showSearch:s,multiple:fe,toggleOpen:we,showScrollBar:l,styles:a,classNames:o,lockOptions:Te}),[e,h,we,n,s,fe,Ce,Se,l,a,o,Te]),Ke=S.useMemo(()=>{let e=R??z;return typeof e==`function`?e({searchValue:ye,open:Ce,focused:ge,showSearch:s,loading:x}):e},[R,z,ye,Ce,ge,s,x]),qe=()=>{g?.(),pe.current?.focus(),p([],{type:`clear`,values:f}),De(``,!1,!1)},{allowClear:Je,clearIcon:Ye}=rx(r,f,I,B,b,ye,y),Xe=S.createElement(V,{ref:he}),Ze=J(r,i,{[`${r}-focused`]:ge,[`${r}-multiple`]:fe,[`${r}-single`]:!fe,[`${r}-allow-clear`]:Je,[`${r}-show-arrow`]:Ke!=null,[`${r}-disabled`]:b,[`${r}-loading`]:x,[`${r}-open`]:Ce,[`${r}-customize-input`]:be,[`${r}-show-search`]:s}),Qe=S.createElement(iS,oS({},de,{ref:pe,prefixCls:r,className:Ze,focused:ge,prefix:L,suffix:Ke,clearIcon:Ye,multiple:fe,mode:y,displayValues:f,placeholder:v,searchValue:ye,activeValue:O,onSearch:De,onSearchSubmit:Oe,onInputBlur:Fe,onFocus:Re,onBlur:Be,onClearMouseDown:qe,onKeyDown:Me,onKeyUp:Ne,onSelectorRemove:Pe,tokenWithEnter:Ee,onMouseDown:Ve,components:ve}));return Qe=S.createElement(dx,{ref:me,disabled:b,prefixCls:r,visible:Ce,popupElement:Xe,animation:H,transitionName:U,popupStyle:ee,popupClassName:W,direction:u,popupMatchSelectWidth:te,popupRender:G,popupAlign:ne,placement:K,builtinPlacements:re,getPopupContainer:ie,empty:m,onPopupVisibleChange:We,onPopupMouseEnter:Ue,onPopupMouseDown:Ve,onPopupBlur:ze},Qe),S.createElement(ix.Provider,{value:Ge},S.createElement(vx,{visible:ge&&!Ce,values:f}),Qe)}),lS=()=>null;lS.isSelectOptGroup=!0;var uS=()=>null;uS.isSelectOption=!0;var dS=S.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:i,onInnerResize:a,innerProps:o,rtl:s,extra:c},l)=>{let u={},d={display:`flex`,flexDirection:`column`};return t!==void 0&&(u={height:e,position:`relative`,overflow:`hidden`},d={...d,transform:`translateY(${t}px)`,[s?`marginRight`:`marginLeft`]:-n,position:`absolute`,left:0,right:0,top:0}),S.createElement(`div`,{style:u},S.createElement(oa,{onResize:({offsetHeight:e})=>{e&&a&&a()}},S.createElement(`div`,Vg({style:d,className:J({[`${i}-holder-inner`]:i}),ref:l},o),r,c)))});dS.displayName=`Filler`;function fS({children:e,setRef:t}){let n=S.useCallback(e=>{t(e)},[]);return S.cloneElement(e,{ref:n})}function pS(e,t,n,r,i,a,o,{getKey:s}){return e.slice(t,n+1).map((e,n)=>{let c=o(e,t+n,{style:{width:r},offsetX:i}),l=s(e);return S.createElement(fS,{key:l,setRef:t=>a(e,t)},c)})}function mS(e,t,n){let r=e.length,i=t.length,a,o;if(r===0&&i===0)return null;r{let a=mS(r||[],e||[],t);a?.index!==void 0&&(n?.(a.index),o(e[a.index])),i(e)},[e]),[a]}var gS=typeof navigator==`object`&&/Firefox/i.test(navigator.userAgent),_S=((e,t,n,r)=>{let i=(0,S.useRef)(!1),a=(0,S.useRef)(null);function o(){clearTimeout(a.current),i.current=!0,a.current=setTimeout(()=>{i.current=!1},50)}let s=(0,S.useRef)({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,(e,t,n=!1)=>{let r=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&r?(clearTimeout(a.current),i.current=!1):(!r||i.current)&&o(),!i.current&&r}});function vS(e,t,n,r,i,a,o){let s=(0,S.useRef)(0),c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(!1),d=_S(t,n,r,i);function f(e,t){if(Oi.cancel(c.current),d(!1,t))return;let n=e;if(!n._virtualHandled)n._virtualHandled=!0;else return;s.current+=t,l.current=t,gS||n.preventDefault(),c.current=Oi(()=>{let e=u.current?10:1;o(s.current*e,!1),s.current=0})}function p(e,t){o(t,!0),gS||e.preventDefault()}let m=(0,S.useRef)(null),h=(0,S.useRef)(null);function g(t){if(!e)return;Oi.cancel(h.current),h.current=Oi(()=>{m.current=null},2);let{deltaX:n,deltaY:r,shiftKey:i}=t,o=n,s=r;(m.current===`sx`||!m.current&&i&&r&&!n)&&(o=r,s=0,m.current=`sx`);let c=Math.abs(o),l=Math.abs(s);m.current===null&&(m.current=a&&c>l?`x`:`y`),m.current===`y`?f(t,s):p(t,o)}function _(t){e&&(u.current=t.detail===l.current)}return[g,_]}function yS(e,t,n,r){let[i,a]=S.useMemo(()=>[new Map,[]],[e,n.id,r]);return(o,s=o)=>{let c=i.get(o),l=i.get(s);if(c===void 0||l===void 0){let u=e.length;for(let d=a.length;d{let e=!1;a.current.forEach((t,n)=>{if(t&&t.offsetParent){let{offsetHeight:r}=t,{marginTop:i,marginBottom:a}=getComputedStyle(t),s=xS(i),c=xS(a),l=r+s+c;o.current.get(n)!==l&&(o.current.set(n,l),e=!0)}}),e&&i(e=>e+1)};if(e)t();else{s.current+=1;let e=s.current;Promise.resolve().then(()=>{e===s.current&&t()})}}function u(r,i){let o=e(r),s=a.current.get(o);i?(a.current.set(o,i),l()):a.current.delete(o),!s!=!i&&(i?t?.(r):n?.(r))}return(0,S.useEffect)(()=>c,[]),[u,l,o.current,r]}var CS=14/15;function wS(e,t,n){let r=(0,S.useRef)(!1),i=(0,S.useRef)(0),a=(0,S.useRef)(0),o=(0,S.useRef)(null),s=(0,S.useRef)(null),c,l=e=>{if(r.current){let t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),o=i.current-t,c=a.current-r,l=Math.abs(o)>Math.abs(c);l?i.current=t:a.current=r;let u=n(l,l?o:c,!1,e);u&&e.preventDefault(),clearInterval(s.current),u&&(s.current=setInterval(()=>{l?o*=CS:c*=CS;let e=Math.floor(l?o:c);(!n(l,e,!0)||Math.abs(e)<=.1)&&clearInterval(s.current)},16))}},u=()=>{r.current=!1,c()},d=e=>{c(),e.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),o.current=e.target,o.current.addEventListener(`touchmove`,l,{passive:!1}),o.current.addEventListener(`touchend`,u,{passive:!0}))};c=()=>{o.current&&(o.current.removeEventListener(`touchmove`,l),o.current.removeEventListener(`touchend`,u))},Hn(()=>(e&&t.current.addEventListener(`touchstart`,d,{passive:!0}),()=>{t.current?.removeEventListener(`touchstart`,d),c(),clearInterval(s.current)}),[e])}function TS(e){return Math.floor(e**.5)}function ES(e,t){return(`touches`in e?e.touches[0]:e)[t?`pageX`:`pageY`]-window[t?`scrollX`:`scrollY`]}function DS(e,t,n){S.useEffect(()=>{let r=t.current;if(e&&r){let e=!1,t,i,a=()=>{Oi.cancel(t)},o=()=>{a(),t=Oi(()=>{n(i),o()})},s=()=>{e=!1,a()},c=t=>{if(t.target.draggable||t.button!==0)return;let n=t;n._virtualHandled||(n._virtualHandled=!0,e=!0)},l=t=>{if(e){let e=ES(t,!1),{top:n,bottom:s}=r.getBoundingClientRect();e<=n?(i=-TS(n-e),o()):e>=s?(i=TS(e-s),o()):a()}};return r.addEventListener(`mousedown`,c),r.ownerDocument.addEventListener(`mouseup`,s),r.ownerDocument.addEventListener(`mousemove`,l),r.ownerDocument.addEventListener(`dragend`,s),()=>{r.removeEventListener(`mousedown`,c),r.ownerDocument.removeEventListener(`mouseup`,s),r.ownerDocument.removeEventListener(`mousemove`,l),r.ownerDocument.removeEventListener(`dragend`,s),a()}}},[e])}var OS=10;function kS(e,t,n,r,i,a,o,s){let c=S.useRef(),[l,u]=S.useState(null);return Hn(()=>{if(l&&l.times({...e}));return}a();let{targetAlign:s,originAlign:c,index:d,offset:f}=l,p=e.current.clientHeight,m=!1,h=s,g=null;if(p){let a=s||c,u=0,_=0,v=0,y=Math.min(t.length-1,d);for(let e=0;e<=y;e+=1){let a=i(t[e]);_=u;let o=n.get(a);v=_+(o===void 0?r:o),u=v}let b=a===`top`?f:p-f;for(let e=y;e>=0;--e){let r=i(t[e]),a=n.get(r);if(a===void 0){m=!0;break}if(b-=a,b<=0)break}switch(a){case`top`:g=_-f;break;case`bottom`:g=v-p+f;break;default:{let{scrollTop:t}=e.current,n=t+p;_n&&(h=`bottom`)}}g!==null&&o(g),g!==l.lastTop&&(m=!0)}m&&u({...l,times:l.times+1,targetAlign:h,lastTop:g})}},[l,e.current]),e=>{if(e==null){s();return}if(Oi.cancel(c.current),typeof e==`number`)o(e);else if(e&&typeof e==`object`){let n,{align:r}=e;`index`in e?{index:n}=e:n=t.findIndex(t=>i(t)===e.key);let{offset:a=0}=e;u({times:0,index:n,offset:a,originAlign:r})}}}var AS=S.forwardRef((e,t)=>{let{prefixCls:n,rtl:r,scrollOffset:i,scrollRange:a,onStartMove:o,onStopMove:s,onScroll:c,horizontal:l,spinSize:u,containerSize:d,style:f,thumbStyle:p,showScrollBar:m}=e,[h,g]=S.useState(!1),[_,v]=S.useState(null),[y,b]=S.useState(null),x=!r,C=S.useRef(),w=S.useRef(),[T,E]=S.useState(m),D=S.useRef(),O=()=>{m===!0||m===!1||(clearTimeout(D.current),E(!0),D.current=setTimeout(()=>{E(!1)},3e3))},k=a-d||0,A=d-u||0,j=S.useMemo(()=>i===0||k===0?0:i/k*A,[i,k,A]),M=e=>{e.stopPropagation(),e.preventDefault()},N=S.useRef({top:j,dragging:h,pageY:_,startTop:y});N.current={top:j,dragging:h,pageY:_,startTop:y};let P=e=>{g(!0),v(ES(e,l)),b(N.current.top),o(),e.stopPropagation(),e.preventDefault()};S.useEffect(()=>{let e=e=>{e.preventDefault()},t=C.current,n=w.current;return t.addEventListener(`touchstart`,e,{passive:!1}),n.addEventListener(`touchstart`,P,{passive:!1}),()=>{t.removeEventListener(`touchstart`,e),n.removeEventListener(`touchstart`,P)}},[]);let F=S.useRef();F.current=k;let I=S.useRef();I.current=A,S.useEffect(()=>{if(h){let e,t=t=>{let{dragging:n,pageY:r,startTop:i}=N.current;Oi.cancel(e);let a=C.current.getBoundingClientRect(),o=d/(l?a.width:a.height);if(n){let n=(ES(t,l)-r)*o,a=i;!x&&l?a-=n:a+=n;let s=F.current,u=I.current,d=u?a/u:0,f=Math.ceil(d*s);f=Math.max(f,0),f=Math.min(f,s),e=Oi(()=>{c(f,l)})}},n=()=>{g(!1),s()};return window.addEventListener(`mousemove`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`mouseup`,n,{passive:!0}),window.addEventListener(`touchend`,n,{passive:!0}),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`mouseup`,n),window.removeEventListener(`touchend`,n),Oi.cancel(e)}}},[h]),S.useEffect(()=>(O(),()=>{clearTimeout(D.current)}),[i]),S.useImperativeHandle(t,()=>({delayHidden:O}));let L=`${n}-scrollbar`,R={position:`absolute`,visibility:T?null:`hidden`},z={position:`absolute`,borderRadius:99,background:`var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))`,cursor:`pointer`,userSelect:`none`};return l?(Object.assign(R,{height:8,left:0,right:0,bottom:0}),Object.assign(z,{height:`100%`,width:u,[x?`left`:`right`]:j})):(Object.assign(R,{width:8,top:0,bottom:0,[x?`right`:`left`]:0}),Object.assign(z,{width:`100%`,height:u,top:j})),S.createElement(`div`,{ref:C,className:J(L,{[`${L}-horizontal`]:l,[`${L}-vertical`]:!l,[`${L}-visible`]:T}),style:{...R,...f},onMouseDown:M,onMouseMove:O},S.createElement(`div`,{ref:w,className:J(`${L}-thumb`,{[`${L}-thumb-moving`]:h}),style:{...z,...p},onMouseDown:P}))}),jS=20;function MS(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,jS),Math.floor(n)}var NS=[],PS={overflowY:`auto`,overflowAnchor:`none`};function FS(e,t){let{prefixCls:n=`rc-virtual-list`,className:r,height:i,itemHeight:a,fullHeight:o=!0,style:s,data:c,children:l,itemKey:u,virtual:d,direction:f,scrollWidth:p,component:m=`div`,onScroll:h,onVirtualScroll:g,onVisibleChange:_,innerProps:v,extraRender:y,styles:b,showScrollBar:x=`optional`,...C}=e,w=S.useCallback(e=>typeof u==`function`?u(e):e?.[u],[u]),[T,E,D,O]=SS(w,null,null),k=!!(d!==!1&&i&&a),A=S.useMemo(()=>Object.values(D.maps).reduce((e,t)=>e+t,0),[D.id,D.maps]),j=k&&c&&(Math.max(a*c.length,A)>i||!!p),M=f===`rtl`,N=J(n,{[`${n}-rtl`]:M},r),P=c||NS,F=(0,S.useRef)(),I=(0,S.useRef)(),L=(0,S.useRef)(),[R,z]=(0,S.useState)(0),[B,V]=(0,S.useState)(0),[H,U]=(0,S.useState)(!1),ee=()=>{U(!0)},W=()=>{U(!1)},te={getKey:w};function G(e){z(t=>{let n;n=typeof e==`function`?e(t):e;let r=ge(n);return F.current.scrollTop=r,r})}let ne=(0,S.useRef)({start:0,end:P.length}),K=(0,S.useRef)(),[re]=hS(P,w);K.current=re;let{scrollHeight:ie,start:ae,end:q,offset:oe}=S.useMemo(()=>{if(!k)return{scrollHeight:void 0,start:0,end:P.length-1,offset:void 0};if(!j)return{scrollHeight:I.current?.offsetHeight||0,start:0,end:P.length-1,offset:void 0};let e=0,t,n,r,o=P.length;for(let s=0;s=R&&t===void 0&&(t=s,n=e),u>R+i&&r===void 0&&(r=s),e=u}return t===void 0&&(t=0,n=0,r=Math.ceil(i/a)),r===void 0&&(r=P.length-1),r=Math.min(r+1,P.length-1),{scrollHeight:e,start:t,end:r,offset:n}},[j,k,R,P,O,i]);ne.current.start=ae,ne.current.end=q,S.useLayoutEffect(()=>{let e=D.getRecord();if(e.size===1){let t=Array.from(e.keys())[0],n=e.get(t),r=P[ae];if(r&&n===void 0&&w(r)===t){let e=D.get(t)-a;G(t=>t+e)}}D.resetRecord()},[ie]);let[se,ce]=S.useState({width:0,height:i}),le=e=>{ce({width:e.offsetWidth,height:e.offsetHeight})},ue=(0,S.useRef)(),de=(0,S.useRef)(),fe=S.useMemo(()=>MS(se.width,p),[se.width,p]),pe=S.useMemo(()=>MS(se.height,ie),[se.height,ie]),me=ie-i,he=(0,S.useRef)(me);he.current=me;function ge(e){let t=e;return Number.isNaN(he.current)||(t=Math.min(t,he.current)),t=Math.max(t,0),t}let _e=R<=0,ve=R>=me,ye=B<=0,be=B>=p,xe=_S(_e,ve,ye,be),Se=()=>({x:M?-B:B,y:R}),Ce=(0,S.useRef)(Se()),we=zn(e=>{if(g){let t={...Se(),...e};(Ce.current.x!==t.x||Ce.current.y!==t.y)&&(g(t),Ce.current=t)}});function Te(e,t){let n=e;t?((0,Vi.flushSync)(()=>{V(n)}),we()):G(n)}function Ee(e){let{scrollTop:t}=e.currentTarget;t!==R&&G(t),h?.(e),we()}let De=e=>{let t=e,n=p?p-se.width:0;return t=Math.max(t,0),t=Math.min(t,n),t},Oe=zn((e,t)=>{t?((0,Vi.flushSync)(()=>{V(t=>De(t+(M?-e:e)))}),we()):G(t=>t+e)}),[ke,Ae]=vS(k,_e,ve,ye,be,!!p,Oe);wS(k,F,(e,t,n,r)=>{let i=r;return xe(e,t,n)?!1:!i||!i._virtualHandled?(i&&(i._virtualHandled=!0),ke({preventDefault(){},deltaX:e?t:0,deltaY:e?0:t}),!0):!1}),DS(j,F,e=>{G(t=>t+e)}),Hn(()=>{function e(e){let t=_e&&e.detail<0,n=ve&&e.detail>0;k&&!t&&!n&&e.preventDefault()}let t=F.current;return t.addEventListener(`wheel`,ke,{passive:!1}),t.addEventListener(`DOMMouseScroll`,Ae,{passive:!0}),t.addEventListener(`MozMousePixelScroll`,e,{passive:!1}),()=>{t.removeEventListener(`wheel`,ke),t.removeEventListener(`DOMMouseScroll`,Ae),t.removeEventListener(`MozMousePixelScroll`,e)}},[k,_e,ve]),Hn(()=>{if(p){let e=De(B);V(e),we({x:e})}},[se.width,p]);let je=()=>{ue.current?.delayHidden(),de.current?.delayHidden()},Me=kS(F,P,D,a,w,()=>E(!0),G,je);S.useImperativeHandle(t,()=>({nativeElement:L.current,getScrollInfo:Se,scrollTo:e=>{function t(e){return e&&typeof e==`object`&&(`left`in e||`top`in e)}t(e)?(e.left!==void 0&&V(De(e.left)),Me(e.top)):Me(e)}})),Hn(()=>{_&&_(P.slice(ae,q+1),P)},[ae,q,P]);let Ne=yS(P,w,D,a),Pe=y?.({start:ae,end:q,virtual:j,offsetX:B,offsetY:oe,rtl:M,getSize:Ne}),Fe=pS(P,ae,q,p,B,T,l,te),Ie=null;i&&(Ie={[o?`height`:`maxHeight`]:i,...PS},k&&(Ie.overflowY=`hidden`,p&&(Ie.overflowX=`hidden`),H&&(Ie.pointerEvents=`none`)));let Le={};return M&&(Le.dir=`rtl`),S.createElement(`div`,Vg({ref:L,style:{...s,position:`relative`},className:N},Le,C),S.createElement(oa,{onResize:le},S.createElement(m,{className:`${n}-holder`,style:Ie,ref:F,onScroll:Ee,onMouseEnter:je},S.createElement(dS,{prefixCls:n,height:ie,offsetX:B,offsetY:oe,scrollWidth:p,onInnerResize:E,ref:I,innerProps:v,rtl:M,extra:Pe},Fe))),j&&ie>i&&S.createElement(AS,{ref:ue,prefixCls:n,scrollOffset:R,scrollRange:ie,rtl:M,onScroll:Te,onStartMove:ee,onStopMove:W,spinSize:pe,containerSize:se.height,style:b?.verticalScrollBar,thumbStyle:b?.verticalScrollBarThumb,showScrollBar:x}),j&&p>se.width&&S.createElement(AS,{ref:de,prefixCls:n,scrollOffset:B,scrollRange:p,rtl:M,onScroll:Te,onStartMove:ee,onStopMove:W,spinSize:fe,containerSize:se.width,horizontal:!0,style:b?.horizontalScrollBar,thumbStyle:b?.horizontalScrollBarThumb,showScrollBar:x}))}var IS=S.forwardRef(FS);IS.displayName=`List`;var LS=IS;function RS(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function zS(){return zS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,open:i,multiple:a,mode:o,searchValue:s,toggleOpen:c,notFoundContent:l,onPopupScroll:u,showScrollBar:d,lockOptions:f}=ax(),{maxCount:p,flattenOptions:m,onActiveValue:h,defaultActiveFirstOption:g,onSelect:_,menuItemSelectedIcon:v,rawValues:y,fieldNames:b,virtual:x,direction:C,listHeight:w,listItemHeight:T,optionRender:E,classNames:D,styles:O}=S.useContext(Dx),k=`${n}-item`,A=Zn(()=>m,[i,f],(e,t)=>t[0]&&!t[1]),j=S.useRef(null),M=S.useMemo(()=>a&&px(p)&&y?.size>=p,[a,p,y?.size]),N=e=>{e.preventDefault()},P=e=>{j.current?.scrollTo(typeof e==`number`?{index:e}:e)},F=S.useCallback(e=>o===`combobox`?!1:y.has(e),[o,[...y].toString(),y.size]),I=(e,t=1)=>{let n=A.length;for(let r=0;rI(0)),z=(e,t=!1)=>{R(e);let n={source:t?`keyboard`:`mouse`},r=A[e];if(!r){h(null,-1,n);return}h(r.value,e,n)};(0,S.useEffect)(()=>{z(g===!1?-1:I(0))},[A.length,s]);let B=S.useCallback(e=>o===`combobox`?String(e).toLowerCase()===s.toLowerCase():y.has(e),[o,s,[...y].toString(),y.size]);(0,S.useEffect)(()=>{let e;if(!a&&i&&y.size===1){let t=Array.from(y)[0],n=A.findIndex(({data:e})=>s?String(e.value).startsWith(s):e.value===t);n!==-1&&(z(n),e=setTimeout(()=>{P(n)}))}return i&&j.current?.scrollTo(void 0),()=>clearTimeout(e)},[i,s]);let V=e=>{e!==void 0&&_(e,{selected:!y.has(e)}),a||c(!1)};if(S.useImperativeHandle(t,()=>({onKeyDown:e=>{let{which:t,ctrlKey:n}=e;switch(t){case Qr.N:case Qr.P:case Qr.UP:case Qr.DOWN:{let e=0;if(t===Qr.UP?e=-1:t===Qr.DOWN?e=1:RS()&&n&&(t===Qr.N?e=1:t===Qr.P&&(e=-1)),e!==0){let t=I(L+e,e);P(t),z(t,!0)}break}case Qr.TAB:case Qr.ENTER:{let t=A[L];if(!t||t.data.disabled)return V(void 0);!M||y.has(t.value)?V(t.value):V(void 0),i&&e.preventDefault();break}case Qr.ESC:c(!1),i&&e.stopPropagation()}},onKeyUp:()=>{},scrollTo:e=>{P(e)}})),A.length===0)return S.createElement(`div`,{role:`listbox`,id:`${r}_list`,className:`${k}-empty`,onMouseDown:N},l);let H=Object.keys(b).map(e=>b[e]),U=e=>e.label;function ee(e,t){let{group:n}=e;return{role:n?`presentation`:`option`,id:`${r}_list_${t}`}}let W=e=>{let t=A[e];if(!t)return null;let n=t.data||{},{value:r,disabled:i}=n,{group:a}=t,o=xi(n,!0),s=U(t);return t?S.createElement(`div`,zS({"aria-label":typeof s==`string`&&!a?s:null},o,{key:e},ee(t,e),{"aria-selected":B(r),"aria-disabled":i}),r):null},te={role:`listbox`,id:`${r}_list`};return S.createElement(S.Fragment,null,x&&S.createElement(`div`,zS({},te,{style:{height:0,width:0,overflow:`hidden`}}),W(L-1),W(L),W(L+1)),S.createElement(LS,{itemKey:`key`,ref:j,data:A,height:w,itemHeight:T,fullHeight:!1,onMouseDown:N,onScroll:u,virtual:x,direction:C,innerProps:x?null:te,showScrollBar:d,className:D?.popup?.list,style:O?.popup?.list},(e,t)=>{let{group:n,groupOption:r,data:i,label:a,value:o}=e,{key:s}=i;if(n){let e=i.title??(BS(a)?a.toString():void 0);return S.createElement(`div`,{className:J(k,`${k}-group`,i.className),title:e},a===void 0?s:a)}let{disabled:c,title:l,children:u,style:d,className:f,...p}=i,m=gi(p,H),h=F(o),g=c||!h&&M,_=`${k}-option`,y=J(k,_,f,D?.popup?.listItem,{[`${_}-grouped`]:r,[`${_}-active`]:L===t&&!g,[`${_}-disabled`]:g,[`${_}-selected`]:h}),b=U(e),C=!v||typeof v==`function`||h,w=typeof b==`number`?b:b||o,T=BS(w)?w.toString():void 0;return l!==void 0&&(T=l),S.createElement(`div`,zS({},xi(m),x?{}:ee(e,t),{"aria-selected":x?void 0:B(o),"aria-disabled":g,className:y,title:T,onMouseMove:()=>{L===t||g||z(t)},onClick:()=>{g||V(o)},style:{...O?.popup?.listItem,...d}}),S.createElement(`div`,{className:`${_}-content`},typeof E==`function`?E(e,{index:t}):w),S.isValidElement(v)||h,C&&S.createElement(Yx,{className:`${k}-option-state`,customizeIcon:v,customizeIconProps:{value:o,disabled:g,isSelected:h}},h?`✓`:null))}))}),HS=((e,t)=>{let n=S.useRef({values:new Map,options:new Map});return[S.useMemo(()=>{let{values:r,options:i}=n.current,a=e.map(e=>e.label===void 0?{...e,label:r.get(e.value)?.label}:e),o=new Map,s=new Map;return a.forEach(e=>{o.set(e.value,e),s.set(e.value,t.get(e.value)||i.get(e.value))}),n.current.values=o,n.current.options=s,a},[e,t]),S.useCallback(e=>t.get(e)||n.current.options.get(e),[t])]});function US(e,t){return Ox(e).join(``).toUpperCase().includes(t)}var WS=((e,t,n,r,i)=>S.useMemo(()=>{if(!n||r===!1)return e;let{options:a,label:o,value:s}=t,c=[],l=typeof r==`function`,u=n.toUpperCase(),d=l?r:(e,t)=>i&&i.length?i.some(e=>US(t[e],u)):t[a]?US(t[o===`children`?`label`:o],u):US(t[s],u),f=l?e=>gx(e):e=>e;return e.forEach(e=>{if(e[a]){if(d(n,f(e)))c.push(e);else{let t=e[a].filter(e=>d(n,f(e)));t.length&&c.push({...e,[a]:t})}return}d(n,f(e))&&c.push(e)}),c},[e,r,i,n,t]));function GS(e){let{key:t,props:{children:n,value:r,...i}}=e;return{key:t,value:r===void 0?t:r,children:n,...i}}function KS(e,t=!1){return ki(e).map((e,n)=>{if(!S.isValidElement(e)||!e.type)return null;let{type:{isSelectOptGroup:r},key:i,props:{children:a,...o}}=e;return t||!r?GS(e):{key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i,...o,options:KS(a)}}).filter(e=>e)}var qS=(e,t,n,r,i)=>S.useMemo(()=>{let a=e;e||(a=KS(t));let o=new Map,s=new Map,c=(e,t,n)=>{n&&typeof n==`string`&&e.set(t[n],t)},l=(e,t=!1)=>{for(let a=0;a{c(s,u,e)}),c(s,u,i)):l(u[n.options],!0)}};return l(a),{options:a,valueOptions:o,labelOptions:s}},[e,t,n,r,i]);function JS(e){let t=S.useRef();return t.current=e,S.useCallback((...e)=>t.current(...e),[])}function YS(e,t,n){let{filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c}=t;return S.useMemo(()=>{let t=typeof e==`object`,l={filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c,...t?e:{}};return[t||n===`combobox`||n===`tags`||n===`multiple`&&e===void 0?!0:e,l]},[n,e,r,i,a,o,s,c])}function XS(){return XS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,mode:r,prefixCls:i=`rc-select`,backfill:a,fieldNames:o,showSearch:s,searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p,onSelect:m,onDeselect:h,onActive:g,popupMatchSelectWidth:_=!0,optionLabelProp:v,options:y,optionRender:b,children:x,defaultActiveFirstOption:C,menuItemSelectedIcon:w,virtual:T,direction:E,listHeight:D=200,listItemHeight:O=20,labelRender:k,value:A,defaultValue:j,labelInValue:M,onChange:N,maxCount:P,classNames:F,styles:I,...L}=e,[R,z]=YS(s,{searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p},r),{filterOption:B,searchValue:V,optionFilterProp:H,filterSort:U,onSearch:ee,autoClearSearchValue:W=!0}=z,te=S.useMemo(()=>H?Array.isArray(H)?H:[H]:[],[H]),G=Xn(n),ne=sS(r),K=!!(!y&&x),re=S.useMemo(()=>B===void 0&&r===`combobox`?!1:B,[B,r]),ie=S.useMemo(()=>mx(o,K),[JSON.stringify(o),K]),[ae,q]=Gn(``,V),oe=ae||``,se=qS(y,x,ie,te,v),{valueOptions:ce,labelOptions:le,options:ue}=se,de=S.useCallback(e=>Ox(e).map(e=>{let t,n,r,i;QS(e)?t=e:(n=e.label,t=e.value);let a=ce.get(t);return a&&(n===void 0&&(n=a?.[v||ie.label]),r=a?.disabled,i=a?.title),{label:n,value:t,key:t,disabled:r,title:i}}),[ie,v,ce]),[fe,pe]=Gn(j,A),[me,he]=HS(S.useMemo(()=>{let e=de(ne&&fe===null?[]:fe);return r===`combobox`&&Ax(e[0]?.value)?[]:e},[fe,de,r,ne]),ce),ge=S.useMemo(()=>{if(!r&&me.length===1){let e=me[0];if(e.value===null&&(e.label===null||e.label===void 0))return[]}return me.map(e=>({...e,label:(typeof k==`function`?k(e):e.label)??e.value}))},[r,me,k]),_e=S.useMemo(()=>new Set(me.map(e=>e.value)),[me]);S.useEffect(()=>{if(r===`combobox`){let e=me[0]?.value;q(kx(e)?String(e):``)}},[me]);let ve=JS((e,t)=>{let n=t??e;return{[ie.value]:e,[ie.label]:n}}),ye=WS(S.useMemo(()=>{if(r!==`tags`)return ue;let e=[...ue],t=e=>ce.has(e);return[...me].sort((e,t)=>e.value{let r=n.value;t(r)||e.push(ve(r,n.label))}),e},[ve,ue,ce,me,r]),ie,oe,re,te),be=S.useMemo(()=>{let e=e=>te.length?te.some(t=>e?.[t]===oe):e?.value===oe;return r!==`tags`||!oe||ye.some(t=>e(t))||ye.some(e=>e[ie.value]===oe)?ye:[ve(oe),...ye]},[ve,te,r,ye,oe,ie]),xe=e=>[...e].sort((e,t)=>U(e,t,{searchValue:oe})).map(e=>Array.isArray(e.options)?{...e,options:e.options.length>0?xe(e.options):e.options}:e),Se=S.useMemo(()=>U?xe(be):be,[be,U,oe]),Ce=S.useMemo(()=>hx(Se,{fieldNames:ie,childrenAsData:K}),[Se,ie,K]),we=e=>{let t=de(e);if(pe(t),N&&(t.length!==me.length||t.some((e,t)=>me[t]?.value!==e?.value))){let e=M?t.map(({label:e,value:t})=>({label:e,value:t})):t.map(e=>e.value),n=t.map(e=>gx(he(e.value)));N(ne?e:e[0],ne?n:n[0])}},[Te,Ee]=S.useState(null),[De,Oe]=S.useState(0),ke=C===void 0?r!==`combobox`:C,Ae=S.useRef(),je=S.useCallback((e,t,{source:n=`keyboard`}={})=>{Oe(t),a&&r===`combobox`&&e!==null&&n===`keyboard`&&Ee(String(e));let i=Promise.resolve().then(()=>{Ae.current===i&&g?.(e)});Ae.current=i},[a,r,g]),Me=(e,t,n)=>{let r=()=>{let t=he(e);return[M?{label:t?.[ie.label],value:e}:e,gx(t)]};if(t&&m){let[e,t]=r();m(e,t)}else if(!t&&h&&n!==`clear`){let[e,t]=r();h(e,t)}},Ne=JS((e,t)=>{let n,i=ne?t.selected:!0;n=i?ne?[...me,e]:[e]:me.filter(t=>t.value!==e),we(n),Me(e,i),r===`combobox`?Ee(``):(!sS||W)&&(q(``),Ee(``))}),Pe=(e,t)=>{we(e);let{type:n,values:r}=t;(n===`remove`||n===`clear`)&&r.forEach(e=>{Me(e.value,!1,n)})},Fe=(e,t)=>{if(q(e),Ee(null),t.source===`submit`){let t=(e||``).trim();t&&(we(Array.from(new Set([..._e,t]))),Me(t,!0),q(``));return}t.source!==`blur`&&(r===`combobox`&&we(e),ee?.(e))},Ie=e=>{let t=e;r!==`tags`&&(t=e.map(e=>le.get(e)?.value).filter(e=>e!==void 0));let n=Array.from(new Set([..._e,...t]));we(n),n.forEach(e=>{Me(e,!0)})},Le=S.useMemo(()=>{let e=T!==!1&&_!==!1;return{...se,flattenOptions:Ce,onActiveValue:je,defaultActiveFirstOption:ke,onSelect:Ne,menuItemSelectedIcon:w,rawValues:_e,fieldNames:ie,virtual:e,direction:E,listHeight:D,listItemHeight:O,childrenAsData:K,maxCount:P,optionRender:b,classNames:F,styles:I}},[P,se,Ce,je,ke,Ne,w,_e,ie,T,_,E,D,O,K,b,F,I]);return S.createElement(Dx.Provider,{value:Le},S.createElement(cS,XS({},L,{id:G,prefixCls:i,ref:t,omitDomProps:ZS,mode:r,classNames:F,styles:I,displayValues:ge,onDisplayValuesChange:Pe,maxCount:P,direction:E,showSearch:R,searchValue:oe,onSearch:Fe,autoClearSearchValue:W,onSearchSplit:Ie,popupMatchSelectWidth:_,OptionList:VS,emptyOptions:!Ce.length,activeValue:Te,activeDescendantId:`${G}_list_${De}`})))});$S.Option=uS,$S.OptGroup=lS;var eC=$S,tC=(e,t,n)=>J({[`${e}-status-success`]:t===`success`,[`${e}-status-warning`]:t===`warning`,[`${e}-status-error`]:t===`error`,[`${e}-status-validating`]:t===`validating`,[`${e}-has-feedback`]:n}),nC=(e,t)=>t||e,rC=()=>{let[,e]=Vl(),[t]=Yd(`Empty`),n=new Nc(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return S.createElement(`svg`,{style:n,width:`184`,height:`152`,viewBox:`0 0 184 152`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`g`,{transform:`translate(24 31.7)`},S.createElement(`ellipse`,{fillOpacity:`.8`,fill:`#F5F5F7`,cx:`67.8`,cy:`106.9`,rx:`67.8`,ry:`12.7`}),S.createElement(`path`,{fill:`#aeb8c2`,d:`M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z`}),S.createElement(`path`,{fill:`#f5f5f7`,d:`M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4`}),S.createElement(`path`,{fill:`#dce0e6`,d:`M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8`})),S.createElement(`path`,{fill:`#dce0e6`,d:`m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8`}),S.createElement(`g`,{fill:`#fff`,transform:`translate(149.7 15.4)`},S.createElement(`circle`,{cx:`20.7`,cy:`3.2`,r:`2.8`}),S.createElement(`path`,{d:`M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z`}))))},iC=()=>{let[,e]=Vl(),[t]=Yd(`Empty`),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:a}=e,{borderColor:o,shadowColor:s,contentColor:c}=(0,S.useMemo)(()=>({borderColor:new Nc(n).onBackground(a).toHexString(),shadowColor:new Nc(r).onBackground(a).toHexString(),contentColor:new Nc(i).onBackground(a).toHexString()}),[n,r,i,a]);return S.createElement(`svg`,{width:`64`,height:`41`,viewBox:`0 0 64 41`,xmlns:`http://www.w3.org/2000/svg`},S.createElement(`title`,null,t?.description||`Empty`),S.createElement(`g`,{transform:`translate(0 1)`,fill:`none`,fillRule:`evenodd`},S.createElement(`ellipse`,{fill:s,cx:`32`,cy:`33`,rx:`32`,ry:`7`}),S.createElement(`g`,{fillRule:`nonzero`,stroke:o},S.createElement(`path`,{d:`M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z`}),S.createElement(`path`,{d:`M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3`,fill:c}))))},aC=e=>{let{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:a,lineHeight:o}=e;return{[t]:{marginInline:r,fontSize:a,lineHeight:o,textAlign:`center`,[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:`100%`},svg:{maxWidth:`100%`,height:`100%`,margin:`auto`}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},oC=Ql(`Empty`,e=>{let{componentCls:t,controlHeightLG:n,calc:r}=e;return aC(dc(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()}))}),sC=S.createElement(rC,null),cC=S.createElement(iC,null),lC=e=>{let{className:t,rootClassName:n,prefixCls:r,image:i,description:a,children:o,imageStyle:s,style:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f,direction:p,className:m,style:h,classNames:g,styles:_,image:v}=ya(`empty`),y=f(`empty`,r),[b,x]=oC(y),[C,w]=Cf([g,l],[_,u],{props:e}),[T]=Yd(`Empty`),E=a===void 0?T?.description:a,D=typeof E==`string`?E:`empty`,O=i??v??sC,k=null;return k=typeof O==`string`?S.createElement(`img`,{draggable:!1,alt:D,src:O}):O,S.createElement(`div`,{className:J(b,x,y,m,{[`${y}-normal`]:O===cC,[`${y}-rtl`]:p===`rtl`},t,n,C.root),style:{...w.root,...h,...c},...d},S.createElement(`div`,{className:J(`${y}-image`,C.image),style:{...s,...w.image}},k),E&&S.createElement(`div`,{className:J(`${y}-description`,C.description),style:w.description},E),o&&S.createElement(`div`,{className:J(`${y}-footer`,C.footer),style:w.footer},o))};lC.PRESENTED_IMAGE_DEFAULT=sC,lC.PRESENTED_IMAGE_SIMPLE=cC;var uC=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,S.useContext)(ga),r=n(`empty`);switch(t){case`Table`:case`List`:return S.createElement(lC,{image:lC.PRESENTED_IMAGE_SIMPLE});case`Select`:case`TreeSelect`:case`Cascader`:case`Transfer`:case`Mentions`:return S.createElement(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case`Table.filter`:return null;default:return S.createElement(lC,null)}},dC=(e,t,n)=>{let{variant:r,[e]:i}=S.useContext(ga),a=S.useContext(gy),o=i?.variant,s;s=t===void 0?n===!1?`borderless`:a??o??r??`outlined`:t;let c=ha.includes(s);return[s,c]},fC=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e===`scroll`?`scroll`:`visible`,dynamicInset:!0};return{bottomLeft:{...t,points:[`tl`,`bl`],offset:[0,4]},bottomRight:{...t,points:[`tr`,`br`],offset:[0,4]},topLeft:{...t,points:[`bl`,`tl`],offset:[0,-4]},topRight:{...t,points:[`br`,`tr`],offset:[0,-4]}}};function pC(e,t){return e||fC(t)}var mC=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:`relative`,display:`block`,minHeight:t,padding:i,color:e.colorText,fontWeight:`normal`,fontSize:n,lineHeight:r,boxSizing:`border-box`}},hC=e=>{let{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,a=`&${t}-slide-up-appear${t}-slide-up-appear-active`,o=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,c=`${r}-option-selected`;return[{[`${n}-dropdown`]:{...Ul(e),position:`absolute`,top:-9999,zIndex:e.zIndexPopup,boxSizing:`border-box`,padding:e.paddingXXS,overflow:`hidden`,fontSize:e.fontSize,fontVariant:`initial`,backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,[` ${i}${s}bottomLeft, ${a}${s}bottomLeft - `]:{animationName:og},[` + `]:{animationName:ag},[` ${i}${s}topLeft, ${a}${s}topLeft, ${i}${s}topRight, ${a}${s}topRight - `]:{animationName:cg},[`${o}${s}bottomLeft`]:{animationName:sg},[` + `]:{animationName:sg},[`${o}${s}bottomLeft`]:{animationName:og},[` ${o}${s}topLeft, ${o}${s}topRight - `]:{animationName:lg},"&-hidden":{display:`none`},[r]:{...gC(e),cursor:`pointer`,transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":{flex:`auto`,...Hl},"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...gC(e),color:e.colorTextDisabled}},[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}}},hg(e,`slide-up`),hg(e,`slide-down`),ag(e,`move-up`),ag(e,`move-down`)]},vC=e=>{let{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:`inherit`,lineHeight:`inherit`,[`${t}-placeholder`]:{display:`none`},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:`none`}}}}},yC=4,bC=e=>{let{componentCls:t,calc:n,iconCls:r,paddingXS:i,paddingXXS:a,INTERNAL_FIXED_ITEM_MARGIN:o,lineWidth:s,colorIcon:c,colorIconHover:l,inputPaddingHorizontalBase:u,antCls:d}=e,[f,p]=tu(d,`select`);return{"&-multiple":{[f(`multi-item-background`)]:e.multipleItemBg,[f(`multi-item-border-color`)]:`transparent`,[f(`multi-item-border-radius`)]:e.borderRadiusSM,[f(`multi-item-height`)]:e.multipleItemHeight,[f(`multi-padding-base`)]:`calc((${p(`height`)} - ${p(`multi-item-height`)}) / 2)`,[f(`multi-padding-vertical`)]:`calc(${p(`multi-padding-base`)} - ${o} - ${s})`,[f(`multi-item-padding-horizontal`)]:`calc(${u} - ${p(`multi-padding-vertical`)} - ${s} * 2)`,paddingBlock:p(`multi-padding-vertical`),paddingInlineStart:`calc(${p(`multi-padding-base`)} - ${s})`,[`${t}-prefix`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:`absolute`,lineHeight:p(`line-height`),insetInlineStart:p(`multi-item-padding-horizontal`),width:`calc(100% - ${p(`multi-item-padding-horizontal`)})`,top:`50%`,transform:`translateY(-50%)`},[`${t}-content`]:{flexWrap:`wrap`,alignItems:`center`,lineHeight:1,"&-item-prefix":{height:p(`font-size`)},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${yC}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, - ${t}-content-item-suffix:first-child`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-selection-item`]:{lineHeight:`calc(${p(`multi-item-height`)} - ${s} * 2)`,border:`${s} solid ${p(`multi-item-border-color`)}`,display:`flex`,marginBlock:o,marginInlineEnd:n(o).mul(2).equal(),background:p(`multi-item-background`),borderRadius:p(`multi-item-border-radius`),paddingInlineStart:i,paddingInlineEnd:a,transition:[`height`,`line-height`,`padding`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),"&-content":{...Hl,marginInlineEnd:a},"&-remove":{...Wl(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${r}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}},[`${t}-input`]:{lineHeight:n(o).mul(2).add(p(`multi-item-height`)).equal(),width:`calc(var(--select-input-width, 0) * 1px)`,minWidth:yC,maxWidth:`100%`,transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[f(`multi-item-height`)]:e.multipleItemHeightSM,[f(`multi-item-border-radius`)]:e.borderRadiusXS},[`&${t}-lg`]:{[f(`multi-item-height`)]:e.multipleItemHeightLG,[f(`multi-item-border-radius`)]:e.borderRadius},[`&${t}-filled`]:{[f(`multi-item-border-color`)]:e.colorSplit,[f(`multi-item-background`)]:e.colorBgContainer,[`&${t}-disabled`]:{[f(`multi-item-border-color`)]:`transparent`}}}}},xC=(e,t)=>{let{componentCls:n,antCls:r}=e,[i]=tu(r,`select`),{border:a,borderHover:o,borderActive:s,borderOutline:c}=t,l=t.background||e.selectorBg||e.colorBgContainer;return{[i(`border-color`)]:a,[i(`background-color`)]:l,[i(`color`)]:t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{[i(`border-color`)]:o,[i(`background-color`)]:t.backgroundHover||l},[`&${n}-focused`]:{[i(`border-color`)]:s,[i(`background-color`)]:t.backgroundActive||l,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${c}`}},[`&${n}-disabled`]:{[i(`border-color`)]:t.borderDisabled||t.border,[i(`background-color`)]:t.backgroundDisabled||t.background}}},SC=(e,t,n,r={},i={},a)=>{let{componentCls:o}=e;return{[`&${o}-${t}`]:[xC(e,n),{[`&${o}-status-error`]:xC(e,{...n,color:r.color||e.colorError,...r}),[`&${o}-status-warning`]:xC(e,{...n,color:i.color||e.colorWarning,...i})},a]}},CC=e=>{let{componentCls:t,fontHeight:n,controlHeight:r,iconCls:i,antCls:a,calc:o}=e,[s,c]=tu(a,`select`);return{[t]:[{[s(`border-radius`)]:e.borderRadius,[s(`border-color`)]:`#000`,[s(`border-size`)]:e.lineWidth,[s(`background-color`)]:e.colorBgContainer,[s(`font-size`)]:e.fontSize,[s(`line-height`)]:e.lineHeight,[s(`font-height`)]:n,[s(`color`)]:e.colorText,[s(`height`)]:r,[s(`padding-horizontal`)]:o(e.paddingSM).sub(e.lineWidth).equal(),[s(`padding-vertical`)]:`calc((${c(`height`)} - ${c(`font-height`)}) / 2 - ${c(`border-size`)})`,...Ul(e,!0),display:`inline-flex`,flexWrap:`nowrap`,position:`relative`,transition:`all ${e.motionDurationSlow}`,alignItems:`flex-start`,outline:0,cursor:`pointer`,borderRadius:c(`border-radius`),borderWidth:c(`border-size`),borderStyle:e.lineType,borderColor:c(`border-color`),background:c(`background-color`),fontSize:c(`font-size`),lineHeight:c(`line-height`),color:c(`color`),paddingInline:c(`padding-horizontal`),paddingBlock:c(`padding-vertical`),[`${t}-prefix`]:{flex:`none`,lineHeight:1},[`${t}-placeholder`]:{...Hl,color:e.colorTextPlaceholder,pointerEvents:`none`,zIndex:1},[`${t}-content`]:{flex:`auto`,minWidth:0,position:`relative`,display:`flex`,marginInlineEnd:o(e.paddingXXS).mul(1.5).equal(),"&:before":{content:`"\\a0"`,width:0,overflow:`hidden`},"&-value":{visibility:`inherit`},"input[readonly]":{cursor:`inherit`,caretColor:`transparent`}},[`${t}-suffix`]:{flex:`none`,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:`center`,[i]:{verticalAlign:`top`}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:`not-allowed`,input:{cursor:`not-allowed`}},"&-sm":{[s(`height`)]:e.controlHeightSM,[s(`padding-horizontal`)]:o(e.paddingXS).sub(e.lineWidth).equal(),[s(`border-radius`)]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:c(`padding-horizontal`)}},"&-lg":{[s(`height`)]:e.controlHeightLG,[s(`font-size`)]:e.fontSizeLG,[s(`line-height`)]:e.lineHeightLG,[s(`font-height`)]:e.fontHeightLG,[s(`border-radius`)]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:`none`,background:`transparent`,appearance:`none`,border:0,margin:0,padding:0,color:c(`color`),"&::-webkit-search-cancel-button":{display:`none`,appearance:`none`}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:`absolute`,inset:0,lineHeight:`calc(${c(`font-height`)} + ${c(`padding-vertical`)} * 2)`},[`${t}-content`]:{...Hl,alignSelf:`center`,"&-has-value":{display:`block`,"&:before":{display:`none`}},"&-has-search-value":{color:`transparent`},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder,"&-has-search-value":{color:`transparent`}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:`text`}},bC(e),SC(e,`outlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),SC(e,`filled`,{border:`transparent`,borderHover:`transparent`,borderActive:e.activeBorderColor,borderOutline:`transparent`,borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),SC(e,`borderless`,{border:`transparent`,borderHover:`transparent`,borderActive:`transparent`,borderOutline:`transparent`,background:`transparent`}),SC(e,`underlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:`transparent`},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:`transparent`,borderInlineColor:`transparent`}),vC(e)]}},wC=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},TC=e=>{let{antCls:t,componentCls:n,motionDurationMid:r,inputPaddingHorizontalBase:i}=e,a={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:`50%`}};return{[n]:{...Ul(e),[`${n}-selection-item`]:{flex:1,fontWeight:`normal`,position:`relative`,userSelect:`none`,...Hl,[`> ${t}-typography`]:{display:`inline`}},[`${n}-prefix`]:{flex:`none`,marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:`absolute`,top:`50%`,insetInlineStart:`auto`,insetInlineEnd:i,zIndex:1,display:`inline-block`,width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,cursor:`pointer`,opacity:0,transition:[`color`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),textRendering:`auto`,transform:`translateZ(0)`,"&:before":{display:`block`},"&:hover":{color:e.colorIcon}},"@media(hover:none)":a,"&:hover":a},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(i).add(e.fontSize).add(e.paddingXS).equal()}}}}}},EC=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:`100%`}}},TC(e),_C(e),{[`${t}-rtl`]:{direction:`rtl`}},h_(e,{focusElCls:`${t}-focused`})]},DC=Ql(`Select`,(e,{rootPrefixCls:t})=>{let n=dc(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[EC(n),CC(n)]},wC,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),OC=c(o((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:`M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z`}}]},name:`check`,theme:`outlined`}}))());function kC(){return kC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,kC({},e,{ref:t,icon:OC.default}))),jC=c(o((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:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`}}))());function MC(){return MC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,MC({},e,{ref:t,icon:jC.default}))),PC=c(o((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:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`}}))());function FC(){return FC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,FC({},e,{ref:t,icon:PC.default})));function LC({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,loadingIcon:a,multiple:o,hasFeedback:s,showSuffixIcon:c,feedbackIcon:l,showArrow:u,componentName:d}){let f=t??S.createElement(Ou,null),p=t=>e===null&&!s&&!u?null:S.createElement(S.Fragment,null,c!==!1&&t,s&&l),m=null;m=e===void 0?i?p(a??S.createElement(Xm,{spin:!0})):({open:e,showSearch:t})=>p(e&&t?S.createElement(IC,null):S.createElement(NC,null)):p(e);let h=null;h=n===void 0?o?S.createElement(AC,null):null:n;let g=null;return g=r===void 0?S.createElement(ju,null):r,{clearIcon:f,suffixIcon:m,itemIcon:h,removeIcon:g}}function RC(e){return S.useMemo(()=>{if(e)return(...t)=>S.createElement(yy,{space:!0},e.apply(void 0,t))},[e])}function zC(e,t){return t===void 0?e!==null:t}var BC=`SECRET_COMBOBOX_MODE_DO_NOT_USE`,VC=S.forwardRef((e,t)=>{let{prefixCls:n,bordered:r,className:i,rootClassName:a,getPopupContainer:o,popupClassName:s,dropdownClassName:c,listHeight:l=256,placement:u,listItemHeight:d,size:f,disabled:p,notFoundContent:m,status:h,builtinPlacements:g,dropdownMatchSelectWidth:_,popupMatchSelectWidth:v,direction:y,style:b,allowClear:x,variant:C,popupStyle:w,dropdownStyle:T,transitionName:E,tagRender:D,maxCount:O,prefix:k,dropdownRender:A,popupRender:j,onDropdownVisibleChange:M,onOpenChange:N,styles:P,classNames:F,...I}=e,{getPopupContainer:L,getPrefixCls:R,renderEmpty:z,direction:B,virtual:V,popupMatchSelectWidth:H,popupOverflow:U}=S.useContext(ga),{showSearch:ee,style:W,styles:te,className:G,classNames:ne}=ya(`select`),[,K]=Vl(),re=d??K?.controlHeight,ie=R(`select`,n),ae=R(),q=y??B,{compactSize:oe,compactItemClassnames:se}=kh(ie,q),[ce,le]=pC(`select`,C,r),ue=sp(ie),[de,fe]=DC(ie,ue),pe=S.useMemo(()=>{let{mode:t}=e;if(t!==`combobox`)return t===BC?`combobox`:t},[e.mode]),me=pe===`multiple`||pe===`tags`,he=zC(e.suffixIcon,e.showArrow),ge=v??_??H,_e=RC(j||A),ve=N||M,{status:ye,hasFeedback:be,isFormItemInput:xe,feedbackIcon:Se}=S.useContext(gy),Ce=iC(ye,h),we;we=m===void 0?pe===`combobox`?null:z?.(`Select`)||S.createElement(fC,{componentName:`Select`}):m;let{suffixIcon:Te,itemIcon:Ee,removeIcon:De,clearIcon:Oe}=LC({...I,multiple:me,hasFeedback:be,feedbackIcon:Se,showSuffixIcon:he,prefixCls:ie,componentName:`Select`}),ke=x===!0?{clearIcon:Oe}:x,Ae=gi(I,[`suffixIcon`,`itemIcon`]),je=Eh(e=>f??oe??e),Me=S.useContext(mm),Ne=p??Me,Pe={...e,variant:ce,status:Ce,disabled:Ne,size:je},[Fe,Ie]=Cf([ne,F],[te,P],{props:Pe},{popup:{_default:`root`}}),Le=J(Fe.popup?.root,s,c,{[`${ie}-dropdown-${q}`]:q===`rtl`},a,fe,ue,de),Re={...Ie.popup?.root,...w??T},ze=J({[`${ie}-lg`]:je===`large`,[`${ie}-sm`]:je===`small`,[`${ie}-rtl`]:q===`rtl`,[`${ie}-${ce}`]:le,[`${ie}-in-form-item`]:xe},rC(ie,Ce,be),se,G,i,Fe.root,a,fe,ue,de),Be=S.useMemo(()=>u===void 0?q===`rtl`?`bottomRight`:`bottomLeft`:u,[u,q]),[Ve]=Lf(`SelectLike`,Ie.popup?.root?.zIndex??Re?.zIndex);return S.createElement(nC,{ref:t,virtual:V,classNames:Fe,styles:Ie,showSearch:ee,...Ae,style:{...Ie.root,...W,...b},popupMatchSelectWidth:ge,transitionName:gh(ae,`slide-up`,E),builtinPlacements:hC(g,U),listHeight:l,listItemHeight:re,mode:pe,prefixCls:ie,placement:Be,direction:q,prefix:k,suffixIcon:Te,menuItemSelectedIcon:Ee,removeIcon:De,allowClear:ke,notFoundContent:we,className:ze,getPopupContainer:o||L,popupClassName:Le,disabled:Ne,popupStyle:{...Ie.popup?.root,...Re,zIndex:Ve},maxCount:me?O:void 0,tagRender:me?D:void 0,popupRender:_e,onPopupVisibleChange:ve})}),HC=ix(VC,`popupAlign`);VC.SECRET_COMBOBOX_MODE_DO_NOT_USE=BC,VC.Option=fS,VC.OptGroup=dS,VC._InternalPanelDoNotUseOrYouWillBeFired=HC;var UC=[`xxxl`,`xxl`,`xl`,`lg`,`md`,`sm`,`xs`],WC=[].concat(UC).reverse(),GC=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),KC=e=>{let t=e,n=[].concat(UC).reverse();return n.forEach((e,r)=>{let i=e.toUpperCase(),a=`screen${i}Min`,o=`screen${i}`;if(!(t[a]<=t[o]))throw Error(`${a}<=${o} fails : !(${t[a]}<=${t[o]})`);if(r{if(t){for(let n of UC)if(e[n]&&t?.[n]!==void 0)return t[n]}},JC=()=>{let[,e]=Vl(),t=GC(KC(e));return S.useMemo(()=>{let e=new Map,n=-1,r={};return{responsiveMap:t,matchHandlers:{},dispatch(t){return r=t,e.forEach(e=>{e(r)}),e.size>=1},subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach(([e,t])=>{let n=({matches:t})=>{this.dispatch({...r,[e]:t})},i=window.matchMedia(t);typeof i?.addEventListener==`function`&&i.addEventListener(`change`,n),this.matchHandlers[t]={mql:i,listener:n},n(i)})},unregister(){Object.values(t).forEach(e=>{let t=this.matchHandlers[e];typeof t?.mql?.removeEventListener==`function`&&t.mql.removeEventListener(`change`,t?.listener)}),e.clear()}}},[t])};function YC(e=!0,t={}){let n=(0,S.useRef)(t),[,r]=mf(),i=JC();return Hn(()=>{let t=i.subscribe(t=>{n.current=t,e&&r()});return()=>i.unsubscribe(t)},[]),n.current}var XC=S.createContext({}),ZC=e=>{let{antCls:t,componentCls:n,iconCls:r,avatarBg:i,avatarColor:a,containerSize:o,containerSizeLG:s,containerSizeSM:c,textFontSize:l,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:p,iconFontSizeSM:m,borderRadius:h,borderRadiusLG:g,borderRadiusSM:_,lineWidth:v,lineType:y}=e,b=(e,t,i,a)=>({width:e,height:e,borderRadius:`50%`,fontSize:t,[`&${n}-square`]:{borderRadius:a},[`&${n}-icon`]:{fontSize:i,[`> ${r}`]:{margin:0}}});return{[n]:{...Ul(e),position:`relative`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,overflow:`hidden`,color:a,whiteSpace:`nowrap`,textAlign:`center`,verticalAlign:`middle`,background:i,border:`${Y(v)} ${y} transparent`,"&-image":{background:`transparent`},[`${t}-image-img`]:{display:`block`},...b(o,l,f,h),"&-lg":{...b(s,u,p,g)},"&-sm":{...b(c,d,m,_)},"> img":{display:`block`,width:`100%`,height:`100%`,objectFit:`cover`}}}},QC=e=>{let{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=e;return{[`${t}-group`]:{display:`inline-flex`,[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:i}}}},$C=Ql(`Avatar`,e=>{let{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=dc(e,{avatarBg:n,avatarColor:t});return[ZC(r),QC(r)]},e=>{let{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:a,fontSizeXL:o,fontSizeHeading3:s,marginXS:c,marginXXS:l,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((a+o)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:l,groupOverlapping:-c,groupBorderColor:u}}),ew=S.forwardRef((e,t)=>{let{prefixCls:n,shape:r,size:i,src:a,srcSet:o,icon:s,className:c,rootClassName:l,style:u,alt:d,draggable:f,children:p,crossOrigin:m,gap:h=4,onError:g,..._}=e,[v,y]=S.useState(1),[b,x]=S.useState(!1),[C,w]=S.useState(!0),T=S.useRef(null),E=S.useRef(null),D=cr(t,T),{getPrefixCls:O,className:k,style:A}=ya(`avatar`),j=S.useContext(XC),M=()=>{if(!E.current||!T.current)return;let e=E.current.offsetWidth,t=T.current.offsetWidth;e!==0&&t!==0&&h*2{x(!0)},[]),S.useEffect(()=>{w(!0),y(1)},[a]),S.useEffect(M,[h]);let N=()=>{g?.()!==!1&&w(!1)},P=Eh(e=>i??j?.size??e??`medium`),F=YC(Object.keys(nf(P)&&P||{}).some(e=>UC.includes(e))),I=S.useMemo(()=>{if(!nf(P))return{};let e=P[UC.find(e=>F[e])];return e?{width:e,height:e,fontSize:e&&(s||p)?e/2:18}:{}},[F,P,s,p]),L=O(`avatar`,n),R=sp(L),[z,B]=$C(L,R),V=J({[`${L}-lg`]:P===`large`,[`${L}-sm`]:P===`small`}),H=S.isValidElement(a),U=J(L,V,k,`${L}-${r||j?.shape||`circle`}`,{[`${L}-image`]:H||a&&C,[`${L}-icon`]:!!s},B,R,c,l,z),ee=ef(P)?{width:P,height:P,fontSize:s?P/2:18}:{},W;if(typeof a==`string`&&C)W=S.createElement(`img`,{src:a,draggable:f,srcSet:o,onError:N,alt:d,crossOrigin:m});else if(H)W=a;else if(s)W=s;else if(b||v!==1){let e=`scale(${v})`,t={msTransform:e,WebkitTransform:e,transform:e};W=S.createElement(oa,{onResize:M},S.createElement(`span`,{className:`${L}-string`,ref:E,style:t},p))}else W=S.createElement(`span`,{className:`${L}-string`,style:{opacity:0},ref:E},p);return S.createElement(`span`,{..._,style:{...ee,...I,...A,...u},className:U,ref:D},W)}),tw=e=>e?typeof e==`function`?e():e:null,nw=e=>{let{children:t,prefixCls:n,id:r,classNames:i,styles:a,className:o,style:s}=e;return S.createElement(`div`,{id:r,className:J(`${n}-container`,i?.container,o),style:{...a?.container,...s},role:`tooltip`},typeof t==`function`?t():t)},rw={shiftX:64,adjustY:1},iw={adjustX:1,shiftY:!0},aw=[0,0],ow={left:{points:[`cr`,`cl`],overflow:iw,offset:[-4,0],targetOffset:aw},right:{points:[`cl`,`cr`],overflow:iw,offset:[4,0],targetOffset:aw},top:{points:[`bc`,`tc`],overflow:rw,offset:[0,-4],targetOffset:aw},bottom:{points:[`tc`,`bc`],overflow:rw,offset:[0,4],targetOffset:aw},topLeft:{points:[`bl`,`tl`],overflow:rw,offset:[0,-4],targetOffset:aw},leftTop:{points:[`tr`,`tl`],overflow:iw,offset:[-4,0],targetOffset:aw},topRight:{points:[`br`,`tr`],overflow:rw,offset:[0,-4],targetOffset:aw},rightTop:{points:[`tl`,`tr`],overflow:iw,offset:[4,0],targetOffset:aw},bottomRight:{points:[`tr`,`br`],overflow:rw,offset:[0,4],targetOffset:aw},rightBottom:{points:[`bl`,`br`],overflow:iw,offset:[4,0],targetOffset:aw},bottomLeft:{points:[`tl`,`bl`],overflow:rw,offset:[0,4],targetOffset:aw},leftBottom:{points:[`br`,`bl`],overflow:iw,offset:[-4,0],targetOffset:aw}};function sw(){return sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{trigger:n=[`hover`],mouseEnterDelay:r=0,mouseLeaveDelay:i=.1,prefixCls:a=`rc-tooltip`,children:o,onVisibleChange:s,afterVisibleChange:c,motion:l,placement:u=`right`,align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:m,arrowContent:h,overlay:g,id:_,showArrow:v=!0,classNames:y,styles:b,...x}=e,C=Xn(_),w=(0,S.useRef)(null);(0,S.useImperativeHandle)(t,()=>w.current);let T={...x};`visible`in e&&(T.popupVisible=e.visible);let E=S.useMemo(()=>{if(!v)return!1;let e=v===!0?{}:v;return{...e,className:J(e.className,y?.arrow),style:{...e.style,...b?.arrow},content:e.content??h}},[v,y?.arrow,b?.arrow,h]);return S.createElement(sm,sw({popupClassName:y?.root,prefixCls:a,popup:S.createElement(nw,{key:`content`,prefixCls:a,id:C,classNames:y,styles:b},g),action:n,builtinPlacements:ow,popupPlacement:u,ref:w,popupAlign:d,getPopupContainer:m,onOpenChange:s,afterOpenChange:c,popupMotion:l,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:i,popupStyle:b?.root,mouseEnterDelay:r,arrow:E,uniqueContainerClassName:y?.uniqueContainer,uniqueContainerStyle:b?.uniqueContainer},T),({open:e})=>{let t=S.Children.only(o),n={"aria-describedby":g&&e?C:void 0};return S.cloneElement(t,n)})});function lw(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,a=i,o=r*1/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),c=i-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,u=2*i-c,d=l,f=2*i-o,p=s,m=2*i-0,h=a,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),_=r*(Math.sqrt(2)-1),v=`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`;return{arrowShadowWidth:g,arrowPath:`path('M 0 ${a} A ${r} ${r} 0 0 0 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${m} ${h} Z')`,arrowPolygon:v}}var uw=(e,t,n)=>{let{sizePopupArrow:r,arrowPolygon:i,arrowPath:a,arrowShadowWidth:o,borderRadiusXS:s,calc:c}=e;return{pointerEvents:`none`,width:r,height:r,overflow:`hidden`,"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:`""`},"&::after":{content:`""`,position:`absolute`,width:o,height:o,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${Y(s)} 0`},transform:`translateY(50%) rotate(-135deg)`,boxShadow:n,zIndex:0,background:`transparent`}}};function dw(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function fw(e,t){return e?t:{}}var pw=(e,t,n)=>{let{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:a,arrowOffsetHorizontal:o,antCls:s}=e,[c]=tu(s,`tooltip`),{arrowDistance:l=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:{[`${r}-arrow`]:[{position:`absolute`,zIndex:1,display:`block`,...uw(e,t,i),"&:before":{background:t}}],...fw(!!u.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(`,`)]:{bottom:l,transform:`translateY(100%) rotate(180deg)`},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(100%) rotate(180deg)`},"&-placement-topLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-topRight":{[c(`arrow-offset-x`)]:`calc(100% - ${Y(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...fw(!!u.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(`,`)]:{top:l,transform:`translateY(-100%)`},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(-100%)`},"&-placement-bottomLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-bottomRight":{[c(`arrow-offset-x`)]:`calc(100% - ${Y(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...fw(!!u.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(`,`)]:{right:{_skip_check_:!0,value:l},transform:`translateX(100%) rotate(90deg)`},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(100%) rotate(90deg)`},[`&-placement-leftTop > ${r}-arrow`]:{top:a},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:a}}),...fw(!!u.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(`,`)]:{left:{_skip_check_:!0,value:l},transform:`translateX(-100%) rotate(-90deg)`},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(-100%) rotate(-90deg)`},[`&-placement-rightTop > ${r}-arrow`]:{top:a},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:a}})}}};function mw(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};let i=nf(r)?r:{},a={};switch(e){case`top`:case`bottom`:a.shiftX=t.arrowOffsetHorizontal*2+n,a.shiftY=!0,a.adjustY=!0;break;case`left`:case`right`:a.shiftY=t.arrowOffsetVertical*2+n,a.shiftX=!0,a.adjustX=!0;break}let o={...a,...i};return o.shiftX||(o.adjustX=!0),o.shiftY||(o.adjustY=!0),o}var hw={left:{points:[`cr`,`cl`]},right:{points:[`cl`,`cr`]},top:{points:[`bc`,`tc`]},bottom:{points:[`tc`,`bc`]},topLeft:{points:[`bl`,`tl`]},leftTop:{points:[`tr`,`tl`]},topRight:{points:[`br`,`tr`]},rightTop:{points:[`tl`,`tr`]},bottomRight:{points:[`tr`,`br`]},rightBottom:{points:[`bl`,`br`]},bottomLeft:{points:[`tl`,`bl`]},leftBottom:{points:[`br`,`bl`]}},gw={topLeft:{points:[`bl`,`tc`]},leftTop:{points:[`tr`,`cl`]},topRight:{points:[`br`,`tc`]},rightTop:{points:[`tl`,`cr`]},bottomRight:{points:[`tr`,`bc`]},rightBottom:{points:[`bl`,`cr`]},bottomLeft:{points:[`tl`,`bc`]},leftBottom:{points:[`br`,`cl`]}},_w=new Set([`topLeft`,`topRight`,`bottomLeft`,`bottomRight`,`leftTop`,`leftBottom`,`rightTop`,`rightBottom`]);function vw(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:a,visibleFirst:o}=e,s=t/2,c={},l=dw({contentRadius:a,limitVerticalRadius:!0});return Object.keys(hw).forEach(e=>{let a={...r&&gw[e]||hw[e],offset:[0,0],dynamicInset:!0};switch(c[e]=a,_w.has(e)&&(a.autoArrow=!1),e){case`top`:case`topLeft`:case`topRight`:a.offset[1]=-s-i;break;case`bottom`:case`bottomLeft`:case`bottomRight`:a.offset[1]=s+i;break;case`left`:case`leftTop`:case`leftBottom`:a.offset[0]=-s-i;break;case`right`:case`rightTop`:case`rightBottom`:a.offset[0]=s+i;break}if(r)switch(e){case`topLeft`:case`bottomLeft`:a.offset[0]=-l.arrowOffsetHorizontal-s;break;case`topRight`:case`bottomRight`:a.offset[0]=l.arrowOffsetHorizontal+s;break;case`leftTop`:case`rightTop`:a.offset[1]=-l.arrowOffsetHorizontal*2+s;break;case`leftBottom`:case`rightBottom`:a.offset[1]=l.arrowOffsetHorizontal*2-s;break}a.overflow=mw(e,l,t,n),o&&(a.htmlRegion=`visibleFirst`)}),c}var yw=S.createContext(!1),bw=(e,t)=>{let n=e=>typeof e==`boolean`?{show:e}:e||{};return S.useMemo(()=>{let r=n(e),i=n(t);return{...i,...r,show:r.show??i.show??!0}},[e,t])},xw=`50%`,Sw=e=>{let{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:a,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:c,boxShadowSecondary:l,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:m}=e,[h,g]=tu(m,`tooltip`),_=t(o).add(p).add(f).equal(),v={minWidth:t(o).mul(2).add(p).equal(),minHeight:c,padding:`${Y(e.calc(u).div(2).equal())} ${Y(d)}`,color:g(`overlay-color`,i),textAlign:`start`,textDecoration:`none`,wordWrap:`break-word`,backgroundColor:a,borderRadius:o,boxShadow:l,boxSizing:`border-box`},y={[h(`valid-offset-x`)]:g(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[g(`valid-offset-x`,xw),`var(--arrow-y, ${xw})`].join(` `)};return[{[n]:{...Ul(e),position:`absolute`,zIndex:s,display:`block`,width:`max-content`,maxWidth:r,visibility:`visible`,...y,"&-hidden":{display:`none`},[h(`arrow-background-color`)]:a,[`${n}-container`]:[v,Zh(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:`none`,background:`transparent`,boxShadow:`none`}},[[`&-placement-topLeft`,`&-placement-topRight`,`&-placement-bottomLeft`,`&-placement-bottomRight`].join(`,`)]:{minWidth:_},[[`&-placement-left`,`&-placement-leftTop`,`&-placement-leftBottom`,`&-placement-right`,`&-placement-rightTop`,`&-placement-rightBottom`].join(`,`)]:{[`${n}-inner`]:{borderRadius:e.min(o,8)}},[`${n}-content`]:{position:`relative`},...nu(e,(e,{darkColor:t})=>({[`&${n}-${e}`]:{[`${n}-container`]:{backgroundColor:t},[`${n}-arrow`]:{[h(`arrow-background-color`)]:t}}})),"&-rtl":{direction:`rtl`}}},pw(e,g(`arrow-background-color`)),{[`${n}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...v,...y,position:`absolute`,zIndex:t(s).sub(1).equal(),"&-hidden":{display:`none`},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Cw=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...dw({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...lw(dc(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),ww=(e,t,n=!0)=>Ql(`Tooltip`,e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r,maxWidth:i}=e;return[Sw(dc(e,{tooltipMaxWidth:i,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),Ag(e,`zoom-big-fast`)]},Cw,{resetStyle:!1,injectStyle:n})(e,t),Tw=Sc.map(e=>`${e}-inverse`),Ew=[`success`,`processing`,`error`,`default`,`warning`];function Dw(e,t=!0){return t?[].concat(pa(Tw),pa(Sc)).includes(e):Sc.includes(e)}function Ow(e){return Ew.includes(e)}var kw=(e,t,n)=>{let r=Dw(n),[i]=tu(e,`tooltip`),a=J({[`${t}-${n}`]:n&&r}),o={},s={},c=s_(n).toRgb(),l=(.299*c.r+.587*c.g+.114*c.b)/255<.5?`#FFF`:`#000`;return n&&!r&&(o.background=n,o[i(`overlay-color`)]=l,s[i(`arrow-background-color`)]=n),{className:a,overlayStyle:o,arrowStyle:s}},Aw=e=>{let{prefixCls:t,className:n,placement:r=`top`,title:i,color:a,overlayInnerStyle:o,classNames:s,styles:c}=e,{getPrefixCls:l}=S.useContext(ga),u=l(`tooltip`,t),d=l(),f=sp(u),[p,m]=ww(u,f),h=kw(d,u,a),g=h.arrowStyle,_=S.useMemo(()=>({container:{...o,...h.overlayStyle}}),[o,h.overlayStyle]),v={...e,placement:r},[y,b]=Cf([s],[_,c],{props:v}),x=J(f,p,m,u,`${u}-pure`,`${u}-placement-${r}`,n,h.className);return S.createElement(`div`,{className:x,style:g},S.createElement(`div`,{className:`${u}-arrow`}),S.createElement(nw,{...e,className:p,prefixCls:u,classNames:y,styles:b},i))},jw=S.forwardRef((e,t)=>{let{prefixCls:n,openClassName:r,getTooltipContainer:i,color:a,children:o,afterOpenChange:s,arrow:c,destroyTooltipOnHide:l,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:m,autoAdjustOverflow:h=!0,motion:g,getPopupContainer:_,placement:v=`top`,mouseEnterDelay:y=.1,mouseLeaveDelay:b=.1,rootClassName:x,styles:C,classNames:w,onOpenChange:T,overlayInnerStyle:E,overlayStyle:D,overlayClassName:O,...k}=e,[,A]=Vl(),j=e[`data-popover-inject`],{getPopupContainer:M,getPrefixCls:N,direction:P,...F}=ya(`tooltip`),{className:I,style:L,classNames:R,styles:z,arrow:B,trigger:V}=j?{}:F,H=bw(c,B),U=H.show,ee=p||V||`hover`,W=_||M,te=u??!!l,G=S.useContext(yw);Gi(`Tooltip`);let ne=S.useRef(null),K=()=>{ne.current?.forceAlign()};S.useImperativeHandle(t,()=>({forceAlign:K,nativeElement:ne.current?.nativeElement,popupElement:ne.current?.popupElement}));let[re,ie]=Gn(e.defaultOpen??!1,e.open),ae=!d&&!f&&d!==0,q=e=>{ie(ae?!1:e),!ae&&T&&T(e)},oe=S.useMemo(()=>m||vw({arrowPointAtCenter:H?.pointAtCenter??!1,autoAdjustOverflow:h,arrowWidth:U?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0}),[H,m,A,U,h]),se=S.useMemo(()=>d===0?d:f||d||``,[f,d]),ce=S.createElement(yy,{space:!0,form:!0},typeof se==`function`?se():se),le={...e,trigger:ee,builtinPlacements:oe,getPopupContainer:W,destroyOnHidden:te},[ue,de]=Cf([R,w],[z,C],{props:le}),fe=N(`tooltip`,n),pe=N(),me=re;(!(`open`in e)&&ae||G)&&(me=!1);let he=S.isValidElement(o)&&!cm(o)?o:S.createElement(`span`,null,o),ge=he.props,_e=!ge.className||typeof ge.className==`string`?J(ge.className,r||`${fe}-open`):ge.className,ve=sp(fe),[ye,be]=ww(fe,ve,!j),xe=kw(pe,fe,a),Se=xe.arrowStyle,Ce=J(ve,ye,be),we=J(O,{[`${fe}-rtl`]:P===`rtl`},xe.className,x,Ce,I,ue.root),[Te,Ee]=Lf(`Tooltip`,k.zIndex),De={...de.container,...E,...xe.overlayStyle},Oe=S.createElement(cw,{unique:!0,...k,zIndex:Te,showArrow:U,placement:v,mouseEnterDelay:y,mouseLeaveDelay:b,prefixCls:fe,classNames:{root:we,container:ue.container,arrow:ue.arrow,uniqueContainer:J(Ce,ue.container)},styles:{root:{...Se,...de.root,...L,...D},container:De,uniqueContainer:De,arrow:de.arrow},ref:ne,overlay:ce,visible:me,onVisibleChange:q,afterVisibleChange:s,arrowContent:S.createElement(`span`,{className:`${fe}-arrow-content`}),motion:{motionName:gh(pe,`zoom-big-fast`,typeof g?.motionName==`string`?g?.motionName:void 0),motionDeadline:1e3},trigger:ee,builtinPlacements:oe,getTooltipContainer:W,destroyOnHidden:te},me?um(he,{className:_e}):he);return S.createElement(jf.Provider,{value:Ee},Oe)});jw._InternalPanelDoNotUseOrYouWillBeFired=Aw,jw.UniqueProvider=pm;var Mw=`50%`,Nw=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:a,boxShadowSecondary:o,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:l,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:h,antCls:g}=e,[_,v]=tu(g,`tooltip`);return[{[t]:{...Ul(e),position:`absolute`,top:0,left:{_skip_check_:!0,value:0},zIndex:l,fontWeight:`normal`,whiteSpace:`normal`,textAlign:`start`,cursor:`auto`,userSelect:`text`,[_(`valid-offset-x`)]:v(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[v(`valid-offset-x`,Mw),`var(--arrow-y, ${Mw})`].join(` `),[_(`arrow-background-color`)]:d,width:`max-content`,maxWidth:`100vw`,"&-rtl":{direction:`rtl`},"&-hidden":{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-container`]:{backgroundColor:f,backgroundClip:`padding-box`,borderRadius:c,boxShadow:o,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:p,padding:h},[`${t}-content`]:{color:n,padding:m}}},pw(e,v(`arrow-background-color`)),{[`${t}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow,display:`inline-block`}}]},Pw=e=>{let{componentCls:t,antCls:n}=e,[r]=tu(n,`tooltip`);return{[t]:Sc.map(n=>{let i=e[`${n}6`];return{[`&${t}-${n}`]:{[r(`arrow-background-color`)]:i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:`transparent`}}}})}},Fw=Ql(`Popover`,e=>{let{colorBgElevated:t,colorText:n}=e,r=dc(e,{popoverBg:t,popoverColor:n});return[Nw(r),Pw(r),Ag(r,`zoom-big`)]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:a,zIndexPopupBase:o,borderRadiusLG:s,marginXS:c,lineType:l,colorSplit:u,paddingSM:d}=e,f=n-r,p=f/2,m=f/2-t,h=i;return{titleMinWidth:177,zIndexPopup:o+30,...lw(e),...dw({contentRadius:s,limitVerticalRadius:!0}),innerPadding:a?0:12,titleMarginBottom:a?0:c,titlePadding:a?`${p}px ${h}px ${m}px`:0,titleBorderBottom:a?`${t}px ${l} ${u}`:`none`,innerContentPadding:a?`${d}px ${h}px`:0}},{resetStyle:!1,deprecatedTokens:[[`width`,`titleMinWidth`],[`minWidth`,`titleMinWidth`]]}),Iw=e=>{let{title:t,content:n,prefixCls:r,classNames:i,styles:a}=e;return!t&&!n?null:S.createElement(S.Fragment,null,t&&S.createElement(`div`,{className:J(`${r}-title`,i?.title),style:a?.title},t),n&&S.createElement(`div`,{className:J(`${r}-content`,i?.content),style:a?.content},n))},Lw=e=>{let{hashId:t,prefixCls:n,className:r,style:i,placement:a=`top`,title:o,content:s,children:c,classNames:l,styles:u}=e,d=tw(o),f=tw(s),p={...e,placement:a},[m,h]=Cf([l],[u],{props:p}),g=J(t,n,`${n}-pure`,`${n}-placement-${a}`,r);return S.createElement(`div`,{className:g,style:i},S.createElement(`div`,{className:`${n}-arrow`}),S.createElement(nw,{...e,className:t,prefixCls:n,classNames:m,styles:h},c||S.createElement(Iw,{prefixCls:n,title:d,content:f,classNames:m,styles:h})))},Rw=e=>{let{prefixCls:t,className:n,...r}=e,{getPrefixCls:i}=S.useContext(ga),a=i(`popover`,t),[o,s]=Fw(a);return S.createElement(Lw,{...r,prefixCls:a,hashId:o,className:J(n,s)})},zw=S.forwardRef((e,t)=>{let{prefixCls:n,title:r,content:i,overlayClassName:a,placement:o=`top`,trigger:s,children:c,mouseEnterDelay:l=.1,mouseLeaveDelay:u=.1,onOpenChange:d,overlayStyle:f={},styles:p,classNames:m,motion:h,arrow:g,..._}=e,{getPrefixCls:v,className:y,style:b,classNames:x,styles:C,arrow:w,trigger:T}=ya(`popover`),E=v(`popover`,n),[D,O]=Fw(E),k=v(),A=bw(g,w),j=s||T||`hover`,M={...e,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,overlayStyle:f,styles:p,classNames:m},[N,P]=Cf([x,m],[C,p],{props:M}),F=J(a,D,O,y,N.root),[I,L]=Gn(e.defaultOpen??!1,e.open),R=e=>{L(e),d?.(e)},z=tw(r),B=tw(i);return S.createElement(jw,{unique:!1,arrow:A,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,..._,prefixCls:E,classNames:{root:F,container:N.container,arrow:N.arrow},styles:{root:{...P.root,...b,...f},container:P.container,arrow:P.arrow},ref:t,open:I,onOpenChange:R,overlay:z||B?S.createElement(Iw,{prefixCls:E,title:z,content:B,classNames:N,styles:P}):null,motion:{motionName:gh(k,`zoom-big`,typeof h?.motionName==`string`?h?.motionName:void 0)},"data-popover-inject":!0},c)});zw._InternalPanelDoNotUseOrYouWillBeFired=Rw;var Bw=e=>{let{size:t,shape:n}=S.useContext(XC),r=S.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return S.createElement(XC.Provider,{value:r},e.children)},Vw=e=>{let{getPrefixCls:t,direction:n}=S.useContext(ga),{prefixCls:r,className:i,rootClassName:a,style:o,maxCount:s,maxStyle:c,size:l,shape:u,maxPopoverPlacement:d,maxPopoverTrigger:f,children:p,max:m}=e,h=t(`avatar`,r),g=`${h}-group`,_=sp(h),[v,y]=$C(h,_),b=J(g,{[`${g}-rtl`]:n===`rtl`},y,_,i,a,v),x=ki(p).map((e,t)=>um(e,{key:`avatar-key-${t}`})),C=m?.count||s,w=x.length;if(C&&C{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z`}}]},name:`left`,theme:`outlined`}}))());function Ww(){return Ww=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Ww({},e,{ref:t,icon:Uw.default}))),{ESC:Kw,TAB:qw}=Qr;function Jw({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:i}){let a=S.useRef(!1),o=()=>{e&&(t.current?.focus?.(),n?.(!1))},s=()=>i.current?.focus?(i.current.focus(),a.current=!0,!0):!1,c=e=>{switch(e.keyCode){case Kw:o();break;case qw:{let t=!1;a.current||(t=s()),t?e.preventDefault():o();break}}};S.useEffect(()=>e?(window.addEventListener(`keydown`,c),r&&Oi(s,3),()=>{window.removeEventListener(`keydown`,c),a.current=!1}):()=>{a.current=!1},[e])}var Yw=(0,S.forwardRef)((e,t)=>{let{overlay:n,arrow:r,prefixCls:i}=e,a=(0,S.useMemo)(()=>{let e;return e=typeof n==`function`?n():n,e},[n]),o=cr(t,pr(a));return S.createElement(S.Fragment,null,r&&S.createElement(`div`,{className:`${i}-arrow`}),S.cloneElement(a,{ref:ur(a)?o:void 0}))}),Xw={adjustX:1,adjustY:1},Zw=[0,0],Qw={topLeft:{points:[`bl`,`tl`],overflow:Xw,offset:[0,-4],targetOffset:Zw},top:{points:[`bc`,`tc`],overflow:Xw,offset:[0,-4],targetOffset:Zw},topRight:{points:[`br`,`tr`],overflow:Xw,offset:[0,-4],targetOffset:Zw},bottomLeft:{points:[`tl`,`bl`],overflow:Xw,offset:[0,4],targetOffset:Zw},bottom:{points:[`tc`,`bc`],overflow:Xw,offset:[0,4],targetOffset:Zw},bottomRight:{points:[`tr`,`br`],overflow:Xw,offset:[0,4],targetOffset:Zw}};function $w(){return $w=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{arrow:n=!1,prefixCls:r=`rc-dropdown`,transitionName:i,animation:a,align:o,placement:s=`bottomLeft`,placements:c=Qw,getPopupContainer:l,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:m,trigger:h=[`hover`],autoFocus:g,overlay:_,children:v,onVisibleChange:y,...b}=e,[x,C]=S.useState(),w=`visible`in e?m:x,T=a?`${r}-${a}`:i,E=S.useRef(null),D=S.useRef(null),O=S.useRef(null);S.useImperativeHandle(t,()=>E.current);let k=e=>{C(e),y?.(e)};Jw({visible:w,triggerRef:O,onVisibleChange:k,autoFocus:g,overlayRef:D});let A=t=>{let{onOverlayClick:n}=e;C(!1),n&&n(t)},j=()=>S.createElement(Yw,{ref:D,overlay:_,prefixCls:r,arrow:n}),M=()=>typeof _==`function`?j:j(),N=()=>{let{minOverlayWidthMatchTrigger:t,alignPoint:n}=e;return`minOverlayWidthMatchTrigger`in e?t:!n},P=S.cloneElement(v,{className:J(v.props?.className,w&&(()=>{let{openClassName:t}=e;return t===void 0?`${r}-open`:t})()),ref:ur(v)?cr(O,pr(v)):void 0}),F=d;return!F&&h.indexOf(`contextMenu`)!==-1&&(F=[`click`]),S.createElement(sm,$w({builtinPlacements:c},b,{prefixCls:r,ref:E,popupClassName:J(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:h,showAction:u,hideAction:F,popupPlacement:s,popupAlign:o,popupMotion:{motionName:T},popupVisible:w,stretch:N()?`minWidth`:``,popup:M(),onOpenChange:k,onPopupClick:A,getPopupContainer:l}),P)}),tT=S.createContext(null);function nT(e,t){return`${e}-${t}`}function rT(e){return nT(S.useContext(tT),e)}var iT=S.createContext(null);function aT(e,t){let n={...e};return Object.keys(t).forEach(e=>{let r=t[e];r!==void 0&&(n[e]=r)}),n}function oT({children:e,locked:t,...n}){let r=S.useContext(iT),i=Zn(()=>aT(r,n),[r,n],(e,n)=>!t&&(e[0]!==n[0]||!fi(e[1],n[1],!0)));return S.createElement(iT.Provider,{value:i},e)}var sT=[],cT=S.createContext(null);function lT(){return S.useContext(cT)}var uT=S.createContext(sT);function dT(e){let t=S.useContext(uT);return S.useMemo(()=>e===void 0?t:[...t,e],[t,e])}var fT=S.createContext(null),pT=S.createContext({}),{LEFT:mT,RIGHT:hT,UP:gT,DOWN:_T,ENTER:vT,ESC:yT,HOME:bT,END:xT}=Qr,ST=[gT,_T,mT,hT];function CT(e,t,n,r){let i=`prev`,a=`next`,o=`children`,s=`parent`;if(e===`inline`&&r===vT)return{inlineTrigger:!0};let c={[gT]:i,[_T]:a},l={[mT]:n?a:i,[hT]:n?i:a,[_T]:o,[vT]:o},u={[gT]:i,[_T]:a,[vT]:o,[yT]:s,[mT]:n?o:s,[hT]:n?s:o};switch({inline:c,horizontal:l,vertical:u,inlineSub:c,horizontalSub:u,verticalSub:u}[`${e}${t?``:`Sub`}`]?.[r]){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case o:return{offset:1,sibling:!1};default:return null}}function wT(e){let t=e;for(;t;){if(t.getAttribute(`data-menu-list`))return t;t=t.parentElement}return null}function TT(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function ET(e,t){return Mr(e,!0).filter(e=>t.has(e))}function DT(e,t,n,r=1){if(!e)return null;let i=ET(e,t),a=i.length,o=i.findIndex(e=>n===e);return r<0?o===-1?o=a-1:--o:r>0&&(o+=1),o=(o+a)%a,i[o]}var OT=(e,t)=>{let n=new Set,r=new Map,i=new Map;return e.forEach(e=>{let a=document.querySelector(`[data-menu-id='${nT(t,e)}']`);a&&(n.add(a),i.set(a,e),r.set(e,a))}),{elements:n,key2element:r,element2key:i}};function kT(e,t,n,r,i,a,o,s,c,l){let u=S.useRef(),d=S.useRef();d.current=t;let f=()=>{Oi.cancel(u.current)};return S.useEffect(()=>()=>{f()},[]),p=>{let{which:m}=p;if([...ST,vT,yT,bT,xT].includes(m)){let l=a(),h=OT(l,r),{elements:g,key2element:_,element2key:v}=h,y=TT(_.get(t),g),b=v.get(y),x=CT(e,o(b,!0).length===1,n,m);if(!x&&m!==bT&&m!==xT)return;(ST.includes(m)||[bT,xT].includes(m))&&p.preventDefault();let S=e=>{if(e){let t=e,n=e.querySelector(`a`);n?.getAttribute(`href`)&&(t=n);let r=v.get(e);s(r),f(),u.current=Oi(()=>{d.current===r&&t.focus()})}};if([bT,xT].includes(m)||x.sibling||!y){let t;t=!y||e===`inline`?i.current:wT(y);let n,r=ET(t,g);n=m===bT?r[0]:m===xT?r[r.length-1]:DT(t,g,y,x.offset),S(n)}else if(x.inlineTrigger)c(b);else if(x.offset>0)c(b,!0),f(),u.current=Oi(()=>{h=OT(l,r);let e=y.getAttribute(`aria-controls`);S(DT(document.getElementById(e),h.elements))},5);else if(x.offset<0){let e=o(b,!0),t=e[e.length-2],n=_.get(t);c(t,!1),S(n)}}l?.(p)}}function AT(e){Promise.resolve().then(e)}var jT=`__RC_UTIL_PATH_SPLIT__`,MT=e=>e.join(jT),NT=e=>e.split(jT),PT=`rc-menu-more`;function FT(){let[,e]=S.useState({}),t=(0,S.useRef)(new Map),n=(0,S.useRef)(new Map),[r,i]=S.useState([]),a=(0,S.useRef)(0),o=(0,S.useRef)(!1),s=()=>{o.current||e({})},c=(0,S.useCallback)((e,r)=>{let i=MT(r);n.current.set(i,e),t.current.set(e,i),a.current+=1;let o=a.current;AT(()=>{o===a.current&&s()})},[]),l=(0,S.useCallback)((e,r)=>{let i=MT(r);n.current.delete(i),t.current.delete(e)},[]),u=(0,S.useCallback)(e=>{i(e)},[]),d=(0,S.useCallback)((e,n)=>{let i=NT(t.current.get(e)||``);return n&&r.includes(i[0])&&i.unshift(PT),i},[r]),f=(0,S.useCallback)((e,t)=>e.filter(e=>e!==void 0).some(e=>d(e,!0).includes(t)),[d]),p=()=>{let e=[...t.current.keys()];return r.length&&e.push(PT),e},m=(0,S.useCallback)(e=>{let r=`${t.current.get(e)}${jT}`,i=new Set;return[...n.current.keys()].forEach(e=>{e.startsWith(r)&&i.add(n.current.get(e))}),i},[]);return S.useEffect(()=>()=>{o.current=!0},[]),{registerPath:c,unregisterPath:l,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:m}}function IT(e){let t=S.useRef(e);t.current=e;let n=S.useCallback((...e)=>t.current?.(...e),[]);return e?n:void 0}function LT(e,t,n,r){let{activeKey:i,onActive:a,onInactive:o}=S.useContext(iT),s={active:i===e};return t||(s.onMouseEnter=t=>{n?.({key:e,domEvent:t}),a(e)},s.onMouseLeave=t=>{r?.({key:e,domEvent:t}),o(e)}),s}function RT(e){let{mode:t,rtl:n,inlineIndent:r}=S.useContext(iT);if(t!==`inline`)return null;let i=e;return n?{paddingRight:i*r}:{paddingLeft:i*r}}function zT({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e==`function`?r=S.createElement(e,{...t}):typeof e!=`boolean`&&(r=e),r||n||null)}function BT({item:e,...t}){return Object.defineProperty(t,`item`,{get:()=>(ui(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function VT(){return VT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,eventKey:i,warnKey:a,disabled:o,itemIcon:s,children:c,role:l,onMouseEnter:u,onMouseLeave:d,onClick:f,onKeyDown:p,onFocus:m,...h}=e,g=rT(i),{prefixCls:_,onItemClick:v,disabled:y,overflowDisabled:b,itemIcon:x,selectedKeys:C,onActive:w}=S.useContext(iT),{_internalRenderMenuItem:T}=S.useContext(pT),E=`${_}-item`,D=S.useRef(),O=S.useRef(),k=y||o,A=lr(t,O),j=dT(i),M=e=>({key:i,keyPath:[...j].reverse(),item:D.current,domEvent:e}),N=s||x,{active:P,...F}=LT(i,k,u,d),I=C.includes(i),L=RT(j.length),R=e=>{if(k)return;let t=M(e);f?.(BT(t)),v(t)},z=e=>{if(p?.(e),e.which===Qr.ENTER){let t=M(e);f?.(BT(t)),v(t)}},B=e=>{w(i),m?.(e)},V={};e.role===`option`&&(V[`aria-selected`]=I);let H=S.createElement(HT,VT({ref:D,elementRef:A,role:l===null?`none`:l||`menuitem`,tabIndex:o?null:-1,"data-menu-id":b&&g?null:g},gi(h,[`extra`]),F,V,{component:`li`,"aria-disabled":o,style:{...L,...n},className:J(E,{[`${E}-active`]:P,[`${E}-selected`]:I,[`${E}-disabled`]:k},r),onClick:R,onKeyDown:z,onFocus:B}),c,S.createElement(zT,{props:{...e,isSelected:I},icon:N}));return T&&(H=T(H,e,{selected:I})),H});function WT(e,t){let{eventKey:n}=e,r=lT(),i=dT(n);return S.useEffect(()=>{if(r)return r.registerPath(n,i),()=>{r.unregisterPath(n,i)}},[i]),r?null:S.createElement(UT,VT({},e,{ref:t}))}var GT=S.forwardRef(WT);function KT(){return KT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:i,mode:a,rtl:o}=S.useContext(iT);return S.createElement(`ul`,KT({className:J(i,o&&`${i}-rtl`,`${i}-sub`,`${i}-${a===`inline`?`inline`:`vertical`}`,e),role:`menu`},n,{"data-menu-list":!0,ref:r}),t)});function JT(e,t){return ki(e).map((e,n)=>{if(S.isValidElement(e)){let{key:r}=e,i=e.props?.eventKey??r;i??=`tmp_key-${[...t,n].join(`-`)}`;let a={key:i,eventKey:i};return S.cloneElement(e,a)}return e})}var YT={adjustX:1,adjustY:1},XT={topLeft:{points:[`bl`,`tl`],overflow:YT},topRight:{points:[`br`,`tr`],overflow:YT},bottomLeft:{points:[`tl`,`bl`],overflow:YT},bottomRight:{points:[`tr`,`br`],overflow:YT},leftTop:{points:[`tr`,`tl`],overflow:YT},leftBottom:{points:[`br`,`bl`],overflow:YT},rightTop:{points:[`tl`,`tr`],overflow:YT},rightBottom:{points:[`bl`,`br`],overflow:YT}},ZT={topLeft:{points:[`bl`,`tl`],overflow:YT},topRight:{points:[`br`,`tr`],overflow:YT},bottomLeft:{points:[`tl`,`bl`],overflow:YT},bottomRight:{points:[`tr`,`br`],overflow:YT},rightTop:{points:[`tr`,`tl`],overflow:YT},rightBottom:{points:[`br`,`bl`],overflow:YT},leftTop:{points:[`tl`,`tr`],overflow:YT},leftBottom:{points:[`bl`,`br`],overflow:YT}};function QT(e,t,n){if(t)return t;if(n)return n[e]||n.other}var $T={horizontal:`bottomLeft`,vertical:`rightTop`,"vertical-left":`rightTop`,"vertical-right":`leftTop`};function eE({prefixCls:e,visible:t,children:n,popup:r,popupStyle:i,popupClassName:a,popupOffset:o,disabled:s,mode:c,onVisibleChange:l}){let{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:m,triggerSubMenuAction:h,forceSubMenuRender:g,rootClassName:_,motion:v,defaultMotions:y}=S.useContext(iT),[b,x]=S.useState(!1),C=d?{...ZT,...m}:{...XT,...m},w=$T[c],T=QT(c,v,y),E=S.useRef(T);c!==`inline`&&(E.current=T);let D={...E.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},O=S.useRef();return S.useEffect(()=>(O.current=Oi(()=>{x(t)}),()=>{Oi.cancel(O.current)}),[t]),S.createElement(sm,{prefixCls:e,popupClassName:J(`${e}-popup`,{[`${e}-rtl`]:d},a,_),stretch:c===`horizontal`?`minWidth`:null,getPopupContainer:u,builtinPlacements:C,popupPlacement:w,popupVisible:b,popup:r,popupStyle:i,popupAlign:o&&{offset:o},action:s?[]:[h],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:l,forceRender:g,popupMotion:D,fresh:!0},n)}function tE(){return tE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current&&f(!1)},[l]);let m={...QT(i,s,c)};n.length>1&&(m.motionAppear=!1);let h=m.onVisibleChanged;return m.onVisibleChanged=e=>(!u.current&&!e&&f(!0),h?.(e)),d?null:S.createElement(oT,{mode:i,locked:!u.current},S.createElement(Od,tE({visible:p},m,{forceRender:o,removeOnLeave:!1,leavedClassName:`${a}-hidden`}),({className:t,style:n})=>S.createElement(qT,{id:e,className:t,style:n},r)))}function rE(){return rE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,styles:i,classNames:a,title:o,eventKey:s,warnKey:c,disabled:l,internalPopupClose:u,children:d,itemIcon:f,expandIcon:p,popupClassName:m,popupOffset:h,popupStyle:g,onClick:_,onMouseEnter:v,onMouseLeave:y,onTitleClick:b,onTitleMouseEnter:x,onTitleMouseLeave:C,popupRender:w,...T}=e,E=rT(s),{prefixCls:D,mode:O,openKeys:k,disabled:A,overflowDisabled:j,activeKey:M,selectedKeys:N,itemIcon:P,expandIcon:F,onItemClick:I,onOpenChange:L,onActive:R,popupRender:z}=S.useContext(iT),{_internalRenderSubMenuItem:B}=S.useContext(pT),{isSubPathKey:V}=S.useContext(fT),H=dT(),U=`${D}-submenu`,ee=A||l,W=S.useRef(),te=S.useRef(),G=f??P,ne=p??F,K=k.includes(s),re=!j&&K,ie=V(N,s),{active:ae,...q}=LT(s,ee,x,C),[oe,se]=S.useState(!1),ce=e=>{ee||se(e)},le=e=>{ce(!0),v?.({key:s,domEvent:e})},ue=e=>{ce(!1),y?.({key:s,domEvent:e})},de=S.useMemo(()=>ae||(O===`inline`?!1:oe||V([M],s)),[O,ae,M,oe,s,V]),fe=RT(H.length),pe=e=>{ee||(b?.({key:s,domEvent:e}),O===`inline`&&L(s,!K))},me=IT(e=>{_?.(BT(e)),I(e)}),he=e=>{O!==`inline`&&L(s,e)},ge=()=>{R(s)},_e=E&&`${E}-popup`,ve=S.useMemo(()=>S.createElement(zT,{icon:O===`horizontal`?void 0:ne,props:{...e,isOpen:re,isSubMenu:!0}},S.createElement(`i`,{className:`${U}-arrow`})),[O,ne,e,re,U]),ye=S.createElement(`div`,rE({role:`menuitem`,style:fe,className:`${U}-title`,tabIndex:ee?null:-1,ref:W,title:typeof o==`string`?o:null,"data-menu-id":j&&E?null:E,"aria-expanded":re,"aria-haspopup":!0,"aria-controls":_e,"aria-disabled":ee,onClick:pe,onFocus:ge},q),o,ve),be=S.useRef(O);O!==`inline`&&H.length>1?be.current=`vertical`:be.current=O;let xe=be.current,Se=S.useMemo(()=>{let t=S.createElement(oT,{classNames:a,styles:i,mode:xe===`horizontal`?`vertical`:xe},S.createElement(qT,{id:_e,ref:te},d)),n=w||z;return n?n(t,{item:e,keys:H}):t},[w,z,H,_e,d,e,xe]);if(!j){let e=be.current;ye=S.createElement(eE,{mode:e,prefixCls:U,visible:!u&&re&&O!==`inline`,popupClassName:m,popupOffset:h,popupStyle:g,popup:Se,disabled:ee,onVisibleChange:he},ye)}let Ce=S.createElement(Xx.Item,rE({ref:t,role:`none`},T,{component:`li`,style:n,className:J(U,`${U}-${O}`,r,{[`${U}-open`]:re,[`${U}-active`]:de,[`${U}-selected`]:ie,[`${U}-disabled`]:ee}),onMouseEnter:le,onMouseLeave:ue}),ye,!j&&S.createElement(nE,{id:_e,open:re,keyPath:H},d));return B&&(Ce=B(Ce,e,{selected:ie,active:de,open:re,disabled:ee})),S.createElement(oT,{classNames:a,styles:i,onItemClick:me,mode:O===`horizontal`?`vertical`:O,itemIcon:G,expandIcon:ne},Ce)}),aE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=dT(n),a=JT(r,i),o=lT();S.useEffect(()=>{if(o)return o.registerPath(n,i),()=>{o.unregisterPath(n,i)}},[i]);let s;return s=o?a:S.createElement(iE,rE({ref:t},e),a),S.createElement(uT.Provider,{value:i},s)});function oE({className:e,style:t}){let{prefixCls:n}=S.useContext(iT);return lT()?null:S.createElement(`li`,{role:`separator`,className:J(`${n}-item-divider`,e),style:t})}function sE(){return sE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,title:r,eventKey:i,children:a,...o}=e,{prefixCls:s,classNames:c,styles:l}=S.useContext(iT),u=`${s}-item-group`;return S.createElement(`li`,sE({ref:t,role:`presentation`},o,{onClick:e=>e.stopPropagation(),className:J(u,n)}),S.createElement(`div`,{role:`presentation`,className:J(`${u}-title`,c?.listTitle),style:l?.listTitle,title:typeof r==`string`?r:void 0},r),S.createElement(`ul`,{role:`group`,className:J(`${u}-list`,c?.list),style:l?.list},a))}),lE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=JT(r,dT(n));return lT()?i:S.createElement(cE,sE({ref:t},gi(e,[`warnKey`])),i)});function uE(){return uE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(e&&typeof e==`object`){let{label:c,children:l,key:u,type:d,extra:f,...p}=e,m=u??`tmp-${s}`;return l||d===`group`?d===`group`?S.createElement(i,uE({key:m},p,{title:c}),dE(l,t,n)):S.createElement(a,uE({key:m},p,{title:c}),dE(l,t,n)):d===`divider`?S.createElement(o,uE({key:m},p)):S.createElement(r,uE({key:m},p,{extra:f}),c,(!!f||f===0)&&S.createElement(`span`,{className:`${n}-item-extra`},f))}return null}).filter(e=>e)}function fE(e,t,n,r,i){let a=e,o={divider:oE,item:GT,group:lE,submenu:aE,...r};return t&&(a=dE(t,o,i)),JT(a,n)}function pE(){return pE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-menu`,rootClassName:r,style:i,className:a,styles:o,classNames:s,tabIndex:c=0,items:l,children:u,direction:d,id:f,mode:p=`vertical`,inlineCollapsed:m,disabled:h,disabledOverflow:g,subMenuOpenDelay:_=.1,subMenuCloseDelay:v=.1,forceSubMenuRender:y,defaultOpenKeys:b,openKeys:x,activeKey:C,defaultActiveFirst:w,selectable:T=!0,multiple:E=!1,defaultSelectedKeys:D,selectedKeys:O,onSelect:k,onDeselect:A,inlineIndent:j=24,motion:M,defaultMotions:N,triggerSubMenuAction:P=`hover`,builtinPlacements:F,itemIcon:I,expandIcon:L,overflowedIndicator:R=`...`,overflowedIndicatorPopupClassName:z,getPopupContainer:B,onClick:V,onOpenChange:H,onKeyDown:U,openAnimation:ee,openTransitionName:W,_internalRenderMenuItem:te,_internalRenderSubMenuItem:G,_internalComponents:ne,popupRender:K,...re}=e,[ie,ae]=S.useMemo(()=>[fE(u,l,mE,ne,n),fE(u,l,mE,{},n)],[u,l,ne]),[q,oe]=S.useState(!1),se=S.useRef(),ce=Xn(f?`rc-menu-uuid-${f}`:`rc-menu-uuid`),le=d===`rtl`,[ue,de]=Gn(b,x),fe=ue||mE,pe=(e,t=!1)=>{function n(){de(e),H?.(e)}t?(0,Vi.flushSync)(n):n()},[me,he]=S.useState(fe),ge=S.useRef(!1),[_e,ve]=S.useMemo(()=>(p===`inline`||p===`vertical`)&&m?[`vertical`,m]:[p,!1],[p,m]),ye=_e===`inline`,[be,xe]=S.useState(_e),[Se,Ce]=S.useState(ve);S.useEffect(()=>{xe(_e),Ce(ve),ge.current&&(ye?de(me):pe(mE))},[_e,ve]);let[we,Te]=S.useState(0),Ee=we>=ie.length-1||be!==`horizontal`||g;S.useEffect(()=>{ye&&he(fe)},[fe]),S.useEffect(()=>(ge.current=!0,()=>{ge.current=!1}),[]);let{registerPath:De,unregisterPath:Oe,refreshOverflowKeys:ke,isSubPathKey:Ae,getKeyPath:je,getKeys:Me,getSubPathKeys:Ne}=FT(),Pe=S.useMemo(()=>({registerPath:De,unregisterPath:Oe}),[De,Oe]),Fe=S.useMemo(()=>({isSubPathKey:Ae}),[Ae]);S.useEffect(()=>{ke(Ee?mE:ie.slice(we+1).map(e=>e.key))},[we,Ee]);let[Ie,Le]=Gn(C||w&&ie[0]?.key,C),Re=IT(e=>{Le(e)}),ze=IT(()=>{Le(void 0)});(0,S.useImperativeHandle)(t,()=>({list:se.current,focus:e=>{let t=Me(),{elements:n,key2element:r,element2key:i}=OT(t,ce),a=ET(se.current,n),o;o=Ie&&t.includes(Ie)?Ie:a[0]?i.get(a[0]):ie.find(e=>!e.props.disabled)?.key;let s=r.get(o);o&&s&&s?.focus?.(e)},findItem:({key:e})=>{let{key2element:t}=OT(Me(),ce);return t.get(e)||null}}));let[Be,Ve]=Gn(D||[],O),He=S.useMemo(()=>Array.isArray(Be)?Be:Be==null?mE:[Be],[Be]),Ue=e=>{if(T){let{key:t}=e,n=He.includes(t),r;r=E?n?He.filter(e=>e!==t):[...He,t]:[t],Ve(r);let i={...e,selectedKeys:r};n?A?.(i):k?.(i)}!E&&fe.length&&be!==`inline`&&pe(mE)},We=IT(e=>{V?.(BT(e)),Ue(e)}),Ge=IT((e,t)=>{let n=fe.filter(t=>t!==e);if(t)n.push(e);else if(be!==`inline`){let t=Ne(e);n=n.filter(e=>!t.has(e))}fi(fe,n,!0)||pe(n,!0)}),Ke=kT(be,Ie,le,ce,se,Me,je,Le,(e,t)=>{Ge(e,t??!fe.includes(e))},U);S.useEffect(()=>{oe(!0)},[]);let qe=S.useMemo(()=>({_internalRenderMenuItem:te,_internalRenderSubMenuItem:G}),[te,G]),Je=be!==`horizontal`||g?ie:ie.map((e,t)=>S.createElement(oT,{key:e.key,overflowDisabled:t>we,classNames:s,styles:o},e)),Ye=S.createElement(Xx,pE({id:f,ref:se,prefixCls:`${n}-overflow`,component:`ul`,itemComponent:GT,className:J(n,`${n}-root`,`${n}-${be}`,a,{[`${n}-inline-collapsed`]:Se,[`${n}-rtl`]:le},r),dir:d,style:i,role:`menu`,tabIndex:c,data:Je,renderRawItem:e=>e,renderRawRest:e=>{let t=e.length,n=t?ie.slice(-t):null;return S.createElement(aE,{eventKey:PT,title:R,disabled:Ee,internalPopupClose:t===0,popupClassName:z},n)},maxCount:be!==`horizontal`||g?Xx.INVALIDATE:Xx.RESPONSIVE,ssr:`full`,"data-menu-list":!0,onVisibleChange:e=>{Te(e)},onKeyDown:Ke},re));return S.createElement(pT.Provider,{value:qe},S.createElement(tT.Provider,{value:ce},S.createElement(oT,{prefixCls:n,rootClassName:r,classNames:s,styles:o,mode:be,openKeys:fe,rtl:le,disabled:h,motion:q?M:null,defaultMotions:q?N:null,activeKey:Ie,onActive:Re,onInactive:ze,selectedKeys:He,inlineIndent:j,subMenuOpenDelay:_,subMenuCloseDelay:v,forceSubMenuRender:y,builtinPlacements:F,triggerSubMenuAction:P,getPopupContainer:B,itemIcon:I,expandIcon:L,onItemClick:We,onOpenChange:Ge,popupRender:K},S.createElement(fT.Provider,{value:Fe},Ye),S.createElement(`div`,{style:{display:`none`},"aria-hidden":!0},S.createElement(cT.Provider,{value:Pe},ae)))))});hE.Item=GT,hE.SubMenu=aE,hE.ItemGroup=lE,hE.Divider=oE;var gE=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function _E(){return _E=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_E({},e,{ref:t,icon:gE.default}))),yE=S.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),bE=e=>{let{antCls:t,componentCls:n,colorText:r,footerBg:i,headerHeight:a,headerPadding:o,headerColor:s,footerPadding:c,fontSize:l,bodyBg:u,headerBg:d}=e;return{[n]:{display:`flex`,flex:`auto`,flexDirection:`column`,minHeight:0,background:u,"&, *":{boxSizing:`border-box`},[`&${n}-has-sider`]:{flexDirection:`row`,[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:`0 0 auto`},"&-rtl":{direction:`rtl`}},[`${n}-header`]:{height:a,padding:o,color:s,lineHeight:Y(a),background:d,[`${t}-menu`]:{lineHeight:`inherit`}},[`${n}-footer`]:{padding:c,color:r,fontSize:l,background:i},[`${n}-content`]:{flex:`auto`,color:r,minHeight:0}}},xE=e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:a,marginXXS:o,colorTextLightSolid:s,colorBgContainer:c}=e,l=r*1.25;return{colorBgHeader:`#001529`,colorBgBody:t,colorBgTrigger:`#002140`,bodyBg:t,headerBg:`#001529`,headerHeight:n*2,headerPadding:`0 ${l}px`,headerColor:i,footerPadding:`${a}px ${l}px`,footerBg:t,siderBg:`#001529`,triggerHeight:r+o*2,triggerBg:`#002140`,triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:c,lightTriggerBg:c,lightTriggerColor:i}},SE=[[`colorBgBody`,`bodyBg`],[`colorBgHeader`,`headerBg`],[`colorBgTrigger`,`triggerBg`]],CE=Ql(`Layout`,bE,xE,{deprecatedTokens:SE}),wE=Ql([`Layout`,`Sider`],e=>{let{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:a,triggerHeight:o,triggerColor:s,triggerBg:c,headerHeight:l,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:m,lightTriggerBg:h,bodyBg:g}=e;return{[t]:{position:`relative`,minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:o},"&-right":{order:1},[`${t}-children`]:{height:`100%`,marginTop:-.1,paddingTop:.1,[`${a}-menu${a}-menu-inline-collapsed`]:{width:`auto`}},[`&-zero-width ${t}-children`]:{overflow:`hidden`},[`${t}-trigger`]:{position:`fixed`,bottom:0,zIndex:1,height:o,color:s,lineHeight:Y(o),textAlign:`center`,background:c,cursor:`pointer`,transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:`absolute`,top:l,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:`flex`,alignItems:`center`,justifyContent:`center`,background:n,borderRadius:`0 ${Y(f)} ${Y(f)} 0`,cursor:`pointer`,transition:`background-color ${i} ease`,"&::after":{position:`absolute`,inset:0,background:`transparent`,transition:`all ${i}`,content:`""`},"&:hover::after":{background:`rgba(255, 255, 255, 0.2)`},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${Y(f)} 0 0 ${Y(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:m,background:h},[`${t}-zero-width-trigger`]:{color:m,background:h,border:`1px solid ${g}`,borderInlineStart:0}}}}},xE,{deprecatedTokens:SE}),TE={xs:`479.98px`,sm:`575.98px`,md:`767.98px`,lg:`991.98px`,xl:`1199.98px`,xxl:`1599.98px`,xxxl:`1839.98px`},EE=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),DE=S.createContext({}),OE=(()=>{let e=0;return(t=``)=>(e+=1,`${t}${e}`)})(),kE=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,trigger:i,children:a,defaultCollapsed:o=!1,theme:s=`dark`,style:c={},collapsible:l=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:m,onCollapse:h,onBreakpoint:g,..._}=e,{siderHook:v}=(0,S.useContext)(yE),[y,b]=(0,S.useState)(`collapsed`in e?e.collapsed:o),[x,C]=(0,S.useState)(!1);(0,S.useEffect)(()=>{`collapsed`in e&&b(e.collapsed)},[e.collapsed]);let w=(t,n)=>{`collapsed`in e||b(t),h?.(t,n)},{getPrefixCls:T,direction:E}=(0,S.useContext)(ga),D=T(`layout-sider`,n),[O,k]=wE(D),A=(0,S.useRef)(null);A.current=e=>{C(e.matches),g?.(e.matches),y!==e.matches&&w(e.matches,`responsive`)},(0,S.useEffect)(()=>{function e(e){return A.current?.(e)}let t;return window?.matchMedia!==void 0&&m&&m in TE&&(t=window.matchMedia(`screen and (max-width: ${TE[m]})`),typeof t?.addEventListener==`function`&&t.addEventListener(`change`,e),e(t)),()=>{typeof t?.removeEventListener==`function`&&t.removeEventListener(`change`,e)}},[m]),(0,S.useEffect)(()=>{let e=OE(`ant-sider-`);return v.addSider(e),()=>v.removeSider(e)},[]);let j=()=>{w(!y,`clickTrigger`)},M=gi(_,[`collapsed`]),N=y?f:d,P=EE(N)?`${N}px`:String(N),F=Number.parseFloat(String(f||0))===0?S.createElement(`span`,{onClick:j,className:J(`${D}-zero-width-trigger`,`${D}-zero-width-trigger-${u?`right`:`left`}`),style:p},i||S.createElement(vE,null)):null,I=E===`rtl`==!u,L={expanded:I?S.createElement(Vg,null):S.createElement(Gw,null),collapsed:I?S.createElement(Gw,null):S.createElement(Vg,null)}[y?`collapsed`:`expanded`],R=i===null?null:F||S.createElement(`div`,{className:`${D}-trigger`,onClick:j,style:{width:P}},i||L),z={...c,flex:`0 0 ${P}`,maxWidth:P,minWidth:P,width:P},B=J(D,`${D}-${s}`,{[`${D}-collapsed`]:!!y,[`${D}-has-trigger`]:l&&i!==null&&!F,[`${D}-below`]:!!x,[`${D}-zero-width`]:Number.parseFloat(P)===0},r,O,k),V=S.useMemo(()=>({siderCollapsed:y}),[y]);return S.createElement(DE.Provider,{value:V},S.createElement(`aside`,{className:B,...M,style:z,ref:t},S.createElement(`div`,{className:`${D}-children`},a),l||x&&F?R:null))}),AE=c(o((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:`M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`ellipsis`,theme:`outlined`}}))());function jE(){return jE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,jE({},e,{ref:t,icon:AE.default}))),NE=(0,S.createContext)({prefixCls:``,firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),PE=e=>{let{prefixCls:t,className:n,dashed:r,...i}=e,{getPrefixCls:a}=S.useContext(ga),o=J({[`${a(`menu`,t)}-item-divider-dashed`]:!!r},n);return S.createElement(oE,{className:o,...i})},FE=e=>{let{className:t,children:n,icon:r,title:i,danger:a,extra:o}=e,{prefixCls:s,firstLevel:c,direction:l,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:m}=S.useContext(NE),h=e=>{let t=n?.[0],i=S.createElement(`span`,{className:J(`${s}-title-content`,c?m?.itemContent:m?.subMenu?.itemContent,{[`${s}-title-content-with-extra`]:!!o||o===0}),style:c?p?.itemContent:p?.subMenu?.itemContent},n);return(!r||S.isValidElement(n)&&n.type===`span`)&&n&&e&&c&&typeof t==`string`?S.createElement(`div`,{className:`${s}-inline-collapsed-noicon`},t.charAt(0)):i},{siderCollapsed:g}=S.useContext(DE),_=i;i===void 0?_=c?n:``:i===!1&&(_=``);let v=d===!1?void 0:d,y=v&&v.title!==void 0?v.title:_,b={...v??null,title:y};!g&&!f&&(b.title=null,b.open=!1);let x=ki(n).length,C=S.createElement(GT,{...gi(e,[`title`,`icon`,`danger`]),className:J(c?m?.item:m?.subMenu?.item,{[`${s}-item-danger`]:a,[`${s}-item-only-child`]:(r?x+1:x)===1},t),style:{...c?p?.item:p?.subMenu?.item,...e.style},title:typeof i==`string`?i:void 0},um(r,e=>({className:J(`${s}-item-icon`,c?m?.itemIcon:m?.subMenu?.itemIcon,e.className),style:{...c?p?.itemIcon:p?.subMenu?.itemIcon,...e.style}})),h(f));if(!u&&d!==!1){let e=v&&v.placement?v.placement:l===`rtl`?`left`:`right`,t=`${s}-inline-collapsed-tooltip`,n=e=>({...e,root:J(t,e?.root)}),r=v&&typeof v.classNames==`function`?e=>n(v.classNames(e)):n(v?.classNames);C=S.createElement(jw,{...b,placement:e,classNames:r},C)}return C},IE=S.createContext(null),LE=S.forwardRef((e,t)=>{let{children:n,...r}=e,i=S.useContext(IE),a=S.useMemo(()=>({...i,...r}),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),o=fr(n),s=lr(t,o?pr(n):null);return S.createElement(IE.Provider,{value:a},S.createElement(yy,{space:!0},o?S.cloneElement(n,{ref:s}):n))}),Xee=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:a,lineType:o,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${Y(a)} ${o} ${i}`,boxShadow:`none`,"&::after":{display:`block`,clear:`both`,height:0,content:`"\\20"`},[`${t}-item, ${t}-submenu`]:{position:`relative`,display:`inline-block`,verticalAlign:`bottom`,paddingInline:s},[`> ${t}-item:hover, + `]:{animationName:cg},"&-hidden":{display:`none`},[r]:{...mC(e),cursor:`pointer`,transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":{flex:`auto`,...Hl},"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...mC(e),color:e.colorTextDisabled}},[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}}},mg(e,`slide-up`),mg(e,`slide-down`),ig(e,`move-up`),ig(e,`move-down`)]},gC=e=>{let{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:`inherit`,lineHeight:`inherit`,[`${t}-placeholder`]:{display:`none`},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:`none`}}}}},_C=4,vC=e=>{let{componentCls:t,calc:n,iconCls:r,paddingXS:i,paddingXXS:a,INTERNAL_FIXED_ITEM_MARGIN:o,lineWidth:s,colorIcon:c,colorIconHover:l,inputPaddingHorizontalBase:u,antCls:d}=e,[f,p]=tu(d,`select`);return{"&-multiple":{[f(`multi-item-background`)]:e.multipleItemBg,[f(`multi-item-border-color`)]:`transparent`,[f(`multi-item-border-radius`)]:e.borderRadiusSM,[f(`multi-item-height`)]:e.multipleItemHeight,[f(`multi-padding-base`)]:`calc((${p(`height`)} - ${p(`multi-item-height`)}) / 2)`,[f(`multi-padding-vertical`)]:`calc(${p(`multi-padding-base`)} - ${o} - ${s})`,[f(`multi-item-padding-horizontal`)]:`calc(${u} - ${p(`multi-padding-vertical`)} - ${s} * 2)`,paddingBlock:p(`multi-padding-vertical`),paddingInlineStart:`calc(${p(`multi-padding-base`)} - ${s})`,[`${t}-prefix`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:`absolute`,lineHeight:p(`line-height`),insetInlineStart:p(`multi-item-padding-horizontal`),width:`calc(100% - ${p(`multi-item-padding-horizontal`)})`,top:`50%`,transform:`translateY(-50%)`},[`${t}-content`]:{flexWrap:`wrap`,alignItems:`center`,lineHeight:1,"&-item-prefix":{height:p(`font-size`)},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${_C}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, + ${t}-content-item-suffix:first-child`]:{marginInlineStart:p(`multi-item-padding-horizontal`)},[`${t}-selection-item`]:{lineHeight:`calc(${p(`multi-item-height`)} - ${s} * 2)`,border:`${s} solid ${p(`multi-item-border-color`)}`,display:`flex`,marginBlock:o,marginInlineEnd:n(o).mul(2).equal(),background:p(`multi-item-background`),borderRadius:p(`multi-item-border-radius`),paddingInlineStart:i,paddingInlineEnd:a,transition:[`height`,`line-height`,`padding`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),"&-content":{...Hl,marginInlineEnd:a},"&-remove":{...Wl(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${r}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}},[`${t}-input`]:{lineHeight:n(o).mul(2).add(p(`multi-item-height`)).equal(),width:`calc(var(--select-input-width, 0) * 1px)`,minWidth:_C,maxWidth:`100%`,transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[f(`multi-item-height`)]:e.multipleItemHeightSM,[f(`multi-item-border-radius`)]:e.borderRadiusXS},[`&${t}-lg`]:{[f(`multi-item-height`)]:e.multipleItemHeightLG,[f(`multi-item-border-radius`)]:e.borderRadius},[`&${t}-filled`]:{[f(`multi-item-border-color`)]:e.colorSplit,[f(`multi-item-background`)]:e.colorBgContainer,[`&${t}-disabled`]:{[f(`multi-item-border-color`)]:`transparent`}}}}},yC=(e,t)=>{let{componentCls:n,antCls:r}=e,[i]=tu(r,`select`),{border:a,borderHover:o,borderActive:s,borderOutline:c}=t,l=t.background||e.selectorBg||e.colorBgContainer;return{[i(`border-color`)]:a,[i(`background-color`)]:l,[i(`color`)]:t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{[i(`border-color`)]:o,[i(`background-color`)]:t.backgroundHover||l},[`&${n}-focused`]:{[i(`border-color`)]:s,[i(`background-color`)]:t.backgroundActive||l,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${c}`}},[`&${n}-disabled`]:{[i(`border-color`)]:t.borderDisabled||t.border,[i(`background-color`)]:t.backgroundDisabled||t.background}}},bC=(e,t,n,r={},i={},a)=>{let{componentCls:o}=e;return{[`&${o}-${t}`]:[yC(e,n),{[`&${o}-status-error`]:yC(e,{...n,color:r.color||e.colorError,...r}),[`&${o}-status-warning`]:yC(e,{...n,color:i.color||e.colorWarning,...i})},a]}},xC=e=>{let{componentCls:t,fontHeight:n,controlHeight:r,iconCls:i,antCls:a,calc:o}=e,[s,c]=tu(a,`select`);return{[t]:[{[s(`border-radius`)]:e.borderRadius,[s(`border-color`)]:`#000`,[s(`border-size`)]:e.lineWidth,[s(`background-color`)]:e.colorBgContainer,[s(`font-size`)]:e.fontSize,[s(`line-height`)]:e.lineHeight,[s(`font-height`)]:n,[s(`color`)]:e.colorText,[s(`height`)]:r,[s(`padding-horizontal`)]:o(e.paddingSM).sub(e.lineWidth).equal(),[s(`padding-vertical`)]:`calc((${c(`height`)} - ${c(`font-height`)}) / 2 - ${c(`border-size`)})`,...Ul(e,!0),display:`inline-flex`,flexWrap:`nowrap`,position:`relative`,transition:`all ${e.motionDurationSlow}`,alignItems:`flex-start`,outline:0,cursor:`pointer`,borderRadius:c(`border-radius`),borderWidth:c(`border-size`),borderStyle:e.lineType,borderColor:c(`border-color`),background:c(`background-color`),fontSize:c(`font-size`),lineHeight:c(`line-height`),color:c(`color`),paddingInline:c(`padding-horizontal`),paddingBlock:c(`padding-vertical`),[`${t}-prefix`]:{flex:`none`,lineHeight:1},[`${t}-placeholder`]:{...Hl,color:e.colorTextPlaceholder,pointerEvents:`none`,zIndex:1},[`${t}-content`]:{flex:`auto`,minWidth:0,position:`relative`,display:`flex`,marginInlineEnd:o(e.paddingXXS).mul(1.5).equal(),"&:before":{content:`"\\a0"`,width:0,overflow:`hidden`},"&-value":{visibility:`inherit`},"input[readonly]":{cursor:`inherit`,caretColor:`transparent`}},[`${t}-suffix`]:{flex:`none`,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:`center`,[i]:{verticalAlign:`top`}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:`not-allowed`,input:{cursor:`not-allowed`}},"&-sm":{[s(`height`)]:e.controlHeightSM,[s(`padding-horizontal`)]:o(e.paddingXS).sub(e.lineWidth).equal(),[s(`border-radius`)]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:c(`padding-horizontal`)}},"&-lg":{[s(`height`)]:e.controlHeightLG,[s(`font-size`)]:e.fontSizeLG,[s(`line-height`)]:e.lineHeightLG,[s(`font-height`)]:e.fontHeightLG,[s(`border-radius`)]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:`none`,background:`transparent`,appearance:`none`,border:0,margin:0,padding:0,color:c(`color`),"&::-webkit-search-cancel-button":{display:`none`,appearance:`none`}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:`absolute`,inset:0,lineHeight:`calc(${c(`font-height`)} + ${c(`padding-vertical`)} * 2)`},[`${t}-content`]:{...Hl,alignSelf:`center`,"&-has-value":{display:`block`,"&:before":{display:`none`}},"&-has-search-value":{color:`transparent`},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder,"&-has-search-value":{color:`transparent`}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:`text`}},vC(e),bC(e,`outlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),bC(e,`filled`,{border:`transparent`,borderHover:`transparent`,borderActive:e.activeBorderColor,borderOutline:`transparent`,borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),bC(e,`borderless`,{border:`transparent`,borderHover:`transparent`,borderActive:`transparent`,borderOutline:`transparent`,background:`transparent`}),bC(e,`underlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:`transparent`},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:`transparent`,borderInlineColor:`transparent`}),gC(e)]}},SC=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},CC=e=>{let{antCls:t,componentCls:n,motionDurationMid:r,inputPaddingHorizontalBase:i}=e,a={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:`50%`}};return{[n]:{...Ul(e),[`${n}-selection-item`]:{flex:1,fontWeight:`normal`,position:`relative`,userSelect:`none`,...Hl,[`> ${t}-typography`]:{display:`inline`}},[`${n}-prefix`]:{flex:`none`,marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:`absolute`,top:`50%`,insetInlineStart:`auto`,insetInlineEnd:i,zIndex:1,display:`inline-block`,width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,cursor:`pointer`,opacity:0,transition:[`color`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),textRendering:`auto`,transform:`translateZ(0)`,"&:before":{display:`block`},"&:hover":{color:e.colorIcon}},"@media(hover:none)":a,"&:hover":a},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(i).add(e.fontSize).add(e.paddingXS).equal()}}}}}},wC=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:`100%`}}},CC(e),hC(e),{[`${t}-rtl`]:{direction:`rtl`}},m_(e,{focusElCls:`${t}-focused`})]},TC=Ql(`Select`,(e,{rootPrefixCls:t})=>{let n=dc(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[wC(n),xC(n)]},SC,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),EC=c(o((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:`M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z`}}]},name:`check`,theme:`outlined`}}))());function DC(){return DC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,DC({},e,{ref:t,icon:EC.default}))),kC=c(o((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:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`}}))());function AC(){return AC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,AC({},e,{ref:t,icon:kC.default}))),MC=c(o((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:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`}}))());function NC(){return NC=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,NC({},e,{ref:t,icon:MC.default})));function FC({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,loadingIcon:a,multiple:o,hasFeedback:s,showSuffixIcon:c,feedbackIcon:l,showArrow:u,componentName:d}){let f=t??S.createElement(Ou,null),p=t=>e===null&&!s&&!u?null:S.createElement(S.Fragment,null,c!==!1&&t,s&&l),m=null;m=e===void 0?i?p(a??S.createElement(Ym,{spin:!0})):({open:e,showSearch:t})=>p(e&&t?S.createElement(PC,null):S.createElement(jC,null)):p(e);let h=null;h=n===void 0?o?S.createElement(OC,null):null:n;let g=null;return g=r===void 0?S.createElement(ju,null):r,{clearIcon:f,suffixIcon:m,itemIcon:h,removeIcon:g}}function IC(e){return S.useMemo(()=>{if(e)return(...t)=>S.createElement(_y,{space:!0},e.apply(void 0,t))},[e])}function LC(e,t){return t===void 0?e!==null:t}var RC=`SECRET_COMBOBOX_MODE_DO_NOT_USE`,zC=S.forwardRef((e,t)=>{let{prefixCls:n,bordered:r,className:i,rootClassName:a,getPopupContainer:o,popupClassName:s,dropdownClassName:c,listHeight:l=256,placement:u,listItemHeight:d,size:f,disabled:p,notFoundContent:m,status:h,builtinPlacements:g,dropdownMatchSelectWidth:_,popupMatchSelectWidth:v,direction:y,style:b,allowClear:x,variant:C,popupStyle:w,dropdownStyle:T,transitionName:E,tagRender:D,maxCount:O,prefix:k,dropdownRender:A,popupRender:j,onDropdownVisibleChange:M,onOpenChange:N,styles:P,classNames:F,...I}=e,{getPopupContainer:L,getPrefixCls:R,renderEmpty:z,direction:B,virtual:V,popupMatchSelectWidth:H,popupOverflow:U}=S.useContext(ga),{showSearch:ee,style:W,styles:te,className:G,classNames:ne}=ya(`select`),[,K]=Vl(),re=d??K?.controlHeight,ie=R(`select`,n),ae=R(),q=y??B,{compactSize:oe,compactItemClassnames:se}=Oh(ie,q),[ce,le]=dC(`select`,C,r),ue=sp(ie),[de,fe]=TC(ie,ue),pe=S.useMemo(()=>{let{mode:t}=e;if(t!==`combobox`)return t===RC?`combobox`:t},[e.mode]),me=pe===`multiple`||pe===`tags`,he=LC(e.suffixIcon,e.showArrow),ge=v??_??H,_e=IC(j||A),ve=N||M,{status:ye,hasFeedback:be,isFormItemInput:xe,feedbackIcon:Se}=S.useContext(my),Ce=nC(ye,h),we;we=m===void 0?pe===`combobox`?null:z?.(`Select`)||S.createElement(uC,{componentName:`Select`}):m;let{suffixIcon:Te,itemIcon:Ee,removeIcon:De,clearIcon:Oe}=FC({...I,multiple:me,hasFeedback:be,feedbackIcon:Se,showSuffixIcon:he,prefixCls:ie,componentName:`Select`}),ke=x===!0?{clearIcon:Oe}:x,Ae=gi(I,[`suffixIcon`,`itemIcon`]),je=Th(e=>f??oe??e),Me=S.useContext(mm),Ne=p??Me,Pe={...e,variant:ce,status:Ce,disabled:Ne,size:je},[Fe,Ie]=Cf([ne,F],[te,P],{props:Pe},{popup:{_default:`root`}}),Le=J(Fe.popup?.root,s,c,{[`${ie}-dropdown-${q}`]:q===`rtl`},a,fe,ue,de),Re={...Ie.popup?.root,...w??T},ze=J({[`${ie}-lg`]:je===`large`,[`${ie}-sm`]:je===`small`,[`${ie}-rtl`]:q===`rtl`,[`${ie}-${ce}`]:le,[`${ie}-in-form-item`]:xe},tC(ie,Ce,be),se,G,i,Fe.root,a,fe,ue,de),Be=S.useMemo(()=>u===void 0?q===`rtl`?`bottomRight`:`bottomLeft`:u,[u,q]),[Ve]=Lf(`SelectLike`,Ie.popup?.root?.zIndex??Re?.zIndex);return S.createElement(eC,{ref:t,virtual:V,classNames:Fe,styles:Ie,showSearch:ee,...Ae,style:{...Ie.root,...W,...b},popupMatchSelectWidth:ge,transitionName:hh(ae,`slide-up`,E),builtinPlacements:pC(g,U),listHeight:l,listItemHeight:re,mode:pe,prefixCls:ie,placement:Be,direction:q,prefix:k,suffixIcon:Te,menuItemSelectedIcon:Ee,removeIcon:De,allowClear:ke,notFoundContent:we,className:ze,getPopupContainer:o||L,popupClassName:Le,disabled:Ne,popupStyle:{...Ie.popup?.root,...Re,zIndex:Ve},maxCount:me?O:void 0,tagRender:me?D:void 0,popupRender:_e,onPopupVisibleChange:ve})}),BC=nx(zC,`popupAlign`);zC.SECRET_COMBOBOX_MODE_DO_NOT_USE=RC,zC.Option=uS,zC.OptGroup=lS,zC._InternalPanelDoNotUseOrYouWillBeFired=BC;var VC=[`xxxl`,`xxl`,`xl`,`lg`,`md`,`sm`,`xs`],HC=[].concat(VC).reverse(),UC=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),WC=e=>{let t=e,n=[].concat(VC).reverse();return n.forEach((e,r)=>{let i=e.toUpperCase(),a=`screen${i}Min`,o=`screen${i}`;if(!(t[a]<=t[o]))throw Error(`${a}<=${o} fails : !(${t[a]}<=${t[o]})`);if(r{if(t){for(let n of VC)if(e[n]&&t?.[n]!==void 0)return t[n]}},KC=()=>{let[,e]=Vl(),t=UC(WC(e));return S.useMemo(()=>{let e=new Map,n=-1,r={};return{responsiveMap:t,matchHandlers:{},dispatch(t){return r=t,e.forEach(e=>{e(r)}),e.size>=1},subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach(([e,t])=>{let n=({matches:t})=>{this.dispatch({...r,[e]:t})},i=window.matchMedia(t);typeof i?.addEventListener==`function`&&i.addEventListener(`change`,n),this.matchHandlers[t]={mql:i,listener:n},n(i)})},unregister(){Object.values(t).forEach(e=>{let t=this.matchHandlers[e];typeof t?.mql?.removeEventListener==`function`&&t.mql.removeEventListener(`change`,t?.listener)}),e.clear()}}},[t])};function qC(e=!0,t={}){let n=(0,S.useRef)(t),[,r]=mf(),i=KC();return Hn(()=>{let t=i.subscribe(t=>{n.current=t,e&&r()});return()=>i.unsubscribe(t)},[]),n.current}var JC=S.createContext({}),YC=e=>{let{antCls:t,componentCls:n,iconCls:r,avatarBg:i,avatarColor:a,containerSize:o,containerSizeLG:s,containerSizeSM:c,textFontSize:l,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:p,iconFontSizeSM:m,borderRadius:h,borderRadiusLG:g,borderRadiusSM:_,lineWidth:v,lineType:y}=e,b=(e,t,i,a)=>({width:e,height:e,borderRadius:`50%`,fontSize:t,[`&${n}-square`]:{borderRadius:a},[`&${n}-icon`]:{fontSize:i,[`> ${r}`]:{margin:0}}});return{[n]:{...Ul(e),position:`relative`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,overflow:`hidden`,color:a,whiteSpace:`nowrap`,textAlign:`center`,verticalAlign:`middle`,background:i,border:`${Y(v)} ${y} transparent`,"&-image":{background:`transparent`},[`${t}-image-img`]:{display:`block`},...b(o,l,f,h),"&-lg":{...b(s,u,p,g)},"&-sm":{...b(c,d,m,_)},"> img":{display:`block`,width:`100%`,height:`100%`,objectFit:`cover`}}}},XC=e=>{let{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=e;return{[`${t}-group`]:{display:`inline-flex`,[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:i}}}},ZC=Ql(`Avatar`,e=>{let{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=dc(e,{avatarBg:n,avatarColor:t});return[YC(r),XC(r)]},e=>{let{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:a,fontSizeXL:o,fontSizeHeading3:s,marginXS:c,marginXXS:l,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((a+o)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:l,groupOverlapping:-c,groupBorderColor:u}}),QC=S.forwardRef((e,t)=>{let{prefixCls:n,shape:r,size:i,src:a,srcSet:o,icon:s,className:c,rootClassName:l,style:u,alt:d,draggable:f,children:p,crossOrigin:m,gap:h=4,onError:g,..._}=e,[v,y]=S.useState(1),[b,x]=S.useState(!1),[C,w]=S.useState(!0),T=S.useRef(null),E=S.useRef(null),D=cr(t,T),{getPrefixCls:O,className:k,style:A}=ya(`avatar`),j=S.useContext(JC),M=()=>{if(!E.current||!T.current)return;let e=E.current.offsetWidth,t=T.current.offsetWidth;e!==0&&t!==0&&h*2{x(!0)},[]),S.useEffect(()=>{w(!0),y(1)},[a]),S.useEffect(M,[h]);let N=()=>{g?.()!==!1&&w(!1)},P=Th(e=>i??j?.size??e??`medium`),F=qC(Object.keys(nf(P)&&P||{}).some(e=>VC.includes(e))),I=S.useMemo(()=>{if(!nf(P))return{};let e=P[VC.find(e=>F[e])];return e?{width:e,height:e,fontSize:e&&(s||p)?e/2:18}:{}},[F,P,s,p]),L=O(`avatar`,n),R=sp(L),[z,B]=ZC(L,R),V=J({[`${L}-lg`]:P===`large`,[`${L}-sm`]:P===`small`}),H=S.isValidElement(a),U=J(L,V,k,`${L}-${r||j?.shape||`circle`}`,{[`${L}-image`]:H||a&&C,[`${L}-icon`]:!!s},B,R,c,l,z),ee=ef(P)?{width:P,height:P,fontSize:s?P/2:18}:{},W;if(typeof a==`string`&&C)W=S.createElement(`img`,{src:a,draggable:f,srcSet:o,onError:N,alt:d,crossOrigin:m});else if(H)W=a;else if(s)W=s;else if(b||v!==1){let e=`scale(${v})`,t={msTransform:e,WebkitTransform:e,transform:e};W=S.createElement(oa,{onResize:M},S.createElement(`span`,{className:`${L}-string`,ref:E,style:t},p))}else W=S.createElement(`span`,{className:`${L}-string`,style:{opacity:0},ref:E},p);return S.createElement(`span`,{..._,style:{...ee,...I,...A,...u},className:U,ref:D},W)}),$C=e=>e?typeof e==`function`?e():e:null,ew=e=>{let{children:t,prefixCls:n,id:r,classNames:i,styles:a,className:o,style:s}=e;return S.createElement(`div`,{id:r,className:J(`${n}-container`,i?.container,o),style:{...a?.container,...s},role:`tooltip`},typeof t==`function`?t():t)},tw={shiftX:64,adjustY:1},nw={adjustX:1,shiftY:!0},rw=[0,0],iw={left:{points:[`cr`,`cl`],overflow:nw,offset:[-4,0],targetOffset:rw},right:{points:[`cl`,`cr`],overflow:nw,offset:[4,0],targetOffset:rw},top:{points:[`bc`,`tc`],overflow:tw,offset:[0,-4],targetOffset:rw},bottom:{points:[`tc`,`bc`],overflow:tw,offset:[0,4],targetOffset:rw},topLeft:{points:[`bl`,`tl`],overflow:tw,offset:[0,-4],targetOffset:rw},leftTop:{points:[`tr`,`tl`],overflow:nw,offset:[-4,0],targetOffset:rw},topRight:{points:[`br`,`tr`],overflow:tw,offset:[0,-4],targetOffset:rw},rightTop:{points:[`tl`,`tr`],overflow:nw,offset:[4,0],targetOffset:rw},bottomRight:{points:[`tr`,`br`],overflow:tw,offset:[0,4],targetOffset:rw},rightBottom:{points:[`bl`,`br`],overflow:nw,offset:[4,0],targetOffset:rw},bottomLeft:{points:[`tl`,`bl`],overflow:tw,offset:[0,4],targetOffset:rw},leftBottom:{points:[`br`,`bl`],overflow:nw,offset:[-4,0],targetOffset:rw}};function aw(){return aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{trigger:n=[`hover`],mouseEnterDelay:r=0,mouseLeaveDelay:i=.1,prefixCls:a=`rc-tooltip`,children:o,onVisibleChange:s,afterVisibleChange:c,motion:l,placement:u=`right`,align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:m,arrowContent:h,overlay:g,id:_,showArrow:v=!0,classNames:y,styles:b,...x}=e,C=Xn(_),w=(0,S.useRef)(null);(0,S.useImperativeHandle)(t,()=>w.current);let T={...x};`visible`in e&&(T.popupVisible=e.visible);let E=S.useMemo(()=>{if(!v)return!1;let e=v===!0?{}:v;return{...e,className:J(e.className,y?.arrow),style:{...e.style,...b?.arrow},content:e.content??h}},[v,y?.arrow,b?.arrow,h]);return S.createElement(sm,aw({popupClassName:y?.root,prefixCls:a,popup:S.createElement(ew,{key:`content`,prefixCls:a,id:C,classNames:y,styles:b},g),action:n,builtinPlacements:iw,popupPlacement:u,ref:w,popupAlign:d,getPopupContainer:m,onOpenChange:s,afterOpenChange:c,popupMotion:l,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:i,popupStyle:b?.root,mouseEnterDelay:r,arrow:E,uniqueContainerClassName:y?.uniqueContainer,uniqueContainerStyle:b?.uniqueContainer},T),({open:e})=>{let t=S.Children.only(o),n={"aria-describedby":g&&e?C:void 0};return S.cloneElement(t,n)})});function sw(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,a=i,o=r*1/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),c=i-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,u=2*i-c,d=l,f=2*i-o,p=s,m=2*i-0,h=a,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),_=r*(Math.sqrt(2)-1),v=`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`;return{arrowShadowWidth:g,arrowPath:`path('M 0 ${a} A ${r} ${r} 0 0 0 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${m} ${h} Z')`,arrowPolygon:v}}var cw=(e,t,n)=>{let{sizePopupArrow:r,arrowPolygon:i,arrowPath:a,arrowShadowWidth:o,borderRadiusXS:s,calc:c}=e;return{pointerEvents:`none`,width:r,height:r,overflow:`hidden`,"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:`""`},"&::after":{content:`""`,position:`absolute`,width:o,height:o,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${Y(s)} 0`},transform:`translateY(50%) rotate(-135deg)`,boxShadow:n,zIndex:0,background:`transparent`}}};function lw(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function uw(e,t){return e?t:{}}var dw=(e,t,n)=>{let{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:a,arrowOffsetHorizontal:o,antCls:s}=e,[c]=tu(s,`tooltip`),{arrowDistance:l=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:{[`${r}-arrow`]:[{position:`absolute`,zIndex:1,display:`block`,...cw(e,t,i),"&:before":{background:t}}],...uw(!!u.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(`,`)]:{bottom:l,transform:`translateY(100%) rotate(180deg)`},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(100%) rotate(180deg)`},"&-placement-topLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-topRight":{[c(`arrow-offset-x`)]:`calc(100% - ${Y(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...uw(!!u.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(`,`)]:{top:l,transform:`translateY(-100%)`},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(-100%)`},"&-placement-bottomLeft":{[c(`arrow-offset-x`)]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-bottomRight":{[c(`arrow-offset-x`)]:`calc(100% - ${Y(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...uw(!!u.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(`,`)]:{right:{_skip_check_:!0,value:l},transform:`translateX(100%) rotate(90deg)`},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(100%) rotate(90deg)`},[`&-placement-leftTop > ${r}-arrow`]:{top:a},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:a}}),...uw(!!u.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(`,`)]:{left:{_skip_check_:!0,value:l},transform:`translateX(-100%) rotate(-90deg)`},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(-100%) rotate(-90deg)`},[`&-placement-rightTop > ${r}-arrow`]:{top:a},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:a}})}}};function fw(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};let i=nf(r)?r:{},a={};switch(e){case`top`:case`bottom`:a.shiftX=t.arrowOffsetHorizontal*2+n,a.shiftY=!0,a.adjustY=!0;break;case`left`:case`right`:a.shiftY=t.arrowOffsetVertical*2+n,a.shiftX=!0,a.adjustX=!0;break}let o={...a,...i};return o.shiftX||(o.adjustX=!0),o.shiftY||(o.adjustY=!0),o}var pw={left:{points:[`cr`,`cl`]},right:{points:[`cl`,`cr`]},top:{points:[`bc`,`tc`]},bottom:{points:[`tc`,`bc`]},topLeft:{points:[`bl`,`tl`]},leftTop:{points:[`tr`,`tl`]},topRight:{points:[`br`,`tr`]},rightTop:{points:[`tl`,`tr`]},bottomRight:{points:[`tr`,`br`]},rightBottom:{points:[`bl`,`br`]},bottomLeft:{points:[`tl`,`bl`]},leftBottom:{points:[`br`,`bl`]}},mw={topLeft:{points:[`bl`,`tc`]},leftTop:{points:[`tr`,`cl`]},topRight:{points:[`br`,`tc`]},rightTop:{points:[`tl`,`cr`]},bottomRight:{points:[`tr`,`bc`]},rightBottom:{points:[`bl`,`cr`]},bottomLeft:{points:[`tl`,`bc`]},leftBottom:{points:[`br`,`cl`]}},hw=new Set([`topLeft`,`topRight`,`bottomLeft`,`bottomRight`,`leftTop`,`leftBottom`,`rightTop`,`rightBottom`]);function gw(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:a,visibleFirst:o}=e,s=t/2,c={},l=lw({contentRadius:a,limitVerticalRadius:!0});return Object.keys(pw).forEach(e=>{let a={...r&&mw[e]||pw[e],offset:[0,0],dynamicInset:!0};switch(c[e]=a,hw.has(e)&&(a.autoArrow=!1),e){case`top`:case`topLeft`:case`topRight`:a.offset[1]=-s-i;break;case`bottom`:case`bottomLeft`:case`bottomRight`:a.offset[1]=s+i;break;case`left`:case`leftTop`:case`leftBottom`:a.offset[0]=-s-i;break;case`right`:case`rightTop`:case`rightBottom`:a.offset[0]=s+i;break}if(r)switch(e){case`topLeft`:case`bottomLeft`:a.offset[0]=-l.arrowOffsetHorizontal-s;break;case`topRight`:case`bottomRight`:a.offset[0]=l.arrowOffsetHorizontal+s;break;case`leftTop`:case`rightTop`:a.offset[1]=-l.arrowOffsetHorizontal*2+s;break;case`leftBottom`:case`rightBottom`:a.offset[1]=l.arrowOffsetHorizontal*2-s;break}a.overflow=fw(e,l,t,n),o&&(a.htmlRegion=`visibleFirst`)}),c}var _w=S.createContext(!1),vw=(e,t)=>{let n=e=>typeof e==`boolean`?{show:e}:e||{};return S.useMemo(()=>{let r=n(e),i=n(t);return{...i,...r,show:r.show??i.show??!0}},[e,t])},yw=`50%`,bw=e=>{let{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:a,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:c,boxShadowSecondary:l,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:m}=e,[h,g]=tu(m,`tooltip`),_=t(o).add(p).add(f).equal(),v={minWidth:t(o).mul(2).add(p).equal(),minHeight:c,padding:`${Y(e.calc(u).div(2).equal())} ${Y(d)}`,color:g(`overlay-color`,i),textAlign:`start`,textDecoration:`none`,wordWrap:`break-word`,backgroundColor:a,borderRadius:o,boxShadow:l,boxSizing:`border-box`},y={[h(`valid-offset-x`)]:g(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[g(`valid-offset-x`,yw),`var(--arrow-y, ${yw})`].join(` `)};return[{[n]:{...Ul(e),position:`absolute`,zIndex:s,display:`block`,width:`max-content`,maxWidth:r,visibility:`visible`,...y,"&-hidden":{display:`none`},[h(`arrow-background-color`)]:a,[`${n}-container`]:[v,Xh(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:`none`,background:`transparent`,boxShadow:`none`}},[[`&-placement-topLeft`,`&-placement-topRight`,`&-placement-bottomLeft`,`&-placement-bottomRight`].join(`,`)]:{minWidth:_},[[`&-placement-left`,`&-placement-leftTop`,`&-placement-leftBottom`,`&-placement-right`,`&-placement-rightTop`,`&-placement-rightBottom`].join(`,`)]:{[`${n}-inner`]:{borderRadius:e.min(o,8)}},[`${n}-content`]:{position:`relative`},...nu(e,(e,{darkColor:t})=>({[`&${n}-${e}`]:{[`${n}-container`]:{backgroundColor:t},[`${n}-arrow`]:{[h(`arrow-background-color`)]:t}}})),"&-rtl":{direction:`rtl`}}},dw(e,g(`arrow-background-color`)),{[`${n}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...v,...y,position:`absolute`,zIndex:t(s).sub(1).equal(),"&-hidden":{display:`none`},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},xw=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...lw({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...sw(dc(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),Sw=(e,t,n=!0)=>Ql(`Tooltip`,e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r,maxWidth:i}=e;return[bw(dc(e,{tooltipMaxWidth:i,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),kg(e,`zoom-big-fast`)]},xw,{resetStyle:!1,injectStyle:n})(e,t),Cw=Sc.map(e=>`${e}-inverse`),ww=[`success`,`processing`,`error`,`default`,`warning`];function Tw(e,t=!0){return t?[].concat(pa(Cw),pa(Sc)).includes(e):Sc.includes(e)}function Ew(e){return ww.includes(e)}var Dw=(e,t,n)=>{let r=Tw(n),[i]=tu(e,`tooltip`),a=J({[`${t}-${n}`]:n&&r}),o={},s={},c=o_(n).toRgb(),l=(.299*c.r+.587*c.g+.114*c.b)/255<.5?`#FFF`:`#000`;return n&&!r&&(o.background=n,o[i(`overlay-color`)]=l,s[i(`arrow-background-color`)]=n),{className:a,overlayStyle:o,arrowStyle:s}},Ow=e=>{let{prefixCls:t,className:n,placement:r=`top`,title:i,color:a,overlayInnerStyle:o,classNames:s,styles:c}=e,{getPrefixCls:l}=S.useContext(ga),u=l(`tooltip`,t),d=l(),f=sp(u),[p,m]=Sw(u,f),h=Dw(d,u,a),g=h.arrowStyle,_=S.useMemo(()=>({container:{...o,...h.overlayStyle}}),[o,h.overlayStyle]),v={...e,placement:r},[y,b]=Cf([s],[_,c],{props:v}),x=J(f,p,m,u,`${u}-pure`,`${u}-placement-${r}`,n,h.className);return S.createElement(`div`,{className:x,style:g},S.createElement(`div`,{className:`${u}-arrow`}),S.createElement(ew,{...e,className:p,prefixCls:u,classNames:y,styles:b},i))},kw=S.forwardRef((e,t)=>{let{prefixCls:n,openClassName:r,getTooltipContainer:i,color:a,children:o,afterOpenChange:s,arrow:c,destroyTooltipOnHide:l,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:m,autoAdjustOverflow:h=!0,motion:g,getPopupContainer:_,placement:v=`top`,mouseEnterDelay:y=.1,mouseLeaveDelay:b=.1,rootClassName:x,styles:C,classNames:w,onOpenChange:T,overlayInnerStyle:E,overlayStyle:D,overlayClassName:O,...k}=e,[,A]=Vl(),j=e[`data-popover-inject`],{getPopupContainer:M,getPrefixCls:N,direction:P,...F}=ya(`tooltip`),{className:I,style:L,classNames:R,styles:z,arrow:B,trigger:V}=j?{}:F,H=vw(c,B),U=H.show,ee=p||V||`hover`,W=_||M,te=u??!!l,G=S.useContext(_w);Gi(`Tooltip`);let ne=S.useRef(null),K=()=>{ne.current?.forceAlign()};S.useImperativeHandle(t,()=>({forceAlign:K,nativeElement:ne.current?.nativeElement,popupElement:ne.current?.popupElement}));let[re,ie]=Gn(e.defaultOpen??!1,e.open),ae=!d&&!f&&d!==0,q=e=>{ie(ae?!1:e),!ae&&T&&T(e)},oe=S.useMemo(()=>m||gw({arrowPointAtCenter:H?.pointAtCenter??!1,autoAdjustOverflow:h,arrowWidth:U?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0}),[H,m,A,U,h]),se=S.useMemo(()=>d===0?d:f||d||``,[f,d]),ce=S.createElement(_y,{space:!0,form:!0},typeof se==`function`?se():se),le={...e,trigger:ee,builtinPlacements:oe,getPopupContainer:W,destroyOnHidden:te},[ue,de]=Cf([R,w],[z,C],{props:le}),fe=N(`tooltip`,n),pe=N(),me=re;(!(`open`in e)&&ae||G)&&(me=!1);let he=S.isValidElement(o)&&!cm(o)?o:S.createElement(`span`,null,o),ge=he.props,_e=!ge.className||typeof ge.className==`string`?J(ge.className,r||`${fe}-open`):ge.className,ve=sp(fe),[ye,be]=Sw(fe,ve,!j),xe=Dw(pe,fe,a),Se=xe.arrowStyle,Ce=J(ve,ye,be),we=J(O,{[`${fe}-rtl`]:P===`rtl`},xe.className,x,Ce,I,ue.root),[Te,Ee]=Lf(`Tooltip`,k.zIndex),De={...de.container,...E,...xe.overlayStyle},Oe=S.createElement(ow,{unique:!0,...k,zIndex:Te,showArrow:U,placement:v,mouseEnterDelay:y,mouseLeaveDelay:b,prefixCls:fe,classNames:{root:we,container:ue.container,arrow:ue.arrow,uniqueContainer:J(Ce,ue.container)},styles:{root:{...Se,...de.root,...L,...D},container:De,uniqueContainer:De,arrow:de.arrow},ref:ne,overlay:ce,visible:me,onVisibleChange:q,afterVisibleChange:s,arrowContent:S.createElement(`span`,{className:`${fe}-arrow-content`}),motion:{motionName:hh(pe,`zoom-big-fast`,typeof g?.motionName==`string`?g?.motionName:void 0),motionDeadline:1e3},trigger:ee,builtinPlacements:oe,getTooltipContainer:W,destroyOnHidden:te},me?um(he,{className:_e}):he);return S.createElement(jf.Provider,{value:Ee},Oe)});kw._InternalPanelDoNotUseOrYouWillBeFired=Ow,kw.UniqueProvider=pm;var Aw=`50%`,jw=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:a,boxShadowSecondary:o,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:l,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:h,antCls:g}=e,[_,v]=tu(g,`tooltip`);return[{[t]:{...Ul(e),position:`absolute`,top:0,left:{_skip_check_:!0,value:0},zIndex:l,fontWeight:`normal`,whiteSpace:`normal`,textAlign:`start`,cursor:`auto`,userSelect:`text`,[_(`valid-offset-x`)]:v(`arrow-offset-x`,`var(--arrow-x)`),transformOrigin:[v(`valid-offset-x`,Aw),`var(--arrow-y, ${Aw})`].join(` `),[_(`arrow-background-color`)]:d,width:`max-content`,maxWidth:`100vw`,"&-rtl":{direction:`rtl`},"&-hidden":{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-container`]:{backgroundColor:f,backgroundClip:`padding-box`,borderRadius:c,boxShadow:o,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:p,padding:h},[`${t}-content`]:{color:n,padding:m}}},dw(e,v(`arrow-background-color`)),{[`${t}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow,display:`inline-block`}}]},Mw=e=>{let{componentCls:t,antCls:n}=e,[r]=tu(n,`tooltip`);return{[t]:Sc.map(n=>{let i=e[`${n}6`];return{[`&${t}-${n}`]:{[r(`arrow-background-color`)]:i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:`transparent`}}}})}},Nw=Ql(`Popover`,e=>{let{colorBgElevated:t,colorText:n}=e,r=dc(e,{popoverBg:t,popoverColor:n});return[jw(r),Mw(r),kg(r,`zoom-big`)]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:a,zIndexPopupBase:o,borderRadiusLG:s,marginXS:c,lineType:l,colorSplit:u,paddingSM:d}=e,f=n-r,p=f/2,m=f/2-t,h=i;return{titleMinWidth:177,zIndexPopup:o+30,...sw(e),...lw({contentRadius:s,limitVerticalRadius:!0}),innerPadding:a?0:12,titleMarginBottom:a?0:c,titlePadding:a?`${p}px ${h}px ${m}px`:0,titleBorderBottom:a?`${t}px ${l} ${u}`:`none`,innerContentPadding:a?`${d}px ${h}px`:0}},{resetStyle:!1,deprecatedTokens:[[`width`,`titleMinWidth`],[`minWidth`,`titleMinWidth`]]}),Pw=e=>{let{title:t,content:n,prefixCls:r,classNames:i,styles:a}=e;return!t&&!n?null:S.createElement(S.Fragment,null,t&&S.createElement(`div`,{className:J(`${r}-title`,i?.title),style:a?.title},t),n&&S.createElement(`div`,{className:J(`${r}-content`,i?.content),style:a?.content},n))},Fw=e=>{let{hashId:t,prefixCls:n,className:r,style:i,placement:a=`top`,title:o,content:s,children:c,classNames:l,styles:u}=e,d=$C(o),f=$C(s),p={...e,placement:a},[m,h]=Cf([l],[u],{props:p}),g=J(t,n,`${n}-pure`,`${n}-placement-${a}`,r);return S.createElement(`div`,{className:g,style:i},S.createElement(`div`,{className:`${n}-arrow`}),S.createElement(ew,{...e,className:t,prefixCls:n,classNames:m,styles:h},c||S.createElement(Pw,{prefixCls:n,title:d,content:f,classNames:m,styles:h})))},Iw=e=>{let{prefixCls:t,className:n,...r}=e,{getPrefixCls:i}=S.useContext(ga),a=i(`popover`,t),[o,s]=Nw(a);return S.createElement(Fw,{...r,prefixCls:a,hashId:o,className:J(n,s)})},Lw=S.forwardRef((e,t)=>{let{prefixCls:n,title:r,content:i,overlayClassName:a,placement:o=`top`,trigger:s,children:c,mouseEnterDelay:l=.1,mouseLeaveDelay:u=.1,onOpenChange:d,overlayStyle:f={},styles:p,classNames:m,motion:h,arrow:g,..._}=e,{getPrefixCls:v,className:y,style:b,classNames:x,styles:C,arrow:w,trigger:T}=ya(`popover`),E=v(`popover`,n),[D,O]=Nw(E),k=v(),A=vw(g,w),j=s||T||`hover`,M={...e,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,overlayStyle:f,styles:p,classNames:m},[N,P]=Cf([x,m],[C,p],{props:M}),F=J(a,D,O,y,N.root),[I,L]=Gn(e.defaultOpen??!1,e.open),R=e=>{L(e),d?.(e)},z=$C(r),B=$C(i);return S.createElement(kw,{unique:!1,arrow:A,placement:o,trigger:j,mouseEnterDelay:l,mouseLeaveDelay:u,..._,prefixCls:E,classNames:{root:F,container:N.container,arrow:N.arrow},styles:{root:{...P.root,...b,...f},container:P.container,arrow:P.arrow},ref:t,open:I,onOpenChange:R,overlay:z||B?S.createElement(Pw,{prefixCls:E,title:z,content:B,classNames:N,styles:P}):null,motion:{motionName:hh(k,`zoom-big`,typeof h?.motionName==`string`?h?.motionName:void 0)},"data-popover-inject":!0},c)});Lw._InternalPanelDoNotUseOrYouWillBeFired=Iw;var Rw=e=>{let{size:t,shape:n}=S.useContext(JC),r=S.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return S.createElement(JC.Provider,{value:r},e.children)},zw=e=>{let{getPrefixCls:t,direction:n}=S.useContext(ga),{prefixCls:r,className:i,rootClassName:a,style:o,maxCount:s,maxStyle:c,size:l,shape:u,maxPopoverPlacement:d,maxPopoverTrigger:f,children:p,max:m}=e,h=t(`avatar`,r),g=`${h}-group`,_=sp(h),[v,y]=ZC(h,_),b=J(g,{[`${g}-rtl`]:n===`rtl`},y,_,i,a,v),x=ki(p).map((e,t)=>um(e,{key:`avatar-key-${t}`})),C=m?.count||s,w=x.length;if(C&&C{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z`}}]},name:`left`,theme:`outlined`}}))());function Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Hw({},e,{ref:t,icon:Vw.default}))),{ESC:Ww,TAB:Gw}=Qr;function Kw({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:i}){let a=S.useRef(!1),o=()=>{e&&(t.current?.focus?.(),n?.(!1))},s=()=>i.current?.focus?(i.current.focus(),a.current=!0,!0):!1,c=e=>{switch(e.keyCode){case Ww:o();break;case Gw:{let t=!1;a.current||(t=s()),t?e.preventDefault():o();break}}};S.useEffect(()=>e?(window.addEventListener(`keydown`,c),r&&Oi(s,3),()=>{window.removeEventListener(`keydown`,c),a.current=!1}):()=>{a.current=!1},[e])}var qw=(0,S.forwardRef)((e,t)=>{let{overlay:n,arrow:r,prefixCls:i}=e,a=(0,S.useMemo)(()=>{let e;return e=typeof n==`function`?n():n,e},[n]),o=cr(t,pr(a));return S.createElement(S.Fragment,null,r&&S.createElement(`div`,{className:`${i}-arrow`}),S.cloneElement(a,{ref:ur(a)?o:void 0}))}),Jw={adjustX:1,adjustY:1},Yw=[0,0],Xw={topLeft:{points:[`bl`,`tl`],overflow:Jw,offset:[0,-4],targetOffset:Yw},top:{points:[`bc`,`tc`],overflow:Jw,offset:[0,-4],targetOffset:Yw},topRight:{points:[`br`,`tr`],overflow:Jw,offset:[0,-4],targetOffset:Yw},bottomLeft:{points:[`tl`,`bl`],overflow:Jw,offset:[0,4],targetOffset:Yw},bottom:{points:[`tc`,`bc`],overflow:Jw,offset:[0,4],targetOffset:Yw},bottomRight:{points:[`tr`,`br`],overflow:Jw,offset:[0,4],targetOffset:Yw}};function Zw(){return Zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{arrow:n=!1,prefixCls:r=`rc-dropdown`,transitionName:i,animation:a,align:o,placement:s=`bottomLeft`,placements:c=Xw,getPopupContainer:l,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:m,trigger:h=[`hover`],autoFocus:g,overlay:_,children:v,onVisibleChange:y,...b}=e,[x,C]=S.useState(),w=`visible`in e?m:x,T=a?`${r}-${a}`:i,E=S.useRef(null),D=S.useRef(null),O=S.useRef(null);S.useImperativeHandle(t,()=>E.current);let k=e=>{C(e),y?.(e)};Kw({visible:w,triggerRef:O,onVisibleChange:k,autoFocus:g,overlayRef:D});let A=t=>{let{onOverlayClick:n}=e;C(!1),n&&n(t)},j=()=>S.createElement(qw,{ref:D,overlay:_,prefixCls:r,arrow:n}),M=()=>typeof _==`function`?j:j(),N=()=>{let{minOverlayWidthMatchTrigger:t,alignPoint:n}=e;return`minOverlayWidthMatchTrigger`in e?t:!n},P=S.cloneElement(v,{className:J(v.props?.className,w&&(()=>{let{openClassName:t}=e;return t===void 0?`${r}-open`:t})()),ref:ur(v)?cr(O,pr(v)):void 0}),F=d;return!F&&h.indexOf(`contextMenu`)!==-1&&(F=[`click`]),S.createElement(sm,Zw({builtinPlacements:c},b,{prefixCls:r,ref:E,popupClassName:J(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:h,showAction:u,hideAction:F,popupPlacement:s,popupAlign:o,popupMotion:{motionName:T},popupVisible:w,stretch:N()?`minWidth`:``,popup:M(),onOpenChange:k,onPopupClick:A,getPopupContainer:l}),P)}),$w=S.createContext(null);function eT(e,t){return`${e}-${t}`}function tT(e){return eT(S.useContext($w),e)}var nT=S.createContext(null);function rT(e,t){let n={...e};return Object.keys(t).forEach(e=>{let r=t[e];r!==void 0&&(n[e]=r)}),n}function iT({children:e,locked:t,...n}){let r=S.useContext(nT),i=Zn(()=>rT(r,n),[r,n],(e,n)=>!t&&(e[0]!==n[0]||!fi(e[1],n[1],!0)));return S.createElement(nT.Provider,{value:i},e)}var aT=[],oT=S.createContext(null);function sT(){return S.useContext(oT)}var cT=S.createContext(aT);function lT(e){let t=S.useContext(cT);return S.useMemo(()=>e===void 0?t:[...t,e],[t,e])}var uT=S.createContext(null),dT=S.createContext({}),{LEFT:fT,RIGHT:pT,UP:mT,DOWN:hT,ENTER:gT,ESC:_T,HOME:vT,END:yT}=Qr,bT=[mT,hT,fT,pT];function xT(e,t,n,r){let i=`prev`,a=`next`,o=`children`,s=`parent`;if(e===`inline`&&r===gT)return{inlineTrigger:!0};let c={[mT]:i,[hT]:a},l={[fT]:n?a:i,[pT]:n?i:a,[hT]:o,[gT]:o},u={[mT]:i,[hT]:a,[gT]:o,[_T]:s,[fT]:n?o:s,[pT]:n?s:o};switch({inline:c,horizontal:l,vertical:u,inlineSub:c,horizontalSub:u,verticalSub:u}[`${e}${t?``:`Sub`}`]?.[r]){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case o:return{offset:1,sibling:!1};default:return null}}function ST(e){let t=e;for(;t;){if(t.getAttribute(`data-menu-list`))return t;t=t.parentElement}return null}function CT(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function wT(e,t){return Mr(e,!0).filter(e=>t.has(e))}function TT(e,t,n,r=1){if(!e)return null;let i=wT(e,t),a=i.length,o=i.findIndex(e=>n===e);return r<0?o===-1?o=a-1:--o:r>0&&(o+=1),o=(o+a)%a,i[o]}var ET=(e,t)=>{let n=new Set,r=new Map,i=new Map;return e.forEach(e=>{let a=document.querySelector(`[data-menu-id='${eT(t,e)}']`);a&&(n.add(a),i.set(a,e),r.set(e,a))}),{elements:n,key2element:r,element2key:i}};function DT(e,t,n,r,i,a,o,s,c,l){let u=S.useRef(),d=S.useRef();d.current=t;let f=()=>{Oi.cancel(u.current)};return S.useEffect(()=>()=>{f()},[]),p=>{let{which:m}=p;if([...bT,gT,_T,vT,yT].includes(m)){let l=a(),h=ET(l,r),{elements:g,key2element:_,element2key:v}=h,y=CT(_.get(t),g),b=v.get(y),x=xT(e,o(b,!0).length===1,n,m);if(!x&&m!==vT&&m!==yT)return;(bT.includes(m)||[vT,yT].includes(m))&&p.preventDefault();let S=e=>{if(e){let t=e,n=e.querySelector(`a`);n?.getAttribute(`href`)&&(t=n);let r=v.get(e);s(r),f(),u.current=Oi(()=>{d.current===r&&t.focus()})}};if([vT,yT].includes(m)||x.sibling||!y){let t;t=!y||e===`inline`?i.current:ST(y);let n,r=wT(t,g);n=m===vT?r[0]:m===yT?r[r.length-1]:TT(t,g,y,x.offset),S(n)}else if(x.inlineTrigger)c(b);else if(x.offset>0)c(b,!0),f(),u.current=Oi(()=>{h=ET(l,r);let e=y.getAttribute(`aria-controls`);S(TT(document.getElementById(e),h.elements))},5);else if(x.offset<0){let e=o(b,!0),t=e[e.length-2],n=_.get(t);c(t,!1),S(n)}}l?.(p)}}function OT(e){Promise.resolve().then(e)}var kT=`__RC_UTIL_PATH_SPLIT__`,AT=e=>e.join(kT),jT=e=>e.split(kT),MT=`rc-menu-more`;function NT(){let[,e]=S.useState({}),t=(0,S.useRef)(new Map),n=(0,S.useRef)(new Map),[r,i]=S.useState([]),a=(0,S.useRef)(0),o=(0,S.useRef)(!1),s=()=>{o.current||e({})},c=(0,S.useCallback)((e,r)=>{let i=AT(r);n.current.set(i,e),t.current.set(e,i),a.current+=1;let o=a.current;OT(()=>{o===a.current&&s()})},[]),l=(0,S.useCallback)((e,r)=>{let i=AT(r);n.current.delete(i),t.current.delete(e)},[]),u=(0,S.useCallback)(e=>{i(e)},[]),d=(0,S.useCallback)((e,n)=>{let i=jT(t.current.get(e)||``);return n&&r.includes(i[0])&&i.unshift(MT),i},[r]),f=(0,S.useCallback)((e,t)=>e.filter(e=>e!==void 0).some(e=>d(e,!0).includes(t)),[d]),p=()=>{let e=[...t.current.keys()];return r.length&&e.push(MT),e},m=(0,S.useCallback)(e=>{let r=`${t.current.get(e)}${kT}`,i=new Set;return[...n.current.keys()].forEach(e=>{e.startsWith(r)&&i.add(n.current.get(e))}),i},[]);return S.useEffect(()=>()=>{o.current=!0},[]),{registerPath:c,unregisterPath:l,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:m}}function PT(e){let t=S.useRef(e);t.current=e;let n=S.useCallback((...e)=>t.current?.(...e),[]);return e?n:void 0}function FT(e,t,n,r){let{activeKey:i,onActive:a,onInactive:o}=S.useContext(nT),s={active:i===e};return t||(s.onMouseEnter=t=>{n?.({key:e,domEvent:t}),a(e)},s.onMouseLeave=t=>{r?.({key:e,domEvent:t}),o(e)}),s}function IT(e){let{mode:t,rtl:n,inlineIndent:r}=S.useContext(nT);if(t!==`inline`)return null;let i=e;return n?{paddingRight:i*r}:{paddingLeft:i*r}}function LT({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e==`function`?r=S.createElement(e,{...t}):typeof e!=`boolean`&&(r=e),r||n||null)}function RT({item:e,...t}){return Object.defineProperty(t,`item`,{get:()=>(ui(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function zT(){return zT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,eventKey:i,warnKey:a,disabled:o,itemIcon:s,children:c,role:l,onMouseEnter:u,onMouseLeave:d,onClick:f,onKeyDown:p,onFocus:m,...h}=e,g=tT(i),{prefixCls:_,onItemClick:v,disabled:y,overflowDisabled:b,itemIcon:x,selectedKeys:C,onActive:w}=S.useContext(nT),{_internalRenderMenuItem:T}=S.useContext(dT),E=`${_}-item`,D=S.useRef(),O=S.useRef(),k=y||o,A=lr(t,O),j=lT(i),M=e=>({key:i,keyPath:[...j].reverse(),item:D.current,domEvent:e}),N=s||x,{active:P,...F}=FT(i,k,u,d),I=C.includes(i),L=IT(j.length),R=e=>{if(k)return;let t=M(e);f?.(RT(t)),v(t)},z=e=>{if(p?.(e),e.which===Qr.ENTER){let t=M(e);f?.(RT(t)),v(t)}},B=e=>{w(i),m?.(e)},V={};e.role===`option`&&(V[`aria-selected`]=I);let H=S.createElement(BT,zT({ref:D,elementRef:A,role:l===null?`none`:l||`menuitem`,tabIndex:o?null:-1,"data-menu-id":b&&g?null:g},gi(h,[`extra`]),F,V,{component:`li`,"aria-disabled":o,style:{...L,...n},className:J(E,{[`${E}-active`]:P,[`${E}-selected`]:I,[`${E}-disabled`]:k},r),onClick:R,onKeyDown:z,onFocus:B}),c,S.createElement(LT,{props:{...e,isSelected:I},icon:N}));return T&&(H=T(H,e,{selected:I})),H});function HT(e,t){let{eventKey:n}=e,r=sT(),i=lT(n);return S.useEffect(()=>{if(r)return r.registerPath(n,i),()=>{r.unregisterPath(n,i)}},[i]),r?null:S.createElement(VT,zT({},e,{ref:t}))}var UT=S.forwardRef(HT);function WT(){return WT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:i,mode:a,rtl:o}=S.useContext(nT);return S.createElement(`ul`,WT({className:J(i,o&&`${i}-rtl`,`${i}-sub`,`${i}-${a===`inline`?`inline`:`vertical`}`,e),role:`menu`},n,{"data-menu-list":!0,ref:r}),t)});function KT(e,t){return ki(e).map((e,n)=>{if(S.isValidElement(e)){let{key:r}=e,i=e.props?.eventKey??r;i??=`tmp_key-${[...t,n].join(`-`)}`;let a={key:i,eventKey:i};return S.cloneElement(e,a)}return e})}var qT={adjustX:1,adjustY:1},JT={topLeft:{points:[`bl`,`tl`],overflow:qT},topRight:{points:[`br`,`tr`],overflow:qT},bottomLeft:{points:[`tl`,`bl`],overflow:qT},bottomRight:{points:[`tr`,`br`],overflow:qT},leftTop:{points:[`tr`,`tl`],overflow:qT},leftBottom:{points:[`br`,`bl`],overflow:qT},rightTop:{points:[`tl`,`tr`],overflow:qT},rightBottom:{points:[`bl`,`br`],overflow:qT}},YT={topLeft:{points:[`bl`,`tl`],overflow:qT},topRight:{points:[`br`,`tr`],overflow:qT},bottomLeft:{points:[`tl`,`bl`],overflow:qT},bottomRight:{points:[`tr`,`br`],overflow:qT},rightTop:{points:[`tr`,`tl`],overflow:qT},rightBottom:{points:[`br`,`bl`],overflow:qT},leftTop:{points:[`tl`,`tr`],overflow:qT},leftBottom:{points:[`bl`,`br`],overflow:qT}};function XT(e,t,n){if(t)return t;if(n)return n[e]||n.other}var ZT={horizontal:`bottomLeft`,vertical:`rightTop`,"vertical-left":`rightTop`,"vertical-right":`leftTop`};function QT({prefixCls:e,visible:t,children:n,popup:r,popupStyle:i,popupClassName:a,popupOffset:o,disabled:s,mode:c,onVisibleChange:l}){let{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:m,triggerSubMenuAction:h,forceSubMenuRender:g,rootClassName:_,motion:v,defaultMotions:y}=S.useContext(nT),[b,x]=S.useState(!1),C=d?{...YT,...m}:{...JT,...m},w=ZT[c],T=XT(c,v,y),E=S.useRef(T);c!==`inline`&&(E.current=T);let D={...E.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},O=S.useRef();return S.useEffect(()=>(O.current=Oi(()=>{x(t)}),()=>{Oi.cancel(O.current)}),[t]),S.createElement(sm,{prefixCls:e,popupClassName:J(`${e}-popup`,{[`${e}-rtl`]:d},a,_),stretch:c===`horizontal`?`minWidth`:null,getPopupContainer:u,builtinPlacements:C,popupPlacement:w,popupVisible:b,popup:r,popupStyle:i,popupAlign:o&&{offset:o},action:s?[]:[h],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:l,forceRender:g,popupMotion:D,fresh:!0},n)}function $T(){return $T=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current&&f(!1)},[l]);let m={...XT(i,s,c)};n.length>1&&(m.motionAppear=!1);let h=m.onVisibleChanged;return m.onVisibleChanged=e=>(!u.current&&!e&&f(!0),h?.(e)),d?null:S.createElement(iT,{mode:i,locked:!u.current},S.createElement(Od,$T({visible:p},m,{forceRender:o,removeOnLeave:!1,leavedClassName:`${a}-hidden`}),({className:t,style:n})=>S.createElement(GT,{id:e,className:t,style:n},r)))}function tE(){return tE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,className:r,styles:i,classNames:a,title:o,eventKey:s,warnKey:c,disabled:l,internalPopupClose:u,children:d,itemIcon:f,expandIcon:p,popupClassName:m,popupOffset:h,popupStyle:g,onClick:_,onMouseEnter:v,onMouseLeave:y,onTitleClick:b,onTitleMouseEnter:x,onTitleMouseLeave:C,popupRender:w,...T}=e,E=tT(s),{prefixCls:D,mode:O,openKeys:k,disabled:A,overflowDisabled:j,activeKey:M,selectedKeys:N,itemIcon:P,expandIcon:F,onItemClick:I,onOpenChange:L,onActive:R,popupRender:z}=S.useContext(nT),{_internalRenderSubMenuItem:B}=S.useContext(dT),{isSubPathKey:V}=S.useContext(uT),H=lT(),U=`${D}-submenu`,ee=A||l,W=S.useRef(),te=S.useRef(),G=f??P,ne=p??F,K=k.includes(s),re=!j&&K,ie=V(N,s),{active:ae,...q}=FT(s,ee,x,C),[oe,se]=S.useState(!1),ce=e=>{ee||se(e)},le=e=>{ce(!0),v?.({key:s,domEvent:e})},ue=e=>{ce(!1),y?.({key:s,domEvent:e})},de=S.useMemo(()=>ae||(O===`inline`?!1:oe||V([M],s)),[O,ae,M,oe,s,V]),fe=IT(H.length),pe=e=>{ee||(b?.({key:s,domEvent:e}),O===`inline`&&L(s,!K))},me=PT(e=>{_?.(RT(e)),I(e)}),he=e=>{O!==`inline`&&L(s,e)},ge=()=>{R(s)},_e=E&&`${E}-popup`,ve=S.useMemo(()=>S.createElement(LT,{icon:O===`horizontal`?void 0:ne,props:{...e,isOpen:re,isSubMenu:!0}},S.createElement(`i`,{className:`${U}-arrow`})),[O,ne,e,re,U]),ye=S.createElement(`div`,tE({role:`menuitem`,style:fe,className:`${U}-title`,tabIndex:ee?null:-1,ref:W,title:typeof o==`string`?o:null,"data-menu-id":j&&E?null:E,"aria-expanded":re,"aria-haspopup":!0,"aria-controls":_e,"aria-disabled":ee,onClick:pe,onFocus:ge},q),o,ve),be=S.useRef(O);O!==`inline`&&H.length>1?be.current=`vertical`:be.current=O;let xe=be.current,Se=S.useMemo(()=>{let t=S.createElement(iT,{classNames:a,styles:i,mode:xe===`horizontal`?`vertical`:xe},S.createElement(GT,{id:_e,ref:te},d)),n=w||z;return n?n(t,{item:e,keys:H}):t},[w,z,H,_e,d,e,xe]);if(!j){let e=be.current;ye=S.createElement(QT,{mode:e,prefixCls:U,visible:!u&&re&&O!==`inline`,popupClassName:m,popupOffset:h,popupStyle:g,popup:Se,disabled:ee,onVisibleChange:he},ye)}let Ce=S.createElement(Jx.Item,tE({ref:t,role:`none`},T,{component:`li`,style:n,className:J(U,`${U}-${O}`,r,{[`${U}-open`]:re,[`${U}-active`]:de,[`${U}-selected`]:ie,[`${U}-disabled`]:ee}),onMouseEnter:le,onMouseLeave:ue}),ye,!j&&S.createElement(eE,{id:_e,open:re,keyPath:H},d));return B&&(Ce=B(Ce,e,{selected:ie,active:de,open:re,disabled:ee})),S.createElement(iT,{classNames:a,styles:i,onItemClick:me,mode:O===`horizontal`?`vertical`:O,itemIcon:G,expandIcon:ne},Ce)}),rE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=lT(n),a=KT(r,i),o=sT();S.useEffect(()=>{if(o)return o.registerPath(n,i),()=>{o.unregisterPath(n,i)}},[i]);let s;return s=o?a:S.createElement(nE,tE({ref:t},e),a),S.createElement(cT.Provider,{value:i},s)});function iE({className:e,style:t}){let{prefixCls:n}=S.useContext(nT);return sT()?null:S.createElement(`li`,{role:`separator`,className:J(`${n}-item-divider`,e),style:t})}function aE(){return aE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,title:r,eventKey:i,children:a,...o}=e,{prefixCls:s,classNames:c,styles:l}=S.useContext(nT),u=`${s}-item-group`;return S.createElement(`li`,aE({ref:t,role:`presentation`},o,{onClick:e=>e.stopPropagation(),className:J(u,n)}),S.createElement(`div`,{role:`presentation`,className:J(`${u}-title`,c?.listTitle),style:l?.listTitle,title:typeof r==`string`?r:void 0},r),S.createElement(`ul`,{role:`group`,className:J(`${u}-list`,c?.list),style:l?.list},a))}),sE=S.forwardRef((e,t)=>{let{eventKey:n,children:r}=e,i=KT(r,lT(n));return sT()?i:S.createElement(oE,aE({ref:t},gi(e,[`warnKey`])),i)});function cE(){return cE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(e&&typeof e==`object`){let{label:c,children:l,key:u,type:d,extra:f,...p}=e,m=u??`tmp-${s}`;return l||d===`group`?d===`group`?S.createElement(i,cE({key:m},p,{title:c}),lE(l,t,n)):S.createElement(a,cE({key:m},p,{title:c}),lE(l,t,n)):d===`divider`?S.createElement(o,cE({key:m},p)):S.createElement(r,cE({key:m},p,{extra:f}),c,(!!f||f===0)&&S.createElement(`span`,{className:`${n}-item-extra`},f))}return null}).filter(e=>e)}function uE(e,t,n,r,i){let a=e,o={divider:iE,item:UT,group:sE,submenu:rE,...r};return t&&(a=lE(t,o,i)),KT(a,n)}function dE(){return dE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-menu`,rootClassName:r,style:i,className:a,styles:o,classNames:s,tabIndex:c=0,items:l,children:u,direction:d,id:f,mode:p=`vertical`,inlineCollapsed:m,disabled:h,disabledOverflow:g,subMenuOpenDelay:_=.1,subMenuCloseDelay:v=.1,forceSubMenuRender:y,defaultOpenKeys:b,openKeys:x,activeKey:C,defaultActiveFirst:w,selectable:T=!0,multiple:E=!1,defaultSelectedKeys:D,selectedKeys:O,onSelect:k,onDeselect:A,inlineIndent:j=24,motion:M,defaultMotions:N,triggerSubMenuAction:P=`hover`,builtinPlacements:F,itemIcon:I,expandIcon:L,overflowedIndicator:R=`...`,overflowedIndicatorPopupClassName:z,getPopupContainer:B,onClick:V,onOpenChange:H,onKeyDown:U,openAnimation:ee,openTransitionName:W,_internalRenderMenuItem:te,_internalRenderSubMenuItem:G,_internalComponents:ne,popupRender:K,...re}=e,[ie,ae]=S.useMemo(()=>[uE(u,l,fE,ne,n),uE(u,l,fE,{},n)],[u,l,ne]),[q,oe]=S.useState(!1),se=S.useRef(),ce=Xn(f?`rc-menu-uuid-${f}`:`rc-menu-uuid`),le=d===`rtl`,[ue,de]=Gn(b,x),fe=ue||fE,pe=(e,t=!1)=>{function n(){de(e),H?.(e)}t?(0,Vi.flushSync)(n):n()},[me,he]=S.useState(fe),ge=S.useRef(!1),[_e,ve]=S.useMemo(()=>(p===`inline`||p===`vertical`)&&m?[`vertical`,m]:[p,!1],[p,m]),ye=_e===`inline`,[be,xe]=S.useState(_e),[Se,Ce]=S.useState(ve);S.useEffect(()=>{xe(_e),Ce(ve),ge.current&&(ye?de(me):pe(fE))},[_e,ve]);let[we,Te]=S.useState(0),Ee=we>=ie.length-1||be!==`horizontal`||g;S.useEffect(()=>{ye&&he(fe)},[fe]),S.useEffect(()=>(ge.current=!0,()=>{ge.current=!1}),[]);let{registerPath:De,unregisterPath:Oe,refreshOverflowKeys:ke,isSubPathKey:Ae,getKeyPath:je,getKeys:Me,getSubPathKeys:Ne}=NT(),Pe=S.useMemo(()=>({registerPath:De,unregisterPath:Oe}),[De,Oe]),Fe=S.useMemo(()=>({isSubPathKey:Ae}),[Ae]);S.useEffect(()=>{ke(Ee?fE:ie.slice(we+1).map(e=>e.key))},[we,Ee]);let[Ie,Le]=Gn(C||w&&ie[0]?.key,C),Re=PT(e=>{Le(e)}),ze=PT(()=>{Le(void 0)});(0,S.useImperativeHandle)(t,()=>({list:se.current,focus:e=>{let t=Me(),{elements:n,key2element:r,element2key:i}=ET(t,ce),a=wT(se.current,n),o;o=Ie&&t.includes(Ie)?Ie:a[0]?i.get(a[0]):ie.find(e=>!e.props.disabled)?.key;let s=r.get(o);o&&s&&s?.focus?.(e)},findItem:({key:e})=>{let{key2element:t}=ET(Me(),ce);return t.get(e)||null}}));let[Be,Ve]=Gn(D||[],O),He=S.useMemo(()=>Array.isArray(Be)?Be:Be==null?fE:[Be],[Be]),Ue=e=>{if(T){let{key:t}=e,n=He.includes(t),r;r=E?n?He.filter(e=>e!==t):[...He,t]:[t],Ve(r);let i={...e,selectedKeys:r};n?A?.(i):k?.(i)}!E&&fe.length&&be!==`inline`&&pe(fE)},We=PT(e=>{V?.(RT(e)),Ue(e)}),Ge=PT((e,t)=>{let n=fe.filter(t=>t!==e);if(t)n.push(e);else if(be!==`inline`){let t=Ne(e);n=n.filter(e=>!t.has(e))}fi(fe,n,!0)||pe(n,!0)}),Ke=DT(be,Ie,le,ce,se,Me,je,Le,(e,t)=>{Ge(e,t??!fe.includes(e))},U);S.useEffect(()=>{oe(!0)},[]);let qe=S.useMemo(()=>({_internalRenderMenuItem:te,_internalRenderSubMenuItem:G}),[te,G]),Je=be!==`horizontal`||g?ie:ie.map((e,t)=>S.createElement(iT,{key:e.key,overflowDisabled:t>we,classNames:s,styles:o},e)),Ye=S.createElement(Jx,dE({id:f,ref:se,prefixCls:`${n}-overflow`,component:`ul`,itemComponent:UT,className:J(n,`${n}-root`,`${n}-${be}`,a,{[`${n}-inline-collapsed`]:Se,[`${n}-rtl`]:le},r),dir:d,style:i,role:`menu`,tabIndex:c,data:Je,renderRawItem:e=>e,renderRawRest:e=>{let t=e.length,n=t?ie.slice(-t):null;return S.createElement(rE,{eventKey:MT,title:R,disabled:Ee,internalPopupClose:t===0,popupClassName:z},n)},maxCount:be!==`horizontal`||g?Jx.INVALIDATE:Jx.RESPONSIVE,ssr:`full`,"data-menu-list":!0,onVisibleChange:e=>{Te(e)},onKeyDown:Ke},re));return S.createElement(dT.Provider,{value:qe},S.createElement($w.Provider,{value:ce},S.createElement(iT,{prefixCls:n,rootClassName:r,classNames:s,styles:o,mode:be,openKeys:fe,rtl:le,disabled:h,motion:q?M:null,defaultMotions:q?N:null,activeKey:Ie,onActive:Re,onInactive:ze,selectedKeys:He,inlineIndent:j,subMenuOpenDelay:_,subMenuCloseDelay:v,forceSubMenuRender:y,builtinPlacements:F,triggerSubMenuAction:P,getPopupContainer:B,itemIcon:I,expandIcon:L,onItemClick:We,onOpenChange:Ge,popupRender:K},S.createElement(uT.Provider,{value:Fe},Ye),S.createElement(`div`,{style:{display:`none`},"aria-hidden":!0},S.createElement(oT.Provider,{value:Pe},ae)))))});pE.Item=UT,pE.SubMenu=rE,pE.ItemGroup=sE,pE.Divider=iE;var mE=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={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`}}))());function hE(){return hE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,hE({},e,{ref:t,icon:mE.default}))),_E=S.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),vE=e=>{let{antCls:t,componentCls:n,colorText:r,footerBg:i,headerHeight:a,headerPadding:o,headerColor:s,footerPadding:c,fontSize:l,bodyBg:u,headerBg:d}=e;return{[n]:{display:`flex`,flex:`auto`,flexDirection:`column`,minHeight:0,background:u,"&, *":{boxSizing:`border-box`},[`&${n}-has-sider`]:{flexDirection:`row`,[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:`0 0 auto`},"&-rtl":{direction:`rtl`}},[`${n}-header`]:{height:a,padding:o,color:s,lineHeight:Y(a),background:d,[`${t}-menu`]:{lineHeight:`inherit`}},[`${n}-footer`]:{padding:c,color:r,fontSize:l,background:i},[`${n}-content`]:{flex:`auto`,color:r,minHeight:0}}},yE=e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:a,marginXXS:o,colorTextLightSolid:s,colorBgContainer:c}=e,l=r*1.25;return{colorBgHeader:`#001529`,colorBgBody:t,colorBgTrigger:`#002140`,bodyBg:t,headerBg:`#001529`,headerHeight:n*2,headerPadding:`0 ${l}px`,headerColor:i,footerPadding:`${a}px ${l}px`,footerBg:t,siderBg:`#001529`,triggerHeight:r+o*2,triggerBg:`#002140`,triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:c,lightTriggerBg:c,lightTriggerColor:i}},bE=[[`colorBgBody`,`bodyBg`],[`colorBgHeader`,`headerBg`],[`colorBgTrigger`,`triggerBg`]],xE=Ql(`Layout`,vE,yE,{deprecatedTokens:bE}),SE=Ql([`Layout`,`Sider`],e=>{let{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:a,triggerHeight:o,triggerColor:s,triggerBg:c,headerHeight:l,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:m,lightTriggerBg:h,bodyBg:g}=e;return{[t]:{position:`relative`,minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:o},"&-right":{order:1},[`${t}-children`]:{height:`100%`,marginTop:-.1,paddingTop:.1,[`${a}-menu${a}-menu-inline-collapsed`]:{width:`auto`}},[`&-zero-width ${t}-children`]:{overflow:`hidden`},[`${t}-trigger`]:{position:`fixed`,bottom:0,zIndex:1,height:o,color:s,lineHeight:Y(o),textAlign:`center`,background:c,cursor:`pointer`,transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:`absolute`,top:l,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:`flex`,alignItems:`center`,justifyContent:`center`,background:n,borderRadius:`0 ${Y(f)} ${Y(f)} 0`,cursor:`pointer`,transition:`background-color ${i} ease`,"&::after":{position:`absolute`,inset:0,background:`transparent`,transition:`all ${i}`,content:`""`},"&:hover::after":{background:`rgba(255, 255, 255, 0.2)`},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${Y(f)} 0 0 ${Y(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:m,background:h},[`${t}-zero-width-trigger`]:{color:m,background:h,border:`1px solid ${g}`,borderInlineStart:0}}}}},yE,{deprecatedTokens:bE}),CE={xs:`479.98px`,sm:`575.98px`,md:`767.98px`,lg:`991.98px`,xl:`1199.98px`,xxl:`1599.98px`,xxxl:`1839.98px`},wE=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),TE=S.createContext({}),EE=(()=>{let e=0;return(t=``)=>(e+=1,`${t}${e}`)})(),DE=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,trigger:i,children:a,defaultCollapsed:o=!1,theme:s=`dark`,style:c={},collapsible:l=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:m,onCollapse:h,onBreakpoint:g,..._}=e,{siderHook:v}=(0,S.useContext)(_E),[y,b]=(0,S.useState)(`collapsed`in e?e.collapsed:o),[x,C]=(0,S.useState)(!1);(0,S.useEffect)(()=>{`collapsed`in e&&b(e.collapsed)},[e.collapsed]);let w=(t,n)=>{`collapsed`in e||b(t),h?.(t,n)},{getPrefixCls:T,direction:E}=(0,S.useContext)(ga),D=T(`layout-sider`,n),[O,k]=SE(D),A=(0,S.useRef)(null);A.current=e=>{C(e.matches),g?.(e.matches),y!==e.matches&&w(e.matches,`responsive`)},(0,S.useEffect)(()=>{function e(e){return A.current?.(e)}let t;return window?.matchMedia!==void 0&&m&&m in CE&&(t=window.matchMedia(`screen and (max-width: ${CE[m]})`),typeof t?.addEventListener==`function`&&t.addEventListener(`change`,e),e(t)),()=>{typeof t?.removeEventListener==`function`&&t.removeEventListener(`change`,e)}},[m]),(0,S.useEffect)(()=>{let e=EE(`ant-sider-`);return v.addSider(e),()=>v.removeSider(e)},[]);let j=()=>{w(!y,`clickTrigger`)},M=gi(_,[`collapsed`]),N=y?f:d,P=wE(N)?`${N}px`:String(N),F=Number.parseFloat(String(f||0))===0?S.createElement(`span`,{onClick:j,className:J(`${D}-zero-width-trigger`,`${D}-zero-width-trigger-${u?`right`:`left`}`),style:p},i||S.createElement(gE,null)):null,I=E===`rtl`==!u,L={expanded:I?S.createElement(Bg,null):S.createElement(Uw,null),collapsed:I?S.createElement(Uw,null):S.createElement(Bg,null)}[y?`collapsed`:`expanded`],R=i===null?null:F||S.createElement(`div`,{className:`${D}-trigger`,onClick:j,style:{width:P}},i||L),z={...c,flex:`0 0 ${P}`,maxWidth:P,minWidth:P,width:P},B=J(D,`${D}-${s}`,{[`${D}-collapsed`]:!!y,[`${D}-has-trigger`]:l&&i!==null&&!F,[`${D}-below`]:!!x,[`${D}-zero-width`]:Number.parseFloat(P)===0},r,O,k),V=S.useMemo(()=>({siderCollapsed:y}),[y]);return S.createElement(TE.Provider,{value:V},S.createElement(`aside`,{className:B,...M,style:z,ref:t},S.createElement(`div`,{className:`${D}-children`},a),l||x&&F?R:null))}),Qee=c(o((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:`M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`ellipsis`,theme:`outlined`}}))());function OE(){return OE=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,OE({},e,{ref:t,icon:Qee.default}))),AE=(0,S.createContext)({prefixCls:``,firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),jE=e=>{let{prefixCls:t,className:n,dashed:r,...i}=e,{getPrefixCls:a}=S.useContext(ga),o=J({[`${a(`menu`,t)}-item-divider-dashed`]:!!r},n);return S.createElement(iE,{className:o,...i})},ME=e=>{let{className:t,children:n,icon:r,title:i,danger:a,extra:o}=e,{prefixCls:s,firstLevel:c,direction:l,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:m}=S.useContext(AE),h=e=>{let t=n?.[0],i=S.createElement(`span`,{className:J(`${s}-title-content`,c?m?.itemContent:m?.subMenu?.itemContent,{[`${s}-title-content-with-extra`]:!!o||o===0}),style:c?p?.itemContent:p?.subMenu?.itemContent},n);return(!r||S.isValidElement(n)&&n.type===`span`)&&n&&e&&c&&typeof t==`string`?S.createElement(`div`,{className:`${s}-inline-collapsed-noicon`},t.charAt(0)):i},{siderCollapsed:g}=S.useContext(TE),_=i;i===void 0?_=c?n:``:i===!1&&(_=``);let v=d===!1?void 0:d,y=v&&v.title!==void 0?v.title:_,b={...v??null,title:y};!g&&!f&&(b.title=null,b.open=!1);let x=ki(n).length,C=S.createElement(UT,{...gi(e,[`title`,`icon`,`danger`]),className:J(c?m?.item:m?.subMenu?.item,{[`${s}-item-danger`]:a,[`${s}-item-only-child`]:(r?x+1:x)===1},t),style:{...c?p?.item:p?.subMenu?.item,...e.style},title:typeof i==`string`?i:void 0},um(r,e=>({className:J(`${s}-item-icon`,c?m?.itemIcon:m?.subMenu?.itemIcon,e.className),style:{...c?p?.itemIcon:p?.subMenu?.itemIcon,...e.style}})),h(f));if(!u&&d!==!1){let e=v&&v.placement?v.placement:l===`rtl`?`left`:`right`,t=`${s}-inline-collapsed-tooltip`,n=e=>({...e,root:J(t,e?.root)}),r=v&&typeof v.classNames==`function`?e=>n(v.classNames(e)):n(v?.classNames);C=S.createElement(kw,{...b,placement:e,classNames:r},C)}return C},NE=S.createContext(null),PE=S.forwardRef((e,t)=>{let{children:n,...r}=e,i=S.useContext(NE),a=S.useMemo(()=>({...i,...r}),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),o=fr(n),s=lr(t,o?pr(n):null);return S.createElement(NE.Provider,{value:a},S.createElement(_y,{space:!0},o?S.cloneElement(n,{ref:s}):n))}),$ee=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:a,lineType:o,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${Y(a)} ${o} ${i}`,boxShadow:`none`,"&::after":{display:`block`,clear:`both`,height:0,content:`"\\20"`},[`${t}-item, ${t}-submenu`]:{position:`relative`,display:`inline-block`,verticalAlign:`bottom`,paddingInline:s},[`> ${t}-item:hover, > ${t}-item-active, - > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:`transparent`},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${n}`).join(`,`)},[`${t}-submenu-arrow`]:{display:`none`}}}},Zee=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:`rtl`},[`${e}-submenu-rtl`]:{transformOrigin:`100% 0`},[`${e}-rtl${e}-vertical, - ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${Y(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${Y(t)})`}}}}),RE=e=>Kl(e),zE=(e,t)=>{let{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:a,groupTitleColor:o,itemBg:s,subMenuItemBg:c,itemSelectedBg:l,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:m,motionEaseOut:h,itemPaddingInline:g,motionDurationMid:_,itemHoverColor:v,lineType:y,colorSplit:b,itemDisabledColor:x,dangerItemColor:S,dangerItemHoverColor:C,dangerItemSelectedColor:w,dangerItemActiveBg:T,dangerItemSelectedBg:E,popupBg:D,itemHoverBg:O,itemActiveBg:k,menuSubMenuBg:A,horizontalItemSelectedColor:j,horizontalItemSelectedBg:M,horizontalItemBorderRadius:N,horizontalItemHoverBg:P}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...RE(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:o}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:a},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...RE(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`${n}-submenu:not(${n}-submenu-selected)`]:{[`> ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:S,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:C}},[`&${n}-item:active`]:{background:T}},[`${n}-item a`]:{"&, &:hover":{color:`inherit`}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:`inherit`}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:E}},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:D},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:D},[`&${n}-horizontal`]:{...t===`dark`?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:N,"&::after":{position:`absolute`,insetInline:g,bottom:0,borderBottom:`${Y(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:`""`},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:u,borderBottomColor:j}},"&-selected":{color:j,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:j}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${Y(f)} ${y} ${b}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:c},[`${n}-item`]:{position:`relative`,"&::after":{position:`absolute`,insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Y(d)} solid ${i}`,transform:`scaleY(0.0001)`,opacity:0,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${h}`).join(`,`),content:`""`},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:`scaleY(1)`,opacity:1,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${m}`).join(`,`)}}}}}},BE=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:a,marginXS:o,itemMarginBlock:s,itemWidth:c,itemPaddingInline:l}=e,u=e.calc(a).add(i).add(o).equal();return{[`${t}-item`]:{position:`relative`,overflow:`hidden`},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:Y(n),paddingInline:l,overflow:`hidden`,textOverflow:`ellipsis`,marginInline:r,marginBlock:s,width:c},[`> ${t}-item, + > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:`transparent`},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${n}`).join(`,`)},[`${t}-submenu-arrow`]:{display:`none`}}}},ete=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:`rtl`},[`${e}-submenu-rtl`]:{transformOrigin:`100% 0`},[`${e}-rtl${e}-vertical, + ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${Y(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${Y(t)})`}}}}),FE=e=>Kl(e),IE=(e,t)=>{let{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:a,groupTitleColor:o,itemBg:s,subMenuItemBg:c,itemSelectedBg:l,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:m,motionEaseOut:h,itemPaddingInline:g,motionDurationMid:_,itemHoverColor:v,lineType:y,colorSplit:b,itemDisabledColor:x,dangerItemColor:S,dangerItemHoverColor:C,dangerItemSelectedColor:w,dangerItemActiveBg:T,dangerItemSelectedBg:E,popupBg:D,itemHoverBg:O,itemActiveBg:k,menuSubMenuBg:A,horizontalItemSelectedColor:j,horizontalItemSelectedBg:M,horizontalItemBorderRadius:N,horizontalItemHoverBg:P}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...FE(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:o}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:a},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...FE(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`${n}-submenu:not(${n}-submenu-selected)`]:{[`> ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:S,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:C}},[`&${n}-item:active`]:{background:T}},[`${n}-item a`]:{"&, &:hover":{color:`inherit`}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:`inherit`}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:E}},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:D},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:D},[`&${n}-horizontal`]:{...t===`dark`?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:N,"&::after":{position:`absolute`,insetInline:g,bottom:0,borderBottom:`${Y(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:`""`},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:u,borderBottomColor:j}},"&-selected":{color:j,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:j}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${Y(f)} ${y} ${b}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:c},[`${n}-item`]:{position:`relative`,"&::after":{position:`absolute`,insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Y(d)} solid ${i}`,transform:`scaleY(0.0001)`,opacity:0,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${h}`).join(`,`),content:`""`},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:`scaleY(1)`,opacity:1,transition:[`transform`,`opacity`].map(e=>`${e} ${_} ${m}`).join(`,`)}}}}}},LE=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:a,marginXS:o,itemMarginBlock:s,itemWidth:c,itemPaddingInline:l}=e,u=e.calc(a).add(i).add(o).equal();return{[`${t}-item`]:{position:`relative`,overflow:`hidden`},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:Y(n),paddingInline:l,overflow:`hidden`,textOverflow:`ellipsis`,marginInline:r,marginBlock:s,width:c},[`> ${t}-item, > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:Y(n)},[`${t}-item-group-list ${t}-submenu-title, - ${t}-submenu-title`]:{paddingInlineEnd:u}}},Qee=e=>{let{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:a,controlHeightLG:o,motionEaseOut:s,paddingXL:c,itemMarginInline:l,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:m,collapsedWidth:h,collapsedIconSize:g}=e,_={height:r,lineHeight:Y(r),listStylePosition:`inside`,listStyleType:`disc`};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:`none`},...BE(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...BE(e),boxShadow:m}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${Y(e.calc(o).mul(2.5).equal())})`,padding:`0`,overflow:`hidden`,borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:`hidden`,overflowY:`auto`}}},{[`${t}-inline`]:{width:`100%`,[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:`flex`,alignItems:`center`,transition:[`border-color ${f}`,`background-color ${f}`,`padding ${d} ${s}`].join(`,`),[`> ${t}-title-content`]:{flex:`auto`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`},"> *":{flex:`none`}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:`none`,[`& > ${t}-submenu > ${t}-submenu-title`]:_,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:_}},{[`${t}-inline-collapsed`]:{width:h,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:`center`}}},[`> ${t}-item, + ${t}-submenu-title`]:{paddingInlineEnd:u}}},tte=e=>{let{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:a,controlHeightLG:o,motionEaseOut:s,paddingXL:c,itemMarginInline:l,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:m,collapsedWidth:h,collapsedIconSize:g}=e,_={height:r,lineHeight:Y(r),listStylePosition:`inside`,listStyleType:`disc`};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:`none`},...LE(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...LE(e),boxShadow:m}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${Y(e.calc(o).mul(2.5).equal())})`,padding:`0`,overflow:`hidden`,borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:`hidden`,overflowY:`auto`}}},{[`${t}-inline`]:{width:`100%`,[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:`flex`,alignItems:`center`,transition:[`border-color ${f}`,`background-color ${f}`,`padding ${d} ${s}`].join(`,`),[`> ${t}-title-content`]:{flex:`auto`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`},"> *":{flex:`none`}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:`none`,[`& > ${t}-submenu > ${t}-submenu-title`]:_,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:_}},{[`${t}-inline-collapsed`]:{width:h,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:`center`}}},[`> ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, > ${t}-submenu > ${t}-submenu-title`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,insetInlineStart:0,paddingInline:`calc(50% - ${Y(e.calc(g).div(2).equal())} - ${Y(l)})`,textOverflow:`clip`,[` ${t}-submenu-arrow, ${t}-submenu-expand-icon - `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:`hidden`},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:Y(r),"+ span":{display:`inline-block`,width:0,opacity:0,overflow:`hidden`,marginInlineStart:0}}},[`${t}-item-icon, ${n}`]:{display:`inline-block`},"&-tooltip":{pointerEvents:`none`,[`${t}-item-icon, ${n}`]:{display:`none`},"a, a:hover":{color:i}},[`${t}-item-group-title`]:{...Hl,paddingInline:p}}}]},VE=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:a,iconCls:o,iconSize:s,iconMarginInlineEnd:c}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:`relative`,display:`block`,margin:0,whiteSpace:`nowrap`,cursor:`pointer`,transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(`,`),[`${t}-item-icon, ${o}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${a}`,`margin ${n} ${i}`,`color ${n}`].join(`,`),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(`,`)}},[`${t}-item-icon`]:{...Wl()},[`&${t}-item-only-child`]:{[`> ${o}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:`none !important`,cursor:`not-allowed`,"&::after":{borderColor:`transparent !important`},a:{color:`inherit !important`,cursor:`not-allowed`,pointerEvents:`none`},[`> ${t}-submenu-title`]:{color:`inherit !important`,cursor:`not-allowed`}}}},HE=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:a,menuArrowOffset:o}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:`absolute`,top:`50%`,insetInlineEnd:e.margin,width:a,color:`currentcolor`,transform:`translateY(-50%)`,transition:[`transform`,`opacity`].map(e=>`${e} ${n}`).join(`,`)},"&-arrow":{"&::before, &::after":{position:`absolute`,width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:`currentcolor`,borderRadius:i,transition:[`background-color`,`transform`,`top`,`color`].map(e=>`${e} ${n} ${r}`).join(`,`),content:`""`},"&::before":{transform:`rotate(45deg) translateY(${Y(e.calc(o).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${Y(o)})`}}}}},$ee=e=>{let{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:a,motionEaseInOut:o,paddingXS:s,padding:c,colorSplit:l,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:m,menuArrowOffset:h,lineType:g,groupTitleLineHeight:_,groupTitleFontSize:v}=e;return[{"":{[n]:{...Gl(),"&-hidden":{display:`none`}}},[`${n}-submenu-hidden`]:{display:`none`}},{[n]:{...Ul(e),...Gl(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:`none`,outline:`none`,transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:`none`},"&-overflow":{display:`flex`,[`${n}-item`]:{flex:`none`}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${Y(s)} ${Y(c)}`,fontSize:v,lineHeight:_,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i}`,`background-color ${i}`,`padding ${a}`].map(e=>`${e} ${o}`).join(`,`)},[`${n}-submenu ${n}-sub`]:{cursor:`initial`,transition:[`background-color`,`padding`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},[`> ${t}-typography-ellipsis-single-line`]:{display:`inline`,verticalAlign:`unset`},[`${n}-item-extra`]:{marginInlineStart:`auto`,paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:`absolute`,inset:0,backgroundColor:`transparent`,content:`""`}},[`${n}-item-divider`]:{overflow:`hidden`,lineHeight:0,borderColor:l,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:`dashed`}},...VE(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${Y(e.calc(r).mul(2).equal())} ${Y(c)}`}}},"&-submenu":{"&-popup":{position:`absolute`,zIndex:d,borderRadius:f,boxShadow:`none`,transformOrigin:`0 0`,[`&${n}-submenu`]:{background:`transparent`},"&::before":{position:`absolute`,inset:0,zIndex:-1,width:`100%`,height:`100%`,opacity:0,content:`""`},[`> ${n}`]:{borderRadius:f,...VE(e),...HE(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${o}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:`100% 0`},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:`100% 100%`},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:`0 100%`},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:`0 0`},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...HE(e),[`&-inline-collapsed ${n}-submenu-arrow, - &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Y(h)})`},"&::after":{transform:`rotate(45deg) translateX(${Y(e.calc(h).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${Y(e.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${Y(e.calc(h).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${Y(h)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:`inherit`}}}]},ete=e=>{let{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:i,colorText:a,colorTextDescription:o,colorBgContainer:s,colorFillAlter:c,colorFillContent:l,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:m,lineHeight:h,colorBgElevated:g,marginXXS:_,padding:v,fontSize:y,controlHeightSM:b,fontSizeLG:x,colorTextLightSolid:S,colorErrorHover:C}=e,w=e.activeBarWidth??0,T=e.activeBarBorderWidth??u,E=e.itemMarginInline??e.marginXXS,D=new Nc(S).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:a,itemColor:a,colorItemTextHover:a,itemHoverColor:a,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:o,groupTitleColor:o,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:l,itemActiveBg:f,colorSubItemBg:c,subMenuItemBg:c,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:`transparent`,horizontalItemSelectedBg:`transparent`,colorActiveBarWidth:0,activeBarWidth:w,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:T,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:E,horizontalItemBorderRadius:0,horizontalItemHoverBg:`transparent`,itemHeight:m,groupTitleLineHeight:h,collapsedWidth:m*2,popupBg:g,itemMarginBlock:_,itemPaddingInline:v,horizontalLineHeight:`${m*1.15}px`,iconSize:y,iconMarginInlineEnd:b-y,collapsedIconSize:x,groupTitleFontSize:y,darkItemDisabledColor:new Nc(S).setA(.25).toRgbString(),darkItemColor:D,darkDangerItemColor:n,darkItemBg:`#001529`,darkPopupBg:`#001529`,darkSubMenuItemBg:`#000c17`,darkItemSelectedColor:S,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:`transparent`,darkGroupTitleColor:D,darkItemHoverColor:S,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:n,itemWidth:w?`calc(100% + ${T}px)`:`calc(100% - ${E*2}px)`}},tte=(e,t=e,n=!0)=>Ql(`Menu`,e=>{let{colorBgElevated:t,controlHeightLG:n,fontSize:r,darkItemColor:i,darkDangerItemColor:a,darkItemBg:o,darkSubMenuItemBg:s,darkItemSelectedColor:c,darkItemSelectedBg:l,darkDangerItemSelectedBg:u,darkItemHoverBg:d,darkGroupTitleColor:f,darkItemHoverColor:p,darkItemDisabledColor:m,darkDangerItemHoverColor:h,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:_,popupBg:v,darkPopupBg:y}=e,b=e.calc(r).div(7).mul(5).equal(),x=dc(e,{menuArrowSize:b,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(b).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:v}),S=dc(x,{itemColor:i,itemHoverColor:p,groupTitleColor:f,itemSelectedColor:c,subMenuItemSelectedColor:c,itemBg:o,popupBg:y,subMenuItemBg:s,itemActiveBg:`transparent`,itemSelectedBg:l,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:m,dangerItemColor:a,dangerItemHoverColor:h,dangerItemSelectedColor:g,dangerItemActiveBg:_,dangerItemSelectedBg:u,menuSubMenuBg:s,horizontalItemSelectedColor:c,horizontalItemSelectedBg:l});return[$ee(x),Xee(x),Qee(x),zE(x,`light`),zE(S,`dark`),Zee(x),Kh(x),hg(x,`slide-up`),hg(x,`slide-down`),Ag(x,`zoom-big`)]},ete,{deprecatedTokens:[[`colorGroupTitle`,`groupTitleColor`],[`radiusItem`,`itemBorderRadius`],[`radiusSubMenuItem`,`subMenuItemBorderRadius`],[`colorItemText`,`itemColor`],[`colorItemTextHover`,`itemHoverColor`],[`colorItemTextHoverHorizontal`,`horizontalItemHoverColor`],[`colorItemTextSelected`,`itemSelectedColor`],[`colorItemTextSelectedHorizontal`,`horizontalItemSelectedColor`],[`colorItemTextDisabled`,`itemDisabledColor`],[`colorDangerItemText`,`dangerItemColor`],[`colorDangerItemTextHover`,`dangerItemHoverColor`],[`colorDangerItemTextSelected`,`dangerItemSelectedColor`],[`colorDangerItemBgActive`,`dangerItemActiveBg`],[`colorDangerItemBgSelected`,`dangerItemSelectedBg`],[`colorItemBg`,`itemBg`],[`colorItemBgHover`,`itemHoverBg`],[`colorSubItemBg`,`subMenuItemBg`],[`colorItemBgActive`,`itemActiveBg`],[`colorItemBgSelectedHorizontal`,`horizontalItemSelectedBg`],[`colorActiveBarWidth`,`activeBarWidth`],[`colorActiveBarHeight`,`activeBarHeight`],[`colorActiveBarBorderSize`,`activeBarBorderWidth`],[`colorItemBgSelected`,`itemSelectedBg`]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),UE=e=>{let{popupClassName:t,icon:n,title:r,theme:i}=e,a=S.useContext(NE),{prefixCls:o,inlineCollapsed:s,theme:c,classNames:l,styles:u}=a,d=dT(),f;if(!n)f=s&&!d.length&&r&&typeof r==`string`?S.createElement(`div`,{className:`${o}-inline-collapsed-noicon`},r.charAt(0)):S.createElement(`span`,{className:`${o}-title-content`},r);else{let e=S.isValidElement(r)&&r.type===`span`;f=S.createElement(S.Fragment,null,um(n,e=>({className:J(e.className,`${o}-item-icon`,l?.itemIcon),style:{...e.style,...u?.itemIcon}})),e?r:S.createElement(`span`,{className:`${o}-title-content`},r))}let p=S.useMemo(()=>({...a,firstLevel:!1}),[a]),[m]=Lf(`Menu`);return S.createElement(NE.Provider,{value:p},S.createElement(aE,{...gi(e,[`icon`]),title:f,classNames:{list:l?.subMenu?.list,listTitle:l?.subMenu?.itemTitle},styles:{list:u?.subMenu?.list,listTitle:u?.subMenu?.itemTitle},popupClassName:J(o,t,l?.popup?.root,`${o}-${i||c}`),popupStyle:{zIndex:m,...e.popupStyle,...u?.popup?.root}}))};function WE(e){return e===null||e===!1}var nte={item:FE,submenu:UE,divider:PE},rte=(0,S.forwardRef)((e,t)=>{let n=S.useContext(IE),r=n||{},{prefixCls:i,className:a,style:o,theme:s=`light`,expandIcon:c,_internalDisableMenuItemTitleTooltip:l,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:m,selectable:h,onClick:g,overflowedIndicatorPopupClassName:_,classNames:v,styles:y,...b}=e,{menu:x}=S.useContext(ga),{getPrefixCls:C,getPopupContainer:w,direction:T,className:E,style:D,classNames:O,styles:k}=ya(`menu`),A=C(),j=gi(b,[`collapsedWidth`]);r.validator?.({mode:m});let M=zn((...e)=>{g?.(...e),r.onClick?.()}),N=r.mode||m,P=h??r.selectable,F=d??f,I={...e,mode:N,inlineCollapsed:F,selectable:P,theme:s},[L,R]=Cf([O,v],[k,y],{props:I},{popup:{_default:`root`},subMenu:{_default:`item`}}),z={horizontal:{motionName:`${A}-slide-up`},inline:hh(A),other:{motionName:`${A}-zoom-big`}},B=C(`menu`,i||r.prefixCls),V=sp(B),[H,U]=tte(B,V,!n),ee=J(`${B}-${s}`,E,a),W=S.useMemo(()=>{if(typeof c==`function`||WE(c))return c||null;if(typeof r.expandIcon==`function`||WE(r.expandIcon))return r.expandIcon||null;if(typeof x?.expandIcon==`function`||WE(x?.expandIcon))return x?.expandIcon||null;let e=c??r?.expandIcon??x?.expandIcon;return um(e,{className:J(`${B}-submenu-expand-icon`,S.isValidElement(e)?e.props?.className:void 0)})},[c,r?.expandIcon,x?.expandIcon,B]),te=S.useMemo(()=>({prefixCls:B,inlineCollapsed:F||!1,direction:T,firstLevel:!0,theme:s,mode:N,disableMenuItemTitleTooltip:l,tooltip:u,classNames:L,styles:R}),[B,F,T,l,s,N,L,R,u]);return S.createElement(IE.Provider,{value:null},S.createElement(NE.Provider,{value:te},S.createElement(hE,{getPopupContainer:w,overflowedIndicator:S.createElement(ME,null),overflowedIndicatorPopupClassName:J(B,`${B}-${s}`,_),classNames:{list:L.list,listTitle:L.itemTitle},styles:{list:R.list,listTitle:R.itemTitle},mode:N,selectable:P,onClick:M,...j,inlineCollapsed:F,style:{...R.root,...D,...o},className:ee,prefixCls:B,direction:T,defaultMotions:z,expandIcon:W,ref:t,rootClassName:J(p,H,r.rootClassName,U,V,L.root),_internalComponents:nte})))}),GE=(0,S.forwardRef)((e,t)=>{let n=(0,S.useRef)(null),r=S.useContext(DE);return(0,S.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{n.current?.focus(e)}})),S.createElement(rte,{ref:n,...e,...r})});GE.Item=FE,GE.SubMenu=UE,GE.Divider=PE,GE.ItemGroup=lE;var ite=e=>{let{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:i}=e,a=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},ate=e=>{let{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:a,antCls:o,iconCls:s,motionDurationMid:c,paddingBlock:l,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:m,colorBgElevated:h}=e;return[{[t]:{position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:`block`,"&::before":{position:`absolute`,insetBlock:e.calc(a).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:`""`},"&-menu-vertical":{maxHeight:`100vh`,overflowY:`auto`},[`&-trigger${o}-btn`]:{[`& > ${s}-down, & > ${o}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:`relative`,[`${o}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:`rotate(180deg)`}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:`none`},[`&${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottomLeft, + `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:`hidden`},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:Y(r),"+ span":{display:`inline-block`,width:0,opacity:0,overflow:`hidden`,marginInlineStart:0}}},[`${t}-item-icon, ${n}`]:{display:`inline-block`},"&-tooltip":{pointerEvents:`none`,[`${t}-item-icon, ${n}`]:{display:`none`},"a, a:hover":{color:i}},[`${t}-item-group-title`]:{...Hl,paddingInline:p}}}]},RE=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:a,iconCls:o,iconSize:s,iconMarginInlineEnd:c}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:`relative`,display:`block`,margin:0,whiteSpace:`nowrap`,cursor:`pointer`,transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(`,`),[`${t}-item-icon, ${o}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${a}`,`margin ${n} ${i}`,`color ${n}`].join(`,`),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(`,`)}},[`${t}-item-icon`]:{...Wl()},[`&${t}-item-only-child`]:{[`> ${o}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:`none !important`,cursor:`not-allowed`,"&::after":{borderColor:`transparent !important`},a:{color:`inherit !important`,cursor:`not-allowed`,pointerEvents:`none`},[`> ${t}-submenu-title`]:{color:`inherit !important`,cursor:`not-allowed`}}}},zE=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:a,menuArrowOffset:o}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:`absolute`,top:`50%`,insetInlineEnd:e.margin,width:a,color:`currentcolor`,transform:`translateY(-50%)`,transition:[`transform`,`opacity`].map(e=>`${e} ${n}`).join(`,`)},"&-arrow":{"&::before, &::after":{position:`absolute`,width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:`currentcolor`,borderRadius:i,transition:[`background-color`,`transform`,`top`,`color`].map(e=>`${e} ${n} ${r}`).join(`,`),content:`""`},"&::before":{transform:`rotate(45deg) translateY(${Y(e.calc(o).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${Y(o)})`}}}}},nte=e=>{let{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:a,motionEaseInOut:o,paddingXS:s,padding:c,colorSplit:l,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:m,menuArrowOffset:h,lineType:g,groupTitleLineHeight:_,groupTitleFontSize:v}=e;return[{"":{[n]:{...Gl(),"&-hidden":{display:`none`}}},[`${n}-submenu-hidden`]:{display:`none`}},{[n]:{...Ul(e),...Gl(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:`none`,outline:`none`,transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:`none`},"&-overflow":{display:`flex`,[`${n}-item`]:{flex:`none`}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${Y(s)} ${Y(c)}`,fontSize:v,lineHeight:_,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color`,`background-color`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i}`,`background-color ${i}`,`padding ${a}`].map(e=>`${e} ${o}`).join(`,`)},[`${n}-submenu ${n}-sub`]:{cursor:`initial`,transition:[`background-color`,`padding`].map(e=>`${e} ${i} ${o}`).join(`,`)},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},[`> ${t}-typography-ellipsis-single-line`]:{display:`inline`,verticalAlign:`unset`},[`${n}-item-extra`]:{marginInlineStart:`auto`,paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:`absolute`,inset:0,backgroundColor:`transparent`,content:`""`}},[`${n}-item-divider`]:{overflow:`hidden`,lineHeight:0,borderColor:l,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:`dashed`}},...RE(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${Y(e.calc(r).mul(2).equal())} ${Y(c)}`}}},"&-submenu":{"&-popup":{position:`absolute`,zIndex:d,borderRadius:f,boxShadow:`none`,transformOrigin:`0 0`,[`&${n}-submenu`]:{background:`transparent`},"&::before":{position:`absolute`,inset:0,zIndex:-1,width:`100%`,height:`100%`,opacity:0,content:`""`},[`> ${n}`]:{borderRadius:f,...RE(e),...zE(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${o}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:`100% 0`},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:`100% 100%`},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:`0 100%`},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:`0 0`},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...zE(e),[`&-inline-collapsed ${n}-submenu-arrow, + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Y(h)})`},"&::after":{transform:`rotate(45deg) translateX(${Y(e.calc(h).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${Y(e.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${Y(e.calc(h).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${Y(h)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:`inherit`}}}]},rte=e=>{let{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:i,colorText:a,colorTextDescription:o,colorBgContainer:s,colorFillAlter:c,colorFillContent:l,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:m,lineHeight:h,colorBgElevated:g,marginXXS:_,padding:v,fontSize:y,controlHeightSM:b,fontSizeLG:x,colorTextLightSolid:S,colorErrorHover:C}=e,w=e.activeBarWidth??0,T=e.activeBarBorderWidth??u,E=e.itemMarginInline??e.marginXXS,D=new Nc(S).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:a,itemColor:a,colorItemTextHover:a,itemHoverColor:a,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:o,groupTitleColor:o,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:l,itemActiveBg:f,colorSubItemBg:c,subMenuItemBg:c,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:`transparent`,horizontalItemSelectedBg:`transparent`,colorActiveBarWidth:0,activeBarWidth:w,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:T,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:E,horizontalItemBorderRadius:0,horizontalItemHoverBg:`transparent`,itemHeight:m,groupTitleLineHeight:h,collapsedWidth:m*2,popupBg:g,itemMarginBlock:_,itemPaddingInline:v,horizontalLineHeight:`${m*1.15}px`,iconSize:y,iconMarginInlineEnd:b-y,collapsedIconSize:x,groupTitleFontSize:y,darkItemDisabledColor:new Nc(S).setA(.25).toRgbString(),darkItemColor:D,darkDangerItemColor:n,darkItemBg:`#001529`,darkPopupBg:`#001529`,darkSubMenuItemBg:`#000c17`,darkItemSelectedColor:S,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:`transparent`,darkGroupTitleColor:D,darkItemHoverColor:S,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:n,itemWidth:w?`calc(100% + ${T}px)`:`calc(100% - ${E*2}px)`}},ite=(e,t=e,n=!0)=>Ql(`Menu`,e=>{let{colorBgElevated:t,controlHeightLG:n,fontSize:r,darkItemColor:i,darkDangerItemColor:a,darkItemBg:o,darkSubMenuItemBg:s,darkItemSelectedColor:c,darkItemSelectedBg:l,darkDangerItemSelectedBg:u,darkItemHoverBg:d,darkGroupTitleColor:f,darkItemHoverColor:p,darkItemDisabledColor:m,darkDangerItemHoverColor:h,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:_,popupBg:v,darkPopupBg:y}=e,b=e.calc(r).div(7).mul(5).equal(),x=dc(e,{menuArrowSize:b,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(b).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:v}),S=dc(x,{itemColor:i,itemHoverColor:p,groupTitleColor:f,itemSelectedColor:c,subMenuItemSelectedColor:c,itemBg:o,popupBg:y,subMenuItemBg:s,itemActiveBg:`transparent`,itemSelectedBg:l,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:m,dangerItemColor:a,dangerItemHoverColor:h,dangerItemSelectedColor:g,dangerItemActiveBg:_,dangerItemSelectedBg:u,menuSubMenuBg:s,horizontalItemSelectedColor:c,horizontalItemSelectedBg:l});return[nte(x),$ee(x),tte(x),IE(x,`light`),IE(S,`dark`),ete(x),Gh(x),mg(x,`slide-up`),mg(x,`slide-down`),kg(x,`zoom-big`)]},rte,{deprecatedTokens:[[`colorGroupTitle`,`groupTitleColor`],[`radiusItem`,`itemBorderRadius`],[`radiusSubMenuItem`,`subMenuItemBorderRadius`],[`colorItemText`,`itemColor`],[`colorItemTextHover`,`itemHoverColor`],[`colorItemTextHoverHorizontal`,`horizontalItemHoverColor`],[`colorItemTextSelected`,`itemSelectedColor`],[`colorItemTextSelectedHorizontal`,`horizontalItemSelectedColor`],[`colorItemTextDisabled`,`itemDisabledColor`],[`colorDangerItemText`,`dangerItemColor`],[`colorDangerItemTextHover`,`dangerItemHoverColor`],[`colorDangerItemTextSelected`,`dangerItemSelectedColor`],[`colorDangerItemBgActive`,`dangerItemActiveBg`],[`colorDangerItemBgSelected`,`dangerItemSelectedBg`],[`colorItemBg`,`itemBg`],[`colorItemBgHover`,`itemHoverBg`],[`colorSubItemBg`,`subMenuItemBg`],[`colorItemBgActive`,`itemActiveBg`],[`colorItemBgSelectedHorizontal`,`horizontalItemSelectedBg`],[`colorActiveBarWidth`,`activeBarWidth`],[`colorActiveBarHeight`,`activeBarHeight`],[`colorActiveBarBorderSize`,`activeBarBorderWidth`],[`colorItemBgSelected`,`itemSelectedBg`]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),BE=e=>{let{popupClassName:t,icon:n,title:r,theme:i}=e,a=S.useContext(AE),{prefixCls:o,inlineCollapsed:s,theme:c,classNames:l,styles:u}=a,d=lT(),f;if(!n)f=s&&!d.length&&r&&typeof r==`string`?S.createElement(`div`,{className:`${o}-inline-collapsed-noicon`},r.charAt(0)):S.createElement(`span`,{className:`${o}-title-content`},r);else{let e=S.isValidElement(r)&&r.type===`span`;f=S.createElement(S.Fragment,null,um(n,e=>({className:J(e.className,`${o}-item-icon`,l?.itemIcon),style:{...e.style,...u?.itemIcon}})),e?r:S.createElement(`span`,{className:`${o}-title-content`},r))}let p=S.useMemo(()=>({...a,firstLevel:!1}),[a]),[m]=Lf(`Menu`);return S.createElement(AE.Provider,{value:p},S.createElement(rE,{...gi(e,[`icon`]),title:f,classNames:{list:l?.subMenu?.list,listTitle:l?.subMenu?.itemTitle},styles:{list:u?.subMenu?.list,listTitle:u?.subMenu?.itemTitle},popupClassName:J(o,t,l?.popup?.root,`${o}-${i||c}`),popupStyle:{zIndex:m,...e.popupStyle,...u?.popup?.root}}))};function VE(e){return e===null||e===!1}var ate={item:ME,submenu:BE,divider:jE},ote=(0,S.forwardRef)((e,t)=>{let n=S.useContext(NE),r=n||{},{prefixCls:i,className:a,style:o,theme:s=`light`,expandIcon:c,_internalDisableMenuItemTitleTooltip:l,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:m,selectable:h,onClick:g,overflowedIndicatorPopupClassName:_,classNames:v,styles:y,...b}=e,{menu:x}=S.useContext(ga),{getPrefixCls:C,getPopupContainer:w,direction:T,className:E,style:D,classNames:O,styles:k}=ya(`menu`),A=C(),j=gi(b,[`collapsedWidth`]);r.validator?.({mode:m});let M=zn((...e)=>{g?.(...e),r.onClick?.()}),N=r.mode||m,P=h??r.selectable,F=d??f,I={...e,mode:N,inlineCollapsed:F,selectable:P,theme:s},[L,R]=Cf([O,v],[k,y],{props:I},{popup:{_default:`root`},subMenu:{_default:`item`}}),z={horizontal:{motionName:`${A}-slide-up`},inline:mh(A),other:{motionName:`${A}-zoom-big`}},B=C(`menu`,i||r.prefixCls),V=sp(B),[H,U]=ite(B,V,!n),ee=J(`${B}-${s}`,E,a),W=S.useMemo(()=>{if(typeof c==`function`||VE(c))return c||null;if(typeof r.expandIcon==`function`||VE(r.expandIcon))return r.expandIcon||null;if(typeof x?.expandIcon==`function`||VE(x?.expandIcon))return x?.expandIcon||null;let e=c??r?.expandIcon??x?.expandIcon;return um(e,{className:J(`${B}-submenu-expand-icon`,S.isValidElement(e)?e.props?.className:void 0)})},[c,r?.expandIcon,x?.expandIcon,B]),te=S.useMemo(()=>({prefixCls:B,inlineCollapsed:F||!1,direction:T,firstLevel:!0,theme:s,mode:N,disableMenuItemTitleTooltip:l,tooltip:u,classNames:L,styles:R}),[B,F,T,l,s,N,L,R,u]);return S.createElement(NE.Provider,{value:null},S.createElement(AE.Provider,{value:te},S.createElement(pE,{getPopupContainer:w,overflowedIndicator:S.createElement(kE,null),overflowedIndicatorPopupClassName:J(B,`${B}-${s}`,_),classNames:{list:L.list,listTitle:L.itemTitle},styles:{list:R.list,listTitle:R.itemTitle},mode:N,selectable:P,onClick:M,...j,inlineCollapsed:F,style:{...R.root,...D,...o},className:ee,prefixCls:B,direction:T,defaultMotions:z,expandIcon:W,ref:t,rootClassName:J(p,H,r.rootClassName,U,V,L.root),_internalComponents:ate})))}),HE=(0,S.forwardRef)((e,t)=>{let n=(0,S.useRef)(null),r=S.useContext(TE);return(0,S.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{n.current?.focus(e)}})),S.createElement(ote,{ref:n,...e,...r})});HE.Item=ME,HE.SubMenu=BE,HE.Divider=jE,HE.ItemGroup=sE;var ste=e=>{let{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:i}=e,a=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},cte=e=>{let{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:a,antCls:o,iconCls:s,motionDurationMid:c,paddingBlock:l,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:m,colorBgElevated:h}=e;return[{[t]:{position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:`block`,"&::before":{position:`absolute`,insetBlock:e.calc(a).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:`""`},"&-menu-vertical":{maxHeight:`100vh`,overflowY:`auto`},[`&-trigger${o}-btn`]:{[`& > ${s}-down, & > ${o}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:`relative`,[`${o}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:`rotate(180deg)`}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:`none`},[`&${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottomLeft, &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottomLeft, &${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottom, &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottom, &${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottomRight, - &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:og},[`&${o}-slide-up-enter${o}-slide-up-enter-active${t}-placement-topLeft, + &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:ag},[`&${o}-slide-up-enter${o}-slide-up-enter-active${t}-placement-topLeft, &${o}-slide-up-appear${o}-slide-up-appear-active${t}-placement-topLeft, &${o}-slide-up-enter${o}-slide-up-enter-active${t}-placement-top, &${o}-slide-up-appear${o}-slide-up-appear-active${t}-placement-top, &${o}-slide-up-enter${o}-slide-up-enter-active${t}-placement-topRight, - &${o}-slide-up-appear${o}-slide-up-appear-active${t}-placement-topRight`]:{animationName:cg},[`&${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomLeft, + &${o}-slide-up-appear${o}-slide-up-appear-active${t}-placement-topRight`]:{animationName:sg},[`&${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomLeft, &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottom, - &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:sg},[`&${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topLeft, + &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:og},[`&${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topLeft, &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-top, - &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topRight`]:{animationName:lg}}},pw(e,h,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:`relative`,margin:0},[`${n}-submenu-popup`]:{position:`absolute`,zIndex:r,background:`transparent`,boxShadow:`none`,transformOrigin:`0 0`,"ul, li":{listStyle:`none`,margin:0}},[`${t}, ${t}-menu-submenu`]:{...Ul(e),[n]:{padding:d,listStyleType:`none`,backgroundColor:h,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,...ql(e),"&:empty":{padding:0,boxShadow:`none`},[`${n}-item-group-title`]:{padding:`${Y(l)} ${Y(m)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:`relative`,display:`flex`,alignItems:`center`},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:`auto`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},"> a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${Y(l)} ${Y(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...ql(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${Y(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${Y(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[hg(e,`slide-up`),hg(e,`slide-down`),ag(e,`move-up`),ag(e,`move-down`),Ag(e,`zoom-big`)]]},ote=Ql(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=dc(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[ate(a),ite(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...dw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...lw(e)}),{resetStyle:!1}),KE=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=ya(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=Cf([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Gi(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=sp(z),[V,H]=ote(z,B),[,U]=Vl(),ee=S.Children.only(of(i)?S.createElement(`span`,null,i):i),W=um(ee,{className:J(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},ee.props.className),disabled:ee.props.disabled??o}),te=o?[]:a,G=!!te?.includes(`contextMenu`),[ne,K]=Gn(!1,p),re=zn(e=>{m?.(e,{source:`trigger`}),K(e)}),ie=J(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),ae=vw({arrowPointAtCenter:nf(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),q=zn(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),K(!1))}),oe=()=>{let e=gi(N,[`root`]),n=gi(P,[`root`]),r;return t?.items&&(r=S.createElement(GE,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(LE,{prefixCls:`${z}-menu`,rootClassName:J(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(Gw,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(Vg,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:q,validator:({mode:e})=>{}},r)},[se,ce]=Lf(`Dropdown`,F.zIndex),le=S.createElement(eT,{alignPoint:G,...gi(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:ne,builtinPlacements:ae,arrow:!!n,overlayClassName:ie,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:te,overlay:oe,placement:R,onVisibleChange:re,overlayStyle:{...F,zIndex:se},autoDestroy:w??C},W);return se&&(le=S.createElement(jf.Provider,{value:ce},le)),le},ste=ix(KE,`align`,void 0,`dropdown`,e=>e);KE._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(ste,{...e},S.createElement(`span`,null));var X=g_,qE=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),ute=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),dte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),fte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),pte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),JE=c(qE()),mte=c(cte()),hte=c(lte()),gte=c(ute()),_te=c(dte()),vte=c(fte()),yte=c(pte());JE.default.extend(yte.default),JE.default.extend(vte.default),JE.default.extend(mte.default),JE.default.extend(hte.default),JE.default.extend(gte.default),JE.default.extend(_te.default),JE.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var bte={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},YE=function(e){return bte[e]||e.split(`_`)[0]},XE=function(e){return!JE.default.isDayjs(e)||e instanceof JE.default?e:(0,JE.default)(e.valueOf())},xte={getNow:function(){var e=(0,JE.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,JE.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return XE(e).endOf(`month`)},getWeekDay:function(e){var t=XE(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return XE(e).year()},getMonth:function(e){return XE(e).month()},getDate:function(e){return XE(e).date()},getHour:function(e){return XE(e).hour()},getMinute:function(e){return XE(e).minute()},getSecond:function(e){return XE(e).second()},getMillisecond:function(e){return XE(e).millisecond()},addYear:function(e,t){return XE(e).add(t,`year`)},addMonth:function(e,t){return XE(e).add(t,`month`)},addDate:function(e,t){return XE(e).add(t,`day`)},setYear:function(e,t){return XE(e).year(t)},setMonth:function(e,t){return XE(e).month(t)},setDate:function(e,t){return XE(e).date(t)},setHour:function(e,t){return XE(e).hour(t)},setMinute:function(e,t){return XE(e).minute(t)},setSecond:function(e,t){return XE(e).second(t)},setMillisecond:function(e,t){return XE(e).millisecond(t)},isAfter:function(e,t){return XE(e).isAfter(XE(t))},isValidate:function(e){return XE(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,JE.default)().locale(YE(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return XE(t).locale(YE(e)).weekday(0)},getWeek:function(e,t){return XE(t).locale(YE(e)).week()},getShortWeekDays:function(e){return(0,JE.default)().locale(YE(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,JE.default)().locale(YE(e)).localeData().monthsShort()},format:function(e,t,n){return XE(t).locale(YE(e)).format(n)},parse:function(e,t,n){for(var r=YE(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=Pte(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return iD(n,t,e)})}]}function hD(e){"@babel/helpers - typeof";return hD=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},hD(e)}function gD(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 _D(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function WD(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function GD(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function KD(e,t,n,r,i){return zn(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!BD(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!BD(e,t,i,a,o.type))})}function qD(e){"@babel/helpers - typeof";return qD=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},qD(e)}function JD(e,t,n){return S.useMemo(function(){var r=rD(oD(e,t,n)),i=r[0],a=qD(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function YD(e,t,n){return typeof e[0]==`function`||n?!0:t}function XD(e){"@babel/helpers - typeof";return XD=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},XD(e)}function ZD(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 tne(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&rD(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function pO(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=fO(A),F=fO(j),I=fO(M),L=fO(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=oO(OD(e),4),U=H[0],ee=H[1],W=H[2],te=H[3],G=yD(r,ee),ne=S.useMemo(function(){return kD(R,W,te,U,G)},[R,W,te,U,G]),K=S.useMemo(function(){return nO(nO({},e),{},{previewValue:l,prefixCls:s,locale:G,picker:a,styles:d,classNames:p,order:h,components:nO({input:v},_),clearIcon:$te(s,y,b),showTime:ne,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),re=oO(JD(R,G,w),2),ie=re[0],ae=re[1],q=YD(ie,T,C),oe=KD(n,r,E,D,O),se=$D(n,a,oe,ne);return[S.useMemo(function(){return nO(nO({},K),{},{needConfirm:V,inputReadOnly:q,disabledDate:oe})},[K,V,q,oe]),R,B,ie,ae,se]}function mO(e,t){return yO(e)||vO(e,t)||gO(e,t)||hO()}function hO(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gO(e,t){if(e){if(typeof e==`string`)return _O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _O(e,t)}}function _O(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=xO(bO(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function OO(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function kO(e,t){return sne(e)||one(e,t)||ane(e,t)||ine()}function ine(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ane(e,t){if(e){if(typeof e==`string`)return AO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AO(e,t)}}function AO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Un(function(){if(e)r.current(e);else{var t=Oi(function(){r.current(e)},n);return function(){Oi.cancel(t)}}},[e])}function NO(e,t){return LO(e)||IO(e,t)||PO(e,t)||cne()}function cne(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PO(e,t){if(e){if(typeof e==`string`)return FO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FO(e,t)}}function FO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=NO(S.useState(0),2),i=r[0],a=r[1],o=NO(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return MO(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function zO(e){"@babel/helpers - typeof";return zO=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},zO(e)}function BO(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 VO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:ak,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:ak,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:ak,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=GD(e,r)),c[t]||n[t]||r},_=QO(l,2),v=_[0],y=_[1],b=QO(Gn(function(){return g(0)},v),2),x=b[0],C=b[1],w=QO(Gn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:GD(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!BD(e,t,x,s[0],o)||!BD(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!BD(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return ik(e,o,r,-1)}return r},A=S.useRef(null);return Hn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?ik(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?ik(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),Hn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function sk(e,t){return fk(e)||dk(e,t)||lk(e,t)||ck()}function ck(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lk(e,t){if(e){if(typeof e==`string`)return uk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uk(e,t)}}function uk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:nD(c,a),value:c,disabled:l})}return o}function Qk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||Xk,t.disabledMinutes||g||Xk,t.disabledSeconds||_||Xk,t.disabledMilliseconds||Xk]},[m,h,g,_]),b=Wk(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=Zk(0,23,o,p,e());return[i?a.map(function(e){return Bk(Bk({},e),{},{label:nD(e.value%12||12,2)})}):a,function(e){return Zk(0,59,c,p,t(e))},function(e,t){return Zk(0,59,u,p,n(e,t))},function(e,t,n){return Zk(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=Wk(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=Wk(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=Wk(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return Lk(t,r,i,a,o,e)},O,k,A,j]}function $k(e,t){return iA(e)||rA(e,t)||tA(e,t)||eA()}function eA(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tA(e,t){if(e){if(typeof e==`string`)return nA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nA(e,t)}}function nA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;fe(e),_?.(e),t&&pe(e)},he=function(e,t){K(e),t&&me(t),pe(t,e)},ge=function(e){if(le(e),me(e),ne!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(SM(n),[`week`]),date:[].concat(SM(n),[`date`])}[x]||n,i=r[r.indexOf(ne)+1];i&&he(i,e)}},_e=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=EM(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),ve=fD(E,D,O),ye=A[re]||MM[re]||IA,be=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),xe=S.useContext(_A),Se=S.useMemo(function(){return vM(vM({},xe),{},{hideHeader:j})},[xe,j]),Ce=`${I}-panel`,we=aD(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(pA.Provider,{value:be},S.createElement(_A.Provider,{value:Se},S.createElement(`div`,{ref:L,tabIndex:l,className:J(Ce,yM({},`${Ce}-rtl`,o===`rtl`))},S.createElement(ye,gM({},we,{showTime:W,prefixCls:I,locale:U,generateConfig:a,onModeChange:he,pickerValue:de,onPickerValueChange:function(e){me(e,!0)},value:se[0],onSelect:ge,values:se,cellRender:ve,hoverRangeValue:_e,hoverValue:w})))))}var PM=S.memo(S.forwardRef(NM));function FM(e){"@babel/helpers - typeof";return FM=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},FM(e)}function IM(){return IM=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function yN(e){var t=e.icon,n=e.type,r=_N(e,mN),i=S.useContext(ZE),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,gN({className:J(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function bN(e){var t=e.onClear,n=_N(e,hN);return S.createElement(yN,gN({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function xN(e){"@babel/helpers - typeof";return xN=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},xN(e)}function SN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function CN(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var KN=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=WN(e,NN),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext(ZE),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=RN(S.useState(!1),2),M=j[0],N=j[1],P=RN(S.useState(y),2),F=P[0],I=P[1],L=RN(S.useState(``),2),R=L[0],z=L[1],B=RN(S.useState(null),2),V=B[0],H=B[1],U=RN(S.useState(null),2),ee=U[0],W=U[1],te=F||``;S.useEffect(function(){I(y)},[y]);var G=S.useRef(null),ne=S.useRef(null),K=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:G.current,inputElement:ne.current,focus:function(e){ne.current.focus(e)},blur:function(){ne.current.blur()}}});var re=S.useMemo(function(){return new AN(s||``)},[s]),ie=RN(S.useMemo(function(){return u?[0,0]:re.getSelection(V)},[re,V,u]),2),ae=ie[0],q=ie[1],oe=function(e){e&&e!==s&&e!==y&&d()},se=zn(function(e){c(e)&&l(e),I(e),oe(e)}),ce=function(e){if(!s){var t=e.target.value;oe(t),I(t),l(t)}},le=function(e){if(K.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&se(t)},ue=function(){K.current=!0},de=function(e){var t=e.target.selectionStart;H(re.getMaskCellIndex(t)),W({}),C?.(e),K.current=!1},fe=function(e){N(!0),H(0),z(``),b(e)},pe=function(e){x(e)},me=function(e){N(!1),pe(e)};MO(r,function(){!r&&!h&&I(y)});var he=function(e){e.key===`Enter`&&c(te)&&f(),p?.(e)},ge=function(e){if(K.current){e.preventDefault();return}he(e);var t=e.key,n=null,r=null,i=q-ae,a=s.slice(ae,q),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,re.size()-1),n})},c=function(e){var t=RN(jN(a),3),n=t[0],r=t[1],i=t[2],o=te.slice(ae,q),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&se((te.slice(0,ae)+nD(r,i)+te.slice(q)).slice(0,s.length)),W({})},_e=S.useRef();Hn(function(){if(!(!M||!s||K.current)){if(!re.match(te)){se(s);return}return ne.current.setSelectionRange(ae,q),_e.current=Oi(function(){ne.current.setSelectionRange(ae,q)}),function(){Oi.cancel(_e.current)}}},[re,s,M,te,V,ae,q,ee,se]);var ve=s?{onFocus:fe,onBlur:me,onKeyDown:ge,onMouseDown:ue,onMouseUp:de,onPaste:le}:{};return S.createElement(`div`,{ref:G,className:J(A,FN(FN({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,PN({ref:ne,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:he,onBlur:pe},ve,{value:te,onChange:ce,className:O.input,style:k.input})),S.createElement(yN,{type:`suffix`,icon:o}),_)}),qN=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),JN=[`index`];function YN(){return YN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function uP(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=cP(e,qN),T=v===`rtl`,E=S.useContext(ZE),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(sP(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=cP(n,JN);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=pN(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=tP(dN(ZN(ZN({},e),{},{id:A,placeholder:I})),1)[0],R=tP(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=zn(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return ZN(ZN({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],ee=x&&!U&&!g[1];return S.createElement(oa,{onResize:V},S.createElement(`div`,YN({},F,{className:J(D,`${D}-range`,QN(QN(QN(QN({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:J(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(KN,YN({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(KN,YN({ref:N},L(1),{className:`${D}-input-end`,autoFocus:ee,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(yN,{type:`suffix`,icon:a}),H&&S.createElement(bN,{icon:i,onClear:m})))}var dP=S.forwardRef(uP);function fP(e){"@babel/helpers - typeof";return fP=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},fP(e)}function pP(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 mP(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&ie.current.focus({index:n})}ue(!0),re?.(e)},Qe=function(){Be(null),ue(!1,{force:!0})},$e=AP(S.useState(null),2),et=$e[0],tt=$e[1],nt=AP(S.useState(null),2),rt=nt[0],it=nt[1],at=S.useMemo(function(){return rt||_e},[_e,rt]);S.useEffect(function(){ce||it(null)},[ce]);var ot=AP(S.useState([0,0,0]),2),st=ot[0],ct=ot[1],lt=function(e,t){p===`hover`&&(it(e),tt(t))},ut=jO(ee,W),dt=function(e){lt(e,`preset`)},ft=function(e){Be(e)&&(xe(`preset-click`),ue(!1,{force:!0}))},pt=function(e){Xe(e)},mt=function(e){lt(e?Ye(e,Se):null,`cell`)},ht=function(e){ue(!0),Oe(e)},gt=function(){xe(`panel`)},_t=function(e){he(iD(_e,Se,e)),!g&&!a&&i===Fe&&Xe(e)},vt=function(){ue(!1)},yt=fD(G,ne,K,LP(Se)),bt=_e[Se]||null,xt=zn(function(e){return c(e,{activeIndex:Se})}),St=S.useMemo(function(){var e=xi(r,!1);return gi(r,[].concat(xP(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),Ct=S.createElement(iN,bP({},St,{showNow:Le,showTime:Ae,range:!0,multiplePanel:Ie,activeInfo:st,disabledDate:Ve,onFocus:ht,onBlur:ke,onPanelMouseDown:gt,picker:k,mode:Pe,internalMode:Fe,onPanelChange:Je,format:s,value:bt,isInvalid:xt,onChange:null,onSelect:_t,pickerValue:Ke,defaultOpenValue:rD(M?.defaultOpenValue)[Se],onPickerValueChange:qe,hoverValue:at,onHover:mt,needConfirm:g,onSubmit:Xe,onOk:ge,presets:ut,onPresetHover:dt,onPresetSubmit:ft,onNow:pt,cellRender:yt,classNames:q,styles:oe})),wt=function(e,t){he(Ye(e,t))},Tt=function(){xe(`input`)},Et=function(e,t){var n=Te.length,r=Te[n-1];if(n&&r!==t&&g&&!y[r]&&!De(r)&&_e[r]){ie.current.focus({index:r});return}xe(`input`),ue(!0,{inherit:!0}),Se!==t&&ce&&!g&&a&&Xe(null,!0),Ce(t),Oe(e,t)},Dt=function(e,t){ue(!1),!g&&xe()===`input`&&ze(Se,we(_e)===null),ke(e,t)},Ot=function(e,t){e.key===`Tab`&&Xe(null,!0),_?.(e,t)},kt=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:te.button,input:te.input,classNames:q,styles:oe}},[l,D,O,te.button,te.input,q,oe]);return Hn(function(){ce&&Se!==void 0&&Je(null,k,!1)},[ce,Se,k]),Hn(function(){var e=xe();!ce&&e===`input`&&(ue(!1),Xe(null,!0)),!ce&&a&&!g&&e===`panel`&&(ue(!0),Xe())},[ce]),S.createElement(ZE.Provider,{value:kt},S.createElement(eD,bP({},cD(r),{popupElement:Ct,popupStyle:oe.popup.root,popupClassName:J(u,q.popup.root),visible:ce,onClose:vt,range:!0}),S.createElement(dP,bP({},r,{ref:ie,className:J(r.className,u,q.root),style:EP(EP({},oe.root),r.style),suffixIcon:V,activeIndex:ye||ce?Se:null,activeHelp:!!rt,allHelp:!!rt&&et===`preset`,focused:ye,onFocus:Et,onBlur:Dt,onKeyDown:Ot,onSubmit:Xe,value:at,maskFormat:s,onChange:wt,onInputChange:Tt,format:o,inputReadOnly:B,disabled:v,open:ce,onOpenChange:ue,onClick:Ze,onClear:Qe,invalid:Ue,onInvalid:We,onActiveInfo:ct}))))}var zP=S.forwardRef(RP);function BP(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:J(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(Xx,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function VP(e){"@babel/helpers - typeof";return VP=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},VP(e)}var HP=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function UP(){return UP=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function rF(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=tF(e,HP),k=C===`rtl`,A=S.useContext(ZE),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=pN(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!BD(c,s,t,e,m)})),n||_()},z=YP(dN(GP(GP({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement(BP,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(yN,{type:`suffix`,icon:a}),H&&S.createElement(bN,{icon:i,onClear:p})):S.createElement(KN,UP({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(bN,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,UP({},I,{className:J(j,KP(KP(KP(KP(KP({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:J(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var iF=S.forwardRef(rF);function aF(e){"@babel/helpers - typeof";return aF=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},aF(e)}function oF(){return oF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=kF(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=AF(e,r);a&&(np(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():AF(e,r)?.focus?.()},getFieldInstance:e=>{let t=kF(e);return n.current[t]}},[e,t]);return[r]}var MF=S.createContext(void 0),NF=MF.Provider,PF=S.createContext(void 0),FF=PF.Provider;function IF(){return IF=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Gn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=J(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,IF({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function RF(e){let t=S.useRef(null),n=()=>{Oi.cancel(t.current),t.current=null};return[()=>{n(),t.current=Oi(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var zF=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Ul(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},BF=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Ul(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Ul(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${Y(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Kl(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},VF=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:Y(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${Y(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${Y(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:Y(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:Y(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Kl(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},HF=Ql(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${Y(n)} ${t}`,i=dc(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[zF(i),BF(i),VF(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),UF=S.forwardRef((e,t)=>{let n=S.useContext(MF),r=S.useContext(PF),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=ya(`radio`),u=cr(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(gy),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=sp(C),[D,O]=HF(C,E),k={...x},A=S.useContext(mm),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=Cf([c,y],[l,b],{props:M}),F=J(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=RF(k.onClick);return S.createElement(Th,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(LF,{...k,checked:j,className:J(N.icon,{[vh]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:J(`${T}-label`,N.label),style:P.label},g)))}),WF=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(ga),{name:i}=S.useContext(gy),a=Xn(kF(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Gn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=sp(N),[I,L]=HF(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||ef(e)?S.createElement(UF,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(UF,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=Eh(p),[,B]=Ef(D,O),V=J(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...xi(e,{aria:!0,data:!0}),role:k,className:J(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(NF,{value:H},R))}),GF=S.memo(WF),KF=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(ga),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(FF,{value:`button`},S.createElement(UF,{prefixCls:a,...i,type:`radio`,ref:t}))}),qF=UF;qF.Button=KF,qF.Group=GF,qF.__ANT_RADIO=!0;function JF(e){return dc(e,{inputAffixPadding:e.paddingXXS})}var YF=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},XF=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),ZF=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...XF(dc(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),QF=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),$F=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...QF(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),eI=(e,t)=>({"&-outlined":{...QF(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...ZF(e)},...$F(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...$F(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),tI=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),nI=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...tI(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...tI(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...ZF(e)}}}}),rI=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:`none`},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}},...t}}},iI=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),aI=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...iI(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),oI=(e,t)=>({"&-filled":{...iI(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...ZF(e)},...aI(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...aI(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),sI=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),cI=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...sI(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...sI(e,{status:`warning`,addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),lI=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Y(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),uI=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...lI(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),dI=(e,t)=>({"&-underlined":{...lI(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:`none`,cursor:`not-allowed`,"&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:`not-allowed`},...uI(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...uI(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),fI=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),pI=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${Y(t)} ${Y(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},mI=e=>({padding:`${Y(e.paddingBlockSM)} ${Y(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),hI=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${Y(e.paddingBlock)} ${Y(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...fI(e.colorTextPlaceholder),"&-lg":{...pI(e),...t.largeStyle},"&-sm":{...mI(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),gI=e=>{let{componentCls:t,antCls:n}=e;return{position:`relative`,display:`table`,width:`100%`,borderCollapse:`separate`,borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...pI(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...mI(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:`table-cell`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:`table-cell`,width:1,whiteSpace:`nowrap`,verticalAlign:`middle`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:`block !important`},"&-addon":{position:`relative`,padding:`0 ${Y(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${Y(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:`transparent`,[`${n}-cascader-input`]:{textAlign:`start`,border:0,boxShadow:`none`}}}},[t]:{width:`100%`,marginBottom:0,textAlign:`inherit`,"&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Gl(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:`inline-flex`,float:`none`,verticalAlign:`top`,borderRadius:0},[` + &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topRight`]:{animationName:cg}}},dw(e,h,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:`relative`,margin:0},[`${n}-submenu-popup`]:{position:`absolute`,zIndex:r,background:`transparent`,boxShadow:`none`,transformOrigin:`0 0`,"ul, li":{listStyle:`none`,margin:0}},[`${t}, ${t}-menu-submenu`]:{...Ul(e),[n]:{padding:d,listStyleType:`none`,backgroundColor:h,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,...ql(e),"&:empty":{padding:0,boxShadow:`none`},[`${n}-item-group-title`]:{padding:`${Y(l)} ${Y(m)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:`relative`,display:`flex`,alignItems:`center`},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:`auto`,"&-with-extra":{display:`inline-flex`,alignItems:`center`,width:`100%`},"> a":{color:`inherit`,transition:`all ${c}`,"&:hover":{color:`inherit`},"&::after":{position:`absolute`,inset:0,content:`""`}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:`auto`,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:`flex`,margin:0,padding:`${Y(l)} ${Y(m)}`,color:e.colorText,fontWeight:`normal`,fontSize:u,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...ql(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:`not-allowed`,"&:hover":{color:f,backgroundColor:h,cursor:`not-allowed`},a:{pointerEvents:`none`}},"&-divider":{height:1,margin:`${Y(e.marginXXS)} 0`,overflow:`hidden`,lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:`absolute`,insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:`0 !important`,color:e.colorIcon,fontSize:p,fontStyle:`normal`}}},[`${n}-item-group-list`]:{margin:`0 ${Y(e.marginXS)}`,padding:0,listStyle:`none`},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:`relative`},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:h,cursor:`not-allowed`}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[mg(e,`slide-up`),mg(e,`slide-down`),ig(e,`move-up`),ig(e,`move-down`),kg(e,`zoom-big`)]]},lte=Ql(`Dropdown`,e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,a=dc(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[cte(a),ste(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...lw({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...sw(e)}),{resetStyle:!1}),UE=e=>{let{menu:t,arrow:n,prefixCls:r,children:i,trigger:a,disabled:o,dropdownRender:s,popupRender:c,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,mouseEnterDelay:h=.15,mouseLeaveDelay:g=.1,autoAdjustOverflow:_=!0,placement:v=``,transitionName:y,classNames:b,styles:x,destroyPopupOnHide:C,destroyOnHidden:w}=e,{getPrefixCls:T,direction:E,getPopupContainer:D,className:O,style:k,classNames:A,styles:j}=ya(`dropdown`),M={...e,mouseEnterDelay:h,mouseLeaveDelay:g,autoAdjustOverflow:_},[N,P]=Cf([A,b],[j,x],{props:M}),F={...k,...f,...P.root},I=c||s;Gi(`Dropdown`);let L=S.useMemo(()=>{let e=T();return y===void 0?v.includes(`top`)?`${e}-slide-down`:`${e}-slide-up`:y},[T,v,y]),R=S.useMemo(()=>v?v.includes(`Center`)?v.slice(0,v.indexOf(`Center`)):v:E===`rtl`?`bottomRight`:`bottomLeft`,[v,E]),z=T(`dropdown`,r),B=sp(z),[V,H]=lte(z,B),[,U]=Vl(),ee=S.Children.only(of(i)?S.createElement(`span`,null,i):i),W=um(ee,{className:J(`${z}-trigger`,{[`${z}-rtl`]:E===`rtl`},ee.props.className),disabled:ee.props.disabled??o}),te=o?[]:a,G=!!te?.includes(`contextMenu`),[ne,K]=Gn(!1,p),re=zn(e=>{m?.(e,{source:`trigger`}),K(e)}),ie=J(u,d,V,H,B,O,N.root,{[`${z}-rtl`]:E===`rtl`}),ae=gw({arrowPointAtCenter:nf(n)&&n.pointAtCenter,autoAdjustOverflow:_,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),q=zn(()=>{t?.selectable&&t?.multiple||(m?.(!1,{source:`menu`}),K(!1))}),oe=()=>{let e=gi(N,[`root`]),n=gi(P,[`root`]),r;return t?.items&&(r=S.createElement(HE,{...t,classNames:{...e,subMenu:{...e}},styles:{...n,subMenu:{...n}}})),I&&(r=I(r)),r=S.Children.only(typeof r==`string`?S.createElement(`span`,null,r):r),S.createElement(PE,{prefixCls:`${z}-menu`,rootClassName:J(H,B),expandIcon:S.createElement(`span`,{className:`${z}-menu-submenu-arrow`},E===`rtl`?S.createElement(Uw,{className:`${z}-menu-submenu-arrow-icon`}):S.createElement(Bg,{className:`${z}-menu-submenu-arrow-icon`})),mode:`vertical`,selectable:!1,onClick:q,validator:({mode:e})=>{}},r)},[se,ce]=Lf(`Dropdown`,F.zIndex),le=S.createElement(Qw,{alignPoint:G,...gi(e,[`rootClassName`,`onOpenChange`]),mouseEnterDelay:h,mouseLeaveDelay:g,visible:ne,builtinPlacements:ae,arrow:!!n,overlayClassName:ie,prefixCls:z,getPopupContainer:l||D,transitionName:L,trigger:te,overlay:oe,placement:R,onVisibleChange:re,overlayStyle:{...F,zIndex:se},autoDestroy:w??C},W);return se&&(le=S.createElement(jf.Provider,{value:ce},le)),le},ute=nx(UE,`align`,void 0,`dropdown`,e=>e);UE._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(ute,{...e},S.createElement(`span`,null));var X=h_,WE=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),pte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),mte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),hte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),gte=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),GE=c(WE()),_te=c(dte()),vte=c(fte()),yte=c(pte()),bte=c(mte()),xte=c(hte()),Ste=c(gte());GE.default.extend(Ste.default),GE.default.extend(xte.default),GE.default.extend(_te.default),GE.default.extend(vte.default),GE.default.extend(yte.default),GE.default.extend(bte.default),GE.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var Cte={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},KE=function(e){return Cte[e]||e.split(`_`)[0]},qE=function(e){return!GE.default.isDayjs(e)||e instanceof GE.default?e:(0,GE.default)(e.valueOf())},wte={getNow:function(){var e=(0,GE.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,GE.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return qE(e).endOf(`month`)},getWeekDay:function(e){var t=qE(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return qE(e).year()},getMonth:function(e){return qE(e).month()},getDate:function(e){return qE(e).date()},getHour:function(e){return qE(e).hour()},getMinute:function(e){return qE(e).minute()},getSecond:function(e){return qE(e).second()},getMillisecond:function(e){return qE(e).millisecond()},addYear:function(e,t){return qE(e).add(t,`year`)},addMonth:function(e,t){return qE(e).add(t,`month`)},addDate:function(e,t){return qE(e).add(t,`day`)},setYear:function(e,t){return qE(e).year(t)},setMonth:function(e,t){return qE(e).month(t)},setDate:function(e,t){return qE(e).date(t)},setHour:function(e,t){return qE(e).hour(t)},setMinute:function(e,t){return qE(e).minute(t)},setSecond:function(e,t){return qE(e).second(t)},setMillisecond:function(e,t){return qE(e).millisecond(t)},isAfter:function(e,t){return qE(e).isAfter(qE(t))},isValidate:function(e){return qE(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,GE.default)().locale(KE(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return qE(t).locale(KE(e)).weekday(0)},getWeek:function(e,t){return qE(t).locale(KE(e)).week()},getShortWeekDays:function(e){return(0,GE.default)().locale(KE(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,GE.default)().locale(KE(e)).localeData().monthsShort()},format:function(e,t,n){return qE(t).locale(KE(e)).format(n)},parse:function(e,t,n){for(var r=KE(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=Lte(S.useState([!1,!1]),2),i=r[0],a=r[1];return[S.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return tD(n,t,e)})}]}function fD(e){"@babel/helpers - typeof";return fD=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},fD(e)}function pD(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 mD(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function VD(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function HD(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function UD(e,t,n,r,i){return zn(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!LD(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!LD(e,t,i,a,o.type))})}function WD(e){"@babel/helpers - typeof";return WD=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},WD(e)}function GD(e,t,n){return S.useMemo(function(){var r=eD(rD(e,t,n)),i=r[0],a=WD(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function KD(e,t,n){return typeof e[0]==`function`||n?!0:t}function qD(e){"@babel/helpers - typeof";return qD=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},qD(e)}function JD(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 ine(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return S.useMemo(function(){var n=e&&eD(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function fO(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,C=e.multiple,w=e.format,T=e.inputReadOnly,E=e.disabledDate,D=e.minDate,O=e.maxDate,k=e.showTime,A=e.value,j=e.defaultValue,M=e.pickerValue,N=e.defaultPickerValue,P=dO(A),F=dO(j),I=dO(M),L=dO(N),R=a===`date`&&k?`datetime`:a,z=R===`time`||R===`datetime`,B=z||C,V=x??z,H=aO(TD(e),4),U=H[0],ee=H[1],W=H[2],te=H[3],G=gD(r,ee),ne=S.useMemo(function(){return ED(R,W,te,U,G)},[R,W,te,U,G]),K=S.useMemo(function(){return tO(tO({},e),{},{previewValue:l,prefixCls:s,locale:G,picker:a,styles:d,classNames:p,order:h,components:tO({input:v},_),clearIcon:nne(s,y,b),showTime:ne,value:P,defaultValue:F,pickerValue:I,defaultPickerValue:L},t?.())},[e]),re=aO(GD(R,G,w),2),ie=re[0],ae=re[1],q=KD(ie,T,C),oe=UD(n,r,E,D,O),se=QD(n,a,oe,ne);return[S.useMemo(function(){return tO(tO({},K),{},{needConfirm:V,inputReadOnly:q,disabledDate:oe})},[K,V,q,oe]),R,B,ie,ae,se]}function pO(e,t){return vO(e)||_O(e,t)||hO(e,t)||mO()}function mO(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hO(e,t){if(e){if(typeof e==`string`)return gO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gO(e,t)}}function gO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=bO(yO(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function DO(e){var t=S.useRef();return S.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function ane(e,t){return lne(e)||cne(e,t)||sne(e,t)||one()}function one(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sne(e,t){if(e){if(typeof e==`string`)return OO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OO(e,t)}}function OO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=S.useRef(t);r.current=t,Un(function(){if(e)r.current(e);else{var t=Oi(function(){r.current(e)},n);return function(){Oi.cancel(t)}}},[e])}function jO(e,t){return IO(e)||FO(e,t)||NO(e,t)||MO()}function MO(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NO(e,t){if(e){if(typeof e==`string`)return PO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PO(e,t)}}function PO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=jO(S.useState(0),2),i=r[0],a=r[1],o=jO(S.useState(!1),2),s=o[0],c=o[1],l=S.useRef([]),u=S.useRef(null),d=S.useRef(null),f=function(e){u.current=e};return AO(s||n,function(){s||(l.current=[],f(null))}),S.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function RO(e){"@babel/helpers - typeof";return RO=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},RO(e)}function zO(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 BO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:ik,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:ik,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:ik,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=HD(e,r)),c[t]||n[t]||r},_=ZO(l,2),v=_[0],y=_[1],b=ZO(Gn(function(){return g(0)},v),2),x=b[0],C=b[1],w=ZO(Gn(function(){return g(1)},y),2),T=w[0],E=w[1],D=S.useMemo(function(){var t=[x,T][h];return m?t:HD(e,t,u[h])},[m,x,T,h,e,u]),O=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[C,E][h];a(n);var s=[x,T];s[h]=n,d&&(!LD(e,t,x,s[0],o)||!LD(e,t,T,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},k=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!LD(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return rk(e,o,r,-1)}return r},A=S.useRef(null);return Hn(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(A.current!==null&&A.current!==h?t=[x,T][h^1]:n[h]?t=h===0?n[0]:k(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?rk(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?rk(e,o,p,-1):p),O(t,`reset`)}}},[i,h,n[h]]),S.useEffect(function(){i?A.current=h:A.current=null},[i,h]),Hn(function(){i&&c&&c[h]&&O(c[h],`reset`)},[i,h]),[D,O]}function ok(e,t){return dk(e)||uk(e,t)||ck(e,t)||sk()}function sk(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ck(e,t){if(e){if(typeof e==`string`)return lk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lk(e,t)}}function lk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:$E(c,a),value:c,disabled:l})}return o}function Zk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=S.useMemo(function(){return n||e.getNow()},[n,e]),y=S.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||Yk,t.disabledMinutes||g||Yk,t.disabledSeconds||_||Yk,t.disabledMilliseconds||Yk]},[m,h,g,_]),b=Uk(S.useMemo(function(){return y(v)},[v,y]),4),x=b[0],C=b[1],w=b[2],T=b[3],E=S.useCallback(function(e,t,n,r){var a=Xk(0,23,o,p,e());return[i?a.map(function(e){return zk(zk({},e),{},{label:$E(e.value%12||12,2)})}):a,function(e){return Xk(0,59,c,p,t(e))},function(e,t){return Xk(0,59,u,p,n(e,t))},function(e,t,n){return Xk(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),D=Uk(S.useMemo(function(){return E(x,C,w,T)},[E,x,C,w,T]),4),O=D[0],k=D[1],A=D[2],j=D[3];return[function(t,n){var r=function(){return O},i=k,a=A,o=j;if(n){var s=Uk(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=Uk(E(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return Ik(t,r,i,a,o,e)},O,k,A,j]}function Qk(e,t){return rA(e)||nA(e,t)||eA(e,t)||$k()}function $k(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eA(e,t){if(e){if(typeof e==`string`)return tA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tA(e,t)}}function tA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;fe(e),_?.(e),t&&pe(e)},he=function(e,t){K(e),t&&me(t),pe(t,e)},ge=function(e){if(le(e),me(e),ne!==x){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(xM(n),[`week`]),date:[].concat(xM(n),[`date`])}[x]||n,i=r[r.indexOf(ne)+1];i&&he(i,e)}},_e=S.useMemo(function(){var e,t;if(Array.isArray(T)){var n=TM(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),ve=lD(E,D,O),ye=A[re]||jM[re]||PA,be=S.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),xe=S.useContext(gA),Se=S.useMemo(function(){return _M(_M({},xe),{},{hideHeader:j})},[xe,j]),Ce=`${I}-panel`,we=nD(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return S.createElement(fA.Provider,{value:be},S.createElement(gA.Provider,{value:Se},S.createElement(`div`,{ref:L,tabIndex:l,className:J(Ce,vM({},`${Ce}-rtl`,o===`rtl`))},S.createElement(ye,hM({},we,{showTime:W,prefixCls:I,locale:U,generateConfig:a,onModeChange:he,pickerValue:de,onPickerValueChange:function(e){me(e,!0)},value:se[0],onSelect:ge,values:se,cellRender:ve,hoverRangeValue:_e,hoverValue:w})))))}var NM=S.memo(S.forwardRef(MM));function PM(e){"@babel/helpers - typeof";return PM=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},PM(e)}function FM(){return FM=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _N(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function vN(e){var t=e.icon,n=e.type,r=gN(e,pN),i=S.useContext(JE),a=i.prefixCls,o=i.classNames,s=i.styles;return t?S.createElement(`span`,hN({className:J(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function yN(e){var t=e.onClear,n=gN(e,mN);return S.createElement(vN,hN({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function bN(e){"@babel/helpers - typeof";return bN=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},bN(e)}function xN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function SN(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var GN=S.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=UN(e,MN),y=e.value,b=e.onFocus,x=e.onBlur,C=e.onMouseUp,w=S.useContext(JE),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=LN(S.useState(!1),2),M=j[0],N=j[1],P=LN(S.useState(y),2),F=P[0],I=P[1],L=LN(S.useState(``),2),R=L[0],z=L[1],B=LN(S.useState(null),2),V=B[0],H=B[1],U=LN(S.useState(null),2),ee=U[0],W=U[1],te=F||``;S.useEffect(function(){I(y)},[y]);var G=S.useRef(null),ne=S.useRef(null),K=S.useRef(!1);S.useImperativeHandle(t,function(){return{nativeElement:G.current,inputElement:ne.current,focus:function(e){ne.current.focus(e)},blur:function(){ne.current.blur()}}});var re=S.useMemo(function(){return new kN(s||``)},[s]),ie=LN(S.useMemo(function(){return u?[0,0]:re.getSelection(V)},[re,V,u]),2),ae=ie[0],q=ie[1],oe=function(e){e&&e!==s&&e!==y&&d()},se=zn(function(e){c(e)&&l(e),I(e),oe(e)}),ce=function(e){if(!s){var t=e.target.value;oe(t),I(t),l(t)}},le=function(e){if(K.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&se(t)},ue=function(){K.current=!0},de=function(e){var t=e.target.selectionStart;H(re.getMaskCellIndex(t)),W({}),C?.(e),K.current=!1},fe=function(e){N(!0),H(0),z(``),b(e)},pe=function(e){x(e)},me=function(e){N(!1),pe(e)};AO(r,function(){!r&&!h&&I(y)});var he=function(e){e.key===`Enter`&&c(te)&&f(),p?.(e)},ge=function(e){if(K.current){e.preventDefault();return}he(e);var t=e.key,n=null,r=null,i=q-ae,a=s.slice(ae,q),o=function(e){H(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,re.size()-1),n})},c=function(e){var t=LN(AN(a),3),n=t[0],r=t[1],i=t[2],o=te.slice(ae,q),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&se((te.slice(0,ae)+$E(r,i)+te.slice(q)).slice(0,s.length)),W({})},_e=S.useRef();Hn(function(){if(!(!M||!s||K.current)){if(!re.match(te)){se(s);return}return ne.current.setSelectionRange(ae,q),_e.current=Oi(function(){ne.current.setSelectionRange(ae,q)}),function(){Oi.cancel(_e.current)}}},[re,s,M,te,V,ae,q,ee,se]);var ve=s?{onFocus:fe,onBlur:me,onKeyDown:ge,onMouseDown:ue,onMouseUp:de,onPaste:le}:{};return S.createElement(`div`,{ref:G,className:J(A,PN(PN({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},S.createElement(D,NN({ref:ne,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:he,onBlur:pe},ve,{value:te,onChange:ce,className:O.input,style:k.input})),S.createElement(vN,{type:`suffix`,icon:o}),_)}),KN=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),qN=[`index`];function JN(){return JN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function lP(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var b=e.onMouseDown;e.required,e[`aria-required`];var x=e.autoFocus,C=e.tabIndex,w=sP(e,KN),T=v===`rtl`,E=S.useContext(JE),D=E.prefixCls,O=E.classNames,k=E.styles,A=S.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=S.useRef(),M=S.useRef(),N=S.useRef(),P=function(e){return[M,N][e]?.current};S.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(oP(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=sP(n,qN);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=fN(w),I=S.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=eP(uN(XN(XN({},e),{},{id:A,placeholder:I})),1)[0],R=eP(S.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],V=zn(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return XN(XN({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});S.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),U=x&&!g[0],ee=x&&!U&&!g[1];return S.createElement(oa,{onResize:V},S.createElement(`div`,JN({},F,{className:J(D,`${D}-range`,ZN(ZN(ZN(ZN({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),b?.(e)}}),r&&S.createElement(`div`,{className:J(`${D}-prefix`,O.prefix),style:k.prefix},r),S.createElement(GN,JN({ref:M},L(0),{className:`${D}-input-start`,autoFocus:U,tabIndex:C,"date-range":`start`})),S.createElement(`div`,{className:`${D}-range-separator`},s),S.createElement(GN,JN({ref:N},L(1),{className:`${D}-input-end`,autoFocus:ee,tabIndex:C,"date-range":`end`})),S.createElement(`div`,{className:`${D}-active-bar`,style:z}),S.createElement(vN,{type:`suffix`,icon:a}),H&&S.createElement(yN,{icon:i,onClear:m})))}var uP=S.forwardRef(lP);function dP(e){"@babel/helpers - typeof";return dP=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},dP(e)}function fP(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 pP(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&ie.current.focus({index:n})}ue(!0),re?.(e)},Qe=function(){Be(null),ue(!1,{force:!0})},$e=kP(S.useState(null),2),et=$e[0],tt=$e[1],nt=kP(S.useState(null),2),rt=nt[0],it=nt[1],at=S.useMemo(function(){return rt||_e},[_e,rt]);S.useEffect(function(){ce||it(null)},[ce]);var ot=kP(S.useState([0,0,0]),2),st=ot[0],ct=ot[1],lt=function(e,t){p===`hover`&&(it(e),tt(t))},ut=kO(ee,W),dt=function(e){lt(e,`preset`)},ft=function(e){Be(e)&&(xe(`preset-click`),ue(!1,{force:!0}))},pt=function(e){Xe(e)},mt=function(e){lt(e?Ye(e,Se):null,`cell`)},ht=function(e){ue(!0),Oe(e)},gt=function(){xe(`panel`)},_t=function(e){he(tD(_e,Se,e)),!g&&!a&&i===Fe&&Xe(e)},vt=function(){ue(!1)},yt=lD(G,ne,K,IP(Se)),bt=_e[Se]||null,xt=zn(function(e){return c(e,{activeIndex:Se})}),St=S.useMemo(function(){var e=xi(r,!1);return gi(r,[].concat(bP(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),Ct=S.createElement(rN,yP({},St,{showNow:Le,showTime:Ae,range:!0,multiplePanel:Ie,activeInfo:st,disabledDate:Ve,onFocus:ht,onBlur:ke,onPanelMouseDown:gt,picker:k,mode:Pe,internalMode:Fe,onPanelChange:Je,format:s,value:bt,isInvalid:xt,onChange:null,onSelect:_t,pickerValue:Ke,defaultOpenValue:eD(M?.defaultOpenValue)[Se],onPickerValueChange:qe,hoverValue:at,onHover:mt,needConfirm:g,onSubmit:Xe,onOk:ge,presets:ut,onPresetHover:dt,onPresetSubmit:ft,onNow:pt,cellRender:yt,classNames:q,styles:oe})),wt=function(e,t){he(Ye(e,t))},Tt=function(){xe(`input`)},Et=function(e,t){var n=Te.length,r=Te[n-1];if(n&&r!==t&&g&&!y[r]&&!De(r)&&_e[r]){ie.current.focus({index:r});return}xe(`input`),ue(!0,{inherit:!0}),Se!==t&&ce&&!g&&a&&Xe(null,!0),Ce(t),Oe(e,t)},Dt=function(e,t){ue(!1),!g&&xe()===`input`&&ze(Se,we(_e)===null),ke(e,t)},Ot=function(e,t){e.key===`Tab`&&Xe(null,!0),_?.(e,t)},kt=S.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:te.button,input:te.input,classNames:q,styles:oe}},[l,D,O,te.button,te.input,q,oe]);return Hn(function(){ce&&Se!==void 0&&Je(null,k,!1)},[ce,Se,k]),Hn(function(){var e=xe();!ce&&e===`input`&&(ue(!1),Xe(null,!0)),!ce&&a&&!g&&e===`panel`&&(ue(!0),Xe())},[ce]),S.createElement(JE.Provider,{value:kt},S.createElement(ZE,yP({},aD(r),{popupElement:Ct,popupStyle:oe.popup.root,popupClassName:J(u,q.popup.root),visible:ce,onClose:vt,range:!0}),S.createElement(uP,yP({},r,{ref:ie,className:J(r.className,u,q.root),style:TP(TP({},oe.root),r.style),suffixIcon:V,activeIndex:ye||ce?Se:null,activeHelp:!!rt,allHelp:!!rt&&et===`preset`,focused:ye,onFocus:Et,onBlur:Dt,onKeyDown:Ot,onSubmit:Xe,value:at,maskFormat:s,onChange:wt,onInputChange:Tt,format:o,inputReadOnly:B,disabled:v,open:ce,onOpenChange:ue,onClick:Ze,onClear:Qe,invalid:Ue,onInvalid:We,onActiveInfo:ct}))))}var RP=S.forwardRef(LP);function zP(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.placeholder,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return S.createElement(`span`,{className:J(`${d}-item`),title:typeof e==`string`?e:null},S.createElement(`span`,{className:`${d}-item-content`},e),!s&&t&&S.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${d}-item-remove`},a))}function m(e){return p(o(e),function(t){t&&t.stopPropagation(),r(e)})}function h(e){return p(`+ ${e.length} ...`)}return S.createElement(`div`,{className:u},S.createElement(Jx,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&S.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function BP(e){"@babel/helpers - typeof";return BP=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},BP(e)}var VP=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function HP(){return HP=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function nF(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var b=e.disabled,x=e.invalid;e.inputReadOnly;var C=e.direction;e.onOpenChange;var w=e.onMouseDown;e.required,e[`aria-required`];var T=e.autoFocus,E=e.tabIndex,D=e.removeIcon,O=eF(e,VP),k=C===`rtl`,A=S.useContext(JE),j=A.prefixCls,M=A.classNames,N=A.styles,P=S.useRef(),F=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(e){var t;(t=F.current)==null||t.focus(e)},blur:function(){var e;(e=F.current)==null||e.blur()}}});var I=fN(O),L=function(e){g([e])},R=function(e){g(h.filter(function(t){return t&&!LD(c,s,t,e,m)})),n||_()},z=JP(uN(WP(WP({},e),{},{onChange:L}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),B=z[0],V=z[1],H=!!(i&&h.length&&!b),U=v?S.createElement(S.Fragment,null,S.createElement(zP,{prefixCls:j,value:h,onRemove:R,formatDate:V,maxTagCount:y,disabled:b,removeIcon:D,placeholder:l}),S.createElement(`input`,{className:`${j}-multiple-input`,value:h.map(V).join(`,`),ref:F,readOnly:!0,autoFocus:T,tabIndex:E}),S.createElement(vN,{type:`suffix`,icon:a}),H&&S.createElement(yN,{icon:i,onClear:p})):S.createElement(GN,HP({ref:F},B(),{autoFocus:T,tabIndex:E,suffixIcon:a,clearIcon:H&&S.createElement(yN,{icon:i,onClear:p}),showActiveCls:!1}));return S.createElement(`div`,HP({},I,{className:J(j,GP(GP(GP(GP(GP({},`${j}-multiple`,v),`${j}-focused`,o),`${j}-disabled`,b),`${j}-invalid`,x),`${j}-rtl`,k),u),style:d,ref:P,onClick:f,onMouseDown:function(e){e.target!==F.current?.inputElement&&e.preventDefault(),w?.(e)}}),r&&S.createElement(`div`,{className:J(`${j}-prefix`,M.prefix),style:N.prefix},r),U)}var rF=S.forwardRef(nF);function iF(e){"@babel/helpers - typeof";return iF=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},iF(e)}function aF(){return aF=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=OF(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...i}=t,a=kF(e,r);a&&(np(a,{scrollMode:`if-needed`,block:`nearest`,...i}),n&&r.focusField(e))},focusField:e=>{let t=r.getFieldInstance(e);typeof t?.focus==`function`?t.focus():kF(e,r)?.focus?.()},getFieldInstance:e=>{let t=OF(e);return n.current[t]}},[e,t]);return[r]}var jF=S.createContext(void 0),MF=jF.Provider,NF=S.createContext(void 0),PF=NF.Provider;function FF(){return FF=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n=`rc-checkbox`,className:r,style:i,checked:a,disabled:o,defaultChecked:s=!1,type:c=`checkbox`,title:l,onChange:u,...d}=e,f=(0,S.useRef)(null),p=(0,S.useRef)(null),[m,h]=Gn(s,a);(0,S.useImperativeHandle)(t,()=>({focus:e=>{f.current?.focus(e)},blur:()=>{f.current?.blur()},input:f.current,nativeElement:p.current}));let g=J(n,r,{[`${n}-checked`]:m,[`${n}-disabled`]:o});return S.createElement(`span`,{className:g,title:l,style:i,ref:p},S.createElement(`input`,FF({},d,{className:`${n}-input`,ref:f,onChange:t=>{o||(`checked`in e||h(t.target.checked),u?.({target:{...e,type:c,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:o,checked:!!m,type:c})))});function LF(e){let t=S.useRef(null),n=()=>{Oi.cancel(t.current),t.current=null};return[()=>{n(),t.current=Oi(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}var RF=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...Ul(e),display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`},"&-vertical":{display:`flex`,flexDirection:`column`,rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},zF=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:i,radioSize:a,motionDurationSlow:o,motionDurationMid:s,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:m,dotColorDisabled:h,dotSize:g,lineType:_,radioColor:v,radioBgColor:y}=e;return{[`${t}-wrapper`]:{...Ul(e),display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[t]:{...Ul(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:`calc(${a} * 1px)`,height:`calc(${a} * 1px)`,backgroundColor:l,border:`${Y(d)} ${_} ${u}`,borderRadius:`50%`,transition:`all ${s}`,flex:`none`,"&:after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(0)`,width:`calc(${g} * 1px)`,height:`calc(${g} * 1px)`,backgroundColor:v,borderRadius:`50%`,transformOrigin:`50% 50%`,opacity:0,transition:`all ${o} ${c}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Kl(e)},[`&:hover:not(${t}-wrapper-disabled) ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:`transparent`},[`${t}-checked`]:{backgroundColor:y,borderColor:r,"&::after":{transform:`translate(-50%, -50%)`,opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:f,borderColor:u,"&::after":{backgroundColor:h}},[`${t}-disabled + span`]:{color:p,cursor:`not-allowed`},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},BF=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:Y(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${Y(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color`,`background-color`,`box-shadow`].map(e=>`${e} ${s}`).join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${Y(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:Y(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:Y(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":Kl(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},VF=Ql(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${Y(n)} ${t}`,i=dc(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[RF(i),zF(i),BF(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),HF=S.forwardRef((e,t)=>{let n=S.useContext(jF),r=S.useContext(NF),{getPrefixCls:i,direction:a,className:o,style:s,classNames:c,styles:l}=ya(`radio`),u=cr(t,S.useRef(null)),{isFormItemInput:d}=S.useContext(my),f=t=>{e.onChange?.(t),n?.onChange?.(t)},{prefixCls:p,className:m,rootClassName:h,children:g,style:_,title:v,classNames:y,styles:b,...x}=e,C=i(`radio`,p),w=(n?.optionType||r)===`button`,T=w?`${C}-button`:C,E=sp(C),[D,O]=VF(C,E),k={...x},A=S.useContext(mm),j=k.checked;n&&(k.name=n.name,k.onChange=f,j=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??A;let M={...e,...k,checked:j},[N,P]=Cf([c,y],[l,b],{props:M}),F=J(`${T}-wrapper`,{[`${T}-wrapper-checked`]:j,[`${T}-wrapper-disabled`]:k.disabled,[`${T}-wrapper-rtl`]:a===`rtl`,[`${T}-wrapper-in-form-item`]:d,[`${T}-wrapper-block`]:!!n?.block},o,m,h,N.root,D,O,E),[I,L]=LF(k.onClick);return S.createElement(wh,{component:`Radio`,disabled:k.disabled},S.createElement(`label`,{className:F,style:{...P.root,...s,..._},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:v,onClick:I},S.createElement(IF,{...k,checked:j,className:J(N.icon,{[_h]:!w}),style:P.icon,type:`radio`,prefixCls:T,ref:u,onClick:L}),g===void 0?null:S.createElement(`span`,{className:J(`${T}-label`,N.label),style:P.label},g)))}),UF=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(ga),{name:i}=S.useContext(my),a=Xn(OF(i)),{prefixCls:o,className:s,rootClassName:c,options:l,buttonStyle:u=`outline`,disabled:d,children:f,size:p,style:m,id:h,optionType:g,name:_=a,defaultValue:v,value:y,block:b=!1,onChange:x,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,orientation:D,vertical:O,role:k=`radiogroup`}=e,[A,j]=Gn(v,y),M=S.useCallback(t=>{let n=A,r=t.target.value;`value`in e||j(r),r!==n&&x?.(t)},[A,j,x]),N=n(`radio`,o),P=`${N}-group`,F=sp(N),[I,L]=VF(N,F),R=f;l&&l.length>0&&(R=l.map(e=>typeof e==`string`||ef(e)?S.createElement(HF,{key:e.toString(),prefixCls:N,disabled:d,value:e,checked:A===e},e):S.createElement(HF,{key:`radio-group-value-options-${e.value}`,prefixCls:N,disabled:e.disabled||d,value:e.value,checked:A===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let z=Th(p),[,B]=Ef(D,O),V=J(P,`${P}-${u}`,{[`${P}-large`]:z===`large`,[`${P}-small`]:z===`small`,[`${P}-rtl`]:r===`rtl`,[`${P}-block`]:b},s,c,I,L,F),H=S.useMemo(()=>({onChange:M,value:A,disabled:d,name:_,optionType:g,block:b}),[M,A,d,_,g,b]);return S.createElement(`div`,{...xi(e,{aria:!0,data:!0}),role:k,className:J(V,{[`${N}-group-vertical`]:B}),style:m,onMouseEnter:C,onMouseLeave:w,onFocus:T,onBlur:E,id:h,ref:t},S.createElement(MF,{value:H},R))}),WF=S.memo(UF),GF=S.forwardRef((e,t)=>{let{getPrefixCls:n}=S.useContext(ga),{prefixCls:r,...i}=e,a=n(`radio`,r);return S.createElement(PF,{value:`button`},S.createElement(HF,{prefixCls:a,...i,type:`radio`,ref:t}))}),KF=HF;KF.Button=GF,KF.Group=WF,KF.__ANT_RADIO=!0;function qF(e){return dc(e,{inputAffixPadding:e.paddingXXS})}var JF=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},YF=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),XF=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...YF(dc(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),ZF=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),QF=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...ZF(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),$F=(e,t)=>({"&-outlined":{...ZF(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...XF(e)},...QF(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...QF(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),eI=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),tI=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...eI(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...eI(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...XF(e)}}}}),nI=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:`none`},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}},...t}}},rI=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),iI=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...rI(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),aI=(e,t)=>({"&-filled":{...rI(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...XF(e)},...iI(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...iI(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),oI=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),sI=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...oI(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...oI(e,{status:`warning`,addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),cI=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Y(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),lI=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...cI(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),uI=(e,t)=>({"&-underlined":{...cI(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:`none`,cursor:`not-allowed`,"&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:`not-allowed`},...lI(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...lI(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),dI=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),fI=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${Y(t)} ${Y(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},pI=e=>({padding:`${Y(e.paddingBlockSM)} ${Y(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),mI=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${Y(e.paddingBlock)} ${Y(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...dI(e.colorTextPlaceholder),"&-lg":{...fI(e),...t.largeStyle},"&-sm":{...pI(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),hI=e=>{let{componentCls:t,antCls:n}=e;return{position:`relative`,display:`table`,width:`100%`,borderCollapse:`separate`,borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...fI(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...pI(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:`table-cell`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:`table-cell`,width:1,whiteSpace:`nowrap`,verticalAlign:`middle`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:`block !important`},"&-addon":{position:`relative`,padding:`0 ${Y(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${Y(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:`transparent`,[`${n}-cascader-input`]:{textAlign:`start`,border:0,boxShadow:`none`}}}},[t]:{width:`100%`,marginBottom:0,textAlign:`inherit`,"&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...Gl(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:`inline-flex`,float:`none`,verticalAlign:`top`,borderRadius:0},[` & > ${t}-affix-wrapper, & > ${t}-number-affix-wrapper, & > ${n}-picker-range @@ -259,52 +259,52 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, & > ${n}-select:last-child, & > ${n}-cascader-picker:last-child ${t}, - & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},_I=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Ul(e),...hI(e),...eI(e),...oI(e),...rI(e),...dI(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}}}},vI=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...Kl(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${Y(e.inputAffixPadding)}`}}}},yI=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:{...hI(e),display:`inline-flex`,"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}},...vI(e),[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},bI=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Ul(e),...gI(e),"&-rtl":{direction:`rtl`},"&-wrapper":{display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...nI(e),...cI(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},xI=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},SI=Ql([`Input`,`Shared`],e=>{let t=dc(e,JF(e));return[_I(t),yI(t)]},YF,{resetFont:!1}),CI=Ql([`Input`,`Component`],e=>{let t=dc(e,JF(e));return[bI(t),xI(t),h_(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},YF,{resetFont:!1}),wI=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:Y(t),itemLineHeight:Y(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},TI=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:[`font-size`,`line-height`,`height`].map(e=>`${e} ${i}`).join(`, `),marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...Wl(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}}}}},EI=(e,t)=>{let{componentCls:n,controlHeight:r}=e,i=t?`${n}-${t}`:``,a=wI(e);return[{[`${n}-multiple${i}`]:{paddingBlock:a.containerPadding,paddingInlineStart:a.basePadding,minHeight:r,[`${n}-selection-item`]:{height:a.itemHeight,lineHeight:Y(a.itemLineHeight)}}}]},DI=e=>{let{componentCls:t,calc:n,lineWidth:r}=e,i=dc(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),a=dc(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[EI(i,`small`),EI(e),EI(a,`large`),{[`${t}${t}-multiple`]:{width:`100%`,cursor:`text`,[`${t}-selector`]:{flex:`auto`,padding:0,position:`relative`,"&:after":{margin:0},[`${t}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,flex:1,color:e.colorTextPlaceholder,pointerEvents:`none`}},...TI(e),[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:`hidden`,position:`absolute`,zIndex:-1}}}]},OI=e=>{let{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:i,motionDurationMid:a,cellHoverBg:o,lineWidth:s,lineType:c,colorPrimary:l,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:m}=e;return{"&::before":{position:`absolute`,top:`50%`,insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:`translateY(-50%)`,content:`""`,pointerEvents:`none`},[n]:{position:`relative`,zIndex:2,display:`inline-block`,minWidth:r,height:r,lineHeight:Y(r),borderRadius:i,transition:`background-color ${a}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), + & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},gI=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Ul(e),...mI(e),...$F(e),...aI(e),...nI(e),...uI(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}}}},_I=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...Kl(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${Y(e.inputAffixPadding)}`}}}},vI=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:{...mI(e),display:`inline-flex`,"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}},..._I(e),[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},yI=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Ul(e),...hI(e),"&-rtl":{direction:`rtl`},"&-wrapper":{display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...tI(e),...sI(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},bI=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},xI=Ql([`Input`,`Shared`],e=>{let t=dc(e,qF(e));return[gI(t),vI(t)]},JF,{resetFont:!1}),SI=Ql([`Input`,`Component`],e=>{let t=dc(e,qF(e));return[yI(t),bI(t),m_(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},JF,{resetFont:!1}),CI=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:Y(t),itemLineHeight:Y(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},wI=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:[`font-size`,`line-height`,`height`].map(e=>`${e} ${i}`).join(`, `),marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...Wl(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}}}}},TI=(e,t)=>{let{componentCls:n,controlHeight:r}=e,i=t?`${n}-${t}`:``,a=CI(e);return[{[`${n}-multiple${i}`]:{paddingBlock:a.containerPadding,paddingInlineStart:a.basePadding,minHeight:r,[`${n}-selection-item`]:{height:a.itemHeight,lineHeight:Y(a.itemLineHeight)}}}]},EI=e=>{let{componentCls:t,calc:n,lineWidth:r}=e,i=dc(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),a=dc(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[TI(i,`small`),TI(e),TI(a,`large`),{[`${t}${t}-multiple`]:{width:`100%`,cursor:`text`,[`${t}-selector`]:{flex:`auto`,padding:0,position:`relative`,"&:after":{margin:0},[`${t}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,flex:1,color:e.colorTextPlaceholder,pointerEvents:`none`}},...wI(e),[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:`hidden`,position:`absolute`,zIndex:-1}}}]},DI=e=>{let{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:i,motionDurationMid:a,cellHoverBg:o,lineWidth:s,lineType:c,colorPrimary:l,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:m}=e;return{"&::before":{position:`absolute`,top:`50%`,insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:`translateY(-50%)`,content:`""`,pointerEvents:`none`},[n]:{position:`relative`,zIndex:2,display:`inline-block`,minWidth:r,height:r,lineHeight:Y(r),borderRadius:i,transition:`background-color ${a}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), &:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:o}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${Y(s)} ${c} ${l}`,borderRadius:i,content:`""`}},[`&-in-view${t}-in-range, &-in-view${t}-range-start, &-in-view${t}-range-end`]:{position:`relative`,[`&:not(${t}-disabled):before`]:{background:u}},[`&-in-view${t}-selected, &-in-view${t}-range-start, - &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:l},[`&${t}-disabled ${n}`]:{background:m}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:`50%`},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:`50%`},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:i,borderEndStartRadius:i,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i},"&-disabled":{color:f,cursor:`not-allowed`,[n]:{background:`transparent`},"&::before":{background:p}},[`&-disabled${t}-today ${n}::before`]:{borderColor:f}}},kI=e=>{let{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:i,pickerControlIconSize:a,cellWidth:o,paddingSM:s,paddingXS:c,paddingXXS:l,colorBgContainer:u,lineWidth:d,lineType:f,borderRadiusLG:p,colorPrimary:m,colorTextHeading:h,colorSplit:g,pickerControlIconBorderWidth:_,colorIcon:v,textHeight:y,motionDurationMid:b,colorIconHover:x,fontWeightStrong:S,cellHeight:C,pickerCellPaddingVertical:w,colorTextDisabled:T,colorText:E,fontSize:D,motionDurationSlow:O,withoutTimeCellHeight:k,pickerQuarterPanelContentHeight:A,borderRadiusSM:j,colorTextLightSolid:M,cellHoverBg:N,timeColumnHeight:P,timeColumnWidth:F,timeCellHeight:I,controlItemBgActive:L,marginXXS:R,pickerDatePanelPaddingHorizontal:z,pickerControlIconMargin:B}=e,V=e.calc(o).mul(7).add(e.calc(z).mul(2)).equal();return{[t]:{"&-panel":{display:`inline-flex`,flexDirection:`column`,textAlign:`center`,background:u,borderRadius:p,outline:`none`,"&-focused":{borderColor:m},"&-rtl":{[`${t}-prev-icon, + &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:l},[`&${t}-disabled ${n}`]:{background:m}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:`50%`},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:`50%`},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:i,borderEndStartRadius:i,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i},"&-disabled":{color:f,cursor:`not-allowed`,[n]:{background:`transparent`},"&::before":{background:p}},[`&-disabled${t}-today ${n}::before`]:{borderColor:f}}},OI=e=>{let{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:i,pickerControlIconSize:a,cellWidth:o,paddingSM:s,paddingXS:c,paddingXXS:l,colorBgContainer:u,lineWidth:d,lineType:f,borderRadiusLG:p,colorPrimary:m,colorTextHeading:h,colorSplit:g,pickerControlIconBorderWidth:_,colorIcon:v,textHeight:y,motionDurationMid:b,colorIconHover:x,fontWeightStrong:S,cellHeight:C,pickerCellPaddingVertical:w,colorTextDisabled:T,colorText:E,fontSize:D,motionDurationSlow:O,withoutTimeCellHeight:k,pickerQuarterPanelContentHeight:A,borderRadiusSM:j,colorTextLightSolid:M,cellHoverBg:N,timeColumnHeight:P,timeColumnWidth:F,timeCellHeight:I,controlItemBgActive:L,marginXXS:R,pickerDatePanelPaddingHorizontal:z,pickerControlIconMargin:B}=e,V=e.calc(o).mul(7).add(e.calc(z).mul(2)).equal();return{[t]:{"&-panel":{display:`inline-flex`,flexDirection:`column`,textAlign:`center`,background:u,borderRadius:p,outline:`none`,"&-focused":{borderColor:m},"&-rtl":{[`${t}-prev-icon, ${t}-super-prev-icon`]:{transform:`rotate(45deg)`},[`${t}-next-icon, - ${t}-super-next-icon`]:{transform:`rotate(-135deg)`},[`${t}-time-panel`]:{[`${t}-content`]:{direction:`ltr`,"> *":{direction:`rtl`}}}}},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel":{display:`flex`,flexDirection:`column`,width:V},"&-header":{display:`flex`,padding:`0 ${Y(c)}`,color:h,borderBottom:`${Y(d)} ${f} ${g}`,"> *":{flex:`none`},button:{padding:0,color:v,lineHeight:Y(y),background:`transparent`,border:0,cursor:`pointer`,transition:`color ${b}`,fontSize:`inherit`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"&:empty":{display:`none`}},"> button":{minWidth:`1.6em`,fontSize:D,"&:hover":{color:x},"&:disabled":{opacity:.25,pointerEvents:`none`}},"&-view":{flex:`auto`,fontWeight:S,lineHeight:Y(y),"> button":{color:`inherit`,fontWeight:`inherit`,verticalAlign:`top`,"&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:m}}}},"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon":{position:`relative`,width:a,height:a,"&::before":{position:`absolute`,top:0,insetInlineStart:0,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-super-prev-icon, &-super-next-icon":{"&::after":{position:`absolute`,top:B,insetInlineStart:B,display:`inline-block`,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-prev-icon, &-super-prev-icon":{transform:`rotate(-45deg)`},"&-next-icon, &-super-next-icon":{transform:`rotate(135deg)`},"&-content":{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`,"th, td":{position:`relative`,minWidth:C,fontWeight:`normal`},th:{height:e.calc(C).add(e.calc(w).mul(2)).equal(),color:E,verticalAlign:`middle`}},"&-cell":{padding:`${Y(w)} 0`,color:T,cursor:`pointer`,"&-in-view":{color:E},...OI(e)},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel":{[`${t}-content`]:{height:e.calc(k).mul(4).equal()},[r]:{padding:`0 ${Y(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:A}},"&-decade-panel":{[r]:{padding:`0 ${Y(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:`none`}},"&-year-panel, &-quarter-panel, &-month-panel":{[`${t}-body`]:{padding:`0 ${Y(c)}`},[r]:{width:i}},"&-date-panel":{[`${t}-body`]:{padding:`${Y(c)} ${Y(z)}`},[`${t}-content th`]:{boxSizing:`border-box`,padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background-color ${b}`},"&:first-child:before":{borderStartStartRadius:j,borderEndStartRadius:j},"&:last-child:before":{borderStartEndRadius:j,borderEndEndRadius:j}},"&:hover td:before":{background:N},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${t}-cell-week`]:{color:new Nc(M).setA(.5).toHexString()},[r]:{color:M}}},"&-range-hover td:before":{background:L}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${Y(c)} ${Y(s)}`},[`${t}-content th`]:{width:`auto`}},"&-datetime-panel":{display:`flex`,[`${t}-time-panel`]:{borderInlineStart:`${Y(d)} ${f} ${g}`},[`${t}-date-panel, + ${t}-super-next-icon`]:{transform:`rotate(-135deg)`},[`${t}-time-panel`]:{[`${t}-content`]:{direction:`ltr`,"> *":{direction:`rtl`}}}}},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel":{display:`flex`,flexDirection:`column`,width:V},"&-header":{display:`flex`,padding:`0 ${Y(c)}`,color:h,borderBottom:`${Y(d)} ${f} ${g}`,"> *":{flex:`none`},button:{padding:0,color:v,lineHeight:Y(y),background:`transparent`,border:0,cursor:`pointer`,transition:`color ${b}`,fontSize:`inherit`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"&:empty":{display:`none`}},"> button":{minWidth:`1.6em`,fontSize:D,"&:hover":{color:x},"&:disabled":{opacity:.25,pointerEvents:`none`}},"&-view":{flex:`auto`,fontWeight:S,lineHeight:Y(y),"> button":{color:`inherit`,fontWeight:`inherit`,verticalAlign:`top`,"&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:m}}}},"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon":{position:`relative`,width:a,height:a,"&::before":{position:`absolute`,top:0,insetInlineStart:0,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-super-prev-icon, &-super-next-icon":{"&::after":{position:`absolute`,top:B,insetInlineStart:B,display:`inline-block`,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-prev-icon, &-super-prev-icon":{transform:`rotate(-45deg)`},"&-next-icon, &-super-next-icon":{transform:`rotate(135deg)`},"&-content":{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`,"th, td":{position:`relative`,minWidth:C,fontWeight:`normal`},th:{height:e.calc(C).add(e.calc(w).mul(2)).equal(),color:E,verticalAlign:`middle`}},"&-cell":{padding:`${Y(w)} 0`,color:T,cursor:`pointer`,"&-in-view":{color:E},...DI(e)},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel":{[`${t}-content`]:{height:e.calc(k).mul(4).equal()},[r]:{padding:`0 ${Y(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:A}},"&-decade-panel":{[r]:{padding:`0 ${Y(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:`none`}},"&-year-panel, &-quarter-panel, &-month-panel":{[`${t}-body`]:{padding:`0 ${Y(c)}`},[r]:{width:i}},"&-date-panel":{[`${t}-body`]:{padding:`${Y(c)} ${Y(z)}`},[`${t}-content th`]:{boxSizing:`border-box`,padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background-color ${b}`},"&:first-child:before":{borderStartStartRadius:j,borderEndStartRadius:j},"&:last-child:before":{borderStartEndRadius:j,borderEndEndRadius:j}},"&:hover td:before":{background:N},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${t}-cell-week`]:{color:new Nc(M).setA(.5).toHexString()},[r]:{color:M}}},"&-range-hover td:before":{background:L}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${Y(c)} ${Y(s)}`},[`${t}-content th`]:{width:`auto`}},"&-datetime-panel":{display:`flex`,[`${t}-time-panel`]:{borderInlineStart:`${Y(d)} ${f} ${g}`},[`${t}-date-panel, ${t}-time-panel`]:{transition:`opacity ${O}`},"&-active":{[`${t}-date-panel, - ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:`auto`,minWidth:`auto`,[`${t}-content`]:{display:`flex`,flex:`auto`,height:P},"&-column":{flex:`1 0 auto`,width:F,margin:`${Y(l)} 0`,padding:0,overflowY:`auto`,textAlign:`start`,listStyle:`none`,transition:`background-color ${b}`,overflowX:`hidden`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:`block`,height:`calc(100% - ${Y(I)})`,content:`""`},"&:not(:first-child)":{borderInlineStart:`${Y(d)} ${f} ${g}`},"&-active":{background:new Nc(L).setA(.2).toHexString()},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:R,[`${t}-time-panel-cell-inner`]:{display:`block`,width:e.calc(F).sub(e.calc(R).mul(2)).equal(),height:I,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(F).sub(I).div(2).equal(),color:E,lineHeight:Y(I),borderRadius:j,cursor:`pointer`,transition:`background-color ${b}`,"&:hover":{background:N}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:L}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:T,background:`transparent`,cursor:`not-allowed`}}}}}}}}},AI=e=>{let{componentCls:t,textHeight:n,lineWidth:r,paddingSM:i,antCls:a,colorPrimary:o,cellActiveWithRangeBg:s,colorPrimaryBorder:c,lineType:l,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${Y(r)} ${l} ${u}`,"&-extra":{padding:`0 ${Y(i)}`,lineHeight:Y(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:`start`,"&:not(:last-child)":{borderBottom:`${Y(r)} ${l} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:`space-between`},[`${t}-ranges`]:{marginBlock:0,paddingInline:Y(i),overflow:`hidden`,textAlign:`start`,listStyle:`none`,display:`flex`,justifyContent:`center`,alignItems:`center`,"> li":{lineHeight:Y(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:`inline-block`},[`${t}-now-btn-disabled`]:{pointerEvents:`none`,color:e.colorTextDisabled},[`${t}-preset > ${a}-tag-blue`]:{color:o,background:s,borderColor:c,cursor:`pointer`},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:`auto`}}}}},jI=e=>{let{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:i}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(i).add(e.calc(r).div(2)).equal()}},MI=e=>{let{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:i,paddingXXS:a,lineWidth:o}=e,s=a*2,c=o*2,l=Math.min(n-s,n-c),u=Math.min(r-s,r-c),d=Math.min(i-s,i-c);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new Nc(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new Nc(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:i*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:i,withoutTimeCellHeight:i*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:`transparent`,multipleItemHeight:l,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:`transparent`}},NI=e=>({...YF(e),...MI(e),...lw(e),presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),PI=e=>{let{componentCls:t}=e;return{[t]:[{...eI(e),...dI(e),...oI(e),...rI(e)},{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},FI=(e,t)=>({padding:`${Y(e)} ${Y(t)}`}),II=e=>{let{componentCls:t,colorError:n,colorWarning:r}=e;return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[`${t}-active-bar`]:{background:r}}}}},LI=e=>{let{componentCls:t,antCls:n,paddingInline:r,lineWidth:i,lineType:a,colorBorder:o,borderRadius:s,motionDurationMid:c,colorTextDisabled:l,colorTextPlaceholder:u,colorTextQuaternary:d,fontSizeLG:f,inputFontSizeLG:p,fontSizeSM:m,inputFontSizeSM:h,controlHeightSM:g,paddingInlineSM:_,paddingXS:v,marginXS:y,colorIcon:b,lineWidthBold:x,colorPrimary:S,motionDurationSlow:C,zIndexPopup:w,paddingXXS:T,sizePopupArrow:E,colorBgElevated:D,borderRadiusLG:O,boxShadowSecondary:k,borderRadiusSM:A,colorSplit:j,cellHoverBg:M,presetsWidth:N,presetsMaxWidth:P,boxShadowPopoverArrow:F,fontHeight:I,lineHeightLG:L}=e;return[{[t]:{...Ul(e),...FI(e.paddingBlock,e.paddingInline),position:`relative`,display:`inline-flex`,alignItems:`center`,lineHeight:1,borderRadius:s,transition:[`border`,`box-shadow`,`background-color`].map(e=>`${e} ${c}`).join(`, `),[`${t}-prefix`]:{flex:`0 0 auto`,marginInlineEnd:e.inputAffixPadding},[`${t}-input`]:{position:`relative`,display:`inline-flex`,alignItems:`center`,width:`100%`,"> input":{position:`relative`,display:`inline-block`,width:`100%`,color:`inherit`,fontSize:e.inputFontSize??e.fontSize,lineHeight:e.lineHeight,transition:`all ${c}`,...fI(u),flex:`auto`,minWidth:1,height:`auto`,padding:0,background:`transparent`,border:0,fontFamily:`inherit`,"&:focus":{boxShadow:`none`,outline:0},"&[disabled]":{background:`transparent`,color:l,cursor:`not-allowed`}},"&-placeholder":{"> input":{color:u}}},"&-large":{...FI(e.paddingBlockLG,e.paddingInlineLG),borderRadius:e.borderRadiusLG,[`${t}-input > input`]:{fontSize:p??f,lineHeight:L}},"&-small":{...FI(e.paddingBlockSM,e.paddingInlineSM),borderRadius:e.borderRadiusSM,[`${t}-input > input`]:{fontSize:h??m}},[`${t}-suffix`]:{display:`flex`,flex:`none`,alignSelf:`center`,marginInlineStart:e.calc(v).div(2).equal(),color:d,lineHeight:1,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`,"&:not(:last-child)":{marginInlineEnd:y}}},[`${t}-clear`]:{position:`absolute`,top:`50%`,insetInlineEnd:0,color:d,lineHeight:1,transform:`translateY(-50%)`,cursor:`pointer`,opacity:0,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`},"&:hover":{color:b}},"&:hover":{[`${t}-clear`]:{opacity:1},[`${t}-suffix:not(:last-child)`]:{opacity:0}},[`${t}-separator`]:{position:`relative`,display:`inline-block`,width:`1em`,height:f,color:d,fontSize:f,verticalAlign:`top`,cursor:`default`,[`${t}-focused &`]:{color:b},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:`not-allowed`}}},"&-range":{position:`relative`,display:`inline-flex`,[`${t}-active-bar`]:{bottom:e.calc(i).mul(-1).equal(),height:x,background:S,opacity:0,transition:`all ${C} ease-out`,pointerEvents:`none`},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:`center`,padding:`0 ${Y(v)}`,lineHeight:1}},"&-range, &-multiple":{[`${t}-clear`]:{insetInlineEnd:r},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:_}}},"&-dropdown":{...Ul(e),...kI(e),pointerEvents:`none`,position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:w,[`&${t}-dropdown-hidden`]:{display:`none`},"&-rtl":{direction:`rtl`},[`&${t}-dropdown-placement-bottomLeft, + ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:`auto`,minWidth:`auto`,[`${t}-content`]:{display:`flex`,flex:`auto`,height:P},"&-column":{flex:`1 0 auto`,width:F,margin:`${Y(l)} 0`,padding:0,overflowY:`auto`,textAlign:`start`,listStyle:`none`,transition:`background-color ${b}`,overflowX:`hidden`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:`block`,height:`calc(100% - ${Y(I)})`,content:`""`},"&:not(:first-child)":{borderInlineStart:`${Y(d)} ${f} ${g}`},"&-active":{background:new Nc(L).setA(.2).toHexString()},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:R,[`${t}-time-panel-cell-inner`]:{display:`block`,width:e.calc(F).sub(e.calc(R).mul(2)).equal(),height:I,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(F).sub(I).div(2).equal(),color:E,lineHeight:Y(I),borderRadius:j,cursor:`pointer`,transition:`background-color ${b}`,"&:hover":{background:N}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:L}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:T,background:`transparent`,cursor:`not-allowed`}}}}}}}}},kI=e=>{let{componentCls:t,textHeight:n,lineWidth:r,paddingSM:i,antCls:a,colorPrimary:o,cellActiveWithRangeBg:s,colorPrimaryBorder:c,lineType:l,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${Y(r)} ${l} ${u}`,"&-extra":{padding:`0 ${Y(i)}`,lineHeight:Y(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:`start`,"&:not(:last-child)":{borderBottom:`${Y(r)} ${l} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:`space-between`},[`${t}-ranges`]:{marginBlock:0,paddingInline:Y(i),overflow:`hidden`,textAlign:`start`,listStyle:`none`,display:`flex`,justifyContent:`center`,alignItems:`center`,"> li":{lineHeight:Y(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:`inline-block`},[`${t}-now-btn-disabled`]:{pointerEvents:`none`,color:e.colorTextDisabled},[`${t}-preset > ${a}-tag-blue`]:{color:o,background:s,borderColor:c,cursor:`pointer`},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:`auto`}}}}},AI=e=>{let{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:i}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(i).add(e.calc(r).div(2)).equal()}},jI=e=>{let{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:i,paddingXXS:a,lineWidth:o}=e,s=a*2,c=o*2,l=Math.min(n-s,n-c),u=Math.min(r-s,r-c),d=Math.min(i-s,i-c);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new Nc(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new Nc(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:i*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:i,withoutTimeCellHeight:i*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:`transparent`,multipleItemHeight:l,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:`transparent`}},MI=e=>({...JF(e),...jI(e),...sw(e),presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),NI=e=>{let{componentCls:t}=e;return{[t]:[{...$F(e),...uI(e),...aI(e),...nI(e)},{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},PI=(e,t)=>({padding:`${Y(e)} ${Y(t)}`}),FI=e=>{let{componentCls:t,colorError:n,colorWarning:r}=e;return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[`${t}-active-bar`]:{background:r}}}}},II=e=>{let{componentCls:t,antCls:n,paddingInline:r,lineWidth:i,lineType:a,colorBorder:o,borderRadius:s,motionDurationMid:c,colorTextDisabled:l,colorTextPlaceholder:u,colorTextQuaternary:d,fontSizeLG:f,inputFontSizeLG:p,fontSizeSM:m,inputFontSizeSM:h,controlHeightSM:g,paddingInlineSM:_,paddingXS:v,marginXS:y,colorIcon:b,lineWidthBold:x,colorPrimary:S,motionDurationSlow:C,zIndexPopup:w,paddingXXS:T,sizePopupArrow:E,colorBgElevated:D,borderRadiusLG:O,boxShadowSecondary:k,borderRadiusSM:A,colorSplit:j,cellHoverBg:M,presetsWidth:N,presetsMaxWidth:P,boxShadowPopoverArrow:F,fontHeight:I,lineHeightLG:L}=e;return[{[t]:{...Ul(e),...PI(e.paddingBlock,e.paddingInline),position:`relative`,display:`inline-flex`,alignItems:`center`,lineHeight:1,borderRadius:s,transition:[`border`,`box-shadow`,`background-color`].map(e=>`${e} ${c}`).join(`, `),[`${t}-prefix`]:{flex:`0 0 auto`,marginInlineEnd:e.inputAffixPadding},[`${t}-input`]:{position:`relative`,display:`inline-flex`,alignItems:`center`,width:`100%`,"> input":{position:`relative`,display:`inline-block`,width:`100%`,color:`inherit`,fontSize:e.inputFontSize??e.fontSize,lineHeight:e.lineHeight,transition:`all ${c}`,...dI(u),flex:`auto`,minWidth:1,height:`auto`,padding:0,background:`transparent`,border:0,fontFamily:`inherit`,"&:focus":{boxShadow:`none`,outline:0},"&[disabled]":{background:`transparent`,color:l,cursor:`not-allowed`}},"&-placeholder":{"> input":{color:u}}},"&-large":{...PI(e.paddingBlockLG,e.paddingInlineLG),borderRadius:e.borderRadiusLG,[`${t}-input > input`]:{fontSize:p??f,lineHeight:L}},"&-small":{...PI(e.paddingBlockSM,e.paddingInlineSM),borderRadius:e.borderRadiusSM,[`${t}-input > input`]:{fontSize:h??m}},[`${t}-suffix`]:{display:`flex`,flex:`none`,alignSelf:`center`,marginInlineStart:e.calc(v).div(2).equal(),color:d,lineHeight:1,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`,"&:not(:last-child)":{marginInlineEnd:y}}},[`${t}-clear`]:{position:`absolute`,top:`50%`,insetInlineEnd:0,color:d,lineHeight:1,transform:`translateY(-50%)`,cursor:`pointer`,opacity:0,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`},"&:hover":{color:b}},"&:hover":{[`${t}-clear`]:{opacity:1},[`${t}-suffix:not(:last-child)`]:{opacity:0}},[`${t}-separator`]:{position:`relative`,display:`inline-block`,width:`1em`,height:f,color:d,fontSize:f,verticalAlign:`top`,cursor:`default`,[`${t}-focused &`]:{color:b},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:`not-allowed`}}},"&-range":{position:`relative`,display:`inline-flex`,[`${t}-active-bar`]:{bottom:e.calc(i).mul(-1).equal(),height:x,background:S,opacity:0,transition:`all ${C} ease-out`,pointerEvents:`none`},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:`center`,padding:`0 ${Y(v)}`,lineHeight:1}},"&-range, &-multiple":{[`${t}-clear`]:{insetInlineEnd:r},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:_}}},"&-dropdown":{...Ul(e),...OI(e),pointerEvents:`none`,position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:w,[`&${t}-dropdown-hidden`]:{display:`none`},"&-rtl":{direction:`rtl`},[`&${t}-dropdown-placement-bottomLeft, &${t}-dropdown-placement-bottomRight`]:{[`${t}-range-arrow`]:{top:0,display:`block`,transform:`translateY(-100%)`}},[`&${t}-dropdown-placement-topLeft, &${t}-dropdown-placement-topRight`]:{[`${t}-range-arrow`]:{bottom:0,display:`block`,transform:`translateY(100%) rotate(180deg)`}},[`&${n}-slide-up-appear, &${n}-slide-up-enter`]:{[`${t}-range-arrow${t}-range-arrow`]:{transition:`none`}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft, &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight, &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft, - &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]:{animationName:cg},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]:{animationName:sg},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft, &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight, &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft, - &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:og},[`&${n}-slide-up-leave ${t}-panel-container`]:{pointerEvents:`none`},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, - &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:lg},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, - &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:sg},[`${t}-panel > ${t}-time-panel`]:{paddingTop:T},[`${t}-range-wrapper`]:{display:`flex`,position:`relative`},[`${t}-range-arrow`]:{position:`absolute`,zIndex:1,display:`none`,paddingInline:e.calc(r).mul(1.5).equal(),boxSizing:`content-box`,transition:`all ${C} ease-out`,...uw(e,D,F),"&:before":{insetInlineStart:e.calc(r).mul(1.5).equal()}},[`${t}-panel-container`]:{overflow:`hidden`,verticalAlign:`top`,background:D,borderRadius:O,boxShadow:k,transition:`margin ${C}`,display:`inline-block`,pointerEvents:`auto`,[`${t}-panel-layout`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`stretch`},[`${t}-presets`]:{display:`flex`,flexDirection:`column`,minWidth:N,maxWidth:P,ul:{height:0,flex:`auto`,listStyle:`none`,overflow:`auto`,margin:0,padding:v,borderInlineEnd:`${Y(i)} ${a} ${j}`,li:{...Hl,borderRadius:A,paddingInline:v,paddingBlock:e.calc(g).sub(I).div(2).equal(),cursor:`pointer`,transition:`all ${C}`,"+ li":{marginTop:y},"&:hover":{background:M}}}},[`${t}-panels`]:{display:`inline-flex`,flexWrap:`nowrap`,"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:`top`,background:`transparent`,borderRadius:0,borderWidth:0,[`${t}-content, table`]:{textAlign:`center`},"&-focused":{borderColor:o}}}},"&-dropdown-range":{padding:`${Y(e.calc(E).mul(2).div(3).equal())} 0`,"&-hidden":{display:`none`}},"&-rtl":{direction:`rtl`,[`${t}-separator`]:{transform:`scale(-1, 1)`},[`${t}-footer`]:{"&-extra":{direction:`rtl`}}}}},hg(e,`slide-up`),hg(e,`slide-down`),ag(e,`move-up`),ag(e,`move-down`)]},RI=Ql(`DatePicker`,e=>{let t=dc(JF(e),jI(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[AI(t),LI(t),PI(t),II(t),DI(t),h_(e,{focusElCls:`${e.componentCls}-focused`})]},NI),zI=c(o((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:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`}}))());function BI(){return BI=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,BI({},e,{ref:t,icon:zI.default}))),HI=(0,S.createContext)(null),UI=e=>{let{activeTabOffset:t,horizontal:n,rtl:r,indicator:i={}}=e,{size:a,align:o=`center`}=i,[s,c]=(0,S.useState)(),l=(0,S.useRef)(),u=S.useCallback(e=>typeof a==`function`?a(e):typeof a==`number`?a:e,[a]);function d(){Oi.cancel(l.current)}return(0,S.useEffect)(()=>{let e={};if(t)if(n){e.width=u(t.width);let n=r?`right`:`left`;o===`start`&&(e[n]=t[n]),o===`center`&&(e[n]=t[n]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),o===`end`&&(e[n]=t[n]+t.width,e.transform=`translateX(-100%)`)}else e.height=u(t.height),o===`start`&&(e.top=t.top),o===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),o===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return d(),l.current=Oi(()=>{s&&e&&Object.keys(e).every(t=>{let n=e[t],r=s[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||c(e)}),d},[JSON.stringify(t),n,r,o,u]),{style:s}},WI={width:0,height:0,left:0,top:0};function GI(e,t,n){return(0,S.useMemo)(()=>{let n=new Map,r=t.get(e[0]?.key)||WI,i=r.left+r.width;for(let r=0;re.key).join(`_`),t,n])}function KI(e,t){let n=S.useRef(e),[,r]=S.useState({});function i(e){let i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var qI=.1,JI=.01,YI=20,XI=.995**YI;function ZI(e,t){let[n,r]=(0,S.useState)(),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(),u=(0,S.useRef)();function d(e){let{screenX:t,screenY:n}=e.touches[0];r({x:t,y:n}),window.clearInterval(u.current)}function f(e){if(!n)return;let{screenX:o,screenY:c}=e.touches[0];r({x:o,y:c});let u=o-n.x,d=c-n.y;t(u,d);let f=Date.now();a(f),s(f-i),l({x:u,y:d})}function p(){if(n&&(r(null),l(null),c)){let e=c.x/o,n=c.y/o;if(Math.max(Math.abs(e),Math.abs(n)){if(Math.abs(r)o?(i=n,m.current=`x`):(i=r,m.current=`y`),t(-i,-i)&&e.preventDefault()}let g=(0,S.useRef)(null);g.current={onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h},S.useEffect(()=>{function t(e){g.current.onTouchStart(e)}function n(e){g.current.onTouchMove(e)}function r(e){g.current.onTouchEnd(e)}function i(e){g.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),()=>{document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function QI(e){let[t,n]=(0,S.useState)(0),r=(0,S.useRef)(0),i=(0,S.useRef)();return i.current=e,Un(()=>{i.current?.()},[t]),()=>{r.current===t&&(r.current+=1,n(r.current))}}function $I(e){let t=(0,S.useRef)([]),[,n]=(0,S.useState)({}),r=(0,S.useRef)(typeof e==`function`?e():e),i=QI(()=>{let e=r.current;t.current.forEach(t=>{e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var eL={width:0,height:0,left:0,top:0,right:0};function tL(e,t,n,r,i,a,{tabs:o,tabPosition:s,rtl:c}){let l,u,d;return[`top`,`bottom`].includes(s)?(l=`width`,u=c?`right`:`left`,d=Math.abs(n)):(l=`height`,u=`top`,d=-n),(0,S.useMemo)(()=>{if(!o.length)return[0,0];let n=o.length,r=n;for(let i=0;iMath.floor(d+t)){r=i-1;break}}let i=0;for(let t=n-1;t>=0;--t)if((e.get(o[t].key)||eL)[u]r?[0,-1]:[i,r]},[e,t,r,i,a,d,s,o.map(e=>e.key).join(`_`),c])}function nL(e){let t;return e instanceof Map?(t={},e.forEach((e,n)=>{t[n]=e})):t=e,JSON.stringify(t)}var rL=`TABS_DQ`;function iL(e){return String(e).replace(/"/g,rL)}function aL(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var oL=S.forwardRef((e,t)=>{let{prefixCls:n,editable:r,locale:i,style:a}=e;return!r||r.showAdd===!1?null:S.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:e=>{r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),sL=S.forwardRef((e,t)=>{let{position:n,prefixCls:r,extra:i}=e;if(!i)return null;let a,o={};return typeof i==`object`&&!S.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?S.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null});function cL(){return cL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,tabs:i,locale:a,mobile:o,more:s={},style:c,className:l,editable:u,tabBarGutter:d,rtl:f,removeAriaLabel:p,onTabClick:m,getPopupContainer:h,popupClassName:g,popupStyle:_}=e,[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(null),{icon:C=`More`}=s,w=`${r}-more-popup`,T=`${n}-dropdown`,E=b===null?null:`${w}-${b}`,D=a?.dropdownAriaLabel;function O(e,t){e.preventDefault(),e.stopPropagation(),u.onEdit(`remove`,{key:t,event:e})}let k=S.createElement(hE,{onClick:({key:e,domEvent:t})=>{m(e,t),y(!1)},prefixCls:`${T}-menu`,id:w,tabIndex:-1,role:`listbox`,"aria-activedescendant":E,selectedKeys:[b],"aria-label":D===void 0?`expanded dropdown`:D},i.map(e=>{let{closable:t,disabled:n,closeIcon:i,key:a,label:o}=e,s=aL(t,i,u,n);return S.createElement(GT,{key:a,id:`${w}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},S.createElement(`span`,null,o),s&&S.createElement(`button`,{type:`button`,"aria-label":p||`remove`,tabIndex:0,className:`${T}-menu-item-remove`,onClick:e=>{e.stopPropagation(),O(e,a)}},i||u.removeIcon||`×`))}));function A(e){let t=i.filter(e=>!e.disabled),n=t.findIndex(e=>e.key===b)||0,r=t.length;for(let i=0;i{let e=document.getElementById(E);e?.scrollIntoView&&e.scrollIntoView(!1)},[E,b]),(0,S.useEffect)(()=>{v||x(null)},[v]);let M={marginInlineStart:d};i.length||(M.visibility=`hidden`,M.order=1);let N=J(g,{[`${T}-rtl`]:f}),P=o?null:S.createElement(eT,cL({prefixCls:T,overlay:k,visible:i.length?v:!1,onVisibleChange:y,overlayClassName:N,overlayStyle:_,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:h},s),S.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:M,"aria-haspopup":`listbox`,"aria-controls":w,id:`${r}-more`,"aria-expanded":v,onKeyDown:j},C));return S.createElement(`div`,{className:J(`${n}-nav-operations`,l),style:c,ref:t},P,S.createElement(oL,{prefixCls:n,locale:a,editable:u}))}),Fne=S.memo(Pne,(e,t)=>t.tabMoving),Ine=e=>{let{prefixCls:t,id:n,active:r,focus:i,tab:{key:a,label:o,disabled:s,closeIcon:c,icon:l},closable:u,renderWrapper:d,removeAriaLabel:f,editable:p,onClick:m,onFocus:h,onBlur:g,onKeyDown:_,onMouseDown:v,onMouseUp:y,style:b,className:x,tabCount:C,currentPosition:w}=e,T=`${t}-tab`,E=aL(u,c,p,s);function D(e){s||m(e)}function O(e){e.preventDefault(),e.stopPropagation(),p.onEdit(`remove`,{key:a,event:e})}let k=S.useMemo(()=>l&&typeof o==`string`?S.createElement(`span`,null,o):o,[o,l]),A=S.useRef(null);S.useEffect(()=>{i&&A.current&&A.current.focus()},[i]);let j=S.createElement(`div`,{key:a,"data-node-key":iL(a),className:J(T,x,{[`${T}-with-remove`]:E,[`${T}-active`]:r,[`${T}-disabled`]:s,[`${T}-focus`]:i}),style:b,onClick:D},S.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${a}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${a}`,"aria-disabled":s,tabIndex:s?null:r?0:-1,onClick:e=>{e.stopPropagation(),D(e)},onKeyDown:_,onMouseDown:v,onMouseUp:y,onFocus:h,onBlur:g},i&&S.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),l&&S.createElement(`span`,{className:`${T}-icon`},l),o&&k),E&&S.createElement(`button`,{type:`button`,"aria-label":f||`remove`,tabIndex:r?0:-1,className:`${T}-remove`,onClick:e=>{e.stopPropagation(),O(e)}},c||p.removeIcon||`×`));return d?d(j):j};function lL(){return lL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{offsetWidth:n,offsetHeight:r,offsetTop:i,offsetLeft:a}=e,{width:o,height:s,left:c,top:l}=e.getBoundingClientRect();return Math.abs(o-n)<1?[o,s,c-t.left,l-t.top]:[n,r,a,i]},uL=e=>{let{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){let{width:n,height:r}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,r]}return[t,n]},dL=(e,t)=>e[+!t],fL=S.forwardRef((e,t)=>{let{className:n,style:r,id:i,animated:a,activeKey:o,rtl:s,extra:c,editable:l,locale:u,tabPosition:d,tabBarGutter:f,children:p,onTabClick:m,onTabScroll:h,indicator:g,classNames:_,styles:v}=e,{prefixCls:y,tabs:b}=S.useContext(HI),x=(0,S.useRef)(null),C=(0,S.useRef)(null),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),O=(0,S.useRef)(null),k=d===`top`||d===`bottom`,[A,j]=KI(0,(e,t)=>{k&&h&&h({direction:e>t?`left`:`right`})}),[M,N]=KI(0,(e,t)=>{!k&&h&&h({direction:e>t?`top`:`bottom`})}),[P,F]=(0,S.useState)([0,0]),[I,L]=(0,S.useState)([0,0]),[R,z]=(0,S.useState)([0,0]),[B,V]=(0,S.useState)([0,0]),[H,U]=$I(new Map),ee=GI(b,H,I[0]),W=dL(P,k),te=dL(I,k),G=dL(R,k),ne=dL(B,k),K=Math.floor(W)q?q:e}let se=(0,S.useRef)(null),[ce,le]=(0,S.useState)();function ue(){le(Date.now())}function de(){se.current&&clearTimeout(se.current)}ZI(T,(e,t)=>{function n(e,t){e(e=>oe(e+t))}return K?(k?n(j,e):n(N,t),de(),ue(),!0):!1}),(0,S.useEffect)(()=>(de(),ce&&(se.current=setTimeout(()=>{le(0)},100)),de),[ce]);let[fe,pe]=tL(ee,re,k?A:M,te,G,ne,{...e,tabs:b}),me=zn((e=o)=>{let t=ee.get(e)||{width:0,height:0,left:0,right:0,top:0};if(k){let e=A;s?t.rightA+re&&(e=t.right+t.width-re):t.left<-A?e=-t.left:t.left+t.width>-A+re&&(e=-(t.left+t.width-re)),N(0),j(oe(e))}else{let e=M;t.top<-M?e=-t.top:t.top+t.height>-M+re&&(e=-(t.top+t.height-re)),j(0),N(oe(e))}}),[he,ge]=(0,S.useState)(),[_e,ve]=(0,S.useState)(!1),ye=b.filter(e=>!e.disabled).map(e=>e.key),be=e=>{let t=ye.indexOf(he||o),n=ye.length,r=ye[(t+e+n)%n];ge(r)},xe=(e,t)=>{let n=ye.indexOf(e),r=b.find(t=>t.key===e);aL(r?.closable,r?.closeIcon,l,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),l.onEdit(`remove`,{key:e,event:t}),n===ye.length-1?be(-1):be(1))},Se=(e,t)=>{ve(!0),t.button===1&&xe(e,t)},Ce=e=>{let{code:t}=e,n=s&&k,r=ye[0],i=ye[ye.length-1];switch(t){case`ArrowLeft`:k&&be(n?1:-1);break;case`ArrowRight`:k&&be(n?-1:1);break;case`ArrowUp`:e.preventDefault(),k||be(-1);break;case`ArrowDown`:e.preventDefault(),k||be(1);break;case`Home`:e.preventDefault(),ge(r);break;case`End`:e.preventDefault(),ge(i);break;case`Enter`:case`Space`:e.preventDefault(),m(he??o,e);break;case`Backspace`:case`Delete`:xe(he,e);break}},we={};k?we.marginInlineStart=f:we.marginTop=f;let Te=b.map((e,t)=>{let{key:n}=e;return S.createElement(Ine,{id:i,prefixCls:y,key:n,tab:e,className:_?.item,style:t===0?v?.item:{...we,...v?.item},closable:e.closable,editable:l,active:n===o,focus:n===he,renderWrapper:p,removeAriaLabel:u?.removeAriaLabel,tabCount:ye.length,currentPosition:t+1,onClick:e=>{m(n,e)},onKeyDown:Ce,onFocus:()=>{_e||ge(n),me(n),ue(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)},onBlur:()=>{ge(void 0)},onMouseDown:e=>Se(n,e),onMouseUp:()=>{ve(!1)}})}),Ee=()=>U(()=>{let e=new Map,t=E.current?.getBoundingClientRect();return b.forEach(({key:n})=>{let r=E.current?.querySelector(`[data-node-key="${iL(n)}"]`);if(r){let[i,a,o,s]=Lne(r,t);e.set(n,{width:i,height:a,left:o,top:s})}}),e});(0,S.useEffect)(()=>{Ee()},[b.map(e=>e.key).join(`_`)]);let De=QI(()=>{let e=uL(x),t=uL(C),n=uL(w);F([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);let r=uL(O);z(r),V(uL(D));let i=uL(E);L([i[0]-r[0],i[1]-r[1]]),Ee()}),Oe=b.slice(0,fe),ke=b.slice(pe+1),Ae=[...Oe,...ke],je=ee.get(o),{style:Me}=UI({activeTabOffset:je,horizontal:k,indicator:g,rtl:s});(0,S.useEffect)(()=>{me()},[o,ae,q,nL(je),nL(ee),k]),(0,S.useEffect)(()=>{De()},[s]);let Ne=!!Ae.length,Pe=`${y}-nav-wrap`,Fe,Ie,Le,Re;return k?s?(Ie=A>0,Fe=A!==q):(Fe=A<0,Ie=A!==ae):(Le=M<0,Re=M!==ae),S.createElement(oa,{onResize:De},S.createElement(`div`,{ref:lr(t,x),role:`tablist`,"aria-orientation":k?`horizontal`:`vertical`,className:J(`${y}-nav`,n,_?.header),style:{...v?.header,...r},onKeyDown:()=>{ue()}},S.createElement(sL,{ref:C,position:`left`,extra:c,prefixCls:y}),S.createElement(oa,{onResize:De},S.createElement(`div`,{className:J(Pe,{[`${Pe}-ping-left`]:Fe,[`${Pe}-ping-right`]:Ie,[`${Pe}-ping-top`]:Le,[`${Pe}-ping-bottom`]:Re}),ref:T},S.createElement(oa,{onResize:De},S.createElement(`div`,{ref:E,className:`${y}-nav-list`,style:{transform:`translate(${A}px, ${M}px)`,transition:ce?`none`:void 0}},Te,S.createElement(oL,{ref:O,prefixCls:y,locale:u,editable:l,style:{...Te.length===0?void 0:we,visibility:Ne?`hidden`:null}}),S.createElement(`div`,{className:J(`${y}-ink-bar`,_?.indicator,{[`${y}-ink-bar-animated`]:a.inkBar}),style:{...Me,...v?.indicator}}))))),S.createElement(Fne,lL({},e,{removeAriaLabel:u?.removeAriaLabel,ref:D,prefixCls:y,tabs:Ae,className:!Ne&&ie,popupStyle:v?.popup,tabMoving:!!ce})),S.createElement(sL,{ref:w,position:`right`,extra:c,prefixCls:y})))}),Rne=({renderTabBar:e,...t})=>e?e(t,fL):S.createElement(fL,t),zne=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,id:a,active:o,tabKey:s,children:c}=e,l=S.Children.count(c)>0;return S.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o&&l?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:J(n,o&&`${n}-active`,r),ref:t},c)});function pL(){return pL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,activeKey:n,animated:r,tabPosition:i,destroyOnHidden:a,contentStyle:o,contentClassName:s}=e,{prefixCls:c,tabs:l}=S.useContext(HI),u=r.tabPane,d=`${c}-tabpane`;return S.createElement(`div`,{className:J(`${c}-content-holder`)},S.createElement(`div`,{className:J(`${c}-content`,`${c}-content-${i}`,{[`${c}-content-animated`]:u})},l.map(e=>{let{key:i,forceRender:c,style:l,className:f,destroyOnHidden:p,...m}=e,h=i===n;return S.createElement(Od,pL({key:i,visible:h,forceRender:c,removeOnLeave:!!(a??p),leavedClassName:`${d}-hidden`},r.tabPaneMotion),({style:e,className:n},r)=>S.createElement(zne,pL({},m,{prefixCls:d,id:t,tabKey:i,animated:u,active:h,style:{...o,...l,...e},className:J(s,f,n),ref:r})))})))};function Vne(e={inkBar:!0,tabPane:!1}){let t;return t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:{inkBar:!0,...typeof e==`object`?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function mL(){return mL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tabs`,className:i,items:a,direction:o,activeKey:s,defaultActiveKey:c,editable:l,animated:u,tabPosition:d=`top`,tabBarGutter:f,tabBarStyle:p,tabBarExtraContent:m,locale:h,more:g,destroyOnHidden:_,renderTabBar:v,onChange:y,onTabClick:b,onTabScroll:x,getPopupContainer:C,popupClassName:w,indicator:T,classNames:E,styles:D,...O}=e,k=S.useMemo(()=>(a||[]).filter(e=>e&&typeof e==`object`&&`key`in e),[a]),A=o===`rtl`,j=Vne(u),[M,N]=(0,S.useState)(!1);(0,S.useEffect)(()=>{N(hi())},[]);let[P,F]=Gn(c??k[0]?.key,s),[I,L]=(0,S.useState)(()=>k.findIndex(e=>e.key===P));(0,S.useEffect)(()=>{let e=k.findIndex(e=>e.key===P);e===-1&&(e=Math.max(0,Math.min(I,k.length-1)),F(k[e]?.key)),L(e)},[k.map(e=>e.key).join(`_`),P,I]);let[R,z]=Gn(null,n);(0,S.useEffect)(()=>{n||(z(`rc-tabs-${hL}`),hL+=1)},[]);function B(e,t){b?.(e,t);let n=e!==P;F(e),n&&y?.(e)}let V={id:R,activeKey:P,animated:j,tabPosition:d,rtl:A,mobile:M},H={...V,editable:l,locale:h,more:g,tabBarGutter:f,onTabClick:B,onTabScroll:x,extra:m,style:p,getPopupContainer:C,popupClassName:J(w,E?.popup),indicator:T,styles:D,classNames:E},U=S.useMemo(()=>({tabs:k,prefixCls:r}),[k,r]);return S.createElement(HI.Provider,{value:U},S.createElement(`div`,mL({ref:t,id:n,className:J(r,`${r}-${d}`,{[`${r}-mobile`]:M,[`${r}-editable`]:l,[`${r}-rtl`]:A},i)},O),S.createElement(Rne,mL({},H,{renderTabBar:v})),S.createElement(Bne,mL({destroyOnHidden:_},V,{contentStyle:D?.content,contentClassName:E?.content,animated:j}))))}),Une={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Wne(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:{inkBar:!0,...nf(t)?t:{}},n.tabPane&&(n.tabPaneMotion={...Une,motionName:gh(e,`switch`)}),n}function Gne(e){return e.filter(e=>e)}function Kne(e,t){return e?e.map(e=>({...e,destroyOnHidden:e.destroyOnHidden??e.destroyInactiveTabPane})):Gne(ki(t).map(e=>{if(S.isValidElement(e)){let{key:t,props:n}=e,{tab:r,...i}=n||{};return{key:String(t),...i,label:r}}return null}))}var qne=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:`none`,"&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:`absolute`,transition:`none`,inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[hg(e,`slide-up`),hg(e,`slide-down`)]]},Jne=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${Y(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Kl(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:`none`},[`${t}-ink-bar`]:{visibility:`hidden`}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:Y(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:Y(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadiusLG)} 0 0 ${Y(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},Yne=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:{...Ul(e),position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:`block`,"&-hidden":{display:`none`},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${Y(r)} 0`,overflowX:`hidden`,overflowY:`auto`,textAlign:{_skip_check_:!0,value:`left`},listStyleType:`none`,backgroundColor:e.colorBgContainer,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,"&-item":{...Hl,display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${Y(e.paddingXXS)} ${Y(e.paddingSM)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:`nowrap`},"&-remove":{flex:`none`,marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:0,cursor:`pointer`,"&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}}}}}},Xne=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,motionDurationSlow:s,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:`column`,[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:`absolute`,right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${r}`,content:`''`},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:[`width`,`left`,`right`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, - > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:[`height`,`top`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:Y(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Zne=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadius)} ${Y(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${Y(e.borderRadius)} ${Y(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadius)} ${Y(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadius)} 0 0 ${Y(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},Qne=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...ql(e)},"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s},[`&${l}-focus ${l}-btn:focus-visible`]:Kl(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},$ne=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:a(e.marginXXS).mul(-1).equal()},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:`rtl`},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:`right`}}}}},ere=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:s}=e;return{[t]:{...Ul(e),display:`flex`,[`> ${t}-nav, > div > ${t}-nav`]:{position:`relative`,display:`flex`,flex:`none`,alignItems:`center`,[`${t}-nav-wrap`]:{position:`relative`,display:`flex`,flex:`auto`,alignSelf:`stretch`,overflow:`hidden`,whiteSpace:`nowrap`,transform:`translate(0)`,"&::before, &::after":{position:`absolute`,zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:`''`,pointerEvents:`none`}},[`${t}-nav-list`]:{position:`relative`,display:`flex`,transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:`flex`,alignSelf:`stretch`},[`${t}-nav-operations-hidden`]:{position:`absolute`,visibility:`hidden`,pointerEvents:`none`},[`${t}-nav-more`]:{position:`relative`,padding:n,background:`transparent`,border:0,color:e.colorText,"&::after":{position:`absolute`,right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:`translateY(100%)`,content:`''`}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:`transparent`,border:`${Y(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o},...ql(e,-3)}},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`},...Qne(e),[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:{...ql(e),"&-hidden":{display:`none`}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:`auto`}}}}}},tre=Ql(`Tabs`,e=>{let t=dc(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Y(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${Y(e.horizontalItemGutter)}`});return[Zne(t),$ne(t),Xne(t),Yne(t),Jne(t),ere(t),qne(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:``,horizontalItemMarginRTL:``,horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),nre=()=>null,gL=S.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:l,removeIcon:u,moreIcon:d,more:f,popupClassName:p,children:m,items:h,animated:g,style:_,indicatorSize:v,indicator:y,classNames:b,styles:x,destroyInactiveTabPane:C,destroyOnHidden:w,tabPlacement:T,tabPosition:E,...D}=e,{prefixCls:O}=D,{getPrefixCls:k,direction:A,getPopupContainer:j,className:M,style:N,classNames:P,styles:F}=ya(`tabs`),{tabs:I}=S.useContext(ga),L=k(`tabs`,O),R=sp(L),[z,B]=tre(L,R),V=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:V.current}));let H;n===`editable-card`&&(H={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:u??I?.removeIcon??S.createElement(ju,null),addIcon:(l??I?.addIcon)||S.createElement(VI,null),showAdd:s!==!0});let U=k(),ee=Eh(a),W=Kne(h,m),te=Wne(L,g),G={align:y?.align??I?.indicator?.align,size:y?.size??v??I?.indicator?.size??I?.indicatorSize},ne=S.useMemo(()=>{let e=T??E??void 0,t=A===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[T,E,A]),K={...e,size:ee,tabPlacement:ne,items:W},[re,ie]=Cf([P,b],[F,x],{props:K},{popup:{_default:`root`}});return S.createElement(Hne,{ref:V,direction:A,getPopupContainer:j,...D,items:W,className:J({[`${L}-large`]:ee===`large`,[`${L}-small`]:ee===`small`,[`${L}-card`]:[`card`,`editable-card`].includes(n),[`${L}-editable-card`]:n===`editable-card`,[`${L}-centered`]:c},M,r,i,re.root,z,B,R),classNames:{...re,popup:J(p,z,B,R,re.popup?.root)},styles:ie,style:{...ie.root,...N,..._},editable:H,more:{icon:I?.more?.icon??I?.moreIcon??d??S.createElement(ME,null),transitionName:`${U}-slide-up`,...f},prefixCls:L,animated:te,indicator:G,destroyOnHidden:w??C,tabPosition:ne})});gL.TabPane=nre;var _L=({prefixCls:e,className:t,hoverable:n=!0,...r})=>{let{getPrefixCls:i}=S.useContext(ga),a=i(`card`,e),o=J(`${a}-grid`,t,{[`${a}-grid-hoverable`]:n});return S.createElement(`div`,{...r,className:o})},rre=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:a}=e;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${Y(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,...Gl(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...Hl,[` + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:ag},[`&${n}-slide-up-leave ${t}-panel-container`]:{pointerEvents:`none`},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:cg},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:og},[`${t}-panel > ${t}-time-panel`]:{paddingTop:T},[`${t}-range-wrapper`]:{display:`flex`,position:`relative`},[`${t}-range-arrow`]:{position:`absolute`,zIndex:1,display:`none`,paddingInline:e.calc(r).mul(1.5).equal(),boxSizing:`content-box`,transition:`all ${C} ease-out`,...cw(e,D,F),"&:before":{insetInlineStart:e.calc(r).mul(1.5).equal()}},[`${t}-panel-container`]:{overflow:`hidden`,verticalAlign:`top`,background:D,borderRadius:O,boxShadow:k,transition:`margin ${C}`,display:`inline-block`,pointerEvents:`auto`,[`${t}-panel-layout`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`stretch`},[`${t}-presets`]:{display:`flex`,flexDirection:`column`,minWidth:N,maxWidth:P,ul:{height:0,flex:`auto`,listStyle:`none`,overflow:`auto`,margin:0,padding:v,borderInlineEnd:`${Y(i)} ${a} ${j}`,li:{...Hl,borderRadius:A,paddingInline:v,paddingBlock:e.calc(g).sub(I).div(2).equal(),cursor:`pointer`,transition:`all ${C}`,"+ li":{marginTop:y},"&:hover":{background:M}}}},[`${t}-panels`]:{display:`inline-flex`,flexWrap:`nowrap`,"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:`top`,background:`transparent`,borderRadius:0,borderWidth:0,[`${t}-content, table`]:{textAlign:`center`},"&-focused":{borderColor:o}}}},"&-dropdown-range":{padding:`${Y(e.calc(E).mul(2).div(3).equal())} 0`,"&-hidden":{display:`none`}},"&-rtl":{direction:`rtl`,[`${t}-separator`]:{transform:`scale(-1, 1)`},[`${t}-footer`]:{"&-extra":{direction:`rtl`}}}}},mg(e,`slide-up`),mg(e,`slide-down`),ig(e,`move-up`),ig(e,`move-down`)]},LI=Ql(`DatePicker`,e=>{let t=dc(qF(e),AI(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[kI(t),II(t),NI(t),FI(t),EI(t),m_(e,{focusElCls:`${e.componentCls}-focused`})]},MI),RI=c(o((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:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`}}))());function zI(){return zI=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,zI({},e,{ref:t,icon:RI.default}))),VI=(0,S.createContext)(null),HI=e=>{let{activeTabOffset:t,horizontal:n,rtl:r,indicator:i={}}=e,{size:a,align:o=`center`}=i,[s,c]=(0,S.useState)(),l=(0,S.useRef)(),u=S.useCallback(e=>typeof a==`function`?a(e):typeof a==`number`?a:e,[a]);function d(){Oi.cancel(l.current)}return(0,S.useEffect)(()=>{let e={};if(t)if(n){e.width=u(t.width);let n=r?`right`:`left`;o===`start`&&(e[n]=t[n]),o===`center`&&(e[n]=t[n]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),o===`end`&&(e[n]=t[n]+t.width,e.transform=`translateX(-100%)`)}else e.height=u(t.height),o===`start`&&(e.top=t.top),o===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),o===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return d(),l.current=Oi(()=>{s&&e&&Object.keys(e).every(t=>{let n=e[t],r=s[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||c(e)}),d},[JSON.stringify(t),n,r,o,u]),{style:s}},UI={width:0,height:0,left:0,top:0};function WI(e,t,n){return(0,S.useMemo)(()=>{let n=new Map,r=t.get(e[0]?.key)||UI,i=r.left+r.width;for(let r=0;re.key).join(`_`),t,n])}function GI(e,t){let n=S.useRef(e),[,r]=S.useState({});function i(e){let i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var KI=.1,qI=.01,JI=20,YI=.995**JI;function XI(e,t){let[n,r]=(0,S.useState)(),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(),u=(0,S.useRef)();function d(e){let{screenX:t,screenY:n}=e.touches[0];r({x:t,y:n}),window.clearInterval(u.current)}function f(e){if(!n)return;let{screenX:o,screenY:c}=e.touches[0];r({x:o,y:c});let u=o-n.x,d=c-n.y;t(u,d);let f=Date.now();a(f),s(f-i),l({x:u,y:d})}function p(){if(n&&(r(null),l(null),c)){let e=c.x/o,n=c.y/o;if(Math.max(Math.abs(e),Math.abs(n)){if(Math.abs(r)o?(i=n,m.current=`x`):(i=r,m.current=`y`),t(-i,-i)&&e.preventDefault()}let g=(0,S.useRef)(null);g.current={onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h},S.useEffect(()=>{function t(e){g.current.onTouchStart(e)}function n(e){g.current.onTouchMove(e)}function r(e){g.current.onTouchEnd(e)}function i(e){g.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),()=>{document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function ZI(e){let[t,n]=(0,S.useState)(0),r=(0,S.useRef)(0),i=(0,S.useRef)();return i.current=e,Un(()=>{i.current?.()},[t]),()=>{r.current===t&&(r.current+=1,n(r.current))}}function QI(e){let t=(0,S.useRef)([]),[,n]=(0,S.useState)({}),r=(0,S.useRef)(typeof e==`function`?e():e),i=ZI(()=>{let e=r.current;t.current.forEach(t=>{e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var $I={width:0,height:0,left:0,top:0,right:0};function eL(e,t,n,r,i,a,{tabs:o,tabPosition:s,rtl:c}){let l,u,d;return[`top`,`bottom`].includes(s)?(l=`width`,u=c?`right`:`left`,d=Math.abs(n)):(l=`height`,u=`top`,d=-n),(0,S.useMemo)(()=>{if(!o.length)return[0,0];let n=o.length,r=n;for(let i=0;iMath.floor(d+t)){r=i-1;break}}let i=0;for(let t=n-1;t>=0;--t)if((e.get(o[t].key)||$I)[u]r?[0,-1]:[i,r]},[e,t,r,i,a,d,s,o.map(e=>e.key).join(`_`),c])}function tL(e){let t;return e instanceof Map?(t={},e.forEach((e,n)=>{t[n]=e})):t=e,JSON.stringify(t)}var nL=`TABS_DQ`;function rL(e){return String(e).replace(/"/g,nL)}function iL(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var aL=S.forwardRef((e,t)=>{let{prefixCls:n,editable:r,locale:i,style:a}=e;return!r||r.showAdd===!1?null:S.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:e=>{r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),oL=S.forwardRef((e,t)=>{let{position:n,prefixCls:r,extra:i}=e;if(!i)return null;let a,o={};return typeof i==`object`&&!S.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?S.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null});function sL(){return sL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,tabs:i,locale:a,mobile:o,more:s={},style:c,className:l,editable:u,tabBarGutter:d,rtl:f,removeAriaLabel:p,onTabClick:m,getPopupContainer:h,popupClassName:g,popupStyle:_}=e,[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(null),{icon:C=`More`}=s,w=`${r}-more-popup`,T=`${n}-dropdown`,E=b===null?null:`${w}-${b}`,D=a?.dropdownAriaLabel;function O(e,t){e.preventDefault(),e.stopPropagation(),u.onEdit(`remove`,{key:t,event:e})}let k=S.createElement(pE,{onClick:({key:e,domEvent:t})=>{m(e,t),y(!1)},prefixCls:`${T}-menu`,id:w,tabIndex:-1,role:`listbox`,"aria-activedescendant":E,selectedKeys:[b],"aria-label":D===void 0?`expanded dropdown`:D},i.map(e=>{let{closable:t,disabled:n,closeIcon:i,key:a,label:o}=e,s=iL(t,i,u,n);return S.createElement(UT,{key:a,id:`${w}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},S.createElement(`span`,null,o),s&&S.createElement(`button`,{type:`button`,"aria-label":p||`remove`,tabIndex:0,className:`${T}-menu-item-remove`,onClick:e=>{e.stopPropagation(),O(e,a)}},i||u.removeIcon||`×`))}));function A(e){let t=i.filter(e=>!e.disabled),n=t.findIndex(e=>e.key===b)||0,r=t.length;for(let i=0;i{let e=document.getElementById(E);e?.scrollIntoView&&e.scrollIntoView(!1)},[E,b]),(0,S.useEffect)(()=>{v||x(null)},[v]);let M={marginInlineStart:d};i.length||(M.visibility=`hidden`,M.order=1);let N=J(g,{[`${T}-rtl`]:f}),P=o?null:S.createElement(Qw,sL({prefixCls:T,overlay:k,visible:i.length?v:!1,onVisibleChange:y,overlayClassName:N,overlayStyle:_,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:h},s),S.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:M,"aria-haspopup":`listbox`,"aria-controls":w,id:`${r}-more`,"aria-expanded":v,onKeyDown:j},C));return S.createElement(`div`,{className:J(`${n}-nav-operations`,l),style:c,ref:t},P,S.createElement(aL,{prefixCls:n,locale:a,editable:u}))}),Ine=S.memo(Fne,(e,t)=>t.tabMoving),Lne=e=>{let{prefixCls:t,id:n,active:r,focus:i,tab:{key:a,label:o,disabled:s,closeIcon:c,icon:l},closable:u,renderWrapper:d,removeAriaLabel:f,editable:p,onClick:m,onFocus:h,onBlur:g,onKeyDown:_,onMouseDown:v,onMouseUp:y,style:b,className:x,tabCount:C,currentPosition:w}=e,T=`${t}-tab`,E=iL(u,c,p,s);function D(e){s||m(e)}function O(e){e.preventDefault(),e.stopPropagation(),p.onEdit(`remove`,{key:a,event:e})}let k=S.useMemo(()=>l&&typeof o==`string`?S.createElement(`span`,null,o):o,[o,l]),A=S.useRef(null);S.useEffect(()=>{i&&A.current&&A.current.focus()},[i]);let j=S.createElement(`div`,{key:a,"data-node-key":rL(a),className:J(T,x,{[`${T}-with-remove`]:E,[`${T}-active`]:r,[`${T}-disabled`]:s,[`${T}-focus`]:i}),style:b,onClick:D},S.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${a}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${a}`,"aria-disabled":s,tabIndex:s?null:r?0:-1,onClick:e=>{e.stopPropagation(),D(e)},onKeyDown:_,onMouseDown:v,onMouseUp:y,onFocus:h,onBlur:g},i&&S.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),l&&S.createElement(`span`,{className:`${T}-icon`},l),o&&k),E&&S.createElement(`button`,{type:`button`,"aria-label":f||`remove`,tabIndex:r?0:-1,className:`${T}-remove`,onClick:e=>{e.stopPropagation(),O(e)}},c||p.removeIcon||`×`));return d?d(j):j};function cL(){return cL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{offsetWidth:n,offsetHeight:r,offsetTop:i,offsetLeft:a}=e,{width:o,height:s,left:c,top:l}=e.getBoundingClientRect();return Math.abs(o-n)<1?[o,s,c-t.left,l-t.top]:[n,r,a,i]},lL=e=>{let{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){let{width:n,height:r}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,r]}return[t,n]},uL=(e,t)=>e[+!t],dL=S.forwardRef((e,t)=>{let{className:n,style:r,id:i,animated:a,activeKey:o,rtl:s,extra:c,editable:l,locale:u,tabPosition:d,tabBarGutter:f,children:p,onTabClick:m,onTabScroll:h,indicator:g,classNames:_,styles:v}=e,{prefixCls:y,tabs:b}=S.useContext(VI),x=(0,S.useRef)(null),C=(0,S.useRef)(null),w=(0,S.useRef)(null),T=(0,S.useRef)(null),E=(0,S.useRef)(null),D=(0,S.useRef)(null),O=(0,S.useRef)(null),k=d===`top`||d===`bottom`,[A,j]=GI(0,(e,t)=>{k&&h&&h({direction:e>t?`left`:`right`})}),[M,N]=GI(0,(e,t)=>{!k&&h&&h({direction:e>t?`top`:`bottom`})}),[P,F]=(0,S.useState)([0,0]),[I,L]=(0,S.useState)([0,0]),[R,z]=(0,S.useState)([0,0]),[B,V]=(0,S.useState)([0,0]),[H,U]=QI(new Map),ee=WI(b,H,I[0]),W=uL(P,k),te=uL(I,k),G=uL(R,k),ne=uL(B,k),K=Math.floor(W)q?q:e}let se=(0,S.useRef)(null),[ce,le]=(0,S.useState)();function ue(){le(Date.now())}function de(){se.current&&clearTimeout(se.current)}XI(T,(e,t)=>{function n(e,t){e(e=>oe(e+t))}return K?(k?n(j,e):n(N,t),de(),ue(),!0):!1}),(0,S.useEffect)(()=>(de(),ce&&(se.current=setTimeout(()=>{le(0)},100)),de),[ce]);let[fe,pe]=eL(ee,re,k?A:M,te,G,ne,{...e,tabs:b}),me=zn((e=o)=>{let t=ee.get(e)||{width:0,height:0,left:0,right:0,top:0};if(k){let e=A;s?t.rightA+re&&(e=t.right+t.width-re):t.left<-A?e=-t.left:t.left+t.width>-A+re&&(e=-(t.left+t.width-re)),N(0),j(oe(e))}else{let e=M;t.top<-M?e=-t.top:t.top+t.height>-M+re&&(e=-(t.top+t.height-re)),j(0),N(oe(e))}}),[he,ge]=(0,S.useState)(),[_e,ve]=(0,S.useState)(!1),ye=b.filter(e=>!e.disabled).map(e=>e.key),be=e=>{let t=ye.indexOf(he||o),n=ye.length,r=ye[(t+e+n)%n];ge(r)},xe=(e,t)=>{let n=ye.indexOf(e),r=b.find(t=>t.key===e);iL(r?.closable,r?.closeIcon,l,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),l.onEdit(`remove`,{key:e,event:t}),n===ye.length-1?be(-1):be(1))},Se=(e,t)=>{ve(!0),t.button===1&&xe(e,t)},Ce=e=>{let{code:t}=e,n=s&&k,r=ye[0],i=ye[ye.length-1];switch(t){case`ArrowLeft`:k&&be(n?1:-1);break;case`ArrowRight`:k&&be(n?-1:1);break;case`ArrowUp`:e.preventDefault(),k||be(-1);break;case`ArrowDown`:e.preventDefault(),k||be(1);break;case`Home`:e.preventDefault(),ge(r);break;case`End`:e.preventDefault(),ge(i);break;case`Enter`:case`Space`:e.preventDefault(),m(he??o,e);break;case`Backspace`:case`Delete`:xe(he,e);break}},we={};k?we.marginInlineStart=f:we.marginTop=f;let Te=b.map((e,t)=>{let{key:n}=e;return S.createElement(Lne,{id:i,prefixCls:y,key:n,tab:e,className:_?.item,style:t===0?v?.item:{...we,...v?.item},closable:e.closable,editable:l,active:n===o,focus:n===he,renderWrapper:p,removeAriaLabel:u?.removeAriaLabel,tabCount:ye.length,currentPosition:t+1,onClick:e=>{m(n,e)},onKeyDown:Ce,onFocus:()=>{_e||ge(n),me(n),ue(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)},onBlur:()=>{ge(void 0)},onMouseDown:e=>Se(n,e),onMouseUp:()=>{ve(!1)}})}),Ee=()=>U(()=>{let e=new Map,t=E.current?.getBoundingClientRect();return b.forEach(({key:n})=>{let r=E.current?.querySelector(`[data-node-key="${rL(n)}"]`);if(r){let[i,a,o,s]=Rne(r,t);e.set(n,{width:i,height:a,left:o,top:s})}}),e});(0,S.useEffect)(()=>{Ee()},[b.map(e=>e.key).join(`_`)]);let De=ZI(()=>{let e=lL(x),t=lL(C),n=lL(w);F([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);let r=lL(O);z(r),V(lL(D));let i=lL(E);L([i[0]-r[0],i[1]-r[1]]),Ee()}),Oe=b.slice(0,fe),ke=b.slice(pe+1),Ae=[...Oe,...ke],je=ee.get(o),{style:Me}=HI({activeTabOffset:je,horizontal:k,indicator:g,rtl:s});(0,S.useEffect)(()=>{me()},[o,ae,q,tL(je),tL(ee),k]),(0,S.useEffect)(()=>{De()},[s]);let Ne=!!Ae.length,Pe=`${y}-nav-wrap`,Fe,Ie,Le,Re;return k?s?(Ie=A>0,Fe=A!==q):(Fe=A<0,Ie=A!==ae):(Le=M<0,Re=M!==ae),S.createElement(oa,{onResize:De},S.createElement(`div`,{ref:lr(t,x),role:`tablist`,"aria-orientation":k?`horizontal`:`vertical`,className:J(`${y}-nav`,n,_?.header),style:{...v?.header,...r},onKeyDown:()=>{ue()}},S.createElement(oL,{ref:C,position:`left`,extra:c,prefixCls:y}),S.createElement(oa,{onResize:De},S.createElement(`div`,{className:J(Pe,{[`${Pe}-ping-left`]:Fe,[`${Pe}-ping-right`]:Ie,[`${Pe}-ping-top`]:Le,[`${Pe}-ping-bottom`]:Re}),ref:T},S.createElement(oa,{onResize:De},S.createElement(`div`,{ref:E,className:`${y}-nav-list`,style:{transform:`translate(${A}px, ${M}px)`,transition:ce?`none`:void 0}},Te,S.createElement(aL,{ref:O,prefixCls:y,locale:u,editable:l,style:{...Te.length===0?void 0:we,visibility:Ne?`hidden`:null}}),S.createElement(`div`,{className:J(`${y}-ink-bar`,_?.indicator,{[`${y}-ink-bar-animated`]:a.inkBar}),style:{...Me,...v?.indicator}}))))),S.createElement(Ine,cL({},e,{removeAriaLabel:u?.removeAriaLabel,ref:D,prefixCls:y,tabs:Ae,className:!Ne&&ie,popupStyle:v?.popup,tabMoving:!!ce})),S.createElement(oL,{ref:w,position:`right`,extra:c,prefixCls:y})))}),zne=({renderTabBar:e,...t})=>e?e(t,dL):S.createElement(dL,t),Bne=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,id:a,active:o,tabKey:s,children:c}=e,l=S.Children.count(c)>0;return S.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o&&l?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:J(n,o&&`${n}-active`,r),ref:t},c)});function fL(){return fL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,activeKey:n,animated:r,tabPosition:i,destroyOnHidden:a,contentStyle:o,contentClassName:s}=e,{prefixCls:c,tabs:l}=S.useContext(VI),u=r.tabPane,d=`${c}-tabpane`;return S.createElement(`div`,{className:J(`${c}-content-holder`)},S.createElement(`div`,{className:J(`${c}-content`,`${c}-content-${i}`,{[`${c}-content-animated`]:u})},l.map(e=>{let{key:i,forceRender:c,style:l,className:f,destroyOnHidden:p,...m}=e,h=i===n;return S.createElement(Od,fL({key:i,visible:h,forceRender:c,removeOnLeave:!!(a??p),leavedClassName:`${d}-hidden`},r.tabPaneMotion),({style:e,className:n},r)=>S.createElement(Bne,fL({},m,{prefixCls:d,id:t,tabKey:i,animated:u,active:h,style:{...o,...l,...e},className:J(s,f,n),ref:r})))})))};function Hne(e={inkBar:!0,tabPane:!1}){let t;return t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:{inkBar:!0,...typeof e==`object`?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function pL(){return pL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tabs`,className:i,items:a,direction:o,activeKey:s,defaultActiveKey:c,editable:l,animated:u,tabPosition:d=`top`,tabBarGutter:f,tabBarStyle:p,tabBarExtraContent:m,locale:h,more:g,destroyOnHidden:_,renderTabBar:v,onChange:y,onTabClick:b,onTabScroll:x,getPopupContainer:C,popupClassName:w,indicator:T,classNames:E,styles:D,...O}=e,k=S.useMemo(()=>(a||[]).filter(e=>e&&typeof e==`object`&&`key`in e),[a]),A=o===`rtl`,j=Hne(u),[M,N]=(0,S.useState)(!1);(0,S.useEffect)(()=>{N(hi())},[]);let[P,F]=Gn(c??k[0]?.key,s),[I,L]=(0,S.useState)(()=>k.findIndex(e=>e.key===P));(0,S.useEffect)(()=>{let e=k.findIndex(e=>e.key===P);e===-1&&(e=Math.max(0,Math.min(I,k.length-1)),F(k[e]?.key)),L(e)},[k.map(e=>e.key).join(`_`),P,I]);let[R,z]=Gn(null,n);(0,S.useEffect)(()=>{n||(z(`rc-tabs-${mL}`),mL+=1)},[]);function B(e,t){b?.(e,t);let n=e!==P;F(e),n&&y?.(e)}let V={id:R,activeKey:P,animated:j,tabPosition:d,rtl:A,mobile:M},H={...V,editable:l,locale:h,more:g,tabBarGutter:f,onTabClick:B,onTabScroll:x,extra:m,style:p,getPopupContainer:C,popupClassName:J(w,E?.popup),indicator:T,styles:D,classNames:E},U=S.useMemo(()=>({tabs:k,prefixCls:r}),[k,r]);return S.createElement(VI.Provider,{value:U},S.createElement(`div`,pL({ref:t,id:n,className:J(r,`${r}-${d}`,{[`${r}-mobile`]:M,[`${r}-editable`]:l,[`${r}-rtl`]:A},i)},O),S.createElement(zne,pL({},H,{renderTabBar:v})),S.createElement(Vne,pL({destroyOnHidden:_},V,{contentStyle:D?.content,contentClassName:E?.content,animated:j}))))}),Wne={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Gne(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:{inkBar:!0,...nf(t)?t:{}},n.tabPane&&(n.tabPaneMotion={...Wne,motionName:hh(e,`switch`)}),n}function Kne(e){return e.filter(e=>e)}function qne(e,t){return e?e.map(e=>({...e,destroyOnHidden:e.destroyOnHidden??e.destroyInactiveTabPane})):Kne(ki(t).map(e=>{if(S.isValidElement(e)){let{key:t,props:n}=e,{tab:r,...i}=n||{};return{key:String(t),...i,label:r}}return null}))}var Jne=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:`none`,"&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:`absolute`,transition:`none`,inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[mg(e,`slide-up`),mg(e,`slide-down`)]]},Yne=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${Y(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Kl(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:`none`},[`${t}-ink-bar`]:{visibility:`hidden`}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:Y(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:Y(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadiusLG)} 0 0 ${Y(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},Xne=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:{...Ul(e),position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:`block`,"&-hidden":{display:`none`},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${Y(r)} 0`,overflowX:`hidden`,overflowY:`auto`,textAlign:{_skip_check_:!0,value:`left`},listStyleType:`none`,backgroundColor:e.colorBgContainer,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,"&-item":{...Hl,display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${Y(e.paddingXXS)} ${Y(e.paddingSM)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:`nowrap`},"&-remove":{flex:`none`,marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:0,cursor:`pointer`,"&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}}}}}},Zne=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,motionDurationSlow:s,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:`column`,[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:`absolute`,right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${r}`,content:`''`},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:[`width`,`left`,`right`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, + > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:[`height`,`top`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:Y(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Qne=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadius)} ${Y(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${Y(e.borderRadius)} ${Y(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadius)} ${Y(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadius)} 0 0 ${Y(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},$ne=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...ql(e)},"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s},[`&${l}-focus ${l}-btn:focus-visible`]:Kl(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},ere=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:a(e.marginXXS).mul(-1).equal()},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:`rtl`},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:`right`}}}}},tre=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:s}=e;return{[t]:{...Ul(e),display:`flex`,[`> ${t}-nav, > div > ${t}-nav`]:{position:`relative`,display:`flex`,flex:`none`,alignItems:`center`,[`${t}-nav-wrap`]:{position:`relative`,display:`flex`,flex:`auto`,alignSelf:`stretch`,overflow:`hidden`,whiteSpace:`nowrap`,transform:`translate(0)`,"&::before, &::after":{position:`absolute`,zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:`''`,pointerEvents:`none`}},[`${t}-nav-list`]:{position:`relative`,display:`flex`,transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:`flex`,alignSelf:`stretch`},[`${t}-nav-operations-hidden`]:{position:`absolute`,visibility:`hidden`,pointerEvents:`none`},[`${t}-nav-more`]:{position:`relative`,padding:n,background:`transparent`,border:0,color:e.colorText,"&::after":{position:`absolute`,right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:`translateY(100%)`,content:`''`}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:`transparent`,border:`${Y(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o},...ql(e,-3)}},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`},...$ne(e),[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:{...ql(e),"&-hidden":{display:`none`}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:`auto`}}}}}},nre=Ql(`Tabs`,e=>{let t=dc(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Y(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${Y(e.horizontalItemGutter)}`});return[Qne(t),ere(t),Zne(t),Xne(t),Yne(t),tre(t),Jne(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:``,horizontalItemMarginRTL:``,horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),rre=()=>null,hL=S.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:l,removeIcon:u,moreIcon:d,more:f,popupClassName:p,children:m,items:h,animated:g,style:_,indicatorSize:v,indicator:y,classNames:b,styles:x,destroyInactiveTabPane:C,destroyOnHidden:w,tabPlacement:T,tabPosition:E,...D}=e,{prefixCls:O}=D,{getPrefixCls:k,direction:A,getPopupContainer:j,className:M,style:N,classNames:P,styles:F}=ya(`tabs`),{tabs:I}=S.useContext(ga),L=k(`tabs`,O),R=sp(L),[z,B]=nre(L,R),V=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:V.current}));let H;n===`editable-card`&&(H={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:u??I?.removeIcon??S.createElement(ju,null),addIcon:(l??I?.addIcon)||S.createElement(BI,null),showAdd:s!==!0});let U=k(),ee=Th(a),W=qne(h,m),te=Gne(L,g),G={align:y?.align??I?.indicator?.align,size:y?.size??v??I?.indicator?.size??I?.indicatorSize},ne=S.useMemo(()=>{let e=T??E??void 0,t=A===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[T,E,A]),K={...e,size:ee,tabPlacement:ne,items:W},[re,ie]=Cf([P,b],[F,x],{props:K},{popup:{_default:`root`}});return S.createElement(Une,{ref:V,direction:A,getPopupContainer:j,...D,items:W,className:J({[`${L}-large`]:ee===`large`,[`${L}-small`]:ee===`small`,[`${L}-card`]:[`card`,`editable-card`].includes(n),[`${L}-editable-card`]:n===`editable-card`,[`${L}-centered`]:c},M,r,i,re.root,z,B,R),classNames:{...re,popup:J(p,z,B,R,re.popup?.root)},styles:ie,style:{...ie.root,...N,..._},editable:H,more:{icon:I?.more?.icon??I?.moreIcon??d??S.createElement(kE,null),transitionName:`${U}-slide-up`,...f},prefixCls:L,animated:te,indicator:G,destroyOnHidden:w??C,tabPosition:ne})});hL.TabPane=rre;var gL=({prefixCls:e,className:t,hoverable:n=!0,...r})=>{let{getPrefixCls:i}=S.useContext(ga),a=i(`card`,e),o=J(`${a}-grid`,t,{[`${a}-grid-hoverable`]:n});return S.createElement(`div`,{...r,className:o})},ire=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:a}=e;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${Y(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,...Gl(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...Hl,[` > ${n}-typography, > ${n}-typography-edit-content - `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},ire=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:` + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},are=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:` ${Y(i)} 0 0 0 ${n}, 0 ${Y(i)} 0 0 ${n}, ${Y(i)} ${Y(i)} 0 0 ${n}, ${Y(i)} 0 0 0 ${n} inset, 0 ${Y(i)} 0 0 ${n} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},are=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,...Gl(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:Y(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:Y(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${a}`}}}},ore=e=>({margin:`${Y(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...Gl(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...Hl},"&-description":{color:e.colorTextDescription}}),sre=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${Y(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${Y(e.padding)} ${Y(i)}`}}},cre=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},lre=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s,motionDurationMid:c}=e;return{[t]:{...Ul(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:rre(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:ire(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:are(e),[`${t}-meta`]:ore(e)},[`${t}-bordered`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${c}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:sre(e),[`${t}-loading`]:cre(e),[`${t}-rtl`]:{direction:`rtl`}}},ure=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${Y(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},dre=Ql(`Card`,e=>{let t=dc(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[lre(t),ure(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),fre=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return S.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return S.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},S.createElement(`span`,null,e))}))},pre=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:m,cover:h,actions:g,tabList:_,children:v,activeTabKey:y,defaultActiveTabKey:b,tabBarExtraContent:x,hoverable:C,tabProps:w={},classNames:T,styles:E,...D}=e,{getPrefixCls:O,direction:k,className:A,style:j,classNames:M,styles:N}=ya(`card`),[P]=pC(`card`,f,d),F=Eh(p),I={...e,size:F,variant:P},[L,R]=Cf([M,T],[N,E],{props:I}),z=t=>{e.onTabChange?.(t)},B=S.useMemo(()=>ki(v),[v]),V=S.useMemo(()=>B.some(e=>S.isValidElement(e)&&e.type===_L),[B]),H=O(`card`,n),[U,ee]=dre(H),W=S.createElement(By,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),te=y!==void 0,G={...w,[te?`activeKey`:`defaultActiveKey`]:te?y:b,tabBarExtraContent:x},ne,K=F===`small`?F:`large`,re=_?S.createElement(gL,{size:K,...G,className:`${H}-head-tabs`,onChange:z,items:_.map(({tab:e,...t})=>({label:e,...t}))}):null;if(l||o||re){let e=J(`${H}-head`,L.header),t=J(`${H}-head-title`,L.title),n=J(`${H}-extra`,L.extra),r={...s,...R.header};ne=S.createElement(`div`,{className:e,style:r},S.createElement(`div`,{className:`${H}-head-wrapper`},l&&S.createElement(`div`,{className:t,style:R.title},l),o&&S.createElement(`div`,{className:n,style:R.extra},o)),re)}let ie=J(`${H}-cover`,L.cover),ae=h?S.createElement(`div`,{className:ie,style:R.cover},h):null,q=J(`${H}-body`,L.body),oe={...c,...R.body},se=u||B.length?S.createElement(`div`,{className:q,style:oe},u?W:v):null,ce=J(`${H}-actions`,L.actions),le=g?.length?S.createElement(fre,{actionClasses:ce,actionStyle:R.actions,actions:g}):null,ue=gi(D,[`onTabChange`]),de=J(H,A,{[`${H}-loading`]:u,[`${H}-bordered`]:P!==`borderless`,[`${H}-hoverable`]:C,[`${H}-contain-grid`]:V,[`${H}-contain-tabs`]:_?.length,[`${H}-small`]:F===`small`,[`${H}-type-${m}`]:!!m,[`${H}-rtl`]:k===`rtl`},r,i,U,ee,L.root),fe={...R.root,...j,...a};return S.createElement(`div`,{ref:t,...ue,className:de,style:fe},ne,ae,se,le)}),mre=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:p,styles:m}=ya(`cardMeta`),h=`${u(`card`,t)}-meta`,[g,_]=Cf([p,s],[m,c],{props:e}),v=J(h,n,d,g.root),y={...f,..._.root,...o},b=J(`${h}-avatar`,g.avatar),x=J(`${h}-title`,g.title),C=J(`${h}-description`,g.description),w=J(`${h}-section`,g.section),T=r?S.createElement(`div`,{className:b,style:_.avatar},r):null,E=i?S.createElement(`div`,{className:x,style:_.title},i):null,D=a?S.createElement(`div`,{className:C,style:_.description},a):null,O=E||D?S.createElement(`div`,{className:w,style:_.section},E,D):null;return S.createElement(`div`,{...l,className:v,style:y},T,O)},vL=pre;vL.Grid=_L,vL.Meta=mre;function hre(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function yL(e,t){if(e==null)return{};var n,r,i=hre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;re?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function _re(e,t,n){var r=(n||{}).atBegin;return gre(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}var bL=S.createContext({}),xL=`__rc_cascader_search_mark__`,vre=(e,t,{label:n=``})=>t.some(t=>String(t[n]).toLowerCase().includes(e.toLowerCase())),yre=(e,t,n,r)=>t.map(e=>e[r.label]).join(` / `),bre=(e,t,n,r,i,a)=>{let{filter:o=vre,render:s=yre,limit:c=50,sort:l}=i;return S.useMemo(()=>{let i=[];if(!e)return[];function u(t,d,f=!1){t.forEach(t=>{if(!l&&c!==!1&&c>0&&i.length>=c)return;let p=[...d,t],m=t[n.children],h=f||t.disabled;(!m||m.length===0||a)&&o(e,p,{label:n.label})&&i.push({...t,disabled:h,[n.label]:s(e,p,r,n),[xL]:p,[n.children]:void 0}),m&&u(t[n.children],p,h)})}return u(t,[]),l&&i.sort((t,r)=>l(t[xL],r[xL],e,n)),c!==!1&&c>0?i.slice(0,c):i},[e,t,n,r,s,a,o,l,c])},SL=`__RC_CASCADER_SPLIT__`,CL=`SHOW_PARENT`,xre=`SHOW_CHILD`;function wL(e){return e.join(SL)}function TL(e){return e.map(wL)}function Sre(e){return e.split(SL)}function EL(e){let{label:t,value:n,children:r}=e||{},i=n||`value`;return{label:t||`label`,value:i,key:i,children:r||`children`}}function DL(e,t){return e.isLeaf??!e[t.children]?.length}function OL(e){let t=e.parentElement;if(!t)return;let n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}function kL(e,t){return e.map(e=>e[xL]?.map(e=>e[t.value]))}function Cre(e){return Array.isArray(e)&&Array.isArray(e[0])}function AL(e){return e?Cre(e)?e:(e.length===0?[]:[e]).map(e=>Array.isArray(e)?e:[e]):[]}function jL(e,t,n){let r=new Set(e),i=t();return e.filter(e=>{let t=i[e],a=t?t.parent:null,o=t?t.children:null;return t&&t.node.disabled?!0:n===`SHOW_CHILD`?!(o&&o.some(e=>e.key&&r.has(e.key))):!(a&&!a.node.disabled&&r.has(a.key))})}function ML(e,t,n,r=!1){let i=t,a=[];for(let t=0;t{let t=e[n.value];return r?String(t)===String(o):t===o}),c=s===-1?null:i?.[s];a.push({value:c?.[n.value]??o,index:s,option:c}),i=c?.[n.children]}return a}var wre=((e,t,n,r,i)=>S.useMemo(()=>{let a=i||(e=>{let t=r?e.slice(-1):e;return t.every(e=>[`string`,`number`].includes(typeof e))?t.join(` / `):t.reduce((e,t,n)=>{let r=S.isValidElement(t)?S.cloneElement(t,{key:n}):t;return n===0?[r]:[...e,` / `,r]},[])});return e.map(e=>{let r=ML(e,t,n),i=a(r.map(({option:e,value:t})=>e?.[n.label]??t),r.map(({option:e})=>e)),o=wL(e);return{label:i,value:o,key:o,valueCells:e,disabled:r[r.length-1]?.option?.disabled}})},[e,t,n,i,r]));function NL(e,t){return S.useCallback(n=>{let r=[],i=[];return n.forEach(n=>{ML(n,e,t).every(e=>e.option)?i.push(n):r.push(n)}),[i,r]},[e,t])}function PL(e,t){return e[t]}function FL(e,t){return`${e}-${t}`}function Tre(e){return e&&e.type&&e.type.isTreeNode}function IL(e,t){return e??t}function LL(e){let{title:t,_title:n,key:r,children:i}=e||{},a=t||`title`;return{title:a,_title:n||[a],key:r||`key`,children:i||`children`}}function RL(e){function t(e){return ki(e).map(e=>{if(!Tre(e))return ui(!e,`Tree/TreeNode can only accept TreeNode as children.`),null;let{key:n}=e,{children:r,...i}=e.props,a={key:n,...i},o=t(r);return o.length&&(a.children=o),a}).filter(e=>e)}return t(e)}function zL(e,t,n){let{_title:r,key:i,children:a}=LL(n),o=new Set(t===!0?[]:t),s=[];function c(e,n=null){return e.map((l,u)=>{let d=FL(n?n.pos:`0`,u),f=IL(l[i],d),p;for(let e=0;ee[a]:typeof a==`function`&&(u=e=>a(e)):u=(e,t)=>IL(e[s],t);function d(n,r,i,a){let o=n?n[l]:e,s=n?FL(i.pos,r):`0`,c=n?[...a,n]:[];n&&t({node:n,index:r,pos:s,key:u(n,s),parentPos:i.node?i.pos:null,level:i.level+1,nodes:c}),o&&o.forEach((e,t)=>{d(e,t,{node:n,pos:s,level:i?i.level+1:-1},c)})}d(null)}function BL(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:i,childrenPropName:a,fieldNames:o}={},s){let c=i||s,l={},u={},d={posEntities:l,keyEntities:u};return t&&(d=t(d)||d),Ere(e,e=>{let{node:t,index:r,pos:i,key:a,parentPos:o,level:s,nodes:c}=e,f={node:t,nodes:c,index:r,key:a,pos:i,level:s},p=IL(a,i);l[i]=f,u[p]=f,f.parent=l[o],f.parent&&(f.parent.children=f.parent.children||[],f.parent.children.push(f)),n&&n(f,d)},{externalGetKey:c,childrenPropName:a,fieldNames:o}),r&&r(d),d}function VL(e,t,n,r){return e===!1?!1:e||!t&&!n||t&&r&&!n}function HL(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:i,checkedKeys:a,halfCheckedKeys:o,dragOverNodeKey:s,dropPosition:c,keyEntities:l}){let u=PL(l,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:a.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(u?u.pos:``),dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function UL(e){let{data:t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,eventKey:p}=e,m={...t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,key:p};return`props`in m||Object.defineProperty(m,`props`,{get(){return ui(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}var Dre=((e,t)=>{let n=S.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}});return S.useCallback(()=>(n.current.options!==e&&(n.current.options=e,n.current.info=BL(e,{fieldNames:t,initWrapper:e=>({...e,pathKeyEntities:{}}),processEntity:(e,n)=>{let r=e.nodes.map(e=>e[t.value]).join(SL);n.pathKeyEntities[r]=e,e.key=r}})),n.current.info.pathKeyEntities),[t,e])});function WL(e,t){let n=S.useMemo(()=>t||[],[t]),r=Dre(n,e);return[n,r,S.useCallback(t=>{let n=r();return t.map(t=>{let{nodes:r}=n[t];return r.map(t=>t[e.value])})},[r,e])]}function Ore(e,t){let{autoClearSearchValue:n,searchValue:r,onSearch:i}=t;return S.useMemo(()=>{if(!e)return[!1,{}];let t={matchInputWidth:!0,limit:50,autoClearSearchValue:n,searchValue:r,onSearch:i};return e&&typeof e==`object`&&(t={...t,...e}),t.limit<=0&&(t.limit=!1),[!0,t]},[e,n,r,i])}function GL(e,t){let n=new Set;return e.forEach(e=>{t.has(e)||n.add(e)}),n}function kre(e){let{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function Are(e,t,n,r){let i=new Set(e),a=new Set;for(let e=0;e<=n;e+=1)(t.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:a=[]}=e;i.has(t)&&!r(n)&&a.filter(e=>!r(e.node)).forEach(e=>{i.add(e.key)})});let o=new Set;for(let e=n;e>=0;--e)(t.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(r(n)||!e.parent||o.has(e.parent.key))return;if(r(e.parent.node)){o.add(t.key);return}let s=!0,c=!1;(t.children||[]).filter(e=>!r(e.node)).forEach(({key:e})=>{let t=i.has(e);s&&!t&&(s=!1),!c&&(t||a.has(e))&&(c=!0)}),s&&i.add(t.key),c&&a.add(t.key),o.add(t.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(GL(a,i))}}function jre(e,t,n,r,i){let a=new Set(e),o=new Set(t);for(let e=0;e<=r;e+=1)(n.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:r=[]}=e;!a.has(t)&&!o.has(t)&&!i(n)&&r.filter(e=>!i(e.node)).forEach(e=>{a.delete(e.key)})});o=new Set;let s=new Set;for(let e=r;e>=0;--e)(n.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(i(n)||!e.parent||s.has(e.parent.key))return;if(i(e.parent.node)){s.add(t.key);return}let r=!0,c=!1;(t.children||[]).filter(e=>!i(e.node)).forEach(({key:e})=>{let t=a.has(e);r&&!t&&(r=!1),!c&&(t||o.has(e))&&(c=!0)}),r||a.delete(t.key),c&&o.add(t.key),s.add(t.key)});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(GL(o,a))}}function KL(e,t,n,r){let i=[],a;a=r||kre;let o=new Set(e.filter(e=>{let t=!!PL(n,e);return t||i.push(e),t})),s=new Map,c=0;Object.keys(n).forEach(e=>{let t=n[e],{level:r}=t,i=s.get(r);i||(i=new Set,s.set(r,i)),i.add(t),c=Math.max(c,r)}),ui(!i.length,`Tree missing follow keys: ${i.slice(0,100).map(e=>`'${e}'`).join(`, `)}`);let l;return l=t===!0?Are(o,s,c,a):jre(o,t.halfCheckedKeys,s,c,a),l}function qL(e,t,n,r,i,a,o,s){return c=>{if(!e)t(c);else{let e=wL(c),l=TL(n),u=TL(r),d=l.includes(e),f=i.some(t=>wL(t)===e),p=n,m=i;if(f&&!d)m=i.filter(t=>wL(t)!==e);else{let t=d?l.filter(t=>t!==e):[...l,e],n=a(),r;d?{checkedKeys:r}=KL(t,{checked:!1,halfCheckedKeys:u},n):{checkedKeys:r}=KL(t,!0,n),p=o(jL(r,a,s))}t([...m,...p])}}}function JL(e,t,n,r,i){return S.useMemo(()=>{let[a,o]=i(t);if(!e||!t.length)return[a,[],o];let{checkedKeys:s,halfCheckedKeys:c}=KL(TL(a),!0,n());return[r(s),r(c),o]},[e,t,n,r,i])}function Mre({prefixCls:e,checked:t,halfChecked:n,disabled:r,onClick:i,disableCheckbox:a}){let{checkable:o}=S.useContext(bL),s=typeof o==`boolean`?null:o;return S.createElement(`span`,{className:J(`${e}`,{[`${e}-checked`]:t,[`${e}-indeterminate`]:!t&&n,[`${e}-disabled`]:r||a}),onClick:i},s)}function YL(){return YL=Object.assign?Object.assign.bind():function(e){for(var t=1;tf||e,O=S.useMemo(()=>n.map(e=>{let{disabled:t,disableCheckbox:n}=e,r=e[xL],a=e.__cascader_fix_label__??e[g.label],o=e[g.value],s=DL(e,g),d=r?r.map(e=>e[g.value]):[...i,o],f=wL(d);return{disabled:t,label:a,value:o,isLeaf:s,isLoading:u.includes(f),checked:c.has(f),halfChecked:l.has(f),option:e,disableCheckbox:n,fullPath:d,fullPathKey:f}}),[n,c,g,l,u,i]);return S.useEffect(()=>{if(h.current){let e=`.${m}-active`,t=h.current.querySelector(e);t&&OL(t)}},[r,m]),S.createElement(`ul`,{className:J(p,w?.popup?.list),style:T?.popup?.list,ref:h,role:`menu`},O.map(({disabled:n,label:i,value:c,isLeaf:l,isLoading:u,checked:f,halfChecked:p,option:h,fullPath:g,fullPathKey:v,disableCheckbox:O})=>{let k=xi(h,{aria:!0,data:!0}),A=()=>{if(D(n))return;let e=[...g];E&&l&&e.pop(),s(e)},j=()=>{d(h)&&!D(n)&&o(g,l)},M;return typeof h.title==`string`?M=h.title:typeof i==`string`&&(M=i),S.createElement(`li`,YL({key:v},k,{className:J(m,w?.popup?.listItem,{[`${m}-expand`]:!l,[`${m}-active`]:r===c||r===v,[`${m}-disabled`]:D(n),[`${m}-loading`]:u}),style:{...x,...T?.popup?.listItem},role:`menuitemcheckbox`,title:M,"aria-checked":f,"data-path-key":v,onClick:()=>{A(),!O&&(!t||l)&&j()},onDoubleClick:()=>{_&&a(!1)},onMouseEnter:()=>{E&&A()},onMouseDown:e=>{e.preventDefault()}}),t&&S.createElement(Mre,{prefixCls:`${e}-checkbox`,checked:f,halfChecked:p,disabled:D(n)||O,disableCheckbox:O,onClick:e=>{O||(e.stopPropagation(),j())}}),S.createElement(`div`,{className:`${m}-content`},C&&c!==`__EMPTY__`?C(h):i),!u&&y&&!l&&S.createElement(`div`,{className:`${m}-expand-icon`},y),u&&b&&S.createElement(`div`,{className:`${m}-loading-icon`},b))}))}var Fre=(e,t)=>{let{values:n}=S.useContext(bL),r=n[0],[i,a]=S.useState([]);return S.useEffect(()=>{e||a(r||[])},[t,r]),[i,a]},Ire=((e,t,n,r,i,a,o)=>{let{direction:s,searchValue:c,toggleOpen:l,open:u}=o,d=s===`rtl`,[f,p,m,h]=S.useMemo(()=>{let e=-1,i=t,a=[],o=[],s=r.length,c=kL(t,n);for(let t=0;t(c[i]?wL(c[i]):e[n.value])===r[t]);if(s===-1)break;e=s,a.push(e),o.push(r[t]),i=i[e][n.children]}let l=t;for(let e=0;e{i(e)},_=e=>{let t=m.length,r=p;r===-1&&e<0&&(r=t);for(let i=0;i{f.length>1?g(f.slice(0,-1)):l(!1)},y=()=>{let e=(m[p]?.[n.children]||[]).find(e=>!e.disabled);e&&g([...f,e[n.value]])};S.useImperativeHandle(e,()=>({onKeyDown:e=>{let{which:t}=e;switch(t){case Qr.UP:case Qr.DOWN:{let e=0;t===Qr.UP?e=-1:t===Qr.DOWN&&(e=1),e!==0&&_(e);break}case Qr.LEFT:if(c)break;d?y():v();break;case Qr.RIGHT:if(c)break;d?v():y();break;case Qr.BACKSPACE:c||v();break;case Qr.ENTER:if(f.length){let e=m[p]?.__rc_cascader_search_mark__||[];e.length?a(e.map(e=>e[n.value]),e[e.length-1]):a(f,m[p])}break;case Qr.ESC:l(!1),u&&e.stopPropagation()}},onKeyUp:()=>{}}))});function XL(){return XL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,multiple:r,searchValue:i,toggleOpen:a,notFoundContent:o,direction:s,open:c,disabled:l,lockOptions:u=!1}=e,d=S.useRef(null),f=s===`rtl`,{options:p,values:m,halfValues:h,fieldNames:g,changeOnSelect:_,onSelect:v,searchOptions:y,popupPrefixCls:b,loadData:x,expandTrigger:C}=S.useContext(bL),w=b||n,[T,E]=S.useState([]),D=e=>{if(!x||i)return;let t=ML(e,p,g).map(({option:e})=>e),n=t[t.length-1];if(n&&!DL(n,g)){let n=wL(e);E(e=>[...e,n]),x(t)}};S.useEffect(()=>{T.length&&T.forEach(e=>{let t=ML(Sre(e),p,g,!0).map(({option:e})=>e),n=t[t.length-1];(!n||n[g.children]||DL(n,g))&&E(t=>t.filter(t=>t!==e))})},[p,T,g]);let O=S.useMemo(()=>new Set(TL(m)),[m]),k=S.useMemo(()=>new Set(TL(h)),[h]),[A,j]=Fre(r,c),M=e=>{j(e),D(e)},N=e=>{if(l)return!1;let{disabled:t}=e,n=DL(e,g);return!t&&(n||_||r)},P=(e,t,n=!1)=>{v(e),!r&&(t||_&&(C===`hover`||n))&&a(!1)},F=S.useMemo(()=>i?y:p,[i,y,p]),I=Zn(()=>F,[c,u],(e,t)=>!!t[0]&&!t[1]),L=S.useMemo(()=>{let e=[{options:I}],t=I,n=kL(t,g);for(let r=0;r(n[t]?wL(n[t]):e[g.value])===i)?.[g.children];if(!a?.length)break;t=a,e.push({options:a})}return e},[I,A,g]);Ire(t,I,g,A,M,(e,t)=>{N(t)&&P(e,DL(t,g),!0)},{direction:s,searchValue:i,toggleOpen:a,open:c}),S.useEffect(()=>{if(!i)for(let e=0;e{let n=A.slice(0,t),r=A[t];return S.createElement(Pre,XL({key:t},B,{prefixCls:w,options:e.options,prevValuePath:n,activeValue:r}))});return S.createElement(`div`,{className:J(`${w}-menus`,{[`${w}-menu-empty`]:R,[`${w}-rtl`]:f}),ref:d},V)});function QL(){return QL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{lockOptions:n,...r}=sx();return S.createElement(ZL,QL({},e,r,{lockOptions:n,ref:t}))});function Rre(){}function $L(e){let{prefixCls:t=`rc-cascader`,style:n,className:r,options:i,checkable:a,defaultValue:o,value:s,fieldNames:c,changeOnSelect:l,onChange:u,showCheckedStrategy:d,loadData:f,expandTrigger:p,expandIcon:m=`>`,loadingIcon:h,direction:g,notFoundContent:_=`Not Found`,disabled:v,optionRender:y}=e,b=!!a,[x,C]=Gn(o,s),w=AL(x),T=S.useMemo(()=>EL(c),[JSON.stringify(c)]),[E,D,O]=WL(T,i),[k,A,j]=JL(b,w,D,O,NL(E,T)),M=qL(b,zn(e=>{if(C(e),u){let t=AL(e),n=t.map(e=>ML(e,E,T).map(e=>e.option));u(b?t:t[0],b?n:n[0])}}),k,A,j,D,O,d),N=zn(e=>{M(e)}),P=S.useMemo(()=>({options:E,fieldNames:T,values:k,halfValues:A,changeOnSelect:l,onSelect:N,checkable:a,searchOptions:[],popupPrefixCls:void 0,loadData:f,expandTrigger:p,expandIcon:m,loadingIcon:h,popupMenuColumnStyle:void 0,optionRender:y}),[E,T,k,A,l,N,a,f,p,m,h,y]),F=`${t}-panel`,I=!E.length;return S.createElement(bL.Provider,{value:P},S.createElement(`div`,{className:J(F,{[`${F}-rtl`]:g===`rtl`,[`${F}-empty`]:I},r),style:n},I?_:S.createElement(ZL,{prefixCls:t,searchValue:``,multiple:b,toggleOpen:Rre,open:!0,direction:g,disabled:v})))}function eR(){return eR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-cascader`,fieldNames:i,defaultValue:a,value:o,changeOnSelect:s,onChange:c,displayRender:l,checkable:u,showSearch:d,expandTrigger:f,options:p,popupPrefixCls:m,loadData:h,open:g,popupClassName:_,popupMenuColumnStyle:v,popupStyle:y,classNames:b,styles:x,placement:C,onPopupVisibleChange:w,expandIcon:T=`>`,loadingIcon:E,children:D,popupMatchSelectWidth:O=!1,showCheckedStrategy:k=CL,optionRender:A,...j}=e,M=Xn(n),N=!!u,[P,F]=Gn(a,o),I=AL(P),L=S.useMemo(()=>EL(i),[JSON.stringify(i)]),[R,z,B]=WL(L,p),[V,H]=Ore(d,e),{autoClearSearchValue:U=!0,searchValue:ee,onSearch:W}=H,[te,G]=Gn(``,ee),ne=te||``,K=(e,t)=>{G(e),t.source!==`blur`&&W&&W(e)},re=bre(ne,R,L,m||r,H,s||N),[ie,ae,q]=JL(N,I,z,B,NL(R,L)),oe=wre(S.useMemo(()=>{let e=jL(TL(ie),z,k);return[...q,...B(e)]},[ie,z,B,q,k]),R,L,N,l),se=zn(e=>{if(F(e),c){let t=AL(e),n=t.map(e=>ML(e,R,L).map(e=>e.option));c(N?t:t[0],N?n:n[0])}}),ce=qL(N,se,ie,ae,q,z,B,k),le=zn(e=>{(!N||U)&&G(``),ce(e)}),ue=(e,t)=>{if(t.type===`clear`){se([]);return}let{valueCells:n}=t.values[0];le(n)},de=e=>{w?.(e)},fe=S.useMemo(()=>({classNames:b,styles:x,options:R,fieldNames:L,values:ie,halfValues:ae,changeOnSelect:s,onSelect:le,checkable:u,searchOptions:re,popupPrefixCls:m,loadData:h,expandTrigger:f,expandIcon:T,loadingIcon:E,popupMenuColumnStyle:v,optionRender:A}),[b,x,R,L,ie,ae,s,le,u,re,m,h,f,T,E,v,A]),pe=!(ne?re:R).length,me=ne&&H.matchInputWidth||pe?{}:{minWidth:`auto`};return S.createElement(bL.Provider,{value:fe},S.createElement(uS,eR({},j,{ref:t,id:M,prefixCls:r,autoClearSearchValue:U,popupMatchSelectWidth:O,classNames:b,styles:x,popupStyle:{...me,...y},displayValues:oe,onDisplayValuesChange:ue,mode:N?`multiple`:void 0,searchValue:ne,onSearch:K,showSearch:V,OptionList:Lre,emptyOptions:pe,open:g,popupClassName:_,placement:C,onPopupVisibleChange:de,getRawInputElement:()=>D})))});tR.SHOW_PARENT=CL,tR.SHOW_CHILD=xre,tR.Panel=$L;var nR=tR;function rR(e,t){let{getPrefixCls:n,direction:r,renderEmpty:i}=S.useContext(ga),a=t||r;return[n(`select`,e),n(`cascader`,e),a,i]}function iR(e,t){return S.useMemo(()=>t?S.createElement(`span`,{className:`${e}-checkbox-inner`}):!1,[e,t])}var zre=S.createElement(Xm,{spin:!0}),Bre=S.createElement(Vg,null),Vre=S.createElement(Gw,null);function aR({contextExpandIcon:e,contextLoadingIcon:t,expandIcon:n,loadingIcon:r,isRtl:i}){return S.useMemo(()=>({expandIcon:n??e??(i?Vre:Bre),loadingIcon:r??t??zre}),[e,t,n,i,r])}var Hre=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:{...Ul(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...Ul(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...Ul(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${Y(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...gg(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${Y(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...gg()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Kl(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},ore=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,...Gl(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:Y(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:Y(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${a}`}}}},sre=e=>({margin:`${Y(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...Gl(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...Hl},"&-description":{color:e.colorTextDescription}}),cre=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${Y(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${Y(e.padding)} ${Y(i)}`}}},lre=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},ure=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s,motionDurationMid:c}=e;return{[t]:{...Ul(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:ire(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:are(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:ore(e),[`${t}-meta`]:sre(e)},[`${t}-bordered`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${c}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:cre(e),[`${t}-loading`]:lre(e),[`${t}-rtl`]:{direction:`rtl`}}},dre=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${Y(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},fre=Ql(`Card`,e=>{let t=dc(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[ure(t),dre(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),pre=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return S.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return S.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},S.createElement(`span`,null,e))}))},mre=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:m,cover:h,actions:g,tabList:_,children:v,activeTabKey:y,defaultActiveTabKey:b,tabBarExtraContent:x,hoverable:C,tabProps:w={},classNames:T,styles:E,...D}=e,{getPrefixCls:O,direction:k,className:A,style:j,classNames:M,styles:N}=ya(`card`),[P]=dC(`card`,f,d),F=Th(p),I={...e,size:F,variant:P},[L,R]=Cf([M,T],[N,E],{props:I}),z=t=>{e.onTabChange?.(t)},B=S.useMemo(()=>ki(v),[v]),V=S.useMemo(()=>B.some(e=>S.isValidElement(e)&&e.type===gL),[B]),H=O(`card`,n),[U,ee]=fre(H),W=S.createElement(Ry,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),te=y!==void 0,G={...w,[te?`activeKey`:`defaultActiveKey`]:te?y:b,tabBarExtraContent:x},ne,K=F===`small`?F:`large`,re=_?S.createElement(hL,{size:K,...G,className:`${H}-head-tabs`,onChange:z,items:_.map(({tab:e,...t})=>({label:e,...t}))}):null;if(l||o||re){let e=J(`${H}-head`,L.header),t=J(`${H}-head-title`,L.title),n=J(`${H}-extra`,L.extra),r={...s,...R.header};ne=S.createElement(`div`,{className:e,style:r},S.createElement(`div`,{className:`${H}-head-wrapper`},l&&S.createElement(`div`,{className:t,style:R.title},l),o&&S.createElement(`div`,{className:n,style:R.extra},o)),re)}let ie=J(`${H}-cover`,L.cover),ae=h?S.createElement(`div`,{className:ie,style:R.cover},h):null,q=J(`${H}-body`,L.body),oe={...c,...R.body},se=u||B.length?S.createElement(`div`,{className:q,style:oe},u?W:v):null,ce=J(`${H}-actions`,L.actions),le=g?.length?S.createElement(pre,{actionClasses:ce,actionStyle:R.actions,actions:g}):null,ue=gi(D,[`onTabChange`]),de=J(H,A,{[`${H}-loading`]:u,[`${H}-bordered`]:P!==`borderless`,[`${H}-hoverable`]:C,[`${H}-contain-grid`]:V,[`${H}-contain-tabs`]:_?.length,[`${H}-small`]:F===`small`,[`${H}-type-${m}`]:!!m,[`${H}-rtl`]:k===`rtl`},r,i,U,ee,L.root),fe={...R.root,...j,...a};return S.createElement(`div`,{ref:t,...ue,className:de,style:fe},ne,ae,se,le)}),hre=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:p,styles:m}=ya(`cardMeta`),h=`${u(`card`,t)}-meta`,[g,_]=Cf([p,s],[m,c],{props:e}),v=J(h,n,d,g.root),y={...f,..._.root,...o},b=J(`${h}-avatar`,g.avatar),x=J(`${h}-title`,g.title),C=J(`${h}-description`,g.description),w=J(`${h}-section`,g.section),T=r?S.createElement(`div`,{className:b,style:_.avatar},r):null,E=i?S.createElement(`div`,{className:x,style:_.title},i):null,D=a?S.createElement(`div`,{className:C,style:_.description},a):null,O=E||D?S.createElement(`div`,{className:w,style:_.section},E,D):null;return S.createElement(`div`,{...l,className:v,style:y},T,O)},_L=mre;_L.Grid=gL,_L.Meta=hre;function gre(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function vL(e,t){if(e==null)return{};var n,r,i=gre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;re?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}function vre(e,t,n){var r=(n||{}).atBegin;return _re(e,t,{debounceMode:(r===void 0?!1:r)!==!1})}var yL=S.createContext({}),bL=`__rc_cascader_search_mark__`,yre=(e,t,{label:n=``})=>t.some(t=>String(t[n]).toLowerCase().includes(e.toLowerCase())),bre=(e,t,n,r)=>t.map(e=>e[r.label]).join(` / `),xre=(e,t,n,r,i,a)=>{let{filter:o=yre,render:s=bre,limit:c=50,sort:l}=i;return S.useMemo(()=>{let i=[];if(!e)return[];function u(t,d,f=!1){t.forEach(t=>{if(!l&&c!==!1&&c>0&&i.length>=c)return;let p=[...d,t],m=t[n.children],h=f||t.disabled;(!m||m.length===0||a)&&o(e,p,{label:n.label})&&i.push({...t,disabled:h,[n.label]:s(e,p,r,n),[bL]:p,[n.children]:void 0}),m&&u(t[n.children],p,h)})}return u(t,[]),l&&i.sort((t,r)=>l(t[bL],r[bL],e,n)),c!==!1&&c>0?i.slice(0,c):i},[e,t,n,r,s,a,o,l,c])},xL=`__RC_CASCADER_SPLIT__`,SL=`SHOW_PARENT`,Sre=`SHOW_CHILD`;function CL(e){return e.join(xL)}function wL(e){return e.map(CL)}function Cre(e){return e.split(xL)}function TL(e){let{label:t,value:n,children:r}=e||{},i=n||`value`;return{label:t||`label`,value:i,key:i,children:r||`children`}}function EL(e,t){return e.isLeaf??!e[t.children]?.length}function DL(e){let t=e.parentElement;if(!t)return;let n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}function OL(e,t){return e.map(e=>e[bL]?.map(e=>e[t.value]))}function wre(e){return Array.isArray(e)&&Array.isArray(e[0])}function kL(e){return e?wre(e)?e:(e.length===0?[]:[e]).map(e=>Array.isArray(e)?e:[e]):[]}function AL(e,t,n){let r=new Set(e),i=t();return e.filter(e=>{let t=i[e],a=t?t.parent:null,o=t?t.children:null;return t&&t.node.disabled?!0:n===`SHOW_CHILD`?!(o&&o.some(e=>e.key&&r.has(e.key))):!(a&&!a.node.disabled&&r.has(a.key))})}function jL(e,t,n,r=!1){let i=t,a=[];for(let t=0;t{let t=e[n.value];return r?String(t)===String(o):t===o}),c=s===-1?null:i?.[s];a.push({value:c?.[n.value]??o,index:s,option:c}),i=c?.[n.children]}return a}var Tre=((e,t,n,r,i)=>S.useMemo(()=>{let a=i||(e=>{let t=r?e.slice(-1):e;return t.every(e=>[`string`,`number`].includes(typeof e))?t.join(` / `):t.reduce((e,t,n)=>{let r=S.isValidElement(t)?S.cloneElement(t,{key:n}):t;return n===0?[r]:[...e,` / `,r]},[])});return e.map(e=>{let r=jL(e,t,n),i=a(r.map(({option:e,value:t})=>e?.[n.label]??t),r.map(({option:e})=>e)),o=CL(e);return{label:i,value:o,key:o,valueCells:e,disabled:r[r.length-1]?.option?.disabled}})},[e,t,n,i,r]));function ML(e,t){return S.useCallback(n=>{let r=[],i=[];return n.forEach(n=>{jL(n,e,t).every(e=>e.option)?i.push(n):r.push(n)}),[i,r]},[e,t])}function NL(e,t){return e[t]}function PL(e,t){return`${e}-${t}`}function Ere(e){return e&&e.type&&e.type.isTreeNode}function FL(e,t){return e??t}function IL(e){let{title:t,_title:n,key:r,children:i}=e||{},a=t||`title`;return{title:a,_title:n||[a],key:r||`key`,children:i||`children`}}function LL(e){function t(e){return ki(e).map(e=>{if(!Ere(e))return ui(!e,`Tree/TreeNode can only accept TreeNode as children.`),null;let{key:n}=e,{children:r,...i}=e.props,a={key:n,...i},o=t(r);return o.length&&(a.children=o),a}).filter(e=>e)}return t(e)}function RL(e,t,n){let{_title:r,key:i,children:a}=IL(n),o=new Set(t===!0?[]:t),s=[];function c(e,n=null){return e.map((l,u)=>{let d=PL(n?n.pos:`0`,u),f=FL(l[i],d),p;for(let e=0;ee[a]:typeof a==`function`&&(u=e=>a(e)):u=(e,t)=>FL(e[s],t);function d(n,r,i,a){let o=n?n[l]:e,s=n?PL(i.pos,r):`0`,c=n?[...a,n]:[];n&&t({node:n,index:r,pos:s,key:u(n,s),parentPos:i.node?i.pos:null,level:i.level+1,nodes:c}),o&&o.forEach((e,t)=>{d(e,t,{node:n,pos:s,level:i?i.level+1:-1},c)})}d(null)}function zL(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:i,childrenPropName:a,fieldNames:o}={},s){let c=i||s,l={},u={},d={posEntities:l,keyEntities:u};return t&&(d=t(d)||d),Dre(e,e=>{let{node:t,index:r,pos:i,key:a,parentPos:o,level:s,nodes:c}=e,f={node:t,nodes:c,index:r,key:a,pos:i,level:s},p=FL(a,i);l[i]=f,u[p]=f,f.parent=l[o],f.parent&&(f.parent.children=f.parent.children||[],f.parent.children.push(f)),n&&n(f,d)},{externalGetKey:c,childrenPropName:a,fieldNames:o}),r&&r(d),d}function BL(e,t,n,r){return e===!1?!1:e||!t&&!n||t&&r&&!n}function VL(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:i,checkedKeys:a,halfCheckedKeys:o,dragOverNodeKey:s,dropPosition:c,keyEntities:l}){let u=NL(l,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:a.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(u?u.pos:``),dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function HL(e){let{data:t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,eventKey:p}=e,m={...t,expanded:n,selected:r,checked:i,loaded:a,loading:o,halfChecked:s,dragOver:c,dragOverGapTop:l,dragOverGapBottom:u,pos:d,active:f,key:p};return`props`in m||Object.defineProperty(m,`props`,{get(){return ui(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}var Ore=((e,t)=>{let n=S.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}});return S.useCallback(()=>(n.current.options!==e&&(n.current.options=e,n.current.info=zL(e,{fieldNames:t,initWrapper:e=>({...e,pathKeyEntities:{}}),processEntity:(e,n)=>{let r=e.nodes.map(e=>e[t.value]).join(xL);n.pathKeyEntities[r]=e,e.key=r}})),n.current.info.pathKeyEntities),[t,e])});function UL(e,t){let n=S.useMemo(()=>t||[],[t]),r=Ore(n,e);return[n,r,S.useCallback(t=>{let n=r();return t.map(t=>{let{nodes:r}=n[t];return r.map(t=>t[e.value])})},[r,e])]}function kre(e,t){let{autoClearSearchValue:n,searchValue:r,onSearch:i}=t;return S.useMemo(()=>{if(!e)return[!1,{}];let t={matchInputWidth:!0,limit:50,autoClearSearchValue:n,searchValue:r,onSearch:i};return e&&typeof e==`object`&&(t={...t,...e}),t.limit<=0&&(t.limit=!1),[!0,t]},[e,n,r,i])}function WL(e,t){let n=new Set;return e.forEach(e=>{t.has(e)||n.add(e)}),n}function Are(e){let{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function jre(e,t,n,r){let i=new Set(e),a=new Set;for(let e=0;e<=n;e+=1)(t.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:a=[]}=e;i.has(t)&&!r(n)&&a.filter(e=>!r(e.node)).forEach(e=>{i.add(e.key)})});let o=new Set;for(let e=n;e>=0;--e)(t.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(r(n)||!e.parent||o.has(e.parent.key))return;if(r(e.parent.node)){o.add(t.key);return}let s=!0,c=!1;(t.children||[]).filter(e=>!r(e.node)).forEach(({key:e})=>{let t=i.has(e);s&&!t&&(s=!1),!c&&(t||a.has(e))&&(c=!0)}),s&&i.add(t.key),c&&a.add(t.key),o.add(t.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(WL(a,i))}}function Mre(e,t,n,r,i){let a=new Set(e),o=new Set(t);for(let e=0;e<=r;e+=1)(n.get(e)||new Set).forEach(e=>{let{key:t,node:n,children:r=[]}=e;!a.has(t)&&!o.has(t)&&!i(n)&&r.filter(e=>!i(e.node)).forEach(e=>{a.delete(e.key)})});o=new Set;let s=new Set;for(let e=r;e>=0;--e)(n.get(e)||new Set).forEach(e=>{let{parent:t,node:n}=e;if(i(n)||!e.parent||s.has(e.parent.key))return;if(i(e.parent.node)){s.add(t.key);return}let r=!0,c=!1;(t.children||[]).filter(e=>!i(e.node)).forEach(({key:e})=>{let t=a.has(e);r&&!t&&(r=!1),!c&&(t||o.has(e))&&(c=!0)}),r||a.delete(t.key),c&&o.add(t.key),s.add(t.key)});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(WL(o,a))}}function GL(e,t,n,r){let i=[],a;a=r||Are;let o=new Set(e.filter(e=>{let t=!!NL(n,e);return t||i.push(e),t})),s=new Map,c=0;Object.keys(n).forEach(e=>{let t=n[e],{level:r}=t,i=s.get(r);i||(i=new Set,s.set(r,i)),i.add(t),c=Math.max(c,r)}),ui(!i.length,`Tree missing follow keys: ${i.slice(0,100).map(e=>`'${e}'`).join(`, `)}`);let l;return l=t===!0?jre(o,s,c,a):Mre(o,t.halfCheckedKeys,s,c,a),l}function KL(e,t,n,r,i,a,o,s){return c=>{if(!e)t(c);else{let e=CL(c),l=wL(n),u=wL(r),d=l.includes(e),f=i.some(t=>CL(t)===e),p=n,m=i;if(f&&!d)m=i.filter(t=>CL(t)!==e);else{let t=d?l.filter(t=>t!==e):[...l,e],n=a(),r;d?{checkedKeys:r}=GL(t,{checked:!1,halfCheckedKeys:u},n):{checkedKeys:r}=GL(t,!0,n),p=o(AL(r,a,s))}t([...m,...p])}}}function qL(e,t,n,r,i){return S.useMemo(()=>{let[a,o]=i(t);if(!e||!t.length)return[a,[],o];let{checkedKeys:s,halfCheckedKeys:c}=GL(wL(a),!0,n());return[r(s),r(c),o]},[e,t,n,r,i])}function Nre({prefixCls:e,checked:t,halfChecked:n,disabled:r,onClick:i,disableCheckbox:a}){let{checkable:o}=S.useContext(yL),s=typeof o==`boolean`?null:o;return S.createElement(`span`,{className:J(`${e}`,{[`${e}-checked`]:t,[`${e}-indeterminate`]:!t&&n,[`${e}-disabled`]:r||a}),onClick:i},s)}function JL(){return JL=Object.assign?Object.assign.bind():function(e){for(var t=1;tf||e,O=S.useMemo(()=>n.map(e=>{let{disabled:t,disableCheckbox:n}=e,r=e[bL],a=e.__cascader_fix_label__??e[g.label],o=e[g.value],s=EL(e,g),d=r?r.map(e=>e[g.value]):[...i,o],f=CL(d);return{disabled:t,label:a,value:o,isLeaf:s,isLoading:u.includes(f),checked:c.has(f),halfChecked:l.has(f),option:e,disableCheckbox:n,fullPath:d,fullPathKey:f}}),[n,c,g,l,u,i]);return S.useEffect(()=>{if(h.current){let e=`.${m}-active`,t=h.current.querySelector(e);t&&DL(t)}},[r,m]),S.createElement(`ul`,{className:J(p,w?.popup?.list),style:T?.popup?.list,ref:h,role:`menu`},O.map(({disabled:n,label:i,value:c,isLeaf:l,isLoading:u,checked:f,halfChecked:p,option:h,fullPath:g,fullPathKey:v,disableCheckbox:O})=>{let k=xi(h,{aria:!0,data:!0}),A=()=>{if(D(n))return;let e=[...g];E&&l&&e.pop(),s(e)},j=()=>{d(h)&&!D(n)&&o(g,l)},M;return typeof h.title==`string`?M=h.title:typeof i==`string`&&(M=i),S.createElement(`li`,JL({key:v},k,{className:J(m,w?.popup?.listItem,{[`${m}-expand`]:!l,[`${m}-active`]:r===c||r===v,[`${m}-disabled`]:D(n),[`${m}-loading`]:u}),style:{...x,...T?.popup?.listItem},role:`menuitemcheckbox`,title:M,"aria-checked":f,"data-path-key":v,onClick:()=>{A(),!O&&(!t||l)&&j()},onDoubleClick:()=>{_&&a(!1)},onMouseEnter:()=>{E&&A()},onMouseDown:e=>{e.preventDefault()}}),t&&S.createElement(Nre,{prefixCls:`${e}-checkbox`,checked:f,halfChecked:p,disabled:D(n)||O,disableCheckbox:O,onClick:e=>{O||(e.stopPropagation(),j())}}),S.createElement(`div`,{className:`${m}-content`},C&&c!==`__EMPTY__`?C(h):i),!u&&y&&!l&&S.createElement(`div`,{className:`${m}-expand-icon`},y),u&&b&&S.createElement(`div`,{className:`${m}-loading-icon`},b))}))}var Ire=(e,t)=>{let{values:n}=S.useContext(yL),r=n[0],[i,a]=S.useState([]);return S.useEffect(()=>{e||a(r||[])},[t,r]),[i,a]},Lre=((e,t,n,r,i,a,o)=>{let{direction:s,searchValue:c,toggleOpen:l,open:u}=o,d=s===`rtl`,[f,p,m,h]=S.useMemo(()=>{let e=-1,i=t,a=[],o=[],s=r.length,c=OL(t,n);for(let t=0;t(c[i]?CL(c[i]):e[n.value])===r[t]);if(s===-1)break;e=s,a.push(e),o.push(r[t]),i=i[e][n.children]}let l=t;for(let e=0;e{i(e)},_=e=>{let t=m.length,r=p;r===-1&&e<0&&(r=t);for(let i=0;i{f.length>1?g(f.slice(0,-1)):l(!1)},y=()=>{let e=(m[p]?.[n.children]||[]).find(e=>!e.disabled);e&&g([...f,e[n.value]])};S.useImperativeHandle(e,()=>({onKeyDown:e=>{let{which:t}=e;switch(t){case Qr.UP:case Qr.DOWN:{let e=0;t===Qr.UP?e=-1:t===Qr.DOWN&&(e=1),e!==0&&_(e);break}case Qr.LEFT:if(c)break;d?y():v();break;case Qr.RIGHT:if(c)break;d?v():y();break;case Qr.BACKSPACE:c||v();break;case Qr.ENTER:if(f.length){let e=m[p]?.__rc_cascader_search_mark__||[];e.length?a(e.map(e=>e[n.value]),e[e.length-1]):a(f,m[p])}break;case Qr.ESC:l(!1),u&&e.stopPropagation()}},onKeyUp:()=>{}}))});function YL(){return YL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,multiple:r,searchValue:i,toggleOpen:a,notFoundContent:o,direction:s,open:c,disabled:l,lockOptions:u=!1}=e,d=S.useRef(null),f=s===`rtl`,{options:p,values:m,halfValues:h,fieldNames:g,changeOnSelect:_,onSelect:v,searchOptions:y,popupPrefixCls:b,loadData:x,expandTrigger:C}=S.useContext(yL),w=b||n,[T,E]=S.useState([]),D=e=>{if(!x||i)return;let t=jL(e,p,g).map(({option:e})=>e),n=t[t.length-1];if(n&&!EL(n,g)){let n=CL(e);E(e=>[...e,n]),x(t)}};S.useEffect(()=>{T.length&&T.forEach(e=>{let t=jL(Cre(e),p,g,!0).map(({option:e})=>e),n=t[t.length-1];(!n||n[g.children]||EL(n,g))&&E(t=>t.filter(t=>t!==e))})},[p,T,g]);let O=S.useMemo(()=>new Set(wL(m)),[m]),k=S.useMemo(()=>new Set(wL(h)),[h]),[A,j]=Ire(r,c),M=e=>{j(e),D(e)},N=e=>{if(l)return!1;let{disabled:t}=e,n=EL(e,g);return!t&&(n||_||r)},P=(e,t,n=!1)=>{v(e),!r&&(t||_&&(C===`hover`||n))&&a(!1)},F=S.useMemo(()=>i?y:p,[i,y,p]),I=Zn(()=>F,[c,u],(e,t)=>!!t[0]&&!t[1]),L=S.useMemo(()=>{let e=[{options:I}],t=I,n=OL(t,g);for(let r=0;r(n[t]?CL(n[t]):e[g.value])===i)?.[g.children];if(!a?.length)break;t=a,e.push({options:a})}return e},[I,A,g]);Lre(t,I,g,A,M,(e,t)=>{N(t)&&P(e,EL(t,g),!0)},{direction:s,searchValue:i,toggleOpen:a,open:c}),S.useEffect(()=>{if(!i)for(let e=0;e{let n=A.slice(0,t),r=A[t];return S.createElement(Fre,YL({key:t},B,{prefixCls:w,options:e.options,prevValuePath:n,activeValue:r}))});return S.createElement(`div`,{className:J(`${w}-menus`,{[`${w}-menu-empty`]:R,[`${w}-rtl`]:f}),ref:d},V)});function ZL(){return ZL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{lockOptions:n,...r}=ax();return S.createElement(XL,ZL({},e,r,{lockOptions:n,ref:t}))});function zre(){}function QL(e){let{prefixCls:t=`rc-cascader`,style:n,className:r,options:i,checkable:a,defaultValue:o,value:s,fieldNames:c,changeOnSelect:l,onChange:u,showCheckedStrategy:d,loadData:f,expandTrigger:p,expandIcon:m=`>`,loadingIcon:h,direction:g,notFoundContent:_=`Not Found`,disabled:v,optionRender:y}=e,b=!!a,[x,C]=Gn(o,s),w=kL(x),T=S.useMemo(()=>TL(c),[JSON.stringify(c)]),[E,D,O]=UL(T,i),[k,A,j]=qL(b,w,D,O,ML(E,T)),M=KL(b,zn(e=>{if(C(e),u){let t=kL(e),n=t.map(e=>jL(e,E,T).map(e=>e.option));u(b?t:t[0],b?n:n[0])}}),k,A,j,D,O,d),N=zn(e=>{M(e)}),P=S.useMemo(()=>({options:E,fieldNames:T,values:k,halfValues:A,changeOnSelect:l,onSelect:N,checkable:a,searchOptions:[],popupPrefixCls:void 0,loadData:f,expandTrigger:p,expandIcon:m,loadingIcon:h,popupMenuColumnStyle:void 0,optionRender:y}),[E,T,k,A,l,N,a,f,p,m,h,y]),F=`${t}-panel`,I=!E.length;return S.createElement(yL.Provider,{value:P},S.createElement(`div`,{className:J(F,{[`${F}-rtl`]:g===`rtl`,[`${F}-empty`]:I},r),style:n},I?_:S.createElement(XL,{prefixCls:t,searchValue:``,multiple:b,toggleOpen:zre,open:!0,direction:g,disabled:v})))}function $L(){return $L=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-cascader`,fieldNames:i,defaultValue:a,value:o,changeOnSelect:s,onChange:c,displayRender:l,checkable:u,showSearch:d,expandTrigger:f,options:p,popupPrefixCls:m,loadData:h,open:g,popupClassName:_,popupMenuColumnStyle:v,popupStyle:y,classNames:b,styles:x,placement:C,onPopupVisibleChange:w,expandIcon:T=`>`,loadingIcon:E,children:D,popupMatchSelectWidth:O=!1,showCheckedStrategy:k=SL,optionRender:A,...j}=e,M=Xn(n),N=!!u,[P,F]=Gn(a,o),I=kL(P),L=S.useMemo(()=>TL(i),[JSON.stringify(i)]),[R,z,B]=UL(L,p),[V,H]=kre(d,e),{autoClearSearchValue:U=!0,searchValue:ee,onSearch:W}=H,[te,G]=Gn(``,ee),ne=te||``,K=(e,t)=>{G(e),t.source!==`blur`&&W&&W(e)},re=xre(ne,R,L,m||r,H,s||N),[ie,ae,q]=qL(N,I,z,B,ML(R,L)),oe=Tre(S.useMemo(()=>{let e=AL(wL(ie),z,k);return[...q,...B(e)]},[ie,z,B,q,k]),R,L,N,l),se=zn(e=>{if(F(e),c){let t=kL(e),n=t.map(e=>jL(e,R,L).map(e=>e.option));c(N?t:t[0],N?n:n[0])}}),ce=KL(N,se,ie,ae,q,z,B,k),le=zn(e=>{(!N||U)&&G(``),ce(e)}),ue=(e,t)=>{if(t.type===`clear`){se([]);return}let{valueCells:n}=t.values[0];le(n)},de=e=>{w?.(e)},fe=S.useMemo(()=>({classNames:b,styles:x,options:R,fieldNames:L,values:ie,halfValues:ae,changeOnSelect:s,onSelect:le,checkable:u,searchOptions:re,popupPrefixCls:m,loadData:h,expandTrigger:f,expandIcon:T,loadingIcon:E,popupMenuColumnStyle:v,optionRender:A}),[b,x,R,L,ie,ae,s,le,u,re,m,h,f,T,E,v,A]),pe=!(ne?re:R).length,me=ne&&H.matchInputWidth||pe?{}:{minWidth:`auto`};return S.createElement(yL.Provider,{value:fe},S.createElement(cS,$L({},j,{ref:t,id:M,prefixCls:r,autoClearSearchValue:U,popupMatchSelectWidth:O,classNames:b,styles:x,popupStyle:{...me,...y},displayValues:oe,onDisplayValuesChange:ue,mode:N?`multiple`:void 0,searchValue:ne,onSearch:K,showSearch:V,OptionList:Rre,emptyOptions:pe,open:g,popupClassName:_,placement:C,onPopupVisibleChange:de,getRawInputElement:()=>D})))});eR.SHOW_PARENT=SL,eR.SHOW_CHILD=Sre,eR.Panel=QL;var tR=eR;function nR(e,t){let{getPrefixCls:n,direction:r,renderEmpty:i}=S.useContext(ga),a=t||r;return[n(`select`,e),n(`cascader`,e),a,i]}function rR(e,t){return S.useMemo(()=>t?S.createElement(`span`,{className:`${e}-checkbox-inner`}):!1,[e,t])}var Bre=S.createElement(Ym,{spin:!0}),Vre=S.createElement(Bg,null),Hre=S.createElement(Uw,null);function iR({contextExpandIcon:e,contextLoadingIcon:t,expandIcon:n,loadingIcon:r,isRtl:i}){return S.useMemo(()=>({expandIcon:n??e??(i?Hre:Vre),loadingIcon:r??t??Bre}),[e,t,n,i,r])}var Ure=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:{...Ul(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...Ul(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...Ul(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${Y(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...hg(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${Y(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...hg()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:Kl(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` ${i}:not(${i}-disabled), ${t}:not(${t}-disabled) - `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...gg()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function oR(e,t){return Hre(dc(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var sR=Ql(`Checkbox`,(e,{prefixCls:t})=>[oR(t,e)]),cR=e=>{let{prefixCls:t,componentCls:n}=e,r=`${n}-menu-item`,i=` + `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...hg()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function aR(e,t){return Ure(dc(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var oR=Ql(`Checkbox`,(e,{prefixCls:t})=>[aR(t,e)]),sR=e=>{let{prefixCls:t,componentCls:n}=e,r=`${n}-menu-item`,i=` &${r}-expand ${r}-expand-icon, ${r}-loading-icon -`;return[oR(`${t}-checkbox`,e),{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS,pointerEvents:`unset`},"&-menus":{display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:`100%`,height:`auto`,[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,flexShrink:0,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.menuPadding,overflow:`auto`,verticalAlign:`top`,listStyle:`none`,"-ms-overflow-style":`-ms-autohiding-scrollbar`,"&:not(:last-child)":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&-item":{display:`flex`,maxWidth:400,flexWrap:`nowrap`,alignItems:`center`,padding:e.optionPadding,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg}},"&-content":{flex:`auto`,minWidth:0,...Hl},[i]:{marginInlineStart:e.paddingXXS,color:e.colorIcon,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}}}}}]},Ure=e=>{let{componentCls:t,antCls:n}=e;return[{[t]:{width:e.controlWidth}},{[`${t}-dropdown`]:[{[`&${n}-select-dropdown`]:{padding:0}},cR(e)]},{[`${t}-dropdown-rtl`]:{direction:`rtl`}},h_(e)]},lR=e=>{let t=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:e.controlItemBgActive,optionSelectedFontWeight:e.fontWeightStrong,optionPadding:`${t}px ${e.paddingSM}px`,menuPadding:e.paddingXXS,optionSelectedColor:e.colorText}},uR=Ql(`Cascader`,Ure,lR,{resetFont:!1,unitless:{optionSelectedFontWeight:!0}}),Wre=$l([`Cascader`,`Panel`],e=>{let{componentCls:t}=e;return{[`${t}-panel`]:[cR(e),{display:`inline-flex`,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,borderRadius:e.borderRadiusLG,overflowX:`auto`,maxWidth:`100%`,[`${t}-menus`]:{alignItems:`stretch`},[`${t}-menu`]:{height:`auto`},"&-empty":{padding:e.paddingXXS}}]}},lR,{resetFont:!1});function Gre(e){let{prefixCls:t,className:n,multiple:r,rootClassName:i,notFoundContent:a,direction:o,expandIcon:s,loadingIcon:c,disabled:l}=e,{expandIcon:u,loadingIcon:d}=ya(`cascader`),f=S.useContext(mm),p=l??f,[m,h,g,_]=rR(t,o),v=sp(h),[y,b]=uR(h,v);Wre(h);let{expandIcon:x,loadingIcon:C}=aR({contextExpandIcon:u,contextLoadingIcon:d,expandIcon:s,loadingIcon:c,isRtl:g===`rtl`}),w=a||_?.(`Cascader`)||S.createElement(fC,{componentName:`Cascader`}),T=iR(h,r);return S.createElement($L,{...e,checkable:T,prefixCls:h,className:J(n,y,i,b,v),notFoundContent:w,direction:g,expandIcon:x,loadingIcon:C,disabled:p})}var{SHOW_CHILD:Kre,SHOW_PARENT:qre}=nR,Jre=(e,t,n)=>{let r=e.toLowerCase().split(t).reduce((e,n,r)=>r===0?[n]:[].concat(pa(e),[t,n]),[]),i=[],a=0;return r.forEach((t,r)=>{let o=a+t.length,s=e.slice(a,o);a=o,r%2==1&&(s=S.createElement(`span`,{className:`${n}-menu-item-keyword`,key:`separator-${r}`},s)),i.push(s)}),i},Yre=(e,t,n,r)=>{let i=[],a=e.toLowerCase();return t.forEach((e,t)=>{t!==0&&i.push(` / `);let o=e[r.label],s=typeof o;(s===`string`||s===`number`)&&(o=Jre(String(o),a,n)),i.push(o)}),i},dR=S.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,className:a,rootClassName:o,multiple:s,bordered:c=!0,transitionName:l,choiceTransitionName:u=``,popupClassName:d,expandIcon:f,placement:p,showSearch:m,allowClear:h=!0,notFoundContent:g,direction:_,getPopupContainer:v,status:y,showArrow:b,builtinPlacements:x,style:C,variant:w,dropdownClassName:T,dropdownRender:E,onDropdownVisibleChange:D,onPopupVisibleChange:O,dropdownMenuColumnStyle:k,popupRender:A,dropdownStyle:j,popupMenuColumnStyle:M,onOpenChange:N,styles:P,classNames:F,loadingIcon:I,...L}=e,R=gi(L,[`suffixIcon`]),{getPrefixCls:z,getPopupContainer:B,className:V,style:H,classNames:U,styles:ee,expandIcon:W,loadingIcon:te}=ya(`cascader`),{popupOverflow:G}=S.useContext(ga),{status:ne,hasFeedback:K,isFormItemInput:re,feedbackIcon:ie}=S.useContext(gy),ae=iC(ne,y),[q,oe,se,ce]=rR(n,_),le=se===`rtl`,ue=z(),de=sp(q),[fe,pe]=DC(q,de),me=sp(oe);uR(oe,me);let{compactSize:he,compactItemClassnames:ge}=kh(q,_),[_e,ve]=pC(`cascader`,w,c),ye=g||ce?.(`Cascader`)||S.createElement(fC,{componentName:`Cascader`}),be=RC(A||E),xe=M||k,Se=N||O||D,Ce=S.useMemo(()=>{if(!m)return m;let e={render:Yre};return nf(m)&&(e={...e,...m}),e},[m]),we=Eh(e=>r??he??e),Te=S.useContext(mm),Ee=i??Te,{expandIcon:De,loadingIcon:Oe}=aR({contextExpandIcon:W,contextLoadingIcon:te,expandIcon:f,loadingIcon:I,isRtl:le}),ke=iR(oe,s),Ae=zC(e.suffixIcon,b),{suffixIcon:je,removeIcon:Me,clearIcon:Ne}=LC({...e,loadingIcon:Oe,hasFeedback:K,feedbackIcon:ie,showSuffixIcon:Ae,multiple:s,prefixCls:q,componentName:`Cascader`}),Pe=S.useMemo(()=>p===void 0?le?`bottomRight`:`bottomLeft`:p,[p,le]),Fe=h===!0?{clearIcon:Ne}:h,Ie={...e,variant:_e,size:we,status:ae,disabled:Ee},[Le,Re]=Cf([U,F],[ee,P],{props:Ie},{popup:{_default:`root`}}),ze={...Re.popup?.root,...j},[Be]=Lf(`SelectLike`,ze?.zIndex),Ve=J(d||T,`${oe}-dropdown`,{[`${oe}-dropdown-rtl`]:se===`rtl`},o,de,Le.popup?.root,me,fe,pe);return S.createElement(nR,{prefixCls:q,className:J(!n&&oe,{[`${q}-lg`]:we===`large`,[`${q}-sm`]:we===`small`,[`${q}-rtl`]:le,[`${q}-${_e}`]:ve,[`${q}-in-form-item`]:re},rC(q,ae,K),ge,V,a,o,Le.root,de,me,fe,pe),disabled:Ee,style:{...Re.root,...H,...C},classNames:Le,styles:Re,...R,builtinPlacements:hC(x,G),direction:se,placement:Pe,notFoundContent:ye,allowClear:Fe,showSearch:Ce,expandIcon:De,suffixIcon:je,removeIcon:Me,loadingIcon:Oe,checkable:ke,popupClassName:Ve,popupPrefixCls:n||oe,popupStyle:{...ze,zIndex:Be},popupRender:be,popupMenuColumnStyle:xe,onPopupVisibleChange:Se,choiceTransitionName:gh(ue,``,u),transitionName:gh(ue,`slide-up`,l),getPopupContainer:v||B,ref:t})}),Xre=ix(dR,`popupAlign`,e=>gi(e,[`visible`]));dR.SHOW_PARENT=qre,dR.SHOW_CHILD=Kre,dR.Panel=Gre,dR._InternalPanelDoNotUseOrYouWillBeFired=Xre;var fR=S.createContext(null),pR=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=ya(`checkbox`),D=S.useContext(fR),{isFormItemInput:O}=S.useContext(gy),k=S.useContext(mm),A=(D?.disabled||c)??k,[j,M]=Gn(_,g),N=j,P=zn(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=lr(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=sp(L),[z,B]=sR(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,ee]=Cf([T,f],[E,p],{props:H}),W=J(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),te=J(U.icon,{[`${L}-indeterminate`]:i},vh,z),[G,ne]=RF(V.onClick);return S.createElement(Th,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:W,style:{...ee.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:G},S.createElement(LF,{...V,name:!s&&D?D.name:m,checked:N,onClick:ne,onChange:P,prefixCls:L,className:te,style:ee.icon,disabled:A,ref:I,value:h}),$d(r)&&S.createElement(`span`,{className:J(`${L}-label`,U.label),style:ee.label},r)))}),Zre=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(ga),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||ef(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(pa(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=pa(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=sp(C),[E,D]=sR(C,T),O=gi(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(pR,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:J(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=J(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(fR.Provider,{value:A},k))}),mR=pR;mR.Group=Zre,mR.__ANT_CHECKBOX=!0;var hR=(0,S.createContext)({});function gR(e){return e===`auto`?`1 1 auto`:ef(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var _R=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(ga),{gutter:i,wrap:a}=S.useContext(hR),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=Yee(_),[x]=tu(v,`col`),C={},w={};WC.forEach(t=>{let n={},i=e[t];ef(i)?n.span=i:nf(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:$d(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=gR(n.flex))});let T=J(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=ef(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=gR(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function vR(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(nf(e))for(let r=0;r{let[n,r]=S.useState(()=>tf(e)?e:``),i=()=>{if(tf(e)&&r(e),nf(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},bR=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(ga),p=YC(!0,null),m=yR(i,p),h=yR(r,p),g=d(`row`,n),[_,v]=Jee(g),y=vR(c,p),b=J(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=ef(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(hR.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),xR=_R,SR=c(o((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:`M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`minus`,theme:`outlined`}}))());function CR(){return CR=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,CR({},e,{ref:t,icon:SR.default}))),TR=c(o((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:`M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z`}}]},name:`up`,theme:`outlined`}}))());function ER(){return ER=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,ER({},e,{ref:t,icon:TR.default})));function OR(){return typeof BigInt==`function`}function kR(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function AR(e){var t=e.trim(),n=t.startsWith(`-`);n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,`$1`).replace(/\.0*$/,``).replace(/^0+/,``),t.startsWith(`.`)&&(t=`0${t}`);var r=t||`0`,i=r.split(`.`),a=i[0]||`0`,o=i[1]||`0`;a===`0`&&o===`0`&&(n=!1);var s=n?`-`:``;return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:o,fullStr:`${s}${r}`}}function jR(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes(`e`)}function MR(e){var t=Rs(e.toLowerCase().split(`e`),2),n=t[0],r=t[1],i=r===void 0?`0`:r,a=n.startsWith(`-`),o=Rs((a?n.slice(1):n).split(`.`),2),s=o[0],c=s===void 0?`0`:s,l=o[1],u=l===void 0?``:l;return{decimal:u,digits:`${c}${u}`.replace(/^0+/,``)||`0`,exponent:Number(i),integer:c,negative:a}}function NR(e){var t=e.decimal,n=e.digits,r=e.exponent,i=e.integer,a=e.negative;if(n===`0`)return`0`;var o=i.replace(/^0+/,``).length,s=(t.match(/^0*/)||[``])[0].length,c=(o||-s)+r,l=``;return l=c<=0?`0.${`0`.repeat(-c)}${n}`:c>=n.length?`${n}${`0`.repeat(c-n.length)}`:`${n.slice(0,c)}.${n.slice(c)}`,`${a?`-`:``}${l}`}function PR(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function FR(e){var t=String(e);return jR(e)?PR(MR(t)):t.includes(`.`)&&LR(t)?t.length-t.indexOf(`.`)-1:0}function IR(e){var t=String(e);if(jR(e)){if(e>2**53-1)return String(OR()?BigInt(e).toString():2**53-1);if(e<-(2**53-1))return String(OR()?BigInt(e).toString():-(2**53-1));var n=MR(t),r=PR(n);t=r>100?NR(n):e.toFixed(r)}return AR(t).fullStr}function LR(e){return typeof e==`number`?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var RR=function(){function e(t){if(Ws(this,e),Vs(this,`origin`,``),Vs(this,`negative`,void 0),Vs(this,`integer`,void 0),Vs(this,`decimal`,void 0),Vs(this,`decimalLen`,void 0),Vs(this,`empty`,void 0),Vs(this,`nan`,void 0),kR(t)){this.empty=!0;return}if(this.origin=String(t),t===`-`||Number.isNaN(t)){this.nan=!0;return}var n=t;if(jR(n)&&(n=Number(n)),n=typeof n==`string`?n:IR(n),LR(n)){var r=AR(n);this.negative=r.negative;var i=r.trimStr.split(`.`);this.integer=BigInt(i[0]);var a=i[1]||`0`;this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}return Ks(e,[{key:`getMark`,value:function(){return this.negative?`-`:``}},{key:`getIntegerStr`,value:function(){return this.integer.toString()}},{key:`getDecimalStr`,value:function(){return this.decimal.toString().padStart(this.decimalLen,`0`)}},{key:`alignDecimal`,value:function(e){var t=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,`0`)}`;return BigInt(t)}},{key:`negate`,value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:`cal`,value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),o=r(i),s=AR(a),c=`${s.negativeStr}${s.trimStr.padStart(o+1,`0`)}`;return new e(`${c.slice(0,-o)}.${c.slice(-o)}`)}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:`multi`,value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return e*2})}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return this.nan}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toString()===e?.toString()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:AR(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}]),e}(),zR=function(){function e(t){if(Ws(this,e),Vs(this,`origin`,``),Vs(this,`number`,void 0),Vs(this,`empty`,void 0),kR(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Ks(e,[{key:`negate`,value:function(){return new e(-this.toNumber())}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(FR(this.number),FR(n));return new e(r.toFixed(i))}},{key:`multi`,value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(FR(this.number),FR(n));return new e(r.toFixed(i))}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return Number.isNaN(this.number)}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toNumber()===e?.toNumber()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.number}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:jR(this.number)&&FR(this.number)>100?String(this.number):IR(this.number):this.origin}}]),e}();function BR(e){return OR()?new RR(e):new zR(e)}function VR(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===``)return``;var i=AR(e),a=i.negativeStr,o=i.integerStr,s=i.decimalStr,c=`${t}${s}`,l=`${a}${o}`;if(n>=0){var u=Number(s[n]);return u>=5&&!r?VR(BR(e).add(`${a}0.${`0`.repeat(n)}${10-u}`).toString(),t,n,r):n===0?l:`${l}${t}${s.padEnd(n,`0`).slice(0,n)}`}return c===`.0`?l:`${l}${c}`}var HR=BR;function UR(e,t){let n=(0,S.useRef)(null);function r(){try{let{selectionStart:t,selectionEnd:r,value:i}=e;n.current={start:t,end:r,value:i,beforeTxt:i.substring(0,t),afterTxt:i.substring(r)}}catch{}}function i(){if(e&&n.current&&t)try{let{value:t}=e,{beforeTxt:r,afterTxt:i,start:a}=n.current,o=t.length;if(t.startsWith(r))o=r.length;else if(t.endsWith(i))o=t.length-n.current.afterTxt.length;else{let e=r[a-1],n=t.indexOf(e,a-1);n!==-1&&(o=n+1)}e.setSelectionRange(o,o)}catch(e){ui(!1,`Something warning of cursor restore. Please fire issue about this: ${e.message}`)}}return[r,i]}var WR=200,GR=600;function KR({prefixCls:e,action:t,children:n,disabled:r,className:i,style:a,onStep:o}){let s=t===`up`,c=S.useRef(),l=S.useRef([]),u=()=>{clearTimeout(c.current)},d=e=>{e.preventDefault(),u(),o(s,`handler`);function t(){o(s,`handler`),c.current=setTimeout(t,WR)}c.current=setTimeout(t,GR)};S.useEffect(()=>()=>{u(),l.current.forEach(e=>{Oi.cancel(e)})},[]);let f=`${e}-action`,p=J(f,`${f}-${t}`,{[`${f}-${t}-disabled`]:r},i),m=()=>l.current.push(Oi(u));return S.createElement(`span`,{unselectable:`on`,role:`button`,onMouseUp:m,onMouseLeave:m,onMouseDown:e=>{d(e)},"aria-label":s?`Increase Value`:`Decrease Value`,"aria-disabled":r,className:p,style:a},n||S.createElement(`span`,{unselectable:`on`,className:`${e}-action-${t}-inner`}))}function qR(e){let t=typeof e==`number`?IR(e):AR(e).fullStr;return t.includes(`.`)?AR(t.replace(/(\d)\.(\d)/g,`$1$2.`)).fullStr:e+`0`}var JR=(()=>{let e=(0,S.useRef)(0),t=()=>{Oi.cancel(e.current)};return(0,S.useEffect)(()=>t,[]),n=>{t(),e.current=Oi(()=>{n()})}});function YR(){return YR=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),ZR=e=>{let t=HR(e);return t.isInvalidate()?null:t},QR=S.forwardRef((e,t)=>{let{mode:n=`input`,prefixCls:r=`rc-input-number`,className:i,style:a,classNames:o,styles:s,min:c,max:l,step:u=1,defaultValue:d,value:f,disabled:p,readOnly:m,upHandler:h,downHandler:g,keyboard:_,changeOnWheel:v=!1,controls:y=!0,prefix:b,suffix:x,stringMode:C,parser:w,formatter:T,precision:E,decimalSeparator:D,onChange:O,onInput:k,onPressEnter:A,onStep:j,onMouseDown:M,onClick:N,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,changeOnBlur:z=!0,...B}=e,[V,H]=S.useState(!1),U=S.useRef(!1),ee=S.useRef(!1),W=S.useRef(!1),te=S.useRef(null),G=S.useRef(null);S.useImperativeHandle(t,()=>Si(G.current,{focus:e=>{Nr(G.current,e)},blur:()=>{G.current?.blur()},nativeElement:te.current}));let[ne,K]=S.useState(()=>HR(f??d));function re(e){f===void 0&&K(e)}let ie=S.useCallback((e,t)=>{if(!t)return E>=0?E:Math.max(FR(e),FR(u))},[E,u]),ae=S.useCallback(e=>{let t=String(e);if(w)return w(t);let n=t;return D&&(n=n.replace(D,`.`)),n.replace(/[^\w.-]+/g,``)},[w,D]),q=S.useRef(``),oe=S.useCallback((e,t)=>{if(T)return T(e,{userTyping:t,input:String(q.current)});let n=typeof e==`number`?IR(e):e;if(!t){let e=ie(n,t);LR(n)&&(D||e>=0)&&(n=VR(n,D||`.`,e))}return n},[T,ie,D]),[se,ce]=S.useState(()=>{let e=d??f;return ne.isInvalidate()&&[`string`,`number`].includes(typeof e)?Number.isNaN(e)?``:e:oe(ne.toString(),!1)});q.current=se;function le(e,t){ce(oe(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}let ue=S.useMemo(()=>ZR(l),[l,E]),de=S.useMemo(()=>ZR(c),[c,E]),fe=S.useMemo(()=>!ue||!ne||ne.isInvalidate()?!1:ue.lessEquals(ne),[ue,ne]),pe=S.useMemo(()=>!de||!ne||ne.isInvalidate()?!1:ne.lessEquals(de),[de,ne]),[me,he]=UR(G.current,V),ge=e=>ue&&!e.lessEquals(ue)?ue:de&&!de.lessEquals(e)?de:null,_e=e=>!ge(e),ve=(e,t)=>{let n=e,r=_e(n)||n.isEmpty();if(!n.isEmpty()&&!t&&(n=ge(n)||n,r=!0),!m&&!p&&r){let e=n.toString(),r=ie(e,t);return r>=0&&(n=HR(VR(e,`.`,r)),_e(n)||(n=HR(VR(e,`.`,r,!0)))),n.equals(ne)||(re(n),O?.(n.isEmpty()?null:XR(C,n)),f===void 0&&le(n,t)),n}return ne},ye=JR(),be=e=>{if(me(),q.current=e,ce(e),!ee.current){let t=HR(ae(e));t.isNaN()||ve(t,!0)}k?.(e),ye(()=>{let t=e;w||(t=e.replace(/。/g,`.`)),t!==e&&be(t)})},xe=()=>{ee.current=!0},Se=()=>{ee.current=!1,be(G.current.value)},Ce=e=>{be(e.target.value)},we=zn((e,t)=>{if(e&&fe||!e&&pe)return;U.current=!1;let n=HR(W.current?qR(u):u);e||(n=n.negate());let r=ve((ne||HR(0)).add(n.toString()),!1);j?.(XR(C,r),{offset:W.current?qR(u):u,type:e?`up`:`down`,emitter:t}),G.current?.focus()}),Te=e=>{let t=HR(ae(se)),n;n=t.isNaN()?ve(ne,e):ve(t,e),f===void 0?n.isNaN()||le(n,!1):le(ne,!1)},Ee=()=>{U.current=!0},De=e=>{let{key:t,shiftKey:n}=e;U.current=!0,W.current=n,t===`Enter`&&(ee.current||(U.current=!1),Te(!1),A?.(e)),_!==!1&&!ee.current&&[`Up`,`ArrowUp`,`Down`,`ArrowDown`].includes(t)&&(we(t===`Up`||t===`ArrowUp`,`keyboard`),e.preventDefault())},Oe=()=>{U.current=!1,W.current=!1};S.useEffect(()=>{if(v&&V){let e=e=>{we(e.deltaY<0,`wheel`),e.preventDefault()},t=G.current;if(t)return t.addEventListener(`wheel`,e,{passive:!1}),()=>t.removeEventListener(`wheel`,e)}});let ke=()=>{z&&Te(!1),H(!1),U.current=!1},Ae=e=>{G.current&&e.target!==G.current&&(G.current.focus(),e.preventDefault()),M?.(e)};Un(()=>{ne.isInvalidate()||le(ne,!1)},[E,T]),Un(()=>{let e=HR(f);K(e);let t=HR(ae(se));(!e.equals(t)||!U.current||T)&&le(e,U.current)},[f]),Un(()=>{T&&he()},[se]);let je={prefixCls:r,onStep:we,className:o?.action,style:s?.action},Me=S.createElement(KR,YR({},je,{action:`up`,disabled:fe}),h),Ne=S.createElement(KR,YR({},je,{action:`down`,disabled:pe}),g);return S.createElement(`div`,{ref:te,className:J(r,`${r}-mode-${n}`,i,o?.root,{[`${r}-focused`]:V,[`${r}-disabled`]:p,[`${r}-readonly`]:m,[`${r}-not-a-number`]:ne.isNaN(),[`${r}-out-of-range`]:!ne.isInvalidate()&&!_e(ne)}),style:{...s?.root,...a},onMouseDown:Ae,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,onClick:N,onFocus:()=>{H(!0)},onBlur:ke,onKeyDown:De,onKeyUp:Oe,onCompositionStart:xe,onCompositionEnd:Se,onBeforeInput:Ee},n===`spinner`&&y&&Ne,b!==void 0&&S.createElement(`div`,{className:J(`${r}-prefix`,o?.prefix),style:s?.prefix},b),S.createElement(`input`,YR({autoComplete:`off`,role:`spinbutton`,"aria-valuemin":c,"aria-valuemax":l,"aria-valuenow":ne.isInvalidate()?null:ne.toString(),step:u,ref:G,className:J(`${r}-input`,o?.input),style:s?.input,value:se,onChange:Ce,disabled:p,readOnly:m},B)),x!==void 0&&S.createElement(`div`,{className:J(`${r}-suffix`,o?.suffix),style:s?.suffix},x),n===`spinner`&&y&&Me,n===`input`&&y&&S.createElement(`div`,{className:J(`${r}-actions`,o?.actions),style:s?.actions},Me,Ne))}),$R=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=tu(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},ez=Ql([`Space`,`Addon`],e=>[$R(e),h_(e,{focus:!1})]),tz=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(ga),f=u(`space-addon`,a),[p,m]=ez(f),{compactItemClassnames:h,compactSize:g}=kh(f,d),_=rC(f,c),v=J(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)}),nz=e=>{let t=e.handleVisible??`auto`,n=e.controlHeightSM-e.lineWidth*2;return{...YF(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Nc(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:+(t===!0),handleVisibleWidth:t===!0?n:0}},rz=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:i,inputFontSizeSM:a,inputFontSizeLG:o,colorError:s,paddingInlineSM:c,paddingBlockSM:l,paddingBlockLG:u,paddingInlineLG:d,colorIcon:f,colorTextDisabled:p,motionDurationMid:m,handleHoverColor:h,handleOpacity:g,paddingInline:_,paddingBlock:v,handleBg:y,handleActiveBg:b,inputAffixPadding:x,borderRadiusSM:S,controlWidth:C,handleBorderColor:w,filledHandleBg:T,lineHeightLG:E,antCls:D}=e,O=`${Y(n)} ${r} ${w}`,[k,A]=tu(D,`input-number`);return[{[t]:{...Ul(e),...hI(e),[k(`input-padding-block`)]:Y(v),[k(`input-padding-inline`)]:Y(_),display:`inline-flex`,width:C,margin:0,paddingBlock:0,borderRadius:i,...eI(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...oI(e,{[`${t}-actions`]:{background:T,[`${t}-action-down`]:{borderBlockStart:O}},"&:focus-within":{[`${t}-actions`]:{background:y}}}),...dI(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...rI(e),[`&${t}-borderless`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(v).add(n).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(l).add(n).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(u).add(n).equal())},"&-rtl":{direction:`rtl`,[`${t}-input`]:{direction:`rtl`}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:s}},[`${t}-input`]:{...Ul(e),width:`100%`,paddingBlock:A(`input-padding-block`),textAlign:`start`,backgroundColor:`transparent`,border:0,borderRadius:0,outline:0,transition:`all ${m} linear`,appearance:`textfield`,fontSize:`inherit`,lineHeight:`inherit`,...fI(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:`none`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:`not-allowed`,color:e.colorTextDisabled}}},{[t]:{[`${t}-action`]:{...Wl(),userSelect:`none`,overflow:`hidden`,fontWeight:`bold`,lineHeight:0,textAlign:`center`,cursor:`pointer`,transition:`all ${m} linear`,[`&:active:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{background:b},[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{color:h},[`&${t}-action-up-disabled, &${t}-action-down-disabled`]:{cursor:`not-allowed`,color:p}},"&-mode-input":{overflow:`hidden`,[`${t}-actions`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:`100%`,borderRadius:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,transition:`all ${m}`,overflow:`hidden`,[`${t}-action`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`auto`,height:`40%`,marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:f,height:`50%`,borderInlineStart:O,[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{height:`60%`}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:`none`}}},[`&${t}-mode-spinner`]:{padding:0,width:`auto`,[`${t}-action`]:{flex:`none`,paddingInline:A(`input-padding-inline`),"&-up":{borderInlineStart:O},"&-down":{borderInlineEnd:O}},[`${t}-input`]:{textAlign:`center`,paddingInline:A(`input-padding-inline`)}}}},{[t]:{"&-lg":{[k(`input-padding-block`)]:Y(u),[k(`input-padding-inline`)]:Y(d),paddingBlock:0,fontSize:o,lineHeight:E},"&-sm":{[k(`input-padding-block`)]:Y(l),[k(`input-padding-inline`)]:Y(c),paddingBlock:0,fontSize:a,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:`flex`,flex:`none`,alignItems:`center`,alignSelf:`center`,pointerEvents:`none`},[`${t}-prefix`]:{marginInlineEnd:x},[`${t}-suffix`]:{height:`100%`,marginInlineStart:x,transition:`margin ${m}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},iz=e=>{let{componentCls:t,antCls:n}=e;return{[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},az=Ql(`InputNumber`,e=>{let t=dc(e,JF(e));return[rz(t),iz(t),h_(t)]},nz,{unitless:{handleOpacity:!0},resetFont:!1}),oz=S.forwardRef((e,t)=>{let n=S.useRef(null);S.useImperativeHandle(t,()=>n.current);let{rootClassName:r,size:i,disabled:a,prefixCls:o,addonBefore:s,addonAfter:c,prefix:l,suffix:u,bordered:d,readOnly:f,status:p,controls:m=!0,variant:h,className:g,style:_,classNames:v,styles:y,mode:b,...x}=e,{direction:C,className:w,style:T,styles:E,classNames:D}=ya(`inputNumber`),O=S.useContext(mm),k=a??O,A=S.useMemo(()=>!m||k||f?!1:m,[m,k,f]),{compactSize:j,compactItemClassnames:M}=kh(o,C),N=b===`spinner`?S.createElement(VI,null):S.createElement(DR,null),P=b===`spinner`?S.createElement(wR,null):S.createElement(NC,null),F=typeof A==`boolean`?A:void 0;nf(A)&&(N=A.upIcon||N,P=A.downIcon||P);let{hasFeedback:I,isFormItemInput:L,feedbackIcon:R}=S.useContext(gy),z=Eh(e=>i??j??e),[B,V]=pC(`inputNumber`,h,d),H=I&&S.createElement(S.Fragment,null,R),U={...e,size:z,disabled:k,controls:A},[ee,W]=Cf([D,v],[E,y],{props:U});return S.createElement(QR,{ref:n,mode:b,disabled:k,className:J(g,r,ee.root,w,M,rC(o,p,I),{[`${o}-${B}`]:V,[`${o}-lg`]:z===`large`,[`${o}-sm`]:z===`small`,[`${o}-rtl`]:C===`rtl`,[`${o}-in-form-item`]:L,[`${o}-without-controls`]:!A}),style:{...W.root,...T,..._},upHandler:N,downHandler:P,prefixCls:o,readOnly:f,controls:F,prefix:l,suffix:H||u,classNames:ee,styles:W,...x})}),sz=S.forwardRef((e,t)=>{let{addonBefore:n,addonAfter:r,prefixCls:i,className:a,status:o,rootClassName:s,...c}=e,{getPrefixCls:l}=ya(`inputNumber`),u=l(`input-number`,i),{status:d}=S.useContext(gy),f=iC(d,o),p=sp(u),[m,h]=az(u,p),g=n||r,_=S.createElement(oz,{ref:t,...c,prefixCls:u,status:f,className:J(h,p,m,a),rootClassName:g?void 0:s});if(g){let t=t=>t?S.createElement(tz,{className:J(`${u}-addon`,h,m),variant:e.variant,disabled:e.disabled,status:f},S.createElement(yy,{form:!0},t)):null,i=t(n),a=t(r);return S.createElement(Mh,{rootClassName:s},i,_,a)}return _}),cz=sz;cz._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(Mm,{theme:{components:{InputNumber:{handleVisible:!0}}}},S.createElement(sz,{...e}));function lz(e){return!!(e.addonBefore||e.addonAfter)}function uz(e){return!!(e.prefix||e.suffix||e.allowClear)}function dz(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function fz(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=dz(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=dz(t,e,r),n(i);return}n(i)}function pz(){return pz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=uz(e),P=(0,S.cloneElement)(E,{value:g,className:J(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:J(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=J(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:J(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,pz({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:J(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(lz(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=J(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=J(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:J(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function hz(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function gz(){return gz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&Nr(k.current,e)},[M,N]=Gn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=hz(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&fz(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},ee=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},W=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},te=e=>{E(!0),i?.(e)},G=e=>{O.current&&=!1,E(!1),a?.(e)},ne=e=>{N(``),j(),k.current&&fz(k.current,e,r)},K=B&&`${l}-out-of-range`;return S.createElement(mz,gz({},w,{prefixCls:l,className:J(f,K),handleReset:ne,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:J(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=gi(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,gz({autoComplete:n},t,{onChange:H,onFocus:te,onBlur:G,onKeyDown:ee,onKeyUp:W,className:J(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),vz=e=>{let t;return nf(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Ou,null)}),t};function yz(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function bz(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var xz=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=ya(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=sp(A),[N,P]=SI(A,g);CI(A,M);let{compactSize:F,compactItemClassnames:I}=kh(A,C),L=Eh(e=>a??F??e),R=S.useContext(mm),z=o??R,B={...e,size:L,disabled:z},[V,H]=Cf([O,v],[k,h],{props:B}),{status:U,hasFeedback:ee,feedbackIcon:W}=(0,S.useContext)(gy),te=iC(U,i);(0,S.useRef)(bz(e)||!!ee);let G=yz(j,!0),ne=e=>{G(),s?.(e)},K=e=>{G(),c?.(e)},re=e=>{G(),_?.(e)},ie=(ee||l)&&S.createElement(S.Fragment,null,l,ee&&W),ae=vz(u??w),[q,oe]=pC(`input`,y,r);return S.createElement(_z,{ref:cr(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:ne,onFocus:K,style:{...H.root,...D,...m},styles:H,suffix:ie,allowClear:ae,className:J(p,g,P,M,I,E,V.root),onChange:re,addonBefore:f&&S.createElement(yy,{form:!0,space:!0},f),addonAfter:d&&S.createElement(yy,{form:!0,space:!0},d),classNames:{...V,input:J({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:J({[`${A}-${q}`]:oe},rC(A,te)),affixWrapper:J({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:J({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:J({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${q}`]:oe},rC(`${A}-group-wrapper`,te,ee),N)}})});function Sz(e,t,n){return(e-t)/(n-t)}function Cz(e,t,n,r){let i=Sz(t,n,r),a={};switch(e){case`rtl`:a.right=`${i*100}%`,a.transform=`translateX(50%)`;break;case`btt`:a.bottom=`${i*100}%`,a.transform=`translateY(50%)`;break;case`ttb`:a.top=`${i*100}%`,a.transform=`translateY(-50%)`;break;default:a.left=`${i*100}%`,a.transform=`translateX(-50%)`;break}return a}function wz(e,t){return Array.isArray(e)?e[t]:e}var Tz=S.createContext({min:0,max:0,direction:`ltr`,step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),Ez=S.createContext({});function Dz(){return Dz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,value:r,valueIndex:i,onStartMove:a,onDelete:o,style:s,render:c,dragging:l,draggingDelete:u,onOffsetChange:d,onChangeComplete:f,onFocus:p,onMouseEnter:m,...h}=e,{min:g,max:_,direction:v,disabled:y,keyboard:b,range:x,tabIndex:C,ariaLabelForHandle:w,ariaLabelledByForHandle:T,ariaRequired:E,ariaValueTextFormatterForHandle:D,styles:O,classNames:k}=S.useContext(Tz),A=`${n}-handle`,j=e=>{y||a(e,i)},M=e=>{p?.(e,i)},N=e=>{m(e,i)},P=e=>{if(!y&&b){let t=null;switch(e.which||e.keyCode){case Qr.LEFT:t=v===`ltr`||v===`btt`?-1:1;break;case Qr.RIGHT:t=v===`ltr`||v===`btt`?1:-1;break;case Qr.UP:t=v===`ttb`?-1:1;break;case Qr.DOWN:t=v===`ttb`?1:-1;break;case Qr.HOME:t=`min`;break;case Qr.END:t=`max`;break;case Qr.PAGE_UP:t=2;break;case Qr.PAGE_DOWN:t=-2;break;case Qr.BACKSPACE:case Qr.DELETE:o?.(i);break}t!==null&&(e.preventDefault(),d(t,i))}},F=e=>{switch(e.which||e.keyCode){case Qr.LEFT:case Qr.RIGHT:case Qr.UP:case Qr.DOWN:case Qr.HOME:case Qr.END:case Qr.PAGE_UP:case Qr.PAGE_DOWN:f?.();break}},I=Cz(v,r,g,_),L={};i!==null&&(L={tabIndex:y?null:wz(C,i),role:`slider`,"aria-valuemin":g,"aria-valuemax":_,"aria-valuenow":r,"aria-disabled":y,"aria-label":wz(w,i),"aria-labelledby":wz(T,i),"aria-required":wz(E,i),"aria-valuetext":wz(D,i)?.(r),"aria-orientation":v===`ltr`||v===`rtl`?`horizontal`:`vertical`,onMouseDown:j,onTouchStart:j,onFocus:M,onMouseEnter:N,onKeyDown:P,onKeyUp:F});let R=S.createElement(`div`,Dz({ref:t,className:J(A,{[`${A}-${i+1}`]:i!==null&&x,[`${A}-dragging`]:l,[`${A}-dragging-delete`]:u},k.handle),style:{...I,...s,...O.handle}},L,h));return c&&(R=c(R,{index:i,prefixCls:n,value:r,dragging:l,draggingDelete:u})),R});function kz(){return kz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,style:r,onStartMove:i,onOffsetChange:a,values:o,handleRender:s,activeHandleRender:c,draggingIndex:l,draggingDelete:u,onFocus:d,...f}=e,p=S.useRef({}),[m,h]=S.useState(!1),[g,_]=S.useState(-1),v=e=>{_(e),h(!0)},y=(e,t)=>{v(t),d?.(e)},b=(e,t)=>{v(t)};S.useImperativeHandle(t,()=>({focus:e=>{p.current[e]?.focus()},hideHelp:()=>{(0,Vi.flushSync)(()=>{h(!1)})}}));let x={prefixCls:n,onStartMove:i,onOffsetChange:a,render:s,onFocus:y,onMouseEnter:b,...f};return S.createElement(S.Fragment,null,o.map((e,t)=>{let n=l===t;return S.createElement(Oz,kz({ref:e=>{e?p.current[t]=e:delete p.current[t]},dragging:n,draggingDelete:n&&u,style:wz(r,t),key:t,value:e,valueIndex:t},x))}),c&&m&&S.createElement(Oz,kz({key:`a11y`},x,{value:o[g],valueIndex:null,dragging:l!==-1,draggingDelete:u,render:c,style:{pointerEvents:`none`},tabIndex:null,"aria-hidden":!0})))}),jz=e=>{let{prefixCls:t,style:n,children:r,value:i,onClick:a}=e,{min:o,max:s,direction:c,includedStart:l,includedEnd:u,included:d}=S.useContext(Tz),f=`${t}-text`,p=Cz(c,i,o,s);return S.createElement(`span`,{className:J(f,{[`${f}-active`]:d&&l<=i&&i<=u}),style:{...p,...n},onMouseDown:e=>{e.stopPropagation()},onClick:()=>{a(i)}},r)},Mz=e=>{let{prefixCls:t,marks:n,onClick:r}=e,i=`${t}-mark`;return n.length?S.createElement(`div`,{className:i},n.map(({value:e,style:t,label:n})=>S.createElement(jz,{key:e,prefixCls:i,style:t,value:e,onClick:r},n))):null},Nz=e=>{let{prefixCls:t,value:n,style:r,activeStyle:i}=e,{min:a,max:o,direction:s,included:c,includedStart:l,includedEnd:u}=S.useContext(Tz),d=`${t}-dot`,f=c&&l<=n&&n<=u,p={...Cz(s,n,a,o),...typeof r==`function`?r(n):r};return f&&(p={...p,...typeof i==`function`?i(n):i}),S.createElement(`span`,{className:J(d,{[`${d}-active`]:f}),style:p})},Pz=e=>{let{prefixCls:t,marks:n,dots:r,style:i,activeStyle:a}=e,{min:o,max:s,step:c}=S.useContext(Tz),l=S.useMemo(()=>{let e=new Set;if(n.forEach(t=>{e.add(t.value)}),r&&c!==null){let t=o;for(;t<=s;)e.add(t),t+=c}return Array.from(e)},[o,s,c,r,n]);return S.createElement(`div`,{className:`${t}-step`},l.map(e=>S.createElement(Nz,{prefixCls:t,key:e,value:e,style:i,activeStyle:a})))},Fz=e=>{let{prefixCls:t,style:n,start:r,end:i,index:a,onStartMove:o,replaceCls:s}=e,{direction:c,min:l,max:u,disabled:d,range:f,classNames:p}=S.useContext(Tz),m=`${t}-track`,h=Sz(r,l,u),g=Sz(i,l,u),_=e=>{!d&&o&&o(e,-1)},v={};switch(c){case`rtl`:v.right=`${h*100}%`,v.width=`${g*100-h*100}%`;break;case`btt`:v.bottom=`${h*100}%`,v.height=`${g*100-h*100}%`;break;case`ttb`:v.top=`${h*100}%`,v.height=`${g*100-h*100}%`;break;default:v.left=`${h*100}%`,v.width=`${g*100-h*100}%`}let y=s||J(m,{[`${m}-${a+1}`]:a!==null&&f,[`${t}-track-draggable`]:o},p.track);return S.createElement(`div`,{className:y,style:{...v,...n},onMouseDown:_,onTouchStart:_})},Iz=e=>{let{prefixCls:t,style:n,values:r,startPoint:i,onStartMove:a}=e,{included:o,range:s,min:c,styles:l,classNames:u}=S.useContext(Tz),d=S.useMemo(()=>{if(!s){if(r.length===0)return[];let e=i??c,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}let e=[];for(let t=0;tS.createElement(Fz,{index:i,prefixCls:t,style:{...wz(n,i),...l.track},start:e,end:r,key:i,onStartMove:a})))},Lz=130;function Rz(e){let t=`targetTouches`in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function zz(e,t,n,r,i,a,o,s,c,l,u){let[d,f]=S.useState(null),[p,m]=S.useState(-1),[h,g]=S.useState(!1),[_,v]=S.useState(n),[y,b]=S.useState(n),x=S.useRef(null),C=S.useRef(null),w=S.useRef(null),{onDragStart:T,onDragChange:E}=S.useContext(Ez);Hn(()=>{p===-1&&v(n)},[n,p]),S.useEffect(()=>()=>{document.removeEventListener(`mousemove`,x.current),document.removeEventListener(`mouseup`,C.current),w.current&&(w.current.removeEventListener(`touchmove`,x.current),w.current.removeEventListener(`touchend`,C.current))},[]);let D=(e,t,n)=>{t!==void 0&&f(t),v(e);let r=e;n&&(r=e.filter((e,t)=>t!==p)),o(r),E&&E({rawValues:e,deleteIndex:n?p:-1,draggingIndex:p,draggingValue:t})},O=zn((e,t,n)=>{if(e===-1){let e=y[0],n=y[y.length-1],o=r-e,s=i-n,c=t*(i-r);c=Math.max(c,o),c=Math.min(c,s),c=a(e+c)-e,D(y.map(e=>e+c))}else{let a=(i-r)*t,o=[..._];o[e]=y[e];let s=c(o,a,e,`dist`);D(s.values,s.value,n)}});return[p,d,h,S.useMemo(()=>{let e=[...n].sort((e,t)=>e-t),t=[..._].sort((e,t)=>e-t),r={};t.forEach(e=>{r[e]=(r[e]||0)+1}),e.forEach(e=>{r[e]=(r[e]||0)-1});let i=+!!l;return Object.values(r).reduce((e,t)=>e+Math.abs(t),0)<=i?_:n},[n,_,l]),(r,i,a)=>{r.stopPropagation();let o=a||n,c=o[i];m(i),f(c),b(o),v(o),g(!1);let{pageX:d,pageY:p}=Rz(r),h=!1;T&&T({rawValues:o,draggingIndex:i,draggingValue:c});let y=n=>{n.preventDefault();let{pageX:r,pageY:a}=Rz(n),o=r-d,s=a-p,{width:c,height:f}=e.current.getBoundingClientRect(),m,v;switch(t){case`btt`:m=-s/f,v=o;break;case`ttb`:m=s/f,v=o;break;case`rtl`:m=-o/c,v=s;break;default:m=o/c,v=s}h=l?Math.abs(v)>Lz&&u<_.length:!1,g(h),O(i,m,h)},S=e=>{e.preventDefault(),document.removeEventListener(`mouseup`,S),document.removeEventListener(`mousemove`,y),w.current&&(w.current.removeEventListener(`touchmove`,x.current),w.current.removeEventListener(`touchend`,C.current)),x.current=null,C.current=null,w.current=null,s(h),m(-1),g(!1)};document.addEventListener(`mouseup`,S),document.addEventListener(`mousemove`,y),r.currentTarget.addEventListener(`touchend`,S),r.currentTarget.addEventListener(`touchmove`,y),x.current=y,C.current=S,w.current=r.currentTarget}]}function Bz(e,t,n,r,i,a){let o=S.useCallback(n=>Math.max(e,Math.min(t,n)),[e,t]),s=S.useCallback(r=>{if(n!==null){let i=e+Math.round((o(r)-e)/n)*n,a=e=>(String(e).split(`.`)[1]||``).length,s=Math.max(a(n),a(t),a(e)),c=Number(i.toFixed(s));return e<=c&&c<=t?c:null}return null},[n,e,t,o]),c=S.useCallback(i=>{let a=o(i),c=r.map(e=>e.value);n!==null&&c.push(s(i)),c.push(e,t);let l=c[0],u=t-e;return c.forEach(e=>{let t=Math.abs(a-e);t<=u&&(l=e,u=t)}),l},[e,t,r,n,o,s]),l=(i,a,o,c=`unit`)=>{if(typeof a==`number`){let u,d=i[o],f=d+a,p=[];r.forEach(e=>{p.push(e.value)}),p.push(e,t),p.push(s(d));let m=a>0?1:-1;c===`unit`?p.push(s(d+m*n)):p.push(s(f)),p=p.filter(e=>e!==null).filter(e=>a<0?e<=d:e>=d),c===`unit`&&(p=p.filter(e=>e!==d));let h=c===`unit`?d:f;u=p[0];let g=Math.abs(u-h);if(p.forEach(e=>{let t=Math.abs(e-h);t1){let e=[...i];return e[o]=u,l(e,a-m,o,c)}return u}else if(a===`min`)return e;else if(a===`max`)return t},u=(e,t,n,r=`unit`)=>{let i=e[n],a=l(e,t,n,r);return{value:a,changed:a!==i}},d=e=>a===null&&e===0||typeof a==`number`&&e{let o=e.map(c),s=o[n];if(o[n]=l(o,t,n,r),i===!1){let e=a||0;n>0&&o[n-1]!==s&&(o[n]=Math.max(o[n],o[n-1]+e)),n0;--e){let t=!0;for(;d(o[e]-o[e-1])&&t;)({value:o[e-1],changed:t}=u(o,-1,e-1))}for(let e=o.length-1;e>0;--e){let t=!0;for(;d(o[e]-o[e-1])&&t;)({value:o[e-1],changed:t}=u(o,-1,e-1))}for(let e=0;e{if(e===!0||!e)return[!!e,!1,!1,0];let{editable:t,draggableTrack:n,minCount:r,maxCount:i}=e;return[!0,t,!t&&n,r||0,i]},[e])}var Hz=S.forwardRef((e,t)=>{let{prefixCls:n=`rc-slider`,className:r,style:i,classNames:a,styles:o,id:s,disabled:c=!1,keyboard:l=!0,autoFocus:u,onFocus:d,onBlur:f,min:p=0,max:m=100,step:h=1,value:g,defaultValue:_,range:v,count:y,onChange:b,onBeforeChange:x,onAfterChange:C,onChangeComplete:w,allowCross:T=!0,pushable:E=!1,reverse:D,vertical:O,included:k=!0,startPoint:A,trackStyle:j,handleStyle:M,railStyle:N,dotStyle:P,activeDotStyle:F,marks:I,dots:L,handleRender:R,activeHandleRender:z,track:B,tabIndex:V=0,ariaLabelForHandle:H,ariaLabelledByForHandle:U,ariaRequired:ee,ariaValueTextFormatterForHandle:W}=e,te=S.useRef(null),G=S.useRef(null),ne=S.useMemo(()=>O?D?`ttb`:`btt`:D?`rtl`:`ltr`,[D,O]),[K,re,ie,ae,q]=Vz(v),oe=S.useMemo(()=>isFinite(p)?p:0,[p]),se=S.useMemo(()=>isFinite(m)?m:100,[m]),ce=S.useMemo(()=>h!==null&&h<=0?1:h,[h]),le=S.useMemo(()=>typeof E==`boolean`?E?ce:!1:E>=0?E:!1,[E,ce]),ue=S.useMemo(()=>Object.keys(I||{}).map(e=>{let t=I[e],n={value:Number(e)};return t&&typeof t==`object`&&!S.isValidElement(t)&&(`label`in t||`style`in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(({label:e})=>e||typeof e==`number`).sort((e,t)=>e.value-t.value),[I]),[de,fe]=Bz(oe,se,ce,ue,T,le),[pe,me]=Gn(_,g),he=S.useMemo(()=>{let e=pe==null?[]:Array.isArray(pe)?pe:[pe],[t=oe]=e,n=pe===null?[]:[t];if(K){if(n=[...e],y||pe===void 0){let e=y>=0?y+1:2;for(n=n.slice(0,e);n.lengthe-t)}return n.forEach((e,t)=>{n[t]=de(e)}),n},[pe,K,oe,y,de]),ge=e=>K?e:e[0],_e=zn(e=>{let t=[...e].sort((e,t)=>e-t);b&&!fi(t,he,!0)&&b(ge(t)),me(t)}),ve=zn(e=>{e&&te.current.hideHelp();let t=ge(he);C?.(t),ui(!C,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),w?.(t)}),ye=e=>{if(c||!re||he.length<=ae)return;let t=[...he];t.splice(e,1),x?.(ge(t)),_e(t);let n=Math.max(0,e-1);te.current.hideHelp(),te.current.focus(n)},[be,xe,Se,Ce,we]=zz(G,ne,he,oe,se,de,_e,ve,fe,re,ae),Te=(e,t)=>{if(!c){let n=[...he],r=0,i=0,a=se-oe;he.forEach((t,n)=>{let o=Math.abs(e-t);o<=a&&(a=o,r=n),t{e.preventDefault();let{width:t,height:n,left:r,top:i,bottom:a,right:o}=G.current.getBoundingClientRect(),{clientX:s,clientY:c}=e,l;switch(ne){case`btt`:l=(a-c)/n;break;case`ttb`:l=(c-i)/n;break;case`rtl`:l=(o-s)/t;break;default:l=(s-r)/t}Te(de(oe+l*(se-oe)),e)},[De,Oe]=S.useState(null),ke=(e,t)=>{if(!c){let n=fe(he,e,t);x?.(ge(he)),_e(n.values),Oe(n.value)}};S.useEffect(()=>{if(De!==null){let e=he.indexOf(De);e>=0&&te.current.focus(e)}Oe(null)},[De]);let Ae=S.useMemo(()=>ie&&ce===null?!1:ie,[ie,ce]),je=zn((e,t)=>{we(e,t),x?.(ge(he))}),Me=be!==-1;S.useEffect(()=>{if(!Me){let e=he.lastIndexOf(xe);te.current.focus(e)}},[Me]);let Ne=S.useMemo(()=>[...Ce].sort((e,t)=>e-t),[Ce]),[Pe,Fe]=S.useMemo(()=>K?[Ne[0],Ne[Ne.length-1]]:[oe,Ne[0]],[Ne,K,oe]);S.useImperativeHandle(t,()=>({focus:()=>{te.current.focus(0)},blur:()=>{let{activeElement:e}=document;G.current?.contains(e)&&e?.blur()}})),S.useEffect(()=>{u&&te.current.focus(0)},[]);let Ie=S.useMemo(()=>({min:oe,max:se,direction:ne,disabled:c,keyboard:l,step:ce,included:k,includedStart:Pe,includedEnd:Fe,range:K,tabIndex:V,ariaLabelForHandle:H,ariaLabelledByForHandle:U,ariaRequired:ee,ariaValueTextFormatterForHandle:W,styles:o||{},classNames:a||{}}),[oe,se,ne,c,l,ce,k,Pe,Fe,K,V,H,U,ee,W,o,a]);return S.createElement(Tz.Provider,{value:Ie},S.createElement(`div`,{ref:G,className:J(n,r,{[`${n}-disabled`]:c,[`${n}-vertical`]:O,[`${n}-horizontal`]:!O,[`${n}-with-marks`]:ue.length}),style:i,onMouseDown:Ee,id:s},S.createElement(`div`,{className:J(`${n}-rail`,a?.rail),style:{...N,...o?.rail}}),B!==!1&&S.createElement(Iz,{prefixCls:n,style:j,values:he,startPoint:A,onStartMove:Ae?je:void 0}),S.createElement(Pz,{prefixCls:n,marks:ue,dots:L,style:P,activeStyle:F}),S.createElement(Az,{ref:te,prefixCls:n,style:M,values:Ce,draggingIndex:be,draggingDelete:Se,onStartMove:je,onOffsetChange:ke,onFocus:d,onBlur:f,handleRender:R,activeHandleRender:z,onChangeComplete:ve,onDelete:re?ye:void 0}),S.createElement(Mz,{prefixCls:n,marks:ue,onClick:Te})))}),Uz=(0,S.createContext)({}),Wz=S.forwardRef((e,t)=>{let{open:n,draggingDelete:r,value:i}=e,a=(0,S.useRef)(null),o=n&&!r,s=(0,S.useRef)(null);function c(){Oi.cancel(s.current),s.current=null}function l(){s.current=Oi(()=>{a.current?.forceAlign(),s.current=null})}return S.useEffect(()=>(o?l():c(),c),[o,e.title,i]),S.createElement(jw,{ref:cr(a,t),...e,open:o})}),Gz=e=>{let{componentCls:t,antCls:n,controlSize:r,dotSize:i,marginFull:a,marginPart:o,colorFillContentHover:s,handleColorDisabled:c,calc:l,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:p,handleLineWidth:m,handleLineWidthHover:h,motionDurationMid:g}=e;return{[t]:{...Ul(e),position:`relative`,height:r,margin:`${Y(o)} ${Y(a)}`,padding:0,cursor:`pointer`,touchAction:`none`,"&-vertical":{margin:`${Y(a)} ${Y(o)}`},[`${t}-rail`]:{position:`absolute`,backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${g}`},[`${t}-track,${t}-tracks`]:{position:`absolute`,transition:`background-color ${g}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:`content-box`,backgroundClip:`content-box`,border:`solid rgba(0,0,0,0)`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${Y(m)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:`absolute`,width:u,height:u,outline:`none`,userSelect:`none`,"&-dragging-delete":{opacity:0},"&::before":{content:`""`,position:`absolute`,insetInlineStart:l(m).mul(-1).equal(),insetBlockStart:l(m).mul(-1).equal(),width:l(u).add(l(m).mul(2)).equal(),height:l(u).add(l(m).mul(2)).equal(),backgroundColor:`transparent`},"&::after":{content:`""`,position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${Y(m)} ${e.handleColor}`,outline:`0px solid transparent`,borderRadius:`50%`,cursor:`pointer`,transition:[`inset-inline-start`,`inset-block-start`,`width`,`height`,`box-shadow`,`outline`].map(e=>`${e} ${g}`).join(`, `)},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:l(d).sub(u).div(2).add(h).mul(-1).equal(),insetBlockStart:l(d).sub(u).div(2).add(h).mul(-1).equal(),width:l(d).add(l(h).mul(2)).equal(),height:l(d).add(l(h).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${Y(h)} ${f}`,outline:`6px solid ${p}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:`none`}},[`${t}-mark`]:{position:`absolute`,fontSize:e.fontSize},[`${t}-mark-text`]:{position:`absolute`,display:`inline-block`,color:e.colorTextDescription,textAlign:`center`,wordBreak:`keep-all`,cursor:`pointer`,userSelect:`none`,"&-active":{color:e.colorText}},[`${t}-step`]:{position:`absolute`,background:`transparent`,pointerEvents:`none`},[`${t}-dot`]:{position:`absolute`,width:i,height:i,backgroundColor:e.colorBgElevated,border:`${Y(m)} solid ${e.dotBorderColor}`,borderRadius:`50%`,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,pointerEvents:`auto`,"&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[` +`;return[aR(`${t}-checkbox`,e),{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS,pointerEvents:`unset`},"&-menus":{display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:`100%`,height:`auto`,[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,flexShrink:0,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.menuPadding,overflow:`auto`,verticalAlign:`top`,listStyle:`none`,"-ms-overflow-style":`-ms-autohiding-scrollbar`,"&:not(:last-child)":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&-item":{display:`flex`,maxWidth:400,flexWrap:`nowrap`,alignItems:`center`,padding:e.optionPadding,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg}},"&-content":{flex:`auto`,minWidth:0,...Hl},[i]:{marginInlineStart:e.paddingXXS,color:e.colorIcon,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}}}}}]},Wre=e=>{let{componentCls:t,antCls:n}=e;return[{[t]:{width:e.controlWidth}},{[`${t}-dropdown`]:[{[`&${n}-select-dropdown`]:{padding:0}},sR(e)]},{[`${t}-dropdown-rtl`]:{direction:`rtl`}},m_(e)]},cR=e=>{let t=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:e.controlItemBgActive,optionSelectedFontWeight:e.fontWeightStrong,optionPadding:`${t}px ${e.paddingSM}px`,menuPadding:e.paddingXXS,optionSelectedColor:e.colorText}},lR=Ql(`Cascader`,Wre,cR,{resetFont:!1,unitless:{optionSelectedFontWeight:!0}}),Gre=$l([`Cascader`,`Panel`],e=>{let{componentCls:t}=e;return{[`${t}-panel`]:[sR(e),{display:`inline-flex`,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,borderRadius:e.borderRadiusLG,overflowX:`auto`,maxWidth:`100%`,[`${t}-menus`]:{alignItems:`stretch`},[`${t}-menu`]:{height:`auto`},"&-empty":{padding:e.paddingXXS}}]}},cR,{resetFont:!1});function Kre(e){let{prefixCls:t,className:n,multiple:r,rootClassName:i,notFoundContent:a,direction:o,expandIcon:s,loadingIcon:c,disabled:l}=e,{expandIcon:u,loadingIcon:d}=ya(`cascader`),f=S.useContext(mm),p=l??f,[m,h,g,_]=nR(t,o),v=sp(h),[y,b]=lR(h,v);Gre(h);let{expandIcon:x,loadingIcon:C}=iR({contextExpandIcon:u,contextLoadingIcon:d,expandIcon:s,loadingIcon:c,isRtl:g===`rtl`}),w=a||_?.(`Cascader`)||S.createElement(uC,{componentName:`Cascader`}),T=rR(h,r);return S.createElement(QL,{...e,checkable:T,prefixCls:h,className:J(n,y,i,b,v),notFoundContent:w,direction:g,expandIcon:x,loadingIcon:C,disabled:p})}var{SHOW_CHILD:qre,SHOW_PARENT:Jre}=tR,Yre=(e,t,n)=>{let r=e.toLowerCase().split(t).reduce((e,n,r)=>r===0?[n]:[].concat(pa(e),[t,n]),[]),i=[],a=0;return r.forEach((t,r)=>{let o=a+t.length,s=e.slice(a,o);a=o,r%2==1&&(s=S.createElement(`span`,{className:`${n}-menu-item-keyword`,key:`separator-${r}`},s)),i.push(s)}),i},Xre=(e,t,n,r)=>{let i=[],a=e.toLowerCase();return t.forEach((e,t)=>{t!==0&&i.push(` / `);let o=e[r.label],s=typeof o;(s===`string`||s===`number`)&&(o=Yre(String(o),a,n)),i.push(o)}),i},uR=S.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,className:a,rootClassName:o,multiple:s,bordered:c=!0,transitionName:l,choiceTransitionName:u=``,popupClassName:d,expandIcon:f,placement:p,showSearch:m,allowClear:h=!0,notFoundContent:g,direction:_,getPopupContainer:v,status:y,showArrow:b,builtinPlacements:x,style:C,variant:w,dropdownClassName:T,dropdownRender:E,onDropdownVisibleChange:D,onPopupVisibleChange:O,dropdownMenuColumnStyle:k,popupRender:A,dropdownStyle:j,popupMenuColumnStyle:M,onOpenChange:N,styles:P,classNames:F,loadingIcon:I,...L}=e,R=gi(L,[`suffixIcon`]),{getPrefixCls:z,getPopupContainer:B,className:V,style:H,classNames:U,styles:ee,expandIcon:W,loadingIcon:te}=ya(`cascader`),{popupOverflow:G}=S.useContext(ga),{status:ne,hasFeedback:K,isFormItemInput:re,feedbackIcon:ie}=S.useContext(my),ae=nC(ne,y),[q,oe,se,ce]=nR(n,_),le=se===`rtl`,ue=z(),de=sp(q),[fe,pe]=TC(q,de),me=sp(oe);lR(oe,me);let{compactSize:he,compactItemClassnames:ge}=Oh(q,_),[_e,ve]=dC(`cascader`,w,c),ye=g||ce?.(`Cascader`)||S.createElement(uC,{componentName:`Cascader`}),be=IC(A||E),xe=M||k,Se=N||O||D,Ce=S.useMemo(()=>{if(!m)return m;let e={render:Xre};return nf(m)&&(e={...e,...m}),e},[m]),we=Th(e=>r??he??e),Te=S.useContext(mm),Ee=i??Te,{expandIcon:De,loadingIcon:Oe}=iR({contextExpandIcon:W,contextLoadingIcon:te,expandIcon:f,loadingIcon:I,isRtl:le}),ke=rR(oe,s),Ae=LC(e.suffixIcon,b),{suffixIcon:je,removeIcon:Me,clearIcon:Ne}=FC({...e,loadingIcon:Oe,hasFeedback:K,feedbackIcon:ie,showSuffixIcon:Ae,multiple:s,prefixCls:q,componentName:`Cascader`}),Pe=S.useMemo(()=>p===void 0?le?`bottomRight`:`bottomLeft`:p,[p,le]),Fe=h===!0?{clearIcon:Ne}:h,Ie={...e,variant:_e,size:we,status:ae,disabled:Ee},[Le,Re]=Cf([U,F],[ee,P],{props:Ie},{popup:{_default:`root`}}),ze={...Re.popup?.root,...j},[Be]=Lf(`SelectLike`,ze?.zIndex),Ve=J(d||T,`${oe}-dropdown`,{[`${oe}-dropdown-rtl`]:se===`rtl`},o,de,Le.popup?.root,me,fe,pe);return S.createElement(tR,{prefixCls:q,className:J(!n&&oe,{[`${q}-lg`]:we===`large`,[`${q}-sm`]:we===`small`,[`${q}-rtl`]:le,[`${q}-${_e}`]:ve,[`${q}-in-form-item`]:re},tC(q,ae,K),ge,V,a,o,Le.root,de,me,fe,pe),disabled:Ee,style:{...Re.root,...H,...C},classNames:Le,styles:Re,...R,builtinPlacements:pC(x,G),direction:se,placement:Pe,notFoundContent:ye,allowClear:Fe,showSearch:Ce,expandIcon:De,suffixIcon:je,removeIcon:Me,loadingIcon:Oe,checkable:ke,popupClassName:Ve,popupPrefixCls:n||oe,popupStyle:{...ze,zIndex:Be},popupRender:be,popupMenuColumnStyle:xe,onPopupVisibleChange:Se,choiceTransitionName:hh(ue,``,u),transitionName:hh(ue,`slide-up`,l),getPopupContainer:v||B,ref:t})}),Zre=nx(uR,`popupAlign`,e=>gi(e,[`visible`]));uR.SHOW_PARENT=Jre,uR.SHOW_CHILD=qre,uR.Panel=Kre,uR._InternalPanelDoNotUseOrYouWillBeFired=Zre;var dR=S.createContext(null),fR=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:i=!1,onMouseEnter:a,onMouseLeave:o,skipGroup:s=!1,disabled:c,rootClassName:l,className:u,style:d,classNames:f,styles:p,name:m,value:h,checked:g,defaultChecked:_,onChange:v,...y}=e,{getPrefixCls:b,direction:x,className:C,style:w,classNames:T,styles:E}=ya(`checkbox`),D=S.useContext(dR),{isFormItemInput:O}=S.useContext(my),k=S.useContext(mm),A=(D?.disabled||c)??k,[j,M]=Gn(_,g),N=j,P=zn(e=>{M(e.target.checked),v?.(e),!s&&D?.toggleOption&&D.toggleOption({label:r,value:h})});D&&!s&&(N=D.value.includes(h));let F=S.useRef(null),I=lr(t,F);S.useEffect(()=>{if(!(s||!D))return D.registerValue(h),()=>{D.cancelValue(h)}},[h,s]),S.useEffect(()=>{F.current?.input&&(F.current.input.indeterminate=i)},[i]);let L=b(`checkbox`,n),R=sp(L),[z,B]=oR(L,R),V={...y},H={...e,indeterminate:i,disabled:A,checked:N},[U,ee]=Cf([T,f],[E,p],{props:H}),W=J(`${L}-wrapper`,{[`${L}-rtl`]:x===`rtl`,[`${L}-wrapper-checked`]:N,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:O},C,u,U.root,l,B,R,z),te=J(U.icon,{[`${L}-indeterminate`]:i},_h,z),[G,ne]=LF(V.onClick);return S.createElement(wh,{component:`Checkbox`,disabled:A},S.createElement(`label`,{className:W,style:{...ee.root,...w,...d},onMouseEnter:a,onMouseLeave:o,onClick:G},S.createElement(IF,{...V,name:!s&&D?D.name:m,checked:N,onClick:ne,onChange:P,prefixCls:L,className:te,style:ee.icon,disabled:A,ref:I,value:h}),$d(r)&&S.createElement(`span`,{className:J(`${L}-label`,U.label),style:ee.label},r)))}),Qre=S.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l,role:u=`group`,...d}=e,{getPrefixCls:f,direction:p}=S.useContext(ga),[m,h]=S.useState(d.value||n||[]),[g,_]=S.useState([]);S.useEffect(()=>{`value`in d&&h(d.value||[])},[d.value]);let v=S.useMemo(()=>i.map(e=>typeof e==`string`||ef(e)?{label:e,value:e}:e),[i]),y=e=>{_(t=>t.filter(t=>t!==e))},b=e=>{_(t=>[].concat(pa(t),[e]))},x=e=>{let t=m.indexOf(e.value),n=pa(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||h(n),l?.(n.filter(e=>g.includes(e)).sort((e,t)=>v.findIndex(t=>t.value===e)-v.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=sp(C),[E,D]=oR(C,T),O=gi(d,[`value`,`disabled`]),k=i.length?v.map(e=>S.createElement(fR,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:J(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,A=S.useMemo(()=>({toggleOption:x,value:m,disabled:d.disabled,name:d.name,registerValue:b,cancelValue:y}),[x,m,d.disabled,d.name,b,y]),j=J(w,{[`${w}-rtl`]:p===`rtl`},o,s,D,T,E);return S.createElement(`div`,{className:j,style:c,role:u,...O,ref:t},S.createElement(dR.Provider,{value:A},k))}),pR=fR;pR.Group=Qre,pR.__ANT_CHECKBOX=!0;var mR=(0,S.createContext)({});function hR(e){return e===`auto`?`1 1 auto`:ef(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var gR=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=S.useContext(ga),{gutter:i,wrap:a}=S.useContext(mR),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h,...g}=e,_=n(`col`,o),v=n(),[y,b]=Zee(_),[x]=tu(v,`col`),C={},w={};HC.forEach(t=>{let n={},i=e[t];ef(i)?n.span=i:nf(i)&&(n=i||{}),delete g[t],w={...w,[`${_}-${t}-${n.span}`]:$d(n.span),[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`},n.flex&&(w[`${_}-${t}-flex`]=!0,C[x(`${t}-flex`)]=hR(n.flex))});let T=J(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,w,y,b),E={};return i?.[0]&&(E.paddingInline=ef(i[0])?`${i[0]/2}px`:`calc(${i[0]} / 2)`),m&&(E.flex=hR(m),a===!1&&!E.minWidth&&(E.minWidth=0)),S.createElement(`div`,{...g,style:{...E,...h,...C},className:T,ref:t},p)});function _R(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((e,t)=>{if(nf(e))for(let r=0;r{let[n,r]=S.useState(()=>tf(e)?e:``),i=()=>{if(tf(e)&&r(e),nf(e))for(let n=0;n{i()},[JSON.stringify(e),t]),n},yR=S.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:s,gutter:c=0,wrap:l,...u}=e,{getPrefixCls:d,direction:f}=S.useContext(ga),p=qC(!0,null),m=vR(i,p),h=vR(r,p),g=d(`row`,n),[_,v]=Xee(g),y=_R(c,p),b=J(g,{[`${g}-no-wrap`]:l===!1,[`${g}-${h}`]:h,[`${g}-${m}`]:m,[`${g}-rtl`]:f===`rtl`},a,_,v),x={};y?.[0]&&(x.marginInline=ef(y[0])?`${y[0]/-2}px`:`calc(${y[0]} / -2)`);let[C,w]=y;x.rowGap=w;let T=S.useMemo(()=>({gutter:[C,w],wrap:l}),[C,w,l]);return S.createElement(mR.Provider,{value:T},S.createElement(`div`,{...u,className:b,style:{...x,...o},ref:t},s))}),bR=gR,xR=c(o((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:`M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`minus`,theme:`outlined`}}))());function SR(){return SR=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,SR({},e,{ref:t,icon:xR.default}))),wR=c(o((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:`M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z`}}]},name:`up`,theme:`outlined`}}))());function TR(){return TR=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,TR({},e,{ref:t,icon:wR.default})));function DR(){return typeof BigInt==`function`}function OR(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function kR(e){var t=e.trim(),n=t.startsWith(`-`);n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,`$1`).replace(/\.0*$/,``).replace(/^0+/,``),t.startsWith(`.`)&&(t=`0${t}`);var r=t||`0`,i=r.split(`.`),a=i[0]||`0`,o=i[1]||`0`;a===`0`&&o===`0`&&(n=!1);var s=n?`-`:``;return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:o,fullStr:`${s}${r}`}}function AR(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes(`e`)}function jR(e){var t=Rs(e.toLowerCase().split(`e`),2),n=t[0],r=t[1],i=r===void 0?`0`:r,a=n.startsWith(`-`),o=Rs((a?n.slice(1):n).split(`.`),2),s=o[0],c=s===void 0?`0`:s,l=o[1],u=l===void 0?``:l;return{decimal:u,digits:`${c}${u}`.replace(/^0+/,``)||`0`,exponent:Number(i),integer:c,negative:a}}function MR(e){var t=e.decimal,n=e.digits,r=e.exponent,i=e.integer,a=e.negative;if(n===`0`)return`0`;var o=i.replace(/^0+/,``).length,s=(t.match(/^0*/)||[``])[0].length,c=(o||-s)+r,l=``;return l=c<=0?`0.${`0`.repeat(-c)}${n}`:c>=n.length?`${n}${`0`.repeat(c-n.length)}`:`${n.slice(0,c)}.${n.slice(c)}`,`${a?`-`:``}${l}`}function NR(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function PR(e){var t=String(e);return AR(e)?NR(jR(t)):t.includes(`.`)&&IR(t)?t.length-t.indexOf(`.`)-1:0}function FR(e){var t=String(e);if(AR(e)){if(e>2**53-1)return String(DR()?BigInt(e).toString():2**53-1);if(e<-(2**53-1))return String(DR()?BigInt(e).toString():-(2**53-1));var n=jR(t),r=NR(n);t=r>100?MR(n):e.toFixed(r)}return kR(t).fullStr}function IR(e){return typeof e==`number`?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var LR=function(){function e(t){if(Ws(this,e),Vs(this,`origin`,``),Vs(this,`negative`,void 0),Vs(this,`integer`,void 0),Vs(this,`decimal`,void 0),Vs(this,`decimalLen`,void 0),Vs(this,`empty`,void 0),Vs(this,`nan`,void 0),OR(t)){this.empty=!0;return}if(this.origin=String(t),t===`-`||Number.isNaN(t)){this.nan=!0;return}var n=t;if(AR(n)&&(n=Number(n)),n=typeof n==`string`?n:FR(n),IR(n)){var r=kR(n);this.negative=r.negative;var i=r.trimStr.split(`.`);this.integer=BigInt(i[0]);var a=i[1]||`0`;this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}return Ks(e,[{key:`getMark`,value:function(){return this.negative?`-`:``}},{key:`getIntegerStr`,value:function(){return this.integer.toString()}},{key:`getDecimalStr`,value:function(){return this.decimal.toString().padStart(this.decimalLen,`0`)}},{key:`alignDecimal`,value:function(e){var t=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,`0`)}`;return BigInt(t)}},{key:`negate`,value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:`cal`,value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),o=r(i),s=kR(a),c=`${s.negativeStr}${s.trimStr.padStart(o+1,`0`)}`;return new e(`${c.slice(0,-o)}.${c.slice(-o)}`)}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:`multi`,value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return e*2})}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return this.nan}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toString()===e?.toString()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:kR(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}]),e}(),RR=function(){function e(t){if(Ws(this,e),Vs(this,`origin`,``),Vs(this,`number`,void 0),Vs(this,`empty`,void 0),OR(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Ks(e,[{key:`negate`,value:function(){return new e(-this.toNumber())}},{key:`add`,value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(PR(this.number),PR(n));return new e(r.toFixed(i))}},{key:`multi`,value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>2**53-1)return new e(2**53-1);if(r<-(2**53-1))return new e(-(2**53-1));var i=Math.max(PR(this.number),PR(n));return new e(r.toFixed(i))}},{key:`isEmpty`,value:function(){return this.empty}},{key:`isNaN`,value:function(){return Number.isNaN(this.number)}},{key:`isInvalidate`,value:function(){return this.isEmpty()||this.isNaN()}},{key:`equals`,value:function(e){return this.toNumber()===e?.toNumber()}},{key:`lessEquals`,value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:`toNumber`,value:function(){return this.number}},{key:`toString`,value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.isInvalidate()?``:AR(this.number)&&PR(this.number)>100?String(this.number):FR(this.number):this.origin}}]),e}();function zR(e){return DR()?new LR(e):new RR(e)}function BR(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===``)return``;var i=kR(e),a=i.negativeStr,o=i.integerStr,s=i.decimalStr,c=`${t}${s}`,l=`${a}${o}`;if(n>=0){var u=Number(s[n]);return u>=5&&!r?BR(zR(e).add(`${a}0.${`0`.repeat(n)}${10-u}`).toString(),t,n,r):n===0?l:`${l}${t}${s.padEnd(n,`0`).slice(0,n)}`}return c===`.0`?l:`${l}${c}`}var VR=zR;function HR(e,t){let n=(0,S.useRef)(null);function r(){try{let{selectionStart:t,selectionEnd:r,value:i}=e;n.current={start:t,end:r,value:i,beforeTxt:i.substring(0,t),afterTxt:i.substring(r)}}catch{}}function i(){if(e&&n.current&&t)try{let{value:t}=e,{beforeTxt:r,afterTxt:i,start:a}=n.current,o=t.length;if(t.startsWith(r))o=r.length;else if(t.endsWith(i))o=t.length-n.current.afterTxt.length;else{let e=r[a-1],n=t.indexOf(e,a-1);n!==-1&&(o=n+1)}e.setSelectionRange(o,o)}catch(e){ui(!1,`Something warning of cursor restore. Please fire issue about this: ${e.message}`)}}return[r,i]}var UR=200,WR=600;function GR({prefixCls:e,action:t,children:n,disabled:r,className:i,style:a,onStep:o}){let s=t===`up`,c=S.useRef(),l=S.useRef([]),u=()=>{clearTimeout(c.current)},d=e=>{e.preventDefault(),u(),o(s,`handler`);function t(){o(s,`handler`),c.current=setTimeout(t,UR)}c.current=setTimeout(t,WR)};S.useEffect(()=>()=>{u(),l.current.forEach(e=>{Oi.cancel(e)})},[]);let f=`${e}-action`,p=J(f,`${f}-${t}`,{[`${f}-${t}-disabled`]:r},i),m=()=>l.current.push(Oi(u));return S.createElement(`span`,{unselectable:`on`,role:`button`,onMouseUp:m,onMouseLeave:m,onMouseDown:e=>{d(e)},"aria-label":s?`Increase Value`:`Decrease Value`,"aria-disabled":r,className:p,style:a},n||S.createElement(`span`,{unselectable:`on`,className:`${e}-action-${t}-inner`}))}function KR(e){let t=typeof e==`number`?FR(e):kR(e).fullStr;return t.includes(`.`)?kR(t.replace(/(\d)\.(\d)/g,`$1$2.`)).fullStr:e+`0`}var qR=(()=>{let e=(0,S.useRef)(0),t=()=>{Oi.cancel(e.current)};return(0,S.useEffect)(()=>t,[]),n=>{t(),e.current=Oi(()=>{n()})}});function JR(){return JR=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),XR=e=>{let t=VR(e);return t.isInvalidate()?null:t},ZR=S.forwardRef((e,t)=>{let{mode:n=`input`,prefixCls:r=`rc-input-number`,className:i,style:a,classNames:o,styles:s,min:c,max:l,step:u=1,defaultValue:d,value:f,disabled:p,readOnly:m,upHandler:h,downHandler:g,keyboard:_,changeOnWheel:v=!1,controls:y=!0,prefix:b,suffix:x,stringMode:C,parser:w,formatter:T,precision:E,decimalSeparator:D,onChange:O,onInput:k,onPressEnter:A,onStep:j,onMouseDown:M,onClick:N,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,changeOnBlur:z=!0,...B}=e,[V,H]=S.useState(!1),U=S.useRef(!1),ee=S.useRef(!1),W=S.useRef(!1),te=S.useRef(null),G=S.useRef(null);S.useImperativeHandle(t,()=>Si(G.current,{focus:e=>{Nr(G.current,e)},blur:()=>{G.current?.blur()},nativeElement:te.current}));let[ne,K]=S.useState(()=>VR(f??d));function re(e){f===void 0&&K(e)}let ie=S.useCallback((e,t)=>{if(!t)return E>=0?E:Math.max(PR(e),PR(u))},[E,u]),ae=S.useCallback(e=>{let t=String(e);if(w)return w(t);let n=t;return D&&(n=n.replace(D,`.`)),n.replace(/[^\w.-]+/g,``)},[w,D]),q=S.useRef(``),oe=S.useCallback((e,t)=>{if(T)return T(e,{userTyping:t,input:String(q.current)});let n=typeof e==`number`?FR(e):e;if(!t){let e=ie(n,t);IR(n)&&(D||e>=0)&&(n=BR(n,D||`.`,e))}return n},[T,ie,D]),[se,ce]=S.useState(()=>{let e=d??f;return ne.isInvalidate()&&[`string`,`number`].includes(typeof e)?Number.isNaN(e)?``:e:oe(ne.toString(),!1)});q.current=se;function le(e,t){ce(oe(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}let ue=S.useMemo(()=>XR(l),[l,E]),de=S.useMemo(()=>XR(c),[c,E]),fe=S.useMemo(()=>!ue||!ne||ne.isInvalidate()?!1:ue.lessEquals(ne),[ue,ne]),pe=S.useMemo(()=>!de||!ne||ne.isInvalidate()?!1:ne.lessEquals(de),[de,ne]),[me,he]=HR(G.current,V),ge=e=>ue&&!e.lessEquals(ue)?ue:de&&!de.lessEquals(e)?de:null,_e=e=>!ge(e),ve=(e,t)=>{let n=e,r=_e(n)||n.isEmpty();if(!n.isEmpty()&&!t&&(n=ge(n)||n,r=!0),!m&&!p&&r){let e=n.toString(),r=ie(e,t);return r>=0&&(n=VR(BR(e,`.`,r)),_e(n)||(n=VR(BR(e,`.`,r,!0)))),n.equals(ne)||(re(n),O?.(n.isEmpty()?null:YR(C,n)),f===void 0&&le(n,t)),n}return ne},ye=qR(),be=e=>{if(me(),q.current=e,ce(e),!ee.current){let t=VR(ae(e));t.isNaN()||ve(t,!0)}k?.(e),ye(()=>{let t=e;w||(t=e.replace(/。/g,`.`)),t!==e&&be(t)})},xe=()=>{ee.current=!0},Se=()=>{ee.current=!1,be(G.current.value)},Ce=e=>{be(e.target.value)},we=zn((e,t)=>{if(e&&fe||!e&&pe)return;U.current=!1;let n=VR(W.current?KR(u):u);e||(n=n.negate());let r=ve((ne||VR(0)).add(n.toString()),!1);j?.(YR(C,r),{offset:W.current?KR(u):u,type:e?`up`:`down`,emitter:t}),G.current?.focus()}),Te=e=>{let t=VR(ae(se)),n;n=t.isNaN()?ve(ne,e):ve(t,e),f===void 0?n.isNaN()||le(n,!1):le(ne,!1)},Ee=()=>{U.current=!0},De=e=>{let{key:t,shiftKey:n}=e;U.current=!0,W.current=n,t===`Enter`&&(ee.current||(U.current=!1),Te(!1),A?.(e)),_!==!1&&!ee.current&&[`Up`,`ArrowUp`,`Down`,`ArrowDown`].includes(t)&&(we(t===`Up`||t===`ArrowUp`,`keyboard`),e.preventDefault())},Oe=()=>{U.current=!1,W.current=!1};S.useEffect(()=>{if(v&&V){let e=e=>{we(e.deltaY<0,`wheel`),e.preventDefault()},t=G.current;if(t)return t.addEventListener(`wheel`,e,{passive:!1}),()=>t.removeEventListener(`wheel`,e)}});let ke=()=>{z&&Te(!1),H(!1),U.current=!1},Ae=e=>{G.current&&e.target!==G.current&&(G.current.focus(),e.preventDefault()),M?.(e)};Un(()=>{ne.isInvalidate()||le(ne,!1)},[E,T]),Un(()=>{let e=VR(f);K(e);let t=VR(ae(se));(!e.equals(t)||!U.current||T)&&le(e,U.current)},[f]),Un(()=>{T&&he()},[se]);let je={prefixCls:r,onStep:we,className:o?.action,style:s?.action},Me=S.createElement(GR,JR({},je,{action:`up`,disabled:fe}),h),Ne=S.createElement(GR,JR({},je,{action:`down`,disabled:pe}),g);return S.createElement(`div`,{ref:te,className:J(r,`${r}-mode-${n}`,i,o?.root,{[`${r}-focused`]:V,[`${r}-disabled`]:p,[`${r}-readonly`]:m,[`${r}-not-a-number`]:ne.isNaN(),[`${r}-out-of-range`]:!ne.isInvalidate()&&!_e(ne)}),style:{...s?.root,...a},onMouseDown:Ae,onMouseUp:P,onMouseLeave:F,onMouseMove:I,onMouseEnter:L,onMouseOut:R,onClick:N,onFocus:()=>{H(!0)},onBlur:ke,onKeyDown:De,onKeyUp:Oe,onCompositionStart:xe,onCompositionEnd:Se,onBeforeInput:Ee},n===`spinner`&&y&&Ne,b!==void 0&&S.createElement(`div`,{className:J(`${r}-prefix`,o?.prefix),style:s?.prefix},b),S.createElement(`input`,JR({autoComplete:`off`,role:`spinbutton`,"aria-valuemin":c,"aria-valuemax":l,"aria-valuenow":ne.isInvalidate()?null:ne.toString(),step:u,ref:G,className:J(`${r}-input`,o?.input),style:s?.input,value:se,onChange:Ce,disabled:p,readOnly:m},B)),x!==void 0&&S.createElement(`div`,{className:J(`${r}-suffix`,o?.suffix),style:s?.suffix},x),n===`spinner`&&y&&Me,n===`input`&&y&&S.createElement(`div`,{className:J(`${r}-actions`,o?.actions),style:s?.actions},Me,Ne))}),QR=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:d,antCls:f}=e,[p,m]=tu(f,`space`);return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:d,borderStyle:`solid`,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u,[p(`addon-border-color-outlined`)]:i,[p(`addon-background-filled`)]:u,borderColor:m(`addon-border-color`),background:m(`addon-background`),"&-variant-outlined":{[p(`addon-border-color`)]:m(`addon-border-color-outlined`)},"&-variant-filled":{[p(`addon-border-color`)]:`transparent`,[p(`addon-background`)]:m(`addon-background-filled`),[`&${t}-disabled`]:{[p(`addon-border-color`)]:i,[p(`addon-background`)]:u}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[p(`addon-border-color-outlined`)]:e.colorError,[p(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p(`addon-border-color-outlined`)]:e.colorWarning,[p(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},$R=Ql([`Space`,`Addon`],e=>[QR(e),m_(e,{focus:!1})]),ez=S.forwardRef((e,t)=>{let{className:n,children:r,style:i,prefixCls:a,variant:o=`outlined`,disabled:s,status:c,...l}=e,{getPrefixCls:u,direction:d}=S.useContext(ga),f=u(`space-addon`,a),[p,m]=$R(f),{compactItemClassnames:h,compactSize:g}=Oh(f,d),_=tC(f,c),v=J(f,p,h,m,`${f}-variant-${o}`,_,{[`${f}-${g}`]:g,[`${f}-disabled`]:s},n);return S.createElement(`div`,{ref:t,className:v,style:i,...l},r)}),tz=e=>{let t=e.handleVisible??`auto`,n=e.controlHeightSM-e.lineWidth*2;return{...JF(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Nc(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:+(t===!0),handleVisibleWidth:t===!0?n:0}},nz=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:i,inputFontSizeSM:a,inputFontSizeLG:o,colorError:s,paddingInlineSM:c,paddingBlockSM:l,paddingBlockLG:u,paddingInlineLG:d,colorIcon:f,colorTextDisabled:p,motionDurationMid:m,handleHoverColor:h,handleOpacity:g,paddingInline:_,paddingBlock:v,handleBg:y,handleActiveBg:b,inputAffixPadding:x,borderRadiusSM:S,controlWidth:C,handleBorderColor:w,filledHandleBg:T,lineHeightLG:E,antCls:D}=e,O=`${Y(n)} ${r} ${w}`,[k,A]=tu(D,`input-number`);return[{[t]:{...Ul(e),...mI(e),[k(`input-padding-block`)]:Y(v),[k(`input-padding-inline`)]:Y(_),display:`inline-flex`,width:C,margin:0,paddingBlock:0,borderRadius:i,...$F(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...aI(e,{[`${t}-actions`]:{background:T,[`${t}-action-down`]:{borderBlockStart:O}},"&:focus-within":{[`${t}-actions`]:{background:y}}}),...uI(e,{[`${t}-actions`]:{background:y,[`${t}-action-down`]:{borderBlockStart:O}}}),...nI(e),[`&${t}-borderless`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(v).add(n).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(l).add(n).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[k(`input-padding-block`)]:Y(e.calc(u).add(n).equal())},"&-rtl":{direction:`rtl`,[`${t}-input`]:{direction:`rtl`}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:s}},[`${t}-input`]:{...Ul(e),width:`100%`,paddingBlock:A(`input-padding-block`),textAlign:`start`,backgroundColor:`transparent`,border:0,borderRadius:0,outline:0,transition:`all ${m} linear`,appearance:`textfield`,fontSize:`inherit`,lineHeight:`inherit`,...dI(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:`none`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:`not-allowed`,color:e.colorTextDisabled}}},{[t]:{[`${t}-action`]:{...Wl(),userSelect:`none`,overflow:`hidden`,fontWeight:`bold`,lineHeight:0,textAlign:`center`,cursor:`pointer`,transition:`all ${m} linear`,[`&:active:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{background:b},[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{color:h},[`&${t}-action-up-disabled, &${t}-action-down-disabled`]:{cursor:`not-allowed`,color:p}},"&-mode-input":{overflow:`hidden`,[`${t}-actions`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:`100%`,borderRadius:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,transition:`all ${m}`,overflow:`hidden`,[`${t}-action`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`auto`,height:`40%`,marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:f,height:`50%`,borderInlineStart:O,[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{height:`60%`}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:`none`}}},[`&${t}-mode-spinner`]:{padding:0,width:`auto`,[`${t}-action`]:{flex:`none`,paddingInline:A(`input-padding-inline`),"&-up":{borderInlineStart:O},"&-down":{borderInlineEnd:O}},[`${t}-input`]:{textAlign:`center`,paddingInline:A(`input-padding-inline`)}}}},{[t]:{"&-lg":{[k(`input-padding-block`)]:Y(u),[k(`input-padding-inline`)]:Y(d),paddingBlock:0,fontSize:o,lineHeight:E},"&-sm":{[k(`input-padding-block`)]:Y(l),[k(`input-padding-inline`)]:Y(c),paddingBlock:0,fontSize:a,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:`flex`,flex:`none`,alignItems:`center`,alignSelf:`center`,pointerEvents:`none`},[`${t}-prefix`]:{marginInlineEnd:x},[`${t}-suffix`]:{height:`100%`,marginInlineStart:x,transition:`margin ${m}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},rz=e=>{let{componentCls:t,antCls:n}=e;return{[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},iz=Ql(`InputNumber`,e=>{let t=dc(e,qF(e));return[nz(t),rz(t),m_(t)]},tz,{unitless:{handleOpacity:!0},resetFont:!1}),az=S.forwardRef((e,t)=>{let n=S.useRef(null);S.useImperativeHandle(t,()=>n.current);let{rootClassName:r,size:i,disabled:a,prefixCls:o,addonBefore:s,addonAfter:c,prefix:l,suffix:u,bordered:d,readOnly:f,status:p,controls:m=!0,variant:h,className:g,style:_,classNames:v,styles:y,mode:b,...x}=e,{direction:C,className:w,style:T,styles:E,classNames:D}=ya(`inputNumber`),O=S.useContext(mm),k=a??O,A=S.useMemo(()=>!m||k||f?!1:m,[m,k,f]),{compactSize:j,compactItemClassnames:M}=Oh(o,C),N=b===`spinner`?S.createElement(BI,null):S.createElement(ER,null),P=b===`spinner`?S.createElement(CR,null):S.createElement(jC,null),F=typeof A==`boolean`?A:void 0;nf(A)&&(N=A.upIcon||N,P=A.downIcon||P);let{hasFeedback:I,isFormItemInput:L,feedbackIcon:R}=S.useContext(my),z=Th(e=>i??j??e),[B,V]=dC(`inputNumber`,h,d),H=I&&S.createElement(S.Fragment,null,R),U={...e,size:z,disabled:k,controls:A},[ee,W]=Cf([D,v],[E,y],{props:U});return S.createElement(ZR,{ref:n,mode:b,disabled:k,className:J(g,r,ee.root,w,M,tC(o,p,I),{[`${o}-${B}`]:V,[`${o}-lg`]:z===`large`,[`${o}-sm`]:z===`small`,[`${o}-rtl`]:C===`rtl`,[`${o}-in-form-item`]:L,[`${o}-without-controls`]:!A}),style:{...W.root,...T,..._},upHandler:N,downHandler:P,prefixCls:o,readOnly:f,controls:F,prefix:l,suffix:H||u,classNames:ee,styles:W,...x})}),oz=S.forwardRef((e,t)=>{let{addonBefore:n,addonAfter:r,prefixCls:i,className:a,status:o,rootClassName:s,...c}=e,{getPrefixCls:l}=ya(`inputNumber`),u=l(`input-number`,i),{status:d}=S.useContext(my),f=nC(d,o),p=sp(u),[m,h]=iz(u,p),g=n||r,_=S.createElement(az,{ref:t,...c,prefixCls:u,status:f,className:J(h,p,m,a),rootClassName:g?void 0:s});if(g){let t=t=>t?S.createElement(ez,{className:J(`${u}-addon`,h,m),variant:e.variant,disabled:e.disabled,status:f},S.createElement(_y,{form:!0},t)):null,i=t(n),a=t(r);return S.createElement(jh,{rootClassName:s},i,_,a)}return _}),sz=oz;sz._InternalPanelDoNotUseOrYouWillBeFired=e=>S.createElement(jm,{theme:{components:{InputNumber:{handleVisible:!0}}}},S.createElement(oz,{...e}));function cz(e){return!!(e.addonBefore||e.addonAfter)}function lz(e){return!!(e.prefix||e.suffix||e.allowClear)}function uz(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function dz(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=uz(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=uz(t,e,r),n(i);return}n(i)}function fz(){return fz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:r,prefixCls:i,prefix:a,suffix:o,addonBefore:s,addonAfter:c,className:l,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:m,allowClear:h,value:g,handleReset:_,hidden:v,classes:y,classNames:b,dataAttrs:x,styles:C,components:w,onClear:T}=e,E=r??n,D=w?.affixWrapper||`span`,O=w?.groupWrapper||`span`,k=w?.wrapper||`span`,A=w?.groupAddon||`span`,j=(0,S.useRef)(null),M=e=>{j.current?.contains(e.target)&&m?.()},N=lz(e),P=(0,S.cloneElement)(E,{value:g,className:J(E.props?.className,!N&&b?.variant)||null}),F=(0,S.useRef)(null);if(S.useImperativeHandle(t,()=>({nativeElement:F.current||j.current})),N){let e=null;if(h){let t=!d&&!f&&g,n=`${i}-clear-icon`,r=typeof h==`object`&&h?.clearIcon?h.clearIcon:`✖`;e=S.createElement(`button`,{type:`button`,tabIndex:-1,onClick:e=>{_?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:J(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!o})},r)}let t=`${i}-affix-wrapper`,n=J(t,{[`${i}-disabled`]:d,[`${t}-disabled`]:d,[`${t}-focused`]:p,[`${t}-readonly`]:f,[`${t}-input-with-clear-btn`]:o&&h&&g},y?.affixWrapper,b?.affixWrapper,b?.variant),r=(o||h)&&S.createElement(`span`,{className:J(`${i}-suffix`,b?.suffix),style:C?.suffix},e,o);P=S.createElement(D,fz({className:n,style:C?.affixWrapper,onClick:M},x?.affixWrapper,{ref:j}),a&&S.createElement(`span`,{className:J(`${i}-prefix`,b?.prefix),style:C?.prefix},a),P,r)}if(cz(e)){let e=`${i}-group`,t=`${e}-addon`,n=`${e}-wrapper`,r=J(`${i}-wrapper`,e,y?.wrapper,b?.wrapper),a=J(n,{[`${n}-disabled`]:d},y?.group,b?.groupWrapper);P=S.createElement(O,{className:a,ref:F},S.createElement(k,{className:r},s&&S.createElement(A,{className:t},s),P,c&&S.createElement(A,{className:t},c)))}return S.cloneElement(P,{className:J(P.props?.className,l)||null,style:{...P.props?.style,...u},hidden:v})});function mz(e,t){return S.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function hz(){return hz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:r,onFocus:i,onBlur:a,onPressEnter:o,onKeyDown:s,onKeyUp:c,prefixCls:l=`rc-input`,disabled:u,htmlSize:d,className:f,maxLength:p,suffix:m,showCount:h,count:g,type:_=`text`,classes:v,classNames:y,styles:b,onCompositionStart:x,onCompositionEnd:C,...w}=e,[T,E]=(0,S.useState)(!1),D=(0,S.useRef)(!1),O=(0,S.useRef)(!1),k=(0,S.useRef)(null),A=(0,S.useRef)(null),j=e=>{k.current&&Nr(k.current,e)},[M,N]=Gn(e.defaultValue,e.value),P=M==null?``:String(M),[F,I]=(0,S.useState)(null),L=mz(g,h),R=L.max||p,z=L.strategy(P),B=!!R&&z>R;(0,S.useImperativeHandle)(t,()=>({focus:j,blur:()=>{k.current?.blur()},setSelectionRange:(e,t,n)=>{k.current?.setSelectionRange(e,t,n)},select:()=>{k.current?.select()},input:k.current,nativeElement:A.current?.nativeElement||k.current})),(0,S.useEffect)(()=>{O.current&&=!1,E(e=>e&&u?!1:e)},[u]);let V=(e,t,n)=>{let i=t;if(!D.current&&L.exceedFormatter&&L.max&&L.strategy(t)>L.max)i=L.exceedFormatter(t,{max:L.max}),t!==i&&I([k.current?.selectionStart||0,k.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;N(i),k.current&&dz(k.current,e,r,i)};(0,S.useEffect)(()=>{F&&k.current?.setSelectionRange(...F)},[F]);let H=e=>{V(e,e.target.value,{source:`change`})},U=e=>{D.current=!1,V(e,e.currentTarget.value,{source:`compositionEnd`}),C?.(e)},ee=e=>{o&&e.key===`Enter`&&!O.current&&!e.nativeEvent.isComposing&&(O.current=!0,o(e)),s?.(e)},W=e=>{e.key===`Enter`&&(O.current=!1),c?.(e)},te=e=>{E(!0),i?.(e)},G=e=>{O.current&&=!1,E(!1),a?.(e)},ne=e=>{N(``),j(),k.current&&dz(k.current,e,r)},K=B&&`${l}-out-of-range`;return S.createElement(pz,hz({},w,{prefixCls:l,className:J(f,K),handleReset:ne,value:P,focused:T,triggerFocus:j,suffix:(()=>{let e=Number(R)>0;if(m||L.show){let t=L.showFormatter?L.showFormatter({value:P,count:z,maxLength:R}):`${z}${e?` / ${R}`:``}`;return S.createElement(S.Fragment,null,L.show&&S.createElement(`span`,{className:J(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!m},y?.count),style:{...b?.count}},t),m)}return null})(),disabled:u,classes:v,classNames:y,styles:b,ref:A}),(()=>{let t=gi(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return S.createElement(`input`,hz({autoComplete:n},t,{onChange:H,onFocus:te,onBlur:G,onKeyDown:ee,onKeyUp:W,className:J(l,{[`${l}-disabled`]:u},y?.input),style:b?.input,ref:k,size:d,type:_,onCompositionStart:e=>{D.current=!0,x?.(e)},onCompositionEnd:U}))})())}),_z=e=>{let t;return nf(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:S.createElement(Ou,null)}),t};function vz(e,t){let n=(0,S.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,S.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function yz(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var bz=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,status:i,size:a,disabled:o,onBlur:s,onFocus:c,suffix:l,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:h,rootClassName:g,onChange:_,classNames:v,variant:y,...b}=e,{getPrefixCls:x,direction:C,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=ya(`input`),A=x(`input`,n),j=(0,S.useRef)(null),M=sp(A),[N,P]=xI(A,g);SI(A,M);let{compactSize:F,compactItemClassnames:I}=Oh(A,C),L=Th(e=>a??F??e),R=S.useContext(mm),z=o??R,B={...e,size:L,disabled:z},[V,H]=Cf([O,v],[k,h],{props:B}),{status:U,hasFeedback:ee,feedbackIcon:W}=(0,S.useContext)(my),te=nC(U,i);(0,S.useRef)(yz(e)||!!ee);let G=vz(j,!0),ne=e=>{G(),s?.(e)},K=e=>{G(),c?.(e)},re=e=>{G(),_?.(e)},ie=(ee||l)&&S.createElement(S.Fragment,null,l,ee&&W),ae=_z(u??w),[q,oe]=dC(`input`,y,r);return S.createElement(gz,{ref:cr(t,j),prefixCls:A,autoComplete:T,...b,disabled:z,onBlur:ne,onFocus:K,style:{...H.root,...D,...m},styles:H,suffix:ie,allowClear:ae,className:J(p,g,P,M,I,E,V.root),onChange:re,addonBefore:f&&S.createElement(_y,{form:!0,space:!0},f),addonAfter:d&&S.createElement(_y,{form:!0,space:!0},d),classNames:{...V,input:J({[`${A}-sm`]:L===`small`,[`${A}-lg`]:L===`large`,[`${A}-rtl`]:C===`rtl`},V.input,N),variant:J({[`${A}-${q}`]:oe},tC(A,te)),affixWrapper:J({[`${A}-affix-wrapper-sm`]:L===`small`,[`${A}-affix-wrapper-lg`]:L===`large`,[`${A}-affix-wrapper-rtl`]:C===`rtl`},N),wrapper:J({[`${A}-group-rtl`]:C===`rtl`},N),groupWrapper:J({[`${A}-group-wrapper-sm`]:L===`small`,[`${A}-group-wrapper-lg`]:L===`large`,[`${A}-group-wrapper-rtl`]:C===`rtl`,[`${A}-group-wrapper-${q}`]:oe},tC(`${A}-group-wrapper`,te,ee),N)}})});function xz(e,t,n){return(e-t)/(n-t)}function Sz(e,t,n,r){let i=xz(t,n,r),a={};switch(e){case`rtl`:a.right=`${i*100}%`,a.transform=`translateX(50%)`;break;case`btt`:a.bottom=`${i*100}%`,a.transform=`translateY(50%)`;break;case`ttb`:a.top=`${i*100}%`,a.transform=`translateY(-50%)`;break;default:a.left=`${i*100}%`,a.transform=`translateX(-50%)`;break}return a}function Cz(e,t){return Array.isArray(e)?e[t]:e}var wz=S.createContext({min:0,max:0,direction:`ltr`,step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),Tz=S.createContext({});function Ez(){return Ez=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,value:r,valueIndex:i,onStartMove:a,onDelete:o,style:s,render:c,dragging:l,draggingDelete:u,onOffsetChange:d,onChangeComplete:f,onFocus:p,onMouseEnter:m,...h}=e,{min:g,max:_,direction:v,disabled:y,keyboard:b,range:x,tabIndex:C,ariaLabelForHandle:w,ariaLabelledByForHandle:T,ariaRequired:E,ariaValueTextFormatterForHandle:D,styles:O,classNames:k}=S.useContext(wz),A=`${n}-handle`,j=e=>{y||a(e,i)},M=e=>{p?.(e,i)},N=e=>{m(e,i)},P=e=>{if(!y&&b){let t=null;switch(e.which||e.keyCode){case Qr.LEFT:t=v===`ltr`||v===`btt`?-1:1;break;case Qr.RIGHT:t=v===`ltr`||v===`btt`?1:-1;break;case Qr.UP:t=v===`ttb`?-1:1;break;case Qr.DOWN:t=v===`ttb`?1:-1;break;case Qr.HOME:t=`min`;break;case Qr.END:t=`max`;break;case Qr.PAGE_UP:t=2;break;case Qr.PAGE_DOWN:t=-2;break;case Qr.BACKSPACE:case Qr.DELETE:o?.(i);break}t!==null&&(e.preventDefault(),d(t,i))}},F=e=>{switch(e.which||e.keyCode){case Qr.LEFT:case Qr.RIGHT:case Qr.UP:case Qr.DOWN:case Qr.HOME:case Qr.END:case Qr.PAGE_UP:case Qr.PAGE_DOWN:f?.();break}},I=Sz(v,r,g,_),L={};i!==null&&(L={tabIndex:y?null:Cz(C,i),role:`slider`,"aria-valuemin":g,"aria-valuemax":_,"aria-valuenow":r,"aria-disabled":y,"aria-label":Cz(w,i),"aria-labelledby":Cz(T,i),"aria-required":Cz(E,i),"aria-valuetext":Cz(D,i)?.(r),"aria-orientation":v===`ltr`||v===`rtl`?`horizontal`:`vertical`,onMouseDown:j,onTouchStart:j,onFocus:M,onMouseEnter:N,onKeyDown:P,onKeyUp:F});let R=S.createElement(`div`,Ez({ref:t,className:J(A,{[`${A}-${i+1}`]:i!==null&&x,[`${A}-dragging`]:l,[`${A}-dragging-delete`]:u},k.handle),style:{...I,...s,...O.handle}},L,h));return c&&(R=c(R,{index:i,prefixCls:n,value:r,dragging:l,draggingDelete:u})),R});function Oz(){return Oz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,style:r,onStartMove:i,onOffsetChange:a,values:o,handleRender:s,activeHandleRender:c,draggingIndex:l,draggingDelete:u,onFocus:d,...f}=e,p=S.useRef({}),[m,h]=S.useState(!1),[g,_]=S.useState(-1),v=e=>{_(e),h(!0)},y=(e,t)=>{v(t),d?.(e)},b=(e,t)=>{v(t)};S.useImperativeHandle(t,()=>({focus:e=>{p.current[e]?.focus()},hideHelp:()=>{(0,Vi.flushSync)(()=>{h(!1)})}}));let x={prefixCls:n,onStartMove:i,onOffsetChange:a,render:s,onFocus:y,onMouseEnter:b,...f};return S.createElement(S.Fragment,null,o.map((e,t)=>{let n=l===t;return S.createElement(Dz,Oz({ref:e=>{e?p.current[t]=e:delete p.current[t]},dragging:n,draggingDelete:n&&u,style:Cz(r,t),key:t,value:e,valueIndex:t},x))}),c&&m&&S.createElement(Dz,Oz({key:`a11y`},x,{value:o[g],valueIndex:null,dragging:l!==-1,draggingDelete:u,render:c,style:{pointerEvents:`none`},tabIndex:null,"aria-hidden":!0})))}),Az=e=>{let{prefixCls:t,style:n,children:r,value:i,onClick:a}=e,{min:o,max:s,direction:c,includedStart:l,includedEnd:u,included:d}=S.useContext(wz),f=`${t}-text`,p=Sz(c,i,o,s);return S.createElement(`span`,{className:J(f,{[`${f}-active`]:d&&l<=i&&i<=u}),style:{...p,...n},onMouseDown:e=>{e.stopPropagation()},onClick:()=>{a(i)}},r)},jz=e=>{let{prefixCls:t,marks:n,onClick:r}=e,i=`${t}-mark`;return n.length?S.createElement(`div`,{className:i},n.map(({value:e,style:t,label:n})=>S.createElement(Az,{key:e,prefixCls:i,style:t,value:e,onClick:r},n))):null},Mz=e=>{let{prefixCls:t,value:n,style:r,activeStyle:i}=e,{min:a,max:o,direction:s,included:c,includedStart:l,includedEnd:u}=S.useContext(wz),d=`${t}-dot`,f=c&&l<=n&&n<=u,p={...Sz(s,n,a,o),...typeof r==`function`?r(n):r};return f&&(p={...p,...typeof i==`function`?i(n):i}),S.createElement(`span`,{className:J(d,{[`${d}-active`]:f}),style:p})},Nz=e=>{let{prefixCls:t,marks:n,dots:r,style:i,activeStyle:a}=e,{min:o,max:s,step:c}=S.useContext(wz),l=S.useMemo(()=>{let e=new Set;if(n.forEach(t=>{e.add(t.value)}),r&&c!==null){let t=o;for(;t<=s;)e.add(t),t+=c}return Array.from(e)},[o,s,c,r,n]);return S.createElement(`div`,{className:`${t}-step`},l.map(e=>S.createElement(Mz,{prefixCls:t,key:e,value:e,style:i,activeStyle:a})))},Pz=e=>{let{prefixCls:t,style:n,start:r,end:i,index:a,onStartMove:o,replaceCls:s}=e,{direction:c,min:l,max:u,disabled:d,range:f,classNames:p}=S.useContext(wz),m=`${t}-track`,h=xz(r,l,u),g=xz(i,l,u),_=e=>{!d&&o&&o(e,-1)},v={};switch(c){case`rtl`:v.right=`${h*100}%`,v.width=`${g*100-h*100}%`;break;case`btt`:v.bottom=`${h*100}%`,v.height=`${g*100-h*100}%`;break;case`ttb`:v.top=`${h*100}%`,v.height=`${g*100-h*100}%`;break;default:v.left=`${h*100}%`,v.width=`${g*100-h*100}%`}let y=s||J(m,{[`${m}-${a+1}`]:a!==null&&f,[`${t}-track-draggable`]:o},p.track);return S.createElement(`div`,{className:y,style:{...v,...n},onMouseDown:_,onTouchStart:_})},Fz=e=>{let{prefixCls:t,style:n,values:r,startPoint:i,onStartMove:a}=e,{included:o,range:s,min:c,styles:l,classNames:u}=S.useContext(wz),d=S.useMemo(()=>{if(!s){if(r.length===0)return[];let e=i??c,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}let e=[];for(let t=0;tS.createElement(Pz,{index:i,prefixCls:t,style:{...Cz(n,i),...l.track},start:e,end:r,key:i,onStartMove:a})))},Iz=130;function Lz(e){let t=`targetTouches`in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function Rz(e,t,n,r,i,a,o,s,c,l,u){let[d,f]=S.useState(null),[p,m]=S.useState(-1),[h,g]=S.useState(!1),[_,v]=S.useState(n),[y,b]=S.useState(n),x=S.useRef(null),C=S.useRef(null),w=S.useRef(null),{onDragStart:T,onDragChange:E}=S.useContext(Tz);Hn(()=>{p===-1&&v(n)},[n,p]),S.useEffect(()=>()=>{document.removeEventListener(`mousemove`,x.current),document.removeEventListener(`mouseup`,C.current),w.current&&(w.current.removeEventListener(`touchmove`,x.current),w.current.removeEventListener(`touchend`,C.current))},[]);let D=(e,t,n)=>{t!==void 0&&f(t),v(e);let r=e;n&&(r=e.filter((e,t)=>t!==p)),o(r),E&&E({rawValues:e,deleteIndex:n?p:-1,draggingIndex:p,draggingValue:t})},O=zn((e,t,n)=>{if(e===-1){let e=y[0],n=y[y.length-1],o=r-e,s=i-n,c=t*(i-r);c=Math.max(c,o),c=Math.min(c,s),c=a(e+c)-e,D(y.map(e=>e+c))}else{let a=(i-r)*t,o=[..._];o[e]=y[e];let s=c(o,a,e,`dist`);D(s.values,s.value,n)}});return[p,d,h,S.useMemo(()=>{let e=[...n].sort((e,t)=>e-t),t=[..._].sort((e,t)=>e-t),r={};t.forEach(e=>{r[e]=(r[e]||0)+1}),e.forEach(e=>{r[e]=(r[e]||0)-1});let i=+!!l;return Object.values(r).reduce((e,t)=>e+Math.abs(t),0)<=i?_:n},[n,_,l]),(r,i,a)=>{r.stopPropagation();let o=a||n,c=o[i];m(i),f(c),b(o),v(o),g(!1);let{pageX:d,pageY:p}=Lz(r),h=!1;T&&T({rawValues:o,draggingIndex:i,draggingValue:c});let y=n=>{n.preventDefault();let{pageX:r,pageY:a}=Lz(n),o=r-d,s=a-p,{width:c,height:f}=e.current.getBoundingClientRect(),m,v;switch(t){case`btt`:m=-s/f,v=o;break;case`ttb`:m=s/f,v=o;break;case`rtl`:m=-o/c,v=s;break;default:m=o/c,v=s}h=l?Math.abs(v)>Iz&&u<_.length:!1,g(h),O(i,m,h)},S=e=>{e.preventDefault(),document.removeEventListener(`mouseup`,S),document.removeEventListener(`mousemove`,y),w.current&&(w.current.removeEventListener(`touchmove`,x.current),w.current.removeEventListener(`touchend`,C.current)),x.current=null,C.current=null,w.current=null,s(h),m(-1),g(!1)};document.addEventListener(`mouseup`,S),document.addEventListener(`mousemove`,y),r.currentTarget.addEventListener(`touchend`,S),r.currentTarget.addEventListener(`touchmove`,y),x.current=y,C.current=S,w.current=r.currentTarget}]}function zz(e,t,n,r,i,a){let o=S.useCallback(n=>Math.max(e,Math.min(t,n)),[e,t]),s=S.useCallback(r=>{if(n!==null){let i=e+Math.round((o(r)-e)/n)*n,a=e=>(String(e).split(`.`)[1]||``).length,s=Math.max(a(n),a(t),a(e)),c=Number(i.toFixed(s));return e<=c&&c<=t?c:null}return null},[n,e,t,o]),c=S.useCallback(i=>{let a=o(i),c=r.map(e=>e.value);n!==null&&c.push(s(i)),c.push(e,t);let l=c[0],u=t-e;return c.forEach(e=>{let t=Math.abs(a-e);t<=u&&(l=e,u=t)}),l},[e,t,r,n,o,s]),l=(i,a,o,c=`unit`)=>{if(typeof a==`number`){let u,d=i[o],f=d+a,p=[];r.forEach(e=>{p.push(e.value)}),p.push(e,t),p.push(s(d));let m=a>0?1:-1;c===`unit`?p.push(s(d+m*n)):p.push(s(f)),p=p.filter(e=>e!==null).filter(e=>a<0?e<=d:e>=d),c===`unit`&&(p=p.filter(e=>e!==d));let h=c===`unit`?d:f;u=p[0];let g=Math.abs(u-h);if(p.forEach(e=>{let t=Math.abs(e-h);t1){let e=[...i];return e[o]=u,l(e,a-m,o,c)}return u}else if(a===`min`)return e;else if(a===`max`)return t},u=(e,t,n,r=`unit`)=>{let i=e[n],a=l(e,t,n,r);return{value:a,changed:a!==i}},d=e=>a===null&&e===0||typeof a==`number`&&e{let o=e.map(c),s=o[n];if(o[n]=l(o,t,n,r),i===!1){let e=a||0;n>0&&o[n-1]!==s&&(o[n]=Math.max(o[n],o[n-1]+e)),n0;--e){let t=!0;for(;d(o[e]-o[e-1])&&t;)({value:o[e-1],changed:t}=u(o,-1,e-1))}for(let e=o.length-1;e>0;--e){let t=!0;for(;d(o[e]-o[e-1])&&t;)({value:o[e-1],changed:t}=u(o,-1,e-1))}for(let e=0;e{if(e===!0||!e)return[!!e,!1,!1,0];let{editable:t,draggableTrack:n,minCount:r,maxCount:i}=e;return[!0,t,!t&&n,r||0,i]},[e])}var Vz=S.forwardRef((e,t)=>{let{prefixCls:n=`rc-slider`,className:r,style:i,classNames:a,styles:o,id:s,disabled:c=!1,keyboard:l=!0,autoFocus:u,onFocus:d,onBlur:f,min:p=0,max:m=100,step:h=1,value:g,defaultValue:_,range:v,count:y,onChange:b,onBeforeChange:x,onAfterChange:C,onChangeComplete:w,allowCross:T=!0,pushable:E=!1,reverse:D,vertical:O,included:k=!0,startPoint:A,trackStyle:j,handleStyle:M,railStyle:N,dotStyle:P,activeDotStyle:F,marks:I,dots:L,handleRender:R,activeHandleRender:z,track:B,tabIndex:V=0,ariaLabelForHandle:H,ariaLabelledByForHandle:U,ariaRequired:ee,ariaValueTextFormatterForHandle:W}=e,te=S.useRef(null),G=S.useRef(null),ne=S.useMemo(()=>O?D?`ttb`:`btt`:D?`rtl`:`ltr`,[D,O]),[K,re,ie,ae,q]=Bz(v),oe=S.useMemo(()=>isFinite(p)?p:0,[p]),se=S.useMemo(()=>isFinite(m)?m:100,[m]),ce=S.useMemo(()=>h!==null&&h<=0?1:h,[h]),le=S.useMemo(()=>typeof E==`boolean`?E?ce:!1:E>=0?E:!1,[E,ce]),ue=S.useMemo(()=>Object.keys(I||{}).map(e=>{let t=I[e],n={value:Number(e)};return t&&typeof t==`object`&&!S.isValidElement(t)&&(`label`in t||`style`in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(({label:e})=>e||typeof e==`number`).sort((e,t)=>e.value-t.value),[I]),[de,fe]=zz(oe,se,ce,ue,T,le),[pe,me]=Gn(_,g),he=S.useMemo(()=>{let e=pe==null?[]:Array.isArray(pe)?pe:[pe],[t=oe]=e,n=pe===null?[]:[t];if(K){if(n=[...e],y||pe===void 0){let e=y>=0?y+1:2;for(n=n.slice(0,e);n.lengthe-t)}return n.forEach((e,t)=>{n[t]=de(e)}),n},[pe,K,oe,y,de]),ge=e=>K?e:e[0],_e=zn(e=>{let t=[...e].sort((e,t)=>e-t);b&&!fi(t,he,!0)&&b(ge(t)),me(t)}),ve=zn(e=>{e&&te.current.hideHelp();let t=ge(he);C?.(t),ui(!C,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),w?.(t)}),ye=e=>{if(c||!re||he.length<=ae)return;let t=[...he];t.splice(e,1),x?.(ge(t)),_e(t);let n=Math.max(0,e-1);te.current.hideHelp(),te.current.focus(n)},[be,xe,Se,Ce,we]=Rz(G,ne,he,oe,se,de,_e,ve,fe,re,ae),Te=(e,t)=>{if(!c){let n=[...he],r=0,i=0,a=se-oe;he.forEach((t,n)=>{let o=Math.abs(e-t);o<=a&&(a=o,r=n),t{e.preventDefault();let{width:t,height:n,left:r,top:i,bottom:a,right:o}=G.current.getBoundingClientRect(),{clientX:s,clientY:c}=e,l;switch(ne){case`btt`:l=(a-c)/n;break;case`ttb`:l=(c-i)/n;break;case`rtl`:l=(o-s)/t;break;default:l=(s-r)/t}Te(de(oe+l*(se-oe)),e)},[De,Oe]=S.useState(null),ke=(e,t)=>{if(!c){let n=fe(he,e,t);x?.(ge(he)),_e(n.values),Oe(n.value)}};S.useEffect(()=>{if(De!==null){let e=he.indexOf(De);e>=0&&te.current.focus(e)}Oe(null)},[De]);let Ae=S.useMemo(()=>ie&&ce===null?!1:ie,[ie,ce]),je=zn((e,t)=>{we(e,t),x?.(ge(he))}),Me=be!==-1;S.useEffect(()=>{if(!Me){let e=he.lastIndexOf(xe);te.current.focus(e)}},[Me]);let Ne=S.useMemo(()=>[...Ce].sort((e,t)=>e-t),[Ce]),[Pe,Fe]=S.useMemo(()=>K?[Ne[0],Ne[Ne.length-1]]:[oe,Ne[0]],[Ne,K,oe]);S.useImperativeHandle(t,()=>({focus:()=>{te.current.focus(0)},blur:()=>{let{activeElement:e}=document;G.current?.contains(e)&&e?.blur()}})),S.useEffect(()=>{u&&te.current.focus(0)},[]);let Ie=S.useMemo(()=>({min:oe,max:se,direction:ne,disabled:c,keyboard:l,step:ce,included:k,includedStart:Pe,includedEnd:Fe,range:K,tabIndex:V,ariaLabelForHandle:H,ariaLabelledByForHandle:U,ariaRequired:ee,ariaValueTextFormatterForHandle:W,styles:o||{},classNames:a||{}}),[oe,se,ne,c,l,ce,k,Pe,Fe,K,V,H,U,ee,W,o,a]);return S.createElement(wz.Provider,{value:Ie},S.createElement(`div`,{ref:G,className:J(n,r,{[`${n}-disabled`]:c,[`${n}-vertical`]:O,[`${n}-horizontal`]:!O,[`${n}-with-marks`]:ue.length}),style:i,onMouseDown:Ee,id:s},S.createElement(`div`,{className:J(`${n}-rail`,a?.rail),style:{...N,...o?.rail}}),B!==!1&&S.createElement(Fz,{prefixCls:n,style:j,values:he,startPoint:A,onStartMove:Ae?je:void 0}),S.createElement(Nz,{prefixCls:n,marks:ue,dots:L,style:P,activeStyle:F}),S.createElement(kz,{ref:te,prefixCls:n,style:M,values:Ce,draggingIndex:be,draggingDelete:Se,onStartMove:je,onOffsetChange:ke,onFocus:d,onBlur:f,handleRender:R,activeHandleRender:z,onChangeComplete:ve,onDelete:re?ye:void 0}),S.createElement(jz,{prefixCls:n,marks:ue,onClick:Te})))}),Hz=(0,S.createContext)({}),Uz=S.forwardRef((e,t)=>{let{open:n,draggingDelete:r,value:i}=e,a=(0,S.useRef)(null),o=n&&!r,s=(0,S.useRef)(null);function c(){Oi.cancel(s.current),s.current=null}function l(){s.current=Oi(()=>{a.current?.forceAlign(),s.current=null})}return S.useEffect(()=>(o?l():c(),c),[o,e.title,i]),S.createElement(kw,{ref:cr(a,t),...e,open:o})}),Wz=e=>{let{componentCls:t,antCls:n,controlSize:r,dotSize:i,marginFull:a,marginPart:o,colorFillContentHover:s,handleColorDisabled:c,calc:l,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:p,handleLineWidth:m,handleLineWidthHover:h,motionDurationMid:g}=e;return{[t]:{...Ul(e),position:`relative`,height:r,margin:`${Y(o)} ${Y(a)}`,padding:0,cursor:`pointer`,touchAction:`none`,"&-vertical":{margin:`${Y(a)} ${Y(o)}`},[`${t}-rail`]:{position:`absolute`,backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${g}`},[`${t}-track,${t}-tracks`]:{position:`absolute`,transition:`background-color ${g}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:`content-box`,backgroundClip:`content-box`,border:`solid rgba(0,0,0,0)`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${Y(m)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:`absolute`,width:u,height:u,outline:`none`,userSelect:`none`,"&-dragging-delete":{opacity:0},"&::before":{content:`""`,position:`absolute`,insetInlineStart:l(m).mul(-1).equal(),insetBlockStart:l(m).mul(-1).equal(),width:l(u).add(l(m).mul(2)).equal(),height:l(u).add(l(m).mul(2)).equal(),backgroundColor:`transparent`},"&::after":{content:`""`,position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${Y(m)} ${e.handleColor}`,outline:`0px solid transparent`,borderRadius:`50%`,cursor:`pointer`,transition:[`inset-inline-start`,`inset-block-start`,`width`,`height`,`box-shadow`,`outline`].map(e=>`${e} ${g}`).join(`, `)},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:l(d).sub(u).div(2).add(h).mul(-1).equal(),insetBlockStart:l(d).sub(u).div(2).add(h).mul(-1).equal(),width:l(d).add(l(h).mul(2)).equal(),height:l(d).add(l(h).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${Y(h)} ${f}`,outline:`6px solid ${p}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:`none`}},[`${t}-mark`]:{position:`absolute`,fontSize:e.fontSize},[`${t}-mark-text`]:{position:`absolute`,display:`inline-block`,color:e.colorTextDescription,textAlign:`center`,wordBreak:`keep-all`,cursor:`pointer`,userSelect:`none`,"&-active":{color:e.colorText}},[`${t}-step`]:{position:`absolute`,background:`transparent`,pointerEvents:`none`},[`${t}-dot`]:{position:`absolute`,width:i,height:i,backgroundColor:e.colorBgElevated,border:`${Y(m)} solid ${e.dotBorderColor}`,borderRadius:`50%`,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,pointerEvents:`auto`,"&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[` ${t}-dot `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:`none`,cursor:`not-allowed`},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:`not-allowed`,width:u,height:u,boxShadow:`0 0 0 ${Y(m)} ${c}`,insetInlineStart:0,insetBlockStart:0},[` ${t}-mark-text, ${t}-dot - `]:{cursor:`not-allowed !important`}},[`&-tooltip ${n}-tooltip-container`]:{minWidth:`unset`}}}},Kz=(e,t)=>{let{componentCls:n,railSize:r,handleSize:i,dotSize:a,marginFull:o,calc:s}=e,c=t?`paddingBlock`:`paddingInline`,l=t?`width`:`height`,u=t?`height`:`width`,d=t?`insetBlockStart`:`insetInlineStart`,f=t?`top`:`insetInlineStart`,p=s(r).mul(3).sub(i).div(2).equal(),m=s(i).sub(r).div(2).equal(),h=t?{borderWidth:`${Y(m)} 0`,transform:`translateY(${Y(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${Y(m)}`,transform:`translateX(${Y(e.calc(m).mul(-1).equal())})`};return{[c]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[l]:`100%`,[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:{...h},[`${n}-handle`]:{[d]:p},[`${n}-mark`]:{insetInlineStart:0,top:0,[f]:s(r).mul(3).add(t?0:o).equal(),[l]:`100%`},[`${n}-step`]:{insetInlineStart:0,top:0,[f]:r,[l]:`100%`,[u]:r},[`${n}-dot`]:{position:`absolute`,[d]:s(r).sub(a).div(2).equal()}}},qz=e=>{let{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:{...Kz(e,!0),[`&${t}-with-marks`]:{marginBottom:n}}}},Jz=e=>{let{componentCls:t}=e;return{[`${t}-vertical`]:{...Kz(e,!1),height:`100%`}}},Yz=Ql(`Slider`,e=>{let t=dc(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[Gz(t),qz(t),Jz(t)]},e=>{let t=e.controlHeightLG/4,n=e.controlHeightSM/2,r=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,o=new Nc(a).setA(.2).toRgbString();return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:n,dotSize:8,handleLineWidth:r,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:o,handleColorDisabled:new Nc(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}});function Xz(){let[e,t]=S.useState(!1),n=S.useRef(null),r=()=>{Oi.cancel(n.current)};return S.useEffect(()=>r,[]),[e,e=>{r(),e?t(e):n.current=Oi(()=>{t(e)})}]}function Zz(e){return e||e===null?e:e=>ef(e)?e.toString():``}var Qz=S.forwardRef((e,t)=>{let{prefixCls:n,range:r,className:i,rootClassName:a,style:o,disabled:s,tooltip:c={},onChangeComplete:l,classNames:u,styles:d,vertical:f,orientation:p,...m}=e,[,h]=Ef(p,f),{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x,getPopupContainer:C}=ya(`slider`),w=S.useContext(mm),T=s??w,E={...e,disabled:T,vertical:h},[D,O]=Cf([b,u],[x,d],{props:E}),{handleRender:k,direction:A}=S.useContext(Uz),j=(A||_)===`rtl`,[M,N]=Xz(),[P,F]=Xz(),I={...c},{open:L,placement:R,getPopupContainer:z,prefixCls:B,formatter:V}=I,H=L,U=(M||P)&&H!==!1,ee=Zz(V),[W,te]=Xz(),G=e=>{l?.(e),te(!1)},ne=(e,t)=>e||(t?j?`left`:`right`:`top`),K=g(`slider`,n),[re,ie]=Yz(K),ae=J(i,v,D.root,a,{[`${K}-rtl`]:j,[`${K}-lock`]:W},re,ie);j&&!h&&(m.reverse=!m.reverse),S.useEffect(()=>{let e=()=>{Oi(()=>{F(!1)},1)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}},[]);let q=r&&!H,oe=k||((e,t)=>{let{index:n}=t,r=e.props;function i(e,t,n){n&&m[e]?.(t),r[e]?.(t)}let a={...r,onMouseEnter:e=>{N(!0),i(`onMouseEnter`,e)},onMouseLeave:e=>{N(!1),i(`onMouseLeave`,e)},onMouseDown:e=>{F(!0),te(!0),i(`onMouseDown`,e)},onFocus:e=>{F(!0),m.onFocus?.(e),i(`onFocus`,e,!0)},onBlur:e=>{F(!1),m.onBlur?.(e),i(`onBlur`,e,!0)}},o=S.cloneElement(e,a),s=(!!H||U)&&ee!==null;return q?o:S.createElement(Wz,{...I,prefixCls:g(`tooltip`,B),title:ee?ee(t.value):``,value:t.value,open:s,placement:ne(R,h),key:n,classNames:{root:`${K}-tooltip`},getPopupContainer:z||C},o)}),se=q?(e,t)=>{let n=S.cloneElement(e,{style:{...e.props.style,visibility:`hidden`}});return S.createElement(Wz,{...I,prefixCls:g(`tooltip`,B),title:ee?ee(t.value):``,open:ee!==null&&U,placement:ne(R,h),key:`tooltip`,classNames:{root:`${K}-tooltip`},getPopupContainer:z||C,draggingDelete:t.draggingDelete},n)}:void 0,ce={...O.root,...y,...o};return S.createElement(Hz,{...m,classNames:D,styles:O,step:m.step,range:r,className:ae,style:ce,disabled:T,vertical:h,ref:t,prefixCls:K,handleRender:oe,activeHandleRender:se,onChangeComplete:G})}),$z=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`}}))());function eB(){return eB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,eB({},e,{ref:t,icon:$z.default}))),nB=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=ya(e),[c,l]=Cf([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:J(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function rB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function iB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function aB(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=LC({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[oB,sB]=[`week`,`WeekPicker`],[cB,lB]=[`month`,`MonthPicker`],[uB,dB]=[`year`,`YearPicker`],[fB,pB]=[`quarter`,`QuarterPicker`],[mB,hB]=[`time`,`TimePicker`],gB=c(o((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:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`}}))());function _B(){return _B=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_B({},e,{ref:t,icon:gB.default}))),yB=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z`}}]},name:`clock-circle`,theme:`outlined`}}))());function bB(){return bB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,bB({},e,{ref:t,icon:yB.default}))),SB=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===mB?S.createElement(xB,null):S.createElement(vB,null),t&&n):r,CB=e=>S.createElement(g_,{size:`small`,type:`primary`,...e});function wB(e){return(0,S.useMemo)(()=>({button:CB,...e}),[e])}var TB=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=nB(_===mB?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(ga),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=kh(N,A),I=k(),L=w??M?.separator,[R,z]=pC(`rangePicker`,g,p),B=sp(N),[V,H]=RI(N,B),U=J(V,H,B,x),[ee]=aB(t,N),W=wB(a),te=Eh(e=>d??P??e),G=S.useContext(mm),ne=f??G,{hasFeedback:K,status:re,feedbackIcon:ie}=(0,S.useContext)(gy),ae=SB({picker:_,hasFeedback:K,feedbackIcon:ie,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[q]=Yd(`Calendar`,zd),oe=Li(q,t.locale||{}),[se]=Lf(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(yy,{space:!0},S.createElement(zP,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(tB,null)),disabled:ne,ref:O,placement:u,placeholder:iB(oe,_,m),suffixIcon:ae,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:oe.lang,getPopupContainer:i||j,generateConfig:e,components:W,direction:A,prefixCls:N,rootClassName:U,className:J({[`${N}-large`]:te===`large`,[`${N}-small`]:te===`small`,[`${N}-${R}`]:z},rC(N,iC(re,h),K),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:se}}},allowClear:ee}))}),EB=e=>{let t=(t,n)=>{let r=n===hB?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=ya(n===hB?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(ga),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=kh(N,A),I=Eh(e=>d??P??e),L=S.useContext(mm),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=nB(r,y,b,C||x,w,z),H=S.useRef(null),[U,ee]=pC(`datePicker`,_,f),W=sp(N),[te,G]=RI(N,W),ne=J(te,G,W,T);(0,S.useImperativeHandle)(a,()=>H.current);let K={showToday:!0},re=t||i.picker,ie=k(),{onSelect:ae,multiple:q}=D,oe=ae&&t===`time`&&!q,se=(e,t,n)=>{v?.(e,t,n),oe&&ae(e)},[ce,le]=aB(i,N),ue=wB(c),{hasFeedback:de,status:fe,feedbackIcon:pe}=(0,S.useContext)(gy),me=SB({picker:re,hasFeedback:de,feedbackIcon:pe,suffixIcon:E===void 0?O:E}),[he]=Yd(`DatePicker`,zd),ge=Li(he,i.locale||{}),[_e]=Lf(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(yy,{space:!0},S.createElement(CF,{ref:H,placeholder:rB(ge,re,m),suffixIcon:me,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${ie}-slide-up`,picker:t,onCalendarChange:se,...K,...D,locale:ge.lang,getPopupContainer:s||j,generateConfig:e,components:ue,direction:A,disabled:R,prefixCls:N,rootClassName:ne,className:J({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:ee},rC(N,iC(fe,g),de),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:_e}}},allowClear:ce,removeIcon:le}))})},n=t(),r=t(oB,sB),i=t(cB,lB),a=t(uB,dB),o=t(fB,pB);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(mB,hB),QuarterPicker:o}},DB=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=EB(e),s=TB(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},OB=DB(xte);OB._InternalPanelDoNotUseOrYouWillBeFired=ix(OB,`popupAlign`,void 0,`picker`),OB._InternalRangePanelDoNotUseOrYouWillBeFired=ix(OB.RangePicker,`popupAlign`,void 0,`picker`),OB.generatePicker=DB;var kB={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},AB=S.createContext(null),jB=e=>ki(e).map(e=>({...e?.props,key:e.key}));function MB(e,t,n){let r=S.useMemo(()=>t||jB(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:ef(t)?t:qC(e,t)}),[r,e])}function NB(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>NB(t,e),[t,e]);return n},FB=e=>e.children,IB=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(AB),[v,y]=Cf([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:J(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},$d(l)&&S.createElement(`span`,{style:b},l),$d(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:J(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},$d(l)&&S.createElement(`span`,{style:b,className:J(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),$d(u)&&S.createElement(`span`,{style:x,className:J(`${t}-item-content`,v.content)},u)))};function LB(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(IB,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(IB,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(IB,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var RB=e=>{let t=S.useContext(AB),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},LB(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},LB(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},LB(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},zB=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.padding)} ${Y(e.paddingLG)}`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingSM)} ${Y(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingXS)} ${Y(e.padding)}`}}}}}},BB=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Ul(e),...zB(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...Hl,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${Y(o)} ${Y(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},VB=Ql(`Descriptions`,e=>BB(dc(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),HB=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=ya(`descriptions`),E=y(`descriptions`,t),D=YC(),O=S.useMemo(()=>ef(i)?i:qC(D,{...kB,...i})??3,[D,i]),k=MB(D,g,c),A=Eh(f),j=PB(O,k),[M,N]=VB(E),P={...e,column:O,items:k,size:A},[F,I]=Cf([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(AB.Provider,{value:L},S.createElement(`div`,{className:J(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:J(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:J(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:J(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(RB,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};HB.Item=FB;var UB=S.createContext(null),WB=S.createContext({});function GB(){return GB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(WB),o=lr(a,r);return S.createElement(`div`,GB({className:J(`${t}-section`,n),role:`dialog`,ref:o},xi(e,{aria:!0}),{"aria-modal":`true`},i))};function qB(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=zn(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=zn(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:J(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function JB(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&ui(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function YB(e,t,n,r,i){let[a]=Gr(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function XB(){return XB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=YB(()=>V.current,r,c,l,w),[U,ee]=S.useState(!1),W=S.useContext(UB),te;te=typeof o==`boolean`?o?{}:{distance:0}:o||{};let G=te?.distance??W?.pushDistance??180,ne=S.useMemo(()=>({pushDistance:G,push:()=>{ee(!0)},pull:()=>{ee(!1)}}),[G]);S.useEffect(()=>{r?W?.push?.():W?.pull?.()},[r]),S.useEffect(()=>()=>{W?.pull?.()},[]);let K=S.createElement(Od,XB({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:J(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),re=typeof _==`function`?_(i):_,[ie,ae]=S.useState(),q=i===`left`||i===`right`,oe=S.useMemo(()=>JB(b??(q?v:y)??ie??B??(q?378:void 0)),[b,v,y,B,q,ie]),se=S.useMemo(()=>{let e={};if(U&&G)switch(i){case`top`:e.transform=`translateY(${G}px)`;break;case`bottom`:e.transform=`translateY(${-G}px)`;break;case`left`:e.transform=`translateX(${G}px)`;break;default:e.transform=`translateX(${-G}px)`;break}return q?e.width=JB(oe):e.height=JB(oe),e},[U,G,i,q,oe]),ce=S.useRef(null),le=!!z,ue=typeof z==`object`&&z||{},de=zn(e=>{ae(e),ue.onResize?.(e)}),{dragElementProps:fe,isDragging:pe}=qB({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:ce,currentSize:oe,onResize:de,onResizeStart:ue.onResizeStart,onResizeEnd:ue.onResizeEnd}),me={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},he=S.createElement(Od,XB({key:`panel`},re,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement(KB,XB({id:h,containerRef:i,prefixCls:n,className:J(m,u?.section),style:{...g,...L?.section}},xi(e,{aria:!0}),me),C);return S.createElement(`div`,XB({ref:ce,className:J(`${n}-content-wrapper`,pe&&`${n}-content-wrapper-dragging`,u?.wrapper,!pe&&t),style:{...r,...se,...L?.wrapper}},xi(e,{data:!0})),le&&S.createElement(`div`,fe),R?R(a):a)}),ge={...f};return p&&(ge.zIndex=p),S.createElement(UB.Provider,{value:ne},S.createElement(`div`,{className:J(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:ge,tabIndex:-1,ref:V},K,he))}),QB=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);Hn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);Hn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(WB.Provider,{value:I},S.createElement(Dp,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(ZB,R)))},$B=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=ya(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=Cf([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return nf(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:J(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=pf(sf(e),sf(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:J(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:J(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:J(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:J(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:J(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement(By,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},eV=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},tV=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),nV=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...tV({opacity:e},{opacity:1})}),rV=(e,t)=>[nV(.7,t),tV({transform:eV(e)},{transform:`none`})],iV=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:nV(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:rV(t,n)}),{})}}},aV=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${Y(l)} ${Y(u)}`,fontSize:d,lineHeight:f,borderBottom:`${Y(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...ql(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${Y(C)} ${Y(w)}`,borderTop:`${Y(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},oV=Ql(`Drawer`,e=>{let t=dc(e,{});return[aV(t),iV(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),sV={distance:180},cV=378,lV={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},uV=e=>{let{rootClassName:t,size:n,defaultSize:r=cV,height:i,width:a,mask:o,push:s=sV,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=Xn(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=ya(`drawer`),R=j(`drawer`,d),[z,B]=oV(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>ef(n)?n:n===`large`?736:n===`default`?cV:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:gh(R,`mask-motion`),...lV},ee=e=>({motionName:gh(R,`panel-motion-${e}`),...lV}),W=cr(p,Hy()),[te,G]=Lf(`Drawer`,E.zIndex),[ne,K,re]=gf(o,L,R,y),ie=xy(v,V!==!1&&ne),{classNames:ae,styles:q,rootStyle:oe}=E,se={...e,zIndex:te,panelRef:p,mask:ne,maskClosable:re,defaultSize:r,push:s,focusable:ie},[ce,le]=Cf([F,ae],[I,q],{props:se}),ue=J({"no-mask":!ne,[`${R}-rtl`]:M===`rtl`},t,z,B,ce.root);return S.createElement(yy,{form:!0,space:!0},S.createElement(jf.Provider,{value:G},S.createElement(QB,{prefixCls:R,onClose:u,maskMotion:U,motion:ee,...E,classNames:{mask:J(ce.mask,K.mask),section:ce.section,wrapper:ce.wrapper,dragger:ce.dragger},styles:{mask:{...le.mask,...b},section:{...le.section,...x},wrapper:{...le.wrapper,...C},dragger:le.dragger},open:c,mask:ne,maskClosable:re,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...oe,...le.root},className:J(N,h),rootClassName:ue,getContainer:V,afterOpenChange:l,panelRef:W,zIndex:te,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:ie.focusTriggerAfterClose,focusTrap:ie.trap},S.createElement($B,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};uV._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(ga),s=o(`drawer`,t),[c,l]=oV(s),u=J(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement($B,{prefixCls:s,...a}))};var dV=uV;function fV(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function pV(e){return e?ef(e):!1}var mV=S.createContext({latestIndex:0}),hV=mV.Provider,gV=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(mV);return $d(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},vV=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},yV=Ql(`Space`,e=>{let t=dc(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[_V(t),vV(t)]},()=>({}),{resetStyle:!1}),bV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=ya(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=fV(D),k=fV(E),A=pV(D),j=pV(E),M=ki(p,{keepEmpty:!0}),[N,P]=Ef(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=yV(L),B={...e,size:l,orientation:N,align:F},[V,H]=Cf([s,C],[c,w],{props:B}),U=J(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),ee=J(`${L}-item`,V.item),W=M.map((e,t)=>{let n=e?.key||`${ee}-${t}`;return S.createElement(gV,{prefix:L,classNames:V,styles:H,className:ee,key:n,index:t,separator:I,style:H.item},e)}),te=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>$d(t)?n:e,0)}),[M]);if(M.length===0)return null;let G={};return x&&(G.flexWrap=`wrap`),!k&&j&&(G.columnGap=E),!O&&A&&(G.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...G,...H.root,...o,...y},...T},S.createElement(hV,{value:te},W))});bV.Compact=Mh,bV.Addon=tz;var xV=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(ga),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(ME,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=kh(I,r),V=J(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(X,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(X,{type:a,danger:o,icon:w})]);return S.createElement(bV.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(KE,{...R},U))};xV.__ANT_BUTTON=!0;var SV=KE;SV.Button=xV;var CV=c(o((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:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`}}))());function wV(){return wV=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,wV({},e,{ref:t,icon:CV.default}))),EV=(e,t)=>$d(e)?nf(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function DV(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var OV=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},kV=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:`border-box`},'input[type="radio"], input[type="checkbox"]':{lineHeight:`normal`},'input[type="file"]':{display:`block`},'input[type="range"]':{display:`block`,width:`100%`},"select[multiple], select[size]":{height:`auto`},"input[type='file']:focus, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),AV=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},jV=e=>{let{componentCls:t}=e;return{[t]:{...Ul(e),...kV(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...AV(e,e.controlHeightSM)},"&-large":{...AV(e,e.controlHeightLG)}}}},MV=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=tu(i,`grid`);return{[t]:{...Ul(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, - &-hidden${i}-row`]:{display:`none`},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:`hidden`,whiteSpace:`nowrap`,textAlign:`end`,verticalAlign:`middle`,"&-left":{textAlign:`start`},"&-wrap":{overflow:`unset`,lineHeight:e.lineHeight,whiteSpace:`unset`,"> label":{verticalAlign:`middle`,textWrap:`balance`}},"> label":{position:`relative`,display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,height:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`sans-serif`,lineHeight:1,content:`"*"`},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:`none`}}},[`${t}-optional`]:{display:`inline-block`,marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:`none`}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:`help`,writingMode:`horizontal-tb`,marginInlineStart:e.marginXXS},"&::after":{content:`":"`,position:`relative`,marginBlock:0,marginInlineStart:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{[f(`display`)]:`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:`flex`,alignItems:`center`}}}},[t]:{"&-additional":{display:`flex`,flexDirection:`column`},"&-explain, &-extra":{clear:`both`,color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:`100%`},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:`auto`,opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:`center`,visibility:`visible`,animationName:_g,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}}}},NV=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),PV=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, - ${t}-col-xl-24${n}-label`]:NV(e)}}},FV=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, - > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},IV=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:NV(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},LV=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, + `]:{cursor:`not-allowed !important`}},[`&-tooltip ${n}-tooltip-container`]:{minWidth:`unset`}}}},Gz=(e,t)=>{let{componentCls:n,railSize:r,handleSize:i,dotSize:a,marginFull:o,calc:s}=e,c=t?`paddingBlock`:`paddingInline`,l=t?`width`:`height`,u=t?`height`:`width`,d=t?`insetBlockStart`:`insetInlineStart`,f=t?`top`:`insetInlineStart`,p=s(r).mul(3).sub(i).div(2).equal(),m=s(i).sub(r).div(2).equal(),h=t?{borderWidth:`${Y(m)} 0`,transform:`translateY(${Y(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${Y(m)}`,transform:`translateX(${Y(e.calc(m).mul(-1).equal())})`};return{[c]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[l]:`100%`,[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:{...h},[`${n}-handle`]:{[d]:p},[`${n}-mark`]:{insetInlineStart:0,top:0,[f]:s(r).mul(3).add(t?0:o).equal(),[l]:`100%`},[`${n}-step`]:{insetInlineStart:0,top:0,[f]:r,[l]:`100%`,[u]:r},[`${n}-dot`]:{position:`absolute`,[d]:s(r).sub(a).div(2).equal()}}},Kz=e=>{let{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:{...Gz(e,!0),[`&${t}-with-marks`]:{marginBottom:n}}}},qz=e=>{let{componentCls:t}=e;return{[`${t}-vertical`]:{...Gz(e,!1),height:`100%`}}},Jz=Ql(`Slider`,e=>{let t=dc(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[Wz(t),Kz(t),qz(t)]},e=>{let t=e.controlHeightLG/4,n=e.controlHeightSM/2,r=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,o=new Nc(a).setA(.2).toRgbString();return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:n,dotSize:8,handleLineWidth:r,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:o,handleColorDisabled:new Nc(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}});function Yz(){let[e,t]=S.useState(!1),n=S.useRef(null),r=()=>{Oi.cancel(n.current)};return S.useEffect(()=>r,[]),[e,e=>{r(),e?t(e):n.current=Oi(()=>{t(e)})}]}function Xz(e){return e||e===null?e:e=>ef(e)?e.toString():``}var Zz=S.forwardRef((e,t)=>{let{prefixCls:n,range:r,className:i,rootClassName:a,style:o,disabled:s,tooltip:c={},onChangeComplete:l,classNames:u,styles:d,vertical:f,orientation:p,...m}=e,[,h]=Ef(p,f),{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x,getPopupContainer:C}=ya(`slider`),w=S.useContext(mm),T=s??w,E={...e,disabled:T,vertical:h},[D,O]=Cf([b,u],[x,d],{props:E}),{handleRender:k,direction:A}=S.useContext(Hz),j=(A||_)===`rtl`,[M,N]=Yz(),[P,F]=Yz(),I={...c},{open:L,placement:R,getPopupContainer:z,prefixCls:B,formatter:V}=I,H=L,U=(M||P)&&H!==!1,ee=Xz(V),[W,te]=Yz(),G=e=>{l?.(e),te(!1)},ne=(e,t)=>e||(t?j?`left`:`right`:`top`),K=g(`slider`,n),[re,ie]=Jz(K),ae=J(i,v,D.root,a,{[`${K}-rtl`]:j,[`${K}-lock`]:W},re,ie);j&&!h&&(m.reverse=!m.reverse),S.useEffect(()=>{let e=()=>{Oi(()=>{F(!1)},1)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}},[]);let q=r&&!H,oe=k||((e,t)=>{let{index:n}=t,r=e.props;function i(e,t,n){n&&m[e]?.(t),r[e]?.(t)}let a={...r,onMouseEnter:e=>{N(!0),i(`onMouseEnter`,e)},onMouseLeave:e=>{N(!1),i(`onMouseLeave`,e)},onMouseDown:e=>{F(!0),te(!0),i(`onMouseDown`,e)},onFocus:e=>{F(!0),m.onFocus?.(e),i(`onFocus`,e,!0)},onBlur:e=>{F(!1),m.onBlur?.(e),i(`onBlur`,e,!0)}},o=S.cloneElement(e,a),s=(!!H||U)&&ee!==null;return q?o:S.createElement(Uz,{...I,prefixCls:g(`tooltip`,B),title:ee?ee(t.value):``,value:t.value,open:s,placement:ne(R,h),key:n,classNames:{root:`${K}-tooltip`},getPopupContainer:z||C},o)}),se=q?(e,t)=>{let n=S.cloneElement(e,{style:{...e.props.style,visibility:`hidden`}});return S.createElement(Uz,{...I,prefixCls:g(`tooltip`,B),title:ee?ee(t.value):``,open:ee!==null&&U,placement:ne(R,h),key:`tooltip`,classNames:{root:`${K}-tooltip`},getPopupContainer:z||C,draggingDelete:t.draggingDelete},n)}:void 0,ce={...O.root,...y,...o};return S.createElement(Vz,{...m,classNames:D,styles:O,step:m.step,range:r,className:ae,style:ce,disabled:T,vertical:h,ref:t,prefixCls:K,handleRender:oe,activeHandleRender:se,onChangeComplete:G})}),Qz=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z`}}]},name:`swap-right`,theme:`outlined`}}))());function $z(){return $z=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$z({},e,{ref:t,icon:Qz.default}))),tB=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=ya(e),[c,l]=Cf([o,t],[s,n],{props:a},{popup:{_default:`root`}});return S.useMemo(()=>[{...c,popup:{...c.popup,root:J(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])};function nB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder:n}function rB(e,t,n){return n===void 0?t===`year`&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder:n}function iB(e,t){let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=FC({...e,prefixCls:t,componentName:`DatePicker`});return[S.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]}var[aB,oB]=[`week`,`WeekPicker`],[sB,cB]=[`month`,`MonthPicker`],[lB,uB]=[`year`,`YearPicker`],[dB,fB]=[`quarter`,`QuarterPicker`],[pB,mB]=[`time`,`TimePicker`],hB=c(o((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:`M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z`}}]},name:`calendar`,theme:`outlined`}}))());function gB(){return gB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,gB({},e,{ref:t,icon:hB.default}))),vB=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z`}}]},name:`clock-circle`,theme:`outlined`}}))());function yB(){return yB=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,yB({},e,{ref:t,icon:vB.default}))),xB=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?S.createElement(S.Fragment,null,e===pB?S.createElement(bB,null):S.createElement(_B,null),t&&n):r,SB=e=>S.createElement(h_,{size:`small`,type:`primary`,...e});function CB(e){return(0,S.useMemo)(()=>({button:SB,...e}),[e])}var wB=e=>(0,S.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:b,rootClassName:x,suffixIcon:C,separator:w,...T}=t,[E,D]=tB(_===pB?`timePicker`:`datePicker`,c,l,y||v,b),O=S.useRef(null),{getPrefixCls:k,direction:A,getPopupContainer:j,rangePicker:M}=(0,S.useContext)(ga),N=k(`picker`,r),{compactSize:P,compactItemClassnames:F}=Oh(N,A),I=k(),L=w??M?.separator,[R,z]=dC(`rangePicker`,g,p),B=sp(N),[V,H]=LI(N,B),U=J(V,H,B,x),[ee]=iB(t,N),W=CB(a),te=Th(e=>d??P??e),G=S.useContext(mm),ne=f??G,{hasFeedback:K,status:re,feedbackIcon:ie}=(0,S.useContext)(my),ae=xB({picker:_,hasFeedback:K,feedbackIcon:ie,suffixIcon:C});(0,S.useImperativeHandle)(n,()=>O.current);let[q]=Yd(`Calendar`,zd),oe=Li(q,t.locale||{}),[se]=Lf(`DatePicker`,D?.popup?.root?.zIndex);return S.createElement(_y,{space:!0},S.createElement(RP,{separator:S.createElement(`span`,{"aria-label":`to`,className:`${N}-separator`},L??S.createElement(eB,null)),disabled:ne,ref:O,placement:u,placeholder:rB(oe,_,m),suffixIcon:ae,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:_,...T,locale:oe.lang,getPopupContainer:i||j,generateConfig:e,components:W,direction:A,prefixCls:N,rootClassName:U,className:J({[`${N}-large`]:te===`large`,[`${N}-small`]:te===`small`,[`${N}-${R}`]:z},tC(N,nC(re,h),K),F,o,M?.className),style:{...M?.style,...s},classNames:E,styles:{...D,popup:{...D.popup,root:{...D.popup.root,zIndex:se}}},allowClear:ee}))}),TB=e=>{let t=(t,n)=>{let r=n===mB?`timePicker`:`datePicker`;return(0,S.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:b,dropdownClassName:x,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:E,...D}=i,{suffixIcon:O}=ya(n===mB?`timePicker`:`datePicker`),{getPrefixCls:k,direction:A,getPopupContainer:j,[r]:M}=(0,S.useContext)(ga),N=k(`picker`,o),{compactSize:P,compactItemClassnames:F}=Oh(N,A),I=Th(e=>d??P??e),L=S.useContext(mm),R=h??L,z={...i,size:I,disabled:R,status:g,variant:_},[B,V]=tB(r,y,b,C||x,w,z),H=S.useRef(null),[U,ee]=dC(`datePicker`,_,f),W=sp(N),[te,G]=LI(N,W),ne=J(te,G,W,T);(0,S.useImperativeHandle)(a,()=>H.current);let K={showToday:!0},re=t||i.picker,ie=k(),{onSelect:ae,multiple:q}=D,oe=ae&&t===`time`&&!q,se=(e,t,n)=>{v?.(e,t,n),oe&&ae(e)},[ce,le]=iB(i,N),ue=CB(c),{hasFeedback:de,status:fe,feedbackIcon:pe}=(0,S.useContext)(my),me=xB({picker:re,hasFeedback:de,feedbackIcon:pe,suffixIcon:E===void 0?O:E}),[he]=Yd(`DatePicker`,zd),ge=Li(he,i.locale||{}),[_e]=Lf(`DatePicker`,V?.popup?.root?.zIndex);return S.createElement(_y,{space:!0},S.createElement(SF,{ref:H,placeholder:nB(ge,re,m),suffixIcon:me,placement:p,prevIcon:S.createElement(`span`,{className:`${N}-prev-icon`}),nextIcon:S.createElement(`span`,{className:`${N}-next-icon`}),superPrevIcon:S.createElement(`span`,{className:`${N}-super-prev-icon`}),superNextIcon:S.createElement(`span`,{className:`${N}-super-next-icon`}),transitionName:`${ie}-slide-up`,picker:t,onCalendarChange:se,...K,...D,locale:ge.lang,getPopupContainer:s||j,generateConfig:e,components:ue,direction:A,disabled:R,prefixCls:N,rootClassName:ne,className:J({[`${N}-large`]:I===`large`,[`${N}-small`]:I===`small`,[`${N}-${U}`]:ee},tC(N,nC(fe,g),de),F,M?.className,u),style:{...M?.style,...l},classNames:B,styles:{...V,popup:{...V.popup,root:{...V.popup.root,zIndex:_e}}},allowClear:ce,removeIcon:le}))})},n=t(),r=t(aB,oB),i=t(sB,cB),a=t(lB,uB),o=t(dB,fB);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(pB,mB),QuarterPicker:o}},EB=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=TB(e),s=wB(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},DB=EB(wte);DB._InternalPanelDoNotUseOrYouWillBeFired=nx(DB,`popupAlign`,void 0,`picker`),DB._InternalRangePanelDoNotUseOrYouWillBeFired=nx(DB.RangePicker,`popupAlign`,void 0,`picker`),DB.generatePicker=EB;var OB={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},kB=S.createContext(null),AB=e=>ki(e).map(e=>({...e?.props,key:e.key}));function jB(e,t,n){let r=S.useMemo(()=>t||AB(n),[t,n]);return S.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:ef(t)?t:GC(e,t)}),[r,e])}function MB(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,S.useMemo)(()=>MB(t,e),[t,e]);return n},PB=e=>e.children,FB=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:p,classNames:m}=e,h=n,{classNames:g,styles:_}=S.useContext(kB),[v,y]=Cf([g,m],[_,p],{props:e}),b={...o,...y.label},x={...s,...y.content};return c?S.createElement(h,{colSpan:r,style:a,className:J(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[v.label]:v.label&&f===`label`,[v.content]:v.content&&f===`content`})},$d(l)&&S.createElement(`span`,{style:b},l),$d(u)&&S.createElement(`span`,{style:x},u)):S.createElement(h,{className:J(`${t}-item`,i),style:a,colSpan:r},S.createElement(`div`,{className:`${t}-item-container`},$d(l)&&S.createElement(`span`,{style:b,className:J(`${t}-item-label`,v.label,{[`${t}-item-no-colon`]:!d})},l),$d(u)&&S.createElement(`span`,{style:x,className:J(`${t}-item-content`,v.content)},u)))};function IB(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?S.createElement(FB,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[S.createElement(FB,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),S.createElement(FB,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var LB=e=>{let t=S.useContext(kB),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?S.createElement(S.Fragment,null,S.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},IB(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),S.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},IB(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):S.createElement(`tr`,{key:a,className:`${n}-row`},IB(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},RB=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.padding)} ${Y(e.paddingLG)}`,borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingSM)} ${Y(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${Y(e.paddingXS)} ${Y(e.padding)}`}}}}}},zB=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...Ul(e),...RB(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...Hl,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${Y(o)} ${Y(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},BB=Ql(`Descriptions`,e=>zB(dc(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),VB=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:p,contentStyle:m,styles:h,items:g,classNames:_,...v}=e,{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=ya(`descriptions`),E=y(`descriptions`,t),D=qC(),O=S.useMemo(()=>ef(i)?i:GC(D,{...OB,...i})??3,[D,i]),k=jB(D,g,c),A=Th(f),j=NB(O,k),[M,N]=BB(E),P={...e,column:O,items:k,size:A},[F,I]=Cf([w,_],[T,h],{props:P}),L=S.useMemo(()=>({labelStyle:p,contentStyle:m,styles:{label:I.label,content:I.content},classNames:{label:F.label,content:F.content}}),[p,m,I.label,I.content,F.label,F.content]);return S.createElement(kB.Provider,{value:L},S.createElement(`div`,{className:J(E,x,F.root,{[`${E}-medium`]:A===`medium`||A===`middle`,[`${E}-small`]:A===`small`,[`${E}-bordered`]:!!o,[`${E}-rtl`]:b===`rtl`},l,u,M,N),style:{...C,...I.root,...d},...v},(n||r)&&S.createElement(`div`,{className:J(`${E}-header`,F.header),style:I.header},n&&S.createElement(`div`,{className:J(`${E}-title`,F.title),style:I.title},n),r&&S.createElement(`div`,{className:J(`${E}-extra`,F.extra),style:I.extra},r)),S.createElement(`div`,{className:`${E}-view`},S.createElement(`table`,null,S.createElement(`tbody`,null,j.map((e,t)=>S.createElement(LB,{key:t,index:t,colon:a,prefixCls:E,vertical:s===`vertical`,bordered:o,row:e})))))))};VB.Item=PB;var HB=S.createContext(null),UB=S.createContext({});function WB(){return WB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t,className:n,containerRef:r,...i}=e,{panel:a}=S.useContext(UB),o=lr(a,r);return S.createElement(`div`,WB({className:J(`${t}-section`,n),role:`dialog`,ref:o},xi(e,{aria:!0}),{"aria-modal":`true`},i))};function KB(e){let{prefixCls:t,direction:n,className:r,style:i,maxSize:a,containerRef:o,currentSize:s,onResize:c,onResizeEnd:l,onResizeStart:u}=e,[d,f]=S.useState(!1),[p,m]=S.useState(0),[h,g]=S.useState(0),_=n===`left`||n===`right`,v=zn(e=>{e.preventDefault(),e.stopPropagation(),f(!0),m(_?e.clientX:e.clientY);let t;if(typeof s==`number`)t=s;else if(o?.current){let e=o.current.getBoundingClientRect();t=_?e.width:e.height}g(t),u?.(t)}),y=zn(e=>{if(!d)return;let t=(_?e.clientX:e.clientY)-p;(n===`right`||n===`bottom`)&&(t=-t);let r=h+t;r<0&&(r=0),a&&r>a&&(r=a),c?.(r)}),b=S.useCallback(()=>{if(d&&(f(!1),o?.current)){let e=o.current.getBoundingClientRect(),t=_?e.width:e.height;l?.(t)}},[d,o,l,_]);return S.useEffect(()=>{if(d)return document.addEventListener(`mousemove`,y),document.addEventListener(`mouseup`,b),()=>{document.removeEventListener(`mousemove`,y),document.removeEventListener(`mouseup`,b)}},[d,y,b]),{dragElementProps:{className:J(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:_,[`${t}-dragger-vertical`]:!_},r),style:i,onMouseDown:v},isDragging:d}}function qB(e){if(typeof e==`string`){let t=Number(e.replace(/px$/i,``));if(parseFloat(e)===t&&ui(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function JB(e,t,n,r,i){let[a]=Gr(t&&(r??i!==!1),e);return S.useEffect(()=>{t&&n===!0&&e()?.focus({preventScroll:!0})},[t]),a}function YB(){return YB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,open:r,placement:i,inline:a,push:o,forceRender:s,autoFocus:c,focusTrap:l,classNames:u,rootClassName:d,rootStyle:f,zIndex:p,className:m,id:h,style:g,motion:_,width:v,height:y,size:b,maxSize:x,children:C,mask:w,maskClosable:T,maskMotion:E,maskClassName:D,maskStyle:O,afterOpenChange:k,onClose:A,onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,styles:L,drawerRender:R,resizable:z,defaultSize:B}=e,V=S.useRef(null);S.useImperativeHandle(t,()=>V.current);let H=JB(()=>V.current,r,c,l,w),[U,ee]=S.useState(!1),W=S.useContext(HB),te;te=typeof o==`boolean`?o?{}:{distance:0}:o||{};let G=te?.distance??W?.pushDistance??180,ne=S.useMemo(()=>({pushDistance:G,push:()=>{ee(!0)},pull:()=>{ee(!1)}}),[G]);S.useEffect(()=>{r?W?.push?.():W?.pull?.()},[r]),S.useEffect(()=>()=>{W?.pull?.()},[]);let K=S.createElement(Od,YB({key:`mask`},E,{visible:w&&r}),({className:e,style:t},i)=>S.createElement(`div`,{className:J(`${n}-mask`,e,u?.mask,D),style:{...t,...O,...L?.mask},onClick:T&&r?A:void 0,ref:i})),re=typeof _==`function`?_(i):_,[ie,ae]=S.useState(),q=i===`left`||i===`right`,oe=S.useMemo(()=>qB(b??(q?v:y)??ie??B??(q?378:void 0)),[b,v,y,B,q,ie]),se=S.useMemo(()=>{let e={};if(U&&G)switch(i){case`top`:e.transform=`translateY(${G}px)`;break;case`bottom`:e.transform=`translateY(${-G}px)`;break;case`left`:e.transform=`translateX(${G}px)`;break;default:e.transform=`translateX(${-G}px)`;break}return q?e.width=qB(oe):e.height=qB(oe),e},[U,G,i,q,oe]),ce=S.useRef(null),le=!!z,ue=typeof z==`object`&&z||{},de=zn(e=>{ae(e),ue.onResize?.(e)}),{dragElementProps:fe,isDragging:pe}=KB({prefixCls:`${n}-resizable`,direction:i,className:u?.dragger,style:L?.dragger,maxSize:x,containerRef:ce,currentSize:oe,onResize:de,onResizeStart:ue.onResizeStart,onResizeEnd:ue.onResizeEnd}),me={onMouseEnter:j,onMouseOver:M,onMouseLeave:N,onClick:P,onKeyDown:F,onKeyUp:I,onFocus:e=>{H(e.target)}},he=S.createElement(Od,YB({key:`panel`},re,{visible:r,forceRender:s,onVisibleChanged:k,removeOnLeave:!1,leavedClassName:`${n}-content-wrapper-hidden`}),({className:t,style:r},i)=>{let a=S.createElement(GB,YB({id:h,containerRef:i,prefixCls:n,className:J(m,u?.section),style:{...g,...L?.section}},xi(e,{aria:!0}),me),C);return S.createElement(`div`,YB({ref:ce,className:J(`${n}-content-wrapper`,pe&&`${n}-content-wrapper-dragging`,u?.wrapper,!pe&&t),style:{...r,...se,...L?.wrapper}},xi(e,{data:!0})),le&&S.createElement(`div`,fe),R?R(a):a)}),ge={...f};return p&&(ge.zIndex=p),S.createElement(HB.Provider,{value:ne},S.createElement(`div`,{className:J(n,`${n}-${i}`,d,{[`${n}-open`]:r,[`${n}-inline`]:a}),style:ge,tabIndex:-1,ref:V},K,he))}),ZB=e=>{let{open:t=!1,prefixCls:n=`rc-drawer`,placement:r=`right`,autoFocus:i=!0,keyboard:a=!0,width:o,height:s,size:c,maxSize:l,mask:u=!0,maskClosable:d=!0,getContainer:f,forceRender:p,afterOpenChange:m,destroyOnHidden:h,onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x,onClose:C,resizable:w,defaultSize:T,focusTriggerAfterClose:E,panelRef:D}=e,[O,k]=S.useState(!1),[A,j]=S.useState(!1);Hn(()=>{j(!0)},[]);let M=A?t:!1,N=S.useRef(null),P=S.useRef(null);Hn(()=>{M&&(P.current=document.activeElement)},[M]);let F=e=>{k(e),m?.(e),!e&&E!==!1&&P.current&&!N.current?.contains(P.current)&&P.current?.focus({preventScroll:!0})},I=S.useMemo(()=>({panel:D}),[D]);if(!p&&!O&&!M&&h)return null;let L={onMouseEnter:g,onMouseOver:_,onMouseLeave:v,onClick:y,onKeyDown:b,onKeyUp:x},R={...e,open:M,prefixCls:n,placement:r,autoFocus:i,keyboard:a,width:o,height:s,size:c,maxSize:l,defaultSize:T,mask:u,maskClosable:d,inline:f===!1,afterOpenChange:F,ref:N,resizable:w,...L};return S.createElement(UB.Provider,{value:I},S.createElement(Dp,{open:M||p||O,autoDestroy:!1,getContainer:f,autoLock:u&&(M||O),onEsc:({top:e,event:t})=>{e&&a&&(t.stopPropagation(),C?.(t))}},S.createElement(XB,R)))},QB=e=>{let{prefixCls:t,ariaId:n,title:r,footer:i,extra:a,closable:o,loading:s,onClose:c,headerStyle:l,bodyStyle:u,footerStyle:d,children:f,classNames:p,styles:m}=e,h=ya(`drawer`),{classNames:g,styles:_,closable:v}=h,[y,b]=Cf([g,p],[_,m],{props:{...e,closable:o??v}}),x=S.useMemo(()=>{let e=o??v;if(e!==!1)return nf(e)&&e?.placement===`end`?`end`:`start`},[o,v]),C=S.useCallback(e=>S.createElement(`button`,{type:`button`,onClick:c,className:J(`${t}-close`,{[`${t}-close-${x}`]:x===`end`},y.close),style:b.close},e),[c,t,x,y.close,b.close]),[w,T]=pf(sf(e),sf(h),{closable:!0,closeIconRender:C}),E=()=>!r&&!w?null:S.createElement(`div`,{style:{...b.header,...l},className:J(`${t}-header`,y.header,{[`${t}-header-close-only`]:w&&!r&&!a})},S.createElement(`div`,{className:`${t}-header-title`},x===`start`&&T,r&&S.createElement(`div`,{className:J(`${t}-title`,y.title),style:b.title,id:n},r)),a&&S.createElement(`div`,{className:J(`${t}-extra`,y.extra),style:b.extra},a),x===`end`&&T),D=()=>i?S.createElement(`div`,{className:J(`${t}-footer`,y.footer),style:{...b.footer,...d}},i):null;return S.createElement(S.Fragment,null,E(),S.createElement(`div`,{className:J(`${t}-body`,y.body),style:{...b.body,...u}},s?S.createElement(Ry,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):f),D())},$B=e=>{let t=`100%`;return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},eV=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),tV=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:`none`},"&-active":{transition:`all ${t}`}},...eV({opacity:e},{opacity:1})}),nV=(e,t)=>[tV(.7,t),eV({transform:$B(e)},{transform:`none`})],rV=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:tV(0,n),[`${t}-panel-motion`]:[`left`,`right`,`top`,`bottom`].reduce((e,t)=>({...e,[`&-${t}`]:nV(t,n)}),{})}}},iV=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:a,motionDurationSlow:o,motionDurationMid:s,paddingXS:c,padding:l,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:p,lineType:m,colorSplit:h,marginXS:g,colorIcon:_,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:x,fontWeightStrong:S,footerPaddingBlock:C,footerPaddingInline:w,draggerSize:T,calc:E}=e,D=`${n}-content-wrapper`,O=`${n}-resizable-dragger`;return{[n]:{position:`fixed`,inset:0,zIndex:r,pointerEvents:`none`,color:x,"&-pure":{position:`relative`,background:a,display:`flex`,flexDirection:`column`,pointerEvents:`auto`,[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:`absolute`},[`${n}-mask`]:{position:`absolute`,inset:0,zIndex:r,background:i,pointerEvents:`auto`,[`&${n}-mask-blur`]:{backdropFilter:`blur(4px)`}},[D]:{position:`absolute`,zIndex:r,maxWidth:`100vw`,transition:`all ${o}`,"&-hidden":{display:`none`}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-section`]:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,overflow:`auto`,background:a,pointerEvents:`auto`},[`${n}-header`]:{display:`flex`,flex:0,alignItems:`center`,padding:`${Y(l)} ${Y(u)}`,fontSize:d,lineHeight:f,borderBottom:`${Y(p)} ${m} ${h}`,"&-title":{display:`flex`,flex:1,alignItems:`center`,minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:`none`},[`${n}-close`]:{display:`inline-flex`,width:E(d).add(c).equal(),height:E(d).add(c).equal(),borderRadius:t,justifyContent:`center`,alignItems:`center`,color:_,fontWeight:S,fontSize:d,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,textDecoration:`none`,background:`transparent`,border:0,cursor:`pointer`,transition:`all ${s}`,textRendering:`auto`,[`&${n}-close-end`]:{marginInlineStart:g},[`&:not(${n}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:y,textDecoration:`none`},"&:active":{backgroundColor:b},...ql(e)},[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:`auto`,[`${n}-body-skeleton`]:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`}},[`${n}-footer`]:{flexShrink:0,padding:`${Y(C)} ${Y(w)}`,borderTop:`${Y(p)} ${m} ${h}`},[O]:{position:`absolute`,zIndex:1,backgroundColor:`transparent`,userSelect:`none`,pointerEvents:`auto`,"&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${O}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:T,cursor:`col-resize`},[`${O}-top`]:{insetInline:0,bottom:0,height:T,cursor:`row-resize`},[`${O}-bottom`]:{insetInline:0,top:0,height:T,cursor:`row-resize`},[`${D}-dragging`]:{userSelect:`none`,transition:`none`,willChange:`width, height`,[`${n}-content`]:{pointerEvents:`none`},[`${n}-section`]:{pointerEvents:`none`}},"&-rtl":{direction:`rtl`}}}},aV=Ql(`Drawer`,e=>{let t=dc(e,{});return[iV(t),rV(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),oV={distance:180},sV=378,cV={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},lV=e=>{let{rootClassName:t,size:n,defaultSize:r=sV,height:i,width:a,mask:o,push:s=oV,open:c,afterOpenChange:l,onClose:u,prefixCls:d,getContainer:f,panelRef:p=null,style:m,className:h,resizable:g,"aria-labelledby":_,focusable:v,maskClosable:y,maskStyle:b,drawerStyle:x,contentWrapperStyle:C,destroyOnClose:w,destroyOnHidden:T,...E}=e,{placement:D}=E,O=Xn(),k=E.title?O:void 0,{getPopupContainer:A,getPrefixCls:j,direction:M,className:N,style:P,classNames:F,styles:I,mask:L}=ya(`drawer`),R=j(`drawer`,d),[z,B]=aV(R),V=f===void 0&&A?()=>A(document.body):f,H=S.useMemo(()=>ef(n)?n:n===`large`?736:n===`default`?sV:typeof n==`string`?/^\d+(\.\d+)?$/.test(n)?Number(n):n:!D||D===`left`||D===`right`?a:i,[n,D,a,i]),U={motionName:hh(R,`mask-motion`),...cV},ee=e=>({motionName:hh(R,`panel-motion-${e}`),...cV}),W=cr(p,By()),[te,G]=Lf(`Drawer`,E.zIndex),[ne,K,re]=gf(o,L,R,y),ie=yy(v,V!==!1&&ne),{classNames:ae,styles:q,rootStyle:oe}=E,se={...e,zIndex:te,panelRef:p,mask:ne,maskClosable:re,defaultSize:r,push:s,focusable:ie},[ce,le]=Cf([F,ae],[I,q],{props:se}),ue=J({"no-mask":!ne,[`${R}-rtl`]:M===`rtl`},t,z,B,ce.root);return S.createElement(_y,{form:!0,space:!0},S.createElement(jf.Provider,{value:G},S.createElement(ZB,{prefixCls:R,onClose:u,maskMotion:U,motion:ee,...E,classNames:{mask:J(ce.mask,K.mask),section:ce.section,wrapper:ce.wrapper,dragger:ce.dragger},styles:{mask:{...le.mask,...b},section:{...le.section,...x},wrapper:{...le.wrapper,...C},dragger:le.dragger},open:c,mask:ne,maskClosable:re,push:s,size:H,defaultSize:r,style:{...P,...m},rootStyle:{...oe,...le.root},className:J(N,h),rootClassName:ue,getContainer:V,afterOpenChange:l,panelRef:W,zIndex:te,...g?{resizable:g}:{},"aria-labelledby":_??k,destroyOnHidden:T??w,focusTriggerAfterClose:ie.focusTriggerAfterClose,focusTrap:ie.trap},S.createElement(QB,{prefixCls:R,size:n,...E,ariaId:k,onClose:u}))))};lV._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:r,placement:i=`right`,...a}=e,{getPrefixCls:o}=S.useContext(ga),s=o(`drawer`,t),[c,l]=aV(s),u=J(s,`${s}-pure`,`${s}-${i}`,c,l,r);return S.createElement(`div`,{className:u,style:n},S.createElement(QB,{prefixCls:s,...a}))};var uV=lV;function dV(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function fV(e){return e?ef(e):!1}var pV=S.createContext({latestIndex:0}),mV=pV.Provider,hV=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:l}=S.useContext(pV);return $d(i)?S.createElement(S.Fragment,null,S.createElement(`div`,{className:t,style:o},i),r{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},_V=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},vV=Ql(`Space`,e=>{let t=dc(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[gV(t),_V(t)]},()=>({}),{resetStyle:!1}),yV=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:s,styles:c}=ya(`space`),{size:l=i??`small`,align:u,className:d,rootClassName:f,children:p,direction:m,orientation:h,prefixCls:g,split:_,separator:v,style:y,vertical:b,wrap:x=!1,classNames:C,styles:w,...T}=e,[E,D]=Array.isArray(l)?l:[l,l],O=dV(D),k=dV(E),A=fV(D),j=fV(E),M=ki(p,{keepEmpty:!0}),[N,P]=Ef(h,b,m),F=u===void 0&&!P?`center`:u,I=v??_,L=n(`space`,g),[R,z]=vV(L),B={...e,size:l,orientation:N,align:F},[V,H]=Cf([s,C],[c,w],{props:B}),U=J(L,a,R,`${L}-${N}`,{[`${L}-rtl`]:r===`rtl`,[`${L}-align-${F}`]:F,[`${L}-gap-row-${D}`]:O,[`${L}-gap-col-${E}`]:k},d,f,z,V.root),ee=J(`${L}-item`,V.item),W=M.map((e,t)=>{let n=e?.key||`${ee}-${t}`;return S.createElement(hV,{prefix:L,classNames:V,styles:H,className:ee,key:n,index:t,separator:I,style:H.item},e)}),te=S.useMemo(()=>({latestIndex:M.reduce((e,t,n)=>$d(t)?n:e,0)}),[M]);if(M.length===0)return null;let G={};return x&&(G.flexWrap=`wrap`),!k&&j&&(G.columnGap=E),!O&&A&&(G.rowGap=D),S.createElement(`div`,{ref:t,className:U,style:{...G,...H.root,...o,...y},...T},S.createElement(mV,{value:te},W))});yV.Compact=jh,yV.Addon=ez;var bV=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:r}=S.useContext(ga),{prefixCls:i,type:a=`default`,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:h,trigger:g,align:_,open:v,onOpenChange:y,placement:b,getPopupContainer:x,href:C,icon:w=S.createElement(kE,null),title:T,buttonsRender:E=e=>e,mouseEnterDelay:D,mouseLeaveDelay:O,overlayClassName:k,overlayStyle:A,destroyOnHidden:j,destroyPopupOnHide:M,dropdownRender:N,popupRender:P,...F}=e,I=n(`dropdown`,i),L=`${I}-button`,R={menu:p,arrow:m,autoFocus:h,align:_,disabled:s,trigger:s?[]:g,onOpenChange:y,getPopupContainer:x||t,mouseEnterDelay:D,mouseLeaveDelay:O,classNames:{root:k},styles:{root:A},destroyOnHidden:j,popupRender:P||N},{compactSize:z,compactItemClassnames:B}=Oh(I,r),V=J(L,B,f);`destroyPopupOnHide`in e&&(R.destroyPopupOnHide=M),`open`in e&&(R.open=v),`placement`in e?R.placement=b:R.placement=r===`rtl`?`bottomLeft`:`bottomRight`;let[H,U]=E([S.createElement(X,{type:a,danger:o,disabled:s,loading:c,onClick:l,htmlType:u,href:C,title:T},d),S.createElement(X,{type:a,danger:o,icon:w})]);return S.createElement(yV.Compact,{className:V,size:z,block:!0,...F},H,S.createElement(UE,{...R},U))};bV.__ANT_BUTTON=!0;var xV=UE;xV.Button=bV;var SV=c(o((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:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`}}))());function CV(){return CV=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,CV({},e,{ref:t,icon:SV.default}))),TV=(e,t)=>$d(e)?nf(e)&&!(0,S.isValidElement)(e)?{...t,...e}:{...t,title:e}:null;function EV(e){let[t,n]=S.useState(e);return S.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var DV=e=>{let{componentCls:t,motionDurationFast:n,motionEaseInOut:r}=e,i=`${t}-show-help`,a=`${t}-show-help-item`;return{[i]:{transition:`opacity ${n} ${r}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[a]:{overflow:`hidden`,transition:`${[`height`,`opacity`,`transform`].map(e=>`${e} ${n} ${r}`).join(`, `)} !important`,[`&${a}-appear, &${a}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${a}-leave-active`]:{transform:`translateY(-5px)`}}}}},OV=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:`border-box`},'input[type="radio"], input[type="checkbox"]':{lineHeight:`normal`},'input[type="file"]':{display:`block`},'input[type="range"]':{display:`block`,width:`100%`},"select[multiple], select[size]":{height:`auto`},"input[type='file']:focus, input[type='radio']:focus, input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),kV=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},AV=e=>{let{componentCls:t}=e;return{[t]:{...Ul(e),...OV(e),[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":{...kV(e,e.controlHeightSM)},"&-large":{...kV(e,e.controlHeightLG)}}}},jV=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e,[f]=tu(i,`grid`);return{[t]:{...Ul(e),marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden, + &-hidden${i}-row`]:{display:`none`},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:`hidden`,whiteSpace:`nowrap`,textAlign:`end`,verticalAlign:`middle`,"&-left":{textAlign:`start`},"&-wrap":{overflow:`unset`,lineHeight:e.lineHeight,whiteSpace:`unset`,"> label":{verticalAlign:`middle`,textWrap:`balance`}},"> label":{position:`relative`,display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,height:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`sans-serif`,lineHeight:1,content:`"*"`},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:`none`}}},[`${t}-optional`]:{display:`inline-block`,marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:`none`}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:`help`,writingMode:`horizontal-tb`,marginInlineStart:e.marginXXS},"&::after":{content:`":"`,position:`relative`,marginBlock:0,marginInlineStart:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{[f(`display`)]:`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:`flex`,alignItems:`center`}}}},[t]:{"&-additional":{display:`flex`,flexDirection:`column`},"&-explain, &-extra":{clear:`both`,color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:`100%`},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:`auto`,opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:`center`,visibility:`visible`,animationName:gg,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}}}},MV=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),NV=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label, + ${t}-col-xl-24${n}-label`]:MV(e)}}},PV=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label, + > ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},FV=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:MV(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},IV=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label, ${r}-col-24${n}-label, - ${r}-col-xl-24${n}-label`]:NV(e)},[`@media (max-width: ${Y(e.screenXSMax)})`]:[IV(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:NV(e)}}}],[`@media (max-width: ${Y(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:NV(e)}}},[`@media (max-width: ${Y(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:NV(e)}}},[`@media (max-width: ${Y(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:NV(e)}}}}},RV=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),zV=(e,t)=>dc(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),BV=Ql(`Form`,(e,{rootPrefixCls:t})=>{let n=zV(e,t);return[jV(n),MV(n),OV(n),PV(n),FV(n),LV(n),Kh(n),_g]},RV,{order:-1e3}),VV=[];function HV(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var UV=({help:e,helpStatus:t,errors:n=VV,warnings:r=VV,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:s}=S.useContext(hy),c=`${s}-item-explain`,l=sp(s),[u,d]=BV(s,l),f=S.useMemo(()=>hh(s),[s]),p=DV(n),m=DV(r),h=S.useMemo(()=>$d(e)?[HV(e,`help`,t)]:[].concat(pa(p.map((e,t)=>HV(e,`error`,`error`,t))),pa(m.map((e,t)=>HV(e,`warning`,`warning`,t)))),[e,t,p,m]),g=S.useMemo(()=>{let e={};return h.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),h.map((t,n)=>({...t,key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[h]),_={};return a&&(_.id=`${a}_help`),S.createElement(Od,{motionDeadline:f.motionDeadline,motionName:`${s}-show-help`,visible:!!g.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return S.createElement(`div`,{..._,className:J(c,t,d,l,i,u),style:n},S.createElement(Dd,{keys:g,...hh(s),motionName:`${s}-show-help-item`,component:!1},e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return S.createElement(`div`,{key:t,className:J(i,{[`${c}-${r}`]:r}),style:a},n)}))})},WV=S.forwardRef((e,t)=>{let n=S.useContext(mm),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:s,className:c,style:l,styles:u,classNames:d,tooltip:f}=ya(`form`),{prefixCls:p,className:m,rootClassName:h,size:g,disabled:_=n,form:v,colon:y,labelAlign:b,labelWrap:x,labelCol:C,wrapperCol:w,layout:T=`horizontal`,scrollToFirstError:E,requiredMark:D,onFinishFailed:O,name:k,style:A,feedbackIcons:j,variant:M,classNames:N,styles:P,tooltip:F,...I}=e,L=Eh(g),R=S.useContext(cp),z=S.useMemo(()=>D===void 0?a===void 0?!0:a:D,[D,a]),B=y??o,V={...f,...F},H=r(`form`,p),U=sp(H),[ee,W]=BV(H,U),te={...e,size:L,disabled:_,layout:T,colon:B,requiredMark:z},[G,ne]=Cf([d,N],[u,P],{props:te}),K=J(H,`${H}-${T}`,{[`${H}-hide-required-mark`]:z===!1,[`${H}-rtl`]:i===`rtl`,[`${H}-large`]:L===`large`,[`${H}-small`]:L===`small`},W,U,ee,c,m,h,G.root),[re]=jF(v),{__INTERNAL__:ie}=re;ie.name=k;let ae=S.useMemo(()=>({name:k,labelAlign:b,labelCol:C,labelWrap:x,wrapperCol:w,layout:T,colon:B,requiredMark:z,itemRef:ie.itemRef,form:re,feedbackIcons:j,tooltip:V,classNames:G,styles:ne}),[k,b,C,w,T,B,z,re,j,G,ne,V]),q=S.useRef(null);S.useImperativeHandle(t,()=>({...re,nativeElement:q.current?.nativeElement}));let oe=(e,t)=>{if(e){let n={block:`nearest`};nf(e)&&(n={...n,...e}),re.scrollToField(t,n)}},se=e=>{if(O?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(E!==void 0){oe(E,t);return}s!==void 0&&oe(s,t)}};return S.createElement(vy.Provider,{value:M},S.createElement(hm,{disabled:_},S.createElement(gm.Provider,{value:L},S.createElement(my,{validateMessages:R},S.createElement(fy.Provider,{value:ae},S.createElement(_y,{status:!0},S.createElement(dy,{id:k,...I,name:k,onFinishFailed:se,form:re,ref:q,style:{...ne?.root,...l,...A},className:K})))))))});function GV(e){if(typeof e==`function`)return e;let t=ki(e);return t.length<=1?t[0]:t}var KV=()=>{let{status:e,errors:t=[],warnings:n=[]}=S.useContext(gy);return{status:e,errors:t,warnings:n}};KV.Context=gy;function qV(e){let[t,n]=S.useState(e),r=S.useRef(null),i=S.useRef([]),a=S.useRef(!1);S.useEffect(()=>(a.current=!1,()=>{a.current=!0,Oi.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=Oi(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}var JV=()=>{let{itemRef:e}=S.useContext(fy),t=S.useRef({});function n(n,r){let i=r&&typeof r==`object`&&pr(r),a=n.join(`_`);return(t.current.name!==a||t.current.originRef!==i)&&(t.current.name=a,t.current.originRef=i,t.current.ref=cr(e(n),i)),t.current.ref}return n},YV=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:`flex`}}}},XV=eu([`Form`,`item-item`],(e,{rootPrefixCls:t})=>YV(zV(e,t))),ZV=24,QV=e=>{let{prefixCls:t,status:n,labelCol:r,wrapperCol:i,children:a,errors:o,warnings:s,_internalItemRender:c,extra:l,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:p,label:m}=e,h=`${t}-item`,g=S.useContext(fy),{classNames:_,styles:v}=g,y=S.useMemo(()=>{let e={...i||g.wrapperCol||{}};return m===null&&!r&&!i&&g.labelCol&&[void 0].concat(pa(WC)).forEach(t=>{let n=t?[t]:[],r=Ai(g.labelCol,n),i=nf(r)?r:{},a=Ai(e,n),o=nf(a)?a:{};`span`in i&&!(`offset`in o)&&i.span{let{labelCol:e,wrapperCol:t,...n}=g;return n},[g]),C=S.useRef(null),[w,T]=S.useState(0);Hn(()=>{l&&C.current?T(C.current.clientHeight):T(0)},[l]);let E=S.createElement(`div`,{className:`${h}-control-input`},S.createElement(`div`,{className:J(`${h}-control-input-content`,_?.content),style:v?.content},a)),D=S.useMemo(()=>({prefixCls:t,status:n}),[t,n]),O=f!==null||o.length||s.length?S.createElement(hy.Provider,{value:D},S.createElement(UV,{fieldId:d,errors:o,warnings:s,help:u,helpStatus:n,className:`${h}-explain-connected`,onVisibleChanged:p})):null,k={};d&&(k.id=`${d}_extra`);let A=l?S.createElement(`div`,{...k,className:`${h}-extra`,ref:C},l):null,j=O||A?S.createElement(`div`,{className:`${h}-additional`,style:f?{minHeight:f+w}:{}},O,A):null,M=c&&c.mark===`pro_table_render`&&c.render?c.render(e,{input:E,errorList:O,extra:A}):S.createElement(S.Fragment,null,E,j);return S.createElement(fy.Provider,{value:x},S.createElement(_R,{...y,className:b},M),S.createElement(XV,{prefixCls:t}))},$V=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`question-circle`,theme:`outlined`}}))());function eH(){return eH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,eH({},e,{ref:t,icon:$V.default}))),nH=({prefixCls:e,label:t,htmlFor:n,labelCol:r,labelAlign:i,colon:a,required:o,requiredMark:s,tooltip:c,vertical:l})=>{let[u]=Yd(`Form`),{labelAlign:d,labelCol:f,labelWrap:p,colon:m,classNames:h,styles:g,tooltip:_}=S.useContext(fy);if(!t)return null;let v=r||f||{},y=i||d,b=`${e}-item-label`,x=J(b,y===`left`&&`${b}-left`,v.className,{[`${b}-wrap`]:!!p}),C=t,w=a===!0||m!==!1&&a!==!1;w&&!l&&typeof t==`string`&&t.trim()&&(C=t.replace(/[:|:]\s*$/,``));let T=EV(c,_);if(T){let t=S.createElement(jw,{...T},S.createElement(`span`,{className:`${e}-item-tooltip`,onClick:e=>{e.preventDefault()},tabIndex:-1},T.icon||T.children||S.createElement(tH,null)));C=S.createElement(S.Fragment,null,C,t)}let E=s===`optional`,D=typeof s==`function`,O=s===!1;D?C=s(C,{required:!!o}):E&&!o&&(C=S.createElement(S.Fragment,null,C,S.createElement(`span`,{className:`${e}-item-optional`,title:``},u?.optional||Hd.Form?.optional)));let k;O?k=`hidden`:(E||D)&&(k=`optional`);let A=J(h?.label,{[`${e}-item-required`]:o,[`${e}-item-required-mark-${k}`]:k,[`${e}-item-no-colon`]:!w});return S.createElement(_R,{...v,className:x},S.createElement(`label`,{htmlFor:n,className:A,style:g?.label,title:typeof t==`string`?t:``},C))},rH={success:Tu,warning:Pu,error:Ou,validating:Xm};function iH({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:a,meta:o,noStyle:s,name:c}){let l=`${a}-item`,{feedbackIcons:u}=S.useContext(fy),d=OF(t,n,o,null,!!r,i),{isFormItemInput:f,status:p,hasFeedback:m,feedbackIcon:h,name:g}=S.useContext(gy),_=S.useMemo(()=>{let e;if(r){let i=r!==!0&&r.icons||u,a=d&&i?.({status:d,errors:t,warnings:n})?.[d],o=d?rH[d]:null;e=a!==!1&&o?S.createElement(`span`,{className:J(`${l}-feedback-icon`,`${l}-feedback-icon-${d}`)},a||S.createElement(o,null)):null}let i={status:d||``,errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:e,isFormItemInput:!0,name:c};return s&&(i.status=(d??p)||``,i.isFormItemInput=f,i.hasFeedback=!!(r??m),i.feedbackIcon=r===void 0?h:i.feedbackIcon,i.name=c??g),i},[d,r,s,f,p]);return S.createElement(gy.Provider,{value:_},e)}function aH(e){let{prefixCls:t,className:n,rootClassName:r,style:i,help:a,errors:o,warnings:s,validateStatus:c,meta:l,hasFeedback:u,hidden:d,children:f,fieldId:p,required:m,isRequired:h,onSubItemMetaChange:g,layout:_,name:v,...y}=e,b=`${t}-item`,{requiredMark:x,layout:C}=S.useContext(fy),w=_||C,T=w===`vertical`,E=S.useRef(null),D=DV(o),O=DV(s),k=$d(a),A=!!(k||o.length||s.length),j=!!E.current&&Ar(E.current),[M,N]=S.useState(null);Hn(()=>{if(A&&E.current){let e=getComputedStyle(E.current);N(Number.parseInt(e.marginBottom,10))}},[A,j]);let P=e=>{e||N(null)},F=((e=!1)=>OF(e?D:l.errors,e?O:l.warnings,l,``,!!u,c))(),I=J(b,n,r,{[`${b}-with-help`]:k||D.length||O.length,[`${b}-has-feedback`]:F&&u,[`${b}-has-success`]:F===`success`,[`${b}-has-warning`]:F===`warning`,[`${b}-has-error`]:F===`error`,[`${b}-is-validating`]:F===`validating`,[`${b}-hidden`]:d,[`${b}-${w}`]:w});return S.createElement(`div`,{className:I,style:i,ref:E},S.createElement(bR,{className:`${b}-row`,...gi(y,`_internalItemRender.colon.dependencies.extra.fieldKey.getValueFromEvent.getValueProps.htmlFor.id.initialValue.isListField.label.labelAlign.labelCol.labelWrap.messageVariables.name.normalize.noStyle.preserve.requiredMark.rules.shouldUpdate.trigger.tooltip.validateFirst.validateTrigger.valuePropName.wrapperCol.validateDebounce`.split(`.`))},S.createElement(nH,{htmlFor:p,...e,requiredMark:x,required:m??h,prefixCls:t,vertical:T}),S.createElement(QV,{...e,...l,errors:D,warnings:O,prefixCls:t,status:F,help:a,marginBottom:M,onErrorVisibleChanged:P},S.createElement(py.Provider,{value:g},S.createElement(iH,{prefixCls:t,meta:l,errors:l.errors,warnings:l.warnings,hasFeedback:u,validateStatus:F,name:v},f)))),!!M&&S.createElement(`div`,{className:`${b}-margin-offset`,style:{marginBottom:-M}}))}var oH=`__SPLIT__`;function sH(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],i=t[n];return r===i||typeof r==`function`||typeof i==`function`})}var cH=S.memo(e=>e.children,(e,t)=>sH(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function lH(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function uH(e){let{name:t,noStyle:n,className:r,dependencies:i,prefixCls:a,shouldUpdate:o,rules:s,children:c,required:l,label:u,messageVariables:d,trigger:f=`onChange`,validateTrigger:p,hidden:m,help:h,layout:g}=e,{getPrefixCls:_}=S.useContext(ga),{name:v}=S.useContext(fy),y=GV(c),b=typeof y==`function`,x=S.useContext(py),{validateTrigger:C}=S.useContext(I_),w=$d(p)?p:C,T=$d(t),E=_(`form`,a),D=sp(E),[O,k]=BV(E,D);Gi(`Form.Item`);let A=S.useContext(L_),j=S.useRef(null),[M,N]=qV({}),[P,F]=Wn(()=>lH()),I=e=>{let t=A?.getKey(e.name);if(F(e.destroy?lH():e,!0),n&&h!==!1&&x){let n=e.name;if(e.destroy)n=j.current||n;else if(t!==void 0){let[e,r]=t;n=[e].concat(pa(r)),j.current=n}x(e,n)}},L=(e,t)=>{N(n=>{let r={...n},i=[].concat(pa(e.name.slice(0,-1)),pa(t)).join(oH);return e.destroy?delete r[i]:r[i]=e,r})},[R,z]=S.useMemo(()=>{let e=pa(P.errors),t=pa(P.warnings);return Object.values(M).forEach(n=>{e.push.apply(e,pa(n.errors||[])),t.push.apply(t,pa(n.warnings||[]))}),[e,t]},[M,P.errors,P.warnings]),B=JV();function V(i,a,o){return n&&!m?S.createElement(iH,{prefixCls:E,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:P,errors:R,warnings:z,noStyle:!0,name:t},i):S.createElement(aH,{key:`row`,...e,className:J(r,k,D,O),prefixCls:E,fieldId:a,isRequired:o,errors:R,warnings:z,meta:P,onSubItemMetaChange:L,layout:g,name:t},i)}if(!T&&!b&&!i)return V(y);let H={};return typeof u==`string`?H.label=u:t&&(H.label=String(t)),d&&(H={...H,...d}),S.createElement(Zv,{...e,messageVariables:H,trigger:f,validateTrigger:w,onMetaChange:I},(n,r,a)=>{let c=EF(t).length&&r?r.name:[],u=DF(c,v),d=l===void 0?s?.some(e=>{if(nf(e)&&e.required&&!e.warningOnly)return!0;if(typeof e==`function`){let t=e(a);return t?.required&&!t?.warningOnly}return!1}):l,p={...n},m=null;if(Array.isArray(y)&&T)m=y;else if(!(b&&(!(o||i)||T))&&!(i&&!b&&!T))if(S.isValidElement(y)){let t={...y.props,...p};if(t.id||=u,h||R.length>0||z.length>0||e.extra){let n=[];(h||R.length>0)&&n.push(`${u}_help`),e.extra&&n.push(`${u}_extra`),t[`aria-describedby`]=n.join(` `)}R.length>0&&(t[`aria-invalid`]=`true`),d&&(t[`aria-required`]=`true`),ur(y)&&(t.ref=B(c,y)),new Set([].concat(pa(EF(f)),pa(EF(w)))).forEach(e=>{t[e]=(...t)=>{p[e]?.(...t),y.props[e]?.(...t)}});let n=[t[`aria-required`],t[`aria-invalid`],t[`aria-describedby`]];m=S.createElement(cH,{control:p,update:y,childProps:n},um(y,t))}else m=b&&(o||i)&&!T?y(a):y;return V(m,u,d)})}var dH=uH;dH.useStatus=KV;var fH=({prefixCls:e,children:t,...n})=>{let{getPrefixCls:r}=S.useContext(ga),i=r(`form`,e),a=S.useMemo(()=>({prefixCls:i,status:`error`}),[i]);return S.createElement(Qv,{...n},(e,n,r)=>S.createElement(hy.Provider,{value:a},t(e.map(e=>({...e,fieldKey:e.key})),n,{errors:r.errors,warnings:r.warnings})))};function pH(){let{form:e}=S.useContext(fy);return e}var mH=WV;mH.Item=dH,mH.List=fH,mH.ErrorList=UV,mH.useForm=jF,mH.useFormInstance=pH,mH.useWatch=uy,mH.Provider=my;var hH=S.createContext(null);function gH(e){return new Promise(t=>{if(!e){t(!1);return}let n=document.createElement(`img`);n.onerror=()=>t(!1),n.onload=()=>t(!0),n.src=e})}function _H(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var vH={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function yH(e,t,n,r){let i=(0,S.useRef)(null),a=(0,S.useRef)([]),[o,s]=(0,S.useState)(vH),c=e=>{s(vH),fi(vH,o)||r?.({transform:vH,action:e})},l=(e,t)=>{i.current===null&&(a.current=[],i.current=Oi(()=>{s(e=>{let n=e;return a.current.forEach(e=>{n={...n,...e}}),i.current=null,r?.({transform:n,action:t}),n})})),a.current.push({...o,...e})};return{transform:o,resetTransform:c,updateTransform:l,dispatchZoomChange:(r,i,a,s,c)=>{let{width:u,height:d,offsetWidth:f,offsetHeight:p,offsetLeft:m,offsetTop:h}=e.current,g=r,_=o.scale*r;_>n?(_=n,g=n/o.scale):_r){if(t>0)return{[e]:a};if(t<0&&ir)return{[e]:t<0?a:-a};return{}}function xH(e,t,n,r){let{width:i,height:a}=_H(),o=null;return e<=i&&t<=a?o={x:0,y:0}:(e>i||t>a)&&(o={...bH(`x`,n,e,i),...bH(`y`,r,t,a)}),o}function SH(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),m=e=>{!t||e.button!==0||(e.preventDefault(),e.stopPropagation(),p.current={diffX:e.pageX-l,diffY:e.pageY-u,transformX:l,transformY:u},f(!0))},h=e=>{n&&d&&a({x:e.pageX-p.current.diffX,y:e.pageY-p.current.diffY},`move`)},g=()=>{if(n&&d){f(!1);let{transformX:t,transformY:n}=p.current;if(!(l!==t&&u!==n))return;let r=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:d}=e.current.getBoundingClientRect(),m=s%180!=0,h=xH(m?i:r,m?r:i,o,d);h&&a({...h},`dragRebound`)}};return(0,S.useEffect)(()=>{if(t){window.addEventListener(`mouseup`,g,!1),window.addEventListener(`mousemove`,h,!1);try{window.top!==window.self&&(window.top.addEventListener(`mouseup`,g,!1),window.top.addEventListener(`mousemove`,h,!1))}catch(e){`${e}`}}return()=>{window.removeEventListener(`mouseup`,g),window.removeEventListener(`mousemove`,h);try{window.top?.removeEventListener(`mouseup`,g),window.top?.removeEventListener(`mousemove`,h)}catch{}}},[n,d,l,u,s,t]),{isMoving:d,onMouseDown:m,onMouseMove:h,onMouseUp:g,onWheel:e=>{if(!n||e.deltaY==0)return;let t=Math.abs(e.deltaY/100),i=1+Math.min(t,1)*r;e.deltaY>0&&(i=1/i),o(i,`wheel`,e.clientX,e.clientY)}}}function CH({src:e,isCustomPlaceholder:t,fallback:n}){let[r,i]=(0,S.useState)(t?`loading`:`normal`),a=(0,S.useRef)(!1),o=r===`error`;(0,S.useEffect)(()=>{let t=!0;return gH(e).then(e=>{!e&&t&&i(`error`)}),()=>{t=!1}},[e]),(0,S.useEffect)(()=>{t&&!a.current?i(`loading`):o&&i(`normal`)},[e]);let s=()=>{i(`normal`)};return[e=>{a.current=!1,r===`loading`&&e?.complete&&(e.naturalWidth||e.naturalHeight)&&(a.current=!0,s())},o&&n?{src:n}:{onLoad:s,src:e},r]}function wH(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.hypot(n,r)}function TH(e,t,n,r){let i=wH(e,n),a=wH(t,r);if(i===0&&a===0)return[e.x,e.y];let o=i/(i+a);return[e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)]}function EH(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:`none`}),m=e=>{p.current={...p.current,...e}};return(0,S.useEffect)(()=>{let e=e=>{e.preventDefault()};return n&&t&&window.addEventListener(`touchmove`,e,{passive:!1}),()=>{window.removeEventListener(`touchmove`,e)}},[n,t]),{isTouching:d,onTouchStart:e=>{if(!t)return;e.stopPropagation(),f(!0);let{touches:n=[]}=e;n.length>1?m({point1:{x:n[0].clientX,y:n[0].clientY},point2:{x:n[1].clientX,y:n[1].clientY},eventType:`touchZoom`}):m({point1:{x:n[0].clientX-l,y:n[0].clientY-u},eventType:`move`})},onTouchMove:e=>{let{touches:t=[]}=e,{point1:n,point2:r,eventType:i}=p.current;if(t.length>1&&i===`touchZoom`){let e={x:t[0].clientX,y:t[0].clientY},i={x:t[1].clientX,y:t[1].clientY},[a,s]=TH(n,r,e,i);o(wH(e,i)/wH(n,r),`touchZoom`,a,s,!0),m({point1:e,point2:i,eventType:`touchZoom`})}else i===`move`&&(a({x:t[0].clientX-n.x,y:t[0].clientY-n.y},`move`),m({eventType:`move`}))},onTouchEnd:()=>{if(!n)return;if(d&&f(!1),m({eventType:`none`}),r>c)return a({x:0,y:0,scale:r},`touchZoom`);let t=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:l}=e.current.getBoundingClientRect(),u=s%180!=0,p=xH(u?i:t,u?t:i,o,l);p&&a({...p},`dragRebound`)}}}function DH(e){let{prefixCls:t,icon:n,onClick:r,className:i,style:a}=e;return S.createElement(`button`,{className:J(`${t}-close`,i),style:a,onClick:r},n)}function OH(e){let{prefixCls:t,showProgress:n,current:r,count:i,showSwitch:a,classNames:o,styles:s,icons:c,image:l,transform:u,countRender:d,actionsRender:f,scale:p,minScale:m,maxScale:h,onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onClose:w,onReset:T}=e,{left:E,right:D,prev:O,next:k,flipY:A,flipX:j,rotateLeft:M,rotateRight:N,zoomOut:P,zoomIn:F}=c,I=n&&S.createElement(`div`,{className:`${t}-progress`},d?d(r+1,i):S.createElement(`bdi`,null,`${r+1} / ${i}`)),L=`${t}-actions-action`,R=({type:e,disabled:t,onClick:n,icon:r})=>S.createElement(`button`,{type:`button`,key:e,className:J(L,`${L}-${e}`,{[`${L}-disabled`]:!!t}),onClick:n,disabled:!!t,"aria-label":e},r),z=a?R({icon:O??E,onClick:()=>g(-1),type:`prev`,disabled:r===0}):void 0,B=a?R({icon:k??D,onClick:()=>g(1),type:`next`,disabled:r===i-1}):void 0,V=R({icon:A,onClick:_,type:`flipY`}),H=R({icon:j,onClick:v,type:`flipX`}),U=R({icon:M,onClick:y,type:`rotateLeft`}),ee=R({icon:N,onClick:b,type:`rotateRight`}),W=R({icon:P,onClick:x,type:`zoomOut`,disabled:p<=m}),te=R({icon:F,onClick:C,type:`zoomIn`,disabled:p===h}),G=S.createElement(`div`,{className:J(`${t}-actions`,o.actions),style:s.actions},V,H,U,ee,W,te);return S.createElement(`div`,{className:J(`${t}-footer`,o.footer),style:s.footer},I,f?f(G,{icons:{prevIcon:z,nextIcon:B,flipYIcon:V,flipXIcon:H,rotateLeftIcon:U,rotateRightIcon:ee,zoomOutIcon:W,zoomInIcon:te},actions:{onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onReset:T,onClose:w},transform:u,current:r,total:i,image:l}):G)}function kH(e){let{prefixCls:t,onActive:n,current:r,count:i,icons:{left:a,right:o,prev:s,next:c}}=e,l=`${t}-switch`,u=r===0,d=r===i-1;return S.createElement(S.Fragment,null,S.createElement(`button`,{className:J(l,`${l}-prev`,{[`${l}-disabled`]:u}),onClick:()=>n(-1),disabled:u},s??a),S.createElement(`button`,{type:`button`,className:J(l,`${l}-next`,{[`${l}-disabled`]:d}),onClick:()=>n(1),disabled:d},c??o))}function AH(){return AH=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[i,a]=CH({src:t,fallback:e});return S.createElement(`img`,AH({ref:e=>{n.current=e,i(e)}},r,a))},MH=e=>{let{prefixCls:t,rootClassName:n,src:r,alt:i,imageInfo:a,fallback:o,movable:s=!0,onClose:c,open:l,afterOpenChange:u,maskClosable:d=!0,icons:f={},closeIcon:p,getContainer:m,current:h=0,count:g=1,countRender:_,scaleStep:v=.5,minScale:y=1,maxScale:b=50,motionName:x=`fade`,imageRender:C,imgCommonProps:w,actionsRender:T,onTransform:E,onChange:D,classNames:O={},styles:k={},mousePosition:A,zIndex:j,focusTrap:M=!0}=e,N=(0,S.useRef)(),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=(0,S.useContext)(hH),L=I&&g>1,R=I&&g>=1,[z,B]=(0,S.useState)(!0),{transform:V,resetTransform:H,updateTransform:U,dispatchZoomChange:ee}=yH(N,y,b,E),{isMoving:W,onMouseDown:te,onWheel:G}=SH(N,s,l,v,V,U,ee),{isTouching:ne,onTouchStart:K,onTouchMove:re,onTouchEnd:ie}=EH(N,s,l,y,V,U,ee),{rotate:ae,scale:q}=V;(0,S.useEffect)(()=>{z||B(!0)},[z]),(0,S.useEffect)(()=>{l||H(`close`)},[l]);let oe=S.createElement(jH,AH({},w,{width:e.width,height:e.height,imgRef:N,className:`${t}-img`,alt:i,style:{transform:`translate3d(${V.x}px, ${V.y}px, 0) scale3d(${V.flipX?`-`:``}${q}, ${V.flipY?`-`:``}${q}, 1) rotate(${ae}deg)`,transitionDuration:(!z||ne)&&`0s`},fallback:o,src:r,onWheel:G,onMouseDown:te,onDoubleClick:e=>{l&&(q===1?ee(1+v,`doubleClick`,e.clientX,e.clientY):U({x:0,y:0,scale:1},`doubleClick`))},onTouchStart:K,onTouchMove:re,onTouchEnd:ie,onTouchCancel:ie})),se={url:r,alt:i,...a},ce=()=>{ee(1+v,`zoomIn`)},le=()=>{ee(1/(1+v),`zoomOut`)},ue=()=>{U({rotate:ae+90},`rotateRight`)},de=()=>{U({rotate:ae-90},`rotateLeft`)},fe=()=>{U({flipX:!V.flipX},`flipX`)},pe=()=>{U({flipY:!V.flipY},`flipY`)},me=()=>{H(`reset`)},he=e=>{let t=h+e;t>=0&&t<=g-1&&(B(!1),H(e<0?`prev`:`next`),D?.(t,h))},ge=zn(e=>{if(l){let{keyCode:t}=e;L&&(t===Qr.LEFT?he(-1):t===Qr.RIGHT&&he(1))}});(0,S.useEffect)(()=>{if(l)return window.addEventListener(`keydown`,ge),()=>{window.removeEventListener(`keydown`,ge)}},[l]);let[_e,ve]=(0,S.useState)(!1);S.useEffect(()=>{l&&ve(!0)},[l]);let ye=e=>{e||(ve(!1),F.current?.focus?.(),F.current=null),u?.(e)},[be,xe]=(0,S.useState)(!1);Hn(()=>{l&&xe(!0)},[l]);let Se=({top:e})=>{e&&c?.()};Hn(()=>{l&&(F.current=document.activeElement)},[l]),Gr(M&&l&&be,()=>P.current);let Ce={...k.body};return A&&(Ce.transformOrigin=`${A.x}px ${A.y}px`),S.createElement(Dp,{open:be&&l,autoDestroy:!1,getContainer:m,autoLock:_e,onEsc:Se},S.createElement(Od,{motionName:x,visible:be&&l,motionAppear:!0,motionEnter:!0,motionLeave:!0,onVisibleChanged:ye},({className:e,style:r})=>{let a={...k.root,...r};return j&&(a.zIndex=j),S.createElement(`div`,{ref:P,className:J(t,n,O.root,e,{[`${t}-movable`]:s,[`${t}-moving`]:W}),style:a,role:`dialog`,"aria-modal":`true`,"aria-label":i,tabIndex:-1},S.createElement(`div`,{className:J(`${t}-mask`,O.mask),style:k.mask,onClick:d?c:void 0}),S.createElement(`div`,{className:J(`${t}-body`,O.body),style:Ce},C?C(oe,{transform:V,image:se,...I?{current:h}:{}}):oe),p!==!1&&p!==null&&S.createElement(DH,{prefixCls:t,icon:p===!0?f.close:p||f.close,onClick:c,className:O.close,style:k.close}),L&&S.createElement(kH,{prefixCls:t,current:h,count:g,icons:f,onActive:he}),S.createElement(OH,{prefixCls:t,showProgress:R,current:h,count:g,showSwitch:L,classNames:O,styles:k,image:se,transform:V,icons:f,countRender:_,actionsRender:T,scale:q,minScale:y,maxScale:b,onActive:he,onFlipY:pe,onFlipX:fe,onRotateLeft:de,onRotateRight:ue,onZoomOut:le,onZoomIn:ce,onClose:c,onReset:me}))}))},NH=[`crossOrigin`,`decoding`,`draggable`,`loading`,`referrerPolicy`,`sizes`,`srcSet`,`useMap`,`alt`,`fetchPriority`];function PH(e){let[t,n]=S.useState({}),r=S.useCallback((e,t)=>(n(n=>({...n,[e]:t})),()=>{n(t=>{let n={...t};return delete n[e],n})}),[]);return[S.useMemo(()=>e?e.map(e=>{if(typeof e==`string`)return{data:{src:e}};let t={};return Object.keys(e).forEach(n=>{[`src`,...NH].includes(n)&&(t[n]=e[n])}),{data:t}}):Object.keys(t).reduce((e,n)=>{let{canPreview:r,data:i}=t[n];return r&&e.push({data:i,id:n}),e},[]),[e,t]),r,!!e]}function FH(){return FH=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{open:c,onOpenChange:l,current:u,onChange:d,...f}=o&&typeof o==`object`?o:{},[p,m,h]=PH(a),[g,_]=Gn(0,u),[v,y]=(0,S.useState)(!1),{src:b,...x}=p[g]?.data||{},[C,w]=Gn(!!c,c),T=zn(e=>{w(e),e!==C&&l?.(e,{current:g})}),[E,D]=(0,S.useState)(null),O=S.useCallback((e,t,n,r)=>{let i=h?p.findIndex(e=>e.data.src===t):p.findIndex(t=>t.id===e);_(i<0?0:i),T(!0),D({x:n,y:r}),y(!0)},[p,h]);S.useEffect(()=>{C?v||_(0):y(!1)},[C]);let k=(e,t)=>{_(e),d?.(e,t)},A=()=>{T(!1),D(null)},j=S.useMemo(()=>({register:m,onPreview:O}),[m,O]);return S.createElement(hH.Provider,{value:j},r,S.createElement(MH,FH({"aria-hidden":!C,open:C,prefixCls:e,onClose:A,mousePosition:E,imgCommonProps:x,src:b,fallback:s,icons:i,current:g,count:p.length,onChange:k},f,{classNames:t?.popup,styles:n?.popup})))},LH=0;function RH(e,t){let[n]=S.useState(()=>(LH+=1,String(LH))),r=S.useContext(hH),i={data:t,canPreview:e};return S.useEffect(()=>{if(r)return r.register(n,i)},[]),S.useEffect(()=>{r&&r.register(n,i)},[e,t]),n}function zH(){return zH=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-image`,previewPrefixCls:n=`${t}-preview`,rootClassName:r,className:i,style:a,classNames:o={},styles:s={},width:c,height:l,src:u,alt:d,placeholder:f,fallback:p,preview:m=!0,onClick:h,onError:g,onKeyDown:_,...v}=e,y=(0,S.useContext)(hH),b=!!m,{src:x,open:C,onOpenChange:w,cover:T,rootClassName:E,...D}=m&&typeof m==`object`?m:{},O=typeof T==`object`&&T.placement&&T.placement||`center`,k=typeof T==`object`&&T.coverNode?T.coverNode:T,[A,j]=Gn(!!C,C),[M,N]=(0,S.useState)(null),P=e=>{j(e),w?.(e)},F=()=>{P(!1)},I=f&&f!==!0,L=x??u,[R,z,B]=CH({src:u,isCustomPlaceholder:I,fallback:p}),V=(0,S.useMemo)(()=>{let t={};return NH.forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t},NH.map(t=>e[t])),H=RH(b,(0,S.useMemo)(()=>({...V,src:L}),[L,V])),U=e=>{let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0)),h?.(e)},ee=e=>{if(_?.(e),b&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0))}};return S.createElement(S.Fragment,null,S.createElement(`div`,zH({},v,{className:J(t,r,o.root,{[`${t}-error`]:B===`error`}),onClick:b?U:h,role:b?`button`:v.role,tabIndex:b&&v.tabIndex==null?0:v.tabIndex,"aria-label":b?v[`aria-label`]??d:v[`aria-label`],onKeyDown:ee,style:{width:c,height:l,...s.root}}),S.createElement(`img`,zH({},V,{className:J(`${t}-img`,{[`${t}-img-placeholder`]:f===!0},o.image,i),style:{height:l,...s.image,...a},ref:R},z,{width:c,height:l,onError:g})),B===`loading`&&S.createElement(`div`,{"aria-hidden":`true`,className:`${t}-placeholder`},f),T!==!1&&b&&S.createElement(`div`,{className:J(`${t}-cover`,o.cover,`${t}-cover-${O}`),style:{display:a?.display===`none`?`none`:void 0,...s.cover}},k)),!y&&b&&S.createElement(MH,zH({"aria-hidden":!A,open:A,prefixCls:n,onClose:F,mousePosition:M,src:L,alt:d,imageInfo:{width:c,height:l},fallback:p,imgCommonProps:V},D,{classNames:o?.popup,styles:s?.popup,rootClassName:J(E,r)})))};BH.PreviewGroup=IH;var VH=BH,HH=(e,t,n,r,i,a,o)=>{let[s]=Lf(`ImagePreview`,e?.zIndex),[c,l]=gf(e?.mask,t?.mask,`${n}-preview`);return S.useMemo(()=>{if(!e)return e;let{cover:u,getContainer:d,closeIcon:f,rootClassName:p}=e,{closeIcon:m}=t??{};return{motionName:gh(`${n}-preview`,`fade`),...e,...o?{cover:u??o}:{},icons:a,getContainer:d??i,zIndex:s,closeIcon:f??m,rootClassName:J(r,p),mask:c,blurClassName:l.mask}},[e,t,n,r,i,o,a,s,c,l])};function UH(e){return(0,S.isValidElement)(e)?[e,void 0]:typeof e==`boolean`||nf(e)?[void 0,e]:[void 0,void 0]}function WH(e){let t=(0,S.useMemo)(()=>typeof e==`boolean`?e?{}:null:nf(e)?e:{},[e]);return(0,S.useMemo)(()=>{if(!t)return[t,``,``];let{open:e,onOpenChange:n,cover:r,actionsRender:i,visible:a,onVisibleChange:o,rootClassName:s,maskClassName:c,mask:l,forceRender:u,destroyOnClose:d,toolbarRender:f,...p}=t,m;n?m=n:o&&(m=(e,t)=>{let{current:n}=t||{};n===void 0?o(e,!e):o(e,!e,n)});let[h,g]=UH(l);return[{...p,open:e??a,onOpenChange:m,cover:r??h,mask:g,actionsRender:i??f},s,c]},[t])}var GH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z`}},{tag:`path`,attrs:{d:`M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z`}}]},name:`rotate-left`,theme:`outlined`}}))());function KH(){return KH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,KH({},e,{ref:t,icon:GH.default}))),JH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z`}},{tag:`path`,attrs:{d:`M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z`}}]},name:`rotate-right`,theme:`outlined`}}))());function YH(){return YH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,YH({},e,{ref:t,icon:JH.default}))),ZH=c(o((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:`M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`swap`,theme:`outlined`}}))());function QH(){return QH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,QH({},e,{ref:t,icon:ZH.default}))),eU=c(o((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:`M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-in`,theme:`outlined`}}))());function tU(){return tU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,tU({},e,{ref:t,icon:eU.default}))),rU=c(o((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:`M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-out`,theme:`outlined`}}))());function iU(){return iU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,iU({},e,{ref:t,icon:rU.default}))),oU=e=>({position:e||`absolute`,inset:0}),sU=e=>{let{componentCls:t,motionDurationSlow:n,colorTextLightSolid:r}=e;return{[t]:{[`${t}-cover`]:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,color:r,background:new Nc(`#000`).setA(.3).toRgbString(),cursor:`pointer`,opacity:0,transition:`opacity ${n}`},"&:hover, &:focus-visible":{[`${t}-cover`]:{opacity:1}},[`${t}-cover-top`]:{inset:`0 0 auto 0`,justifyContent:`center`},[`${t}-cover-bottom`]:{inset:`auto 0 0 0`,justifyContent:`center`}}}},cU=e=>{let{motionEaseOut:t,previewCls:n,motionDurationSlow:r,componentCls:i,colorBgMask:a,marginXL:o,marginSM:s,margin:c,colorTextLightSolid:l,paddingSM:u,paddingLG:d,previewOperationHoverColor:f,previewOperationColorDisabled:p,previewOperationSize:m,zIndexPopup:h}=e,g=new Nc(a).setA(.1),_=g.clone().setA(.2),v={position:`absolute`,color:l,backgroundColor:g.toRgbString(),borderRadius:`50%`,padding:u,outline:0,border:0,cursor:`pointer`,transition:`all ${r}`,display:`flex`,fontSize:m,"&:hover":{backgroundColor:_.toRgbString()},"&:active":{backgroundColor:g.toRgbString()},"&:focus-visible":Kl(e)};return{[`${i}-preview`]:{textAlign:`center`,inset:0,position:`fixed`,userSelect:`none`,zIndex:h,[`${n}-mask`]:{inset:0,position:`absolute`,background:a,backdropFilter:`blur(0px)`,transition:`backdrop-filter ${r}`,[`&${i}-preview-mask-blur`]:{backdropFilter:`blur(4px)`},[`&${i}-preview-mask-hidden`]:{display:`none`}},[`${n}-body`]:{...oU(),"pointer-events":`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,"> *":{pointerEvents:`auto`}},[`${n}-img`]:{maxWidth:`100%`,maxHeight:`70%`,verticalAlign:`middle`,transform:`scale3d(1, 1, 1)`,transition:`transform ${r} ${t} 0s`},[`&-movable ${n}-img`]:{cursor:`grab`},[`&-moving ${n}-img`]:{cursor:`grabbing`},[`${n}-close`]:{...v,top:s,insetInlineEnd:s},[`${n}-switch`]:{...v,top:`50%`,transform:`translateY(-50%)`,"&-disabled":{"&, &:hover, &:active":{color:p,background:`transparent`,cursor:`not-allowed`}},"&-prev":{insetInlineStart:s},"&-next":{insetInlineEnd:s}},[`${n}-footer`]:{position:`absolute`,bottom:o,left:{_skip_check_:!0,value:`50%`},display:`flex`,flexDirection:`column`,alignItems:`center`,color:e.previewOperationColor,transform:`translateX(-50%)`,gap:c},[`${n}-actions`]:{display:`flex`,gap:u,padding:`0 ${Y(d)}`,backgroundColor:g.toRgbString(),borderRadius:100,fontSize:m,"&-action":{color:`inherit`,background:`transparent`,border:0,font:`inherit`,padding:u,cursor:`pointer`,transition:`all ${r}`,display:`flex`,[`&:not(${n}-actions-action-disabled):hover`]:{color:f},"&:focus-visible":Kl(e),"&-disabled":{color:p,cursor:`not-allowed`}}}}}},lU=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,display:`inline-block`,...ql(e),[`${t}-img`]:{width:`100%`,height:`auto`,verticalAlign:`middle`},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:`url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')`,backgroundRepeat:`no-repeat`,backgroundPosition:`center center`,backgroundSize:`30%`},[`${t}-placeholder`]:{...oU()}}}},uU=e=>{let{previewCls:t,motionDurationSlow:n}=e;return{[t]:{"&-fade":{transition:`opacity ${n}`,"&-enter, &-appear":{opacity:0,[`${t}-body`]:{transform:`scale(0)`},"&-active":{opacity:1,[`${t}-body`]:{transform:`scale(1)`,transition:`transform ${n}`}}},"&-leave":{opacity:1,"&-active":{opacity:0,[`${t}-body`]:{transform:`scale(0)`,transition:`transform ${n}`}}}}}}},dU=Ql(`Image`,e=>{let t=dc(e,{previewCls:`${e.componentCls}-preview`,imagePreviewSwitchSize:e.controlHeightLG});return[lU(t),sU(t),cU(t),uU(t)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new Nc(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new Nc(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new Nc(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),fU={rotateLeft:S.createElement(qH,null),rotateRight:S.createElement(XH,null),zoomIn:S.createElement(nU,null),zoomOut:S.createElement(aU,null),close:S.createElement(ju,null),left:S.createElement(Gw,null),right:S.createElement(Vg,null),flipX:S.createElement($H,null),flipY:S.createElement($H,{rotate:90})},pU=({previewPrefixCls:e,preview:t,classNames:n,styles:r,...i})=>{let{getPrefixCls:a,getPopupContainer:o,direction:s,preview:c,classNames:l,styles:u}=ya(`image`),d=a(`image`,e),f=`${d}-preview`,p=sp(d),[m,h]=dU(d,p),g=J(m,h,p),[_,v,y]=WH(t),[b,x,C]=WH(c),w=S.useMemo(()=>({...fU,left:s===`rtl`?S.createElement(Vg,null):S.createElement(Gw,null),right:s===`rtl`?S.createElement(Gw,null):S.createElement(Vg,null)}),[s]),T=HH(_,b,d,g,o,fU),{mask:E,blurClassName:D}=T??{},O={...i,classNames:n,styles:r},[k,A]=Cf([l,n,{cover:J(C,y),popup:{root:J(x,v),mask:J({[`${d}-preview-mask-hidden`]:!E},D)}}],[u,r],{props:O},{popup:{_default:`root`}});return S.createElement(VH.PreviewGroup,{preview:T,previewPrefixCls:f,icons:w,...i,classNames:k,styles:A})},mU=e=>{let{prefixCls:t,preview:n,className:r,rootClassName:i,style:a,styles:o,classNames:s,wrapperStyle:c,fallback:l,...u}=e,{getPrefixCls:d,getPopupContainer:f,className:p,style:m,preview:h,styles:g,classNames:_,fallback:v}=ya(`image`),y=d(`image`,t),b=sp(y),[x,C]=dU(y,b),w=J(i,x,C,b),T=J(r,x,p),[E,D,O]=WH(n),[k,A,j]=WH(h),M=HH(E,k,y,w,f,fU,!0),N={...e,preview:M},P=S.useMemo(()=>({cover:J(j,O),popup:{root:J(A,D)}}),[D,O,A,j]),{mask:F,blurClassName:I}=M??{},L=S.useMemo(()=>({mask:J({[`${y}-preview-mask-hidden`]:!F},I)}),[F,y,I]),[R,z]=Cf(S.useMemo(()=>[_,s,P,{popup:L}],[_,s,P,L]),[g,{root:c},o],{props:N},{popup:{_default:`root`}}),B={...m,...a},V=l??v;return S.createElement(VH,{prefixCls:y,preview:M||!1,rootClassName:w,className:T,style:B,fallback:V,...u,classNames:R,styles:z})};mU.PreviewGroup=pU;var hU=e=>{let{getPrefixCls:t,direction:n}=(0,S.useContext)(ga),{prefixCls:r,className:i}=e,a=t(`input-group`,r),[o,s]=CI(t(`input`)),c=J(a,s,{[`${a}-lg`]:e.size===`large`,[`${a}-sm`]:e.size===`small`,[`${a}-compact`]:e.compact,[`${a}-rtl`]:n===`rtl`},o,i),l=(0,S.useContext)(gy),u=(0,S.useMemo)(()=>({...l,isFormItemInput:!1}),[l]);return S.createElement(gy.Provider,{value:u},S.createElement(bV.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},gU=e=>{let{componentCls:t,paddingXS:n}=e;return{[t]:{display:`inline-flex`,alignItems:`center`,flexWrap:`nowrap`,columnGap:n,[`${t}-input-wrapper`]:{position:`relative`,[`${t}-mask-icon`]:{position:`absolute`,zIndex:`1`,top:`50%`,right:`50%`,transform:`translate(50%, -50%)`,pointerEvents:`none`},[`${t}-mask-input`]:{color:`transparent`,caretColor:e.colorText,"&::selection":{color:`transparent`}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":`none`,margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":`textfield`}},"&-rtl":{direction:`rtl`},[`${t}-input`]:{textAlign:`center`,paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},_U=Ql([`Input`,`OTP`],e=>gU(dc(e,JF(e))),YF),vU=S.forwardRef((e,t)=>{let{className:n,value:r,onChange:i,onActiveChange:a,index:o,mask:s,onFocus:c,...l}=e,{getPrefixCls:u}=S.useContext(ga),d=u(`otp`),f=typeof s==`string`?s:r,p=S.useRef(null);S.useImperativeHandle(t,()=>p.current);let m=e=>{i(o,e.target.value)},h=()=>{Oi(()=>{let e=p.current?.input;document.activeElement===e&&e&&e.select()})},g=e=>{c?.(e),h()},_=e=>{let{key:t,ctrlKey:n,metaKey:i}=e;t===`ArrowLeft`?a(o-1):t===`ArrowRight`?a(o+1):t===`z`&&(n||i)?e.preventDefault():t===`Backspace`&&!r&&a(o-1),h()};return S.createElement(`span`,{className:`${d}-input-wrapper`,role:`presentation`},s&&r!==``&&r!==void 0&&S.createElement(`span`,{className:`${d}-mask-icon`,"aria-hidden":`true`},f),S.createElement(xz,{"aria-label":`OTP Input ${o+1}`,type:s===!0?`password`:`text`,...l,ref:p,value:r,onInput:m,onFocus:g,onKeyDown:_,onMouseDown:h,onMouseUp:h,className:J(n,{[`${d}-mask-input`]:s})}))});function yU(e){return(e||``).split(``)}var bU=e=>{let{index:t,prefixCls:n,separator:r,className:i,style:a}=e,o=typeof r==`function`?r(t):r;return o?S.createElement(`span`,{className:J(`${n}-separator`,i),style:a},o):null},xU=S.forwardRef((e,t)=>{let{prefixCls:n,length:r=6,size:i,defaultValue:a,value:o,onChange:s,formatter:c,separator:l,variant:u,disabled:d,status:f,autoFocus:p,mask:m,type:h,autoComplete:g,onInput:_,onFocus:v,inputMode:y,classNames:b,styles:x,className:C,style:w,...T}=e,{classNames:E,styles:D,getPrefixCls:O,direction:k,style:A,className:j}=ya(`otp`),M=O(`otp`,n),N={...e,length:r},[P,F]=Cf([E,b],[D,x],{props:N}),I=xi(T,{aria:!0,data:!0,attr:!0}),[L,R]=_U(M),z=Eh(e=>i??e),B=S.useContext(gy),V=iC(B.status,f),H=S.useMemo(()=>({...B,status:V,hasFeedback:!1,feedbackIcon:null}),[B,V]),U=S.useRef(null),ee=S.useRef({});S.useImperativeHandle(t,()=>({focus:()=>{ee.current[0]?.focus()},blur:()=>{for(let e=0;ec?c(e):e,[te,G]=S.useState(()=>yU(W(a||``)));S.useEffect(()=>{o!==void 0&&G(yU(o))},[o]);let ne=zn(e=>{G(e),_&&_(e),s&&e.length===r&&e.every(e=>e)&&e.some((e,t)=>te[t]!==e)&&s(e.join(``))}),K=zn((e,t)=>{let n=pa(te);for(let t=0;t=0&&!n[e];--e)n.pop();return n=yU(W(n.map(e=>e||` `).join(``))).map((e,t)=>e===` `&&!n[t]?n[t]:e),n}),re=(e,t)=>{let n=K(e,t),i=Math.min(e+t.length,r-1);i!==e&&n[e]!==void 0&&ee.current[i]?.focus(),ne(n)},ie=e=>{ee.current[e]?.focus()},ae=(e,t)=>{for(let e=0;e{let n=`otp-${t}`,i=te[t]||``;return S.createElement(S.Fragment,{key:n},S.createElement(vU,{ref:e=>{ee.current[t]=e},index:t,size:z,htmlSize:1,className:J(P.input,`${M}-input`),style:F.input,onChange:re,value:i,onActiveChange:ie,autoFocus:t===0&&p,onFocus:e=>ae(e,t),...q}),t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z`}},{tag:`path`,attrs:{d:`M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z`}}]},name:`eye-invisible`,theme:`outlined`}}))());function CU(){return CU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,CU({},e,{ref:t,icon:SU.default}))),TU=c(o((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:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`}}))());function EU(){return EU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,EU({},e,{ref:t,icon:TU.default}))),OU=e=>e?S.createElement(DU,null):S.createElement(wU,null),kU={click:`onClick`,hover:`onMouseOver`},AU=S.forwardRef((e,t)=>{let{disabled:n,action:r=`click`,visibilityToggle:i=!0,iconRender:a=OU,suffix:o}=e,s=S.useContext(mm),c=n??s,l=nf(i)&&i.visible!==void 0,[u,d]=(0,S.useState)(()=>l?i.visible:!1),f=(0,S.useRef)(null);S.useEffect(()=>{l&&d(i.visible)},[l,i]);let p=yz(f),m=()=>{if(c)return;u&&p();let e=!u;d(e),nf(i)&&i.onVisibleChange?.(e)},h=e=>{let t=kU[r]||``,n=a(u),i={[t]:m,className:`${e}-icon`,key:`passwordIcon`,onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return S.cloneElement(S.isValidElement(n)?n:S.createElement(`span`,null,n),i)},{className:g,prefixCls:_,inputPrefixCls:v,size:y,...b}=e,{getPrefixCls:x}=S.useContext(ga),C=x(`input`,v),w=x(`input-password`,_),T=i&&h(w),E=J(w,g,{[`${w}-${y}`]:!!y}),D={...gi(b,[`suffix`,`iconRender`,`visibilityToggle`]),type:u?`text`:`password`,className:E,prefixCls:C,suffix:S.createElement(S.Fragment,null,T,o)};return y&&(D.size=y),S.createElement(xz,{ref:cr(t,f),...D})}),jU=Ql([`Input`,`Search`],e=>{let{componentCls:t}=e,n=`${t}-btn`;return{[t]:{width:`100%`,[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}}),MU=S.forwardRef((e,t)=>{let{prefixCls:n,inputPrefixCls:r,className:i,size:a,style:o,enterButton:s=!1,addonAfter:c,loading:l,disabled:u,onSearch:d,onChange:f,onCompositionStart:p,onCompositionEnd:m,variant:h,onPressEnter:g,classNames:_,styles:v,hidden:y,...b}=e,{direction:x,getPrefixCls:C,classNames:w,styles:T}=ya(`inputSearch`),E={...e,enterButton:s},[D,O]=Cf([w,_],[T,v],{props:E},{button:{_default:`root`}}),k=S.useRef(!1),A=C(`input-search`,n),j=C(`input`,r),[M,N]=jU(A),{compactSize:P}=kh(A,x),F=Eh(e=>a??P??e),I=S.useRef(null),L=e=>{e?.target&&e.type===`click`&&d&&d(e.target.value,e,{source:`clear`}),f?.(e)},R=e=>{document.activeElement===I.current?.input&&e.preventDefault()},z=e=>{d&&d(I.current?.input?.value,e,{source:`input`})},B=e=>{k.current||l||(g?.(e),z(e))},V=typeof s==`boolean`?S.createElement(IC,null):null,H=`${A}-btn`,U=J(H,{[`${H}-${h}`]:h}),ee,W=s||{},te=W.type&&W.type.__ANT_BUTTON===!0;ee=te||W.type===`button`?um(W,{onMouseDown:R,onClick:e=>{W?.props?.onClick?.(e),z(e)},key:`enterButton`,...te?{className:U,size:F}:{}}):S.createElement(g_,{classNames:D.button,styles:O.button,className:U,color:s?`primary`:`default`,size:F,disabled:u,key:`enterButton`,onMouseDown:R,onClick:z,loading:l,icon:V,variant:h===`borderless`||h===`filled`||h===`underlined`?`text`:s?`solid`:void 0},s),c&&(ee=[ee,um(c,{key:`addonAfter`})]);let G=J(A,N,{[`${A}-rtl`]:x===`rtl`,[`${A}-${F}`]:!!F,[`${A}-with-button`]:!!s},i,M,D.root),ne=e=>{k.current=!0,p?.(e)},K=e=>{k.current=!1,m?.(e)},re=xi(b,{data:!0}),ie=gi({...b,classNames:gi(D,[`button`,`root`]),styles:gi(O,[`button`,`root`]),prefixCls:j,type:`search`,size:F,variant:h,onPressEnter:B,onCompositionStart:ne,onCompositionEnd:K,onChange:L,disabled:u},Object.keys(re));return S.createElement(Mh,{className:G,style:{...o,...O.root},...re,hidden:y},S.createElement(xz,{ref:cr(I,t),...ie}),ee)}),NU=` + ${r}-col-xl-24${n}-label`]:MV(e)},[`@media (max-width: ${Y(e.screenXSMax)})`]:[FV(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:MV(e)}}}],[`@media (max-width: ${Y(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:MV(e)}}},[`@media (max-width: ${Y(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:MV(e)}}},[`@media (max-width: ${Y(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:MV(e)}}}}},LV=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),RV=(e,t)=>dc(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),zV=Ql(`Form`,(e,{rootPrefixCls:t})=>{let n=RV(e,t);return[AV(n),jV(n),DV(n),NV(n),PV(n),IV(n),Gh(n),gg]},LV,{order:-1e3}),BV=[];function VV(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var HV=({help:e,helpStatus:t,errors:n=BV,warnings:r=BV,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:s}=S.useContext(py),c=`${s}-item-explain`,l=sp(s),[u,d]=zV(s,l),f=S.useMemo(()=>mh(s),[s]),p=EV(n),m=EV(r),h=S.useMemo(()=>$d(e)?[VV(e,`help`,t)]:[].concat(pa(p.map((e,t)=>VV(e,`error`,`error`,t))),pa(m.map((e,t)=>VV(e,`warning`,`warning`,t)))),[e,t,p,m]),g=S.useMemo(()=>{let e={};return h.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),h.map((t,n)=>({...t,key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[h]),_={};return a&&(_.id=`${a}_help`),S.createElement(Od,{motionDeadline:f.motionDeadline,motionName:`${s}-show-help`,visible:!!g.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return S.createElement(`div`,{..._,className:J(c,t,d,l,i,u),style:n},S.createElement(Dd,{keys:g,...mh(s),motionName:`${s}-show-help-item`,component:!1},e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return S.createElement(`div`,{key:t,className:J(i,{[`${c}-${r}`]:r}),style:a},n)}))})},UV=S.forwardRef((e,t)=>{let n=S.useContext(mm),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:s,className:c,style:l,styles:u,classNames:d,tooltip:f}=ya(`form`),{prefixCls:p,className:m,rootClassName:h,size:g,disabled:_=n,form:v,colon:y,labelAlign:b,labelWrap:x,labelCol:C,wrapperCol:w,layout:T=`horizontal`,scrollToFirstError:E,requiredMark:D,onFinishFailed:O,name:k,style:A,feedbackIcons:j,variant:M,classNames:N,styles:P,tooltip:F,...I}=e,L=Th(g),R=S.useContext(cp),z=S.useMemo(()=>D===void 0?a===void 0?!0:a:D,[D,a]),B=y??o,V={...f,...F},H=r(`form`,p),U=sp(H),[ee,W]=zV(H,U),te={...e,size:L,disabled:_,layout:T,colon:B,requiredMark:z},[G,ne]=Cf([d,N],[u,P],{props:te}),K=J(H,`${H}-${T}`,{[`${H}-hide-required-mark`]:z===!1,[`${H}-rtl`]:i===`rtl`,[`${H}-large`]:L===`large`,[`${H}-small`]:L===`small`},W,U,ee,c,m,h,G.root),[re]=AF(v),{__INTERNAL__:ie}=re;ie.name=k;let ae=S.useMemo(()=>({name:k,labelAlign:b,labelCol:C,labelWrap:x,wrapperCol:w,layout:T,colon:B,requiredMark:z,itemRef:ie.itemRef,form:re,feedbackIcons:j,tooltip:V,classNames:G,styles:ne}),[k,b,C,w,T,B,z,re,j,G,ne,V]),q=S.useRef(null);S.useImperativeHandle(t,()=>({...re,nativeElement:q.current?.nativeElement}));let oe=(e,t)=>{if(e){let n={block:`nearest`};nf(e)&&(n={...n,...e}),re.scrollToField(t,n)}},se=e=>{if(O?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(E!==void 0){oe(E,t);return}s!==void 0&&oe(s,t)}};return S.createElement(gy.Provider,{value:M},S.createElement(hm,{disabled:_},S.createElement(gm.Provider,{value:L},S.createElement(fy,{validateMessages:R},S.createElement(uy.Provider,{value:ae},S.createElement(hy,{status:!0},S.createElement(ly,{id:k,...I,name:k,onFinishFailed:se,form:re,ref:q,style:{...ne?.root,...l,...A},className:K})))))))});function WV(e){if(typeof e==`function`)return e;let t=ki(e);return t.length<=1?t[0]:t}var GV=()=>{let{status:e,errors:t=[],warnings:n=[]}=S.useContext(my);return{status:e,errors:t,warnings:n}};GV.Context=my;function KV(e){let[t,n]=S.useState(e),r=S.useRef(null),i=S.useRef([]),a=S.useRef(!1);S.useEffect(()=>(a.current=!1,()=>{a.current=!0,Oi.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=Oi(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}var qV=()=>{let{itemRef:e}=S.useContext(uy),t=S.useRef({});function n(n,r){let i=r&&typeof r==`object`&&pr(r),a=n.join(`_`);return(t.current.name!==a||t.current.originRef!==i)&&(t.current.name=a,t.current.originRef=i,t.current.ref=cr(e(n),i)),t.current.ref}return n},JV=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:`flex`}}}},YV=eu([`Form`,`item-item`],(e,{rootPrefixCls:t})=>JV(RV(e,t))),XV=24,ZV=e=>{let{prefixCls:t,status:n,labelCol:r,wrapperCol:i,children:a,errors:o,warnings:s,_internalItemRender:c,extra:l,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:p,label:m}=e,h=`${t}-item`,g=S.useContext(uy),{classNames:_,styles:v}=g,y=S.useMemo(()=>{let e={...i||g.wrapperCol||{}};return m===null&&!r&&!i&&g.labelCol&&[void 0].concat(pa(HC)).forEach(t=>{let n=t?[t]:[],r=Ai(g.labelCol,n),i=nf(r)?r:{},a=Ai(e,n),o=nf(a)?a:{};`span`in i&&!(`offset`in o)&&i.span{let{labelCol:e,wrapperCol:t,...n}=g;return n},[g]),C=S.useRef(null),[w,T]=S.useState(0);Hn(()=>{l&&C.current?T(C.current.clientHeight):T(0)},[l]);let E=S.createElement(`div`,{className:`${h}-control-input`},S.createElement(`div`,{className:J(`${h}-control-input-content`,_?.content),style:v?.content},a)),D=S.useMemo(()=>({prefixCls:t,status:n}),[t,n]),O=f!==null||o.length||s.length?S.createElement(py.Provider,{value:D},S.createElement(HV,{fieldId:d,errors:o,warnings:s,help:u,helpStatus:n,className:`${h}-explain-connected`,onVisibleChanged:p})):null,k={};d&&(k.id=`${d}_extra`);let A=l?S.createElement(`div`,{...k,className:`${h}-extra`,ref:C},l):null,j=O||A?S.createElement(`div`,{className:`${h}-additional`,style:f?{minHeight:f+w}:{}},O,A):null,M=c&&c.mark===`pro_table_render`&&c.render?c.render(e,{input:E,errorList:O,extra:A}):S.createElement(S.Fragment,null,E,j);return S.createElement(uy.Provider,{value:x},S.createElement(gR,{...y,className:b},M),S.createElement(YV,{prefixCls:t}))},QV=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`question-circle`,theme:`outlined`}}))());function $V(){return $V=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$V({},e,{ref:t,icon:QV.default}))),tH=({prefixCls:e,label:t,htmlFor:n,labelCol:r,labelAlign:i,colon:a,required:o,requiredMark:s,tooltip:c,vertical:l})=>{let[u]=Yd(`Form`),{labelAlign:d,labelCol:f,labelWrap:p,colon:m,classNames:h,styles:g,tooltip:_}=S.useContext(uy);if(!t)return null;let v=r||f||{},y=i||d,b=`${e}-item-label`,x=J(b,y===`left`&&`${b}-left`,v.className,{[`${b}-wrap`]:!!p}),C=t,w=a===!0||m!==!1&&a!==!1;w&&!l&&typeof t==`string`&&t.trim()&&(C=t.replace(/[:|:]\s*$/,``));let T=TV(c,_);if(T){let t=S.createElement(kw,{...T},S.createElement(`span`,{className:`${e}-item-tooltip`,onClick:e=>{e.preventDefault()},tabIndex:-1},T.icon||T.children||S.createElement(eH,null)));C=S.createElement(S.Fragment,null,C,t)}let E=s===`optional`,D=typeof s==`function`,O=s===!1;D?C=s(C,{required:!!o}):E&&!o&&(C=S.createElement(S.Fragment,null,C,S.createElement(`span`,{className:`${e}-item-optional`,title:``},u?.optional||Hd.Form?.optional)));let k;O?k=`hidden`:(E||D)&&(k=`optional`);let A=J(h?.label,{[`${e}-item-required`]:o,[`${e}-item-required-mark-${k}`]:k,[`${e}-item-no-colon`]:!w});return S.createElement(gR,{...v,className:x},S.createElement(`label`,{htmlFor:n,className:A,style:g?.label,title:typeof t==`string`?t:``},C))},nH={success:Tu,warning:Pu,error:Ou,validating:Ym};function rH({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:a,meta:o,noStyle:s,name:c}){let l=`${a}-item`,{feedbackIcons:u}=S.useContext(uy),d=DF(t,n,o,null,!!r,i),{isFormItemInput:f,status:p,hasFeedback:m,feedbackIcon:h,name:g}=S.useContext(my),_=S.useMemo(()=>{let e;if(r){let i=r!==!0&&r.icons||u,a=d&&i?.({status:d,errors:t,warnings:n})?.[d],o=d?nH[d]:null;e=a!==!1&&o?S.createElement(`span`,{className:J(`${l}-feedback-icon`,`${l}-feedback-icon-${d}`)},a||S.createElement(o,null)):null}let i={status:d||``,errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:e,isFormItemInput:!0,name:c};return s&&(i.status=(d??p)||``,i.isFormItemInput=f,i.hasFeedback=!!(r??m),i.feedbackIcon=r===void 0?h:i.feedbackIcon,i.name=c??g),i},[d,r,s,f,p]);return S.createElement(my.Provider,{value:_},e)}function iH(e){let{prefixCls:t,className:n,rootClassName:r,style:i,help:a,errors:o,warnings:s,validateStatus:c,meta:l,hasFeedback:u,hidden:d,children:f,fieldId:p,required:m,isRequired:h,onSubItemMetaChange:g,layout:_,name:v,...y}=e,b=`${t}-item`,{requiredMark:x,layout:C}=S.useContext(uy),w=_||C,T=w===`vertical`,E=S.useRef(null),D=EV(o),O=EV(s),k=$d(a),A=!!(k||o.length||s.length),j=!!E.current&&Ar(E.current),[M,N]=S.useState(null);Hn(()=>{if(A&&E.current){let e=getComputedStyle(E.current);N(Number.parseInt(e.marginBottom,10))}},[A,j]);let P=e=>{e||N(null)},F=((e=!1)=>DF(e?D:l.errors,e?O:l.warnings,l,``,!!u,c))(),I=J(b,n,r,{[`${b}-with-help`]:k||D.length||O.length,[`${b}-has-feedback`]:F&&u,[`${b}-has-success`]:F===`success`,[`${b}-has-warning`]:F===`warning`,[`${b}-has-error`]:F===`error`,[`${b}-is-validating`]:F===`validating`,[`${b}-hidden`]:d,[`${b}-${w}`]:w});return S.createElement(`div`,{className:I,style:i,ref:E},S.createElement(yR,{className:`${b}-row`,...gi(y,`_internalItemRender.colon.dependencies.extra.fieldKey.getValueFromEvent.getValueProps.htmlFor.id.initialValue.isListField.label.labelAlign.labelCol.labelWrap.messageVariables.name.normalize.noStyle.preserve.requiredMark.rules.shouldUpdate.trigger.tooltip.validateFirst.validateTrigger.valuePropName.wrapperCol.validateDebounce`.split(`.`))},S.createElement(tH,{htmlFor:p,...e,requiredMark:x,required:m??h,prefixCls:t,vertical:T}),S.createElement(ZV,{...e,...l,errors:D,warnings:O,prefixCls:t,status:F,help:a,marginBottom:M,onErrorVisibleChanged:P},S.createElement(dy.Provider,{value:g},S.createElement(rH,{prefixCls:t,meta:l,errors:l.errors,warnings:l.warnings,hasFeedback:u,validateStatus:F,name:v},f)))),!!M&&S.createElement(`div`,{className:`${b}-margin-offset`,style:{marginBottom:-M}}))}var aH=`__SPLIT__`;function oH(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],i=t[n];return r===i||typeof r==`function`||typeof i==`function`})}var sH=S.memo(e=>e.children,(e,t)=>oH(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function cH(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function lH(e){let{name:t,noStyle:n,className:r,dependencies:i,prefixCls:a,shouldUpdate:o,rules:s,children:c,required:l,label:u,messageVariables:d,trigger:f=`onChange`,validateTrigger:p,hidden:m,help:h,layout:g}=e,{getPrefixCls:_}=S.useContext(ga),{name:v}=S.useContext(uy),y=WV(c),b=typeof y==`function`,x=S.useContext(dy),{validateTrigger:C}=S.useContext(P_),w=$d(p)?p:C,T=$d(t),E=_(`form`,a),D=sp(E),[O,k]=zV(E,D);Gi(`Form.Item`);let A=S.useContext(F_),j=S.useRef(null),[M,N]=KV({}),[P,F]=Wn(()=>cH()),I=e=>{let t=A?.getKey(e.name);if(F(e.destroy?cH():e,!0),n&&h!==!1&&x){let n=e.name;if(e.destroy)n=j.current||n;else if(t!==void 0){let[e,r]=t;n=[e].concat(pa(r)),j.current=n}x(e,n)}},L=(e,t)=>{N(n=>{let r={...n},i=[].concat(pa(e.name.slice(0,-1)),pa(t)).join(aH);return e.destroy?delete r[i]:r[i]=e,r})},[R,z]=S.useMemo(()=>{let e=pa(P.errors),t=pa(P.warnings);return Object.values(M).forEach(n=>{e.push.apply(e,pa(n.errors||[])),t.push.apply(t,pa(n.warnings||[]))}),[e,t]},[M,P.errors,P.warnings]),B=qV();function V(i,a,o){return n&&!m?S.createElement(rH,{prefixCls:E,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:P,errors:R,warnings:z,noStyle:!0,name:t},i):S.createElement(iH,{key:`row`,...e,className:J(r,k,D,O),prefixCls:E,fieldId:a,isRequired:o,errors:R,warnings:z,meta:P,onSubItemMetaChange:L,layout:g,name:t},i)}if(!T&&!b&&!i)return V(y);let H={};return typeof u==`string`?H.label=u:t&&(H.label=String(t)),d&&(H={...H,...d}),S.createElement(Yv,{...e,messageVariables:H,trigger:f,validateTrigger:w,onMetaChange:I},(n,r,a)=>{let c=TF(t).length&&r?r.name:[],u=EF(c,v),d=l===void 0?s?.some(e=>{if(nf(e)&&e.required&&!e.warningOnly)return!0;if(typeof e==`function`){let t=e(a);return t?.required&&!t?.warningOnly}return!1}):l,p={...n},m=null;if(Array.isArray(y)&&T)m=y;else if(!(b&&(!(o||i)||T))&&!(i&&!b&&!T))if(S.isValidElement(y)){let t={...y.props,...p};if(t.id||=u,h||R.length>0||z.length>0||e.extra){let n=[];(h||R.length>0)&&n.push(`${u}_help`),e.extra&&n.push(`${u}_extra`),t[`aria-describedby`]=n.join(` `)}R.length>0&&(t[`aria-invalid`]=`true`),d&&(t[`aria-required`]=`true`),ur(y)&&(t.ref=B(c,y)),new Set([].concat(pa(TF(f)),pa(TF(w)))).forEach(e=>{t[e]=(...t)=>{p[e]?.(...t),y.props[e]?.(...t)}});let n=[t[`aria-required`],t[`aria-invalid`],t[`aria-describedby`]];m=S.createElement(sH,{control:p,update:y,childProps:n},um(y,t))}else m=b&&(o||i)&&!T?y(a):y;return V(m,u,d)})}var uH=lH;uH.useStatus=GV;var dH=({prefixCls:e,children:t,...n})=>{let{getPrefixCls:r}=S.useContext(ga),i=r(`form`,e),a=S.useMemo(()=>({prefixCls:i,status:`error`}),[i]);return S.createElement(Xv,{...n},(e,n,r)=>S.createElement(py.Provider,{value:a},t(e.map(e=>({...e,fieldKey:e.key})),n,{errors:r.errors,warnings:r.warnings})))};function fH(){let{form:e}=S.useContext(uy);return e}var pH=UV;pH.Item=uH,pH.List=dH,pH.ErrorList=HV,pH.useForm=AF,pH.useFormInstance=fH,pH.useWatch=cy,pH.Provider=fy;var mH=S.createContext(null);function hH(e){return new Promise(t=>{if(!e){t(!1);return}let n=document.createElement(`img`);n.onerror=()=>t(!1),n.onload=()=>t(!0),n.src=e})}function gH(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var _H={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function vH(e,t,n,r){let i=(0,S.useRef)(null),a=(0,S.useRef)([]),[o,s]=(0,S.useState)(_H),c=e=>{s(_H),fi(_H,o)||r?.({transform:_H,action:e})},l=(e,t)=>{i.current===null&&(a.current=[],i.current=Oi(()=>{s(e=>{let n=e;return a.current.forEach(e=>{n={...n,...e}}),i.current=null,r?.({transform:n,action:t}),n})})),a.current.push({...o,...e})};return{transform:o,resetTransform:c,updateTransform:l,dispatchZoomChange:(r,i,a,s,c)=>{let{width:u,height:d,offsetWidth:f,offsetHeight:p,offsetLeft:m,offsetTop:h}=e.current,g=r,_=o.scale*r;_>n?(_=n,g=n/o.scale):_r){if(t>0)return{[e]:a};if(t<0&&ir)return{[e]:t<0?a:-a};return{}}function bH(e,t,n,r){let{width:i,height:a}=gH(),o=null;return e<=i&&t<=a?o={x:0,y:0}:(e>i||t>a)&&(o={...yH(`x`,n,e,i),...yH(`y`,r,t,a)}),o}function xH(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),m=e=>{!t||e.button!==0||(e.preventDefault(),e.stopPropagation(),p.current={diffX:e.pageX-l,diffY:e.pageY-u,transformX:l,transformY:u},f(!0))},h=e=>{n&&d&&a({x:e.pageX-p.current.diffX,y:e.pageY-p.current.diffY},`move`)},g=()=>{if(n&&d){f(!1);let{transformX:t,transformY:n}=p.current;if(!(l!==t&&u!==n))return;let r=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:d}=e.current.getBoundingClientRect(),m=s%180!=0,h=bH(m?i:r,m?r:i,o,d);h&&a({...h},`dragRebound`)}};return(0,S.useEffect)(()=>{if(t){window.addEventListener(`mouseup`,g,!1),window.addEventListener(`mousemove`,h,!1);try{window.top!==window.self&&(window.top.addEventListener(`mouseup`,g,!1),window.top.addEventListener(`mousemove`,h,!1))}catch(e){`${e}`}}return()=>{window.removeEventListener(`mouseup`,g),window.removeEventListener(`mousemove`,h);try{window.top?.removeEventListener(`mouseup`,g),window.top?.removeEventListener(`mousemove`,h)}catch{}}},[n,d,l,u,s,t]),{isMoving:d,onMouseDown:m,onMouseMove:h,onMouseUp:g,onWheel:e=>{if(!n||e.deltaY==0)return;let t=Math.abs(e.deltaY/100),i=1+Math.min(t,1)*r;e.deltaY>0&&(i=1/i),o(i,`wheel`,e.clientX,e.clientY)}}}function SH({src:e,isCustomPlaceholder:t,fallback:n}){let[r,i]=(0,S.useState)(t?`loading`:`normal`),a=(0,S.useRef)(!1),o=r===`error`;(0,S.useEffect)(()=>{let t=!0;return hH(e).then(e=>{!e&&t&&i(`error`)}),()=>{t=!1}},[e]),(0,S.useEffect)(()=>{t&&!a.current?i(`loading`):o&&i(`normal`)},[e]);let s=()=>{i(`normal`)};return[e=>{a.current=!1,r===`loading`&&e?.complete&&(e.naturalWidth||e.naturalHeight)&&(a.current=!0,s())},o&&n?{src:n}:{onLoad:s,src:e},r]}function CH(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.hypot(n,r)}function wH(e,t,n,r){let i=CH(e,n),a=CH(t,r);if(i===0&&a===0)return[e.x,e.y];let o=i/(i+a);return[e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)]}function TH(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,S.useState)(!1),p=(0,S.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:`none`}),m=e=>{p.current={...p.current,...e}};return(0,S.useEffect)(()=>{let e=e=>{e.preventDefault()};return n&&t&&window.addEventListener(`touchmove`,e,{passive:!1}),()=>{window.removeEventListener(`touchmove`,e)}},[n,t]),{isTouching:d,onTouchStart:e=>{if(!t)return;e.stopPropagation(),f(!0);let{touches:n=[]}=e;n.length>1?m({point1:{x:n[0].clientX,y:n[0].clientY},point2:{x:n[1].clientX,y:n[1].clientY},eventType:`touchZoom`}):m({point1:{x:n[0].clientX-l,y:n[0].clientY-u},eventType:`move`})},onTouchMove:e=>{let{touches:t=[]}=e,{point1:n,point2:r,eventType:i}=p.current;if(t.length>1&&i===`touchZoom`){let e={x:t[0].clientX,y:t[0].clientY},i={x:t[1].clientX,y:t[1].clientY},[a,s]=wH(n,r,e,i);o(CH(e,i)/CH(n,r),`touchZoom`,a,s,!0),m({point1:e,point2:i,eventType:`touchZoom`})}else i===`move`&&(a({x:t[0].clientX-n.x,y:t[0].clientY-n.y},`move`),m({eventType:`move`}))},onTouchEnd:()=>{if(!n)return;if(d&&f(!1),m({eventType:`none`}),r>c)return a({x:0,y:0,scale:r},`touchZoom`);let t=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:l}=e.current.getBoundingClientRect(),u=s%180!=0,p=bH(u?i:t,u?t:i,o,l);p&&a({...p},`dragRebound`)}}}function EH(e){let{prefixCls:t,icon:n,onClick:r,className:i,style:a}=e;return S.createElement(`button`,{className:J(`${t}-close`,i),style:a,onClick:r},n)}function DH(e){let{prefixCls:t,showProgress:n,current:r,count:i,showSwitch:a,classNames:o,styles:s,icons:c,image:l,transform:u,countRender:d,actionsRender:f,scale:p,minScale:m,maxScale:h,onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onClose:w,onReset:T}=e,{left:E,right:D,prev:O,next:k,flipY:A,flipX:j,rotateLeft:M,rotateRight:N,zoomOut:P,zoomIn:F}=c,I=n&&S.createElement(`div`,{className:`${t}-progress`},d?d(r+1,i):S.createElement(`bdi`,null,`${r+1} / ${i}`)),L=`${t}-actions-action`,R=({type:e,disabled:t,onClick:n,icon:r})=>S.createElement(`button`,{type:`button`,key:e,className:J(L,`${L}-${e}`,{[`${L}-disabled`]:!!t}),onClick:n,disabled:!!t,"aria-label":e},r),z=a?R({icon:O??E,onClick:()=>g(-1),type:`prev`,disabled:r===0}):void 0,B=a?R({icon:k??D,onClick:()=>g(1),type:`next`,disabled:r===i-1}):void 0,V=R({icon:A,onClick:_,type:`flipY`}),H=R({icon:j,onClick:v,type:`flipX`}),U=R({icon:M,onClick:y,type:`rotateLeft`}),ee=R({icon:N,onClick:b,type:`rotateRight`}),W=R({icon:P,onClick:x,type:`zoomOut`,disabled:p<=m}),te=R({icon:F,onClick:C,type:`zoomIn`,disabled:p===h}),G=S.createElement(`div`,{className:J(`${t}-actions`,o.actions),style:s.actions},V,H,U,ee,W,te);return S.createElement(`div`,{className:J(`${t}-footer`,o.footer),style:s.footer},I,f?f(G,{icons:{prevIcon:z,nextIcon:B,flipYIcon:V,flipXIcon:H,rotateLeftIcon:U,rotateRightIcon:ee,zoomOutIcon:W,zoomInIcon:te},actions:{onActive:g,onFlipY:_,onFlipX:v,onRotateLeft:y,onRotateRight:b,onZoomOut:x,onZoomIn:C,onReset:T,onClose:w},transform:u,current:r,total:i,image:l}):G)}function OH(e){let{prefixCls:t,onActive:n,current:r,count:i,icons:{left:a,right:o,prev:s,next:c}}=e,l=`${t}-switch`,u=r===0,d=r===i-1;return S.createElement(S.Fragment,null,S.createElement(`button`,{className:J(l,`${l}-prev`,{[`${l}-disabled`]:u}),onClick:()=>n(-1),disabled:u},s??a),S.createElement(`button`,{type:`button`,className:J(l,`${l}-next`,{[`${l}-disabled`]:d}),onClick:()=>n(1),disabled:d},c??o))}function kH(){return kH=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[i,a]=SH({src:t,fallback:e});return S.createElement(`img`,kH({ref:e=>{n.current=e,i(e)}},r,a))},jH=e=>{let{prefixCls:t,rootClassName:n,src:r,alt:i,imageInfo:a,fallback:o,movable:s=!0,onClose:c,open:l,afterOpenChange:u,maskClosable:d=!0,icons:f={},closeIcon:p,getContainer:m,current:h=0,count:g=1,countRender:_,scaleStep:v=.5,minScale:y=1,maxScale:b=50,motionName:x=`fade`,imageRender:C,imgCommonProps:w,actionsRender:T,onTransform:E,onChange:D,classNames:O={},styles:k={},mousePosition:A,zIndex:j,focusTrap:M=!0}=e,N=(0,S.useRef)(),P=(0,S.useRef)(null),F=(0,S.useRef)(null),I=(0,S.useContext)(mH),L=I&&g>1,R=I&&g>=1,[z,B]=(0,S.useState)(!0),{transform:V,resetTransform:H,updateTransform:U,dispatchZoomChange:ee}=vH(N,y,b,E),{isMoving:W,onMouseDown:te,onWheel:G}=xH(N,s,l,v,V,U,ee),{isTouching:ne,onTouchStart:K,onTouchMove:re,onTouchEnd:ie}=TH(N,s,l,y,V,U,ee),{rotate:ae,scale:q}=V;(0,S.useEffect)(()=>{z||B(!0)},[z]),(0,S.useEffect)(()=>{l||H(`close`)},[l]);let oe=S.createElement(AH,kH({},w,{width:e.width,height:e.height,imgRef:N,className:`${t}-img`,alt:i,style:{transform:`translate3d(${V.x}px, ${V.y}px, 0) scale3d(${V.flipX?`-`:``}${q}, ${V.flipY?`-`:``}${q}, 1) rotate(${ae}deg)`,transitionDuration:(!z||ne)&&`0s`},fallback:o,src:r,onWheel:G,onMouseDown:te,onDoubleClick:e=>{l&&(q===1?ee(1+v,`doubleClick`,e.clientX,e.clientY):U({x:0,y:0,scale:1},`doubleClick`))},onTouchStart:K,onTouchMove:re,onTouchEnd:ie,onTouchCancel:ie})),se={url:r,alt:i,...a},ce=()=>{ee(1+v,`zoomIn`)},le=()=>{ee(1/(1+v),`zoomOut`)},ue=()=>{U({rotate:ae+90},`rotateRight`)},de=()=>{U({rotate:ae-90},`rotateLeft`)},fe=()=>{U({flipX:!V.flipX},`flipX`)},pe=()=>{U({flipY:!V.flipY},`flipY`)},me=()=>{H(`reset`)},he=e=>{let t=h+e;t>=0&&t<=g-1&&(B(!1),H(e<0?`prev`:`next`),D?.(t,h))},ge=zn(e=>{if(l){let{keyCode:t}=e;L&&(t===Qr.LEFT?he(-1):t===Qr.RIGHT&&he(1))}});(0,S.useEffect)(()=>{if(l)return window.addEventListener(`keydown`,ge),()=>{window.removeEventListener(`keydown`,ge)}},[l]);let[_e,ve]=(0,S.useState)(!1);S.useEffect(()=>{l&&ve(!0)},[l]);let ye=e=>{e||(ve(!1),F.current?.focus?.(),F.current=null),u?.(e)},[be,xe]=(0,S.useState)(!1);Hn(()=>{l&&xe(!0)},[l]);let Se=({top:e})=>{e&&c?.()};Hn(()=>{l&&(F.current=document.activeElement)},[l]),Gr(M&&l&&be,()=>P.current);let Ce={...k.body};return A&&(Ce.transformOrigin=`${A.x}px ${A.y}px`),S.createElement(Dp,{open:be&&l,autoDestroy:!1,getContainer:m,autoLock:_e,onEsc:Se},S.createElement(Od,{motionName:x,visible:be&&l,motionAppear:!0,motionEnter:!0,motionLeave:!0,onVisibleChanged:ye},({className:e,style:r})=>{let a={...k.root,...r};return j&&(a.zIndex=j),S.createElement(`div`,{ref:P,className:J(t,n,O.root,e,{[`${t}-movable`]:s,[`${t}-moving`]:W}),style:a,role:`dialog`,"aria-modal":`true`,"aria-label":i,tabIndex:-1},S.createElement(`div`,{className:J(`${t}-mask`,O.mask),style:k.mask,onClick:d?c:void 0}),S.createElement(`div`,{className:J(`${t}-body`,O.body),style:Ce},C?C(oe,{transform:V,image:se,...I?{current:h}:{}}):oe),p!==!1&&p!==null&&S.createElement(EH,{prefixCls:t,icon:p===!0?f.close:p||f.close,onClick:c,className:O.close,style:k.close}),L&&S.createElement(OH,{prefixCls:t,current:h,count:g,icons:f,onActive:he}),S.createElement(DH,{prefixCls:t,showProgress:R,current:h,count:g,showSwitch:L,classNames:O,styles:k,image:se,transform:V,icons:f,countRender:_,actionsRender:T,scale:q,minScale:y,maxScale:b,onActive:he,onFlipY:pe,onFlipX:fe,onRotateLeft:de,onRotateRight:ue,onZoomOut:le,onZoomIn:ce,onClose:c,onReset:me}))}))},MH=[`crossOrigin`,`decoding`,`draggable`,`loading`,`referrerPolicy`,`sizes`,`srcSet`,`useMap`,`alt`,`fetchPriority`];function NH(e){let[t,n]=S.useState({}),r=S.useCallback((e,t)=>(n(n=>({...n,[e]:t})),()=>{n(t=>{let n={...t};return delete n[e],n})}),[]);return[S.useMemo(()=>e?e.map(e=>{if(typeof e==`string`)return{data:{src:e}};let t={};return Object.keys(e).forEach(n=>{[`src`,...MH].includes(n)&&(t[n]=e[n])}),{data:t}}):Object.keys(t).reduce((e,n)=>{let{canPreview:r,data:i}=t[n];return r&&e.push({data:i,id:n}),e},[]),[e,t]),r,!!e]}function PH(){return PH=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{open:c,onOpenChange:l,current:u,onChange:d,...f}=o&&typeof o==`object`?o:{},[p,m,h]=NH(a),[g,_]=Gn(0,u),[v,y]=(0,S.useState)(!1),{src:b,...x}=p[g]?.data||{},[C,w]=Gn(!!c,c),T=zn(e=>{w(e),e!==C&&l?.(e,{current:g})}),[E,D]=(0,S.useState)(null),O=S.useCallback((e,t,n,r)=>{let i=h?p.findIndex(e=>e.data.src===t):p.findIndex(t=>t.id===e);_(i<0?0:i),T(!0),D({x:n,y:r}),y(!0)},[p,h]);S.useEffect(()=>{C?v||_(0):y(!1)},[C]);let k=(e,t)=>{_(e),d?.(e,t)},A=()=>{T(!1),D(null)},j=S.useMemo(()=>({register:m,onPreview:O}),[m,O]);return S.createElement(mH.Provider,{value:j},r,S.createElement(jH,PH({"aria-hidden":!C,open:C,prefixCls:e,onClose:A,mousePosition:E,imgCommonProps:x,src:b,fallback:s,icons:i,current:g,count:p.length,onChange:k},f,{classNames:t?.popup,styles:n?.popup})))},IH=0;function LH(e,t){let[n]=S.useState(()=>(IH+=1,String(IH))),r=S.useContext(mH),i={data:t,canPreview:e};return S.useEffect(()=>{if(r)return r.register(n,i)},[]),S.useEffect(()=>{r&&r.register(n,i)},[e,t]),n}function RH(){return RH=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-image`,previewPrefixCls:n=`${t}-preview`,rootClassName:r,className:i,style:a,classNames:o={},styles:s={},width:c,height:l,src:u,alt:d,placeholder:f,fallback:p,preview:m=!0,onClick:h,onError:g,onKeyDown:_,...v}=e,y=(0,S.useContext)(mH),b=!!m,{src:x,open:C,onOpenChange:w,cover:T,rootClassName:E,...D}=m&&typeof m==`object`?m:{},O=typeof T==`object`&&T.placement&&T.placement||`center`,k=typeof T==`object`&&T.coverNode?T.coverNode:T,[A,j]=Gn(!!C,C),[M,N]=(0,S.useState)(null),P=e=>{j(e),w?.(e)},F=()=>{P(!1)},I=f&&f!==!0,L=x??u,[R,z,B]=SH({src:u,isCustomPlaceholder:I,fallback:p}),V=(0,S.useMemo)(()=>{let t={};return MH.forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t},MH.map(t=>e[t])),H=LH(b,(0,S.useMemo)(()=>({...V,src:L}),[L,V])),U=e=>{let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0)),h?.(e)},ee=e=>{if(_?.(e),b&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;y?y.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0))}};return S.createElement(S.Fragment,null,S.createElement(`div`,RH({},v,{className:J(t,r,o.root,{[`${t}-error`]:B===`error`}),onClick:b?U:h,role:b?`button`:v.role,tabIndex:b&&v.tabIndex==null?0:v.tabIndex,"aria-label":b?v[`aria-label`]??d:v[`aria-label`],onKeyDown:ee,style:{width:c,height:l,...s.root}}),S.createElement(`img`,RH({},V,{className:J(`${t}-img`,{[`${t}-img-placeholder`]:f===!0},o.image,i),style:{height:l,...s.image,...a},ref:R},z,{width:c,height:l,onError:g})),B===`loading`&&S.createElement(`div`,{"aria-hidden":`true`,className:`${t}-placeholder`},f),T!==!1&&b&&S.createElement(`div`,{className:J(`${t}-cover`,o.cover,`${t}-cover-${O}`),style:{display:a?.display===`none`?`none`:void 0,...s.cover}},k)),!y&&b&&S.createElement(jH,RH({"aria-hidden":!A,open:A,prefixCls:n,onClose:F,mousePosition:M,src:L,alt:d,imageInfo:{width:c,height:l},fallback:p,imgCommonProps:V},D,{classNames:o?.popup,styles:s?.popup,rootClassName:J(E,r)})))};zH.PreviewGroup=FH;var BH=zH,VH=(e,t,n,r,i,a,o)=>{let[s]=Lf(`ImagePreview`,e?.zIndex),[c,l]=gf(e?.mask,t?.mask,`${n}-preview`);return S.useMemo(()=>{if(!e)return e;let{cover:u,getContainer:d,closeIcon:f,rootClassName:p}=e,{closeIcon:m}=t??{};return{motionName:hh(`${n}-preview`,`fade`),...e,...o?{cover:u??o}:{},icons:a,getContainer:d??i,zIndex:s,closeIcon:f??m,rootClassName:J(r,p),mask:c,blurClassName:l.mask}},[e,t,n,r,i,o,a,s,c,l])};function HH(e){return(0,S.isValidElement)(e)?[e,void 0]:typeof e==`boolean`||nf(e)?[void 0,e]:[void 0,void 0]}function UH(e){let t=(0,S.useMemo)(()=>typeof e==`boolean`?e?{}:null:nf(e)?e:{},[e]);return(0,S.useMemo)(()=>{if(!t)return[t,``,``];let{open:e,onOpenChange:n,cover:r,actionsRender:i,visible:a,onVisibleChange:o,rootClassName:s,maskClassName:c,mask:l,forceRender:u,destroyOnClose:d,toolbarRender:f,...p}=t,m;n?m=n:o&&(m=(e,t)=>{let{current:n}=t||{};n===void 0?o(e,!e):o(e,!e,n)});let[h,g]=HH(l);return[{...p,open:e??a,onOpenChange:m,cover:r??h,mask:g,actionsRender:i??f},s,c]},[t])}var WH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z`}},{tag:`path`,attrs:{d:`M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z`}}]},name:`rotate-left`,theme:`outlined`}}))());function GH(){return GH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,GH({},e,{ref:t,icon:WH.default}))),qH=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z`}},{tag:`path`,attrs:{d:`M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z`}}]},name:`rotate-right`,theme:`outlined`}}))());function JH(){return JH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,JH({},e,{ref:t,icon:qH.default}))),XH=c(o((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:`M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`swap`,theme:`outlined`}}))());function ZH(){return ZH=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,ZH({},e,{ref:t,icon:XH.default}))),$H=c(o((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:`M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-in`,theme:`outlined`}}))());function eU(){return eU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,eU({},e,{ref:t,icon:$H.default}))),nU=c(o((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:`M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z`}}]},name:`zoom-out`,theme:`outlined`}}))());function rU(){return rU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,rU({},e,{ref:t,icon:nU.default}))),aU=e=>({position:e||`absolute`,inset:0}),oU=e=>{let{componentCls:t,motionDurationSlow:n,colorTextLightSolid:r}=e;return{[t]:{[`${t}-cover`]:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,color:r,background:new Nc(`#000`).setA(.3).toRgbString(),cursor:`pointer`,opacity:0,transition:`opacity ${n}`},"&:hover, &:focus-visible":{[`${t}-cover`]:{opacity:1}},[`${t}-cover-top`]:{inset:`0 0 auto 0`,justifyContent:`center`},[`${t}-cover-bottom`]:{inset:`auto 0 0 0`,justifyContent:`center`}}}},sU=e=>{let{motionEaseOut:t,previewCls:n,motionDurationSlow:r,componentCls:i,colorBgMask:a,marginXL:o,marginSM:s,margin:c,colorTextLightSolid:l,paddingSM:u,paddingLG:d,previewOperationHoverColor:f,previewOperationColorDisabled:p,previewOperationSize:m,zIndexPopup:h}=e,g=new Nc(a).setA(.1),_=g.clone().setA(.2),v={position:`absolute`,color:l,backgroundColor:g.toRgbString(),borderRadius:`50%`,padding:u,outline:0,border:0,cursor:`pointer`,transition:`all ${r}`,display:`flex`,fontSize:m,"&:hover":{backgroundColor:_.toRgbString()},"&:active":{backgroundColor:g.toRgbString()},"&:focus-visible":Kl(e)};return{[`${i}-preview`]:{textAlign:`center`,inset:0,position:`fixed`,userSelect:`none`,zIndex:h,[`${n}-mask`]:{inset:0,position:`absolute`,background:a,backdropFilter:`blur(0px)`,transition:`backdrop-filter ${r}`,[`&${i}-preview-mask-blur`]:{backdropFilter:`blur(4px)`},[`&${i}-preview-mask-hidden`]:{display:`none`}},[`${n}-body`]:{...aU(),"pointer-events":`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,"> *":{pointerEvents:`auto`}},[`${n}-img`]:{maxWidth:`100%`,maxHeight:`70%`,verticalAlign:`middle`,transform:`scale3d(1, 1, 1)`,transition:`transform ${r} ${t} 0s`},[`&-movable ${n}-img`]:{cursor:`grab`},[`&-moving ${n}-img`]:{cursor:`grabbing`},[`${n}-close`]:{...v,top:s,insetInlineEnd:s},[`${n}-switch`]:{...v,top:`50%`,transform:`translateY(-50%)`,"&-disabled":{"&, &:hover, &:active":{color:p,background:`transparent`,cursor:`not-allowed`}},"&-prev":{insetInlineStart:s},"&-next":{insetInlineEnd:s}},[`${n}-footer`]:{position:`absolute`,bottom:o,left:{_skip_check_:!0,value:`50%`},display:`flex`,flexDirection:`column`,alignItems:`center`,color:e.previewOperationColor,transform:`translateX(-50%)`,gap:c},[`${n}-actions`]:{display:`flex`,gap:u,padding:`0 ${Y(d)}`,backgroundColor:g.toRgbString(),borderRadius:100,fontSize:m,"&-action":{color:`inherit`,background:`transparent`,border:0,font:`inherit`,padding:u,cursor:`pointer`,transition:`all ${r}`,display:`flex`,[`&:not(${n}-actions-action-disabled):hover`]:{color:f},"&:focus-visible":Kl(e),"&-disabled":{color:p,cursor:`not-allowed`}}}}}},cU=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,display:`inline-block`,...ql(e),[`${t}-img`]:{width:`100%`,height:`auto`,verticalAlign:`middle`},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:`url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')`,backgroundRepeat:`no-repeat`,backgroundPosition:`center center`,backgroundSize:`30%`},[`${t}-placeholder`]:{...aU()}}}},lU=e=>{let{previewCls:t,motionDurationSlow:n}=e;return{[t]:{"&-fade":{transition:`opacity ${n}`,"&-enter, &-appear":{opacity:0,[`${t}-body`]:{transform:`scale(0)`},"&-active":{opacity:1,[`${t}-body`]:{transform:`scale(1)`,transition:`transform ${n}`}}},"&-leave":{opacity:1,"&-active":{opacity:0,[`${t}-body`]:{transform:`scale(0)`,transition:`transform ${n}`}}}}}}},uU=Ql(`Image`,e=>{let t=dc(e,{previewCls:`${e.componentCls}-preview`,imagePreviewSwitchSize:e.controlHeightLG});return[cU(t),oU(t),sU(t),lU(t)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new Nc(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new Nc(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new Nc(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),dU={rotateLeft:S.createElement(KH,null),rotateRight:S.createElement(YH,null),zoomIn:S.createElement(tU,null),zoomOut:S.createElement(iU,null),close:S.createElement(ju,null),left:S.createElement(Uw,null),right:S.createElement(Bg,null),flipX:S.createElement(QH,null),flipY:S.createElement(QH,{rotate:90})},fU=({previewPrefixCls:e,preview:t,classNames:n,styles:r,...i})=>{let{getPrefixCls:a,getPopupContainer:o,direction:s,preview:c,classNames:l,styles:u}=ya(`image`),d=a(`image`,e),f=`${d}-preview`,p=sp(d),[m,h]=uU(d,p),g=J(m,h,p),[_,v,y]=UH(t),[b,x,C]=UH(c),w=S.useMemo(()=>({...dU,left:s===`rtl`?S.createElement(Bg,null):S.createElement(Uw,null),right:s===`rtl`?S.createElement(Uw,null):S.createElement(Bg,null)}),[s]),T=VH(_,b,d,g,o,dU),{mask:E,blurClassName:D}=T??{},O={...i,classNames:n,styles:r},[k,A]=Cf([l,n,{cover:J(C,y),popup:{root:J(x,v),mask:J({[`${d}-preview-mask-hidden`]:!E},D)}}],[u,r],{props:O},{popup:{_default:`root`}});return S.createElement(BH.PreviewGroup,{preview:T,previewPrefixCls:f,icons:w,...i,classNames:k,styles:A})},pU=e=>{let{prefixCls:t,preview:n,className:r,rootClassName:i,style:a,styles:o,classNames:s,wrapperStyle:c,fallback:l,...u}=e,{getPrefixCls:d,getPopupContainer:f,className:p,style:m,preview:h,styles:g,classNames:_,fallback:v}=ya(`image`),y=d(`image`,t),b=sp(y),[x,C]=uU(y,b),w=J(i,x,C,b),T=J(r,x,p),[E,D,O]=UH(n),[k,A,j]=UH(h),M=VH(E,k,y,w,f,dU,!0),N={...e,preview:M},P=S.useMemo(()=>({cover:J(j,O),popup:{root:J(A,D)}}),[D,O,A,j]),{mask:F,blurClassName:I}=M??{},L=S.useMemo(()=>({mask:J({[`${y}-preview-mask-hidden`]:!F},I)}),[F,y,I]),[R,z]=Cf(S.useMemo(()=>[_,s,P,{popup:L}],[_,s,P,L]),[g,{root:c},o],{props:N},{popup:{_default:`root`}}),B={...m,...a},V=l??v;return S.createElement(BH,{prefixCls:y,preview:M||!1,rootClassName:w,className:T,style:B,fallback:V,...u,classNames:R,styles:z})};pU.PreviewGroup=fU;var mU=e=>{let{getPrefixCls:t,direction:n}=(0,S.useContext)(ga),{prefixCls:r,className:i}=e,a=t(`input-group`,r),[o,s]=SI(t(`input`)),c=J(a,s,{[`${a}-lg`]:e.size===`large`,[`${a}-sm`]:e.size===`small`,[`${a}-compact`]:e.compact,[`${a}-rtl`]:n===`rtl`},o,i),l=(0,S.useContext)(my),u=(0,S.useMemo)(()=>({...l,isFormItemInput:!1}),[l]);return S.createElement(my.Provider,{value:u},S.createElement(yV.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},hU=e=>{let{componentCls:t,paddingXS:n}=e;return{[t]:{display:`inline-flex`,alignItems:`center`,flexWrap:`nowrap`,columnGap:n,[`${t}-input-wrapper`]:{position:`relative`,[`${t}-mask-icon`]:{position:`absolute`,zIndex:`1`,top:`50%`,right:`50%`,transform:`translate(50%, -50%)`,pointerEvents:`none`},[`${t}-mask-input`]:{color:`transparent`,caretColor:e.colorText,"&::selection":{color:`transparent`}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":`none`,margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":`textfield`}},"&-rtl":{direction:`rtl`},[`${t}-input`]:{textAlign:`center`,paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},gU=Ql([`Input`,`OTP`],e=>hU(dc(e,qF(e))),JF),_U=S.forwardRef((e,t)=>{let{className:n,value:r,onChange:i,onActiveChange:a,index:o,mask:s,onFocus:c,...l}=e,{getPrefixCls:u}=S.useContext(ga),d=u(`otp`),f=typeof s==`string`?s:r,p=S.useRef(null);S.useImperativeHandle(t,()=>p.current);let m=e=>{i(o,e.target.value)},h=()=>{Oi(()=>{let e=p.current?.input;document.activeElement===e&&e&&e.select()})},g=e=>{c?.(e),h()},_=e=>{let{key:t,ctrlKey:n,metaKey:i}=e;t===`ArrowLeft`?a(o-1):t===`ArrowRight`?a(o+1):t===`z`&&(n||i)?e.preventDefault():t===`Backspace`&&!r&&a(o-1),h()};return S.createElement(`span`,{className:`${d}-input-wrapper`,role:`presentation`},s&&r!==``&&r!==void 0&&S.createElement(`span`,{className:`${d}-mask-icon`,"aria-hidden":`true`},f),S.createElement(bz,{"aria-label":`OTP Input ${o+1}`,type:s===!0?`password`:`text`,...l,ref:p,value:r,onInput:m,onFocus:g,onKeyDown:_,onMouseDown:h,onMouseUp:h,className:J(n,{[`${d}-mask-input`]:s})}))});function vU(e){return(e||``).split(``)}var yU=e=>{let{index:t,prefixCls:n,separator:r,className:i,style:a}=e,o=typeof r==`function`?r(t):r;return o?S.createElement(`span`,{className:J(`${n}-separator`,i),style:a},o):null},bU=S.forwardRef((e,t)=>{let{prefixCls:n,length:r=6,size:i,defaultValue:a,value:o,onChange:s,formatter:c,separator:l,variant:u,disabled:d,status:f,autoFocus:p,mask:m,type:h,autoComplete:g,onInput:_,onFocus:v,inputMode:y,classNames:b,styles:x,className:C,style:w,...T}=e,{classNames:E,styles:D,getPrefixCls:O,direction:k,style:A,className:j}=ya(`otp`),M=O(`otp`,n),N={...e,length:r},[P,F]=Cf([E,b],[D,x],{props:N}),I=xi(T,{aria:!0,data:!0,attr:!0}),[L,R]=gU(M),z=Th(e=>i??e),B=S.useContext(my),V=nC(B.status,f),H=S.useMemo(()=>({...B,status:V,hasFeedback:!1,feedbackIcon:null}),[B,V]),U=S.useRef(null),ee=S.useRef({});S.useImperativeHandle(t,()=>({focus:()=>{ee.current[0]?.focus()},blur:()=>{for(let e=0;ec?c(e):e,[te,G]=S.useState(()=>vU(W(a||``)));S.useEffect(()=>{o!==void 0&&G(vU(o))},[o]);let ne=zn(e=>{G(e),_&&_(e),s&&e.length===r&&e.every(e=>e)&&e.some((e,t)=>te[t]!==e)&&s(e.join(``))}),K=zn((e,t)=>{let n=pa(te);for(let t=0;t=0&&!n[e];--e)n.pop();return n=vU(W(n.map(e=>e||` `).join(``))).map((e,t)=>e===` `&&!n[t]?n[t]:e),n}),re=(e,t)=>{let n=K(e,t),i=Math.min(e+t.length,r-1);i!==e&&n[e]!==void 0&&ee.current[i]?.focus(),ne(n)},ie=e=>{ee.current[e]?.focus()},ae=(e,t)=>{for(let e=0;e{let n=`otp-${t}`,i=te[t]||``;return S.createElement(S.Fragment,{key:n},S.createElement(_U,{ref:e=>{ee.current[t]=e},index:t,size:z,htmlSize:1,className:J(P.input,`${M}-input`),style:F.input,onChange:re,value:i,onActiveChange:ie,autoFocus:t===0&&p,onFocus:e=>ae(e,t),...q}),t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z`}},{tag:`path`,attrs:{d:`M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z`}}]},name:`eye-invisible`,theme:`outlined`}}))());function SU(){return SU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,SU({},e,{ref:t,icon:xU.default}))),wU=c(o((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:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`}}))());function TU(){return TU=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,TU({},e,{ref:t,icon:wU.default}))),DU=e=>e?S.createElement(EU,null):S.createElement(CU,null),OU={click:`onClick`,hover:`onMouseOver`},kU=S.forwardRef((e,t)=>{let{disabled:n,action:r=`click`,visibilityToggle:i=!0,iconRender:a=DU,suffix:o}=e,s=S.useContext(mm),c=n??s,l=nf(i)&&i.visible!==void 0,[u,d]=(0,S.useState)(()=>l?i.visible:!1),f=(0,S.useRef)(null);S.useEffect(()=>{l&&d(i.visible)},[l,i]);let p=vz(f),m=()=>{if(c)return;u&&p();let e=!u;d(e),nf(i)&&i.onVisibleChange?.(e)},h=e=>{let t=OU[r]||``,n=a(u),i={[t]:m,className:`${e}-icon`,key:`passwordIcon`,onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return S.cloneElement(S.isValidElement(n)?n:S.createElement(`span`,null,n),i)},{className:g,prefixCls:_,inputPrefixCls:v,size:y,...b}=e,{getPrefixCls:x}=S.useContext(ga),C=x(`input`,v),w=x(`input-password`,_),T=i&&h(w),E=J(w,g,{[`${w}-${y}`]:!!y}),D={...gi(b,[`suffix`,`iconRender`,`visibilityToggle`]),type:u?`text`:`password`,className:E,prefixCls:C,suffix:S.createElement(S.Fragment,null,T,o)};return y&&(D.size=y),S.createElement(bz,{ref:cr(t,f),...D})}),AU=Ql([`Input`,`Search`],e=>{let{componentCls:t}=e,n=`${t}-btn`;return{[t]:{width:`100%`,[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}}),jU=S.forwardRef((e,t)=>{let{prefixCls:n,inputPrefixCls:r,className:i,size:a,style:o,enterButton:s=!1,addonAfter:c,loading:l,disabled:u,onSearch:d,onChange:f,onCompositionStart:p,onCompositionEnd:m,variant:h,onPressEnter:g,classNames:_,styles:v,hidden:y,...b}=e,{direction:x,getPrefixCls:C,classNames:w,styles:T}=ya(`inputSearch`),E={...e,enterButton:s},[D,O]=Cf([w,_],[T,v],{props:E},{button:{_default:`root`}}),k=S.useRef(!1),A=C(`input-search`,n),j=C(`input`,r),[M,N]=AU(A),{compactSize:P}=Oh(A,x),F=Th(e=>a??P??e),I=S.useRef(null),L=e=>{e?.target&&e.type===`click`&&d&&d(e.target.value,e,{source:`clear`}),f?.(e)},R=e=>{document.activeElement===I.current?.input&&e.preventDefault()},z=e=>{d&&d(I.current?.input?.value,e,{source:`input`})},B=e=>{k.current||l||(g?.(e),z(e))},V=typeof s==`boolean`?S.createElement(PC,null):null,H=`${A}-btn`,U=J(H,{[`${H}-${h}`]:h}),ee,W=s||{},te=W.type&&W.type.__ANT_BUTTON===!0;ee=te||W.type===`button`?um(W,{onMouseDown:R,onClick:e=>{W?.props?.onClick?.(e),z(e)},key:`enterButton`,...te?{className:U,size:F}:{}}):S.createElement(h_,{classNames:D.button,styles:O.button,className:U,color:s?`primary`:`default`,size:F,disabled:u,key:`enterButton`,onMouseDown:R,onClick:z,loading:l,icon:V,variant:h===`borderless`||h===`filled`||h===`underlined`?`text`:s?`solid`:void 0},s),c&&(ee=[ee,um(c,{key:`addonAfter`})]);let G=J(A,N,{[`${A}-rtl`]:x===`rtl`,[`${A}-${F}`]:!!F,[`${A}-with-button`]:!!s},i,M,D.root),ne=e=>{k.current=!0,p?.(e)},K=e=>{k.current=!1,m?.(e)},re=xi(b,{data:!0}),ie=gi({...b,classNames:gi(D,[`button`,`root`]),styles:gi(O,[`button`,`root`]),prefixCls:j,type:`search`,size:F,variant:h,onPressEnter:B,onCompositionStart:ne,onCompositionEnd:K,onChange:L,disabled:u},Object.keys(re));return S.createElement(jh,{className:G,style:{...o,...O.root},...re,hidden:y},S.createElement(bz,{ref:cr(I,t),...ie}),ee)}),MU=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -315,10 +315,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top:0 !important; right:0 !important; pointer-events: none !important; -`,PU=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],FU={},IU;function LU(e,t=!1){let n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&FU[n])return FU[n];let r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:PU.map(e=>`${e}:${r.getPropertyValue(e)}`).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(FU[n]=s),s}function RU(e,t=!1,n=null,r=null){IU||(IU=document.createElement(`textarea`),IU.setAttribute(`tab-index`,`-1`),IU.setAttribute(`aria-hidden`,`true`),IU.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(IU)),e.getAttribute(`wrap`)?IU.setAttribute(`wrap`,e.getAttribute(`wrap`)):IU.removeAttribute(`wrap`);let{paddingSize:i,borderSize:a,boxSizing:o,sizingStyle:s}=LU(e,t);IU.setAttribute(`style`,`${s};${NU}`),IU.value=e.value||e.placeholder||``;let c,l,u,d=IU.scrollHeight;if(o===`border-box`?d+=a:o===`content-box`&&(d-=i),n!==null||r!==null){IU.value=` `;let e=IU.scrollHeight-i;n!==null&&(c=e*n,o===`border-box`&&(c=c+i+a),d=Math.max(c,d)),r!==null&&(l=e*r,o===`border-box`&&(l=l+i+a),u=d>l?``:`hidden`,d=Math.min(l,d))}let f={height:d,overflowY:u,resize:`none`};return c&&(f.minHeight=c),l&&(f.maxHeight=l),f}function zU(){return zU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,defaultValue:r,value:i,autoSize:a,onResize:o,className:s,style:c,disabled:l,onChange:u,onInternalAutoSize:d,...f}=e,[p,m]=Gn(r,i),h=p??``,g=e=>{m(e.target.value),u?.(e)},_=S.useRef();S.useImperativeHandle(t,()=>({textArea:_.current}));let[v,y]=S.useMemo(()=>a&&typeof a==`object`?[a.minRows,a.maxRows]:[],[a]),b=!!a,[x,C]=S.useState(HU),[w,T]=S.useState(),E=()=>{C(BU)};Hn(()=>{b&&E()},[i,v,y,b]),Hn(()=>{if(x===BU)C(VU);else if(x===VU){let e=RU(_.current,!1,v,y);C(HU),T(e)}},[x]);let D=S.useRef(),O=()=>{Oi.cancel(D.current)},k=e=>{x===HU&&(o?.(e),a&&(O(),D.current=Oi(()=>{E()})))};S.useEffect(()=>O,[]);let A=b?w:null,j={...c,...A};return(x===BU||x===VU)&&(j.overflowY=`hidden`,j.overflowX=`hidden`),S.createElement(oa,{onResize:k,disabled:!(a||o)},S.createElement(`textarea`,zU({},f,{ref:_,style:j,className:J(n,s,{[`${n}-disabled`]:l}),disabled:l,value:h,onChange:g})))});function WU(){return WU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[O,k]=Gn(e,t),A=O==null?``:String(O),[j,M]=S.useState(!1),N=S.useRef(!1),[P,F]=S.useState(null),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=()=>L.current?.textArea,z=()=>{R().focus()};(0,S.useImperativeHandle)(D,()=>({resizableTextArea:L.current,focus:z,blur:()=>{R().blur()},nativeElement:I.current?.nativeElement||R()})),(0,S.useEffect)(()=>{M(e=>!h&&e)},[h]);let[B,V]=S.useState(null);S.useEffect(()=>{B&&R().setSelectionRange(...B)},[B]);let H=hz(f,d),U=H.max??o,ee=Number(U)>0,W=H.strategy(A),te=!!U&&W>U,G=(e,t)=>{let n=t;!N.current&&H.exceedFormatter&&H.max&&H.strategy(t)>H.max&&(n=H.exceedFormatter(t,{max:H.max}),t!==n&&V([R().selectionStart||0,R().selectionEnd||0])),k(n),fz(e.currentTarget,e,i,n)},ne=e=>{N.current=!0,s?.(e)},K=e=>{N.current=!1,G(e,e.currentTarget.value),c?.(e)},re=e=>{G(e,e.target.value)},ie=e=>{e.key===`Enter`&&x&&!e.nativeEvent.isComposing&&x(e),T?.(e)},ae=e=>{M(!0),n?.(e)},q=e=>{M(!1),r?.(e)},oe=e=>{k(``),z(),fz(R(),e,i)},se=l,ce;H.show&&(ce=H.showFormatter?H.showFormatter({value:A,count:W,maxLength:U}):`${W}${ee?` / ${U}`:``}`,se=S.createElement(S.Fragment,null,se,S.createElement(`span`,{className:J(`${u}-data-count`,_?.count),style:v?.count},ce)));let le=e=>{y?.(e),R()?.style.height&&F(!0)},ue=!w&&!d&&!a;return S.createElement(mz,{ref:I,value:A,allowClear:a,handleReset:oe,suffix:se,prefixCls:u,classNames:{..._,affixWrapper:J(_?.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:a})},disabled:h,focused:j,className:J(p,te&&`${u}-out-of-range`),style:{...m,...P&&!ue?{height:`auto`}:{}},dataAttrs:{affixWrapper:{"data-count":typeof ce==`string`?ce:void 0}},hidden:g,readOnly:C,onClear:b},S.createElement(UU,WU({},E,{autoSize:w,maxLength:o,onKeyDown:ie,onChange:re,onFocus:ae,onBlur:q,onCompositionStart:ne,onCompositionEnd:K,className:J(_?.textarea),style:{resize:m?.resize,...v?.textarea},disabled:h,prefixCls:u,onResize:le,ref:L,readOnly:C})))}),KU=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` +`,NU=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],PU={},FU;function IU(e,t=!1){let n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&PU[n])return PU[n];let r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:NU.map(e=>`${e}:${r.getPropertyValue(e)}`).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(PU[n]=s),s}function LU(e,t=!1,n=null,r=null){FU||(FU=document.createElement(`textarea`),FU.setAttribute(`tab-index`,`-1`),FU.setAttribute(`aria-hidden`,`true`),FU.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(FU)),e.getAttribute(`wrap`)?FU.setAttribute(`wrap`,e.getAttribute(`wrap`)):FU.removeAttribute(`wrap`);let{paddingSize:i,borderSize:a,boxSizing:o,sizingStyle:s}=IU(e,t);FU.setAttribute(`style`,`${s};${MU}`),FU.value=e.value||e.placeholder||``;let c,l,u,d=FU.scrollHeight;if(o===`border-box`?d+=a:o===`content-box`&&(d-=i),n!==null||r!==null){FU.value=` `;let e=FU.scrollHeight-i;n!==null&&(c=e*n,o===`border-box`&&(c=c+i+a),d=Math.max(c,d)),r!==null&&(l=e*r,o===`border-box`&&(l=l+i+a),u=d>l?``:`hidden`,d=Math.min(l,d))}let f={height:d,overflowY:u,resize:`none`};return c&&(f.minHeight=c),l&&(f.maxHeight=l),f}function RU(){return RU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,defaultValue:r,value:i,autoSize:a,onResize:o,className:s,style:c,disabled:l,onChange:u,onInternalAutoSize:d,...f}=e,[p,m]=Gn(r,i),h=p??``,g=e=>{m(e.target.value),u?.(e)},_=S.useRef();S.useImperativeHandle(t,()=>({textArea:_.current}));let[v,y]=S.useMemo(()=>a&&typeof a==`object`?[a.minRows,a.maxRows]:[],[a]),b=!!a,[x,C]=S.useState(VU),[w,T]=S.useState(),E=()=>{C(zU)};Hn(()=>{b&&E()},[i,v,y,b]),Hn(()=>{if(x===zU)C(BU);else if(x===BU){let e=LU(_.current,!1,v,y);C(VU),T(e)}},[x]);let D=S.useRef(),O=()=>{Oi.cancel(D.current)},k=e=>{x===VU&&(o?.(e),a&&(O(),D.current=Oi(()=>{E()})))};S.useEffect(()=>O,[]);let A=b?w:null,j={...c,...A};return(x===zU||x===BU)&&(j.overflowY=`hidden`,j.overflowX=`hidden`),S.createElement(oa,{onResize:k,disabled:!(a||o)},S.createElement(`textarea`,RU({},f,{ref:_,style:j,className:J(n,s,{[`${n}-disabled`]:l}),disabled:l,value:h,onChange:g})))});function UU(){return UU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[O,k]=Gn(e,t),A=O==null?``:String(O),[j,M]=S.useState(!1),N=S.useRef(!1),[P,F]=S.useState(null),I=(0,S.useRef)(null),L=(0,S.useRef)(null),R=()=>L.current?.textArea,z=()=>{R().focus()};(0,S.useImperativeHandle)(D,()=>({resizableTextArea:L.current,focus:z,blur:()=>{R().blur()},nativeElement:I.current?.nativeElement||R()})),(0,S.useEffect)(()=>{M(e=>!h&&e)},[h]);let[B,V]=S.useState(null);S.useEffect(()=>{B&&R().setSelectionRange(...B)},[B]);let H=mz(f,d),U=H.max??o,ee=Number(U)>0,W=H.strategy(A),te=!!U&&W>U,G=(e,t)=>{let n=t;!N.current&&H.exceedFormatter&&H.max&&H.strategy(t)>H.max&&(n=H.exceedFormatter(t,{max:H.max}),t!==n&&V([R().selectionStart||0,R().selectionEnd||0])),k(n),dz(e.currentTarget,e,i,n)},ne=e=>{N.current=!0,s?.(e)},K=e=>{N.current=!1,G(e,e.currentTarget.value),c?.(e)},re=e=>{G(e,e.target.value)},ie=e=>{e.key===`Enter`&&x&&!e.nativeEvent.isComposing&&x(e),T?.(e)},ae=e=>{M(!0),n?.(e)},q=e=>{M(!1),r?.(e)},oe=e=>{k(``),z(),dz(R(),e,i)},se=l,ce;H.show&&(ce=H.showFormatter?H.showFormatter({value:A,count:W,maxLength:U}):`${W}${ee?` / ${U}`:``}`,se=S.createElement(S.Fragment,null,se,S.createElement(`span`,{className:J(`${u}-data-count`,_?.count),style:v?.count},ce)));let le=e=>{y?.(e),R()?.style.height&&F(!0)},ue=!w&&!d&&!a;return S.createElement(pz,{ref:I,value:A,allowClear:a,handleReset:oe,suffix:se,prefixCls:u,classNames:{..._,affixWrapper:J(_?.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:a})},disabled:h,focused:j,className:J(p,te&&`${u}-out-of-range`),style:{...m,...P&&!ue?{height:`auto`}:{}},dataAttrs:{affixWrapper:{"data-count":typeof ce==`string`?ce:void 0}},hidden:g,readOnly:C,onClear:b},S.createElement(HU,UU({},E,{autoSize:w,maxLength:o,onKeyDown:ie,onChange:re,onFocus:ae,onBlur:q,onCompositionStart:ne,onCompositionEnd:K,className:J(_?.textarea),style:{resize:m?.resize,...v?.textarea},disabled:h,prefixCls:u,onResize:le,ref:L,readOnly:C})))}),GU=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` &-allow-clear > ${t}, &-affix-wrapper${r}-has-feedback ${t} - `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},qU=Ql([`Input`,`TextArea`],e=>KU(dc(e,JF(e))),YF,{resetFont:!1}),JU=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:s,classNames:c,rootClassName:l,className:u,style:d,styles:f,variant:p,showCount:m,onMouseDown:h,onResize:g,..._}=e,{getPrefixCls:v,direction:y,allowClear:b,autoComplete:x,className:C,style:w,classNames:T,styles:E}=ya(`textArea`),D=S.useContext(mm),O=a??D,{status:k,hasFeedback:A,feedbackIcon:j}=S.useContext(gy),M=iC(k,o),[N,P]=Cf([T,c],[E,f],{props:e}),F=S.useRef(null);S.useImperativeHandle(t,()=>({resizableTextArea:F.current?.resizableTextArea,focus:e=>{Nr(F.current?.resizableTextArea?.textArea,e)},blur:()=>F.current?.blur(),nativeElement:F.current?.nativeElement||null}));let I=v(`input`,n),L=sp(I),[R,z]=SI(I,l);qU(I,L);let{compactSize:B,compactItemClassnames:V}=kh(I,y),H=Eh(e=>i??B??e),[U,ee]=pC(`textArea`,p,r),W=vz(s??b),[te,G]=S.useState(!1),[ne,K]=S.useState(!1),re=e=>{G(!0),h?.(e);let t=()=>{G(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},ie=e=>{if(g?.(e),te&&typeof getComputedStyle==`function`){let e=F.current?.nativeElement?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&K(!0)}};return S.createElement(GU,{autoComplete:x,..._,style:{...P.root,...w,...d},styles:P,disabled:O,allowClear:W,className:J(z,L,u,l,V,C,N.root,{[`${I}-textarea-affix-wrapper-resize-dirty`]:ne}),classNames:{...N,textarea:J({[`${I}-sm`]:H===`small`,[`${I}-lg`]:H===`large`},R,N.textarea,te&&`${I}-mouse-active`),variant:J({[`${I}-${U}`]:ee},rC(I,M)),affixWrapper:J(`${I}-textarea-affix-wrapper`,{[`${I}-affix-wrapper-rtl`]:y===`rtl`,[`${I}-affix-wrapper-sm`]:H===`small`,[`${I}-affix-wrapper-lg`]:H===`large`,[`${I}-textarea-show-count`]:m||e.count?.show},R)},prefixCls:I,suffix:A&&S.createElement(`span`,{className:`${I}-textarea-suffix`},j),showCount:m,ref:F,onResize:ie,onMouseDown:re})}),YU=xz;YU.Group=hU,YU.Search=MU,YU.TextArea=JU,YU.Password=AU,YU.OTP=xU;function XU(e,t,n){return typeof n==`boolean`?n:e.length?!0:ki(t).some(e=>e.type===kE)}var ZU=({suffixCls:e,tagName:t,displayName:n})=>n=>S.forwardRef((r,i)=>S.createElement(n,{ref:i,suffixCls:e,tagName:t,...r})),QU=S.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:i,tagName:a,...o}=e,{getPrefixCls:s}=S.useContext(ga),c=s(`layout`,n),[l]=CE(c),u=r?`${c}-${r}`:c;return S.createElement(a,{className:J(n||u,i,l),ref:t,...o})}),$U=S.forwardRef((e,t)=>{let{direction:n}=S.useContext(ga),[r,i]=S.useState([]),{prefixCls:a,className:o,rootClassName:s,children:c,hasSider:l,tagName:u,style:d,...f}=e,p=gi(f,[`suffixCls`]),{getPrefixCls:m,className:h,style:g}=ya(`layout`),_=m(`layout`,a),v=XU(r,c,l),[y,b]=CE(_),x=J(_,{[`${_}-has-sider`]:v,[`${_}-rtl`]:n===`rtl`},h,o,s,y,b),C=S.useMemo(()=>({siderHook:{addSider:e=>{i(t=>[].concat(pa(t),[e]))},removeSider:e=>{i(t=>t.filter(t=>t!==e))}}}),[]);return S.createElement(yE.Provider,{value:C},S.createElement(u,{ref:t,className:x,style:{...g,...d},...p},c))}),eW=ZU({tagName:`div`,displayName:`Layout`})($U),tW=ZU({suffixCls:`header`,tagName:`header`,displayName:`Header`})(QU),nW=ZU({suffixCls:`footer`,tagName:`footer`,displayName:`Footer`})(QU),rW=ZU({suffixCls:`content`,tagName:`main`,displayName:`Content`})(QU),iW=eW;iW.Header=tW,iW.Footer=nW,iW.Content=rW,iW.Sider=kE,iW._InternalSiderContext=DE;var aW=c(o((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:`M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z`}}]},name:`double-left`,theme:`outlined`}}))());function oW(){return oW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,oW({},e,{ref:t,icon:aW.default}))),cW=c(o((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:`M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z`}}]},name:`double-right`,theme:`outlined`}}))());function lW(){return lW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,lW({},e,{ref:t,icon:cW.default}))),dW={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`},fW=[10,20,50,100],pW=e=>{let{pageSizeOptions:t=fW,locale:n,changeSize:r,pageSize:i,goButton:a,quickGo:o,rootPrefixCls:s,disabled:c,buildOptionText:l,showSizeChanger:u,sizeChangerRender:d}=e,[f,p]=S.useState(``),m=S.useMemo(()=>!f||Number.isNaN(f)?void 0:Number(f),[f]),h=typeof l==`function`?l:e=>`${e} ${n.items_per_page}`,g=e=>{let t=e.target.value;/^\d*$/.test(t)&&p(t)},_=e=>{a||f===``||(p(``),!(e.relatedTarget&&(e.relatedTarget.className.includes(`${s}-item-link`)||e.relatedTarget.className.includes(`${s}-item`)))&&o?.(m))},v=e=>{f!==``&&(e.keyCode===Qr.ENTER||e.type===`click`)&&(p(``),o?.(m))},y=()=>t.some(e=>e.toString()===i.toString())?t:t.concat([i]).sort((e,t)=>(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))),b=`${s}-options`;if(!u&&!o)return null;let x=null,C=null,w=null;return u&&d&&(x=d({disabled:c,size:i,onSizeChange:e=>{r?.(Number(e))},"aria-label":n.page_size,className:`${b}-size-changer`,options:y().map(e=>({label:h(e),value:e}))})),o&&(a&&(w=typeof a==`boolean`?S.createElement(`button`,{type:`button`,onClick:v,onKeyUp:v,disabled:c,className:`${b}-quick-jumper-button`},n.jump_to_confirm):S.createElement(`span`,{onClick:v,onKeyUp:v},a)),C=S.createElement(`div`,{className:`${b}-quick-jumper`},n.jump_to,S.createElement(`input`,{disabled:c,type:`text`,value:f,onChange:g,onKeyUp:v,onBlur:_,"aria-label":n.page}),n.page,w)),S.createElement(`li`,{className:b},x,C)},mW=e=>{let{rootPrefixCls:t,page:n,active:r,className:i,style:a,showTitle:o,onClick:s,onKeyPress:c,itemRender:l}=e,u=`${t}-item`,d=J(u,`${u}-${n}`,{[`${u}-active`]:r,[`${u}-disabled`]:!n},i),f=()=>{s(n)},p=e=>{c(e,s,n)},m=l(n,`page`,S.createElement(`a`,{rel:`nofollow`},n));return m?S.createElement(`li`,{title:o?String(n):null,className:d,style:a,onClick:f,onKeyDown:p,tabIndex:0},m):null};function hW(){return hW=Object.assign?Object.assign.bind():function(e){for(var t=1;tn;function _W(){}function vW(e){let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function yW(e,t,n){let r=e===void 0?t:e;return Math.floor((n-1)/r)+1}var bW=e=>{let{prefixCls:t=`rc-pagination`,selectPrefixCls:n=`rc-select`,className:r,classNames:i,styles:a,current:o,defaultCurrent:s=1,total:c=0,pageSize:l,defaultPageSize:u=10,onChange:d=_W,hideOnSinglePage:f,align:p,showPrevNextJumpers:m=!0,showQuickJumper:h,showLessItems:g,showTitle:_=!0,onShowSizeChange:v=_W,locale:y=dW,style:b,totalBoundaryShowSizeChanger:x=50,disabled:C,simple:w,showTotal:T,showSizeChanger:E=c>x,sizeChangerRender:D,pageSizeOptions:O,itemRender:k=gW,jumpPrevIcon:A,jumpNextIcon:j,prevIcon:M,nextIcon:N}=e,P=S.useRef(null),[F,I]=Gn(u,l),[L,R]=Gn(s,o),z=Math.max(1,Math.min(L,yW(void 0,F,c))),[B,V]=S.useState(z);(0,S.useEffect)(()=>{V(z)},[z]),`current`in e;let H=Math.max(1,z-(g?3:5)),U=Math.min(yW(void 0,F,c),z+(g?3:5));function ee(n,r){let i=n||S.createElement(`button`,{type:`button`,"aria-label":r,className:`${t}-item-link`});return typeof n==`function`&&(i=S.createElement(n,e)),i}function W(e){let t=e.target.value,n=yW(void 0,F,c),r;return r=t===``?t:Number.isNaN(Number(t))?B:t>=n?n:Number(t),r}function te(e){return vW(e)&&e!==z&&vW(c)&&c>0}let G=c>F?h:!1;function ne(e){(e.keyCode===Qr.UP||e.keyCode===Qr.DOWN)&&e.preventDefault()}function K(e){let t=W(e);switch(t!==B&&V(t),e.keyCode){case Qr.ENTER:ae(t);break;case Qr.UP:ae(t-1);break;case Qr.DOWN:ae(t+1);break;default:break}}function re(e){ae(W(e))}function ie(e){let t=yW(e,F,c),n=z>t&&t!==0?t:z;I(e),V(n),v?.(z,e),R(n),d?.(n,e)}function ae(e){if(te(e)&&!C){let t=yW(void 0,F,c),n=e;return e>t?n=t:e<1&&(n=1),n!==B&&V(n),R(n),d?.(n,F),n}return z}let q=z>1,oe=zc?c:z*F])),Se=null,Ce=yW(void 0,F,c);if(f&&c<=F)return null;let we=[],Te={rootPrefixCls:t,onClick:ae,onKeyPress:de,showTitle:_,itemRender:k,page:-1,className:i?.item,style:a?.item},Ee=z-1>0?z-1:0,De=z+1=Me*2&&z!==3&&(we[0]=S.cloneElement(we[0],{className:J(`${t}-item-after-jump-prev`,we[0].props.className)}),we.unshift(ye)),Ce-z>=Me*2&&z!==Ce-2){let e=we[we.length-1];we[we.length-1]=S.cloneElement(e,{className:J(`${t}-item-before-jump-next`,e.props.className)}),we.push(Se)}a!==1&&we.unshift(S.createElement(mW,hW({},Te,{key:1,page:1}))),o!==Ce&&we.push(S.createElement(mW,hW({},Te,{key:Ce,page:Ce})))}let Ne=ge(Ee);if(Ne){let e=!q||!Ce;Ne=S.createElement(`li`,{title:_?y.prev_page:null,onClick:se,tabIndex:e?null:0,onKeyDown:fe,className:J(`${t}-prev`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Ne)}let Pe=_e(De);if(Pe){let e,n;w?(e=!oe,n=q?0:null):(e=!oe||!Ce,n=e?null:0),Pe=S.createElement(`li`,{title:_?y.next_page:null,onClick:ce,tabIndex:n,onKeyDown:pe,className:J(`${t}-next`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Pe)}let Fe=J(t,r,{[`${t}-start`]:p===`start`,[`${t}-center`]:p===`center`,[`${t}-end`]:p===`end`,[`${t}-simple`]:w,[`${t}-disabled`]:C});return S.createElement(`ul`,hW({className:Fe,style:b,ref:P},be),xe,Ne,w?je:we,Pe,S.createElement(pW,{locale:y,rootPrefixCls:t,disabled:C,selectPrefixCls:n,changeSize:ie,pageSize:F,pageSizeOptions:O,quickGo:G?ae:null,goButton:Ae,showSizeChanger:E,sizeChangerRender:D}))},xW=e=>{let{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}},"&:focus-visible":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-item`]:{cursor:`not-allowed`,backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`},a:{color:e.colorTextDisabled,backgroundColor:`transparent`,border:`none`,cursor:`not-allowed`},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover, &:active":{backgroundColor:`transparent`},[`${t}-simple&`]:{backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},SW=e=>{let{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...mI(e),width:e.paginationMiniQuickJumperInputWidth}}}}},CW=e=>{let{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...pI(e)}}}}},wW=e=>{let{componentCls:t,antCls:n}=e,[,r]=tu(n,`pagination`);return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`),verticalAlign:`top`,[`${t}-item-link`]:{height:r(`item-size-actual`),backgroundColor:`transparent`,border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`)}}},[`${t}-simple-pager`]:{display:`inline-flex`,alignItems:`center`,height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),input:{boxSizing:`border-box`,height:`100%`,width:e.quickJumperInputWidth,padding:`0 ${Y(e.paginationItemPaddingInline)}`,textAlign:`center`,backgroundColor:e.itemInputBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:`none`,transition:`border-color ${e.motionDurationMid}`,color:`inherit`,"&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${Y(e.inputOutlineOffset)} 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:`not-allowed`}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:`transparent`}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},TW=e=>{let{componentCls:t,antCls:n}=e,[,r]=tu(n,`pagination`);return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:`relative`,[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:`auto`}},[`${t}-item-ellipsis`]:{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:`block`,margin:`auto`,color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:`center`,textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` + `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},KU=Ql([`Input`,`TextArea`],e=>GU(dc(e,qF(e))),JF,{resetFont:!1}),qU=(0,S.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:s,classNames:c,rootClassName:l,className:u,style:d,styles:f,variant:p,showCount:m,onMouseDown:h,onResize:g,..._}=e,{getPrefixCls:v,direction:y,allowClear:b,autoComplete:x,className:C,style:w,classNames:T,styles:E}=ya(`textArea`),D=S.useContext(mm),O=a??D,{status:k,hasFeedback:A,feedbackIcon:j}=S.useContext(my),M=nC(k,o),[N,P]=Cf([T,c],[E,f],{props:e}),F=S.useRef(null);S.useImperativeHandle(t,()=>({resizableTextArea:F.current?.resizableTextArea,focus:e=>{Nr(F.current?.resizableTextArea?.textArea,e)},blur:()=>F.current?.blur(),nativeElement:F.current?.nativeElement||null}));let I=v(`input`,n),L=sp(I),[R,z]=xI(I,l);KU(I,L);let{compactSize:B,compactItemClassnames:V}=Oh(I,y),H=Th(e=>i??B??e),[U,ee]=dC(`textArea`,p,r),W=_z(s??b),[te,G]=S.useState(!1),[ne,K]=S.useState(!1),re=e=>{G(!0),h?.(e);let t=()=>{G(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},ie=e=>{if(g?.(e),te&&typeof getComputedStyle==`function`){let e=F.current?.nativeElement?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&K(!0)}};return S.createElement(WU,{autoComplete:x,..._,style:{...P.root,...w,...d},styles:P,disabled:O,allowClear:W,className:J(z,L,u,l,V,C,N.root,{[`${I}-textarea-affix-wrapper-resize-dirty`]:ne}),classNames:{...N,textarea:J({[`${I}-sm`]:H===`small`,[`${I}-lg`]:H===`large`},R,N.textarea,te&&`${I}-mouse-active`),variant:J({[`${I}-${U}`]:ee},tC(I,M)),affixWrapper:J(`${I}-textarea-affix-wrapper`,{[`${I}-affix-wrapper-rtl`]:y===`rtl`,[`${I}-affix-wrapper-sm`]:H===`small`,[`${I}-affix-wrapper-lg`]:H===`large`,[`${I}-textarea-show-count`]:m||e.count?.show},R)},prefixCls:I,suffix:A&&S.createElement(`span`,{className:`${I}-textarea-suffix`},j),showCount:m,ref:F,onResize:ie,onMouseDown:re})}),JU=bz;JU.Group=mU,JU.Search=jU,JU.TextArea=qU,JU.Password=kU,JU.OTP=bU;function YU(e,t,n){return typeof n==`boolean`?n:e.length?!0:ki(t).some(e=>e.type===DE)}var XU=({suffixCls:e,tagName:t,displayName:n})=>n=>S.forwardRef((r,i)=>S.createElement(n,{ref:i,suffixCls:e,tagName:t,...r})),ZU=S.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:i,tagName:a,...o}=e,{getPrefixCls:s}=S.useContext(ga),c=s(`layout`,n),[l]=xE(c),u=r?`${c}-${r}`:c;return S.createElement(a,{className:J(n||u,i,l),ref:t,...o})}),QU=S.forwardRef((e,t)=>{let{direction:n}=S.useContext(ga),[r,i]=S.useState([]),{prefixCls:a,className:o,rootClassName:s,children:c,hasSider:l,tagName:u,style:d,...f}=e,p=gi(f,[`suffixCls`]),{getPrefixCls:m,className:h,style:g}=ya(`layout`),_=m(`layout`,a),v=YU(r,c,l),[y,b]=xE(_),x=J(_,{[`${_}-has-sider`]:v,[`${_}-rtl`]:n===`rtl`},h,o,s,y,b),C=S.useMemo(()=>({siderHook:{addSider:e=>{i(t=>[].concat(pa(t),[e]))},removeSider:e=>{i(t=>t.filter(t=>t!==e))}}}),[]);return S.createElement(_E.Provider,{value:C},S.createElement(u,{ref:t,className:x,style:{...g,...d},...p},c))}),$U=XU({tagName:`div`,displayName:`Layout`})(QU),eW=XU({suffixCls:`header`,tagName:`header`,displayName:`Header`})(ZU),tW=XU({suffixCls:`footer`,tagName:`footer`,displayName:`Footer`})(ZU),nW=XU({suffixCls:`content`,tagName:`main`,displayName:`Content`})(ZU),rW=$U;rW.Header=eW,rW.Footer=tW,rW.Content=nW,rW.Sider=DE,rW._InternalSiderContext=TE;var iW=c(o((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:`M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z`}}]},name:`double-left`,theme:`outlined`}}))());function aW(){return aW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,aW({},e,{ref:t,icon:iW.default}))),sW=c(o((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:`M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z`}}]},name:`double-right`,theme:`outlined`}}))());function cW(){return cW=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,cW({},e,{ref:t,icon:sW.default}))),uW={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`},dW=[10,20,50,100],fW=e=>{let{pageSizeOptions:t=dW,locale:n,changeSize:r,pageSize:i,goButton:a,quickGo:o,rootPrefixCls:s,disabled:c,buildOptionText:l,showSizeChanger:u,sizeChangerRender:d}=e,[f,p]=S.useState(``),m=S.useMemo(()=>!f||Number.isNaN(f)?void 0:Number(f),[f]),h=typeof l==`function`?l:e=>`${e} ${n.items_per_page}`,g=e=>{let t=e.target.value;/^\d*$/.test(t)&&p(t)},_=e=>{a||f===``||(p(``),!(e.relatedTarget&&(e.relatedTarget.className.includes(`${s}-item-link`)||e.relatedTarget.className.includes(`${s}-item`)))&&o?.(m))},v=e=>{f!==``&&(e.keyCode===Qr.ENTER||e.type===`click`)&&(p(``),o?.(m))},y=()=>t.some(e=>e.toString()===i.toString())?t:t.concat([i]).sort((e,t)=>(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))),b=`${s}-options`;if(!u&&!o)return null;let x=null,C=null,w=null;return u&&d&&(x=d({disabled:c,size:i,onSizeChange:e=>{r?.(Number(e))},"aria-label":n.page_size,className:`${b}-size-changer`,options:y().map(e=>({label:h(e),value:e}))})),o&&(a&&(w=typeof a==`boolean`?S.createElement(`button`,{type:`button`,onClick:v,onKeyUp:v,disabled:c,className:`${b}-quick-jumper-button`},n.jump_to_confirm):S.createElement(`span`,{onClick:v,onKeyUp:v},a)),C=S.createElement(`div`,{className:`${b}-quick-jumper`},n.jump_to,S.createElement(`input`,{disabled:c,type:`text`,value:f,onChange:g,onKeyUp:v,onBlur:_,"aria-label":n.page}),n.page,w)),S.createElement(`li`,{className:b},x,C)},pW=e=>{let{rootPrefixCls:t,page:n,active:r,className:i,style:a,showTitle:o,onClick:s,onKeyPress:c,itemRender:l}=e,u=`${t}-item`,d=J(u,`${u}-${n}`,{[`${u}-active`]:r,[`${u}-disabled`]:!n},i),f=()=>{s(n)},p=e=>{c(e,s,n)},m=l(n,`page`,S.createElement(`a`,{rel:`nofollow`},n));return m?S.createElement(`li`,{title:o?String(n):null,className:d,style:a,onClick:f,onKeyDown:p,tabIndex:0},m):null};function mW(){return mW=Object.assign?Object.assign.bind():function(e){for(var t=1;tn;function gW(){}function _W(e){let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function vW(e,t,n){let r=e===void 0?t:e;return Math.floor((n-1)/r)+1}var yW=e=>{let{prefixCls:t=`rc-pagination`,selectPrefixCls:n=`rc-select`,className:r,classNames:i,styles:a,current:o,defaultCurrent:s=1,total:c=0,pageSize:l,defaultPageSize:u=10,onChange:d=gW,hideOnSinglePage:f,align:p,showPrevNextJumpers:m=!0,showQuickJumper:h,showLessItems:g,showTitle:_=!0,onShowSizeChange:v=gW,locale:y=uW,style:b,totalBoundaryShowSizeChanger:x=50,disabled:C,simple:w,showTotal:T,showSizeChanger:E=c>x,sizeChangerRender:D,pageSizeOptions:O,itemRender:k=hW,jumpPrevIcon:A,jumpNextIcon:j,prevIcon:M,nextIcon:N}=e,P=S.useRef(null),[F,I]=Gn(u,l),[L,R]=Gn(s,o),z=Math.max(1,Math.min(L,vW(void 0,F,c))),[B,V]=S.useState(z);(0,S.useEffect)(()=>{V(z)},[z]),`current`in e;let H=Math.max(1,z-(g?3:5)),U=Math.min(vW(void 0,F,c),z+(g?3:5));function ee(n,r){let i=n||S.createElement(`button`,{type:`button`,"aria-label":r,className:`${t}-item-link`});return typeof n==`function`&&(i=S.createElement(n,e)),i}function W(e){let t=e.target.value,n=vW(void 0,F,c),r;return r=t===``?t:Number.isNaN(Number(t))?B:t>=n?n:Number(t),r}function te(e){return _W(e)&&e!==z&&_W(c)&&c>0}let G=c>F?h:!1;function ne(e){(e.keyCode===Qr.UP||e.keyCode===Qr.DOWN)&&e.preventDefault()}function K(e){let t=W(e);switch(t!==B&&V(t),e.keyCode){case Qr.ENTER:ae(t);break;case Qr.UP:ae(t-1);break;case Qr.DOWN:ae(t+1);break;default:break}}function re(e){ae(W(e))}function ie(e){let t=vW(e,F,c),n=z>t&&t!==0?t:z;I(e),V(n),v?.(z,e),R(n),d?.(n,e)}function ae(e){if(te(e)&&!C){let t=vW(void 0,F,c),n=e;return e>t?n=t:e<1&&(n=1),n!==B&&V(n),R(n),d?.(n,F),n}return z}let q=z>1,oe=zc?c:z*F])),Se=null,Ce=vW(void 0,F,c);if(f&&c<=F)return null;let we=[],Te={rootPrefixCls:t,onClick:ae,onKeyPress:de,showTitle:_,itemRender:k,page:-1,className:i?.item,style:a?.item},Ee=z-1>0?z-1:0,De=z+1=Me*2&&z!==3&&(we[0]=S.cloneElement(we[0],{className:J(`${t}-item-after-jump-prev`,we[0].props.className)}),we.unshift(ye)),Ce-z>=Me*2&&z!==Ce-2){let e=we[we.length-1];we[we.length-1]=S.cloneElement(e,{className:J(`${t}-item-before-jump-next`,e.props.className)}),we.push(Se)}a!==1&&we.unshift(S.createElement(pW,mW({},Te,{key:1,page:1}))),o!==Ce&&we.push(S.createElement(pW,mW({},Te,{key:Ce,page:Ce})))}let Ne=ge(Ee);if(Ne){let e=!q||!Ce;Ne=S.createElement(`li`,{title:_?y.prev_page:null,onClick:se,tabIndex:e?null:0,onKeyDown:fe,className:J(`${t}-prev`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Ne)}let Pe=_e(De);if(Pe){let e,n;w?(e=!oe,n=q?0:null):(e=!oe||!Ce,n=e?null:0),Pe=S.createElement(`li`,{title:_?y.next_page:null,onClick:ce,tabIndex:n,onKeyDown:pe,className:J(`${t}-next`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Pe)}let Fe=J(t,r,{[`${t}-start`]:p===`start`,[`${t}-center`]:p===`center`,[`${t}-end`]:p===`end`,[`${t}-simple`]:w,[`${t}-disabled`]:C});return S.createElement(`ul`,mW({className:Fe,style:b,ref:P},be),xe,Ne,w?je:we,Pe,S.createElement(fW,{locale:y,rootPrefixCls:t,disabled:C,selectPrefixCls:n,changeSize:ie,pageSize:F,pageSizeOptions:O,quickGo:G?ae:null,goButton:Ae,showSizeChanger:E,sizeChangerRender:D}))},bW=e=>{let{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}},"&:focus-visible":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-item`]:{cursor:`not-allowed`,backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`},a:{color:e.colorTextDisabled,backgroundColor:`transparent`,border:`none`,cursor:`not-allowed`},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover, &:active":{backgroundColor:`transparent`},[`${t}-simple&`]:{backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},xW=e=>{let{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...pI(e),width:e.paginationMiniQuickJumperInputWidth}}}}},SW=e=>{let{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...fI(e)}}}}},CW=e=>{let{componentCls:t,antCls:n}=e,[,r]=tu(n,`pagination`);return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`),verticalAlign:`top`,[`${t}-item-link`]:{height:r(`item-size-actual`),backgroundColor:`transparent`,border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`)}}},[`${t}-simple-pager`]:{display:`inline-flex`,alignItems:`center`,height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),input:{boxSizing:`border-box`,height:`100%`,width:e.quickJumperInputWidth,padding:`0 ${Y(e.paginationItemPaddingInline)}`,textAlign:`center`,backgroundColor:e.itemInputBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:`none`,transition:`border-color ${e.motionDurationMid}`,color:`inherit`,"&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${Y(e.inputOutlineOffset)} 0 ${Y(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:`not-allowed`}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:`transparent`}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},wW=e=>{let{componentCls:t,antCls:n}=e,[,r]=tu(n,`pagination`);return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:`relative`,[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:`auto`}},[`${t}-item-ellipsis`]:{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:`block`,margin:`auto`,color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:`center`,textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` ${t}-prev, ${t}-jump-prev, ${t}-jump-next @@ -327,22 +327,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-next, ${t}-jump-prev, ${t}-jump-next - `]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),color:e.colorText,fontFamily:e.fontFamily,lineHeight:r(`item-size-actual`),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,borderRadius:e.borderRadius,cursor:`pointer`,transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:`pointer`,userSelect:`none`},[`${t}-item-link`]:{display:`block`,width:`100%`,height:`100%`,padding:0,fontSize:e.fontSizeSM,textAlign:`center`,backgroundColor:`transparent`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:`none`,transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:`transparent`}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:`inline-block`,marginInlineStart:e.margin,verticalAlign:`middle`,"&-size-changer":{width:`auto`},"&-quick-jumper":{display:`inline-block`,height:r(`item-size-actual`),marginInlineStart:e.marginXS,lineHeight:r(`item-size-actual`),verticalAlign:`baseline`,input:{...hI(e),...QF(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...ZF(e)},width:e.quickJumperInputWidth,height:r(`item-size-actual`),boxSizing:`border-box`,margin:0,marginInlineStart:r(`item-spacing-actual`),marginInlineEnd:r(`item-spacing-actual`)}}}}},EW=e=>{let{componentCls:t,antCls:n}=e,[,r]=tu(n,`pagination`);return{[`${t}-item`]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),fontFamily:e.fontFamily,lineHeight:Y(e.calc(r(`item-size-actual`)).sub(2).equal()),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,backgroundColor:e.itemBg,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:`pointer`,userSelect:`none`,a:{display:`block`,padding:`0 ${Y(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:`none`}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},DW=e=>{let{componentCls:t,antCls:n}=e,[r,i]=tu(n,`pagination`);return{[t]:{[r(`item-size-actual`)]:Y(e.itemSize),[r(`item-spacing-actual`)]:Y(e.marginXS),"&-small":{[r(`item-size-actual`)]:Y(e.itemSizeSM),[r(`item-spacing-actual`)]:Y(e.marginXXS)},"&-large":{[r(`item-size-actual`)]:Y(e.itemSizeLG),[r(`item-spacing-actual`)]:Y(e.marginSM)},...Ul(e),display:`flex`,alignItems:`center`,"&-start":{justifyContent:`start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`end`},"ul, ol":{margin:0,padding:0,listStyle:`none`},"&::after":{display:`block`,clear:`both`,height:0,overflow:`hidden`,visibility:`hidden`,content:`""`},[`${t}-total-text`]:{display:`inline-block`,height:i(`item-size-actual`),marginInlineEnd:i(`item-spacing-actual`),lineHeight:Y(e.calc(i(`item-size-actual`)).sub(2).equal()),verticalAlign:`middle`},...EW(e),...TW(e),...wW(e),...SW(e),...CW(e),...xW(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:`none`}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:`none`}}},[`&${e.componentCls}-rtl`]:{direction:`rtl`}}},OW=e=>{let{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...ql(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...Kl(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Kl(e)}}}},kW=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...YF(e)}),AW=e=>dc(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:`0.13em`},JF(e)),jW=Ql(`Pagination`,e=>{let t=AW(e);return[DW(t),OW(t)]},kW),MW=e=>{let{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},NW=eu([`Pagination`,`bordered`],e=>MW(AW(e)),kW);function PW(e){return(0,S.useMemo)(()=>typeof e==`boolean`?[e,{}]:nf(e)?[!0,e]:[void 0,void 0],[e])}var FW=e=>{let{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:a,style:o,size:s,locale:c,responsive:l,showSizeChanger:u,selectComponentClass:d,pageSizeOptions:f,styles:p,classNames:m,...h}=e,{xs:g}=YC(l),[,_]=Vl(),{getPrefixCls:v,direction:y,showSizeChanger:b,className:x,style:C,classNames:w,styles:T,totalBoundaryShowSizeChanger:E}=ya(`pagination`),D=v(`pagination`,n),[O,k]=jW(D),A=Eh(s),j=A===`small`||!!(g&&!A&&l),M={...e,size:A},[N,P]=Cf([w,m],[T,p],{props:M}),[F]=Yd(`Pagination`,kd),I={...F,...c},[L,R]=PW(u),[z,B]=PW(b),V=L??z,H=R??B,U=d||VC,ee=S.useMemo(()=>f?f.map(Number):void 0,[f]),W=e=>{let{disabled:t,size:n,onSizeChange:r,"aria-label":i,className:a,options:o}=e,{className:s,onChange:c}=H||{},l=o.find(e=>String(e.value)===String(n))?.value;return S.createElement(U,{disabled:t,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":i,options:o,...H,value:l,onChange:(e,t)=>{r?.(e),c?.(e,t)},size:A,className:J(a,s)})},te=S.useMemo(()=>{let e=S.createElement(`span`,{className:`${D}-item-ellipsis`},`•••`);return{prevIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(Vg,null):S.createElement(Gw,null)),nextIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(Gw,null):S.createElement(Vg,null)),jumpPrevIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(uW,{className:`${D}-item-link-icon`}):S.createElement(sW,{className:`${D}-item-link-icon`}),e)),jumpNextIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(sW,{className:`${D}-item-link-icon`}):S.createElement(uW,{className:`${D}-item-link-icon`}),e))}},[y,D]),G=v(`select`,r),ne=J({[`${D}-${t}`]:!!t,[`${D}-${A}`]:A,[`${D}-mini`]:j,[`${D}-rtl`]:y===`rtl`,[`${D}-bordered`]:_.wireframe},x,i,a,N.root,O,k),K={...P.root,...C,...o};return S.createElement(S.Fragment,null,_.wireframe&&S.createElement(NW,{prefixCls:D}),S.createElement(bW,{...te,...h,styles:P,classNames:N,style:K,prefixCls:D,selectPrefixCls:G,className:ne,locale:I,pageSizeOptions:ee,showSizeChanger:V,totalBoundaryShowSizeChanger:h.totalBoundaryShowSizeChanger??E,sizeChangerRender:W}))},IW=100,LW=IW/5,RW=IW/2-LW/2,zW=RW*2*Math.PI,BW=50,VW=e=>{let{dotClassName:t,style:n,hasCircleCls:r}=e;return S.createElement(`circle`,{className:J(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:RW,cx:BW,cy:BW,strokeWidth:LW,style:n})},HW=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[a,o]=S.useState(!1);Hn(()=>{e!==0&&o(!0)},[e!==0]);let s=Math.max(Math.min(e,100),0);if(!a)return null;let c={strokeDashoffset:`${zW/4}`,strokeDasharray:`${zW*s/100} ${zW*(100-s)/100}`};return S.createElement(`span`,{className:J(r,`${n}-progress`,{[i]:s<=0})},S.createElement(`svg`,{viewBox:`0 0 ${IW} ${IW}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},S.createElement(VW,{dotClassName:n,hasCircleCls:!0}),S.createElement(VW,{dotClassName:n,style:c})))};function UW(e){let{prefixCls:t,percent:n=0,className:r,style:i}=e,a=`${t}-dot`,o=`${a}-holder`,s=`${o}-hidden`;return S.createElement(S.Fragment,null,S.createElement(`span`,{className:J(o,r,n>0&&s),style:i},S.createElement(`span`,{className:J(a,`${t}-dot-spin`)},[1,2,3,4].map(e=>S.createElement(`i`,{className:`${t}-dot-item`,key:e})))),S.createElement(HW,{prefixCls:t,percent:n}))}function WW(e){let{prefixCls:t,indicator:n,percent:r,className:i,style:a}=e,o=`${t}-dot`;return n&&S.isValidElement(n)?um(n,e=>({className:J(e.className,o,i),style:{...e.style,...a},percent:r})):S.createElement(UW,{prefixCls:t,percent:r,className:i,style:a})}var GW=new Ms(`antSpinMove`,{to:{opacity:1}}),KW=new Ms(`antRotate`,{to:{transform:`rotate(405deg)`}}),qW=e=>{let{componentCls:t}=e,n=`${t}-section`;return{[t]:{...Ul(e),position:`relative`,"&-rtl":{direction:`rtl`},[`&${n}, ${n}`]:{display:`flex`,alignItems:`center`,flexDirection:`column`,gap:e.paddingSM,color:e.colorPrimary},[`&${n}`]:{display:`inline-flex`},[n]:{position:`absolute`,top:`50%`,left:{_skip_check_:!0,value:`50%`},transform:`translate(-50%, -50%)`,zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:`relative`,transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:`100%`,height:`100%`,background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`""`,pointerEvents:`none`}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:`both`,opacity:.5,userSelect:`none`,pointerEvents:`none`,"&::after":{opacity:.4,pointerEvents:`auto`}}},"&-fullscreen":{position:`fixed`,inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:`none`,transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:`auto`},[n]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},JW=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r}=e,[i,a]=tu(n,`spin`);return{[t]:{[i(`dot-holder-size`)]:e.dotSize,[i(`dot-item-size`)]:`calc((${a(`dot-holder-size`)} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:`1em`,height:`1em`,fontSize:a(`dot-holder-size`),display:`inline-block`,transition:[`transform`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),transformOrigin:`50% 50%`,lineHeight:1,"&-hidden":{transform:`scale(0.3)`,opacity:0}},position:`relative`,display:`inline-block`,fontSize:a(`dot-holder-size`),width:`1em`,height:`1em`,"&-spin":{transform:`rotate(45deg)`,animationName:KW,animationDuration:`1.2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`},"&-item":{position:`absolute`,display:`block`,width:a(`dot-item-size`),height:a(`dot-item-size`),background:`currentColor`,borderRadius:`100%`,transform:`scale(0.75)`,transformOrigin:`50% 50%`,opacity:.3,animationName:GW,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,animationDirection:`alternate`,"&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:`0s`},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:`0.4s`},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:`0.8s`},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:`1.2s`}},"&-progress":{position:`absolute`,left:`50%`,top:0,transform:`translateX(-50%)`},"&-circle":{strokeLinecap:`round`,transition:[`stroke-dashoffset`,`stroke-dasharray`,`stroke`,`stroke-width`,`opacity`].map(e=>`${e} ${r} ease`).join(`,`),fillOpacity:0,stroke:`currentcolor`},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},YW=e=>{let{componentCls:t}=e,[n]=tu(e.antCls,`spin`);return{[t]:{"&-sm":{[n(`dot-holder-size`)]:e.dotSizeSM},"&-lg":{[n(`dot-holder-size`)]:e.dotSizeLG}}}},XW=Ql(`Spin`,e=>{let t=dc(e,{spinDotDefault:e.colorTextDescription});return[qW(t),JW(t),YW(t)]},e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}}),ZW=200,QW=[[30,.05],[70,.03],[96,.01]];function $W(e,t){let[n,r]=S.useState(0),i=S.useRef(null),a=t===`auto`;return S.useEffect(()=>(a&&e&&(r(0),i.current=setInterval(()=>{r(e=>{let t=100-e;for(let n=0;n{i.current&&=(clearInterval(i.current),null)}),[a,e]),a?n:t}var eG;function tG(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var nG=e=>{let{prefixCls:t,spinning:n=!0,delay:r=0,className:i,rootClassName:a,size:o,tip:s,description:c,wrapperClassName:l,style:u,children:d,fullscreen:f=!1,indicator:p,percent:m,classNames:h,styles:g,..._}=e,{getPrefixCls:v,direction:y,indicator:b,className:x,style:C,classNames:w,styles:T}=ya(`spin`),E=v(`spin`,t),[D,O]=XW(E),[k,A]=S.useState(()=>n&&!tG(n,r)),j=$W(k,m);S.useEffect(()=>{if(n){let e=_re(r,()=>{A(!0)});return e(),()=>{e?.cancel?.()}}A(!1)},[r,n]);let M=Eh(e=>o??e),N=c??s,P={...e,size:M,spinning:k,tip:N,description:N,fullscreen:f,children:d,percent:j},[F,I]=Cf([w,h],[T,g],{props:P}),L=p??b??eG,R=d!==void 0,z=R||f,B=S.createElement(S.Fragment,null,S.createElement(WW,{className:J(F.indicator),style:I.indicator,prefixCls:E,indicator:L,percent:j}),N&&S.createElement(`div`,{className:J(`${E}-description`,F.tip,F.description),style:{...I.tip,...I.description}},N));return S.createElement(`div`,{className:J(E,{[`${E}-sm`]:M===`small`,[`${E}-lg`]:M===`large`,[`${E}-spinning`]:k,[`${E}-rtl`]:y===`rtl`,[`${E}-fullscreen`]:f},a,F.root,f&&F.mask,z?l:[`${E}-section`,F.section],x,i,D,O),style:{...I.root,...z?{}:I.section,...f?I.mask:{},...C,...u},"aria-live":`polite`,"aria-busy":k,..._},k&&(z?S.createElement(`div`,{className:J(`${E}-section`,F.section),style:I.section},B):B),R&&S.createElement(`div`,{className:J(`${E}-container`,F.container),style:I.container},d))};nG.setDefaultIndicator=e=>{eG=e};var rG=S.createContext({});rG.Consumer;var iG=({prefixCls:e,className:t,avatar:n,title:r,description:i,...a})=>{let{getPrefixCls:o}=(0,S.useContext)(ga),s=o(`list`,e),c=J(`${s}-item-meta`,t),l=S.createElement(`div`,{className:`${s}-item-meta-content`},r&&S.createElement(`h4`,{className:`${s}-item-meta-title`},r),i&&S.createElement(`div`,{className:`${s}-item-meta-description`},i));return S.createElement(`div`,{...a,className:c},n&&S.createElement(`div`,{className:`${s}-item-meta-avatar`},n),(r||i)&&l)},aG=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,actions:i,extra:a,styles:o,className:s,classNames:c,colStyle:l,...u}=e,{grid:d,itemLayout:f}=(0,S.useContext)(rG),{getPrefixCls:p,list:m}=(0,S.useContext)(ga),h=e=>J(m?.item?.classNames?.[e],c?.[e]),g=e=>({...m?.item?.styles?.[e],...o?.[e]}),_=()=>{let e=ki(r);return e.some(e=>typeof e==`string`)&&e.length>1},v=()=>f===`vertical`?!!a:!_(),y=p(`list`,n),b=i&&i.length>0&&S.createElement(`ul`,{className:J(`${y}-item-action`,h(`actions`)),key:`actions`,style:g(`actions`)},i.map((e,t)=>S.createElement(`li`,{key:`${y}-item-action-${t}`},e,t!==i.length-1&&S.createElement(`em`,{className:`${y}-item-action-split`})))),x=d?`div`:`li`,C=S.createElement(x,{...u,...d?{}:{ref:t},className:J(`${y}-item`,{[`${y}-item-no-flex`]:!v()},s)},f===`vertical`&&a?[S.createElement(`div`,{className:`${y}-item-main`,key:`content`},r,b),S.createElement(`div`,{className:J(`${y}-item-extra`,h(`extra`)),key:`extra`,style:g(`extra`)},a)]:[r,b,um(a,{key:`extra`})]);return d?S.createElement(_R,{ref:t,flex:1,style:l},C):C});aG.Meta=iG;var oG=e=>{let{listBorderedCls:t,componentCls:n,paddingLG:r,margin:i,itemPaddingSM:a,itemPaddingLG:o,marginLG:s,borderRadiusLG:c}=e,l=Y(e.calc(c).sub(e.lineWidth).equal());return{[t]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:c,[`${n}-header`]:{borderRadius:`${l} ${l} 0 0`},[`${n}-footer`]:{borderRadius:`0 0 ${l} ${l}`},[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:r},[`${n}-pagination`]:{margin:`${Y(i)} ${Y(s)}`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:o}}}},sG=e=>{let{componentCls:t,screenSM:n,screenMD:r,marginLG:i,marginSM:a,margin:o}=e;return{[`@media screen and (max-width:${r}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:i}}}},[`@media screen and (max-width: ${n}px)`]:{[t]:{[`${t}-item`]:{flexWrap:`wrap`,[`${t}-action`]:{marginInlineStart:a}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:`wrap-reverse`,[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${Y(o)}`}}}}}},cG=e=>{let{componentCls:t,antCls:n,controlHeight:r,minHeight:i,paddingSM:a,marginLG:o,padding:s,itemPadding:c,colorPrimary:l,itemPaddingSM:u,itemPaddingLG:d,paddingXS:f,margin:p,colorText:m,colorTextDescription:h,motionDurationSlow:g,lineWidth:_,headerBg:v,footerBg:y,emptyTextPadding:b,metaMarginBottom:x,avatarMarginRight:S,titleMarginBottom:C,descriptionFontSize:w}=e;return{[t]:{...Ul(e),position:`relative`,"--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:`none`},[`${t}-header`]:{background:v},[`${t}-footer`]:{background:y},[`${t}-header, ${t}-footer`]:{paddingBlock:a},[`${t}-pagination`]:{marginBlockStart:o,[`${n}-pagination-options`]:{textAlign:`start`}},[`${t}-spin`]:{minHeight:i,textAlign:`center`},[`${t}-items`]:{margin:0,padding:0,listStyle:`none`},[`${t}-item`]:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:c,color:m,[`${t}-item-meta`]:{display:`flex`,flex:1,alignItems:`flex-start`,maxWidth:`100%`,[`${t}-item-meta-avatar`]:{marginInlineEnd:S},[`${t}-item-meta-content`]:{flex:`1 0`,width:0,color:m},[`${t}-item-meta-title`]:{margin:`0 0 ${Y(e.marginXXS)} 0`,color:m,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:m,transition:`all ${g}`,"&:hover":{color:l}}},[`${t}-item-meta-description`]:{color:h,fontSize:w,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:`0 0 auto`,marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:`none`,"& > li":{position:`relative`,display:`inline-block`,padding:`0 ${Y(f)}`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`center`,"&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineEnd:0,width:_,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:`translateY(-50%)`,backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${Y(s)} 0`,color:h,fontSize:e.fontSizeSM,textAlign:`center`},[`${t}-empty-text`]:{padding:b,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:`center`},[`${t}-item-no-flex`]:{display:`block`}},[`${t}-grid ${n}-col > ${t}-item`]:{display:`block`,maxWidth:`100%`,marginBlockEnd:p,paddingBlock:0,borderBlockEnd:`none`},[`${t}-vertical ${t}-item`]:{alignItems:`initial`,[`${t}-item-main`]:{display:`block`,flex:1},[`${t}-item-extra`]:{marginInlineStart:o},[`${t}-item-meta`]:{marginBlockEnd:x,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:C,color:m,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:s,marginInlineStart:`auto`,"> li":{padding:`0 ${Y(s)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:`none`}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:r},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:d},[`${t}-sm ${t}-item`]:{padding:u},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:`right`}}}}},lG=Ql(`List`,e=>{let t=dc(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[cG(t),oG(t),sG(t)]},e=>({contentWidth:220,itemPadding:`${Y(e.paddingContentVertical)} 0`,itemPaddingSM:`${Y(e.paddingContentVerticalSM)} ${Y(e.paddingContentHorizontal)}`,itemPaddingLG:`${Y(e.paddingContentVerticalLG)} ${Y(e.paddingContentHorizontalLG)}`,headerBg:`transparent`,footerBg:`transparent`,emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),{extraCssVarPrefixCls:({prefixCls:e})=>[`${e}-container`]}),uG=S.forwardRef((e,t)=>{let{pagination:n=!1,prefixCls:r,bordered:i=!1,split:a=!0,className:o,rootClassName:s,style:c,children:l,itemLayout:u,loadMore:d,grid:f,dataSource:p=[],size:m,header:h,footer:g,loading:_=!1,rowKey:v,renderItem:y,locale:b,...x}=e,C=nf(n)?n:{},[w,T]=S.useState(C.defaultCurrent||1),[E,D]=S.useState(C.defaultPageSize||10),{getPrefixCls:O,direction:k,className:A,style:j}=ya(`list`),{renderEmpty:M}=S.useContext(ga),N={current:1,total:0,position:`bottom`},P=e=>(t,r)=>{T(t),D(r),n&&n?.[e]?.(t,r)},F=P(`onChange`),I=P(`onShowSizeChange`),L=(e,t)=>{if(!y)return null;let n;return n=typeof v==`function`?v(e):v?e[v]:e.key,n||=`list-item-${t}`,S.createElement(S.Fragment,{key:n},y(e,t))},R=!!(d||n||g),z=O(`list`,r),[B,V]=lG(z),H=_;typeof H==`boolean`&&(H={spinning:H});let U=!!H?.spinning,ee=Eh(m),W=``;switch(ee){case`large`:W=`lg`;break;case`small`:W=`sm`;break;default:break}let te=J(z,{[`${z}-vertical`]:u===`vertical`,[`${z}-${W}`]:W,[`${z}-split`]:a,[`${z}-bordered`]:i,[`${z}-loading`]:U,[`${z}-grid`]:!!f,[`${z}-something-after-last-item`]:R,[`${z}-rtl`]:k===`rtl`},A,o,s,B,V),G=`${z}-container`,ne=Qd(N,{total:p.length,current:w,pageSize:E},n||{}),K=Math.ceil(ne.total/ne.pageSize);ne.current=Math.min(ne.current,K);let re=n&&S.createElement(`div`,{className:J(`${z}-pagination`)},S.createElement(FW,{align:`end`,...ne,onChange:F,onShowSizeChange:I})),ie=pa(p);n&&p.length>(ne.current-1)*ne.pageSize&&(ie=pa(p).splice((ne.current-1)*ne.pageSize,ne.pageSize));let ae=YC(Object.keys(f||{}).some(e=>UC.includes(e))),q=S.useMemo(()=>{for(let e=0;e{if(!f)return;let e=q&&f[q]?f[q]:f.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(f),q]),se=U&&S.createElement(`div`,{style:{minHeight:53}});if(ie.length>0){let e=ie.map(L);se=f?S.createElement(bR,{className:J(G,V),gutter:f.gutter},S.Children.map(e,e=>S.createElement(`div`,{key:e?.key,style:oe},e))):S.createElement(`ul`,{className:J(`${z}-items`,G,V)},e)}else !l&&!U&&(se=S.createElement(`div`,{className:`${z}-empty-text`},b?.emptyText||M?.(`List`)||S.createElement(fC,{componentName:`List`})));let ce=ne.position,le=S.useMemo(()=>({grid:f,itemLayout:u}),[JSON.stringify(f),u]);return S.createElement(rG.Provider,{value:le},S.createElement(`div`,{ref:t,style:{...j,...c},className:te,...x},(ce===`top`||ce===`both`)&&re,h&&S.createElement(`div`,{className:`${z}-header`},h),S.createElement(nG,{...H},se,l),g&&S.createElement(`div`,{className:`${z}-footer`},g),d||(ce===`bottom`||ce===`both`)&&re))});uG.Item=aG;var dG=(e,t={})=>!$d(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],fG=null,pG=e=>e(),mG=[],hG={};function gG(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:i}=hG,a=e?.()||document.body;return{getContainer:()=>a,duration:t,rtl:n,maxCount:r,top:i}}var _G=S.forwardRef((e,t)=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:i}=(0,S.useContext)(ga),a=hG.prefixCls||i(`message`),o=(0,S.useContext)(Zb),[s,c]=uh({...n,prefixCls:a,...o.message});return S.useImperativeHandle(t,()=>{let e={...s};return Object.keys(e).forEach(t=>{e[t]=(...e)=>(r(),s[t].apply(s,e))}),{instance:e,sync:r}}),c}),vG=S.forwardRef((e,t)=>{let[n,r]=S.useState(gG),i=()=>{r(gG)};S.useEffect(i,[]);let a=jm(),o=a.getRootPrefixCls(),s=a.getIconPrefixCls(),c=a.getTheme(),l=S.createElement(_G,{ref:t,sync:i,messageConfig:n});return S.createElement(Mm,{prefixCls:o,iconPrefixCls:s,theme:c},a.holderRender?a.holderRender(l):l)}),yG=()=>{if(!fG){let e=document.createDocumentFragment(),t={fragment:e};fG=t,pG(()=>{zi(S.createElement(vG,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,yG())})}}),e)});return}fG.instance&&(mG.forEach(e=>{let{type:t,skipped:n}=e;if(!n)switch(t){case`open`:pG(()=>{let t=fG.instance.open({...hG,...e.config});t?.then(e.resolve),e.setCloseFn(t)});break;case`destroy`:pG(()=>{fG?.instance.destroy(e.key)});break;default:pG(()=>{var n;let r=(n=fG.instance)[t].apply(n,pa(e.args));r?.then(e.resolve),e.setCloseFn(r)})}}),mG=[])};function bG(e){hG={...hG,...e},pG(()=>{fG?.sync?.()})}function xG(e){let t=rh(t=>{let n,r={type:`open`,config:e,resolve:t,setCloseFn:e=>{n=e}};return mG.push(r),()=>{n?pG(()=>{n()}):r.skipped=!0}});return yG(),t}function SG(e,t){let n=rh(n=>{let r,i={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return mG.push(i),()=>{r?pG(()=>{r()}):i.skipped=!0}});return yG(),n}var CG=e=>{mG.push({type:`destroy`,key:e}),yG()},wG=[`success`,`info`,`warning`,`error`,`loading`],Z={open:xG,destroy:CG,config:bG,useMessage:dh,_InternalPanelDoNotUseOrYouWillBeFired:th};wG.forEach(e=>{Z[e]=(...t)=>SG(e,t)});var TG=rx(e=>{let{prefixCls:t,className:n,closeIcon:r,closable:i,type:a,title:o,children:s,footer:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f}=S.useContext(ga),{className:p,style:m,classNames:h,styles:g}=ya(`modal`),_=f(),v=t||f(`modal`),y=sp(_),[b,x]=nb(v,y),[C,w]=Cf([h,l],[g,u],{props:e}),T=`${v}-confirm`,E={};return E=a?{closable:i??!1,title:``,footer:``,children:S.createElement(sb,{...e,prefixCls:v,confirmPrefixCls:T,rootPrefixCls:_,content:s})}:{closable:i??!0,title:o,footer:c!==null&&S.createElement(Ky,{...e}),children:s},S.createElement(E_,{prefixCls:v,className:J(b,`${v}-pure-panel`,a&&T,a&&`${T}-${a}`,n,p,x,y,C.root),style:{...m,...w.root},...d,closeIcon:Gy(v,r),closable:i,classNames:C,styles:w,...E})});function EG(e){return mb(hb(e))}var DG=ib;DG.useModal=wb,DG.info=function(e){return mb(gb(e))},DG.success=function(e){return mb(_b(e))},DG.error=function(e){return mb(vb(e))},DG.warning=EG,DG.warn=EG,DG.confirm=function(e){return mb(yb(e))},DG.destroyAll=function(){for(;ub.length;){let e=ub.pop();e&&e()}},DG.config=bb,DG._InternalPanelDoNotUseOrYouWillBeFired=TG;var OG=Ql(`Popconfirm`,e=>{let{componentCls:t,iconCls:n,antCls:r,zIndexPopup:i,colorText:a,colorWarning:o,marginXXS:s,marginXS:c,fontSize:l,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:i,[`&${r}-popover`]:{fontSize:l},[`${t}-message`]:{marginBottom:c,display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${t}-message-icon ${n}`]:{color:o,fontSize:l,lineHeight:1,marginInlineEnd:c},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:`normal`}},[`${t}-description`]:{marginTop:s,color:a}},[`${t}-buttons`]:{textAlign:`end`,whiteSpace:`nowrap`,button:{marginInlineStart:c}}}}},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),kG=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:i,description:a,cancelText:o,okText:s,okType:c=`primary`,icon:l=S.createElement(Pu,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:p,onPopupClick:m,classNames:h,styles:g}=e,{getPrefixCls:_}=S.useContext(ga),[v]=Yd(`Popconfirm`,Hd.Popconfirm),y=tw(i),b=tw(a);return S.createElement(`div`,{className:`${t}-inner-content`,onClick:m},S.createElement(`div`,{className:`${t}-message`},l&&S.createElement(`span`,{className:`${t}-message-icon`},l),S.createElement(`div`,{className:`${t}-message-text`},y&&S.createElement(`div`,{className:J(`${t}-title`,h?.title),style:g?.title},y),b&&S.createElement(`div`,{className:J(`${t}-description`,h?.content),style:g?.content},b))),S.createElement(`div`,{className:`${t}-buttons`},u&&S.createElement(g_,{onClick:p,size:`small`,...r},o||v?.cancelText),S.createElement(__,{buttonProps:{size:`small`,...Lh(c),...n},actionFn:f,close:d,prefixCls:_(`btn`),quitOnNullishReturnValue:!0,emitEvent:!0},s||v?.okText)))},AG=e=>{let{prefixCls:t,placement:n,className:r,style:i,...a}=e,{getPrefixCls:o}=S.useContext(ga),s=o(`popconfirm`,t);return OG(s),S.createElement(Rw,{placement:n,className:J(s,r),style:i,content:S.createElement(kG,{prefixCls:s,...a})})},jG=S.forwardRef((e,t)=>{let{prefixCls:n,placement:r=`top`,trigger:i,okType:a=`primary`,icon:o=S.createElement(Pu,null),children:s,overlayClassName:c,onOpenChange:l,overlayStyle:u,styles:d,arrow:f,classNames:p,...m}=e,{getPrefixCls:h,className:g,style:_,classNames:v,styles:y,arrow:b,trigger:x}=ya(`popconfirm`),[C,w]=Gn(e.defaultOpen??!1,e.open),T=bw(f,b),E=i||x||`click`,D=e=>{w(e),l?.(e)},O=()=>{D(!1)},k=t=>e.onConfirm?.call(void 0,t),A=t=>{D(!1),e.onCancel?.call(void 0,t)},j=t=>{let{disabled:n=!1}=e;n||D(t)},M=h(`popconfirm`,n),N={...e,placement:r,trigger:E,okType:a,overlayStyle:u,styles:d,classNames:p},[P,F]=Cf([v,p],[y,d],{props:N}),I=J(M,g,c,P.root);return OG(M),S.createElement(zw,{arrow:T,...gi(m,[`title`]),trigger:E,placement:r,onOpenChange:j,open:C,ref:t,classNames:{root:I,container:P.container,arrow:P.arrow},styles:{root:{..._,...F.root,...u},container:F.container,arrow:F.arrow},content:S.createElement(kG,{okType:a,icon:o,...e,prefixCls:M,close:O,onConfirm:k,onCancel:A,classNames:P,styles:F}),"data-popover-inject":!0},s)});jG._InternalPanelDoNotUseOrYouWillBeFired=AG;var MG={percent:0,prefixCls:`rc-progress`,strokeColor:`#2db7f5`,strokeLinecap:`round`,strokeWidth:1,railColor:`#D9D9D9`,railWidth:1,gapPosition:`bottom`,loading:!1},NG=()=>{let e=(0,S.useRef)([]),t=(0,S.useRef)(null);return(0,S.useEffect)(()=>{let n=Date.now(),r=!1;e.current.forEach(e=>{if(!e)return;r=!0;let i=e.style;i.transitionDuration=`.3s, .3s, .3s, .06s`,t.current&&n-t.current<100&&(i.transitionDuration=`0s, 0s`)}),r&&(t.current=Date.now())}),e.current},PG=({bg:e,children:t})=>S.createElement(`div`,{style:{width:`100%`,height:`100%`,background:e}},t);function FG(e,t){return Object.keys(e).map(n=>{let r=`${Math.floor(parseFloat(n)*t)}%`;return`${e[n]} ${r}`})}var IG=S.forwardRef((e,t)=>{let{prefixCls:n,color:r,gradientId:i,radius:a,className:o,style:s,ptg:c,strokeLinecap:l,strokeWidth:u,size:d,gapDegree:f}=e,p=r&&typeof r==`object`,m=p?`#FFF`:void 0,h=d/2,g=S.createElement(`circle`,{className:J(`${n}-circle-path`,o),r:a,cx:h,cy:h,stroke:m,strokeLinecap:l,strokeWidth:u,opacity:c===0?0:1,style:s,ref:t});if(!p)return g;let _=`${i}-conic`,v=f?`${180+f/2}deg`:`0deg`,y=FG(r,(360-f)/360),b=FG(r,1),x=`conic-gradient(from ${v}, ${y.join(`, `)})`,C=`linear-gradient(to ${f?`bottom`:`top`}, ${b.join(`, `)})`;return S.createElement(S.Fragment,null,S.createElement(`mask`,{id:_},g),S.createElement(`foreignObject`,{x:0,y:0,width:d,height:d,mask:`url(#${_})`},S.createElement(PG,{bg:C},S.createElement(PG,{bg:x}))))}),LG=(e,t,n,r,i,a,o,s,c,l,u=0)=>{let d=n/100*360*((360-a)/360),f=a===0?0:{bottom:0,top:180,left:90,right:-90}[o],p=(100-r)/100*t;return c===`round`&&r!==100&&(p+=l/2,p>=t&&(p=t-.01)),{stroke:typeof s==`string`?s:void 0,strokeDasharray:`${t}px ${e}`,strokeDashoffset:p+u,transform:`rotate(${i+d+f}deg)`,transformOrigin:`50px 50px`,transition:`stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s`,fillOpacity:0}},RG=(({id:e,loading:t})=>{if(!t)return{indeterminateStyleProps:{},indeterminateStyleAnimation:null};let n=`${e}-indeterminate-animate`;return{indeterminateStyleProps:{transform:`rotate(0deg)`,animation:`${n} 1s linear infinite`},indeterminateStyleAnimation:S.createElement(`style`,null,`@keyframes ${n} { + `]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),color:e.colorText,fontFamily:e.fontFamily,lineHeight:r(`item-size-actual`),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,borderRadius:e.borderRadius,cursor:`pointer`,transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:`pointer`,userSelect:`none`},[`${t}-item-link`]:{display:`block`,width:`100%`,height:`100%`,padding:0,fontSize:e.fontSizeSM,textAlign:`center`,backgroundColor:`transparent`,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:`none`,transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:`transparent`}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:`inline-block`,marginInlineStart:e.margin,verticalAlign:`middle`,"&-size-changer":{width:`auto`},"&-quick-jumper":{display:`inline-block`,height:r(`item-size-actual`),marginInlineStart:e.marginXS,lineHeight:r(`item-size-actual`),verticalAlign:`baseline`,input:{...mI(e),...ZF(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...XF(e)},width:e.quickJumperInputWidth,height:r(`item-size-actual`),boxSizing:`border-box`,margin:0,marginInlineStart:r(`item-spacing-actual`),marginInlineEnd:r(`item-spacing-actual`)}}}}},TW=e=>{let{componentCls:t,antCls:n}=e,[,r]=tu(n,`pagination`);return{[`${t}-item`]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),fontFamily:e.fontFamily,lineHeight:Y(e.calc(r(`item-size-actual`)).sub(2).equal()),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,backgroundColor:e.itemBg,border:`${Y(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:`pointer`,userSelect:`none`,a:{display:`block`,padding:`0 ${Y(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:`none`}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},EW=e=>{let{componentCls:t,antCls:n}=e,[r,i]=tu(n,`pagination`);return{[t]:{[r(`item-size-actual`)]:Y(e.itemSize),[r(`item-spacing-actual`)]:Y(e.marginXS),"&-small":{[r(`item-size-actual`)]:Y(e.itemSizeSM),[r(`item-spacing-actual`)]:Y(e.marginXXS)},"&-large":{[r(`item-size-actual`)]:Y(e.itemSizeLG),[r(`item-spacing-actual`)]:Y(e.marginSM)},...Ul(e),display:`flex`,alignItems:`center`,"&-start":{justifyContent:`start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`end`},"ul, ol":{margin:0,padding:0,listStyle:`none`},"&::after":{display:`block`,clear:`both`,height:0,overflow:`hidden`,visibility:`hidden`,content:`""`},[`${t}-total-text`]:{display:`inline-block`,height:i(`item-size-actual`),marginInlineEnd:i(`item-spacing-actual`),lineHeight:Y(e.calc(i(`item-size-actual`)).sub(2).equal()),verticalAlign:`middle`},...TW(e),...wW(e),...CW(e),...xW(e),...SW(e),...bW(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:`none`}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:`none`}}},[`&${e.componentCls}-rtl`]:{direction:`rtl`}}},DW=e=>{let{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...ql(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...Kl(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Kl(e)}}}},OW=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...JF(e)}),kW=e=>dc(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:`0.13em`},qF(e)),AW=Ql(`Pagination`,e=>{let t=kW(e);return[EW(t),DW(t)]},OW),jW=e=>{let{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},MW=eu([`Pagination`,`bordered`],e=>jW(kW(e)),OW);function NW(e){return(0,S.useMemo)(()=>typeof e==`boolean`?[e,{}]:nf(e)?[!0,e]:[void 0,void 0],[e])}var PW=e=>{let{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:a,style:o,size:s,locale:c,responsive:l,showSizeChanger:u,selectComponentClass:d,pageSizeOptions:f,styles:p,classNames:m,...h}=e,{xs:g}=qC(l),[,_]=Vl(),{getPrefixCls:v,direction:y,showSizeChanger:b,className:x,style:C,classNames:w,styles:T,totalBoundaryShowSizeChanger:E}=ya(`pagination`),D=v(`pagination`,n),[O,k]=AW(D),A=Th(s),j=A===`small`||!!(g&&!A&&l),M={...e,size:A},[N,P]=Cf([w,m],[T,p],{props:M}),[F]=Yd(`Pagination`,kd),I={...F,...c},[L,R]=NW(u),[z,B]=NW(b),V=L??z,H=R??B,U=d||zC,ee=S.useMemo(()=>f?f.map(Number):void 0,[f]),W=e=>{let{disabled:t,size:n,onSizeChange:r,"aria-label":i,className:a,options:o}=e,{className:s,onChange:c}=H||{},l=o.find(e=>String(e.value)===String(n))?.value;return S.createElement(U,{disabled:t,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":i,options:o,...H,value:l,onChange:(e,t)=>{r?.(e),c?.(e,t)},size:A,className:J(a,s)})},te=S.useMemo(()=>{let e=S.createElement(`span`,{className:`${D}-item-ellipsis`},`•••`);return{prevIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(Bg,null):S.createElement(Uw,null)),nextIcon:S.createElement(`button`,{className:`${D}-item-link`,type:`button`,tabIndex:-1},y===`rtl`?S.createElement(Uw,null):S.createElement(Bg,null)),jumpPrevIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(lW,{className:`${D}-item-link-icon`}):S.createElement(oW,{className:`${D}-item-link-icon`}),e)),jumpNextIcon:S.createElement(`a`,{className:`${D}-item-link`},S.createElement(`div`,{className:`${D}-item-container`},y===`rtl`?S.createElement(oW,{className:`${D}-item-link-icon`}):S.createElement(lW,{className:`${D}-item-link-icon`}),e))}},[y,D]),G=v(`select`,r),ne=J({[`${D}-${t}`]:!!t,[`${D}-${A}`]:A,[`${D}-mini`]:j,[`${D}-rtl`]:y===`rtl`,[`${D}-bordered`]:_.wireframe},x,i,a,N.root,O,k),K={...P.root,...C,...o};return S.createElement(S.Fragment,null,_.wireframe&&S.createElement(MW,{prefixCls:D}),S.createElement(yW,{...te,...h,styles:P,classNames:N,style:K,prefixCls:D,selectPrefixCls:G,className:ne,locale:I,pageSizeOptions:ee,showSizeChanger:V,totalBoundaryShowSizeChanger:h.totalBoundaryShowSizeChanger??E,sizeChangerRender:W}))},FW=100,IW=FW/5,LW=FW/2-IW/2,RW=LW*2*Math.PI,zW=50,BW=e=>{let{dotClassName:t,style:n,hasCircleCls:r}=e;return S.createElement(`circle`,{className:J(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:LW,cx:zW,cy:zW,strokeWidth:IW,style:n})},VW=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[a,o]=S.useState(!1);Hn(()=>{e!==0&&o(!0)},[e!==0]);let s=Math.max(Math.min(e,100),0);if(!a)return null;let c={strokeDashoffset:`${RW/4}`,strokeDasharray:`${RW*s/100} ${RW*(100-s)/100}`};return S.createElement(`span`,{className:J(r,`${n}-progress`,{[i]:s<=0})},S.createElement(`svg`,{viewBox:`0 0 ${FW} ${FW}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},S.createElement(BW,{dotClassName:n,hasCircleCls:!0}),S.createElement(BW,{dotClassName:n,style:c})))};function HW(e){let{prefixCls:t,percent:n=0,className:r,style:i}=e,a=`${t}-dot`,o=`${a}-holder`,s=`${o}-hidden`;return S.createElement(S.Fragment,null,S.createElement(`span`,{className:J(o,r,n>0&&s),style:i},S.createElement(`span`,{className:J(a,`${t}-dot-spin`)},[1,2,3,4].map(e=>S.createElement(`i`,{className:`${t}-dot-item`,key:e})))),S.createElement(VW,{prefixCls:t,percent:n}))}function UW(e){let{prefixCls:t,indicator:n,percent:r,className:i,style:a}=e,o=`${t}-dot`;return n&&S.isValidElement(n)?um(n,e=>({className:J(e.className,o,i),style:{...e.style,...a},percent:r})):S.createElement(HW,{prefixCls:t,percent:r,className:i,style:a})}var WW=new Ms(`antSpinMove`,{to:{opacity:1}}),GW=new Ms(`antRotate`,{to:{transform:`rotate(405deg)`}}),KW=e=>{let{componentCls:t}=e,n=`${t}-section`;return{[t]:{...Ul(e),position:`relative`,"&-rtl":{direction:`rtl`},[`&${n}, ${n}`]:{display:`flex`,alignItems:`center`,flexDirection:`column`,gap:e.paddingSM,color:e.colorPrimary},[`&${n}`]:{display:`inline-flex`},[n]:{position:`absolute`,top:`50%`,left:{_skip_check_:!0,value:`50%`},transform:`translate(-50%, -50%)`,zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:`relative`,transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:`100%`,height:`100%`,background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`""`,pointerEvents:`none`}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:`both`,opacity:.5,userSelect:`none`,pointerEvents:`none`,"&::after":{opacity:.4,pointerEvents:`auto`}}},"&-fullscreen":{position:`fixed`,inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:`none`,transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:`auto`},[n]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},qW=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r}=e,[i,a]=tu(n,`spin`);return{[t]:{[i(`dot-holder-size`)]:e.dotSize,[i(`dot-item-size`)]:`calc((${a(`dot-holder-size`)} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:`1em`,height:`1em`,fontSize:a(`dot-holder-size`),display:`inline-block`,transition:[`transform`,`opacity`].map(e=>`${e} ${r} ease`).join(`, `),transformOrigin:`50% 50%`,lineHeight:1,"&-hidden":{transform:`scale(0.3)`,opacity:0}},position:`relative`,display:`inline-block`,fontSize:a(`dot-holder-size`),width:`1em`,height:`1em`,"&-spin":{transform:`rotate(45deg)`,animationName:GW,animationDuration:`1.2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`},"&-item":{position:`absolute`,display:`block`,width:a(`dot-item-size`),height:a(`dot-item-size`),background:`currentColor`,borderRadius:`100%`,transform:`scale(0.75)`,transformOrigin:`50% 50%`,opacity:.3,animationName:WW,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,animationDirection:`alternate`,"&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:`0s`},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:`0.4s`},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:`0.8s`},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:`1.2s`}},"&-progress":{position:`absolute`,left:`50%`,top:0,transform:`translateX(-50%)`},"&-circle":{strokeLinecap:`round`,transition:[`stroke-dashoffset`,`stroke-dasharray`,`stroke`,`stroke-width`,`opacity`].map(e=>`${e} ${r} ease`).join(`,`),fillOpacity:0,stroke:`currentcolor`},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},JW=e=>{let{componentCls:t}=e,[n]=tu(e.antCls,`spin`);return{[t]:{"&-sm":{[n(`dot-holder-size`)]:e.dotSizeSM},"&-lg":{[n(`dot-holder-size`)]:e.dotSizeLG}}}},YW=Ql(`Spin`,e=>{let t=dc(e,{spinDotDefault:e.colorTextDescription});return[KW(t),qW(t),JW(t)]},e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}}),XW=200,ZW=[[30,.05],[70,.03],[96,.01]];function QW(e,t){let[n,r]=S.useState(0),i=S.useRef(null),a=t===`auto`;return S.useEffect(()=>(a&&e&&(r(0),i.current=setInterval(()=>{r(e=>{let t=100-e;for(let n=0;n{i.current&&=(clearInterval(i.current),null)}),[a,e]),a?n:t}var $W;function eG(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var tG=e=>{let{prefixCls:t,spinning:n=!0,delay:r=0,className:i,rootClassName:a,size:o,tip:s,description:c,wrapperClassName:l,style:u,children:d,fullscreen:f=!1,indicator:p,percent:m,classNames:h,styles:g,..._}=e,{getPrefixCls:v,direction:y,indicator:b,className:x,style:C,classNames:w,styles:T}=ya(`spin`),E=v(`spin`,t),[D,O]=YW(E),[k,A]=S.useState(()=>n&&!eG(n,r)),j=QW(k,m);S.useEffect(()=>{if(n){let e=vre(r,()=>{A(!0)});return e(),()=>{e?.cancel?.()}}A(!1)},[r,n]);let M=Th(e=>o??e),N=c??s,P={...e,size:M,spinning:k,tip:N,description:N,fullscreen:f,children:d,percent:j},[F,I]=Cf([w,h],[T,g],{props:P}),L=p??b??$W,R=d!==void 0,z=R||f,B=S.createElement(S.Fragment,null,S.createElement(UW,{className:J(F.indicator),style:I.indicator,prefixCls:E,indicator:L,percent:j}),N&&S.createElement(`div`,{className:J(`${E}-description`,F.tip,F.description),style:{...I.tip,...I.description}},N));return S.createElement(`div`,{className:J(E,{[`${E}-sm`]:M===`small`,[`${E}-lg`]:M===`large`,[`${E}-spinning`]:k,[`${E}-rtl`]:y===`rtl`,[`${E}-fullscreen`]:f},a,F.root,f&&F.mask,z?l:[`${E}-section`,F.section],x,i,D,O),style:{...I.root,...z?{}:I.section,...f?I.mask:{},...C,...u},"aria-live":`polite`,"aria-busy":k,..._},k&&(z?S.createElement(`div`,{className:J(`${E}-section`,F.section),style:I.section},B):B),R&&S.createElement(`div`,{className:J(`${E}-container`,F.container),style:I.container},d))};tG.setDefaultIndicator=e=>{$W=e};var nG=S.createContext({});nG.Consumer;var rG=({prefixCls:e,className:t,avatar:n,title:r,description:i,...a})=>{let{getPrefixCls:o}=(0,S.useContext)(ga),s=o(`list`,e),c=J(`${s}-item-meta`,t),l=S.createElement(`div`,{className:`${s}-item-meta-content`},r&&S.createElement(`h4`,{className:`${s}-item-meta-title`},r),i&&S.createElement(`div`,{className:`${s}-item-meta-description`},i));return S.createElement(`div`,{...a,className:c},n&&S.createElement(`div`,{className:`${s}-item-meta-avatar`},n),(r||i)&&l)},iG=S.forwardRef((e,t)=>{let{prefixCls:n,children:r,actions:i,extra:a,styles:o,className:s,classNames:c,colStyle:l,...u}=e,{grid:d,itemLayout:f}=(0,S.useContext)(nG),{getPrefixCls:p,list:m}=(0,S.useContext)(ga),h=e=>J(m?.item?.classNames?.[e],c?.[e]),g=e=>({...m?.item?.styles?.[e],...o?.[e]}),_=()=>{let e=ki(r);return e.some(e=>typeof e==`string`)&&e.length>1},v=()=>f===`vertical`?!!a:!_(),y=p(`list`,n),b=i&&i.length>0&&S.createElement(`ul`,{className:J(`${y}-item-action`,h(`actions`)),key:`actions`,style:g(`actions`)},i.map((e,t)=>S.createElement(`li`,{key:`${y}-item-action-${t}`},e,t!==i.length-1&&S.createElement(`em`,{className:`${y}-item-action-split`})))),x=d?`div`:`li`,C=S.createElement(x,{...u,...d?{}:{ref:t},className:J(`${y}-item`,{[`${y}-item-no-flex`]:!v()},s)},f===`vertical`&&a?[S.createElement(`div`,{className:`${y}-item-main`,key:`content`},r,b),S.createElement(`div`,{className:J(`${y}-item-extra`,h(`extra`)),key:`extra`,style:g(`extra`)},a)]:[r,b,um(a,{key:`extra`})]);return d?S.createElement(gR,{ref:t,flex:1,style:l},C):C});iG.Meta=rG;var aG=e=>{let{listBorderedCls:t,componentCls:n,paddingLG:r,margin:i,itemPaddingSM:a,itemPaddingLG:o,marginLG:s,borderRadiusLG:c}=e,l=Y(e.calc(c).sub(e.lineWidth).equal());return{[t]:{border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:c,[`${n}-header`]:{borderRadius:`${l} ${l} 0 0`},[`${n}-footer`]:{borderRadius:`0 0 ${l} ${l}`},[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:r},[`${n}-pagination`]:{margin:`${Y(i)} ${Y(s)}`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:o}}}},oG=e=>{let{componentCls:t,screenSM:n,screenMD:r,marginLG:i,marginSM:a,margin:o}=e;return{[`@media screen and (max-width:${r}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:i}}}},[`@media screen and (max-width: ${n}px)`]:{[t]:{[`${t}-item`]:{flexWrap:`wrap`,[`${t}-action`]:{marginInlineStart:a}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:`wrap-reverse`,[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${Y(o)}`}}}}}},sG=e=>{let{componentCls:t,antCls:n,controlHeight:r,minHeight:i,paddingSM:a,marginLG:o,padding:s,itemPadding:c,colorPrimary:l,itemPaddingSM:u,itemPaddingLG:d,paddingXS:f,margin:p,colorText:m,colorTextDescription:h,motionDurationSlow:g,lineWidth:_,headerBg:v,footerBg:y,emptyTextPadding:b,metaMarginBottom:x,avatarMarginRight:S,titleMarginBottom:C,descriptionFontSize:w}=e;return{[t]:{...Ul(e),position:`relative`,"--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:`none`},[`${t}-header`]:{background:v},[`${t}-footer`]:{background:y},[`${t}-header, ${t}-footer`]:{paddingBlock:a},[`${t}-pagination`]:{marginBlockStart:o,[`${n}-pagination-options`]:{textAlign:`start`}},[`${t}-spin`]:{minHeight:i,textAlign:`center`},[`${t}-items`]:{margin:0,padding:0,listStyle:`none`},[`${t}-item`]:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:c,color:m,[`${t}-item-meta`]:{display:`flex`,flex:1,alignItems:`flex-start`,maxWidth:`100%`,[`${t}-item-meta-avatar`]:{marginInlineEnd:S},[`${t}-item-meta-content`]:{flex:`1 0`,width:0,color:m},[`${t}-item-meta-title`]:{margin:`0 0 ${Y(e.marginXXS)} 0`,color:m,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:m,transition:`all ${g}`,"&:hover":{color:l}}},[`${t}-item-meta-description`]:{color:h,fontSize:w,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:`0 0 auto`,marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:`none`,"& > li":{position:`relative`,display:`inline-block`,padding:`0 ${Y(f)}`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`center`,"&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineEnd:0,width:_,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:`translateY(-50%)`,backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${Y(s)} 0`,color:h,fontSize:e.fontSizeSM,textAlign:`center`},[`${t}-empty-text`]:{padding:b,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:`center`},[`${t}-item-no-flex`]:{display:`block`}},[`${t}-grid ${n}-col > ${t}-item`]:{display:`block`,maxWidth:`100%`,marginBlockEnd:p,paddingBlock:0,borderBlockEnd:`none`},[`${t}-vertical ${t}-item`]:{alignItems:`initial`,[`${t}-item-main`]:{display:`block`,flex:1},[`${t}-item-extra`]:{marginInlineStart:o},[`${t}-item-meta`]:{marginBlockEnd:x,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:C,color:m,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:s,marginInlineStart:`auto`,"> li":{padding:`0 ${Y(s)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:`none`}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:r},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:d},[`${t}-sm ${t}-item`]:{padding:u},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:`right`}}}}},cG=Ql(`List`,e=>{let t=dc(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[sG(t),aG(t),oG(t)]},e=>({contentWidth:220,itemPadding:`${Y(e.paddingContentVertical)} 0`,itemPaddingSM:`${Y(e.paddingContentVerticalSM)} ${Y(e.paddingContentHorizontal)}`,itemPaddingLG:`${Y(e.paddingContentVerticalLG)} ${Y(e.paddingContentHorizontalLG)}`,headerBg:`transparent`,footerBg:`transparent`,emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),{extraCssVarPrefixCls:({prefixCls:e})=>[`${e}-container`]}),lG=S.forwardRef((e,t)=>{let{pagination:n=!1,prefixCls:r,bordered:i=!1,split:a=!0,className:o,rootClassName:s,style:c,children:l,itemLayout:u,loadMore:d,grid:f,dataSource:p=[],size:m,header:h,footer:g,loading:_=!1,rowKey:v,renderItem:y,locale:b,...x}=e,C=nf(n)?n:{},[w,T]=S.useState(C.defaultCurrent||1),[E,D]=S.useState(C.defaultPageSize||10),{getPrefixCls:O,direction:k,className:A,style:j}=ya(`list`),{renderEmpty:M}=S.useContext(ga),N={current:1,total:0,position:`bottom`},P=e=>(t,r)=>{T(t),D(r),n&&n?.[e]?.(t,r)},F=P(`onChange`),I=P(`onShowSizeChange`),L=(e,t)=>{if(!y)return null;let n;return n=typeof v==`function`?v(e):v?e[v]:e.key,n||=`list-item-${t}`,S.createElement(S.Fragment,{key:n},y(e,t))},R=!!(d||n||g),z=O(`list`,r),[B,V]=cG(z),H=_;typeof H==`boolean`&&(H={spinning:H});let U=!!H?.spinning,ee=Th(m),W=``;switch(ee){case`large`:W=`lg`;break;case`small`:W=`sm`;break;default:break}let te=J(z,{[`${z}-vertical`]:u===`vertical`,[`${z}-${W}`]:W,[`${z}-split`]:a,[`${z}-bordered`]:i,[`${z}-loading`]:U,[`${z}-grid`]:!!f,[`${z}-something-after-last-item`]:R,[`${z}-rtl`]:k===`rtl`},A,o,s,B,V),G=`${z}-container`,ne=Qd(N,{total:p.length,current:w,pageSize:E},n||{}),K=Math.ceil(ne.total/ne.pageSize);ne.current=Math.min(ne.current,K);let re=n&&S.createElement(`div`,{className:J(`${z}-pagination`)},S.createElement(PW,{align:`end`,...ne,onChange:F,onShowSizeChange:I})),ie=pa(p);n&&p.length>(ne.current-1)*ne.pageSize&&(ie=pa(p).splice((ne.current-1)*ne.pageSize,ne.pageSize));let ae=qC(Object.keys(f||{}).some(e=>VC.includes(e))),q=S.useMemo(()=>{for(let e=0;e{if(!f)return;let e=q&&f[q]?f[q]:f.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(f),q]),se=U&&S.createElement(`div`,{style:{minHeight:53}});if(ie.length>0){let e=ie.map(L);se=f?S.createElement(yR,{className:J(G,V),gutter:f.gutter},S.Children.map(e,e=>S.createElement(`div`,{key:e?.key,style:oe},e))):S.createElement(`ul`,{className:J(`${z}-items`,G,V)},e)}else !l&&!U&&(se=S.createElement(`div`,{className:`${z}-empty-text`},b?.emptyText||M?.(`List`)||S.createElement(uC,{componentName:`List`})));let ce=ne.position,le=S.useMemo(()=>({grid:f,itemLayout:u}),[JSON.stringify(f),u]);return S.createElement(nG.Provider,{value:le},S.createElement(`div`,{ref:t,style:{...j,...c},className:te,...x},(ce===`top`||ce===`both`)&&re,h&&S.createElement(`div`,{className:`${z}-header`},h),S.createElement(tG,{...H},se,l),g&&S.createElement(`div`,{className:`${z}-footer`},g),d||(ce===`bottom`||ce===`both`)&&re))});lG.Item=iG;var uG=(e,t={})=>!$d(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],dG=null,fG=e=>e(),pG=[],mG={};function hG(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:i}=mG,a=e?.()||document.body;return{getContainer:()=>a,duration:t,rtl:n,maxCount:r,top:i}}var gG=S.forwardRef((e,t)=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:i}=(0,S.useContext)(ga),a=mG.prefixCls||i(`message`),o=(0,S.useContext)(Yb),[s,c]=lh({...n,prefixCls:a,...o.message});return S.useImperativeHandle(t,()=>{let e={...s};return Object.keys(e).forEach(t=>{e[t]=(...e)=>(r(),s[t].apply(s,e))}),{instance:e,sync:r}}),c}),_G=S.forwardRef((e,t)=>{let[n,r]=S.useState(hG),i=()=>{r(hG)};S.useEffect(i,[]);let a=Am(),o=a.getRootPrefixCls(),s=a.getIconPrefixCls(),c=a.getTheme(),l=S.createElement(gG,{ref:t,sync:i,messageConfig:n});return S.createElement(jm,{prefixCls:o,iconPrefixCls:s,theme:c},a.holderRender?a.holderRender(l):l)}),vG=()=>{if(!dG){let e=document.createDocumentFragment(),t={fragment:e};dG=t,fG(()=>{zi(S.createElement(_G,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,vG())})}}),e)});return}dG.instance&&(pG.forEach(e=>{let{type:t,skipped:n}=e;if(!n)switch(t){case`open`:fG(()=>{let t=dG.instance.open({...mG,...e.config});t?.then(e.resolve),e.setCloseFn(t)});break;case`destroy`:fG(()=>{dG?.instance.destroy(e.key)});break;default:fG(()=>{var n;let r=(n=dG.instance)[t].apply(n,pa(e.args));r?.then(e.resolve),e.setCloseFn(r)})}}),pG=[])};function yG(e){mG={...mG,...e},fG(()=>{dG?.sync?.()})}function bG(e){let t=nh(t=>{let n,r={type:`open`,config:e,resolve:t,setCloseFn:e=>{n=e}};return pG.push(r),()=>{n?fG(()=>{n()}):r.skipped=!0}});return vG(),t}function xG(e,t){let n=nh(n=>{let r,i={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return pG.push(i),()=>{r?fG(()=>{r()}):i.skipped=!0}});return vG(),n}var SG=e=>{pG.push({type:`destroy`,key:e}),vG()},CG=[`success`,`info`,`warning`,`error`,`loading`],Z={open:bG,destroy:SG,config:yG,useMessage:uh,_InternalPanelDoNotUseOrYouWillBeFired:eh};CG.forEach(e=>{Z[e]=(...t)=>xG(e,t)});var wG=tx(e=>{let{prefixCls:t,className:n,closeIcon:r,closable:i,type:a,title:o,children:s,footer:c,classNames:l,styles:u,...d}=e,{getPrefixCls:f}=S.useContext(ga),{className:p,style:m,classNames:h,styles:g}=ya(`modal`),_=f(),v=t||f(`modal`),y=sp(_),[b,x]=eb(v,y),[C,w]=Cf([h,l],[g,u],{props:e}),T=`${v}-confirm`,E={};return E=a?{closable:i??!1,title:``,footer:``,children:S.createElement(ab,{...e,prefixCls:v,confirmPrefixCls:T,rootPrefixCls:_,content:s})}:{closable:i??!0,title:o,footer:c!==null&&S.createElement(Wy,{...e}),children:s},S.createElement(T_,{prefixCls:v,className:J(b,`${v}-pure-panel`,a&&T,a&&`${T}-${a}`,n,p,x,y,C.root),style:{...m,...w.root},...d,closeIcon:Uy(v,r),closable:i,classNames:C,styles:w,...E})});function TG(e){return fb(pb(e))}var EG=nb;EG.useModal=Sb,EG.info=function(e){return fb(mb(e))},EG.success=function(e){return fb(hb(e))},EG.error=function(e){return fb(gb(e))},EG.warning=TG,EG.warn=TG,EG.confirm=function(e){return fb(_b(e))},EG.destroyAll=function(){for(;cb.length;){let e=cb.pop();e&&e()}},EG.config=vb,EG._InternalPanelDoNotUseOrYouWillBeFired=wG;var DG=Ql(`Popconfirm`,e=>{let{componentCls:t,iconCls:n,antCls:r,zIndexPopup:i,colorText:a,colorWarning:o,marginXXS:s,marginXS:c,fontSize:l,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:i,[`&${r}-popover`]:{fontSize:l},[`${t}-message`]:{marginBottom:c,display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${t}-message-icon ${n}`]:{color:o,fontSize:l,lineHeight:1,marginInlineEnd:c},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:`normal`}},[`${t}-description`]:{marginTop:s,color:a}},[`${t}-buttons`]:{textAlign:`end`,whiteSpace:`nowrap`,button:{marginInlineStart:c}}}}},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),OG=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:i,description:a,cancelText:o,okText:s,okType:c=`primary`,icon:l=S.createElement(Pu,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:p,onPopupClick:m,classNames:h,styles:g}=e,{getPrefixCls:_}=S.useContext(ga),[v]=Yd(`Popconfirm`,Hd.Popconfirm),y=$C(i),b=$C(a);return S.createElement(`div`,{className:`${t}-inner-content`,onClick:m},S.createElement(`div`,{className:`${t}-message`},l&&S.createElement(`span`,{className:`${t}-message-icon`},l),S.createElement(`div`,{className:`${t}-message-text`},y&&S.createElement(`div`,{className:J(`${t}-title`,h?.title),style:g?.title},y),b&&S.createElement(`div`,{className:J(`${t}-description`,h?.content),style:g?.content},b))),S.createElement(`div`,{className:`${t}-buttons`},u&&S.createElement(h_,{onClick:p,size:`small`,...r},o||v?.cancelText),S.createElement(g_,{buttonProps:{size:`small`,...Ih(c),...n},actionFn:f,close:d,prefixCls:_(`btn`),quitOnNullishReturnValue:!0,emitEvent:!0},s||v?.okText)))},kG=e=>{let{prefixCls:t,placement:n,className:r,style:i,...a}=e,{getPrefixCls:o}=S.useContext(ga),s=o(`popconfirm`,t);return DG(s),S.createElement(Iw,{placement:n,className:J(s,r),style:i,content:S.createElement(OG,{prefixCls:s,...a})})},AG=S.forwardRef((e,t)=>{let{prefixCls:n,placement:r=`top`,trigger:i,okType:a=`primary`,icon:o=S.createElement(Pu,null),children:s,overlayClassName:c,onOpenChange:l,overlayStyle:u,styles:d,arrow:f,classNames:p,...m}=e,{getPrefixCls:h,className:g,style:_,classNames:v,styles:y,arrow:b,trigger:x}=ya(`popconfirm`),[C,w]=Gn(e.defaultOpen??!1,e.open),T=vw(f,b),E=i||x||`click`,D=e=>{w(e),l?.(e)},O=()=>{D(!1)},k=t=>e.onConfirm?.call(void 0,t),A=t=>{D(!1),e.onCancel?.call(void 0,t)},j=t=>{let{disabled:n=!1}=e;n||D(t)},M=h(`popconfirm`,n),N={...e,placement:r,trigger:E,okType:a,overlayStyle:u,styles:d,classNames:p},[P,F]=Cf([v,p],[y,d],{props:N}),I=J(M,g,c,P.root);return DG(M),S.createElement(Lw,{arrow:T,...gi(m,[`title`]),trigger:E,placement:r,onOpenChange:j,open:C,ref:t,classNames:{root:I,container:P.container,arrow:P.arrow},styles:{root:{..._,...F.root,...u},container:F.container,arrow:F.arrow},content:S.createElement(OG,{okType:a,icon:o,...e,prefixCls:M,close:O,onConfirm:k,onCancel:A,classNames:P,styles:F}),"data-popover-inject":!0},s)});AG._InternalPanelDoNotUseOrYouWillBeFired=kG;var jG={percent:0,prefixCls:`rc-progress`,strokeColor:`#2db7f5`,strokeLinecap:`round`,strokeWidth:1,railColor:`#D9D9D9`,railWidth:1,gapPosition:`bottom`,loading:!1},MG=()=>{let e=(0,S.useRef)([]),t=(0,S.useRef)(null);return(0,S.useEffect)(()=>{let n=Date.now(),r=!1;e.current.forEach(e=>{if(!e)return;r=!0;let i=e.style;i.transitionDuration=`.3s, .3s, .3s, .06s`,t.current&&n-t.current<100&&(i.transitionDuration=`0s, 0s`)}),r&&(t.current=Date.now())}),e.current},NG=({bg:e,children:t})=>S.createElement(`div`,{style:{width:`100%`,height:`100%`,background:e}},t);function PG(e,t){return Object.keys(e).map(n=>{let r=`${Math.floor(parseFloat(n)*t)}%`;return`${e[n]} ${r}`})}var FG=S.forwardRef((e,t)=>{let{prefixCls:n,color:r,gradientId:i,radius:a,className:o,style:s,ptg:c,strokeLinecap:l,strokeWidth:u,size:d,gapDegree:f}=e,p=r&&typeof r==`object`,m=p?`#FFF`:void 0,h=d/2,g=S.createElement(`circle`,{className:J(`${n}-circle-path`,o),r:a,cx:h,cy:h,stroke:m,strokeLinecap:l,strokeWidth:u,opacity:c===0?0:1,style:s,ref:t});if(!p)return g;let _=`${i}-conic`,v=f?`${180+f/2}deg`:`0deg`,y=PG(r,(360-f)/360),b=PG(r,1),x=`conic-gradient(from ${v}, ${y.join(`, `)})`,C=`linear-gradient(to ${f?`bottom`:`top`}, ${b.join(`, `)})`;return S.createElement(S.Fragment,null,S.createElement(`mask`,{id:_},g),S.createElement(`foreignObject`,{x:0,y:0,width:d,height:d,mask:`url(#${_})`},S.createElement(NG,{bg:C},S.createElement(NG,{bg:x}))))}),IG=(e,t,n,r,i,a,o,s,c,l,u=0)=>{let d=n/100*360*((360-a)/360),f=a===0?0:{bottom:0,top:180,left:90,right:-90}[o],p=(100-r)/100*t;return c===`round`&&r!==100&&(p+=l/2,p>=t&&(p=t-.01)),{stroke:typeof s==`string`?s:void 0,strokeDasharray:`${t}px ${e}`,strokeDashoffset:p+u,transform:`rotate(${i+d+f}deg)`,transformOrigin:`50px 50px`,transition:`stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s`,fillOpacity:0}},LG=(({id:e,loading:t})=>{if(!t)return{indeterminateStyleProps:{},indeterminateStyleAnimation:null};let n=`${e}-indeterminate-animate`;return{indeterminateStyleProps:{transform:`rotate(0deg)`,animation:`${n} 1s linear infinite`},indeterminateStyleAnimation:S.createElement(`style`,null,`@keyframes ${n} { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } - }`)}});function zG(){return zG=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,prefixCls:n,classNames:r={},styles:i={},steps:a,strokeWidth:o,railWidth:s,gapDegree:c=0,gapPosition:l,railColor:u,strokeLinecap:d,style:f,className:p,strokeColor:m,percent:h,loading:g,..._}={...MG,...e},v=Xn(t),y=`${v}-gradient`,b=50-o/2,x=Math.PI*2*b,C=c>0?90+c/2:-90,w=x*((360-c)/360),{count:T,gap:E}=typeof a==`object`?a:{count:a,gap:2},D=BG(h),O=BG(m),k=O.find(e=>e&&typeof e==`object`),A=k&&typeof k==`object`?`butt`:d,{indeterminateStyleProps:j,indeterminateStyleAnimation:M}=RG({id:v,loading:g}),N=LG(x,w,0,100,C,c,l,u,A,o),P=NG(),F=()=>{let e=0;return D.map((t,a)=>{let s=O[a]||O[O.length-1],u=LG(x,w,e,t,C,c,l,s,A,o);return e+=t,S.createElement(IG,{key:a,color:s,ptg:t,radius:b,prefixCls:n,gradientId:y,className:r.track,style:{...u,...j,...i.track},strokeLinecap:A,strokeWidth:o,gapDegree:c,ref:e=>{P[a]=e},size:100})}).reverse()},I=()=>{let e=Math.round(T*(D[0]/100)),t=100/T,a=0;return Array(T).fill(null).map((s,d)=>{let f=d<=e-1?O[0]:u,p=f&&typeof f==`object`?`url(#${y})`:void 0,m=LG(x,w,a,t,C,c,l,f,`butt`,o,E);return a+=(w-m.strokeDashoffset+E)*100/w,S.createElement(`circle`,{key:d,className:J(`${n}-circle-path`,r.track),r:b,cx:50,cy:50,stroke:p,strokeWidth:o,opacity:1,style:{...m,...i.track},ref:e=>{P[d]=e}})})};return S.createElement(`svg`,zG({className:J(`${n}-circle`,r.root,p),viewBox:`0 0 100 100`,style:{...i.root,...f},id:t,role:`presentation`},_),!T&&S.createElement(`circle`,{className:J(`${n}-circle-rail`,r.rail),r:b,cx:50,cy:50,stroke:u,strokeLinecap:A,strokeWidth:s||o,style:{...N,...i.rail}}),T?I():F(),M)};function HG(e){return!e||e<0?0:e>100?100:e}function UG({success:e}){let t;return e&&`percent`in e&&(t=e.percent),t}var WG=({percent:e,success:t})=>{let n=HG(UG({success:t}));return[n,HG(HG(e)-n)]},GG=({success:e={},strokeColor:t})=>{let{strokeColor:n}=e;return[n||Kc.green,t||null]},KG=(e,t,n)=>{let r=-1,i=-1;if(t===`step`){let t=n.steps,a=n.strokeWidth;typeof e==`string`||e===void 0?(r=e===`small`?2:14,i=a??8):ef(e)?[r,i]=[e,e]:[r=14,i=8]=Array.isArray(e)?e:[e.width,e.height],r*=t}else if(t===`line`){let t=n?.strokeWidth;typeof e==`string`||e===void 0?i=t||(e===`small`?6:8):ef(e)?[r,i]=[e,e]:[r=-1,i=8]=Array.isArray(e)?e:[e.width,e.height]}else (t===`circle`||t===`dashboard`)&&(typeof e==`string`||e===void 0?[r,i]=e===`small`?[60,60]:[120,120]:ef(e)?[r,i]=[e,e]:Array.isArray(e)&&(r=e[0]??e[1]??120,i=e[0]??e[1]??120));return[r,i]},qG=3,JG=e=>qG/e*100,YG=[`root`,`body`,`indicator`],XG=e=>{let{prefixCls:t,classNames:n,styles:r,railColor:i,trailColor:a,strokeLinecap:o=`round`,gapPosition:s,gapPlacement:c,gapDegree:l,width:u=120,type:d,children:f,success:p,size:m=u,steps:h}=e,{direction:g}=ya(`progress`),_=i??a,[v,y]=KG(m,`circle`),{strokeWidth:b}=e;b===void 0&&(b=Math.max(JG(v),6));let x={width:v,height:y,fontSize:v*.15+6},C=S.useMemo(()=>{if(l||l===0)return l;if(d===`dashboard`)return 75},[l,d]),w=WG(e),T=S.useMemo(()=>{let e=(c??s)||d===`dashboard`&&`bottom`||void 0,t=g===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[g,c,s,d]),E=Object.prototype.toString.call(e.strokeColor)===`[object Object]`,D=GG({success:p,strokeColor:e.strokeColor}),O=J(`${t}-body`,{[`${t}-circle-gradient`]:E},n.body),k=S.createElement(VG,{steps:h,percent:h?w[1]:w,strokeWidth:b,railWidth:b,strokeColor:h?D[1]:D,strokeLinecap:o,railColor:_,prefixCls:t,gapDegree:C,gapPosition:T,classNames:gi(n,YG),styles:gi(r,YG)}),A=v<=20,j=S.createElement(`div`,{className:O,style:{...x,...r.body}},k,!A&&f);return A?S.createElement(jw,{title:f},j):j},ZG=`--progress-line-stroke-color`,QG=e=>{let t=e?`100%`:`-100%`;return new Ms(`antProgress${e?`RTL`:`LTR`}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:`translateX(0) scaleX(1)`,opacity:0}})},$G=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{...Ul(e),display:`inline-flex`,"&-rtl":{direction:`rtl`},[`${t}-indicator`]:{color:e.colorText,lineHeight:1,whiteSpace:`nowrap`,verticalAlign:`middle`,wordBreak:`normal`,[n]:{fontSize:e.fontSize}},[`&${t}-status-exception`]:{[`${t}-indicator`]:{color:e.colorError}},[`&${t}-status-success`]:{[`${t}-indicator`]:{color:e.colorSuccess}}}}},eK=e=>{let{componentCls:t}=e;return{[`${t}-line`]:{position:`relative`,width:`100%`,fontSize:e.fontSize,[`${t}-body`]:{display:`inline-flex`,alignItems:`center`,width:`100%`,gap:e.marginXS},[`${t}-rail`]:{flex:`auto`,background:e.remainingColor,borderRadius:e.lineBorderRadius,position:`relative`,width:`100%`,overflow:`hidden`},[`&${t}-status-active`]:{[`${t}-track:after`]:{content:`""`,position:`absolute`,inset:0,backgroundColor:e.colorBgContainer,borderRadius:`inherit`,opacity:0,animationName:QG(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:`infinite`}},[`${t}-track`]:{position:`absolute`,insetInlineStart:0,insetBlock:0,borderRadius:`inherit`,background:e.defaultColor,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,minWidth:`max-content`,display:`flex`,alignItems:`center`,"&-success":{background:e.colorSuccess}},[`&${t}-status-exception`]:{[`${t}-track`]:{background:e.colorError}},[`&${t}-status-success`]:{[`${t}-track`]:{background:e.colorSuccess}},[`${t}-indicator-outer`]:{[`&${t}-indicator-start`]:{order:-1}},[`${t}-body-layout-bottom`]:{flexDirection:`column`,alignItems:`center`,gap:e.marginXXS},[`${t}-indicator${t}-indicator-inner`]:{color:e.colorWhite,paddingInline:e.paddingXXS,width:`100%`,display:`flex`,justifyContent:`center`,[`&${t}-indicator-end`]:{justifyContent:`end`},[`&${t}-indicator-start`]:{justifyContent:`start`},[`&${t}-indicator-bright`]:{color:`rgba(0, 0, 0, 0.45)`}}}}},tK=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-circle`]:{[`${t}-circle-rail`]:{stroke:e.remainingColor},[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-body`]:{position:`relative`,lineHeight:1,backgroundColor:`transparent`},[`${t}-indicator`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineStart:0,width:`100%`,margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:`normal`,textAlign:`center`,transform:`translateY(-50%)`,[n]:{fontSize:e.circleIconFontSize}},[`&${t}-status-exception`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}}},[`&${t}-status-success`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:`bottom`}}}},nK=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:`inline-block`,"&-body":{display:`flex`,flexDirection:`row`,alignItems:`center`,gap:e.progressStepMarginInlineEnd,[`${t}-indicator`]:{marginInlineStart:e.marginXS}},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},rK=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-indicator ${n}`]:{fontSize:e.fontSizeSM}}}},iK=Ql(`Progress`,e=>{let t=e.calc(e.marginXXS).div(2).equal(),n=dc(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:`2.4s`});return[$G(n),eK(n),tK(n),nK(n),rK(n)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:`1em`,circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`})),aK=e=>{let t=[];return Object.keys(e).forEach(n=>{let r=Number.parseFloat(n.replace(/%/g,``));Number.isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((e,t)=>e.key-t.key),t.map(({key:e,value:t})=>`${t} ${e}%`).join(`, `)},oK=(e,t)=>{let{from:n=Kc.blue,to:r=Kc.blue,direction:i=t===`rtl`?`to left`:`to right`,...a}=e;if(Object.keys(a).length!==0){let e=`linear-gradient(${i}, ${aK(a)})`;return{background:e,[ZG]:e}}let o=`linear-gradient(${i}, ${n}, ${r})`;return{background:o,[ZG]:o}},sK=e=>{let{prefixCls:t,classNames:n,styles:r,direction:i,percent:a,size:o,strokeWidth:s,strokeColor:c,strokeLinecap:l=`round`,children:u,railColor:d,trailColor:f,percentPosition:p,success:m}=e,{align:h,type:g}=p,_=d??f,v=l===`square`||l===`butt`?0:void 0,[y,b]=KG(o??[-1,s||(o===`small`?6:8)],`line`,{strokeWidth:s}),x={backgroundColor:_||void 0,borderRadius:v,height:b},C=`${t}-track`,w=c&&typeof c!=`string`?oK(c,i):{[ZG]:c,background:c},T={width:`${HG(a)}%`,height:b,borderRadius:v,...w},E=UG(e),D={width:`${HG(E)}%`,height:b,borderRadius:v,backgroundColor:m?.strokeColor};return S.createElement(`div`,{className:J(`${t}-body`,n.body,{[`${t}-body-layout-bottom`]:h===`center`&&g===`outer`}),style:{width:y>0?y:`100%`,...r.body}},S.createElement(`div`,{className:J(`${t}-rail`,n.rail),style:{...x,...r.rail}},S.createElement(`div`,{className:J(C,n.track),style:{...T,...r.track}},g===`inner`&&u),E!==void 0&&S.createElement(`div`,{className:J(C,`${C}-success`,n.track),style:{...D,...r.track}})),g===`outer`&&u)},cK=e=>{let{classNames:t,styles:n,size:r,steps:i,rounding:a=Math.round,percent:o=0,strokeWidth:s=8,strokeColor:c,railColor:l,trailColor:u,prefixCls:d,children:f}=e,p=a(o/100*i),[m,h]=KG(r??[r===`small`?2:14,s],`step`,{steps:i,strokeWidth:s}),g=m/i,_=Array.from({length:i}),v=l??u;for(let e=0;e{let{prefixCls:n,className:r,rootClassName:i,classNames:a,styles:o,steps:s,strokeColor:c,percent:l=0,size:u=`medium`,showInfo:d=!0,type:f=`line`,status:p,format:m,style:h,percentPosition:g={},..._}=e,{align:v=`end`,type:y=`outer`}=g,b=Array.isArray(c)?c[0]:c,x=typeof c==`string`||Array.isArray(c)?c:void 0,C=S.useMemo(()=>b?new Nc(typeof b==`string`?b:Object.values(b)[0]).isLight():!1,[c]),w=S.useMemo(()=>{let t=UG(e);return Number.parseInt(t===void 0?(l??0)?.toString():(t??0)?.toString(),10)},[l,e.success]),T=S.useMemo(()=>!lK.includes(p)&&w>=100?`success`:p||`normal`,[p,w]),{getPrefixCls:E,direction:D,className:O,style:k,classNames:A,styles:j}=ya(`progress`),M=E(`progress`,n),[N,P]=iK(M),F={...e,percent:l,type:f,size:u,showInfo:d,percentPosition:g},[I,L]=Cf([A,a],[j,o],{props:F}),R=f===`line`,z=R&&!s,B=S.useMemo(()=>{if(!d)return null;let t=UG(e),n,r=m||(e=>`${e}%`),i=R&&C&&y===`inner`;return y===`inner`||m||T!==`exception`&&T!==`success`?n=r(HG(l),HG(t)):T===`exception`?n=R?S.createElement(Ou,null):S.createElement(ju,null):T===`success`&&(n=R?S.createElement(Tu,null):S.createElement(AC,null)),S.createElement(`span`,{className:J(`${M}-indicator`,{[`${M}-indicator-bright`]:i,[`${M}-indicator-${v}`]:z,[`${M}-indicator-${y}`]:z},I.indicator),style:L.indicator,title:typeof n==`string`?n:void 0},n)},[d,l,w,T,f,M,m,R,C,y,v,z,I.indicator,L.indicator]),V={...e,classNames:I,styles:L},H;f===`line`?H=s?S.createElement(cK,{...V,strokeColor:x,prefixCls:M,steps:nf(s)?s.count:s},B):S.createElement(sK,{...V,strokeColor:b,prefixCls:M,direction:D,percentPosition:{align:v,type:y}},B):(f===`circle`||f===`dashboard`)&&(H=S.createElement(XG,{...V,strokeColor:b,prefixCls:M,progressStatus:T},B));let U=J(M,`${M}-status-${T}`,{[`${M}-${f===`dashboard`&&`circle`||f}`]:f!==`line`,[`${M}-inline-circle`]:f===`circle`&&KG(u,`circle`)[0]<=20,[`${M}-line`]:z,[`${M}-line-align-${v}`]:z,[`${M}-line-position-${y}`]:z,[`${M}-steps`]:s,[`${M}-show-info`]:d,[`${M}-small`]:u===`small`,[`${M}-rtl`]:D===`rtl`},O,r,i,I.root,N,P);return S.createElement(`div`,{ref:t,style:{...k,...L.root,...h},className:U,role:`progressbar`,"aria-valuenow":w,"aria-valuemin":0,"aria-valuemax":100,...gi(_,[`railColor`,`trailColor`,`strokeWidth`,`width`,`gapDegree`,`gapPosition`,`gapPlacement`,`strokeLinecap`,`success`])},H)});function dK(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=da(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}var fK,pK;function mK(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(var r=t-1;r>=0;r--)n.push(e>>>r&1)}function hK(e,t){return(e>>>t&1)!=0}function gK(e){if(!e)throw Error(`Assertion error`)}var _K=function(){function e(t,n){Ws(this,e),Vs(this,`modeBits`,void 0),Vs(this,`numBitsCharCount`,void 0),this.modeBits=t,this.numBitsCharCount=n}return Ks(e,[{key:`numCharCountBits`,value:function(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}}]),e}();fK=_K,Vs(_K,`NUMERIC`,new fK(1,[10,12,14])),Vs(_K,`ALPHANUMERIC`,new fK(2,[9,11,13])),Vs(_K,`BYTE`,new fK(4,[8,16,16])),Vs(_K,`KANJI`,new fK(8,[8,10,12])),Vs(_K,`ECI`,new fK(7,[0,0,0]));var vK=Ks(function e(t,n){Ws(this,e),Vs(this,`ordinal`,void 0),Vs(this,`formatBits`,void 0),this.ordinal=t,this.formatBits=n});pK=vK,Vs(vK,`LOW`,new pK(0,1)),Vs(vK,`MEDIUM`,new pK(1,0)),Vs(vK,`QUARTILE`,new pK(2,3)),Vs(vK,`HIGH`,new pK(3,2));var yK=function(){function e(t,n,r){if(Ws(this,e),Vs(this,`mode`,void 0),Vs(this,`numChars`,void 0),Vs(this,`bitData`,void 0),this.mode=t,this.numChars=n,this.bitData=r,n<0)throw RangeError(`Invalid argument`);this.bitData=r.slice()}return Ks(e,[{key:`getData`,value:function(){return this.bitData.slice()}}],[{key:`makeBytes`,value:function(t){var n=[],r=dK(t),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;mK(a,8,n)}}catch(e){r.e(e)}finally{r.f()}return new e(_K.BYTE,t.length,n)}},{key:`makeNumeric`,value:function(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);for(var n=[],r=0;r=1<e.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=t*4+17;for(var o=[],s=0;s>>9)*1335;var i=(t<<10|n)^21522;gK(i>>>15==0);for(var a=0;a<=5;a++)this.setFunctionModule(8,a,hK(i,a));this.setFunctionModule(8,7,hK(i,6)),this.setFunctionModule(8,8,hK(i,7)),this.setFunctionModule(7,8,hK(i,8));for(var o=9;o<15;o++)this.setFunctionModule(14-o,8,hK(i,o));for(var s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,hK(i,s));for(var c=8;c<15;c++)this.setFunctionModule(8,this.size-15+c,hK(i,c));this.setFunctionModule(8,this.size-8,!0)}},{key:`drawVersion`,value:function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var n=this.version<<12|e;gK(n>>>18==0);for(var r=0;r<18;r++){var i=hK(n,r),a=this.size-11+r%3,o=Math.floor(r/3);this.setFunctionModule(a,o,i),this.setFunctionModule(o,a,i)}}}},{key:`drawFinderPattern`,value:function(e,t){for(var n=-4;n<=4;n++)for(var r=-4;r<=4;r++){var i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a=s)&&h.push(t[e])})},_=0;_=1;r-=2){r==6&&(r=5);for(var i=0;i>>3],7-(n&7)),n++)}}gK(n==t.length*8)}},{key:`applyMask`,value:function(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(var t=0;t5&&t++):(this.finderPenaltyAddHistory(i,a),r||(t+=this.finderPenaltyCountPatterns(a)*e.PENALTY_N3),r=this.modules[n][o],i=1);t+=this.finderPenaltyTerminateAndCount(r,i,a)*e.PENALTY_N3}for(var s=0;s5&&t++):(this.finderPenaltyAddHistory(l,u),c||(t+=this.finderPenaltyCountPatterns(u)*e.PENALTY_N3),c=this.modules[d][s],l=1);t+=this.finderPenaltyTerminateAndCount(c,l,u)*e.PENALTY_N3}for(var f=0;f0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}},{key:`finderPenaltyTerminateAndCount`,value:function(e,t,n){var r=t;return e&&(this.finderPenaltyAddHistory(r,n),r=0),r+=this.size,this.finderPenaltyAddHistory(r,n),this.finderPenaltyCountPatterns(n)}},{key:`finderPenaltyAddHistory`,value:function(e,t){var n=e;t[0]==0&&(n+=this.size),t.pop(),t.unshift(n)}}],[{key:`encodeText`,value:function(t,n){var r=yK.makeSegments(t);return e.encodeSegments(r,n)}},{key:`encodeBinary`,value:function(t,n){var r=yK.makeBytes(t);return e.encodeSegments([r],n)}},{key:`encodeSegments`,value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(e.MIN_VERSION<=r&&r<=i&&i<=e.MAX_VERSION)||a<-1||a>7)throw RangeError(`Invalid value`);var s,c;for(s=r;;s++){var l=e.getNumDataCodewords(s,n)*8,u=yK.getTotalBits(t,s);if(u<=l){c=u;break}if(s>=i)throw RangeError(`Data too long`)}for(var d=n,f=0,p=[vK.MEDIUM,vK.QUARTILE,vK.HIGH];f>>3]|=e<<7-(t&7)}),new e(s,d,w,a)}},{key:`getNumRawDataModules`,value:function(t){if(te.MAX_VERSION)throw RangeError(`Version number out of range`);var n=(16*t+128)*t+64;if(t>=2){var r=Math.floor(t/7)+2;n-=(25*r-10)*r-55,t>=7&&(n-=36)}return gK(208<=n&&n<=29648),n}},{key:`getNumDataCodewords`,value:function(t,n){return Math.floor(e.getNumRawDataModules(t)/8)-e.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*e.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}},{key:`reedSolomonComputeDivisor`,value:function(t){if(t<1||t>255)throw RangeError(`Degree out of range`);for(var n=[],r=0;r>>8||t>>>8)throw RangeError(`Byte out of range`);for(var n=0,r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return gK(n>>>8==0),n}}]),e}();Vs(bK,`MIN_VERSION`,1),Vs(bK,`MAX_VERSION`,40),Vs(bK,`PENALTY_N1`,3),Vs(bK,`PENALTY_N2`,3),Vs(bK,`PENALTY_N3`,40),Vs(bK,`PENALTY_N4`,10),Vs(bK,`ECC_CODEWORDS_PER_BLOCK`,[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]]),Vs(bK,`NUM_ERROR_CORRECTION_BLOCKS`,[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]);var xK={L:vK.LOW,M:vK.MEDIUM,Q:vK.QUARTILE,H:vK.HIGH},SK=`#FFFFFF`,CK=`#000000`,wK=.1,TK=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[];return e.forEach(function(e,r){var i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)},EK=function(e,t){return e.slice().map(function(e,n){return n=t.y+t.h?e:e.map(function(e,n){return n=t.x+t.w?e:!1})})},DK=function(e,t,n,r){if(r==null)return null;var i=e.length+n*2,a=Math.floor(t*wK),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){var p=Math.floor(l),m=Math.floor(u);f={x:p,y:m,w:Math.ceil(s+l-p),h:Math.ceil(c+u-m)}}var h=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:h}},OK=function(e,t){return t==null?e?4:0:Math.max(Math.floor(t),0)},kK=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),AK=function(e){var t=e.value,n=e.level,r=e.minVersion,i=e.includeMargin,a=e.marginSize,o=e.imageSettings,s=e.size,c=e.boostLevel,l=S.useMemo(function(){var e=(Array.isArray(t)?t:[t]).reduce(function(e,t){return e.push.apply(e,pa(yK.makeSegments(t))),e},[]);return bK.encodeSegments(e,xK[n],r,void 0,void 0,c)},[t,n,r,c]);return S.useMemo(function(){var e=l.getModules(),t=OK(i,a);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:DK(e,s,t,o),qrcode:l}},[l,s,o,i,a])},jK=[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`marginSize`,`style`,`imageSettings`,`boostLevel`],MK=S.forwardRef(function(e,t){var n=e.value,r=e.size,i=r===void 0?128:r,a=e.level,o=a===void 0?`L`:a,s=e.bgColor,c=s===void 0?SK:s,l=e.fgColor,u=l===void 0?CK:l,d=e.includeMargin,f=d===void 0?!1:d,p=e.minVersion,m=p===void 0?1:p,h=e.marginSize,g=e.style,_=e.imageSettings,v=e.boostLevel,y=yL(e,jK),b=_?.src,x=S.useRef(null),C=S.useRef(null),w=S.useCallback(function(e){x.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),T=Rs(S.useState(!1),2)[1],E=AK({value:n,level:o,minVersion:m,includeMargin:f,marginSize:h,imageSettings:_,size:i,boostLevel:v}),D=E.margin,O=E.cells,k=E.numCells,A=E.calculatedImageSettings;S.useEffect(function(){if(x.current){var e=x.current,t=e.getContext(`2d`);if(!t)return;var n=O,r=C.current,a=A!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&A.excavation!=null&&(n=EK(O,A.excavation));var o=window.devicePixelRatio||1;e.height=e.width=i*o;var s=i/k*o;t.scale(s,s),t.fillStyle=c,t.fillRect(0,0,k,k),t.fillStyle=u,kK?t.fill(new Path2D(TK(n,D))):O.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+D,n+D,1,1)})}),A&&(t.globalAlpha=A.opacity),a&&t.drawImage(r,A.x+D,A.y+D,A.w,A.h)}}),S.useEffect(function(){T(!1)},[b]);var j=Us({height:i,width:i},g),M=null;return b!=null&&(M=S.createElement(`img`,{alt:`QR-Code`,src:b,key:b,style:{display:`none`},onLoad:function(){T(!0)},ref:C,crossOrigin:A?.crossOrigin})),S.createElement(S.Fragment,null,S.createElement(`canvas`,Hg({style:j,height:i,width:i,ref:w,role:`img`},y)),M)}),NK=[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`title`,`marginSize`,`imageSettings`,`boostLevel`],PK=S.forwardRef(function(e,t){var n=e.value,r=e.size,i=r===void 0?128:r,a=e.level,o=a===void 0?`L`:a,s=e.bgColor,c=s===void 0?SK:s,l=e.fgColor,u=l===void 0?CK:l,d=e.includeMargin,f=d===void 0?!1:d,p=e.minVersion,m=p===void 0?1:p,h=e.title,g=e.marginSize,_=e.imageSettings,v=e.boostLevel,y=yL(e,NK),b=AK({value:n,level:o,minVersion:m,includeMargin:f,marginSize:g,imageSettings:_,size:i,boostLevel:v}),x=b.margin,C=b.cells,w=b.numCells,T=b.calculatedImageSettings,E=C,D=null;_!=null&&T!=null&&(T.excavation!=null&&(E=EK(C,T.excavation)),D=S.createElement(`image`,{href:_.src,height:T.h,width:T.w,x:T.x+x,y:T.y+x,preserveAspectRatio:`none`,opacity:T.opacity,crossOrigin:T.crossOrigin}));var O=TK(E,x);return S.createElement(`svg`,Hg({height:i,width:i,viewBox:`0 0 ${w} ${w}`,ref:t,role:`img`},y),!!h&&S.createElement(`title`,null,h),S.createElement(`path`,{fill:c,d:`M0,0 h${w}v${w}H0z`,shapeRendering:`crispEdges`}),S.createElement(`path`,{fill:u,d:O,shapeRendering:`crispEdges`}),D)}),FK=c(o((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:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z`}}]},name:`reload`,theme:`outlined`}}))());function IK(){return IK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,IK({},e,{ref:t,icon:FK.default}))),RK=S.createElement(nG,null);function zK({prefixCls:e,locale:t,onRefresh:n,statusRender:r,status:i}){let a={expired:S.createElement(S.Fragment,null,S.createElement(`p`,{className:`${e}-expired`},t?.expired),n&&S.createElement(g_,{type:`link`,icon:S.createElement(LK,null),onClick:n},t?.refresh)),loading:RK,scanned:S.createElement(`p`,{className:`${e}-scanned`},t?.scanned)};return(r??(e=>a[e.status]))({status:i,locale:t,onRefresh:n})}var BK=e=>{let{componentCls:t,lineWidth:n,lineType:r,colorSplit:i}=e;return{[t]:{...Ul(e),display:`flex`,justifyContent:`center`,alignItems:`center`,padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${Y(n)} ${r} ${i}`,position:`relative`,overflow:`hidden`,[`& > ${t}-cover`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:10,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,width:`100%`,height:`100%`,color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeCoverBackgroundColor,textAlign:`center`,[`& > ${t}-expired, & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"> canvas":{alignSelf:`stretch`,flex:`auto`,minWidth:0},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}},[`${t}-borderless`]:{borderColor:`transparent`,padding:0,borderRadius:0}}},VK=Ql(`QRCode`,e=>BK(dc(e,{QRCodeTextColor:e.colorText})),e=>({QRCodeCoverBackgroundColor:new Nc(e.colorBgContainer).setA(.96).toRgbString()})),HK=e=>{let[,t]=Vl(),{value:n,type:r=`canvas`,icon:i=``,size:a=160,iconSize:o,color:s=t.colorText,errorLevel:c=`M`,status:l=`active`,bordered:u=!0,onRefresh:d,style:f,className:p,rootClassName:m,prefixCls:h,bgColor:g=`transparent`,marginSize:_,statusRender:v,classNames:y,styles:b,boostLevel:x,...C}=e,{getPrefixCls:w,className:T,style:E,classNames:D,styles:O}=ya(`qrcode`),k={...e,bgColor:g,type:r,size:a,status:l,bordered:u,errorLevel:c},[A,j]=Cf([D,y],[O,b],{props:k}),M=w(`qrcode`,h),[N,P]=VK(M),F={src:i,x:void 0,y:void 0,height:ef(o)?o:o?.height??40,width:ef(o)?o:o?.width??40,excavate:!0,crossOrigin:`anonymous`},I=xi(C,!0),L=gi(C,Object.keys(I)),R={value:n,size:a,level:c,bgColor:g,fgColor:s,style:{width:f?.width,height:f?.height},imageSettings:i?F:void 0,marginSize:_,boostLevel:x,...I},[z]=Yd(`QRCode`);if(!n)return null;let B=J(M,p,m,N,P,T,A.root,{[`${M}-borderless`]:!u}),V={backgroundColor:g,...j.root,...E,...f,width:f?.width??a,height:f?.height??a};return S.createElement(`div`,{...L,className:B,style:V},l!==`active`&&S.createElement(`div`,{className:J(`${M}-cover`,A.cover),style:j.cover},S.createElement(zK,{prefixCls:M,locale:z,status:l,onRefresh:d,statusRender:v})),r===`canvas`?S.createElement(MK,{...R}):S.createElement(PK,{...R}))},UK=c(o((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:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z`}}]},name:`star`,theme:`filled`}}))());function WK(){return WK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,WK({},e,{ref:t,icon:UK.default}))),KK=c(o((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:`M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`warning`,theme:`filled`}}))());function qK(){return qK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,qK({},e,{ref:t,icon:KK.default}))),YK=()=>S.createElement(`svg`,{width:`252`,height:`294`},S.createElement(`title`,null,`No Found`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`circle`,{cx:`126.75`,cy:`128.1`,r:`126`,fill:`#E4EBF7`}),S.createElement(`circle`,{cx:`31.55`,cy:`130.8`,r:`8.3`,fill:`#FFF`}),S.createElement(`path`,{stroke:`#FFF`,d:`m37 134.3 10.5 6m.9 6.2-12.7 10.8`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M39.9 159.4a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m17.7-16.2a5.7 5.7 0 1 1-11.4-1.1 5.7 5.7 0 0 1 11.4 1.1M99 27h29.8a4.6 4.6 0 1 0 0-9.2H99a4.6 4.6 0 1 0 0 9.2m11.4 18.3h29.8a4.6 4.6 0 0 0 0-9.2h-29.8a4.6 4.6 0 1 0 0 9.2`}),S.createElement(`path`,{fill:`#FFF`,d:`M112.8 26.9h15.8a4.6 4.6 0 1 0 0 9.1h-15.8a4.6 4.6 0 0 0 0-9.1m71.7 108.8a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),S.createElement(`path`,{stroke:`#FFF`,d:`m179.3 141.8 12.6 7.1m1.1 7.6-15.2 13`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M184.7 170a6.8 6.8 0 1 1-13.6-1.3 6.8 6.8 0 0 1 13.6 1.4m18.6-16.8a6.9 6.9 0 1 1-13.7-1.4 6.9 6.9 0 0 1 13.7 1.4`}),S.createElement(`path`,{stroke:`#FFF`,d:`M152 192.3a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm73.3-76.2a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm-9 35a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.5 0zM177 107.6a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.4-15.4a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm6.8 88.5a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0z`,strokeWidth:`2`}),S.createElement(`path`,{stroke:`#FFF`,d:`m214.4 153.3-2 20.2-10.8 6m-28-4.7-6.3 9.8H156l-4.5 6.5m23.5-66v-15.7m46 7.8-13 8-15.2-8V94.4`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M166.6 66h-4a4.8 4.8 0 0 1-4.7-4.8 4.8 4.8 0 0 1 4.7-4.7h4a4.8 4.8 0 0 1 4.7 4.7 4.8 4.8 0 0 1-4.7 4.7`}),S.createElement(`circle`,{cx:`204.3`,cy:`30`,r:`29.5`,fill:`#1677ff`}),S.createElement(`path`,{fill:`#FFF`,d:`M206 38.4c.5.5.7 1.1.7 2s-.2 1.4-.7 1.9a3 3 0 0 1-2 .7c-.8 0-1.5-.3-2-.8s-.8-1.1-.8-1.9.3-1.4.8-2c.5-.4 1.2-.7 2-.7.7 0 1.4.3 2 .8m4.2-19.5c1.5 1.3 2.2 3 2.2 5.2a7.2 7.2 0 0 1-1.5 4.5l-3 2.7a5 5 0 0 0-1.3 1.7 5.2 5.2 0 0 0-.6 2.4v.5h-4v-.5c0-1.4.1-2.5.6-3.5s1.9-2.5 4.2-4.5l.4-.5a4 4 0 0 0 1-2.6c0-1.2-.4-2-1-2.8-.7-.6-1.6-1-2.9-1-1.5 0-2.6.5-3.3 1.5-.4.5-.6 1-.8 1.9a2 2 0 0 1-2 1.6 2 2 0 0 1-2-2.4c.4-1.6 1-2.8 2.1-3.8a8.5 8.5 0 0 1 6.3-2.3c2.3 0 4.2.6 5.6 2`}),S.createElement(`path`,{fill:`#FFB594`,d:`M52 76.1s21.8 5.4 27.3 16c5.6 10.7-6.3 9.2-15.7 5C52.8 92 39 85 52 76`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m90.5 67.5-.5 2.9c-.7.5-4.7-2.7-4.7-2.7l-1.7.8-1.3-5.7s6.8-4.6 9-5c2.4-.5 9.8 1 10.6 2.3 0 0 1.3.4-2.2.6-3.6.3-5 .5-6.8 3.2l-2.4 3.6`}),S.createElement(`path`,{fill:`#FFF`,d:`M128 111.4a36.7 36.7 0 0 0-8.9-15.5c-3.5-3-9.3-2.2-11.3-4.2-1.3-1.2-3.2-1.2-3.2-1.2L87.7 87c-2.3-.4-2.1-.7-6-1.4-1.6-1.9-3-1.1-3-1.1l-7-1.4c-1-1.5-2.5-1-2.5-1l-2.4-.9C65 91.2 59 95 59 95c1.8 1.1 15.7 8.3 15.7 8.3l5.1 37.1s-3.3 5.7 1.4 9.1c0 0 19.9-3.7 34.9-.3 0 0 3-2.6 1-8.8.5-3 1.4-8.3 1.7-11.6.4.7 2 1.9 3.1 3.4 0 0 9.4-7.3 11-14a17 17 0 0 1-2.2-2.4c-.5-.8-.3-2-.7-2.8-.7-1-1.8-1.3-2-1.6`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M101 290s4.4 2 7.4 1c2.9-1 4.6.7 7.1 1.2 2.6.5 6.9 1.1 11.7-1.3 0-5.5-6.9-4-12-6.7-2.5-1.4-3.7-4.7-3.5-8.8h-9.5s-1.2 10.6-1 14.6`}),S.createElement(`path`,{fill:`#2B0849`,d:`M101 289.8s2.5 1.3 6.8.7c3-.5 3.7.5 7.4 1 3.8.6 10.8 0 11.9-.9.4 1.1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.6-.5-1.8-1.4-5.2-1.9-5.7-.2-4 1-7.4-.3-7.4-.3l-.1-2.7z`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M108.3 276h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M57.5 272.4s-2 7.4-4.4 12.3c-1.8 3.7-4.3 7.5 5.4 7.5 6.7 0 9-.5 7.4-6.6-1.5-6.1.3-13.2.3-13.2h-8.7z`}),S.createElement(`path`,{fill:`#2B0849`,d:`M51.5 289.8s2 1.2 6.6 1.2c6 0 8.3-1.7 8.3-1.7s.6 1.1-.7 2.2c-1 .8-3.6 1.6-7.4 1.5-4.1 0-5.8-.5-6.7-1.1-.8-.6-.7-1.6-.1-2.1`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M58.4 274.3s0 1.5-.3 3c-.3 1.4-1 3-1.1 4 0 1.2 4.5 1.7 5.1.1.6-1.5 1.3-6.4 2-7.2.6-.9-5-2.2-5.7.1`}),S.createElement(`path`,{fill:`#7BB2F9`,d:`m99.7 278.5 13.3.1s1.3-54.5 1.9-64.4c.5-9.9 3.8-43.4 1-63.1l-12.6-.7-22.8.8-1.2 10c0 .5-.7.8-.7 1.4-.1.5.4 1.3.3 2-2.4 14-6.4 33-8.8 46.6 0 .7-1.2 1-1.4 2.7 0 .3.2 1.5 0 1.8-6.8 18.7-10.9 47.8-14.2 61.9h14.6s2.2-8.6 4-17c2.9-12.9 23.2-85 23.2-85l3-.5 1 46.3s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.8-1 11.8c-.4 4.8 0 39.2 0 39.2`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M76 221.6c1.2.1 4.1-2 7-5m23.4 8.5s2.7-1 6-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M107.3 222.1s2.7-1.1 6-3.9`,strokeLinecap:`round`,strokeLinejoin:`round`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M74.7 224.8s2.7-.6 6.5-3.4m4.8-69.8c-.2 3.1.3 8.6-4.3 9.2m22-11s0 14-1.4 15.1a15 15 0 0 1-3 2m.5-16.5s0 13-1.2 24.4m-5 1.1s7.3-1.7 9.5-1.7M74.3 206a212 212 0 0 1-1 4.5s-1.4 1.9-1 3.8c.5 2-1 2-5 15.4A353 353 0 0 0 61 257l-.2 1.2m14.9-60.5a321 321 0 0 1-.9 4.8m7.8-50.4-1.2 10.5s-1.1.1-.5 2.2c.1 1.4-2.7 15.8-5.2 30.5m-19.6 79h13.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#192064`,d:`M116.2 148.2s-17-3-35.9.2c.2 2.5 0 4.2 0 4.2s14.7-2.8 35.7-.3c.3-2.4.2-4 .2-4`}),S.createElement(`path`,{fill:`#FFF`,d:`M106.3 151.2v-5a.8.8 0 0 0-.8-.8h-7.8a.8.8 0 0 0-.8.8v5a.8.8 0 0 0 .8.8h7.8a.8.8 0 0 0 .8-.8`}),S.createElement(`path`,{fill:`#192064`,d:`M105.2 150.2v-3a.6.6 0 0 0-.6-.7 94.3 94.3 0 0 0-5.9 0 .7.7 0 0 0-.6.6v3.1a.6.6 0 0 0 .6.7 121.1 121.1 0 0 1 5.8 0c.4 0 .7-.3.7-.7`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M100.3 275.4h12.3m-11.2-4.9.1 6.5m0-12.5a915.8 915.8 0 0 0 0 4.4m-.5-94 .9 44.7s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.2 0 3.4-.6 1.5-1 21.1-1.1 35.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M46.9 83.4s-.5 6 7.2 5.6c11.2-.7 9.2-9.4 31.5-21.7-.7-2.7-2.4-4.7-2.4-4.7s-11 3-22.6 8c-6.8 3-13.4 6.4-13.7 12.8m57.6 7.7.9-5.4-8.9-11.4-5 5.3-1.8 7.9a.3.3 0 0 0 .1.3c1 .8 6.5 5 14.4 3.5a.3.3 0 0 0 .3-.2`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M94 79.4s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.1-3.7c.6-1 1.6-4.1 1.6-4.1l13.5 3c0 5.3-2.3 19.5-7.8 20-8.9.6-12.5-9.5-12.5-9.5`}),S.createElement(`path`,{fill:`#520038`,d:`M113.9 73.4c2.6-2 3.4-9.7 3.4-9.7s-2.4-.5-6.6-2c-4.7-2.1-12.8-4.8-17.5 1-9.6 3.2-2 19.8-2 19.8l2.7-3s-4-3.3-2-6.3c2-3.5 3.8 1 3.8 1s.7-2.3 3.6-3.3c.4-.7 1-2.6 1.4-3.8a1 1 0 0 1 1.3-.7l11.4 2.6c.5.2.8.7.8 1.2l-.3 3.2z`}),S.createElement(`path`,{fill:`#552950`,d:`M105 76c-.1.7-.6 1.1-1 1-.6 0-.9-.6-.8-1.2.1-.6.6-1 1-1 .6 0 .9.7.8 1.3m7.1 1.6c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.5-1 1-1 .5.1.8.7.7 1.3`}),S.createElement(`path`,{stroke:`#DB836E`,d:`m110.1 74.8-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M110.8 74.5s1.8-.7 2.6.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M92.4 74.3s.5-1.1 1.1-.7c.6.4 1.3 1.4.6 2-.8.5.1 1.6.1 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M103.3 73s1.8 1 4.1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M103.7 81.8s2.2 1.2 4.4 1.2m-3.5 1.3s1 .4 1.6.3m-11.5-3.4s2.3 7.4 10.4 7.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M81.5 89.4s.4 5.6-5 12.8M69 82.7s-.7 9.2-8.2 14.2m68.6 26s-5.3 7.4-9.4 10.7m-.7-26.3s.5 4.4-2.1 32`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M150 151.2h-49.8a1 1 0 0 1-1-1v-31.7c0-.5.4-1 1-1H150c.6 0 1 .5 1 1v31.7a1 1 0 0 1-1 1`}),S.createElement(`path`,{fill:`#F4D19D`,d:`M150.3 151.2h-19.9v-33.7h20.8v32.8a1 1 0 0 1-1 1`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M123.6 127.9H92.9a.5.5 0 0 1-.4-.8l6.4-9.1c.2-.3.5-.5.8-.5h31.1l-7.2 10.4z`}),S.createElement(`path`,{fill:`#CC9B6E`,d:`M123.7 128.4H99.2v-.5h24.2l7.2-10.2.4.3z`}),S.createElement(`path`,{fill:`#F4D19D`,d:`M158.3 127.9h-18.7a2 2 0 0 1-1.6-.8l-7.2-9.6h20c.5 0 1 .3 1.2.6l6.7 9a.5.5 0 0 1-.4.8`}),S.createElement(`path`,{fill:`#CC9B6E`,d:`M157.8 128.5h-19.3l-7.9-10.5.4-.3 7.7 10.3h19.1zm-27.2 22.2v-8.2h.4v8.2zm-.1-10.9v-21.4h.4l.1 21.4zm-18.6 1.1-.5-.1 1.5-5.2.5.2zm-3.5.2-2.6-3 2.6-3.4.4.3-2.4 3.1 2.4 2.6zm8.2 0-.4-.4 2.4-2.6-2.4-3 .4-.4 2.7 3.4z`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m154.3 131.9-3.1-2v3.5l-1 .1a85 85 0 0 1-4.8.3c-1.9 0-2.7 2.2 2.2 2.6l-2.6-.6s-2.2 1.3.5 2.3c0 0-1.6 1.2.6 2.6-.6 3.5 5.2 4 7 3.6a6.1 6.1 0 0 0 4.6-5.2 8 8 0 0 0-3.4-7.2`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M153.7 133.6s-6.5.4-8.4.3c-1.8 0-1.9 2.2 2.4 2.3 3.7.2 5.4 0 5.4 0`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M145.2 135.9c-1.9 1.3.5 2.3.5 2.3s3.5 1 6.8.6m-.6 2.9s-6.3.1-6.7-2.1c-.3-1.4.4-1.4.4-1.4m.5 2.7s-1 3.1 5.5 3.5m-.4-14.5v3.5M52.8 89.3a18 18 0 0 0 13.6-7.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#5BA02E`,d:`M168.6 248.3a6.6 6.6 0 0 1-6.7-6.6v-66.5a6.6 6.6 0 1 1 13.3 0v66.5a6.6 6.6 0 0 1-6.6 6.6`}),S.createElement(`path`,{fill:`#92C110`,d:`M176.5 247.7a6.6 6.6 0 0 1-6.6-6.7v-33.2a6.6 6.6 0 1 1 13.3 0V241a6.6 6.6 0 0 1-6.7 6.7`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M186.4 293.6H159a3.2 3.2 0 0 1-3.2-3.2v-46.1a3.2 3.2 0 0 1 3.2-3.2h27.5a3.2 3.2 0 0 1 3.2 3.2v46.1a3.2 3.2 0 0 1-3.2 3.2`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M89 89.5s7.8 5.4 16.6 2.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),XK=()=>S.createElement(`svg`,{width:`254`,height:`294`},S.createElement(`title`,null,`Server Error`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`path`,{fill:`#E4EBF7`,d:`M0 128.1v-2C0 56.5 56.3.2 125.7.2h2.1C197.2.3 253.5 56.6 253.5 126v2.1c0 69.5-56.3 125.7-125.7 125.7h-2.1A125.7 125.7 0 0 1 0 128.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M40 132.1a8.3 8.3 0 1 1-16.6-1.7 8.3 8.3 0 0 1 16.6 1.7`}),S.createElement(`path`,{stroke:`#FFF`,d:`m37.2 135.6 10.5 6m1 6.3-12.8 10.8`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M40.1 160.8a5.7 5.7 0 1 1-11.3-1.1 5.7 5.7 0 0 1 11.3 1.1M58 144.6a5.7 5.7 0 1 1-11.4-1.2 5.7 5.7 0 0 1 11.4 1.2M99.7 27.4h30a4.6 4.6 0 1 0 0-9.2h-30a4.6 4.6 0 0 0 0 9.2M111 46h30a4.6 4.6 0 1 0 0-9.3h-30a4.6 4.6 0 1 0 0 9.3m2.5-18.6h16a4.6 4.6 0 1 0 0 9.3h-16a4.6 4.6 0 0 0 0-9.3m36.7 42.7h-4a4.8 4.8 0 0 1-4.8-4.8 4.8 4.8 0 0 1 4.8-4.8h4a4.8 4.8 0 0 1 4.7 4.8 4.8 4.8 0 0 1-4.7 4.8`}),S.createElement(`circle`,{cx:`201.35`,cy:`30.2`,r:`29.7`,fill:`#FF603B`}),S.createElement(`path`,{fill:`#FFF`,d:`m203.6 19.4-.7 15a1.5 1.5 0 0 1-3 0l-.7-15a2.2 2.2 0 1 1 4.4 0m-.3 19.4c.5.5.8 1.1.8 1.9s-.3 1.4-.8 1.9a3 3 0 0 1-2 .7 2.5 2.5 0 0 1-1.8-.7c-.6-.6-.8-1.2-.8-2 0-.7.2-1.3.8-1.8.5-.5 1.1-.7 1.8-.7.8 0 1.5.2 2 .7`}),S.createElement(`path`,{fill:`#FFB594`,d:`M119.3 133.3c4.4-.6 3.6-1.2 4-4.8.8-5.2-3-17-8.2-25.1-1-10.7-12.6-11.3-12.6-11.3s4.3 5 4.2 16.2c1.4 5.3.8 14.5.8 14.5s5.3 11.4 11.8 10.5`}),S.createElement(`path`,{fill:`#FFF`,d:`M101 91.6s1.4-.6 3.2.6c8 1.4 10.3 6.7 11.3 11.4 1.8 1.2 1.8 2.3 1.8 3.5l1.5 3s-7.2 1.7-11 6.7c-1.3-6.4-6.9-25.2-6.9-25.2`}),S.createElement(`path`,{fill:`#FFB594`,d:`m94 90.5 1-5.8-9.2-11.9-5.2 5.6-2.6 9.9s8.4 5 16 2.2`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M83 78.2s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.2-3.7c.5-1 1.5-4.2 1.5-4.2l13.6 3.2c0 5.2-2.3 19.5-7.9 20-8.9.6-12.5-9.6-12.5-9.6`}),S.createElement(`path`,{fill:`#520038`,d:`M103 72.2c2.6-2 3.5-9.7 3.5-9.7s-2.5-.5-6.7-2c-4.7-2.2-12.9-4.9-17.6.9-9.5 4.4-2 20-2 20l2.7-3.1s-4-3.3-2.1-6.3c2.2-3.5 4 1 4 1s.6-2.3 3.5-3.3c.4-.7 1-2.7 1.5-3.8A1 1 0 0 1 91 65l11.5 2.7c.5.1.8.6.8 1.2l-.3 3.2z`}),S.createElement(`path`,{fill:`#552950`,d:`M101.2 76.5c0 .6-.6 1-1 1-.5-.1-.9-.7-.8-1.3.1-.6.6-1 1.1-1 .5.1.8.7.7 1.3m-7-1.4c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.6-1 1-1 .5.1.9.7.8 1.3`}),S.createElement(`path`,{stroke:`#DB836E`,d:`m99.2 73.6-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M100 73.3s1.7-.7 2.4.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M81.4 73s.4-1 1-.6c.7.4 1.4 1.4.6 2s.2 1.6.2 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M92.3 71.7s1.9 1.1 4.2 1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M92.7 80.6s2.3 1.2 4.4 1.2m-3.4 1.4s1 .4 1.5.3M83.7 80s1.8 6.6 9.2 8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M95.5 91.7s-1 2.8-8.2 2c-7.3-.6-10.3-5-10.3-5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M78.1 87.5s6.6 5 16.5 2.5c0 0 9.6 1 11.5 5.3 5.4 11.8.6 36.8 0 40 3.5 4-.4 8.4-.4 8.4-15.7-3.5-35.8-.6-35.8-.6-4.9-3.5-1.3-9-1.3-9l-6.2-23.8c-2.5-15.2.8-19.8 3.5-20.7 3-1 8-1.3 8-1.3.6 0 1.1 0 1.4-.2 2.4-1.3 2.8-.6 2.8-.6`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M65.8 89.8s-6.8.5-7.6 8.2c-.4 8.8 3 11 3 11s6.1 22 16.9 22.9c8.4-2.2 4.7-6.7 4.6-11.4-.2-11.3-7-17-7-17s-4.3-13.7-9.9-13.7`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M71.7 124.2s.9 11.3 9.8 6.5c4.8-2.5 7.6-13.8 9.8-22.6A201 201 0 0 0 94 96l-5-1.7s-2.4 5.6-7.7 12.3c-4.4 5.5-9.2 11.1-9.5 17.7`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M108.5 105.2s1.7 2.7-2.4 30.5c2.4 2.2 1 6-.2 7.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M123.3 131.5s-.5 2.8-11.8 2c-15.2-1-25.3-3.2-25.3-3.2l.9-5.8s.7.2 9.7-.1c11.9-.4 18.7-6 25-1 4 3.2 1.5 8.1 1.5 8.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M70.2 91s-5.6-4.8-11 2.7c-3.3 7.2.5 15.2 2.6 19.5-.3 3.8 2.4 4.3 2.4 4.3s0 1 1.5 2.7c4-7 6.7-9.1 13.7-12.5-.3-.7-1.9-3.3-1.8-3.8.2-1.7-1.3-2.6-1.3-2.6s-.3-.2-1.2-2.8c-.8-2.3-2-5.1-4.9-7.5`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M90.2 288s4.9 2.3 8.3 1.2c3.2-1 5.2.7 8 1.3a20 20 0 0 0 13.3-1.4c-.2-6.2-7.8-4.5-13.6-7.6-2.9-1.6-4.2-5.3-4-10H91.5s-1.5 12-1.3 16.5`}),S.createElement(`path`,{fill:`#2B0849`,d:`M90.2 287.8s2.8 1.5 7.6.8c3.5-.5 3.3.6 7.5 1.3 4.2.6 13-.2 14.3-1.2.5 1.3-.4 2.4-.4 2.4s-1.7.6-5.4.9c-2.3.1-8.1.3-10.2-.6-2-1.6-4.9-1.5-6-.3-4.5 1.1-7.2-.3-7.2-.3l-.2-3z`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M98.4 272.3h3.5s0 7.5 5.2 9.6c-5.3.7-9.7-2.6-8.7-9.6`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M44.4 272s-2.2 7.8-4.7 13c-1.9 3.8-4.4 7.8 5.8 7.8 7 0 9.3-.5 7.7-7-1.6-6.3.3-13.8.3-13.8h-9z`}),S.createElement(`path`,{fill:`#2B0849`,d:`M38 290.3s2.3 1.2 7 1.2c6.4 0 8.7-1.7 8.7-1.7s.6 1.1-.7 2.2c-1 1-3.8 1.7-7.7 1.7-4.4 0-6.1-.6-7-1.3-1-.5-.8-1.6-.2-2.1`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M45.3 274s0 1.6-.3 3.1-1.1 3.3-1.2 4.4c0 1.2 4.8 1.6 5.4 0 .7-1.6 1.4-6.8 2-7.6.7-.9-5.1-2.2-5.9.1`}),S.createElement(`path`,{fill:`#7BB2F9`,d:`M89.5 277.6h13.9s1.3-56.6 1.9-66.8c.6-10.3 4-45.1 1-65.6l-13-.7-23.7.8-1.3 10.4c0 .5-.7.9-.8 1.4 0 .6.5 1.4.4 2L59.6 206c-.1.7-1.3 1-1.5 2.8 0 .3.2 1.6.1 1.8-7.1 19.5-12.2 52.6-15.6 67.2h15.1L62 259c3-13.3 24-88.3 24-88.3l3.2-1-.2 48.6s-.2 1.3.4 2.1c.5.8-.6 1.2-.4 2.4l.4 1.8-1 12.4c-.4 4.9 1.2 40.7 1.2 40.7`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M64.6 218.9c1.2 0 4.2-2.1 7.2-5.1m24.2 8.7s3-1.1 6.4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M97 219.4s2.9-1.2 6.3-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M63.2 222.1s2.7-.6 6.7-3.5m5-72.4c-.3 3.2.3 8.8-4.5 9.4m22.8-11.3s.1 14.6-1.4 15.7c-2.3 1.7-3 2-3 2m.4-17s.3 13-1 25m-4.7.7s6.8-1 9.1-1M46 270l-.9 4.6m1.8-11.3-.8 4.1m16.6-64.9c-.3 1.6 0 2-.4 3.4 0 0-2.8 2-2.3 4s-.3 3.4-4.5 17.2c-1.8 5.8-4.3 19-6.2 28.3l-1.1 5.8m16-67-1 4.9m8.1-52.3-1.2 10.9s-1.2.1-.5 2.3c0 1.4-2.8 16.4-5.4 31.6m-20 82.1h13.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#192064`,d:`M106.2 142.1c-3-.5-18.8-2.7-36.2.2a.6.6 0 0 0-.6.7v3a.6.6 0 0 0 .8.6c3.3-.5 17-2.4 35.6-.3.4 0 .7-.2.7-.5.2-1.4.2-2.5.2-3a.6.6 0 0 0-.5-.7`}),S.createElement(`path`,{fill:`#FFF`,d:`M96.4 145.3v-5.1a.8.8 0 0 0-.8-.9 114.1 114.1 0 0 0-8.1 0 .8.8 0 0 0-.9.8v5.1c0 .5.4.9.9.9h8a.8.8 0 0 0 .9-.8`}),S.createElement(`path`,{fill:`#192064`,d:`M95.2 144.3v-3.2a.7.7 0 0 0-.6-.7h-6.1a.7.7 0 0 0-.6.7v3.2c0 .4.3.7.6.7h6c.4 0 .7-.3.7-.7`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M90.1 273.5h12.8m-11.7-3.7v6.3m-.3-12.6v4.5m-.5-97.6 1 46.4s.7 1.6-.3 2.8c-.9 1.1 2.6.7 1 2.3-1.7 1.6.9 1.2 0 3.5-.6 1.6-1 22-1.2 36.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M73.7 98.7 76 103s2 .8 1.8 2.7l.8 2.2m-14.3 8.7c.2-1 2.2-7.1 12.6-10.5m.7-16s7.7 6 16.5 2.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M92 87s5.5-.9 7.5-4.6c1.3-.3.8 2.2-.3 3.7l-1 1.5s.2.3.2.9c0 .6-.2.6-.3 1v1l-.4 1c-.1.2 0 .6-.2.9-.2.4-1.6 1.8-2.6 2.8-3.8 3.6-5 1.7-6-.4-1-1.8-.7-5.1-.9-6.9-.3-2.9-2.6-3-2-4.4.4-.7 3 .7 3.4 1.8.7 2 2.9 1.8 2.6 1.7`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M99.8 82.4c-.5.1-.3.3-1 1.3-.6 1-4.8 2.9-6.4 3.2-2.5.5-2.2-1.6-4.2-2.9-1.7-1-3.6-.6-1.4 1.4 1 1 1 1.1 1.4 3.2.3 1.5-.7 3.7.7 5.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{stroke:`#E59788`,d:`M79.5 108.7c-2 2.9-4.2 6.1-5.5 8.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M87.7 124.8s-2-2-5.1-2.8c-3-.7-3.6-.1-5.5.1-2 .3-4-.9-3.7.7.3 1.7 5 1 5.2 2.1.2 1.1-6.3 2.8-8.3 2.2-.8.8.5 1.9 2 2.2.3 1.5 2.3 1.5 2.3 1.5s.7 1 2.6 1.1c2.5 1.3 9-.7 11-1.5 2-.9-.5-5.6-.5-5.6`}),S.createElement(`path`,{stroke:`#E59788`,d:`M73.4 122.8s.7 1.2 3.2 1.4c2.3.3 2.6.6 2.6.6s-2.6 3-9.1 2.3m2.3 2.2s3.8 0 5-.7m-2.4 2.2s2 0 3.3-.6m-1 1.7s1.7 0 2.8-.5m-6.8-9s-.6-1.1 1.3-.5c1.7.5 2.8 0 5.1.1 1.4.1 3-.2 4 .2 1.6.8 3.6 2.2 3.6 2.2s10.6 1.2 19-1.1M79 108s-8.4 2.8-13.2 12.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M109.3 112.5s3.4-3.6 7.6-4.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E59788`,d:`M107.4 123s9.7-2.7 11.4-.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{stroke:`#BFCDDD`,d:`m194.6 83.7 4-4M187.2 91l3.7-3.6m.9-3-4.5-4.7m11.2 11.5-4.2-4.3m-65 76.3 3.7-3.7M122.3 170l3.5-3.5m.8-2.9-4.3-4.2M133 170l-4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#A3B4C6`,d:`M190.2 211.8h-1.6a4 4 0 0 1-4-4v-32.1a4 4 0 0 1 4-4h1.6a4 4 0 0 1 4 4v32a4 4 0 0 1-4 4`}),S.createElement(`path`,{fill:`#A3B4C6`,d:`M237.8 213a4.8 4.8 0 0 1-4.8 4.8h-86.6a4.8 4.8 0 0 1 0-9.6H233a4.8 4.8 0 0 1 4.8 4.8`}),S.createElement(`path`,{fill:`#A3B4C6`,d:`M154.1 190.1h70.5v-84.6h-70.5z`}),S.createElement(`path`,{fill:`#BFCDDD`,d:`M225 190.1h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2m0-59.3h-71.1a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.3v19a3.2 3.2 0 0 1-3.2 3.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M159.6 120.5a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8v-3.2c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8`}),S.createElement(`path`,{fill:`#BFCDDD`,d:`M225 160.5h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2`}),S.createElement(`path`,{stroke:`#7C90A5`,d:`M173.5 130.8h49.3m-57.8 0h6m-15 0h6.7m11.1 29.8h49.3m-57.7 0h6m-15.8 0h6.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M159.6 151a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V147c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8m-63 29a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.5 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V176c0-.5.3-.8.8-.8h22.4c.5 0 .8.3.8.8v3.2c0 .4-.3.8-.8.8`}),S.createElement(`path`,{fill:`#BFCDDD`,d:`M203 221.1h-27.3a2.4 2.4 0 0 1-2.4-2.4v-11.4a2.4 2.4 0 0 1 2.4-2.5H203a2.4 2.4 0 0 1 2.4 2.5v11.4a2.4 2.4 0 0 1-2.4 2.4`}),S.createElement(`path`,{stroke:`#A3B4C6`,d:`M177.3 207.2v11.5m23.8-11.5v11.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#5BA02E`,d:`M162.9 267.9a9.4 9.4 0 0 1-9.4-9.4v-14.8a9.4 9.4 0 0 1 18.8 0v14.8a9.4 9.4 0 0 1-9.4 9.4`}),S.createElement(`path`,{fill:`#92C110`,d:`M171.2 267.8a9.4 9.4 0 0 1-9.4-9.4V255a9.4 9.4 0 0 1 18.8 0v3.4a9.4 9.4 0 0 1-9.4 9.4`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M181.3 293.7h-27.7a3.2 3.2 0 0 1-3.2-3.2v-20.7a3.2 3.2 0 0 1 3.2-3.2h27.7a3.2 3.2 0 0 1 3.2 3.2v20.7a3.2 3.2 0 0 1-3.2 3.2`}))),ZK=e=>{let{componentCls:t,lineHeightHeading3:n,iconCls:r,padding:i,paddingXL:a,paddingXS:o,paddingLG:s,marginXS:c,lineHeight:l}=e;return{[t]:{padding:`${Y(e.calc(s).mul(2).equal())} ${Y(a)}`,"&-rtl":{direction:`rtl`}},[`${t} ${t}-image`]:{width:e.imageWidth,height:e.imageHeight,margin:`auto`},[`${t} ${t}-icon`]:{marginBottom:s,textAlign:`center`,[`& > ${r}`]:{fontSize:e.iconFontSize}},[`${t} ${t}-title`]:{color:e.colorTextHeading,fontSize:e.titleFontSize,lineHeight:n,marginBlock:c,textAlign:`center`},[`${t} ${t}-subtitle`]:{color:e.colorTextDescription,fontSize:e.subtitleFontSize,lineHeight:l,textAlign:`center`},[`${t} ${t}-body`]:{marginTop:s,padding:`${Y(s)} ${Y(e.calc(i).mul(2.5).equal())}`,backgroundColor:e.colorFillAlter},[`${t} ${t}-extra`]:{margin:e.extraMargin,textAlign:`center`,"& > *":{marginInlineEnd:o,"&:last-child":{marginInlineEnd:0}}}}},QK=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-success ${t}-icon > ${n}`]:{color:e.resultSuccessIconColor},[`${t}-error ${t}-icon > ${n}`]:{color:e.resultErrorIconColor},[`${t}-info ${t}-icon > ${n}`]:{color:e.resultInfoIconColor},[`${t}-warning ${t}-icon > ${n}`]:{color:e.resultWarningIconColor}}},$K=e=>[ZK(e),QK(e)],eq=Ql(`Result`,e=>{let t=e.colorInfo,n=e.colorError,r=e.colorSuccess,i=e.colorWarning;return $K(dc(e,{resultInfoIconColor:t,resultErrorIconColor:n,resultSuccessIconColor:r,resultWarningIconColor:i,imageWidth:250,imageHeight:295}))},e=>({titleFontSize:e.fontSizeHeading3,subtitleFontSize:e.fontSize,iconFontSize:e.fontSizeHeading3*3,extraMargin:`${e.paddingLG}px 0 0 0`})),tq=()=>S.createElement(`svg`,{width:`251`,height:`294`},S.createElement(`title`,null,`Unauthorized`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`path`,{fill:`#E4EBF7`,d:`M0 129v-2C0 58.3 55.6 2.7 124.2 2.7h2c68.6 0 124.2 55.6 124.2 124.1v2.1c0 68.6-55.6 124.2-124.1 124.2h-2.1A124.2 124.2 0 0 1 0 129`}),S.createElement(`path`,{fill:`#FFF`,d:`M41.4 133a8.2 8.2 0 1 1-16.4-1.7 8.2 8.2 0 0 1 16.4 1.6`}),S.createElement(`path`,{stroke:`#FFF`,d:`m38.7 136.4 10.4 5.9m.9 6.2-12.6 10.7`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M41.5 161.3a5.6 5.6 0 1 1-11.2-1.2 5.6 5.6 0 0 1 11.2 1.2m17.7-16a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m41.2-115.8H130a4.6 4.6 0 1 0 0-9.1h-29.6a4.6 4.6 0 0 0 0 9.1m11.3 18.3h29.7a4.6 4.6 0 1 0 0-9.2h-29.7a4.6 4.6 0 1 0 0 9.2`}),S.createElement(`path`,{fill:`#FFF`,d:`M114 29.5h15.8a4.6 4.6 0 1 0 0 9.1H114a4.6 4.6 0 0 0 0-9.1m71.3 108.2a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),S.createElement(`path`,{stroke:`#FFF`,d:`m180.2 143.8 12.5 7.1m1.1 7.5-15.1 13`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M185.6 172a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.5 1.3m18.6-16.6a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.6 1.4`}),S.createElement(`path`,{stroke:`#FFF`,d:`M153 194a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm73-75.8a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm-9 34.9a2.2 2.2 0 1 1-4.3 0 2.2 2.2 0 0 1 4.4 0zm-39.2-43.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.3-15.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm6.7 88a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0z`,strokeWidth:`2`}),S.createElement(`path`,{stroke:`#FFF`,d:`m215.1 155.3-1.9 20-10.8 6m-27.8-4.7-6.3 9.8H157l-4.5 6.4m23.4-65.5v-15.7m45.6 7.8-12.8 7.9-15.2-7.9V96.7`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#A26EF4`,d:`M180.7 29.3a29.3 29.3 0 1 1 58.6 0 29.3 29.3 0 0 1-58.6 0`}),S.createElement(`path`,{fill:`#FFF`,d:`m221.4 41.7-21.5-.1a1.7 1.7 0 0 1-1.7-1.8V27.6a1.7 1.7 0 0 1 1.8-1.7h21.5c1 0 1.8.9 1.8 1.8l-.1 12.3a1.7 1.7 0 0 1-1.7 1.7`}),S.createElement(`path`,{fill:`#FFF`,d:`M215.1 29.2c0 2.6-2 4.6-4.5 4.6a4.6 4.6 0 0 1-4.5-4.7v-6.9c0-2.6 2-4.6 4.6-4.6 2.5 0 4.5 2 4.4 4.7v6.9zm-4.5-14a6.9 6.9 0 0 0-7 6.8v7.3a6.9 6.9 0 0 0 13.8.1V22a6.9 6.9 0 0 0-6.8-6.9zm-43 53.2h-4a4.7 4.7 0 0 1-4.7-4.8 4.7 4.7 0 0 1 4.7-4.7h4a4.7 4.7 0 0 1 4.7 4.8 4.7 4.7 0 0 1-4.7 4.7`}),S.createElement(`path`,{fill:`#5BA02E`,d:`M168.2 248.8a6.6 6.6 0 0 1-6.6-6.6v-66a6.6 6.6 0 0 1 13.2 0v66a6.6 6.6 0 0 1-6.6 6.6`}),S.createElement(`path`,{fill:`#92C110`,d:`M176.1 248.2a6.6 6.6 0 0 1-6.6-6.6v-33a6.6 6.6 0 1 1 13.3 0v33a6.6 6.6 0 0 1-6.7 6.6`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M186 293.9h-27.4a3.2 3.2 0 0 1-3.2-3.2v-45.9a3.2 3.2 0 0 1 3.2-3.1H186a3.2 3.2 0 0 1 3.2 3.1v46a3.2 3.2 0 0 1-3.2 3`}),S.createElement(`path`,{fill:`#FFF`,d:`M82 147.7s6.3-1 17.5-1.3c11.8-.4 17.6 1 17.6 1s3.7-3.8 1-8.3c1.3-12.1 6-32.9.3-48.3-1.1-1.4-3.7-1.5-7.5-.6-1.4.3-7.2-.2-8-.1l-15.3-.4-8-.5c-1.6-.1-4.3-1.7-5.5-.3-.4.4-2.4 5.6-2 16l8.7 35.7s-3.2 3.6 1.2 7`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m75.8 73.3-1-6.4 12-6.5s7.4-.1 8 1.2c.8 1.3-5.5 1-5.5 1s-1.9 1.4-2.6 2.5c-1.7 2.4-1 6.5-8.4 6-1.7.3-2.5 2.2-2.5 2.2`}),S.createElement(`path`,{fill:`#FFB594`,d:`M52.4 77.7S66.7 87 77.4 92c1 .5-2 16.2-11.9 11.8-7.4-3.3-20.1-8.4-21.5-14.5-.7-3.2 2.6-7.6 8.4-11.7M142 80s-6.7 3-13.9 6.9c-3.9 2.1-10.1 4.7-12.3 8-6.2 9.3 3.5 11.2 13 7.5 6.6-2.7 29-12.1 13.2-22.4`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m76.2 66.4 3 3.8S76.4 73 73 76c-7 6.2-12.8 14.3-16 16.4-4 2.7-9.7 3.3-12.2 0-3.5-5.1.5-14.7 31.5-26`}),S.createElement(`path`,{fill:`#FFF`,d:`M64.7 85.1s-2.4 8.4-9 14.5c.7.5 18.6 10.5 22.2 10 5.2-.6 6.4-19 1.2-20.5-.8-.2-6-1.3-8.9-2.2-.9-.2-1.6-1.7-3.5-1l-2-.8zm63.7.7s5.3 2 7.3 13.8c-.6.2-17.6 12.3-21.8 7.8-6.6-7-.8-17.4 4.2-18.6 4.7-1.2 5-1.4 10.3-3`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M78.2 94.7s.9 7.4-5 13`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M87.4 94.7s3.1 2.6 10.3 2.6c7.1 0 9-3.5 9-3.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.9`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m117.2 68.6-6.8-6.1s-5.4-4.4-9.2-1c-3.9 3.5 4.4 2.2 5.6 4.2 1.2 2.1.9 1.2-2 .5-5.7-1.4-2.1.9 3 5.3 2 1.9 7 1 7 1l2.4-3.9z`}),S.createElement(`path`,{fill:`#FFB594`,d:`m105.3 91.3-.3-11H89l-.5 10.5c0 .4.2.8.6 1 2 1.3 9.3 5 15.8.4.2-.2.4-.5.4-.9`}),S.createElement(`path`,{fill:`#5C2552`,d:`M107.6 74.2c.8-1.1 1-9 1-11.9a1 1 0 0 0-1-1l-4.6-.4c-7.7-1-17 .6-18.3 6.3-5.4 5.9-.4 13.3-.4 13.3s2 3.5 4.3 6.8c.8 1 .4-3.8 3-6a47.9 47.9 0 0 1 16-7`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M88.4 83.2s2.7 6.2 11.6 6.5c7.8.3 9-7 7.5-17.5l-1-5.5c-6-2.9-15.4.6-15.4.6s-.6 2-.2 5.5c-2.3 2-1.8 5.6-1.8 5.6s-1-2-2-2.3c-.9-.3-2 0-2.3 2-1 4.6 3.6 5.1 3.6 5.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`m100.8 77.1 1.7-1-1-4.3.7-1.4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#552950`,d:`M105.5 74c0 .8-.4 1.4-1 1.4-.4 0-.8-.7-.8-1.4s.5-1.2 1-1.2.9.6.8 1.3m-8 .2c0 .8-.4 1.3-.9 1.3s-.9-.6-.9-1.3c0-.7.5-1.3 1-1.3s1 .6.9 1.3`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M91.1 86.8s5.3 5 12.7 2.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#DB836E`,d:`M99.8 81.9s-3.6.2-1.5-2.8c1.6-1.5 5-.4 5-.4s1 3.9-3.5 3.2`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M102.9 70.6s2.5.8 3.4.7m-12.4.7s2.5-1.2 4.8-1.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M86.3 77.4s1 .9 1.5 2c-.4.6-1 1.2-.3 1.9m11.8 2.4s2 .2 2.5-.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`m87.8 115.8 15.7-3m-3.3 3 10-2m-43.7-27s-1.6 8.8-6.7 14M128.3 88s3 4 4 11.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M64 84.8s-6 10-13.5 10`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m112.4 66-.2 5.2 12 9.2c4.5 3.6 8.9 7.5 11 8.7 4.8 2.8 8.9 3.3 11 1.8 4.1-2.9 4.4-9.9-8.1-15.3-4.3-1.8-16.1-6.3-25.7-9.7`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M130.5 85.5s4.6 5.7 11.7 6.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M121.7 105.7s-.4 8.6-1.3 13.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M115.8 161.5s-3.6-1.5-2.7-7.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M101.5 290.2s4.3 2.1 7.4 1c2.9-.9 4.6.7 7.2 1.3 2.5.5 6.9 1 11.7-1.3 0-5.6-7-4-12-6.8-2.6-1.4-3.8-4.7-3.6-8.8h-9.5s-1.4 10.6-1.2 14.6`}),S.createElement(`path`,{fill:`#2B0849`,d:`M101.5 290s2.4 1.4 6.8.7c3-.4 3.7.5 7.5 1 3.7.6 10.8 0 11.9-.8.4 1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.7-.5-1.8-1.4-5.2-2-5.7-.3-4 1-7.4-.3-7.4-.3l-.2-2.6z`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M108.8 276.2h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M57.6 272.5s-2 7.5-4.5 12.4c-1.8 3.7-4.2 7.6 5.5 7.6 6.7 0 9-.5 7.5-6.7-1.5-6.1.3-13.3.3-13.3h-8.8z`}),S.createElement(`path`,{fill:`#2B0849`,d:`M51.5 290s2.2 1.2 6.7 1.2c6.1 0 8.3-1.6 8.3-1.6s.6 1-.6 2.1c-1 .9-3.6 1.6-7.4 1.6-4.2 0-6-.6-6.8-1.2-.9-.5-.7-1.6-.2-2`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M58.5 274.4s0 1.6-.3 3-1 3.1-1.1 4.2c0 1.1 4.5 1.5 5.2 0 .6-1.6 1.3-6.5 1.9-7.3.6-.8-5-2.1-5.7.1`}),S.createElement(`path`,{fill:`#7BB2F9`,d:`m100.9 277 13.3.1s1.3-54.2 1.8-64c.6-9.9 3.8-43.2 1-62.8l-12.4-.7-22.8.8-1.2 10c0 .4-.6.8-.7 1.3 0 .6.4 1.3.3 2-2.3 14-6.3 32.9-8.7 46.4-.1.6-1.2 1-1.4 2.6 0 .3.2 1.6 0 1.8-6.8 18.7-10.8 47.6-14.1 61.6h14.5s2.2-8.6 4-17a3984 3984 0 0 1 23-84.5l3-.5 1 46.1s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.7-1 11.9c-.4 4.6 0 39 0 39`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M77.4 220.4c1.2.1 4-2 7-4.9m23.1 8.4s2.8-1 6.1-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M108.5 221s2.7-1.2 6-4`,strokeLinecap:`round`,strokeLinejoin:`round`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M76.1 223.6s2.6-.6 6.5-3.4m4.7-69.4c-.2 3.1.3 8.5-4.3 9m21.8-10.7s.1 14-1.3 15c-2.2 1.6-3 1.9-3 1.9m.5-16.4s0 12.8-1.2 24.3m-4.9 1s7.2-1.6 9.4-1.6m-28.6 31.5-1 4.5s-1.5 1.8-1 3.7c.4 2-1 2-5 15.3-1.7 5.6-4.4 18.5-6.3 27.5l-4 18.4M77 196.7a313.3 313.3 0 0 1-.8 4.8m7.7-50-1.2 10.3s-1 .2-.5 2.3c.1 1.3-2.6 15.6-5.1 30.2M57.6 273h13.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#192064`,d:`M117.4 147.4s-17-3-35.7.2v4.2s14.6-2.9 35.5-.4l.2-4`}),S.createElement(`path`,{fill:`#FFF`,d:`M107.5 150.4v-5a.8.8 0 0 0-.8-.7H99a.8.8 0 0 0-.7.8v4.8c0 .5.3.9.8.8a140.8 140.8 0 0 1 7.7 0 .8.8 0 0 0 .8-.7`}),S.createElement(`path`,{fill:`#192064`,d:`M106.4 149.4v-3a.6.6 0 0 0-.6-.7 94.1 94.1 0 0 0-5.8 0 .6.6 0 0 0-.7.7v3c0 .4.3.7.7.7h5.7c.4 0 .7-.3.7-.7`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M101.5 274h12.3m-11.1-5v6.5m0-12.4v4.3m-.5-93.4.9 44.4s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.1 0 3.4-.6 1.5-1 21-1.1 35`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),nq={success:Tu,error:Ou,info:Pu,warning:JK},rq={404:YK,500:XK,403:tq},iq=Object.keys(rq),aq=({icon:e,status:t,className:n,style:r})=>{if(iq.includes(`${t}`)){let e=rq[t];return S.createElement(`div`,{className:n,style:r},S.createElement(e,null))}let i=S.createElement(nq[t]);return e===null||e===!1?null:S.createElement(`div`,{className:n,style:r},e||i)},oq=({className:e,extra:t,style:n})=>t?S.createElement(`div`,{className:e,style:n},t):null,sq=e=>{let{prefixCls:t,className:n,rootClassName:r,subTitle:i,title:a,style:o,children:s,status:c=`info`,icon:l,extra:u,styles:d,classNames:f,...p}=e,{getPrefixCls:m,direction:h,className:g,style:_,classNames:v,styles:y}=ya(`result`),b={...e,status:c},[x,C]=Cf([v,f],[y,d],{props:b}),w=m(`result`,t),[T,E]=eq(w),D=J(w,`${w}-${c}`,n,g,r,{[`${w}-rtl`]:h===`rtl`},T,E,x.root),O=J(`${w}-title`,x.title),k=J(`${w}-subtitle`,x.subTitle),A=J(`${w}-extra`,x.extra),j=J(`${w}-body`,x.body),M=J(`${w}-icon`,{[`${w}-image`]:iq.includes(`${c}`)},x.icon),N={...C.root,..._,...o},P=xi(p,{aria:!0,data:!0});return S.createElement(`div`,{...P,className:D,style:N},S.createElement(aq,{className:M,style:C.icon,status:c,icon:l}),S.createElement(`div`,{className:O,style:C.title},a),i&&S.createElement(`div`,{className:k,style:C.subTitle},i),S.createElement(oq,{className:A,extra:u,style:C.extra}),s&&S.createElement(`div`,{className:j,style:C.body},s))};sq.PRESENTED_IMAGE_403=rq[403],sq.PRESENTED_IMAGE_404=rq[404],sq.PRESENTED_IMAGE_500=rq[500];var cq=bR;function lq(){return lq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[h,g]=Gn(r??!1,n);function _(e,t){let n=h;return i||(n=e,g(n),l?.(n,t)),n}function v(e){e.which===Qr.LEFT?_(!1,e):e.which===Qr.RIGHT&&_(!0,e),u?.(e)}function y(e){let t=_(!h,e);c?.(t,e)}let b=J(e,t,{[`${e}-checked`]:h,[`${e}-disabled`]:i});return S.createElement(`button`,lq({},p,{type:`button`,role:`switch`,"aria-checked":h,disabled:i,className:b,ref:m,onKeyDown:v,onClick:y}),a,S.createElement(`span`,{className:`${e}-inner`},S.createElement(`span`,{className:J(`${e}-inner-checked`,f?.content),style:d?.content},o),S.createElement(`span`,{className:J(`${e}-inner-unchecked`,f?.content),style:d?.content},s)))});uq.displayName=`Switch`;var dq=e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:o,handleSizeSM:s,calc:c}=e,l=`${t}-inner`,u=Y(c(s).add(c(r).mul(2)).equal()),d=Y(c(o).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:Y(n),[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${l}-checked, ${l}-unchecked`]:{minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${l}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:c(c(s).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${Y(c(s).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},fq=e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:`relative`,top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:`top`},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},pq=e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:o}=e,s=`${t}-handle`;return{[t]:{[s]:{position:`absolute`,top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,...gg(),"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:o(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:`""`,...gg()}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${Y(o(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},mq=e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:o,switchDuration:s,calc:c}=e,l=`${t}-inner`,u=Y(c(o).add(c(r).mul(2)).equal()),d=Y(c(a).mul(2).equal());return{[t]:{[l]:{display:`block`,overflow:`hidden`,borderRadius:100,height:`100%`,paddingInlineStart:a,paddingInlineEnd:i,transition:[`padding-inline-start`,`padding-inline-end`].map(e=>`${e} ${s} ease-in-out`).join(`, `),...gg(),[`${l}-checked, ${l}-unchecked`]:{display:`block`,color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:`none`,minHeight:n,transition:[`margin-inline-start`,`margin-inline-end`].map(e=>`${e} ${s} ease-in-out`).join(`, `),...gg()},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${l}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}},hq=e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:{...Ul(e),position:`relative`,display:`inline-block`,boxSizing:`border-box`,minWidth:r,height:n,lineHeight:Y(n),verticalAlign:`middle`,background:e.colorTextQuaternary,border:`0`,borderRadius:100,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,userSelect:`none`,...gg(),[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...ql(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:`not-allowed`,opacity:e.switchDisabledOpacity,"*":{boxShadow:`none`,cursor:`not-allowed`}},[`&${t}-rtl`]:{direction:`rtl`}}}},gq=Ql(`Switch`,e=>{let t=dc(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:`-30%`});return[hq(t),mq(t),pq(t),fq(t),dq(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,o=r/2,s=a-4,c=o-4;return{trackHeight:a,trackHeightSM:o,trackMinWidth:s*2+8,trackMinWidthSM:c*2+4,trackPadding:2,handleBg:i,handleSize:s,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new Nc(`#00230b`).setA(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}),_q=S.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,loading:a,className:o,rootClassName:s,style:c,checked:l,value:u,defaultChecked:d,defaultValue:f,onChange:p,styles:m,classNames:h,...g}=e,[_,v]=Gn(d??f??!1,l??u),{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=ya(`switch`),E=S.useContext(mm),D=(i??E)||a,O=y(`switch`,n),[k,A]=gq(O),j=Eh(r),M={...e,size:j,disabled:D},[N,P]=Cf([w,h],[T,m],{props:M}),F=S.createElement(`div`,{className:J(`${O}-handle`,N.indicator),style:P.indicator},a&&S.createElement(Xm,{className:`${O}-loading-icon`})),I=J(x,{[`${O}-small`]:j===`small`,[`${O}-loading`]:a,[`${O}-rtl`]:b===`rtl`},o,s,N.root,k,A),L={...P.root,...C,...c},R=(...e)=>{v(e[0]),p?.(...e)};return S.createElement(Th,{component:`Switch`,disabled:D},S.createElement(uq,{...g,classNames:N,styles:P,checked:_,onChange:R,prefixCls:O,className:I,style:L,disabled:D,ref:t,loadingIcon:F}))});_q.__ANT_SWITCH=!0;var vq={},yq=`rc-table-internal-hook`;function bq(e){let t=S.createContext(void 0);return{Context:t,Provider:({value:e,children:n})=>{let r=S.useRef(e);r.current=e;let[i]=S.useState(()=>({getValue:()=>r.current,listeners:new Set}));return Hn(()=>{(0,Vi.unstable_batchedUpdates)(()=>{i.listeners.forEach(t=>{t(e)})})},[e]),S.createElement(t.Provider,{value:i},n)},defaultValue:e}}function xq(e,t){let n=zn(typeof t==`function`?t:e=>{if(t===void 0)return e;if(!Array.isArray(t))return e[t];let n={};return t.forEach(t=>{n[t]=e[t]}),n}),r=S.useContext(e?.Context),{listeners:i,getValue:a}=r||{},o=S.useRef();o.current=n(r?a():e?.defaultValue);let[,s]=S.useState({});return Hn(()=>{if(!r)return;function e(e){let t=n(e);fi(o.current,t,!0)||s({})}return i.add(e),()=>{i.delete(e)}},[r]),o.current}function Sq(){return Sq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let s=i?{ref:o}:{},c=S.useRef(0),l=S.useRef(a);return t()===null?((!r||r(l.current,a))&&(c.current+=1),l.current=a,S.createElement(e.Provider,{value:c.current},S.createElement(n,Sq({},a,s)))):S.createElement(n,Sq({},a,s))};return i?S.forwardRef(a):a}function r(e,n){let r=ur(e),i=(n,i)=>{let a=r?{ref:i}:{};return t(),S.createElement(e,Sq({},n,a))};return S.memo(r?S.forwardRef(i):i,n)}return{makeImmutable:n,responseImmutable:r,useImmutableMark:t}}var{makeImmutable:Qre,responseImmutable:$re,useImmutableMark:eie}=Cq(),{makeImmutable:wq,responseImmutable:Tq,useImmutableMark:Eq}=Cq(),Dq=bq(),Oq=S.createContext({renderWithProps:!1}),kq=`RC_TABLE_KEY`;function Aq(e){return e==null?[]:Array.isArray(e)?e:[e]}function jq(e){let t=[],n={};return e.forEach(e=>{let{key:r,dataIndex:i}=e||{},a=r||Aq(i).join(`-`)||kq;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function Mq(e){return e!=null}function Nq(e){return typeof e==`number`&&!Number.isNaN(e)}function Pq(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!S.isValidElement(e)}function Fq(e,t,n,r,i,a){let o=S.useContext(Oq);return Zn(()=>{if(Mq(r))return[r];let a=Ai(e,t==null||t===``?[]:Array.isArray(t)?t:[t]),s=a,c;if(i){let t=i(a,e,n);Pq(t)?(s=t.children,c=t.props,o.renderWithProps=!0):s=t}return[s,c]},[Eq(),e,r,t,i,n],(e,t)=>{if(a){let[,n]=e,[,r]=t;return a(r,n)}return o.renderWithProps?!0:!fi(e,t,!0)})}function Iq(e,t,n,r){let i=e+t-1;return e<=r&&i>=n}function Lq(e,t){return xq(Dq,n=>[Iq(e,t||1,n.hoverStartRow,n.hoverEndRow),n.onHover])}function Rq(){return Rq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r,i=e===!0?{showTitle:!0}:e;return i&&(i.showTitle||t===`header`)&&(typeof n==`string`||typeof n==`number`?r=n.toString():S.isValidElement(n)&&typeof n.props?.children==`string`&&(r=n.props?.children)),r},Bq=S.memo(e=>{let{component:t,children:n,ellipsis:r,scope:i,prefixCls:a,className:o,style:s,align:c,record:l,render:u,dataIndex:d,renderIndex:f,shouldCellUpdate:p,index:m,rowType:h,colSpan:g,rowSpan:_,fixStart:v,fixEnd:y,fixedStartShadow:b,fixedEndShadow:x,offsetFixedStartShadow:C,offsetFixedEndShadow:w,zIndex:T,zIndexReverse:E,appendNode:D,additionalProps:O={},isSticky:k}=e,A=`${a}-cell`,{allColumnsFixedLeft:j,rowHoverable:M}=xq(Dq,[`allColumnsFixedLeft`,`rowHoverable`]),[N,P]=Fq(l,d,f,n,u,p),F={},I=typeof v==`number`&&!j,L=typeof y==`number`&&!j,[R,z]=xq(Dq,({scrollInfo:e})=>{if(!I&&!L)return[!1,!1];let[t,n]=e;return[(I&&b&&t)-C>=1,(L&&x&&n-t)-w>1]});I&&(F.insetInlineStart=v,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E),L&&(F.insetInlineEnd=y,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E);let B=P?.colSpan??O.colSpan??g??1,V=P?.rowSpan??O.rowSpan??_??1,[H,U]=Lq(m,V),ee=zn(e=>{l&&U(m,m+V-1),O?.onMouseEnter?.(e)}),W=zn(e=>{l&&U(-1,-1),O?.onMouseLeave?.(e)});if(B===0||V===0)return null;let te=O.title??zq({rowType:h,ellipsis:r,children:N}),G=J(A,o,{[`${A}-fix`]:I||L,[`${A}-fix-start`]:I,[`${A}-fix-end`]:L,[`${A}-fix-start-shadow`]:b,[`${A}-fix-start-shadow-show`]:b&&R,[`${A}-fix-end-shadow`]:x,[`${A}-fix-end-shadow-show`]:x&&z,[`${A}-ellipsis`]:r,[`${A}-with-append`]:D,[`${A}-fix-sticky`]:(I||L)&&k,[`${A}-row-hover`]:!P&&H},O.className,P?.className),ne={};c&&(ne.textAlign=c);let K={...P?.style,...F,...ne,...O.style,...s},re=N;return typeof re==`object`&&!Array.isArray(re)&&!S.isValidElement(re)&&(re=null),r&&(b||x)&&(re=S.createElement(`span`,{className:`${A}-content`},re)),S.createElement(t,Rq({},P,O,{className:G,style:K,title:te,scope:i,onMouseEnter:M?ee:void 0,onMouseLeave:M?W:void 0,colSpan:B===1?null:B,rowSpan:V===1?null:V}),D,re)});function Vq(e){return e.fixed===`start`}function Hq(e){return e.fixed===`end`}function Uq(e,t,n,r){let i=n[e]||{},a=n[t]||{},o=null,s=null;Vq(i)&&Vq(a)?o=r.start[e]:Hq(a)&&Hq(i)&&(s=r.end[t]);let c=!1,l=!1,u=0,d=0;o!==null&&(c=!n[t+1]||!Vq(n[t+1]),u=n.length*2-e,d=n.length+e),s!==null&&(l=!n[e-1]||!Hq(n[e-1]),u=t,d=n.length-t);let f=0,p=0;if(c)for(let t=0;tt;--e)Hq(n[e])||(p+=r.widths[e]||0);return{fixStart:o,fixEnd:s,fixedStartShadow:c,fixedEndShadow:l,offsetFixedStartShadow:f,offsetFixedEndShadow:p,isSticky:r.isSticky,zIndex:u,zIndexReverse:d}}var Wq=S.createContext({});function Gq(){return Gq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,index:n,children:r,colSpan:i=1,rowSpan:a,align:o}=e,{prefixCls:s}=xq(Dq,[`prefixCls`]),{scrollColumnIndex:c,stickyOffsets:l,flattenColumns:u}=S.useContext(Wq),d=n+i-1+1===c?i+1:i,f=S.useMemo(()=>Uq(n,n+d-1,u,l),[n,d,u,l]);return S.createElement(Bq,Gq({className:t,index:n,component:`td`,prefixCls:s,record:null,dataIndex:null,align:o,colSpan:d,rowSpan:a,render:()=>r},f))},qq=e=>{let{children:t,...n}=e;return S.createElement(`tr`,n,t)},Jq=e=>{let{children:t}=e;return t};Jq.Row=qq,Jq.Cell=Kq;var Yq=Tq(e=>{let{children:t,stickyOffsets:n,flattenColumns:r}=e,i=xq(Dq,`prefixCls`),a=r.length-1,o=r[a],s=S.useMemo(()=>({stickyOffsets:n,flattenColumns:r,scrollColumnIndex:o?.scrollbar?a:null}),[o,r,a,n]);return S.createElement(Wq.Provider,{value:s},S.createElement(`tfoot`,{className:`${i}-summary`},t))}),Xq=Jq;function Zq(e){return null}function Qq(e){return null}function $q(e,t,n,r,i,a,o){let s=a(t,o);e.push({record:t,indent:n,index:o,rowKey:s});let c=i?.has(s);if(t&&Array.isArray(t[r])&&c)for(let o=0;o{if(n?.size){let i=[];for(let a=0;a({record:e,indent:0,index:t,rowKey:r(e,t)}))},[e,t,n,r])}function tJ(e,t,n,r){let i=xq(Dq,[`prefixCls`,`fixedInfoList`,`flattenColumns`,`expandableType`,`expandRowByClick`,`onTriggerExpand`,`rowClassName`,`expandedRowClassName`,`indentSize`,`expandIcon`,`expandedRowRender`,`expandIconColumnIndex`,`expandedKeys`,`childrenColumnName`,`rowExpandable`,`onRow`]),{flattenColumns:a,expandableType:o,expandedKeys:s,childrenColumnName:c,onTriggerExpand:l,rowExpandable:u,onRow:d,expandRowByClick:f,rowClassName:p}=i,m=o===`nest`,h=o===`row`&&(!u||u(e)),g=h||m,_=s&&s.has(t),v=c&&e&&e[c],y=zn(l),b=d?.(e,n),x=b?.onClick,S=(t,...n)=>{f&&g&&l(e,t),x?.(t,...n)},C;typeof p==`string`?C=p:typeof p==`function`&&(C=p(e,n,r));let w=jq(a);return{...i,columnsKey:w,nestExpandable:m,expanded:_,hasNestChildren:v,record:e,onTriggerExpand:y,rowSupportExpand:h,expandable:g,rowProps:{...b,className:J(C,b?.className),onClick:S}}}var nJ=e=>{let{prefixCls:t,children:n,component:r,cellComponent:i,className:a,expanded:o,colSpan:s,isEmpty:c,stickyOffset:l=0}=e,{scrollbarSize:u,fixHeader:d,fixColumn:f,componentWidth:p,horizonScroll:m}=xq(Dq,[`scrollbarSize`,`fixHeader`,`fixColumn`,`componentWidth`,`horizonScroll`]),h=n;return(c?m&&p:f)&&(h=S.createElement(`div`,{style:{width:p-l-(d&&!c?u:0),position:`sticky`,left:l,overflow:`hidden`},className:`${t}-expanded-row-fixed`},h)),S.createElement(r,{className:a,style:{display:o?null:`none`}},S.createElement(Bq,{component:i,prefixCls:t,colSpan:s},h))};function rJ({prefixCls:e,record:t,onExpand:n,expanded:r,expandable:i}){let a=`${e}-row-expand-icon`;if(!i)return S.createElement(`span`,{className:J(a,`${e}-row-spaced`)});let o=e=>{n(t,e),e.stopPropagation()};return S.createElement(`span`,{className:J(a,{[`${e}-row-expanded`]:r,[`${e}-row-collapsed`]:!r}),onClick:o})}function iJ(e,t,n){let r=[];function i(e){(e||[]).forEach((e,a)=>{r.push(t(e,a)),i(e[n])})}return i(e),r}function aJ(e,t,n,r){return typeof e==`string`?e:typeof e==`function`?e(t,n,r):``}function oJ(){return oJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,style:n,classNames:r,styles:i,record:a,index:o,renderIndex:s,rowKey:c,rowKeys:l,indent:u=0,rowComponent:d,cellComponent:f,scopeCellComponent:p,expandedRowInfo:m}=e,h=tJ(a,c,o,u),{prefixCls:g,flattenColumns:_,expandedRowClassName:v,expandedRowRender:y,rowProps:b,expanded:x,rowSupportExpand:C}=h,w=S.useRef(!1);w.current||=x;let T=aJ(v,a,o,u),E=S.createElement(d,oJ({},b,{"data-row-key":c,className:J(t,`${g}-row`,`${g}-row-level-${u}`,b?.className,r.row,{[T]:u>=1}),style:{...n,...b?.style,...i.row}}),_.map((e,t)=>{let{render:n,dataIndex:c,className:d}=e,{key:_,fixedInfo:v,appendCellNode:y,additionalCellProps:b}=sJ(h,e,t,u,o,l,m?.offset);return S.createElement(Bq,oJ({className:J(d,r.cell),style:i.cell,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:f,prefixCls:g,key:_,record:a,index:o,renderIndex:s,dataIndex:c,render:n,shouldCellUpdate:e.shouldCellUpdate},v,{appendNode:y,additionalProps:b}))})),D;if(C&&(w.current||x)){let e=y(a,o,u+1,x);D=S.createElement(nJ,{expanded:x,className:J(`${g}-expanded-row`,`${g}-expanded-row-level-${u+1}`,T),prefixCls:g,component:d,cellComponent:f,colSpan:m?m.colSpan:_.length,isEmpty:!1,stickyOffset:m?.sticky},e)}return S.createElement(S.Fragment,null,E,D)}),lJ=e=>{let{columnKey:t,onColumnResize:n,title:r}=e,i=S.useRef(null);return Hn(()=>{i.current&&n(t,i.current.offsetWidth)},[]),S.createElement(oa,{data:t},S.createElement(`td`,{ref:i,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},S.createElement(`div`,{style:{height:0,overflow:`hidden`,fontWeight:`bold`}},r||`\xA0`)))},uJ=({prefixCls:e,columnsKey:t,onColumnResize:n,columns:r})=>{let i=S.useRef(null),{measureRowRender:a}=xq(Dq,[`measureRowRender`]),o=S.createElement(`tr`,{"aria-hidden":`true`,className:`${e}-measure-row`,style:{height:0},ref:i},S.createElement(oa.Collection,{onBatchResize:e=>{Ar(i.current)&&e.forEach(({data:e,size:t})=>{n(e,t.offsetWidth)})}},t.map(e=>{let t=r.find(t=>t.key===e)?.title,i=S.isValidElement(t)?S.cloneElement(t,{ref:null}):t;return S.createElement(lJ,{key:e,columnKey:e,onColumnResize:n,title:i})})));return typeof a==`function`?a(o):o},dJ=Tq(e=>{let{data:t,measureColumnWidth:n}=e,{prefixCls:r,getComponent:i,onColumnResize:a,flattenColumns:o,getRowKey:s,expandedKeys:c,childrenColumnName:l,emptyNode:u,classNames:d,styles:f,expandedRowOffset:p=0,colWidths:m}=xq(Dq,[`prefixCls`,`getComponent`,`onColumnResize`,`flattenColumns`,`getRowKey`,`expandedKeys`,`childrenColumnName`,`emptyNode`,`classNames`,`styles`,`expandedRowOffset`,`fixedInfoList`,`colWidths`]),{body:h={}}=d||{},{body:g={}}=f||{},_=eJ(t,l,c,s),v=S.useMemo(()=>_.map(e=>e.rowKey),[_]),y=S.useRef({renderWithProps:!1}),b=S.useMemo(()=>{let e=o.length-p,t=0;for(let e=0;e{let{record:n,indent:r,index:i,rowKey:a}=e;return S.createElement(cJ,{classNames:h,styles:g,key:a,rowKey:a,rowKeys:v,record:n,index:t,renderIndex:i,rowComponent:C,cellComponent:w,scopeCellComponent:T,indent:r,expandedRowInfo:b})}):S.createElement(nJ,{expanded:!0,className:`${r}-placeholder`,prefixCls:r,component:C,cellComponent:w,colSpan:o.length,isEmpty:!0},u);let D=jq(o);return S.createElement(Oq.Provider,{value:y.current},S.createElement(x,{style:g.wrapper,className:J(`${r}-tbody`,h.wrapper)},n&&S.createElement(uJ,{prefixCls:r,columnsKey:D,onColumnResize:a,columns:o}),E))}),fJ=`RC_TABLE_INTERNAL_COL_DEFINE`;function pJ(e){let{expandable:t,...n}=e,r;return r=`expandable`in e?{...n,...t}:n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}function mJ(){return mJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{colWidths:t,columns:n,columCount:r}=e,{tableLayout:i}=xq(Dq,[`tableLayout`]),a=[],o=r||n.length,s=!1;for(let e=o-1;e>=0;--e){let r=t[e],o=n&&n[e],c,l;if(o&&(c=o[fJ],i===`auto`&&(l=o.minWidth)),r||l||c||s){let{columnType:t,...n}=c||{};a.unshift(S.createElement(`col`,mJ({key:e,style:{width:r,minWidth:l}},n))),s=!0}}return a.length>0?S.createElement(`colgroup`,null,a):null};function gJ(e,t){return(0,S.useMemo)(()=>{let n=[];for(let r=0;r{let{className:n,style:r,noData:i,columns:a,flattenColumns:o,colWidths:s,colGroup:c,columCount:l,stickyOffsets:u,direction:d,fixHeader:f,stickyTopOffset:p,stickyBottomOffset:m,stickyClassName:h,scrollX:g,tableLayout:_=`fixed`,onScroll:v,maxContentScroll:y,children:b,...x}=e,{prefixCls:C,scrollbarSize:w,isSticky:T,getComponent:E}=xq(Dq,[`prefixCls`,`scrollbarSize`,`isSticky`,`getComponent`]),D=E([`header`,`table`],`table`),O=T&&!f?0:w,k=S.useRef(null),A=S.useCallback(e=>{sr(t,e),sr(k,e)},[]);S.useEffect(()=>{function e(e){let{currentTarget:t,deltaX:n}=e;if(n){let{scrollLeft:r,scrollWidth:i,clientWidth:a}=t,o=i-a,s=r+n;d===`rtl`?(s=Math.max(-o,s),s=Math.min(0,s)):(s=Math.min(o,s),s=Math.max(0,s)),v({currentTarget:t,scrollLeft:s}),e.preventDefault()}}let t=k.current;return t?.addEventListener(`wheel`,e,{passive:!1}),()=>{t?.removeEventListener(`wheel`,e)}},[]);let j=o[o.length-1],M={fixed:j?j.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${C}-cell-scrollbar`})},N=(0,S.useMemo)(()=>O?[...a,M]:a,[O,a]),P=(0,S.useMemo)(()=>O?[...o,M]:o,[O,o]),F=(0,S.useMemo)(()=>{let{start:e,end:t}=u;return{...u,start:e,end:[...t.map(e=>e+O),0],isSticky:T}},[O,u,T]),I=gJ(s,l),L=(0,S.useMemo)(()=>{let e=!I||!I.length||I.every(e=>!e);return i||e},[i,I]);return S.createElement(`div`,{style:{overflow:`hidden`,...T?{top:p,bottom:m}:{},...r},ref:A,className:J(n,{[h]:!!h})},S.createElement(D,{style:{tableLayout:_,minWidth:`100%`,width:g}},L?c:S.createElement(hJ,{colWidths:[...I,O],columCount:l+1,columns:P}),b({...x,stickyOffsets:F,columns:N,flattenColumns:P})))}),vJ=S.memo(_J);function yJ(){return yJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{cells:t,stickyOffsets:n,flattenColumns:r,rowComponent:i,cellComponent:a,onHeaderRow:o,index:s,classNames:c,styles:l}=e,{prefixCls:u}=xq(Dq,[`prefixCls`]),d;o&&(d=o(t.map(e=>e.column),s));let f=jq(t.map(e=>e.column));return S.createElement(i,yJ({},d,{className:c.row,style:l.row}),t.map((e,t)=>{let{column:i,colStart:o,colEnd:s,colSpan:c}=e,l=Uq(o,s,r,n),d=i?.onHeaderCell?.(i)||{};return S.createElement(Bq,yJ({},e,{scope:i.title?c>1?`colgroup`:`col`:null,ellipsis:i.ellipsis,align:i.align,component:a,prefixCls:u,key:f[t]},l,{additionalProps:d,rowType:`header`}))}))};function xJ(e,t,n){let r=[];function i(e,a,o=0){r[o]=r[o]||[];let s=a;return e.filter(Boolean).map(e=>{let a={key:e.key,className:J(e.className,t.cell)||``,style:n.cell,children:e.title,column:e,colStart:s},c=1,l=e.children;return l&&l.length>0&&(c=i(l,s,o+1).reduce((e,t)=>e+t,0),a.hasSubColumns=!0),`colSpan`in e&&({colSpan:c}=e),`rowSpan`in e&&(a.rowSpan=e.rowSpan),a.colSpan=c,a.colEnd=a.colStart+c-1,r[o].push(a),s+=c,c})}i(e,0);let a=r.length;for(let e=0;e{!(`rowSpan`in t)&&!t.hasSubColumns&&(t.rowSpan=a-e)});return r}var SJ=Tq(e=>{let{stickyOffsets:t,columns:n,flattenColumns:r,onHeaderRow:i}=e,{prefixCls:a,getComponent:o,classNames:s,styles:c}=xq(Dq,[`prefixCls`,`getComponent`,`classNames`,`styles`]),{header:l={}}=s||{},{header:u={}}=c||{},d=S.useMemo(()=>xJ(n,l,u),[n,l,u]),f=o([`header`,`wrapper`],`thead`),p=o([`header`,`row`],`tr`),m=o([`header`,`cell`],`th`);return S.createElement(f,{className:J(`${a}-thead`,l.wrapper),style:u.wrapper},d.map((e,n)=>S.createElement(bJ,{classNames:l,styles:u,key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:p,cellComponent:m,onHeaderRow:i,index:n})))});function CJ(e,t=``){return typeof t==`number`?t:t.endsWith(`%`)?e*parseFloat(t)/100:null}function wJ(e,t,n){return S.useMemo(()=>{if(t&&t>0){let r=0,i=0;e.forEach(e=>{let n=CJ(t,e.width);n?r+=n:i+=1});let a=Math.max(t,n),o=Math.max(a-r,i),s=i,c=o/i,l=0,u=e.map(e=>{let n={...e},r=CJ(t,n.width);if(r)n.width=r;else{let e=Math.floor(c);n.width=s===1?o:e,o-=e,--s}return l+=n.width,n});if(l{let r=Math.floor(t.width*e);t.width=n===u.length-1?o:r,o-=r})}return[u,Math.max(l,a)]}return[e,t]},[e,t,n])}function TJ(e){return ki(e).filter(e=>S.isValidElement(e)).map(e=>{let{key:t,props:n}=e,{children:r,...i}=n,a={key:t,...i};return r&&(a.children=TJ(r)),a})}function EJ(e){return e.filter(e=>e&&typeof e==`object`&&!e.hidden).map(e=>{let t=e.children;return t&&t.length>0?{...e,children:EJ(t)}:e})}function DJ(e,t=`key`){return e.filter(e=>e&&typeof e==`object`).reduce((e,n,r)=>{let{fixed:i}=n,a=i===!0||i===`left`?`start`:i===`right`?`end`:i,o=`${t}-${r}`,s=n.children;return s&&s.length>0?[...e,...DJ(s,o).map(e=>({...e,fixed:e.fixed??a}))]:[...e,{key:o,...n,fixed:a}]},[])}function OJ({prefixCls:e,columns:t,children:n,expandable:r,expandedKeys:i,columnTitle:a,getRowKey:o,onTriggerExpand:s,expandIcon:c,rowExpandable:l,expandIconColumnIndex:u,expandedRowOffset:d=0,direction:f,expandRowByClick:p,columnWidth:m,fixed:h,scrollWidth:g,clientWidth:_},v){let y=S.useMemo(()=>EJ((t||TJ(n)||[]).slice()),[t,n]),b=S.useMemo(()=>{if(r){let t=y.slice();if(!t.includes(vq)){let e=u||0,n=e===0&&(h===`right`||h===`end`)?y.length:e;n>=0&&t.splice(n,0,vq)}let n=t.indexOf(vq);t=t.filter((e,t)=>e!==vq||t===n);let r=y[n],f;f=h||(r?r.fixed:null);let g={[fJ]:{className:`${e}-expand-icon-col`,columnType:`EXPAND_COLUMN`},title:a,fixed:f,className:`${e}-row-expand-icon-cell`,width:m,render:(t,n,r)=>{let a=o(n,r),u=c({prefixCls:e,expanded:i.has(a),expandable:l?l(n):!0,record:n,onExpand:s});return p?S.createElement(`span`,{onClick:e=>e.stopPropagation()},u):u}};return t.map((e,t)=>{let n=e===vq?g:e;return te!==vq)},[r,y,o,i,c,f,d]),x=S.useMemo(()=>{let e=b;return v&&(e=v(e)),e.length||(e=[{render:()=>null}]),e},[v,b,f]),[C,w]=wJ(S.useMemo(()=>DJ(x),[x,f,g]),g,_);return[x,C,w]}function kJ(e,t,n){let r=pJ(e),{expandIcon:i,expandedRowKeys:a,defaultExpandedRowKeys:o,defaultExpandAllRows:s,expandedRowRender:c,onExpand:l,onExpandedRowsChange:u,childrenColumnName:d}=r,f=i||rJ,p=d||`children`,m=S.useMemo(()=>c?`row`:e.expandable&&e.internalHooks===`rc-table-internal-hook`&&e.expandable.__PARENT_RENDER_ICON__||t.some(e=>e&&typeof e==`object`&&e[p])?`nest`:!1,[!!c,t]),[h,g]=S.useState(()=>o||(s?iJ(t,n,p):[])),_=S.useMemo(()=>new Set(a||h||[]),[a,h]);return[r,m,_,f,p,S.useCallback(e=>{let r=n(e,t.indexOf(e)),i,a=_.has(r);a?(_.delete(r),i=[..._]):i=[..._,r],g(i),l&&l(!a,e),u&&u(i)},[n,_,t,l,u])]}function AJ(e,t){let n=S.useMemo(()=>e.map((n,r)=>Uq(r,r,e,t)),[e,t]);return Zn(()=>n,[n],(e,t)=>!fi(e,t))}function jJ(e){let t=(0,S.useRef)(e),[,n]=(0,S.useState)({}),r=(0,S.useRef)(null),i=(0,S.useRef)([]);function a(e){i.current.push(e);let a=Promise.resolve();r.current=a,a.then(()=>{if(r.current===a){let e=i.current,a=t.current;i.current=[],e.forEach(e=>{t.current=e(t.current)}),r.current=null,a!==t.current&&n({})}})}return(0,S.useEffect)(()=>()=>{r.current=null},[]),[t.current,a]}function MJ(e){let t=(0,S.useRef)(e||null),n=(0,S.useRef)(null);function r(){clearTimeout(n.current)}function i(e){t.current=e,r(),n.current=setTimeout(()=>{t.current=null,n.current=void 0},100)}function a(){return t.current}return(0,S.useEffect)(()=>r,[]),[i,a]}function NJ(){let[e,t]=S.useState(-1),[n,r]=S.useState(-1);return[e,n,S.useCallback((e,n)=>{t(e),r(n)},[])]}var PJ=Bn()?window:null;function FJ(e,t){let{offsetHeader:n=0,offsetSummary:r=0,offsetScroll:i=0,getContainer:a=()=>PJ}=typeof e==`object`?e:{},o=a()||PJ,s=!!e;return S.useMemo(()=>({isSticky:s,stickyClassName:s?`${t}-sticky-holder`:``,offsetHeader:n,offsetSummary:r,offsetScroll:i,container:o}),[s,i,n,r,t,o])}function IJ(e,t){return(0,S.useMemo)(()=>{let n=t.length,r=(n,r,i)=>{let a=[],o=0;for(let s=n;s!==r;s+=i)a.push(o),t[s].fixed&&(o+=e[s]||0);return a};return{start:r(0,n,1),end:r(n-1,-1,-1).reverse(),widths:e}},[e,t])}var LJ=e=>{let{children:t,className:n,style:r}=e;return S.createElement(`div`,{className:n,style:r},t)};function RJ(e){let t=kr(e).getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var zJ=`mouseup`,BJ=`mousemove`,VJ=`scroll`,HJ=`resize`,UJ=S.forwardRef((e,t)=>{let{scrollBodyRef:n,onScroll:r,offsetScroll:i,container:a,direction:o}=e,s=xq(Dq,`prefixCls`),c=n.current?.scrollWidth||0,l=n.current?.clientWidth||0,u=c&&l/c*l,d=S.useRef(null),[f,p]=jJ({scrollLeft:0,isHiddenScrollBar:!0}),m=S.useRef({delta:0,x:0}),[h,g]=S.useState(!1),_=S.useRef(null);S.useEffect(()=>()=>{Oi.cancel(_.current)},[]);let v=()=>{g(!1)},y=e=>{e.persist(),m.current.delta=e.pageX-f.scrollLeft,m.current.x=0,g(!0),e.preventDefault()},b=e=>{let{buttons:t}=e||window?.event;if(!h||t===0){h&&g(!1);return}let n=m.current.x+e.pageX-m.current.x-m.current.delta,i=o===`rtl`;n=Math.max(i?u-l:0,Math.min(i?0:l-u,n)),(!i||Math.abs(n)+Math.abs(u){Oi.cancel(_.current),_.current=Oi(()=>{if(!n.current)return;let e=RJ(n.current).top,t=e+n.current.offsetHeight,r=a===window?document.documentElement.scrollTop+window.innerHeight:RJ(a).top+a.clientHeight;t-ti()<=r||e>=r-i?p(e=>({...e,isHiddenScrollBar:!0})):p(e=>({...e,isHiddenScrollBar:!1}))})},C=e=>{p(t=>({...t,scrollLeft:e/c*l||0}))};return S.useImperativeHandle(t,()=>({setScrollLeft:C,checkScrollBarVisible:x})),S.useEffect(()=>(document.body.addEventListener(zJ,v,!1),document.body.addEventListener(BJ,b,!1),x(),()=>{document.body.removeEventListener(zJ,v),document.body.removeEventListener(BJ,b)}),[u,h]),S.useEffect(()=>{if(n.current){let e=[],t=kr(n.current);for(;t;)e.push(t),t=t.parentElement;return e.forEach(e=>{e.addEventListener(VJ,x,!1)}),window.addEventListener(HJ,x,!1),window.addEventListener(VJ,x,!1),a.addEventListener(VJ,x,!1),()=>{e.forEach(e=>{e.removeEventListener(VJ,x)}),window.removeEventListener(HJ,x),window.removeEventListener(VJ,x),a.removeEventListener(VJ,x)}}},[a]),S.useEffect(()=>{f.isHiddenScrollBar||p(e=>{let t=n.current;return t?{...e,scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}:e})},[f.isHiddenScrollBar]),c<=l||!u||f.isHiddenScrollBar?null:S.createElement(`div`,{style:{height:ti(),width:l,bottom:i},className:`${s}-sticky-scroll`},S.createElement(`div`,{onMouseDown:y,ref:d,className:J(`${s}-sticky-scroll-bar`,{[`${s}-sticky-scroll-bar-active`]:h}),style:{width:`${u}px`,transform:`translate3d(${f.scrollLeft}px, 0, 0)`}}))});function WJ(){return WJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n={rowKey:`key`,prefixCls:GJ,emptyText:JJ,...e},{prefixCls:r,className:i,rowClassName:a,style:o,classNames:s,styles:c,data:l,rowKey:u,scroll:d,tableLayout:f,direction:p,title:m,footer:h,summary:g,caption:_,id:v,showHeader:y,components:b,emptyText:x,onRow:C,onHeaderRow:w,measureRowRender:T,onScroll:E,internalHooks:D,transformColumns:O,internalRefs:k,tailor:A,getContainerWidth:j,sticky:M,rowHoverable:N=!0}=n,P=l||KJ,F=!!P.length,I=D===yq,L=S.useCallback((e,t)=>Ai(b,e)||t,[b]),R=S.useMemo(()=>typeof u==`function`?u:e=>e&&e[u],[u]),z=L([`body`]),[B,V,H]=NJ(),[U,ee,W,te,G,ne]=kJ(n,P,R),K=d?.x,[re,ie]=S.useState(0),[ae,q,oe]=OJ({...n,...U,expandable:!!U.expandedRowRender,columnTitle:U.columnTitle,expandedKeys:W,getRowKey:R,onTriggerExpand:ne,expandIcon:te,expandIconColumnIndex:U.expandIconColumnIndex,direction:p,scrollWidth:I&&A&&typeof K==`number`?K:null,clientWidth:re},I?O:null),se=oe??K,ce=S.useMemo(()=>({columns:ae,flattenColumns:q}),[ae,q]),le=S.useRef(null),ue=S.useRef(null),de=S.useRef(null),fe=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:le.current,scrollTo:e=>{if(de.current instanceof HTMLElement){let{index:t,top:n,key:r,offset:i}=e;if(Nq(n))de.current?.scrollTo({top:n});else{let e=r??R(P[t]),n=de.current.querySelector(`[data-row-key="${e}"]`);if(n)if(!i)n.scrollIntoView();else{let e=n.offsetTop;de.current.scrollTo({top:e+i})}}}else de.current?.scrollTo&&de.current.scrollTo(e)}}));let pe=S.useRef(null),[me,he]=S.useState(!1),[ge,_e]=S.useState(!1),[ve,ye]=S.useState(new Map),be=jq(q).map(e=>ve.get(e)),xe=S.useMemo(()=>be,[be.join(`_`)]),Se=IJ(xe,q),Ce=d&&Mq(d.y),we=d&&Mq(se)||!!U.fixed,Te=we&&q.some(({fixed:e})=>e),Ee=S.useRef(null),{isSticky:De,offsetHeader:Oe,offsetSummary:ke,offsetScroll:Ae,stickyClassName:je,container:Me}=FJ(M,r),Ne=S.useMemo(()=>g?.(P),[g,P]),Pe=(Ce||De)&&S.isValidElement(Ne)&&Ne.type===Jq&&Ne.props.fixed,Fe,Ie,Le;Ce&&(Ie={overflowY:F?`scroll`:`auto`,maxHeight:d.y}),we&&(Fe={overflowX:`auto`},Ce||(Ie={overflowY:`hidden`}),Le={width:se===!0?`auto`:se,minWidth:`100%`});let Re=S.useCallback((e,t)=>{ye(n=>{if(n.get(e)!==t){let r=new Map(n);return r.set(e,t),r}return n})},[]),[ze,Be]=MJ(null);function Ve(e,t){t&&(typeof t==`function`?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout(()=>{t.scrollLeft=e},0)))}let[He,Ue]=S.useState([0,0]),We=zn(({currentTarget:e,scrollLeft:t})=>{let n=typeof t==`number`?t:e.scrollLeft,r=e||qJ;(!Be()||Be()===r)&&(ze(r),Ve(n,ue.current),Ve(n,de.current),Ve(n,pe.current),Ve(n,Ee.current?.setScrollLeft));let i=e||ue.current;if(i){let e=I&&A&&typeof se==`number`?se:i.scrollWidth,t=i.clientWidth,r=Math.abs(n);if(Ue(n=>{let i=[r,e-t];return fi(n,i)?n:i}),e===t){he(!1),_e(!1);return}he(r>0),_e(r{We(e),E?.(e)}),Ke=()=>{we&&de.current?We({currentTarget:kr(de.current),scrollLeft:de.current?.scrollLeft}):(he(!1),_e(!1))},qe=e=>{Ee.current?.checkScrollBarVisible();let t=e??le.current?.offsetWidth??0;I&&j&&le.current&&(t=j(le.current,t)||t),t!==re&&(Ke(),ie(t))};Hn(()=>{we&&qe()},[we]);let Je=S.useRef(!1);S.useEffect(()=>{Je.current&&Ke()},[we,l,ae.length]),S.useEffect(()=>{Je.current=!0},[]);let[Ye,Xe]=S.useState(0);Hn(()=>{(!A||!I)&&(de.current instanceof Element?Xe(ni(de.current).width):Xe(ni(fe.current).width))},[]),S.useEffect(()=>{I&&k&&(k.body.current=de.current)});let Ze=S.useCallback(e=>S.createElement(S.Fragment,null,S.createElement(SJ,e),Pe===`top`&&S.createElement(Yq,e,Ne)),[Pe,Ne]),Qe=S.useCallback(e=>S.createElement(Yq,e,Ne),[Ne]),$e=L([`table`],`table`),et=S.useMemo(()=>f||(Te?se===`max-content`?`auto`:`fixed`:Ce||De||q.some(({ellipsis:e})=>e)?`fixed`:`auto`),[Ce,Te,q,f,De]),tt,nt={colWidths:xe,columCount:q.length,stickyOffsets:Se,onHeaderRow:w,fixHeader:Ce,scroll:d},rt=S.useMemo(()=>F?null:typeof x==`function`?x():x,[F,x]),it=S.createElement(dJ,{data:P,measureColumnWidth:Ce||we||De}),at=S.createElement(hJ,{colWidths:q.map(({width:e})=>e),columns:q}),ot=_==null?void 0:S.createElement(`caption`,{className:`${r}-caption`},_),st=xi(n,{data:!0}),ct=xi(n,{aria:!0});if(Ce||De){let e;typeof z==`function`?(e=z(P,{scrollbarSize:Ye,ref:de,onScroll:We}),nt.colWidths=q.map(({width:e},t)=>{let n=t===q.length-1?e-Ye:e;return typeof n==`number`&&!Number.isNaN(n)?n:0})):e=S.createElement(`div`,{style:{...Fe,...Ie},onScroll:Ge,ref:de,className:`${r}-body`},S.createElement($e,WJ({style:{...Le,tableLayout:et}},ct),ot,at,it,!Pe&&Ne&&S.createElement(Yq,{stickyOffsets:Se,flattenColumns:q},Ne)));let t={noData:!P.length,maxContentScroll:we&&se===`max-content`,...nt,...ce,direction:p,stickyClassName:je,scrollX:se,tableLayout:et,onScroll:We};tt=S.createElement(S.Fragment,null,y!==!1&&S.createElement(vJ,WJ({},t,{stickyTopOffset:Oe,className:`${r}-header`,ref:ue,colGroup:at}),Ze),e,Pe&&Pe!==`top`&&S.createElement(vJ,WJ({},t,{stickyBottomOffset:ke,className:`${r}-summary`,ref:pe,colGroup:at}),Qe),De&&de.current&&de.current instanceof Element&&S.createElement(UJ,{ref:Ee,offsetScroll:Ae,scrollBodyRef:de,onScroll:We,container:Me,direction:p}))}else tt=S.createElement(`div`,{style:{...Fe,...Ie,...c?.content},className:J(`${r}-content`,s?.content),onScroll:We,ref:de},S.createElement($e,WJ({style:{...Le,tableLayout:et}},ct),ot,at,y!==!1&&S.createElement(SJ,WJ({},nt,ce)),it,Ne&&S.createElement(Yq,{stickyOffsets:Se,flattenColumns:q},Ne)));let lt={...o};De&&(lt[`--columns-count`]=q.length);let ut=S.createElement(`div`,WJ({className:J(r,i,{[`${r}-rtl`]:p===`rtl`,[`${r}-fix-start-shadow`]:we,[`${r}-fix-end-shadow`]:we,[`${r}-fix-start-shadow-show`]:we&&me,[`${r}-fix-end-shadow-show`]:we&&ge,[`${r}-layout-fixed`]:f===`fixed`,[`${r}-fixed-header`]:Ce,[`${r}-fixed-column`]:Te,[`${r}-scroll-horizontal`]:we,[`${r}-has-fix-start`]:q[0]?.fixed,[`${r}-has-fix-end`]:q[q.length-1]?.fixed===`end`}),style:lt,id:v,ref:le},st),m&&S.createElement(LJ,{className:J(`${r}-title`,s?.title),style:c?.title},m(P)),S.createElement(`div`,{ref:fe,className:J(`${r}-container`,s?.section),style:c?.section},tt),h&&S.createElement(LJ,{className:J(`${r}-footer`,s?.footer),style:c?.footer},h(P)));we&&(ut=S.createElement(oa,{onResize:({offsetWidth:e})=>qe(e)},ut));let dt=AJ(q,Se),ft=S.useMemo(()=>({scrollX:se,scrollInfo:He,classNames:s,styles:c,prefixCls:r,getComponent:L,scrollbarSize:Ye,direction:p,fixedInfoList:dt,isSticky:De,componentWidth:re,fixHeader:Ce,fixColumn:Te,horizonScroll:we,tableLayout:et,rowClassName:a,expandedRowClassName:U.expandedRowClassName,expandIcon:te,expandableType:ee,expandRowByClick:U.expandRowByClick,expandedRowRender:U.expandedRowRender,expandedRowOffset:U.expandedRowOffset,onTriggerExpand:ne,expandIconColumnIndex:U.expandIconColumnIndex,indentSize:U.indentSize,allColumnsFixedLeft:q.every(e=>e.fixed===`start`),emptyNode:rt,columns:ae,flattenColumns:q,onColumnResize:Re,colWidths:xe,hoverStartRow:B,hoverEndRow:V,onHover:H,rowExpandable:U.rowExpandable,onRow:C,getRowKey:R,expandedKeys:W,childrenColumnName:G,rowHoverable:N,measureRowRender:T}),[se,He,s,c,r,L,Ye,p,dt,De,re,Ce,Te,we,et,a,U.expandedRowClassName,te,ee,U.expandRowByClick,U.expandedRowRender,U.expandedRowOffset,ne,U.expandIconColumnIndex,U.indentSize,rt,ae,q,Re,xe,B,V,H,U.rowExpandable,C,R,W,G,N,T]);return S.createElement(Dq.Provider,{value:ft},ut)}),XJ=e=>wq(YJ,e),ZJ=XJ();ZJ.EXPAND_COLUMN=vq,ZJ.INTERNAL_HOOKS=yq,ZJ.Column=Zq,ZJ.ColumnGroup=Qq,ZJ.Summary=Xq;var QJ=bq(null),$J=bq(null);function eY(){return eY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{rowInfo:t,column:n,colIndex:r,indent:i,index:a,component:o,renderIndex:s,record:c,style:l,className:u,inverse:d,getHeight:f}=e,{render:p,dataIndex:m,className:h,width:g}=n,{columnsOffset:_}=xq($J,[`columnsOffset`]),{key:v,fixedInfo:y,appendCellNode:b,additionalCellProps:x}=sJ(t,n,r,i,a),{style:C,colSpan:w=1,rowSpan:T=1}=x,E=tY(r-1,w,_),D=w>1?g-E:0,O={...C,...l,flex:`0 0 ${E}px`,width:`${E}px`,marginRight:D,pointerEvents:`auto`},k=S.useMemo(()=>d?T<=1:w===0||T===0||T>1,[T,w,d]);k?O.visibility=`hidden`:d&&(O.height=f?.(T));let A=k?()=>null:p,j={};return(T===0||w===0)&&(j.rowSpan=1,j.colSpan=1),S.createElement(Bq,eY({className:J(h,u),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:o,prefixCls:t.prefixCls,key:v,record:c,index:a,renderIndex:s,dataIndex:m,render:A,shouldCellUpdate:n.shouldCellUpdate},y,{appendNode:b,additionalProps:{...x,style:O,...j}}))};function rY(){return rY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{data:n,index:r,className:i,rowKey:a,style:o,extra:s,getHeight:c,...l}=e,{record:u,indent:d,index:f}=n,{scrollX:p,flattenColumns:m,prefixCls:h,fixColumn:g,componentWidth:_}=xq(Dq,[`prefixCls`,`flattenColumns`,`fixColumn`,`componentWidth`,`scrollX`]),{getComponent:v}=xq(QJ,[`getComponent`]),y=tJ(u,a,r,d),b=v([`body`,`row`],`div`),x=v([`body`,`cell`],`div`),{rowSupportExpand:C,expanded:w,rowProps:T,expandedRowRender:E,expandedRowClassName:D}=y,O;if(C&&w){let e=E(u,r,d+1,w),t=aJ(D,u,r,d),n={};g&&(n={style:{"--virtual-width":`${_}px`}});let i=`${h}-expanded-row-cell`;O=S.createElement(b,{className:J(`${h}-expanded-row`,`${h}-expanded-row-level-${d+1}`,t)},S.createElement(Bq,{component:x,prefixCls:h,className:J(i,{[`${i}-fixed`]:g}),additionalProps:n},e))}let k={...o,width:p};s&&(k.position=`absolute`,k.pointerEvents=`none`);let A=S.createElement(b,rY({},T,l,{"data-row-key":a,ref:C?null:t,className:J(i,`${h}-row`,T?.className,{[`${h}-row-extra`]:s}),style:{...k,...T?.style}}),m.map((e,t)=>S.createElement(nY,{key:t,component:x,rowInfo:y,column:e,colIndex:t,indent:d,index:r,renderIndex:f,record:u,inverse:s,getHeight:c})));return C?S.createElement(`div`,{ref:t},A,O):A})),aY=Tq(S.forwardRef((e,t)=>{let{data:n,onScroll:r}=e,{flattenColumns:i,onColumnResize:a,getRowKey:o,expandedKeys:s,prefixCls:c,childrenColumnName:l,scrollX:u,direction:d}=xq(Dq,[`flattenColumns`,`onColumnResize`,`getRowKey`,`prefixCls`,`expandedKeys`,`childrenColumnName`,`scrollX`,`direction`]),{sticky:f,scrollY:p,listItemHeight:m,getComponent:h,onScroll:g}=xq(QJ),_=S.useRef(null),v=eJ(n,l,s,o),y=S.useMemo(()=>{let e=0;return i.map(({width:t,minWidth:n,key:r})=>{let i=Math.max(t||0,n||0);return e+=i,[r,i,e]})},[i]),b=S.useMemo(()=>y.map(e=>e[2]),[y]);S.useEffect(()=>{y.forEach(([e,t])=>{a(e,t)})},[y]),S.useImperativeHandle(t,()=>{let e={scrollTo:e=>{let{offset:t,...n}=e;t?_.current?.scrollTo({...n,offset:t,align:`top`}):_.current?.scrollTo(e)},nativeElement:_.current?.nativeElement};return Object.defineProperty(e,`scrollLeft`,{get:()=>_.current?.getScrollInfo().x||0,set:e=>{_.current?.scrollTo({left:e})}}),Object.defineProperty(e,`scrollTop`,{get:()=>_.current?.getScrollInfo().y||0,set:e=>{_.current?.scrollTo({top:e})}}),e});let x=(e,t)=>{let n=v[t]?.record,{onCell:r}=e;return r?r(n,t)?.rowSpan??1:1},C=e=>{let{start:t,end:n,getSize:r,offsetY:a}=e;if(n<0)return null;let s=i.filter(e=>x(e,t)===0),c=t;for(let e=t;e>=0;--e)if(s=s.filter(t=>x(t,e)===0),!s.length){c=e;break}let l=i.filter(e=>x(e,n)!==1),u=n;for(let e=n;ex(t,e)!==1),!l.length){u=Math.max(e-1,n);break}let d=[];for(let e=c;e<=u;e+=1)v[e]&&i.some(t=>x(t,e)>1)&&d.push(e);return d.map(e=>{let t=v[e],n=o(t.record,e),i=t=>{let i=e+t-1,a=v[i];if(!a||!a.record){let e=Math.min(i,v.length-1),t=v[e],a=r(n,o(t.record,e));return a.bottom-a.top}let s=r(n,o(a.record,i));return s.bottom-s.top},s=r(n);return S.createElement(iY,{key:e,data:t,rowKey:n,index:e,style:{top:-a+s.top},extra:!0,getHeight:i})})},w=S.useMemo(()=>({columnsOffset:b}),[b]),T=`${c}-tbody`,E=h([`body`,`wrapper`]),D={};return f&&(D.position=`sticky`,D.bottom=0,typeof f==`object`&&f.offsetScroll&&(D.bottom=f.offsetScroll)),S.createElement($J.Provider,{value:w},S.createElement(zS,{fullHeight:!1,ref:_,prefixCls:`${T}-virtual`,styles:{horizontalScrollBar:D},className:T,height:p,itemHeight:m||24,data:v,itemKey:e=>o(e.record),component:E,scrollWidth:u,direction:d,onVirtualScroll:({x:e})=>{r({currentTarget:_.current?.nativeElement,scrollLeft:e})},onScroll:g,extraRender:C},(e,t,n)=>{let r=o(e.record,t);return S.createElement(iY,{data:e,rowKey:r,index:t,style:n.style})}))}));function oY(){return oY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{ref:n,onScroll:r}=t;return S.createElement(aY,{ref:n,data:e,onScroll:r})},cY=S.forwardRef((e,t)=>{let{data:n,columns:r,scroll:i,sticky:a,prefixCls:o=GJ,className:s,listItemHeight:c,components:l,onScroll:u}=e,{x:d,y:f}=i||{};typeof d!=`number`&&(d=1),typeof f!=`number`&&(f=500);let p=zn((e,t)=>Ai(l,e)||t),m=zn(u),h=S.useMemo(()=>({sticky:a,scrollY:f,listItemHeight:c,getComponent:p,onScroll:m}),[a,f,c,p,m]);return S.createElement(QJ.Provider,{value:h},S.createElement(ZJ,oY({},e,{className:J(s,`${o}-virtual`),scroll:{...i,x:d},components:{...l,body:n?.length?sY:void 0},columns:r,internalHooks:yq,tailor:!0,ref:t})))}),lY=e=>wq(cY,e);lY();var uY=e=>null,dY=e=>null,fY=S.createContext(null),pY=S.createContext({}),mY=S.memo(({prefixCls:e,level:t,isStart:n,isEnd:r})=>{let i=`${e}-indent-unit`,a=[];for(let e=0;e{let{eventKey:t,className:n,style:r,dragOver:i,dragOverGapTop:a,dragOverGapBottom:o,isLeaf:s,isStart:c,isEnd:l,expanded:u,selected:d,checked:f,halfChecked:p,loading:m,domRef:h,active:g,data:_,onMouseMove:v,selectable:y,treeId:b,...x}=e,C=Jn(b,t),w=S.useContext(fY),{classNames:T,styles:E}=w||{},D=S.useContext(pY),O=S.useRef(null),[k,A]=S.useState(!1),j=!!(w.disabled||e.disabled||D.nodeDisabled?.(_)),M=S.useMemo(()=>!w.checkable||e.checkable===!1?!1:w.checkable,[w.checkable,e.checkable]),N=t=>{j||w.onNodeSelect(t,UL(e))},P=t=>{j||!M||e.disableCheckbox||w.onNodeCheck(t,UL(e),!f)},F=S.useMemo(()=>typeof y==`boolean`?y:w.selectable,[y,w.selectable]),I=t=>{w.onNodeClick(t,UL(e)),F?N(t):P(t)},L=t=>{w.onNodeDoubleClick(t,UL(e))},R=t=>{w.onNodeMouseEnter(t,UL(e))},z=t=>{w.onNodeMouseLeave(t,UL(e))},B=t=>{w.onNodeContextMenu(t,UL(e))},V=S.useMemo(()=>!!(w.draggable&&(!w.draggable.nodeDraggable||w.draggable.nodeDraggable(_))),[w.draggable,_]),H=t=>{t.stopPropagation(),A(!0),w.onNodeDragStart(t,e);try{t.dataTransfer.setData(`text/plain`,``)}catch{}},U=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragEnter(t,e)},ee=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragOver(t,e)},W=t=>{t.stopPropagation(),w.onNodeDragLeave(t,e)},te=t=>{t.stopPropagation(),A(!1),w.onNodeDragEnd(t,e)},G=t=>{t.preventDefault(),t.stopPropagation(),A(!1),w.onNodeDrop(t,e)},ne=t=>{m||w.onNodeExpand(t,UL(e))},K=S.useMemo(()=>{let{children:e}=PL(w.keyEntities,t)||{};return!!(e||[]).length},[w.keyEntities,t]),re=S.useMemo(()=>VL(s,w.loadData,K,e.loaded),[s,w.loadData,K,e.loaded]);S.useEffect(()=>{m||typeof w.loadData==`function`&&u&&!re&&!e.loaded&&w.onNodeLoad(UL(e))},[m,w.loadData,w.onNodeLoad,u,re,e]);let ie=S.useMemo(()=>w.draggable?.icon?S.createElement(`span`,{className:`${w.prefixCls}-draggable-icon`},w.draggable.icon):null,[w.draggable]),ae=t=>{let n=e.switcherIcon||w.switcherIcon;return typeof n==`function`?n({...e,isLeaf:t}):n},q=()=>{if(re){let e=ae(!0);return e===!1?null:S.createElement(`span`,{className:J(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher-noop`)},e)}let e=ae(!1);return e===!1?null:S.createElement(`span`,{onClick:ne,className:J(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher_${u?gY:_Y}`)},e)},oe=S.useMemo(()=>{if(!M)return null;let t=typeof M==`boolean`?null:M;return S.createElement(`span`,{className:J(`${w.prefixCls}-checkbox`,{[`${w.prefixCls}-checkbox-checked`]:f,[`${w.prefixCls}-checkbox-indeterminate`]:!f&&p,[`${w.prefixCls}-checkbox-disabled`]:j||e.disableCheckbox}),onClick:P,role:`checkbox`,"aria-checked":p?`mixed`:f,"aria-disabled":j||e.disableCheckbox,"aria-labelledby":C},t)},[M,f,p,j,e.disableCheckbox,C]),se=S.useMemo(()=>re?null:u?gY:_Y,[re,u]),ce=S.useMemo(()=>S.createElement(`span`,{className:J(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__${se||`docu`}`,{[`${w.prefixCls}-icon_loading`]:m}),style:E?.itemIcon}),[w.prefixCls,se,m]),le=S.useMemo(()=>{let n=!!w.draggable;return!e.disabled&&n&&w.dragOverNodeKey===t?w.dropIndicatorRender({dropPosition:w.dropPosition,dropLevelOffset:w.dropLevelOffset,indent:w.indent,prefixCls:w.prefixCls,direction:w.direction}):null},[w.dropPosition,w.dropLevelOffset,w.indent,w.prefixCls,w.direction,w.draggable,w.dragOverNodeKey,w.dropIndicatorRender]),ue=S.useMemo(()=>{let{title:t=vY}=e,n=`${w.prefixCls}-node-content-wrapper`,r;if(w.showIcon){let t=e.icon||w.icon;r=t?S.createElement(`span`,{className:J(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__customize`),style:E?.itemIcon},typeof t==`function`?t(e):t):ce}else w.loadData&&m&&(r=ce);let i;return i=typeof t==`function`?t(_):w.titleRender?w.titleRender(_):t,S.createElement(`span`,{ref:O,title:typeof t==`string`?t:``,className:J(n,`${n}-${se||`normal`}`,{[`${w.prefixCls}-node-selected`]:!j&&(d||k)}),onMouseEnter:R,onMouseLeave:z,onContextMenu:B,onClick:I,onDoubleClick:L},r,S.createElement(`span`,{className:J(`${w.prefixCls}-title`,T?.itemTitle),style:E?.itemTitle},i),le)},[w.prefixCls,w.showIcon,e,w.icon,ce,w.titleRender,_,se,R,z,B,I,L]),de=xi(x,{aria:!0,data:!0}),{level:fe}=PL(w.keyEntities,t)||{},pe=l[l.length-1],me=!j&&V,he=w.draggingNodeKey===t;return S.createElement(`div`,hY({ref:h,role:`treeitem`,id:C,"aria-expanded":re?void 0:u,"aria-selected":F&&!j?d:void 0,"aria-checked":M&&!j?p?`mixed`:f:void 0,"aria-disabled":j,className:J(n,`${w.prefixCls}-treenode`,T?.item,{[`${w.prefixCls}-treenode-disabled`]:j,[`${w.prefixCls}-treenode-switcher-${u?`open`:`close`}`]:!s,[`${w.prefixCls}-treenode-checkbox-checked`]:f,[`${w.prefixCls}-treenode-checkbox-indeterminate`]:p,[`${w.prefixCls}-treenode-selected`]:d,[`${w.prefixCls}-treenode-loading`]:m,[`${w.prefixCls}-treenode-active`]:g,[`${w.prefixCls}-treenode-leaf-last`]:pe,[`${w.prefixCls}-treenode-draggable`]:V,dragging:he,"drop-target":w.dropTargetKey===t,"drop-container":w.dropContainerKey===t,"drag-over":!j&&i,"drag-over-gap-top":!j&&a,"drag-over-gap-bottom":!j&&o,"filter-node":w.filterTreeNode?.(UL(e)),[`${w.prefixCls}-treenode-leaf`]:re}),style:{...r,...E?.item},draggable:me,onDragStart:me?H:void 0,onDragEnter:V?U:void 0,onDragOver:V?ee:void 0,onDragLeave:V?W:void 0,onDrop:V?G:void 0,onDragEnd:V?te:void 0,onMouseMove:v},de),S.createElement(mY,{prefixCls:w.prefixCls,level:fe,isStart:c,isEnd:l}),ie,q(),oe,ue)};yY.isTreeNode=1;function bY(e,t){if(!e)return[];let n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function xY(e,t){let n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function SY(e){return e.split(`-`)}function CY(e,t){let n=[],r=PL(t,e);function i(e=[]){e.forEach(({key:e,children:t})=>{n.push(e),i(t)})}return i(r.children),n}function wY(e){if(e.parent){let t=SY(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function TY(e){let t=SY(e.pos);return Number(t[t.length-1])===0}function EY(e,t,n,r,i,a,o,s,c,l){let{clientX:u,clientY:d}=e,{top:f,height:p}=e.target.getBoundingClientRect(),m=((l===`rtl`?-1:1)*((i?.x||0)-u)-12)/r,h=c.filter(e=>s[e]?.children?.length),g=PL(s,n.eventKey);if(de.key===g.key),t=o[e<=0?0:e-1].key;g=PL(s,t)}let _=g.key,v=g,y=g.key,b=0,x=0;if(!h.includes(_))for(let e=0;e-1.5?a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:0})?b=0:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1,{dropPosition:b,dropLevelOffset:x,dropTargetKey:g.key,dropTargetPos:g.pos,dragOverNodeKey:y,dropContainerKey:b===0?null:g.parent?.key||null,dropAllowed:w}}function DY(e,t){if(!e)return;let{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function OY(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e==`object`)t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return ui(!1,"`checkedKeys` is not an array or an object"),null;return t}function kY(e,t){let n=new Set;function r(e){if(n.has(e))return;let i=PL(t,e);if(!i)return;n.add(e);let{parent:a,node:o}=i;o.disabled||a&&r(a.key)}return(e||[]).forEach(e=>{r(e)}),[...n]}var AY={},jY=`SELECT_ALL`,MY=`SELECT_INVERT`,NY=`SELECT_NONE`,PY=[],FY=(e,t,n=[])=>((t||[]).forEach(t=>{n.push(t),nf(t)&&e in t&&FY(e,t[e],n)}),n),IY=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:i,getCheckboxProps:a,getTitleCheckboxProps:o,onChange:s,onSelect:c,onSelectAll:l,onSelectInvert:u,onSelectNone:d,onSelectMultiple:f,columnWidth:p,type:m,selections:h,fixed:g,renderCell:_,hideSelectAll:v,checkStrictly:y=!0}=t||{},{prefixCls:b,data:x,pageData:C,getRecordByKey:w,getRowKey:T,expandType:E,childrenColumnName:D,locale:O,getPopupContainer:k}=e,A=Gi(`Table`),[j,M]=wf(e=>e),[N,P]=Gn(i||PY,r),F=N??PY,I=S.useRef(new Map),L=(0,S.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=w(e);!n&&I.current.has(e)&&(n=I.current.get(e)),t.set(e,n)}),I.current=t}},[w,n]);S.useEffect(()=>{L(F)},[F,L]);let R=(0,S.useMemo)(()=>FY(D,C),[D,C]),{keyEntities:z}=(0,S.useMemo)(()=>{if(y)return{keyEntities:null};let e=x;if(n){let t=new Set(R.map(T)),n=Array.from(I.current).reduce((e,[n,r])=>t.has(n)?e:e.concat(r),[]);e=[].concat(pa(e),pa(n))}return BL(e,{externalGetKey:T,childrenPropName:D})},[x,T,y,D,n,R]),B=(0,S.useMemo)(()=>{let e=new Map;return R.forEach((t,n)=>{let r=T(t,n),i=(a?a(t):null)||{};e.set(r,i)}),e},[R,T,a]),V=(0,S.useCallback)(e=>{let t=T(e),n;return n=B.has(t)?B.get(T(e)):a?a(e):void 0,!!n?.disabled},[B,T]),[H,U]=(0,S.useMemo)(()=>{if(y)return[F,[]];let{checkedKeys:e,halfCheckedKeys:t}=KL(F,!0,z,V);return[e||[],t]},[F,y,z,V]),ee=(0,S.useMemo)(()=>{let e=m===`radio`?H.slice(0,1):H;return new Set(e)},[H,m]),W=(0,S.useMemo)(()=>m===`radio`?new Set:new Set(U),[U,m]);S.useEffect(()=>{t||P(PY)},[!!t]);let te=(0,S.useCallback)((e,t)=>{let r,i;L(e),n?(r=e,i=e.map(e=>I.current.get(e))):(r=[],i=[],e.forEach(e=>{let t=w(e);t!==void 0&&(r.push(e),i.push(t))})),P(r),s?.(r,i,{type:t})},[P,w,s,n]),G=(0,S.useCallback)((e,t,n,r)=>{if(c){let i=n.map(w);c(w(e),t,i,r)}te(n,`single`)},[c,w,te]),ne=(0,S.useMemo)(()=>!h||v?null:(h===!0?[jY,MY,NY]:h).map(e=>e===`SELECT_ALL`?{key:`all`,text:O.selectionAll,onSelect(){te(x.map((e,t)=>T(e,t)).filter(e=>!B.get(e)?.disabled||ee.has(e)),`all`)}}:e===`SELECT_INVERT`?{key:`invert`,text:O.selectInvert,onSelect(){let e=new Set(ee);C.forEach((t,n)=>{let r=T(t,n);B.get(r)?.disabled||(e.has(r)?e.delete(r):e.add(r))});let t=Array.from(e);u&&(A.deprecated(!1,`onSelectInvert`,`onChange`),u(t)),te(t,`invert`)}}:e===`SELECT_NONE`?{key:`none`,text:O.selectNone,onSelect(){d?.(),te(Array.from(ee).filter(e=>B.get(e)?.disabled),`none`)}}:e).map(e=>({...e,onSelect:(...t)=>{e.onSelect?.(...t),M(null)}})),[h,v,O.selectionAll,O.selectInvert,O.selectNone,B,ee,x,C,T,u,te]);return[(0,S.useCallback)(e=>{if(!t)return e.filter(e=>e!==AY);let n=pa(e),r=new Set(ee),i=R.map(T).filter(e=>!B.get(e).disabled),a=i.every(e=>r.has(e)),s=i.some(e=>r.has(e)),c=()=>{let e=[];a?i.forEach(t=>{r.delete(t),e.push(t)}):i.forEach(t=>{r.has(t)||(r.add(t),e.push(t))});let t=Array.from(r);l?.(!a,t.map(w),e.map(w)),te(t,`all`),M(null)},u,d;if(m!==`radio`){let e;if(ne){let t={getPopupContainer:k,items:ne.map((e,t)=>{let{key:n,text:r,onSelect:a}=e;return{key:n??t,onClick:()=>{a?.(i)},label:r}})};e=S.createElement(`div`,{className:`${b}-selection-extra`},S.createElement(SV,{menu:t,getPopupContainer:k},S.createElement(`span`,null,S.createElement(NC,null))))}let t=R.map((e,t)=>{let n=T(e,t),i=B.get(n)||{};return{checked:r.has(n),...i}}).filter(({disabled:e})=>e),n=!!t.length&&t.length===R.length,l=n&&t.every(({checked:e})=>e),f=n&&t.some(({checked:e})=>e),p=o?.()||{},{onChange:m,disabled:h}=p;d=S.createElement(mR,{"aria-label":e?`Custom selection`:`Select all`,...p,checked:n?l:!!R.length&&a,indeterminate:n?!l&&f:!a&&s,onChange:e=>{c(),m?.(e)},disabled:h??(R.length===0||n),skipGroup:!0}),u=!v&&S.createElement(`div`,{className:`${b}-selection`},d,e)}let x;x=m===`radio`?(e,t,n)=>{let i=T(t,n),a=r.has(i),o=B.get(i);return{node:S.createElement(qF,{...o,checked:a,onClick:e=>{e.stopPropagation(),o?.onClick?.(e)},onChange:e=>{r.has(i)||G(i,!0,[i],e.nativeEvent),o?.onChange?.(e)}}),checked:a}}:(e,t,n)=>{let a=T(t,n),o=r.has(a),s=W.has(a),c=B.get(a),l;return l=E===`nest`?s:c?.indeterminate??s,{node:S.createElement(mR,{...c,indeterminate:l,checked:o,skipGroup:!0,onClick:e=>{e.stopPropagation(),c?.onClick?.(e)},onChange:e=>{let{nativeEvent:t}=e,{shiftKey:n}=t,s=i.indexOf(a),l=H.some(e=>i.includes(e));if(n&&y&&l){let e=j(s,i,r),t=Array.from(r);f?.(!o,t.map(w),e.map(w)),te(t,`multiple`)}else{let e=H;if(y){let n=o?bY(e,a):xY(e,a);G(a,!o,n,t)}else{let{checkedKeys:n,halfCheckedKeys:r}=KL([].concat(pa(e),[a]),!0,z,V),i=n;if(o){let e=new Set(n);e.delete(a),i=KL(Array.from(e),{checked:!1,halfCheckedKeys:r},z,V).checkedKeys}G(a,!o,i,t)}}M(o?null:s),c?.onChange?.(e)}}),checked:o}};let C=(e,t,n)=>{let{node:r,checked:i}=x(e,t,n);return _?_(i,t,n,r):r};if(!n.includes(AY))if(n.findIndex(e=>e.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`)===0){let[e,...t]=n;n=[e,AY].concat(pa(t))}else n=[AY].concat(pa(n));let D=n.indexOf(AY);n=n.filter((e,t)=>e!==AY||t===D);let O=n[D-1],A=n[D+1],N=g;N===void 0&&(A?.fixed===void 0?O?.fixed!==void 0&&(N=O.fixed):N=A.fixed),N&&O&&O.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`&&O.fixed===void 0&&(O.fixed=N);let P=J(`${b}-selection-col`,{[`${b}-selection-col-with-dropdown`]:h&&m===`checkbox`}),F={fixed:N,width:p,className:`${b}-selection-column`,title:t?.columnTitle?typeof t.columnTitle==`function`?t.columnTitle(d):t.columnTitle:u,render:C,onCell:t.onCell,align:t.align,[fJ]:{className:P}};return n.map(e=>e===AY?F:e)},[T,R,t,H,ee,W,p,ne,E,B,f,G,V]),ee]};function LY(e){return t=>{let{prefixCls:n,onExpand:r,record:i,expanded:a,expandable:o}=t,s=`${n}-row-expand-icon`;return S.createElement(`button`,{type:`button`,onClick:e=>{r(i,e),e.stopPropagation()},className:J(s,{[`${s}-spaced`]:!o,[`${s}-expanded`]:o&&a,[`${s}-collapsed`]:o&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function RY(e){return(t,n)=>{let r=t.querySelector(`.${e}-container`),i=n;if(r){let e=getComputedStyle(r),t=Number.parseInt(e.borderLeftWidth,10),a=Number.parseInt(e.borderRightWidth,10);i=n-t-a}return i}}var zY=(e,t)=>`key`in e&&$d(e.key)?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join(`.`):e.dataIndex:t;function BY(e,t){return t?`${t}-${e}`:`${e}`}var VY=(e,t)=>typeof e==`function`?e(t):e,HY=(e,t)=>{let n=VY(e,t);return Object.prototype.toString.call(n)===`[object Object]`?``:n},UY=c(o((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:`M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z`}}]},name:`filter`,theme:`filled`}}))());function WY(){return WY=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,WY({},e,{ref:t,icon:UY.default}))),KY=e=>{let{dropPosition:t,dropLevelOffset:n,indent:r}=e,i={pointerEvents:`none`,position:`absolute`,right:0,backgroundColor:`red`,height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return S.createElement(`div`,{style:i})};function qY(e,t){let[n,r]=S.useState(!1);Hn(()=>{if(n)return e(),()=>{t()}},[n]),Hn(()=>(r(!0),()=>{r(!1)}),[])}function JY(){return JY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,style:r,motion:i,motionNodes:a,motionType:o,onMotionStart:s,onMotionEnd:c,active:l,treeNodeRequiredProps:u,...d}=e,[f,p]=S.useState(!0),{prefixCls:m}=S.useContext(fY),h=a&&o!==`hide`;Hn(()=>{a&&h!==f&&p(h)},[a]);let g=()=>{a&&s()},_=S.useRef(!1),v=()=>{a&&!_.current&&(_.current=!0,c())};return qY(g,v),a?S.createElement(Od,JY({ref:t,visible:f},i,{motionAppear:o===`show`,onVisibleChanged:e=>{h===e&&v()}}),({className:e,style:t},n)=>S.createElement(`div`,{ref:n,className:J(`${m}-treenode-motion`,e),style:t},a.map(e=>{let{data:{...t},title:n,key:r,isStart:i,isEnd:a}=e;delete t.children;let o=HL(r,u);return S.createElement(yY,JY({},t,o,{title:n,active:l,data:e.data,key:r,isStart:i,isEnd:a}))}))):S.createElement(yY,JY({domRef:t,className:n,style:r},d,{active:l}))});function XY(e=[],t=[]){let n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(e,t){let n=new Map;e.forEach(e=>{n.set(e,!0)});let r=t.filter(e=>!n.has(e));return r.length===1?r[0]:null}return ne.key===n)+1],i=t.findIndex(e=>e.key===n);if(r){let e=t.findIndex(e=>e.key===r.key);return t.slice(i+1,e)}return t.slice(i+1)}function QY(){return QY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,data:r,selectable:i,checkable:a,expandedKeys:o,selectedKeys:s,checkedKeys:c,loadedKeys:l,loadingKeys:u,halfCheckedKeys:d,keyEntities:f,disabled:p,dragging:m,dragOverNodeKey:h,dropPosition:g,motion:_,height:v,itemHeight:y,virtual:b,scrollWidth:x,focusable:C,activeItem:w,tabIndex:T,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onActiveChange:j,onListChangeStart:M,onListChangeEnd:N,...P}=e,F=Xn(),I=S.useRef(null),L=S.useRef(null);S.useImperativeHandle(t,()=>({scrollTo:e=>{I.current.scrollTo(e)},getIndentWidth:()=>L.current.offsetWidth}));let[R,z]=S.useState(o),[B,V]=S.useState(r),[H,U]=S.useState(r),[ee,W]=S.useState([]),[te,G]=S.useState(null),ne=S.useRef(r);ne.current=r;function K(){let e=ne.current;V(e),U(e),W([]),G(null),N()}Hn(()=>{z(o);let e=XY(R,o);if(e.key!==null)if(e.add){let t=B.findIndex(({key:t})=>t===e.key),n=rX(ZY(B,r,e.key),b,v,y),i=B.slice();i.splice(t+1,0,nX),U(i),W(n),G(`show`)}else{let t=r.findIndex(({key:t})=>t===e.key),n=rX(ZY(r,B,e.key),b,v,y),i=r.slice();i.splice(t+1,0,nX),U(i),W(n),G(`hide`)}else B!==r&&(V(r),U(r))},[o,r]),S.useEffect(()=>{m||K()},[m]);let re=_?H:r,ie={expandedKeys:o,selectedKeys:s,loadedKeys:l,loadingKeys:u,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:h,dropPosition:g,keyEntities:f};return S.createElement(S.Fragment,null,S.createElement(`div`,{className:`${n}-treenode`,"aria-hidden":!0,style:{position:`absolute`,pointerEvents:`none`,visibility:`hidden`,height:0,overflow:`hidden`,border:0,padding:0}},S.createElement(`div`,{className:`${n}-indent`},S.createElement(`div`,{ref:L,className:`${n}-indent-unit`}))),S.createElement(zS,QY({},P,{data:re,itemKey:iX,height:v,fullHeight:!1,virtual:b,itemHeight:y,scrollWidth:x,prefixCls:`${n}-list`,ref:I,role:`tree`,tabIndex:C!==!1&&!p?T:void 0,"aria-activedescendant":w?Jn(F,w.key):void 0,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onVisibleChange:e=>{e.every(e=>iX(e)!==$Y)&&K()}}),e=>{let{pos:t,data:{...n},title:r,key:i,isStart:a,isEnd:o}=e,s=IL(i,t);delete n.key,delete n.children;let c=HL(s,ie);return S.createElement(YY,QY({},n,c,{title:r,active:!!w&&i===w.key,pos:t,data:e.data,isStart:a,isEnd:o,motion:_,motionNodes:i===$Y?ee:null,motionType:te,onMotionStart:M,onMotionEnd:K,treeNodeRequiredProps:ie,treeId:F,onMouseMove:()=>{j(null)}}))}))});function oX(){return oX=Object.assign?Object.assign.bind():function(e){for(var t=1;t!0,expandAction:!1};static TreeNode=yY;destroyed=!1;delayedDragEnterLogic;loadingRetryTimes={};state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],activeKey:null,listChanging:!1,prevProps:null,fieldNames:LL()};dragStartMousePosition=null;dragNodeProps=null;currentMouseOverDroppableNodeKey=null;focusedByMouse=!1;listRef=S.createRef();componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){let{activeKey:e,itemScrollOffset:t=0}=this.props;e!==void 0&&e!==this.state.activeKey&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:t}))}componentWillUnmount(){window.removeEventListener(`dragend`,this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(e,t){let{prevProps:n}=t,r={prevProps:e};function i(t){return!n&&e.hasOwnProperty(t)||n&&n[t]!==e[t]}let a,{fieldNames:o}=t;if(i(`fieldNames`)&&(o=LL(e.fieldNames),r.fieldNames=o),i(`treeData`)?{treeData:a}=e:i(`children`)&&(ui(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=RL(e.children)),a){r.treeData=a;let e=BL(a,{fieldNames:o});r.keyEntities={[$Y]:tX,...e.keyEntities}}let s=r.keyEntities||t.keyEntities;if(i(`expandedKeys`)||n&&i(`autoExpandParent`))r.expandedKeys=e.autoExpandParent||!n&&e.defaultExpandParent?kY(e.expandedKeys,s):e.expandedKeys;else if(!n&&e.defaultExpandAll){let e={...s};delete e[$Y];let t=[];Object.keys(e).forEach(n=>{let r=e[n];r.children&&r.children.length&&t.push(r.key)}),r.expandedKeys=t}else !n&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?kY(e.defaultExpandedKeys,s):e.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,(a||r.expandedKeys)&&(r.flattenNodes=zL(a||t.treeData,r.expandedKeys||t.expandedKeys,o)),e.selectable&&(i(`selectedKeys`)?r.selectedKeys=DY(e.selectedKeys,e):!n&&e.defaultSelectedKeys&&(r.selectedKeys=DY(e.defaultSelectedKeys,e))),e.checkable){let o;if(i(`checkedKeys`)?o=OY(e.checkedKeys)||{}:!n&&e.defaultCheckedKeys?o=OY(e.defaultCheckedKeys)||{}:a&&(o=OY(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),o){let{checkedKeys:t=[],halfCheckedKeys:n=[]}=o;if(!e.checkStrictly){let e=KL(t,!0,s);({checkedKeys:t,halfCheckedKeys:n}=e)}r.checkedKeys=t,r.halfCheckedKeys=n}}return i(`loadedKeys`)&&(r.loadedKeys=e.loadedKeys),r}onNodeDragStart=(e,t)=>{let{expandedKeys:n,keyEntities:r}=this.state,{onDragStart:i}=this.props,{eventKey:a}=t;this.dragNodeProps=t,this.dragStartMousePosition={x:e.clientX,y:e.clientY};let o=bY(n,a);this.setState({draggingNodeKey:a,dragChildrenKeys:CY(a,r),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(o),window.addEventListener(`dragend`,this.onWindowDragEnd),i?.({event:e,node:UL(t)})};onNodeDragEnter=(e,t)=>{let{expandedKeys:n,keyEntities:r,dragChildrenKeys:i,flattenNodes:a,indent:o}=this.state,{onDragEnter:s,onExpand:c,allowDrop:l,direction:u}=this.props,{pos:d,eventKey:f}=t;if(this.currentMouseOverDroppableNodeKey!==f&&(this.currentMouseOverDroppableNodeKey=f),!this.dragNodeProps){this.resetDragState();return}let{dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v,dragOverNodeKey:y}=EY(e,this.dragNodeProps,t,o,this.dragStartMousePosition,l,a,r,n,u);if(i.includes(h)||!v){this.resetDragState();return}if(this.delayedDragEnterLogic||={},Object.keys(this.delayedDragEnterLogic).forEach(e=>{clearTimeout(this.delayedDragEnterLogic[e])}),this.dragNodeProps.eventKey!==t.eventKey&&(e.persist(),this.delayedDragEnterLogic[d]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let i=[...n],a=PL(r,t.eventKey);a&&(a.children||[]).length&&(i=xY(n,t.eventKey)),this.props.hasOwnProperty(`expandedKeys`)||this.setExpandedKeys(i),c?.(i,{node:UL(t),expanded:!0,nativeEvent:e.nativeEvent})},800)),this.dragNodeProps.eventKey===h&&m===0){this.resetDragState();return}this.setState({dragOverNodeKey:y,dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v}),s?.({event:e,node:UL(t),expandedKeys:n})};onNodeDragOver=(e,t)=>{let{dragChildrenKeys:n,flattenNodes:r,keyEntities:i,expandedKeys:a,indent:o}=this.state,{onDragOver:s,allowDrop:c,direction:l}=this.props;if(!this.dragNodeProps)return;let{dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}=EY(e,this.dragNodeProps,t,o,this.dragStartMousePosition,c,r,i,a,l);n.includes(f)||!h||(this.dragNodeProps.eventKey===f&&d===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():u===this.state.dropPosition&&d===this.state.dropLevelOffset&&f===this.state.dropTargetKey&&p===this.state.dropContainerKey&&m===this.state.dropTargetPos&&h===this.state.dropAllowed&&g===this.state.dragOverNodeKey||this.setState({dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}),s?.({event:e,node:UL(t)}))};onNodeDragLeave=(e,t)=>{this.currentMouseOverDroppableNodeKey===t.eventKey&&!e.currentTarget.contains(e.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);let{onDragLeave:n}=this.props;n?.({event:e,node:UL(t)})};onWindowDragEnd=e=>{this.onNodeDragEnd(e,null,!0),window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDragEnd=(e,t)=>{let{onDragEnd:n}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),n?.({event:e,node:UL(t)}),this.dragNodeProps=null,window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDrop=(e,t,n=!1)=>{let{dragChildrenKeys:r,dropPosition:i,dropTargetKey:a,dropTargetPos:o,dropAllowed:s}=this.state;if(!s)return;let{onDrop:c}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),a===null)return;let l={...HL(a,this.getTreeNodeRequiredProps()),active:this.getActiveItem()?.key===a,data:PL(this.state.keyEntities,a).node};ui(!r.includes(a),`Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.`);let u=SY(o),d={event:e,node:UL(l),dragNode:this.dragNodeProps?UL(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(r),dropToGap:i!==0,dropPosition:i+Number(u[u.length-1])};n||c?.(d),this.dragNodeProps=null};resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}cleanDragState=()=>{let{draggingNodeKey:e}=this.state;e!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null};triggerExpandActionExpand=(e,t)=>{let{expandedKeys:n,flattenNodes:r}=this.state,{expanded:i,key:a,isLeaf:o}=t;if(o||e.shiftKey||e.metaKey||e.ctrlKey)return;let s=r.filter(e=>e.key===a)[0],c=UL({...HL(a,this.getTreeNodeRequiredProps()),data:s.data});this.setExpandedKeys(i?bY(n,a):xY(n,a)),this.onNodeExpand(e,c)};onNodeClick=(e,t)=>{let{onClick:n,expandAction:r}=this.props;r===`click`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeDoubleClick=(e,t)=>{let{onDoubleClick:n,expandAction:r}=this.props;r===`doubleClick`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeSelect=(e,t)=>{let{selectedKeys:n}=this.state,{keyEntities:r,fieldNames:i}=this.state,{onSelect:a,multiple:o}=this.props,{selected:s}=t,c=t[i.key],l=!s;n=l?o?xY(n,c):[c]:bY(n,c);let u=n.map(e=>{let t=PL(r,e);return t?t.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:n}),a?.(n,{event:`select`,selected:l,node:t,selectedNodes:u,nativeEvent:e.nativeEvent})};onNodeCheck=(e,t,n)=>{let{keyEntities:r,checkedKeys:i,halfCheckedKeys:a}=this.state,{checkStrictly:o,onCheck:s}=this.props,{key:c}=t,l,u={event:`check`,node:t,checked:n,nativeEvent:e.nativeEvent};if(o){let e=n?xY(i,c):bY(i,c);l={checked:e,halfChecked:bY(a,c)},u.checkedNodes=e.map(e=>PL(r,e)).filter(Boolean).map(e=>e.node),this.setUncontrolledState({checkedKeys:e})}else{let{checkedKeys:e,halfCheckedKeys:t}=KL([...i,c],!0,r);if(!n){let n=new Set(e);n.delete(c),{checkedKeys:e,halfCheckedKeys:t}=KL(Array.from(n),{checked:!1,halfCheckedKeys:t},r)}l=e,u.checkedNodes=[],u.checkedNodesPositions=[],u.halfCheckedKeys=t,e.forEach(e=>{let t=PL(r,e);if(!t)return;let{node:n,pos:i}=t;u.checkedNodes.push(n),u.checkedNodesPositions.push({node:n,pos:i})}),this.setUncontrolledState({checkedKeys:e},!1,{halfCheckedKeys:t})}s?.(l,u)};onNodeLoad=e=>{let{key:t}=e,{keyEntities:n}=this.state;if(PL(n,t)?.children?.length)return;let r=new Promise((n,r)=>{this.setState(({loadedKeys:i=[],loadingKeys:a=[]})=>{let{loadData:o,onLoad:s}=this.props;return!o||i.includes(t)||a.includes(t)?null:(o(e).then(()=>{let{loadedKeys:r}=this.state,i=xY(r,t);s?.(i,{event:`load`,node:e}),this.setUncontrolledState({loadedKeys:i}),this.setState(e=>({loadingKeys:bY(e.loadingKeys,t)})),n()}).catch(e=>{if(this.setState(e=>({loadingKeys:bY(e.loadingKeys,t)})),this.loadingRetryTimes[t]=(this.loadingRetryTimes[t]||0)+1,this.loadingRetryTimes[t]>=sX){let{loadedKeys:e}=this.state;ui(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:xY(e,t)}),n()}r(e)}),{loadingKeys:xY(a,t)})})});return r.catch(()=>{}),r};onNodeMouseEnter=(e,t)=>{let{onMouseEnter:n}=this.props;n?.({event:e,node:t})};onNodeMouseLeave=(e,t)=>{let{onMouseLeave:n}=this.props;n?.({event:e,node:t})};onNodeContextMenu=(e,t)=>{let{onRightClick:n}=this.props;n&&(e.preventDefault(),n({event:e,node:t}))};onMouseDown=e=>{this.focusedByMouse=!0;let{onMouseDown:t}=this.props;t?.(e)};onMouseUp=e=>{this.focusedByMouse=!1;let{onMouseUp:t}=this.props;t?.(e)};onFocus=(...e)=>{let{onFocus:t,disabled:n}=this.props,{activeKey:r,selectedKeys:i,flattenNodes:a}=this.state;if(!this.focusedByMouse&&!n&&r===null){let e=i.find(e=>a.some(t=>t.key===e));e===void 0?this.onActiveChange(a?.[0]?.key||null):this.onActiveChange(e)}t?.(...e)};onBlur=(...e)=>{this.focusedByMouse=!1;let{onBlur:t}=this.props;this.onActiveChange(null),t?.(...e)};getTreeNodeRequiredProps=()=>{let{expandedKeys:e,selectedKeys:t,loadedKeys:n,loadingKeys:r,checkedKeys:i,halfCheckedKeys:a,dragOverNodeKey:o,dropPosition:s,keyEntities:c}=this.state;return{expandedKeys:e||[],selectedKeys:t||[],loadedKeys:n||[],loadingKeys:r||[],checkedKeys:i||[],halfCheckedKeys:a||[],dragOverNodeKey:o,dropPosition:s,keyEntities:c}};setExpandedKeys=e=>{let{treeData:t,fieldNames:n}=this.state,r=zL(t,e,n);this.setUncontrolledState({expandedKeys:e,flattenNodes:r},!0)};onNodeExpand=(e,t)=>{let{expandedKeys:n}=this.state,{listChanging:r,fieldNames:i}=this.state,{onExpand:a,loadData:o}=this.props,{expanded:s}=t,c=t[i.key];if(r)return;let l=n.includes(c),u=!s;if(ui(s&&l||!s&&!l,`Expand state not sync with index check`),n=u?xY(n,c):bY(n,c),this.setExpandedKeys(n),a?.(n,{node:t,expanded:u,nativeEvent:e.nativeEvent}),u&&o){let e=this.onNodeLoad(t);e&&e.then(()=>{let e=zL(this.state.treeData,n,i);this.setUncontrolledState({flattenNodes:e})}).catch(()=>{let{expandedKeys:e}=this.state,t=bY(e,c);this.setExpandedKeys(t)})}};onListChangeStart=()=>{this.setUncontrolledState({listChanging:!0})};onListChangeEnd=()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})};onActiveChange=e=>{let{activeKey:t}=this.state,{onActiveChange:n,itemScrollOffset:r=0}=this.props;t!==e&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:r}),n?.(e))};getActiveItem=()=>{let{activeKey:e,flattenNodes:t}=this.state;return e===null?null:t.find(({key:t})=>t===e)||null};offsetActiveKey=e=>{let{flattenNodes:t,activeKey:n}=this.state,r=t.findIndex(({key:e})=>e===n);r===-1&&e<0&&(r=t.length),r=(r+e+t.length)%t.length;let i=t[r];if(i){let{key:e}=i;this.onActiveChange(e)}else this.onActiveChange(null)};onKeyDown=e=>{let{activeKey:t,expandedKeys:n,checkedKeys:r,flattenNodes:i,keyEntities:a}=this.state,{onKeyDown:o,checkable:s,selectable:c,disabled:l,loadData:u}=this.props;if(l)return;switch(e.key){case`ArrowUp`:this.offsetActiveKey(-1),e.preventDefault();break;case`ArrowDown`:this.offsetActiveKey(1),e.preventDefault();break;case`Home`:this.onActiveChange(i?.[0]?.key),e.preventDefault();break;case`End`:this.onActiveChange(i?.[i.length-1]?.key),e.preventDefault();break}let d=this.getActiveItem();if(d&&d.data){let i=UL({...HL(t,this.getTreeNodeRequiredProps()),data:d.data,active:!0}),o=!!PL(a,t)?.children?.length,l=!VL(d.data.isLeaf,u,o,i.loaded),f=s&&!i.disabled&&i.checkable!==!1&&!i.disableCheckbox,p=!s&&c&&!i.disabled&&i.selectable!==!1;switch(e.key){case`ArrowLeft`:l&&n.includes(t)?this.onNodeExpand({},i):d.parent&&this.onActiveChange(d.parent.key),e.preventDefault();break;case`ArrowRight`:l&&!n.includes(t)?this.onNodeExpand({},i):d.children&&d.children.length&&this.onActiveChange(d.children[0].key),e.preventDefault();break;case`Enter`:l?(e.preventDefault(),this.onNodeExpand({},i)):f?r.includes(t)||(e.preventDefault(),this.onNodeCheck({},i,!0)):p&&!i.selected&&(e.preventDefault(),this.onNodeSelect({},i));break;case` `:f?(e.preventDefault(),this.onNodeCheck({},i,!r.includes(t))):p&&(e.preventDefault(),this.onNodeSelect({},i));break}}o?.(e)};setUncontrolledState=(e,t=!1,n=null)=>{if(!this.destroyed){let r=!1,i=!0,a={};Object.keys(e).forEach(t=>{if(this.props.hasOwnProperty(t)){i=!1;return}r=!0,a[t]=e[t]}),r&&(!t||i)&&this.setState({...a,...n})}};scrollTo=e=>{this.listRef.current.scrollTo(e)};render(){let{flattenNodes:e,keyEntities:t,draggingNodeKey:n,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c}=this.state,{prefixCls:l,className:u,style:d,styles:f,classNames:p,showLine:m,focusable:h,tabIndex:g=0,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:x,checkable:C,checkStrictly:w,disabled:T,motion:E,loadData:D,filterTreeNode:O,height:k,itemHeight:A,scrollWidth:j,virtual:M,titleRender:N,dropIndicatorRender:P,onContextMenu:F,onScroll:I,direction:L,rootClassName:R,rootStyle:z}=this.props,B=xi(this.props,{aria:!0,data:!0}),V;x&&(V=typeof x==`object`?x:typeof x==`function`?{nodeDraggable:x}:{});let H={styles:f,classNames:p,prefixCls:l,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:V,draggingNodeKey:n,checkable:C,checkStrictly:w,disabled:T,keyEntities:t,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c,direction:L,dropIndicatorRender:P,loadData:D,filterTreeNode:O,titleRender:N,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return S.createElement(fY.Provider,{value:H},S.createElement(`div`,{className:J(l,u,R,{[`${l}-show-line`]:m}),style:z},S.createElement(aX,oX({ref:this.listRef,prefixCls:l,style:d,data:e,disabled:T,selectable:_,checkable:!!C,motion:E,dragging:n!==null,height:k,itemHeight:A,virtual:M,focusable:h,tabIndex:g,activeItem:this.getActiveItem(),onFocus:this.onFocus,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:F,onScroll:I,scrollWidth:j},this.getTreeNodeRequiredProps(),B))))}},lX=c(o((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:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file`,theme:`outlined`}}))());function uX(){return uX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,uX({},e,{ref:t,icon:lX.default}))),fX=c(o((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:`M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z`}}]},name:`folder-open`,theme:`outlined`}}))());function pX(){return pX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,pX({},e,{ref:t,icon:fX.default}))),hX=c(o((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:`M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z`}}]},name:`folder`,theme:`outlined`}}))());function gX(){return gX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,gX({},e,{ref:t,icon:hX.default}))),vX=c(o((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:`M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z`}}]},name:`holder`,theme:`outlined`}}))());function yX(){return yX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,yX({},e,{ref:t,icon:vX.default}))),xX=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:i,borderRadius:a,controlItemBgHover:o})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:`static`,[`&:has(${e}-drop-indicator)`]:{position:`relative`},[`> *:not(${e}-drop-indicator)`]:{position:`relative`},"&:hover":{background:`transparent`},"&:before":{position:`absolute`,inset:0,transition:`background-color ${i}`,content:`""`,borderRadius:a},"&:hover:before":{background:o}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:`transparent`,"&, &:hover":{color:r},"&:before, &:hover:before":{background:n}}}}}),SX=new Ms(`ant-tree-node-fx-do-not-use`,{"0%":{opacity:0},"100%":{opacity:1}}),CX=(e,t)=>({[`.${e}-switcher-icon`]:{display:`inline-block`,fontSize:10,verticalAlign:`baseline`,svg:{transition:`transform ${t.motionDurationSlow}`}}}),wX=(e,t)=>({[`.${e}-drop-indicator`]:{position:`absolute`,zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:`none`,"&:after":{position:`absolute`,top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:`transparent`,border:`${Y(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:`50%`,content:`""`}}}),TX=(e,t)=>{let{treeCls:n,treeNodeCls:r,treeNodePadding:i,titleHeight:a,indentSize:o,switcherSize:s,motionDurationMid:c,nodeSelectedBg:l,nodeHoverBg:u,colorTextQuaternary:d,controlItemBgActiveDisabled:f}=t;return{[n]:{...Ul(t),"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:`rtl`},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:`rotate(90deg)`},[`${n}-list`]:{"&:focus-visible":{outline:`none`,[`${r}-active ${n}-node-content-wrapper`]:{...Kl(t)}}},[`${n}-list-holder-inner`]:{alignItems:`flex-start`},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:`stretch`,[`${n}-node-content-wrapper`]:{flex:`auto`},[`${r}.dragging:after`]:{position:`absolute`,inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:SX,animationDuration:t.motionDurationSlow,animationPlayState:`running`,animationFillMode:`forwards`,content:`""`,pointerEvents:`none`,borderRadius:t.borderRadius}}},[r]:{display:`flex`,alignItems:`flex-start`,marginBottom:i,lineHeight:Y(a),position:`relative`,"&:before":{content:`""`,position:`absolute`,zIndex:1,insetInlineStart:0,width:`100%`,top:`100%`,height:i},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:f},[`${n}-checkbox-disabled`]:{pointerEvents:`unset`},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:`grab`,[`${n}-draggable-icon`]:{flexShrink:0,width:s,textAlign:`center`,visibility:`visible`,color:d},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:`hidden`}}},[`${n}-indent`]:{alignSelf:`stretch`,whiteSpace:`nowrap`,userSelect:`none`,"&-unit":{display:`inline-block`,width:o}},[`${n}-draggable-icon`]:{visibility:`hidden`},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(s).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-checkbox`]:{flexShrink:0,alignSelf:`flex-start`,marginBlockStart:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:{...CX(e,t),position:`relative`,flex:`none`,alignSelf:`stretch`,width:s,textAlign:`center`,cursor:`pointer`,userSelect:`none`,transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:`unset`},"&:before":{pointerEvents:`none`,content:`""`,width:s,height:a,position:`absolute`,left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:`rotate(-90deg)`},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:`relative`,zIndex:1,display:`inline-block`,width:`100%`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&:after":{position:`absolute`,width:t.calc(t.calc(s).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:`""`}}},[`${n}-node-content-wrapper`]:{position:`relative`,minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:`transparent`,borderRadius:t.borderRadius,cursor:`pointer`,transition:[`all ${c}`,`border 0s`,`line-height 0s`,`box-shadow 0s`].join(`, `),...wX(e,t),"&:hover":{backgroundColor:u},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${n}-iconEle`]:{display:`inline-block`,width:s,height:a,textAlign:`center`,verticalAlign:`top`,"&:empty":{display:`none`}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:`transparent`},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:`relative`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&-end:before":{display:`none`}},[`${n}-switcher`]:{background:`transparent`,"&-line-icon":{verticalAlign:`-0.15em`}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:`auto !important`,bottom:`auto !important`,height:`${Y(t.calc(a).div(2).equal())} !important`}}}},EX=(e,t,n=!0)=>{let r=`.${e}`,i=dc(t,{treeCls:r,treeNodeCls:`${r}-treenode`,treeNodePadding:t.calc(t.paddingXS).div(2).equal()});return[TX(e,i),n&&xX(i)].filter(Boolean)},DX=e=>{let{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,i=t;return{titleHeight:i,switcherSize:i,indentSize:i,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},OX=Ql(`Tree`,(e,{prefixCls:t})=>[{[e.componentCls]:oR(`${t}-checkbox`,e)},EX(t,e),Kh(e)],e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return{...DX(e),directoryNodeSelectedColor:t,directoryNodeSelectedBg:n}}),kX=e=>{let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:i,direction:a=`ltr`}=e,o=a===`ltr`?`left`:`right`,s=a===`ltr`?`right`:`left`,c={[o]:-n*i+4,[s]:0};switch(t){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[o]=i+4;break}return S.createElement(`div`,{style:c,className:`${r}-drop-indicator`})},AX=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`filled`}}))());function jX(){return jX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,jX({},e,{ref:t,icon:AX.default}))),NX=c(o((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:`M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`minus-square`,theme:`outlined`}}))());function PX(){return PX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,PX({},e,{ref:t,icon:NX.default}))),IX=c(o((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:`M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`plus-square`,theme:`outlined`}}))());function LX(){return LX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,LX({},e,{ref:t,icon:IX.default}))),zX=e=>{let{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:i,switcherLoadingIcon:a}=e,{isLeaf:o,expanded:s,loading:c}=r;if(c)return S.isValidElement(a)?a:S.createElement(Xm,{className:`${t}-switcher-loading-icon`});let l;if(nf(i)&&(l=i.showLeafIcon),o){if(!i)return null;if(typeof l!=`boolean`&&l){let e=typeof l==`function`?l(r):l,n=`${t}-switcher-line-custom-icon`;return S.isValidElement(e)?um(e,{className:J(e.props?.className,n)}):e}return l?S.createElement(dX,{className:`${t}-switcher-line-icon`}):S.createElement(`span`,{className:`${t}-switcher-leaf-line`})}let u=`${t}-switcher-icon`,d=typeof n==`function`?n(r):n;return S.isValidElement(d)?um(d,{className:J(d.props?.className,i?`${t}-switcher-line-icon`:u)}):d===void 0?i?s?S.createElement(FX,{className:`${t}-switcher-line-icon`}):S.createElement(RX,{className:`${t}-switcher-line-icon`}):S.createElement(MX,{className:u}):d},BX=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,className:i,style:a,classNames:o,styles:s}=ya(`tree`),{virtual:c}=S.useContext(ga),{prefixCls:l,className:u,showIcon:d=!1,showLine:f,switcherIcon:p,switcherLoadingIcon:m,blockNode:h=!1,children:g,checkable:_=!1,selectable:v=!0,draggable:y,disabled:b,motion:x,style:C,rootClassName:w,classNames:T,styles:E,icon:D}=e,O=S.useContext(mm),k=b??O,A=n(`tree`,l),j=n(),M=x??{...hh(j),motionAppear:!1},N={...e,showIcon:d,blockNode:h,checkable:_,selectable:v,disabled:k,motion:M},[P,F]=Cf([o,T],[s,E],{props:N}),I={...N,showLine:!!f,icon:D,dropIndicatorRender:kX},[L,R]=OX(A),[,z]=Vl(),B=z.paddingXS/2+(z.Tree?.titleHeight||z.controlHeightSM),V=S.useMemo(()=>{if(!y)return!1;let e={};switch(typeof y){case`function`:e.nodeDraggable=y;break;case`object`:e={...y};break;default:break}return e.icon!==!1&&(e.icon=e.icon||S.createElement(bX,null)),e},[y]),H=e=>S.createElement(zX,{prefixCls:A,switcherIcon:p,switcherLoadingIcon:m,treeNodeProps:e,showLine:f});return S.createElement(cX,{itemHeight:B,ref:t,virtual:c,...I,prefixCls:A,className:J({[`${A}-icon-hide`]:!d,[`${A}-block-node`]:h,[`${A}-unselectable`]:!v,[`${A}-rtl`]:r===`rtl`,[`${A}-disabled`]:k},i,u,L,R),style:{...a,...C},rootClassName:J(P.root,w),rootStyle:F.root,classNames:P,styles:F,direction:r,checkable:_&&S.createElement(`span`,{className:`${A}-checkbox-inner`}),selectable:v,switcherIcon:H,draggable:V},g)}),VX=0,HX=1,UX=2;function WX(e,t,n){let{key:r,children:i}=n;function a(e){let a=e[r],o=e[i];t(a,e)!==!1&&WX(o||[],t,n)}e.forEach(a)}function GX({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:i}){let a=[],o=VX;if(n&&n===r)return[n];if(!n||!r)return[];function s(e){return e===n||e===r}return WX(e,e=>{if(o===UX)return!1;if(s(e)){if(a.push(e),o===VX)o=HX;else if(o===HX)return o=UX,!1}else o===HX&&a.push(e);return t.includes(e)},LL(i)),a}function KX(e,t,n){let r=pa(t),i=[];return WX(e,(e,t)=>{let n=r.indexOf(e);return n!==-1&&(i.push(t),r.splice(n,1)),!!r.length},LL(n)),i}function qX(e){let{isLeaf:t,expanded:n}=e;return t?S.createElement(dX,null):n?S.createElement(mX,null):S.createElement(_X,null)}function JX({treeData:e,children:t}){return e||RL(t)}var YX=S.forwardRef((e,t)=>{let{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:i,...a}=e,o=S.useRef(null),s=S.useRef(null),c=()=>{let{keyEntities:e}=BL(JX(a),{fieldNames:a.fieldNames}),t,o=a.expandedKeys||i||[];return t=n?Object.keys(e):r?kY(o,e):o,t},[l,u]=S.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[d,f]=S.useState(()=>c());S.useEffect(()=>{`selectedKeys`in a&&u(a.selectedKeys)},[a.selectedKeys]),S.useEffect(()=>{`expandedKeys`in a&&f(a.expandedKeys)},[a.expandedKeys]);let p=(e,t)=>(`expandedKeys`in a||f(e),a.onExpand?.(e,t)),m=(e,t)=>{let{multiple:n,fieldNames:r}=a,{node:i,nativeEvent:c}=t,{key:l=``}=i,f=JX(a),p={...t,selected:!0},m=c?.ctrlKey||c?.metaKey,h=c?.shiftKey,g;n&&m?(g=e,o.current=l,s.current=g,p.selectedNodes=KX(f,g,r)):n&&h?(g=Array.from(new Set([].concat(pa(s.current||[]),pa(GX({treeData:f,expandedKeys:d,startKey:l,endKey:o.current,fieldNames:r}))))),p.selectedNodes=KX(f,g,r)):(g=[l],o.current=l,s.current=g,p.selectedNodes=KX(f,g,r)),a.onSelect?.(g,p),`selectedKeys`in a||u(g)},{getPrefixCls:h,direction:g}=S.useContext(ga),{prefixCls:_,className:v,showIcon:y=!0,expandAction:b=`click`,...x}=a,C=h(`tree`,_),w=J(`${C}-directory`,{[`${C}-directory-rtl`]:g===`rtl`},v);return S.createElement(BX,{icon:qX,ref:t,blockNode:!0,...x,showIcon:y,expandAction:b,prefixCls:C,className:w,expandedKeys:d,selectedKeys:l,onSelect:m,onExpand:p})}),XX=BX;XX.DirectoryTree=YX,XX.TreeNode=yY;var ZX=e=>{let{value:t,filterSearch:n,tablePrefixCls:r,locale:i,onChange:a}=e;return n?S.createElement(`div`,{className:`${r}-filter-dropdown-search`},S.createElement(xz,{prefix:S.createElement(IC,null),placeholder:i.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},QX=e=>{let{keyCode:t}=e;t===Qr.ENTER&&e.stopPropagation()},$X=S.forwardRef((e,t)=>S.createElement(`div`,{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:QX,ref:t},e.children));function eZ(e){let t=[];return(e||[]).forEach(({value:e,children:n})=>{t.push(e),n&&(t=[].concat(pa(t),pa(eZ(n))))}),t}function tZ(e){return e.some(({children:e})=>e)}var nZ=(e,t)=>typeof t==`string`||ef(t)?t.toString().toLowerCase().includes(e):!1,rZ=e=>{let{filters:t,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s}=e;return t.map((e,t)=>{let c=String(e.value);if(e.children)return{key:c||t,label:e.text,popupClassName:`${n}-dropdown-submenu`,children:rZ({filters:e.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s})};let l=i?mR:qF,u={key:e.value===void 0?t:c,label:S.createElement(S.Fragment,null,S.createElement(l,{checked:r.includes(c)}),S.createElement(`span`,null,e.text))};return o?typeof s==`function`?s(o,e)?u:null:nZ(o,e.text)?u:null:u})};function iZ(e){return e||[]}var aZ=e=>{let{tablePrefixCls:t,prefixCls:n,column:r,dropdownPrefixCls:i,columnKey:a,filterOnClose:o,filterMultiple:s,filterMode:c=`menu`,filterSearch:l=!1,filterState:u,triggerFilter:d,locale:f,children:p,getPopupContainer:m,rootClassName:h}=e,{filterResetToDefaultFilteredValue:g,defaultFilteredValue:_,filterDropdownProps:v={},filterDropdownOpen:y,onFilterDropdownOpenChange:b}=r,[x,C]=S.useState(!1),w=S.useContext(yw),T=!!(u&&(u.filteredKeys?.length||u.forceFiltered)),E=e=>{C(e),v.onOpenChange?.(e),b?.(e)},D=v.open??y??x,O=u?.filteredKeys,[k,A]=Af(iZ(O)),j=({selectedKeys:e})=>{A(e)},M=(e,{node:t,checked:n})=>{j(s?{selectedKeys:e}:{selectedKeys:n&&t.key?[t.key]:[]})};S.useEffect(()=>{x&&j({selectedKeys:iZ(O)})},[O]);let[N,P]=S.useState([]),F=e=>{P(e)},[I,L]=S.useState(``),R=S.useMemo(()=>I.trim().toLowerCase(),[I]),z=e=>{let{value:t}=e.target;L(t)};S.useEffect(()=>{x||L(``)},[x]);let B=e=>{let t=e?.length?e:null;if(t===null&&(!u||!u.filteredKeys)||fi(t,u?.filteredKeys,!0))return null;d({column:r,key:a,filteredKeys:t})},V=()=>{E(!1),B(k())},H=({confirm:e,closeDropdown:t}={confirm:!1,closeDropdown:!1})=>{e&&B([]),t&&E(!1),L(``),A(g?(_||[]).map(String):[])},U=({closeDropdown:e}={closeDropdown:!0})=>{e&&E(!1),B(k())},ee=(e,t)=>{t.source===`trigger`&&(e&&O!==void 0&&A(iZ(O)),E(e),!e&&!r.filterDropdown&&o&&V())},W=J({[`${i}-menu-without-submenu`]:!tZ(r.filters||[])}),te=e=>{e.target.checked?A(eZ(r?.filters).map(String)):A([])},G=({filters:e})=>(e||[]).map((e,t)=>{let n=String(e.value),r={title:e.text,key:e.value===void 0?String(t):n};return e.children&&(r.children=G({filters:e.children})),r}),ne=e=>({...e,text:e.title,value:e.key,children:e.children?.map(ne)||[]}),K,{direction:re,renderEmpty:ie}=S.useContext(ga);if(typeof r.filterDropdown==`function`)K=r.filterDropdown({prefixCls:`${i}-custom`,setSelectedKeys:e=>j({selectedKeys:e}),selectedKeys:k(),confirm:U,clearFilters:H,filters:r.filters,visible:D,close:()=>{E(!1)}});else if(r.filterDropdown)K=r.filterDropdown;else{let e=k()||[];K=S.createElement(S.Fragment,null,(()=>{let a=ie?.(`Table.filter`)??S.createElement(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:`16px 0`}});if((r.filters||[]).length===0)return a;if(c===`tree`)return S.createElement(S.Fragment,null,S.createElement(ZX,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),S.createElement(`div`,{className:`${t}-filter-dropdown-tree`},s?S.createElement(mR,{checked:e.length===eZ(r.filters).length,indeterminate:e.length>0&&e.lengthtypeof l==`function`?l(I,ne(e)):nZ(R,e.title):void 0})));let o=rZ({filters:r.filters||[],filterSearch:l,prefixCls:n,filteredKeys:k(),filterMultiple:s,searchValue:I,normalizedSearchValue:R}),u=o.every(e=>e===null);return S.createElement(S.Fragment,null,S.createElement(ZX,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),u?a:S.createElement(GE,{selectable:!0,multiple:s,prefixCls:`${i}-menu`,className:W,onSelect:j,onDeselect:j,selectedKeys:e,getPopupContainer:m,openKeys:N,onOpenChange:F,items:o}))})(),S.createElement(`div`,{className:`${n}-dropdown-btns`},S.createElement(g_,{type:`link`,size:`small`,disabled:g?fi((_||[]).map(String),e,!0):e.length===0,onClick:()=>H()},f.filterReset),S.createElement(g_,{type:`primary`,size:`small`,onClick:V},f.filterConfirm)))}r.filterDropdown&&(K=S.createElement(LE,{selectable:void 0},K)),K=S.createElement($X,{className:`${n}-dropdown`},K);let ae=(()=>{let e;return e=typeof r.filterIcon==`function`?r.filterIcon(T):r.filterIcon?r.filterIcon:S.createElement(GY,null),S.createElement(`span`,{role:`button`,tabIndex:-1,className:J(`${n}-trigger`,{active:T}),onClick:e=>{e.stopPropagation()}},e)})();if(w)return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),ae);let q=Qd({trigger:[`click`],placement:re===`rtl`?`bottomLeft`:`bottomRight`,children:ae,getPopupContainer:m},{...v,rootClassName:J(h,v.rootClassName),open:D,onOpenChange:ee,popupRender:()=>typeof v?.dropdownRender==`function`?v.dropdownRender(K):K});return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),S.createElement(SV,{...q}))},oZ=(e,t,n)=>{let r=[];return(e||[]).forEach((e,i)=>{let a=BY(i,n),o=e.filterDropdown!==void 0;if(e.filters||o||`onFilter`in e)if(`filteredValue`in e){let t=e.filteredValue;o||(t=t?.map(String)??t),r.push({column:e,key:zY(e,a),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:zY(e,a),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered});`children`in e&&(r=[].concat(pa(r),pa(oZ(e.children,t,a))))}),r};function sZ(e,t,n,r,i,a,o,s,c){return n.map((n,l)=>{let u=BY(l,s),{filterOnClose:d=!0,filterMultiple:f=!0,filterMode:p,filterSearch:m}=n,h=n;if(h.filters||h.filterDropdown){let s=zY(h,u),l=r.find(({key:e})=>s===e);h={...h,title:r=>S.createElement(aZ,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:h,columnKey:s,filterState:l,filterOnClose:d,filterMultiple:f,filterMode:p,filterSearch:m,triggerFilter:a,locale:i,getPopupContainer:o,rootClassName:c},VY(n.title,r))}}return`children`in h&&(h={...h,children:sZ(e,t,h.children,r,i,a,o,u,c)}),h})}var cZ=e=>{let t={};return e.forEach(({key:e,filteredKeys:n,column:r})=>{let i=e,{filters:a,filterDropdown:o}=r;o?t[i]=n||null:Array.isArray(n)?t[i]=eZ(a).filter(e=>n.includes(String(e))):t[i]=null}),t},lZ=(e,t,n)=>t.reduce((e,r)=>{let{column:{onFilter:i,filters:a},filteredKeys:o}=r;if(i&&o&&o.length){let r=eZ(a),s=new Map;r.forEach(e=>{let t=String(e);s.has(t)||s.set(t,e)});let c=o.map(e=>{let t=String(e);return s.get(t)??e});return(e=>e.reduce((e,r)=>{let a={...r};return a[n]&&(a[n]=lZ(a[n],t,n)),c.some(e=>i(e,a))&&e.push(a),e},[]))(e)}return e},e),uZ=e=>e.flatMap(e=>`children`in e?[e].concat(pa(uZ(e.children||[]))):[e]),dZ=e=>{let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:i,getPopupContainer:a,locale:o,rootClassName:s}=e;Gi(`Table`);let c=S.useMemo(()=>uZ(r||[]),[r]),[l,u]=S.useState(()=>oZ(c,!0)),d=S.useMemo(()=>{let e=oZ(c,!1);if(e.length===0)return e;let t=!0;if(e.forEach(({filteredKeys:e})=>{e!==void 0&&(t=!1)}),t){let e=(c||[]).map((e,t)=>zY(e,BY(t)));return l.filter(({key:t})=>e.includes(t)).map(t=>{let n=c[e.indexOf(t.key)];return{...t,column:{...t.column,...n},forceFiltered:n.filtered}})}return e},[c,l]),f=S.useMemo(()=>cZ(d),[d]),p=e=>{let t=d.filter(({key:t})=>t!==e.key);t.push(e),u(t),i(cZ(t),t)};return[e=>sZ(t,n,e,d,o,p,a,void 0,s),d,f]},fZ=(e,t,n)=>{let r=S.useRef({});function i(i){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let i=new Map;function a(e){e.forEach((e,r)=>{let o=n(e,r);i.set(o,e),nf(e)&&t in e&&a(e[t]||[])})}a(e),r.current={data:e,childrenColumnName:t,kvMap:i,getRowKey:n}}return r.current.kvMap?.get(i)}return[i]};function pZ(e,t){let n={current:e.current,pageSize:e.pageSize},r=nf(t)?t:{};return Object.keys(r).forEach(t=>{let r=e[t];typeof r!=`function`&&(n[t]=r)}),n}function mZ(e,t,n){let{total:r=0,...i}=nf(n)?n:{},[a,o]=(0,S.useState)(()=>({current:`defaultCurrent`in i?i.defaultCurrent:1,pageSize:`defaultPageSize`in i?i.defaultPageSize:10})),s=Qd(a,i,{total:r>0?r:e}),c=Math.ceil((r||e)/s.pageSize);s.current>c&&(s.current=c||1);let l=(e,t)=>{o({current:e??1,pageSize:t||s.pageSize})},u=(e,r)=>{n&&n.onChange?.(e,r),l(e,r),t(e,r||s?.pageSize)};return n===!1?[{},()=>{}]:[{...s,onChange:u},l]}var hZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`outlined`}}))());function gZ(){return gZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,gZ({},e,{ref:t,icon:hZ.default}))),vZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z`}}]},name:`caret-up`,theme:`outlined`}}))());function yZ(){return yZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,yZ({},e,{ref:t,icon:vZ.default}))),xZ=`ascend`,SZ=`descend`,CZ=e=>e.sorter&&typeof e.sorter==`object`&&ef(e.sorter.multiple)?e.sorter.multiple:!1,wZ=e=>typeof e==`function`?e:nf(e)&&e.compare?e.compare:!1,TZ=(e,t)=>t?e[e.indexOf(t)+1]:e[0],EZ=(e,t,n)=>{let r=[],i=(e,t)=>{r.push({column:e,key:zY(e,t),multiplePriority:CZ(e),sortOrder:e.sortOrder})};return(e||[]).forEach((e,a)=>{let o=BY(a,n);e.children?(`sortOrder`in e&&i(e,o),r=[].concat(pa(r),pa(EZ(e.children,t,o)))):e.sorter&&(`sortOrder`in e?i(e,o):t&&e.defaultSortOrder&&r.push({column:e,key:zY(e,o),multiplePriority:CZ(e),sortOrder:e.defaultSortOrder}))}),r},DZ=(e,t,n,r,i,a,o,s,c)=>(t||[]).map((t,l)=>{let u=BY(l,s),d=t;if(d.sorter){let s=d.sortDirections||i,l=d.showSorterTooltip===void 0?o:d.showSorterTooltip,f=zY(d,u),p=n.find(({key:e})=>e===f),m=p?p.sortOrder:null,h=TZ(s,m),g;if(t.sortIcon)g=t.sortIcon({sortOrder:m});else{let t=s.includes(xZ)&&S.createElement(bZ,{className:J(`${e}-column-sorter-up`,{active:m===xZ})}),n=s.includes(SZ)&&S.createElement(_Z,{className:J(`${e}-column-sorter-down`,{active:m===SZ})});g=S.createElement(`span`,{className:J(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(t&&n)})},S.createElement(`span`,{className:`${e}-column-sorter-inner`,"aria-hidden":`true`},t,n))}let{cancelSort:_,triggerAsc:v,triggerDesc:y}=a||{},b=_;h===SZ?b=y:h===xZ&&(b=v);let x=nf(l)?{title:b,...l}:{title:b};d={...d,className:J(d.className,{[`${e}-column-sort`]:m}),title:n=>{let r=`${e}-column-sorters`,i=S.createElement(`span`,{className:`${e}-column-title`},VY(t.title,n)),a=S.createElement(`div`,{className:r},i,g);return l?typeof l!=`boolean`&&l?.target===`sorter-icon`?S.createElement(`div`,{className:J(r,`${r}-tooltip-target-sorter`)},i,S.createElement(jw,{...x},g)):S.createElement(jw,{...x},a):a},onHeaderCell:n=>{let i=t.onHeaderCell?.(n)||{},a=i.onClick,o=i.onKeyDown;i.onClick=e=>{r({column:t,key:f,sortOrder:h,multiplePriority:CZ(t)}),a?.(e)},i.onKeyDown=e=>{e.keyCode===Qr.ENTER&&(r({column:t,key:f,sortOrder:h,multiplePriority:CZ(t)}),o?.(e))};let s=HY(t.title,{}),l=s?.toString();return m&&(i[`aria-sort`]=m===`ascend`?`ascending`:`descending`),i[`aria-description`]=c?.sortable,i[`aria-label`]=l||``,i.className=J(i.className,`${e}-column-has-sorters`),i.tabIndex=0,t.ellipsis&&(i.title=(s??``).toString()),i}}}return`children`in d&&(d={...d,children:DZ(e,d.children,n,r,i,a,o,u,c)}),d}),OZ=e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},kZ=e=>{let t=e.filter(({sortOrder:e})=>e).map(OZ);return t.length===0&&e.length?{...OZ(e[e.length-1]),column:void 0,order:void 0,field:void 0,columnKey:void 0}:t.length<=1?t[0]||{}:t},AZ=(e,t,n)=>{let r=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),i=e.slice(),a=r.filter(({column:{sorter:e},sortOrder:t})=>wZ(e)&&t);return a.length?i.sort((e,t)=>{for(let n=0;n{let r=e[n];return r?{...e,[n]:AZ(r,t,n)}:e}):i},jZ=e=>{let{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:i,showSorterTooltip:a,onSorterChange:o,globalLocale:s}=e,[c,l]=S.useState(()=>EZ(n,!0)),u=(e,t)=>{let n=[];return e.forEach((e,r)=>{let i=BY(r,t);if(n.push(zY(e,i)),Array.isArray(e.children)){let t=u(e.children,i);n.push.apply(n,pa(t))}}),n},d=S.useMemo(()=>{let e=!0,t=EZ(n,!1);if(!t.length){let e=u(n);return c.filter(({key:t})=>e.includes(t))}let r=[];function i(t){e?r.push(t):r.push({...t,sortOrder:null})}let a=null;return t.forEach(t=>{a===null?(i(t),t.sortOrder&&(t.multiplePriority===!1?e=!1:a=!0)):(a&&t.multiplePriority!==!1||(e=!1),i(t))}),r},[n,c]),f=S.useMemo(()=>{let e=d.map(({column:e,sortOrder:t})=>({column:e,order:t}));return{sortColumns:e,sortColumn:e[0]?.column,sortOrder:e[0]?.order}},[d]),p=e=>{let t;t=e.multiplePriority===!1||!d.length||d[0].multiplePriority===!1?[e]:[].concat(pa(d.filter(({key:t})=>t!==e.key)),[e]),l(t),o(kZ(t),t)};return[e=>DZ(t,e,d,p,r,i,a,void 0,s),d,f,()=>kZ(d)]},MZ=(e,t)=>e.map(e=>{let n={...e};return n.title=VY(e.title,t),`children`in n&&(n.children=MZ(n.children,t)),n}),NZ=e=>[S.useCallback(t=>MZ(t,e),[e])],PZ=XJ((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),FZ=lY((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),IZ=e=>{let{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:i,tableHeaderBg:a,tablePaddingVertical:o,tablePaddingHorizontal:s,calc:c}=e,l=`${Y(n)} ${r} ${i}`,u=(e,r,i)=>({[`&${t}-${e}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > th, > table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`${Y(c(r).mul(-1).equal())} + }`)}});function RG(){return RG=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,prefixCls:n,classNames:r={},styles:i={},steps:a,strokeWidth:o,railWidth:s,gapDegree:c=0,gapPosition:l,railColor:u,strokeLinecap:d,style:f,className:p,strokeColor:m,percent:h,loading:g,..._}={...jG,...e},v=Xn(t),y=`${v}-gradient`,b=50-o/2,x=Math.PI*2*b,C=c>0?90+c/2:-90,w=x*((360-c)/360),{count:T,gap:E}=typeof a==`object`?a:{count:a,gap:2},D=zG(h),O=zG(m),k=O.find(e=>e&&typeof e==`object`),A=k&&typeof k==`object`?`butt`:d,{indeterminateStyleProps:j,indeterminateStyleAnimation:M}=LG({id:v,loading:g}),N=IG(x,w,0,100,C,c,l,u,A,o),P=MG(),F=()=>{let e=0;return D.map((t,a)=>{let s=O[a]||O[O.length-1],u=IG(x,w,e,t,C,c,l,s,A,o);return e+=t,S.createElement(FG,{key:a,color:s,ptg:t,radius:b,prefixCls:n,gradientId:y,className:r.track,style:{...u,...j,...i.track},strokeLinecap:A,strokeWidth:o,gapDegree:c,ref:e=>{P[a]=e},size:100})}).reverse()},I=()=>{let e=Math.round(T*(D[0]/100)),t=100/T,a=0;return Array(T).fill(null).map((s,d)=>{let f=d<=e-1?O[0]:u,p=f&&typeof f==`object`?`url(#${y})`:void 0,m=IG(x,w,a,t,C,c,l,f,`butt`,o,E);return a+=(w-m.strokeDashoffset+E)*100/w,S.createElement(`circle`,{key:d,className:J(`${n}-circle-path`,r.track),r:b,cx:50,cy:50,stroke:p,strokeWidth:o,opacity:1,style:{...m,...i.track},ref:e=>{P[d]=e}})})};return S.createElement(`svg`,RG({className:J(`${n}-circle`,r.root,p),viewBox:`0 0 100 100`,style:{...i.root,...f},id:t,role:`presentation`},_),!T&&S.createElement(`circle`,{className:J(`${n}-circle-rail`,r.rail),r:b,cx:50,cy:50,stroke:u,strokeLinecap:A,strokeWidth:s||o,style:{...N,...i.rail}}),T?I():F(),M)};function VG(e){return!e||e<0?0:e>100?100:e}function HG({success:e}){let t;return e&&`percent`in e&&(t=e.percent),t}var UG=({percent:e,success:t})=>{let n=VG(HG({success:t}));return[n,VG(VG(e)-n)]},WG=({success:e={},strokeColor:t})=>{let{strokeColor:n}=e;return[n||Kc.green,t||null]},GG=(e,t,n)=>{let r=-1,i=-1;if(t===`step`){let t=n.steps,a=n.strokeWidth;typeof e==`string`||e===void 0?(r=e===`small`?2:14,i=a??8):ef(e)?[r,i]=[e,e]:[r=14,i=8]=Array.isArray(e)?e:[e.width,e.height],r*=t}else if(t===`line`){let t=n?.strokeWidth;typeof e==`string`||e===void 0?i=t||(e===`small`?6:8):ef(e)?[r,i]=[e,e]:[r=-1,i=8]=Array.isArray(e)?e:[e.width,e.height]}else (t===`circle`||t===`dashboard`)&&(typeof e==`string`||e===void 0?[r,i]=e===`small`?[60,60]:[120,120]:ef(e)?[r,i]=[e,e]:Array.isArray(e)&&(r=e[0]??e[1]??120,i=e[0]??e[1]??120));return[r,i]},KG=3,qG=e=>KG/e*100,JG=[`root`,`body`,`indicator`],YG=e=>{let{prefixCls:t,classNames:n,styles:r,railColor:i,trailColor:a,strokeLinecap:o=`round`,gapPosition:s,gapPlacement:c,gapDegree:l,width:u=120,type:d,children:f,success:p,size:m=u,steps:h}=e,{direction:g}=ya(`progress`),_=i??a,[v,y]=GG(m,`circle`),{strokeWidth:b}=e;b===void 0&&(b=Math.max(qG(v),6));let x={width:v,height:y,fontSize:v*.15+6},C=S.useMemo(()=>{if(l||l===0)return l;if(d===`dashboard`)return 75},[l,d]),w=UG(e),T=S.useMemo(()=>{let e=(c??s)||d===`dashboard`&&`bottom`||void 0,t=g===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[g,c,s,d]),E=Object.prototype.toString.call(e.strokeColor)===`[object Object]`,D=WG({success:p,strokeColor:e.strokeColor}),O=J(`${t}-body`,{[`${t}-circle-gradient`]:E},n.body),k=S.createElement(BG,{steps:h,percent:h?w[1]:w,strokeWidth:b,railWidth:b,strokeColor:h?D[1]:D,strokeLinecap:o,railColor:_,prefixCls:t,gapDegree:C,gapPosition:T,classNames:gi(n,JG),styles:gi(r,JG)}),A=v<=20,j=S.createElement(`div`,{className:O,style:{...x,...r.body}},k,!A&&f);return A?S.createElement(kw,{title:f},j):j},XG=`--progress-line-stroke-color`,ZG=e=>{let t=e?`100%`:`-100%`;return new Ms(`antProgress${e?`RTL`:`LTR`}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:`translateX(0) scaleX(1)`,opacity:0}})},QG=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{...Ul(e),display:`inline-flex`,"&-rtl":{direction:`rtl`},[`${t}-indicator`]:{color:e.colorText,lineHeight:1,whiteSpace:`nowrap`,verticalAlign:`middle`,wordBreak:`normal`,[n]:{fontSize:e.fontSize}},[`&${t}-status-exception`]:{[`${t}-indicator`]:{color:e.colorError}},[`&${t}-status-success`]:{[`${t}-indicator`]:{color:e.colorSuccess}}}}},$G=e=>{let{componentCls:t}=e;return{[`${t}-line`]:{position:`relative`,width:`100%`,fontSize:e.fontSize,[`${t}-body`]:{display:`inline-flex`,alignItems:`center`,width:`100%`,gap:e.marginXS},[`${t}-rail`]:{flex:`auto`,background:e.remainingColor,borderRadius:e.lineBorderRadius,position:`relative`,width:`100%`,overflow:`hidden`},[`&${t}-status-active`]:{[`${t}-track:after`]:{content:`""`,position:`absolute`,inset:0,backgroundColor:e.colorBgContainer,borderRadius:`inherit`,opacity:0,animationName:ZG(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:`infinite`}},[`${t}-track`]:{position:`absolute`,insetInlineStart:0,insetBlock:0,borderRadius:`inherit`,background:e.defaultColor,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,minWidth:`max-content`,display:`flex`,alignItems:`center`,"&-success":{background:e.colorSuccess}},[`&${t}-status-exception`]:{[`${t}-track`]:{background:e.colorError}},[`&${t}-status-success`]:{[`${t}-track`]:{background:e.colorSuccess}},[`${t}-indicator-outer`]:{[`&${t}-indicator-start`]:{order:-1}},[`${t}-body-layout-bottom`]:{flexDirection:`column`,alignItems:`center`,gap:e.marginXXS},[`${t}-indicator${t}-indicator-inner`]:{color:e.colorWhite,paddingInline:e.paddingXXS,width:`100%`,display:`flex`,justifyContent:`center`,[`&${t}-indicator-end`]:{justifyContent:`end`},[`&${t}-indicator-start`]:{justifyContent:`start`},[`&${t}-indicator-bright`]:{color:`rgba(0, 0, 0, 0.45)`}}}}},eK=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-circle`]:{[`${t}-circle-rail`]:{stroke:e.remainingColor},[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-body`]:{position:`relative`,lineHeight:1,backgroundColor:`transparent`},[`${t}-indicator`]:{position:`absolute`,insetBlockStart:`50%`,insetInlineStart:0,width:`100%`,margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:`normal`,textAlign:`center`,transform:`translateY(-50%)`,[n]:{fontSize:e.circleIconFontSize}},[`&${t}-status-exception`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}}},[`&${t}-status-success`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:`bottom`}}}},tK=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:`inline-block`,"&-body":{display:`flex`,flexDirection:`row`,alignItems:`center`,gap:e.progressStepMarginInlineEnd,[`${t}-indicator`]:{marginInlineStart:e.marginXS}},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},nK=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-indicator ${n}`]:{fontSize:e.fontSizeSM}}}},rK=Ql(`Progress`,e=>{let t=e.calc(e.marginXXS).div(2).equal(),n=dc(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:`2.4s`});return[QG(n),$G(n),eK(n),tK(n),nK(n)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:`1em`,circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`})),iK=e=>{let t=[];return Object.keys(e).forEach(n=>{let r=Number.parseFloat(n.replace(/%/g,``));Number.isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((e,t)=>e.key-t.key),t.map(({key:e,value:t})=>`${t} ${e}%`).join(`, `)},aK=(e,t)=>{let{from:n=Kc.blue,to:r=Kc.blue,direction:i=t===`rtl`?`to left`:`to right`,...a}=e;if(Object.keys(a).length!==0){let e=`linear-gradient(${i}, ${iK(a)})`;return{background:e,[XG]:e}}let o=`linear-gradient(${i}, ${n}, ${r})`;return{background:o,[XG]:o}},oK=e=>{let{prefixCls:t,classNames:n,styles:r,direction:i,percent:a,size:o,strokeWidth:s,strokeColor:c,strokeLinecap:l=`round`,children:u,railColor:d,trailColor:f,percentPosition:p,success:m}=e,{align:h,type:g}=p,_=d??f,v=l===`square`||l===`butt`?0:void 0,[y,b]=GG(o??[-1,s||(o===`small`?6:8)],`line`,{strokeWidth:s}),x={backgroundColor:_||void 0,borderRadius:v,height:b},C=`${t}-track`,w=c&&typeof c!=`string`?aK(c,i):{[XG]:c,background:c},T={width:`${VG(a)}%`,height:b,borderRadius:v,...w},E=HG(e),D={width:`${VG(E)}%`,height:b,borderRadius:v,backgroundColor:m?.strokeColor};return S.createElement(`div`,{className:J(`${t}-body`,n.body,{[`${t}-body-layout-bottom`]:h===`center`&&g===`outer`}),style:{width:y>0?y:`100%`,...r.body}},S.createElement(`div`,{className:J(`${t}-rail`,n.rail),style:{...x,...r.rail}},S.createElement(`div`,{className:J(C,n.track),style:{...T,...r.track}},g===`inner`&&u),E!==void 0&&S.createElement(`div`,{className:J(C,`${C}-success`,n.track),style:{...D,...r.track}})),g===`outer`&&u)},sK=e=>{let{classNames:t,styles:n,size:r,steps:i,rounding:a=Math.round,percent:o=0,strokeWidth:s=8,strokeColor:c,railColor:l,trailColor:u,prefixCls:d,children:f}=e,p=a(o/100*i),[m,h]=GG(r??[r===`small`?2:14,s],`step`,{steps:i,strokeWidth:s}),g=m/i,_=Array.from({length:i}),v=l??u;for(let e=0;e{let{prefixCls:n,className:r,rootClassName:i,classNames:a,styles:o,steps:s,strokeColor:c,percent:l=0,size:u=`medium`,showInfo:d=!0,type:f=`line`,status:p,format:m,style:h,percentPosition:g={},..._}=e,{align:v=`end`,type:y=`outer`}=g,b=Array.isArray(c)?c[0]:c,x=typeof c==`string`||Array.isArray(c)?c:void 0,C=S.useMemo(()=>b?new Nc(typeof b==`string`?b:Object.values(b)[0]).isLight():!1,[c]),w=S.useMemo(()=>{let t=HG(e);return Number.parseInt(t===void 0?(l??0)?.toString():(t??0)?.toString(),10)},[l,e.success]),T=S.useMemo(()=>!cK.includes(p)&&w>=100?`success`:p||`normal`,[p,w]),{getPrefixCls:E,direction:D,className:O,style:k,classNames:A,styles:j}=ya(`progress`),M=E(`progress`,n),[N,P]=rK(M),F={...e,percent:l,type:f,size:u,showInfo:d,percentPosition:g},[I,L]=Cf([A,a],[j,o],{props:F}),R=f===`line`,z=R&&!s,B=S.useMemo(()=>{if(!d)return null;let t=HG(e),n,r=m||(e=>`${e}%`),i=R&&C&&y===`inner`;return y===`inner`||m||T!==`exception`&&T!==`success`?n=r(VG(l),VG(t)):T===`exception`?n=R?S.createElement(Ou,null):S.createElement(ju,null):T===`success`&&(n=R?S.createElement(Tu,null):S.createElement(OC,null)),S.createElement(`span`,{className:J(`${M}-indicator`,{[`${M}-indicator-bright`]:i,[`${M}-indicator-${v}`]:z,[`${M}-indicator-${y}`]:z},I.indicator),style:L.indicator,title:typeof n==`string`?n:void 0},n)},[d,l,w,T,f,M,m,R,C,y,v,z,I.indicator,L.indicator]),V={...e,classNames:I,styles:L},H;f===`line`?H=s?S.createElement(sK,{...V,strokeColor:x,prefixCls:M,steps:nf(s)?s.count:s},B):S.createElement(oK,{...V,strokeColor:b,prefixCls:M,direction:D,percentPosition:{align:v,type:y}},B):(f===`circle`||f===`dashboard`)&&(H=S.createElement(YG,{...V,strokeColor:b,prefixCls:M,progressStatus:T},B));let U=J(M,`${M}-status-${T}`,{[`${M}-${f===`dashboard`&&`circle`||f}`]:f!==`line`,[`${M}-inline-circle`]:f===`circle`&&GG(u,`circle`)[0]<=20,[`${M}-line`]:z,[`${M}-line-align-${v}`]:z,[`${M}-line-position-${y}`]:z,[`${M}-steps`]:s,[`${M}-show-info`]:d,[`${M}-small`]:u===`small`,[`${M}-rtl`]:D===`rtl`},O,r,i,I.root,N,P);return S.createElement(`div`,{ref:t,style:{...k,...L.root,...h},className:U,role:`progressbar`,"aria-valuenow":w,"aria-valuemin":0,"aria-valuemax":100,...gi(_,[`railColor`,`trailColor`,`strokeWidth`,`width`,`gapDegree`,`gapPosition`,`gapPlacement`,`strokeLinecap`,`success`])},H)});function uK(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=da(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}var dK,fK;function pK(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(var r=t-1;r>=0;r--)n.push(e>>>r&1)}function mK(e,t){return(e>>>t&1)!=0}function hK(e){if(!e)throw Error(`Assertion error`)}var gK=function(){function e(t,n){Ws(this,e),Vs(this,`modeBits`,void 0),Vs(this,`numBitsCharCount`,void 0),this.modeBits=t,this.numBitsCharCount=n}return Ks(e,[{key:`numCharCountBits`,value:function(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}}]),e}();dK=gK,Vs(gK,`NUMERIC`,new dK(1,[10,12,14])),Vs(gK,`ALPHANUMERIC`,new dK(2,[9,11,13])),Vs(gK,`BYTE`,new dK(4,[8,16,16])),Vs(gK,`KANJI`,new dK(8,[8,10,12])),Vs(gK,`ECI`,new dK(7,[0,0,0]));var _K=Ks(function e(t,n){Ws(this,e),Vs(this,`ordinal`,void 0),Vs(this,`formatBits`,void 0),this.ordinal=t,this.formatBits=n});fK=_K,Vs(_K,`LOW`,new fK(0,1)),Vs(_K,`MEDIUM`,new fK(1,0)),Vs(_K,`QUARTILE`,new fK(2,3)),Vs(_K,`HIGH`,new fK(3,2));var vK=function(){function e(t,n,r){if(Ws(this,e),Vs(this,`mode`,void 0),Vs(this,`numChars`,void 0),Vs(this,`bitData`,void 0),this.mode=t,this.numChars=n,this.bitData=r,n<0)throw RangeError(`Invalid argument`);this.bitData=r.slice()}return Ks(e,[{key:`getData`,value:function(){return this.bitData.slice()}}],[{key:`makeBytes`,value:function(t){var n=[],r=uK(t),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;pK(a,8,n)}}catch(e){r.e(e)}finally{r.f()}return new e(gK.BYTE,t.length,n)}},{key:`makeNumeric`,value:function(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);for(var n=[],r=0;r=1<e.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=t*4+17;for(var o=[],s=0;s>>9)*1335;var i=(t<<10|n)^21522;hK(i>>>15==0);for(var a=0;a<=5;a++)this.setFunctionModule(8,a,mK(i,a));this.setFunctionModule(8,7,mK(i,6)),this.setFunctionModule(8,8,mK(i,7)),this.setFunctionModule(7,8,mK(i,8));for(var o=9;o<15;o++)this.setFunctionModule(14-o,8,mK(i,o));for(var s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,mK(i,s));for(var c=8;c<15;c++)this.setFunctionModule(8,this.size-15+c,mK(i,c));this.setFunctionModule(8,this.size-8,!0)}},{key:`drawVersion`,value:function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var n=this.version<<12|e;hK(n>>>18==0);for(var r=0;r<18;r++){var i=mK(n,r),a=this.size-11+r%3,o=Math.floor(r/3);this.setFunctionModule(a,o,i),this.setFunctionModule(o,a,i)}}}},{key:`drawFinderPattern`,value:function(e,t){for(var n=-4;n<=4;n++)for(var r=-4;r<=4;r++){var i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a=s)&&h.push(t[e])})},_=0;_=1;r-=2){r==6&&(r=5);for(var i=0;i>>3],7-(n&7)),n++)}}hK(n==t.length*8)}},{key:`applyMask`,value:function(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(var t=0;t5&&t++):(this.finderPenaltyAddHistory(i,a),r||(t+=this.finderPenaltyCountPatterns(a)*e.PENALTY_N3),r=this.modules[n][o],i=1);t+=this.finderPenaltyTerminateAndCount(r,i,a)*e.PENALTY_N3}for(var s=0;s5&&t++):(this.finderPenaltyAddHistory(l,u),c||(t+=this.finderPenaltyCountPatterns(u)*e.PENALTY_N3),c=this.modules[d][s],l=1);t+=this.finderPenaltyTerminateAndCount(c,l,u)*e.PENALTY_N3}for(var f=0;f0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}},{key:`finderPenaltyTerminateAndCount`,value:function(e,t,n){var r=t;return e&&(this.finderPenaltyAddHistory(r,n),r=0),r+=this.size,this.finderPenaltyAddHistory(r,n),this.finderPenaltyCountPatterns(n)}},{key:`finderPenaltyAddHistory`,value:function(e,t){var n=e;t[0]==0&&(n+=this.size),t.pop(),t.unshift(n)}}],[{key:`encodeText`,value:function(t,n){var r=vK.makeSegments(t);return e.encodeSegments(r,n)}},{key:`encodeBinary`,value:function(t,n){var r=vK.makeBytes(t);return e.encodeSegments([r],n)}},{key:`encodeSegments`,value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(e.MIN_VERSION<=r&&r<=i&&i<=e.MAX_VERSION)||a<-1||a>7)throw RangeError(`Invalid value`);var s,c;for(s=r;;s++){var l=e.getNumDataCodewords(s,n)*8,u=vK.getTotalBits(t,s);if(u<=l){c=u;break}if(s>=i)throw RangeError(`Data too long`)}for(var d=n,f=0,p=[_K.MEDIUM,_K.QUARTILE,_K.HIGH];f>>3]|=e<<7-(t&7)}),new e(s,d,w,a)}},{key:`getNumRawDataModules`,value:function(t){if(te.MAX_VERSION)throw RangeError(`Version number out of range`);var n=(16*t+128)*t+64;if(t>=2){var r=Math.floor(t/7)+2;n-=(25*r-10)*r-55,t>=7&&(n-=36)}return hK(208<=n&&n<=29648),n}},{key:`getNumDataCodewords`,value:function(t,n){return Math.floor(e.getNumRawDataModules(t)/8)-e.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*e.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}},{key:`reedSolomonComputeDivisor`,value:function(t){if(t<1||t>255)throw RangeError(`Degree out of range`);for(var n=[],r=0;r>>8||t>>>8)throw RangeError(`Byte out of range`);for(var n=0,r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return hK(n>>>8==0),n}}]),e}();Vs(yK,`MIN_VERSION`,1),Vs(yK,`MAX_VERSION`,40),Vs(yK,`PENALTY_N1`,3),Vs(yK,`PENALTY_N2`,3),Vs(yK,`PENALTY_N3`,40),Vs(yK,`PENALTY_N4`,10),Vs(yK,`ECC_CODEWORDS_PER_BLOCK`,[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]]),Vs(yK,`NUM_ERROR_CORRECTION_BLOCKS`,[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]);var bK={L:_K.LOW,M:_K.MEDIUM,Q:_K.QUARTILE,H:_K.HIGH},xK=`#FFFFFF`,SK=`#000000`,CK=.1,wK=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[];return e.forEach(function(e,r){var i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)},TK=function(e,t){return e.slice().map(function(e,n){return n=t.y+t.h?e:e.map(function(e,n){return n=t.x+t.w?e:!1})})},EK=function(e,t,n,r){if(r==null)return null;var i=e.length+n*2,a=Math.floor(t*CK),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){var p=Math.floor(l),m=Math.floor(u);f={x:p,y:m,w:Math.ceil(s+l-p),h:Math.ceil(c+u-m)}}var h=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:h}},DK=function(e,t){return t==null?e?4:0:Math.max(Math.floor(t),0)},OK=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),kK=function(e){var t=e.value,n=e.level,r=e.minVersion,i=e.includeMargin,a=e.marginSize,o=e.imageSettings,s=e.size,c=e.boostLevel,l=S.useMemo(function(){var e=(Array.isArray(t)?t:[t]).reduce(function(e,t){return e.push.apply(e,pa(vK.makeSegments(t))),e},[]);return yK.encodeSegments(e,bK[n],r,void 0,void 0,c)},[t,n,r,c]);return S.useMemo(function(){var e=l.getModules(),t=DK(i,a);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:EK(e,s,t,o),qrcode:l}},[l,s,o,i,a])},AK=[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`marginSize`,`style`,`imageSettings`,`boostLevel`],jK=S.forwardRef(function(e,t){var n=e.value,r=e.size,i=r===void 0?128:r,a=e.level,o=a===void 0?`L`:a,s=e.bgColor,c=s===void 0?xK:s,l=e.fgColor,u=l===void 0?SK:l,d=e.includeMargin,f=d===void 0?!1:d,p=e.minVersion,m=p===void 0?1:p,h=e.marginSize,g=e.style,_=e.imageSettings,v=e.boostLevel,y=vL(e,AK),b=_?.src,x=S.useRef(null),C=S.useRef(null),w=S.useCallback(function(e){x.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),T=Rs(S.useState(!1),2)[1],E=kK({value:n,level:o,minVersion:m,includeMargin:f,marginSize:h,imageSettings:_,size:i,boostLevel:v}),D=E.margin,O=E.cells,k=E.numCells,A=E.calculatedImageSettings;S.useEffect(function(){if(x.current){var e=x.current,t=e.getContext(`2d`);if(!t)return;var n=O,r=C.current,a=A!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&A.excavation!=null&&(n=TK(O,A.excavation));var o=window.devicePixelRatio||1;e.height=e.width=i*o;var s=i/k*o;t.scale(s,s),t.fillStyle=c,t.fillRect(0,0,k,k),t.fillStyle=u,OK?t.fill(new Path2D(wK(n,D))):O.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+D,n+D,1,1)})}),A&&(t.globalAlpha=A.opacity),a&&t.drawImage(r,A.x+D,A.y+D,A.w,A.h)}}),S.useEffect(function(){T(!1)},[b]);var j=Us({height:i,width:i},g),M=null;return b!=null&&(M=S.createElement(`img`,{alt:`QR-Code`,src:b,key:b,style:{display:`none`},onLoad:function(){T(!0)},ref:C,crossOrigin:A?.crossOrigin})),S.createElement(S.Fragment,null,S.createElement(`canvas`,Vg({style:j,height:i,width:i,ref:w,role:`img`},y)),M)}),MK=[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`title`,`marginSize`,`imageSettings`,`boostLevel`],NK=S.forwardRef(function(e,t){var n=e.value,r=e.size,i=r===void 0?128:r,a=e.level,o=a===void 0?`L`:a,s=e.bgColor,c=s===void 0?xK:s,l=e.fgColor,u=l===void 0?SK:l,d=e.includeMargin,f=d===void 0?!1:d,p=e.minVersion,m=p===void 0?1:p,h=e.title,g=e.marginSize,_=e.imageSettings,v=e.boostLevel,y=vL(e,MK),b=kK({value:n,level:o,minVersion:m,includeMargin:f,marginSize:g,imageSettings:_,size:i,boostLevel:v}),x=b.margin,C=b.cells,w=b.numCells,T=b.calculatedImageSettings,E=C,D=null;_!=null&&T!=null&&(T.excavation!=null&&(E=TK(C,T.excavation)),D=S.createElement(`image`,{href:_.src,height:T.h,width:T.w,x:T.x+x,y:T.y+x,preserveAspectRatio:`none`,opacity:T.opacity,crossOrigin:T.crossOrigin}));var O=wK(E,x);return S.createElement(`svg`,Vg({height:i,width:i,viewBox:`0 0 ${w} ${w}`,ref:t,role:`img`},y),!!h&&S.createElement(`title`,null,h),S.createElement(`path`,{fill:c,d:`M0,0 h${w}v${w}H0z`,shapeRendering:`crispEdges`}),S.createElement(`path`,{fill:u,d:O,shapeRendering:`crispEdges`}),D)}),PK=c(o((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:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z`}}]},name:`reload`,theme:`outlined`}}))());function FK(){return FK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,FK({},e,{ref:t,icon:PK.default}))),LK=S.createElement(tG,null);function RK({prefixCls:e,locale:t,onRefresh:n,statusRender:r,status:i}){let a={expired:S.createElement(S.Fragment,null,S.createElement(`p`,{className:`${e}-expired`},t?.expired),n&&S.createElement(h_,{type:`link`,icon:S.createElement(IK,null),onClick:n},t?.refresh)),loading:LK,scanned:S.createElement(`p`,{className:`${e}-scanned`},t?.scanned)};return(r??(e=>a[e.status]))({status:i,locale:t,onRefresh:n})}var zK=e=>{let{componentCls:t,lineWidth:n,lineType:r,colorSplit:i}=e;return{[t]:{...Ul(e),display:`flex`,justifyContent:`center`,alignItems:`center`,padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${Y(n)} ${r} ${i}`,position:`relative`,overflow:`hidden`,[`& > ${t}-cover`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:10,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,width:`100%`,height:`100%`,color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeCoverBackgroundColor,textAlign:`center`,[`& > ${t}-expired, & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"> canvas":{alignSelf:`stretch`,flex:`auto`,minWidth:0},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}},[`${t}-borderless`]:{borderColor:`transparent`,padding:0,borderRadius:0}}},BK=Ql(`QRCode`,e=>zK(dc(e,{QRCodeTextColor:e.colorText})),e=>({QRCodeCoverBackgroundColor:new Nc(e.colorBgContainer).setA(.96).toRgbString()})),VK=e=>{let[,t]=Vl(),{value:n,type:r=`canvas`,icon:i=``,size:a=160,iconSize:o,color:s=t.colorText,errorLevel:c=`M`,status:l=`active`,bordered:u=!0,onRefresh:d,style:f,className:p,rootClassName:m,prefixCls:h,bgColor:g=`transparent`,marginSize:_,statusRender:v,classNames:y,styles:b,boostLevel:x,...C}=e,{getPrefixCls:w,className:T,style:E,classNames:D,styles:O}=ya(`qrcode`),k={...e,bgColor:g,type:r,size:a,status:l,bordered:u,errorLevel:c},[A,j]=Cf([D,y],[O,b],{props:k}),M=w(`qrcode`,h),[N,P]=BK(M),F={src:i,x:void 0,y:void 0,height:ef(o)?o:o?.height??40,width:ef(o)?o:o?.width??40,excavate:!0,crossOrigin:`anonymous`},I=xi(C,!0),L=gi(C,Object.keys(I)),R={value:n,size:a,level:c,bgColor:g,fgColor:s,style:{width:f?.width,height:f?.height},imageSettings:i?F:void 0,marginSize:_,boostLevel:x,...I},[z]=Yd(`QRCode`);if(!n)return null;let B=J(M,p,m,N,P,T,A.root,{[`${M}-borderless`]:!u}),V={backgroundColor:g,...j.root,...E,...f,width:f?.width??a,height:f?.height??a};return S.createElement(`div`,{...L,className:B,style:V},l!==`active`&&S.createElement(`div`,{className:J(`${M}-cover`,A.cover),style:j.cover},S.createElement(RK,{prefixCls:M,locale:z,status:l,onRefresh:d,statusRender:v})),r===`canvas`?S.createElement(jK,{...R}):S.createElement(NK,{...R}))},HK=c(o((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:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z`}}]},name:`star`,theme:`filled`}}))());function UK(){return UK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,UK({},e,{ref:t,icon:HK.default}))),GK=c(o((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:`M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`warning`,theme:`filled`}}))());function KK(){return KK=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,KK({},e,{ref:t,icon:GK.default}))),JK=()=>S.createElement(`svg`,{width:`252`,height:`294`},S.createElement(`title`,null,`No Found`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`circle`,{cx:`126.75`,cy:`128.1`,r:`126`,fill:`#E4EBF7`}),S.createElement(`circle`,{cx:`31.55`,cy:`130.8`,r:`8.3`,fill:`#FFF`}),S.createElement(`path`,{stroke:`#FFF`,d:`m37 134.3 10.5 6m.9 6.2-12.7 10.8`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M39.9 159.4a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m17.7-16.2a5.7 5.7 0 1 1-11.4-1.1 5.7 5.7 0 0 1 11.4 1.1M99 27h29.8a4.6 4.6 0 1 0 0-9.2H99a4.6 4.6 0 1 0 0 9.2m11.4 18.3h29.8a4.6 4.6 0 0 0 0-9.2h-29.8a4.6 4.6 0 1 0 0 9.2`}),S.createElement(`path`,{fill:`#FFF`,d:`M112.8 26.9h15.8a4.6 4.6 0 1 0 0 9.1h-15.8a4.6 4.6 0 0 0 0-9.1m71.7 108.8a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),S.createElement(`path`,{stroke:`#FFF`,d:`m179.3 141.8 12.6 7.1m1.1 7.6-15.2 13`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M184.7 170a6.8 6.8 0 1 1-13.6-1.3 6.8 6.8 0 0 1 13.6 1.4m18.6-16.8a6.9 6.9 0 1 1-13.7-1.4 6.9 6.9 0 0 1 13.7 1.4`}),S.createElement(`path`,{stroke:`#FFF`,d:`M152 192.3a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm73.3-76.2a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm-9 35a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.5 0zM177 107.6a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.4-15.4a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm6.8 88.5a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0z`,strokeWidth:`2`}),S.createElement(`path`,{stroke:`#FFF`,d:`m214.4 153.3-2 20.2-10.8 6m-28-4.7-6.3 9.8H156l-4.5 6.5m23.5-66v-15.7m46 7.8-13 8-15.2-8V94.4`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M166.6 66h-4a4.8 4.8 0 0 1-4.7-4.8 4.8 4.8 0 0 1 4.7-4.7h4a4.8 4.8 0 0 1 4.7 4.7 4.8 4.8 0 0 1-4.7 4.7`}),S.createElement(`circle`,{cx:`204.3`,cy:`30`,r:`29.5`,fill:`#1677ff`}),S.createElement(`path`,{fill:`#FFF`,d:`M206 38.4c.5.5.7 1.1.7 2s-.2 1.4-.7 1.9a3 3 0 0 1-2 .7c-.8 0-1.5-.3-2-.8s-.8-1.1-.8-1.9.3-1.4.8-2c.5-.4 1.2-.7 2-.7.7 0 1.4.3 2 .8m4.2-19.5c1.5 1.3 2.2 3 2.2 5.2a7.2 7.2 0 0 1-1.5 4.5l-3 2.7a5 5 0 0 0-1.3 1.7 5.2 5.2 0 0 0-.6 2.4v.5h-4v-.5c0-1.4.1-2.5.6-3.5s1.9-2.5 4.2-4.5l.4-.5a4 4 0 0 0 1-2.6c0-1.2-.4-2-1-2.8-.7-.6-1.6-1-2.9-1-1.5 0-2.6.5-3.3 1.5-.4.5-.6 1-.8 1.9a2 2 0 0 1-2 1.6 2 2 0 0 1-2-2.4c.4-1.6 1-2.8 2.1-3.8a8.5 8.5 0 0 1 6.3-2.3c2.3 0 4.2.6 5.6 2`}),S.createElement(`path`,{fill:`#FFB594`,d:`M52 76.1s21.8 5.4 27.3 16c5.6 10.7-6.3 9.2-15.7 5C52.8 92 39 85 52 76`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m90.5 67.5-.5 2.9c-.7.5-4.7-2.7-4.7-2.7l-1.7.8-1.3-5.7s6.8-4.6 9-5c2.4-.5 9.8 1 10.6 2.3 0 0 1.3.4-2.2.6-3.6.3-5 .5-6.8 3.2l-2.4 3.6`}),S.createElement(`path`,{fill:`#FFF`,d:`M128 111.4a36.7 36.7 0 0 0-8.9-15.5c-3.5-3-9.3-2.2-11.3-4.2-1.3-1.2-3.2-1.2-3.2-1.2L87.7 87c-2.3-.4-2.1-.7-6-1.4-1.6-1.9-3-1.1-3-1.1l-7-1.4c-1-1.5-2.5-1-2.5-1l-2.4-.9C65 91.2 59 95 59 95c1.8 1.1 15.7 8.3 15.7 8.3l5.1 37.1s-3.3 5.7 1.4 9.1c0 0 19.9-3.7 34.9-.3 0 0 3-2.6 1-8.8.5-3 1.4-8.3 1.7-11.6.4.7 2 1.9 3.1 3.4 0 0 9.4-7.3 11-14a17 17 0 0 1-2.2-2.4c-.5-.8-.3-2-.7-2.8-.7-1-1.8-1.3-2-1.6`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M101 290s4.4 2 7.4 1c2.9-1 4.6.7 7.1 1.2 2.6.5 6.9 1.1 11.7-1.3 0-5.5-6.9-4-12-6.7-2.5-1.4-3.7-4.7-3.5-8.8h-9.5s-1.2 10.6-1 14.6`}),S.createElement(`path`,{fill:`#2B0849`,d:`M101 289.8s2.5 1.3 6.8.7c3-.5 3.7.5 7.4 1 3.8.6 10.8 0 11.9-.9.4 1.1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.6-.5-1.8-1.4-5.2-1.9-5.7-.2-4 1-7.4-.3-7.4-.3l-.1-2.7z`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M108.3 276h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M57.5 272.4s-2 7.4-4.4 12.3c-1.8 3.7-4.3 7.5 5.4 7.5 6.7 0 9-.5 7.4-6.6-1.5-6.1.3-13.2.3-13.2h-8.7z`}),S.createElement(`path`,{fill:`#2B0849`,d:`M51.5 289.8s2 1.2 6.6 1.2c6 0 8.3-1.7 8.3-1.7s.6 1.1-.7 2.2c-1 .8-3.6 1.6-7.4 1.5-4.1 0-5.8-.5-6.7-1.1-.8-.6-.7-1.6-.1-2.1`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M58.4 274.3s0 1.5-.3 3c-.3 1.4-1 3-1.1 4 0 1.2 4.5 1.7 5.1.1.6-1.5 1.3-6.4 2-7.2.6-.9-5-2.2-5.7.1`}),S.createElement(`path`,{fill:`#7BB2F9`,d:`m99.7 278.5 13.3.1s1.3-54.5 1.9-64.4c.5-9.9 3.8-43.4 1-63.1l-12.6-.7-22.8.8-1.2 10c0 .5-.7.8-.7 1.4-.1.5.4 1.3.3 2-2.4 14-6.4 33-8.8 46.6 0 .7-1.2 1-1.4 2.7 0 .3.2 1.5 0 1.8-6.8 18.7-10.9 47.8-14.2 61.9h14.6s2.2-8.6 4-17c2.9-12.9 23.2-85 23.2-85l3-.5 1 46.3s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.8-1 11.8c-.4 4.8 0 39.2 0 39.2`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M76 221.6c1.2.1 4.1-2 7-5m23.4 8.5s2.7-1 6-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M107.3 222.1s2.7-1.1 6-3.9`,strokeLinecap:`round`,strokeLinejoin:`round`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M74.7 224.8s2.7-.6 6.5-3.4m4.8-69.8c-.2 3.1.3 8.6-4.3 9.2m22-11s0 14-1.4 15.1a15 15 0 0 1-3 2m.5-16.5s0 13-1.2 24.4m-5 1.1s7.3-1.7 9.5-1.7M74.3 206a212 212 0 0 1-1 4.5s-1.4 1.9-1 3.8c.5 2-1 2-5 15.4A353 353 0 0 0 61 257l-.2 1.2m14.9-60.5a321 321 0 0 1-.9 4.8m7.8-50.4-1.2 10.5s-1.1.1-.5 2.2c.1 1.4-2.7 15.8-5.2 30.5m-19.6 79h13.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#192064`,d:`M116.2 148.2s-17-3-35.9.2c.2 2.5 0 4.2 0 4.2s14.7-2.8 35.7-.3c.3-2.4.2-4 .2-4`}),S.createElement(`path`,{fill:`#FFF`,d:`M106.3 151.2v-5a.8.8 0 0 0-.8-.8h-7.8a.8.8 0 0 0-.8.8v5a.8.8 0 0 0 .8.8h7.8a.8.8 0 0 0 .8-.8`}),S.createElement(`path`,{fill:`#192064`,d:`M105.2 150.2v-3a.6.6 0 0 0-.6-.7 94.3 94.3 0 0 0-5.9 0 .7.7 0 0 0-.6.6v3.1a.6.6 0 0 0 .6.7 121.1 121.1 0 0 1 5.8 0c.4 0 .7-.3.7-.7`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M100.3 275.4h12.3m-11.2-4.9.1 6.5m0-12.5a915.8 915.8 0 0 0 0 4.4m-.5-94 .9 44.7s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.2 0 3.4-.6 1.5-1 21.1-1.1 35.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M46.9 83.4s-.5 6 7.2 5.6c11.2-.7 9.2-9.4 31.5-21.7-.7-2.7-2.4-4.7-2.4-4.7s-11 3-22.6 8c-6.8 3-13.4 6.4-13.7 12.8m57.6 7.7.9-5.4-8.9-11.4-5 5.3-1.8 7.9a.3.3 0 0 0 .1.3c1 .8 6.5 5 14.4 3.5a.3.3 0 0 0 .3-.2`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M94 79.4s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.1-3.7c.6-1 1.6-4.1 1.6-4.1l13.5 3c0 5.3-2.3 19.5-7.8 20-8.9.6-12.5-9.5-12.5-9.5`}),S.createElement(`path`,{fill:`#520038`,d:`M113.9 73.4c2.6-2 3.4-9.7 3.4-9.7s-2.4-.5-6.6-2c-4.7-2.1-12.8-4.8-17.5 1-9.6 3.2-2 19.8-2 19.8l2.7-3s-4-3.3-2-6.3c2-3.5 3.8 1 3.8 1s.7-2.3 3.6-3.3c.4-.7 1-2.6 1.4-3.8a1 1 0 0 1 1.3-.7l11.4 2.6c.5.2.8.7.8 1.2l-.3 3.2z`}),S.createElement(`path`,{fill:`#552950`,d:`M105 76c-.1.7-.6 1.1-1 1-.6 0-.9-.6-.8-1.2.1-.6.6-1 1-1 .6 0 .9.7.8 1.3m7.1 1.6c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.5-1 1-1 .5.1.8.7.7 1.3`}),S.createElement(`path`,{stroke:`#DB836E`,d:`m110.1 74.8-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M110.8 74.5s1.8-.7 2.6.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M92.4 74.3s.5-1.1 1.1-.7c.6.4 1.3 1.4.6 2-.8.5.1 1.6.1 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M103.3 73s1.8 1 4.1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M103.7 81.8s2.2 1.2 4.4 1.2m-3.5 1.3s1 .4 1.6.3m-11.5-3.4s2.3 7.4 10.4 7.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M81.5 89.4s.4 5.6-5 12.8M69 82.7s-.7 9.2-8.2 14.2m68.6 26s-5.3 7.4-9.4 10.7m-.7-26.3s.5 4.4-2.1 32`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M150 151.2h-49.8a1 1 0 0 1-1-1v-31.7c0-.5.4-1 1-1H150c.6 0 1 .5 1 1v31.7a1 1 0 0 1-1 1`}),S.createElement(`path`,{fill:`#F4D19D`,d:`M150.3 151.2h-19.9v-33.7h20.8v32.8a1 1 0 0 1-1 1`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M123.6 127.9H92.9a.5.5 0 0 1-.4-.8l6.4-9.1c.2-.3.5-.5.8-.5h31.1l-7.2 10.4z`}),S.createElement(`path`,{fill:`#CC9B6E`,d:`M123.7 128.4H99.2v-.5h24.2l7.2-10.2.4.3z`}),S.createElement(`path`,{fill:`#F4D19D`,d:`M158.3 127.9h-18.7a2 2 0 0 1-1.6-.8l-7.2-9.6h20c.5 0 1 .3 1.2.6l6.7 9a.5.5 0 0 1-.4.8`}),S.createElement(`path`,{fill:`#CC9B6E`,d:`M157.8 128.5h-19.3l-7.9-10.5.4-.3 7.7 10.3h19.1zm-27.2 22.2v-8.2h.4v8.2zm-.1-10.9v-21.4h.4l.1 21.4zm-18.6 1.1-.5-.1 1.5-5.2.5.2zm-3.5.2-2.6-3 2.6-3.4.4.3-2.4 3.1 2.4 2.6zm8.2 0-.4-.4 2.4-2.6-2.4-3 .4-.4 2.7 3.4z`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m154.3 131.9-3.1-2v3.5l-1 .1a85 85 0 0 1-4.8.3c-1.9 0-2.7 2.2 2.2 2.6l-2.6-.6s-2.2 1.3.5 2.3c0 0-1.6 1.2.6 2.6-.6 3.5 5.2 4 7 3.6a6.1 6.1 0 0 0 4.6-5.2 8 8 0 0 0-3.4-7.2`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M153.7 133.6s-6.5.4-8.4.3c-1.8 0-1.9 2.2 2.4 2.3 3.7.2 5.4 0 5.4 0`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M145.2 135.9c-1.9 1.3.5 2.3.5 2.3s3.5 1 6.8.6m-.6 2.9s-6.3.1-6.7-2.1c-.3-1.4.4-1.4.4-1.4m.5 2.7s-1 3.1 5.5 3.5m-.4-14.5v3.5M52.8 89.3a18 18 0 0 0 13.6-7.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#5BA02E`,d:`M168.6 248.3a6.6 6.6 0 0 1-6.7-6.6v-66.5a6.6 6.6 0 1 1 13.3 0v66.5a6.6 6.6 0 0 1-6.6 6.6`}),S.createElement(`path`,{fill:`#92C110`,d:`M176.5 247.7a6.6 6.6 0 0 1-6.6-6.7v-33.2a6.6 6.6 0 1 1 13.3 0V241a6.6 6.6 0 0 1-6.7 6.7`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M186.4 293.6H159a3.2 3.2 0 0 1-3.2-3.2v-46.1a3.2 3.2 0 0 1 3.2-3.2h27.5a3.2 3.2 0 0 1 3.2 3.2v46.1a3.2 3.2 0 0 1-3.2 3.2`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M89 89.5s7.8 5.4 16.6 2.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),YK=()=>S.createElement(`svg`,{width:`254`,height:`294`},S.createElement(`title`,null,`Server Error`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`path`,{fill:`#E4EBF7`,d:`M0 128.1v-2C0 56.5 56.3.2 125.7.2h2.1C197.2.3 253.5 56.6 253.5 126v2.1c0 69.5-56.3 125.7-125.7 125.7h-2.1A125.7 125.7 0 0 1 0 128.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M40 132.1a8.3 8.3 0 1 1-16.6-1.7 8.3 8.3 0 0 1 16.6 1.7`}),S.createElement(`path`,{stroke:`#FFF`,d:`m37.2 135.6 10.5 6m1 6.3-12.8 10.8`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M40.1 160.8a5.7 5.7 0 1 1-11.3-1.1 5.7 5.7 0 0 1 11.3 1.1M58 144.6a5.7 5.7 0 1 1-11.4-1.2 5.7 5.7 0 0 1 11.4 1.2M99.7 27.4h30a4.6 4.6 0 1 0 0-9.2h-30a4.6 4.6 0 0 0 0 9.2M111 46h30a4.6 4.6 0 1 0 0-9.3h-30a4.6 4.6 0 1 0 0 9.3m2.5-18.6h16a4.6 4.6 0 1 0 0 9.3h-16a4.6 4.6 0 0 0 0-9.3m36.7 42.7h-4a4.8 4.8 0 0 1-4.8-4.8 4.8 4.8 0 0 1 4.8-4.8h4a4.8 4.8 0 0 1 4.7 4.8 4.8 4.8 0 0 1-4.7 4.8`}),S.createElement(`circle`,{cx:`201.35`,cy:`30.2`,r:`29.7`,fill:`#FF603B`}),S.createElement(`path`,{fill:`#FFF`,d:`m203.6 19.4-.7 15a1.5 1.5 0 0 1-3 0l-.7-15a2.2 2.2 0 1 1 4.4 0m-.3 19.4c.5.5.8 1.1.8 1.9s-.3 1.4-.8 1.9a3 3 0 0 1-2 .7 2.5 2.5 0 0 1-1.8-.7c-.6-.6-.8-1.2-.8-2 0-.7.2-1.3.8-1.8.5-.5 1.1-.7 1.8-.7.8 0 1.5.2 2 .7`}),S.createElement(`path`,{fill:`#FFB594`,d:`M119.3 133.3c4.4-.6 3.6-1.2 4-4.8.8-5.2-3-17-8.2-25.1-1-10.7-12.6-11.3-12.6-11.3s4.3 5 4.2 16.2c1.4 5.3.8 14.5.8 14.5s5.3 11.4 11.8 10.5`}),S.createElement(`path`,{fill:`#FFF`,d:`M101 91.6s1.4-.6 3.2.6c8 1.4 10.3 6.7 11.3 11.4 1.8 1.2 1.8 2.3 1.8 3.5l1.5 3s-7.2 1.7-11 6.7c-1.3-6.4-6.9-25.2-6.9-25.2`}),S.createElement(`path`,{fill:`#FFB594`,d:`m94 90.5 1-5.8-9.2-11.9-5.2 5.6-2.6 9.9s8.4 5 16 2.2`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M83 78.2s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.2-3.7c.5-1 1.5-4.2 1.5-4.2l13.6 3.2c0 5.2-2.3 19.5-7.9 20-8.9.6-12.5-9.6-12.5-9.6`}),S.createElement(`path`,{fill:`#520038`,d:`M103 72.2c2.6-2 3.5-9.7 3.5-9.7s-2.5-.5-6.7-2c-4.7-2.2-12.9-4.9-17.6.9-9.5 4.4-2 20-2 20l2.7-3.1s-4-3.3-2.1-6.3c2.2-3.5 4 1 4 1s.6-2.3 3.5-3.3c.4-.7 1-2.7 1.5-3.8A1 1 0 0 1 91 65l11.5 2.7c.5.1.8.6.8 1.2l-.3 3.2z`}),S.createElement(`path`,{fill:`#552950`,d:`M101.2 76.5c0 .6-.6 1-1 1-.5-.1-.9-.7-.8-1.3.1-.6.6-1 1.1-1 .5.1.8.7.7 1.3m-7-1.4c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.6-1 1-1 .5.1.9.7.8 1.3`}),S.createElement(`path`,{stroke:`#DB836E`,d:`m99.2 73.6-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M100 73.3s1.7-.7 2.4.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M81.4 73s.4-1 1-.6c.7.4 1.4 1.4.6 2s.2 1.6.2 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M92.3 71.7s1.9 1.1 4.2 1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M92.7 80.6s2.3 1.2 4.4 1.2m-3.4 1.4s1 .4 1.5.3M83.7 80s1.8 6.6 9.2 8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M95.5 91.7s-1 2.8-8.2 2c-7.3-.6-10.3-5-10.3-5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M78.1 87.5s6.6 5 16.5 2.5c0 0 9.6 1 11.5 5.3 5.4 11.8.6 36.8 0 40 3.5 4-.4 8.4-.4 8.4-15.7-3.5-35.8-.6-35.8-.6-4.9-3.5-1.3-9-1.3-9l-6.2-23.8c-2.5-15.2.8-19.8 3.5-20.7 3-1 8-1.3 8-1.3.6 0 1.1 0 1.4-.2 2.4-1.3 2.8-.6 2.8-.6`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M65.8 89.8s-6.8.5-7.6 8.2c-.4 8.8 3 11 3 11s6.1 22 16.9 22.9c8.4-2.2 4.7-6.7 4.6-11.4-.2-11.3-7-17-7-17s-4.3-13.7-9.9-13.7`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M71.7 124.2s.9 11.3 9.8 6.5c4.8-2.5 7.6-13.8 9.8-22.6A201 201 0 0 0 94 96l-5-1.7s-2.4 5.6-7.7 12.3c-4.4 5.5-9.2 11.1-9.5 17.7`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M108.5 105.2s1.7 2.7-2.4 30.5c2.4 2.2 1 6-.2 7.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M123.3 131.5s-.5 2.8-11.8 2c-15.2-1-25.3-3.2-25.3-3.2l.9-5.8s.7.2 9.7-.1c11.9-.4 18.7-6 25-1 4 3.2 1.5 8.1 1.5 8.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M70.2 91s-5.6-4.8-11 2.7c-3.3 7.2.5 15.2 2.6 19.5-.3 3.8 2.4 4.3 2.4 4.3s0 1 1.5 2.7c4-7 6.7-9.1 13.7-12.5-.3-.7-1.9-3.3-1.8-3.8.2-1.7-1.3-2.6-1.3-2.6s-.3-.2-1.2-2.8c-.8-2.3-2-5.1-4.9-7.5`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M90.2 288s4.9 2.3 8.3 1.2c3.2-1 5.2.7 8 1.3a20 20 0 0 0 13.3-1.4c-.2-6.2-7.8-4.5-13.6-7.6-2.9-1.6-4.2-5.3-4-10H91.5s-1.5 12-1.3 16.5`}),S.createElement(`path`,{fill:`#2B0849`,d:`M90.2 287.8s2.8 1.5 7.6.8c3.5-.5 3.3.6 7.5 1.3 4.2.6 13-.2 14.3-1.2.5 1.3-.4 2.4-.4 2.4s-1.7.6-5.4.9c-2.3.1-8.1.3-10.2-.6-2-1.6-4.9-1.5-6-.3-4.5 1.1-7.2-.3-7.2-.3l-.2-3z`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M98.4 272.3h3.5s0 7.5 5.2 9.6c-5.3.7-9.7-2.6-8.7-9.6`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M44.4 272s-2.2 7.8-4.7 13c-1.9 3.8-4.4 7.8 5.8 7.8 7 0 9.3-.5 7.7-7-1.6-6.3.3-13.8.3-13.8h-9z`}),S.createElement(`path`,{fill:`#2B0849`,d:`M38 290.3s2.3 1.2 7 1.2c6.4 0 8.7-1.7 8.7-1.7s.6 1.1-.7 2.2c-1 1-3.8 1.7-7.7 1.7-4.4 0-6.1-.6-7-1.3-1-.5-.8-1.6-.2-2.1`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M45.3 274s0 1.6-.3 3.1-1.1 3.3-1.2 4.4c0 1.2 4.8 1.6 5.4 0 .7-1.6 1.4-6.8 2-7.6.7-.9-5.1-2.2-5.9.1`}),S.createElement(`path`,{fill:`#7BB2F9`,d:`M89.5 277.6h13.9s1.3-56.6 1.9-66.8c.6-10.3 4-45.1 1-65.6l-13-.7-23.7.8-1.3 10.4c0 .5-.7.9-.8 1.4 0 .6.5 1.4.4 2L59.6 206c-.1.7-1.3 1-1.5 2.8 0 .3.2 1.6.1 1.8-7.1 19.5-12.2 52.6-15.6 67.2h15.1L62 259c3-13.3 24-88.3 24-88.3l3.2-1-.2 48.6s-.2 1.3.4 2.1c.5.8-.6 1.2-.4 2.4l.4 1.8-1 12.4c-.4 4.9 1.2 40.7 1.2 40.7`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M64.6 218.9c1.2 0 4.2-2.1 7.2-5.1m24.2 8.7s3-1.1 6.4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M97 219.4s2.9-1.2 6.3-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M63.2 222.1s2.7-.6 6.7-3.5m5-72.4c-.3 3.2.3 8.8-4.5 9.4m22.8-11.3s.1 14.6-1.4 15.7c-2.3 1.7-3 2-3 2m.4-17s.3 13-1 25m-4.7.7s6.8-1 9.1-1M46 270l-.9 4.6m1.8-11.3-.8 4.1m16.6-64.9c-.3 1.6 0 2-.4 3.4 0 0-2.8 2-2.3 4s-.3 3.4-4.5 17.2c-1.8 5.8-4.3 19-6.2 28.3l-1.1 5.8m16-67-1 4.9m8.1-52.3-1.2 10.9s-1.2.1-.5 2.3c0 1.4-2.8 16.4-5.4 31.6m-20 82.1h13.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#192064`,d:`M106.2 142.1c-3-.5-18.8-2.7-36.2.2a.6.6 0 0 0-.6.7v3a.6.6 0 0 0 .8.6c3.3-.5 17-2.4 35.6-.3.4 0 .7-.2.7-.5.2-1.4.2-2.5.2-3a.6.6 0 0 0-.5-.7`}),S.createElement(`path`,{fill:`#FFF`,d:`M96.4 145.3v-5.1a.8.8 0 0 0-.8-.9 114.1 114.1 0 0 0-8.1 0 .8.8 0 0 0-.9.8v5.1c0 .5.4.9.9.9h8a.8.8 0 0 0 .9-.8`}),S.createElement(`path`,{fill:`#192064`,d:`M95.2 144.3v-3.2a.7.7 0 0 0-.6-.7h-6.1a.7.7 0 0 0-.6.7v3.2c0 .4.3.7.6.7h6c.4 0 .7-.3.7-.7`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M90.1 273.5h12.8m-11.7-3.7v6.3m-.3-12.6v4.5m-.5-97.6 1 46.4s.7 1.6-.3 2.8c-.9 1.1 2.6.7 1 2.3-1.7 1.6.9 1.2 0 3.5-.6 1.6-1 22-1.2 36.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M73.7 98.7 76 103s2 .8 1.8 2.7l.8 2.2m-14.3 8.7c.2-1 2.2-7.1 12.6-10.5m.7-16s7.7 6 16.5 2.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M92 87s5.5-.9 7.5-4.6c1.3-.3.8 2.2-.3 3.7l-1 1.5s.2.3.2.9c0 .6-.2.6-.3 1v1l-.4 1c-.1.2 0 .6-.2.9-.2.4-1.6 1.8-2.6 2.8-3.8 3.6-5 1.7-6-.4-1-1.8-.7-5.1-.9-6.9-.3-2.9-2.6-3-2-4.4.4-.7 3 .7 3.4 1.8.7 2 2.9 1.8 2.6 1.7`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M99.8 82.4c-.5.1-.3.3-1 1.3-.6 1-4.8 2.9-6.4 3.2-2.5.5-2.2-1.6-4.2-2.9-1.7-1-3.6-.6-1.4 1.4 1 1 1 1.1 1.4 3.2.3 1.5-.7 3.7.7 5.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{stroke:`#E59788`,d:`M79.5 108.7c-2 2.9-4.2 6.1-5.5 8.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M87.7 124.8s-2-2-5.1-2.8c-3-.7-3.6-.1-5.5.1-2 .3-4-.9-3.7.7.3 1.7 5 1 5.2 2.1.2 1.1-6.3 2.8-8.3 2.2-.8.8.5 1.9 2 2.2.3 1.5 2.3 1.5 2.3 1.5s.7 1 2.6 1.1c2.5 1.3 9-.7 11-1.5 2-.9-.5-5.6-.5-5.6`}),S.createElement(`path`,{stroke:`#E59788`,d:`M73.4 122.8s.7 1.2 3.2 1.4c2.3.3 2.6.6 2.6.6s-2.6 3-9.1 2.3m2.3 2.2s3.8 0 5-.7m-2.4 2.2s2 0 3.3-.6m-1 1.7s1.7 0 2.8-.5m-6.8-9s-.6-1.1 1.3-.5c1.7.5 2.8 0 5.1.1 1.4.1 3-.2 4 .2 1.6.8 3.6 2.2 3.6 2.2s10.6 1.2 19-1.1M79 108s-8.4 2.8-13.2 12.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M109.3 112.5s3.4-3.6 7.6-4.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E59788`,d:`M107.4 123s9.7-2.7 11.4-.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{stroke:`#BFCDDD`,d:`m194.6 83.7 4-4M187.2 91l3.7-3.6m.9-3-4.5-4.7m11.2 11.5-4.2-4.3m-65 76.3 3.7-3.7M122.3 170l3.5-3.5m.8-2.9-4.3-4.2M133 170l-4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#A3B4C6`,d:`M190.2 211.8h-1.6a4 4 0 0 1-4-4v-32.1a4 4 0 0 1 4-4h1.6a4 4 0 0 1 4 4v32a4 4 0 0 1-4 4`}),S.createElement(`path`,{fill:`#A3B4C6`,d:`M237.8 213a4.8 4.8 0 0 1-4.8 4.8h-86.6a4.8 4.8 0 0 1 0-9.6H233a4.8 4.8 0 0 1 4.8 4.8`}),S.createElement(`path`,{fill:`#A3B4C6`,d:`M154.1 190.1h70.5v-84.6h-70.5z`}),S.createElement(`path`,{fill:`#BFCDDD`,d:`M225 190.1h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2m0-59.3h-71.1a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.3v19a3.2 3.2 0 0 1-3.2 3.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M159.6 120.5a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8v-3.2c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8`}),S.createElement(`path`,{fill:`#BFCDDD`,d:`M225 160.5h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2`}),S.createElement(`path`,{stroke:`#7C90A5`,d:`M173.5 130.8h49.3m-57.8 0h6m-15 0h6.7m11.1 29.8h49.3m-57.7 0h6m-15.8 0h6.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#FFF`,d:`M159.6 151a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V147c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8m-63 29a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.5 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V176c0-.5.3-.8.8-.8h22.4c.5 0 .8.3.8.8v3.2c0 .4-.3.8-.8.8`}),S.createElement(`path`,{fill:`#BFCDDD`,d:`M203 221.1h-27.3a2.4 2.4 0 0 1-2.4-2.4v-11.4a2.4 2.4 0 0 1 2.4-2.5H203a2.4 2.4 0 0 1 2.4 2.5v11.4a2.4 2.4 0 0 1-2.4 2.4`}),S.createElement(`path`,{stroke:`#A3B4C6`,d:`M177.3 207.2v11.5m23.8-11.5v11.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#5BA02E`,d:`M162.9 267.9a9.4 9.4 0 0 1-9.4-9.4v-14.8a9.4 9.4 0 0 1 18.8 0v14.8a9.4 9.4 0 0 1-9.4 9.4`}),S.createElement(`path`,{fill:`#92C110`,d:`M171.2 267.8a9.4 9.4 0 0 1-9.4-9.4V255a9.4 9.4 0 0 1 18.8 0v3.4a9.4 9.4 0 0 1-9.4 9.4`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M181.3 293.7h-27.7a3.2 3.2 0 0 1-3.2-3.2v-20.7a3.2 3.2 0 0 1 3.2-3.2h27.7a3.2 3.2 0 0 1 3.2 3.2v20.7a3.2 3.2 0 0 1-3.2 3.2`}))),XK=e=>{let{componentCls:t,lineHeightHeading3:n,iconCls:r,padding:i,paddingXL:a,paddingXS:o,paddingLG:s,marginXS:c,lineHeight:l}=e;return{[t]:{padding:`${Y(e.calc(s).mul(2).equal())} ${Y(a)}`,"&-rtl":{direction:`rtl`}},[`${t} ${t}-image`]:{width:e.imageWidth,height:e.imageHeight,margin:`auto`},[`${t} ${t}-icon`]:{marginBottom:s,textAlign:`center`,[`& > ${r}`]:{fontSize:e.iconFontSize}},[`${t} ${t}-title`]:{color:e.colorTextHeading,fontSize:e.titleFontSize,lineHeight:n,marginBlock:c,textAlign:`center`},[`${t} ${t}-subtitle`]:{color:e.colorTextDescription,fontSize:e.subtitleFontSize,lineHeight:l,textAlign:`center`},[`${t} ${t}-body`]:{marginTop:s,padding:`${Y(s)} ${Y(e.calc(i).mul(2.5).equal())}`,backgroundColor:e.colorFillAlter},[`${t} ${t}-extra`]:{margin:e.extraMargin,textAlign:`center`,"& > *":{marginInlineEnd:o,"&:last-child":{marginInlineEnd:0}}}}},ZK=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-success ${t}-icon > ${n}`]:{color:e.resultSuccessIconColor},[`${t}-error ${t}-icon > ${n}`]:{color:e.resultErrorIconColor},[`${t}-info ${t}-icon > ${n}`]:{color:e.resultInfoIconColor},[`${t}-warning ${t}-icon > ${n}`]:{color:e.resultWarningIconColor}}},QK=e=>[XK(e),ZK(e)],$K=Ql(`Result`,e=>{let t=e.colorInfo,n=e.colorError,r=e.colorSuccess,i=e.colorWarning;return QK(dc(e,{resultInfoIconColor:t,resultErrorIconColor:n,resultSuccessIconColor:r,resultWarningIconColor:i,imageWidth:250,imageHeight:295}))},e=>({titleFontSize:e.fontSizeHeading3,subtitleFontSize:e.fontSize,iconFontSize:e.fontSizeHeading3*3,extraMargin:`${e.paddingLG}px 0 0 0`})),eq=()=>S.createElement(`svg`,{width:`251`,height:`294`},S.createElement(`title`,null,`Unauthorized`),S.createElement(`g`,{fill:`none`,fillRule:`evenodd`},S.createElement(`path`,{fill:`#E4EBF7`,d:`M0 129v-2C0 58.3 55.6 2.7 124.2 2.7h2c68.6 0 124.2 55.6 124.2 124.1v2.1c0 68.6-55.6 124.2-124.1 124.2h-2.1A124.2 124.2 0 0 1 0 129`}),S.createElement(`path`,{fill:`#FFF`,d:`M41.4 133a8.2 8.2 0 1 1-16.4-1.7 8.2 8.2 0 0 1 16.4 1.6`}),S.createElement(`path`,{stroke:`#FFF`,d:`m38.7 136.4 10.4 5.9m.9 6.2-12.6 10.7`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M41.5 161.3a5.6 5.6 0 1 1-11.2-1.2 5.6 5.6 0 0 1 11.2 1.2m17.7-16a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m41.2-115.8H130a4.6 4.6 0 1 0 0-9.1h-29.6a4.6 4.6 0 0 0 0 9.1m11.3 18.3h29.7a4.6 4.6 0 1 0 0-9.2h-29.7a4.6 4.6 0 1 0 0 9.2`}),S.createElement(`path`,{fill:`#FFF`,d:`M114 29.5h15.8a4.6 4.6 0 1 0 0 9.1H114a4.6 4.6 0 0 0 0-9.1m71.3 108.2a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),S.createElement(`path`,{stroke:`#FFF`,d:`m180.2 143.8 12.5 7.1m1.1 7.5-15.1 13`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#FFF`,d:`M185.6 172a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.5 1.3m18.6-16.6a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.6 1.4`}),S.createElement(`path`,{stroke:`#FFF`,d:`M153 194a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm73-75.8a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm-9 34.9a2.2 2.2 0 1 1-4.3 0 2.2 2.2 0 0 1 4.4 0zm-39.2-43.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.3-15.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm6.7 88a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0z`,strokeWidth:`2`}),S.createElement(`path`,{stroke:`#FFF`,d:`m215.1 155.3-1.9 20-10.8 6m-27.8-4.7-6.3 9.8H157l-4.5 6.4m23.4-65.5v-15.7m45.6 7.8-12.8 7.9-15.2-7.9V96.7`,strokeWidth:`2`}),S.createElement(`path`,{fill:`#A26EF4`,d:`M180.7 29.3a29.3 29.3 0 1 1 58.6 0 29.3 29.3 0 0 1-58.6 0`}),S.createElement(`path`,{fill:`#FFF`,d:`m221.4 41.7-21.5-.1a1.7 1.7 0 0 1-1.7-1.8V27.6a1.7 1.7 0 0 1 1.8-1.7h21.5c1 0 1.8.9 1.8 1.8l-.1 12.3a1.7 1.7 0 0 1-1.7 1.7`}),S.createElement(`path`,{fill:`#FFF`,d:`M215.1 29.2c0 2.6-2 4.6-4.5 4.6a4.6 4.6 0 0 1-4.5-4.7v-6.9c0-2.6 2-4.6 4.6-4.6 2.5 0 4.5 2 4.4 4.7v6.9zm-4.5-14a6.9 6.9 0 0 0-7 6.8v7.3a6.9 6.9 0 0 0 13.8.1V22a6.9 6.9 0 0 0-6.8-6.9zm-43 53.2h-4a4.7 4.7 0 0 1-4.7-4.8 4.7 4.7 0 0 1 4.7-4.7h4a4.7 4.7 0 0 1 4.7 4.8 4.7 4.7 0 0 1-4.7 4.7`}),S.createElement(`path`,{fill:`#5BA02E`,d:`M168.2 248.8a6.6 6.6 0 0 1-6.6-6.6v-66a6.6 6.6 0 0 1 13.2 0v66a6.6 6.6 0 0 1-6.6 6.6`}),S.createElement(`path`,{fill:`#92C110`,d:`M176.1 248.2a6.6 6.6 0 0 1-6.6-6.6v-33a6.6 6.6 0 1 1 13.3 0v33a6.6 6.6 0 0 1-6.7 6.6`}),S.createElement(`path`,{fill:`#F2D7AD`,d:`M186 293.9h-27.4a3.2 3.2 0 0 1-3.2-3.2v-45.9a3.2 3.2 0 0 1 3.2-3.1H186a3.2 3.2 0 0 1 3.2 3.1v46a3.2 3.2 0 0 1-3.2 3`}),S.createElement(`path`,{fill:`#FFF`,d:`M82 147.7s6.3-1 17.5-1.3c11.8-.4 17.6 1 17.6 1s3.7-3.8 1-8.3c1.3-12.1 6-32.9.3-48.3-1.1-1.4-3.7-1.5-7.5-.6-1.4.3-7.2-.2-8-.1l-15.3-.4-8-.5c-1.6-.1-4.3-1.7-5.5-.3-.4.4-2.4 5.6-2 16l8.7 35.7s-3.2 3.6 1.2 7`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m75.8 73.3-1-6.4 12-6.5s7.4-.1 8 1.2c.8 1.3-5.5 1-5.5 1s-1.9 1.4-2.6 2.5c-1.7 2.4-1 6.5-8.4 6-1.7.3-2.5 2.2-2.5 2.2`}),S.createElement(`path`,{fill:`#FFB594`,d:`M52.4 77.7S66.7 87 77.4 92c1 .5-2 16.2-11.9 11.8-7.4-3.3-20.1-8.4-21.5-14.5-.7-3.2 2.6-7.6 8.4-11.7M142 80s-6.7 3-13.9 6.9c-3.9 2.1-10.1 4.7-12.3 8-6.2 9.3 3.5 11.2 13 7.5 6.6-2.7 29-12.1 13.2-22.4`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m76.2 66.4 3 3.8S76.4 73 73 76c-7 6.2-12.8 14.3-16 16.4-4 2.7-9.7 3.3-12.2 0-3.5-5.1.5-14.7 31.5-26`}),S.createElement(`path`,{fill:`#FFF`,d:`M64.7 85.1s-2.4 8.4-9 14.5c.7.5 18.6 10.5 22.2 10 5.2-.6 6.4-19 1.2-20.5-.8-.2-6-1.3-8.9-2.2-.9-.2-1.6-1.7-3.5-1l-2-.8zm63.7.7s5.3 2 7.3 13.8c-.6.2-17.6 12.3-21.8 7.8-6.6-7-.8-17.4 4.2-18.6 4.7-1.2 5-1.4 10.3-3`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M78.2 94.7s.9 7.4-5 13`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M87.4 94.7s3.1 2.6 10.3 2.6c7.1 0 9-3.5 9-3.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.9`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m117.2 68.6-6.8-6.1s-5.4-4.4-9.2-1c-3.9 3.5 4.4 2.2 5.6 4.2 1.2 2.1.9 1.2-2 .5-5.7-1.4-2.1.9 3 5.3 2 1.9 7 1 7 1l2.4-3.9z`}),S.createElement(`path`,{fill:`#FFB594`,d:`m105.3 91.3-.3-11H89l-.5 10.5c0 .4.2.8.6 1 2 1.3 9.3 5 15.8.4.2-.2.4-.5.4-.9`}),S.createElement(`path`,{fill:`#5C2552`,d:`M107.6 74.2c.8-1.1 1-9 1-11.9a1 1 0 0 0-1-1l-4.6-.4c-7.7-1-17 .6-18.3 6.3-5.4 5.9-.4 13.3-.4 13.3s2 3.5 4.3 6.8c.8 1 .4-3.8 3-6a47.9 47.9 0 0 1 16-7`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`M88.4 83.2s2.7 6.2 11.6 6.5c7.8.3 9-7 7.5-17.5l-1-5.5c-6-2.9-15.4.6-15.4.6s-.6 2-.2 5.5c-2.3 2-1.8 5.6-1.8 5.6s-1-2-2-2.3c-.9-.3-2 0-2.3 2-1 4.6 3.6 5.1 3.6 5.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`m100.8 77.1 1.7-1-1-4.3.7-1.4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#552950`,d:`M105.5 74c0 .8-.4 1.4-1 1.4-.4 0-.8-.7-.8-1.4s.5-1.2 1-1.2.9.6.8 1.3m-8 .2c0 .8-.4 1.3-.9 1.3s-.9-.6-.9-1.3c0-.7.5-1.3 1-1.3s1 .6.9 1.3`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M91.1 86.8s5.3 5 12.7 2.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#DB836E`,d:`M99.8 81.9s-3.6.2-1.5-2.8c1.6-1.5 5-.4 5-.4s1 3.9-3.5 3.2`}),S.createElement(`path`,{stroke:`#5C2552`,d:`M102.9 70.6s2.5.8 3.4.7m-12.4.7s2.5-1.2 4.8-1.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M86.3 77.4s1 .9 1.5 2c-.4.6-1 1.2-.3 1.9m11.8 2.4s2 .2 2.5-.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`m87.8 115.8 15.7-3m-3.3 3 10-2m-43.7-27s-1.6 8.8-6.7 14M128.3 88s3 4 4 11.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M64 84.8s-6 10-13.5 10`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{fill:`#FFC6A0`,d:`m112.4 66-.2 5.2 12 9.2c4.5 3.6 8.9 7.5 11 8.7 4.8 2.8 8.9 3.3 11 1.8 4.1-2.9 4.4-9.9-8.1-15.3-4.3-1.8-16.1-6.3-25.7-9.7`}),S.createElement(`path`,{stroke:`#DB836E`,d:`M130.5 85.5s4.6 5.7 11.7 6.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),S.createElement(`path`,{stroke:`#E4EBF7`,d:`M121.7 105.7s-.4 8.6-1.3 13.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M115.8 161.5s-3.6-1.5-2.7-7.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M101.5 290.2s4.3 2.1 7.4 1c2.9-.9 4.6.7 7.2 1.3 2.5.5 6.9 1 11.7-1.3 0-5.6-7-4-12-6.8-2.6-1.4-3.8-4.7-3.6-8.8h-9.5s-1.4 10.6-1.2 14.6`}),S.createElement(`path`,{fill:`#2B0849`,d:`M101.5 290s2.4 1.4 6.8.7c3-.4 3.7.5 7.5 1 3.7.6 10.8 0 11.9-.8.4 1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.7-.5-1.8-1.4-5.2-2-5.7-.3-4 1-7.4-.3-7.4-.3l-.2-2.6z`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M108.8 276.2h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),S.createElement(`path`,{fill:`#CBD1D1`,d:`M57.6 272.5s-2 7.5-4.5 12.4c-1.8 3.7-4.2 7.6 5.5 7.6 6.7 0 9-.5 7.5-6.7-1.5-6.1.3-13.3.3-13.3h-8.8z`}),S.createElement(`path`,{fill:`#2B0849`,d:`M51.5 290s2.2 1.2 6.7 1.2c6.1 0 8.3-1.6 8.3-1.6s.6 1-.6 2.1c-1 .9-3.6 1.6-7.4 1.6-4.2 0-6-.6-6.8-1.2-.9-.5-.7-1.6-.2-2`}),S.createElement(`path`,{fill:`#A4AABA`,d:`M58.5 274.4s0 1.6-.3 3-1 3.1-1.1 4.2c0 1.1 4.5 1.5 5.2 0 .6-1.6 1.3-6.5 1.9-7.3.6-.8-5-2.1-5.7.1`}),S.createElement(`path`,{fill:`#7BB2F9`,d:`m100.9 277 13.3.1s1.3-54.2 1.8-64c.6-9.9 3.8-43.2 1-62.8l-12.4-.7-22.8.8-1.2 10c0 .4-.6.8-.7 1.3 0 .6.4 1.3.3 2-2.3 14-6.3 32.9-8.7 46.4-.1.6-1.2 1-1.4 2.6 0 .3.2 1.6 0 1.8-6.8 18.7-10.8 47.6-14.1 61.6h14.5s2.2-8.6 4-17a3984 3984 0 0 1 23-84.5l3-.5 1 46.1s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.7-1 11.9c-.4 4.6 0 39 0 39`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M77.4 220.4c1.2.1 4-2 7-4.9m23.1 8.4s2.8-1 6.1-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M108.5 221s2.7-1.2 6-4`,strokeLinecap:`round`,strokeLinejoin:`round`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M76.1 223.6s2.6-.6 6.5-3.4m4.7-69.4c-.2 3.1.3 8.5-4.3 9m21.8-10.7s.1 14-1.3 15c-2.2 1.6-3 1.9-3 1.9m.5-16.4s0 12.8-1.2 24.3m-4.9 1s7.2-1.6 9.4-1.6m-28.6 31.5-1 4.5s-1.5 1.8-1 3.7c.4 2-1 2-5 15.3-1.7 5.6-4.4 18.5-6.3 27.5l-4 18.4M77 196.7a313.3 313.3 0 0 1-.8 4.8m7.7-50-1.2 10.3s-1 .2-.5 2.3c.1 1.3-2.6 15.6-5.1 30.2M57.6 273h13.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),S.createElement(`path`,{fill:`#192064`,d:`M117.4 147.4s-17-3-35.7.2v4.2s14.6-2.9 35.5-.4l.2-4`}),S.createElement(`path`,{fill:`#FFF`,d:`M107.5 150.4v-5a.8.8 0 0 0-.8-.7H99a.8.8 0 0 0-.7.8v4.8c0 .5.3.9.8.8a140.8 140.8 0 0 1 7.7 0 .8.8 0 0 0 .8-.7`}),S.createElement(`path`,{fill:`#192064`,d:`M106.4 149.4v-3a.6.6 0 0 0-.6-.7 94.1 94.1 0 0 0-5.8 0 .6.6 0 0 0-.7.7v3c0 .4.3.7.7.7h5.7c.4 0 .7-.3.7-.7`}),S.createElement(`path`,{stroke:`#648BD8`,d:`M101.5 274h12.3m-11.1-5v6.5m0-12.4v4.3m-.5-93.4.9 44.4s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.1 0 3.4-.6 1.5-1 21-1.1 35`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),tq={success:Tu,error:Ou,info:Pu,warning:qK},nq={404:JK,500:YK,403:eq},rq=Object.keys(nq),iq=({icon:e,status:t,className:n,style:r})=>{if(rq.includes(`${t}`)){let e=nq[t];return S.createElement(`div`,{className:n,style:r},S.createElement(e,null))}let i=S.createElement(tq[t]);return e===null||e===!1?null:S.createElement(`div`,{className:n,style:r},e||i)},aq=({className:e,extra:t,style:n})=>t?S.createElement(`div`,{className:e,style:n},t):null,oq=e=>{let{prefixCls:t,className:n,rootClassName:r,subTitle:i,title:a,style:o,children:s,status:c=`info`,icon:l,extra:u,styles:d,classNames:f,...p}=e,{getPrefixCls:m,direction:h,className:g,style:_,classNames:v,styles:y}=ya(`result`),b={...e,status:c},[x,C]=Cf([v,f],[y,d],{props:b}),w=m(`result`,t),[T,E]=$K(w),D=J(w,`${w}-${c}`,n,g,r,{[`${w}-rtl`]:h===`rtl`},T,E,x.root),O=J(`${w}-title`,x.title),k=J(`${w}-subtitle`,x.subTitle),A=J(`${w}-extra`,x.extra),j=J(`${w}-body`,x.body),M=J(`${w}-icon`,{[`${w}-image`]:rq.includes(`${c}`)},x.icon),N={...C.root,..._,...o},P=xi(p,{aria:!0,data:!0});return S.createElement(`div`,{...P,className:D,style:N},S.createElement(iq,{className:M,style:C.icon,status:c,icon:l}),S.createElement(`div`,{className:O,style:C.title},a),i&&S.createElement(`div`,{className:k,style:C.subTitle},i),S.createElement(aq,{className:A,extra:u,style:C.extra}),s&&S.createElement(`div`,{className:j,style:C.body},s))};oq.PRESENTED_IMAGE_403=nq[403],oq.PRESENTED_IMAGE_404=nq[404],oq.PRESENTED_IMAGE_500=nq[500];var sq=yR;function cq(){return cq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[h,g]=Gn(r??!1,n);function _(e,t){let n=h;return i||(n=e,g(n),l?.(n,t)),n}function v(e){e.which===Qr.LEFT?_(!1,e):e.which===Qr.RIGHT&&_(!0,e),u?.(e)}function y(e){let t=_(!h,e);c?.(t,e)}let b=J(e,t,{[`${e}-checked`]:h,[`${e}-disabled`]:i});return S.createElement(`button`,cq({},p,{type:`button`,role:`switch`,"aria-checked":h,disabled:i,className:b,ref:m,onKeyDown:v,onClick:y}),a,S.createElement(`span`,{className:`${e}-inner`},S.createElement(`span`,{className:J(`${e}-inner-checked`,f?.content),style:d?.content},o),S.createElement(`span`,{className:J(`${e}-inner-unchecked`,f?.content),style:d?.content},s)))});lq.displayName=`Switch`;var uq=e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:o,handleSizeSM:s,calc:c}=e,l=`${t}-inner`,u=Y(c(s).add(c(r).mul(2)).equal()),d=Y(c(o).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:Y(n),[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${l}-checked, ${l}-unchecked`]:{minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${l}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:c(c(s).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${Y(c(s).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},dq=e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:`relative`,top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:`top`},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},fq=e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:o}=e,s=`${t}-handle`;return{[t]:{[s]:{position:`absolute`,top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,...hg(),"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:o(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:`""`,...hg()}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${Y(o(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},pq=e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:o,switchDuration:s,calc:c}=e,l=`${t}-inner`,u=Y(c(o).add(c(r).mul(2)).equal()),d=Y(c(a).mul(2).equal());return{[t]:{[l]:{display:`block`,overflow:`hidden`,borderRadius:100,height:`100%`,paddingInlineStart:a,paddingInlineEnd:i,transition:[`padding-inline-start`,`padding-inline-end`].map(e=>`${e} ${s} ease-in-out`).join(`, `),...hg(),[`${l}-checked, ${l}-unchecked`]:{display:`block`,color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:`none`,minHeight:n,transition:[`margin-inline-start`,`margin-inline-end`].map(e=>`${e} ${s} ease-in-out`).join(`, `),...hg()},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${l}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}},mq=e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:{...Ul(e),position:`relative`,display:`inline-block`,boxSizing:`border-box`,minWidth:r,height:n,lineHeight:Y(n),verticalAlign:`middle`,background:e.colorTextQuaternary,border:`0`,borderRadius:100,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,userSelect:`none`,...hg(),[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...ql(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:`not-allowed`,opacity:e.switchDisabledOpacity,"*":{boxShadow:`none`,cursor:`not-allowed`}},[`&${t}-rtl`]:{direction:`rtl`}}}},hq=Ql(`Switch`,e=>{let t=dc(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:`-30%`});return[mq(t),pq(t),fq(t),dq(t),uq(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,o=r/2,s=a-4,c=o-4;return{trackHeight:a,trackHeightSM:o,trackMinWidth:s*2+8,trackMinWidthSM:c*2+4,trackPadding:2,handleBg:i,handleSize:s,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new Nc(`#00230b`).setA(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}),gq=S.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,loading:a,className:o,rootClassName:s,style:c,checked:l,value:u,defaultChecked:d,defaultValue:f,onChange:p,styles:m,classNames:h,...g}=e,[_,v]=Gn(d??f??!1,l??u),{getPrefixCls:y,direction:b,className:x,style:C,classNames:w,styles:T}=ya(`switch`),E=S.useContext(mm),D=(i??E)||a,O=y(`switch`,n),[k,A]=hq(O),j=Th(r),M={...e,size:j,disabled:D},[N,P]=Cf([w,h],[T,m],{props:M}),F=S.createElement(`div`,{className:J(`${O}-handle`,N.indicator),style:P.indicator},a&&S.createElement(Ym,{className:`${O}-loading-icon`})),I=J(x,{[`${O}-small`]:j===`small`,[`${O}-loading`]:a,[`${O}-rtl`]:b===`rtl`},o,s,N.root,k,A),L={...P.root,...C,...c},R=(...e)=>{v(e[0]),p?.(...e)};return S.createElement(wh,{component:`Switch`,disabled:D},S.createElement(lq,{...g,classNames:N,styles:P,checked:_,onChange:R,prefixCls:O,className:I,style:L,disabled:D,ref:t,loadingIcon:F}))});gq.__ANT_SWITCH=!0;var _q={},vq=`rc-table-internal-hook`;function yq(e){let t=S.createContext(void 0);return{Context:t,Provider:({value:e,children:n})=>{let r=S.useRef(e);r.current=e;let[i]=S.useState(()=>({getValue:()=>r.current,listeners:new Set}));return Hn(()=>{(0,Vi.unstable_batchedUpdates)(()=>{i.listeners.forEach(t=>{t(e)})})},[e]),S.createElement(t.Provider,{value:i},n)},defaultValue:e}}function bq(e,t){let n=zn(typeof t==`function`?t:e=>{if(t===void 0)return e;if(!Array.isArray(t))return e[t];let n={};return t.forEach(t=>{n[t]=e[t]}),n}),r=S.useContext(e?.Context),{listeners:i,getValue:a}=r||{},o=S.useRef();o.current=n(r?a():e?.defaultValue);let[,s]=S.useState({});return Hn(()=>{if(!r)return;function e(e){let t=n(e);fi(o.current,t,!0)||s({})}return i.add(e),()=>{i.delete(e)}},[r]),o.current}function xq(){return xq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let s=i?{ref:o}:{},c=S.useRef(0),l=S.useRef(a);return t()===null?((!r||r(l.current,a))&&(c.current+=1),l.current=a,S.createElement(e.Provider,{value:c.current},S.createElement(n,xq({},a,s)))):S.createElement(n,xq({},a,s))};return i?S.forwardRef(a):a}function r(e,n){let r=ur(e),i=(n,i)=>{let a=r?{ref:i}:{};return t(),S.createElement(e,xq({},n,a))};return S.memo(r?S.forwardRef(i):i,n)}return{makeImmutable:n,responseImmutable:r,useImmutableMark:t}}var{makeImmutable:$re,responseImmutable:eie,useImmutableMark:tie}=Sq(),{makeImmutable:Cq,responseImmutable:wq,useImmutableMark:Tq}=Sq(),Eq=yq(),Dq=S.createContext({renderWithProps:!1}),Oq=`RC_TABLE_KEY`;function kq(e){return e==null?[]:Array.isArray(e)?e:[e]}function Aq(e){let t=[],n={};return e.forEach(e=>{let{key:r,dataIndex:i}=e||{},a=r||kq(i).join(`-`)||Oq;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function jq(e){return e!=null}function Mq(e){return typeof e==`number`&&!Number.isNaN(e)}function Nq(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!S.isValidElement(e)}function Pq(e,t,n,r,i,a){let o=S.useContext(Dq);return Zn(()=>{if(jq(r))return[r];let a=Ai(e,t==null||t===``?[]:Array.isArray(t)?t:[t]),s=a,c;if(i){let t=i(a,e,n);Nq(t)?(s=t.children,c=t.props,o.renderWithProps=!0):s=t}return[s,c]},[Tq(),e,r,t,i,n],(e,t)=>{if(a){let[,n]=e,[,r]=t;return a(r,n)}return o.renderWithProps?!0:!fi(e,t,!0)})}function Fq(e,t,n,r){let i=e+t-1;return e<=r&&i>=n}function Iq(e,t){return bq(Eq,n=>[Fq(e,t||1,n.hoverStartRow,n.hoverEndRow),n.onHover])}function Lq(){return Lq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r,i=e===!0?{showTitle:!0}:e;return i&&(i.showTitle||t===`header`)&&(typeof n==`string`||typeof n==`number`?r=n.toString():S.isValidElement(n)&&typeof n.props?.children==`string`&&(r=n.props?.children)),r},zq=S.memo(e=>{let{component:t,children:n,ellipsis:r,scope:i,prefixCls:a,className:o,style:s,align:c,record:l,render:u,dataIndex:d,renderIndex:f,shouldCellUpdate:p,index:m,rowType:h,colSpan:g,rowSpan:_,fixStart:v,fixEnd:y,fixedStartShadow:b,fixedEndShadow:x,offsetFixedStartShadow:C,offsetFixedEndShadow:w,zIndex:T,zIndexReverse:E,appendNode:D,additionalProps:O={},isSticky:k}=e,A=`${a}-cell`,{allColumnsFixedLeft:j,rowHoverable:M}=bq(Eq,[`allColumnsFixedLeft`,`rowHoverable`]),[N,P]=Pq(l,d,f,n,u,p),F={},I=typeof v==`number`&&!j,L=typeof y==`number`&&!j,[R,z]=bq(Eq,({scrollInfo:e})=>{if(!I&&!L)return[!1,!1];let[t,n]=e;return[(I&&b&&t)-C>=1,(L&&x&&n-t)-w>1]});I&&(F.insetInlineStart=v,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E),L&&(F.insetInlineEnd=y,F[`--z-offset`]=T,F[`--z-offset-reverse`]=E);let B=P?.colSpan??O.colSpan??g??1,V=P?.rowSpan??O.rowSpan??_??1,[H,U]=Iq(m,V),ee=zn(e=>{l&&U(m,m+V-1),O?.onMouseEnter?.(e)}),W=zn(e=>{l&&U(-1,-1),O?.onMouseLeave?.(e)});if(B===0||V===0)return null;let te=O.title??Rq({rowType:h,ellipsis:r,children:N}),G=J(A,o,{[`${A}-fix`]:I||L,[`${A}-fix-start`]:I,[`${A}-fix-end`]:L,[`${A}-fix-start-shadow`]:b,[`${A}-fix-start-shadow-show`]:b&&R,[`${A}-fix-end-shadow`]:x,[`${A}-fix-end-shadow-show`]:x&&z,[`${A}-ellipsis`]:r,[`${A}-with-append`]:D,[`${A}-fix-sticky`]:(I||L)&&k,[`${A}-row-hover`]:!P&&H},O.className,P?.className),ne={};c&&(ne.textAlign=c);let K={...P?.style,...F,...ne,...O.style,...s},re=N;return typeof re==`object`&&!Array.isArray(re)&&!S.isValidElement(re)&&(re=null),r&&(b||x)&&(re=S.createElement(`span`,{className:`${A}-content`},re)),S.createElement(t,Lq({},P,O,{className:G,style:K,title:te,scope:i,onMouseEnter:M?ee:void 0,onMouseLeave:M?W:void 0,colSpan:B===1?null:B,rowSpan:V===1?null:V}),D,re)});function Bq(e){return e.fixed===`start`}function Vq(e){return e.fixed===`end`}function Hq(e,t,n,r){let i=n[e]||{},a=n[t]||{},o=null,s=null;Bq(i)&&Bq(a)?o=r.start[e]:Vq(a)&&Vq(i)&&(s=r.end[t]);let c=!1,l=!1,u=0,d=0;o!==null&&(c=!n[t+1]||!Bq(n[t+1]),u=n.length*2-e,d=n.length+e),s!==null&&(l=!n[e-1]||!Vq(n[e-1]),u=t,d=n.length-t);let f=0,p=0;if(c)for(let t=0;tt;--e)Vq(n[e])||(p+=r.widths[e]||0);return{fixStart:o,fixEnd:s,fixedStartShadow:c,fixedEndShadow:l,offsetFixedStartShadow:f,offsetFixedEndShadow:p,isSticky:r.isSticky,zIndex:u,zIndexReverse:d}}var Uq=S.createContext({});function Wq(){return Wq=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,index:n,children:r,colSpan:i=1,rowSpan:a,align:o}=e,{prefixCls:s}=bq(Eq,[`prefixCls`]),{scrollColumnIndex:c,stickyOffsets:l,flattenColumns:u}=S.useContext(Uq),d=n+i-1+1===c?i+1:i,f=S.useMemo(()=>Hq(n,n+d-1,u,l),[n,d,u,l]);return S.createElement(zq,Wq({className:t,index:n,component:`td`,prefixCls:s,record:null,dataIndex:null,align:o,colSpan:d,rowSpan:a,render:()=>r},f))},Kq=e=>{let{children:t,...n}=e;return S.createElement(`tr`,n,t)},qq=e=>{let{children:t}=e;return t};qq.Row=Kq,qq.Cell=Gq;var Jq=wq(e=>{let{children:t,stickyOffsets:n,flattenColumns:r}=e,i=bq(Eq,`prefixCls`),a=r.length-1,o=r[a],s=S.useMemo(()=>({stickyOffsets:n,flattenColumns:r,scrollColumnIndex:o?.scrollbar?a:null}),[o,r,a,n]);return S.createElement(Uq.Provider,{value:s},S.createElement(`tfoot`,{className:`${i}-summary`},t))}),Yq=qq;function Xq(e){return null}function Zq(e){return null}function Qq(e,t,n,r,i,a,o){let s=a(t,o);e.push({record:t,indent:n,index:o,rowKey:s});let c=i?.has(s);if(t&&Array.isArray(t[r])&&c)for(let o=0;o{if(n?.size){let i=[];for(let a=0;a({record:e,indent:0,index:t,rowKey:r(e,t)}))},[e,t,n,r])}function eJ(e,t,n,r){let i=bq(Eq,[`prefixCls`,`fixedInfoList`,`flattenColumns`,`expandableType`,`expandRowByClick`,`onTriggerExpand`,`rowClassName`,`expandedRowClassName`,`indentSize`,`expandIcon`,`expandedRowRender`,`expandIconColumnIndex`,`expandedKeys`,`childrenColumnName`,`rowExpandable`,`onRow`]),{flattenColumns:a,expandableType:o,expandedKeys:s,childrenColumnName:c,onTriggerExpand:l,rowExpandable:u,onRow:d,expandRowByClick:f,rowClassName:p}=i,m=o===`nest`,h=o===`row`&&(!u||u(e)),g=h||m,_=s&&s.has(t),v=c&&e&&e[c],y=zn(l),b=d?.(e,n),x=b?.onClick,S=(t,...n)=>{f&&g&&l(e,t),x?.(t,...n)},C;typeof p==`string`?C=p:typeof p==`function`&&(C=p(e,n,r));let w=Aq(a);return{...i,columnsKey:w,nestExpandable:m,expanded:_,hasNestChildren:v,record:e,onTriggerExpand:y,rowSupportExpand:h,expandable:g,rowProps:{...b,className:J(C,b?.className),onClick:S}}}var tJ=e=>{let{prefixCls:t,children:n,component:r,cellComponent:i,className:a,expanded:o,colSpan:s,isEmpty:c,stickyOffset:l=0}=e,{scrollbarSize:u,fixHeader:d,fixColumn:f,componentWidth:p,horizonScroll:m}=bq(Eq,[`scrollbarSize`,`fixHeader`,`fixColumn`,`componentWidth`,`horizonScroll`]),h=n;return(c?m&&p:f)&&(h=S.createElement(`div`,{style:{width:p-l-(d&&!c?u:0),position:`sticky`,left:l,overflow:`hidden`},className:`${t}-expanded-row-fixed`},h)),S.createElement(r,{className:a,style:{display:o?null:`none`}},S.createElement(zq,{component:i,prefixCls:t,colSpan:s},h))};function nJ({prefixCls:e,record:t,onExpand:n,expanded:r,expandable:i}){let a=`${e}-row-expand-icon`;if(!i)return S.createElement(`span`,{className:J(a,`${e}-row-spaced`)});let o=e=>{n(t,e),e.stopPropagation()};return S.createElement(`span`,{className:J(a,{[`${e}-row-expanded`]:r,[`${e}-row-collapsed`]:!r}),onClick:o})}function rJ(e,t,n){let r=[];function i(e){(e||[]).forEach((e,a)=>{r.push(t(e,a)),i(e[n])})}return i(e),r}function iJ(e,t,n,r){return typeof e==`string`?e:typeof e==`function`?e(t,n,r):``}function aJ(){return aJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,style:n,classNames:r,styles:i,record:a,index:o,renderIndex:s,rowKey:c,rowKeys:l,indent:u=0,rowComponent:d,cellComponent:f,scopeCellComponent:p,expandedRowInfo:m}=e,h=eJ(a,c,o,u),{prefixCls:g,flattenColumns:_,expandedRowClassName:v,expandedRowRender:y,rowProps:b,expanded:x,rowSupportExpand:C}=h,w=S.useRef(!1);w.current||=x;let T=iJ(v,a,o,u),E=S.createElement(d,aJ({},b,{"data-row-key":c,className:J(t,`${g}-row`,`${g}-row-level-${u}`,b?.className,r.row,{[T]:u>=1}),style:{...n,...b?.style,...i.row}}),_.map((e,t)=>{let{render:n,dataIndex:c,className:d}=e,{key:_,fixedInfo:v,appendCellNode:y,additionalCellProps:b}=oJ(h,e,t,u,o,l,m?.offset);return S.createElement(zq,aJ({className:J(d,r.cell),style:i.cell,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:f,prefixCls:g,key:_,record:a,index:o,renderIndex:s,dataIndex:c,render:n,shouldCellUpdate:e.shouldCellUpdate},v,{appendNode:y,additionalProps:b}))})),D;if(C&&(w.current||x)){let e=y(a,o,u+1,x);D=S.createElement(tJ,{expanded:x,className:J(`${g}-expanded-row`,`${g}-expanded-row-level-${u+1}`,T),prefixCls:g,component:d,cellComponent:f,colSpan:m?m.colSpan:_.length,isEmpty:!1,stickyOffset:m?.sticky},e)}return S.createElement(S.Fragment,null,E,D)}),cJ=e=>{let{columnKey:t,onColumnResize:n,title:r}=e,i=S.useRef(null);return Hn(()=>{i.current&&n(t,i.current.offsetWidth)},[]),S.createElement(oa,{data:t},S.createElement(`td`,{ref:i,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},S.createElement(`div`,{style:{height:0,overflow:`hidden`,fontWeight:`bold`}},r||`\xA0`)))},lJ=({prefixCls:e,columnsKey:t,onColumnResize:n,columns:r})=>{let i=S.useRef(null),{measureRowRender:a}=bq(Eq,[`measureRowRender`]),o=S.createElement(`tr`,{"aria-hidden":`true`,className:`${e}-measure-row`,style:{height:0},ref:i},S.createElement(oa.Collection,{onBatchResize:e=>{Ar(i.current)&&e.forEach(({data:e,size:t})=>{n(e,t.offsetWidth)})}},t.map(e=>{let t=r.find(t=>t.key===e)?.title,i=S.isValidElement(t)?S.cloneElement(t,{ref:null}):t;return S.createElement(cJ,{key:e,columnKey:e,onColumnResize:n,title:i})})));return typeof a==`function`?a(o):o},uJ=wq(e=>{let{data:t,measureColumnWidth:n}=e,{prefixCls:r,getComponent:i,onColumnResize:a,flattenColumns:o,getRowKey:s,expandedKeys:c,childrenColumnName:l,emptyNode:u,classNames:d,styles:f,expandedRowOffset:p=0,colWidths:m}=bq(Eq,[`prefixCls`,`getComponent`,`onColumnResize`,`flattenColumns`,`getRowKey`,`expandedKeys`,`childrenColumnName`,`emptyNode`,`classNames`,`styles`,`expandedRowOffset`,`fixedInfoList`,`colWidths`]),{body:h={}}=d||{},{body:g={}}=f||{},_=$q(t,l,c,s),v=S.useMemo(()=>_.map(e=>e.rowKey),[_]),y=S.useRef({renderWithProps:!1}),b=S.useMemo(()=>{let e=o.length-p,t=0;for(let e=0;e{let{record:n,indent:r,index:i,rowKey:a}=e;return S.createElement(sJ,{classNames:h,styles:g,key:a,rowKey:a,rowKeys:v,record:n,index:t,renderIndex:i,rowComponent:C,cellComponent:w,scopeCellComponent:T,indent:r,expandedRowInfo:b})}):S.createElement(tJ,{expanded:!0,className:`${r}-placeholder`,prefixCls:r,component:C,cellComponent:w,colSpan:o.length,isEmpty:!0},u);let D=Aq(o);return S.createElement(Dq.Provider,{value:y.current},S.createElement(x,{style:g.wrapper,className:J(`${r}-tbody`,h.wrapper)},n&&S.createElement(lJ,{prefixCls:r,columnsKey:D,onColumnResize:a,columns:o}),E))}),dJ=`RC_TABLE_INTERNAL_COL_DEFINE`;function fJ(e){let{expandable:t,...n}=e,r;return r=`expandable`in e?{...n,...t}:n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}function pJ(){return pJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{colWidths:t,columns:n,columCount:r}=e,{tableLayout:i}=bq(Eq,[`tableLayout`]),a=[],o=r||n.length,s=!1;for(let e=o-1;e>=0;--e){let r=t[e],o=n&&n[e],c,l;if(o&&(c=o[dJ],i===`auto`&&(l=o.minWidth)),r||l||c||s){let{columnType:t,...n}=c||{};a.unshift(S.createElement(`col`,pJ({key:e,style:{width:r,minWidth:l}},n))),s=!0}}return a.length>0?S.createElement(`colgroup`,null,a):null};function hJ(e,t){return(0,S.useMemo)(()=>{let n=[];for(let r=0;r{let{className:n,style:r,noData:i,columns:a,flattenColumns:o,colWidths:s,colGroup:c,columCount:l,stickyOffsets:u,direction:d,fixHeader:f,stickyTopOffset:p,stickyBottomOffset:m,stickyClassName:h,scrollX:g,tableLayout:_=`fixed`,onScroll:v,maxContentScroll:y,children:b,...x}=e,{prefixCls:C,scrollbarSize:w,isSticky:T,getComponent:E}=bq(Eq,[`prefixCls`,`scrollbarSize`,`isSticky`,`getComponent`]),D=E([`header`,`table`],`table`),O=T&&!f?0:w,k=S.useRef(null),A=S.useCallback(e=>{sr(t,e),sr(k,e)},[]);S.useEffect(()=>{function e(e){let{currentTarget:t,deltaX:n}=e;if(n){let{scrollLeft:r,scrollWidth:i,clientWidth:a}=t,o=i-a,s=r+n;d===`rtl`?(s=Math.max(-o,s),s=Math.min(0,s)):(s=Math.min(o,s),s=Math.max(0,s)),v({currentTarget:t,scrollLeft:s}),e.preventDefault()}}let t=k.current;return t?.addEventListener(`wheel`,e,{passive:!1}),()=>{t?.removeEventListener(`wheel`,e)}},[]);let j=o[o.length-1],M={fixed:j?j.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${C}-cell-scrollbar`})},N=(0,S.useMemo)(()=>O?[...a,M]:a,[O,a]),P=(0,S.useMemo)(()=>O?[...o,M]:o,[O,o]),F=(0,S.useMemo)(()=>{let{start:e,end:t}=u;return{...u,start:e,end:[...t.map(e=>e+O),0],isSticky:T}},[O,u,T]),I=hJ(s,l),L=(0,S.useMemo)(()=>{let e=!I||!I.length||I.every(e=>!e);return i||e},[i,I]);return S.createElement(`div`,{style:{overflow:`hidden`,...T?{top:p,bottom:m}:{},...r},ref:A,className:J(n,{[h]:!!h})},S.createElement(D,{style:{tableLayout:_,minWidth:`100%`,width:g}},L?c:S.createElement(mJ,{colWidths:[...I,O],columCount:l+1,columns:P}),b({...x,stickyOffsets:F,columns:N,flattenColumns:P})))}),_J=S.memo(gJ);function vJ(){return vJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{cells:t,stickyOffsets:n,flattenColumns:r,rowComponent:i,cellComponent:a,onHeaderRow:o,index:s,classNames:c,styles:l}=e,{prefixCls:u}=bq(Eq,[`prefixCls`]),d;o&&(d=o(t.map(e=>e.column),s));let f=Aq(t.map(e=>e.column));return S.createElement(i,vJ({},d,{className:c.row,style:l.row}),t.map((e,t)=>{let{column:i,colStart:o,colEnd:s,colSpan:c}=e,l=Hq(o,s,r,n),d=i?.onHeaderCell?.(i)||{};return S.createElement(zq,vJ({},e,{scope:i.title?c>1?`colgroup`:`col`:null,ellipsis:i.ellipsis,align:i.align,component:a,prefixCls:u,key:f[t]},l,{additionalProps:d,rowType:`header`}))}))};function bJ(e,t,n){let r=[];function i(e,a,o=0){r[o]=r[o]||[];let s=a;return e.filter(Boolean).map(e=>{let a={key:e.key,className:J(e.className,t.cell)||``,style:n.cell,children:e.title,column:e,colStart:s},c=1,l=e.children;return l&&l.length>0&&(c=i(l,s,o+1).reduce((e,t)=>e+t,0),a.hasSubColumns=!0),`colSpan`in e&&({colSpan:c}=e),`rowSpan`in e&&(a.rowSpan=e.rowSpan),a.colSpan=c,a.colEnd=a.colStart+c-1,r[o].push(a),s+=c,c})}i(e,0);let a=r.length;for(let e=0;e{!(`rowSpan`in t)&&!t.hasSubColumns&&(t.rowSpan=a-e)});return r}var xJ=wq(e=>{let{stickyOffsets:t,columns:n,flattenColumns:r,onHeaderRow:i}=e,{prefixCls:a,getComponent:o,classNames:s,styles:c}=bq(Eq,[`prefixCls`,`getComponent`,`classNames`,`styles`]),{header:l={}}=s||{},{header:u={}}=c||{},d=S.useMemo(()=>bJ(n,l,u),[n,l,u]),f=o([`header`,`wrapper`],`thead`),p=o([`header`,`row`],`tr`),m=o([`header`,`cell`],`th`);return S.createElement(f,{className:J(`${a}-thead`,l.wrapper),style:u.wrapper},d.map((e,n)=>S.createElement(yJ,{classNames:l,styles:u,key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:p,cellComponent:m,onHeaderRow:i,index:n})))});function SJ(e,t=``){return typeof t==`number`?t:t.endsWith(`%`)?e*parseFloat(t)/100:null}function CJ(e,t,n){return S.useMemo(()=>{if(t&&t>0){let r=0,i=0;e.forEach(e=>{let n=SJ(t,e.width);n?r+=n:i+=1});let a=Math.max(t,n),o=Math.max(a-r,i),s=i,c=o/i,l=0,u=e.map(e=>{let n={...e},r=SJ(t,n.width);if(r)n.width=r;else{let e=Math.floor(c);n.width=s===1?o:e,o-=e,--s}return l+=n.width,n});if(l{let r=Math.floor(t.width*e);t.width=n===u.length-1?o:r,o-=r})}return[u,Math.max(l,a)]}return[e,t]},[e,t,n])}function wJ(e){return ki(e).filter(e=>S.isValidElement(e)).map(e=>{let{key:t,props:n}=e,{children:r,...i}=n,a={key:t,...i};return r&&(a.children=wJ(r)),a})}function TJ(e){return e.filter(e=>e&&typeof e==`object`&&!e.hidden).map(e=>{let t=e.children;return t&&t.length>0?{...e,children:TJ(t)}:e})}function EJ(e,t=`key`){return e.filter(e=>e&&typeof e==`object`).reduce((e,n,r)=>{let{fixed:i}=n,a=i===!0||i===`left`?`start`:i===`right`?`end`:i,o=`${t}-${r}`,s=n.children;return s&&s.length>0?[...e,...EJ(s,o).map(e=>({...e,fixed:e.fixed??a}))]:[...e,{key:o,...n,fixed:a}]},[])}function DJ({prefixCls:e,columns:t,children:n,expandable:r,expandedKeys:i,columnTitle:a,getRowKey:o,onTriggerExpand:s,expandIcon:c,rowExpandable:l,expandIconColumnIndex:u,expandedRowOffset:d=0,direction:f,expandRowByClick:p,columnWidth:m,fixed:h,scrollWidth:g,clientWidth:_},v){let y=S.useMemo(()=>TJ((t||wJ(n)||[]).slice()),[t,n]),b=S.useMemo(()=>{if(r){let t=y.slice();if(!t.includes(_q)){let e=u||0,n=e===0&&(h===`right`||h===`end`)?y.length:e;n>=0&&t.splice(n,0,_q)}let n=t.indexOf(_q);t=t.filter((e,t)=>e!==_q||t===n);let r=y[n],f;f=h||(r?r.fixed:null);let g={[dJ]:{className:`${e}-expand-icon-col`,columnType:`EXPAND_COLUMN`},title:a,fixed:f,className:`${e}-row-expand-icon-cell`,width:m,render:(t,n,r)=>{let a=o(n,r),u=c({prefixCls:e,expanded:i.has(a),expandable:l?l(n):!0,record:n,onExpand:s});return p?S.createElement(`span`,{onClick:e=>e.stopPropagation()},u):u}};return t.map((e,t)=>{let n=e===_q?g:e;return te!==_q)},[r,y,o,i,c,f,d]),x=S.useMemo(()=>{let e=b;return v&&(e=v(e)),e.length||(e=[{render:()=>null}]),e},[v,b,f]),[C,w]=CJ(S.useMemo(()=>EJ(x),[x,f,g]),g,_);return[x,C,w]}function OJ(e,t,n){let r=fJ(e),{expandIcon:i,expandedRowKeys:a,defaultExpandedRowKeys:o,defaultExpandAllRows:s,expandedRowRender:c,onExpand:l,onExpandedRowsChange:u,childrenColumnName:d}=r,f=i||nJ,p=d||`children`,m=S.useMemo(()=>c?`row`:e.expandable&&e.internalHooks===`rc-table-internal-hook`&&e.expandable.__PARENT_RENDER_ICON__||t.some(e=>e&&typeof e==`object`&&e[p])?`nest`:!1,[!!c,t]),[h,g]=S.useState(()=>o||(s?rJ(t,n,p):[])),_=S.useMemo(()=>new Set(a||h||[]),[a,h]);return[r,m,_,f,p,S.useCallback(e=>{let r=n(e,t.indexOf(e)),i,a=_.has(r);a?(_.delete(r),i=[..._]):i=[..._,r],g(i),l&&l(!a,e),u&&u(i)},[n,_,t,l,u])]}function kJ(e,t){let n=S.useMemo(()=>e.map((n,r)=>Hq(r,r,e,t)),[e,t]);return Zn(()=>n,[n],(e,t)=>!fi(e,t))}function AJ(e){let t=(0,S.useRef)(e),[,n]=(0,S.useState)({}),r=(0,S.useRef)(null),i=(0,S.useRef)([]);function a(e){i.current.push(e);let a=Promise.resolve();r.current=a,a.then(()=>{if(r.current===a){let e=i.current,a=t.current;i.current=[],e.forEach(e=>{t.current=e(t.current)}),r.current=null,a!==t.current&&n({})}})}return(0,S.useEffect)(()=>()=>{r.current=null},[]),[t.current,a]}function jJ(e){let t=(0,S.useRef)(e||null),n=(0,S.useRef)(null);function r(){clearTimeout(n.current)}function i(e){t.current=e,r(),n.current=setTimeout(()=>{t.current=null,n.current=void 0},100)}function a(){return t.current}return(0,S.useEffect)(()=>r,[]),[i,a]}function MJ(){let[e,t]=S.useState(-1),[n,r]=S.useState(-1);return[e,n,S.useCallback((e,n)=>{t(e),r(n)},[])]}var NJ=Bn()?window:null;function PJ(e,t){let{offsetHeader:n=0,offsetSummary:r=0,offsetScroll:i=0,getContainer:a=()=>NJ}=typeof e==`object`?e:{},o=a()||NJ,s=!!e;return S.useMemo(()=>({isSticky:s,stickyClassName:s?`${t}-sticky-holder`:``,offsetHeader:n,offsetSummary:r,offsetScroll:i,container:o}),[s,i,n,r,t,o])}function FJ(e,t){return(0,S.useMemo)(()=>{let n=t.length,r=(n,r,i)=>{let a=[],o=0;for(let s=n;s!==r;s+=i)a.push(o),t[s].fixed&&(o+=e[s]||0);return a};return{start:r(0,n,1),end:r(n-1,-1,-1).reverse(),widths:e}},[e,t])}var IJ=e=>{let{children:t,className:n,style:r}=e;return S.createElement(`div`,{className:n,style:r},t)};function LJ(e){let t=kr(e).getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var RJ=`mouseup`,zJ=`mousemove`,BJ=`scroll`,VJ=`resize`,HJ=S.forwardRef((e,t)=>{let{scrollBodyRef:n,onScroll:r,offsetScroll:i,container:a,direction:o}=e,s=bq(Eq,`prefixCls`),c=n.current?.scrollWidth||0,l=n.current?.clientWidth||0,u=c&&l/c*l,d=S.useRef(null),[f,p]=AJ({scrollLeft:0,isHiddenScrollBar:!0}),m=S.useRef({delta:0,x:0}),[h,g]=S.useState(!1),_=S.useRef(null);S.useEffect(()=>()=>{Oi.cancel(_.current)},[]);let v=()=>{g(!1)},y=e=>{e.persist(),m.current.delta=e.pageX-f.scrollLeft,m.current.x=0,g(!0),e.preventDefault()},b=e=>{let{buttons:t}=e||window?.event;if(!h||t===0){h&&g(!1);return}let n=m.current.x+e.pageX-m.current.x-m.current.delta,i=o===`rtl`;n=Math.max(i?u-l:0,Math.min(i?0:l-u,n)),(!i||Math.abs(n)+Math.abs(u){Oi.cancel(_.current),_.current=Oi(()=>{if(!n.current)return;let e=LJ(n.current).top,t=e+n.current.offsetHeight,r=a===window?document.documentElement.scrollTop+window.innerHeight:LJ(a).top+a.clientHeight;t-ti()<=r||e>=r-i?p(e=>({...e,isHiddenScrollBar:!0})):p(e=>({...e,isHiddenScrollBar:!1}))})},C=e=>{p(t=>({...t,scrollLeft:e/c*l||0}))};return S.useImperativeHandle(t,()=>({setScrollLeft:C,checkScrollBarVisible:x})),S.useEffect(()=>(document.body.addEventListener(RJ,v,!1),document.body.addEventListener(zJ,b,!1),x(),()=>{document.body.removeEventListener(RJ,v),document.body.removeEventListener(zJ,b)}),[u,h]),S.useEffect(()=>{if(n.current){let e=[],t=kr(n.current);for(;t;)e.push(t),t=t.parentElement;return e.forEach(e=>{e.addEventListener(BJ,x,!1)}),window.addEventListener(VJ,x,!1),window.addEventListener(BJ,x,!1),a.addEventListener(BJ,x,!1),()=>{e.forEach(e=>{e.removeEventListener(BJ,x)}),window.removeEventListener(VJ,x),window.removeEventListener(BJ,x),a.removeEventListener(BJ,x)}}},[a]),S.useEffect(()=>{f.isHiddenScrollBar||p(e=>{let t=n.current;return t?{...e,scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}:e})},[f.isHiddenScrollBar]),c<=l||!u||f.isHiddenScrollBar?null:S.createElement(`div`,{style:{height:ti(),width:l,bottom:i},className:`${s}-sticky-scroll`},S.createElement(`div`,{onMouseDown:y,ref:d,className:J(`${s}-sticky-scroll-bar`,{[`${s}-sticky-scroll-bar-active`]:h}),style:{width:`${u}px`,transform:`translate3d(${f.scrollLeft}px, 0, 0)`}}))});function UJ(){return UJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n={rowKey:`key`,prefixCls:WJ,emptyText:qJ,...e},{prefixCls:r,className:i,rowClassName:a,style:o,classNames:s,styles:c,data:l,rowKey:u,scroll:d,tableLayout:f,direction:p,title:m,footer:h,summary:g,caption:_,id:v,showHeader:y,components:b,emptyText:x,onRow:C,onHeaderRow:w,measureRowRender:T,onScroll:E,internalHooks:D,transformColumns:O,internalRefs:k,tailor:A,getContainerWidth:j,sticky:M,rowHoverable:N=!0}=n,P=l||GJ,F=!!P.length,I=D===vq,L=S.useCallback((e,t)=>Ai(b,e)||t,[b]),R=S.useMemo(()=>typeof u==`function`?u:e=>e&&e[u],[u]),z=L([`body`]),[B,V,H]=MJ(),[U,ee,W,te,G,ne]=OJ(n,P,R),K=d?.x,[re,ie]=S.useState(0),[ae,q,oe]=DJ({...n,...U,expandable:!!U.expandedRowRender,columnTitle:U.columnTitle,expandedKeys:W,getRowKey:R,onTriggerExpand:ne,expandIcon:te,expandIconColumnIndex:U.expandIconColumnIndex,direction:p,scrollWidth:I&&A&&typeof K==`number`?K:null,clientWidth:re},I?O:null),se=oe??K,ce=S.useMemo(()=>({columns:ae,flattenColumns:q}),[ae,q]),le=S.useRef(null),ue=S.useRef(null),de=S.useRef(null),fe=S.useRef(null);S.useImperativeHandle(t,()=>({nativeElement:le.current,scrollTo:e=>{if(de.current instanceof HTMLElement){let{index:t,top:n,key:r,offset:i}=e;if(Mq(n))de.current?.scrollTo({top:n});else{let e=r??R(P[t]),n=de.current.querySelector(`[data-row-key="${e}"]`);if(n)if(!i)n.scrollIntoView();else{let e=n.offsetTop;de.current.scrollTo({top:e+i})}}}else de.current?.scrollTo&&de.current.scrollTo(e)}}));let pe=S.useRef(null),[me,he]=S.useState(!1),[ge,_e]=S.useState(!1),[ve,ye]=S.useState(new Map),be=Aq(q).map(e=>ve.get(e)),xe=S.useMemo(()=>be,[be.join(`_`)]),Se=FJ(xe,q),Ce=d&&jq(d.y),we=d&&jq(se)||!!U.fixed,Te=we&&q.some(({fixed:e})=>e),Ee=S.useRef(null),{isSticky:De,offsetHeader:Oe,offsetSummary:ke,offsetScroll:Ae,stickyClassName:je,container:Me}=PJ(M,r),Ne=S.useMemo(()=>g?.(P),[g,P]),Pe=(Ce||De)&&S.isValidElement(Ne)&&Ne.type===qq&&Ne.props.fixed,Fe,Ie,Le;Ce&&(Ie={overflowY:F?`scroll`:`auto`,maxHeight:d.y}),we&&(Fe={overflowX:`auto`},Ce||(Ie={overflowY:`hidden`}),Le={width:se===!0?`auto`:se,minWidth:`100%`});let Re=S.useCallback((e,t)=>{ye(n=>{if(n.get(e)!==t){let r=new Map(n);return r.set(e,t),r}return n})},[]),[ze,Be]=jJ(null);function Ve(e,t){t&&(typeof t==`function`?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout(()=>{t.scrollLeft=e},0)))}let[He,Ue]=S.useState([0,0]),We=zn(({currentTarget:e,scrollLeft:t})=>{let n=typeof t==`number`?t:e.scrollLeft,r=e||KJ;(!Be()||Be()===r)&&(ze(r),Ve(n,ue.current),Ve(n,de.current),Ve(n,pe.current),Ve(n,Ee.current?.setScrollLeft));let i=e||ue.current;if(i){let e=I&&A&&typeof se==`number`?se:i.scrollWidth,t=i.clientWidth,r=Math.abs(n);if(Ue(n=>{let i=[r,e-t];return fi(n,i)?n:i}),e===t){he(!1),_e(!1);return}he(r>0),_e(r{We(e),E?.(e)}),Ke=()=>{we&&de.current?We({currentTarget:kr(de.current),scrollLeft:de.current?.scrollLeft}):(he(!1),_e(!1))},qe=e=>{Ee.current?.checkScrollBarVisible();let t=e??le.current?.offsetWidth??0;I&&j&&le.current&&(t=j(le.current,t)||t),t!==re&&(Ke(),ie(t))};Hn(()=>{we&&qe()},[we]);let Je=S.useRef(!1);S.useEffect(()=>{Je.current&&Ke()},[we,l,ae.length]),S.useEffect(()=>{Je.current=!0},[]);let[Ye,Xe]=S.useState(0);Hn(()=>{(!A||!I)&&(de.current instanceof Element?Xe(ni(de.current).width):Xe(ni(fe.current).width))},[]),S.useEffect(()=>{I&&k&&(k.body.current=de.current)});let Ze=S.useCallback(e=>S.createElement(S.Fragment,null,S.createElement(xJ,e),Pe===`top`&&S.createElement(Jq,e,Ne)),[Pe,Ne]),Qe=S.useCallback(e=>S.createElement(Jq,e,Ne),[Ne]),$e=L([`table`],`table`),et=S.useMemo(()=>f||(Te?se===`max-content`?`auto`:`fixed`:Ce||De||q.some(({ellipsis:e})=>e)?`fixed`:`auto`),[Ce,Te,q,f,De]),tt,nt={colWidths:xe,columCount:q.length,stickyOffsets:Se,onHeaderRow:w,fixHeader:Ce,scroll:d},rt=S.useMemo(()=>F?null:typeof x==`function`?x():x,[F,x]),it=S.createElement(uJ,{data:P,measureColumnWidth:Ce||we||De}),at=S.createElement(mJ,{colWidths:q.map(({width:e})=>e),columns:q}),ot=_==null?void 0:S.createElement(`caption`,{className:`${r}-caption`},_),st=xi(n,{data:!0}),ct=xi(n,{aria:!0});if(Ce||De){let e;typeof z==`function`?(e=z(P,{scrollbarSize:Ye,ref:de,onScroll:We}),nt.colWidths=q.map(({width:e},t)=>{let n=t===q.length-1?e-Ye:e;return typeof n==`number`&&!Number.isNaN(n)?n:0})):e=S.createElement(`div`,{style:{...Fe,...Ie},onScroll:Ge,ref:de,className:`${r}-body`},S.createElement($e,UJ({style:{...Le,tableLayout:et}},ct),ot,at,it,!Pe&&Ne&&S.createElement(Jq,{stickyOffsets:Se,flattenColumns:q},Ne)));let t={noData:!P.length,maxContentScroll:we&&se===`max-content`,...nt,...ce,direction:p,stickyClassName:je,scrollX:se,tableLayout:et,onScroll:We};tt=S.createElement(S.Fragment,null,y!==!1&&S.createElement(_J,UJ({},t,{stickyTopOffset:Oe,className:`${r}-header`,ref:ue,colGroup:at}),Ze),e,Pe&&Pe!==`top`&&S.createElement(_J,UJ({},t,{stickyBottomOffset:ke,className:`${r}-summary`,ref:pe,colGroup:at}),Qe),De&&de.current&&de.current instanceof Element&&S.createElement(HJ,{ref:Ee,offsetScroll:Ae,scrollBodyRef:de,onScroll:We,container:Me,direction:p}))}else tt=S.createElement(`div`,{style:{...Fe,...Ie,...c?.content},className:J(`${r}-content`,s?.content),onScroll:We,ref:de},S.createElement($e,UJ({style:{...Le,tableLayout:et}},ct),ot,at,y!==!1&&S.createElement(xJ,UJ({},nt,ce)),it,Ne&&S.createElement(Jq,{stickyOffsets:Se,flattenColumns:q},Ne)));let lt={...o};De&&(lt[`--columns-count`]=q.length);let ut=S.createElement(`div`,UJ({className:J(r,i,{[`${r}-rtl`]:p===`rtl`,[`${r}-fix-start-shadow`]:we,[`${r}-fix-end-shadow`]:we,[`${r}-fix-start-shadow-show`]:we&&me,[`${r}-fix-end-shadow-show`]:we&&ge,[`${r}-layout-fixed`]:f===`fixed`,[`${r}-fixed-header`]:Ce,[`${r}-fixed-column`]:Te,[`${r}-scroll-horizontal`]:we,[`${r}-has-fix-start`]:q[0]?.fixed,[`${r}-has-fix-end`]:q[q.length-1]?.fixed===`end`}),style:lt,id:v,ref:le},st),m&&S.createElement(IJ,{className:J(`${r}-title`,s?.title),style:c?.title},m(P)),S.createElement(`div`,{ref:fe,className:J(`${r}-container`,s?.section),style:c?.section},tt),h&&S.createElement(IJ,{className:J(`${r}-footer`,s?.footer),style:c?.footer},h(P)));we&&(ut=S.createElement(oa,{onResize:({offsetWidth:e})=>qe(e)},ut));let dt=kJ(q,Se),ft=S.useMemo(()=>({scrollX:se,scrollInfo:He,classNames:s,styles:c,prefixCls:r,getComponent:L,scrollbarSize:Ye,direction:p,fixedInfoList:dt,isSticky:De,componentWidth:re,fixHeader:Ce,fixColumn:Te,horizonScroll:we,tableLayout:et,rowClassName:a,expandedRowClassName:U.expandedRowClassName,expandIcon:te,expandableType:ee,expandRowByClick:U.expandRowByClick,expandedRowRender:U.expandedRowRender,expandedRowOffset:U.expandedRowOffset,onTriggerExpand:ne,expandIconColumnIndex:U.expandIconColumnIndex,indentSize:U.indentSize,allColumnsFixedLeft:q.every(e=>e.fixed===`start`),emptyNode:rt,columns:ae,flattenColumns:q,onColumnResize:Re,colWidths:xe,hoverStartRow:B,hoverEndRow:V,onHover:H,rowExpandable:U.rowExpandable,onRow:C,getRowKey:R,expandedKeys:W,childrenColumnName:G,rowHoverable:N,measureRowRender:T}),[se,He,s,c,r,L,Ye,p,dt,De,re,Ce,Te,we,et,a,U.expandedRowClassName,te,ee,U.expandRowByClick,U.expandedRowRender,U.expandedRowOffset,ne,U.expandIconColumnIndex,U.indentSize,rt,ae,q,Re,xe,B,V,H,U.rowExpandable,C,R,W,G,N,T]);return S.createElement(Eq.Provider,{value:ft},ut)}),YJ=e=>Cq(JJ,e),XJ=YJ();XJ.EXPAND_COLUMN=_q,XJ.INTERNAL_HOOKS=vq,XJ.Column=Xq,XJ.ColumnGroup=Zq,XJ.Summary=Yq;var ZJ=yq(null),QJ=yq(null);function $J(){return $J=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{rowInfo:t,column:n,colIndex:r,indent:i,index:a,component:o,renderIndex:s,record:c,style:l,className:u,inverse:d,getHeight:f}=e,{render:p,dataIndex:m,className:h,width:g}=n,{columnsOffset:_}=bq(QJ,[`columnsOffset`]),{key:v,fixedInfo:y,appendCellNode:b,additionalCellProps:x}=oJ(t,n,r,i,a),{style:C,colSpan:w=1,rowSpan:T=1}=x,E=eY(r-1,w,_),D=w>1?g-E:0,O={...C,...l,flex:`0 0 ${E}px`,width:`${E}px`,marginRight:D,pointerEvents:`auto`},k=S.useMemo(()=>d?T<=1:w===0||T===0||T>1,[T,w,d]);k?O.visibility=`hidden`:d&&(O.height=f?.(T));let A=k?()=>null:p,j={};return(T===0||w===0)&&(j.rowSpan=1,j.colSpan=1),S.createElement(zq,$J({className:J(h,u),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:o,prefixCls:t.prefixCls,key:v,record:c,index:a,renderIndex:s,dataIndex:m,render:A,shouldCellUpdate:n.shouldCellUpdate},y,{appendNode:b,additionalProps:{...x,style:O,...j}}))};function nY(){return nY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{data:n,index:r,className:i,rowKey:a,style:o,extra:s,getHeight:c,...l}=e,{record:u,indent:d,index:f}=n,{scrollX:p,flattenColumns:m,prefixCls:h,fixColumn:g,componentWidth:_}=bq(Eq,[`prefixCls`,`flattenColumns`,`fixColumn`,`componentWidth`,`scrollX`]),{getComponent:v}=bq(ZJ,[`getComponent`]),y=eJ(u,a,r,d),b=v([`body`,`row`],`div`),x=v([`body`,`cell`],`div`),{rowSupportExpand:C,expanded:w,rowProps:T,expandedRowRender:E,expandedRowClassName:D}=y,O;if(C&&w){let e=E(u,r,d+1,w),t=iJ(D,u,r,d),n={};g&&(n={style:{"--virtual-width":`${_}px`}});let i=`${h}-expanded-row-cell`;O=S.createElement(b,{className:J(`${h}-expanded-row`,`${h}-expanded-row-level-${d+1}`,t)},S.createElement(zq,{component:x,prefixCls:h,className:J(i,{[`${i}-fixed`]:g}),additionalProps:n},e))}let k={...o,width:p};s&&(k.position=`absolute`,k.pointerEvents=`none`);let A=S.createElement(b,nY({},T,l,{"data-row-key":a,ref:C?null:t,className:J(i,`${h}-row`,T?.className,{[`${h}-row-extra`]:s}),style:{...k,...T?.style}}),m.map((e,t)=>S.createElement(tY,{key:t,component:x,rowInfo:y,column:e,colIndex:t,indent:d,index:r,renderIndex:f,record:u,inverse:s,getHeight:c})));return C?S.createElement(`div`,{ref:t},A,O):A})),iY=wq(S.forwardRef((e,t)=>{let{data:n,onScroll:r}=e,{flattenColumns:i,onColumnResize:a,getRowKey:o,expandedKeys:s,prefixCls:c,childrenColumnName:l,scrollX:u,direction:d}=bq(Eq,[`flattenColumns`,`onColumnResize`,`getRowKey`,`prefixCls`,`expandedKeys`,`childrenColumnName`,`scrollX`,`direction`]),{sticky:f,scrollY:p,listItemHeight:m,getComponent:h,onScroll:g}=bq(ZJ),_=S.useRef(null),v=$q(n,l,s,o),y=S.useMemo(()=>{let e=0;return i.map(({width:t,minWidth:n,key:r})=>{let i=Math.max(t||0,n||0);return e+=i,[r,i,e]})},[i]),b=S.useMemo(()=>y.map(e=>e[2]),[y]);S.useEffect(()=>{y.forEach(([e,t])=>{a(e,t)})},[y]),S.useImperativeHandle(t,()=>{let e={scrollTo:e=>{let{offset:t,...n}=e;t?_.current?.scrollTo({...n,offset:t,align:`top`}):_.current?.scrollTo(e)},nativeElement:_.current?.nativeElement};return Object.defineProperty(e,`scrollLeft`,{get:()=>_.current?.getScrollInfo().x||0,set:e=>{_.current?.scrollTo({left:e})}}),Object.defineProperty(e,`scrollTop`,{get:()=>_.current?.getScrollInfo().y||0,set:e=>{_.current?.scrollTo({top:e})}}),e});let x=(e,t)=>{let n=v[t]?.record,{onCell:r}=e;return r?r(n,t)?.rowSpan??1:1},C=e=>{let{start:t,end:n,getSize:r,offsetY:a}=e;if(n<0)return null;let s=i.filter(e=>x(e,t)===0),c=t;for(let e=t;e>=0;--e)if(s=s.filter(t=>x(t,e)===0),!s.length){c=e;break}let l=i.filter(e=>x(e,n)!==1),u=n;for(let e=n;ex(t,e)!==1),!l.length){u=Math.max(e-1,n);break}let d=[];for(let e=c;e<=u;e+=1)v[e]&&i.some(t=>x(t,e)>1)&&d.push(e);return d.map(e=>{let t=v[e],n=o(t.record,e),i=t=>{let i=e+t-1,a=v[i];if(!a||!a.record){let e=Math.min(i,v.length-1),t=v[e],a=r(n,o(t.record,e));return a.bottom-a.top}let s=r(n,o(a.record,i));return s.bottom-s.top},s=r(n);return S.createElement(rY,{key:e,data:t,rowKey:n,index:e,style:{top:-a+s.top},extra:!0,getHeight:i})})},w=S.useMemo(()=>({columnsOffset:b}),[b]),T=`${c}-tbody`,E=h([`body`,`wrapper`]),D={};return f&&(D.position=`sticky`,D.bottom=0,typeof f==`object`&&f.offsetScroll&&(D.bottom=f.offsetScroll)),S.createElement(QJ.Provider,{value:w},S.createElement(LS,{fullHeight:!1,ref:_,prefixCls:`${T}-virtual`,styles:{horizontalScrollBar:D},className:T,height:p,itemHeight:m||24,data:v,itemKey:e=>o(e.record),component:E,scrollWidth:u,direction:d,onVirtualScroll:({x:e})=>{r({currentTarget:_.current?.nativeElement,scrollLeft:e})},onScroll:g,extraRender:C},(e,t,n)=>{let r=o(e.record,t);return S.createElement(rY,{data:e,rowKey:r,index:t,style:n.style})}))}));function aY(){return aY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{ref:n,onScroll:r}=t;return S.createElement(iY,{ref:n,data:e,onScroll:r})},sY=S.forwardRef((e,t)=>{let{data:n,columns:r,scroll:i,sticky:a,prefixCls:o=WJ,className:s,listItemHeight:c,components:l,onScroll:u}=e,{x:d,y:f}=i||{};typeof d!=`number`&&(d=1),typeof f!=`number`&&(f=500);let p=zn((e,t)=>Ai(l,e)||t),m=zn(u),h=S.useMemo(()=>({sticky:a,scrollY:f,listItemHeight:c,getComponent:p,onScroll:m}),[a,f,c,p,m]);return S.createElement(ZJ.Provider,{value:h},S.createElement(XJ,aY({},e,{className:J(s,`${o}-virtual`),scroll:{...i,x:d},components:{...l,body:n?.length?oY:void 0},columns:r,internalHooks:vq,tailor:!0,ref:t})))}),cY=e=>Cq(sY,e);cY();var lY=e=>null,uY=e=>null,dY=S.createContext(null),fY=S.createContext({}),pY=S.memo(({prefixCls:e,level:t,isStart:n,isEnd:r})=>{let i=`${e}-indent-unit`,a=[];for(let e=0;e{let{eventKey:t,className:n,style:r,dragOver:i,dragOverGapTop:a,dragOverGapBottom:o,isLeaf:s,isStart:c,isEnd:l,expanded:u,selected:d,checked:f,halfChecked:p,loading:m,domRef:h,active:g,data:_,onMouseMove:v,selectable:y,treeId:b,...x}=e,C=Jn(b,t),w=S.useContext(dY),{classNames:T,styles:E}=w||{},D=S.useContext(fY),O=S.useRef(null),[k,A]=S.useState(!1),j=!!(w.disabled||e.disabled||D.nodeDisabled?.(_)),M=S.useMemo(()=>!w.checkable||e.checkable===!1?!1:w.checkable,[w.checkable,e.checkable]),N=t=>{j||w.onNodeSelect(t,HL(e))},P=t=>{j||!M||e.disableCheckbox||w.onNodeCheck(t,HL(e),!f)},F=S.useMemo(()=>typeof y==`boolean`?y:w.selectable,[y,w.selectable]),I=t=>{w.onNodeClick(t,HL(e)),F?N(t):P(t)},L=t=>{w.onNodeDoubleClick(t,HL(e))},R=t=>{w.onNodeMouseEnter(t,HL(e))},z=t=>{w.onNodeMouseLeave(t,HL(e))},B=t=>{w.onNodeContextMenu(t,HL(e))},V=S.useMemo(()=>!!(w.draggable&&(!w.draggable.nodeDraggable||w.draggable.nodeDraggable(_))),[w.draggable,_]),H=t=>{t.stopPropagation(),A(!0),w.onNodeDragStart(t,e);try{t.dataTransfer.setData(`text/plain`,``)}catch{}},U=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragEnter(t,e)},ee=t=>{t.preventDefault(),t.stopPropagation(),w.onNodeDragOver(t,e)},W=t=>{t.stopPropagation(),w.onNodeDragLeave(t,e)},te=t=>{t.stopPropagation(),A(!1),w.onNodeDragEnd(t,e)},G=t=>{t.preventDefault(),t.stopPropagation(),A(!1),w.onNodeDrop(t,e)},ne=t=>{m||w.onNodeExpand(t,HL(e))},K=S.useMemo(()=>{let{children:e}=NL(w.keyEntities,t)||{};return!!(e||[]).length},[w.keyEntities,t]),re=S.useMemo(()=>BL(s,w.loadData,K,e.loaded),[s,w.loadData,K,e.loaded]);S.useEffect(()=>{m||typeof w.loadData==`function`&&u&&!re&&!e.loaded&&w.onNodeLoad(HL(e))},[m,w.loadData,w.onNodeLoad,u,re,e]);let ie=S.useMemo(()=>w.draggable?.icon?S.createElement(`span`,{className:`${w.prefixCls}-draggable-icon`},w.draggable.icon):null,[w.draggable]),ae=t=>{let n=e.switcherIcon||w.switcherIcon;return typeof n==`function`?n({...e,isLeaf:t}):n},q=()=>{if(re){let e=ae(!0);return e===!1?null:S.createElement(`span`,{className:J(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher-noop`)},e)}let e=ae(!1);return e===!1?null:S.createElement(`span`,{onClick:ne,className:J(`${w.prefixCls}-switcher`,`${w.prefixCls}-switcher_${u?hY:gY}`)},e)},oe=S.useMemo(()=>{if(!M)return null;let t=typeof M==`boolean`?null:M;return S.createElement(`span`,{className:J(`${w.prefixCls}-checkbox`,{[`${w.prefixCls}-checkbox-checked`]:f,[`${w.prefixCls}-checkbox-indeterminate`]:!f&&p,[`${w.prefixCls}-checkbox-disabled`]:j||e.disableCheckbox}),onClick:P,role:`checkbox`,"aria-checked":p?`mixed`:f,"aria-disabled":j||e.disableCheckbox,"aria-labelledby":C},t)},[M,f,p,j,e.disableCheckbox,C]),se=S.useMemo(()=>re?null:u?hY:gY,[re,u]),ce=S.useMemo(()=>S.createElement(`span`,{className:J(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__${se||`docu`}`,{[`${w.prefixCls}-icon_loading`]:m}),style:E?.itemIcon}),[w.prefixCls,se,m]),le=S.useMemo(()=>{let n=!!w.draggable;return!e.disabled&&n&&w.dragOverNodeKey===t?w.dropIndicatorRender({dropPosition:w.dropPosition,dropLevelOffset:w.dropLevelOffset,indent:w.indent,prefixCls:w.prefixCls,direction:w.direction}):null},[w.dropPosition,w.dropLevelOffset,w.indent,w.prefixCls,w.direction,w.draggable,w.dragOverNodeKey,w.dropIndicatorRender]),ue=S.useMemo(()=>{let{title:t=_Y}=e,n=`${w.prefixCls}-node-content-wrapper`,r;if(w.showIcon){let t=e.icon||w.icon;r=t?S.createElement(`span`,{className:J(T?.itemIcon,`${w.prefixCls}-iconEle`,`${w.prefixCls}-icon__customize`),style:E?.itemIcon},typeof t==`function`?t(e):t):ce}else w.loadData&&m&&(r=ce);let i;return i=typeof t==`function`?t(_):w.titleRender?w.titleRender(_):t,S.createElement(`span`,{ref:O,title:typeof t==`string`?t:``,className:J(n,`${n}-${se||`normal`}`,{[`${w.prefixCls}-node-selected`]:!j&&(d||k)}),onMouseEnter:R,onMouseLeave:z,onContextMenu:B,onClick:I,onDoubleClick:L},r,S.createElement(`span`,{className:J(`${w.prefixCls}-title`,T?.itemTitle),style:E?.itemTitle},i),le)},[w.prefixCls,w.showIcon,e,w.icon,ce,w.titleRender,_,se,R,z,B,I,L]),de=xi(x,{aria:!0,data:!0}),{level:fe}=NL(w.keyEntities,t)||{},pe=l[l.length-1],me=!j&&V,he=w.draggingNodeKey===t;return S.createElement(`div`,mY({ref:h,role:`treeitem`,id:C,"aria-expanded":re?void 0:u,"aria-selected":F&&!j?d:void 0,"aria-checked":M&&!j?p?`mixed`:f:void 0,"aria-disabled":j,className:J(n,`${w.prefixCls}-treenode`,T?.item,{[`${w.prefixCls}-treenode-disabled`]:j,[`${w.prefixCls}-treenode-switcher-${u?`open`:`close`}`]:!s,[`${w.prefixCls}-treenode-checkbox-checked`]:f,[`${w.prefixCls}-treenode-checkbox-indeterminate`]:p,[`${w.prefixCls}-treenode-selected`]:d,[`${w.prefixCls}-treenode-loading`]:m,[`${w.prefixCls}-treenode-active`]:g,[`${w.prefixCls}-treenode-leaf-last`]:pe,[`${w.prefixCls}-treenode-draggable`]:V,dragging:he,"drop-target":w.dropTargetKey===t,"drop-container":w.dropContainerKey===t,"drag-over":!j&&i,"drag-over-gap-top":!j&&a,"drag-over-gap-bottom":!j&&o,"filter-node":w.filterTreeNode?.(HL(e)),[`${w.prefixCls}-treenode-leaf`]:re}),style:{...r,...E?.item},draggable:me,onDragStart:me?H:void 0,onDragEnter:V?U:void 0,onDragOver:V?ee:void 0,onDragLeave:V?W:void 0,onDrop:V?G:void 0,onDragEnd:V?te:void 0,onMouseMove:v},de),S.createElement(pY,{prefixCls:w.prefixCls,level:fe,isStart:c,isEnd:l}),ie,q(),oe,ue)};vY.isTreeNode=1;function yY(e,t){if(!e)return[];let n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function bY(e,t){let n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function xY(e){return e.split(`-`)}function SY(e,t){let n=[],r=NL(t,e);function i(e=[]){e.forEach(({key:e,children:t})=>{n.push(e),i(t)})}return i(r.children),n}function CY(e){if(e.parent){let t=xY(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function wY(e){let t=xY(e.pos);return Number(t[t.length-1])===0}function TY(e,t,n,r,i,a,o,s,c,l){let{clientX:u,clientY:d}=e,{top:f,height:p}=e.target.getBoundingClientRect(),m=((l===`rtl`?-1:1)*((i?.x||0)-u)-12)/r,h=c.filter(e=>s[e]?.children?.length),g=NL(s,n.eventKey);if(de.key===g.key),t=o[e<=0?0:e-1].key;g=NL(s,t)}let _=g.key,v=g,y=g.key,b=0,x=0;if(!h.includes(_))for(let e=0;e-1.5?a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:0})?b=0:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1:a({dragNode:S,dropNode:C,dropPosition:1})?b=1:w=!1,{dropPosition:b,dropLevelOffset:x,dropTargetKey:g.key,dropTargetPos:g.pos,dragOverNodeKey:y,dropContainerKey:b===0?null:g.parent?.key||null,dropAllowed:w}}function EY(e,t){if(!e)return;let{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function DY(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e==`object`)t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return ui(!1,"`checkedKeys` is not an array or an object"),null;return t}function OY(e,t){let n=new Set;function r(e){if(n.has(e))return;let i=NL(t,e);if(!i)return;n.add(e);let{parent:a,node:o}=i;o.disabled||a&&r(a.key)}return(e||[]).forEach(e=>{r(e)}),[...n]}var kY={},AY=`SELECT_ALL`,jY=`SELECT_INVERT`,MY=`SELECT_NONE`,NY=[],PY=(e,t,n=[])=>((t||[]).forEach(t=>{n.push(t),nf(t)&&e in t&&PY(e,t[e],n)}),n),FY=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:i,getCheckboxProps:a,getTitleCheckboxProps:o,onChange:s,onSelect:c,onSelectAll:l,onSelectInvert:u,onSelectNone:d,onSelectMultiple:f,columnWidth:p,type:m,selections:h,fixed:g,renderCell:_,hideSelectAll:v,checkStrictly:y=!0}=t||{},{prefixCls:b,data:x,pageData:C,getRecordByKey:w,getRowKey:T,expandType:E,childrenColumnName:D,locale:O,getPopupContainer:k}=e,A=Gi(`Table`),[j,M]=wf(e=>e),[N,P]=Gn(i||NY,r),F=N??NY,I=S.useRef(new Map),L=(0,S.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=w(e);!n&&I.current.has(e)&&(n=I.current.get(e)),t.set(e,n)}),I.current=t}},[w,n]);S.useEffect(()=>{L(F)},[F,L]);let R=(0,S.useMemo)(()=>PY(D,C),[D,C]),{keyEntities:z}=(0,S.useMemo)(()=>{if(y)return{keyEntities:null};let e=x;if(n){let t=new Set(R.map(T)),n=Array.from(I.current).reduce((e,[n,r])=>t.has(n)?e:e.concat(r),[]);e=[].concat(pa(e),pa(n))}return zL(e,{externalGetKey:T,childrenPropName:D})},[x,T,y,D,n,R]),B=(0,S.useMemo)(()=>{let e=new Map;return R.forEach((t,n)=>{let r=T(t,n),i=(a?a(t):null)||{};e.set(r,i)}),e},[R,T,a]),V=(0,S.useCallback)(e=>{let t=T(e),n;return n=B.has(t)?B.get(T(e)):a?a(e):void 0,!!n?.disabled},[B,T]),[H,U]=(0,S.useMemo)(()=>{if(y)return[F,[]];let{checkedKeys:e,halfCheckedKeys:t}=GL(F,!0,z,V);return[e||[],t]},[F,y,z,V]),ee=(0,S.useMemo)(()=>{let e=m===`radio`?H.slice(0,1):H;return new Set(e)},[H,m]),W=(0,S.useMemo)(()=>m===`radio`?new Set:new Set(U),[U,m]);S.useEffect(()=>{t||P(NY)},[!!t]);let te=(0,S.useCallback)((e,t)=>{let r,i;L(e),n?(r=e,i=e.map(e=>I.current.get(e))):(r=[],i=[],e.forEach(e=>{let t=w(e);t!==void 0&&(r.push(e),i.push(t))})),P(r),s?.(r,i,{type:t})},[P,w,s,n]),G=(0,S.useCallback)((e,t,n,r)=>{if(c){let i=n.map(w);c(w(e),t,i,r)}te(n,`single`)},[c,w,te]),ne=(0,S.useMemo)(()=>!h||v?null:(h===!0?[AY,jY,MY]:h).map(e=>e===`SELECT_ALL`?{key:`all`,text:O.selectionAll,onSelect(){te(x.map((e,t)=>T(e,t)).filter(e=>!B.get(e)?.disabled||ee.has(e)),`all`)}}:e===`SELECT_INVERT`?{key:`invert`,text:O.selectInvert,onSelect(){let e=new Set(ee);C.forEach((t,n)=>{let r=T(t,n);B.get(r)?.disabled||(e.has(r)?e.delete(r):e.add(r))});let t=Array.from(e);u&&(A.deprecated(!1,`onSelectInvert`,`onChange`),u(t)),te(t,`invert`)}}:e===`SELECT_NONE`?{key:`none`,text:O.selectNone,onSelect(){d?.(),te(Array.from(ee).filter(e=>B.get(e)?.disabled),`none`)}}:e).map(e=>({...e,onSelect:(...t)=>{e.onSelect?.(...t),M(null)}})),[h,v,O.selectionAll,O.selectInvert,O.selectNone,B,ee,x,C,T,u,te]);return[(0,S.useCallback)(e=>{if(!t)return e.filter(e=>e!==kY);let n=pa(e),r=new Set(ee),i=R.map(T).filter(e=>!B.get(e).disabled),a=i.every(e=>r.has(e)),s=i.some(e=>r.has(e)),c=()=>{let e=[];a?i.forEach(t=>{r.delete(t),e.push(t)}):i.forEach(t=>{r.has(t)||(r.add(t),e.push(t))});let t=Array.from(r);l?.(!a,t.map(w),e.map(w)),te(t,`all`),M(null)},u,d;if(m!==`radio`){let e;if(ne){let t={getPopupContainer:k,items:ne.map((e,t)=>{let{key:n,text:r,onSelect:a}=e;return{key:n??t,onClick:()=>{a?.(i)},label:r}})};e=S.createElement(`div`,{className:`${b}-selection-extra`},S.createElement(xV,{menu:t,getPopupContainer:k},S.createElement(`span`,null,S.createElement(jC,null))))}let t=R.map((e,t)=>{let n=T(e,t),i=B.get(n)||{};return{checked:r.has(n),...i}}).filter(({disabled:e})=>e),n=!!t.length&&t.length===R.length,l=n&&t.every(({checked:e})=>e),f=n&&t.some(({checked:e})=>e),p=o?.()||{},{onChange:m,disabled:h}=p;d=S.createElement(pR,{"aria-label":e?`Custom selection`:`Select all`,...p,checked:n?l:!!R.length&&a,indeterminate:n?!l&&f:!a&&s,onChange:e=>{c(),m?.(e)},disabled:h??(R.length===0||n),skipGroup:!0}),u=!v&&S.createElement(`div`,{className:`${b}-selection`},d,e)}let x;x=m===`radio`?(e,t,n)=>{let i=T(t,n),a=r.has(i),o=B.get(i);return{node:S.createElement(KF,{...o,checked:a,onClick:e=>{e.stopPropagation(),o?.onClick?.(e)},onChange:e=>{r.has(i)||G(i,!0,[i],e.nativeEvent),o?.onChange?.(e)}}),checked:a}}:(e,t,n)=>{let a=T(t,n),o=r.has(a),s=W.has(a),c=B.get(a),l;return l=E===`nest`?s:c?.indeterminate??s,{node:S.createElement(pR,{...c,indeterminate:l,checked:o,skipGroup:!0,onClick:e=>{e.stopPropagation(),c?.onClick?.(e)},onChange:e=>{let{nativeEvent:t}=e,{shiftKey:n}=t,s=i.indexOf(a),l=H.some(e=>i.includes(e));if(n&&y&&l){let e=j(s,i,r),t=Array.from(r);f?.(!o,t.map(w),e.map(w)),te(t,`multiple`)}else{let e=H;if(y){let n=o?yY(e,a):bY(e,a);G(a,!o,n,t)}else{let{checkedKeys:n,halfCheckedKeys:r}=GL([].concat(pa(e),[a]),!0,z,V),i=n;if(o){let e=new Set(n);e.delete(a),i=GL(Array.from(e),{checked:!1,halfCheckedKeys:r},z,V).checkedKeys}G(a,!o,i,t)}}M(o?null:s),c?.onChange?.(e)}}),checked:o}};let C=(e,t,n)=>{let{node:r,checked:i}=x(e,t,n);return _?_(i,t,n,r):r};if(!n.includes(kY))if(n.findIndex(e=>e.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`)===0){let[e,...t]=n;n=[e,kY].concat(pa(t))}else n=[kY].concat(pa(n));let D=n.indexOf(kY);n=n.filter((e,t)=>e!==kY||t===D);let O=n[D-1],A=n[D+1],N=g;N===void 0&&(A?.fixed===void 0?O?.fixed!==void 0&&(N=O.fixed):N=A.fixed),N&&O&&O.RC_TABLE_INTERNAL_COL_DEFINE?.columnType===`EXPAND_COLUMN`&&O.fixed===void 0&&(O.fixed=N);let P=J(`${b}-selection-col`,{[`${b}-selection-col-with-dropdown`]:h&&m===`checkbox`}),F={fixed:N,width:p,className:`${b}-selection-column`,title:t?.columnTitle?typeof t.columnTitle==`function`?t.columnTitle(d):t.columnTitle:u,render:C,onCell:t.onCell,align:t.align,[dJ]:{className:P}};return n.map(e=>e===kY?F:e)},[T,R,t,H,ee,W,p,ne,E,B,f,G,V]),ee]};function IY(e){return t=>{let{prefixCls:n,onExpand:r,record:i,expanded:a,expandable:o}=t,s=`${n}-row-expand-icon`;return S.createElement(`button`,{type:`button`,onClick:e=>{r(i,e),e.stopPropagation()},className:J(s,{[`${s}-spaced`]:!o,[`${s}-expanded`]:o&&a,[`${s}-collapsed`]:o&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function LY(e){return(t,n)=>{let r=t.querySelector(`.${e}-container`),i=n;if(r){let e=getComputedStyle(r),t=Number.parseInt(e.borderLeftWidth,10),a=Number.parseInt(e.borderRightWidth,10);i=n-t-a}return i}}var RY=(e,t)=>`key`in e&&$d(e.key)?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join(`.`):e.dataIndex:t;function zY(e,t){return t?`${t}-${e}`:`${e}`}var BY=(e,t)=>typeof e==`function`?e(t):e,VY=(e,t)=>{let n=BY(e,t);return Object.prototype.toString.call(n)===`[object Object]`?``:n},HY=c(o((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:`M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z`}}]},name:`filter`,theme:`filled`}}))());function UY(){return UY=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,UY({},e,{ref:t,icon:HY.default}))),GY=e=>{let{dropPosition:t,dropLevelOffset:n,indent:r}=e,i={pointerEvents:`none`,position:`absolute`,right:0,backgroundColor:`red`,height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return S.createElement(`div`,{style:i})};function KY(e,t){let[n,r]=S.useState(!1);Hn(()=>{if(n)return e(),()=>{t()}},[n]),Hn(()=>(r(!0),()=>{r(!1)}),[])}function qY(){return qY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:n,style:r,motion:i,motionNodes:a,motionType:o,onMotionStart:s,onMotionEnd:c,active:l,treeNodeRequiredProps:u,...d}=e,[f,p]=S.useState(!0),{prefixCls:m}=S.useContext(dY),h=a&&o!==`hide`;Hn(()=>{a&&h!==f&&p(h)},[a]);let g=()=>{a&&s()},_=S.useRef(!1),v=()=>{a&&!_.current&&(_.current=!0,c())};return KY(g,v),a?S.createElement(Od,qY({ref:t,visible:f},i,{motionAppear:o===`show`,onVisibleChanged:e=>{h===e&&v()}}),({className:e,style:t},n)=>S.createElement(`div`,{ref:n,className:J(`${m}-treenode-motion`,e),style:t},a.map(e=>{let{data:{...t},title:n,key:r,isStart:i,isEnd:a}=e;delete t.children;let o=VL(r,u);return S.createElement(vY,qY({},t,o,{title:n,active:l,data:e.data,key:r,isStart:i,isEnd:a}))}))):S.createElement(vY,qY({domRef:t,className:n,style:r},d,{active:l}))});function YY(e=[],t=[]){let n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(e,t){let n=new Map;e.forEach(e=>{n.set(e,!0)});let r=t.filter(e=>!n.has(e));return r.length===1?r[0]:null}return ne.key===n)+1],i=t.findIndex(e=>e.key===n);if(r){let e=t.findIndex(e=>e.key===r.key);return t.slice(i+1,e)}return t.slice(i+1)}function ZY(){return ZY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,data:r,selectable:i,checkable:a,expandedKeys:o,selectedKeys:s,checkedKeys:c,loadedKeys:l,loadingKeys:u,halfCheckedKeys:d,keyEntities:f,disabled:p,dragging:m,dragOverNodeKey:h,dropPosition:g,motion:_,height:v,itemHeight:y,virtual:b,scrollWidth:x,focusable:C,activeItem:w,tabIndex:T,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onActiveChange:j,onListChangeStart:M,onListChangeEnd:N,...P}=e,F=Xn(),I=S.useRef(null),L=S.useRef(null);S.useImperativeHandle(t,()=>({scrollTo:e=>{I.current.scrollTo(e)},getIndentWidth:()=>L.current.offsetWidth}));let[R,z]=S.useState(o),[B,V]=S.useState(r),[H,U]=S.useState(r),[ee,W]=S.useState([]),[te,G]=S.useState(null),ne=S.useRef(r);ne.current=r;function K(){let e=ne.current;V(e),U(e),W([]),G(null),N()}Hn(()=>{z(o);let e=YY(R,o);if(e.key!==null)if(e.add){let t=B.findIndex(({key:t})=>t===e.key),n=nX(XY(B,r,e.key),b,v,y),i=B.slice();i.splice(t+1,0,tX),U(i),W(n),G(`show`)}else{let t=r.findIndex(({key:t})=>t===e.key),n=nX(XY(r,B,e.key),b,v,y),i=r.slice();i.splice(t+1,0,tX),U(i),W(n),G(`hide`)}else B!==r&&(V(r),U(r))},[o,r]),S.useEffect(()=>{m||K()},[m]);let re=_?H:r,ie={expandedKeys:o,selectedKeys:s,loadedKeys:l,loadingKeys:u,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:h,dropPosition:g,keyEntities:f};return S.createElement(S.Fragment,null,S.createElement(`div`,{className:`${n}-treenode`,"aria-hidden":!0,style:{position:`absolute`,pointerEvents:`none`,visibility:`hidden`,height:0,overflow:`hidden`,border:0,padding:0}},S.createElement(`div`,{className:`${n}-indent`},S.createElement(`div`,{ref:L,className:`${n}-indent-unit`}))),S.createElement(LS,ZY({},P,{data:re,itemKey:rX,height:v,fullHeight:!1,virtual:b,itemHeight:y,scrollWidth:x,prefixCls:`${n}-list`,ref:I,role:`tree`,tabIndex:C!==!1&&!p?T:void 0,"aria-activedescendant":w?Jn(F,w.key):void 0,onKeyDown:E,onFocus:D,onBlur:O,onMouseDown:k,onMouseUp:A,onVisibleChange:e=>{e.every(e=>rX(e)!==QY)&&K()}}),e=>{let{pos:t,data:{...n},title:r,key:i,isStart:a,isEnd:o}=e,s=FL(i,t);delete n.key,delete n.children;let c=VL(s,ie);return S.createElement(JY,ZY({},n,c,{title:r,active:!!w&&i===w.key,pos:t,data:e.data,isStart:a,isEnd:o,motion:_,motionNodes:i===QY?ee:null,motionType:te,onMotionStart:M,onMotionEnd:K,treeNodeRequiredProps:ie,treeId:F,onMouseMove:()=>{j(null)}}))}))});function aX(){return aX=Object.assign?Object.assign.bind():function(e){for(var t=1;t!0,expandAction:!1};static TreeNode=vY;destroyed=!1;delayedDragEnterLogic;loadingRetryTimes={};state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],activeKey:null,listChanging:!1,prevProps:null,fieldNames:IL()};dragStartMousePosition=null;dragNodeProps=null;currentMouseOverDroppableNodeKey=null;focusedByMouse=!1;listRef=S.createRef();componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){let{activeKey:e,itemScrollOffset:t=0}=this.props;e!==void 0&&e!==this.state.activeKey&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:t}))}componentWillUnmount(){window.removeEventListener(`dragend`,this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(e,t){let{prevProps:n}=t,r={prevProps:e};function i(t){return!n&&e.hasOwnProperty(t)||n&&n[t]!==e[t]}let a,{fieldNames:o}=t;if(i(`fieldNames`)&&(o=IL(e.fieldNames),r.fieldNames=o),i(`treeData`)?{treeData:a}=e:i(`children`)&&(ui(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=LL(e.children)),a){r.treeData=a;let e=zL(a,{fieldNames:o});r.keyEntities={[QY]:eX,...e.keyEntities}}let s=r.keyEntities||t.keyEntities;if(i(`expandedKeys`)||n&&i(`autoExpandParent`))r.expandedKeys=e.autoExpandParent||!n&&e.defaultExpandParent?OY(e.expandedKeys,s):e.expandedKeys;else if(!n&&e.defaultExpandAll){let e={...s};delete e[QY];let t=[];Object.keys(e).forEach(n=>{let r=e[n];r.children&&r.children.length&&t.push(r.key)}),r.expandedKeys=t}else !n&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?OY(e.defaultExpandedKeys,s):e.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,(a||r.expandedKeys)&&(r.flattenNodes=RL(a||t.treeData,r.expandedKeys||t.expandedKeys,o)),e.selectable&&(i(`selectedKeys`)?r.selectedKeys=EY(e.selectedKeys,e):!n&&e.defaultSelectedKeys&&(r.selectedKeys=EY(e.defaultSelectedKeys,e))),e.checkable){let o;if(i(`checkedKeys`)?o=DY(e.checkedKeys)||{}:!n&&e.defaultCheckedKeys?o=DY(e.defaultCheckedKeys)||{}:a&&(o=DY(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),o){let{checkedKeys:t=[],halfCheckedKeys:n=[]}=o;if(!e.checkStrictly){let e=GL(t,!0,s);({checkedKeys:t,halfCheckedKeys:n}=e)}r.checkedKeys=t,r.halfCheckedKeys=n}}return i(`loadedKeys`)&&(r.loadedKeys=e.loadedKeys),r}onNodeDragStart=(e,t)=>{let{expandedKeys:n,keyEntities:r}=this.state,{onDragStart:i}=this.props,{eventKey:a}=t;this.dragNodeProps=t,this.dragStartMousePosition={x:e.clientX,y:e.clientY};let o=yY(n,a);this.setState({draggingNodeKey:a,dragChildrenKeys:SY(a,r),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(o),window.addEventListener(`dragend`,this.onWindowDragEnd),i?.({event:e,node:HL(t)})};onNodeDragEnter=(e,t)=>{let{expandedKeys:n,keyEntities:r,dragChildrenKeys:i,flattenNodes:a,indent:o}=this.state,{onDragEnter:s,onExpand:c,allowDrop:l,direction:u}=this.props,{pos:d,eventKey:f}=t;if(this.currentMouseOverDroppableNodeKey!==f&&(this.currentMouseOverDroppableNodeKey=f),!this.dragNodeProps){this.resetDragState();return}let{dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v,dragOverNodeKey:y}=TY(e,this.dragNodeProps,t,o,this.dragStartMousePosition,l,a,r,n,u);if(i.includes(h)||!v){this.resetDragState();return}if(this.delayedDragEnterLogic||={},Object.keys(this.delayedDragEnterLogic).forEach(e=>{clearTimeout(this.delayedDragEnterLogic[e])}),this.dragNodeProps.eventKey!==t.eventKey&&(e.persist(),this.delayedDragEnterLogic[d]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let i=[...n],a=NL(r,t.eventKey);a&&(a.children||[]).length&&(i=bY(n,t.eventKey)),this.props.hasOwnProperty(`expandedKeys`)||this.setExpandedKeys(i),c?.(i,{node:HL(t),expanded:!0,nativeEvent:e.nativeEvent})},800)),this.dragNodeProps.eventKey===h&&m===0){this.resetDragState();return}this.setState({dragOverNodeKey:y,dropPosition:p,dropLevelOffset:m,dropTargetKey:h,dropContainerKey:g,dropTargetPos:_,dropAllowed:v}),s?.({event:e,node:HL(t),expandedKeys:n})};onNodeDragOver=(e,t)=>{let{dragChildrenKeys:n,flattenNodes:r,keyEntities:i,expandedKeys:a,indent:o}=this.state,{onDragOver:s,allowDrop:c,direction:l}=this.props;if(!this.dragNodeProps)return;let{dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}=TY(e,this.dragNodeProps,t,o,this.dragStartMousePosition,c,r,i,a,l);n.includes(f)||!h||(this.dragNodeProps.eventKey===f&&d===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():u===this.state.dropPosition&&d===this.state.dropLevelOffset&&f===this.state.dropTargetKey&&p===this.state.dropContainerKey&&m===this.state.dropTargetPos&&h===this.state.dropAllowed&&g===this.state.dragOverNodeKey||this.setState({dropPosition:u,dropLevelOffset:d,dropTargetKey:f,dropContainerKey:p,dropTargetPos:m,dropAllowed:h,dragOverNodeKey:g}),s?.({event:e,node:HL(t)}))};onNodeDragLeave=(e,t)=>{this.currentMouseOverDroppableNodeKey===t.eventKey&&!e.currentTarget.contains(e.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);let{onDragLeave:n}=this.props;n?.({event:e,node:HL(t)})};onWindowDragEnd=e=>{this.onNodeDragEnd(e,null,!0),window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDragEnd=(e,t)=>{let{onDragEnd:n}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),n?.({event:e,node:HL(t)}),this.dragNodeProps=null,window.removeEventListener(`dragend`,this.onWindowDragEnd)};onNodeDrop=(e,t,n=!1)=>{let{dragChildrenKeys:r,dropPosition:i,dropTargetKey:a,dropTargetPos:o,dropAllowed:s}=this.state;if(!s)return;let{onDrop:c}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),a===null)return;let l={...VL(a,this.getTreeNodeRequiredProps()),active:this.getActiveItem()?.key===a,data:NL(this.state.keyEntities,a).node};ui(!r.includes(a),`Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.`);let u=xY(o),d={event:e,node:HL(l),dragNode:this.dragNodeProps?HL(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(r),dropToGap:i!==0,dropPosition:i+Number(u[u.length-1])};n||c?.(d),this.dragNodeProps=null};resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}cleanDragState=()=>{let{draggingNodeKey:e}=this.state;e!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null};triggerExpandActionExpand=(e,t)=>{let{expandedKeys:n,flattenNodes:r}=this.state,{expanded:i,key:a,isLeaf:o}=t;if(o||e.shiftKey||e.metaKey||e.ctrlKey)return;let s=r.filter(e=>e.key===a)[0],c=HL({...VL(a,this.getTreeNodeRequiredProps()),data:s.data});this.setExpandedKeys(i?yY(n,a):bY(n,a)),this.onNodeExpand(e,c)};onNodeClick=(e,t)=>{let{onClick:n,expandAction:r}=this.props;r===`click`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeDoubleClick=(e,t)=>{let{onDoubleClick:n,expandAction:r}=this.props;r===`doubleClick`&&this.triggerExpandActionExpand(e,t),n?.(e,t)};onNodeSelect=(e,t)=>{let{selectedKeys:n}=this.state,{keyEntities:r,fieldNames:i}=this.state,{onSelect:a,multiple:o}=this.props,{selected:s}=t,c=t[i.key],l=!s;n=l?o?bY(n,c):[c]:yY(n,c);let u=n.map(e=>{let t=NL(r,e);return t?t.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:n}),a?.(n,{event:`select`,selected:l,node:t,selectedNodes:u,nativeEvent:e.nativeEvent})};onNodeCheck=(e,t,n)=>{let{keyEntities:r,checkedKeys:i,halfCheckedKeys:a}=this.state,{checkStrictly:o,onCheck:s}=this.props,{key:c}=t,l,u={event:`check`,node:t,checked:n,nativeEvent:e.nativeEvent};if(o){let e=n?bY(i,c):yY(i,c);l={checked:e,halfChecked:yY(a,c)},u.checkedNodes=e.map(e=>NL(r,e)).filter(Boolean).map(e=>e.node),this.setUncontrolledState({checkedKeys:e})}else{let{checkedKeys:e,halfCheckedKeys:t}=GL([...i,c],!0,r);if(!n){let n=new Set(e);n.delete(c),{checkedKeys:e,halfCheckedKeys:t}=GL(Array.from(n),{checked:!1,halfCheckedKeys:t},r)}l=e,u.checkedNodes=[],u.checkedNodesPositions=[],u.halfCheckedKeys=t,e.forEach(e=>{let t=NL(r,e);if(!t)return;let{node:n,pos:i}=t;u.checkedNodes.push(n),u.checkedNodesPositions.push({node:n,pos:i})}),this.setUncontrolledState({checkedKeys:e},!1,{halfCheckedKeys:t})}s?.(l,u)};onNodeLoad=e=>{let{key:t}=e,{keyEntities:n}=this.state;if(NL(n,t)?.children?.length)return;let r=new Promise((n,r)=>{this.setState(({loadedKeys:i=[],loadingKeys:a=[]})=>{let{loadData:o,onLoad:s}=this.props;return!o||i.includes(t)||a.includes(t)?null:(o(e).then(()=>{let{loadedKeys:r}=this.state,i=bY(r,t);s?.(i,{event:`load`,node:e}),this.setUncontrolledState({loadedKeys:i}),this.setState(e=>({loadingKeys:yY(e.loadingKeys,t)})),n()}).catch(e=>{if(this.setState(e=>({loadingKeys:yY(e.loadingKeys,t)})),this.loadingRetryTimes[t]=(this.loadingRetryTimes[t]||0)+1,this.loadingRetryTimes[t]>=oX){let{loadedKeys:e}=this.state;ui(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:bY(e,t)}),n()}r(e)}),{loadingKeys:bY(a,t)})})});return r.catch(()=>{}),r};onNodeMouseEnter=(e,t)=>{let{onMouseEnter:n}=this.props;n?.({event:e,node:t})};onNodeMouseLeave=(e,t)=>{let{onMouseLeave:n}=this.props;n?.({event:e,node:t})};onNodeContextMenu=(e,t)=>{let{onRightClick:n}=this.props;n&&(e.preventDefault(),n({event:e,node:t}))};onMouseDown=e=>{this.focusedByMouse=!0;let{onMouseDown:t}=this.props;t?.(e)};onMouseUp=e=>{this.focusedByMouse=!1;let{onMouseUp:t}=this.props;t?.(e)};onFocus=(...e)=>{let{onFocus:t,disabled:n}=this.props,{activeKey:r,selectedKeys:i,flattenNodes:a}=this.state;if(!this.focusedByMouse&&!n&&r===null){let e=i.find(e=>a.some(t=>t.key===e));e===void 0?this.onActiveChange(a?.[0]?.key||null):this.onActiveChange(e)}t?.(...e)};onBlur=(...e)=>{this.focusedByMouse=!1;let{onBlur:t}=this.props;this.onActiveChange(null),t?.(...e)};getTreeNodeRequiredProps=()=>{let{expandedKeys:e,selectedKeys:t,loadedKeys:n,loadingKeys:r,checkedKeys:i,halfCheckedKeys:a,dragOverNodeKey:o,dropPosition:s,keyEntities:c}=this.state;return{expandedKeys:e||[],selectedKeys:t||[],loadedKeys:n||[],loadingKeys:r||[],checkedKeys:i||[],halfCheckedKeys:a||[],dragOverNodeKey:o,dropPosition:s,keyEntities:c}};setExpandedKeys=e=>{let{treeData:t,fieldNames:n}=this.state,r=RL(t,e,n);this.setUncontrolledState({expandedKeys:e,flattenNodes:r},!0)};onNodeExpand=(e,t)=>{let{expandedKeys:n}=this.state,{listChanging:r,fieldNames:i}=this.state,{onExpand:a,loadData:o}=this.props,{expanded:s}=t,c=t[i.key];if(r)return;let l=n.includes(c),u=!s;if(ui(s&&l||!s&&!l,`Expand state not sync with index check`),n=u?bY(n,c):yY(n,c),this.setExpandedKeys(n),a?.(n,{node:t,expanded:u,nativeEvent:e.nativeEvent}),u&&o){let e=this.onNodeLoad(t);e&&e.then(()=>{let e=RL(this.state.treeData,n,i);this.setUncontrolledState({flattenNodes:e})}).catch(()=>{let{expandedKeys:e}=this.state,t=yY(e,c);this.setExpandedKeys(t)})}};onListChangeStart=()=>{this.setUncontrolledState({listChanging:!0})};onListChangeEnd=()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})};onActiveChange=e=>{let{activeKey:t}=this.state,{onActiveChange:n,itemScrollOffset:r=0}=this.props;t!==e&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:r}),n?.(e))};getActiveItem=()=>{let{activeKey:e,flattenNodes:t}=this.state;return e===null?null:t.find(({key:t})=>t===e)||null};offsetActiveKey=e=>{let{flattenNodes:t,activeKey:n}=this.state,r=t.findIndex(({key:e})=>e===n);r===-1&&e<0&&(r=t.length),r=(r+e+t.length)%t.length;let i=t[r];if(i){let{key:e}=i;this.onActiveChange(e)}else this.onActiveChange(null)};onKeyDown=e=>{let{activeKey:t,expandedKeys:n,checkedKeys:r,flattenNodes:i,keyEntities:a}=this.state,{onKeyDown:o,checkable:s,selectable:c,disabled:l,loadData:u}=this.props;if(l)return;switch(e.key){case`ArrowUp`:this.offsetActiveKey(-1),e.preventDefault();break;case`ArrowDown`:this.offsetActiveKey(1),e.preventDefault();break;case`Home`:this.onActiveChange(i?.[0]?.key),e.preventDefault();break;case`End`:this.onActiveChange(i?.[i.length-1]?.key),e.preventDefault();break}let d=this.getActiveItem();if(d&&d.data){let i=HL({...VL(t,this.getTreeNodeRequiredProps()),data:d.data,active:!0}),o=!!NL(a,t)?.children?.length,l=!BL(d.data.isLeaf,u,o,i.loaded),f=s&&!i.disabled&&i.checkable!==!1&&!i.disableCheckbox,p=!s&&c&&!i.disabled&&i.selectable!==!1;switch(e.key){case`ArrowLeft`:l&&n.includes(t)?this.onNodeExpand({},i):d.parent&&this.onActiveChange(d.parent.key),e.preventDefault();break;case`ArrowRight`:l&&!n.includes(t)?this.onNodeExpand({},i):d.children&&d.children.length&&this.onActiveChange(d.children[0].key),e.preventDefault();break;case`Enter`:l?(e.preventDefault(),this.onNodeExpand({},i)):f?r.includes(t)||(e.preventDefault(),this.onNodeCheck({},i,!0)):p&&!i.selected&&(e.preventDefault(),this.onNodeSelect({},i));break;case` `:f?(e.preventDefault(),this.onNodeCheck({},i,!r.includes(t))):p&&(e.preventDefault(),this.onNodeSelect({},i));break}}o?.(e)};setUncontrolledState=(e,t=!1,n=null)=>{if(!this.destroyed){let r=!1,i=!0,a={};Object.keys(e).forEach(t=>{if(this.props.hasOwnProperty(t)){i=!1;return}r=!0,a[t]=e[t]}),r&&(!t||i)&&this.setState({...a,...n})}};scrollTo=e=>{this.listRef.current.scrollTo(e)};render(){let{flattenNodes:e,keyEntities:t,draggingNodeKey:n,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c}=this.state,{prefixCls:l,className:u,style:d,styles:f,classNames:p,showLine:m,focusable:h,tabIndex:g=0,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:x,checkable:C,checkStrictly:w,disabled:T,motion:E,loadData:D,filterTreeNode:O,height:k,itemHeight:A,scrollWidth:j,virtual:M,titleRender:N,dropIndicatorRender:P,onContextMenu:F,onScroll:I,direction:L,rootClassName:R,rootStyle:z}=this.props,B=xi(this.props,{aria:!0,data:!0}),V;x&&(V=typeof x==`object`?x:typeof x==`function`?{nodeDraggable:x}:{});let H={styles:f,classNames:p,prefixCls:l,selectable:_,showIcon:v,icon:y,switcherIcon:b,draggable:V,draggingNodeKey:n,checkable:C,checkStrictly:w,disabled:T,keyEntities:t,dropLevelOffset:r,dropContainerKey:i,dropTargetKey:a,dropPosition:o,dragOverNodeKey:s,indent:c,direction:L,dropIndicatorRender:P,loadData:D,filterTreeNode:O,titleRender:N,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return S.createElement(dY.Provider,{value:H},S.createElement(`div`,{className:J(l,u,R,{[`${l}-show-line`]:m}),style:z},S.createElement(iX,aX({ref:this.listRef,prefixCls:l,style:d,data:e,disabled:T,selectable:_,checkable:!!C,motion:E,dragging:n!==null,height:k,itemHeight:A,virtual:M,focusable:h,tabIndex:g,activeItem:this.getActiveItem(),onFocus:this.onFocus,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:F,onScroll:I,scrollWidth:j},this.getTreeNodeRequiredProps(),B))))}},cX=c(o((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:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file`,theme:`outlined`}}))());function lX(){return lX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,lX({},e,{ref:t,icon:cX.default}))),dX=c(o((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:`M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z`}}]},name:`folder-open`,theme:`outlined`}}))());function fX(){return fX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,fX({},e,{ref:t,icon:dX.default}))),mX=c(o((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:`M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z`}}]},name:`folder`,theme:`outlined`}}))());function hX(){return hX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,hX({},e,{ref:t,icon:mX.default}))),_X=c(o((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:`M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z`}}]},name:`holder`,theme:`outlined`}}))());function vX(){return vX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,vX({},e,{ref:t,icon:_X.default}))),bX=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:i,borderRadius:a,controlItemBgHover:o})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:`static`,[`&:has(${e}-drop-indicator)`]:{position:`relative`},[`> *:not(${e}-drop-indicator)`]:{position:`relative`},"&:hover":{background:`transparent`},"&:before":{position:`absolute`,inset:0,transition:`background-color ${i}`,content:`""`,borderRadius:a},"&:hover:before":{background:o}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:`transparent`,"&, &:hover":{color:r},"&:before, &:hover:before":{background:n}}}}}),xX=new Ms(`ant-tree-node-fx-do-not-use`,{"0%":{opacity:0},"100%":{opacity:1}}),SX=(e,t)=>({[`.${e}-switcher-icon`]:{display:`inline-block`,fontSize:10,verticalAlign:`baseline`,svg:{transition:`transform ${t.motionDurationSlow}`}}}),CX=(e,t)=>({[`.${e}-drop-indicator`]:{position:`absolute`,zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:`none`,"&:after":{position:`absolute`,top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:`transparent`,border:`${Y(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:`50%`,content:`""`}}}),wX=(e,t)=>{let{treeCls:n,treeNodeCls:r,treeNodePadding:i,titleHeight:a,indentSize:o,switcherSize:s,motionDurationMid:c,nodeSelectedBg:l,nodeHoverBg:u,colorTextQuaternary:d,controlItemBgActiveDisabled:f}=t;return{[n]:{...Ul(t),"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:`rtl`},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:`rotate(90deg)`},[`${n}-list`]:{"&:focus-visible":{outline:`none`,[`${r}-active ${n}-node-content-wrapper`]:{...Kl(t)}}},[`${n}-list-holder-inner`]:{alignItems:`flex-start`},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:`stretch`,[`${n}-node-content-wrapper`]:{flex:`auto`},[`${r}.dragging:after`]:{position:`absolute`,inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:xX,animationDuration:t.motionDurationSlow,animationPlayState:`running`,animationFillMode:`forwards`,content:`""`,pointerEvents:`none`,borderRadius:t.borderRadius}}},[r]:{display:`flex`,alignItems:`flex-start`,marginBottom:i,lineHeight:Y(a),position:`relative`,"&:before":{content:`""`,position:`absolute`,zIndex:1,insetInlineStart:0,width:`100%`,top:`100%`,height:i},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:f},[`${n}-checkbox-disabled`]:{pointerEvents:`unset`},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:`grab`,[`${n}-draggable-icon`]:{flexShrink:0,width:s,textAlign:`center`,visibility:`visible`,color:d},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:`hidden`}}},[`${n}-indent`]:{alignSelf:`stretch`,whiteSpace:`nowrap`,userSelect:`none`,"&-unit":{display:`inline-block`,width:o}},[`${n}-draggable-icon`]:{visibility:`hidden`},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(s).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-checkbox`]:{flexShrink:0,alignSelf:`flex-start`,marginBlockStart:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:{...SX(e,t),position:`relative`,flex:`none`,alignSelf:`stretch`,width:s,textAlign:`center`,cursor:`pointer`,userSelect:`none`,transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:`unset`},"&:before":{pointerEvents:`none`,content:`""`,width:s,height:a,position:`absolute`,left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:`rotate(-90deg)`},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:`relative`,zIndex:1,display:`inline-block`,width:`100%`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&:after":{position:`absolute`,width:t.calc(t.calc(s).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:`""`}}},[`${n}-node-content-wrapper`]:{position:`relative`,minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:`transparent`,borderRadius:t.borderRadius,cursor:`pointer`,transition:[`all ${c}`,`border 0s`,`line-height 0s`,`box-shadow 0s`].join(`, `),...CX(e,t),"&:hover":{backgroundColor:u},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${n}-iconEle`]:{display:`inline-block`,width:s,height:a,textAlign:`center`,verticalAlign:`top`,"&:empty":{display:`none`}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:`transparent`},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:`relative`,height:`100%`,"&:before":{position:`absolute`,top:0,insetInlineEnd:t.calc(s).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:`""`},"&-end:before":{display:`none`}},[`${n}-switcher`]:{background:`transparent`,"&-line-icon":{verticalAlign:`-0.15em`}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:`auto !important`,bottom:`auto !important`,height:`${Y(t.calc(a).div(2).equal())} !important`}}}},TX=(e,t,n=!0)=>{let r=`.${e}`,i=dc(t,{treeCls:r,treeNodeCls:`${r}-treenode`,treeNodePadding:t.calc(t.paddingXS).div(2).equal()});return[wX(e,i),n&&bX(i)].filter(Boolean)},EX=e=>{let{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,i=t;return{titleHeight:i,switcherSize:i,indentSize:i,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},DX=Ql(`Tree`,(e,{prefixCls:t})=>[{[e.componentCls]:aR(`${t}-checkbox`,e)},TX(t,e),Gh(e)],e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return{...EX(e),directoryNodeSelectedColor:t,directoryNodeSelectedBg:n}}),OX=e=>{let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:i,direction:a=`ltr`}=e,o=a===`ltr`?`left`:`right`,s=a===`ltr`?`right`:`left`,c={[o]:-n*i+4,[s]:0};switch(t){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[o]=i+4;break}return S.createElement(`div`,{style:c,className:`${r}-drop-indicator`})},kX=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`filled`}}))());function AX(){return AX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,AX({},e,{ref:t,icon:kX.default}))),MX=c(o((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:`M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`minus-square`,theme:`outlined`}}))());function NX(){return NX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,NX({},e,{ref:t,icon:MX.default}))),FX=c(o((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:`M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`plus-square`,theme:`outlined`}}))());function IX(){return IX=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,IX({},e,{ref:t,icon:FX.default}))),RX=e=>{let{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:i,switcherLoadingIcon:a}=e,{isLeaf:o,expanded:s,loading:c}=r;if(c)return S.isValidElement(a)?a:S.createElement(Ym,{className:`${t}-switcher-loading-icon`});let l;if(nf(i)&&(l=i.showLeafIcon),o){if(!i)return null;if(typeof l!=`boolean`&&l){let e=typeof l==`function`?l(r):l,n=`${t}-switcher-line-custom-icon`;return S.isValidElement(e)?um(e,{className:J(e.props?.className,n)}):e}return l?S.createElement(uX,{className:`${t}-switcher-line-icon`}):S.createElement(`span`,{className:`${t}-switcher-leaf-line`})}let u=`${t}-switcher-icon`,d=typeof n==`function`?n(r):n;return S.isValidElement(d)?um(d,{className:J(d.props?.className,i?`${t}-switcher-line-icon`:u)}):d===void 0?i?s?S.createElement(PX,{className:`${t}-switcher-line-icon`}):S.createElement(LX,{className:`${t}-switcher-line-icon`}):S.createElement(jX,{className:u}):d},zX=S.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,className:i,style:a,classNames:o,styles:s}=ya(`tree`),{virtual:c}=S.useContext(ga),{prefixCls:l,className:u,showIcon:d=!1,showLine:f,switcherIcon:p,switcherLoadingIcon:m,blockNode:h=!1,children:g,checkable:_=!1,selectable:v=!0,draggable:y,disabled:b,motion:x,style:C,rootClassName:w,classNames:T,styles:E,icon:D}=e,O=S.useContext(mm),k=b??O,A=n(`tree`,l),j=n(),M=x??{...mh(j),motionAppear:!1},N={...e,showIcon:d,blockNode:h,checkable:_,selectable:v,disabled:k,motion:M},[P,F]=Cf([o,T],[s,E],{props:N}),I={...N,showLine:!!f,icon:D,dropIndicatorRender:OX},[L,R]=DX(A),[,z]=Vl(),B=z.paddingXS/2+(z.Tree?.titleHeight||z.controlHeightSM),V=S.useMemo(()=>{if(!y)return!1;let e={};switch(typeof y){case`function`:e.nodeDraggable=y;break;case`object`:e={...y};break;default:break}return e.icon!==!1&&(e.icon=e.icon||S.createElement(yX,null)),e},[y]),H=e=>S.createElement(RX,{prefixCls:A,switcherIcon:p,switcherLoadingIcon:m,treeNodeProps:e,showLine:f});return S.createElement(sX,{itemHeight:B,ref:t,virtual:c,...I,prefixCls:A,className:J({[`${A}-icon-hide`]:!d,[`${A}-block-node`]:h,[`${A}-unselectable`]:!v,[`${A}-rtl`]:r===`rtl`,[`${A}-disabled`]:k},i,u,L,R),style:{...a,...C},rootClassName:J(P.root,w),rootStyle:F.root,classNames:P,styles:F,direction:r,checkable:_&&S.createElement(`span`,{className:`${A}-checkbox-inner`}),selectable:v,switcherIcon:H,draggable:V},g)}),BX=0,VX=1,HX=2;function UX(e,t,n){let{key:r,children:i}=n;function a(e){let a=e[r],o=e[i];t(a,e)!==!1&&UX(o||[],t,n)}e.forEach(a)}function WX({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:i}){let a=[],o=BX;if(n&&n===r)return[n];if(!n||!r)return[];function s(e){return e===n||e===r}return UX(e,e=>{if(o===HX)return!1;if(s(e)){if(a.push(e),o===BX)o=VX;else if(o===VX)return o=HX,!1}else o===VX&&a.push(e);return t.includes(e)},IL(i)),a}function GX(e,t,n){let r=pa(t),i=[];return UX(e,(e,t)=>{let n=r.indexOf(e);return n!==-1&&(i.push(t),r.splice(n,1)),!!r.length},IL(n)),i}function KX(e){let{isLeaf:t,expanded:n}=e;return t?S.createElement(uX,null):n?S.createElement(pX,null):S.createElement(gX,null)}function qX({treeData:e,children:t}){return e||LL(t)}var JX=S.forwardRef((e,t)=>{let{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:i,...a}=e,o=S.useRef(null),s=S.useRef(null),c=()=>{let{keyEntities:e}=zL(qX(a),{fieldNames:a.fieldNames}),t,o=a.expandedKeys||i||[];return t=n?Object.keys(e):r?OY(o,e):o,t},[l,u]=S.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[d,f]=S.useState(()=>c());S.useEffect(()=>{`selectedKeys`in a&&u(a.selectedKeys)},[a.selectedKeys]),S.useEffect(()=>{`expandedKeys`in a&&f(a.expandedKeys)},[a.expandedKeys]);let p=(e,t)=>(`expandedKeys`in a||f(e),a.onExpand?.(e,t)),m=(e,t)=>{let{multiple:n,fieldNames:r}=a,{node:i,nativeEvent:c}=t,{key:l=``}=i,f=qX(a),p={...t,selected:!0},m=c?.ctrlKey||c?.metaKey,h=c?.shiftKey,g;n&&m?(g=e,o.current=l,s.current=g,p.selectedNodes=GX(f,g,r)):n&&h?(g=Array.from(new Set([].concat(pa(s.current||[]),pa(WX({treeData:f,expandedKeys:d,startKey:l,endKey:o.current,fieldNames:r}))))),p.selectedNodes=GX(f,g,r)):(g=[l],o.current=l,s.current=g,p.selectedNodes=GX(f,g,r)),a.onSelect?.(g,p),`selectedKeys`in a||u(g)},{getPrefixCls:h,direction:g}=S.useContext(ga),{prefixCls:_,className:v,showIcon:y=!0,expandAction:b=`click`,...x}=a,C=h(`tree`,_),w=J(`${C}-directory`,{[`${C}-directory-rtl`]:g===`rtl`},v);return S.createElement(zX,{icon:KX,ref:t,blockNode:!0,...x,showIcon:y,expandAction:b,prefixCls:C,className:w,expandedKeys:d,selectedKeys:l,onSelect:m,onExpand:p})}),YX=zX;YX.DirectoryTree=JX,YX.TreeNode=vY;var XX=e=>{let{value:t,filterSearch:n,tablePrefixCls:r,locale:i,onChange:a}=e;return n?S.createElement(`div`,{className:`${r}-filter-dropdown-search`},S.createElement(bz,{prefix:S.createElement(PC,null),placeholder:i.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},ZX=e=>{let{keyCode:t}=e;t===Qr.ENTER&&e.stopPropagation()},QX=S.forwardRef((e,t)=>S.createElement(`div`,{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:ZX,ref:t},e.children));function $X(e){let t=[];return(e||[]).forEach(({value:e,children:n})=>{t.push(e),n&&(t=[].concat(pa(t),pa($X(n))))}),t}function eZ(e){return e.some(({children:e})=>e)}var tZ=(e,t)=>typeof t==`string`||ef(t)?t.toString().toLowerCase().includes(e):!1,nZ=e=>{let{filters:t,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s}=e;return t.map((e,t)=>{let c=String(e.value);if(e.children)return{key:c||t,label:e.text,popupClassName:`${n}-dropdown-submenu`,children:nZ({filters:e.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,normalizedSearchValue:o,filterSearch:s})};let l=i?pR:KF,u={key:e.value===void 0?t:c,label:S.createElement(S.Fragment,null,S.createElement(l,{checked:r.includes(c)}),S.createElement(`span`,null,e.text))};return o?typeof s==`function`?s(o,e)?u:null:tZ(o,e.text)?u:null:u})};function rZ(e){return e||[]}var iZ=e=>{let{tablePrefixCls:t,prefixCls:n,column:r,dropdownPrefixCls:i,columnKey:a,filterOnClose:o,filterMultiple:s,filterMode:c=`menu`,filterSearch:l=!1,filterState:u,triggerFilter:d,locale:f,children:p,getPopupContainer:m,rootClassName:h}=e,{filterResetToDefaultFilteredValue:g,defaultFilteredValue:_,filterDropdownProps:v={},filterDropdownOpen:y,onFilterDropdownOpenChange:b}=r,[x,C]=S.useState(!1),w=S.useContext(_w),T=!!(u&&(u.filteredKeys?.length||u.forceFiltered)),E=e=>{C(e),v.onOpenChange?.(e),b?.(e)},D=v.open??y??x,O=u?.filteredKeys,[k,A]=Af(rZ(O)),j=({selectedKeys:e})=>{A(e)},M=(e,{node:t,checked:n})=>{j(s?{selectedKeys:e}:{selectedKeys:n&&t.key?[t.key]:[]})};S.useEffect(()=>{x&&j({selectedKeys:rZ(O)})},[O]);let[N,P]=S.useState([]),F=e=>{P(e)},[I,L]=S.useState(``),R=S.useMemo(()=>I.trim().toLowerCase(),[I]),z=e=>{let{value:t}=e.target;L(t)};S.useEffect(()=>{x||L(``)},[x]);let B=e=>{let t=e?.length?e:null;if(t===null&&(!u||!u.filteredKeys)||fi(t,u?.filteredKeys,!0))return null;d({column:r,key:a,filteredKeys:t})},V=()=>{E(!1),B(k())},H=({confirm:e,closeDropdown:t}={confirm:!1,closeDropdown:!1})=>{e&&B([]),t&&E(!1),L(``),A(g?(_||[]).map(String):[])},U=({closeDropdown:e}={closeDropdown:!0})=>{e&&E(!1),B(k())},ee=(e,t)=>{t.source===`trigger`&&(e&&O!==void 0&&A(rZ(O)),E(e),!e&&!r.filterDropdown&&o&&V())},W=J({[`${i}-menu-without-submenu`]:!eZ(r.filters||[])}),te=e=>{e.target.checked?A($X(r?.filters).map(String)):A([])},G=({filters:e})=>(e||[]).map((e,t)=>{let n=String(e.value),r={title:e.text,key:e.value===void 0?String(t):n};return e.children&&(r.children=G({filters:e.children})),r}),ne=e=>({...e,text:e.title,value:e.key,children:e.children?.map(ne)||[]}),K,{direction:re,renderEmpty:ie}=S.useContext(ga);if(typeof r.filterDropdown==`function`)K=r.filterDropdown({prefixCls:`${i}-custom`,setSelectedKeys:e=>j({selectedKeys:e}),selectedKeys:k(),confirm:U,clearFilters:H,filters:r.filters,visible:D,close:()=>{E(!1)}});else if(r.filterDropdown)K=r.filterDropdown;else{let e=k()||[];K=S.createElement(S.Fragment,null,(()=>{let a=ie?.(`Table.filter`)??S.createElement(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:`16px 0`}});if((r.filters||[]).length===0)return a;if(c===`tree`)return S.createElement(S.Fragment,null,S.createElement(XX,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),S.createElement(`div`,{className:`${t}-filter-dropdown-tree`},s?S.createElement(pR,{checked:e.length===$X(r.filters).length,indeterminate:e.length>0&&e.length<$X(r.filters).length,className:`${t}-filter-dropdown-checkall`,onChange:te},f?.filterCheckall??f?.filterCheckAll):null,S.createElement(YX,{checkable:!0,selectable:!1,blockNode:!0,multiple:s,checkStrictly:!s,className:`${i}-menu`,onCheck:M,checkedKeys:e,selectedKeys:e,showIcon:!1,treeData:G({filters:r.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:R?e=>typeof l==`function`?l(I,ne(e)):tZ(R,e.title):void 0})));let o=nZ({filters:r.filters||[],filterSearch:l,prefixCls:n,filteredKeys:k(),filterMultiple:s,searchValue:I,normalizedSearchValue:R}),u=o.every(e=>e===null);return S.createElement(S.Fragment,null,S.createElement(XX,{filterSearch:l,value:I,onChange:z,tablePrefixCls:t,locale:f}),u?a:S.createElement(HE,{selectable:!0,multiple:s,prefixCls:`${i}-menu`,className:W,onSelect:j,onDeselect:j,selectedKeys:e,getPopupContainer:m,openKeys:N,onOpenChange:F,items:o}))})(),S.createElement(`div`,{className:`${n}-dropdown-btns`},S.createElement(h_,{type:`link`,size:`small`,disabled:g?fi((_||[]).map(String),e,!0):e.length===0,onClick:()=>H()},f.filterReset),S.createElement(h_,{type:`primary`,size:`small`,onClick:V},f.filterConfirm)))}r.filterDropdown&&(K=S.createElement(PE,{selectable:void 0},K)),K=S.createElement(QX,{className:`${n}-dropdown`},K);let ae=(()=>{let e;return e=typeof r.filterIcon==`function`?r.filterIcon(T):r.filterIcon?r.filterIcon:S.createElement(WY,null),S.createElement(`span`,{role:`button`,tabIndex:-1,className:J(`${n}-trigger`,{active:T}),onClick:e=>{e.stopPropagation()}},e)})();if(w)return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),ae);let q=Qd({trigger:[`click`],placement:re===`rtl`?`bottomLeft`:`bottomRight`,children:ae,getPopupContainer:m},{...v,rootClassName:J(h,v.rootClassName),open:D,onOpenChange:ee,popupRender:()=>typeof v?.dropdownRender==`function`?v.dropdownRender(K):K});return S.createElement(`div`,{className:`${n}-column`},S.createElement(`span`,{className:`${t}-column-title`},p),S.createElement(xV,{...q}))},aZ=(e,t,n)=>{let r=[];return(e||[]).forEach((e,i)=>{let a=zY(i,n),o=e.filterDropdown!==void 0;if(e.filters||o||`onFilter`in e)if(`filteredValue`in e){let t=e.filteredValue;o||(t=t?.map(String)??t),r.push({column:e,key:RY(e,a),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:RY(e,a),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered});`children`in e&&(r=[].concat(pa(r),pa(aZ(e.children,t,a))))}),r};function oZ(e,t,n,r,i,a,o,s,c){return n.map((n,l)=>{let u=zY(l,s),{filterOnClose:d=!0,filterMultiple:f=!0,filterMode:p,filterSearch:m}=n,h=n;if(h.filters||h.filterDropdown){let s=RY(h,u),l=r.find(({key:e})=>s===e);h={...h,title:r=>S.createElement(iZ,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:h,columnKey:s,filterState:l,filterOnClose:d,filterMultiple:f,filterMode:p,filterSearch:m,triggerFilter:a,locale:i,getPopupContainer:o,rootClassName:c},BY(n.title,r))}}return`children`in h&&(h={...h,children:oZ(e,t,h.children,r,i,a,o,u,c)}),h})}var sZ=e=>{let t={};return e.forEach(({key:e,filteredKeys:n,column:r})=>{let i=e,{filters:a,filterDropdown:o}=r;o?t[i]=n||null:Array.isArray(n)?t[i]=$X(a).filter(e=>n.includes(String(e))):t[i]=null}),t},cZ=(e,t,n)=>t.reduce((e,r)=>{let{column:{onFilter:i,filters:a},filteredKeys:o}=r;if(i&&o&&o.length){let r=$X(a),s=new Map;r.forEach(e=>{let t=String(e);s.has(t)||s.set(t,e)});let c=o.map(e=>{let t=String(e);return s.get(t)??e});return(e=>e.reduce((e,r)=>{let a={...r};return a[n]&&(a[n]=cZ(a[n],t,n)),c.some(e=>i(e,a))&&e.push(a),e},[]))(e)}return e},e),lZ=e=>e.flatMap(e=>`children`in e?[e].concat(pa(lZ(e.children||[]))):[e]),uZ=e=>{let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:i,getPopupContainer:a,locale:o,rootClassName:s}=e;Gi(`Table`);let c=S.useMemo(()=>lZ(r||[]),[r]),[l,u]=S.useState(()=>aZ(c,!0)),d=S.useMemo(()=>{let e=aZ(c,!1);if(e.length===0)return e;let t=!0;if(e.forEach(({filteredKeys:e})=>{e!==void 0&&(t=!1)}),t){let e=(c||[]).map((e,t)=>RY(e,zY(t)));return l.filter(({key:t})=>e.includes(t)).map(t=>{let n=c[e.indexOf(t.key)];return{...t,column:{...t.column,...n},forceFiltered:n.filtered}})}return e},[c,l]),f=S.useMemo(()=>sZ(d),[d]),p=e=>{let t=d.filter(({key:t})=>t!==e.key);t.push(e),u(t),i(sZ(t),t)};return[e=>oZ(t,n,e,d,o,p,a,void 0,s),d,f]},dZ=(e,t,n)=>{let r=S.useRef({});function i(i){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let i=new Map;function a(e){e.forEach((e,r)=>{let o=n(e,r);i.set(o,e),nf(e)&&t in e&&a(e[t]||[])})}a(e),r.current={data:e,childrenColumnName:t,kvMap:i,getRowKey:n}}return r.current.kvMap?.get(i)}return[i]};function fZ(e,t){let n={current:e.current,pageSize:e.pageSize},r=nf(t)?t:{};return Object.keys(r).forEach(t=>{let r=e[t];typeof r!=`function`&&(n[t]=r)}),n}function pZ(e,t,n){let{total:r=0,...i}=nf(n)?n:{},[a,o]=(0,S.useState)(()=>({current:`defaultCurrent`in i?i.defaultCurrent:1,pageSize:`defaultPageSize`in i?i.defaultPageSize:10})),s=Qd(a,i,{total:r>0?r:e}),c=Math.ceil((r||e)/s.pageSize);s.current>c&&(s.current=c||1);let l=(e,t)=>{o({current:e??1,pageSize:t||s.pageSize})},u=(e,r)=>{n&&n.onChange?.(e,r),l(e,r),t(e,r||s?.pageSize)};return n===!1?[{},()=>{}]:[{...s,onChange:u},l]}var mZ=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`outlined`}}))());function hZ(){return hZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,hZ({},e,{ref:t,icon:mZ.default}))),_Z=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z`}}]},name:`caret-up`,theme:`outlined`}}))());function vZ(){return vZ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,vZ({},e,{ref:t,icon:_Z.default}))),bZ=`ascend`,xZ=`descend`,SZ=e=>e.sorter&&typeof e.sorter==`object`&&ef(e.sorter.multiple)?e.sorter.multiple:!1,CZ=e=>typeof e==`function`?e:nf(e)&&e.compare?e.compare:!1,wZ=(e,t)=>t?e[e.indexOf(t)+1]:e[0],TZ=(e,t,n)=>{let r=[],i=(e,t)=>{r.push({column:e,key:RY(e,t),multiplePriority:SZ(e),sortOrder:e.sortOrder})};return(e||[]).forEach((e,a)=>{let o=zY(a,n);e.children?(`sortOrder`in e&&i(e,o),r=[].concat(pa(r),pa(TZ(e.children,t,o)))):e.sorter&&(`sortOrder`in e?i(e,o):t&&e.defaultSortOrder&&r.push({column:e,key:RY(e,o),multiplePriority:SZ(e),sortOrder:e.defaultSortOrder}))}),r},EZ=(e,t,n,r,i,a,o,s,c)=>(t||[]).map((t,l)=>{let u=zY(l,s),d=t;if(d.sorter){let s=d.sortDirections||i,l=d.showSorterTooltip===void 0?o:d.showSorterTooltip,f=RY(d,u),p=n.find(({key:e})=>e===f),m=p?p.sortOrder:null,h=wZ(s,m),g;if(t.sortIcon)g=t.sortIcon({sortOrder:m});else{let t=s.includes(bZ)&&S.createElement(yZ,{className:J(`${e}-column-sorter-up`,{active:m===bZ})}),n=s.includes(xZ)&&S.createElement(gZ,{className:J(`${e}-column-sorter-down`,{active:m===xZ})});g=S.createElement(`span`,{className:J(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(t&&n)})},S.createElement(`span`,{className:`${e}-column-sorter-inner`,"aria-hidden":`true`},t,n))}let{cancelSort:_,triggerAsc:v,triggerDesc:y}=a||{},b=_;h===xZ?b=y:h===bZ&&(b=v);let x=nf(l)?{title:b,...l}:{title:b};d={...d,className:J(d.className,{[`${e}-column-sort`]:m}),title:n=>{let r=`${e}-column-sorters`,i=S.createElement(`span`,{className:`${e}-column-title`},BY(t.title,n)),a=S.createElement(`div`,{className:r},i,g);return l?typeof l!=`boolean`&&l?.target===`sorter-icon`?S.createElement(`div`,{className:J(r,`${r}-tooltip-target-sorter`)},i,S.createElement(kw,{...x},g)):S.createElement(kw,{...x},a):a},onHeaderCell:n=>{let i=t.onHeaderCell?.(n)||{},a=i.onClick,o=i.onKeyDown;i.onClick=e=>{r({column:t,key:f,sortOrder:h,multiplePriority:SZ(t)}),a?.(e)},i.onKeyDown=e=>{e.keyCode===Qr.ENTER&&(r({column:t,key:f,sortOrder:h,multiplePriority:SZ(t)}),o?.(e))};let s=VY(t.title,{}),l=s?.toString();return m&&(i[`aria-sort`]=m===`ascend`?`ascending`:`descending`),i[`aria-description`]=c?.sortable,i[`aria-label`]=l||``,i.className=J(i.className,`${e}-column-has-sorters`),i.tabIndex=0,t.ellipsis&&(i.title=(s??``).toString()),i}}}return`children`in d&&(d={...d,children:EZ(e,d.children,n,r,i,a,o,u,c)}),d}),DZ=e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},OZ=e=>{let t=e.filter(({sortOrder:e})=>e).map(DZ);return t.length===0&&e.length?{...DZ(e[e.length-1]),column:void 0,order:void 0,field:void 0,columnKey:void 0}:t.length<=1?t[0]||{}:t},kZ=(e,t,n)=>{let r=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),i=e.slice(),a=r.filter(({column:{sorter:e},sortOrder:t})=>CZ(e)&&t);return a.length?i.sort((e,t)=>{for(let n=0;n{let r=e[n];return r?{...e,[n]:kZ(r,t,n)}:e}):i},AZ=e=>{let{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:i,showSorterTooltip:a,onSorterChange:o,globalLocale:s}=e,[c,l]=S.useState(()=>TZ(n,!0)),u=(e,t)=>{let n=[];return e.forEach((e,r)=>{let i=zY(r,t);if(n.push(RY(e,i)),Array.isArray(e.children)){let t=u(e.children,i);n.push.apply(n,pa(t))}}),n},d=S.useMemo(()=>{let e=!0,t=TZ(n,!1);if(!t.length){let e=u(n);return c.filter(({key:t})=>e.includes(t))}let r=[];function i(t){e?r.push(t):r.push({...t,sortOrder:null})}let a=null;return t.forEach(t=>{a===null?(i(t),t.sortOrder&&(t.multiplePriority===!1?e=!1:a=!0)):(a&&t.multiplePriority!==!1||(e=!1),i(t))}),r},[n,c]),f=S.useMemo(()=>{let e=d.map(({column:e,sortOrder:t})=>({column:e,order:t}));return{sortColumns:e,sortColumn:e[0]?.column,sortOrder:e[0]?.order}},[d]),p=e=>{let t;t=e.multiplePriority===!1||!d.length||d[0].multiplePriority===!1?[e]:[].concat(pa(d.filter(({key:t})=>t!==e.key)),[e]),l(t),o(OZ(t),t)};return[e=>EZ(t,e,d,p,r,i,a,void 0,s),d,f,()=>OZ(d)]},jZ=(e,t)=>e.map(e=>{let n={...e};return n.title=BY(e.title,t),`children`in n&&(n.children=jZ(n.children,t)),n}),MZ=e=>[S.useCallback(t=>jZ(t,e),[e])],NZ=YJ((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),PZ=cY((e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),FZ=e=>{let{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:i,tableHeaderBg:a,tablePaddingVertical:o,tablePaddingHorizontal:s,calc:c}=e,l=`${Y(n)} ${r} ${i}`,u=(e,r,i)=>({[`&${t}-${e}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > th, > table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`${Y(c(r).mul(-1).equal())} ${Y(c(c(i).add(n)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:{[`> ${t}-title`]:{border:l,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:l,borderTop:l,[`> ${t}-content, > ${t}-header, > ${t}-body, > ${t}-summary`]:{"> table":{"> thead > tr > th, > thead > tr > td, > tbody > tr > th, > tbody > tr > td, > tfoot > tr > th, > tfoot > tr > td":{borderInlineEnd:l},"> thead":{"> tr:not(:last-child) > th":{borderBottom:l},"> tr > th::before":{backgroundColor:`transparent !important`}},"> thead > tr, > tbody > tr, > tfoot > tr":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:l}},"> tbody > tr > th, > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`${Y(c(o).mul(-1).equal())} ${Y(c(c(s).add(n)).mul(-1).equal())}`,"&::after":{position:`absolute`,top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:l,content:`""`}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[` > tr${t}-expanded-row, > tr${t}-placeholder - `]:{"> th, > td":{borderInlineEnd:0}}}}},...u(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle),...u(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall),[`> ${t}-footer`]:{border:l,borderTop:0}},[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Y(n)} 0 ${Y(n)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:l}}}},LZ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:{...Hl,wordBreak:`keep-all`,[` + `]:{"> th, > td":{borderInlineEnd:0}}}}},...u(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle),...u(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall),[`> ${t}-footer`]:{border:l,borderTop:0}},[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Y(n)} 0 ${Y(n)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:l}}}},IZ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:{...Hl,wordBreak:`keep-all`,[` &${t}-cell-fix-start-shadow, &${t}-cell-fix-end-shadow - `]:{overflow:`visible`,[`${t}-cell-content`]:{...Hl,display:`block`}},[`${t}-column-title`]:{...Hl,wordBreak:`keep-all`}}}}},RZ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:`center`,color:e.colorTextDisabled,"&:hover > th, &:hover > td":{background:e.colorBgContainer}}}}},zZ=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:i,paddingXS:a,lineType:o,tableBorderColor:s,tableExpandIconBg:c,tableExpandColumnWidth:l,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:m,expandIconMarginTop:h,expandIconSize:g,expandIconHalfInner:_,expandIconScale:v,calc:y}=e,b=`${Y(i)} ${o} ${s}`,x=y(m).sub(i).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:l},[`${t}-row-expand-icon-cell`]:{textAlign:`center`,[`${t}-row-expand-icon`]:{display:`inline-flex`,float:`none`,verticalAlign:`sub`}},[`${t}-row-indent`]:{height:1,float:`left`},[`${t}-row-expand-icon`]:{...Zl(e),position:`relative`,float:`left`,width:g,height:g,color:`inherit`,lineHeight:Y(g),background:c,border:b,borderRadius:u,transform:`scale(${v})`,"&:focus, &:hover, &:active":{borderColor:`currentcolor`},"&::before, &::after":{position:`absolute`,background:`currentcolor`,transition:`transform ${r} ease-out`,content:`""`},"&::before":{top:_,insetInlineEnd:x,insetInlineStart:x,height:i},"&::after":{top:x,bottom:x,insetInlineStart:_,width:i,transform:`rotate(90deg)`},"&-collapsed::before":{transform:`rotate(-180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`},"&-spaced":{"&::before, &::after":{display:`none`,content:`none`},background:`transparent`,border:0,visibility:`hidden`}},[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:h,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:p}},[`${n}-descriptions-view`]:{display:`flex`,table:{flex:`auto`,width:`100%`}}},[`${t}-expanded-row-fixed`]:{position:`relative`,margin:`${Y(y(d).mul(-1).equal())} ${Y(y(f).mul(-1).equal())}`,padding:`${Y(d)} ${Y(f)}`}}}},BZ=e=>{let{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:a,paddingXXS:o,paddingXS:s,colorText:c,lineWidth:l,lineType:u,tableBorderColor:d,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:m,borderRadius:h,motionDurationSlow:g,colorIcon:_,colorPrimary:v,tableHeaderFilterActiveBg:y,colorTextDisabled:b,tableFilterDropdownBg:x,tableFilterDropdownHeight:S,controlItemBgHover:C,controlItemBgActive:w,boxShadowSecondary:T,filterDropdownMenuBg:E,calc:D}=e,O=`${n}-dropdown`,k=`${t}-filter-dropdown`,A=`${n}-tree`,j=`${Y(l)} ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:`flex`,justifyContent:`space-between`},[`${t}-filter-trigger`]:{position:`relative`,display:`flex`,alignItems:`center`,marginBlock:D(o).mul(-1).equal(),marginInline:`${Y(o)} ${Y(D(m).div(2).mul(-1).equal())}`,padding:`0 ${Y(o)}`,color:f,fontSize:p,borderRadius:h,cursor:`pointer`,transition:`all ${g}`,"&:hover":{color:_,background:y},"&.active":{color:v}}}},{[`${n}-dropdown`]:{[k]:{...Ul(e),minWidth:i,backgroundColor:x,borderRadius:h,boxShadow:T,overflow:`hidden`,[`${O}-menu`]:{maxHeight:S,overflowX:`hidden`,border:0,boxShadow:`none`,borderRadius:`unset`,backgroundColor:E,"&:empty::after":{display:`block`,padding:`${Y(s)} 0`,color:b,fontSize:p,textAlign:`center`,content:`"Not Found"`}},[`${k}-tree`]:{paddingBlock:`${Y(s)} 0`,paddingInline:s,[A]:{padding:0},[`${A}-treenode ${A}-node-content-wrapper:hover`]:{backgroundColor:C},[`${A}-treenode-checkbox-checked ${A}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:w}}},[`${k}-search`]:{padding:s,borderBottom:j,"&-input":{input:{minWidth:a},[r]:{color:b}}},[`${k}-checkall`]:{width:`100%`,marginBottom:o,marginInlineStart:o},[`${k}-btns`]:{display:`flex`,justifyContent:`space-between`,padding:`${Y(D(s).sub(l).equal())} ${Y(s)}`,overflow:`hidden`,borderTop:j}}}},{[`${n}-dropdown ${k}, ${k}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:c},"> ul":{maxHeight:`calc(100vh - 130px)`,overflowX:`hidden`,overflowY:`auto`}}}]};function VZ({colorSplit:e}){return[{boxShadow:`inset 10px 0 8px -8px ${e}`},{boxShadow:`inset -10px 0 8px -8px ${e}`}]}var HZ=e=>{let{componentCls:t,lineWidth:n,motionDurationSlow:r,zIndexTableFixed:i,tableBg:a,calc:o}=e,s=`${t}-cell`,c=`${s}-fix`,l={position:`absolute`,top:0,bottom:o(n).mul(-1).equal(),width:30,transition:`box-shadow ${r}`,content:`""`,pointerEvents:`none`},[u,d]=VZ(e);return{[`${t}-wrapper`]:{[`${s}${c}`]:{position:`sticky`},[c]:{zIndex:`calc(var(--z-offset-reverse) + ${i})`,background:a,"&:after":l,"&-start:after":{insetInlineStart:`100%`},"&-end:after":{insetInlineEnd:`100%`},"&-start-shadow-show:after":u,"&-end-shadow-show:after":d},[`${t}-container`]:{position:`relative`,"&:before, &:after":{...l,zIndex:`calc(var(--columns-count) * 2 + ${i} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${t}-has-fix-start ${t}-container:before`]:{display:`none`},[`${t}-has-fix-end ${t}-container:after`]:{display:`none`},[`${t}-fix-start-shadow-show ${t}-container:before`]:u,[`${t}-fix-end-shadow-show ${t}-container:after`]:d}}},UZ=e=>{let{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${Y(r)} 0`},[`${t}-pagination`]:{display:`flex`,flexWrap:`wrap`,rowGap:e.paddingXS,"> *":{flex:`none`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`}}}}},WZ=e=>{let{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${Y(n)} ${Y(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"&::before":{borderStartStartRadius:n},"&::after":{borderStartEndRadius:n},[`> ${t}-content`]:{borderStartStartRadius:n,borderStartEndRadius:n},"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${Y(n)} ${Y(n)}`}}}}},GZ=e=>{let{componentCls:t}=e,[n,r]=VZ(e);return{[`${t}-wrapper-rtl`]:{direction:`rtl`,table:{direction:`rtl`},[`${t}-row-expand-icon`]:{float:`right`,"&::after":{transform:`rotate(-90deg)`},"&-collapsed::before":{transform:`rotate(180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`}},[`${t}-cell-fix`]:{"&-start-shadow-show:after":r,"&-end-shadow-show:after":n},[`${t}-container`]:{[`${t}-row-indent`]:{float:`right`}},[`${t}-fix-start-shadow-show ${t}-container:before`]:r,[`${t}-fix-end-shadow-show ${t}-container:after`]:n}}},KZ=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:i,padding:a,paddingXS:o,headerIconColor:s,headerIconHoverColor:c,tableSelectionColumnWidth:l,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:m}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:l,[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:m(l).add(m(o).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).add(m(o).mul(2)).equal()}},[` + `]:{overflow:`visible`,[`${t}-cell-content`]:{...Hl,display:`block`}},[`${t}-column-title`]:{...Hl,wordBreak:`keep-all`}}}}},LZ=e=>{let{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:`center`,color:e.colorTextDisabled,"&:hover > th, &:hover > td":{background:e.colorBgContainer}}}}},RZ=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:i,paddingXS:a,lineType:o,tableBorderColor:s,tableExpandIconBg:c,tableExpandColumnWidth:l,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:m,expandIconMarginTop:h,expandIconSize:g,expandIconHalfInner:_,expandIconScale:v,calc:y}=e,b=`${Y(i)} ${o} ${s}`,x=y(m).sub(i).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:l},[`${t}-row-expand-icon-cell`]:{textAlign:`center`,[`${t}-row-expand-icon`]:{display:`inline-flex`,float:`none`,verticalAlign:`sub`}},[`${t}-row-indent`]:{height:1,float:`left`},[`${t}-row-expand-icon`]:{...Zl(e),position:`relative`,float:`left`,width:g,height:g,color:`inherit`,lineHeight:Y(g),background:c,border:b,borderRadius:u,transform:`scale(${v})`,"&:focus, &:hover, &:active":{borderColor:`currentcolor`},"&::before, &::after":{position:`absolute`,background:`currentcolor`,transition:`transform ${r} ease-out`,content:`""`},"&::before":{top:_,insetInlineEnd:x,insetInlineStart:x,height:i},"&::after":{top:x,bottom:x,insetInlineStart:_,width:i,transform:`rotate(90deg)`},"&-collapsed::before":{transform:`rotate(-180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`},"&-spaced":{"&::before, &::after":{display:`none`,content:`none`},background:`transparent`,border:0,visibility:`hidden`}},[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:h,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:p}},[`${n}-descriptions-view`]:{display:`flex`,table:{flex:`auto`,width:`100%`}}},[`${t}-expanded-row-fixed`]:{position:`relative`,margin:`${Y(y(d).mul(-1).equal())} ${Y(y(f).mul(-1).equal())}`,padding:`${Y(d)} ${Y(f)}`}}}},zZ=e=>{let{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:a,paddingXXS:o,paddingXS:s,colorText:c,lineWidth:l,lineType:u,tableBorderColor:d,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:m,borderRadius:h,motionDurationSlow:g,colorIcon:_,colorPrimary:v,tableHeaderFilterActiveBg:y,colorTextDisabled:b,tableFilterDropdownBg:x,tableFilterDropdownHeight:S,controlItemBgHover:C,controlItemBgActive:w,boxShadowSecondary:T,filterDropdownMenuBg:E,calc:D}=e,O=`${n}-dropdown`,k=`${t}-filter-dropdown`,A=`${n}-tree`,j=`${Y(l)} ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:`flex`,justifyContent:`space-between`},[`${t}-filter-trigger`]:{position:`relative`,display:`flex`,alignItems:`center`,marginBlock:D(o).mul(-1).equal(),marginInline:`${Y(o)} ${Y(D(m).div(2).mul(-1).equal())}`,padding:`0 ${Y(o)}`,color:f,fontSize:p,borderRadius:h,cursor:`pointer`,transition:`all ${g}`,"&:hover":{color:_,background:y},"&.active":{color:v}}}},{[`${n}-dropdown`]:{[k]:{...Ul(e),minWidth:i,backgroundColor:x,borderRadius:h,boxShadow:T,overflow:`hidden`,[`${O}-menu`]:{maxHeight:S,overflowX:`hidden`,border:0,boxShadow:`none`,borderRadius:`unset`,backgroundColor:E,"&:empty::after":{display:`block`,padding:`${Y(s)} 0`,color:b,fontSize:p,textAlign:`center`,content:`"Not Found"`}},[`${k}-tree`]:{paddingBlock:`${Y(s)} 0`,paddingInline:s,[A]:{padding:0},[`${A}-treenode ${A}-node-content-wrapper:hover`]:{backgroundColor:C},[`${A}-treenode-checkbox-checked ${A}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:w}}},[`${k}-search`]:{padding:s,borderBottom:j,"&-input":{input:{minWidth:a},[r]:{color:b}}},[`${k}-checkall`]:{width:`100%`,marginBottom:o,marginInlineStart:o},[`${k}-btns`]:{display:`flex`,justifyContent:`space-between`,padding:`${Y(D(s).sub(l).equal())} ${Y(s)}`,overflow:`hidden`,borderTop:j}}}},{[`${n}-dropdown ${k}, ${k}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:c},"> ul":{maxHeight:`calc(100vh - 130px)`,overflowX:`hidden`,overflowY:`auto`}}}]};function BZ({colorSplit:e}){return[{boxShadow:`inset 10px 0 8px -8px ${e}`},{boxShadow:`inset -10px 0 8px -8px ${e}`}]}var VZ=e=>{let{componentCls:t,lineWidth:n,motionDurationSlow:r,zIndexTableFixed:i,tableBg:a,calc:o}=e,s=`${t}-cell`,c=`${s}-fix`,l={position:`absolute`,top:0,bottom:o(n).mul(-1).equal(),width:30,transition:`box-shadow ${r}`,content:`""`,pointerEvents:`none`},[u,d]=BZ(e);return{[`${t}-wrapper`]:{[`${s}${c}`]:{position:`sticky`},[c]:{zIndex:`calc(var(--z-offset-reverse) + ${i})`,background:a,"&:after":l,"&-start:after":{insetInlineStart:`100%`},"&-end:after":{insetInlineEnd:`100%`},"&-start-shadow-show:after":u,"&-end-shadow-show:after":d},[`${t}-container`]:{position:`relative`,"&:before, &:after":{...l,zIndex:`calc(var(--columns-count) * 2 + ${i} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${t}-has-fix-start ${t}-container:before`]:{display:`none`},[`${t}-has-fix-end ${t}-container:after`]:{display:`none`},[`${t}-fix-start-shadow-show ${t}-container:before`]:u,[`${t}-fix-end-shadow-show ${t}-container:after`]:d}}},HZ=e=>{let{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${Y(r)} 0`},[`${t}-pagination`]:{display:`flex`,flexWrap:`wrap`,rowGap:e.paddingXS,"> *":{flex:`none`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`}}}}},UZ=e=>{let{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${Y(n)} ${Y(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"&::before":{borderStartStartRadius:n},"&::after":{borderStartEndRadius:n},[`> ${t}-content`]:{borderStartStartRadius:n,borderStartEndRadius:n},"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${Y(n)} ${Y(n)}`}}}}},WZ=e=>{let{componentCls:t}=e,[n,r]=BZ(e);return{[`${t}-wrapper-rtl`]:{direction:`rtl`,table:{direction:`rtl`},[`${t}-row-expand-icon`]:{float:`right`,"&::after":{transform:`rotate(-90deg)`},"&-collapsed::before":{transform:`rotate(180deg)`},"&-collapsed::after":{transform:`rotate(0deg)`}},[`${t}-cell-fix`]:{"&-start-shadow-show:after":r,"&-end-shadow-show:after":n},[`${t}-container`]:{[`${t}-row-indent`]:{float:`right`}},[`${t}-fix-start-shadow-show ${t}-container:before`]:r,[`${t}-fix-end-shadow-show ${t}-container:after`]:n}}},GZ=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:i,padding:a,paddingXS:o,headerIconColor:s,headerIconHoverColor:c,tableSelectionColumnWidth:l,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:m}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:l,[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:m(l).add(m(o).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:m(l).add(i).add(m(a).div(4)).add(m(o).mul(2)).equal()}},[` table tr th${t}-selection-column, table tr td${t}-selection-column, ${t}-selection-column - `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:`center`,[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:m(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:`transparent !important`},[`${t}-selection`]:{position:`relative`,display:`inline-flex`,flexDirection:`column`},[`${t}-selection-extra`]:{position:`absolute`,top:0,zIndex:1,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,marginInlineStart:`100%`,paddingInlineStart:Y(m(p).div(4).equal()),[r]:{color:s,fontSize:i,verticalAlign:`baseline`,"&:hover":{color:c}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${t}-cell-row-hover`]:{background:f}}}}}},qZ=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,i=(e,i,a,o)=>({[`${t}${t}-${e}`]:{fontSize:o,[` + `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:`center`,[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:m(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:`transparent !important`},[`${t}-selection`]:{position:`relative`,display:`inline-flex`,flexDirection:`column`},[`${t}-selection-extra`]:{position:`absolute`,top:0,zIndex:1,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,marginInlineStart:`100%`,paddingInlineStart:Y(m(p).div(4).equal()),[r]:{color:s,fontSize:i,verticalAlign:`baseline`,"&:hover":{color:c}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${t}-cell-row-hover`]:{background:f}}}}}},KZ=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,i=(e,i,a,o)=>({[`${t}${t}-${e}`]:{fontSize:o,[` ${t}-title, ${t}-footer, ${t}-cell, @@ -351,13 +351,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td - `]:{padding:`${Y(i)} ${Y(a)}`},[`${t}-filter-trigger`]:{marginInlineEnd:Y(r(a).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${Y(r(i).mul(-1).equal())} ${Y(r(a).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:Y(r(i).mul(-1).equal()),marginInline:`${Y(r(n).sub(a).equal())} ${Y(r(a).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:Y(r(a).div(4).equal())}}});return{[`${t}-wrapper`]:{...i(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle),...i(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall)}}},JZ=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:i,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:`transparent !important`}},"&:focus-visible":{color:e.colorPrimary},[` + `]:{padding:`${Y(i)} ${Y(a)}`},[`${t}-filter-trigger`]:{marginInlineEnd:Y(r(a).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${Y(r(i).mul(-1).equal())} ${Y(r(a).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:Y(r(i).mul(-1).equal()),marginInline:`${Y(r(n).sub(a).equal())} ${Y(r(a).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:Y(r(a).div(4).equal())}}});return{[`${t}-wrapper`]:{...i(`medium`,e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle),...i(`small`,e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall)}}},qZ=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:i,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:`transparent !important`}},"&:focus-visible":{color:e.colorPrimary},[` &${t}-cell-fix-left:hover, &${t}-cell-fix-right:hover - `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:`transparent !important`}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:`relative`,zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:`flex`,flex:`auto`,alignItems:`center`,justifyContent:`space-between`,"&::after":{position:`absolute`,inset:0,width:`100%`,height:`100%`,content:`""`}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:`none`}},[`${t}-column-sorter`]:{marginInlineStart:n,color:i,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:`inline-flex`,flexDirection:`column`,alignItems:`center`},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:`-0.3em`}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},YZ=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:i,tableScrollThumbSize:a,tableScrollBg:o,stickyScrollBarBorderRadius:s,lineWidth:c,lineType:l,tableBorderColor:u,zIndexTableFixed:d}=e,f=`${Y(c)} ${l} ${u}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:`sticky`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,background:e.colorBgContainer},"&-scroll":{position:`sticky`,bottom:0,height:`${Y(a)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,display:`flex`,alignItems:`center`,background:o,borderTop:f,opacity:n,"&:hover":{transformOrigin:`center bottom`},"&-bar":{height:a,backgroundColor:r,borderRadius:s,transition:`all ${e.motionDurationSlow}, transform 0s`,position:`absolute`,bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},XZ=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:r,calc:i}=e,a=`${Y(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:`relative`,zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${Y(i(n).mul(-1).equal())} 0 ${r}`}}}},ZZ=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:i,tableBorderColor:a,calc:o}=e,s=`${Y(r)} ${i} ${a}`,c=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` + `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:`transparent !important`}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:`relative`,zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:`flex`,flex:`auto`,alignItems:`center`,justifyContent:`space-between`,"&::after":{position:`absolute`,inset:0,width:`100%`,height:`100%`,content:`""`}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:`none`}},[`${t}-column-sorter`]:{marginInlineStart:n,color:i,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:`inline-flex`,flexDirection:`column`,alignItems:`center`},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:`-0.3em`}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},JZ=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:i,tableScrollThumbSize:a,tableScrollBg:o,stickyScrollBarBorderRadius:s,lineWidth:c,lineType:l,tableBorderColor:u,zIndexTableFixed:d}=e,f=`${Y(c)} ${l} ${u}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:`sticky`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,background:e.colorBgContainer},"&-scroll":{position:`sticky`,bottom:0,height:`${Y(a)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,display:`flex`,alignItems:`center`,background:o,borderTop:f,opacity:n,"&:hover":{transformOrigin:`center bottom`},"&-bar":{height:a,backgroundColor:r,borderRadius:s,transition:`all ${e.motionDurationSlow}, transform 0s`,position:`absolute`,bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},YZ=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:r,calc:i}=e,a=`${Y(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:`relative`,zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${Y(i(n).mul(-1).equal())} 0 ${r}`}}}},XZ=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:i,tableBorderColor:a,calc:o}=e,s=`${Y(r)} ${i} ${a}`,c=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` & > ${t}-row, & > div:not(${t}-row) > ${t}-row - `]:{display:`flex`,boxSizing:`border-box`,width:`100%`}},[`${t}-cell`]:{borderBottom:s,transition:`background-color ${n}`},[`${t}-expanded-row`]:{[`${c}${c}-fixed`]:{position:`sticky`,insetInlineStart:0,overflow:`hidden`,width:`calc(var(--virtual-width) - ${Y(r)})`,borderInlineEnd:`none`}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:`""`,insetInline:0,bottom:0,borderBottom:s,position:`absolute`},[`${t}-cell`]:{borderInlineEnd:s,[`&${t}-cell-fix-right-first:before`]:{content:`""`,position:`absolute`,insetBlock:0,insetInlineStart:o(r).mul(-1).equal(),borderInlineStart:s}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:s,borderBottom:s}}}}}},QZ=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:i,tableExpandColumnWidth:a,lineWidth:o,lineType:s,tableBorderColor:c,tableFontSize:l,tableBg:u,tableRadius:d,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:m,tableHeaderCellSplitColor:h,tableFooterTextColor:g,tableFooterBg:_,calc:v}=e,y=`${Y(o)} ${s} ${c}`;return{[`${t}-wrapper`]:{clear:`both`,maxWidth:`100%`,"--rc-virtual-list-scrollbar-bg":e.tableScrollBg,...Gl(),[t]:{...Ul(e),fontSize:l,background:u,borderRadius:`${Y(d)} ${Y(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`},table:{width:`100%`,textAlign:`start`,borderRadius:`${Y(d)} ${Y(d)} 0 0`,borderCollapse:`separate`,borderSpacing:0},[` + `]:{display:`flex`,boxSizing:`border-box`,width:`100%`}},[`${t}-cell`]:{borderBottom:s,transition:`background-color ${n}`},[`${t}-expanded-row`]:{[`${c}${c}-fixed`]:{position:`sticky`,insetInlineStart:0,overflow:`hidden`,width:`calc(var(--virtual-width) - ${Y(r)})`,borderInlineEnd:`none`}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:`""`,insetInline:0,bottom:0,borderBottom:s,position:`absolute`},[`${t}-cell`]:{borderInlineEnd:s,[`&${t}-cell-fix-right-first:before`]:{content:`""`,position:`absolute`,insetBlock:0,insetInlineStart:o(r).mul(-1).equal(),borderInlineStart:s}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:s,borderBottom:s}}}}}},ZZ=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:i,tableExpandColumnWidth:a,lineWidth:o,lineType:s,tableBorderColor:c,tableFontSize:l,tableBg:u,tableRadius:d,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:m,tableHeaderCellSplitColor:h,tableFooterTextColor:g,tableFooterBg:_,calc:v}=e,y=`${Y(o)} ${s} ${c}`;return{[`${t}-wrapper`]:{clear:`both`,maxWidth:`100%`,"--rc-virtual-list-scrollbar-bg":e.tableScrollBg,...Gl(),[t]:{...Ul(e),fontSize:l,background:u,borderRadius:`${Y(d)} ${Y(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`},table:{width:`100%`,textAlign:`start`,borderRadius:`${Y(d)} ${Y(d)} 0 0`,borderCollapse:`separate`,borderSpacing:0},[` ${t}-cell, ${t}-thead > tr > th, ${t}-tbody > tr > th, @@ -368,42 +368,42 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho > ${t}-wrapper:only-child, > ${t}-expanded-row-fixed > ${t}-wrapper:only-child `]:{[t]:{marginBlock:Y(v(r).mul(-1).equal()),marginInline:`${Y(v(a).sub(i).equal())} - ${Y(v(i).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:`relative`,color:f,fontWeight:n,textAlign:`start`,background:m,borderBottom:y,transition:`background-color ${p} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:`0 !important`,borderBlock:`0 !important`,[`${t}-measure-cell-content`]:{height:0,overflow:`hidden`,pointerEvents:`none`}}}},[`${t}-footer`]:{padding:`${Y(r)} ${Y(i)}`,color:g,background:_}}}},$Z=e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:i,colorFillContent:a,controlItemBgActive:o,controlItemBgActiveHover:s,padding:c,paddingSM:l,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:m,fontSize:h,fontSizeSM:g,lineHeight:_,lineWidth:v,colorIcon:y,colorIconHover:b,opacityLoading:x,controlInteractiveSize:S}=e,C=new Nc(i).onBackground(n).toHexString(),w=new Nc(a).onBackground(n).toHexString(),T=new Nc(t).onBackground(n).toHexString(),E=new Nc(y),D=new Nc(b),O=S/2-v,k=O*2+v*3;return{headerBg:T,headerColor:r,headerSortActiveBg:C,headerSortHoverBg:w,bodySortBg:T,rowHoverBg:T,rowSelectedBg:o,rowSelectedHoverBg:s,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:l,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:f,footerBg:T,footerColor:r,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:d,fixedHeaderSortActiveBg:C,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*_-v*3)/2-Math.ceil((g*1.4-v*3)/2),headerIconColor:E.clone().setA(E.a*x).toRgbString(),headerIconHoverColor:D.clone().setA(D.a*x).toRgbString(),expandIconHalfInner:O,expandIconSize:k,expandIconScale:S/k}},eQ=2,tQ=Ql(`Table`,e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:i,headerBg:a,headerColor:o,headerSortActiveBg:s,headerSortHoverBg:c,bodySortBg:l,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:m,cellPaddingInline:h,cellPaddingBlockMD:g,cellPaddingInlineMD:_,cellPaddingBlockSM:v,cellPaddingInlineSM:y,borderColor:b,footerBg:x,footerColor:S,headerBorderRadius:C,cellFontSize:w,cellFontSizeMD:T,cellFontSizeSM:E,headerSplitColor:D,fixedHeaderSortActiveBg:O,headerFilterHoverBg:k,filterDropdownBg:A,expandIconBg:j,selectionColumnWidth:M,stickyScrollBarBg:N,calc:P}=e,F=dc(e,{tableFontSize:w,tableBg:r,tableRadius:C,tablePaddingVertical:m,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:_,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:y,tableBorderColor:b,tableHeaderTextColor:o,tableHeaderBg:a,tableFooterTextColor:S,tableFooterBg:x,tableHeaderCellSplitColor:D,tableHeaderSortBg:s,tableHeaderSortHoverBg:c,tableBodySortBg:l,tableFixedHeaderSortActiveBg:O,tableHeaderFilterActiveBg:k,tableFilterDropdownBg:A,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:f,zIndexTableFixed:eQ,tableFontSizeMiddle:T,tableFontSizeSmall:E,tableSelectionColumnWidth:M,tableExpandIconBg:j,tableExpandColumnWidth:P(i).add(P(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:N,tableScrollThumbBgHover:t,tableScrollBg:n});return[QZ(F),UZ(F),XZ(F),JZ(F),BZ(F),IZ(F),WZ(F),zZ(F),XZ(F),RZ(F),KZ(F),HZ(F),YZ(F),LZ(F),qZ(F),GZ(F),ZZ(F)]},$Z,{resetFont:!1,unitless:{expandIconScale:!0}}),nQ=[],rQ=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,classNames:o,styles:s,size:c,bordered:l,dropdownPrefixCls:u,dataSource:d,pagination:f,rowSelection:p,rowKey:m,rowClassName:h,columns:g,children:_,childrenColumnName:v,onChange:y,getPopupContainer:b,loading:x,expandIcon:C,expandable:w,expandedRowRender:T,expandIconColumnIndex:E,indentSize:D,scroll:O,sortDirections:k,locale:A,showSorterTooltip:j={target:`full-header`},virtual:M}=e;Gi(`Table`);let N=S.useMemo(()=>g||TJ(_),[g,_]),P=YC(S.useMemo(()=>N.some(e=>e.responsive),[N])),F=S.useMemo(()=>{let e=new Set(Object.keys(P).filter(e=>P[e]));return N.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[N,P]),I=gi(e,[`className`,`style`,`columns`]),{locale:L=Hd,table:R}=S.useContext(ga),{getPrefixCls:z,direction:B,renderEmpty:V,getPopupContainer:H,className:U,style:ee,classNames:W,styles:te}=ya(`table`),G=Eh(e=>c===`middle`?`medium`:c??e),ne={...e,size:G,bordered:l},[K,re]=Cf([W,o],[te,s],{props:ne},{pagination:{_default:`root`},header:{_default:`wrapper`},body:{_default:`wrapper`}}),ie={...L.Table,...A},[ae]=Yd(`global`,Hd.global),q=d||nQ,oe=z(`table`,n),se=z(`dropdown`,u),[,ce]=Vl(),le=S.useMemo(()=>nf(p)?{columnWidth:ce.Table?.selectionColumnWidth,...p}:p,[p,ce.Table?.selectionColumnWidth]),ue=sp(oe),[de,fe]=tQ(oe,ue),pe={childrenColumnName:v,expandIconColumnIndex:E,...w,expandIcon:w?.expandIcon??R?.expandable?.expandIcon},{childrenColumnName:me=`children`}=pe,he=S.useMemo(()=>q.some(e=>e?.[me])?`nest`:T||w?.expandedRowRender?`row`:null,[me,q]),ge={body:S.useRef(null)},_e=RY(oe),ve=S.useRef(null),ye=S.useRef(null);kf(t,()=>({...ye.current,nativeElement:ve.current}));let be=m||R?.rowKey||`key`,xe=O??R?.scroll,Se=S.useMemo(()=>typeof be==`function`?be:e=>e?.[be],[be]),[Ce]=fZ(q,me,Se),we={},Te=(e,t,n=!1)=>{let r={...we,...e};n&&(we.resetPagination?.(),r.pagination?.current&&(r.pagination.current=1),f&&f.onChange?.(1,r.pagination?.pageSize)),O&&O.scrollToFirstRowOnChange!==!1&&ge.body.current&&op(0,{getContainer:()=>ge.body.current}),y?.(r.pagination,r.filters,r.sorter,{currentDataSource:lZ(AZ(q,r.sorterStates,me),r.filterStates,me),action:t})},[Ee,De,Oe,ke]=jZ({prefixCls:oe,mergedColumns:F,onSorterChange:(e,t)=>{Te({sorter:e,sorterStates:t},`sort`,!1)},sortDirections:k||[`ascend`,`descend`],tableLocale:ie,showSorterTooltip:j,globalLocale:ae}),Ae=S.useMemo(()=>AZ(q,De,me),[me,q,De]);we.sorter=ke(),we.sorterStates=De;let[je,Me,Ne]=dZ({prefixCls:oe,locale:ie,dropdownPrefixCls:se,mergedColumns:F,onFilterChange:(e,t)=>{Te({filters:e,filterStates:t},`filter`,!0)},getPopupContainer:b||H,rootClassName:J(i,ue)}),Pe=lZ(Ae,Me,me);we.filters=Ne,we.filterStates=Me;let[Fe]=NZ(S.useMemo(()=>{let e={};return Object.keys(Ne).forEach(t=>{Ne[t]!==null&&(e[t]=Ne[t])}),{...Oe,filters:e}},[Oe,Ne])),[Ie,Le]=mZ(Pe.length,(e,t)=>{Te({pagination:{...we.pagination,current:e,pageSize:t}},`paginate`)},f);we.pagination=f===!1?{}:pZ(Ie,f),we.resetPagination=Le;let Re=S.useMemo(()=>{if(f===!1||!Ie.pageSize)return Pe;let{current:e=1,total:t,pageSize:n=10}=Ie;return Pe.lengthn?Pe.slice((e-1)*n,e*n):Pe:Pe.slice((e-1)*n,e*n)},[!!f,Pe,Ie?.current,Ie?.pageSize,Ie?.total]),[ze,Be]=IY({prefixCls:oe,data:Pe,pageData:Re,getRowKey:Se,getRecordByKey:Ce,expandType:he,childrenColumnName:me,locale:ie,getPopupContainer:b||H},le),Ve=(e,t,n)=>{let r=typeof h==`function`?h(e,t,n):h;return J({[`${oe}-row-selected`]:Be.has(Se(e,t))},r)};pe.__PARENT_RENDER_ICON__=pe.expandIcon,pe.expandIcon=pe.expandIcon||C||LY(ie),he===`nest`&&pe.expandIconColumnIndex===void 0?pe.expandIconColumnIndex=+!!le:pe.expandIconColumnIndex>0&&le&&--pe.expandIconColumnIndex,typeof pe.indentSize!=`number`&&(pe.indentSize=ef(D)?D:15);let He=S.useCallback(e=>Fe(ze(je(Ee(e)))),[Ee,je,ze]),Ue,We;if(f!==!1&&Ie?.total){let e;e=Ie.size?Ie.size:G===`small`||G===`medium`?`small`:void 0;let t=(t=`end`)=>S.createElement(FW,{...Ie,classNames:K.pagination,styles:re.pagination,className:J(`${oe}-pagination ${oe}-pagination-${t}`,Ie.className),size:e}),{placement:n,position:r}=Ie,i=n??r,a=e=>{let t=e.toLowerCase();return t.includes(`center`)?`center`:t.includes(`left`)||t.includes(`start`)?`start`:`end`};if(Array.isArray(i)){let[e,n]=[`top`,`bottom`].map(e=>i.find(t=>t.includes(e))),r=i.every(e=>`${e}`==`none`);!e&&!n&&!r&&(We=t()),e&&(Ue=t(a(e))),n&&(We=t(a(n)))}else We=t()}let Ge=S.useMemo(()=>{if(typeof x==`boolean`)return{spinning:x};if(nf(x))return{spinning:!0,...x}},[x]),Ke=J(fe,ue,`${oe}-wrapper`,U,{[`${oe}-wrapper-rtl`]:B===`rtl`},r,i,K.root,de),qe={...re.root,...ee,...a},Je=S.useMemo(()=>Ge?.spinning&&q===nQ?null:A?.emptyText===void 0?V?.(`Table`)||S.createElement(fC,{componentName:`Table`}):A.emptyText,[Ge?.spinning,q,A?.emptyText,V]),Ye=M?FZ:PZ,Xe={},Ze=S.useMemo(()=>{let{fontSize:e,lineHeight:t,lineWidth:n,padding:r,paddingXS:i,paddingSM:a}=ce,o=Math.floor(e*t);switch(G){case`medium`:return a*2+o+n;case`small`:return i*2+o+n;default:return r*2+o+n}},[ce,G]);return M&&(Xe.listItemHeight=Ze),S.createElement(`div`,{ref:ve,className:Ke,style:qe},S.createElement(nG,{spinning:!1,...Ge},Ue,S.createElement(Ye,{...Xe,...I,scroll:xe,classNames:K,styles:re,ref:ye,columns:F,direction:B,expandable:pe,prefixCls:oe,className:J({[`${oe}-medium`]:G===`medium`,[`${oe}-small`]:G===`small`,[`${oe}-bordered`]:l,[`${oe}-empty`]:q.length===0},fe,ue,de),data:Re,rowKey:Se,rowClassName:Ve,emptyText:Je,internalHooks:yq,internalRefs:ge,transformColumns:He,getContainerWidth:_e,measureRowRender:e=>S.createElement(yw.Provider,{value:!0},S.createElement(Mm,{getPopupContainer:e=>e},e))}),We))}),iQ=S.forwardRef((e,t)=>{let n=S.useRef(0);return n.current+=1,S.createElement(rQ,{...e,ref:t,_renderTimes:n.current})});iQ.SELECTION_COLUMN=AY,iQ.EXPAND_COLUMN=vq,iQ.SELECTION_ALL=jY,iQ.SELECTION_INVERT=MY,iQ.SELECTION_NONE=NY,iQ.Column=uY,iQ.ColumnGroup=dY,iQ.Summary=Xq;var aQ=iQ,oQ=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,o=a(r).sub(n).equal(),s=a(t).sub(n).equal();return{[i]:{...Ul(e),display:`inline-block`,height:`auto`,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:`nowrap`,backgroundColor:e.defaultBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:`start`,position:`relative`,[`&${i}-rtl`]:{direction:`rtl`},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:`transparent`,borderColor:`transparent`,cursor:`pointer`,[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:`not-allowed`,[`&:not(${i}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:`transparent`}},[`&${i}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${i}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:`flex`,flexWrap:`wrap`,gap:e.paddingXS}},"&-hidden":{display:`none`},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}},[`&${e.componentCls}-solid`]:{borderColor:`transparent`,color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${i}-default`]:{color:e.solidTextColor}},[`${i}-filled`]:{borderColor:`transparent`,backgroundColor:e.tagBorderlessBg},[`&${i}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,backgroundColor:e.colorBgContainerDisabled,a:{cursor:`not-allowed`,pointerEvents:`none`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${i}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${i}-solid, &${i}-filled`]:{color:e.colorTextDisabled,[`${i}-close-icon`]:{color:e.colorTextDisabled}},[`${i}-close-icon`]:{cursor:`not-allowed`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},sQ=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return dc(e,{tagFontSize:i,tagLineHeight:Y(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},cQ=e=>{let t=c_(new Rg(e.colorBgSolid),`#fff`)?`#000`:`#fff`;return{defaultBg:new Nc(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},lQ=Ql(`Tag`,e=>oQ(sQ(e)),cQ),uQ=S.forwardRef((e,t)=>{let{prefixCls:n,style:r,className:i,checked:a,children:o,icon:s,onChange:c,onClick:l,disabled:u,...d}=e,{getPrefixCls:f,tag:p}=S.useContext(ga),m=S.useContext(mm),h=u??m,g=e=>{h||(c?.(!a),l?.(e))},_=f(`tag`,n),[v,y]=lQ(_),b=J(_,`${_}-checkable`,{[`${_}-checkable-checked`]:a,[`${_}-checkable-disabled`]:h},p?.className,i,v,y);return S.createElement(`span`,{...d,ref:t,style:{...r,...p?.style},className:b,onClick:g},s,S.createElement(`span`,null,o))}),dQ=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,rootClassName:i,className:a,style:o,classNames:s,styles:c,disabled:l,options:u,value:d,defaultValue:f,onChange:p,multiple:m,...h}=e,{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x}=ya(`tag`),C=g(`tag`,r),w=`${C}-checkable-group`,[T,E]=lQ(C,sp(C)),[D,O]=Cf([b,s],[x,c],{props:e}),k=(0,S.useMemo)(()=>Array.isArray(u)?u.map(e=>nf(e)?e:{value:e,label:e}):[],[u]),[A,j]=Gn(f,d),M=(e,t)=>{let n=null;if(m){let r=A||[];n=e?[].concat(pa(r),[t.value]):r.filter(e=>e!==t.value)}else n=e?t.value:null;j(n),p?.(n)},N=S.useRef(null);(0,S.useImperativeHandle)(t,()=>({nativeElement:N.current}));let P=xi(h,{aria:!0,data:!0});return S.createElement(`div`,{...P,className:J(w,v,i,{[`${w}-disabled`]:l,[`${w}-rtl`]:_===`rtl`},T,E,a,D.root),style:{...y,...O.root,...o},id:n,ref:N},k.map(e=>S.createElement(uQ,{key:e.value,className:J(`${w}-item`,D.item),style:O.item,checked:m?(A||[]).includes(e.value):A===e.value,onChange:t=>M(t,e),disabled:l},e.label)))});function fQ(e,t){let{color:n,variant:r,bordered:i}=e;return S.useMemo(()=>{let e=n?.endsWith(`-inverse`),a;a=r||(e?`solid`:i===!1?`filled`:t||`filled`);let o=e?n?.replace(`-inverse`,``):n,s=Dw(n),c=Ow(n),l={};if(!s&&!c&&o)if(a===`solid`)l.backgroundColor=n;else{let e=new Nc(o).toHsl();e.l=.95,l.backgroundColor=new Nc(e).toHexString(),l.color=n,a===`outlined`&&(l.borderColor=n)}return[a,o,s,c,l]},[n,r,i,t])}var pQ=e=>nu(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:i,borderColor:r,color:n},[`&${e.componentCls}-solid`]:{backgroundColor:a,borderColor:a,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:i,color:n}}})),mQ=eu([`Tag`,`preset`],e=>pQ(sQ(e)),cQ);function hQ(e){return typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):e}var gQ=(e,t,n)=>{let r=hQ(n);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${r}Bg`],borderColor:e[`color${r}Border`],color:e[`color${n}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${n}`],borderColor:e[`color${n}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${r}Bg`],color:e[`color${n}`]}}}},_Q=eu([`Tag`,`status`],e=>{let t=sQ(e);return[gQ(t,`success`,`Success`),gQ(t,`processing`,`Info`),gQ(t,`error`,`Error`),gQ(t,`warning`,`Warning`)]},cQ),vQ=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,children:o,icon:s,color:c,variant:l,onClose:u,bordered:d,disabled:f,href:p,target:m,styles:h,classNames:g,..._}=e,{getPrefixCls:v,direction:y,className:b,variant:x,style:C,classNames:w,styles:T}=ya(`tag`),[E,D,O,k,A]=fQ(e,x),j=O||k,M=S.useContext(mm),N=f??M,{tag:P}=S.useContext(ga),[F,I]=S.useState(!0),L=gi(_,[`closeIcon`,`closable`]),R={...e,color:D,variant:E,disabled:N},[z,B]=Cf([w,g],[T,h],{props:R}),V=S.useMemo(()=>{let e={...B.root,...C,...a};return N||(e={...A,...e}),e},[B.root,C,a,A,N]),H=v(`tag`,n),[U,ee]=lQ(H),W=J(H,b,z.root,`${H}-${E}`,{[`${H}-${D}`]:j,[`${H}-hidden`]:!F,[`${H}-rtl`]:y===`rtl`,[`${H}-disabled`]:N},r,i,U,ee),te=e=>{N||(e.stopPropagation(),u?.(e),!e.defaultPrevented&&I(!1))},[,G]=pf(sf(e),sf(P),{closable:!1,closeIconRender:e=>lm(e,S.createElement(`span`,{className:`${H}-close-icon`,onClick:te},e),e=>({onClick:t=>{e?.onClick?.(t),te(t)},className:J(e?.className,`${H}-close-icon`)}))}),ne=typeof _.onClick==`function`||o&&o.type===`a`,K=um(s,{className:J(S.isValidElement(s)?s.props?.className:void 0,z.icon),style:B.icon}),re=K?S.createElement(S.Fragment,null,K,o&&S.createElement(`span`,{className:z.content,style:B.content},o)):o,ie=p?`a`:`span`,ae=S.createElement(ie,{...L,ref:t,className:W,style:V,href:N?void 0:p,target:m,onClick:N?void 0:L.onClick,...p&&N?{"aria-disabled":!0}:{}},re,G,O&&S.createElement(mQ,{key:`preset`,prefixCls:H}),k&&S.createElement(_Q,{key:`status`,prefixCls:H}));return ne?S.createElement(Th,{component:`Tag`},ae):ae});vQ.CheckableTag=uQ,vQ.CheckableTagGroup=dQ;var yQ=e=>{let t=new Map;return e.forEach((e,n)=>{t.set(e,n)}),t},bQ=e=>{let t=new Map;return e.forEach(({disabled:e,key:n},r)=>{e&&t.set(n,r)}),t};function xQ(e,t){let n=e===`right`;return t===`rtl`?n?S.createElement(Gw,null):S.createElement(Vg,null):n?S.createElement(Vg,null):S.createElement(Gw,null)}var SQ=({type:e,actions:t,moveToLeft:n,moveToRight:r,leftActive:i,rightActive:a,direction:o,disabled:s})=>{let c=e===`right`,l=c?t[0]:t[1],u=c?r:n,d=c?a:i,f=xQ(e,o);if(S.isValidElement(l)){let e=l;return S.cloneElement(e,{disabled:s||!d,onClick:t=>{e?.props?.onClick?.(t),u?.(t)}})}return S.createElement(g_,{type:`primary`,size:`small`,disabled:s||!d,onClick:e=>u?.(e),icon:f},l)},CQ=e=>{let{className:t,style:n,oneWay:r,actions:i,...a}=e;return S.createElement(`div`,{className:t,style:n},S.createElement(SQ,{type:`right`,actions:i,...a}),!r&&S.createElement(SQ,{type:`left`,actions:i,...a}),i.slice(r?1:2))},wQ=(e,t,n)=>{let r=S.useMemo(()=>(e||[]).map(e=>t?{...e,key:t(e)}:e),[e,t]),[i,a]=S.useMemo(()=>{let e=[],t=Array.from({length:n?.length??0}),i=yQ(n||[]);return r.forEach(n=>{if(i.has(n.key)){let e=i.get(n.key);t[e]=n}else e.push(n)}),[e,t]},[r,n]);return[r,i.filter(Boolean),a.filter(Boolean)]},TQ=[];function EQ(e,t){let n=e.filter(e=>t.has(e));return e.length===n.length?e:n}function DQ(e){return Array.from(e).join(`;`)}function OQ(e,t,n){let[r,i]=S.useMemo(()=>[new Set(e.map(e=>e?.key)),new Set(t.map(e=>e?.key))],[e,t]),[a,o]=Gn(TQ,n),s=S.useMemo(()=>EQ(a,r),[a,r]),c=S.useMemo(()=>EQ(a,i),[a,i]);return S.useEffect(()=>{o([].concat(pa(EQ(a,r)),pa(EQ(a,i))))},[DQ(r),DQ(i)]),[s,c,zn(e=>{o([].concat(pa(e),pa(c)))}),zn(e=>{o([].concat(pa(s),pa(e)))})]}var kQ=e=>{let{placeholder:t=``,value:n,prefixCls:r,disabled:i,onChange:a,handleClear:o}=e,s=S.useCallback(e=>{a?.(e),e.target.value===``&&o?.()},[a]);return S.createElement(xz,{placeholder:t,className:r,value:n,onChange:s,disabled:i,allowClear:!0,prefix:S.createElement(IC,null)})},AQ=c(o((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:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`}}))());function jQ(){return jQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,jQ({},e,{ref:t,icon:AQ.default}))),NQ=S.memo(e=>{let{prefixCls:t,classNames:n,styles:r,renderedText:i,renderedEl:a,item:o,checked:s,disabled:c,onClick:l,onRemove:u,showRemove:d}=e,f=c||o?.disabled,p=J(`${t}-content-item`,n.item,{[`${t}-content-item-disabled`]:f,[`${t}-content-item-checked`]:s&&!f}),m;(typeof i==`string`||ef(i))&&(m=String(i));let[h]=Yd(`Transfer`,Hd.Transfer),g={className:p,style:r.item,title:m},_=S.createElement(`span`,{className:J(`${t}-content-item-text`,n.itemContent),style:r.itemContent},a);return d?S.createElement(`li`,{...g},_,S.createElement(`button`,{type:`button`,disabled:f,className:`${t}-content-item-remove`,"aria-label":h?.remove,onClick:()=>u?.(o)},S.createElement(MQ,null))):(g.onClick=f?void 0:e=>l(o,e),S.createElement(`li`,{...g},S.createElement(mR,{className:J(`${t}-checkbox`,n.itemIcon),style:r.itemIcon,checked:s,disabled:f}),_))}),PQ=[`handleFilter`,`handleClear`,`checkedKeys`],FQ=e=>({simple:!0,showSizeChanger:!1,showLessItems:!1,...e}),IQ=S.forwardRef((e,t)=>{let{prefixCls:n,classNames:r,styles:i,filteredRenderItems:a,selectedKeys:o,disabled:s,showRemove:c,pagination:l,onScroll:u,onItemSelect:d,onItemRemove:f}=e,[p,m]=S.useState(1),h=S.useMemo(()=>l?FQ(nf(l)?l:{}):null,[l]),[g,_]=Gn(10,h?.pageSize);S.useEffect(()=>{if(h){let e=Math.ceil(a.length/g);m(Math.min(p,e))}},[a,h,g]);let v=(e,t)=>{d(e.key,!o.includes(e.key),t)},y=e=>{f?.([e.key])},b=e=>{m(e)},x=(e,t)=>{m(e),_(t)},C=S.useMemo(()=>h?a.slice((p-1)*g,p*g):a,[p,a,h,g]);S.useImperativeHandle(t,()=>({items:C}));let w=h?S.createElement(FW,{size:`small`,disabled:s,simple:h.simple,pageSize:g,showLessItems:h.showLessItems,showSizeChanger:h.showSizeChanger,className:`${n}-pagination`,total:a.length,current:p,onChange:b,onShowSizeChange:x}):null;return S.createElement(S.Fragment,null,S.createElement(`ul`,{className:J(`${n}-content`,r.list,{[`${n}-content-show-remove`]:c}),style:i.list,onScroll:u},(C||[]).map(({renderedEl:e,renderedText:t,item:a})=>S.createElement(NQ,{key:a.key,prefixCls:n,classNames:r,styles:i,item:a,renderedText:t,renderedEl:e,showRemove:c,onClick:v,onRemove:y,checked:o.includes(a.key),disabled:s}))),w)}),LQ=()=>null;function RQ(e){return!!(e&&!S.isValidElement(e)&&Object.prototype.toString.call(e)===`[object Object]`)}function zQ(e){return e.filter(e=>!e.disabled).map(e=>e.key)}function BQ(e,t){for(let n of[e,t.title,t.key])if(typeof n==`string`||ef(n))return String(n);return``}var VQ=e=>e!==void 0,HQ=e=>nf(e)?{...e,defaultValue:e.defaultValue||``}:{defaultValue:``,placeholder:``},UQ=e=>{let{prefixCls:t,style:n,classNames:r,styles:i,dataSource:a=[],titleText:o=``,checkedKeys:s,disabled:c,showSearch:l=!1,searchPlaceholder:u,notFoundContent:d,selectAll:f,deselectAll:p,selectCurrent:m,selectInvert:h,removeAll:g,removeCurrent:_,showSelectAll:v=!0,showRemove:y,pagination:b,direction:x,itemsUnit:C,itemUnit:w,selectAllLabel:T,selectionsIcon:E,footer:D,renderList:O,onItemSelectAll:k,onItemRemove:A,handleFilter:j,handleClear:M,filterOption:N,render:P=LQ}=e,F=`${t}-section`,I=`${t}-list`,L=HQ(l),[R,z]=(0,S.useState)(L.defaultValue),B=(0,S.useRef)({}),V=e=>{z(e.target.value),j(e)},H=()=>{z(``),M()},U=(e,t)=>typeof N==`function`?N(R,t,x):e.includes(R),ee=e=>{let t=O?O({...e,onItemSelect:(t,n)=>e.onItemSelect(t,n)}):null,n=!!t;return n||(t=S.createElement(IQ,{ref:B,...e,prefixCls:I})),{customize:n,bodyContent:t}},W=e=>{let t=P(e),n=RQ(t);return{item:e,renderedEl:n?t.label:t,renderedText:n?t.value:BQ(t,e)}},te=(0,S.useMemo)(()=>Array.isArray(d)?d[x===`left`?0:1]:d,[d,x]),[G,ne]=(0,S.useMemo)(()=>{let e=[],t=[];return a.forEach(n=>{let r=W(n);R&&!U(r.renderedText,n)||(e.push(n),t.push(r))}),[e,t]},[a,R]),K=(0,S.useMemo)(()=>G.filter(e=>s.includes(e.key)&&!e.disabled),[s,G]),re=(0,S.useMemo)(()=>{if(K.length===0)return`none`;let e=yQ(s);return G.every(t=>e.has(t.key)||!!t.disabled)?`all`:`part`},[K.length,s,G]),ie=()=>{let t=l?S.createElement(`div`,{className:`${I}-body-search-wrapper`},S.createElement(kQ,{prefixCls:`${I}-search`,onChange:V,handleClear:H,placeholder:L.placeholder||u,value:R,disabled:c})):null,{customize:n,bodyContent:a}=ee({...gi(e,PQ),filteredItems:G,filteredRenderItems:ne,selectedKeys:s,classNames:r,styles:i}),o;return o=n?S.createElement(`div`,{className:`${I}-body-customize-wrapper`},a):G.length?a:S.createElement(`div`,{className:`${I}-body-not-found`},te),S.createElement(`div`,{className:J(`${I}-body`,{[`${I}-body-with-search`]:l},r.body),style:i.body},t,o)},ae=S.createElement(mR,{disabled:a.filter(e=>!e.disabled).length===0||c,checked:re===`all`,indeterminate:re===`part`,className:`${I}-checkbox`,onChange:()=>{k?.(G.filter(e=>!e.disabled).map(({key:e})=>e),re!==`all`)}}),q=(e,t)=>{if(T)return typeof T==`function`?T({selectedCount:e,totalCount:t}):T;let n=t>1?C:w;return S.createElement(S.Fragment,null,(e>0?`${e}/`:``)+t,` `,n)},oe=D&&(D.length<2?D(e):D(e,{direction:x})),se=oe?S.createElement(`div`,{className:J(`${I}-footer`,r.footer),style:i.footer},oe):null,ce=!y&&!b&&ae,le;le=y?[b?{key:`removeCurrent`,label:_,onClick(){let e=zQ((B.current?.items||[]).map(e=>e.item));A?.(e)}}:null,{key:`removeAll`,label:g,onClick(){A?.(zQ(G))}}].filter(Boolean):[{key:`selectAll`,label:re===`all`?p:f,onClick(){let e=zQ(G);k?.(e,e.length!==s.length)}},b?{key:`selectCurrent`,label:m,onClick(){let e=B.current?.items||[];k?.(zQ(e.map(e=>e.item)),!0)}}:null,{key:`selectInvert`,label:h,onClick(){let e=zQ((B.current?.items||[]).map(e=>e.item)),t=new Set(s),n=new Set(t);e.forEach(e=>{t.has(e)?n.delete(e):n.add(e)}),k?.(pa(n),`replace`)}}];let ue=S.createElement(SV,{className:`${I}-header-dropdown`,menu:{items:le},disabled:c},VQ(E)?E:S.createElement(NC,null));return S.createElement(`div`,{className:J(F,r.section,{[`${F}-with-pagination`]:!!b,[`${F}-with-footer`]:!!oe}),style:{...n,...i.section}},S.createElement(`div`,{className:J(`${I}-header`,r.header),style:i.header},v?S.createElement(S.Fragment,null,ce,ue):null,S.createElement(`span`,{className:`${I}-header-selected`},q(K.length,G.length)),S.createElement(`span`,{className:J(`${I}-header-title`,r.title),style:i.title},o)),ie(),se)},WQ=e=>{let{antCls:t,componentCls:n,listHeight:r,controlHeightLG:i}=e,a=`${t}-table`,o=`${t}-input`;return{[`${n}-customize-list`]:{[`${n}-section`]:{flex:`1 1 50%`,width:`auto`,height:`auto`,minHeight:r,minWidth:0},[`${a}-wrapper`]:{[`${a}-small`]:{border:0,borderRadius:0,[`${a}-selection-column`]:{width:i,minWidth:i}},[`${a}-pagination${a}-pagination`]:{margin:0,padding:e.paddingXS}},[`${o}[disabled]`]:{backgroundColor:`transparent`}}}},GQ=(e,t)=>{let{componentCls:n,colorBorder:r}=e;return{[`${n}-section`]:{borderColor:t,[`${n}-list-search:not([disabled])`]:{borderColor:r}}}},KQ=e=>{let{componentCls:t}=e;return{[`${t}-status-error`]:{...GQ(e,e.colorError)},[`${t}-status-warning`]:{...GQ(e,e.colorWarning)}}},qQ=e=>{let{componentCls:t,colorBorder:n,colorSplit:r,lineWidth:i,itemHeight:a,headerHeight:o,transferHeaderVerticalPadding:s,itemPaddingBlock:c,controlItemBgActive:l,colorTextDisabled:u,colorTextSecondary:d,listHeight:f,listWidth:p,listWidthLG:m,fontSizeIcon:h,marginXS:g,paddingSM:_,lineType:v,antCls:y,iconCls:b,motionDurationSlow:x,controlItemBgHover:S,borderRadiusLG:C,colorBgContainer:w,colorText:T,controlItemBgActiveHover:E}=e,D=Y(e.calc(C).sub(i).equal());return{display:`flex`,flexDirection:`column`,width:p,height:f,border:`${Y(i)} ${v} ${n}`,borderRadius:e.borderRadiusLG,"&-with-pagination":{width:m,height:`auto`},[`${t}-list`]:{"&-search":{[`${b}-search`]:{color:u}},"&-header":{display:`flex`,flex:`none`,alignItems:`center`,height:o,padding:`${Y(e.calc(s).sub(i).equal())} ${Y(_)} ${Y(s)}`,color:T,background:w,borderBottom:`${Y(i)} ${v} ${r}`,borderRadius:`${Y(C)} ${Y(C)} 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:`none`},"&-title":{...Hl,flex:`0 1 auto`,textAlign:`end`,marginInlineStart:`auto`},"&-dropdown":{...Wl(),fontSize:h,transform:`translateY(10%)`,cursor:`pointer`,"&[disabled]":{cursor:`not-allowed`}}},"&-body":{display:`flex`,flex:`auto`,flexDirection:`column`,fontSize:e.fontSize,minHeight:0,"&-search-wrapper":{position:`relative`,flex:`none`,padding:_}},"&-content":{flex:`auto`,margin:0,padding:0,overflow:`auto`,listStyle:`none`,borderRadius:`0 0 ${D} ${D}`,"&-item":{display:`flex`,alignItems:`center`,minHeight:a,padding:`${Y(c)} ${Y(_)}`,transition:`all ${x}`,"> *:not(:last-child)":{marginInlineEnd:g},"> *":{flex:`none`},"&-text":{...Hl,flex:`auto`},"&-remove":{...Zl(e),color:n,"&:hover, &:focus":{color:d},"&:disabled":{color:u,cursor:`not-allowed`}},[`&:not(${t}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:S,cursor:`pointer`},[`&${t}-list-content-item-checked:hover`]:{backgroundColor:E}},"&-checked":{backgroundColor:l},"&-disabled":{color:u,cursor:`not-allowed`}},[`&-show-remove ${t}-list-content-item:not(${t}-list-content-item-disabled):hover`]:{background:`transparent`,cursor:`default`}},"&-pagination":{padding:e.paddingXS,textAlign:`end`,borderTop:`${Y(i)} ${v} ${r}`,[`${y}-pagination-options`]:{paddingInlineEnd:e.paddingXS}},"&-body-not-found":{flex:`none`,width:`100%`,margin:`auto 0`,color:u,textAlign:`center`},"&-footer":{borderTop:`${Y(i)} ${v} ${r}`},"&-checkbox":{lineHeight:1}}}},JQ=e=>{let{antCls:t,iconCls:n,componentCls:r,marginXS:i,marginXXS:a,fontSizeIcon:o,colorBgContainerDisabled:s}=e;return{[r]:{...Ul(e),position:`relative`,display:`flex`,alignItems:`stretch`,[`${r}-disabled`]:{[`${r}-section`]:{background:s}},[`${r}-section`]:qQ(e),[`${r}-actions`]:{display:`flex`,flex:`none`,flexDirection:`column`,alignSelf:`center`,margin:`0 ${Y(i)}`,verticalAlign:`middle`,gap:a,[`${t}-btn ${n}`]:{fontSize:o}}}}},YQ=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},XQ=Ql(`Transfer`,e=>{let t=dc(e);return[JQ(t),WQ(t),KQ(t),YQ(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,controlHeightLG:i,lineWidth:a}=e,o=Math.round(t*n);return{listWidth:180,listHeight:200,listWidthLG:250,headerHeight:i,itemHeight:r,itemPaddingBlock:(r-o)/2,transferHeaderVerticalPadding:Math.ceil((i-a-o)/2)}}),ZQ=e=>{let{prefixCls:t,className:n,rootClassName:r,classNames:i,styles:a,style:o,listStyle:s,operationStyle:c,operations:l,actions:u,dataSource:d,targetKeys:f=[],selectedKeys:p,selectAllLabels:m=[],locale:h={},titles:g,disabled:_,showSearch:v=!1,showSelectAll:y,oneWay:b,pagination:x,status:C,selectionsIcon:w,filterOption:T,render:E,footer:D,children:O,rowKey:k,onScroll:A,onChange:j,onSearch:M,onSelectChange:N}=e,{getPrefixCls:P,renderEmpty:F,direction:I,className:L,style:R,classNames:z,styles:B,selectionsIcon:V}=ya(`transfer`),H=(0,S.useContext)(mm),U=_??H,ee={...e,disabled:U},W=P(`transfer`,t),[te,G]=XQ(W),ne=u||l||[],K=I===`rtl`,[re,ie,ae]=wQ(d,k,f),[q,oe,se,ce]=OQ(ie,ae,p),[le,ue]=wf(e=>e.key),[de,fe]=wf(e=>e.key),pe=(0,S.useCallback)((e,t)=>{e===`left`?se(typeof t==`function`?t(q||[]):t):ce(typeof t==`function`?t(oe||[]):t)},[q,oe]),me=(e,t)=>{(e===`left`?ue:fe)(t)},he=(0,S.useCallback)((e,t)=>{e===`left`?N?.(t,oe):N?.(q,t)},[q,oe]),ge=e=>g??e.titles??[],_e=e=>{A?.(`left`,e)},ve=e=>{A?.(`right`,e)},ye=e=>{let t=e===`right`?q:oe,n=bQ(re),r=t.filter(e=>!n.has(e)),i=yQ(r),a=e===`right`?r.concat(f):f.filter(e=>!i.has(e)),o=e===`right`?`left`:`right`;pe(o,[]),he(o,[]),j?.(a,e,r)},be=()=>{ye(`left`),me(`left`,null)},xe=()=>{ye(`right`),me(`right`,null)},Se=(e,t,n)=>{pe(e,r=>{let i=[];if(n===`replace`)i=t;else if(n)i=Array.from(new Set([].concat(pa(r),pa(t))));else{let e=yQ(t);i=r.filter(t=>!e.has(t))}return he(e,i),i}),me(e,null)},Ce=(e,t)=>Se(`left`,e,t),we=(e,t)=>Se(`right`,e,t),Te=e=>M?.(`left`,e.target.value),Ee=e=>M?.(`right`,e.target.value),De=()=>M?.(`left`,``),Oe=()=>M?.(`right`,``),ke=(e,t,n,r,i)=>{t.has(n)&&(t.delete(n),me(e,null)),r&&(t.add(n),me(e,i))},Ae=(e,t,n,r)=>{(e===`left`?le:de)(r,t,n)},je=(t,n,r,i)=>{let a=t===`left`,o=a?q:oe,s=new Set(o),c=(a?ie:ae).filter(e=>!e.disabled),l=c.findIndex(e=>e.key===n);i&&o.length>0?Ae(t,c,s,l):ke(t,s,n,r,l);let u=Array.from(s);he(t,u),e.selectedKeys||pe(t,u)},Me=(e,t,n)=>{je(`left`,e,t,n?.shiftKey)},Ne=(e,t,n)=>je(`right`,e,t,n?.shiftKey),Pe=e=>{pe(`right`,[]),j?.(f.filter(t=>!e.includes(t)),`left`,pa(e))},Fe=e=>typeof s==`function`?s({direction:e}):s||{},{hasFeedback:Ie,status:Le}=(0,S.useContext)(gy),Re=e=>({...e,notFoundContent:F?.(`Transfer`)||S.createElement(fC,{componentName:`Transfer`}),...h}),ze=iC(Le,C),Be=!O&&x,Ve=ae.filter(e=>oe.includes(e.key)&&!e.disabled).length>0,He=ie.filter(e=>q.includes(e.key)&&!e.disabled).length>0,[Ue,We]=Cf([z,i],[B,a],{props:ee}),Ge=J(W,{[`${W}-disabled`]:U,[`${W}-customize-list`]:!!O,[`${W}-rtl`]:K},rC(W,ze,Ie),L,n,r,te,G,Ue.root),[Ke]=Yd(`Transfer`,Hd.Transfer),qe=Re(Ke),[Je,Ye]=ge(qe),Xe=w??V;return S.createElement(`div`,{className:Ge,style:{...R,...We.root,...o}},S.createElement(UQ,{prefixCls:W,style:Fe(`left`),classNames:Ue,styles:We,titleText:Je,dataSource:ie,filterOption:T,checkedKeys:q,handleFilter:Te,handleClear:De,onItemSelect:Me,onItemSelectAll:Ce,render:E,showSearch:v,renderList:O,footer:D,onScroll:_e,disabled:U,direction:K?`right`:`left`,showSelectAll:y,selectAllLabel:m[0],pagination:Be,selectionsIcon:Xe,...qe}),S.createElement(CQ,{className:J(`${W}-actions`,Ue.actions),rightActive:He,moveToRight:xe,leftActive:Ve,actions:ne,moveToLeft:be,style:{...c,...We.actions},disabled:U,direction:I,oneWay:b}),S.createElement(UQ,{prefixCls:W,style:Fe(`right`),classNames:Ue,styles:We,titleText:Ye,dataSource:ae,filterOption:T,checkedKeys:oe,handleFilter:Ee,handleClear:Oe,onItemSelect:Ne,onItemSelectAll:we,onItemRemove:Pe,render:E,showSearch:v,renderList:O,footer:D,onScroll:ve,disabled:U,direction:K?`left`:`right`,showSelectAll:y,selectAllLabel:m[1],showRemove:b,pagination:Be,selectionsIcon:Xe,...qe}))};ZQ.List=UQ,ZQ.Search=kQ,ZQ.Operation=CQ;var QQ=c(o((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:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`}}))());function $Q(){return $Q=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$Q({},e,{ref:t,icon:QQ.default}))),t$=c(o((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:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`}}))());function n$(){return n$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n$({},e,{ref:t,icon:t$.default}))),i$=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},a$=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[` + ${Y(v(i).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:`relative`,color:f,fontWeight:n,textAlign:`start`,background:m,borderBottom:y,transition:`background-color ${p} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:`0 !important`,borderBlock:`0 !important`,[`${t}-measure-cell-content`]:{height:0,overflow:`hidden`,pointerEvents:`none`}}}},[`${t}-footer`]:{padding:`${Y(r)} ${Y(i)}`,color:g,background:_}}}},QZ=e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:i,colorFillContent:a,controlItemBgActive:o,controlItemBgActiveHover:s,padding:c,paddingSM:l,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:m,fontSize:h,fontSizeSM:g,lineHeight:_,lineWidth:v,colorIcon:y,colorIconHover:b,opacityLoading:x,controlInteractiveSize:S}=e,C=new Nc(i).onBackground(n).toHexString(),w=new Nc(a).onBackground(n).toHexString(),T=new Nc(t).onBackground(n).toHexString(),E=new Nc(y),D=new Nc(b),O=S/2-v,k=O*2+v*3;return{headerBg:T,headerColor:r,headerSortActiveBg:C,headerSortHoverBg:w,bodySortBg:T,rowHoverBg:T,rowSelectedBg:o,rowSelectedHoverBg:s,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:l,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:f,footerBg:T,footerColor:r,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:d,fixedHeaderSortActiveBg:C,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*_-v*3)/2-Math.ceil((g*1.4-v*3)/2),headerIconColor:E.clone().setA(E.a*x).toRgbString(),headerIconHoverColor:D.clone().setA(D.a*x).toRgbString(),expandIconHalfInner:O,expandIconSize:k,expandIconScale:S/k}},$Z=2,eQ=Ql(`Table`,e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:i,headerBg:a,headerColor:o,headerSortActiveBg:s,headerSortHoverBg:c,bodySortBg:l,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:m,cellPaddingInline:h,cellPaddingBlockMD:g,cellPaddingInlineMD:_,cellPaddingBlockSM:v,cellPaddingInlineSM:y,borderColor:b,footerBg:x,footerColor:S,headerBorderRadius:C,cellFontSize:w,cellFontSizeMD:T,cellFontSizeSM:E,headerSplitColor:D,fixedHeaderSortActiveBg:O,headerFilterHoverBg:k,filterDropdownBg:A,expandIconBg:j,selectionColumnWidth:M,stickyScrollBarBg:N,calc:P}=e,F=dc(e,{tableFontSize:w,tableBg:r,tableRadius:C,tablePaddingVertical:m,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:_,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:y,tableBorderColor:b,tableHeaderTextColor:o,tableHeaderBg:a,tableFooterTextColor:S,tableFooterBg:x,tableHeaderCellSplitColor:D,tableHeaderSortBg:s,tableHeaderSortHoverBg:c,tableBodySortBg:l,tableFixedHeaderSortActiveBg:O,tableHeaderFilterActiveBg:k,tableFilterDropdownBg:A,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:f,zIndexTableFixed:$Z,tableFontSizeMiddle:T,tableFontSizeSmall:E,tableSelectionColumnWidth:M,tableExpandIconBg:j,tableExpandColumnWidth:P(i).add(P(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:N,tableScrollThumbBgHover:t,tableScrollBg:n});return[ZZ(F),HZ(F),YZ(F),qZ(F),zZ(F),FZ(F),UZ(F),RZ(F),YZ(F),LZ(F),GZ(F),VZ(F),JZ(F),IZ(F),KZ(F),WZ(F),XZ(F)]},QZ,{resetFont:!1,unitless:{expandIconScale:!0}}),tQ=[],nQ=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,classNames:o,styles:s,size:c,bordered:l,dropdownPrefixCls:u,dataSource:d,pagination:f,rowSelection:p,rowKey:m,rowClassName:h,columns:g,children:_,childrenColumnName:v,onChange:y,getPopupContainer:b,loading:x,expandIcon:C,expandable:w,expandedRowRender:T,expandIconColumnIndex:E,indentSize:D,scroll:O,sortDirections:k,locale:A,showSorterTooltip:j={target:`full-header`},virtual:M}=e;Gi(`Table`);let N=S.useMemo(()=>g||wJ(_),[g,_]),P=qC(S.useMemo(()=>N.some(e=>e.responsive),[N])),F=S.useMemo(()=>{let e=new Set(Object.keys(P).filter(e=>P[e]));return N.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[N,P]),I=gi(e,[`className`,`style`,`columns`]),{locale:L=Hd,table:R}=S.useContext(ga),{getPrefixCls:z,direction:B,renderEmpty:V,getPopupContainer:H,className:U,style:ee,classNames:W,styles:te}=ya(`table`),G=Th(e=>c===`middle`?`medium`:c??e),ne={...e,size:G,bordered:l},[K,re]=Cf([W,o],[te,s],{props:ne},{pagination:{_default:`root`},header:{_default:`wrapper`},body:{_default:`wrapper`}}),ie={...L.Table,...A},[ae]=Yd(`global`,Hd.global),q=d||tQ,oe=z(`table`,n),se=z(`dropdown`,u),[,ce]=Vl(),le=S.useMemo(()=>nf(p)?{columnWidth:ce.Table?.selectionColumnWidth,...p}:p,[p,ce.Table?.selectionColumnWidth]),ue=sp(oe),[de,fe]=eQ(oe,ue),pe={childrenColumnName:v,expandIconColumnIndex:E,...w,expandIcon:w?.expandIcon??R?.expandable?.expandIcon},{childrenColumnName:me=`children`}=pe,he=S.useMemo(()=>q.some(e=>e?.[me])?`nest`:T||w?.expandedRowRender?`row`:null,[me,q]),ge={body:S.useRef(null)},_e=LY(oe),ve=S.useRef(null),ye=S.useRef(null);kf(t,()=>({...ye.current,nativeElement:ve.current}));let be=m||R?.rowKey||`key`,xe=O??R?.scroll,Se=S.useMemo(()=>typeof be==`function`?be:e=>e?.[be],[be]),[Ce]=dZ(q,me,Se),we={},Te=(e,t,n=!1)=>{let r={...we,...e};n&&(we.resetPagination?.(),r.pagination?.current&&(r.pagination.current=1),f&&f.onChange?.(1,r.pagination?.pageSize)),O&&O.scrollToFirstRowOnChange!==!1&&ge.body.current&&op(0,{getContainer:()=>ge.body.current}),y?.(r.pagination,r.filters,r.sorter,{currentDataSource:cZ(kZ(q,r.sorterStates,me),r.filterStates,me),action:t})},[Ee,De,Oe,ke]=AZ({prefixCls:oe,mergedColumns:F,onSorterChange:(e,t)=>{Te({sorter:e,sorterStates:t},`sort`,!1)},sortDirections:k||[`ascend`,`descend`],tableLocale:ie,showSorterTooltip:j,globalLocale:ae}),Ae=S.useMemo(()=>kZ(q,De,me),[me,q,De]);we.sorter=ke(),we.sorterStates=De;let[je,Me,Ne]=uZ({prefixCls:oe,locale:ie,dropdownPrefixCls:se,mergedColumns:F,onFilterChange:(e,t)=>{Te({filters:e,filterStates:t},`filter`,!0)},getPopupContainer:b||H,rootClassName:J(i,ue)}),Pe=cZ(Ae,Me,me);we.filters=Ne,we.filterStates=Me;let[Fe]=MZ(S.useMemo(()=>{let e={};return Object.keys(Ne).forEach(t=>{Ne[t]!==null&&(e[t]=Ne[t])}),{...Oe,filters:e}},[Oe,Ne])),[Ie,Le]=pZ(Pe.length,(e,t)=>{Te({pagination:{...we.pagination,current:e,pageSize:t}},`paginate`)},f);we.pagination=f===!1?{}:fZ(Ie,f),we.resetPagination=Le;let Re=S.useMemo(()=>{if(f===!1||!Ie.pageSize)return Pe;let{current:e=1,total:t,pageSize:n=10}=Ie;return Pe.lengthn?Pe.slice((e-1)*n,e*n):Pe:Pe.slice((e-1)*n,e*n)},[!!f,Pe,Ie?.current,Ie?.pageSize,Ie?.total]),[ze,Be]=FY({prefixCls:oe,data:Pe,pageData:Re,getRowKey:Se,getRecordByKey:Ce,expandType:he,childrenColumnName:me,locale:ie,getPopupContainer:b||H},le),Ve=(e,t,n)=>{let r=typeof h==`function`?h(e,t,n):h;return J({[`${oe}-row-selected`]:Be.has(Se(e,t))},r)};pe.__PARENT_RENDER_ICON__=pe.expandIcon,pe.expandIcon=pe.expandIcon||C||IY(ie),he===`nest`&&pe.expandIconColumnIndex===void 0?pe.expandIconColumnIndex=+!!le:pe.expandIconColumnIndex>0&&le&&--pe.expandIconColumnIndex,typeof pe.indentSize!=`number`&&(pe.indentSize=ef(D)?D:15);let He=S.useCallback(e=>Fe(ze(je(Ee(e)))),[Ee,je,ze]),Ue,We;if(f!==!1&&Ie?.total){let e;e=Ie.size?Ie.size:G===`small`||G===`medium`?`small`:void 0;let t=(t=`end`)=>S.createElement(PW,{...Ie,classNames:K.pagination,styles:re.pagination,className:J(`${oe}-pagination ${oe}-pagination-${t}`,Ie.className),size:e}),{placement:n,position:r}=Ie,i=n??r,a=e=>{let t=e.toLowerCase();return t.includes(`center`)?`center`:t.includes(`left`)||t.includes(`start`)?`start`:`end`};if(Array.isArray(i)){let[e,n]=[`top`,`bottom`].map(e=>i.find(t=>t.includes(e))),r=i.every(e=>`${e}`==`none`);!e&&!n&&!r&&(We=t()),e&&(Ue=t(a(e))),n&&(We=t(a(n)))}else We=t()}let Ge=S.useMemo(()=>{if(typeof x==`boolean`)return{spinning:x};if(nf(x))return{spinning:!0,...x}},[x]),Ke=J(fe,ue,`${oe}-wrapper`,U,{[`${oe}-wrapper-rtl`]:B===`rtl`},r,i,K.root,de),qe={...re.root,...ee,...a},Je=S.useMemo(()=>Ge?.spinning&&q===tQ?null:A?.emptyText===void 0?V?.(`Table`)||S.createElement(uC,{componentName:`Table`}):A.emptyText,[Ge?.spinning,q,A?.emptyText,V]),Ye=M?PZ:NZ,Xe={},Ze=S.useMemo(()=>{let{fontSize:e,lineHeight:t,lineWidth:n,padding:r,paddingXS:i,paddingSM:a}=ce,o=Math.floor(e*t);switch(G){case`medium`:return a*2+o+n;case`small`:return i*2+o+n;default:return r*2+o+n}},[ce,G]);return M&&(Xe.listItemHeight=Ze),S.createElement(`div`,{ref:ve,className:Ke,style:qe},S.createElement(tG,{spinning:!1,...Ge},Ue,S.createElement(Ye,{...Xe,...I,scroll:xe,classNames:K,styles:re,ref:ye,columns:F,direction:B,expandable:pe,prefixCls:oe,className:J({[`${oe}-medium`]:G===`medium`,[`${oe}-small`]:G===`small`,[`${oe}-bordered`]:l,[`${oe}-empty`]:q.length===0},fe,ue,de),data:Re,rowKey:Se,rowClassName:Ve,emptyText:Je,internalHooks:vq,internalRefs:ge,transformColumns:He,getContainerWidth:_e,measureRowRender:e=>S.createElement(_w.Provider,{value:!0},S.createElement(jm,{getPopupContainer:e=>e},e))}),We))}),rQ=S.forwardRef((e,t)=>{let n=S.useRef(0);return n.current+=1,S.createElement(nQ,{...e,ref:t,_renderTimes:n.current})});rQ.SELECTION_COLUMN=kY,rQ.EXPAND_COLUMN=_q,rQ.SELECTION_ALL=AY,rQ.SELECTION_INVERT=jY,rQ.SELECTION_NONE=MY,rQ.Column=lY,rQ.ColumnGroup=uY,rQ.Summary=Yq;var iQ=rQ,aQ=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,o=a(r).sub(n).equal(),s=a(t).sub(n).equal();return{[i]:{...Ul(e),display:`inline-block`,height:`auto`,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:`nowrap`,backgroundColor:e.defaultBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:`start`,position:`relative`,[`&${i}-rtl`]:{direction:`rtl`},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:`transparent`,borderColor:`transparent`,cursor:`pointer`,[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:`not-allowed`,[`&:not(${i}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:`transparent`}},[`&${i}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${i}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:`flex`,flexWrap:`wrap`,gap:e.paddingXS}},"&-hidden":{display:`none`},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}},[`&${e.componentCls}-solid`]:{borderColor:`transparent`,color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${i}-default`]:{color:e.solidTextColor}},[`${i}-filled`]:{borderColor:`transparent`,backgroundColor:e.tagBorderlessBg},[`&${i}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,backgroundColor:e.colorBgContainerDisabled,a:{cursor:`not-allowed`,pointerEvents:`none`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${i}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${i}-solid, &${i}-filled`]:{color:e.colorTextDisabled,[`${i}-close-icon`]:{color:e.colorTextDisabled}},[`${i}-close-icon`]:{cursor:`not-allowed`,color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},oQ=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return dc(e,{tagFontSize:i,tagLineHeight:Y(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},sQ=e=>{let t=s_(new Lg(e.colorBgSolid),`#fff`)?`#000`:`#fff`;return{defaultBg:new Nc(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},cQ=Ql(`Tag`,e=>aQ(oQ(e)),sQ),lQ=S.forwardRef((e,t)=>{let{prefixCls:n,style:r,className:i,checked:a,children:o,icon:s,onChange:c,onClick:l,disabled:u,...d}=e,{getPrefixCls:f,tag:p}=S.useContext(ga),m=S.useContext(mm),h=u??m,g=e=>{h||(c?.(!a),l?.(e))},_=f(`tag`,n),[v,y]=cQ(_),b=J(_,`${_}-checkable`,{[`${_}-checkable-checked`]:a,[`${_}-checkable-disabled`]:h},p?.className,i,v,y);return S.createElement(`span`,{...d,ref:t,style:{...r,...p?.style},className:b,onClick:g},s,S.createElement(`span`,null,o))}),uQ=S.forwardRef((e,t)=>{let{id:n,prefixCls:r,rootClassName:i,className:a,style:o,classNames:s,styles:c,disabled:l,options:u,value:d,defaultValue:f,onChange:p,multiple:m,...h}=e,{getPrefixCls:g,direction:_,className:v,style:y,classNames:b,styles:x}=ya(`tag`),C=g(`tag`,r),w=`${C}-checkable-group`,[T,E]=cQ(C,sp(C)),[D,O]=Cf([b,s],[x,c],{props:e}),k=(0,S.useMemo)(()=>Array.isArray(u)?u.map(e=>nf(e)?e:{value:e,label:e}):[],[u]),[A,j]=Gn(f,d),M=(e,t)=>{let n=null;if(m){let r=A||[];n=e?[].concat(pa(r),[t.value]):r.filter(e=>e!==t.value)}else n=e?t.value:null;j(n),p?.(n)},N=S.useRef(null);(0,S.useImperativeHandle)(t,()=>({nativeElement:N.current}));let P=xi(h,{aria:!0,data:!0});return S.createElement(`div`,{...P,className:J(w,v,i,{[`${w}-disabled`]:l,[`${w}-rtl`]:_===`rtl`},T,E,a,D.root),style:{...y,...O.root,...o},id:n,ref:N},k.map(e=>S.createElement(lQ,{key:e.value,className:J(`${w}-item`,D.item),style:O.item,checked:m?(A||[]).includes(e.value):A===e.value,onChange:t=>M(t,e),disabled:l},e.label)))});function dQ(e,t){let{color:n,variant:r,bordered:i}=e;return S.useMemo(()=>{let e=n?.endsWith(`-inverse`),a;a=r||(e?`solid`:i===!1?`filled`:t||`filled`);let o=e?n?.replace(`-inverse`,``):n,s=Tw(n),c=Ew(n),l={};if(!s&&!c&&o)if(a===`solid`)l.backgroundColor=n;else{let e=new Nc(o).toHsl();e.l=.95,l.backgroundColor=new Nc(e).toHexString(),l.color=n,a===`outlined`&&(l.borderColor=n)}return[a,o,s,c,l]},[n,r,i,t])}var fQ=e=>nu(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:i,borderColor:r,color:n},[`&${e.componentCls}-solid`]:{backgroundColor:a,borderColor:a,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:i,color:n}}})),pQ=eu([`Tag`,`preset`],e=>fQ(oQ(e)),sQ);function mQ(e){return typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):e}var hQ=(e,t,n)=>{let r=mQ(n);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${r}Bg`],borderColor:e[`color${r}Border`],color:e[`color${n}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${n}`],borderColor:e[`color${n}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${r}Bg`],color:e[`color${n}`]}}}},gQ=eu([`Tag`,`status`],e=>{let t=oQ(e);return[hQ(t,`success`,`Success`),hQ(t,`processing`,`Info`),hQ(t,`error`,`Error`),hQ(t,`warning`,`Warning`)]},sQ),_Q=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,children:o,icon:s,color:c,variant:l,onClose:u,bordered:d,disabled:f,href:p,target:m,styles:h,classNames:g,..._}=e,{getPrefixCls:v,direction:y,className:b,variant:x,style:C,classNames:w,styles:T}=ya(`tag`),[E,D,O,k,A]=dQ(e,x),j=O||k,M=S.useContext(mm),N=f??M,{tag:P}=S.useContext(ga),[F,I]=S.useState(!0),L=gi(_,[`closeIcon`,`closable`]),R={...e,color:D,variant:E,disabled:N},[z,B]=Cf([w,g],[T,h],{props:R}),V=S.useMemo(()=>{let e={...B.root,...C,...a};return N||(e={...A,...e}),e},[B.root,C,a,A,N]),H=v(`tag`,n),[U,ee]=cQ(H),W=J(H,b,z.root,`${H}-${E}`,{[`${H}-${D}`]:j,[`${H}-hidden`]:!F,[`${H}-rtl`]:y===`rtl`,[`${H}-disabled`]:N},r,i,U,ee),te=e=>{N||(e.stopPropagation(),u?.(e),!e.defaultPrevented&&I(!1))},[,G]=pf(sf(e),sf(P),{closable:!1,closeIconRender:e=>lm(e,S.createElement(`span`,{className:`${H}-close-icon`,onClick:te},e),e=>({onClick:t=>{e?.onClick?.(t),te(t)},className:J(e?.className,`${H}-close-icon`)}))}),ne=typeof _.onClick==`function`||o&&o.type===`a`,K=um(s,{className:J(S.isValidElement(s)?s.props?.className:void 0,z.icon),style:B.icon}),re=K?S.createElement(S.Fragment,null,K,o&&S.createElement(`span`,{className:z.content,style:B.content},o)):o,ie=p?`a`:`span`,ae=S.createElement(ie,{...L,ref:t,className:W,style:V,href:N?void 0:p,target:m,onClick:N?void 0:L.onClick,...p&&N?{"aria-disabled":!0}:{}},re,G,O&&S.createElement(pQ,{key:`preset`,prefixCls:H}),k&&S.createElement(gQ,{key:`status`,prefixCls:H}));return ne?S.createElement(wh,{component:`Tag`},ae):ae});_Q.CheckableTag=lQ,_Q.CheckableTagGroup=uQ;var vQ=e=>{let t=new Map;return e.forEach((e,n)=>{t.set(e,n)}),t},yQ=e=>{let t=new Map;return e.forEach(({disabled:e,key:n},r)=>{e&&t.set(n,r)}),t};function bQ(e,t){let n=e===`right`;return t===`rtl`?n?S.createElement(Uw,null):S.createElement(Bg,null):n?S.createElement(Bg,null):S.createElement(Uw,null)}var xQ=({type:e,actions:t,moveToLeft:n,moveToRight:r,leftActive:i,rightActive:a,direction:o,disabled:s})=>{let c=e===`right`,l=c?t[0]:t[1],u=c?r:n,d=c?a:i,f=bQ(e,o);if(S.isValidElement(l)){let e=l;return S.cloneElement(e,{disabled:s||!d,onClick:t=>{e?.props?.onClick?.(t),u?.(t)}})}return S.createElement(h_,{type:`primary`,size:`small`,disabled:s||!d,onClick:e=>u?.(e),icon:f},l)},SQ=e=>{let{className:t,style:n,oneWay:r,actions:i,...a}=e;return S.createElement(`div`,{className:t,style:n},S.createElement(xQ,{type:`right`,actions:i,...a}),!r&&S.createElement(xQ,{type:`left`,actions:i,...a}),i.slice(r?1:2))},CQ=(e,t,n)=>{let r=S.useMemo(()=>(e||[]).map(e=>t?{...e,key:t(e)}:e),[e,t]),[i,a]=S.useMemo(()=>{let e=[],t=Array.from({length:n?.length??0}),i=vQ(n||[]);return r.forEach(n=>{if(i.has(n.key)){let e=i.get(n.key);t[e]=n}else e.push(n)}),[e,t]},[r,n]);return[r,i.filter(Boolean),a.filter(Boolean)]},wQ=[];function TQ(e,t){let n=e.filter(e=>t.has(e));return e.length===n.length?e:n}function EQ(e){return Array.from(e).join(`;`)}function DQ(e,t,n){let[r,i]=S.useMemo(()=>[new Set(e.map(e=>e?.key)),new Set(t.map(e=>e?.key))],[e,t]),[a,o]=Gn(wQ,n),s=S.useMemo(()=>TQ(a,r),[a,r]),c=S.useMemo(()=>TQ(a,i),[a,i]);return S.useEffect(()=>{o([].concat(pa(TQ(a,r)),pa(TQ(a,i))))},[EQ(r),EQ(i)]),[s,c,zn(e=>{o([].concat(pa(e),pa(c)))}),zn(e=>{o([].concat(pa(s),pa(e)))})]}var OQ=e=>{let{placeholder:t=``,value:n,prefixCls:r,disabled:i,onChange:a,handleClear:o}=e,s=S.useCallback(e=>{a?.(e),e.target.value===``&&o?.()},[a]);return S.createElement(bz,{placeholder:t,className:r,value:n,onChange:s,disabled:i,allowClear:!0,prefix:S.createElement(PC,null)})},kQ=c(o((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:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`}}))());function AQ(){return AQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,AQ({},e,{ref:t,icon:kQ.default}))),MQ=S.memo(e=>{let{prefixCls:t,classNames:n,styles:r,renderedText:i,renderedEl:a,item:o,checked:s,disabled:c,onClick:l,onRemove:u,showRemove:d}=e,f=c||o?.disabled,p=J(`${t}-content-item`,n.item,{[`${t}-content-item-disabled`]:f,[`${t}-content-item-checked`]:s&&!f}),m;(typeof i==`string`||ef(i))&&(m=String(i));let[h]=Yd(`Transfer`,Hd.Transfer),g={className:p,style:r.item,title:m},_=S.createElement(`span`,{className:J(`${t}-content-item-text`,n.itemContent),style:r.itemContent},a);return d?S.createElement(`li`,{...g},_,S.createElement(`button`,{type:`button`,disabled:f,className:`${t}-content-item-remove`,"aria-label":h?.remove,onClick:()=>u?.(o)},S.createElement(jQ,null))):(g.onClick=f?void 0:e=>l(o,e),S.createElement(`li`,{...g},S.createElement(pR,{className:J(`${t}-checkbox`,n.itemIcon),style:r.itemIcon,checked:s,disabled:f}),_))}),NQ=[`handleFilter`,`handleClear`,`checkedKeys`],PQ=e=>({simple:!0,showSizeChanger:!1,showLessItems:!1,...e}),FQ=S.forwardRef((e,t)=>{let{prefixCls:n,classNames:r,styles:i,filteredRenderItems:a,selectedKeys:o,disabled:s,showRemove:c,pagination:l,onScroll:u,onItemSelect:d,onItemRemove:f}=e,[p,m]=S.useState(1),h=S.useMemo(()=>l?PQ(nf(l)?l:{}):null,[l]),[g,_]=Gn(10,h?.pageSize);S.useEffect(()=>{if(h){let e=Math.ceil(a.length/g);m(Math.min(p,e))}},[a,h,g]);let v=(e,t)=>{d(e.key,!o.includes(e.key),t)},y=e=>{f?.([e.key])},b=e=>{m(e)},x=(e,t)=>{m(e),_(t)},C=S.useMemo(()=>h?a.slice((p-1)*g,p*g):a,[p,a,h,g]);S.useImperativeHandle(t,()=>({items:C}));let w=h?S.createElement(PW,{size:`small`,disabled:s,simple:h.simple,pageSize:g,showLessItems:h.showLessItems,showSizeChanger:h.showSizeChanger,className:`${n}-pagination`,total:a.length,current:p,onChange:b,onShowSizeChange:x}):null;return S.createElement(S.Fragment,null,S.createElement(`ul`,{className:J(`${n}-content`,r.list,{[`${n}-content-show-remove`]:c}),style:i.list,onScroll:u},(C||[]).map(({renderedEl:e,renderedText:t,item:a})=>S.createElement(MQ,{key:a.key,prefixCls:n,classNames:r,styles:i,item:a,renderedText:t,renderedEl:e,showRemove:c,onClick:v,onRemove:y,checked:o.includes(a.key),disabled:s}))),w)}),IQ=()=>null;function LQ(e){return!!(e&&!S.isValidElement(e)&&Object.prototype.toString.call(e)===`[object Object]`)}function RQ(e){return e.filter(e=>!e.disabled).map(e=>e.key)}function zQ(e,t){for(let n of[e,t.title,t.key])if(typeof n==`string`||ef(n))return String(n);return``}var BQ=e=>e!==void 0,VQ=e=>nf(e)?{...e,defaultValue:e.defaultValue||``}:{defaultValue:``,placeholder:``},HQ=e=>{let{prefixCls:t,style:n,classNames:r,styles:i,dataSource:a=[],titleText:o=``,checkedKeys:s,disabled:c,showSearch:l=!1,searchPlaceholder:u,notFoundContent:d,selectAll:f,deselectAll:p,selectCurrent:m,selectInvert:h,removeAll:g,removeCurrent:_,showSelectAll:v=!0,showRemove:y,pagination:b,direction:x,itemsUnit:C,itemUnit:w,selectAllLabel:T,selectionsIcon:E,footer:D,renderList:O,onItemSelectAll:k,onItemRemove:A,handleFilter:j,handleClear:M,filterOption:N,render:P=IQ}=e,F=`${t}-section`,I=`${t}-list`,L=VQ(l),[R,z]=(0,S.useState)(L.defaultValue),B=(0,S.useRef)({}),V=e=>{z(e.target.value),j(e)},H=()=>{z(``),M()},U=(e,t)=>typeof N==`function`?N(R,t,x):e.includes(R),ee=e=>{let t=O?O({...e,onItemSelect:(t,n)=>e.onItemSelect(t,n)}):null,n=!!t;return n||(t=S.createElement(FQ,{ref:B,...e,prefixCls:I})),{customize:n,bodyContent:t}},W=e=>{let t=P(e),n=LQ(t);return{item:e,renderedEl:n?t.label:t,renderedText:n?t.value:zQ(t,e)}},te=(0,S.useMemo)(()=>Array.isArray(d)?d[x===`left`?0:1]:d,[d,x]),[G,ne]=(0,S.useMemo)(()=>{let e=[],t=[];return a.forEach(n=>{let r=W(n);R&&!U(r.renderedText,n)||(e.push(n),t.push(r))}),[e,t]},[a,R]),K=(0,S.useMemo)(()=>G.filter(e=>s.includes(e.key)&&!e.disabled),[s,G]),re=(0,S.useMemo)(()=>{if(K.length===0)return`none`;let e=vQ(s);return G.every(t=>e.has(t.key)||!!t.disabled)?`all`:`part`},[K.length,s,G]),ie=()=>{let t=l?S.createElement(`div`,{className:`${I}-body-search-wrapper`},S.createElement(OQ,{prefixCls:`${I}-search`,onChange:V,handleClear:H,placeholder:L.placeholder||u,value:R,disabled:c})):null,{customize:n,bodyContent:a}=ee({...gi(e,NQ),filteredItems:G,filteredRenderItems:ne,selectedKeys:s,classNames:r,styles:i}),o;return o=n?S.createElement(`div`,{className:`${I}-body-customize-wrapper`},a):G.length?a:S.createElement(`div`,{className:`${I}-body-not-found`},te),S.createElement(`div`,{className:J(`${I}-body`,{[`${I}-body-with-search`]:l},r.body),style:i.body},t,o)},ae=S.createElement(pR,{disabled:a.filter(e=>!e.disabled).length===0||c,checked:re===`all`,indeterminate:re===`part`,className:`${I}-checkbox`,onChange:()=>{k?.(G.filter(e=>!e.disabled).map(({key:e})=>e),re!==`all`)}}),q=(e,t)=>{if(T)return typeof T==`function`?T({selectedCount:e,totalCount:t}):T;let n=t>1?C:w;return S.createElement(S.Fragment,null,(e>0?`${e}/`:``)+t,` `,n)},oe=D&&(D.length<2?D(e):D(e,{direction:x})),se=oe?S.createElement(`div`,{className:J(`${I}-footer`,r.footer),style:i.footer},oe):null,ce=!y&&!b&&ae,le;le=y?[b?{key:`removeCurrent`,label:_,onClick(){let e=RQ((B.current?.items||[]).map(e=>e.item));A?.(e)}}:null,{key:`removeAll`,label:g,onClick(){A?.(RQ(G))}}].filter(Boolean):[{key:`selectAll`,label:re===`all`?p:f,onClick(){let e=RQ(G);k?.(e,e.length!==s.length)}},b?{key:`selectCurrent`,label:m,onClick(){let e=B.current?.items||[];k?.(RQ(e.map(e=>e.item)),!0)}}:null,{key:`selectInvert`,label:h,onClick(){let e=RQ((B.current?.items||[]).map(e=>e.item)),t=new Set(s),n=new Set(t);e.forEach(e=>{t.has(e)?n.delete(e):n.add(e)}),k?.(pa(n),`replace`)}}];let ue=S.createElement(xV,{className:`${I}-header-dropdown`,menu:{items:le},disabled:c},BQ(E)?E:S.createElement(jC,null));return S.createElement(`div`,{className:J(F,r.section,{[`${F}-with-pagination`]:!!b,[`${F}-with-footer`]:!!oe}),style:{...n,...i.section}},S.createElement(`div`,{className:J(`${I}-header`,r.header),style:i.header},v?S.createElement(S.Fragment,null,ce,ue):null,S.createElement(`span`,{className:`${I}-header-selected`},q(K.length,G.length)),S.createElement(`span`,{className:J(`${I}-header-title`,r.title),style:i.title},o)),ie(),se)},UQ=e=>{let{antCls:t,componentCls:n,listHeight:r,controlHeightLG:i}=e,a=`${t}-table`,o=`${t}-input`;return{[`${n}-customize-list`]:{[`${n}-section`]:{flex:`1 1 50%`,width:`auto`,height:`auto`,minHeight:r,minWidth:0},[`${a}-wrapper`]:{[`${a}-small`]:{border:0,borderRadius:0,[`${a}-selection-column`]:{width:i,minWidth:i}},[`${a}-pagination${a}-pagination`]:{margin:0,padding:e.paddingXS}},[`${o}[disabled]`]:{backgroundColor:`transparent`}}}},WQ=(e,t)=>{let{componentCls:n,colorBorder:r}=e;return{[`${n}-section`]:{borderColor:t,[`${n}-list-search:not([disabled])`]:{borderColor:r}}}},GQ=e=>{let{componentCls:t}=e;return{[`${t}-status-error`]:{...WQ(e,e.colorError)},[`${t}-status-warning`]:{...WQ(e,e.colorWarning)}}},KQ=e=>{let{componentCls:t,colorBorder:n,colorSplit:r,lineWidth:i,itemHeight:a,headerHeight:o,transferHeaderVerticalPadding:s,itemPaddingBlock:c,controlItemBgActive:l,colorTextDisabled:u,colorTextSecondary:d,listHeight:f,listWidth:p,listWidthLG:m,fontSizeIcon:h,marginXS:g,paddingSM:_,lineType:v,antCls:y,iconCls:b,motionDurationSlow:x,controlItemBgHover:S,borderRadiusLG:C,colorBgContainer:w,colorText:T,controlItemBgActiveHover:E}=e,D=Y(e.calc(C).sub(i).equal());return{display:`flex`,flexDirection:`column`,width:p,height:f,border:`${Y(i)} ${v} ${n}`,borderRadius:e.borderRadiusLG,"&-with-pagination":{width:m,height:`auto`},[`${t}-list`]:{"&-search":{[`${b}-search`]:{color:u}},"&-header":{display:`flex`,flex:`none`,alignItems:`center`,height:o,padding:`${Y(e.calc(s).sub(i).equal())} ${Y(_)} ${Y(s)}`,color:T,background:w,borderBottom:`${Y(i)} ${v} ${r}`,borderRadius:`${Y(C)} ${Y(C)} 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:`none`},"&-title":{...Hl,flex:`0 1 auto`,textAlign:`end`,marginInlineStart:`auto`},"&-dropdown":{...Wl(),fontSize:h,transform:`translateY(10%)`,cursor:`pointer`,"&[disabled]":{cursor:`not-allowed`}}},"&-body":{display:`flex`,flex:`auto`,flexDirection:`column`,fontSize:e.fontSize,minHeight:0,"&-search-wrapper":{position:`relative`,flex:`none`,padding:_}},"&-content":{flex:`auto`,margin:0,padding:0,overflow:`auto`,listStyle:`none`,borderRadius:`0 0 ${D} ${D}`,"&-item":{display:`flex`,alignItems:`center`,minHeight:a,padding:`${Y(c)} ${Y(_)}`,transition:`all ${x}`,"> *:not(:last-child)":{marginInlineEnd:g},"> *":{flex:`none`},"&-text":{...Hl,flex:`auto`},"&-remove":{...Zl(e),color:n,"&:hover, &:focus":{color:d},"&:disabled":{color:u,cursor:`not-allowed`}},[`&:not(${t}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:S,cursor:`pointer`},[`&${t}-list-content-item-checked:hover`]:{backgroundColor:E}},"&-checked":{backgroundColor:l},"&-disabled":{color:u,cursor:`not-allowed`}},[`&-show-remove ${t}-list-content-item:not(${t}-list-content-item-disabled):hover`]:{background:`transparent`,cursor:`default`}},"&-pagination":{padding:e.paddingXS,textAlign:`end`,borderTop:`${Y(i)} ${v} ${r}`,[`${y}-pagination-options`]:{paddingInlineEnd:e.paddingXS}},"&-body-not-found":{flex:`none`,width:`100%`,margin:`auto 0`,color:u,textAlign:`center`},"&-footer":{borderTop:`${Y(i)} ${v} ${r}`},"&-checkbox":{lineHeight:1}}}},qQ=e=>{let{antCls:t,iconCls:n,componentCls:r,marginXS:i,marginXXS:a,fontSizeIcon:o,colorBgContainerDisabled:s}=e;return{[r]:{...Ul(e),position:`relative`,display:`flex`,alignItems:`stretch`,[`${r}-disabled`]:{[`${r}-section`]:{background:s}},[`${r}-section`]:KQ(e),[`${r}-actions`]:{display:`flex`,flex:`none`,flexDirection:`column`,alignSelf:`center`,margin:`0 ${Y(i)}`,verticalAlign:`middle`,gap:a,[`${t}-btn ${n}`]:{fontSize:o}}}}},JQ=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},YQ=Ql(`Transfer`,e=>{let t=dc(e);return[qQ(t),UQ(t),GQ(t),JQ(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,controlHeightLG:i,lineWidth:a}=e,o=Math.round(t*n);return{listWidth:180,listHeight:200,listWidthLG:250,headerHeight:i,itemHeight:r,itemPaddingBlock:(r-o)/2,transferHeaderVerticalPadding:Math.ceil((i-a-o)/2)}}),XQ=e=>{let{prefixCls:t,className:n,rootClassName:r,classNames:i,styles:a,style:o,listStyle:s,operationStyle:c,operations:l,actions:u,dataSource:d,targetKeys:f=[],selectedKeys:p,selectAllLabels:m=[],locale:h={},titles:g,disabled:_,showSearch:v=!1,showSelectAll:y,oneWay:b,pagination:x,status:C,selectionsIcon:w,filterOption:T,render:E,footer:D,children:O,rowKey:k,onScroll:A,onChange:j,onSearch:M,onSelectChange:N}=e,{getPrefixCls:P,renderEmpty:F,direction:I,className:L,style:R,classNames:z,styles:B,selectionsIcon:V}=ya(`transfer`),H=(0,S.useContext)(mm),U=_??H,ee={...e,disabled:U},W=P(`transfer`,t),[te,G]=YQ(W),ne=u||l||[],K=I===`rtl`,[re,ie,ae]=CQ(d,k,f),[q,oe,se,ce]=DQ(ie,ae,p),[le,ue]=wf(e=>e.key),[de,fe]=wf(e=>e.key),pe=(0,S.useCallback)((e,t)=>{e===`left`?se(typeof t==`function`?t(q||[]):t):ce(typeof t==`function`?t(oe||[]):t)},[q,oe]),me=(e,t)=>{(e===`left`?ue:fe)(t)},he=(0,S.useCallback)((e,t)=>{e===`left`?N?.(t,oe):N?.(q,t)},[q,oe]),ge=e=>g??e.titles??[],_e=e=>{A?.(`left`,e)},ve=e=>{A?.(`right`,e)},ye=e=>{let t=e===`right`?q:oe,n=yQ(re),r=t.filter(e=>!n.has(e)),i=vQ(r),a=e===`right`?r.concat(f):f.filter(e=>!i.has(e)),o=e===`right`?`left`:`right`;pe(o,[]),he(o,[]),j?.(a,e,r)},be=()=>{ye(`left`),me(`left`,null)},xe=()=>{ye(`right`),me(`right`,null)},Se=(e,t,n)=>{pe(e,r=>{let i=[];if(n===`replace`)i=t;else if(n)i=Array.from(new Set([].concat(pa(r),pa(t))));else{let e=vQ(t);i=r.filter(t=>!e.has(t))}return he(e,i),i}),me(e,null)},Ce=(e,t)=>Se(`left`,e,t),we=(e,t)=>Se(`right`,e,t),Te=e=>M?.(`left`,e.target.value),Ee=e=>M?.(`right`,e.target.value),De=()=>M?.(`left`,``),Oe=()=>M?.(`right`,``),ke=(e,t,n,r,i)=>{t.has(n)&&(t.delete(n),me(e,null)),r&&(t.add(n),me(e,i))},Ae=(e,t,n,r)=>{(e===`left`?le:de)(r,t,n)},je=(t,n,r,i)=>{let a=t===`left`,o=a?q:oe,s=new Set(o),c=(a?ie:ae).filter(e=>!e.disabled),l=c.findIndex(e=>e.key===n);i&&o.length>0?Ae(t,c,s,l):ke(t,s,n,r,l);let u=Array.from(s);he(t,u),e.selectedKeys||pe(t,u)},Me=(e,t,n)=>{je(`left`,e,t,n?.shiftKey)},Ne=(e,t,n)=>je(`right`,e,t,n?.shiftKey),Pe=e=>{pe(`right`,[]),j?.(f.filter(t=>!e.includes(t)),`left`,pa(e))},Fe=e=>typeof s==`function`?s({direction:e}):s||{},{hasFeedback:Ie,status:Le}=(0,S.useContext)(my),Re=e=>({...e,notFoundContent:F?.(`Transfer`)||S.createElement(uC,{componentName:`Transfer`}),...h}),ze=nC(Le,C),Be=!O&&x,Ve=ae.filter(e=>oe.includes(e.key)&&!e.disabled).length>0,He=ie.filter(e=>q.includes(e.key)&&!e.disabled).length>0,[Ue,We]=Cf([z,i],[B,a],{props:ee}),Ge=J(W,{[`${W}-disabled`]:U,[`${W}-customize-list`]:!!O,[`${W}-rtl`]:K},tC(W,ze,Ie),L,n,r,te,G,Ue.root),[Ke]=Yd(`Transfer`,Hd.Transfer),qe=Re(Ke),[Je,Ye]=ge(qe),Xe=w??V;return S.createElement(`div`,{className:Ge,style:{...R,...We.root,...o}},S.createElement(HQ,{prefixCls:W,style:Fe(`left`),classNames:Ue,styles:We,titleText:Je,dataSource:ie,filterOption:T,checkedKeys:q,handleFilter:Te,handleClear:De,onItemSelect:Me,onItemSelectAll:Ce,render:E,showSearch:v,renderList:O,footer:D,onScroll:_e,disabled:U,direction:K?`right`:`left`,showSelectAll:y,selectAllLabel:m[0],pagination:Be,selectionsIcon:Xe,...qe}),S.createElement(SQ,{className:J(`${W}-actions`,Ue.actions),rightActive:He,moveToRight:xe,leftActive:Ve,actions:ne,moveToLeft:be,style:{...c,...We.actions},disabled:U,direction:I,oneWay:b}),S.createElement(HQ,{prefixCls:W,style:Fe(`right`),classNames:Ue,styles:We,titleText:Ye,dataSource:ae,filterOption:T,checkedKeys:oe,handleFilter:Ee,handleClear:Oe,onItemSelect:Ne,onItemSelectAll:we,onItemRemove:Pe,render:E,showSearch:v,renderList:O,footer:D,onScroll:ve,disabled:U,direction:K?`left`:`right`,showSelectAll:y,selectAllLabel:m[1],showRemove:b,pagination:Be,selectionsIcon:Xe,...qe}))};XQ.List=HQ,XQ.Search=OQ,XQ.Operation=SQ;var ZQ=c(o((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:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`}}))());function QQ(){return QQ=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,QQ({},e,{ref:t,icon:ZQ.default}))),e$=c(o((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:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`}}))());function t$(){return t$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,t$({},e,{ref:t,icon:e$.default}))),r$=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},i$=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[` h${t}&, div&-h${t}, div&-h${t} > textarea, h${t} - `]=i$(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},o$=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...Zl(e),userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`,[`${t}-actions`]:{pointerEvents:`auto`}}}}}},s$=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Xc[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),c$=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},l$=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),u$=()=>({"a&-ellipsis, span&-ellipsis":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),d$=Ql(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:{color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"div&, p":{marginBottom:`1em`},...a$(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:n},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:n}},...s$(e),...o$(e),[`${t}-actions`]:{display:`inline`},[` + `]=r$(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},a$=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...Zl(e),userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`,[`${t}-actions`]:{pointerEvents:`auto`}}}}}},o$=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Xc[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),s$=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},c$=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),l$=()=>({"a&-ellipsis, span&-ellipsis":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),u$=Ql(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:{color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"div&, p":{marginBottom:`1em`},...i$(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:n},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:n}},...o$(e),...a$(e),[`${t}-actions`]:{display:`inline`},[` ${t}-expand, ${t}-collapse, ${t}-edit, ${t}-copy - `]:{...Zl(e),marginInlineStart:e.marginXXS},...c$(e),...l$(e),...u$(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),f$=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(r$,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===Qr.ENTER?(w(),d?.()):e===Qr.ESC&&u())},E=()=>{w()},[D,O]=d$(t),k=J(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(JU,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:um(p,{className:`${t}-edit-content-confirm`}))},p$=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},m$=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function h$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await m$(e,n)||p$(e,n))}var g$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:zn(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await h$((typeof e.text==`function`?await e.text():e.text)||dG(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function _$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var v$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},y$=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:nf(e)?{title:t??n,...e}:{title:e},[e,t,n]),b$=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=ya(`typography`),m=s??d,h=u(`typography`,n),[g,_]=d$(h),v=J(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),x$=c(o((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:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`}}))());function S$(){return S$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,S$({},e,{ref:t,icon:x$.default}))),w$=e=>e===!1?[!1,!1]:dG(e);function T$(e,t,n){return e===!0||e===void 0?t:e||n&&t}function E$(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var D$=e=>[`string`,`number`].includes(typeof e),O$=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=w$(a),d=w$(o),{copied:f,copy:p}=r??{},m=n?f:p,h=T$(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement(jw,{title:h},S.createElement(`button`,{type:`button`,className:J(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?T$(d[1],S.createElement(AC,null),!0):T$(d[0],l?S.createElement(Xm,null):S.createElement(C$,null),!0)))},k$=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),A$=e=>e.reduce((e,t)=>e+(D$(t)?String(t).length:1),0);function j$(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var M$=0,N$=1,P$=2,F$=3,I$=4,L$={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function R$(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>ki(r),[r]),u=S.useMemo(()=>A$(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(M$),[w,T]=S.useState(0),[E,D]=S.useState(null);Hn(()=>{C(t&&n&&u?N$:M$)},[n,r,a,t,l]),Hn(()=>{if(x===N$)C(P$),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===P$){let e=!!g.current?.isExceed();C(e?F$:I$),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;Hn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==F$||!f||f[0]!==f[1]){let e=i(l,!1);return[I$,M$].includes(x)?e:S.createElement(`span`,{style:{...L$,WebkitLineClamp:a}},e)}return i(o?l:j$(l,f[0]),y)},[o,x,f,l].concat(pa(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===P$&&S.createElement(S.Fragment,null,S.createElement(k$,{style:{...A,...L$,WebkitLineClamp:a},ref:g},d),S.createElement(k$,{style:{...A,...L$,WebkitLineClamp:a-1},ref:_},d),S.createElement(k$,{style:{...A,...L$,WebkitLineClamp:1},ref:v},i([],!0))),x===F$&&f&&f[0]!==f[1]&&S.createElement(k$,{style:{...A,top:400},ref:m},i(j$(l,O),!0)),x===N$&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var z$=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement(jw,{open:a,...i},r)};function B$({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var V$=`...`,H$=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],U$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(ga),[v]=Yd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=gi(h,H$),[w,T]=_$(l),[E,D]=Gn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=v$(E);Hn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=_$(u),{copied:I,copyLoading:L,onClick:R}=g$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,ee]=S.useState(!1),[W,te]=S.useState(!1),[G,ne]=S.useState(!0),[K,re]=_$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[ie,ae]=Gn(re.defaultExpanded||!1,re.expanded),q=K&&(!ie||re.expandable===`collapsible`),{rows:oe=1}=re,se=S.useMemo(()=>q&&(re.suffix!==void 0||re.onEllipsis||re.expandable||w||P),[q,re,w,P]);Hn(()=>{K&&!se&&(B(Zr(`webkitLineClamp`)),H(Zr(`textOverflow`)))},[se,K]);let[ce,le]=S.useState(q),ue=S.useMemo(()=>se?!1:oe===1?V:z,[se,V,z]);Hn(()=>{le(ue&&q)},[ue,q]);let de=y$(re.tooltip,T.text,s),fe=ce&&!!de.title,pe=q&&(ce?fe&&W:U),me=q&&oe===1&&ce,he=q&&oe>1&&ce,ge=(e,t)=>{ae(t.expanded),re.onExpand?.(e,t)},[_e,ve]=S.useState(0),[ye,be]=S.useState(!1),[xe,Se]=S.useState(!1),Ce=({offsetWidth:e})=>{ve(e)},we=e=>{ee(e),U!==e&&re.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(K&&fe&&e){let t=E$(e);W!==t&&te(t)}},[K,fe,s,he,G,_e]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!fe||!q)return;let t=new IntersectionObserver(()=>{ne(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[fe,q]);let Te=S.useMemo(()=>{if(!(!K||ce))return[T.text,s,f,de.title].find(D$)},[K,ce,f,de.title,pe]);if(E)return S.createElement(f$,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Ee=()=>{let{expandable:e,symbol:t}=re;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${ie?`collapse`:`expand`}`,onClick:e=>ge(e,{expanded:!ie}),"aria-label":ie?v.collapse:v?.expand},typeof t==`function`?t(ie):t):null},De=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=ki(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement(jw,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement(e$,{role:`button`}))):null},Oe=()=>P?S.createElement(O$,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!$d(s)}):null,ke=e=>{let t=e&&Ee(),n=De(),r=Oe();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>be(!0),onMouseLeave:()=>be(!1)},t,n,r)},Ae=e=>[e&&!ie&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},V$),re.suffix,ke(e)];return S.createElement(oa,{onResize:Ce,disabled:!q},c=>S.createElement(z$,{tooltipProps:de,enableEllipsis:q,isEllipsis:pe,open:xe&&!ye},S.createElement(b$,{onMouseEnter:e=>{Se(!0),p?.(e)},onMouseLeave:e=>{Se(!1),m?.(e)},className:J({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:K,[`${x}-ellipsis-single-line`]:me,[`${x}-ellipsis-multiple-line`]:he,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:he?oe:void 0},component:d,ref:cr(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":Te?.toString(),title:f,...C},S.createElement(R$,{enableMeasure:q&&!ce,text:s,rows:oe,width:_e,onEllipsis:we,expanded:ie,miscDeps:[I,ie,L,w,P,v].concat(pa(H$.map(t=>e[t])))},(t,n)=>B$(e,S.createElement(S.Fragment,null,t.length>0&&n&&!ie&&Te?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Ae(n)))))))}),W$=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(U$,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),G$=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(U$,{ref:t,...r,component:`div`},n)}),K$=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>nf(n)?gi(n,[`expandable`,`rows`]):n,[n]);return S.createElement(U$,{ref:t,...i,ellipsis:a,component:`span`},r)}),q$=[1,2,3,4,5],J$=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=q$.includes(n)?`h${n}`:`h1`;return S.createElement(U$,{ref:t,...i,component:a},r)}),Q=b$;Q.Text=K$,Q.Link=W$,Q.Title=J$,Q.Paragraph=G$;var Y$=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(ui(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function X$(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function Z$(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function Q$(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(X$(e,t),Z$(t)):e.onSuccess(Z$(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var $$=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>Y$(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await $$(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=n1(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||Q$,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:Q$})}reset(){this.setState({uid:n1()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=J(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,r1({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,r1({},xi(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function a1(){return a1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(i1,a1({},this.props,{ref:this.saveUploader}))}},c1=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${Y(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` + `]:{...Zl(e),marginInlineStart:e.marginXXS},...s$(e),...c$(e),...l$(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),d$=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=S.createElement(n$,null)}=e,m=S.useRef(null),h=S.useRef(!1),g=S.useRef(null),[_,v]=S.useState(c);S.useEffect(()=>{v(c)},[c]),S.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let y=({target:e})=>{v(e.value.replace(/[\n\r]/g,``))},b=()=>{h.current=!0},x=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===Qr.ENTER?(w(),d?.()):e===Qr.ESC&&u())},E=()=>{w()},[D,O]=u$(t),k=J(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return S.createElement(`div`,{className:k,style:i},S.createElement(qU,{ref:m,maxLength:o,value:_,onChange:y,onKeyDown:C,onKeyUp:T,onCompositionStart:b,onCompositionEnd:x,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:um(p,{className:`${t}-edit-content-confirm`}))},f$=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},p$=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function m$(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await p$(e,n)||f$(e,n))}var h$=({copyConfig:e,children:t})=>{let[n,r]=S.useState(!1),[i,a]=S.useState(!1),o=S.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),S.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:zn(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await m$((typeof e.text==`function`?await e.text():e.text)||uG(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function g$(e,t){return S.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var _$=e=>{let t=(0,S.useRef)(void 0);return(0,S.useEffect)(()=>{t.current=e}),t.current},v$=(e,t,n)=>(0,S.useMemo)(()=>e===!0?{title:t??n}:(0,S.isValidElement)(e)?{title:e}:nf(e)?{title:t??n,...e}:{title:e},[e,t,n]),y$=S.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=ya(`typography`),m=s??d,h=u(`typography`,n),[g,_]=u$(h),v=J(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),y={...p,...c};return S.createElement(r,{className:v,style:y,ref:t,...l},o)}),b$=c(o((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:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`}}))());function x$(){return x$=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,x$({},e,{ref:t,icon:b$.default}))),C$=e=>e===!1?[!1,!1]:uG(e);function w$(e,t,n){return e===!0||e===void 0?t:e||n&&t}function T$(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var E$=e=>[`string`,`number`].includes(typeof e),D$=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=C$(a),d=C$(o),{copied:f,copy:p}=r??{},m=n?f:p,h=w$(u[+!!n],m),g=typeof h==`string`?h:m;return S.createElement(kw,{title:h},S.createElement(`button`,{type:`button`,className:J(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?w$(d[1],S.createElement(OC,null),!0):w$(d[0],l?S.createElement(Ym,null):S.createElement(S$,null),!0)))},O$=S.forwardRef(({style:e,children:t},n)=>{let r=S.useRef(null);return S.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),S.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),k$=e=>e.reduce((e,t)=>e+(E$(t)?String(t).length:1),0);function A$(e,t){let n=0,r=[];for(let i=0;it){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var j$=0,M$=1,N$=2,P$=3,F$=4,I$={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function L$(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=S.useMemo(()=>ki(r),[r]),u=S.useMemo(()=>k$(l),[r]),d=S.useMemo(()=>i(l,!1),[r]),[f,p]=S.useState(null),m=S.useRef(null),h=S.useRef(null),g=S.useRef(null),_=S.useRef(null),v=S.useRef(null),[y,b]=S.useState(!1),[x,C]=S.useState(j$),[w,T]=S.useState(0),[E,D]=S.useState(null);Hn(()=>{C(t&&n&&u?M$:j$)},[n,r,a,t,l]),Hn(()=>{if(x===M$)C(N$),D(h.current&&getComputedStyle(h.current).whiteSpace);else if(x===N$){let e=!!g.current?.isExceed();C(e?P$:F$),p(e?[0,u]:null),b(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=v.current?.getHeight()||0;T(Math.max(t,n+r)+1),c(e)}},[x]);let O=f?Math.ceil((f[0]+f[1])/2):0;Hn(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,O]);let k=S.useMemo(()=>{if(!t)return i(l,!1);if(x!==P$||!f||f[0]!==f[1]){let e=i(l,!1);return[F$,j$].includes(x)?e:S.createElement(`span`,{style:{...I$,WebkitLineClamp:a}},e)}return i(o?l:A$(l,f[0]),y)},[o,x,f,l].concat(pa(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return S.createElement(S.Fragment,null,k,x===N$&&S.createElement(S.Fragment,null,S.createElement(O$,{style:{...A,...I$,WebkitLineClamp:a},ref:g},d),S.createElement(O$,{style:{...A,...I$,WebkitLineClamp:a-1},ref:_},d),S.createElement(O$,{style:{...A,...I$,WebkitLineClamp:1},ref:v},i([],!0))),x===P$&&f&&f[0]!==f[1]&&S.createElement(O$,{style:{...A,top:400},ref:m},i(A$(l,O),!0)),x===M$&&S.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var R$=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return S.createElement(kw,{open:a,...i},r)};function z$({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=S.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var B$=`...`,V$=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],H$=S.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=S.useContext(ga),[v]=Yd(`Text`),y=S.useRef(null),b=S.useRef(null),x=g(`typography`,n),C=gi(h,V$),[w,T]=g$(l),[E,D]=Gn(!1,T.editing),{triggerType:O=[`icon`]}=T,k=e=>{e&&T.onStart?.(),D(e)},A=_$(E);Hn(()=>{!E&&A&&b.current?.focus()},[E]);let j=e=>{e?.preventDefault(),k(!0)},M=e=>{T.onChange?.(e),k(!1)},N=()=>{T.onCancel?.(),k(!1)},[P,F]=g$(u),{copied:I,copyLoading:L,onClick:R}=h$({copyConfig:F,children:s}),[z,B]=S.useState(!1),[V,H]=S.useState(!1),[U,ee]=S.useState(!1),[W,te]=S.useState(!1),[G,ne]=S.useState(!0),[K,re]=g$(c,{expandable:!1,symbol:e=>e?v?.collapse:v?.expand}),[ie,ae]=Gn(re.defaultExpanded||!1,re.expanded),q=K&&(!ie||re.expandable===`collapsible`),{rows:oe=1}=re,se=S.useMemo(()=>q&&(re.suffix!==void 0||re.onEllipsis||re.expandable||w||P),[q,re,w,P]);Hn(()=>{K&&!se&&(B(Zr(`webkitLineClamp`)),H(Zr(`textOverflow`)))},[se,K]);let[ce,le]=S.useState(q),ue=S.useMemo(()=>se?!1:oe===1?V:z,[se,V,z]);Hn(()=>{le(ue&&q)},[ue,q]);let de=v$(re.tooltip,T.text,s),fe=ce&&!!de.title,pe=q&&(ce?fe&&W:U),me=q&&oe===1&&ce,he=q&&oe>1&&ce,ge=(e,t)=>{ae(t.expanded),re.onExpand?.(e,t)},[_e,ve]=S.useState(0),[ye,be]=S.useState(!1),[xe,Se]=S.useState(!1),Ce=({offsetWidth:e})=>{ve(e)},we=e=>{ee(e),U!==e&&re.onEllipsis?.(e)};S.useEffect(()=>{let e=y.current;if(K&&fe&&e){let t=T$(e);W!==t&&te(t)}},[K,fe,s,he,G,_e]),S.useEffect(()=>{let e=y.current;if(typeof IntersectionObserver>`u`||!e||!fe||!q)return;let t=new IntersectionObserver(()=>{ne(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[fe,q]);let Te=S.useMemo(()=>{if(!(!K||ce))return[T.text,s,f,de.title].find(E$)},[K,ce,f,de.title,pe]);if(E)return S.createElement(d$,{value:T.text??(typeof s==`string`?s:``),onSave:M,onCancel:N,onEnd:T.onEnd,prefixCls:x,className:r,style:i,direction:_,component:d,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});let Ee=()=>{let{expandable:e,symbol:t}=re;return e?S.createElement(`button`,{type:`button`,key:`expand`,className:`${x}-${ie?`collapse`:`expand`}`,onClick:e=>ge(e,{expanded:!ie}),"aria-label":ie?v.collapse:v?.expand},typeof t==`function`?t(ie):t):null},De=()=>{if(!w)return;let{icon:e,tooltip:t,tabIndex:n}=T,r=ki(t)[0]||v?.edit,i=typeof r==`string`?r:``;return O.includes(`icon`)?S.createElement(kw,{key:`edit`,title:t===!1?``:r},S.createElement(`button`,{type:`button`,ref:b,className:`${x}-edit`,onClick:j,"aria-label":i,tabIndex:n},e||S.createElement($Q,{role:`button`}))):null},Oe=()=>P?S.createElement(D$,{key:`copy`,...F,prefixCls:x,copied:I,locale:v,onCopy:R,loading:L,iconOnly:!$d(s)}):null,ke=e=>{let t=e&&Ee(),n=De(),r=Oe();return!t&&!n&&!r?null:S.createElement(`span`,{key:`operations`,className:`${x}-actions`,onMouseEnter:()=>be(!0),onMouseLeave:()=>be(!1)},t,n,r)},Ae=e=>[e&&!ie&&S.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},B$),re.suffix,ke(e)];return S.createElement(oa,{onResize:Ce,disabled:!q},c=>S.createElement(R$,{tooltipProps:de,enableEllipsis:q,isEllipsis:pe,open:xe&&!ye},S.createElement(y$,{onMouseEnter:e=>{Se(!0),p?.(e)},onMouseLeave:e=>{Se(!1),m?.(e)},className:J({[`${x}-${a}`]:a,[`${x}-disabled`]:o,[`${x}-ellipsis`]:K,[`${x}-ellipsis-single-line`]:me,[`${x}-ellipsis-multiple-line`]:he,[`${x}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:he?oe:void 0},component:d,ref:cr(c,y,t),direction:_,onClick:O.includes(`text`)?j:void 0,"aria-label":Te?.toString(),title:f,...C},S.createElement(L$,{enableMeasure:q&&!ce,text:s,rows:oe,width:_e,onEllipsis:we,expanded:ie,miscDeps:[I,ie,L,w,P,v].concat(pa(V$.map(t=>e[t])))},(t,n)=>z$(e,S.createElement(S.Fragment,null,t.length>0&&n&&!ie&&Te?S.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Ae(n)))))))}),U$=S.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return S.createElement(H$,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),W$=S.forwardRef((e,t)=>{let{children:n,...r}=e;return S.createElement(H$,{ref:t,...r,component:`div`},n)}),G$=S.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=S.useMemo(()=>nf(n)?gi(n,[`expandable`,`rows`]):n,[n]);return S.createElement(H$,{ref:t,...i,ellipsis:a,component:`span`},r)}),K$=[1,2,3,4,5],q$=S.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=K$.includes(n)?`h${n}`:`h1`;return S.createElement(H$,{ref:t,...i,component:a},r)}),Q=y$;Q.Text=G$,Q.Link=U$,Q.Title=q$,Q.Paragraph=W$;var J$=((e,t)=>{if(e&&t){let n=Array.isArray(t)?t:t.split(`,`),r=e.name||``,i=e.type||``,a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if(t.charAt(0)===`.`){let e=r.toLowerCase(),n=t.toLowerCase(),i=[n];return(n===`.jpg`||n===`.jpeg`)&&(i=[`.jpg`,`.jpeg`]),i.some(t=>e.endsWith(t))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,``):i===t?!0:/^\w+$/.test(t)?(ui(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0):!1})}return!0});function Y$(e,t){let n=`cannot ${e.method} ${e.action} ${t.status}'`,r=Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function X$(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function Z$(e){let t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});let n=new FormData;e.data&&Object.keys(e.data).forEach(t=>{let r=e.data[t];if(Array.isArray(r)){r.forEach(e=>{n.append(`${t}[]`,e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(Y$(e,t),X$(t)):e.onSuccess(X$(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let r=e.headers||{};return r[`X-Requested-With`]!==null&&t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),Object.keys(r).forEach(e=>{r[e]!==null&&t.setRequestHeader(e,r[e])}),t.send(n),{abort(){t.abort()}}}var Q$=async(e,t)=>{let n=[],r=[];e.forEach(e=>r.push(e.webkitGetAsEntry()));async function i(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>{t.readEntries(e,()=>e([]))}),r=e.length;if(!r)break;for(let t=0;t{e.file(r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,``),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)})})}let o=async(e,t)=>{if(e){if(e.path=t||``,e.isFile){let t=await a(e);t&&n.push(t)}else if(e.isDirectory){let t=await i(e);r.push(...t)}}},s=0;for(;s{let{accept:n,directory:r}=this.props,i,a;if(typeof n==`string`)a=n;else{let{filter:e,format:t}=n||{};a=t,i=e===`native`?()=>!0:e}return(i||(r||t?e=>J$(e,a):()=>!0))(e)};onChange=e=>{let{files:t}=e.target,n=[...t].filter(e=>this.filterFile(e));this.uploadFiles(n),this.reset()};onClick=e=>{let t=this.fileInput;if(!t)return;let n=e.target,{onClick:r}=this.props;n&&n.tagName===`BUTTON`&&(t.parentNode.focus(),n.blur()),t.click(),r&&r(e)};onKeyDown=e=>{e.key===`Enter`&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{let{multiple:n,directory:r}=this.props,i=[...e.items||[]],a=[...e.files||[]];if((a.length>0||i.some(e=>e.kind===`file`))&&t?.(),r)a=await Q$(Array.prototype.slice.call(i),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter(e=>this.filterFile(e,!0));n===!1&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{let{pastable:t}=this.props;if(t&&e.type===`paste`){let t=e.clipboardData;return this.onDataTransferFiles(t,()=>{e.preventDefault()})}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),e.type===`drop`){let t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;let{pastable:e}=this.props;e&&document.addEventListener(`paste`,this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener(`paste`,this.onFilePaste)}componentDidUpdate(e){let{pastable:t}=this.props;t&&!e.pastable?document.addEventListener(`paste`,this.onFilePaste):!t&&e.pastable&&document.removeEventListener(`paste`,this.onFilePaste)}uploadFiles=e=>{let t=[...e],n=t.map(e=>(e.uid=t1(),this.processFile(e,t)));Promise.all(n).then(e=>{let{onBatchStart:t}=this.props;t?.(e.map(({origin:e,parsedFile:t})=>({file:e,parsedFile:t}))),e.filter(e=>e.parsedFile!==null).forEach(e=>{this.post(e)})})};processFile=async(e,t)=>{let{beforeUpload:n}=this.props,r=e;if(n){try{r=await n(e,t)}catch{r=!1}if(r===!1)return{origin:e,parsedFile:null,action:null,data:null}}let{action:i}=this.props,a;a=typeof i==`function`?await i(e):i;let{data:o}=this.props,s;s=typeof o==`function`?await o(e):o;let c=(typeof r==`object`||typeof r==`string`)&&r?r:e,l;l=c instanceof File?c:new File([c],e.name,{type:e.type});let u=l;return u.uid=e.uid,{origin:e,data:s,parsedFile:u,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;let{onStart:i,customRequest:a,name:o,headers:s,withCredentials:c,method:l}=this.props,{uid:u}=t,d=a||Z$,f={action:n,filename:o,data:e,file:r,headers:s,withCredentials:c,method:l||`post`,onProgress:e=>{let{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{let{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[u]},onError:(e,t)=>{let{onError:n}=this.props;n?.(e,t,r),delete this.reqs[u]}};i(t),this.reqs[u]=d(f,{defaultRequest:Z$})}reset(){this.setState({uid:t1()})}abort(e){let{reqs:t}=this;if(e){let n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}saveFileInput=e=>{this.fileInput=e};render(){let{component:e,prefixCls:t,className:n,classNames:r={},disabled:i,id:a,name:o,style:s,styles:c={},multiple:l,accept:u,capture:d,children:f,directory:p,openFileDialogOnClick:m,onMouseEnter:h,onMouseLeave:g,hasControlInside:_,...v}=this.props,y=typeof u==`string`?u:u?.format,b=J(t,{[`${t}-disabled`]:i,[n]:n}),x=p?{directory:`directory`,webkitdirectory:`webkitdirectory`}:{},C=i?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:h,onMouseLeave:g,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:_?void 0:`0`};return S.createElement(e,n1({},C,{className:b,role:_?void 0:`button`,style:s}),S.createElement(`input`,n1({},xi(v,{aria:!0,data:!0}),{id:a,name:o,disabled:i,type:`file`,ref:this.saveFileInput,onClick:e=>e.stopPropagation(),key:this.state.uid,style:{display:`none`,...c.input},className:r.input,accept:y},x,{multiple:l,onChange:this.onChange},d==null?{}:{capture:d})),f)}};function i1(){return i1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.uploader=e};render(){return S.createElement(r1,i1({},this.props,{ref:this.saveUploader}))}},s1=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:`relative`,width:`100%`,height:`100%`,textAlign:`center`,background:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:`table`,width:`100%`,height:`100%`,outline:`none`,borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${Y(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:`table-cell`,verticalAlign:`middle`},[` &:not(${t}-disabled):hover, &-hover:not(${t}-disabled) `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${Y(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n}, p${t}-text, p${t}-hint - `]:{color:e.colorTextDisabled}}}}}},l1=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Gl(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...Hl,padding:`0 ${Y(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` + `]:{color:e.colorTextDisabled}}}}}},c1=e=>{let{componentCls:t,iconCls:n,fontSize:r,lineHeight:i,motionDurationSlow:a,calc:o}=e,s=`${t}-list-item`,c=`${s}-actions`,l=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:{...Gl(),lineHeight:e.lineHeight,[s]:{position:`relative`,height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:`flex`,alignItems:`center`,transition:`background-color ${a}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:{...Hl,padding:`0 ${Y(e.paddingXS)}`,lineHeight:i,flex:`auto`,transition:`all ${a}`},[c]:{whiteSpace:`nowrap`,[l]:{opacity:0},"@media (hover: none), (pointer: coarse)":{[l]:{opacity:1}},[n]:{color:e.actionsColor,transition:`all ${a}`},[` ${l}:focus-visible, &.picture ${l} - `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},u1=e=>{let{componentCls:t}=e,n=new Ms(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new Ms(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:Zh(e)},n,r]},d1=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` + `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${s}-progress`]:{position:`absolute`,bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:`100%`,paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:`none`,"> div":{margin:0}}},[`${s}:hover ${l}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[c]:{[`${n}, ${n}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:[`opacity`,`height`].map(e=>`${e} ${a}`).join(`, `),"&::before":{display:`table`,width:0,height:0,content:`""`}}}}}},l1=e=>{let{componentCls:t}=e,n=new Ms(`uploadAnimateInlineIn`,{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new Ms(`uploadAnimateInlineOut`,{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:`forwards`},[`${i}-appear, ${i}-enter`]:{animationName:n},[`${i}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:Xh(e)},n,r]},u1=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[` ${o}${o}-picture, ${o}${o}-picture-card, ${o}${o}-picture-circle - `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...Hl,width:r,height:r,lineHeight:Y(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${Y(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${tl[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${tl.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},f1=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` + `]:{[s]:{position:`relative`,height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...Hl,width:r,height:r,lineHeight:Y(a(r).add(e.paddingSM).equal()),textAlign:`center`,flex:`none`,[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a(e.fontSize).mul(e.lineHeight).div(2).add(i).equal(),width:`calc(100% - ${Y(a(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${n}`]:{[`svg path[fill='${tl[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${tl.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:i}}},[`${o}${o}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:`50%`}}}}},d1=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:i,calc:a}=e,o=`${t}-list`,s=`${o}-item`,c=e.uploadPicCardSize;return{[` ${t}-wrapper${t}-picture-card-wrapper, ${t}-wrapper${t}-picture-circle-wrapper `]:{...Gl(),display:`block`,[`${t}${t}-select`]:{width:c,height:c,textAlign:`center`,verticalAlign:`top`,backgroundColor:e.colorFillAlter,border:`${Y(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,textAlign:`center`},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${o}${o}-picture-card, ${o}${o}-picture-circle`]:{display:`flex`,flexWrap:`wrap`,"&:not(:empty)":{minHeight:c},"@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${o}-item-container`]:{display:`inline-block`,width:c,height:c,verticalAlign:`top`},"&::after":{display:`none`},"&::before":{display:`none`},[s]:{height:`100%`,margin:0,"&::before":{position:`absolute`,zIndex:1,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:`" "`}},[`${s}:hover`]:{[`&::before, ${s}-actions`]:{opacity:1}},[`${s}-actions`]:{position:`absolute`,insetInlineStart:0,zIndex:10,width:`100%`,whiteSpace:`nowrap`,textAlign:`center`,opacity:0,transition:`all ${e.motionDurationSlow}`,[` ${n}-eye, ${n}-download, ${n}-delete - `]:{zIndex:10,width:r,margin:`0 ${Y(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},p1=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},m1=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Ul(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},h1=Ql(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=dc(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[m1(o),c1(o),d1(o),f1(o),l1(o),u1(o),p1(o),Kh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),g1=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`}}))());function _1(){return _1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_1({},e,{ref:t,icon:g1.default}))),y1=c(o((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:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`}}))());function b1(){return b1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b1({},e,{ref:t,icon:y1.default}))),S1=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`}}))());function C1(){return C1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C1({},e,{ref:t,icon:S1.default})));function T1(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function E1(e,t){let n=pa(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function D1(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function O1(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var k1=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},A1=e=>e.indexOf(`image/`)===0,j1=e=>{if(e.type&&!e.thumbUrl)return A1(e.type);let t=e.thumbUrl||e.url||``,n=k1(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},M1=200;function N1(e){return new Promise(t=>{if(!e.type||!A1(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=M1,n.height=M1,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${M1}px; height: ${M1}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=M1,s=M1,c=0,l=0;e>a?(s=M1/e*a,l=-(s-o)/2):(o=M1/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var P1=c(o((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:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`}}))());function F1(){return F1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F1({},e,{ref:t,icon:P1.default}))),L1=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=J(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(MQ,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(I1,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:J(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=J(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(DU,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:ee}=S.useContext(ga),W=ee(),te=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Od,{motionName:`${W}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(uK,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:J(`${e}-list-item-progress`,t)},n)})),G=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,ne=D===`error`?S.createElement(jw,{title:G,getPopupContainer:e=>e.parentNode},te):te;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(ne,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):ne)}),R1=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=N1,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=j1,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=mf(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(Xm,null):s.uploading,i=l?.(e)?S.createElement(w1,null):S.createElement(v1,null);return t?r:i}return t?S.createElement(Xm,null):S.createElement(x1,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(g_,{...a,icon:um(e,{...e.props,onClick:()=>{}})}):S.createElement(g_,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(ga),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>gi(hh(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:pa(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Dd,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(L1,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Od,{...V,visible:x,forceRender:!0},({className:e,style:t})=>um(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),z1=`__LIST_IGNORE_${Date.now()}__`,B1=S.forwardRef((e,t)=>{let n=ya(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(mm),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Gn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),ee=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let W=(e,t,n)=>{let r=pa(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Vi.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,Vi.flushSync)(()=>{u?.(a)})},te=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[z1],e===z1)return Object.defineProperty(t,z1,{value:!0,configurable:!0}),!1;nf(e)&&(i=e)}return i},G=e=>{let t=e.filter(e=>!e.file[z1]);if(!t.length)return;let n=t.map(e=>T1(e.file)),r=pa(B);n.forEach(e=>{r=E1(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}W(i,r)})},ne=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!D1(t,B))return;let r=T1(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,W(r,E1(r,B))},K=(e,t)=>{if(!D1(t,B))return;let n=T1(t);n.status=`uploading`,n.percent=e.percent,W(n,E1(n,B),e)},re=(e,t,n)=>{if(!D1(n,B))return;let r=T1(n);r.error=e,r.response=t,r.status=`error`,W(r,E1(r,B))},ie=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=O1(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),W(t,r))})},ae=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:G,onSuccess:ne,onProgress:K,onError:re,fileList:B,upload:U.current,nativeElement:ee.current}));let{getPrefixCls:q,direction:oe,className:se,style:ce,classNames:le,styles:ue}=ya(`upload`),de=q(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Cf([le,P],[ue,N],{props:fe}),he={onBatchStart:G,onError:re,onProgress:K,onSuccess:ne,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:te,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=h1(de,ge),[ye]=Yd(`Upload`,Hd.Upload),{showRemoveIcon:be,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,extra:Ee}=typeof o==`boolean`?{}:o,De=be===void 0?!I:be,Oe=(e,t)=>o?S.createElement(R1,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:ie,showRemoveIcon:De,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,iconRender:h,extra:Ee,locale:{...ye,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,ke=J(ge,y,M,_e,ve,se,pe.root,{[`${de}-rtl`]:oe===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...ce,...C};if(b===`drag`){let e=J(_e,de,`${de}-drag`,{[`${de}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${de}-drag-hover`]:V===`dragover`,[`${de}-disabled`]:I,[`${de}-rtl`]:oe===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:ee,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:ae,onDragOver:ae,onDragLeave:ae},S.createElement(s1,{...he,ref:U,className:`${de}-btn`},S.createElement(`div`,{className:`${de}-drag-container`},x))),Oe())}let Me=J(de,`${de}-select`,{[`${de}-disabled`]:I,[`${de}-hidden`]:!x},pe.trigger),Ne=S.createElement(`div`,{className:Me,style:{...je,...me.trigger}},S.createElement(s1,{...he,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:ke,ref:ee,style:Ae},Oe(Ne,!!x)):S.createElement(`span`,{className:ke,ref:ee,style:Ae},Ne,Oe())}),V1=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(B1,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),H1=B1;H1.Dragger=V1,H1.LIST_IGNORE=z1;var U1=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),W1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),G1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),K1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=G1();function n(e){"@babel/helpers - typeof";return n=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},n(e)}function r(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 i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),J1=o((e=>{var t=U1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(K1()),r=t(q1()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),Y1=o((e=>{var t=U1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(J1()).default})),X1=o((e=>{var t=U1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(W1()),r=t(Y1()),i=t(J1()),a=t(q1()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),Z1=o(((e,t)=>{t.exports=X1()})),Q1=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(qE()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))})),$1=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),e0=o(((e,t)=>{t.exports=$1()})),t0=c(Z1(),1);Q1();var $=e0(),n0=Object.defineProperty,r0=Object.getOwnPropertySymbols,i0=Object.prototype.hasOwnProperty,a0=Object.prototype.propertyIsEnumerable,o0=(e,t,n)=>t in e?n0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s0=(e,t)=>{for(var n in t||={})i0.call(t,n)&&o0(e,n,t[n]);if(r0)for(var n of r0(t))a0.call(t,n)&&o0(e,n,t[n]);return e},c0=(e,t)=>{var n={};for(var r in e)i0.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&r0)for(var r of r0(e))t.indexOf(r)<0&&a0.call(e,r)&&(n[r]=e[r]);return n},l0;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.lengthm[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}getModule(e,t){return 0<=e&&e>>9)*1335;let a=(t<<10|n)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;ne+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.lengtht.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let r=[];for(let e=0;e=1<{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||={})})(l0||={}),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||={})})(l0||={});var u0=l0,d0={L:u0.QrCode.Ecc.LOW,M:u0.QrCode.Ecc.MEDIUM,Q:u0.QrCode.Ecc.QUARTILE,H:u0.QrCode.Ecc.HIGH},f0=128,p0=`L`,m0=`#FFFFFF`,h0=`#000000`,g0=!1,_0=1,v0=4,y0=0,b0=.1;function x0(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function S0(e,t){return e.slice().map((e,n)=>n=t.y+t.h?e:e.map((e,n)=>n=t.x+t.w?e:!1))}function C0(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*b0),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function w0(e,t){return t==null?e?v0:y0:Math.max(Math.floor(t),0)}function T0({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:a,size:o,boostLevel:s}){let c=S.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...u0.QrSegment.makeSegments(t)),e),[]);return u0.QrCode.encodeSegments(r,d0[t],n,void 0,void 0,s)},[e,t,n,s]),{cells:l,margin:u,numCells:d,calculatedImageSettings:f}=S.useMemo(()=>{let e=c.getModules(),t=w0(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:C0(e,o,t,a)}},[c,o,a,r,i]);return{qrcode:c,margin:u,cells:l,numCells:d,calculatedImageSettings:f}}var E0=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),D0=S.forwardRef(function(e,t){let n=e,{value:r,size:i=f0,level:a=p0,bgColor:o=m0,fgColor:s=h0,includeMargin:c=g0,minVersion:l=_0,boostLevel:u,marginSize:d,imageSettings:f}=n,p=c0(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:m}=p,h=c0(p,[`style`]),g=f?.src,_=S.useRef(null),v=S.useRef(null),y=S.useCallback(e=>{_.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[b,x]=S.useState(!1),{margin:C,cells:w,numCells:T,calculatedImageSettings:E}=T0({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:d,imageSettings:f,size:i});S.useEffect(()=>{if(_.current!=null){let e=_.current,t=e.getContext(`2d`);if(!t)return;let n=w,r=v.current,a=E!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&E.excavation!=null&&(n=S0(w,E.excavation));let c=window.devicePixelRatio||1;e.height=e.width=i*c;let l=i/T*c;t.scale(l,l),t.fillStyle=o,t.fillRect(0,0,T,T),t.fillStyle=s,E0?t.fill(new Path2D(x0(n,C))):w.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+C,n+C,1,1)})}),E&&(t.globalAlpha=E.opacity),a&&t.drawImage(r,E.x+C,E.y+C,E.w,E.h)}}),S.useEffect(()=>{x(!1)},[g]);let D=s0({height:i,width:i},m),O=null;return g!=null&&(O=S.createElement(`img`,{src:g,key:g,style:{display:`none`},onLoad:()=>{x(!0)},ref:v,crossOrigin:E?.crossOrigin})),S.createElement(S.Fragment,null,S.createElement(`canvas`,s0({style:D,height:i,width:i,ref:y,role:`img`},h)),O)});D0.displayName=`QRCodeCanvas`;var O0=S.forwardRef(function(e,t){let n=e,{value:r,size:i=f0,level:a=p0,bgColor:o=m0,fgColor:s=h0,includeMargin:c=g0,minVersion:l=_0,boostLevel:u,title:d,marginSize:f,imageSettings:p}=n,m=c0(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:h,cells:g,numCells:_,calculatedImageSettings:v}=T0({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:f,imageSettings:p,size:i}),y=g,b=null;p!=null&&v!=null&&(v.excavation!=null&&(y=S0(g,v.excavation)),b=S.createElement(`image`,{href:p.src,height:v.h,width:v.w,x:v.x+h,y:v.y+h,preserveAspectRatio:`none`,opacity:v.opacity,crossOrigin:v.crossOrigin}));let x=x0(y,h);return S.createElement(`svg`,s0({height:i,width:i,viewBox:`0 0 ${_} ${_}`,ref:t,role:`img`},m),!!d&&S.createElement(`title`,null,d),S.createElement(`path`,{fill:o,d:`M0,0 h${_}v${_}H0z`,shapeRendering:`crispEdges`}),S.createElement(`path`,{fill:s,d:x,shapeRendering:`crispEdges`}),b)});O0.displayName=`QRCodeSVG`;var k0=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`}}))());function A0(){return A0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,A0({},e,{ref:t,icon:k0.default}))),M0=c(o((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:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`}}))());function N0(){return N0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,N0({},e,{ref:t,icon:M0.default}))),F0=c(o((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:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`}}))());function I0(){return I0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,I0({},e,{ref:t,icon:F0.default}))),R0=c(o((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:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`}}))());function z0(){return z0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,z0({},e,{ref:t,icon:R0.default}))),V0=c(o((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:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`}}))());function H0(){return H0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,H0({},e,{ref:t,icon:V0.default}))),W0=c(o((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:`M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z`}}]},name:`arrow-right`,theme:`outlined`}}))());function G0(){return G0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,G0({},e,{ref:t,icon:W0.default}))),q0=c(o((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:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`}}))());function J0(){return J0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,J0({},e,{ref:t,icon:q0.default}))),X0=c(o((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:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`}}))());function Z0(){return Z0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Z0({},e,{ref:t,icon:X0.default}))),$0=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M485.6 249.9L198.2 498c-8.3 7.1-8.3 20.8 0 27.9l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9zm320 0L518.2 498a18.6 18.6 0 00-6.2 14c0 5.2 2.1 10.4 6.2 14l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9z`}}]},name:`backward`,theme:`outlined`}}))());function e2(){return e2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,e2({},e,{ref:t,icon:$0.default}))),n2=c(o((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:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM381 836H264V462h117v374zm189 0H453V462h117v374zm190 0H642V462h118v374z`}}]},name:`bank`,theme:`filled`}}))());function r2(){return r2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,r2({},e,{ref:t,icon:n2.default}))),tie=c(o((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:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`}}))());function a2(){return a2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a2({},e,{ref:t,icon:tie.default}))),s2=c(o((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:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`}}))());function c2(){return c2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c2({},e,{ref:t,icon:s2.default}))),u2=c(o((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:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`}}))());function d2(){return d2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d2({},e,{ref:t,icon:u2.default}))),p2=c(o((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:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`}}))());function m2(){return m2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m2({},e,{ref:t,icon:p2.default}))),g2=c(o((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:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`}}))());function _2(){return _2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_2({},e,{ref:t,icon:g2.default}))),y2=c(o((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:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`}}))());function b2(){return b2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b2({},e,{ref:t,icon:y2.default}))),S2=c(o((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:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`}}))());function C2(){return C2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C2({},e,{ref:t,icon:S2.default}))),T2=c(o((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:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`}}))());function E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E2({},e,{ref:t,icon:T2.default}))),O2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z`}}]},name:`caret-right`,theme:`outlined`}}))());function k2(){return k2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k2({},e,{ref:t,icon:O2.default}))),j2=c(o((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:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`}}))());function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M2({},e,{ref:t,icon:j2.default}))),P2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`}}))());function F2(){return F2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F2({},e,{ref:t,icon:P2.default}))),L2=c(o((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:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`}}))());function R2(){return R2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R2({},e,{ref:t,icon:L2.default}))),B2=c(o((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:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`}}))());function V2(){return V2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V2({},e,{ref:t,icon:B2.default}))),U2=c(o((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:`M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z`}},{tag:`path`,attrs:{d:`M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z`}}]},name:`cloud-upload`,theme:`outlined`}}))());function W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W2({},e,{ref:t,icon:U2.default}))),K2=c(o((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:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`}}))());function q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q2({},e,{ref:t,icon:K2.default}))),Y2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`}}))());function X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X2({},e,{ref:t,icon:Y2.default}))),Q2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z`}},{tag:`path`,attrs:{d:`M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z`}},{tag:`path`,attrs:{d:`M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z`}}]},name:`comment`,theme:`outlined`}}))());function $2(){return $2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$2({},e,{ref:t,icon:Q2.default}))),t4=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`}}))());function n4(){return n4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n4({},e,{ref:t,icon:t4.default}))),i4=c(o((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:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zM512 734.2c-62.1 0-112.6-50.5-112.6-112.6S449.9 509 512 509s112.6 50.5 112.6 112.6S574.1 734.2 512 734.2zm0-160.9c-26.6 0-48.2 21.6-48.2 48.3 0 26.6 21.6 48.3 48.2 48.3s48.2-21.6 48.2-48.3c0-26.6-21.6-48.3-48.2-48.3z`}}]},name:`crown`,theme:`filled`}}))());function a4(){return a4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a4({},e,{ref:t,icon:i4.default}))),s4=c(o((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:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`}}))());function c4(){return c4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c4({},e,{ref:t,icon:s4.default}))),u4=c(o((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:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`}}))());function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d4({},e,{ref:t,icon:u4.default}))),p4=c(o((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:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`}}))());function m4(){return m4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m4({},e,{ref:t,icon:p4.default}))),g4=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`}}))());function _4(){return _4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_4({},e,{ref:t,icon:g4.default}))),y4=c(o((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 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`}}))());function b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b4({},e,{ref:t,icon:y4.default}))),S4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z`}}]},name:`export`,theme:`outlined`}}))());function C4(){return C4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C4({},e,{ref:t,icon:S4.default}))),T4=c(o((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:`M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z`}}]},name:`filter`,theme:`outlined`}}))());function E4(){return E4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E4({},e,{ref:t,icon:T4.default}))),O4=c(o((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:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9z`}}]},name:`fire`,theme:`filled`}}))());function k4(){return k4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k4({},e,{ref:t,icon:O4.default}))),j4=c(o((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:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`}}))());function M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M4({},e,{ref:t,icon:j4.default}))),P4=c(o((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:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`}}))());function F4(){return F4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F4({},e,{ref:t,icon:P4.default}))),L4=c(o((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:`M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z`}}]},name:`font-size`,theme:`outlined`}}))());function R4(){return R4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R4({},e,{ref:t,icon:L4.default}))),B4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M825.8 498L538.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L825.8 526c8.3-7.2 8.3-20.8 0-28zm-320 0L218.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L505.8 526c4.1-3.6 6.2-8.8 6.2-14 0-5.2-2.1-10.4-6.2-14z`}}]},name:`forward`,theme:`outlined`}}))());function V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V4({},e,{ref:t,icon:B4.default}))),U4=c(o((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:`M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z`}}]},name:`fullscreen-exit`,theme:`outlined`}}))());function W4(){return W4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W4({},e,{ref:t,icon:U4.default}))),K4=c(o((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:`M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z`}}]},name:`fullscreen`,theme:`outlined`}}))());function q4(){return q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q4({},e,{ref:t,icon:K4.default}))),Y4=c(o((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:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`}}))());function X4(){return X4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X4({},e,{ref:t,icon:Y4.default}))),Q4=c(o((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:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`}}))());function $4(){return $4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$4({},e,{ref:t,icon:Q4.default}))),t3=c(o((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:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`}}))());function n3(){return n3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n3({},e,{ref:t,icon:t3.default}))),i3=c(o((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:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`}}))());function a3(){return a3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a3({},e,{ref:t,icon:i3.default}))),s3=c(o((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:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`}}))());function c3(){return c3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c3({},e,{ref:t,icon:s3.default}))),u3=c(o((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:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`}}))());function d3(){return d3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d3({},e,{ref:t,icon:u3.default}))),p3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z`}}]},name:`import`,theme:`outlined`}}))());function m3(){return m3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m3({},e,{ref:t,icon:p3.default}))),g3=c(o((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:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`}}))());function _3(){return _3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_3({},e,{ref:t,icon:g3.default}))),y3=c(o((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:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-696 72h136v656H184V184zm656 656H384V384h456v456zM384 320V184h456v136H384z`}}]},name:`layout`,theme:`outlined`}}))());function b3(){return b3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b3({},e,{ref:t,icon:y3.default}))),S3=c(o((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:`M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z`}}]},name:`like`,theme:`outlined`}}))());function C3(){return C3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C3({},e,{ref:t,icon:S3.default}))),T3=c(o((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:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`}}))());function E3(){return E3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E3({},e,{ref:t,icon:T3.default}))),O3=c(o((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:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`}}))());function k3(){return k3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k3({},e,{ref:t,icon:O3.default}))),j3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M521.7 82c-152.5-.4-286.7 78.5-363.4 197.7-3.4 5.3.4 12.3 6.7 12.3h70.3c4.8 0 9.3-2.1 12.3-5.8 7-8.5 14.5-16.7 22.4-24.5 32.6-32.5 70.5-58.1 112.7-75.9 43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 32.6 32.5 58.1 70.4 76 112.5C865.7 417.8 875 464.1 875 512c0 47.9-9.4 94.2-27.8 137.8-17.8 42.1-43.4 80-76 112.5s-70.5 58.1-112.7 75.9A352.8 352.8 0 01520.6 866c-47.9 0-94.3-9.4-137.9-27.8A353.84 353.84 0 01270 762.3c-7.9-7.9-15.3-16.1-22.4-24.5-3-3.7-7.6-5.8-12.3-5.8H165c-6.3 0-10.2 7-6.7 12.3C234.9 863.2 368.5 942 520.6 942c236.2 0 428-190.1 430.4-425.6C953.4 277.1 761.3 82.6 521.7 82zM395.02 624v-76h-314c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h314v-76c0-6.7 7.8-10.5 13-6.3l141.9 112a8 8 0 010 12.6l-141.9 112c-5.2 4.1-13 .4-13-6.3z`}}]},name:`login`,theme:`outlined`}}))());function M3(){return M3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M3({},e,{ref:t,icon:j3.default}))),P3=c(o((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:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`}}))());function F3(){return F3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F3({},e,{ref:t,icon:P3.default}))),L3=c(o((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:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`}}))());function R3(){return R3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R3({},e,{ref:t,icon:L3.default}))),B3=c(o((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:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`}}))());function V3(){return V3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V3({},e,{ref:t,icon:B3.default}))),U3=c(o((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:`M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z`}}]},name:`menu`,theme:`outlined`}}))());function W3(){return W3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W3({},e,{ref:t,icon:U3.default}))),K3=c(o((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:`M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z`}}]},name:`message`,theme:`outlined`}}))());function q3(){return q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q3({},e,{ref:t,icon:K3.default}))),Y3=c(o((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:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`}}))());function X3(){return X3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X3({},e,{ref:t,icon:Y3.default}))),Q3=c(o((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:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`}}))());function $3(){return $3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$3({},e,{ref:t,icon:Q3.default}))),t6=c(o((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:`M880 112c-3.8 0-7.7.7-11.6 2.3L292 345.9H128c-8.8 0-16 7.4-16 16.6v299c0 9.2 7.2 16.6 16 16.6h101.7c-3.7 11.6-5.7 23.9-5.7 36.4 0 65.9 53.8 119.5 120 119.5 55.4 0 102.1-37.6 115.9-88.4l408.6 164.2c3.9 1.5 7.8 2.3 11.6 2.3 16.9 0 32-14.2 32-33.2V145.2C912 126.2 897 112 880 112zM344 762.3c-26.5 0-48-21.4-48-47.8 0-11.2 3.9-21.9 11-30.4l84.9 34.1c-2 24.6-22.7 44.1-47.9 44.1zm496 58.4L318.8 611.3l-12.9-5.2H184V417.9h121.9l12.9-5.2L840 203.3v617.4z`}}]},name:`notification`,theme:`outlined`}}))());function n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n6({},e,{ref:t,icon:t6.default}))),i6=c(o((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 64zm-80 600c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304zm224 0c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304z`}}]},name:`pause-circle`,theme:`filled`}}))());function a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a6({},e,{ref:t,icon:i6.default}))),s6=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z`}}]},name:`pause-circle`,theme:`outlined`}}))());function c6(){return c6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c6({},e,{ref:t,icon:s6.default}))),u6=c(o((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:`M304 176h80v672h-80zm408 0h-64c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8z`}}]},name:`pause`,theme:`outlined`}}))());function d6(){return d6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d6({},e,{ref:t,icon:u6.default}))),p6=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`}}))());function m6(){return m6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m6({},e,{ref:t,icon:p6.default}))),g6=c(o((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:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`}}))());function _6(){return _6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_6({},e,{ref:t,icon:g6.default}))),y6=c(o((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:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zM338 304c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm513.9 437.1a8.11 8.11 0 01-5.2 1.9H177.2c-4.4 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.2l170.3-202c2.8-3.4 7.9-3.8 11.3-1 .3.3.7.6 1 1l99.4 118 158.1-187.5c2.8-3.4 7.9-3.8 11.3-1 .3.3.7.6 1 1l229.6 271.6c2.6 3.3 2.2 8.4-1.2 11.2z`}}]},name:`picture`,theme:`filled`}}))());function b6(){return b6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b6({},e,{ref:t,icon:y6.default}))),S6=c(o((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:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`}}))());function C6(){return C6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C6({},e,{ref:t,icon:S6.default}))),T6=c(o((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:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`}}))());function E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E6({},e,{ref:t,icon:T6.default}))),O6=c(o((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 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z`}}]},name:`play-circle`,theme:`filled`}}))());function k6(){return k6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k6({},e,{ref:t,icon:O6.default}))),j6=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z`}}]},name:`play-circle`,theme:`outlined`}}))());function M6(){return M6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M6({},e,{ref:t,icon:j6.default}))),P6=c(o((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:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zM340 368a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`profile`,theme:`outlined`}}))());function F6(){return F6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F6({},e,{ref:t,icon:P6.default}))),L6=c(o((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:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`}}))());function R6(){return R6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R6({},e,{ref:t,icon:L6.default}))),B6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`}}))());function V6(){return V6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V6({},e,{ref:t,icon:B6.default}))),U6=c(o((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:`M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z`}}]},name:`rise`,theme:`outlined`}}))());function W6(){return W6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W6({},e,{ref:t,icon:U6.default}))),K6=c(o((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:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`}}))());function q6(){return q6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q6({},e,{ref:t,icon:K6.default}))),Y6=c(o((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:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`}}))());function X6(){return X6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X6({},e,{ref:t,icon:Y6.default}))),Q6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`}}))());function $6(){return $6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$6({},e,{ref:t,icon:Q6.default}))),t8=c(o((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:`M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z`}}]},name:`save`,theme:`outlined`}}))());function n8(){return n8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n8({},e,{ref:t,icon:t8.default}))),rie=c(o((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:`M567.1 512l318.5-319.3c5-5 1.5-13.7-5.6-13.7h-90.5c-2.1 0-4.2.8-5.6 2.3l-273.3 274-90.2-90.5c12.5-22.1 19.7-47.6 19.7-74.8 0-83.9-68.1-152-152-152s-152 68.1-152 152 68.1 152 152 152c27.7 0 53.6-7.4 75.9-20.3l90 90.3-90.1 90.3A151.04 151.04 0 00288 582c-83.9 0-152 68.1-152 152s68.1 152 152 152 152-68.1 152-152c0-27.2-7.2-52.7-19.7-74.8l90.2-90.5 273.3 274c1.5 1.5 3.5 2.3 5.6 2.3H880c7.1 0 10.7-8.6 5.6-13.7L567.1 512zM288 370c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm0 444c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z`}}]},name:`scissor`,theme:`outlined`}}))());function r8(){return r8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,r8({},e,{ref:t,icon:rie.default}))),iie=c(o((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:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`}}))());function a8(){return a8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a8({},e,{ref:t,icon:iie.default}))),oie=c(o((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:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`}}))());function o8(){return o8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,o8({},e,{ref:t,icon:oie.default}))),sie=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`}}))());function c8(){return c8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,c8({},e,{ref:t,icon:sie.default}))),cie=c(o((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:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`}}))());function u8(){return u8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,u8({},e,{ref:t,icon:cie.default}))),uie=c(o((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:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`}}))());function d8(){return d8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d8({},e,{ref:t,icon:uie.default}))),fie=c(o((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:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`}}))());function f8(){return f8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,f8({},e,{ref:t,icon:fie.default}))),mie=c(o((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:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`}}))());function p8(){return p8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,p8({},e,{ref:t,icon:mie.default}))),hie=c(o((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:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`}}))());function h8(){return h8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,h8({},e,{ref:t,icon:hie.default}))),_ie=c(o((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:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`}}))());function g8(){return g8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,g8({},e,{ref:t,icon:_ie.default}))),vie=c(o((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:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`}}))());function v8(){return v8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,v8({},e,{ref:t,icon:vie.default}))),yie=c(o((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:`M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z`}}]},name:`sync`,theme:`outlined`}}))());function b8(){return b8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b8({},e,{ref:t,icon:yie.default}))),xie=c(o((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:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`}}))());function x8(){return x8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,x8({},e,{ref:t,icon:xie.default}))),Cie=c(o((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:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`}}))());function S8(){return S8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,S8({},e,{ref:t,icon:Cie.default}))),wie=c(o((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:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`}}))());function w8(){return w8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,w8({},e,{ref:t,icon:wie.default}))),Tie=c(o((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:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`}}))());function E8(){return E8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E8({},e,{ref:t,icon:Tie.default}))),Die=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z`}},{tag:`path`,attrs:{d:`M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4a8.42 8.42 0 00-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z`}}]},name:`translation`,theme:`outlined`}}))());function D8(){return D8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,D8({},e,{ref:t,icon:Die.default}))),kie=c(o((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:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`}}))());function O8(){return O8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,O8({},e,{ref:t,icon:kie.default}))),Aie=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`}}))());function A8(){return A8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,A8({},e,{ref:t,icon:Aie.default}))),Mie=c(o((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:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`}}))());function j8(){return j8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,j8({},e,{ref:t,icon:Mie.default}))),Nie=c(o((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:`M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z`}}]},name:`user-add`,theme:`outlined`}}))());function N8(){return N8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,N8({},e,{ref:t,icon:Nie.default}))),Fie=c(o((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:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`}}))());function P8(){return P8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,P8({},e,{ref:t,icon:Fie.default}))),Iie=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M759 335c0-137-111-248-248-248S263 198 263 335c0 82.8 40.6 156.2 103 201.2-.4.2-.7.3-.9.4-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00136 874.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C356 614.2 431 583 511 583c137 0 248-111 248-248zM511 507c-95 0-172-77-172-172s77-172 172-172 172 77 172 172-77 172-172 172zm105 221h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H703.5l47.2-60.1a8.1 8.1 0 001.7-4.9c0-4.4-3.6-8-8-8h-72.6c-4.9 0-9.5 2.3-12.6 6.1l-68.5 87.1c-4.4 5.6-6.8 12.6-6.8 19.8.1 17.7 14.4 32 32.1 32zm240 64H592c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h176.5l-47.2 60.1a8.1 8.1 0 00-1.7 4.9c0 4.4 3.6 8 8 8h72.6c4.9 0 9.5-2.3 12.6-6.1l68.5-87.1c4.4-5.6 6.8-12.6 6.8-19.8-.1-17.7-14.4-32-32.1-32z`}}]},name:`user-switch`,theme:`outlined`}}))());function I8(){return I8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,I8({},e,{ref:t,icon:Iie.default}))),Rie=c(o((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:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`}}))());function L8(){return L8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,L8({},e,{ref:t,icon:Rie.default}))),zie=c(o((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:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`}}))());function z8(){return z8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,z8({},e,{ref:t,icon:zie.default}))),Bie=c(o((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:`M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z`}}]},name:`warning`,theme:`outlined`}}))());function V8(){return V8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V8({},e,{ref:t,icon:Bie.default}))),Hie=c(o((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:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`}}))());function H8(){return H8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,H8({},e,{ref:t,icon:Hie.default}))),Wie=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z`}}]},name:`x`,theme:`outlined`}}))());function U8(){return U8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,U8({},e,{ref:t,icon:Wie.default}))),W8=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Kie=(e=>e?W8(e):W8),qie=e=>e;function Jie(e,t=qie){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var G8=e=>{let t=Kie(e),n=e=>Jie(t,e);return Object.assign(n,t),n},K8=(e=>e?G8(e):G8),q8=`AES-GCM`,J8=12,Y8=128;function X8(){return typeof window<`u`&&typeof crypto<`u`&&crypto.subtle!==void 0}async function Z8(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function Yie(e){if(!X8())throw Error(`Encryption not available in non-secure context`);let t=await Z8(),n=crypto.getRandomValues(new Uint8Array(J8)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:q8,iv:n,tagLength:Y8},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function Xie(e){if(!X8())throw Error(`Decryption not available in non-secure context`);let t=await Z8(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,J8),i=n.slice(J8),a=await crypto.subtle.decrypt({name:q8,iv:r,tagLength:Y8},t,i);return new TextDecoder().decode(a)}var Zie=`https://ceshi.apiforeign.minzhongzc.com`,Qie=!1;function $ie(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function Q8(e){return Array.isArray(e)?e.map(Q8):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[$ie(e),Q8(t)])):e}function eae(){return localStorage.getItem(`auth_token`)}function $8(e){localStorage.setItem(`auth_token`,e)}function e5(){localStorage.removeItem(`auth_token`)}async function tae(e){try{return await Xie(e)}catch{return null}}async function t5(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=Qie,signal:o,skipAuthRedirect:s}=t,c={"Content-Type":`application/json`};if(i){let e=eae();e&&(c.Authorization=`Bearer ${e}`)}let l;if(r!==void 0){let e=JSON.stringify(r);a?(c[`X-Encrypted`]=`true`,l=JSON.stringify({data:await Yie(e)})):l=e}let u=await fetch(`${Zie}/api${e}`,{method:n,headers:c,body:l,signal:o});if(u.status===204)return;let d=await u.text();if(!d)return;let f;try{f=JSON.parse(d)}catch{throw Error(`响应解析失败 (${u.status})`)}if(f&&typeof f.data==`string`&&a){let e=await tae(f.data);e!==null&&(f=JSON.parse(e))}if(!u.ok){let e=f?.detail?.message||f?.message||`请求失败 (${u.status})`;throw typeof f?.detail==`string`&&(e=f.detail),u.status===401&&typeof f?.detail==`string`&&f.detail.includes(`其他设备登录`)?(window.dispatchEvent(new CustomEvent(`kicked-out`,{detail:{message:f.detail}})),Error(f.detail)):(u.status===401&&!t.skipAuthRedirect&&(e5(),window.location.href=`/login`),Error(e))}return Q8(f)}var n5={get:(e,t=!0)=>t5(e,typeof t==`boolean`?{auth:t}:t),post:(e,t,n=!0,r=!1)=>t5(e,{method:`POST`,body:t,auth:n,skipAuthRedirect:r}),put:(e,t,n=!0)=>t5(e,{method:`PUT`,body:t,auth:n}),delete:(e,t,n=!0)=>t5(e,{method:`DELETE`,body:t,auth:n})};async function nae(e,t,n,r){let i=await n5.post(`/auth/login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1,!0);return $8(i.accessToken),i.user}async function rae(e,t){let n=await n5.post(`/auth/sms-login`,{phone:e,code:t},!1,!0);return $8(n.accessToken),n.user}async function iae(e,t,n){let r=await n5.post(`/auth/register`,{phone:e,code:t,password:n},!1);return $8(r.accessToken),r.user}async function aae(){await n5.post(`/auth/logout`),e5()}async function r5(){try{return await n5.get(`/auth/me`)}catch{return null}}async function i5(e,t){await n5.post(`/auth/change-password`,{old_password:e,new_password:t})}async function oae(e){return n5.post(`/auth/change-username`,{new_username:e})}async function sae(){return n5.get(`/projects`)}async function cae(e,t){return n5.post(`/projects`,{name:e,industry:t})}async function lae(e){await n5.delete(`/projects/${e}`)}async function a5(e={}){let t=e.page&&e.page>0?e.page:1,n=e.pageSize&&e.pageSize>0?e.pageSize:10,r=new URLSearchParams;return e.projectId&&r.set(`project_id`,e.projectId),e.status&&r.set(`status`,e.status),r.set(`page`,String(t)),r.set(`page_size`,String(n)),n5.get(`/generation-records?${r.toString()}`,{signal:e.signal})}async function uae(e,t){return n5.post(`/generation-records/optimize`,{project_id:e,gen_type:t.genType,prompt:t.prompt,engine_id:t.engineId,include_media_references:t.includeMediaReferences??!1,duration:t.duration,aspect_ratio:t.aspectRatio||null,resolution:t.resolution||null,references:t.references||null,idempotency_key:t.idempotencyKey||null,image_size:t.image_size||null,image_proportion:t.image_proportion||null,image_px:t.image_px||null})}async function o5(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/generation-records/upload-audio${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`音频上传失败`);return await a.json()}async function s5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function c5(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/generation-records/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}function dae(e,t){return`${`https://ceshi.apiforeign.minzhongzc.com/api${e}`}${typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``}`}async function l5(e,t,n,r=`素材上传失败`){let i=new FormData;i.append(`file`,t);let a=localStorage.getItem(`auth_token`),o=await fetch(dae(e,n),{method:`POST`,headers:a?{Authorization:`Bearer ${a}`}:{},body:i});if(!o.ok)throw Error(r);return await o.json()}async function fae(e){return l5(`/private-portrait/uploads/image`,e,void 0,`真人图片素材上传失败`)}async function pae(e,t){return l5(`/private-portrait/uploads/video`,e,t,`真人视频素材上传失败`)}async function mae(e){return l5(`/private-portrait/virtual/uploads/image`,e,void 0,`虚拟图片素材上传失败`)}async function hae(e,t){return l5(`/private-portrait/virtual/uploads/video`,e,t,`虚拟视频素材上传失败`)}async function gae(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/hot-opening-replications/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function _ae(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/hot-opening-replications/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}async function vae(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/shot-replications/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function yae(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/shot-replications/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}async function u5(e){await n5.post(`/generation-records/delete-file?url=${encodeURIComponent(e)}`)}async function d5(e,t){await n5.put(`/generation-records/${e}/prompt`,{optimized_prompt:t})}async function bae(e){return n5.post(`/generation-records/${e}/generate`)}async function xae(e){return n5.post(`/generation-records/${e}/retry`)}async function f5(e=1,t=20){let n=new URLSearchParams({page:String(e),page_size:String(t)});return n5.get(`/credits?${n.toString()}`)}async function p5(){return n5.get(`/auth/site-info`,!1)}async function Sae(){return n5.get(`/video-engines`)}async function Cae(){return n5.get(`/image-engines`)}async function m5(e,t){await n5.post(`/sms/send`,{phone:e,scene:t},!1)}async function h5(e=1,t=20,n){let r=new URLSearchParams;return r.set(`page`,String(e)),r.set(`page_size`,String(t)),n!==void 0&&r.set(`is_read`,String(n)),n5.get(`/notifications?${r.toString()}`)}async function g5(){return(await n5.get(`/notifications/unread-count`)).count}async function _5(e){await n5.put(`/notifications/${e}/read`)}async function v5(){return(await n5.get(`/industries`)).map(e=>{let t=(Array.isArray(e.skills)?e.skills:[]).filter(e=>e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)).map(e=>({name:e.name,options:e.options}));return{...e,optionGroups:t}})}async function wae(){return n5.get(`/menu-configs`)}async function Tae(){return n5.get(`/payments/methods`)}async function y5(e,t=`wechat`,n=1){return n5.post(`/payments/recharge`,{plan:e,method:t,quantity:n})}async function b5(e=1,t=20,n){let r=new URLSearchParams;return r.set(`page`,String(e)),r.set(`page_size`,String(t)),n?.statusFilter&&r.set(`status_filter`,n.statusFilter),n?.startDate&&r.set(`start_date`,n.startDate),n?.endDate&&r.set(`end_date`,n.endDate),n?.invoiceMode&&r.set(`invoice_mode`,`true`),n5.get(`/payments/orders?${r.toString()}`)}async function x5(e){return n5.get(`/payments/orders/${e}`)}async function S5(e){return n5.post(`/payments/orders/${e}/cancel`)}async function Eae(e){return n5.post(`/invoices`,{header_type:e.headerType,header_name:e.headerName,header_tax_no:e.headerTaxNo,header_register_address:e.headerRegisterAddress,header_register_phone:e.headerRegisterPhone,header_bank_name:e.headerBankName,header_bank_account:e.headerBankAccount,email:e.email,order_ids:e.orderIds})}async function Dae(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),n5.get(`/invoices?${t.toString()}`)}async function Oae(){return n5.get(`/invoice-headers`)}async function kae(e){return n5.post(`/invoice-headers`,{type:e.type,name:e.name,tax_no:e.taxNo,register_address:e.registerAddress,register_phone:e.registerPhone,bank_name:e.bankName,bank_account:e.bankAccount,email:e.email,is_default:e.isDefault??!1})}async function Aae(e){await n5.delete(`/invoice-headers/${e}`)}async function jae(e){return n5.put(`/invoice-headers/${e}/set-default`)}async function Mae(){return n5.get(`/bank/default-account`)}async function Nae(){return n5.get(`/credits/ratios`)}async function C5(){return n5.get(`/generation-ai/engines`)}async function Pae(e){return n5.post(`/generation-ai/tasks`,e)}async function w5(e){return n5.get(`/generation-ai/tasks?page=`+e.page+`&page_size=`+e.pageSize)}async function T5(e){return n5.get(`/generation-ai/history`+e)}async function E5(e){return n5.get(`/generation-ai/history/`+e)}async function Fae(e){await n5.delete(`/generation-ai/tasks/${e}`)}async function D5(){return n5.get(`/credits/credit-ratios`)}async function Iae(e){return n5.post(`/v2/hot-opening-replications/tasks`,e)}async function O5(e,t,n){let r=`/hot-opening-replications/tasks?page=${e}&page_size=${t}`;return n&&(r+=`&keyword=${encodeURIComponent(n)}`),n5.get(r)}async function k5(e,t){return t===`v2`?n5.get(`/v2/hot-opening-replications/tasks/${e}`):n5.get(`/hot-opening-replications/tasks/${e}`)}async function Lae(e,t,n){return n5.post(`/v2/hot-opening-replications/tasks/${e}/steps/${t}/retry-video-prompt`,n)}async function Rae(e,t,n){return n5.put(`/v2/hot-opening-replications/tasks/${e}/steps/${t}/video-prompt-schema`,n)}async function zae(e,t){return n5.post(`/v2/hot-opening-replications/tasks/${e}/steps/${t}/generate-video`)}async function Bae(e,t,n){return n5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/image-prompt`,n)}async function A5(e,t,n){return n5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image`,n)}async function Vae(e,t,n){return n5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video-prompt`,n)}async function Hae(e,t,n){return n5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video`,n)}async function j5(e){return n5.post(`/user-oauth/request_oauth`,e)}async function Uae(e){let t=new URLSearchParams;return t.set(`auth_code`,e.auth_code),t.set(`state`,e.state),e.app_id&&t.set(`app_id`,e.app_id),e.material_auth_status&&t.set(`material_auth_status`,e.material_auth_status),e.scope&&t.set(`scope`,e.scope),e.uid&&t.set(`uid`,e.uid),n5.get(`/user-oauth/juliang_callback?${t.toString()}`)}async function M5(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),n5.get(`/user-oauth/oauth_list?${t.toString()}`)}async function N5(e){let t=new URLSearchParams;return e.platform&&t.set(`platform`,e.platform),e.page!==void 0&&t.set(`page`,String(e.page)),e.pageSize!==void 0&&t.set(`page_size`,String(e.pageSize)),n5.get(`/pre-test-template/list?${t.toString()}`)}async function Wae(e){return n5.post(`/pre-test-template/create`,e)}async function P5(e){return n5.get(`/pre-test-template/select/${e}`)}async function Gae(e,t){return n5.post(`/pre-test-template/update/${e}`,t)}async function Kae(e){return n5.get(`/pre-test-template/delete/${e}`)}async function F5(){return n5.get(`/pre-test-template/default`)}async function qae(e,t,n){return n5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/video-prompt-schema`,n)}async function Jae(e){return n5.post(`/shot-replications/task-sets`,e)}async function I5(e,t,n){let r=n?`/shot-replications/task-sets?page=${e}&page_size=${t}&keyword=${encodeURIComponent(n)}`:`/shot-replications/task-sets?page=${e}&page_size=${t}`;return n5.get(r)}async function L5(e){return n5.get(`/shot-replications/task-sets/${e}`)}async function Yae(e,t){return n5.post(`/shot-replications/task-sets/${e}/split-by-ai`,t)}async function Xae(e,t){return n5.post(`/shot-replications/task-sets/${e}/split-custom`,t)}async function Zae(e,t=1,n=20){let r=new URLSearchParams;return r.set(`page`,String(t)),r.set(`page_size`,String(n)),n5.get(`/shot-replications/task-sets/${e}/segments?${r.toString()}`)}async function Qae(e,t){return n5.post(`/v2/shot-replications/segments/${e}/replication-projects`,t)}async function R5(e,t){return t===`v2`?n5.get(`/v2/shot-replications/projects/${e}`):n5.get(`/shot-replications/projects/${e}`)}async function $ae(e,t,n){return n5.post(`/v2/shot-replications/projects/${e}/steps/${t}/retry-video-prompt`,n)}async function eoe(e,t,n){return n5.put(`/v2/shot-replications/projects/${e}/steps/${t}/video-prompt-schema`,n)}async function toe(e,t){return n5.post(`/v2/shot-replications/projects/${e}/steps/${t}/generate-video`)}async function noe(e,t){return n5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image-prompt`)}async function roe(e,t,n){return n5.put(`/shot-replications/projects/${e}/steps/${t}/image-prompt`,n)}async function ioe(e,t,n){return n5.put(`/shot-replications/projects/${e}/steps/${t}/video-prompt-schema`,n)}async function z5(e,t,n){return n5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image`,n)}async function aoe(e,t,n){return n5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video-prompt`,n)}async function ooe(e,t,n){return n5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video`,n)}async function soe(e){return n5.post(`/shot-replications/task-sets/${e}/reanalyze`)}async function coe(e){await n5.delete(`/shot-replications/segments/${e}`)}async function loe(e){return n5.post(`/shot-replications/segments/${e}/reanalyze`)}async function uoe(e){return n5.post(`/shot-replications/segments/${e}/retry-split`)}async function doe(e){await n5.delete(`/shot-replications/task-sets/${e}`)}async function foe(e,t){if(t===`v2`){await n5.delete(`/v2/hot-opening-replications/tasks/${e}`);return}await n5.delete(`/hot-opening-replications/tasks/${e}`)}async function B5(e){let t=new URLSearchParams;return e?.level&&t.set(`level`,e.level),e?.parent_code&&t.set(`parent_code`,e.parent_code),n5.get(`/pre-test-template/getArea?${t.toString()}`)}async function poe(e){return n5.post(`/upload-material/async-batch-upload`,e)}async function moe(e){let t=new URLSearchParams;e.status&&t.set(`status`,e.status),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return n5.get(`/upload-material/upload-history${n?`?${n}`:``}`)}async function V5(e){return n5.post(`/upload-material/batch-update-filename`,e)}async function hoe(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),n5.get(`/material-consumption/list?${t.toString()}`)}async function goe(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.date&&t.set(`date`,e.date),n5.get(`/material-consumption/sync?${t.toString()}`)}async function H5(){return n5.get(`/material-consumption/fields`)}async function _oe(e){return n5.post(`/contact/request`,e)}async function voe(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.material_id&&t.set(`material_id`,e.material_id),e.upload_id&&t.set(`upload_id`,e.upload_id),e.file_name&&t.set(`file_name`,e.file_name),e.resource_type&&t.set(`resource_type`,e.resource_type),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),n5.get(`/resources-material/list?${t.toString()}`)}async function yoe(e){return n5.get(`/recent-generations?limit=${e}&modules=project&modules=chat_ai&modules=hot_opening_replicate&modules=shot_replicate`)}async function U5(){return n5.get(`/open-type/open_type_all`)}async function boe(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.oauth_id&&t.set(`oauth_id`,e.oauth_id),e.advertiser_name&&t.set(`advertiser_name`,e.advertiser_name),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),n5.get(`/oauth-account/list?${t.toString()}`)}async function xoe(e){let t=new URLSearchParams;return e.id&&t.set(`id`,e.id),n5.get(`/oauth-account/delete?${t.toString()}`)}async function Soe(){return n5.post(`/upload-material/oauth_account_list`)}async function Coe(e){return n5.post(`/resources-material/pre-commit`,e)}async function woe(){return n5.get(`/home-materials/categories`)}async function W5(e,t=10){return n5.get(`/home-materials?category_id=${e}&limit_per_category=${t}&include_empty_categories=false&response_mode=grouped&page=1&page_size=20`)}async function G5(e){return n5.delete(`/generation-ai/history/batch`,e)}function K5(e={}){let t=new URLSearchParams;e.resourceType&&t.set(`resource_type`,e.resourceType),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize)),e.keyword&&t.set(`keyword`,e.keyword),e.scene&&t.set(`scene`,e.scene);let n=t.toString();return n?`?${n}`:``}async function q5(e={}){return n5.get(`/upload-resources/history${K5(e)}`)}async function J5(e,t={}){return n5.get(`/upload-resources/history/${e}${K5(t)}`)}async function Toe(e){return n5.delete(`/upload-resources/history/batch`,{resource_ids:e})}async function Y5(){return n5.get(`/private-portrait/config`)}async function X5(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.keyword&&t.set(`keyword`,e.keyword),e.status&&t.set(`status`,e.status),n5.get(`/private-portrait/projects?${t.toString()}`)}async function Eoe(e){return n5.post(`/private-portrait/projects`,{name:e.name,description:e.description||null,callback_redirect_url:e.callbackRedirectUrl||null})}async function Doe(e){await n5.delete(`/private-portrait/projects/${e}`)}async function Ooe(e){return n5.get(`/private-portrait/validate-sessions/${e}`)}async function koe(e,t){return n5.post(`/private-portrait/projects/${e}/assets`,{url:t.url,asset_type:t.assetType||`Image`,name:t.name||null,video_duration:t.videoDuration??null,video_cover_url:t.videoCoverUrl||null,file_size:t.fileSize??null,mime_type:t.mimeType||null,upload_resource_id:t.uploadResourceId||null})}async function Aoe(e,t={}){let n=new URLSearchParams;return n.set(`page`,String(t.page||1)),n.set(`page_size`,String(t.pageSize||20)),t.status&&n.set(`status`,t.status),t.keyword&&n.set(`keyword`,t.keyword),t.assetType&&n.set(`asset_type`,t.assetType),n5.get(`/private-portrait/projects/${e}/assets?${n.toString()}`)}async function joe(e){await n5.delete(`/private-portrait/assets/${e}`)}async function Moe(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.projectId&&t.set(`project_id`,e.projectId),e.keyword&&t.set(`keyword`,e.keyword),e.assetType&&t.set(`asset_type`,e.assetType),n5.get(`/private-portrait/selectable-assets?${t.toString()}`)}async function Z5(){return n5.get(`/private-portrait/virtual/config`)}async function Q5(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.keyword&&t.set(`keyword`,e.keyword),e.status&&t.set(`status`,e.status),n5.get(`/private-portrait/virtual-projects?${t.toString()}`)}async function Noe(e){return n5.post(`/private-portrait/virtual-projects`,{name:e.name,description:e.description||null})}async function Poe(e){await n5.delete(`/private-portrait/virtual-projects/${e}`)}async function Foe(e,t){return n5.post(`/private-portrait/virtual-projects/${e}/assets`,{url:t.url,asset_type:t.assetType||`Image`,name:t.name||null,video_duration:t.videoDuration??null,video_cover_url:t.videoCoverUrl||null,file_size:t.fileSize??null,mime_type:t.mimeType||null,upload_resource_id:t.uploadResourceId||null})}async function Ioe(e,t={}){let n=new URLSearchParams;return n.set(`page`,String(t.page||1)),n.set(`page_size`,String(t.pageSize||20)),t.status&&n.set(`status`,t.status),t.keyword&&n.set(`keyword`,t.keyword),t.assetType&&n.set(`asset_type`,t.assetType),n5.get(`/private-portrait/virtual-projects/${e}/assets?${n.toString()}`)}async function Loe(e){await n5.delete(`/private-portrait/virtual-assets/${e}`)}async function Roe(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.projectId&&t.set(`project_id`,e.projectId),e.keyword&&t.set(`keyword`,e.keyword),e.assetType&&t.set(`asset_type`,e.assetType),n5.get(`/private-portrait/virtual-selectable-assets?${t.toString()}`)}async function zoe(){return n5.get(`/team/managed`)}async function Boe(){return n5.get(`/team/manager-access`)}async function Voe(e=1,t=20){return n5.get(`/team/members?page=${e}&page_size=${t}`)}async function Hoe(e){await n5.put(`/team/manager`,{user_id:e})}async function Uoe(){return n5.get(`/team/subscriptions`)}async function Woe(e,t,n){return n5.post(`/team/subscriptions/${e}/seats`,{user_id:t,monthly_allocated_credits:n})}async function Goe(e,t){return n5.put(`/team/seats/${e}`,{monthly_allocated_credits:t})}async function Koe(e){await n5.delete(`/team/seats/${e}`)}async function qoe(e){let t=new URLSearchParams;return e&&t.set(`subscription_id`,e),n5.get(`/team/member-usage${t.toString()?`?${t.toString()}`:``}`)}async function Joe(){return n5.get(`/team/manager-history`)}async function Yoe(){return n5.get(`/team/invitations`)}async function Xoe(e,t){return n5.post(`/team/invitations`,{max_uses:e||null,expires_at:t||null})}async function Zoe(e){await n5.delete(`/team/invitations/${e}`)}async function Qoe(e){return n5.get(e?`/team/join-requests?status=${encodeURIComponent(e)}`:`/team/join-requests`)}async function $5(e,t,n){await n5.post(`/team/join-requests/${e}`,{action:t,note:n||null})}async function $oe(e){return n5.get(`/team/join-info?code=${encodeURIComponent(e)}`,{auth:!0,skipAuthRedirect:!0})}async function ese(e){return n5.get(`/team/join-info/public?code=${encodeURIComponent(e)}`,!1)}async function tse(e){await n5.post(`/team/join`,{invitation_code:e})}async function nse(e){let t=new URLSearchParams;return e.teamId&&t.set(`team_id`,e.teamId),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize)),e.userId&&t.set(`user_id`,e.userId),e.phone&&t.set(`phone`,e.phone),e.subscriptionId&&t.set(`subscription_id`,e.subscriptionId),e.recordType&&t.set(`record_type`,e.recordType),e.startDate&&t.set(`start_date`,e.startDate),e.endDate&&t.set(`end_date`,e.endDate),n5.get(`/team/credit-records?${t.toString()}`)}function rse(e){let t=new URLSearchParams;return e.teamId&&t.set(`team_id`,e.teamId),e.phone&&t.set(`phone`,e.phone),e.subscriptionId&&t.set(`subscription_id`,e.subscriptionId),e.recordType&&t.set(`record_type`,e.recordType),e.startDate&&t.set(`start_date`,e.startDate),e.endDate&&t.set(`end_date`,e.endDate),`https://ceshi.apiforeign.minzhongzc.com/api/team/credit-records/export?${t.toString()}`}async function ise(){return n5.get(`/credit-products/catalog`)}async function ase(e=1,t=20,n){let r=new URLSearchParams({page:String(e),page_size:String(t)});return n&&r.set(`status`,n),n5.get(`/credits/balances?${r.toString()}`)}var e7=K8(e=>({user:null,loading:!0,login:async(t,n,r,i)=>{e({user:await nae(t,n,r,i)})},logout:async()=>{await aae(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await r5(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}},changePassword:async(e,t)=>{await i5(e,t)},refreshUser:async()=>{try{e({user:await r5()})}catch(e){console.error(`Failed to refresh user:`,e)}},setUserCredits:t=>{e(e=>e.user?{user:{...e.user,credits:t}}:{})}})),t7={system:{gradient:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,icon:(0,$.jsx)(T8,{}),label:`系统通知`,glowColor:`rgba(99, 102, 241, 0.4)`},credit:{gradient:`linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #ea580c 100%)`,icon:(0,$.jsx)(y8,{}),label:`积分通知`,glowColor:`rgba(245, 158, 11, 0.4)`},promo:{gradient:`linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f43f5e 100%)`,icon:(0,$.jsx)(Z4,{}),label:`活动通知`,glowColor:`rgba(139, 92, 246, 0.4)`}},ose=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),o=e7(e=>e.refreshUser),s=e7(e=>e.setUserCredits),c=(0,S.useCallback)(async()=>{try{let n=await h5(1,20,!1),i=n.items||[],o=n?.credits?.balance;if(typeof o==`number`){let e=e7.getState().user;e&&e.credits!==o&&s(o)}r(i),i.length>0&&!e&&(t(!0),a(0))}catch{}},[e,s]);(0,S.useEffect)(()=>{c();let e=setInterval(c,3e4);return()=>clearInterval(e)},[]);let l=async()=>{let e=n[i];if(e)try{await _5(e.id)}catch{}if(i{let e=n[i];if(e)try{await _5(e.id)}catch{}t(!1),r([]),a(0)};if(!e||n.length===0)return null;let d=n[i],f=t7[d.type]||t7.system;return(0,$.jsxs)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,zIndex:9999,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.45)`,backdropFilter:`blur(6px)`},onClick:u,children:[(0,$.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:{width:520,borderRadius:24,overflow:`hidden`,boxShadow:`0 30px 100px rgba(0,0,0,0.2)`,animation:`notificationPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1)`,background:`#ffffff`},children:[(0,$.jsxs)(`div`,{style:{background:f.gradient,padding:`16px 28px 14px`,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:10},children:[(0,$.jsxs)(vQ,{style:{background:`rgba(255,255,255,0.2)`,border:`none`,color:`#fff`,borderRadius:6,padding:`2px 10px`,fontSize:11,fontWeight:500},children:[f.icon,` `,f.label]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),u()},style:{width:28,height:28,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,outline:`none`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.2)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.1)`},children:(0,$.jsx)(ju,{style:{color:`#fff`,fontSize:12}})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,gap:12},children:[(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:22,fontWeight:700,letterSpacing:`-0.5px`},children:d.title}),(0,$.jsx)(`div`,{style:{color:`rgba(255,255,255,0.6)`,fontSize:11,whiteSpace:`nowrap`,flexShrink:0},children:d.createdAt?new Date(d.createdAt).toLocaleString(`zh-CN`):``})]})]}),(0,$.jsxs)(`div`,{style:{background:`#ffffff`,padding:`24px 28px 28px`},children:[(0,$.jsx)(`div`,{style:{padding:`18px 20px`,background:`#f8fafc`,borderRadius:16,marginBottom:20,border:`1px solid #f1f5f9`},children:(0,$.jsx)(`div`,{style:{fontSize:14,color:`#475569`,lineHeight:1.7},dangerouslySetInnerHTML:{__html:d.content}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:n.length>1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),a(i>0?i-1:n.length-1)},style:{width:30,height:30,borderRadius:`50%`,background:`#f1f5f9`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`,outline:`none`},onMouseEnter:e=>{e.currentTarget.style.background=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.background=`#f1f5f9`},children:(0,$.jsx)(Gw,{style:{color:`#64748b`,fontSize:12}})}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,fontWeight:500,minWidth:36,textAlign:`center`},children:[i+1,`/`,n.length]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),a(i{e.currentTarget.style.background=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.background=`#f1f5f9`},children:(0,$.jsx)(Vg,{style:{color:`#64748b`,fontSize:12}})})]})}),(0,$.jsx)(X,{type:`primary`,onClick:l,style:{borderRadius:12,fontWeight:600,height:40,background:f.gradient,border:`none`,paddingLeft:28,paddingRight:28,boxShadow:`0 6px 16px ${f.glowColor}`,transition:`all 0.2s ease`,fontSize:14},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 8px 20px ${f.glowColor}`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 6px 16px ${f.glowColor}`},children:`我已知晓`})]})]})]}),(0,$.jsx)(`style`,{children:` + `]:{zIndex:10,width:r,margin:`0 ${Y(e.marginXXS)}`,fontSize:r,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,color:i,"&:hover":{color:i},svg:{verticalAlign:`baseline`}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${s}-name`]:{display:`none`,textAlign:`center`},[`${s}-file + ${s}-name`]:{position:`absolute`,bottom:e.margin,display:`block`,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:`none`}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${Y(a(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}},[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:`50%`}}}},f1=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:`rtl`}}},p1=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:{...Ul(e),[t]:{outline:0,"input[type='file']":{cursor:`pointer`}},[`${t}-select`]:{display:`inline-block`},[`${t}-hidden`]:{display:`none`},[`${t}-disabled`]:{color:n,cursor:`not-allowed`}}}},m1=Ql(`Upload`,e=>{let{fontSizeHeading3:t,marginXS:n,lineWidth:r,pictureCardSize:i,calc:a}=e,o=dc(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:i});return[p1(o),s1(o),u1(o),d1(o),c1(o),l1(o),f1(o),Gh(o)]},e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55})),h1=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M534 352V136H232v752h560V394H576a42 42 0 01-42-42z`,fill:t}},{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z`,fill:e}}]}},name:`file`,theme:`twotone`}}))());function g1(){return g1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,g1({},e,{ref:t,icon:h1.default}))),v1=c(o((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:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`}}))());function y1(){return y1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y1({},e,{ref:t,icon:v1.default}))),x1=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:function(e,t){return{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z`,fill:e}},{tag:`path`,attrs:{d:`M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z`,fill:t}},{tag:`path`,attrs:{d:`M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z`,fill:t}},{tag:`path`,attrs:{d:`M276 368a28 28 0 1056 0 28 28 0 10-56 0z`,fill:t}},{tag:`path`,attrs:{d:`M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`,fill:e}}]}},name:`picture`,theme:`twotone`}}))());function S1(){return S1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,S1({},e,{ref:t,icon:x1.default})));function w1(e){return{...e,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e}}function T1(e,t){let n=pa(t),r=n.findIndex(({uid:t})=>t===e.uid);return r===-1?n.push(e):n[r]=e,n}function E1(e,t){let n=e.uid===void 0?`name`:`uid`;return t.filter(t=>t[n]===e[n])[0]}function D1(e,t){let n=e.uid===void 0?`name`:`uid`,r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}var O1=(e=``)=>{let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]},k1=e=>e.indexOf(`image/`)===0,A1=e=>{if(e.type&&!e.thumbUrl)return k1(e.type);let t=e.thumbUrl||e.url||``,n=O1(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},j1=200;function M1(e){return new Promise(t=>{if(!e.type||!k1(e.type)){t(``);return}let n=document.createElement(`canvas`);n.width=j1,n.height=j1,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${j1}px; height: ${j1}px; z-index: 9999; display: none;`,document.body.appendChild(n);let r=n.getContext(`2d`),i=new Image;if(i.onload=()=>{let{width:e,height:a}=i,o=j1,s=j1,c=0,l=0;e>a?(s=j1/e*a,l=-(s-o)/2):(o=j1/a*e,c=-(o-s)/2),r.drawImage(i,c,l,o,s);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(i.src),t(u)},i.crossOrigin=`anonymous`,e.type.startsWith(`image/svg+xml`)){let t=new FileReader;t.onload=()=>{t.result&&typeof t.result==`string`&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(`image/gif`)){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var N1=c(o((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:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`}}))());function P1(){return P1=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,P1({},e,{ref:t,icon:N1.default}))),I1=S.forwardRef(({prefixCls:e,className:t,style:n,classNames:r,styles:i,locale:a,listType:o,file:s,items:c,progress:l,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:p,showPreviewIcon:m,showRemoveIcon:h,showDownloadIcon:g,previewIcon:_,removeIcon:v,downloadIcon:y,extra:b,onPreview:x,onDownload:C,onClose:w},T)=>{let{status:E}=s,[D,O]=S.useState(E);S.useEffect(()=>{E!==`removed`&&O(E)},[E]);let[k,A]=S.useState(!1);S.useEffect(()=>{let e=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(e)}},[]);let j=u(s),M=S.createElement(`div`,{className:`${e}-icon`},j);if(o===`picture`||o===`picture-card`||o===`picture-circle`)if(D===`uploading`||!s.thumbUrl&&!s.url){let t=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!==`uploading`});M=S.createElement(`div`,{className:t},j)}else{let t=p?.(s)?S.createElement(`img`,{src:s.thumbUrl||s.url,alt:s.name,className:`${e}-list-item-image`,crossOrigin:s.crossOrigin}):j,n=J(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(s)});M=S.createElement(`a`,{className:n,onClick:e=>x(s,e),href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`},t)}let N=J(`${e}-list-item`,`${e}-list-item-${D}`,r?.item),P=typeof s.linkProps==`string`?JSON.parse(s.linkProps):s.linkProps,F=(typeof h==`function`?h(s):h)?d((typeof v==`function`?v(s):v)||S.createElement(jQ,null),()=>w(s),e,a.removeFile,!0):null,I=(typeof g==`function`?g(s):g)&&D===`done`?d((typeof y==`function`?y(s):y)||S.createElement(F1,null),()=>C(s),e,a.downloadFile):null,L=o!==`picture-card`&&o!==`picture-circle`&&S.createElement(`span`,{key:`download-delete`,className:J(`${e}-list-item-actions`,{picture:o===`picture`})},I,F),R=typeof b==`function`?b(s):b,z=R&&S.createElement(`span`,{className:`${e}-list-item-extra`},R),B=J(`${e}-list-item-name`),V=s.url?S.createElement(`a`,{key:`view`,target:`_blank`,rel:`noopener noreferrer`,className:B,title:s.name,...P,href:s.url,onClick:e=>x(s,e)},s.name,z):S.createElement(`span`,{key:`view`,className:B,onClick:e=>x(s,e),title:s.name},s.name,z),H=(typeof m==`function`?m(s):m)&&(s.url||s.thumbUrl)?S.createElement(`a`,{href:s.url||s.thumbUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>x(s,e),title:a.previewFile},typeof _==`function`?_(s):_||S.createElement(EU,null)):null,U=(o===`picture-card`||o===`picture-circle`)&&D!==`uploading`&&S.createElement(`span`,{className:`${e}-list-item-actions`},H,D===`done`&&I,F),{getPrefixCls:ee}=S.useContext(ga),W=ee(),te=S.createElement(`div`,{className:N,style:i?.item},M,V,L,U,k&&S.createElement(Od,{motionName:`${W}-fade`,visible:D===`uploading`,motionDeadline:2e3},({className:t})=>{let n=`percent`in s?S.createElement(lK,{type:`line`,percent:s.percent,"aria-label":s[`aria-label`],"aria-labelledby":s[`aria-labelledby`],...l}):null;return S.createElement(`div`,{className:J(`${e}-list-item-progress`,t)},n)})),G=s.response&&typeof s.response==`string`?s.response:s.error?.statusText||s.error?.message||a.uploadError,ne=D===`error`?S.createElement(kw,{title:G,getPopupContainer:e=>e.parentNode},te):te;return S.createElement(`div`,{className:J(`${e}-list-item-container`,t),style:n,ref:T},f?f(ne,s,c,{download:C.bind(null,s),preview:x.bind(null,s),remove:w.bind(null,s)}):ne)}),L1=S.forwardRef((e,t)=>{let{listType:n=`text`,previewFile:r=M1,onPreview:i,onDownload:a,onRemove:o,locale:s,iconRender:c,isImageUrl:l=A1,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:p=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,progress:y={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:x=!0,itemRender:C,disabled:w,classNames:T,styles:E}=e,[,D]=mf(),[O,k]=S.useState(!1),A=[`picture-card`,`picture-circle`].includes(n);S.useEffect(()=>{n.startsWith(`picture`)&&(d||[]).forEach(e=>{!(e.originFileObj instanceof File||e.originFileObj instanceof Blob)||e.thumbUrl!==void 0||(e.thumbUrl=``,r?.(e.originFileObj).then(t=>{e.thumbUrl=t||``,D()}))})},[n,d,r]),S.useEffect(()=>{k(!0)},[]);let j=(e,t)=>{if(i)return t?.preventDefault(),i(e)},M=e=>{typeof a==`function`?a(e):e.url&&window.open(e.url)},N=e=>{o?.(e)},P=e=>{if(c)return c(e,n);let t=e.status===`uploading`;if(n.startsWith(`picture`)){let r=n===`picture`?S.createElement(Ym,null):s.uploading,i=l?.(e)?S.createElement(C1,null):S.createElement(_1,null);return t?r:i}return t?S.createElement(Ym,null):S.createElement(b1,null)},F=(e,t,n,r,i)=>{let a={type:`text`,size:`small`,title:r,onClick:n=>{t(),S.isValidElement(e)&&e.props.onClick?.(n)},className:`${n}-list-item-action`,disabled:i?w:!1};return S.isValidElement(e)?S.createElement(h_,{...a,icon:um(e,{...e.props,onClick:()=>{}})}):S.createElement(h_,{...a},S.createElement(`span`,null,e))};S.useImperativeHandle(t,()=>({handlePreview:j,handleDownload:M}));let{getPrefixCls:I}=S.useContext(ga),L=I(`upload`,u),R=I(),z=J(`${L}-list`,`${L}-list-${n}`,T?.list),B=S.useMemo(()=>gi(mh(R),[`onAppearEnd`,`onEnterEnd`,`onLeaveEnd`]),[R]),V={...A?{}:B,motionDeadline:2e3,motionName:`${L}-${A?`animate-inline`:`animate`}`,keys:pa(d.map(e=>({key:e.uid,file:e}))),motionAppear:O};return S.createElement(`div`,{className:z,style:E?.list},S.createElement(Dd,{...V,component:!1},({key:e,file:t,className:r,style:i})=>S.createElement(I1,{key:e,locale:s,prefixCls:L,className:r,style:i,classNames:T,styles:E,file:t,items:d,progress:y,listType:n,isImgUrl:l,showPreviewIcon:f,showRemoveIcon:p,showDownloadIcon:m,removeIcon:h,previewIcon:g,downloadIcon:_,extra:v,iconRender:P,actionIconRender:F,itemRender:C,onPreview:j,onDownload:M,onClose:N})),b&&S.createElement(Od,{...V,visible:x,forceRender:!0},({className:e,style:t})=>um(b,n=>({className:J(n.className,e),style:{...t,pointerEvents:e?`none`:void 0,...n.style}}))))}),R1=`__LIST_IGNORE_${Date.now()}__`,z1=S.forwardRef((e,t)=>{let n=ya(`upload`),{fileList:r,defaultFileList:i,onRemove:a,showUploadList:o=!0,listType:s=`text`,onPreview:c,onDownload:l,onChange:u,onDrop:d,previewFile:f,disabled:p,locale:m,iconRender:h,isImageUrl:g,progress:_,prefixCls:v,className:y,type:b=`select`,children:x,style:C,itemRender:w,maxCount:T,data:E={},multiple:D=!1,hasControlInside:O=!0,action:k=``,accept:A=``,supportServerRender:j=!0,rootClassName:M,styles:N,classNames:P}=e,F=S.useContext(mm),I=p??F,L=e.customRequest||n.customRequest,[R,z]=Gn(i,r),B=R||[],[V,H]=S.useState(`drop`),U=S.useRef(null),ee=S.useRef(null);S.useMemo(()=>{let e=Date.now();(r||[]).forEach((t,n)=>{!t.uid&&!Object.isFrozen(t)&&(t.uid=`__AUTO__${e}_${n}__`)})},[r]);let W=(e,t,n)=>{let r=pa(t),i=!1;T===1?r=r.slice(-1):T&&(i=r.length>T,r=r.slice(0,T)),(0,Vi.flushSync)(()=>{z(r)});let a={file:e,fileList:r};n&&(a.event=n),(!i||e.status===`removed`||r.some(t=>t.uid===e.uid))&&(0,Vi.flushSync)(()=>{u?.(a)})},te=async(t,n)=>{let{beforeUpload:r}=e,i=t;if(r){let e=await r(t,n);if(e===!1)return!1;if(delete t[R1],e===R1)return Object.defineProperty(t,R1,{value:!0,configurable:!0}),!1;nf(e)&&(i=e)}return i},G=e=>{let t=e.filter(e=>!e.file[R1]);if(!t.length)return;let n=t.map(e=>w1(e.file)),r=pa(B);n.forEach(e=>{r=T1(e,r)}),n.forEach((e,n)=>{let i=e;if(t[n].parsedFile)e.status=`uploading`;else{let{originFileObj:t}=e,n;try{n=new File([t],t.name,{type:t.type})}catch{n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=new Date().getTime()}n.uid=e.uid,i=n}W(i,r)})},ne=(e,t,n)=>{try{typeof e==`string`&&(e=JSON.parse(e))}catch{}if(!E1(t,B))return;let r=w1(t);r.status=`done`,r.percent=100,r.response=e,r.xhr=n,W(r,T1(r,B))},K=(e,t)=>{if(!E1(t,B))return;let n=w1(t);n.status=`uploading`,n.percent=e.percent,W(n,T1(n,B),e)},re=(e,t,n)=>{if(!E1(n,B))return;let r=w1(n);r.error=e,r.response=t,r.status=`error`,W(r,T1(r,B))},ie=e=>{let t;Promise.resolve(typeof a==`function`?a(e):a).then(n=>{if(n===!1)return;let r=D1(e,B);r&&(t={...e,status:`removed`},B?.forEach(e=>{let n=t.uid===void 0?`name`:`uid`;e[n]===t[n]&&!Object.isFrozen(e)&&(e.status=`removed`)}),U.current?.abort(t),W(t,r))})},ae=e=>{H(e.type),e.type===`drop`&&d?.(e)};S.useImperativeHandle(t,()=>({onBatchStart:G,onSuccess:ne,onProgress:K,onError:re,fileList:B,upload:U.current,nativeElement:ee.current}));let{getPrefixCls:q,direction:oe,className:se,style:ce,classNames:le,styles:ue}=ya(`upload`),de=q(`upload`,v),fe={...e,listType:s,showUploadList:o,type:b,multiple:D,hasControlInside:O,supportServerRender:j,disabled:I},[pe,me]=Cf([le,P],[ue,N],{props:fe}),he={onBatchStart:G,onError:re,onProgress:K,onSuccess:ne,...e,customRequest:L,data:E,multiple:D,action:k,accept:A,supportServerRender:j,prefixCls:de,disabled:I,beforeUpload:te,onChange:void 0,hasControlInside:O};delete he.className,delete he.style,(!x||I)&&delete he.id;let ge=`${de}-wrapper`,[_e,ve]=m1(de,ge),[ye]=Yd(`Upload`,Hd.Upload),{showRemoveIcon:be,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,extra:Ee}=typeof o==`boolean`?{}:o,De=be===void 0?!I:be,Oe=(e,t)=>o?S.createElement(L1,{classNames:pe,styles:me,prefixCls:de,listType:s,items:B,previewFile:f,onPreview:c,onDownload:l,onRemove:ie,showRemoveIcon:De,showPreviewIcon:xe,showDownloadIcon:Se,removeIcon:Ce,previewIcon:we,downloadIcon:Te,iconRender:h,extra:Ee,locale:{...ye,...m},isImageUrl:g,progress:_,appendAction:e,appendActionVisible:t,itemRender:w,disabled:I}):e,ke=J(ge,y,M,_e,ve,se,pe.root,{[`${de}-rtl`]:oe===`rtl`,[`${de}-picture-card-wrapper`]:s===`picture-card`,[`${de}-picture-circle-wrapper`]:s===`picture-circle`}),Ae={...me.root},je={...ce,...C};if(b===`drag`){let e=J(_e,de,`${de}-drag`,{[`${de}-drag-uploading`]:B.some(e=>e.status===`uploading`),[`${de}-drag-hover`]:V===`dragover`,[`${de}-disabled`]:I,[`${de}-rtl`]:oe===`rtl`},pe.trigger);return S.createElement(`span`,{className:ke,ref:ee,style:Ae},S.createElement(`div`,{className:e,style:{...je,...me.trigger},onDrop:ae,onDragOver:ae,onDragLeave:ae},S.createElement(o1,{...he,ref:U,className:`${de}-btn`},S.createElement(`div`,{className:`${de}-drag-container`},x))),Oe())}let Me=J(de,`${de}-select`,{[`${de}-disabled`]:I,[`${de}-hidden`]:!x},pe.trigger),Ne=S.createElement(`div`,{className:Me,style:{...je,...me.trigger}},S.createElement(o1,{...he,ref:U}));return s===`picture-card`||s===`picture-circle`?S.createElement(`span`,{className:ke,ref:ee,style:Ae},Oe(Ne,!!x)):S.createElement(`span`,{className:ke,ref:ee,style:Ae},Ne,Oe())}),B1=S.forwardRef((e,t)=>{let{style:n,height:r,hasControlInside:i=!1,children:a,...o}=e,s={...n,height:r};return S.createElement(z1,{ref:t,hasControlInside:i,...o,style:s,type:`drag`},a)}),V1=z1;V1.Dragger=B1,V1.LIST_IGNORE=R1;var H1=o(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),U1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={items_per_page:`条/页`,jump_to:`跳至`,jump_to_confirm:`确定`,page:`页`,prev_page:`上一页`,next_page:`下一页`,prev_5:`向前 5 页`,next_5:`向后 5 页`,prev_3:`向前 3 页`,next_3:`向后 3 页`,page_size:`页码`}})),W1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),G1=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=W1();function n(e){"@babel/helpers - typeof";return n=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},n(e)}function r(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 i(e){for(var t=1;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default={placeholder:`请选择时间`,rangePlaceholder:[`开始时间`,`结束时间`]}})),q1=o((e=>{var t=H1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(G1()),r=t(K1()),i={lang:{placeholder:`请选择日期`,yearPlaceholder:`请选择年份`,quarterPlaceholder:`请选择季度`,monthPlaceholder:`请选择月份`,weekPlaceholder:`请选择周`,rangePlaceholder:[`开始日期`,`结束日期`],rangeYearPlaceholder:[`开始年份`,`结束年份`],rangeMonthPlaceholder:[`开始月份`,`结束月份`],rangeQuarterPlaceholder:[`开始季度`,`结束季度`],rangeWeekPlaceholder:[`开始周`,`结束周`],...n.default},timePickerLocale:{...r.default}};i.lang.ok=`确定`,e.default=i})),J1=o((e=>{var t=H1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=t(q1()).default})),Y1=o((e=>{var t=H1().default;Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t(U1()),r=t(J1()),i=t(q1()),a=t(K1()),o="${label}不是一个有效的${type}";e.default={locale:`zh-cn`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`请选择`,close:`关闭`,sortable:`可排序`},Table:{filterTitle:`筛选`,filterConfirm:`确定`,filterReset:`重置`,filterEmptyText:`无筛选项`,filterCheckAll:`全选`,filterSearchPlaceholder:`在筛选项中搜索`,emptyText:`暂无数据`,selectAll:`全选当页`,selectInvert:`反选当页`,selectNone:`清空所有`,selectionAll:`全选所有`,sortTitle:`排序`,expand:`展开行`,collapse:`关闭行`,triggerDesc:`点击降序`,triggerAsc:`点击升序`,cancelSort:`取消排序`},Modal:{okText:`确定`,cancelText:`取消`,justOkText:`知道了`},Tour:{Next:`下一步`,Previous:`上一步`,Finish:`结束导览`},Popconfirm:{cancelText:`取消`,okText:`确定`},Transfer:{titles:[``,``],searchPlaceholder:`请输入搜索内容`,itemUnit:`项`,itemsUnit:`项`,remove:`删除`,selectCurrent:`全选当页`,removeCurrent:`删除当页`,selectAll:`全选所有`,deselectAll:`取消全选`,removeAll:`删除全部`,selectInvert:`反选当页`},Upload:{uploading:`文件上传中`,removeFile:`删除文件`,uploadError:`上传错误`,previewFile:`预览文件`,downloadFile:`下载文件`},Empty:{description:`暂无数据`},Icon:{icon:`图标`},Text:{edit:`编辑`,copy:`复制`,copied:`复制成功`,expand:`展开`,collapse:`收起`},Form:{optional:`(可选)`,defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:`二维码过期`,refresh:`点击刷新`,scanned:`已扫描`},ColorPicker:{presetEmpty:`暂无`,transparent:`无色`,singleColor:`单色`,gradientColor:`渐变色`}}})),X1=o(((e,t)=>{t.exports=Y1()})),Z1=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(WE()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))})),Q1=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),$1=o(((e,t)=>{t.exports=Q1()})),e0=c(X1(),1);Z1();var $=$1(),t0=Object.defineProperty,n0=Object.getOwnPropertySymbols,r0=Object.prototype.hasOwnProperty,i0=Object.prototype.propertyIsEnumerable,a0=(e,t,n)=>t in e?t0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o0=(e,t)=>{for(var n in t||={})r0.call(t,n)&&a0(e,n,t[n]);if(n0)for(var n of n0(t))i0.call(t,n)&&a0(e,n,t[n]);return e},s0=(e,t)=>{var n={};for(var r in e)r0.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&n0)for(var r of n0(e))t.indexOf(r)<0&&i0.call(e,r)&&(n[r]=e[r]);return n},c0;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.lengthm[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}getModule(e,t){return 0<=e&&e>>9)*1335;let a=(t<<10|n)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;ne+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.lengtht.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let r=[];for(let e=0;e=1<{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||={})})(c0||={}),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||={})})(c0||={});var l0=c0,u0={L:l0.QrCode.Ecc.LOW,M:l0.QrCode.Ecc.MEDIUM,Q:l0.QrCode.Ecc.QUARTILE,H:l0.QrCode.Ecc.HIGH},d0=128,f0=`L`,p0=`#FFFFFF`,m0=`#000000`,h0=!1,g0=1,_0=4,v0=0,y0=.1;function b0(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function x0(e,t){return e.slice().map((e,n)=>n=t.y+t.h?e:e.map((e,n)=>n=t.x+t.w?e:!1))}function S0(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*y0),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function C0(e,t){return t==null?e?_0:v0:Math.max(Math.floor(t),0)}function w0({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:a,size:o,boostLevel:s}){let c=S.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...l0.QrSegment.makeSegments(t)),e),[]);return l0.QrCode.encodeSegments(r,u0[t],n,void 0,void 0,s)},[e,t,n,s]),{cells:l,margin:u,numCells:d,calculatedImageSettings:f}=S.useMemo(()=>{let e=c.getModules(),t=C0(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:S0(e,o,t,a)}},[c,o,a,r,i]);return{qrcode:c,margin:u,cells:l,numCells:d,calculatedImageSettings:f}}var T0=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),E0=S.forwardRef(function(e,t){let n=e,{value:r,size:i=d0,level:a=f0,bgColor:o=p0,fgColor:s=m0,includeMargin:c=h0,minVersion:l=g0,boostLevel:u,marginSize:d,imageSettings:f}=n,p=s0(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:m}=p,h=s0(p,[`style`]),g=f?.src,_=S.useRef(null),v=S.useRef(null),y=S.useCallback(e=>{_.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[b,x]=S.useState(!1),{margin:C,cells:w,numCells:T,calculatedImageSettings:E}=w0({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:d,imageSettings:f,size:i});S.useEffect(()=>{if(_.current!=null){let e=_.current,t=e.getContext(`2d`);if(!t)return;let n=w,r=v.current,a=E!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&E.excavation!=null&&(n=x0(w,E.excavation));let c=window.devicePixelRatio||1;e.height=e.width=i*c;let l=i/T*c;t.scale(l,l),t.fillStyle=o,t.fillRect(0,0,T,T),t.fillStyle=s,T0?t.fill(new Path2D(b0(n,C))):w.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+C,n+C,1,1)})}),E&&(t.globalAlpha=E.opacity),a&&t.drawImage(r,E.x+C,E.y+C,E.w,E.h)}}),S.useEffect(()=>{x(!1)},[g]);let D=o0({height:i,width:i},m),O=null;return g!=null&&(O=S.createElement(`img`,{src:g,key:g,style:{display:`none`},onLoad:()=>{x(!0)},ref:v,crossOrigin:E?.crossOrigin})),S.createElement(S.Fragment,null,S.createElement(`canvas`,o0({style:D,height:i,width:i,ref:y,role:`img`},h)),O)});E0.displayName=`QRCodeCanvas`;var D0=S.forwardRef(function(e,t){let n=e,{value:r,size:i=d0,level:a=f0,bgColor:o=p0,fgColor:s=m0,includeMargin:c=h0,minVersion:l=g0,boostLevel:u,title:d,marginSize:f,imageSettings:p}=n,m=s0(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:h,cells:g,numCells:_,calculatedImageSettings:v}=w0({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:f,imageSettings:p,size:i}),y=g,b=null;p!=null&&v!=null&&(v.excavation!=null&&(y=x0(g,v.excavation)),b=S.createElement(`image`,{href:p.src,height:v.h,width:v.w,x:v.x+h,y:v.y+h,preserveAspectRatio:`none`,opacity:v.opacity,crossOrigin:v.crossOrigin}));let x=b0(y,h);return S.createElement(`svg`,o0({height:i,width:i,viewBox:`0 0 ${_} ${_}`,ref:t,role:`img`},m),!!d&&S.createElement(`title`,null,d),S.createElement(`path`,{fill:o,d:`M0,0 h${_}v${_}H0z`,shapeRendering:`crispEdges`}),S.createElement(`path`,{fill:s,d:x,shapeRendering:`crispEdges`}),b)});D0.displayName=`QRCodeSVG`;var O0=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9`}}]},name:`alipay-circle`,theme:`outlined`}}))());function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k0({},e,{ref:t,icon:O0.default}))),j0=c(o((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:`M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z`}}]},name:`api`,theme:`outlined`}}))());function M0(){return M0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M0({},e,{ref:t,icon:j0.default}))),P0=c(o((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:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`}}))());function F0(){return F0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F0({},e,{ref:t,icon:P0.default}))),L0=c(o((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:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`}}))());function R0(){return R0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R0({},e,{ref:t,icon:L0.default}))),B0=c(o((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:`M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`arrow-left`,theme:`outlined`}}))());function V0(){return V0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V0({},e,{ref:t,icon:B0.default}))),U0=c(o((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:`M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z`}}]},name:`arrow-right`,theme:`outlined`}}))());function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,W0({},e,{ref:t,icon:U0.default}))),K0=c(o((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:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`}}))());function q0(){return q0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,q0({},e,{ref:t,icon:K0.default}))),Y0=c(o((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:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`}}))());function X0(){return X0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,X0({},e,{ref:t,icon:Y0.default}))),Q0=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M485.6 249.9L198.2 498c-8.3 7.1-8.3 20.8 0 27.9l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9zm320 0L518.2 498a18.6 18.6 0 00-6.2 14c0 5.2 2.1 10.4 6.2 14l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9z`}}]},name:`backward`,theme:`outlined`}}))());function $0(){return $0=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,$0({},e,{ref:t,icon:Q0.default}))),t2=c(o((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:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM381 836H264V462h117v374zm189 0H453V462h117v374zm190 0H642V462h118v374z`}}]},name:`bank`,theme:`filled`}}))());function n2(){return n2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n2({},e,{ref:t,icon:t2.default}))),nie=c(o((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:`M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z`}}]},name:`bank`,theme:`outlined`}}))());function i2(){return i2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,i2({},e,{ref:t,icon:nie.default}))),o2=c(o((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:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z`}}]},name:`bar-chart`,theme:`outlined`}}))());function s2(){return s2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,s2({},e,{ref:t,icon:o2.default}))),l2=c(o((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:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`}}))());function u2(){return u2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,u2({},e,{ref:t,icon:l2.default}))),f2=c(o((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:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z`}}]},name:`book`,theme:`outlined`}}))());function p2(){return p2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,p2({},e,{ref:t,icon:f2.default}))),h2=c(o((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:`M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z`}}]},name:`build`,theme:`outlined`}}))());function g2(){return g2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,g2({},e,{ref:t,icon:h2.default}))),v2=c(o((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:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`}}))());function y2(){return y2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y2({},e,{ref:t,icon:v2.default}))),x2=c(o((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:`M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z`}}]},name:`camera`,theme:`outlined`}}))());function S2(){return S2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,S2({},e,{ref:t,icon:x2.default}))),w2=c(o((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:`M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`car`,theme:`outlined`}}))());function T2(){return T2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,T2({},e,{ref:t,icon:w2.default}))),D2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z`}}]},name:`caret-right`,theme:`outlined`}}))());function O2(){return O2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,O2({},e,{ref:t,icon:D2.default}))),A2=c(o((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:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`}}))());function j2(){return j2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,j2({},e,{ref:t,icon:A2.default}))),N2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`}}))());function P2(){return P2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,P2({},e,{ref:t,icon:N2.default}))),I2=c(o((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:`M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z`}}]},name:`cloud`,theme:`outlined`}}))());function L2(){return L2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,L2({},e,{ref:t,icon:I2.default}))),z2=c(o((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:`M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z`}},{tag:`path`,attrs:{d:`M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z`}},{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}}]},name:`cloud-server`,theme:`outlined`}}))());function B2(){return B2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,B2({},e,{ref:t,icon:z2.default}))),H2=c(o((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:`M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z`}},{tag:`path`,attrs:{d:`M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z`}}]},name:`cloud-upload`,theme:`outlined`}}))());function U2(){return U2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,U2({},e,{ref:t,icon:H2.default}))),G2=c(o((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:`M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`code`,theme:`outlined`}}))());function K2(){return K2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,K2({},e,{ref:t,icon:G2.default}))),J2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z`}}]},name:`coffee`,theme:`outlined`}}))());function Y2(){return Y2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Y2({},e,{ref:t,icon:J2.default}))),Z2=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z`}},{tag:`path`,attrs:{d:`M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z`}},{tag:`path`,attrs:{d:`M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z`}}]},name:`comment`,theme:`outlined`}}))());function Q2(){return Q2=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Q2({},e,{ref:t,icon:Z2.default}))),e4=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z`}}]},name:`compass`,theme:`outlined`}}))());function t4(){return t4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,t4({},e,{ref:t,icon:e4.default}))),r4=c(o((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:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zM512 734.2c-62.1 0-112.6-50.5-112.6-112.6S449.9 509 512 509s112.6 50.5 112.6 112.6S574.1 734.2 512 734.2zm0-160.9c-26.6 0-48.2 21.6-48.2 48.3 0 26.6 21.6 48.3 48.2 48.3s48.2-21.6 48.2-48.3c0-26.6-21.6-48.3-48.2-48.3z`}}]},name:`crown`,theme:`filled`}}))());function i4(){return i4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,i4({},e,{ref:t,icon:r4.default}))),o4=c(o((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:`M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z`}}]},name:`crown`,theme:`outlined`}}))());function s4(){return s4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,s4({},e,{ref:t,icon:o4.default}))),l4=c(o((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:`M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z`}}]},name:`dashboard`,theme:`outlined`}}))());function u4(){return u4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,u4({},e,{ref:t,icon:l4.default}))),f4=c(o((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:`M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`database`,theme:`outlined`}}))());function p4(){return p4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,p4({},e,{ref:t,icon:f4.default}))),h4=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z`}}]},name:`dollar`,theme:`outlined`}}))());function g4(){return g4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,g4({},e,{ref:t,icon:h4.default}))),v4=c(o((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 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z`}}]},name:`experiment`,theme:`outlined`}}))());function y4(){return y4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y4({},e,{ref:t,icon:v4.default}))),x4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z`}}]},name:`export`,theme:`outlined`}}))());function S4(){return S4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,S4({},e,{ref:t,icon:x4.default}))),w4=c(o((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:`M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z`}}]},name:`filter`,theme:`outlined`}}))());function T4(){return T4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,T4({},e,{ref:t,icon:w4.default}))),D4=c(o((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:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9z`}}]},name:`fire`,theme:`filled`}}))());function O4(){return O4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,O4({},e,{ref:t,icon:D4.default}))),A4=c(o((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:`M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z`}}]},name:`fire`,theme:`outlined`}}))());function j4(){return j4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,j4({},e,{ref:t,icon:A4.default}))),N4=c(o((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:`M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z`}}]},name:`flag`,theme:`outlined`}}))());function P4(){return P4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,P4({},e,{ref:t,icon:N4.default}))),I4=c(o((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:`M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z`}}]},name:`font-size`,theme:`outlined`}}))());function L4(){return L4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,L4({},e,{ref:t,icon:I4.default}))),z4=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M825.8 498L538.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L825.8 526c8.3-7.2 8.3-20.8 0-28zm-320 0L218.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L505.8 526c4.1-3.6 6.2-8.8 6.2-14 0-5.2-2.1-10.4-6.2-14z`}}]},name:`forward`,theme:`outlined`}}))());function B4(){return B4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,B4({},e,{ref:t,icon:z4.default}))),H4=c(o((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:`M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z`}}]},name:`fullscreen-exit`,theme:`outlined`}}))());function U4(){return U4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,U4({},e,{ref:t,icon:H4.default}))),G4=c(o((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:`M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z`}}]},name:`fullscreen`,theme:`outlined`}}))());function K4(){return K4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,K4({},e,{ref:t,icon:G4.default}))),J4=c(o((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:`M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z`}}]},name:`gift`,theme:`outlined`}}))());function Y4(){return Y4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Y4({},e,{ref:t,icon:J4.default}))),Z4=c(o((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:`M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z`}}]},name:`global`,theme:`outlined`}}))());function Q4(){return Q4=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Q4({},e,{ref:t,icon:Z4.default}))),e3=c(o((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:`M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z`}}]},name:`heart`,theme:`outlined`}}))());function t3(){return t3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,t3({},e,{ref:t,icon:e3.default}))),r3=c(o((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:`M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z`}}]},name:`highlight`,theme:`outlined`}}))());function i3(){return i3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,i3({},e,{ref:t,icon:r3.default}))),o3=c(o((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:`M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z`}}]},name:`home`,theme:`outlined`}}))());function s3(){return s3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,s3({},e,{ref:t,icon:o3.default}))),l3=c(o((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:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z`}}]},name:`idcard`,theme:`outlined`}}))());function u3(){return u3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,u3({},e,{ref:t,icon:l3.default}))),f3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z`}}]},name:`import`,theme:`outlined`}}))());function p3(){return p3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,p3({},e,{ref:t,icon:f3.default}))),h3=c(o((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:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`}}))());function g3(){return g3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,g3({},e,{ref:t,icon:h3.default}))),v3=c(o((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:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-696 72h136v656H184V184zm656 656H384V384h456v456zM384 320V184h456v136H384z`}}]},name:`layout`,theme:`outlined`}}))());function y3(){return y3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y3({},e,{ref:t,icon:v3.default}))),x3=c(o((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:`M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z`}}]},name:`like`,theme:`outlined`}}))());function S3(){return S3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,S3({},e,{ref:t,icon:x3.default}))),w3=c(o((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:`M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z`}}]},name:`line-chart`,theme:`outlined`}}))());function T3(){return T3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,T3({},e,{ref:t,icon:w3.default}))),D3=c(o((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:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`}}))());function O3(){return O3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,O3({},e,{ref:t,icon:D3.default}))),A3=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M521.7 82c-152.5-.4-286.7 78.5-363.4 197.7-3.4 5.3.4 12.3 6.7 12.3h70.3c4.8 0 9.3-2.1 12.3-5.8 7-8.5 14.5-16.7 22.4-24.5 32.6-32.5 70.5-58.1 112.7-75.9 43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 32.6 32.5 58.1 70.4 76 112.5C865.7 417.8 875 464.1 875 512c0 47.9-9.4 94.2-27.8 137.8-17.8 42.1-43.4 80-76 112.5s-70.5 58.1-112.7 75.9A352.8 352.8 0 01520.6 866c-47.9 0-94.3-9.4-137.9-27.8A353.84 353.84 0 01270 762.3c-7.9-7.9-15.3-16.1-22.4-24.5-3-3.7-7.6-5.8-12.3-5.8H165c-6.3 0-10.2 7-6.7 12.3C234.9 863.2 368.5 942 520.6 942c236.2 0 428-190.1 430.4-425.6C953.4 277.1 761.3 82.6 521.7 82zM395.02 624v-76h-314c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h314v-76c0-6.7 7.8-10.5 13-6.3l141.9 112a8 8 0 010 12.6l-141.9 112c-5.2 4.1-13 .4-13-6.3z`}}]},name:`login`,theme:`outlined`}}))());function j3(){return j3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,j3({},e,{ref:t,icon:A3.default}))),N3=c(o((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:`M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z`}}]},name:`logout`,theme:`outlined`}}))());function P3(){return P3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,P3({},e,{ref:t,icon:N3.default}))),I3=c(o((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:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`}}))());function L3(){return L3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,L3({},e,{ref:t,icon:I3.default}))),z3=c(o((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:`M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z`}}]},name:`medicine-box`,theme:`outlined`}}))());function B3(){return B3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,B3({},e,{ref:t,icon:z3.default}))),H3=c(o((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:`M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z`}}]},name:`menu`,theme:`outlined`}}))());function U3(){return U3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,U3({},e,{ref:t,icon:H3.default}))),G3=c(o((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:`M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z`}}]},name:`message`,theme:`outlined`}}))());function K3(){return K3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,K3({},e,{ref:t,icon:G3.default}))),J3=c(o((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:`M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`mobile`,theme:`outlined`}}))());function Y3(){return Y3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Y3({},e,{ref:t,icon:J3.default}))),Z3=c(o((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:`M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z`}}]},name:`monitor`,theme:`outlined`}}))());function Q3(){return Q3=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Q3({},e,{ref:t,icon:Z3.default}))),e6=c(o((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:`M880 112c-3.8 0-7.7.7-11.6 2.3L292 345.9H128c-8.8 0-16 7.4-16 16.6v299c0 9.2 7.2 16.6 16 16.6h101.7c-3.7 11.6-5.7 23.9-5.7 36.4 0 65.9 53.8 119.5 120 119.5 55.4 0 102.1-37.6 115.9-88.4l408.6 164.2c3.9 1.5 7.8 2.3 11.6 2.3 16.9 0 32-14.2 32-33.2V145.2C912 126.2 897 112 880 112zM344 762.3c-26.5 0-48-21.4-48-47.8 0-11.2 3.9-21.9 11-30.4l84.9 34.1c-2 24.6-22.7 44.1-47.9 44.1zm496 58.4L318.8 611.3l-12.9-5.2H184V417.9h121.9l12.9-5.2L840 203.3v617.4z`}}]},name:`notification`,theme:`outlined`}}))());function t6(){return t6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,t6({},e,{ref:t,icon:e6.default}))),r6=c(o((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 64zm-80 600c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304zm224 0c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304z`}}]},name:`pause-circle`,theme:`filled`}}))());function i6(){return i6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,i6({},e,{ref:t,icon:r6.default}))),o6=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z`}}]},name:`pause-circle`,theme:`outlined`}}))());function s6(){return s6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,s6({},e,{ref:t,icon:o6.default}))),l6=c(o((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:`M304 176h80v672h-80zm408 0h-64c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8z`}}]},name:`pause`,theme:`outlined`}}))());function u6(){return u6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,u6({},e,{ref:t,icon:l6.default}))),f6=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z`}}]},name:`pay-circle`,theme:`outlined`}}))());function p6(){return p6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,p6({},e,{ref:t,icon:f6.default}))),h6=c(o((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:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`}}))());function g6(){return g6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,g6({},e,{ref:t,icon:h6.default}))),v6=c(o((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:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zM338 304c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm513.9 437.1a8.11 8.11 0 01-5.2 1.9H177.2c-4.4 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.2l170.3-202c2.8-3.4 7.9-3.8 11.3-1 .3.3.7.6 1 1l99.4 118 158.1-187.5c2.8-3.4 7.9-3.8 11.3-1 .3.3.7.6 1 1l229.6 271.6c2.6 3.3 2.2 8.4-1.2 11.2z`}}]},name:`picture`,theme:`filled`}}))());function y6(){return y6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y6({},e,{ref:t,icon:v6.default}))),x6=c(o((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:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`}}))());function S6(){return S6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,S6({},e,{ref:t,icon:x6.default}))),w6=c(o((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:`M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z`}}]},name:`pie-chart`,theme:`outlined`}}))());function T6(){return T6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,T6({},e,{ref:t,icon:w6.default}))),D6=c(o((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 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z`}}]},name:`play-circle`,theme:`filled`}}))());function O6(){return O6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,O6({},e,{ref:t,icon:D6.default}))),A6=c(o((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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z`}}]},name:`play-circle`,theme:`outlined`}}))());function j6(){return j6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,j6({},e,{ref:t,icon:A6.default}))),N6=c(o((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:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zM340 368a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`profile`,theme:`outlined`}}))());function P6(){return P6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,P6({},e,{ref:t,icon:N6.default}))),I6=c(o((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:`M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z`}}]},name:`read`,theme:`outlined`}}))());function L6(){return L6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,L6({},e,{ref:t,icon:I6.default}))),z6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}},{tag:`path`,attrs:{d:`M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z`}}]},name:`rest`,theme:`outlined`}}))());function B6(){return B6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,B6({},e,{ref:t,icon:z6.default}))),H6=c(o((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:`M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z`}}]},name:`rise`,theme:`outlined`}}))());function U6(){return U6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,U6({},e,{ref:t,icon:H6.default}))),G6=c(o((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:`M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z`}}]},name:`robot`,theme:`outlined`}}))());function K6(){return K6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,K6({},e,{ref:t,icon:G6.default}))),J6=c(o((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:`M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z`}}]},name:`rocket`,theme:`outlined`}}))());function Y6(){return Y6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Y6({},e,{ref:t,icon:J6.default}))),Z6=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z`}},{tag:`path`,attrs:{d:`M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z`}}]},name:`safety`,theme:`outlined`}}))());function Q6(){return Q6=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,Q6({},e,{ref:t,icon:Z6.default}))),e8=c(o((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:`M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z`}}]},name:`save`,theme:`outlined`}}))());function t8(){return t8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,t8({},e,{ref:t,icon:e8.default}))),iie=c(o((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:`M567.1 512l318.5-319.3c5-5 1.5-13.7-5.6-13.7h-90.5c-2.1 0-4.2.8-5.6 2.3l-273.3 274-90.2-90.5c12.5-22.1 19.7-47.6 19.7-74.8 0-83.9-68.1-152-152-152s-152 68.1-152 152 68.1 152 152 152c27.7 0 53.6-7.4 75.9-20.3l90 90.3-90.1 90.3A151.04 151.04 0 00288 582c-83.9 0-152 68.1-152 152s68.1 152 152 152 152-68.1 152-152c0-27.2-7.2-52.7-19.7-74.8l90.2-90.5 273.3 274c1.5 1.5 3.5 2.3 5.6 2.3H880c7.1 0 10.7-8.6 5.6-13.7L567.1 512zM288 370c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm0 444c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z`}}]},name:`scissor`,theme:`outlined`}}))());function n8(){return n8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,n8({},e,{ref:t,icon:iie.default}))),aie=c(o((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:`M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z`}}]},name:`security-scan`,theme:`outlined`}}))());function i8(){return i8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,i8({},e,{ref:t,icon:aie.default}))),sie=c(o((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:`M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z`}}]},name:`setting`,theme:`outlined`}}))());function a8(){return a8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,a8({},e,{ref:t,icon:sie.default}))),cie=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`}}))());function s8(){return s8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,s8({},e,{ref:t,icon:cie.default}))),lie=c(o((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:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`}}))());function l8(){return l8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,l8({},e,{ref:t,icon:lie.default}))),die=c(o((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:`M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z`}}]},name:`sketch`,theme:`outlined`}}))());function u8(){return u8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,u8({},e,{ref:t,icon:die.default}))),pie=c(o((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:`M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z`}}]},name:`skin`,theme:`outlined`}}))());function d8(){return d8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,d8({},e,{ref:t,icon:pie.default}))),hie=c(o((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:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`}}))());function f8(){return f8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,f8({},e,{ref:t,icon:hie.default}))),gie=c(o((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:`M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z`}}]},name:`solution`,theme:`outlined`}}))());function m8(){return m8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,m8({},e,{ref:t,icon:gie.default}))),vie=c(o((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:`M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z`}}]},name:`sound`,theme:`outlined`}}))());function h8(){return h8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,h8({},e,{ref:t,icon:vie.default}))),yie=c(o((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:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z`}}]},name:`star`,theme:`outlined`}}))());function _8(){return _8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,_8({},e,{ref:t,icon:yie.default}))),bie=c(o((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:`M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z`}}]},name:`sync`,theme:`outlined`}}))());function y8(){return y8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,y8({},e,{ref:t,icon:bie.default}))),Sie=c(o((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:`M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z`}}]},name:`tag`,theme:`outlined`}}))());function b8(){return b8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,b8({},e,{ref:t,icon:Sie.default}))),wie=c(o((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:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`}}))());function x8(){return x8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,x8({},e,{ref:t,icon:wie.default}))),Tie=c(o((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:`M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z`}}]},name:`thunderbolt`,theme:`outlined`}}))());function C8(){return C8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,C8({},e,{ref:t,icon:Tie.default}))),Eie=c(o((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:`M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z`}}]},name:`tool`,theme:`outlined`}}))());function T8(){return T8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,T8({},e,{ref:t,icon:Eie.default}))),Oie=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z`}},{tag:`path`,attrs:{d:`M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4a8.42 8.42 0 00-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z`}}]},name:`translation`,theme:`outlined`}}))());function E8(){return E8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,E8({},e,{ref:t,icon:Oie.default}))),Aie=c(o((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:`M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z`}}]},name:`trophy`,theme:`outlined`}}))());function D8(){return D8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,D8({},e,{ref:t,icon:Aie.default}))),jie=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`}}))());function k8(){return k8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,k8({},e,{ref:t,icon:jie.default}))),Nie=c(o((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:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`}}))());function A8(){return A8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,A8({},e,{ref:t,icon:Nie.default}))),Pie=c(o((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:`M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z`}}]},name:`user-add`,theme:`outlined`}}))());function M8(){return M8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,M8({},e,{ref:t,icon:Pie.default}))),Iie=c(o((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:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`}}))());function N8(){return N8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,N8({},e,{ref:t,icon:Iie.default}))),Lie=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M759 335c0-137-111-248-248-248S263 198 263 335c0 82.8 40.6 156.2 103 201.2-.4.2-.7.3-.9.4-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00136 874.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C356 614.2 431 583 511 583c137 0 248-111 248-248zM511 507c-95 0-172-77-172-172s77-172 172-172 172 77 172 172-77 172-172 172zm105 221h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H703.5l47.2-60.1a8.1 8.1 0 001.7-4.9c0-4.4-3.6-8-8-8h-72.6c-4.9 0-9.5 2.3-12.6 6.1l-68.5 87.1c-4.4 5.6-6.8 12.6-6.8 19.8.1 17.7 14.4 32 32.1 32zm240 64H592c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h176.5l-47.2 60.1a8.1 8.1 0 00-1.7 4.9c0 4.4 3.6 8 8 8h72.6c4.9 0 9.5-2.3 12.6-6.1l68.5-87.1c4.4-5.6 6.8-12.6 6.8-19.8-.1-17.7-14.4-32-32.1-32z`}}]},name:`user-switch`,theme:`outlined`}}))());function F8(){return F8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,F8({},e,{ref:t,icon:Lie.default}))),zie=c(o((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:`M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}}]},name:`video-camera`,theme:`outlined`}}))());function I8(){return I8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,I8({},e,{ref:t,icon:zie.default}))),Bie=c(o((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:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`}}))());function R8(){return R8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,R8({},e,{ref:t,icon:Bie.default}))),Vie=c(o((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:`M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z`}}]},name:`warning`,theme:`outlined`}}))());function B8(){return B8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,B8({},e,{ref:t,icon:Vie.default}))),Uie=c(o((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:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`}}))());function V8(){return V8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,V8({},e,{ref:t,icon:Uie.default}))),Gie=c(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z`}}]},name:`x`,theme:`outlined`}}))());function H8(){return H8=Object.assign?Object.assign.bind():function(e){for(var t=1;tS.createElement(Su,H8({},e,{ref:t,icon:Gie.default}))),U8=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},qie=(e=>e?U8(e):U8),Jie=e=>e;function Yie(e,t=Jie){let n=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(n),n}var W8=e=>{let t=qie(e),n=e=>Yie(t,e);return Object.assign(n,t),n},G8=(e=>e?W8(e):W8),K8=`AES-GCM`,q8=12,J8=128;function Y8(){return typeof window<`u`&&typeof crypto<`u`&&crypto.subtle!==void 0}async function X8(){throw Error(`VITE_ENCRYPTION_KEY not configured`)}async function Xie(e){if(!Y8())throw Error(`Encryption not available in non-secure context`);let t=await X8(),n=crypto.getRandomValues(new Uint8Array(q8)),r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:K8,iv:n,tagLength:J8},t,r),a=new Uint8Array(i),o=new Uint8Array(n.length+a.length);return o.set(n),o.set(a,n.length),btoa(String.fromCharCode(...o))}async function Zie(e){if(!Y8())throw Error(`Decryption not available in non-secure context`);let t=await X8(),n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),r=n.slice(0,q8),i=n.slice(q8),a=await crypto.subtle.decrypt({name:K8,iv:r,tagLength:J8},t,i);return new TextDecoder().decode(a)}var Qie=`https://ceshi.apiforeign.minzhongzc.com`,$ie=!1;function eae(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function Z8(e){return Array.isArray(e)?e.map(Z8):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[eae(e),Z8(t)])):e}function tae(){return localStorage.getItem(`auth_token`)}function Q8(e){localStorage.setItem(`auth_token`,e)}function $8(){localStorage.removeItem(`auth_token`)}async function nae(e){try{return await Zie(e)}catch{return null}}async function e5(e,t={}){let{method:n=`GET`,body:r,auth:i=!0,encryptBody:a=$ie,signal:o,skipAuthRedirect:s}=t,c={"Content-Type":`application/json`};if(i){let e=tae();e&&(c.Authorization=`Bearer ${e}`)}let l;if(r!==void 0){let e=JSON.stringify(r);a?(c[`X-Encrypted`]=`true`,l=JSON.stringify({data:await Xie(e)})):l=e}let u=await fetch(`${Qie}/api${e}`,{method:n,headers:c,body:l,signal:o});if(u.status===204)return;let d=await u.text();if(!d)return;let f;try{f=JSON.parse(d)}catch{throw Error(`响应解析失败 (${u.status})`)}if(f&&typeof f.data==`string`&&a){let e=await nae(f.data);e!==null&&(f=JSON.parse(e))}if(!u.ok){let e=f?.detail?.message||f?.message||`请求失败 (${u.status})`;throw typeof f?.detail==`string`&&(e=f.detail),u.status===401&&typeof f?.detail==`string`&&f.detail.includes(`其他设备登录`)?(window.dispatchEvent(new CustomEvent(`kicked-out`,{detail:{message:f.detail}})),Error(f.detail)):(u.status===401&&!t.skipAuthRedirect&&($8(),window.location.href=`/login`),Error(e))}return Z8(f)}var t5={get:(e,t=!0)=>e5(e,typeof t==`boolean`?{auth:t}:t),post:(e,t,n=!0,r=!1)=>e5(e,{method:`POST`,body:t,auth:n,skipAuthRedirect:r}),put:(e,t,n=!0)=>e5(e,{method:`PUT`,body:t,auth:n}),delete:(e,t,n=!0)=>e5(e,{method:`DELETE`,body:t,auth:n})};async function rae(e,t,n,r){let i=await t5.post(`/auth/login`,{username:e,password:t,captcha_token:n,remember_me:r||!1},!1,!0);return Q8(i.accessToken),i.user}async function iae(e,t){let n=await t5.post(`/auth/sms-login`,{phone:e,code:t},!1,!0);return Q8(n.accessToken),n.user}async function aae(e,t,n){let r=await t5.post(`/auth/register`,{phone:e,code:t,password:n},!1);return Q8(r.accessToken),r.user}async function oae(){await t5.post(`/auth/logout`),$8()}async function n5(){try{return await t5.get(`/auth/me`)}catch{return null}}async function r5(e,t){await t5.post(`/auth/change-password`,{old_password:e,new_password:t})}async function sae(e){return t5.post(`/auth/change-username`,{new_username:e})}async function cae(){return t5.get(`/projects`)}async function lae(e,t){return t5.post(`/projects`,{name:e,industry:t})}async function uae(e){await t5.delete(`/projects/${e}`)}async function i5(e={}){let t=e.page&&e.page>0?e.page:1,n=e.pageSize&&e.pageSize>0?e.pageSize:10,r=new URLSearchParams;return e.projectId&&r.set(`project_id`,e.projectId),e.status&&r.set(`status`,e.status),r.set(`page`,String(t)),r.set(`page_size`,String(n)),t5.get(`/generation-records?${r.toString()}`,{signal:e.signal})}async function dae(e,t){return t5.post(`/generation-records/optimize`,{project_id:e,gen_type:t.genType,prompt:t.prompt,engine_id:t.engineId,include_media_references:t.includeMediaReferences??!1,duration:t.duration,aspect_ratio:t.aspectRatio||null,resolution:t.resolution||null,references:t.references||null,idempotency_key:t.idempotencyKey||null,image_size:t.image_size||null,image_proportion:t.image_proportion||null,image_px:t.image_px||null})}async function a5(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/generation-records/upload-audio${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`音频上传失败`);return await a.json()}async function o5(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/generation-records/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function s5(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/generation-records/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}function fae(e,t){return`${`https://ceshi.apiforeign.minzhongzc.com/api${e}`}${typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``}`}async function c5(e,t,n,r=`素材上传失败`){let i=new FormData;i.append(`file`,t);let a=localStorage.getItem(`auth_token`),o=await fetch(fae(e,n),{method:`POST`,headers:a?{Authorization:`Bearer ${a}`}:{},body:i});if(!o.ok)throw Error(r);return await o.json()}async function pae(e){return c5(`/private-portrait/uploads/image`,e,void 0,`真人图片素材上传失败`)}async function mae(e,t){return c5(`/private-portrait/uploads/video`,e,t,`真人视频素材上传失败`)}async function hae(e){return c5(`/private-portrait/virtual/uploads/image`,e,void 0,`虚拟图片素材上传失败`)}async function gae(e,t){return c5(`/private-portrait/virtual/uploads/video`,e,t,`虚拟视频素材上传失败`)}async function _ae(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/hot-opening-replications/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function vae(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/hot-opening-replications/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}async function yae(e){let t=new FormData;t.append(`file`,e);let n=localStorage.getItem(`auth_token`),r=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/shot-replications/upload-image`,{method:`POST`,headers:n?{Authorization:`Bearer ${n}`}:{},body:t});if(!r.ok)throw Error(`图片上传失败`);return await r.json()}async function bae(e,t){let n=new FormData;n.append(`file`,e);let r=localStorage.getItem(`auth_token`),i=typeof t==`number`&&t>0?`?duration_seconds=${encodeURIComponent(String(t))}`:``,a=await fetch(`https://ceshi.apiforeign.minzhongzc.com/api/shot-replications/upload-video${i}`,{method:`POST`,headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!a.ok)throw Error(`视频上传失败`);return await a.json()}async function l5(e){await t5.post(`/generation-records/delete-file?url=${encodeURIComponent(e)}`)}async function u5(e,t){await t5.put(`/generation-records/${e}/prompt`,{optimized_prompt:t})}async function xae(e){return t5.post(`/generation-records/${e}/generate`)}async function Sae(e){return t5.post(`/generation-records/${e}/retry`)}async function d5(e=1,t=20){let n=new URLSearchParams({page:String(e),page_size:String(t)});return t5.get(`/credits?${n.toString()}`)}async function f5(){return t5.get(`/auth/site-info`,!1)}async function Cae(){return t5.get(`/video-engines`)}async function wae(){return t5.get(`/image-engines`)}async function p5(e,t){await t5.post(`/sms/send`,{phone:e,scene:t},!1)}async function m5(e=1,t=20,n){let r=new URLSearchParams;return r.set(`page`,String(e)),r.set(`page_size`,String(t)),n!==void 0&&r.set(`is_read`,String(n)),t5.get(`/notifications?${r.toString()}`)}async function h5(){return(await t5.get(`/notifications/unread-count`)).count}async function g5(e){await t5.put(`/notifications/${e}/read`)}async function _5(){return(await t5.get(`/industries`)).map(e=>{let t=(Array.isArray(e.skills)?e.skills:[]).filter(e=>e&&e.type===`option_group`&&e.name&&Array.isArray(e.options)).map(e=>({name:e.name,options:e.options}));return{...e,optionGroups:t}})}async function Tae(){return t5.get(`/menu-configs`)}async function Eae(){return t5.get(`/payments/methods`)}async function v5(e,t=`wechat`,n=1){return t5.post(`/payments/recharge`,{plan:e,method:t,quantity:n})}async function y5(e=1,t=20,n){let r=new URLSearchParams;return r.set(`page`,String(e)),r.set(`page_size`,String(t)),n?.statusFilter&&r.set(`status_filter`,n.statusFilter),n?.startDate&&r.set(`start_date`,n.startDate),n?.endDate&&r.set(`end_date`,n.endDate),n?.invoiceMode&&r.set(`invoice_mode`,`true`),t5.get(`/payments/orders?${r.toString()}`)}async function b5(e){return t5.get(`/payments/orders/${e}`)}async function x5(e){return t5.post(`/payments/orders/${e}/cancel`)}async function Dae(e){return t5.post(`/invoices`,{header_type:e.headerType,header_name:e.headerName,header_tax_no:e.headerTaxNo,header_register_address:e.headerRegisterAddress,header_register_phone:e.headerRegisterPhone,header_bank_name:e.headerBankName,header_bank_account:e.headerBankAccount,email:e.email,order_ids:e.orderIds})}async function Oae(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.pageSize&&t.set(`page_size`,String(e.pageSize)),t5.get(`/invoices?${t.toString()}`)}async function kae(){return t5.get(`/invoice-headers`)}async function Aae(e){return t5.post(`/invoice-headers`,{type:e.type,name:e.name,tax_no:e.taxNo,register_address:e.registerAddress,register_phone:e.registerPhone,bank_name:e.bankName,bank_account:e.bankAccount,email:e.email,is_default:e.isDefault??!1})}async function jae(e){await t5.delete(`/invoice-headers/${e}`)}async function Mae(e){return t5.put(`/invoice-headers/${e}/set-default`)}async function Nae(){return t5.get(`/bank/default-account`)}async function Pae(){return t5.get(`/credits/ratios`)}async function S5(){return t5.get(`/generation-ai/engines`)}async function Fae(e){return t5.post(`/generation-ai/tasks`,e)}async function C5(e){return t5.get(`/generation-ai/tasks?page=`+e.page+`&page_size=`+e.pageSize)}async function w5(e){return t5.get(`/generation-ai/history`+e)}async function T5(e){return t5.get(`/generation-ai/history/`+e)}async function Iae(e){await t5.delete(`/generation-ai/tasks/${e}`)}async function E5(){return t5.get(`/credits/credit-ratios`)}async function Lae(e){return t5.post(`/v2/hot-opening-replications/tasks`,e)}async function D5(e,t,n){let r=`/hot-opening-replications/tasks?page=${e}&page_size=${t}`;return n&&(r+=`&keyword=${encodeURIComponent(n)}`),t5.get(r)}async function O5(e,t){return t===`v2`?t5.get(`/v2/hot-opening-replications/tasks/${e}`):t5.get(`/hot-opening-replications/tasks/${e}`)}async function Rae(e,t,n){return t5.post(`/v2/hot-opening-replications/tasks/${e}/steps/${t}/retry-video-prompt`,n)}async function zae(e,t,n){return t5.put(`/v2/hot-opening-replications/tasks/${e}/steps/${t}/video-prompt-schema`,n)}async function Bae(e,t){return t5.post(`/v2/hot-opening-replications/tasks/${e}/steps/${t}/generate-video`)}async function Vae(e,t,n){return t5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/image-prompt`,n)}async function k5(e,t,n){return t5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-image`,n)}async function Hae(e,t,n){return t5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video-prompt`,n)}async function Uae(e,t,n){return t5.post(`/hot-opening-replications/tasks/${e}/steps/${t}/generate-video`,n)}async function A5(e){return t5.post(`/user-oauth/request_oauth`,e)}async function Wae(e){let t=new URLSearchParams;return t.set(`auth_code`,e.auth_code),t.set(`state`,e.state),e.app_id&&t.set(`app_id`,e.app_id),e.material_auth_status&&t.set(`material_auth_status`,e.material_auth_status),e.scope&&t.set(`scope`,e.scope),e.uid&&t.set(`uid`,e.uid),t5.get(`/user-oauth/juliang_callback?${t.toString()}`)}async function j5(e){let t=new URLSearchParams;return e.account_userid&&t.set(`account_userid`,e.account_userid),e.open_type!==void 0&&t.set(`open_type`,String(e.open_type)),e.account_id&&t.set(`account_id`,e.account_id),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),t5.get(`/user-oauth/oauth_list?${t.toString()}`)}async function M5(e){let t=new URLSearchParams;return e.platform&&t.set(`platform`,e.platform),e.page!==void 0&&t.set(`page`,String(e.page)),e.pageSize!==void 0&&t.set(`page_size`,String(e.pageSize)),t5.get(`/pre-test-template/list?${t.toString()}`)}async function Gae(e){return t5.post(`/pre-test-template/create`,e)}async function N5(e){return t5.get(`/pre-test-template/select/${e}`)}async function Kae(e,t){return t5.post(`/pre-test-template/update/${e}`,t)}async function qae(e){return t5.get(`/pre-test-template/delete/${e}`)}async function P5(){return t5.get(`/pre-test-template/default`)}async function Jae(e,t,n){return t5.put(`/hot-opening-replications/tasks/${e}/steps/${t}/video-prompt-schema`,n)}async function Yae(e){return t5.post(`/shot-replications/task-sets`,e)}async function F5(e,t,n){let r=n?`/shot-replications/task-sets?page=${e}&page_size=${t}&keyword=${encodeURIComponent(n)}`:`/shot-replications/task-sets?page=${e}&page_size=${t}`;return t5.get(r)}async function I5(e){return t5.get(`/shot-replications/task-sets/${e}`)}async function Xae(e,t){return t5.post(`/shot-replications/task-sets/${e}/split-by-ai`,t)}async function Zae(e,t){return t5.post(`/shot-replications/task-sets/${e}/split-custom`,t)}async function Qae(e,t=1,n=20){let r=new URLSearchParams;return r.set(`page`,String(t)),r.set(`page_size`,String(n)),t5.get(`/shot-replications/task-sets/${e}/segments?${r.toString()}`)}async function $ae(e,t){return t5.post(`/v2/shot-replications/segments/${e}/replication-projects`,t)}async function L5(e,t){return t===`v2`?t5.get(`/v2/shot-replications/projects/${e}`):t5.get(`/shot-replications/projects/${e}`)}async function eoe(e,t,n){return t5.post(`/v2/shot-replications/projects/${e}/steps/${t}/retry-video-prompt`,n)}async function toe(e,t,n){return t5.put(`/v2/shot-replications/projects/${e}/steps/${t}/video-prompt-schema`,n)}async function noe(e,t){return t5.post(`/v2/shot-replications/projects/${e}/steps/${t}/generate-video`)}async function roe(e,t){return t5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image-prompt`)}async function ioe(e,t,n){return t5.put(`/shot-replications/projects/${e}/steps/${t}/image-prompt`,n)}async function aoe(e,t,n){return t5.put(`/shot-replications/projects/${e}/steps/${t}/video-prompt-schema`,n)}async function R5(e,t,n){return t5.post(`/shot-replications/projects/${e}/steps/${t}/generate-image`,n)}async function ooe(e,t,n){return t5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video-prompt`,n)}async function soe(e,t,n){return t5.post(`/shot-replications/projects/${e}/steps/${t}/generate-video`,n)}async function coe(e){return t5.post(`/shot-replications/task-sets/${e}/reanalyze`)}async function loe(e){await t5.delete(`/shot-replications/segments/${e}`)}async function uoe(e){return t5.post(`/shot-replications/segments/${e}/reanalyze`)}async function doe(e){return t5.post(`/shot-replications/segments/${e}/retry-split`)}async function foe(e){await t5.delete(`/shot-replications/task-sets/${e}`)}async function poe(e,t){if(t===`v2`){await t5.delete(`/v2/hot-opening-replications/tasks/${e}`);return}await t5.delete(`/hot-opening-replications/tasks/${e}`)}async function z5(e){let t=new URLSearchParams;return e?.level&&t.set(`level`,e.level),e?.parent_code&&t.set(`parent_code`,e.parent_code),t5.get(`/pre-test-template/getArea?${t.toString()}`)}async function moe(e){return t5.post(`/upload-material/async-batch-upload`,e)}async function hoe(e){let t=new URLSearchParams;e.status&&t.set(`status`,e.status),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize));let n=t.toString();return t5.get(`/upload-material/upload-history${n?`?${n}`:``}`)}async function B5(e){return t5.post(`/upload-material/batch-update-filename`,e)}async function goe(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.consume_date!==void 0&&t.set(`consume_date`,e.consume_date[0]+`,`+e.consume_date[1]),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),t5.get(`/material-consumption/list?${t.toString()}`)}async function _oe(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.date&&t.set(`date`,e.date),t5.get(`/material-consumption/sync?${t.toString()}`)}async function V5(){return t5.get(`/material-consumption/fields`)}async function voe(e){return t5.post(`/contact/request`,e)}async function yoe(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.material_id&&t.set(`material_id`,e.material_id),e.upload_id&&t.set(`upload_id`,e.upload_id),e.file_name&&t.set(`file_name`,e.file_name),e.resource_type&&t.set(`resource_type`,e.resource_type),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),t5.get(`/resources-material/list?${t.toString()}`)}async function boe(e){return t5.get(`/recent-generations?limit=${e}&modules=project&modules=chat_ai&modules=hot_opening_replicate&modules=shot_replicate`)}async function H5(){return t5.get(`/open-type/open_type_all`)}async function xoe(e){let t=new URLSearchParams;return e.advertiser_id&&t.set(`advertiser_id`,e.advertiser_id),e.oauth_id&&t.set(`oauth_id`,e.oauth_id),e.advertiser_name&&t.set(`advertiser_name`,e.advertiser_name),e.page!==void 0&&t.set(`page`,String(e.page)),e.page_size!==void 0&&t.set(`page_size`,String(e.page_size)),t5.get(`/oauth-account/list?${t.toString()}`)}async function Soe(e){let t=new URLSearchParams;return e.id&&t.set(`id`,e.id),t5.get(`/oauth-account/delete?${t.toString()}`)}async function Coe(){return t5.post(`/upload-material/oauth_account_list`)}async function woe(e){return t5.post(`/resources-material/pre-commit`,e)}async function Toe(){return t5.get(`/home-materials/categories`)}async function U5(e,t=10){return t5.get(`/home-materials?category_id=${e}&limit_per_category=${t}&include_empty_categories=false&response_mode=grouped&page=1&page_size=20`)}async function W5(e){return t5.delete(`/generation-ai/history/batch`,e)}function G5(e={}){let t=new URLSearchParams;e.resourceType&&t.set(`resource_type`,e.resourceType),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize)),e.keyword&&t.set(`keyword`,e.keyword),e.scene&&t.set(`scene`,e.scene);let n=t.toString();return n?`?${n}`:``}async function K5(e={}){return t5.get(`/upload-resources/history${G5(e)}`)}async function q5(e,t={}){return t5.get(`/upload-resources/history/${e}${G5(t)}`)}async function Eoe(e){return t5.delete(`/upload-resources/history/batch`,{resource_ids:e})}async function J5(){return t5.get(`/private-portrait/config`)}async function Y5(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.keyword&&t.set(`keyword`,e.keyword),e.status&&t.set(`status`,e.status),t5.get(`/private-portrait/projects?${t.toString()}`)}async function Doe(e){return t5.post(`/private-portrait/projects`,{name:e.name,description:e.description||null,callback_redirect_url:e.callbackRedirectUrl||null})}async function Ooe(e){await t5.delete(`/private-portrait/projects/${e}`)}async function koe(e){return t5.get(`/private-portrait/validate-sessions/${e}`)}async function Aoe(e,t){return t5.post(`/private-portrait/projects/${e}/assets`,{url:t.url,asset_type:t.assetType||`Image`,name:t.name||null,video_duration:t.videoDuration??null,video_cover_url:t.videoCoverUrl||null,file_size:t.fileSize??null,mime_type:t.mimeType||null,upload_resource_id:t.uploadResourceId||null})}async function joe(e,t={}){let n=new URLSearchParams;return n.set(`page`,String(t.page||1)),n.set(`page_size`,String(t.pageSize||20)),t.status&&n.set(`status`,t.status),t.keyword&&n.set(`keyword`,t.keyword),t.assetType&&n.set(`asset_type`,t.assetType),t5.get(`/private-portrait/projects/${e}/assets?${n.toString()}`)}async function Moe(e){await t5.delete(`/private-portrait/assets/${e}`)}async function Noe(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.projectId&&t.set(`project_id`,e.projectId),e.keyword&&t.set(`keyword`,e.keyword),e.assetType&&t.set(`asset_type`,e.assetType),t5.get(`/private-portrait/selectable-assets?${t.toString()}`)}async function X5(){return t5.get(`/private-portrait/virtual/config`)}async function Z5(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.keyword&&t.set(`keyword`,e.keyword),e.status&&t.set(`status`,e.status),t5.get(`/private-portrait/virtual-projects?${t.toString()}`)}async function Poe(e){return t5.post(`/private-portrait/virtual-projects`,{name:e.name,description:e.description||null})}async function Foe(e){await t5.delete(`/private-portrait/virtual-projects/${e}`)}async function Ioe(e,t){return t5.post(`/private-portrait/virtual-projects/${e}/assets`,{url:t.url,asset_type:t.assetType||`Image`,name:t.name||null,video_duration:t.videoDuration??null,video_cover_url:t.videoCoverUrl||null,file_size:t.fileSize??null,mime_type:t.mimeType||null,upload_resource_id:t.uploadResourceId||null})}async function Loe(e,t={}){let n=new URLSearchParams;return n.set(`page`,String(t.page||1)),n.set(`page_size`,String(t.pageSize||20)),t.status&&n.set(`status`,t.status),t.keyword&&n.set(`keyword`,t.keyword),t.assetType&&n.set(`asset_type`,t.assetType),t5.get(`/private-portrait/virtual-projects/${e}/assets?${n.toString()}`)}async function Roe(e){await t5.delete(`/private-portrait/virtual-assets/${e}`)}async function zoe(e={}){let t=new URLSearchParams;return t.set(`page`,String(e.page||1)),t.set(`page_size`,String(e.pageSize||20)),e.projectId&&t.set(`project_id`,e.projectId),e.keyword&&t.set(`keyword`,e.keyword),e.assetType&&t.set(`asset_type`,e.assetType),t5.get(`/private-portrait/virtual-selectable-assets?${t.toString()}`)}async function Boe(){return t5.get(`/team/managed`)}async function Voe(){return t5.get(`/team/manager-access`)}async function Hoe(e=1,t=20){return t5.get(`/team/members?page=${e}&page_size=${t}`)}async function Uoe(e){await t5.put(`/team/manager`,{user_id:e})}async function Woe(){return t5.get(`/team/subscriptions`)}async function Goe(e,t,n){return t5.post(`/team/subscriptions/${e}/seats`,{user_id:t,monthly_allocated_credits:n})}async function Koe(e,t){return t5.put(`/team/seats/${e}`,{monthly_allocated_credits:t})}async function qoe(e){await t5.delete(`/team/seats/${e}`)}async function Joe(e){let t=new URLSearchParams;return e&&t.set(`subscription_id`,e),t5.get(`/team/member-usage${t.toString()?`?${t.toString()}`:``}`)}async function Yoe(){return t5.get(`/team/manager-history`)}async function Xoe(){return t5.get(`/team/invitations`)}async function Zoe(e,t){return t5.post(`/team/invitations`,{max_uses:e||null,expires_at:t||null})}async function Qoe(e){await t5.delete(`/team/invitations/${e}`)}async function $oe(e){return t5.get(e?`/team/join-requests?status=${encodeURIComponent(e)}`:`/team/join-requests`)}async function Q5(e,t,n){await t5.post(`/team/join-requests/${e}`,{action:t,note:n||null})}async function ese(e){return t5.get(`/team/join-info?code=${encodeURIComponent(e)}`,{auth:!0,skipAuthRedirect:!0})}async function tse(e){return t5.get(`/team/join-info/public?code=${encodeURIComponent(e)}`,!1)}async function nse(e){await t5.post(`/team/join`,{invitation_code:e})}async function rse(e){let t=new URLSearchParams;return e.teamId&&t.set(`team_id`,e.teamId),e.page&&t.set(`page`,String(e.page)),e.pageSize&&t.set(`page_size`,String(e.pageSize)),e.userId&&t.set(`user_id`,e.userId),e.phone&&t.set(`phone`,e.phone),e.subscriptionId&&t.set(`subscription_id`,e.subscriptionId),e.recordType&&t.set(`record_type`,e.recordType),e.startDate&&t.set(`start_date`,e.startDate),e.endDate&&t.set(`end_date`,e.endDate),t5.get(`/team/credit-records?${t.toString()}`)}function ise(e){let t=new URLSearchParams;return e.teamId&&t.set(`team_id`,e.teamId),e.phone&&t.set(`phone`,e.phone),e.subscriptionId&&t.set(`subscription_id`,e.subscriptionId),e.recordType&&t.set(`record_type`,e.recordType),e.startDate&&t.set(`start_date`,e.startDate),e.endDate&&t.set(`end_date`,e.endDate),`https://ceshi.apiforeign.minzhongzc.com/api/team/credit-records/export?${t.toString()}`}async function ase(){return t5.get(`/credit-products/catalog`)}async function ose(e=1,t=20,n){let r=new URLSearchParams({page:String(e),page_size:String(t)});return n&&r.set(`status`,n),t5.get(`/credits/balances?${r.toString()}`)}var $5=G8(e=>({user:null,loading:!0,login:async(t,n,r,i)=>{e({user:await rae(t,n,r,i)})},logout:async()=>{await oae(),e({user:null})},checkAuth:async()=>{try{if(!localStorage.getItem(`auth_token`)){e({user:null,loading:!1});return}e({user:await n5(),loading:!1})}catch(t){(t?.message?.includes(`401`)||t?.message?.includes(`Unauthorized`))&&localStorage.removeItem(`auth_token`),e({user:null,loading:!1})}},changePassword:async(e,t)=>{await r5(e,t)},refreshUser:async()=>{try{e({user:await n5()})}catch(e){console.error(`Failed to refresh user:`,e)}},setUserCredits:t=>{e(e=>e.user?{user:{...e.user,credits:t}}:{})}})),e7={system:{gradient:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,icon:(0,$.jsx)(w8,{}),label:`系统通知`,glowColor:`rgba(99, 102, 241, 0.4)`},credit:{gradient:`linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #ea580c 100%)`,icon:(0,$.jsx)(v8,{}),label:`积分通知`,glowColor:`rgba(245, 158, 11, 0.4)`},promo:{gradient:`linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f43f5e 100%)`,icon:(0,$.jsx)(X4,{}),label:`活动通知`,glowColor:`rgba(139, 92, 246, 0.4)`}},sse=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),o=$5(e=>e.refreshUser),s=$5(e=>e.setUserCredits),c=(0,S.useCallback)(async()=>{try{let n=await m5(1,20,!1),i=n.items||[],o=n?.credits?.balance;if(typeof o==`number`){let e=$5.getState().user;e&&e.credits!==o&&s(o)}r(i),i.length>0&&!e&&(t(!0),a(0))}catch{}},[e,s]);(0,S.useEffect)(()=>{c();let e=setInterval(c,3e4);return()=>clearInterval(e)},[]);let l=async()=>{let e=n[i];if(e)try{await g5(e.id)}catch{}if(i{let e=n[i];if(e)try{await g5(e.id)}catch{}t(!1),r([]),a(0)};if(!e||n.length===0)return null;let d=n[i],f=e7[d.type]||e7.system;return(0,$.jsxs)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,zIndex:9999,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.45)`,backdropFilter:`blur(6px)`},onClick:u,children:[(0,$.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:{width:520,borderRadius:24,overflow:`hidden`,boxShadow:`0 30px 100px rgba(0,0,0,0.2)`,animation:`notificationPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1)`,background:`#ffffff`},children:[(0,$.jsxs)(`div`,{style:{background:f.gradient,padding:`16px 28px 14px`,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:10},children:[(0,$.jsxs)(_Q,{style:{background:`rgba(255,255,255,0.2)`,border:`none`,color:`#fff`,borderRadius:6,padding:`2px 10px`,fontSize:11,fontWeight:500},children:[f.icon,` `,f.label]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),u()},style:{width:28,height:28,borderRadius:`50%`,background:`rgba(255,255,255,0.1)`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,outline:`none`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.2)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.1)`},children:(0,$.jsx)(ju,{style:{color:`#fff`,fontSize:12}})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,gap:12},children:[(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:22,fontWeight:700,letterSpacing:`-0.5px`},children:d.title}),(0,$.jsx)(`div`,{style:{color:`rgba(255,255,255,0.6)`,fontSize:11,whiteSpace:`nowrap`,flexShrink:0},children:d.createdAt?new Date(d.createdAt).toLocaleString(`zh-CN`):``})]})]}),(0,$.jsxs)(`div`,{style:{background:`#ffffff`,padding:`24px 28px 28px`},children:[(0,$.jsx)(`div`,{style:{padding:`18px 20px`,background:`#f8fafc`,borderRadius:16,marginBottom:20,border:`1px solid #f1f5f9`},children:(0,$.jsx)(`div`,{style:{fontSize:14,color:`#475569`,lineHeight:1.7},dangerouslySetInnerHTML:{__html:d.content}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:n.length>1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),a(i>0?i-1:n.length-1)},style:{width:30,height:30,borderRadius:`50%`,background:`#f1f5f9`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`,outline:`none`},onMouseEnter:e=>{e.currentTarget.style.background=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.background=`#f1f5f9`},children:(0,$.jsx)(Uw,{style:{color:`#64748b`,fontSize:12}})}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,fontWeight:500,minWidth:36,textAlign:`center`},children:[i+1,`/`,n.length]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),a(i{e.currentTarget.style.background=`#e2e8f0`},onMouseLeave:e=>{e.currentTarget.style.background=`#f1f5f9`},children:(0,$.jsx)(Bg,{style:{color:`#64748b`,fontSize:12}})})]})}),(0,$.jsx)(X,{type:`primary`,onClick:l,style:{borderRadius:12,fontWeight:600,height:40,background:f.gradient,border:`none`,paddingLeft:28,paddingRight:28,boxShadow:`0 6px 16px ${f.glowColor}`,transition:`all 0.2s ease`,fontSize:14},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 8px 20px ${f.glowColor}`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 6px 16px ${f.glowColor}`},children:`我已知晓`})]})]})]}),(0,$.jsx)(`style`,{children:` @keyframes notificationPop { 0% { opacity: 0; transform: translateY(20px) scale(0.96); } 100% { opacity: 1; transform: translateY(0) scale(1); } } - `})]})},n7=`dismissed_activity_banner_version`,sse=({onVisibilityChange:e})=>{let[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0);return(0,S.useEffect)(()=>{p5().then(t=>{let r=t.siteBanner||``,a=t.siteBannerVersion||0;if(i(a),r){let t=Number(localStorage.getItem(n7)||0){o(!0),e?.(!1)})},[]),a||!t?null:(0,$.jsx)(`div`,{style:{width:`100%`,position:`relative`,background:`linear-gradient(135deg, #f3e8ff 0%, #ede9fe 50%, #e0e7ff 100%)`,borderBottom:`1px solid rgba(139, 92, 246, 0.15)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`8px 40px 8px 16px`,maxWidth:1400,margin:`0 auto`,width:`100%`,boxSizing:`border-box`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,background:`rgba(139, 92, 246, 0.12)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(r6,{style:{color:`#7c3aed`,fontSize:14}})}),(0,$.jsx)(`div`,{style:{color:`#5b21b6`,fontSize:14,fontWeight:500,lineHeight:1.5,textAlign:`center`},dangerouslySetInnerHTML:{__html:t}})]}),(0,$.jsx)(`button`,{onClick:()=>{localStorage.setItem(n7,String(r)),o(!0),e?.(!1)},style:{position:`absolute`,right:8,top:`50%`,transform:`translateY(-50%)`,width:26,height:26,borderRadius:`50%`,background:`rgba(139, 92, 246, 0.1)`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,transition:`all 0.2s ease`,outline:`none`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.1)`},children:(0,$.jsx)(ju,{style:{color:`#7c3aed`,fontSize:11}})})]})})},r7=({data:e})=>{if(!e)return null;let t=(e.limitUnit||`GB`).toUpperCase(),n=t===`GB`?1024**3:t===`MB`?1024**2:1024,r=Number(e.usagePercent)||0,i=Math.min(100,Math.max(0,r)),a=e.limitValue?parseFloat(e.limitValue):e.totalBytes/n,o=a*r/100,s=e.exceeded||r>=100,c=1024**2,l=1024**3,u=1024**4,d=(e=>{let t=Number(e)||0;return t>=u?{val:(t/u).toFixed(2),unit:`TB`}:t>=l?{val:(t/l).toFixed(2),unit:`GB`}:t>=c?{val:(t/c).toFixed(2),unit:`MB`}:{val:(t/1024).toFixed(2),unit:`KB`}})(e.usedBytes);return(0,$.jsxs)(`div`,{style:{marginBottom:12,padding:`0 12px`,paddingTop:6,borderRadius:10,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:6,fontSize:12,color:`#475569`},children:e.enabled?(0,$.jsx)($.Fragment,{}):(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#1e293b`},children:[(0,$.jsx)(h4,{style:{fontSize:12,color:s?`#ef4444`:`#6366f1`,marginRight:4}}),`当前使用 `,d.val,` `,d.unit]})}),e.enabled&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginTop:4,display:`flex`,justifyContent:`space-between`,fontSize:11,color:s?`#ef4444`:`#94a3b8`},children:(0,$.jsxs)(`div`,{style:{height:`100%`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:6,fontSize:12,color:`#000000ff`,padding:`0 8px`},children:[(0,$.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(h4,{style:{fontSize:12,color:`#000000ff`}}),r.toFixed(1),`%`]}),e.enabled?(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#000000ff`},children:[o.toFixed(2),` / `,a.toFixed(2),` `,t]}):(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#1e293b`},children:[`当前使用 `,d.val,` `,d.unit]})]})}),(0,$.jsx)(`div`,{style:{width:`100%`,height:6,background:`#e2e8f0`,borderRadius:50,overflow:`hidden`,position:`relative`},children:(0,$.jsx)(`div`,{style:{width:`${i}%`,height:`100%`,background:r<50?`linear-gradient(90deg, #279951, #b7fad0)`:r<85?`linear-gradient(90deg, #ffd759, #fff6d4)`:`linear-gradient(90deg, #ef4444, #dc2626)`,borderRadius:2,transition:`width 0.4s ease`}})})]})]})},i7={HomeOutlined:(0,$.jsx)(l3,{}),DashboardOutlined:(0,$.jsx)(f4,{}),CodeOutlined:(0,$.jsx)(J2,{}),PlayCircleOutlined:(0,$.jsx)(N6,{}),WalletOutlined:(0,$.jsx)(B8,{}),SettingOutlined:(0,$.jsx)(s8,{}),BellOutlined:(0,$.jsx)(f2,{}),UserOutlined:(0,$.jsx)(F8,{}),AppstoreOutlined:(0,$.jsx)(L0,{}),FileTextOutlined:(0,$.jsx)(TV,{}),StarOutlined:(0,$.jsx)(y8,{}),HeartOutlined:(0,$.jsx)(r3,{}),CameraOutlined:(0,$.jsx)(w2,{}),RobotOutlined:(0,$.jsx)(J6,{}),GiftOutlined:(0,$.jsx)(Z4,{}),ThunderboltOutlined:(0,$.jsx)(T8,{}),CloudOutlined:(0,$.jsx)(z2,{}),SmileOutlined:(0,$.jsx)(m8,{}),TrophyOutlined:(0,$.jsx)(k8,{}),RocketOutlined:(0,$.jsx)(Z6,{}),BulbOutlined:(0,$.jsx)(x2,{}),PictureOutlined:(0,$.jsx)(w6,{}),VideoCameraOutlined:(0,$.jsx)(R8,{}),AudioOutlined:(0,$.jsx)(Q0,{}),MailOutlined:(0,$.jsx)(z3,{}),PhoneOutlined:(0,$.jsx)(v6,{}),GlobalOutlined:(0,$.jsx)(e3,{}),TeamOutlined:(0,$.jsx)(C8,{}),BarChartOutlined:(0,$.jsx)(l2,{}),PieChartOutlined:(0,$.jsx)(D6,{}),LineChartOutlined:(0,$.jsx)(D3,{}),SecurityScanOutlined:(0,$.jsx)(aie,{}),ApiOutlined:(0,$.jsx)(P0,{}),DatabaseOutlined:(0,$.jsx)(h4,{}),CloudServerOutlined:(0,$.jsx)(H2,{})},cse=240,a7=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(GK,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(A4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(o4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(i2,{})}],lse=e=>e>=1e4?a7[3]:e>=5e3?a7[2]:e>=1e3?a7[1]:a7[0],o7={basic:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(GK,{})},starter:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(GK,{})},entry:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(GK,{})},入门:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(GK,{})},基础:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(GK,{})},standard:{gradient:`linear-gradient(135deg, #94a3b8, #64748b)`,shadow:`rgba(148,163,184,0.25)`,icon:(0,$.jsx)(GK,{})},标准:{gradient:`linear-gradient(135deg, #94a3b8, #64748b)`,shadow:`rgba(148,163,184,0.25)`,icon:(0,$.jsx)(GK,{})},advanced:{gradient:`linear-gradient(135deg, #667eea, #5a67d8)`,shadow:`rgba(102,126,234,0.25)`,icon:(0,$.jsx)(l4,{})},高级:{gradient:`linear-gradient(135deg, #667eea, #5a67d8)`,shadow:`rgba(102,126,234,0.25)`,icon:(0,$.jsx)(l4,{})},premium:{gradient:`linear-gradient(135deg, #f6ad55, #dd6b20)`,shadow:`rgba(246,173,85,0.25)`,icon:(0,$.jsx)(l4,{})},pro:{gradient:`linear-gradient(135deg, #f6ad55, #dd6b20)`,shadow:`rgba(246,173,85,0.25)`,icon:(0,$.jsx)(l4,{})},超级:{gradient:`linear-gradient(135deg, #f6ad55, #dd6b20)`,shadow:`rgba(246,173,85,0.25)`,icon:(0,$.jsx)(l4,{})},enterprise:{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(l4,{})},vip:{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(i2,{})},default:{gradient:`linear-gradient(135deg, #94a3b8, #64748b)`,shadow:`rgba(148,163,184,0.25)`,icon:(0,$.jsx)(GK,{})}},use=[{key:`points-validity`,label:`积分有效期规则`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`1、会员积分:月卡与年卡的积分配额均按月发放,自到账起 31 天内有效,到期自动重置(上周期未使用积分清零 + 下发下周期度积分);`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`2、充值通用积分:自到账起 2 年内有效,到期清零,不退不换;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`3、模型专属积分有效期升级:2026年8月7日(含)起购买,有效期为2年;此前购买,有效期为6个月。有效期自积分到账之日起计算,到期清零,不退不换;`}),(0,$.jsx)(`p`,{style:{margin:0},children:`4、每日登录积分:赠送 20 积分,仅限当日使用,次日自动清零。`})]})},{key:`refund-rules`,label:`会员&积分 退款规则`,children:(0,$.jsx)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:(0,$.jsx)(`p`,{style:{margin:0},children:`会员与积分属于虚拟数字商品,开通后权益即时生效,因此一经购买不支持任何理由的退款或转让。建议您在支付前确认所选内容,如遇重复扣款或系统异常,请联系客服,我们会尽快为您处理。感谢理解 💛`})})},{key:`points-return`,label:`积分返还规则`,children:(0,$.jsx)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:(0,$.jsx)(`p`,{style:{margin:0},children:`若生成分成失败,被扣的对应积分将在 2 小时内返还至原账户,在「积分明细页」原消耗记录条目中会展示"任务生成失败,积分已返还"提示。因个别原因导致延迟或未返还的情况,可联系平台客服进行处理。`})})},{key:`points-consumption`,label:`积分消耗顺序`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,color:`#475569`,fontWeight:500},children:`积分消耗顺序规则:分为平台默认顺序、用户自定义顺序。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`1、平台默认消耗顺序:免费积分 > 模型专享积分 > 订阅会员积分 > 通用充值类积分;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,paddingLeft:12},children:`其中,免费积分包含 赠送的TV专属积分、赠送的指定模型专享积分、每日登录奖励积分等。若同一类型中的积分包含多个细分子类型,子类型之间的消耗顺序按到期时间,优先消耗早到期的;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`2、自定义积分消耗顺序:用户可在「个人中心-充值入口」、「模型购买页面」、「积分明细页」自主设置积分的消耗顺序。`}),(0,$.jsx)(`p`,{style:{margin:0,color:`#ef4444`},children:`特别注意:模型赠送的限时免费生成次数,会优先于积分被最先使用。`})]})},{key:`get-more-points`,label:`如何获取更多积分`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`若当前积分不足,可通过以下方式补充:`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`- 升级会员:购买后立即生效,积分即时到账;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`- 单独充值通用积分:按需购买,灵活补充;`}),(0,$.jsx)(`p`,{style:{margin:0},children:`- 单独充值模型专享积分:随用随充,性价比高,适用于对特定模型重度使用的用户。`})]})},{key:`installment`,label:`关于分期支付`,children:(0,$.jsx)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:(0,$.jsx)(`p`,{style:{margin:0},children:`部分商品支持花呗分期,目前分期产生的利息由平台承担,用户限时享受0利息。使用分期支付的商品不支持退款,如有逾期还款或产生退费,平台将收取相应费用。`})})},{key:`invoice`,label:`发票申请与联系方式`,children:(0,$.jsx)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:(0,$.jsx)(`p`,{style:{margin:0},children:`发票可在「订阅与开票」→「购买记录」中自助申请。如需企业合作,请联系客服;其他问题欢迎前往"帮助中心"查询。`})})},{key:`price-protection`,label:`会员权益7天保护计划`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`7天内购买的会员,若遇同档位会员有新活动,且赠品力度更高,可申请按差额补发赠品。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`1、保护范围:指定模型的免费生成次数、专享积分赠送(会员)。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`2、保护条件:支付成功 ≤7 天,且会员仍在有效期内,仅限同档位、同周期、同类型赠品。每笔订单针对同一模型赠品,仅限申请 1 次;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3、权益有效期:补发的权益与原会员同效期,到期未自动清零,不可退款、转让。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`4、不参与保护范围:会员订单价格本身(即不退会员差价);已下线/已结束的活动;通过平台赠送、邀请奖励等非现金方式开通的会员;`}),(0,$.jsx)(`p`,{style:{margin:0},children:`5、特别注意:如未在保护有效期内主动领取保护权益,过期将不会补发;Happy Horse 1.0模型不参与保护。`})]})},{key:`free-points`,label:`免积分畅享卡 优惠活动如何执行的?`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`免积分权益可让您在权益有效期内,使用对应模型生成不消耗积分,同一模型同时最多运行 1 个免积分任务,高峰期生成可能排队,排队时间受到使用人数、高峰时段、模型后台资源情况、用户当日已生成数量等多种因素有关。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`,color:`#475569`,fontWeight:500},children:`具体规则如下:`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`- 独立于订阅周期:免限权益按固定期限计算,与订阅周期无关。无论订阅自动续费、取消还是重新开通,都不会重置或延长该权益的有效期。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`- 有效期内升级套餐:如果您在免积分权益仍然有效期内升级套餐,将立即解锁更高等级套餐对应的模型能力,并刷新您的有效期。`}),(0,$.jsx)(`p`,{style:{margin:0},children:`- 合理使用与系统保护:免积分权益仅支持真人手动操作,暂不支持 CLI 和其他自动化脚本等生成。为了保障 GPU 集群稳定运行,如检测到自动化脚本、机器人操作或非真人高频使用行为,系统可能会暂时暂停您的权限进行审核。确认是真人创作者后,将恢复访问权限。`})]})}],dse=()=>{let e=Ye(),t=Ke(),{user:n,logout:r,refreshUser:i}=e7(),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d]=mH.useForm(),[f]=mH.useForm(),[p,m]=(0,S.useState)(null),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)([]),[y,b]=(0,S.useState)([]),[x,C]=(0,S.useState)([]),[w,T]=(0,S.useState)(`personal`),[E,D]=(0,S.useState)([]),O=(0,S.useCallback)(async()=>{try{let e=await ise(),t=(e.subscriptionProducts||[]).filter(e=>e.isActive),n=(e.teamSubscriptionProducts||[]).filter(e=>e.isActive);b(t),C(n),v((e.creditAddons||[]).filter(e=>e.isActive)),D(e.activePersonalSubscriptions||[]),n.length===0&&T(`personal`)}catch{b([]),C([]),v([]),D([]),T(`personal`)}},[]),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(`monthly`),N=(w===`team`?x:y).filter(e=>e.billingCycle===j).sort((e,t)=>(e.tierRank||0)-(t.tierRank||0)),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(`alipay`),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(180),H=(0,S.useRef)(null),U=(0,S.useRef)(null),ee=(0,S.useRef)(null),[W,te]=(0,S.useState)({alipay:!1,wechat:!1}),[G,ne]=(0,S.useState)(null),[K,re]=(0,S.useState)(null),[ie,ae]=(0,S.useState)(1),[q,oe]=(0,S.useState)(!1),[se,ce]=(0,S.useState)(`alipay`),[le]=mH.useForm(),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)(!1),ge=(0,S.useCallback)(async()=>{if(!(fe||me)){he(!0);try{pe(await Mae())}catch{pe({hasAccount:!1,account:null})}finally{he(!1)}}},[fe,me]),_e=`pending_payment_order`,[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(!1),[Se,Ce]=(0,S.useState)(!1),[we]=mH.useForm(),[Te,Ee]=(0,S.useState)(!1),[De,Oe]=(0,S.useState)(()=>({x:24,y:window.innerHeight*.75})),[ke,Ae]=(0,S.useState)(!1),je=(0,S.useRef)(!1),Me=(0,S.useRef)({x:0,y:0}),[Ne,Pe]=(0,S.useState)({}),[Fe,Ie]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[Le,Re]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[ze,Be]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[Ve,He]=(0,S.useState)(!1),[Ue,We]=(0,S.useState)(null),[Ge,qe]=(0,S.useState)(!1),[Je,Xe]=(0,S.useState)(``);(0,S.useEffect)(()=>{let t=()=>{localStorage.removeItem(`token`),e(`/login?kicked_out=1`)};return window.addEventListener(`kicked-out`,t),()=>window.removeEventListener(`kicked-out`,t)},[e]),(0,S.useEffect)(()=>{p5().then(e=>{let t=e.siteName||`智创`,n=e.siteLogo||``;if(t!==Fe&&(Ie(t),document.title=t),n&&n!==Le){Re(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e));let t=n.startsWith(`http`)||n.startsWith(`data:`)?n:`https://ceshi.apiforeign.minzhongzc.com${n.startsWith(`/`)?``:`/`}${n}`;e.href=t,e.type=`image/png`}e.operationManual&&Xe(e.operationManual),localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{}),r5().then(e=>{let t=e?.resourceCapacity;t&&We({enabled:!!t.enabled,usedBytes:Number(t.usedBytes)||0,totalBytes:Number(t.totalBytes)||0,availableBytes:Number(t.availableBytes)||0,usagePercent:Number(t.usagePercent)||0,exceeded:!!t.exceeded,limitValue:t.limitValue??``,limitUnit:t.limitUnit||`GB`})}).catch(()=>{})},[]),(0,S.useEffect)(()=>{let e=()=>qe(window.innerWidth<=767);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let Ze=e=>{e.button===0&&(Ae(!0),je.current=!1,Me.current={x:e.clientX,y:e.clientY})},Qe=e=>{if(!ke)return;let t=Math.abs(e.clientX-Me.current.x),n=Math.abs(e.clientY-Me.current.y);(t>5||n>5)&&(je.current=!0);let r=Math.max(60,Math.min(window.innerHeight-60,e.clientY-(Me.current.y-De.y)));Oe(e=>({x:e.x,y:r}))},$e=()=>{let e=je.current;Ae(!1),je.current=!1,e||c(!0)};(0,S.useEffect)(()=>{if(ke)return document.addEventListener(`mousemove`,Qe),document.addEventListener(`mouseup`,$e),()=>{document.removeEventListener(`mousemove`,Qe),document.removeEventListener(`mouseup`,$e)}},[ke]);let et=()=>{g5().then(e=>{ye(e)}).catch(()=>{})};(0,S.useEffect)(()=>{wae().then(e=>{g(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),O(),Tae().then(e=>{te(e),e.alipay?L(`alipay`):e.wechat&&L(`wechat`)}).catch(()=>{})},[]),(0,S.useEffect)(()=>{n&&et()},[n?.id,n?.credits]),(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(_e);if(e)try{let t=JSON.parse(e),n=await x5(t.orderNo);if(n.status===`pending`){ne({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method,title:t.title||`会员服务`}),ee.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(F(!0),ht(t.orderNo,a)):localStorage.removeItem(_e)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),e7.getState().refreshUser(),localStorage.removeItem(_e)):localStorage.removeItem(_e)}catch{localStorage.removeItem(_e)}})()},[]);let tt=t.pathname.startsWith(`/records`)?`/records`:t.pathname,nt=cse,rt={};h.forEach(e=>{let t=e.parent_id??e.parentId;t&&(rt[t]||(rt[t]=[]),rt[t].push(e))});let it=h.filter(e=>!(e.parent_id??e.parentId));it.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0)),Object.keys(rt).forEach(e=>{rt[e].sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0))});let at=t=>{let n=t.menu_type??t.menuType,r=rt[t.id]&&rt[t.id].length>0;n===`group`||r?Pe(e=>({...e,[t.id]:!e[t.id]})):t.path&&(e(t.path),xe(!1))},ot=[{key:`profile`,icon:(0,$.jsx)(F8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(B8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},...n?.isTeamManager?[{key:`teamManagement`,icon:(0,$.jsx)(C8,{style:{color:`#6366f1`}}),label:`团队管理`}]:[],{key:`myCredits`,icon:(0,$.jsx)(B8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(TV,{}),label:`订单记录`},{key:`invoice`,icon:(0,$.jsx)(I6,{}),label:`申请开票`},{key:`messages`,icon:(0,$.jsx)(f2,{}),label:`消息中心${ve>0?`(${ve})`:``}`},...Je?[{key:`manual`,icon:(0,$.jsx)(TV,{}),label:`操作手册`}]:[],{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(A3,{}),label:`个人信息`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(I3,{}),label:`退出登录`,danger:!0}],st=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?o(!0):t===`messages`?e(`/messages`):t===`recharge`?u(!0):t===`teamManagement`?e(`/team-management`):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`?e(`/user-center?tab=orders`):t===`invoice`?e(`/invoice`):t===`manual`&&window.open(Je,`_blank`)},ct=async()=>{try{let e=await d.validateFields();await i5(e.oldPwd,e.newPwd),Z.success(`密码修改成功`),o(!1),d.resetFields()}catch(e){e?.response?.data?.detail?Z.error(e.response.data.detail):e?.message&&Z.error(e.message)}},lt=async()=>{try{let e=await oae((await f.validateFields()).username);Z.success(e.message||`操作成功`),await i(),r5().then(e=>{let t=e?.resourceCapacity;t&&We({enabled:!!t.enabled,usedBytes:Number(t.usedBytes)||0,totalBytes:Number(t.totalBytes)||0,availableBytes:Number(t.availableBytes)||0,usagePercent:Number(t.usagePercent)||0,exceeded:!!t.exceeded,limitValue:t.limitValue??``,limitUnit:t.limitUnit||`GB`})}).catch(()=>{}),o(!1),f.resetFields()}catch(e){e?.response?.data?.message?Z.error(e.response.data.message):e?.response?.data?.detail?Z.error(e.response.data.detail):e?.message&&Z.error(e.message)}},ut=()=>{r(),e(`/login`)},dt=(0,S.useCallback)(()=>{H.current&&=(clearInterval(H.current),null),U.current&&=(clearInterval(U.current),null)},[]),ft=(0,S.useCallback)(async(e,t)=>{if(!W.alipay&&!W.wechat){Z.error(`暂无可用支付方式`);return}re({id:e,product:t}),ae(t.productType===`team_subscription`?2:1),oe(!1),ce(`alipay`),le.resetFields(),ne(null),A(!1),F(!0)},[W]),pt=(0,S.useCallback)(async()=>{if(K){z(!0);try{let{id:e,product:t}=K,n=await y5(e,I,ie),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url,i=Number(n.amount??t.currentPrice??t.price??0),a=Number(t.grantCredits||t.monthlyGrantCredits||0)*(t.productType===`team_subscription`?ie:1),o=t.regularPrice,s={monthly:`月套餐`,quarterly:`季套餐`,yearly:`年套餐`},c=!!t.billingCycle,l=t.billingCycle?s[t.billingCycle]:``,u=t.name||`积分充值`,d=c?`${u} ${l}`:u,f={price:i,credits:a,qrCode:r,method:n.paymentMethod,title:d,originalPrice:o?Number(o):void 0,discountAmount:o?Number(o)-i:void 0,tierName:u,periodLabel:l,isSubscription:c};(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(ne(f),oe(!0),ee.current=n.orderNo,localStorage.setItem(_e,JSON.stringify({orderNo:n.orderNo,...f,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),ht(n.orderNo)):(Z.success(`购买成功,积分已到账`),await e7.getState().refreshUser(),await O(),m(null),F(!1),re(null))}catch(e){Z.error(e?.message||`创建订单失败`)}finally{z(!1)}}},[K,I,ie]),mt=(0,S.useCallback)(async()=>{if(K)try{await le.validateFields(),de(!0);let{id:e,product:t}=K,n=await y5(e,`corporate`),r=Number(n.amount??t.currentPrice??t.price??0),i=Number(t.grantCredits||t.monthlyGrantCredits||0),a=t.regularPrice,o={monthly:`月套餐`,quarterly:`季套餐`,yearly:`年套餐`},s=!!t.billingCycle,c=t.billingCycle?o[t.billingCycle]:``,l=t.name||`积分充值`;ne({price:r,credits:i,qrCode:``,method:`corporate`,title:s?`${l} ${c}`:l,originalPrice:a?Number(a):void 0,tierName:l,periodLabel:c,isSubscription:s}),Z.success(`已提交对公转账信息,客服将在1-3个工作日内审核到账`),F(!1),re(null),le.resetFields(),await e7.getState().refreshUser(),await O()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`提交失败,请重试`)}finally{de(!1)}},[K,le]),ht=(0,S.useCallback)((e,t=180)=>{dt(),V(t),H.current=setInterval(async()=>{try{let t=await x5(e);t.status===`paid`?(dt(),ee.current=null,localStorage.removeItem(_e),Z.success(`支付成功!积分已到账`),e7.getState().refreshUser(),O(),F(!1),ne(null),m(null)):t.status===`cancelled`&&(dt(),ee.current=null,localStorage.removeItem(_e))}catch{}},2e3),U.current=setInterval(()=>{V(e=>e<=1?(dt(),ee.current&&=(S5(ee.current).catch(()=>{}),null),localStorage.removeItem(_e),Z.warning(`订单已超时,请重新充值`),F(!1),ne(null),m(null),0):e-1)},1e3)},[O,dt]),gt=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await we.validateFields();Ee(!0),await _oe({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),c(!1),we.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{Ee(!1)}},_t=(t,n=0)=>{let r=t.path===tt,i=i7[t.icon]||(0,$.jsx)(l3,{}),a=rt[t.id]&&rt[t.id].length>0,o=(t.menu_type??t.menuType)===`group`;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{onClick:()=>{!(o||a)&&t.path&&e(t.path)},style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:10,padding:n>0?`6px 12px 6px 32px`:`6px 14px`,borderRadius:12,margin:`1px 4px`,cursor:o||a?`default`:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:o?`#94a3b8`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},onMouseEnter:e=>{!o&&!r&&!(o||a)&&(e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:[!o&&(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`,flex:1,textAlign:`left`,fontWeight:o||r?600:400,fontSize:o?12:n>0?13:14,textTransform:o?`uppercase`:`none`,letterSpacing:o?.5:0},children:t.label})]}),(o||a)&&(0,$.jsx)(`div`,{style:{overflow:`hidden`},children:(rt[t.id]||[]).map(e=>_t(e,n+1))})]},t.id)};return(0,$.jsxs)(iW,{style:{height:`100vh`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,$.jsx)(sse,{onVisibilityChange:e=>He(e)}),(0,$.jsxs)(`div`,{style:{display:`flex`,position:`relative`,padding:4,gap:12,flex:1,minHeight:0,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:nt,position:`sticky`,top:4,alignSelf:`flex-start`,zIndex:100,height:`100%`,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,cursor:`pointer`},onClick:()=>{e(`/home`)},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:Le?(0,$.jsx)(`img`,{src:Le,alt:`logo`,style:{width:36,height:36,objectFit:`contain`}}):(0,$.jsx)(T8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:Fe})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:it.map(e=>_t(e))}),(0,$.jsxs)(`div`,{onClick:()=>u(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(VI,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(r7,{data:Ue}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0,paddingTop:0},children:(0,$.jsx)(SV,{menu:{items:ot,onClick:st},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{className:`user-card-container`,style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,borderRadius:14,cursor:`pointer`,transition:`all 0.35s cubic-bezier(0.4,0,0.2,1)`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255,255,255,0.8)`,position:`relative`,border:`1px solid rgba(99, 102, 241, 0.15)`,animation:`cardBreath 3s ease-in-out infinite`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 8px 24px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255,255,255,0.9)`,e.currentTarget.style.transform=`translateY(-3px) scale(1.01)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.4)`,e.currentTarget.style.animation=`none`,e.currentTarget.querySelector(`.user-card-arrow`)?.classList.add(`arrow-hover`)},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255,255,255,0.8)`,e.currentTarget.style.transform=`translateY(0) scale(1)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.15)`,e.currentTarget.style.animation=`cardBreath 3s ease-in-out infinite`,e.currentTarget.querySelector(`.user-card-arrow`)?.classList.remove(`arrow-hover`)},children:[(0,$.jsx)(`div`,{className:`user-card-glow`,style:{position:`absolute`,inset:-4,borderRadius:18,background:`linear-gradient(90deg, transparent 0%, rgba(99,102,241,0.15) 25%, rgba(139,92,246,0.15) 50%, rgba(99,102,241,0.15) 75%, transparent 100%)`,backgroundSize:`200% 100%`,opacity:.8,animation:`borderShimmer 2.5s linear infinite`,pointerEvents:`none`}}),(0,$.jsx)(Hw,{size:36,icon:(0,$.jsx)(F8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`,transition:`all 0.35s cubic-bezier(0.4,0,0.2,1)`,position:`relative`,zIndex:1,animation:`avatarPulse 2s ease-in-out infinite`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,position:`relative`,zIndex:1},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:16,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:14,fontWeight:500,letterSpacing:0,borderRadius:6,display:`inline-block`,animation:`creditGlow 1.5s ease-in-out infinite`},children:[`积分: `,n?.credits||0]})]}),(0,$.jsx)(`div`,{className:`user-card-arrow`,style:{fontSize:12,color:`#6366f1`,flexShrink:0,position:`relative`,zIndex:1},children:(0,$.jsx)(G3,{})}),(0,$.jsx)(`style`,{children:` + `})]})},t7=`dismissed_activity_banner_version`,cse=({onVisibilityChange:e})=>{let[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0);return(0,S.useEffect)(()=>{f5().then(t=>{let r=t.siteBanner||``,a=t.siteBannerVersion||0;if(i(a),r){let t=Number(localStorage.getItem(t7)||0){o(!0),e?.(!1)})},[]),a||!t?null:(0,$.jsx)(`div`,{style:{width:`100%`,position:`relative`,background:`linear-gradient(135deg, #f3e8ff 0%, #ede9fe 50%, #e0e7ff 100%)`,borderBottom:`1px solid rgba(139, 92, 246, 0.15)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`8px 40px 8px 16px`,maxWidth:1400,margin:`0 auto`,width:`100%`,boxSizing:`border-box`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,background:`rgba(139, 92, 246, 0.12)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(n6,{style:{color:`#7c3aed`,fontSize:14}})}),(0,$.jsx)(`div`,{style:{color:`#5b21b6`,fontSize:14,fontWeight:500,lineHeight:1.5,textAlign:`center`},dangerouslySetInnerHTML:{__html:t}})]}),(0,$.jsx)(`button`,{onClick:()=>{localStorage.setItem(t7,String(r)),o(!0),e?.(!1)},style:{position:`absolute`,right:8,top:`50%`,transform:`translateY(-50%)`,width:26,height:26,borderRadius:`50%`,background:`rgba(139, 92, 246, 0.1)`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,transition:`all 0.2s ease`,outline:`none`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.1)`},children:(0,$.jsx)(ju,{style:{color:`#7c3aed`,fontSize:11}})})]})})},n7=({data:e})=>{if(!e)return null;let t=(e.limitUnit||`GB`).toUpperCase(),n=t===`GB`?1024**3:t===`MB`?1024**2:1024,r=Number(e.usagePercent)||0,i=Math.min(100,Math.max(0,r)),a=e.limitValue?parseFloat(e.limitValue):e.totalBytes/n,o=a*r/100,s=e.exceeded||r>=100,c=1024**2,l=1024**3,u=1024**4,d=(e=>{let t=Number(e)||0;return t>=u?{val:(t/u).toFixed(2),unit:`TB`}:t>=l?{val:(t/l).toFixed(2),unit:`GB`}:t>=c?{val:(t/c).toFixed(2),unit:`MB`}:{val:(t/1024).toFixed(2),unit:`KB`}})(e.usedBytes);return(0,$.jsxs)(`div`,{style:{marginBottom:12,padding:`0 12px`,paddingTop:6,borderRadius:10,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04)`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:6,fontSize:12,color:`#475569`},children:e.enabled?(0,$.jsx)($.Fragment,{}):(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#1e293b`},children:[(0,$.jsx)(m4,{style:{fontSize:12,color:s?`#ef4444`:`#6366f1`,marginRight:4}}),`当前使用 `,d.val,` `,d.unit]})}),e.enabled&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginTop:4,display:`flex`,justifyContent:`space-between`,fontSize:11,color:s?`#ef4444`:`#94a3b8`},children:(0,$.jsxs)(`div`,{style:{height:`100%`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:6,fontSize:12,color:`#000000ff`,padding:`0 8px`},children:[(0,$.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(m4,{style:{fontSize:12,color:`#000000ff`}}),r.toFixed(1),`%`]}),e.enabled?(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#000000ff`},children:[o.toFixed(2),` / `,a.toFixed(2),` `,t]}):(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#1e293b`},children:[`当前使用 `,d.val,` `,d.unit]})]})}),(0,$.jsx)(`div`,{style:{width:`100%`,height:6,background:`#e2e8f0`,borderRadius:50,overflow:`hidden`,position:`relative`},children:(0,$.jsx)(`div`,{style:{width:`${i}%`,height:`100%`,background:r<50?`linear-gradient(90deg, #279951, #b7fad0)`:r<85?`linear-gradient(90deg, #ffd759, #fff6d4)`:`linear-gradient(90deg, #ef4444, #dc2626)`,borderRadius:2,transition:`width 0.4s ease`}})})]})]})},r7={HomeOutlined:(0,$.jsx)(c3,{}),DashboardOutlined:(0,$.jsx)(d4,{}),CodeOutlined:(0,$.jsx)(q2,{}),PlayCircleOutlined:(0,$.jsx)(M6,{}),WalletOutlined:(0,$.jsx)(z8,{}),SettingOutlined:(0,$.jsx)(o8,{}),BellOutlined:(0,$.jsx)(d2,{}),UserOutlined:(0,$.jsx)(P8,{}),AppstoreOutlined:(0,$.jsx)(I0,{}),FileTextOutlined:(0,$.jsx)(wV,{}),StarOutlined:(0,$.jsx)(v8,{}),HeartOutlined:(0,$.jsx)(n3,{}),CameraOutlined:(0,$.jsx)(C2,{}),RobotOutlined:(0,$.jsx)(q6,{}),GiftOutlined:(0,$.jsx)(X4,{}),ThunderboltOutlined:(0,$.jsx)(w8,{}),CloudOutlined:(0,$.jsx)(R2,{}),SmileOutlined:(0,$.jsx)(p8,{}),TrophyOutlined:(0,$.jsx)(O8,{}),RocketOutlined:(0,$.jsx)(X6,{}),BulbOutlined:(0,$.jsx)(b2,{}),PictureOutlined:(0,$.jsx)(C6,{}),VideoCameraOutlined:(0,$.jsx)(L8,{}),AudioOutlined:(0,$.jsx)(Z0,{}),MailOutlined:(0,$.jsx)(R3,{}),PhoneOutlined:(0,$.jsx)(_6,{}),GlobalOutlined:(0,$.jsx)($4,{}),TeamOutlined:(0,$.jsx)(S8,{}),BarChartOutlined:(0,$.jsx)(c2,{}),PieChartOutlined:(0,$.jsx)(E6,{}),LineChartOutlined:(0,$.jsx)(E3,{}),SecurityScanOutlined:(0,$.jsx)(oie,{}),ApiOutlined:(0,$.jsx)(N0,{}),DatabaseOutlined:(0,$.jsx)(m4,{}),CloudServerOutlined:(0,$.jsx)(V2,{})},lse=240,i7=[{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(WK,{})},{gradient:`linear-gradient(135deg, #4a5568, #2d3748)`,shadow:`rgba(74,85,104,0.25)`,icon:(0,$.jsx)(k4,{})},{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(a4,{})},{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(r2,{})}],use=e=>e>=1e4?i7[3]:e>=5e3?i7[2]:e>=1e3?i7[1]:i7[0],a7={basic:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(WK,{})},starter:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(WK,{})},entry:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(WK,{})},入门:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(WK,{})},基础:{gradient:`linear-gradient(135deg, #c9a96e, #a67c52)`,shadow:`rgba(201,169,110,0.25)`,icon:(0,$.jsx)(WK,{})},standard:{gradient:`linear-gradient(135deg, #94a3b8, #64748b)`,shadow:`rgba(148,163,184,0.25)`,icon:(0,$.jsx)(WK,{})},标准:{gradient:`linear-gradient(135deg, #94a3b8, #64748b)`,shadow:`rgba(148,163,184,0.25)`,icon:(0,$.jsx)(WK,{})},advanced:{gradient:`linear-gradient(135deg, #667eea, #5a67d8)`,shadow:`rgba(102,126,234,0.25)`,icon:(0,$.jsx)(c4,{})},高级:{gradient:`linear-gradient(135deg, #667eea, #5a67d8)`,shadow:`rgba(102,126,234,0.25)`,icon:(0,$.jsx)(c4,{})},premium:{gradient:`linear-gradient(135deg, #f6ad55, #dd6b20)`,shadow:`rgba(246,173,85,0.25)`,icon:(0,$.jsx)(c4,{})},pro:{gradient:`linear-gradient(135deg, #f6ad55, #dd6b20)`,shadow:`rgba(246,173,85,0.25)`,icon:(0,$.jsx)(c4,{})},超级:{gradient:`linear-gradient(135deg, #f6ad55, #dd6b20)`,shadow:`rgba(246,173,85,0.25)`,icon:(0,$.jsx)(c4,{})},enterprise:{gradient:`linear-gradient(135deg, #718096, #4a5568)`,shadow:`rgba(113,128,150,0.25)`,icon:(0,$.jsx)(c4,{})},vip:{gradient:`linear-gradient(135deg, #5a67d8, #434190)`,shadow:`rgba(90,103,216,0.25)`,icon:(0,$.jsx)(r2,{})},default:{gradient:`linear-gradient(135deg, #94a3b8, #64748b)`,shadow:`rgba(148,163,184,0.25)`,icon:(0,$.jsx)(WK,{})}},dse=[{key:`points-validity`,label:`积分有效期规则`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`1、会员积分:月卡与年卡的积分配额均按月发放,自到账起 31 天内有效,到期自动重置(上周期未使用积分清零 + 下发下周期度积分);`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`2、充值通用积分:自到账起 2 年内有效,到期清零,不退不换;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`3、模型专属积分有效期升级:2026年8月7日(含)起购买,有效期为2年;此前购买,有效期为6个月。有效期自积分到账之日起计算,到期清零,不退不换;`}),(0,$.jsx)(`p`,{style:{margin:0},children:`4、每日登录积分:赠送 20 积分,仅限当日使用,次日自动清零。`})]})},{key:`refund-rules`,label:`会员&积分 退款规则`,children:(0,$.jsx)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:(0,$.jsx)(`p`,{style:{margin:0},children:`会员与积分属于虚拟数字商品,开通后权益即时生效,因此一经购买不支持任何理由的退款或转让。建议您在支付前确认所选内容,如遇重复扣款或系统异常,请联系客服,我们会尽快为您处理。感谢理解 💛`})})},{key:`points-return`,label:`积分返还规则`,children:(0,$.jsx)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:(0,$.jsx)(`p`,{style:{margin:0},children:`若生成分成失败,被扣的对应积分将在 2 小时内返还至原账户,在「积分明细页」原消耗记录条目中会展示"任务生成失败,积分已返还"提示。因个别原因导致延迟或未返还的情况,可联系平台客服进行处理。`})})},{key:`points-consumption`,label:`积分消耗顺序`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,color:`#475569`,fontWeight:500},children:`积分消耗顺序规则:分为平台默认顺序、用户自定义顺序。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`1、平台默认消耗顺序:免费积分 > 模型专享积分 > 订阅会员积分 > 通用充值类积分;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,paddingLeft:12},children:`其中,免费积分包含 赠送的TV专属积分、赠送的指定模型专享积分、每日登录奖励积分等。若同一类型中的积分包含多个细分子类型,子类型之间的消耗顺序按到期时间,优先消耗早到期的;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`2、自定义积分消耗顺序:用户可在「个人中心-充值入口」、「模型购买页面」、「积分明细页」自主设置积分的消耗顺序。`}),(0,$.jsx)(`p`,{style:{margin:0,color:`#ef4444`},children:`特别注意:模型赠送的限时免费生成次数,会优先于积分被最先使用。`})]})},{key:`get-more-points`,label:`如何获取更多积分`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`若当前积分不足,可通过以下方式补充:`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`- 升级会员:购买后立即生效,积分即时到账;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`- 单独充值通用积分:按需购买,灵活补充;`}),(0,$.jsx)(`p`,{style:{margin:0},children:`- 单独充值模型专享积分:随用随充,性价比高,适用于对特定模型重度使用的用户。`})]})},{key:`installment`,label:`关于分期支付`,children:(0,$.jsx)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:(0,$.jsx)(`p`,{style:{margin:0},children:`部分商品支持花呗分期,目前分期产生的利息由平台承担,用户限时享受0利息。使用分期支付的商品不支持退款,如有逾期还款或产生退费,平台将收取相应费用。`})})},{key:`invoice`,label:`发票申请与联系方式`,children:(0,$.jsx)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:(0,$.jsx)(`p`,{style:{margin:0},children:`发票可在「订阅与开票」→「购买记录」中自助申请。如需企业合作,请联系客服;其他问题欢迎前往"帮助中心"查询。`})})},{key:`price-protection`,label:`会员权益7天保护计划`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`7天内购买的会员,若遇同档位会员有新活动,且赠品力度更高,可申请按差额补发赠品。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`1、保护范围:指定模型的免费生成次数、专享积分赠送(会员)。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`2、保护条件:支付成功 ≤7 天,且会员仍在有效期内,仅限同档位、同周期、同类型赠品。每笔订单针对同一模型赠品,仅限申请 1 次;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3、权益有效期:补发的权益与原会员同效期,到期未自动清零,不可退款、转让。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`4、不参与保护范围:会员订单价格本身(即不退会员差价);已下线/已结束的活动;通过平台赠送、邀请奖励等非现金方式开通的会员;`}),(0,$.jsx)(`p`,{style:{margin:0},children:`5、特别注意:如未在保护有效期内主动领取保护权益,过期将不会补发;Happy Horse 1.0模型不参与保护。`})]})},{key:`free-points`,label:`免积分畅享卡 优惠活动如何执行的?`,children:(0,$.jsxs)(`div`,{style:{color:`#64748b`,lineHeight:1.8,fontSize:13},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`免积分权益可让您在权益有效期内,使用对应模型生成不消耗积分,同一模型同时最多运行 1 个免积分任务,高峰期生成可能排队,排队时间受到使用人数、高峰时段、模型后台资源情况、用户当日已生成数量等多种因素有关。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`,color:`#475569`,fontWeight:500},children:`具体规则如下:`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`- 独立于订阅周期:免限权益按固定期限计算,与订阅周期无关。无论订阅自动续费、取消还是重新开通,都不会重置或延长该权益的有效期。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`- 有效期内升级套餐:如果您在免积分权益仍然有效期内升级套餐,将立即解锁更高等级套餐对应的模型能力,并刷新您的有效期。`}),(0,$.jsx)(`p`,{style:{margin:0},children:`- 合理使用与系统保护:免积分权益仅支持真人手动操作,暂不支持 CLI 和其他自动化脚本等生成。为了保障 GPU 集群稳定运行,如检测到自动化脚本、机器人操作或非真人高频使用行为,系统可能会暂时暂停您的权限进行审核。确认是真人创作者后,将恢复访问权限。`})]})}],fse=()=>{let e=Ye(),t=Ke(),{user:n,logout:r,refreshUser:i}=$5(),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d]=pH.useForm(),[f]=pH.useForm(),[p,m]=(0,S.useState)(null),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)([]),[y,b]=(0,S.useState)([]),[x,C]=(0,S.useState)([]),[w,T]=(0,S.useState)(`personal`),[E,D]=(0,S.useState)([]),O=(0,S.useCallback)(async()=>{try{let e=await ase(),t=(e.subscriptionProducts||[]).filter(e=>e.isActive),n=(e.teamSubscriptionProducts||[]).filter(e=>e.isActive);b(t),C(n),v((e.creditAddons||[]).filter(e=>e.isActive)),D(e.activePersonalSubscriptions||[]),n.length===0&&T(`personal`)}catch{b([]),C([]),v([]),D([]),T(`personal`)}},[]),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(`monthly`),N=(w===`team`?x:y).filter(e=>e.billingCycle===j).sort((e,t)=>(e.tierRank||0)-(t.tierRank||0)),[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(`alipay`),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(180),H=(0,S.useRef)(null),U=(0,S.useRef)(null),ee=(0,S.useRef)(null),[W,te]=(0,S.useState)({alipay:!1,wechat:!1}),[G,ne]=(0,S.useState)(null),[K,re]=(0,S.useState)(null),[ie,ae]=(0,S.useState)(1),[q,oe]=(0,S.useState)(!1),[se,ce]=(0,S.useState)(`alipay`),[le]=pH.useForm(),[ue,de]=(0,S.useState)(!1),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)(!1),ge=(0,S.useCallback)(async()=>{if(!(fe||me)){he(!0);try{pe(await Nae())}catch{pe({hasAccount:!1,account:null})}finally{he(!1)}}},[fe,me]),_e=`pending_payment_order`,[ve,ye]=(0,S.useState)(0),[be,xe]=(0,S.useState)(!1),[Se,Ce]=(0,S.useState)(!1),[we]=pH.useForm(),[Te,Ee]=(0,S.useState)(!1),[De,Oe]=(0,S.useState)(()=>({x:24,y:window.innerHeight*.75})),[ke,Ae]=(0,S.useState)(!1),je=(0,S.useRef)(!1),Me=(0,S.useRef)({x:0,y:0}),[Ne,Pe]=(0,S.useState)({}),[Fe,Ie]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteName||``;return t&&(document.title=t),t}),[Le,Re]=(0,S.useState)(()=>{let e=localStorage.getItem(`siteInfo`),t=e&&JSON.parse(e).siteLogo||``;if(t){let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=t,e.type=`image/png`}return t}),[ze,Be]=(0,S.useState)(!localStorage.getItem(`siteInfo`)),[Ve,He]=(0,S.useState)(!1),[Ue,We]=(0,S.useState)(null),[Ge,qe]=(0,S.useState)(!1),[Je,Xe]=(0,S.useState)(``);(0,S.useEffect)(()=>{let t=()=>{localStorage.removeItem(`token`),e(`/login?kicked_out=1`)};return window.addEventListener(`kicked-out`,t),()=>window.removeEventListener(`kicked-out`,t)},[e]),(0,S.useEffect)(()=>{f5().then(e=>{let t=e.siteName||`智创`,n=e.siteLogo||``;if(t!==Fe&&(Ie(t),document.title=t),n&&n!==Le){Re(n);let e=document.querySelector(`link[rel="icon"]`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e));let t=n.startsWith(`http`)||n.startsWith(`data:`)?n:`https://ceshi.apiforeign.minzhongzc.com${n.startsWith(`/`)?``:`/`}${n}`;e.href=t,e.type=`image/png`}e.operationManual&&Xe(e.operationManual),localStorage.setItem(`siteInfo`,JSON.stringify({siteName:t,siteLogo:n}))}).catch(()=>{}),n5().then(e=>{let t=e?.resourceCapacity;t&&We({enabled:!!t.enabled,usedBytes:Number(t.usedBytes)||0,totalBytes:Number(t.totalBytes)||0,availableBytes:Number(t.availableBytes)||0,usagePercent:Number(t.usagePercent)||0,exceeded:!!t.exceeded,limitValue:t.limitValue??``,limitUnit:t.limitUnit||`GB`})}).catch(()=>{})},[]),(0,S.useEffect)(()=>{let e=()=>qe(window.innerWidth<=767);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let Ze=e=>{e.button===0&&(Ae(!0),je.current=!1,Me.current={x:e.clientX,y:e.clientY})},Qe=e=>{if(!ke)return;let t=Math.abs(e.clientX-Me.current.x),n=Math.abs(e.clientY-Me.current.y);(t>5||n>5)&&(je.current=!0);let r=Math.max(60,Math.min(window.innerHeight-60,e.clientY-(Me.current.y-De.y)));Oe(e=>({x:e.x,y:r}))},$e=()=>{let e=je.current;Ae(!1),je.current=!1,e||c(!0)};(0,S.useEffect)(()=>{if(ke)return document.addEventListener(`mousemove`,Qe),document.addEventListener(`mouseup`,$e),()=>{document.removeEventListener(`mousemove`,Qe),document.removeEventListener(`mouseup`,$e)}},[ke]);let et=()=>{h5().then(e=>{ye(e)}).catch(()=>{})};(0,S.useEffect)(()=>{Tae().then(e=>{g(e.filter(e=>e.is_active!==!1&&e.isActive!==!1))}).catch(()=>{}),O(),Eae().then(e=>{te(e),e.alipay?L(`alipay`):e.wechat&&L(`wechat`)}).catch(()=>{})},[]),(0,S.useEffect)(()=>{n&&et()},[n?.id,n?.credits]),(0,S.useEffect)(()=>{(async()=>{let e=localStorage.getItem(_e);if(e)try{let t=JSON.parse(e),n=await b5(t.orderNo);if(n.status===`pending`){ne({price:t.price,credits:t.credits,qrCode:t.qrCode,method:t.method,title:t.title||`会员服务`}),ee.current=t.orderNo;let e=Date.now(),n=new Date(t.createdAt).getTime(),r=t.timeoutSeconds||180,i=Math.floor((e-n)/1e3),a=Math.max(0,r-i);a>0?(F(!0),ht(t.orderNo,a)):localStorage.removeItem(_e)}else n.status===`paid`?(Z.success(`支付成功!积分已到账`),$5.getState().refreshUser(),localStorage.removeItem(_e)):localStorage.removeItem(_e)}catch{localStorage.removeItem(_e)}})()},[]);let tt=t.pathname.startsWith(`/records`)?`/records`:t.pathname,nt=lse,rt={};h.forEach(e=>{let t=e.parent_id??e.parentId;t&&(rt[t]||(rt[t]=[]),rt[t].push(e))});let it=h.filter(e=>!(e.parent_id??e.parentId));it.sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0)),Object.keys(rt).forEach(e=>{rt[e].sort((e,t)=>(typeof e.sortOrder==`number`?e.sortOrder:1/0)-(typeof t.sortOrder==`number`?t.sortOrder:1/0))});let at=t=>{let n=t.menu_type??t.menuType,r=rt[t.id]&&rt[t.id].length>0;n===`group`||r?Pe(e=>({...e,[t.id]:!e[t.id]})):t.path&&(e(t.path),xe(!1))},ot=[{key:`profile`,icon:(0,$.jsx)(P8,{}),label:`账号: ${n?.username}`,disabled:!0},{key:`credits`,icon:(0,$.jsx)(z8,{style:{color:`#c9a96e`}}),label:`积分: ${n?.credits??0}`,disabled:!0},{type:`divider`},...n?.isTeamManager?[{key:`teamManagement`,icon:(0,$.jsx)(S8,{style:{color:`#6366f1`}}),label:`团队管理`}]:[],{key:`myCredits`,icon:(0,$.jsx)(z8,{}),label:`积分明细`},{key:`orderRecords`,icon:(0,$.jsx)(wV,{}),label:`订单记录`},{key:`invoice`,icon:(0,$.jsx)(F6,{}),label:`申请开票`},{key:`messages`,icon:(0,$.jsx)(d2,{}),label:`消息中心${ve>0?`(${ve})`:``}`},...Je?[{key:`manual`,icon:(0,$.jsx)(wV,{}),label:`操作手册`}]:[],{type:`divider`},{key:`changePwd`,icon:(0,$.jsx)(k3,{}),label:`个人信息`},{type:`divider`},{key:`logout`,icon:(0,$.jsx)(F3,{}),label:`退出登录`,danger:!0}],st=({key:t})=>{t===`logout`?(r(),e(`/login`)):t===`changePwd`?o(!0):t===`messages`?e(`/messages`):t===`recharge`?u(!0):t===`teamManagement`?e(`/team-management`):t===`myCredits`?e(`/user-center?tab=credits`):t===`orderRecords`?e(`/user-center?tab=orders`):t===`invoice`?e(`/invoice`):t===`manual`&&window.open(Je,`_blank`)},ct=async()=>{try{let e=await d.validateFields();await r5(e.oldPwd,e.newPwd),Z.success(`密码修改成功`),o(!1),d.resetFields()}catch(e){e?.response?.data?.detail?Z.error(e.response.data.detail):e?.message&&Z.error(e.message)}},lt=async()=>{try{let e=await sae((await f.validateFields()).username);Z.success(e.message||`操作成功`),await i(),n5().then(e=>{let t=e?.resourceCapacity;t&&We({enabled:!!t.enabled,usedBytes:Number(t.usedBytes)||0,totalBytes:Number(t.totalBytes)||0,availableBytes:Number(t.availableBytes)||0,usagePercent:Number(t.usagePercent)||0,exceeded:!!t.exceeded,limitValue:t.limitValue??``,limitUnit:t.limitUnit||`GB`})}).catch(()=>{}),o(!1),f.resetFields()}catch(e){e?.response?.data?.message?Z.error(e.response.data.message):e?.response?.data?.detail?Z.error(e.response.data.detail):e?.message&&Z.error(e.message)}},ut=()=>{r(),e(`/login`)},dt=(0,S.useCallback)(()=>{H.current&&=(clearInterval(H.current),null),U.current&&=(clearInterval(U.current),null)},[]),ft=(0,S.useCallback)(async(e,t)=>{if(!W.alipay&&!W.wechat){Z.error(`暂无可用支付方式`);return}re({id:e,product:t}),ae(t.productType===`team_subscription`?2:1),oe(!1),ce(`alipay`),le.resetFields(),ne(null),A(!1),F(!0)},[W]),pt=(0,S.useCallback)(async()=>{if(K){z(!0);try{let{id:e,product:t}=K,n=await v5(e,I,ie),r=n.qrUrl||n.codeUrl||n.qr_code||n.code_url,i=Number(n.amount??t.currentPrice??t.price??0),a=Number(t.grantCredits||t.monthlyGrantCredits||0)*(t.productType===`team_subscription`?ie:1),o=t.regularPrice,s={monthly:`月套餐`,quarterly:`季套餐`,yearly:`年套餐`},c=!!t.billingCycle,l=t.billingCycle?s[t.billingCycle]:``,u=t.name||`积分充值`,d=c?`${u} ${l}`:u,f={price:i,credits:a,qrCode:r,method:n.paymentMethod,title:d,originalPrice:o?Number(o):void 0,discountAmount:o?Number(o)-i:void 0,tierName:u,periodLabel:l,isSubscription:c};(n.paymentMethod===`alipay`||n.paymentMethod===`wechat`)&&r?(ne(f),oe(!0),ee.current=n.orderNo,localStorage.setItem(_e,JSON.stringify({orderNo:n.orderNo,...f,createdAt:n.createdAt||new Date().toISOString(),timeoutSeconds:180})),ht(n.orderNo)):(Z.success(`购买成功,积分已到账`),await $5.getState().refreshUser(),await O(),m(null),F(!1),re(null))}catch(e){Z.error(e?.message||`创建订单失败`)}finally{z(!1)}}},[K,I,ie]),mt=(0,S.useCallback)(async()=>{if(K)try{await le.validateFields(),de(!0);let{id:e,product:t}=K,n=await v5(e,`corporate`),r=Number(n.amount??t.currentPrice??t.price??0),i=Number(t.grantCredits||t.monthlyGrantCredits||0),a=t.regularPrice,o={monthly:`月套餐`,quarterly:`季套餐`,yearly:`年套餐`},s=!!t.billingCycle,c=t.billingCycle?o[t.billingCycle]:``,l=t.name||`积分充值`;ne({price:r,credits:i,qrCode:``,method:`corporate`,title:s?`${l} ${c}`:l,originalPrice:a?Number(a):void 0,tierName:l,periodLabel:c,isSubscription:s}),Z.success(`已提交对公转账信息,客服将在1-3个工作日内审核到账`),F(!1),re(null),le.resetFields(),await $5.getState().refreshUser(),await O()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`提交失败,请重试`)}finally{de(!1)}},[K,le]),ht=(0,S.useCallback)((e,t=180)=>{dt(),V(t),H.current=setInterval(async()=>{try{let t=await b5(e);t.status===`paid`?(dt(),ee.current=null,localStorage.removeItem(_e),Z.success(`支付成功!积分已到账`),$5.getState().refreshUser(),O(),F(!1),ne(null),m(null)):t.status===`cancelled`&&(dt(),ee.current=null,localStorage.removeItem(_e))}catch{}},2e3),U.current=setInterval(()=>{V(e=>e<=1?(dt(),ee.current&&=(x5(ee.current).catch(()=>{}),null),localStorage.removeItem(_e),Z.warning(`订单已超时,请重新充值`),F(!1),ne(null),m(null),0):e-1)},1e3)},[O,dt]),gt=async()=>{if(!n){Z.warning(`请先登录`);return}try{let e=await we.validateFields();Ee(!0),await voe({phone:e.phone,company_name:e.companyName,industry:e.industry,name:e.name,message:e.message}),Z.success(`提交成功,我们会尽快与您联系`),c(!1),we.resetFields()}catch(e){Z.error(e?.message||`提交失败`)}finally{Ee(!1)}},_t=(t,n=0)=>{let r=t.path===tt,i=r7[t.icon]||(0,$.jsx)(c3,{}),a=rt[t.id]&&rt[t.id].length>0,o=(t.menu_type??t.menuType)===`group`;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{onClick:()=>{!(o||a)&&t.path&&e(t.path)},style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:10,padding:n>0?`6px 12px 6px 32px`:`6px 14px`,borderRadius:12,margin:`1px 4px`,cursor:o||a?`default`:`pointer`,fontSize:n>0?13:14,fontWeight:r?600:400,color:r?`#4f46e5`:o?`#94a3b8`:`#475569`,background:r?`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)`:`transparent`,transition:`all 0.2s ease`},onMouseEnter:e=>{!o&&!r&&!(o||a)&&(e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:[!o&&(0,$.jsx)(`span`,{style:{fontSize:n>0?14:16,flexShrink:0,color:r?`#6366f1`:`#64748b`},children:i}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`,flex:1,textAlign:`left`,fontWeight:o||r?600:400,fontSize:o?12:n>0?13:14,textTransform:o?`uppercase`:`none`,letterSpacing:o?.5:0},children:t.label})]}),(o||a)&&(0,$.jsx)(`div`,{style:{overflow:`hidden`},children:(rt[t.id]||[]).map(e=>_t(e,n+1))})]},t.id)};return(0,$.jsxs)(rW,{style:{height:`100vh`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,$.jsx)(cse,{onVisibilityChange:e=>He(e)}),(0,$.jsxs)(`div`,{style:{display:`flex`,position:`relative`,padding:4,gap:12,flex:1,minHeight:0,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{className:`desktop-sidebar`,style:{width:nt,position:`sticky`,top:4,alignSelf:`flex-start`,zIndex:100,height:`100%`,background:`linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,display:`flex`,flexDirection:`column`,transition:`width 0.25s ease`,overflow:`hidden`,border:`1px solid rgba(0, 0, 0, 0.06)`},children:[(0,$.jsx)(`div`,{style:{height:80,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,padding:`0 20px`,flexShrink:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,cursor:`pointer`},onClick:()=>{e(`/home`)},children:[(0,$.jsx)(`div`,{style:{width:42,height:42,borderRadius:14,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,overflow:`hidden`},children:Le?(0,$.jsx)(`img`,{src:Le,alt:`logo`,style:{width:36,height:36,objectFit:`contain`}}):(0,$.jsx)(w8,{style:{fontSize:20,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:17,fontWeight:700,letterSpacing:-.02,whiteSpace:`nowrap`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:Fe})]})}),(0,$.jsx)(`div`,{style:{flex:1,padding:`8px 8px`,overflow:`auto`},children:it.map(e=>_t(e))}),(0,$.jsxs)(`div`,{onClick:()=>u(!0),style:{margin:`8px 12px`,padding:`12px 20px`,borderRadius:14,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,color:`#ffffff`,fontSize:14,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.4)`,transition:`all 0.3s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)`,e.currentTarget.style.transform=`translateY(-1px)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.5)`},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.4)`},children:[(0,$.jsx)(BI,{style:{fontSize:16}}),(0,$.jsx)(`span`,{children:`充值积分`})]}),(0,$.jsx)(n7,{data:Ue}),(0,$.jsx)(`div`,{style:{padding:`16px 16px`,flexShrink:0,paddingTop:0},children:(0,$.jsx)(xV,{menu:{items:ot,onClick:st},placement:`topRight`,arrow:!0,children:(0,$.jsxs)(`div`,{className:`user-card-container`,style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:12,borderRadius:14,cursor:`pointer`,transition:`all 0.35s cubic-bezier(0.4,0,0.2,1)`,background:`linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%)`,boxShadow:`0 2px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255,255,255,0.8)`,position:`relative`,border:`1px solid rgba(99, 102, 241, 0.15)`,animation:`cardBreath 3s ease-in-out infinite`},onMouseEnter:e=>{e.currentTarget.style.background=`linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)`,e.currentTarget.style.boxShadow=`0 8px 24px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255,255,255,0.9)`,e.currentTarget.style.transform=`translateY(-3px) scale(1.01)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.4)`,e.currentTarget.style.animation=`none`,e.currentTarget.querySelector(`.user-card-arrow`)?.classList.add(`arrow-hover`)},onMouseLeave:e=>{e.currentTarget.style.background=`linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%)`,e.currentTarget.style.boxShadow=`0 2px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255,255,255,0.8)`,e.currentTarget.style.transform=`translateY(0) scale(1)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.15)`,e.currentTarget.style.animation=`cardBreath 3s ease-in-out infinite`,e.currentTarget.querySelector(`.user-card-arrow`)?.classList.remove(`arrow-hover`)},children:[(0,$.jsx)(`div`,{className:`user-card-glow`,style:{position:`absolute`,inset:-4,borderRadius:18,background:`linear-gradient(90deg, transparent 0%, rgba(99,102,241,0.15) 25%, rgba(139,92,246,0.15) 50%, rgba(99,102,241,0.15) 75%, transparent 100%)`,backgroundSize:`200% 100%`,opacity:.8,animation:`borderShimmer 2.5s linear infinite`,pointerEvents:`none`}}),(0,$.jsx)(Bw,{size:36,icon:(0,$.jsx)(P8,{}),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`,transition:`all 0.35s cubic-bezier(0.4,0,0.2,1)`,position:`relative`,zIndex:1,animation:`avatarPulse 2s ease-in-out infinite`}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,position:`relative`,zIndex:1},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:16,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,letterSpacing:-.01},children:n?.username}),(0,$.jsxs)(`div`,{style:{color:`#6366f1`,fontSize:14,fontWeight:500,letterSpacing:0,borderRadius:6,display:`inline-block`,animation:`creditGlow 1.5s ease-in-out infinite`},children:[`积分: `,n?.credits||0]})]}),(0,$.jsx)(`div`,{className:`user-card-arrow`,style:{fontSize:12,color:`#6366f1`,flexShrink:0,position:`relative`,zIndex:1},children:(0,$.jsx)(W3,{})}),(0,$.jsx)(`style`,{children:` @keyframes arrowFlash { 0%, 100% { transform: translateY(0) scale(1); @@ -454,8 +454,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho animation: none !important; filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.8)) !important; } - `})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{flex:1,background:`#f1f2f3`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`,overflow:`auto`,minHeight:0},children:!Ge&&(0,$.jsx)(wt,{context:{openContactModal:()=>c(!0)}})})]}),(0,$.jsx)(`div`,{className:`mobile-header`,children:(0,$.jsxs)(`div`,{className:`mobile-header-content`,children:[(0,$.jsx)(`div`,{className:`mobile-menu-btn`,onClick:()=>xe(!0),children:(0,$.jsx)(G3,{style:{fontSize:20}})}),(0,$.jsx)(`div`,{className:`mobile-header-title`,children:Fe}),(0,$.jsx)(`div`,{className:`mobile-header-right`,children:(0,$.jsxs)(`div`,{className:`mobile-credits-badge`,onClick:()=>u(!0),children:[(0,$.jsx)(B8,{}),(0,$.jsx)(`span`,{children:n?.credits||0})]})})]})}),(0,$.jsx)(`div`,{className:`mobile-content`,children:Ge&&(0,$.jsx)(wt,{context:{openContactModal:()=>c(!0)}})}),(0,$.jsxs)(dV,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.35)`},children:Le?(0,$.jsx)(`img`,{src:Le,alt:`logo`,style:{width:24,height:24,objectFit:`contain`}}):(0,$.jsx)(T8,{style:{fontSize:18,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{fontWeight:700,fontSize:16,color:`#1e293b`},children:Fe})]}),placement:`left`,onClose:()=>xe(!1),open:be,size:280,closable:!0,className:`mobile-menu-drawer`,styles:{header:{borderBottom:`1px solid #f1f5f9`,padding:`16px 20px`},body:{padding:`12px 8px`,display:`flex`,flexDirection:`column`}},children:[(0,$.jsxs)(`div`,{style:{flex:1,overflow:`auto`,paddingBottom:12},children:[(0,$.jsx)(`div`,{style:{padding:`12px 8px 16px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsx)(Hw,{size:44,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0},children:(0,$.jsx)(F8,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,marginBottom:2},children:n?.username||`用户`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`},children:[(0,$.jsx)(B8,{style:{color:`#f59e0b`,marginRight:4}}),`积分: `,(0,$.jsx)(`span`,{style:{color:`#f59e0b`,fontWeight:600},children:n?.credits??0})]})]})]})}),(0,$.jsx)(r7,{data:Ue}),it.map(e=>{let t=e.menu_type??e.menuType,n=rt[e.id]&&rt[e.id].length>0,r=e.path===tt,i=Ne[e.id],a=i7[e.icon]||(0,$.jsx)(l3,{});return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`mobile-menu-item ${r&&!n?`mobile-menu-item-active`:``} ${t===`group`?`mobile-menu-group`:``}`,onClick:()=>at(e),children:[t!==`group`&&(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:r?`#6366f1`:`#64748b`},children:a}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{paddingLeft:0,color:t===`group`?`#94a3b8`:r?`#4f46e5`:`#475569`,fontWeight:t===`group`||r?600:400,fontSize:t===`group`?12:15,textTransform:t===`group`?`uppercase`:`none`,letterSpacing:t===`group`?.5:0},children:e.label}),(t===`group`||n)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#cbd5e1`,transition:`transform 0.2s ease`,transform:i?`rotate(90deg)`:`rotate(0deg)`},children:(0,$.jsx)(Vg,{})})]}),(t===`group`||n)&&i&&(0,$.jsx)(`div`,{className:`mobile-submenu`,children:(rt[e.id]||[]).map(e=>{let t=e.path===tt,n=i7[e.icon]||(0,$.jsx)(l3,{});return(0,$.jsxs)(`div`,{className:`mobile-menu-item mobile-submenu-item ${t?`mobile-menu-item-active`:``}`,onClick:()=>at(e),children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:t?`#6366f1`:`#94a3b8`},children:n}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:t?`#4f46e5`:`#64748b`,fontWeight:t?600:400,fontSize:14},children:e.label})]},e.id)})})]},e.id)})]}),(0,$.jsxs)(`div`,{style:{padding:`8px 0`,borderTop:`1px solid #f1f5f9`},children:[(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/user-center?tab=credits`),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#f59e0b`},children:(0,$.jsx)(B8,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`积分明细`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/user-center?tab=orders`),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#6366f1`},children:(0,$.jsx)(TV,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`订单记录`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/messages`),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#8b5cf6`},children:(0,$.jsx)(f2,{})}),(0,$.jsxs)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:[`消息中心`,ve>0&&(0,$.jsx)(vQ,{color:`red`,style:{marginLeft:8,fontSize:11},children:ve})]})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{o(!0),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#0ea5e9`},children:(0,$.jsx)(A3,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`个人信息`})]}),(0,$.jsx)(`div`,{style:{height:8}}),(0,$.jsxs)(`div`,{className:`mobile-menu-item mobile-recharge-item`,onClick:()=>{u(!0),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#fff`},children:(0,$.jsx)(VI,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#fff`,fontWeight:600},children:`充值积分`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{ut(),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#ef4444`},children:(0,$.jsx)(I3,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#ef4444`},children:`退出登录`})]})]})]}),(0,$.jsx)(DG,{title:(0,$.jsxs)(bV,{children:[(0,$.jsx)(s8,{}),`账号设置`]}),open:a,onCancel:()=>{o(!1),d.resetFields(),f.resetFields()},width:440,footer:null,children:(0,$.jsxs)(gL,{defaultActiveKey:`profile`,children:[(0,$.jsx)(gL.TabPane,{tab:`个人信息`,children:(0,$.jsxs)(mH,{form:f,layout:`vertical`,style:{marginTop:20},onValuesChange:()=>{},children:[(0,$.jsx)(mH.Item,{name:`username`,label:`用户名`,rules:[{required:!0,message:`请输入用户名`},{min:3,message:`用户名至少3位`}],children:(0,$.jsx)(YU,{placeholder:`请输入用户名`,size:`large`,prefix:(0,$.jsx)(F8,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(mH.Item,{children:(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:lt,style:{width:`100%`},children:`确认修改`})})]})},`profile`),(0,$.jsx)(gL.TabPane,{tab:`修改密码`,children:(0,$.jsxs)(mH,{form:d,layout:`vertical`,style:{marginTop:20},onValuesChange:()=>{},children:[(0,$.jsx)(mH.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(YU.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(A3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(mH.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(YU.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(A3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(mH.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(YU.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(A3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(mH.Item,{children:(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:ct,style:{width:`100%`},children:`确认修改`})})]})},`password`)]})}),(0,$.jsx)(Mm,{theme:{token:{colorPrimary:`#6366f1`,borderRadius:8}},children:(0,$.jsx)(DG,{open:l,onCancel:()=>u(!1),footer:null,width:`100%`,centered:!1,style:{top:0,maxWidth:`100vw`,margin:0,paddingBottom:0},styles:{body:{padding:0,height:`100vh`,overflow:`auto`,scrollbarWidth:`none`,msOverflowStyle:`none`},mask:{background:`rgba(0,0,0,0.45)`},header:{display:`none`}},closable:!0,className:`recharge-fullscreen-modal`,title:null,closeIcon:(0,$.jsx)(ju,{style:{fontSize:18}}),children:(0,$.jsx)(`div`,{style:{width:`100%`,minHeight:`100vh`,background:`#f8fafc`,position:`relative`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`0 auto`,padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:20},children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:8},children:`订阅套餐`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`个人和团队订阅均可重复购买、多实例同时有效;季卡和年卡仅在订阅内部按月发放积分,不属于自动续费。`})]}),w===`personal`&&E.length>0&&(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #e8eaed`},children:[(0,$.jsxs)(Q.Text,{strong:!0,children:[`当前有效个人订阅:`,E.length,` 张`]}),(0,$.jsx)(`div`,{style:{marginTop:8,display:`flex`,gap:8,flexWrap:`wrap`},children:E.map(e=>(0,$.jsxs)(vQ,{color:`purple`,children:[e.productName,` · `,e.billingCycleLabel||`其他周期`,` · 到期 `,new Date(e.expiresAt).toLocaleString(`zh-CN`,{hour12:!1})]},e.id))})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginBottom:10},children:(0,$.jsx)(gL,{activeKey:w,onChange:e=>{T(e),m(null)},items:[{key:`personal`,label:`普通订阅`},...x.length>0?[{key:`team`,label:`团队订阅`}]:[]],centered:!0,size:`large`,tabBarStyle:{marginBottom:0}})}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:16,marginBottom:20},children:(0,$.jsxs)(qF.Group,{value:j,onChange:e=>{M(e.target.value),m(null)},buttonStyle:`solid`,children:[(0,$.jsx)(qF.Button,{value:`monthly`,children:`月套餐`}),(0,$.jsx)(qF.Button,{value:`quarterly`,children:`季套餐`}),(0,$.jsx)(qF.Button,{value:`yearly`,children:`年套餐`})]})}),N.length===0?(0,$.jsx)(`div`,{style:{padding:48,textAlign:`center`,color:`#94a3b8`},children:w===`team`?`暂无可购买的团队订阅套餐,请联系管理员配置并上架套餐。`:`暂无可订阅套餐,请联系管理员配置并上架套餐。`}):(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:16,flexWrap:`wrap`},children:N.map(e=>{let t=o7[e.tierCode||``]||o7.default,n=e.regularPrice||e.price,r=e.currentPrice??e.price,i=n&&Number(n)>Number(r),a=e.monthlyGrantCredits?`${Number(e.monthlyGrantCredits).toLocaleString()} 积分/月`:`${Number(e.grantCredits||0).toLocaleString()} 积分`;return(0,$.jsx)(`div`,{style:{width:250,display:`flex`,flexDirection:`column`,borderRadius:14,overflow:`hidden`,background:`#fff`,border:`1px solid #e8eaed`,position:`relative`,transition:`all 0.2s`},children:(0,$.jsxs)(`div`,{style:{padding:`16px 14px 12px`,background:`#fafbfc`,flex:1},children:[e.priceType===`first_purchase`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,background:`#fff2e8`,color:`#fa541c`,fontSize:11,padding:`2px 8px`,borderRadius:10,fontWeight:500},children:`首充价`}),e.priceType===`activity`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,background:`#fff1f0`,color:`#cf1322`,fontSize:11,padding:`2px 8px`,borderRadius:10,fontWeight:500},children:`活动价`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:14},children:t.icon}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14},children:e.name}),e.productType===`team_subscription`&&(0,$.jsx)(vQ,{color:`blue`,style:{marginLeft:6,fontSize:10},children:`团队套餐`}),(0,$.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:e.description||e.tierLabel||`订阅套餐`})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsxs)(`span`,{style:{fontSize:24,fontWeight:700,color:`#1a1a2e`},children:[`¥`,r]}),i&&(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#94a3b8`,textDecoration:`line-through`,marginLeft:6},children:[`¥`,n]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{children:a}),(0,$.jsxs)(`span`,{children:[`共 `,e.grantCount,` 次`]})]}),e.unavailableReason&&(0,$.jsx)(`div`,{style:{padding:`6px 14px`,fontSize:13,color:`#dc2626`,background:`#fef2f2`,marginTop:`20px`},children:e.unavailableReason}),(0,$.jsx)(`div`,{style:{padding:`10px 14px`,borderTop:`1px solid #f0f0f0`},children:(0,$.jsx)(X,{block:!0,size:`small`,disabled:e.canPurchase===!1||!W.alipay&&!W.wechat,loading:R&&p===e.id,onClick:()=>{m(e.id),ft(e.id,e)},style:{borderRadius:8,background:e.canPurchase===!1?`#f5f5f5`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:e.canPurchase===!1?`#94a3b8`:`#fff`,border:`none`,fontWeight:600,height:34,fontSize:13},children:e.canPurchase===!1?`不可购买`:`立即订阅`})}),e.features&&e.features.length>0&&(0,$.jsx)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px dashed #e2e8f0`},children:e.features.map((e,t)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`,lineHeight:`20px`,marginBottom:2},children:[(0,$.jsx)(Tu,{style:{color:`#4c49cc`,fontSize:14,flexShrink:0,marginTop:2}}),(0,$.jsx)(`span`,{style:{fontSize:14,margin:`4px`},children:e})]},t))})]})},e.id)})})]}),(0,$.jsx)(`div`,{style:{marginBottom:24,background:`#fff`,borderRadius:12,padding:24,border:`1px solid #e8eaed`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(B8,{style:{color:`#6366f1`,fontSize:24}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`积分充值`}),(0,$.jsxs)(Q.Text,{type:`secondary`,style:{fontSize:12},children:[`当前积分:`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontWeight:600},children:n?.credits??0})]})]})]}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(l8,{}),onClick:()=>A(!0),style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,height:42,paddingLeft:20,paddingRight:20},children:`积分商城`})]})}),(0,$.jsxs)(`div`,{style:{marginBottom:24,borderRadius:16,overflow:`hidden`,background:`#fff`,border:`1px solid #e8eaed`},children:[(0,$.jsx)(`div`,{style:{padding:`24px 24px 0`,textAlign:`center`},children:(0,$.jsx)(Q.Title,{level:3,style:{color:`#1a1a2e`,marginBottom:16},children:`常见问题`})}),(0,$.jsx)(o_,{accordion:!0,expandIcon:({isActive:e})=>e?(0,$.jsx)(DR,{style:{color:`#64748b`}}):(0,$.jsx)(NC,{style:{color:`#64748b`}}),style:{background:`#fff`,border:`none`},items:use.map(e=>({key:e.key,label:(0,$.jsx)(`span`,{style:{color:`#1a1a2e`,fontSize:14,fontWeight:500},children:e.label}),children:e.children,style:{background:`#fff`,borderBottom:`1px solid #e8eaed`}}))}),(0,$.jsxs)(`div`,{style:{padding:`24px`,borderTop:`1px solid #e8eaed`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,cursor:`pointer`,transition:`background 0.2s`},onClick:()=>{c(!0)},onMouseEnter:e=>{e.currentTarget.style.background=`#f8fafc`},onMouseLeave:e=>{e.currentTarget.style.background=`#fff`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(J3,{style:{color:`#64748b`,fontSize:18}}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`,fontSize:14,fontWeight:500},children:`联系客服`})]}),(0,$.jsx)(Vg,{style:{color:`#64748b`,fontSize:14}})]})]})]})})})}),(0,$.jsxs)(DG,{title:(0,$.jsxs)(bV,{children:[(0,$.jsx)(B8,{}),`积分商城`]}),open:k,onCancel:()=>A(!1),footer:null,width:720,closable:!0,styles:{body:{padding:20}},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:(0,$.jsxs)(bV,{children:[(0,$.jsx)(Q.Text,{children:`当前积分:`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:18},children:n?.credits??0})]})}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(160px, 1fr))`,gap:12,maxHeight:400,overflowY:`auto`,paddingRight:4},children:[_.length===0&&(0,$.jsx)(`div`,{style:{width:`100%`,padding:32,textAlign:`center`,color:`#94a3b8`},children:`暂无可购买的积分增值包`}),_.map(e=>{let t=Number(e.grantCredits||0),n=lse(t),r=e.currentPrice||e.price;return(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,background:`#fff`,border:p===e.id?`2px solid #e8eaed`:`1px solid #e8eaed`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:-1,right:8,background:`#fff2e8`,color:`#fa541c`,fontSize:11,padding:`2px 8px`,borderRadius:10,fontWeight:500},children:e.description}),(0,$.jsxs)(`div`,{style:{padding:`12px 10px 8px`,background:`#fafbfc`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,marginBottom:4},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:14,color:`#fff`},children:n.icon}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12},children:e.name}),(0,$.jsxs)(`div`,{style:{fontSize:11,fontWeight:600,color:`#6366f1`},children:[t.toLocaleString(),` 积分`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:4,fontSize:18,fontWeight:700,color:`#1a1a2e`},children:[`¥`,r]}),(0,$.jsxs)(Q.Text,{type:`secondary`,style:{fontSize:10},children:[`有效期 `,Number(e.validityMonths||1),` 个月`]})]}),(0,$.jsx)(`div`,{style:{padding:`6px 10px`,borderTop:`1px solid #f0f0f0`},children:(0,$.jsx)(X,{block:!0,size:`small`,disabled:!W.alipay&&!W.wechat,loading:R&&p===e.id,onClick:()=>{m(e.id),ft(e.id,e)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,border:`none`,fontWeight:600,height:28,fontSize:12},children:`购买`})})]},e.id)})]})]}),(0,$.jsx)(DG,{open:P,onCancel:async()=>{if(dt(),ee.current){try{await S5(ee.current)}catch{}ee.current=null}localStorage.removeItem(_e),F(!1),ne(null),re(null),oe(!1),ce(`alipay`),le.resetFields()},footer:null,width:760,closable:!0,title:(0,$.jsxs)(Q.Title,{level:5,style:{margin:0},children:[`开通`,G?.title||K?.product?.name||`会员服务`,G?.credits||K?.product?.grantCredits||K?.product?.monthlyGrantCredits?` ${Number(G?.credits||K?.product?.grantCredits||K?.product?.monthlyGrantCredits||0).toLocaleString()} 积分`:``]}),styles:{body:{padding:0,borderRadius:16,overflow:`hidden`},footer:{borderRadius:16,borderTop:`1px solid #f0f0f0`,padding:`16px 24px`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,minHeight:380},children:[(0,$.jsxs)(`div`,{style:{flex:1,padding:24,background:`#fff`,borderRight:`1px solid #f0f0f0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,marginBottom:8,display:`block`},children:`商品信息`}),(0,$.jsxs)(`div`,{style:{padding:14,background:`#f8fafc`,borderRadius:10,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:6},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1a1a2e`},children:G?.tierName||G?.title||K?.product?.name||`积分充值`}),(G?.periodLabel||K?.product?.billingCycle)&&(0,$.jsx)(vQ,{color:`purple`,style:{fontSize:11,margin:0,borderRadius:6,padding:`0 6px`},children:G?.periodLabel||{monthly:`月套餐`,quarterly:`季套餐`,yearly:`年套餐`}[K?.product?.billingCycle]||``})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:700,color:`#6366f1`,lineHeight:1.4},children:[`¥`,G?.price??Number(K?.product?.currentPrice||K?.product?.price||0)*(K?.product?.productType===`team_subscription`?ie:1),(G?.originalPrice||K?.product?.regularPrice)&&Number(G?.originalPrice||K?.product?.regularPrice||0)>Number(G?.price||K?.product?.currentPrice||K?.product?.price||0)&&(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#94a3b8`,textDecoration:`line-through`,marginLeft:8,fontWeight:400},children:[`¥`,G?.originalPrice||K?.product?.regularPrice]})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,marginBottom:8,display:`block`},children:`订单明细`}),(0,$.jsxs)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:8,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`积分数量`}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`},children:(G?.credits==null?K?.product?.grantCredits||K?.product?.monthlyGrantCredits:G.credits)?`${Number(G?.credits||K?.product?.grantCredits||K?.product?.monthlyGrantCredits||0).toLocaleString()} 积分`:`-`})]}),K?.product?.productType===`team_subscription`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`团队席位数量`}),q?(0,$.jsxs)(`span`,{children:[ie,` 席`]}):(0,$.jsx)(cz,{min:2,max:20,precision:0,value:ie,onChange:e=>ae(Number(e||2))})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`购买方式`}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`},children:G?.isSubscription??!!K?.product?.billingCycle?`独立订阅实例,不自动续费`:`一次性购买`})]}),(0,$.jsx)(`div`,{style:{height:1,background:`#e2e8f0`,margin:`8px 0`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`商品原价`}),(0,$.jsxs)(`span`,{style:{color:`#1a1a2e`},children:[`¥`,G?.originalPrice||K?.product?.regularPrice||G?.price||K?.product?.price||0]})]}),(0,$.jsx)(`div`,{style:{height:1,background:`#e2e8f0`,margin:`8px 0`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 0`},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#1a1a2e`},children:`应付金额`}),(0,$.jsxs)(`span`,{style:{fontSize:18,fontWeight:700,color:`#6366f1`},children:[`¥`,G?.price??Number(K?.product?.currentPrice||K?.product?.price||0)*(K?.product?.productType===`team_subscription`?ie:1)]})]})]})]})]}),(0,$.jsxs)(`div`,{style:{width:300,padding:20,background:`#fff`,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,background:`#f3f4f6`,borderRadius:10,padding:4,marginBottom:20},children:[(0,$.jsxs)(`div`,{onClick:()=>ce(`alipay`),style:{flex:1,textAlign:`center`,padding:`8px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:600,background:se===`alipay`?`#fff`:`transparent`,color:se===`alipay`?`#1677ff`:`#64748b`,boxShadow:se===`alipay`?`0 2px 8px rgba(0,0,0,0.08)`:`none`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6},children:[(0,$.jsx)(j0,{style:{color:se===`alipay`?`#1677ff`:`#94a3b8`}}),`支付宝支付`]}),(0,$.jsxs)(`div`,{onClick:()=>{ce(`corporate`),ge()},style:{flex:1,textAlign:`center`,padding:`8px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:600,background:se===`corporate`?`#fff`:`transparent`,color:se===`corporate`?`#6366f1`:`#64748b`,boxShadow:se===`corporate`?`0 2px 8px rgba(0,0,0,0.08)`:`none`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6},children:[(0,$.jsx)(o2,{style:{color:se===`corporate`?`#6366f1`:`#94a3b8`}}),`对公转账`]})]}),se===`alipay`&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,marginBottom:12},children:[(0,$.jsx)(j0,{style:{fontSize:18,color:`#1677ff`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#64748b`},children:`请用支付宝扫码支付`})]}),(0,$.jsx)(`div`,{style:{position:`relative`,width:180,height:180,borderRadius:12,border:`1px solid #f0f0f0`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#fff`},children:q&&G?.qrCode?(0,$.jsx)(O0,{value:G.qrCode,size:150,level:`M`}):(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginBottom:12},children:[`确认商品和金额后`,(0,$.jsx)(`br`,{}),`生成二维码`]}),(0,$.jsx)(X,{type:`primary`,loading:R,onClick:pt,style:{borderRadius:8,height:36,fontWeight:600},children:`确认使用支付宝支付`})]})}),q&&(0,$.jsxs)(`div`,{style:{marginTop:12,fontSize:12,color:`#94a3b8`},children:[B,` 秒后二维码失效`]}),q&&(0,$.jsx)(X,{danger:!0,style:{marginTop:14,borderRadius:8},onClick:async()=>{if(dt(),ee.current){try{await S5(ee.current)}catch{}ee.current=null}localStorage.removeItem(_e),F(!1),ne(null),re(null),oe(!1),Z.info(`已取消支付`)},children:`取消转账`}),(0,$.jsxs)(`div`,{style:{marginTop:8,fontSize:11,color:`#94a3b8`,textAlign:`center`},children:[`开通即代表同意`,(0,$.jsx)(`br`,{}),`《用户服务协议》`]})]}),se===`corporate`&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,marginBottom:8,display:`block`,fontWeight:600},children:`收款账户信息`}),(0,$.jsx)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:8,border:`1px solid #e2e8f0`,minHeight:80,display:`flex`,alignItems:`center`},children:me?(0,$.jsx)(`div`,{style:{width:`100%`,textAlign:`center`,color:`#94a3b8`,fontSize:12},children:`加载中...`}):fe?.hasAccount&&fe?.account?(0,$.jsxs)(`div`,{style:{width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12,marginBottom:4},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`账户名称`}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`,fontWeight:500},children:fe.account.accountName})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12,marginBottom:4},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`开户银行`}),(0,$.jsxs)(`span`,{style:{color:`#1a1a2e`,fontWeight:500,display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(i2,{style:{color:`#c8161d`,fontSize:14}}),fe.account.bankName]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`账号`}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`,fontWeight:500,fontFamily:`monospace`},children:fe.account.accountNo})]})]}):(0,$.jsx)(`div`,{style:{width:`100%`,textAlign:`center`,color:`#94a3b8`,fontSize:12},children:`暂无收款账户信息`})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,marginBottom:4,display:`block`,fontWeight:600},children:`填写您的打款信息`}),(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#ef4444`,marginBottom:8,display:`block`},children:`注:打款金额需与所标注金额一致,不然无法开通,银行信息需正确填写`}),(0,$.jsxs)(mH,{form:le,layout:`vertical`,size:`small`,requiredMark:!1,children:[(0,$.jsx)(mH.Item,{name:`accountName`,label:`账户名称`,rules:[{required:!0,message:`请输入账户名称`}],style:{marginBottom:10},children:(0,$.jsx)(YU,{placeholder:`请输入付款方账户名称`})}),(0,$.jsx)(mH.Item,{name:`bankName`,label:`开户银行`,rules:[{required:!0,message:`请输入开户银行`}],style:{marginBottom:10},children:(0,$.jsx)(YU,{placeholder:`请输入开户银行`,prefix:(0,$.jsx)(o2,{style:{color:`#94a3b8`}})})}),(0,$.jsx)(mH.Item,{name:`bankAccount`,label:`账号`,rules:[{required:!0,message:`请输入账号`}],style:{marginBottom:8},children:(0,$.jsx)(YU,{placeholder:`请输入付款方账号`})})]})]}),(0,$.jsx)(X,{type:`primary`,block:!0,size:`large`,loading:ue,onClick:mt,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,fontWeight:600,height:38,fontSize:14},children:`提交对公转账`}),(0,$.jsx)(`div`,{style:{marginTop:8,fontSize:11,color:`#94a3b8`,textAlign:`center`},children:`提交后客服将在 1-3 个工作日内审核到账`})]})]})]})}),(0,$.jsx)(ose,{}),(0,$.jsx)(`div`,{className:`contact-button-wrapper`,style:{right:`${De.x}px`,bottom:`${window.innerHeight-De.y}px`},children:(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`div`,{className:`contact-tooltip`,style:{opacity:+!!Se},children:`联系我们`}),(0,$.jsx)(`button`,{className:`contact-button ${ke?`dragging`:``}`,onMouseEnter:()=>Ce(!0),onMouseLeave:()=>Ce(!1),onMouseDown:Ze,onMouseUp:$e,children:(0,$.jsx)(J3,{style:{fontSize:20}})})]})}),(0,$.jsx)(DG,{title:(0,$.jsxs)(bV,{children:[(0,$.jsx)(J3,{}),`联系我们`]}),open:s,onCancel:()=>{c(!1),we.resetFields()},footer:null,width:480,className:`contact-modal`,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(mH,{form:we,layout:`vertical`,children:[(0,$.jsx)(mH.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(YU,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(mH.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(YU,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(mH.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(YU,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(mH.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(YU,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(mH.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(YU.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(X,{size:`large`,onClick:()=>{c(!1),we.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:gt,loading:Te,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},fse=`http://localhost:8000/api`,pse=()=>{let{checkAuth:e}=e7(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s]=On(),c=s.get(`redirect`),l=s.get(`tab`),[u,d]=(0,S.useState)(0),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(!1),[C,w]=(0,S.useState)(0),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),j=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`智创`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`智创`,siteLogo:``}})(),[M,N]=(0,S.useState)(j.siteName),[P,F]=(0,S.useState)(j.siteLogo),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),[H,U]=(0,S.useState)(``),ee=Ye(),{login:W}=e7(),[te]=mH.useForm(),[G]=mH.useForm(),[ne]=mH.useForm();(0,S.useEffect)(()=>{p5().then(e=>{N(e.siteName),F(e.siteLogo),L(e.loginBgVideo||``),V(e.userAgreementPrivacyUrl),U(e.siteCopyright)}).catch(()=>{})},[]),(0,S.useEffect)(()=>{l===`register`&&i(`register`)},[l]),(0,S.useEffect)(()=>{if(s.get(`kicked_out`)===`1`){Z.warning(`您的账号已在其他设备登录,请重新登录`);let e=new URL(window.location.href);e.searchParams.delete(`kicked_out`),window.history.replaceState({},``,e.toString())}},[s]);let K=()=>{if(c)try{ee(decodeURIComponent(c));return}catch{}ee(`/home`)},re=()=>m?!0:(Z.warning(`请先阅读并同意用户协议及隐私政策`),!1),ie=async()=>{if(re())try{let t=await te.validateFields();await W(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),K()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},ae=async()=>{if(re())try{let t=G.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await rae(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),K()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},q=async()=>{if(re())try{let t=await ne.validateFields();n(!0),await iae(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),K()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},oe=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),_(!1),t?O(!0):A(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{u===0&&r===`phone`&&x(!1)},[u,r]);let se=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){_(!0),y(!1);return}if(!b){_(!0),x(!1);return}let n=``;n=r===`register`?`register`:`login`,await m5(e,n),oe(t?p:d),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(y(!1),p(0)):(x(!1),d(0)),w(e=>e+1)}},ce=async(e=!1)=>{let t=r===`register`?ne.getFieldValue(`phone`):G.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await m5(t,e),r===`register`?(y(!0),oe(p,!0)):(x(!0),oe(d,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(y(!1),p(0),O(!0)):(x(!1),d(0),A(!0)),w(e=>e+1)}},le=e=>{o(e),i(e),d(0),p(0),x(!1),y(!1),_(!1),O(!1),A(!1),w(e=>e+1),e===`password`?te.resetFields():G.resetFields()},ue={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,borderRadius:10,fontSize:14},de=e=>{if(!e){Z.warning(`暂未上传协议文件`);return}e.startsWith(`http://`)||e.startsWith(`https://`)?window.open(e,`_blank`):window.open(`${fse.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{className:`login-page`,children:[(0,$.jsx)(mse,{src:I,onReady:()=>z(!0)}),(0,$.jsx)(`div`,{className:`login-bg-overlay`,style:{opacity:+!!R}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,opacity:+!!R,transition:`opacity 0.5s ease`,pointerEvents:R?`auto`:`none`},children:[(0,$.jsx)(`div`,{className:`login-slogan`,children:(0,$.jsx)(`span`,{className:`login-slogan-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsx)(`div`,{className:`login-center`,children:(0,$.jsxs)(vL,{className:`login-card`,styles:{body:{padding:`32px 32px`}},children:[(0,$.jsx)(`div`,{className:`login-card-header`,children:(0,$.jsxs)(`div`,{className:`login-logo-row`,children:[P?(0,$.jsx)(`img`,{src:P,alt:`logo`,className:`login-logo-img`}):(0,$.jsx)(`div`,{className:`login-logo-placeholder`,children:(0,$.jsx)(T8,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`span`,{className:`login-site-name`,children:M})]})}),(0,$.jsx)(Q.Text,{className:`login-card-subtitle`,children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作`}),r!==`register`&&(0,$.jsx)(`div`,{className:`login-tabs`,children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>le(e),className:`login-tab ${a===e?`login-tab-active`:``}`,children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(mH,{form:te,size:`large`,layout:`vertical`,onFinish:ie,children:[(0,$.jsx)(mH.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(YU,{prefix:(0,$.jsx)(Z3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:ue})}),(0,$.jsx)(mH.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(YU.Password,{prefix:(0,$.jsx)(A3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:ue})}),(0,$.jsx)(mH.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(mR,{children:`记住我的登录状态`})}),(0,$.jsx)(mH.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,htmlType:`submit`,loading:t,block:!0,className:`login-submit-btn`,children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(mH,{form:G,size:`large`,layout:`vertical`,children:[(0,$.jsx)(mH.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(YU,{prefix:(0,$.jsx)(Z3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:ue})}),(0,$.jsx)(mH.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(bV.Compact,{style:{width:`100%`},children:[(0,$.jsx)(YU,{prefix:(0,$.jsx)(e8,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!b,style:{...ue,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(X,{disabled:u>0,style:{fontSize:14,fontWeight:400},onClick:()=>{k?(x(!1),_(!0),w(e=>e+1)):g&&!b?(E(!0),setTimeout(()=>E(!1),500)):se(G.getFieldValue(`phone`))},className:`login-code-btn`,children:u>0?`${u}s`:k?`重新发送`:`获取验证码`})]})}),g&&(0,$.jsx)(mH.Item,{style:{marginBottom:12},children:(0,$.jsx)(s7,{onSuccess:ce,isVerified:b,shake:T})},C),(0,$.jsx)(mH.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,onClick:ae,loading:t,block:!0,className:`login-submit-btn`,children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(mH,{form:ne,size:`large`,layout:`vertical`,children:[(0,$.jsx)(mH.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(YU,{prefix:(0,$.jsx)(Z3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:ue})}),(0,$.jsx)(mH.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(bV.Compact,{style:{width:`100%`},children:[(0,$.jsx)(YU,{prefix:(0,$.jsx)(e8,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!v,style:{...ue,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(X,{disabled:f>0,style:{fontSize:14,fontWeight:400},onClick:()=>{D?(y(!1),_(!0),w(e=>e+1)):g&&!v?(E(!0),setTimeout(()=>E(!1),500)):se(ne.getFieldValue(`phone`),!0)},className:`login-code-btn`,children:f>0?`${f}s`:D?`重新发送`:`获取验证码`})]})}),g&&(0,$.jsx)(mH.Item,{style:{marginBottom:12},children:(0,$.jsx)(s7,{onSuccess:ce,isVerified:v,shake:T})},C),(0,$.jsx)(mH.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(YU.Password,{prefix:(0,$.jsx)(A3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:ue})}),(0,$.jsx)(mH.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,onClick:q,loading:t,block:!0,className:`login-submit-btn`,children:`注 册`})})]}),(0,$.jsx)(`div`,{className:`login-agreement`,children:(0,$.jsx)(mR,{checked:m,onChange:e=>h(e.target.checked),children:(0,$.jsxs)(`span`,{className:`login-agreement-text`,children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),de(B)},className:`login-link`,children:`《用户协议及隐私政策》`})]})})}),(0,$.jsx)(`div`,{className:`login-footer`,children:r===`register`?(0,$.jsx)(Q.Text,{className:`login-switch-btn`,onClick:()=>{i(`password`),o(`password`),O(!1),A(!1),y(!1),_(!1),w(e=>e+1),ne.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{className:`login-switch-btn`,onClick:()=>{i(`register`),O(!1),A(!1),y(!1),_(!1),w(e=>e+1)},children:`没有账号?立即注册`})})]})}),H&&(0,$.jsx)(`div`,{className:`login-copyright-wrapper`,children:(0,$.jsx)(`div`,{className:`login-copyright`,children:H})})]})]})},mse=({src:e,onReady:t})=>{let[n,r]=(0,S.useState)(!1),i=S.useRef(null),a=()=>{n||(r(!0),i.current?.play().catch(()=>{}),t())};if(!e)return t(),null;let o=e.toLowerCase().endsWith(`.gif`),s=e.toLowerCase().endsWith(`.webp`);return o||s?(0,$.jsx)(`img`,{className:`login-bg-video`,src:e,alt:``,onLoad:a,onError:a}):(0,$.jsxs)($.Fragment,{children:[!n&&(0,$.jsx)(`div`,{className:`login-bg-video login-bg-placeholder`}),(0,$.jsx)(`video`,{ref:i,className:`login-bg-video`,style:{opacity:+!!n},autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:`auto`,onCanPlayThrough:a,onCanPlay:a,onError:a,children:(0,$.jsx)(`source`,{src:e,type:e.endsWith(`.webm`)?`video/webm`:e.endsWith(`.mov`)?`video/quicktime`:`video/mp4`})})]})},s7=({onSuccess:e,isVerified:t,shake:n})=>{let r=S.useRef(null),i=S.useRef(null),a=S.useRef(null),o=S.useRef(0),s=S.useRef(!1),[c,l]=S.useState(360),u=c-50;S.useEffect(()=>{let e=()=>{if(r.current){let e=r.current.offsetWidth;e>0&&l(e)}};e();let t=new ResizeObserver(e);return r.current&&t.observe(r.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let d=n=>{if(s.current||t)return;let r=Math.max(0,Math.min(n,u));o.current=r,i.current&&(i.current.style.left=`${r}px`),a.current&&(a.current.style.width=`${r+50}px`),r>=u-5&&(s.current=!0,i.current&&(i.current.style.background=`#22c55e`,i.current.innerHTML=``),a.current&&(a.current.style.width=`${c}px`,a.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:r,onMouseDown:e=>{if(e.preventDefault(),s.current||t)return;let n=r.current;if(!n)return;let c=n.getBoundingClientRect(),l=e=>{d(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,f),!s.current&&o.current{if(s.current||t)return;e.preventDefault();let n=r.current;if(!n)return;let c=n.getBoundingClientRect();d(e.touches[0].clientX-c.left-50/2);let l=e=>{d(e.touches[0].clientX-c.left-50/2)},f=()=>{document.removeEventListener(`touchmove`,l),document.removeEventListener(`touchend`,f),!s.current&&o.current({page:1,pageSize:10,total:0,items:[]}),c7=K8((e,t)=>({projects:[],records:hse(),loading:!1,mediaType:`video`,countType:`请选择`,generationCount:1,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`9:16`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],inputValue:``,currentMedia:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await sae(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await cae(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await lae(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await a5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await uae(n,r);try{await e7.getState().checkAuth()}catch{}let a=t().records,o=a.items.findIndex(e=>e.id===i.record.id),s=o>=0?a.items.map(e=>e.id===i.record.id?i.record:e):[i.record,...a.items];return e({records:{...a,total:o>=0?a.total:a.total+1,items:s}}),i},generateVideo:async n=>{let r=await bae(n);try{await e7.getState().checkAuth()}catch{}let i=t().records;return e({records:{...i,items:i.items.map(e=>e.id===n?r:e)}}),r},retryGeneration:async n=>{let r=await xae(n);try{await e7.getState().checkAuth()}catch{}let i=t().records;return e({records:{...i,items:i.items.map(e=>e.id===n?r:e)}}),r},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setGenerationCount:t=>e({generationCount:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),setInputValue:t=>e({inputValue:t}),setCurrentMedia:t=>e({currentMedia:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,generationCount:1,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`9:16`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],inputValue:``,currentMedia:[]})})),l7=480;function u7(e){if(!e)return`-`;let t=e.trim();if(!t)return`-`;let n=t.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/);if(!n)return t.slice(0,16).replace(`T`,` `);let[,r,i,a,o,s,c,l]=n,u=Date.UTC(+r,i-1,+a,+o,+s,+c);if(l&&l!==`Z`){let e=l[0]===`+`?1:-1,[t,n]=l.slice(1).split(`:`),r=u-e*(t*60+ +n)*6e4+l7*6e4,i=new Date(r);return`${i.getUTCFullYear()}-${d7(i.getUTCMonth()+1)}-${d7(i.getUTCDate())} ${d7(i.getUTCHours())}:${d7(i.getUTCMinutes())}`}let d=l===`Z`?u+l7*6e4:u,f=new Date(d);return`${f.getUTCFullYear()}-${d7(f.getUTCMonth()+1)}-${d7(f.getUTCDate())} ${d7(f.getUTCHours())}:${d7(f.getUTCMinutes())}`}function d7(e){return e<10?`0${e}`:String(e)}function f7(e){if(!e)return`-`;let t=e.match(/\.(\d{1,6})/)?.[1]?.padEnd(6,`0`)||`000000`,n=gse(e);return n===`-`?n:`${n}.${t}`}function gse(e){let t=e.trim(),n=t.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/);if(!n)return t.replace(`T`,` `);let[,r,i,a,o,s,c,l]=n,u=Date.UTC(+r,i-1,+a,+o,+s,+c),d=u;if(l===`Z`)d+=l7*6e4;else if(l){let e=l[0]===`+`?1:-1,t=l.slice(1).replace(`:`,``);d=u-e*(t.slice(0,2)*60+ +t.slice(2,4))*6e4+l7*6e4}let f=new Date(d);return`${f.getUTCFullYear()}-${d7(f.getUTCMonth()+1)}-${d7(f.getUTCDate())} ${d7(f.getUTCHours())}:${d7(f.getUTCMinutes())}:${d7(f.getUTCSeconds())}`}var p7=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],m7={ShoppingCartOutlined:(0,$.jsx)(l8,{}),BookOutlined:(0,$.jsx)(h2,{}),HomeOutlined:(0,$.jsx)(l3,{}),FireOutlined:(0,$.jsx)(N4,{}),RocketOutlined:(0,$.jsx)(Z6,{}),SkinOutlined:(0,$.jsx)(pie,{}),CompassOutlined:(0,$.jsx)(r4,{}),HeartOutlined:(0,$.jsx)(r3,{}),CarOutlined:(0,$.jsx)(D2,{}),CameraOutlined:(0,$.jsx)(w2,{}),CloudOutlined:(0,$.jsx)(z2,{}),StarOutlined:(0,$.jsx)(y8,{}),TrophyOutlined:(0,$.jsx)(k8,{}),ThunderboltOutlined:(0,$.jsx)(T8,{}),BulbOutlined:(0,$.jsx)(x2,{}),CoffeeOutlined:(0,$.jsx)(Z2,{}),CrownOutlined:(0,$.jsx)(l4,{}),DashboardOutlined:(0,$.jsx)(f4,{}),FlagOutlined:(0,$.jsx)(I4,{}),GlobalOutlined:(0,$.jsx)(e3,{}),GiftOutlined:(0,$.jsx)(Z4,{}),LaptopOutlined:(0,$.jsx)(v3,{}),MobileOutlined:(0,$.jsx)(Z3,{}),MonitorOutlined:(0,$.jsx)(e6,{}),PayCircleOutlined:(0,$.jsx)(h6,{}),PictureOutlined:(0,$.jsx)(w6,{}),PlayCircleOutlined:(0,$.jsx)(N6,{}),SafetyOutlined:(0,$.jsx)(e8,{}),ShoppingOutlined:(0,$.jsx)(lie,{}),SmileOutlined:(0,$.jsx)(m8,{}),SoundOutlined:(0,$.jsx)(_8,{}),TagOutlined:(0,$.jsx)(Sie,{}),TeamOutlined:(0,$.jsx)(C8,{}),ToolOutlined:(0,$.jsx)(Eie,{}),TruckOutlined:(0,$.jsx)(jie,{}),VideoCameraOutlined:(0,$.jsx)(R8,{}),WalletOutlined:(0,$.jsx)(B8,{}),BankOutlined:(0,$.jsx)(o2,{}),BuildOutlined:(0,$.jsx)(v2,{}),ExperimentOutlined:(0,$.jsx)(x4,{}),HighlightOutlined:(0,$.jsx)(o3,{}),IdcardOutlined:(0,$.jsx)(f3,{}),MedicineBoxOutlined:(0,$.jsx)(H3,{}),ReadOutlined:(0,$.jsx)(z6,{}),RestOutlined:(0,$.jsx)(H6,{}),SketchOutlined:(0,$.jsx)(die,{}),SolutionOutlined:(0,$.jsx)(gie,{})},_se=()=>{let[e,t]=(0,S.useState)(!1),[n]=mH.useForm(),r=Ye(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=c7(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),v5().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:p7[t%p7.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`垂直行业提示词智能优化(新手专属,一键生成标准素材)`}),(0,$.jsxs)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(TV,{}),onClick:()=>r(`/records`),size:`large`,style:{background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`,fontWeight:600,borderRadius:10,height:42},children:`项目记录`}),(0,$.jsx)(X,{icon:(0,$.jsx)(VI,{}),onClick:()=>t(!0),size:`large`,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`,fontWeight:600,borderRadius:10,height:42,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`},children:`新建项目`})]})]}),i.length===0?(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(VI,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:m7[u[e.industry]?.icon]||(0,$.jsx)(L0,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(vQ,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(vB,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,u7(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(N6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(jG,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(MQ,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Vg,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(DG,{title:(0,$.jsxs)(bV,{children:[(0,$.jsx)(L0,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(mH,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(mH.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(YU,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(mX,{}),size:`large`})}),(0,$.jsx)(mH.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(VC,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(VC.Option,{value:e.key,children:(0,$.jsxs)(bV,{children:[m7[e.icon]||(0,$.jsx)(L0,{}),` `,e.label]})},e.key))})})]})})]})};async function h7(e){try{if(navigator.clipboard&&typeof navigator.clipboard.writeText==`function`)return await navigator.clipboard.writeText(e),!0;let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`0`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}var{Text:g7}=Q,vse={real_person:{title:`选择真人素材库`,empty:`暂无可选 Active 真人素材`,projectError:`加载真人素材项目失败`,assetError:`加载真人素材失败`,fallbackName:`真人素材`},aigc_virtual:{title:`选择虚拟素材库`,empty:`暂无可选 Active 虚拟素材`,projectError:`加载虚拟素材项目失败`,assetError:`加载虚拟素材失败`,fallbackName:`虚拟素材`}},_7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,yse=e=>e.assetType===`Video`?_7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.providerUrl):_7(`static`+(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.providerUrl)+`?w=300&q=50`),bse=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},v7=({open:e,libraryType:t=`real_person`,selectedIds:n=[],maxCount:r=20,onClose:i,onSelect:a,maxImageCount:o,maxVideoCount:s,usedImageCount:c,usedVideoCount:l,usedVideoDuration:u,maxVideoDuration:d,accept:f})=>{let p=vse[t],[m,h]=(0,S.useState)([]),[g,_]=(0,S.useState)(),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(f===`image/*`?`Image`:void 0),[C,w]=(0,S.useState)([]),[T,E]=(0,S.useState)(new Map),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),j=(0,S.useMemo)(()=>new Set(T.keys()),[T]),M=async()=>{O(!0);try{let e=(await(t===`aigc_virtual`?Q5:X5)({page:1,pageSize:100,status:`active`})).items||[];h(e),_(t=>t&&e.some(e=>e.id===t)?t:e[0]?.id)}catch(e){Z.error(e?.message||p.projectError)}finally{O(!1)}},N=async()=>{A(!0);try{w((await(t===`aigc_virtual`?Roe:Moe)({projectId:g,keyword:v.trim()||void 0,assetType:b,page:1,pageSize:100})).items||[])}catch(e){Z.error(e?.message||p.assetError)}finally{A(!1)}};(0,S.useEffect)(()=>{e&&setTimeout(()=>{E(new Map),y(``),x(void 0),_(void 0),w([]),M()},0)},[e,t]),(0,S.useEffect)(()=>{g&&setTimeout(()=>{N()},0)},[g,b]);let P=e=>{if(n.includes(e.id)){Z.info(`该素材已添加`);return}if(f===`image/*`&&e.assetType===`Video`){Z.warning(`当前仅支持选择图片素材`);return}E(t=>{let n=new Map(t);return n.has(e.id)?(n.delete(e.id),n):n.size>=r?(Z.warning(`最多选择 ${r} 个参考素材`),t):(n.set(e.id,e),n)})},F=(0,S.useMemo)(()=>{let e=Array.from(T.values()).filter(e=>e.assetType===`Image`).length,t=Array.from(T.values()).filter(e=>e.assetType===`Video`).length,n=Array.from(T.values()).filter(e=>e.assetType===`Video`).reduce((e,t)=>e+(t.videoDuration||0),0),r=o!==void 0&&c!==void 0?o-c:1/0,i=s!==void 0&&l!==void 0?s-l:1/0,a=d!==void 0&&u!==void 0?d-u:1/0;return e>r||t>i||n>a},[T,o,c,s,l,d,u]);return(0,$.jsxs)(DG,{title:`${p.title}`,open:e,onCancel:i,width:920,destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:i,children:`取消`},`cancel`),(0,$.jsxs)(X,{type:`primary`,onClick:()=>{let e=Array.from(T.values()).filter(e=>!n.includes(e.id));if(!e.length){Z.warning(`请选择至少一个${t===`aigc_virtual`?`虚拟`:`真人`}素材`);return}a(e),i()},disabled:F,style:{background:F?`#94a3b8`:`#8b5cf6`,opacity:F?.6:1,cursor:F?`not-allowed`:`pointer`},children:[`添加选中素材(`,T.size,`)`]},`ok`)],children:[f!==`image/*`&&(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:20,marginBottom:16,padding:`12px 16px`,background:`#fafafa`,borderRadius:8},children:(()=>{let e=Array.from(T.values()).filter(e=>e.assetType===`Image`).length,t=Array.from(T.values()).filter(e=>e.assetType===`Video`).length,n=Array.from(T.values()).filter(e=>e.assetType===`Video`).reduce((e,t)=>e+(t.videoDuration||0),0),r=o!==void 0&&c!==void 0?o-c:1/0,i=s!==void 0&&l!==void 0?s-l:1/0,a=d!==void 0&&u!==void 0?d-u:1/0,f=e>r,p=t>i,m=n>a;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:f?`#ef4444`:`#64748b`,fontWeight:f?600:400},children:[`还可选取图片 `,e,`/`,o!==void 0&&c!==void 0?o-c:`-`,` 张`]}),(0,$.jsxs)(`span`,{style:{fontSize:13,color:p||m?`#ef4444`:`#64748b`,fontWeight:p||m?600:400},children:[`视频还可选取 `,t,`/`,s!==void 0&&l!==void 0?s-l:`-`,` 个(`,n.toFixed(1),`/`,d!==void 0&&u!==void 0?(d-u).toFixed(1):`-`,`秒)`]})]})})()}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`240px 1fr`,gap:16,height:500},children:[(0,$.jsxs)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,background:`#fafafa`,overflowY:`auto`,height:`100%`},children:[(0,$.jsxs)(bV,{style:{width:`100%`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(g7,{strong:!0,children:`项目组`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(LK,{}),onClick:M,loading:D})]}),(0,$.jsx)(nG,{spinning:D,children:m.length===0?(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:`暂无项目组`}):(0,$.jsx)(`div`,{children:m.map(e=>(0,$.jsx)(`div`,{onClick:()=>_(e.id),style:{cursor:`pointer`,padding:`10px 12px`,borderRadius:10,marginBottom:6,border:g===e.id?`1px solid #8b5cf6`:`1px solid transparent`,background:g===e.id?`#f5f3ff`:`#fff`},children:(0,$.jsxs)(`div`,{style:{width:`100%`},children:[(0,$.jsx)(g7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),(0,$.jsx)(g7,{type:`secondary`,style:{fontSize:12},children:typeof e.activeImageAssetCount==`number`||typeof e.activeVideoAssetCount==`number`?` 图 ${e.activeImageAssetCount||0} / 视 ${e.activeVideoAssetCount||0}`:``})]})},e.id))})})]}),(0,$.jsxs)(`div`,{style:{overflowY:`auto`,height:`100%`},children:[(0,$.jsxs)(bV,{style:{width:`100%`,marginBottom:12},children:[(0,$.jsx)(YU,{allowClear:!0,prefix:(0,$.jsx)(IC,{}),placeholder:`搜索素材名称`,value:v,onChange:e=>y(e.target.value),onPressEnter:N}),(0,$.jsx)(VC,{allowClear:f!==`image/*`,placeholder:`素材类型`,value:b,onChange:x,style:{width:116},options:f===`image/*`?[{value:`Image`,label:`图片`}]:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{icon:(0,$.jsx)(LK,{}),onClick:N,loading:k,children:`刷新`})]}),(0,$.jsx)(nG,{spinning:k,children:C.length===0?(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:p.empty,style:{marginTop:120}}):(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(140px, 1fr))`,gap:12,maxHeight:420,overflowY:`auto`,paddingRight:4},children:C.filter(e=>f!==`image/*`||e.assetType===`Image`).map(e=>{let t=j.has(e.id)||n.includes(e.id),r=n.includes(e.id),i=yse(e),a=e.assetType===`Video`;return(0,$.jsxs)(`div`,{onClick:()=>P(e),style:{cursor:r?`not-allowed`:`pointer`,border:t?`2px solid #8b5cf6`:`1px solid #edf0f5`,borderRadius:12,overflow:`hidden`,background:`#fff`,boxShadow:t?`0 8px 20px rgba(139,92,246,0.18)`:`0 4px 12px rgba(15,23,42,0.04)`,opacity:r?.62:1,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{aspectRatio:`1 / 1`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[i?a?(0,$.jsx)(`video`,{src:i,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:i,alt:e.name||p.fallbackName,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):a?(0,$.jsx)(R8,{style:{fontSize:32,color:`#94a3b8`}}):(0,$.jsx)(w6,{style:{fontSize:32,color:`#94a3b8`}}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:8,bottom:8,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:bse(e.videoDuration)})]}),t&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:24,height:24,borderRadius:12,background:`#8b5cf6`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(AC,{})}),(0,$.jsxs)(`div`,{style:{padding:10},children:[(0,$.jsx)(g7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name||`未命名素材`}),(0,$.jsxs)(bV,{wrap:!0,size:4,style:{marginTop:6},children:[(0,$.jsx)(vQ,{color:a?`blue`:`default`,children:a?`视频`:`图片`}),(0,$.jsx)(vQ,{children:e.projectName})]})]})]},e.id)})})})]})]})]})},y7=({src:e,size:t=`normal`})=>{let n=(0,S.useRef)(null),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(1),[d,f]=(0,S.useState)(!1),p=e=>`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`,m=(0,S.useCallback)(()=>{n.current&&(r?n.current.pause():n.current.play(),i(!r))},[r]),h=(0,S.useCallback)(()=>{n.current&&o(n.current.currentTime)},[]),g=(0,S.useCallback)(()=>{n.current&&c(n.current.duration)},[]),_=(0,S.useCallback)(()=>{i(!1),o(0)},[]),v=(0,S.useCallback)(e=>{if(!n.current||s===0)return;let t=e.currentTarget.getBoundingClientRect(),r=(e.clientX-t.left)/t.width*s;n.current.currentTime=r,o(r)},[s]),y=(0,S.useCallback)(e=>{if(!n.current)return;let t=parseFloat(e.target.value);n.current.volume=t,u(t),f(t===0)},[]),b=(0,S.useCallback)(()=>{n.current&&(d?(n.current.volume=l||.5,f(!1)):(n.current.volume=0,f(!0)))},[d,l]);(0,S.useEffect)(()=>{let e=n.current;if(e)return e.addEventListener(`timeupdate`,h),e.addEventListener(`loadedmetadata`,g),e.addEventListener(`ended`,_),()=>{e.removeEventListener(`timeupdate`,h),e.removeEventListener(`loadedmetadata`,g),e.removeEventListener(`ended`,_)}},[h,g,_]);let x=s>0?a/s*100:0;return(0,$.jsxs)(`div`,{style:{width:`100%`,height:t===`small`?130:112,background:`#f1f5f9`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:t===`small`?`16px 16px`:`12px 16px`},children:[(0,$.jsx)(`audio`,{ref:n,src:e}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,width:`100%`},children:[(0,$.jsx)(`button`,{onClick:m,style:{width:48,height:48,borderRadius:`50%`,background:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,border:`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,flexShrink:0},children:r?(0,$.jsx)(l6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(N6,{style:{fontSize:24,color:`#fff`,marginLeft:2}})}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:8},children:[(0,$.jsxs)(`div`,{onClick:v,style:{height:5,background:`#e2e8f0`,borderRadius:10,cursor:`pointer`,overflow:`visible`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{height:`100%`,width:`${x}%`,background:`linear-gradient(90deg, #8b5cf6, #a78bfa)`,borderRadius:10,transition:`width 0.1s linear`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,left:`${x}%`,top:`50%`,transform:`translate(-50%, -50%)`,width:t===`small`?12:14,height:t===`small`?12:14,background:`#fff`,borderRadius:`50%`,boxShadow:`0 2px 6px rgba(0,0,0,0.15)`,opacity:+(x>0),transition:`opacity 0.2s`}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{fontSize:t===`small`?11:12,color:`#64748b`},children:p(a)}),(0,$.jsx)(`span`,{style:{fontSize:t===`small`?11:12,color:`#64748b`},children:p(s)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0},children:[(0,$.jsx)(`button`,{onClick:b,style:{border:`none`,background:`transparent`,cursor:`pointer`,padding:0},children:d?(0,$.jsx)(I2,{style:{fontSize:t===`small`?14:16,color:`#94a3b8`}}):(0,$.jsx)(_8,{style:{fontSize:t===`small`?14:16,color:`#94a3b8`}})}),(0,$.jsx)(`input`,{type:`range`,min:`0`,max:`1`,step:`0.1`,value:d?0:l,onChange:y,style:{width:t===`small`?40:50,height:4,borderRadius:2,appearance:`none`,background:`#e2e8f0`,cursor:`pointer`}})]})]})]})},{Text:b7}=Q,x7=e=>{if(!e)return``;if(/^data:|blob:/i.test(e))return e;if(/^https?:\/\//i.test(e)){let t=new URL(e);return t.pathname.startsWith(`/uploads`)?t.pathname+t.search:e}return`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`},S7=(e,t)=>{if(e<300||e>6e3)return`图片宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`图片高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;return n<.4||n>2.5?`图片宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`:null},C7=(e,t)=>{if(e<300||e>6e3)return`视频宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`视频高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;if(n<.4||n>2.5)return`视频宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`;let r=e*t;return r<409600?`视频总像素数过小(${e}×${t}=${r}),需 ≥ 640×640=409600`:r>8295044?`视频总像素数过大(${e}×${t}=${r}),需 ≤ 3326×2494=8295044`:null},xse=e=>{let t=e,n=t.width||t.videoWidth||t.imageWidth||0,r=t.height||t.videoHeight||t.imageHeight||0;if(e.resourceType===`image`){if(n>0&&r>0)return S7(n,r)}else if(e.resourceType===`video`&&n>0&&r>0)return C7(n,r);return null},Sse=e=>new Promise(t=>{let n=new Image;n.onload=()=>{t({width:n.width,height:n.height})},n.onerror=()=>{t({width:0,height:0})},n.src=e}),Cse=e=>e===`video`?(0,$.jsx)(R8,{}):e===`audio`?(0,$.jsx)(Q0,{}):(0,$.jsx)(w6,{}),wse=e=>e===`video`?`视频`:e===`audio`?`音频`:`图片`,Tse=({open:e,onClose:t,onSelect:n,allowedTypes:r,selectedIds:i=[],title:a=`选择历史上传素材`,maxImageCount:o,maxVideoCount:s,usedImageCount:c,usedVideoCount:l,maxVideoDuration:u,usedVideoDuration:d,maxAudioCount:f,usedAudioCount:p,maxAudioDuration:m,usedAudioDuration:h,hideLimitHint:g,defaultResourceType:_})=>{let[v,y]=(0,S.useState)(_||``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(1),[T,E]=(0,S.useState)(10),[D,O]=(0,S.useState)(1),[k,A]=(0,S.useState)(8),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)(!1),[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(0),[z,B]=(0,S.useState)(``),[V,H]=(0,S.useState)([]),[U,ee]=(0,S.useState)(0),[W,te]=(0,S.useState)(new Map),G=(0,S.useMemo)(()=>new Set(i),[i]),ne=(0,S.useMemo)(()=>new Set(r||[`image`,`video`,`audio`]),[JSON.stringify(r)]),K=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`image`).length,[W]),re=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`video`).length,[W]),ie=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`video`).reduce((e,t)=>e+(t.durationSeconds||0),0),[W]),ae=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`audio`).length,[W]),q=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`audio`).reduce((e,t)=>e+(t.durationSeconds||0),0),[W]),oe=(0,S.useMemo)(()=>o!==void 0&&c!==void 0?o-c:1/0,[o,c]),se=(0,S.useMemo)(()=>s!==void 0&&l!==void 0?s-l:1/0,[s,l]),ce=(0,S.useMemo)(()=>u!==void 0&&d!==void 0?u-d:1/0,[u,d]),le=(0,S.useMemo)(()=>f!==void 0&&p!==void 0?f-p:1/0,[f,p]),ue=(0,S.useMemo)(()=>m!==void 0&&h!==void 0?m-h:1/0,[m,h]),de=(0,S.useMemo)(()=>K>oe,[K,oe]),fe=(0,S.useMemo)(()=>re>se,[re,se]),pe=(0,S.useMemo)(()=>ie>ce,[ie,ce]),me=(0,S.useMemo)(()=>ae>le,[ae,le]),he=(0,S.useMemo)(()=>q>ue,[q,ue]),ge=(0,S.useCallback)(async()=>{if(e){P(!0);try{let e=await q5({resourceType:v||void 0,keyword:b||void 0,page:C,pageSize:T,scene:`picker`});I(C===1?e.groups||[]:t=>[...t,...e.groups||[]]),R(e.totalDays||0)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),C===1&&I([]),R(0)}finally{P(!1)}}},[ne,b,e,C,T,v]),_e=(0,S.useCallback)(async e=>{M(!0);try{let t=await J5(e,{resourceType:v||void 0,keyword:b||void 0,page:D,pageSize:8,scene:`picker`});H((t.items||[]).filter(e=>ne.has(e.resourceType))),ee(t.total||0)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),H([]),ee(0)}finally{M(!1)}},[ne,b,D,k,v]);(0,S.useEffect)(()=>{e&&ge()},[e,C,ge]),(0,S.useEffect)(()=>{z&&O(1)},[z]),(0,S.useEffect)(()=>{z&&_e(z)},[z,D,_e]),(0,S.useEffect)(()=>{e&&te(new Map)},[e]),(0,S.useEffect)(()=>{e&&(y(_||``),w(1))},[e,_]);let ve=async e=>{if(G.has(e.id)){Z.warning(`该素材已经在参考内容中`);return}let t=e,n=t.width||t.videoWidth||t.imageWidth||0,r=t.height||t.videoHeight||t.imageHeight||0;if(e.resourceType===`image`){if(n<=0||r<=0){let t=x7(e.previewUrl||e.displayUrl||e.resourceUrl);if(t){let e=await Sse(t);n=e.width,r=e.height}}if(n>0&&r>0){let t=S7(n,r);if(t){Z.error(`${e.fileName||`图片`}:${t}`);return}}}else if(e.resourceType===`video`&&n>0&&r>0){let t=C7(n,r);if(t){Z.error(`${e.fileName||`视频`}:${t}`);return}}te(t=>{let n=new Map(t);return n.has(e.id)?n.delete(e.id):n.set(e.id,e),n})},ye=()=>{let e=Array.from(W.values());if(e.length===0){Z.warning(`请先选择历史素材`);return}n(e),te(new Map),t()},be=(0,S.useMemo)(()=>[{label:`全部`,value:``},{label:`图片`,value:`image`},{label:`视频`,value:`video`},{label:`音频`,value:`audio`}].filter(e=>!e.value||ne.has(e.value)),[ne]);return(0,$.jsxs)(DG,{title:a,open:e,onCancel:t,width:1e3,centered:!0,destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:t,children:`取消`},`cancel`),(0,$.jsxs)(X,{type:`primary`,onClick:ye,style:{background:`#8b5cf6`},disabled:de||fe||pe||me||he,children:[`应用选择 (`,W.size,`)`]},`ok`)],children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(bV,{wrap:!0,children:[(0,$.jsx)(VC,{value:v,options:be,style:{width:120},onChange:e=>{y(e),w(1)}}),(0,$.jsx)(YU,{allowClear:!0,value:b,prefix:(0,$.jsx)(IC,{}),placeholder:`搜索文件名`,style:{width:220},onChange:e=>x(e.target.value),onPressEnter:()=>{w(1),ge()}}),(0,$.jsx)(X,{icon:(0,$.jsx)(LK,{}),onClick:ge,children:`刷新`})]}),!g&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginTop:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:de?`#ef4444`:`#64748b`,fontWeight:de?600:400},children:[`还可选取图片 `,K,`/`,o!==void 0&&c!==void 0?o-c:`-`,` 张`]}),(0,$.jsxs)(`span`,{style:{fontSize:13,color:fe||pe?`#ef4444`:`#64748b`,fontWeight:fe||pe?600:400},children:[`视频还可选取 `,re,`/`,s!==void 0&&l!==void 0?s-l:`-`,` 个(`,ie.toFixed(1),`/`,u!==void 0&&d!==void 0?(u-d).toFixed(1):`-`,`秒)`]}),f!==void 0&&(0,$.jsxs)(`span`,{style:{fontSize:13,color:me||he?`#ef4444`:`#64748b`,fontWeight:me||he?600:400},children:[`音频还可选取 `,ae,`/`,f!==void 0&&p!==void 0?f-p:`-`,` 个(`,q.toFixed(1),`/`,m!==void 0&&h!==void 0?(m-h).toFixed(1):`-`,`秒)`]})]})]}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`240px 1fr`,gap:16,height:500},children:[(0,$.jsxs)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,background:`#fafafa`,overflowY:`auto`},children:[(0,$.jsx)(b7,{strong:!0,style:{fontSize:14},children:`日期列表`}),(0,$.jsx)(nG,{spinning:N,children:F.length===0?(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:`暂无日期`,style:{padding:`40px 0`}}):(0,$.jsxs)(`div`,{style:{marginTop:12},children:[F.map(e=>(0,$.jsxs)(`div`,{onClick:()=>B(e.generatedDate),style:{padding:`10px 12px`,borderRadius:10,marginBottom:6,cursor:`pointer`,border:z===e.generatedDate?`1px solid #8b5cf6`:`1px solid transparent`,background:z===e.generatedDate?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(`div`,{style:{fontSize:13,fontWeight:500,color:`#334155`},children:e.generatedDate}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:[`共 `,e.total,` 个素材`]})]},e.generatedDate)),L>F.length&&(0,$.jsx)(`div`,{style:{marginTop:12,textAlign:`center`},children:(0,$.jsx)(X,{size:`small`,onClick:()=>w(C+1),children:`加载更多`})})]})})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,overflowY:`auto`},children:(0,$.jsx)(nG,{spinning:j,children:z?V.length===0?(0,$.jsx)(dC,{description:`该日期暂无可复用的历史上传素材`,style:{padding:`48px 0`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(150px, 1fr))`,gap:14},children:V.map(e=>{let t=W.has(e.id),n=G.has(e.id),r=xse(e),i=n||!!r,a=e.previewUrl||e.displayUrl||e.resourceUrl,o=x7(e.resourceType===`image`?`static`+a+`?w=300&q=50`:a);return(0,$.jsxs)(`div`,{onClick:()=>!i&&ve(e),style:{position:`relative`,borderRadius:14,border:t?`2px solid #8b5cf6`:`1px solid #e2e8f0`,background:i?`#f8fafc`:`#fff`,opacity:i?.55:1,cursor:i?`not-allowed`:`pointer`,overflow:`hidden`,boxShadow:t?`0 10px 24px rgba(139, 92, 246, 0.18)`:`0 6px 18px rgba(15,23,42,0.06)`},title:r||void 0,children:[(0,$.jsx)(`div`,{style:{background:`#f1f5f9`},children:e.resourceType===`image`?(0,$.jsx)(`img`,{src:o,alt:e.fileName||e.id,style:{width:`100%`,height:130,objectFit:`cover`}}):e.resourceType===`video`?(0,$.jsx)(`video`,{src:o,muted:!0,style:{width:`100%`,height:130,objectFit:`cover`}}):(0,$.jsx)(y7,{src:o,size:`small`})}),(0,$.jsxs)(`div`,{style:{padding:10},children:[(0,$.jsxs)(bV,{size:6,style:{marginBottom:6},children:[(0,$.jsx)(vQ,{color:`purple`,icon:Cse(e.resourceType),style:{margin:0},children:wse(e.resourceType)}),e.durationSeconds?(0,$.jsxs)(vQ,{style:{margin:0},children:[Number(e.durationSeconds).toFixed(1),`s`]}):null,r&&(0,$.jsx)(vQ,{color:`red`,style:{margin:0},children:`尺寸不符`})]}),(0,$.jsx)(b7,{ellipsis:!0,style:{display:`block`,fontSize:13,color:`#334155`},title:e.fileName||e.id,children:e.fileName||e.id}),(0,$.jsx)(b7,{type:`secondary`,style:{fontSize:12},children:e.moduleLabel||`普通上传`})]}),t&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:24,height:24,borderRadius:12,background:`#8b5cf6`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(AC,{})}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8},children:(0,$.jsx)(vQ,{children:`已选`})}),r&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`rgba(239, 68, 68, 0.9)`,color:`#fff`,padding:`4px 8px`,fontSize:11,textAlign:`center`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:r})]},e.id)})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16,paddingBottom:8},children:(0,$.jsx)(FW,{current:D,pageSize:k,total:U,showSizeChanger:!0,pageSizeOptions:[8],onChange:(e,t)=>{O(e),A(t)}})})]}):(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:`请选择日期`,style:{padding:`80px 0`}})})})]})]})},w7=({children:e,accept:t=`image/*,video/*`,multiple:n=!0,onLocalSelect:r,onHistorySelect:i,onPortraitSelect:a,onPortraitLibrarySelect:o,uploading:s,tooltipTitle:c,maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,usedVideoDuration:p,maxVideoDuration:m,maxAudioCount:h,usedAudioCount:g,maxAudioDuration:_,usedAudioDuration:v,hideLimitHint:y,mediaType:b})=>{let x=(0,S.useRef)(null),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(`real_person`),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(!1),N=()=>{A(!1),x.current?.click()},P=e=>{let t=e.target.files;t&&r&&r(Array.from(t)),x.current&&(x.current.value=``)},F=e=>{if(A(!1),a){E(e),w(!0);return}if(o){o(e);return}E(e),w(!0)},I=(0,$.jsxs)(`div`,{style:{padding:`4px 0`,minWidth:180},children:[(0,$.jsxs)(`div`,{onClick:()=>{N()},style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(mX,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`本地上传`})]}),(0,$.jsxs)(`div`,{onClick:()=>{A(!1),O(!0)},style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(h4,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`从资产中选择`})]}),b!==`image`&&(0,$.jsxs)(`div`,{onClick:()=>F(`real_person`),style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(F8,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`真人素材库`})]}),b!==`image`&&(0,$.jsxs)(`div`,{onClick:()=>F(`aigc_virtual`),style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(C8,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`虚拟素材库`})]})]});return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`input`,{ref:x,type:`file`,accept:t,multiple:n,onChange:P,style:{display:`none`}}),c?(0,$.jsx)(jw,{title:c,children:(0,$.jsx)(zw,{content:I,open:k,onOpenChange:A,trigger:`click`,placement:`bottomLeft`,children:(0,$.jsx)(`div`,{style:{cursor:s?`not-allowed`:`pointer`},children:e})})}):(0,$.jsx)(zw,{content:I,open:k,onOpenChange:A,trigger:`click`,placement:`bottomLeft`,children:(0,$.jsx)(`div`,{style:{cursor:s?`not-allowed`:`pointer`},children:e})}),(0,$.jsx)(Tse,{open:D,onClose:()=>O(!1),onSelect:e=>{i?.(e),O(!1)},allowedTypes:t.includes(`audio`)?[`image`,`video`,`audio`]:[`image`,`video`],maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,maxVideoDuration:m,usedVideoDuration:p,maxAudioCount:h,usedAudioCount:g,maxAudioDuration:_,usedAudioDuration:v,hideLimitHint:y,defaultResourceType:b===`image`?`image`:``}),(0,$.jsx)(v7,{open:C,libraryType:T,onClose:()=>w(!1),onSelect:e=>{a?.(e),w(!1)},accept:t,maxCount:t===`image/*`&&!n?1:void 0,maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,usedVideoDuration:p,maxVideoDuration:m})]})};function Ese(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var Dse={prompt_processing:`optimizing`,ready:`prompt_optimized`,generating:`generating`,success:`completed`,failure:`failed`},Ose=new Set([`pending`,`optimizing`,`generating`]),T7=new Set([`queued`,`preparing`,`creating_provider_task`,`provider_result_staged`,`waiting_remote`,`polling`,`result_ready`,`download_queued`,`downloading`,`retry_waiting`,`recovery_inconsistent`,`upscale_queued`,`upscale_processing`,`upscale_polling`,`upscale_downloading`,`upscale_finalizing`,`upscale_retry_waiting`]),E7=new Set([`completed`,`done`]),D7=new Set([`failed`,`timeout`,`download_failed`,`upscale_failed`]),kse=new Set([...E7,...D7,`deleted`]),Ase={pending:`待处理`,optimizing:`提词处理中`,prompt_optimized:`待生成`,generating:`生成中`,queued:`生成中`,preparing:`生成中`,creating_provider_task:`生成中`,provider_result_staged:`生成中`,waiting_remote:`生成中`,polling:`生成中`,result_ready:`生成中`,download_queued:`生成中`,downloading:`生成中`,retry_waiting:`生成中`,recovery_inconsistent:`生成中`,upscale_queued:`生成中`,upscale_processing:`生成中`,upscale_polling:`生成中`,upscale_downloading:`生成中`,upscale_finalizing:`生成中`,upscale_retry_waiting:`生成中`,completed:`成功`,done:`成功`,timeout:`失败`,download_failed:`失败`,upscale_failed:`失败`,failed:`失败`,deleted:`已删除`},jse={pending:`default`,optimizing:`processing`,prompt_optimized:`blue`,generating:`processing`,queued:`processing`,preparing:`processing`,creating_provider_task:`processing`,provider_result_staged:`processing`,waiting_remote:`processing`,polling:`processing`,result_ready:`processing`,download_queued:`processing`,downloading:`processing`,retry_waiting:`orange`,recovery_inconsistent:`orange`,upscale_queued:`purple`,upscale_processing:`purple`,upscale_polling:`purple`,upscale_downloading:`purple`,upscale_finalizing:`purple`,upscale_retry_waiting:`orange`,completed:`success`,done:`success`,failed:`error`,timeout:`error`,download_failed:`error`,upscale_failed:`error`,deleted:`default`},O7=e=>String(e||``).trim().toLowerCase(),Mse=e=>{let t=O7(e);return Ase[t]||t||`未知状态`},Nse=e=>jse[O7(e)]||`default`,k7=e=>{let t=O7(e.status),n=O7(e.displayStatus),r=O7(e.pipelineStage),i=Dse[O7(e.clientStatus)]||``,a=i||n||t||r||`pending`;D7.has(r)||D7.has(t)||D7.has(n)?a=D7.has(r)?r:D7.has(t)?t:n:E7.has(t)||E7.has(n)?a=E7.has(t)?t:n:!i&&r&&T7.has(r)&&(a=r);let o=D7.has(a),s=E7.has(a),c=typeof e.shouldPoll==`boolean`?e.shouldPoll:!o&&!s&&(Ose.has(t)||T7.has(r)),l=c;return{status:t,displayStatus:n,pipelineStage:r,effectiveKey:a,label:Mse(a),color:Nse(a),isActive:l,isSuccess:s,isFailure:o,isTerminal:kse.has(a),canGenerate:typeof e.canGenerate==`boolean`?e.canGenerate:t===`prompt_optimized`,canRetry:typeof e.canRetry==`boolean`?e.canRetry:o,shouldPoll:c}},A7=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:`#fff`,border:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#374151`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(_Z,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,Vi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,maxHeight:200,overflowY:`auto`,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Pse=({group:e,groupName:t,selected:n,expanded:r,onToggle:i,onSelect:a,onClose:o})=>{let s=(0,S.useRef)(null),c=(0,S.useRef)(null),l=(0,S.useRef)(r),[u,d]=(0,S.useState)(null);return l.current=r,(0,S.useEffect)(()=>{if(r&&s.current){let e=s.current.getBoundingClientRect();d({bottom:window.innerHeight-e.top+4,left:e.left})}else d(null)},[r]),(0,S.useEffect)(()=>{if(!r)return;let e=e=>{s.current?.contains(e.target)||c.current?.contains(e.target)||l.current&&o()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[r,o]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:s,onClick:()=>i(t),style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:`#ffffffff`,border:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#374151`,fontWeight:500,lineHeight:`18px`},children:n||e.name}),(0,$.jsx)(_Z,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:r?`rotate(180deg)`:`rotate(0deg)`}})]}),u&&(0,Vi.createPortal)((0,$.jsxs)(`div`,{ref:c,style:{position:`fixed`,bottom:u.bottom,left:u.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,r)=>{let i=n===e;return(0,$.jsx)(`div`,{onClick:()=>{a(e,t),o()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:i?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:i?`#fff`:`#1a1a2e`,fontWeight:i?600:400},onMouseEnter:e=>{i||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{i||(e.currentTarget.style.background=`transparent`)},children:e},r)})})]}),document.body)]})},j7=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(N6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},Fse=()=>{let{projectId:e}=$e(),t=Ye(),[n]=mH.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c,retryGeneration:l}=c7(),u=i.items,{user:d}=e7(),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(!1),[C,w]=(0,S.useState)({}),[T,E]=(0,S.useState)({}),[D,O]=(0,S.useState)({}),[k,A]=(0,S.useState)({}),[j,M]=(0,S.useState)({}),N=(0,S.useRef)(null),P=(0,S.useCallback)(e=>{if(!e)return 0;let t=new Date(e).getTime(),n=(Date.now()-t)/1e3;return n>=180?99:Math.min(99,n*.6)},[]);(0,S.useEffect)(()=>{let e=Object.entries(T).filter(([,e])=>e===`generating`).map(([e])=>e);if(e.length===0){N.current&&=(clearInterval(N.current),null);return}let t=()=>{e.forEach(e=>{let t=c7.getState().records.items.find(t=>t.id===e);if(t?.createdAt){let n=P(t.createdAt);O(t=>({...t,[e]:n})),A(t=>({...t,[e]:n}))}})};return t(),N.current=window.setInterval(t,1e3),()=>{N.current&&=(clearInterval(N.current),null)}},[T,P]),(0,S.useEffect)(()=>{Object.entries(T).forEach(([e,t])=>{if(t===`done`&&!j[e]){M(t=>({...t,[e]:!0}));let t=k[e]||0,n=Date.now(),r=()=>{let i=Date.now()-n,a=Math.min(i/800,1),o=1-(1-a)**3,s=t+(100-t)*o;A(t=>({...t,[e]:s})),a<1&&requestAnimationFrame(r)};requestAnimationFrame(r)}})},[T]),(0,S.useEffect)(()=>{Object.entries(T).forEach(([e,t])=>{if(t===`generating`){let t=c7.getState().records.items.find(t=>t.id===e);if(t?.createdAt){let n=P(t.createdAt);O(t=>({...t,[e]:n})),A(t=>({...t,[e]:n}))}}})},[g]);let[F,I]=(0,S.useState)({}),[L,R]=(0,S.useState)(null),[z,B]=(0,S.useState)(null),[V,H]=(0,S.useState)([]),[U,ee]=(0,S.useState)(!1),[W,te]=(0,S.useState)(``),[G,ne]=(0,S.useState)(!1),[K,re]=(0,S.useState)(``),ie=(0,S.useRef)(null),[ae,q]=(0,S.useState)({}),[oe,se]=(0,S.useState)({}),[ce,le]=(0,S.useState)({}),[ue,de]=(0,S.useState)(null),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)(5),[ge,_e]=(0,S.useState)(`9:16`),[ve,ye]=(0,S.useState)(`720p`),[be,xe]=(0,S.useState)([]),[Se,Ce]=(0,S.useState)([]),[we,Te]=(0,S.useState)(``),[Ee,De]=(0,S.useState)(!1),[Oe,ke]=(0,S.useState)(null),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]});(0,S.useMemo)(()=>Me.durations.map(e=>`${e}`),[Me.durations]),(0,S.useCallback)(()=>{ke(e=>e===`duration`?null:`duration`)},[]),(0,S.useCallback)(()=>{ke(null)},[]);let Pe=(0,S.useCallback)(e=>{de(t=>t===e?null:e)},[]),Fe=(0,S.useCallback)(()=>{de(null)},[]);(0,S.useCallback)(e=>{he(parseInt(e))},[]);let Ie=(0,S.useCallback)((e,t)=>{le(n=>{let r={...n};return r[t]===e?delete r[t]:r[t]=e,r})},[]),[Le,Re]=(0,S.useState)(0),[ze,Be]=(0,S.useState)(0),[Ve,He]=(0,S.useState)(`video`),[Ue,We]=(0,S.useState)(`1:1`),[Ge,Ke]=(0,S.useState)(`2K`),[qe,Je]=(0,S.useState)(2048),[Xe,Ze]=(0,S.useState)(2048),[Qe,et]=(0,S.useState)(!1),[tt,nt]=(0,S.useState)([]),[rt,it]=(0,S.useState)([]),[at,ot]=(0,S.useState)([]),st=(e,t)=>{if(e<300||e>6e3)return`图片宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`图片高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;return n<.4||n>2.5?`图片宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`:null},ct=(e,t)=>{if(e<300||e>6e3)return`视频宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`视频高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;if(n<.4||n>2.5)return`视频宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`;let r=e*t;return r<409600?`视频总像素数过小(${e}×${t}=${r}),需 ≥ 640×640=409600`:r>8295044?`视频总像素数过大(${e}×${t}=${r}),需 ≤ 3326×2494=8295044`:null},lt=async e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=V.filter(e=>e.type===`image`).length,a=V.filter(e=>e.type===`video`).length,o=V.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(t&&i>=5)return Z.error(`最多上传5张图片`),!1;if(n&&a>=2)return Z.error(`最多上传2个视频`),!1;let s=0;if(n){let t=await new Promise(t=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{t({duration:n.duration||0,width:n.videoWidth||0,height:n.videoHeight||0}),n.remove()},n.onerror=()=>{t({duration:0,width:0,height:0}),n.remove()},n.src=URL.createObjectURL(e)});if(s=t.duration,t.width>0&&t.height>0){let e=ct(t.width,t.height);if(e)return Z.error(`${e}`),!1}if(o+s>15)return Z.error(`视频总时长不能超过15秒`),!1}else{let t=await new Promise(t=>{let n=document.createElement(`img`);n.onload=()=>{t({width:n.width,height:n.height}),URL.revokeObjectURL(n.src)},n.onerror=()=>{t({width:0,height:0}),URL.revokeObjectURL(n.src)},n.src=URL.createObjectURL(e)});if(t.width>0&&t.height>0){let e=st(t.width,t.height);if(e)return Z.error(`${e}`),!1}}ee(!0);try{let r;r=t?await s5(e):await c5(e,s);let o=t?`图片`:`视频`,c=t?i+1:a+1;H(e=>[...e,{url:r.url,type:t?`image`:`video`,name:`${o}${c}`,duration:n?s:void 0}]),Z.success(`${o}上传成功`)}catch{Z.error(`上传失败`)}finally{ee(!1)}return!1};(0,S.useEffect)(()=>{if(Nae().then(e=>{nt(e.video),ot(e.image)}),D5().then(e=>{it(e)}),!Qe&&!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&(et(!1),je(!1))};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Qe,Ae]);let ut=e=>{let t=Array.isArray(e)?e:[];return{inputImageCount:t.filter(e=>e.type===`image`).length,inputVideoDuration:t.filter(e=>e.type===`video`).reduce((e,t)=>e+Number(t.duration||0),0)}},dt=()=>{let e={};if(e=rt.find(e=>e.modelConfigId===(g?.engineId||we)&&e.genType===Ve&&e.resolution===(Ve===`video`?g?.resolution||ve:g?.imageSize||Ge)),e||=Ve===`video`?{perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0}:{perSecondCredits:.1,baseCredits:2,ratio:3,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},Ve===`video`){let t=((g?.duration||me)*e.perSecondCredits+e.baseCredits)*e.ratio;if(g?.includeMediaReferences??Ee){let n=ut(g?.references||V);if(n.inputVideoDuration>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n.inputVideoDuration)*(e.inputVideoRatio||1);t+=r}if(n.inputImageCount>0){let r=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*n.inputImageCount)*(e.inputImageRatio||1);t+=r}}return Number(t.toFixed(2))}else{let t=e.baseCredits*e.ratio;if(g?.includeMediaReferences??Ee){let n=ut(g?.references||V);if(n.inputImageCount>0){let r=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*n.inputImageCount)*(e.inputImageRatio||1);t+=r}}return Number(t.toFixed(2))}},ft=e=>{let t=e.genType||e.gen_type||`video`,n=e.engineId||e.engine_id,r=e.resolution,i=Number(e.duration||0),a=e.imageSize||e.image_size,o=e.includeMediaReferences??e.include_media_references??!1,s=e.references||[],c=rt.find(e=>e.modelConfigId===n&&e.genType===t&&e.resolution===(t===`video`?r:a));c||=t===`video`?{perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0}:{perSecondCredits:.1,baseCredits:2,ratio:3,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0};let l=0;if(t===`video`){if(l=(i*c.perSecondCredits+c.baseCredits)*c.ratio,o){let e=ut(s);if(e.inputVideoDuration>0){let t=((c.inputVideoBaseCredits||0)+(c.inputVideoPerSecondCredits||0)*e.inputVideoDuration)*(c.inputVideoRatio||1);l+=t}if(e.inputImageCount>0){let t=((c.inputImageBaseCredits||0)+(c.inputImagePerImageCredits||0)*e.inputImageCount)*(c.inputImageRatio||1);l+=t}}}else if(l=c.baseCredits*c.ratio,o){let e=ut(s);if(e.inputImageCount>0){let t=((c.inputImageBaseCredits||0)+(c.inputImagePerImageCredits||0)*e.inputImageCount)*(c.inputImageRatio||1);l+=t}}return Number(l.toFixed(2))},pt=e=>{St(e);let t=Tt[Ge]?.[e];if(t){let[e,n]=t.split(/x/i).map(Number);Je(e),Ze(n)}},mt=e=>{wt(e);let t=Object.keys(Tt[e]||{});gt(t.map(e=>({value:e,label:e})));let n=t.includes(Ue)?Ue:t[0]||`1:1`;n!==Ue&&We(n);let r=Tt[e]?.[n];if(r){let[e,t]=r.split(/x/i).map(Number);Je(e),Ze(t)}},[ht,gt]=(0,S.useState)([]),[_t,vt]=(0,S.useState)([]),[yt,bt]=(0,S.useState)([]),[xt,St]=(0,S.useState)(0),[Ct,wt]=(0,S.useState)(0),[Tt,Et]=(0,S.useState)({});(0,S.useEffect)(()=>{yt[Ct]&&yt[Ct][xt]!==void 0&&(Je(yt[Ct][xt].substring(0,4)),Ze(yt[Ct][xt].substring(5)))},[xt]),(0,S.useEffect)(()=>{yt[Ct]&&yt[Ct][xt]!==void 0&&(Je(yt[Ct][xt].substring(0,4)),Ze(yt[Ct][xt].substring(5)))},[Ct]);let Dt=()=>{Je(Xe),Ze(qe)},Ot=e=>{let t=e.target.value===`image`?`image`:`video`;He(t);let n=(t===`image`?Se:be).filter(e=>e.supportsUniversalReference!==!1);n.length>0&&At(n[0].id)};(0,S.useEffect)(()=>{v5().then(e=>{q(Object.fromEntries(e.map(e=>[e.key,e.label]))),se(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),Cae().then(e=>{let t=e.items||[];Ce(t);let n=t?.[0]?.supportedSizes||{};Et(n);let r=Object.keys(n);vt(r.map(e=>({value:e,label:e})));let i=r.includes(Ge)?Ge:r[0]||`2K`,a=Object.keys(n[i]||{});gt(a.map(e=>({value:e,label:e})));let o=a.includes(Ue)?Ue:a[0]||`1:1`;o!==Ue&&We(o);let s=n[i]?.[o];if(s){let[e,t]=s.split(/x/i).map(Number);Je(e),Ze(t)}}).catch(()=>{}),Sae().then(e=>{if(xe(e.items||[]),e.items?.length){let t=e.items[0];Te(e=>e||t.id),Ne({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{if(!g)return;let e=g.genType||Ve,t=e===`image`?Se:be,n=g.engineId||``,r=t.find(e=>e.id===n)||t[0];if(r)if(Te(r.id),e===`image`){let e=r.supportedSizes||{};Et(e);let t=Object.keys(e),n=t.includes(g.imageSize||``)?g.imageSize:t[0]||g.imageSize||`2K`;Ke(n);let i=Object.keys(e[n]||{}),a=i.includes(g.imageProportion||``)?g.imageProportion:i[0]||g.imageProportion||`1:1`;We(a);let o=e[n]?.[a]||g.imagePx||``;if(o){let[e,t]=String(o).split(/x/i).map(Number);e>0&&t>0&&(Je(e),Ze(t))}}else Ne({ratios:r.supportedRatios?.length?r.supportedRatios:[`16:9`],resolutions:r.supportedResolutions?.length?r.supportedResolutions:[`720p`],durations:r.supportedDurations?.length?r.supportedDurations:[5]}),r.supportedRatios?.includes(ge)||_e(r.supportedRatios?.[0]||`16:9`),r.supportedResolutions?.includes(ve)||ye(r.supportedResolutions?.[0]||`720p`),r.supportedDurations?.includes(me)||he(r.supportedDurations?.[0]||g.duration||5);De(!!g.includeMediaReferences)},[g?.id,g?.engineId,be,Se]);let kt=e=>{let t=be.find(t=>t.id===e)||be[0];return{ratios:t?.supportedRatios?.length?t.supportedRatios:[`16:9`],resolutions:t?.supportedResolutions?.length?t.supportedResolutions:[`720p`],durations:t?.supportedDurations?.length?t.supportedDurations:[5]}},At=e=>{Te(e);let t=(Ve===`image`?Se:be).find(t=>t.id===e);if(!t)return;if(Ve===`image`){let e=t.supportedSizes||{};Et(e);let n=Object.keys(e);vt(n.map(e=>({value:e,label:e})));let r=n.includes(Ge)?Ge:n[0]||`2K`,i=Object.keys(e[r]||{});gt(i.map(e=>({value:e,label:e})));let a=i.includes(Ue)?Ue:i[0]||`1:1`;Ke(r),We(a);let o=e[r]?.[a]||``;if(o){let[e,t]=String(o).split(/x/i).map(Number);e>0&&t>0&&(Je(e),Ze(t))}return}let n=kt(e);Ne(n),_e(n.ratios[0]),ye(n.resolutions[0]),he(n.durations[0])};(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let jt=(0,S.useRef)(!1);(0,S.useEffect)(()=>{jt.current||u.length===0||(jt.current=!0,u.forEach(t=>{t.projectId===e&&t.status===`generating`&&(E(e=>({...e,[t.id]:`generating`})),nn(t.id)),t.projectId===e&&t.status===`optimizing`&&zt(t.id)}))},[u,e]);let Mt=(0,S.useRef)(new Set),Nt=(0,S.useRef)(null),Pt=(0,S.useRef)(null),Ft=e=>{Mt.current.add(e),Rt()},It=e=>{Mt.current.delete(e),Mt.current.size===0&&Lt()},Lt=()=>{Nt.current&&=(clearInterval(Nt.current),null),Pt.current&&=(Pt.current.abort(),null)},Rt=()=>{Nt.current||=setInterval(async()=>{try{Pt.current&&Pt.current.abort();let t=new AbortController;Pt.current=t;let n=await a5({projectId:e,page:1,pageSize:100,signal:t.signal});Pt.current=null;let r=Array.from(Mt.current),i=[];if(r.length>0){let e=c7.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});c7.setState({records:{...e,items:t}}),i.forEach(e=>{It(e)})}}catch(e){e.name}},3e3)},zt=e=>{Ft(e)},Bt=(0,S.useRef)(!1),Vt=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(Bt.current||u.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,engineId:o,genType:s,aspectRatio:c,resolution:l,imageSize:d,imageProportion:f,imagePx:p,includeMediaReferences:m,referenceIds:g,ts:v}=JSON.parse(t);if(Date.now()-v>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(Vt.current===n)return;let b=u.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.engineId===o&&String(e.genType||`video`)===String(s||`video`)&&String(e.aspectRatio||``)===String(c||``)&&String(e.resolution||``)===String(l||``)&&String(e.imageSize||``)===String(d||``)&&String(e.imageProportion||``)===String(f||``)&&String(e.imagePx||``)===String(p||``)&&!!e.includeMediaReferences==!!m&&JSON.stringify((e.references||[]).map(e=>e.upload_resource_id||e.url).filter(Boolean).sort())===JSON.stringify((g||[]).slice().sort())&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>v-1e4);b?(Bt.current=!0,localStorage.removeItem(`pending_optimize`),_(b),y(b.optimizedPrompt||``),Re(b.textCreditsCost),Be(b.textTokensUsed),h(!0),Z.success({content:`优化请求已恢复,消耗 ${b.textCreditsCost} 积分`,key:`recovery`})):Date.now()-v>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[u,e]);let Ht=r.find(t=>t.id===e),Ut=u.filter(t=>t.projectId===e),Wt=Ht?.name??`项目`,Gt=(0,S.useMemo)(()=>Ht&&oe[Ht.industry]||[],[Ht,oe]),Kt=d?.credits??0,qt=Kt>=dt(),Jt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}if(!we){Z.error(`请选择生成引擎`);return}if(Ve===`video`&&(!ge||!ve)){Z.error(`请选择视频比例和分辨率`);return}p(!0);let r=Object.entries(ce).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=Ese();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:me,engineId:we,genType:Ve,aspectRatio:Ve===`video`?ge:``,resolution:Ve===`video`?ve:``,imageSize:Ve===`image`?Ge:``,imageProportion:Ve===`image`?Ue:``,imagePx:Ve===`image`?`${qe}x${Xe}`:``,includeMediaReferences:Ee,referenceIds:V.map(e=>e.upload_resource_id||e.url).filter(Boolean).sort(),ts:Date.now()})),Vt.current=a;let o=await s(e,{prompt:i,duration:Ve===`video`?me:void 0,genType:Ve,engineId:we,includeMediaReferences:Ee,aspectRatio:Ve===`video`?ge:void 0,resolution:Ve===`video`?ve:void 0,references:V.length>0?V:void 0,idempotencyKey:a,image_size:Ve===`image`?Ge:void 0,image_proportion:Ve===`image`?Ue:void 0,image_px:Ve===`image`?qe+`x`+Xe:void 0});localStorage.removeItem(`pending_optimize`),Vt.current=null,_(o.record),y(o.record.optimizedPrompt||``),Re(o.textCreditsCost),Be(o.textTokensUsed),h(!0),Z.success({content:`「${Wt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{p(!1),localStorage.removeItem(`pending_optimize`),Vt.current=null}},Yt=(0,S.useRef)(new Set),Xt=(0,S.useRef)(null),Zt=(0,S.useRef)(null),Qt=e=>{Yt.current.add(e),tn()},$t=e=>{Yt.current.delete(e),Yt.current.size===0&&en()},en=()=>{Xt.current&&=(clearInterval(Xt.current),null),Zt.current&&=(Zt.current.abort(),null)},tn=()=>{Xt.current||=setInterval(async()=>{try{Zt.current&&Zt.current.abort();let t=new AbortController;Zt.current=t;let n=await a5({projectId:e,page:1,pageSize:100,signal:t.signal});Zt.current=null;let r=Array.from(Yt.current),i=[];if(r.length>0){let e=c7.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t){let n=T[e.id];return t.shouldPoll??t.status===`generating`?n!==`generating`&&E(t=>({...t,[e.id]:`generating`})):i.push(e.id),t}}return e});c7.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);$t(e),t?.status===`completed`?(E(t=>({...t,[e]:`done`})),_(n=>n?.id===e?t:n),Z.success({content:`「${Wt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(E(t=>({...t,[e]:`failed`})),_(n=>n?.id===e?t:n),Z.error({content:`「${Wt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name}},5e3)},nn=e=>{Qt(e)};(0,S.useEffect)(()=>()=>{en(),Lt()},[]),(0,S.useEffect)(()=>{u.filter(e=>e.shouldPoll??e.status===`generating`).forEach(e=>{E(t=>({...t,[e.id]:`generating`})),nn(e.id)})},[u]);let rn=async e=>{w(t=>({...t,[e]:!0})),E(t=>({...t,[e]:`generating`})),Z.loading({content:`「${Wt}」正在提交视频生成...`,duration:0,key:e});try{let t=Ut.find(t=>t.id===e)||g;if(!t||t.canGenerate===!1)throw Error(t?.configFallbackHint||`该记录当前不可生成,请重新生成提词`);let n=t.id===g?.id?v:F[e];n&&n!==t.optimizedPrompt&&await d5(e,n),(await c(e)).status===`failed`?(E(t=>({...t,[e]:`failed`})),Z.error({content:`「${Wt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${Wt}」已提交,正在生成中...`,key:e,duration:3}),nn(e))}catch(t){E(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{w(t=>({...t,[e]:!1}))}},an=e=>{let t=T[e.id];return k7({status:(t===`done`?`completed`:t)||e.status,pipelineStage:t?null:e.pipelineStage,clientStatus:t?null:e.clientStatus,shouldPoll:t?t===`generating`:e.shouldPoll,canGenerate:e.canGenerate,canRetry:e.canRetry})},on=e=>e.isActive?(0,$.jsx)(Xm,{style:{animation:`spinSlow 1s linear infinite`}}):e.isSuccess?(0,$.jsx)(N2,{}):e.isFailure?(0,$.jsx)(I2,{}):(0,$.jsx)(xB,{});return(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 8px)`,padding:`24px`,background:`#fff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(U0,{}),onClick:()=>t(`/projects`),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:Wt}),Ht&&(0,$.jsx)(vQ,{style:{background:`rgba(99, 102, 241, 0.08)`,border:`1px solid rgba(99, 102, 241, 0.15)`,color:`#6366f1`,borderRadius:6},children:ae[Ht.industry]||Ht.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsxs)(vQ,{style:{background:`rgba(99, 102, 241, 0.08)`,border:`1px solid rgba(99, 102, 241, 0.15)`,color:`#6366f1`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,Kt,` 积分`]})]}),!m&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(qF.Group,{defaultValue:`video`,buttonStyle:`solid`,onChange:Ot,children:[(0,$.jsxs)(qF.Button,{value:`video`,children:[(0,$.jsx)(R8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]}),(0,$.jsxs)(qF.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(w6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]})]})]}),Ve===`video`&&[{icon:(0,$.jsx)(e$,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(T8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(Z6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),Ve===`image`&&[{icon:(0,$.jsx)(e$,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(T8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(Z6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(mH,{form:n,initialValues:{},children:[(0,$.jsx)(mH.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[V.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&pe(`https://ceshi.apiforeign.minzhongzc.com${e.url}`)},children:e.type===`image`?(0,$.jsx)(mU,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(j7,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),u5(e.url).catch(()=>{}),H(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(I2,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(w7,{accept:`image/*,video/*`,mediaType:Ve,onLocalSelect:e=>{e.forEach(async e=>{await lt(e)})},onHistorySelect:e=>{e.forEach(e=>{H(t=>[...t,{url:e.resourceUrl||e.previewUrl||e.displayUrl||``,type:e.resourceType,name:e.fileName||``}])}),Z.success(`成功添加${e.length}个历史记录`)},onPortraitSelect:e=>{e.forEach(e=>{H(t=>[...t,{url:e.previewUrl||``,type:e.assetType===`Video`?`video`:`image`,name:e.name||`真人素材`,source:`private_portrait_asset`,private_asset_id:e.id,label:``,duration:e.assetType===`Video`?e.videoDuration||0:void 0}])}),Z.success(`已添加 ${e.length} 个真人素材参考`)},uploading:U,tooltipTitle:`图片${V.filter(e=>e.type===`image`).length}/5,视频${V.filter(e=>e.type===`video`).length}/2`,maxImageCount:5,maxVideoCount:2,usedImageCount:V.filter(e=>e.type===`image`).length,usedVideoCount:V.filter(e=>e.type===`video`).length,usedVideoDuration:V.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:U?(0,$.jsx)(Xm,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(VI,{style:{fontSize:18,color:`#94a3b8`}})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(YU.TextArea,{ref:ie,value:W,onChange:e=>{let t=e.target.value;te(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` -`)){ne(!0),re(e);return}}ne(!1)},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await lt(e)}))},rows:3,placeholder:`上传参考素材后(手动开启是否参与最终生成,如不开启则只用做模型理解)、输入文字,自由组合图、文多元素。输入 @ 可引用参考内容...`,maxLength:500,variant:`borderless`,autoSize:{minRows:2,maxRows:6},style:{padding:`6px 2px`,fontSize:15,lineHeight:1.7,resize:`none`,caretColor:`#6366f1`}})}),G&&V.length>0&&(0,$.jsx)(`div`,{style:{margin:`0 16px 8px`,background:`#fff`,borderRadius:10,boxShadow:`0 6px 24px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`,padding:6,maxHeight:180,overflowY:`auto`},children:(()=>{let e=V.filter(e=>!K||e.name.includes(K));return(e.length>0?e:V).map((e,t)=>{let r=V.indexOf(e);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:8,cursor:`pointer`,transition:`background 0.15s`},onMouseEnter:e=>e.currentTarget.style.background=`#f1f5f9`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,onMouseDown:t=>{t.preventDefault();let i=ie.current?.resizableTextArea?.textArea||ie.current?.nativeElement?.querySelector(`textarea`)||ie.current;if(!i||!i.value)return;let a=i.value,o=a.lastIndexOf(`@`),s=e.name||(e.type===`image`?`图片${r+1}`:`视频${r+1}`),c=a.slice(0,o)+`@${s} `;te(c),n.setFieldValue(`prompt`,c),ne(!1),setTimeout(()=>{i.focus(),i.selectionStart=c.length,i.selectionEnd=c.length},50)},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,overflow:`hidden`,background:e.type===`image`?`#f1f5f9`:`#1a1a2e`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:e.type===`image`?(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(N6,{style:{color:`#fff`,fontSize:14}})}),(0,$.jsx)(Q.Text,{style:{fontSize:13},children:e.name||(e.type===`image`?`图片${r+1}`:`视频${r+1}`)}),(0,$.jsx)(vQ,{style:{marginLeft:`auto`,fontSize:11},children:e.type===`image`?`图片`:`视频`})]},t)})})()}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 12px 12px`,gap:8,flexWrap:`wrap`,position:`relative`,zIndex:50,minHeight:48},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,flexWrap:`wrap`},children:[(0,$.jsx)(A7,{label:`引擎`,value:(Ve===`image`?Se:be).filter(e=>e.supportsUniversalReference!==!1).find(e=>e.id===we)?.name||`选择引擎`,options:(Ve===`image`?Se:be).filter(e=>e.supportsUniversalReference!==!1).map(e=>e.name),expanded:Oe===`engine`,onToggle:()=>ke(Oe===`engine`?null:`engine`),onSelect:e=>{let t=(Ve===`image`?Se:be).filter(e=>e.supportsUniversalReference!==!1).find(t=>t.name===e);t&&At(t.id),ke(null)},onClose:()=>ke(null)}),Ve!==`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{je(!Ae),ke(null)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(x3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[ge,` · `,me,`s · `,ve]})]}),Ae&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:Me.ratios.map(e=>{let[t,n]=e.split(`:`).map(Number),r=t>=n?18:Math.round(t/n*18),i=n>=t?18:Math.round(n/t*18);return(0,$.jsxs)(`button`,{onClick:()=>_e(e),style:{flex:`0 0 calc(12.5% - 4px)`,minWidth:44,height:52,borderRadius:6,border:ge===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:ge===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:r,height:i,border:`2px solid ${ge===e?`#6366f1`:`#9ca3af`}`,borderRadius:3,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:ge===e?`#6366f1`:`#6b7280`,fontWeight:ge===e?600:400},children:e})]},e)})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(me-Math.min(...Me.durations))/(Math.max(...Me.durations)-Math.min(...Me.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...Me.durations),max:Math.max(...Me.durations),value:me,onChange:e=>he(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:me}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:Me.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>ye(e),style:{flex:1,height:42,borderRadius:8,border:ve===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:ve===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:ve===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]}),Gt.map((e,t)=>{let n=ue===e.name,r=ce[e.name];return(0,$.jsx)(Pse,{group:e,groupName:e.name,selected:r,expanded:n,onToggle:Pe,onSelect:Ie,onClose:Fe},`og-${t}`)})]}),Ve==`image`&&(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{et(!Qe),ke(null)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(x3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[Ue===`auto`?`智能`:Ue,` · `,Ge,` · `,qe,`×`,Xe]})]}),Qe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8,fontSize:13,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:ht.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{We(e.value),pt(e.label)},style:{flex:`0 0 calc(11.11% - 5px)`,minWidth:48,height:52,borderRadius:6,border:Ue===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Ue===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?20:Math.round(t/n*20)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?20:Math.round(n/t*20)})(),border:`2px solid ${Ue===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:(e.value,3),marginBottom:3,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:8,color:Ue===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:10,color:Ue===e.value?`#6366f1`:`#6b7280`,fontWeight:Ue===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8,fontSize:13,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:_t.map(e=>(0,$.jsx)(`button`,{onClick:()=>{Ke(e.value),mt(e.label)},style:{flex:1,height:44,borderRadius:6,border:Ge===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Ge===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:Ge===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4k`&&(0,$.jsx)(`span`,{style:{marginLeft:3},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8,fontSize:13,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`W`}),(0,$.jsx)(YU,{value:qe,onChange:e=>Je(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:36,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:13,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Dt,style:{width:26,height:26,borderRadius:6,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)($H,{style:{fontSize:12}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`H`}),(0,$.jsx)(YU,{value:Xe,onChange:e=>Ze(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:36,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:13,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12},children:`PX`})]})]})]})]}),V.length>0&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(_q,{size:`small`,checked:Ee,onChange:De}),(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`生成时携带附件`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[Ve===`image`&&(0,$.jsx)(`span`,{style:{color:`#7c7c7c`,fontSize:14},children:`(请在左侧选择图片比例和尺寸)`}),(0,$.jsx)(jw,{title:`LLM积分由服务端按当前功能场景直接消费`,placement:`top`,children:(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:()=>{Jt()},loading:f,style:{borderRadius:10,fontWeight:600,minWidth:140,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99,102,241,0.35)`},children:`AI优化提示词`})})]})]})]})]})]}),m&&g&&(0,$.jsxs)(vL,{className:`animate-fadeInUp`,style:{borderRadius:16},styles:{body:{padding:`24px 28px`}},children:[!T[g.id]||T[g.id]===`idle`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:24,padding:`14px 18px`,borderRadius:12,background:`linear-gradient(135deg, rgba(16,185,129,0.06), rgba(5,150,105,0.06))`,border:`1px solid rgba(16,185,129,0.15)`},children:[(0,$.jsx)(N2,{style:{color:`#10b981`,fontSize:22}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`},children:`提示词优化完成`}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`文本优化消耗 `,Le,` 积分· 您可以编辑提示词后选择参数生成视频`]})]})]}):(0,$.jsxs)(`div`,{style:{marginBottom:24,padding:`16px 18px`,borderRadius:12,display:`flex`,alignItems:`center`,gap:12,background:T[g.id]===`failed`?`rgba(239,68,68,0.04)`:T[g.id]===`done`?`rgba(16,185,129,0.04)`:`rgba(99,102,241,0.04)`,border:`1px solid ${T[g.id]===`failed`?`rgba(239,68,68,0.12)`:T[g.id]===`done`?`rgba(16,185,129,0.12)`:`rgba(99,102,241,0.12)`}`},children:[T[g.id]===`generating`&&(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:18},spin:!0}),T[g.id]===`done`&&(0,$.jsx)(N2,{style:{color:`#10b981`,fontSize:18}}),T[g.id]===`failed`&&(0,$.jsx)(I2,{style:{color:`#ef4444`,fontSize:18}}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:T[g.id]===`failed`?`#ef4444`:T[g.id]===`done`?`#10b981`:`#6366f1`},children:[T[g.id]===`generating`&&(0,$.jsxs)(`span`,{children:[Ve===`image`?`图片`:`视频`,`生成中,请稍候...`]}),T[g.id]===`done`&&`${Ve===`image`?`图片`:`视频`}生成成功`,T[g.id]===`failed`&&`${Ve===`image`?`图片`:`视频`}生成失败,请重试`]})]}),!T[g.id]||T[g.id]===`idle`||T[g.id]===`failed`?(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#64748b`,lineHeight:1.7},children:g.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!b&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!b&&(0,$.jsxs)(bV,{size:4,children:[(0,$.jsx)(jw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(C$,{}),onClick:async()=>{let e=await h7(v);Z.success(e?`已复制`:`复制失败`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(jw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(e$,{}),onClick:()=>x(!0),style:{color:`#6366f1`}})})]})]}),b?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(YU.TextArea,{value:v,onChange:e=>y(e.target.value),rows:5,style:{borderRadius:12,fontSize:14,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>{y(g.optimizedPrompt||``),x(!1)},children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{x(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#1a1a2e`,lineHeight:1.7},children:v})})]})]}):(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 55%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:80},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.6},children:g.originalPrompt})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!b&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!b&&(0,$.jsxs)(bV,{size:4,children:[(0,$.jsx)(jw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(C$,{}),onClick:async()=>{let e=await h7(v);Z.success(e?`已复制`:`复制失败`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(jw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(e$,{}),onClick:()=>x(!0),style:{color:`#6366f1`}})})]})]}),b?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(YU.TextArea,{value:v,onChange:e=>y(e.target.value),rows:5,style:{borderRadius:12,fontSize:13,lineHeight:1.6,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>{y(g.optimizedPrompt||``),x(!1)},children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{x(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:120},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.6},children:v})})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:280},children:[g.videoUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成视频`}),(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,background:`#000`},children:(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${g.videoUrl}`,controls:!0,style:{width:`100%`,maxHeight:350,display:`block`}})})]}),g.imageUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成图片`}),(0,$.jsx)(mU,{src:`https://ceshi.apiforeign.minzhongzc.com${g.imageUrl}`,style:{width:`100%`,maxHeight:350,objectFit:`contain`,borderRadius:12,border:`1px solid #f0f0f5`},preview:!0})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`wrap`,gap:12,marginTop:20,padding:`14px 18px`,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`引擎`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:(Ve===`image`?Se:be).find(e=>e.id===g.engineId)?.name||`-`})]}),Ve!==`image`&&(0,$.jsx)(`div`,{style:{borderRadius:12,background:`#f8f9fc`,padding:`8px 12px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[g.duration||me,`s`]})]}),(0,$.jsx)(A7,{label:`比例`,value:g.aspectRatio||ge,options:[String(g.aspectRatio||ge)],expanded:!1,onToggle:()=>void 0,onSelect:()=>void 0,onClose:()=>ke(null)}),(0,$.jsx)(A7,{label:`分辨率`,value:g.resolution||ve,options:[String(g.resolution||ve)],expanded:!1,onToggle:()=>void 0,onSelect:()=>void 0,onClose:()=>ke(null)})]})}),Ve==`image`&&g&&(0,$.jsx)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-around`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`分辨率`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:g.imageSize||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面比例`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:g.imageProportion||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面尺寸`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:g.imagePx||`-`})]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`6px 12px`,borderRadius:10,background:`rgba(255, 255, 255, 0.95)`,border:`1px solid rgba(231, 234, 240, 0.95)`,boxShadow:`0 2px 8px rgba(47, 52, 64, 0.03)`,flexShrink:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`3px 8px`,borderRadius:6,background:`rgba(99, 102, 241, 0.08)`,flexShrink:0},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#6366f1`,fontWeight:500},children:`文字积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`,fontWeight:700},children:Le})]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12,fontWeight:500,flexShrink:0},children:`+`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`3px 8px`,borderRadius:6,background:`rgba(16, 185, 129, 0.08)`,flexShrink:0},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#10b981`,fontWeight:500},children:[`预估`,Ve===`image`?`图`:`视`,`积分`]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#10b981`,fontWeight:700},children:dt()})]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12,fontWeight:500,flexShrink:0},children:`=`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 10px`,borderRadius:6,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%)`,border:`1px solid rgba(99, 102, 241, 0.2)`,flexShrink:0},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#6366f1`,fontWeight:600},children:`总计`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#6366f1`,fontWeight:800},children:(Le+dt()).toFixed(2)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginLeft:`auto`},children:[(0,$.jsxs)(X,{size:`large`,onClick:()=>{h(!1),_(null),y(``),te(``),H([]),le({}),de(null),ke(null),n.resetFields()},style:{borderRadius:12,minWidth:120,height:44,fontWeight:500},children:[`配置新`,Ve===`image`?`图片`:`视频`]}),(0,$.jsx)(jw,{title:qt?``:`积分不足`,children:(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Z6,{}),onClick:()=>rn(g.id),loading:T[g.id]===`generating`,disabled:!qt||g.canGenerate===!1||T[g.id]===`generating`||T[g.id]===`done`,style:{borderRadius:12,minWidth:180,height:44,fontWeight:600,background:T[g.id]===`done`?`#10b981`:qt?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#d1d5db`,border:`none`,boxShadow:qt?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:T[g.id]===`done`?`生成完成`:T[g.id]===`generating`?`生成中...`:`生成${Ve===`image`?`图片`:`视频`} (${dt()}积分)`})})]})]}),g.references&&g.references.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`参考内容`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:g.references.map((e,t)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{e.type===`video`&&pe(`https://ceshi.apiforeign.minzhongzc.com${e.url}`)},children:[e.type===`image`?(0,$.jsx)(mU,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(j7,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,width:64,height:64}),(0,$.jsx)(vQ,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:e.name})]},t))})]})]}),Ut.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:24},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`,marginBottom:12},children:`本项目生成记录`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,background:`#fff`,borderRadius:12,padding:8,border:`1px solid #f0f0f5`},className:`stagger-children`,children:Ut.map((e,t)=>{let n=an(e),r=n.effectiveKey,i=F[e.id]??(e.optimizedPrompt||e.originalPrompt),a=z===e.id,o=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.05}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>B(a?null:e.id),style:{padding:`12px 16px`,borderRadius:a?`8px 8px 0 0`:8,background:`#fafafa`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:o===`image`?`#fef3c7`:`#dbeafe`},children:o===`image`?(0,$.jsx)(w6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(R8,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(_Z,{style:{color:`#6366f1`,fontSize:11,flexShrink:0}}):(0,$.jsx)(A2,{style:{color:`#cbd5e1`,fontSize:11,flexShrink:0}}),(0,$.jsx)(vQ,{color:n.color,icon:on(n),style:{margin:0},children:n.label}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:i}),r===`prompt_optimized`&&(0,$.jsx)(vQ,{color:`processing`,style:{padding:`3px 10px`,fontSize:12,margin:0,flexShrink:0},children:`待生成`}),o===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.imageSize||`-`,` ·`,` `,e.imageProportion||`-`,` ·`,` `,e.imagePx||`-`,` ·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:u7(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` ·`,` `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` `,`·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:u7(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation()})]}),a&&(0,$.jsx)(`div`,{style:{background:`#fff`,borderRadius:`0 0 8px 8px`,padding:`18px 20px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:260},children:[(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,(r===`prompt_optimized`||n.isFailure)&&L!==e.id&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),L!==e.id&&(0,$.jsxs)(bV,{size:4,children:[(0,$.jsx)(jw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(C$,{}),onClick:async()=>{let e=await h7(i);Z.success(e?`已复制`:`复制失败`)},style:{color:`#94a3b8`}})}),(r===`prompt_optimized`||n.isFailure)&&(0,$.jsx)(jw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(e$,{}),onClick:()=>{R(e.id),I(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt??``}))},style:{color:`#6366f1`}})})]})]}),L===e.id?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(YU.TextArea,{value:i,onChange:t=>I(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>R(null),children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{I(t=>({...t,[e.id]:i})),R(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:r===`prompt_optimized`?`rgba(99,102,241,0.02)`:`#f8f9fc`,border:r===`prompt_optimized`?`1px solid rgba(99,102,241,0.1)`:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:i})})]}),o===`image`?(0,$.jsx)(`div`,{style:{padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:(0,$.jsx)(`div`,{children:(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:[{label:`引擎`,value:`${e.engineName}`},{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`图片积分`,value:`${e.creditsCost||0}`},{label:`分辨率`,value:e.imageSize||`-`},{label:`比例`,value:e.imageProportion||`-`},{label:`尺寸`,value:e.imagePx||`-`},{label:`附件`,value:e.includeMediaReferences?`生成时携带`:`仅用于提词或不携带`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{width:`21%`,textAlign:`left`,marginBottom:10},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#1a1a2e`},children:e.value})]},t))})})}):(0,$.jsx)(`div`,{style:{padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:(0,$.jsx)(`div`,{children:(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:[{label:`引擎`,value:`${e.engineName}`},{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`视频积分`,value:`${e.creditsCost||0}`},{label:`时长`,value:e.duration?`${e.duration}秒`:`-`},{label:`比例`,value:e.aspectRatio||`-`},{label:`分辨率`,value:e.resolution||`-`},{label:`附件`,value:e.includeMediaReferences?`生成时携带`:`仅用于提词或不携带`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{width:`21%`,textAlign:`left`,marginBottom:10,marginRight:10},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#1a1a2e`},children:e.value})]},t))})})}),(e.references&&e.references.length>0||n.isFailure)&&(0,$.jsxs)(`div`,{style:{marginTop:14},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:[`参考素材`,` `,n.isFailure&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可删除/添加后重试)`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[e.references?.map((t,r)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`visible`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{t.type===`video`&&pe(`https://ceshi.apiforeign.minzhongzc.com${t.url}`)},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`},children:t.type===`image`?(0,$.jsx)(mU,{src:`https://ceshi.apiforeign.minzhongzc.com${t.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(j7,{src:`https://ceshi.apiforeign.minzhongzc.com${t.url}`,width:64,height:64})}),(0,$.jsx)(vQ,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:t.name}),n.isFailure&&(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),u5(t.url).catch(()=>{});let i=e.references.filter((e,t)=>t!==r);c7.getState().updateRecordReferences(e.id,i)},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(239,68,68,0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`},children:(0,$.jsx)(I2,{style:{color:`#fff`,fontSize:10}})})]},r)),n.isFailure&&(0,$.jsx)(H1,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`);return!n&&!r?(Z.error(`仅支持图片或视频文件`),!1):(n?s5(t).then(n=>{let r={url:n.url,type:`image`,name:t.name||`图片`},i=e.references||[];c7.getState().updateRecordReferences(e.id,[...i,r]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`)):new Promise(e=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{e(n.duration||0),n.remove()},n.onerror=()=>{e(0),n.remove()},n.src=URL.createObjectURL(t)}).then(n=>{c5(t,n).then(r=>{let i={url:r.url,type:`video`,name:t.name||`视频`,duration:n||void 0},a=e.references||[];c7.getState().updateRecordReferences(e.id,[...a,i]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`))}),!1)},children:(0,$.jsx)(jw,{title:`添加参考素材`,children:(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`},children:(0,$.jsx)(VI,{style:{fontSize:18,color:`#94a3b8`}})})})})]})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:220,position:`relative`},children:[r===`prompt_optimized`&&(0,$.jsxs)(`div`,{style:{position:`absolute`,inset:0,padding:16,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,flexDirection:`column`,justifyContent:`space-between`},children:[(0,$.jsx)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:[o===`video`?`视频`:`图片`,`等待生成`]})}),(0,$.jsx)(jw,{title:(d?.credits||0){if((d?.credits||0){let t=document.createElement(`a`);t.href=`https://ceshi.apiforeign.minzhongzc.com${o===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${o===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:180,overflow:`hidden`},children:o===`video`?(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,borderRadius:0}}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,borderRadius:0}})}),(0,$.jsxs)(`div`,{style:{padding:`8px 12px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(bV,{children:[o===`video`?(0,$.jsx)(R8,{style:{color:`#6366f1`,fontSize:13}}):(0,$.jsx)(w6,{style:{color:`#6366f1`,fontSize:13}}),(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:11,color:`#94a3b8`},children:u7(e.generatedAt)})]})]}):n.isFailure?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10,padding:16},children:[(0,$.jsx)(I2,{style:{color:`#ef4444`,fontSize:28}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14,fontWeight:600},children:[o===`video`?`视频`:`图片`,`生成失败`]}),e.errorMessage&&(0,$.jsx)(Q.Text,{style:{color:`#ef4444`,fontSize:12,textAlign:`center`,lineHeight:1.6},children:e.errorMessage})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(xB,{style:{color:`#94a3b8`,fontSize:28}}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:o===`image`?`待生成图片`:`待生成视频`})]})]})]})})]},e.id)})})]}),(0,$.jsx)(DG,{open:!!fe,onCancel:()=>pe(null),footer:null,width:480,centered:!0,destroyOnHidden:!0,closable:!1,title:null,styles:{body:{padding:0,background:`#000`,position:`relative`}},children:fe&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:fe,controls:!0,autoPlay:!0,style:{width:`100%`,display:`block`,maxHeight:`70vh`}}),(0,$.jsx)(`div`,{onClick:()=>pe(null),style:{position:`absolute`,top:8,right:8,width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`background 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.85)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.6)`},children:(0,$.jsx)(Gie,{style:{color:`#fff`,fontSize:16}})})]})})]})},Ise=()=>{let e=Ye(),{records:t,projects:n,fetchRecords:r,fetchProjects:i,generateVideo:a,retryGeneration:o}=c7(),s=t.items,[c,l]=(0,S.useState)(1),[u,d]=(0,S.useState)(10),[f,p]=(0,S.useState)({}),[m,h]=(0,S.useState)(void 0),[g,_]=(0,S.useState)(void 0),[v,y]=(0,S.useState)({}),[b,x]=(0,S.useState)(null),[C,w]=(0,S.useState)(null),T=async e=>{let t=e.genType||`image`,n=e.canRetry===!0;if(!n&&(e.canGenerate===!1||!e.configComplete)||n&&!e.configComplete){Z.error(`该记录生成配置不完整,请重新生成提词`);return}p(t=>({...t,[e.id]:!0})),Z.loading({content:`「${e.projectName}」正在提交${t===`video`?`视频`:`图片`}生成...`,duration:0,key:e.id});try{if(n)await o(e.id);else{let t=v[e.id];t&&t!==e.optimizedPrompt&&await d5(e.id,t),await a(e.id)}Z.success({content:`「${e.projectName}」已提交,正在生成中...`,key:e.id,duration:3})}catch(t){Z.error({content:t?.response?.data?.detail||t?.message||`提交生成失败`,key:e.id,duration:3})}finally{p(t=>({...t,[e.id]:!1}))}};(0,S.useEffect)(()=>{i()},[i]),(0,S.useEffect)(()=>{r({projectId:m,status:g,page:c,pageSize:u})},[r,m,g,c,u]);let E=s;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(U0,{}),onClick:()=>e(`/projects`),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:2,style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`项目记录`}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`},children:`查看所有视频生成记录,点击记录查看完整内容和视频`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),(0,$.jsxs)(`div`,{className:`record-filter-bar animate-fadeInUp`,style:{display:`flex`,gap:12,marginBottom:20,padding:`14px 20px`,borderRadius:14,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(bV,{children:[(0,$.jsx)(D4,{style:{color:`#94a3b8`}}),(0,$.jsx)(VC,{placeholder:`全部项目`,allowClear:!0,style:{width:200},onChange:e=>{h(e),l(1)},children:n.map(e=>(0,$.jsx)(VC.Option,{value:e.id,children:e.name},e.id))}),(0,$.jsxs)(VC,{placeholder:`全部状态`,allowClear:!0,style:{width:140},onChange:e=>{_(e),l(1)},children:[(0,$.jsx)(VC.Option,{value:`prompt_optimized`,children:`待生成`}),(0,$.jsx)(VC.Option,{value:`generating`,children:`生成中`}),(0,$.jsx)(VC.Option,{value:`completed`,children:`已完成`}),(0,$.jsx)(VC.Option,{value:`failed`,children:`失败`})]})]}),(0,$.jsxs)(Q.Text,{style:{marginLeft:`auto`,lineHeight:`32px`,color:`#94a3b8`,fontSize:13},children:[`共 `,t.total,` 条记录`]})]}),E.length===0?(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:60}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:E.map((e,t)=>{let n=b===e.id,r=v[e.id]??e.optimizedPrompt,i=f[e.id],a=C===e.id,o=e.genType||`image`,s=k7(e);return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.04}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>w(a?null:e.id),style:{padding:`14px 20px`,borderRadius:a?`14px 14px 0 0`:14,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:o===`image`?`#fef3c7`:`#dbeafe`},children:o===`image`?(0,$.jsx)(w6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(R8,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(_Z,{style:{color:`#6366f1`,fontSize:12,flexShrink:0}}):(0,$.jsx)(A2,{style:{color:`#cbd5e1`,fontSize:12,flexShrink:0}}),(0,$.jsx)(vQ,{color:s.color,icon:s.isActive?(0,$.jsx)(Xm,{spin:!0}):s.isSuccess?(0,$.jsx)(N2,{}):s.isFailure?(0,$.jsx)(I2,{}):(0,$.jsx)(xB,{}),style:{margin:0},children:s.label}),(0,$.jsx)(vQ,{style:{background:`#f0f0ff`,border:`none`,color:`#6366f1`,margin:0},children:e.projectName}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),o===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.imageSize||`-`,` · `,e.imageProportion||`-`,` · `,e.imagePx||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:u7(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` · `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:u7(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(bV,{children:[e.status===`prompt_optimized`&&(0,$.jsx)(X,{type:`primary`,size:`small`,icon:(0,$.jsx)(N6,{}),loading:i,disabled:!e.configComplete||e.canGenerate===!1,onClick:()=>T(e),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`生成`}),s.isActive&&(0,$.jsx)(vQ,{color:`processing`,icon:(0,$.jsx)(Xm,{spin:!0}),style:{padding:`4px 12px`,fontSize:12},children:`生成中...`}),s.isFailure&&(0,$.jsx)(X,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(N6,{}),loading:i,disabled:!e.configComplete||e.canRetry===!1,onClick:()=>T(e),style:{borderRadius:8},children:`重试`})]})})]}),a&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 14px 14px`,padding:`20px 24px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词 `,e.status===`prompt_optimized`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!n&&(0,$.jsxs)(bV,{size:4,children:[(0,$.jsx)(jw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(C$,{}),onClick:async()=>{let e=await h7(r);Z.success(e?`已复制`:`复制失败`)},style:{color:`#94a3b8`}})}),e.status===`prompt_optimized`&&(0,$.jsx)(jw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(e$,{}),onClick:()=>{x(e.id),y(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt}))},style:{color:`#6366f1`}})})]})]}),n?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(YU.TextArea,{value:r,onChange:t=>y(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>x(null),children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{y(t=>({...t,[e.id]:r})),x(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,padding:`12px 16px`,borderRadius:10,background:`#f8f9fc`},children:o===`image`?[{label:`分辨率`,value:e.imageSize?`${e.imageSize} `:`-`},{label:`画面比例`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`画面尺寸`,value:e.imagePx?`${e.imagePx} `:`-`},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost} `:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t)):[{label:`时长`,value:e.duration?`${e.duration} 秒`:`-`},{label:`画面比例`,value:e.aspectRatio||(e.status===`prompt_optimized`?`配置缺失`:`-`)},{label:`分辨率`,value:e.resolution||(e.status===`prompt_optimized`?`配置缺失`:`-`)},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost}`:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t))}),e.status===`prompt_optimized`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(Z6,{}),loading:i,disabled:!e.configComplete||e.canGenerate===!1,onClick:()=>T(e),style:{borderRadius:12,fontWeight:600,height:44,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.3)`},children:o===`video`?`生成视频`:`生成图片`})}),s.isFailure&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsxs)(X,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(N6,{}),loading:i,disabled:!e.configComplete||e.canRetry===!1,onClick:()=>T(e),style:{borderRadius:12,fontWeight:600,height:44},children:[`重新生成`,o===`video`?`视频`:`图片`]})})]}),(0,$.jsx)(`div`,{style:{flex:`1 1 40%`,minWidth:240},children:s.isActive?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(Xm,{style:{color:`#6366f1`,fontSize:32},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成中...`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`请耐心等待,生成完成后将自动展示`})]}):s.isSuccess&&(e.videoUrl||e.imageUrl)?(0,$.jsxs)(`div`,{style:{borderRadius:14,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)(jw,{title:`下载${o===`video`?`视频`:`图片`}`,children:(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(I1,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`https://ceshi.apiforeign.minzhongzc.com${o===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${o===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:280,overflow:`hidden`},children:o===`video`?(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,display:`block`}}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,display:`block`}})}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(bV,{children:[o===`video`?(0,$.jsx)(R8,{style:{color:`#6366f1`}}):(0,$.jsx)(w6,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`生成于 `,u7(e.generatedAt)]})]})]}):s.isFailure?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(I2,{style:{color:`#ef4444`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成失败`]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:`请在左侧点击重新生成`})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(xB,{style:{color:`#94a3b8`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[`待生成`,o===`video`?`视频`:`图片`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`点击左侧生成按钮开始生成`})]})})]})})]},e.id)})}),t.total>0&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:18},children:(0,$.jsx)(FW,{current:t.page||c,pageSize:t.pageSize||u,total:t.total,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{l(e),d(t)}})})]})},Lse=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)({personalCredits:0,teamAvailableCredits:0,teamFrozenCredits:0,credits:0,nextExpiringCredits:0,nextLastUsableAt:null}),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20);return(0,S.useEffect)(()=>{(async()=>{t(!0);try{let[e,t]=await Promise.all([f5(1,1),ase(o,c)]);r({personalCredits:Number(e.personalCredits||0),teamAvailableCredits:Number(e.teamAvailableCredits||0),teamFrozenCredits:Number(e.teamFrozenCredits||0),credits:Number(e.credits||e.availableCredits||0),nextExpiringCredits:Number(e.nextExpiringCredits||0),nextLastUsableAt:e.nextLastUsableAt||null}),a(t||[])}finally{t(!1)}})()},[o,c]),(0,$.jsxs)(nG,{spinning:e,children:[(0,$.jsx)(cq,{gutter:[16,16],style:{marginBottom:18},children:[{title:`个人可用积分`,value:n.personalCredits,icon:(0,$.jsx)(B8,{}),note:`个人积分可正常用于业务消费`},{title:`团队可用积分`,value:n.teamAvailableCredits,icon:(0,$.jsx)(C8,{}),note:`仅统计当前有效席位可消费额度`},{title:`团队冻结积分`,value:n.teamFrozenCredits,icon:(0,$.jsx)(A3,{}),note:`团队禁用期间继续发放和过期,但不可消费`},{title:`总可消费积分`,value:n.credits,icon:(0,$.jsx)(B8,{}),note:`个人积分 + 当前可用团队积分`}].map(e=>(0,$.jsx)(xR,{xs:24,sm:12,lg:6,children:(0,$.jsxs)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderRadius:16,padding:20,minHeight:132},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,color:`#64748b`,alignItems:`center`},children:[e.icon,(0,$.jsx)(`span`,{children:e.title})]}),(0,$.jsx)(`div`,{style:{fontSize:30,fontWeight:800,color:`#1e293b`,margin:`10px 0 6px`},children:e.value.toLocaleString()}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:e.note})]})},e.title))}),n.nextExpiringCredits>0&&(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:`10px 14px`,borderRadius:10,background:`#fffbe6`,color:`#8c6d1f`},children:[`最近将有 `,n.nextExpiringCredits.toLocaleString(),` 积分到期,最后可用时间:`,n.nextLastUsableAt?f7(n.nextLastUsableAt):`-`,`。`]}),(0,$.jsx)(Q.Title,{level:5,children:`个人积分批次`}),i.length===0?(0,$.jsx)(dC,{description:`暂无个人积分批次`}):(0,$.jsx)(aQ,{rowKey:`id`,columns:[{title:`资金域`,dataIndex:`creditScopeLabel`,width:110,render:(e,t)=>(0,$.jsx)(vQ,{color:t.creditScope===`team`?`blue`:`green`,children:e||(t.creditScope===`team`?`团队积分`:`个人积分`)})},{title:`积分等级`,dataIndex:`creditLevelLabel`,width:120,render:e=>e||`-`},{title:`来源`,dataIndex:`sourceTypeLabel`,width:150,render:e=>e||`-`},{title:`发放积分`,dataIndex:`grantAmount`,width:110,align:`right`},{title:`剩余积分`,dataIndex:`unspentAmount`,width:110,align:`right`,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:Number(e||0).toLocaleString()})},{title:`状态`,dataIndex:`statusLabel`,width:100,render:e=>(0,$.jsx)(vQ,{children:e||`其他状态`})},{title:`最后可用时间`,dataIndex:`lastUsableAt`,width:190,render:e=>e?f7(e):`-`}],dataSource:i,pagination:!1,scroll:{x:900}}),(0,$.jsx)(`div`,{style:{marginTop:16,textAlign:`right`},children:(0,$.jsx)(FW,{current:o,pageSize:c,onChange:(e,t)=>{s(e),l(t)},showSizeChanger:!0,pageSizeOptions:[20,50,100]})})]})},Rse=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)({records:[],total:0,credits:0,personalCredits:0,teamAvailableCredits:0,teamFrozenCredits:0,totalGranted:0,totalConsumed:0}),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10);return(0,S.useEffect)(()=>{(async()=>{t(!0);try{r(await f5(i,o))}finally{t(!1)}})()},[i,o]),(0,$.jsxs)(nG,{spinning:e,children:[(0,$.jsx)(cq,{gutter:[12,12],style:{marginBottom:20},children:[[`总可消费积分`,Number(n.credits||0),(0,$.jsx)(B8,{})],[`个人可用积分`,Number(n.personalCredits||0),(0,$.jsx)(B8,{})],[`团队可用积分`,Number(n.teamAvailableCredits||0),(0,$.jsx)(C8,{})],[`团队冻结积分`,Number(n.teamFrozenCredits||0),(0,$.jsx)(A3,{})]].map(([e,t,n])=>(0,$.jsx)(xR,{xs:12,lg:6,children:(0,$.jsxs)(`div`,{style:{border:`1px solid #f0f0f5`,background:`#fff`,padding:18,borderRadius:14},children:[(0,$.jsxs)(`div`,{style:{color:`#64748b`},children:[n,` `,e]}),(0,$.jsx)(`div`,{style:{fontSize:26,fontWeight:800,marginTop:8},children:Number(t).toLocaleString()})]})},e))}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:10},children:[(0,$.jsxs)(Q.Title,{level:5,style:{margin:0},children:[(0,$.jsx)(T8,{}),` 积分流水`]}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`},children:[`累计获得 `,Number(n.totalGranted||0).toLocaleString(),` · 累计消耗 `,Number(n.totalConsumed||0).toLocaleString()]})]}),(n.records||[]).length===0?(0,$.jsx)(dC,{description:`暂无积分变动记录`}):(0,$.jsx)(aQ,{rowKey:`id`,columns:[{title:`类型`,dataIndex:`typeLabel`,width:110,render:(e,t)=>(0,$.jsx)(vQ,{children:e||{recharge:`发放/充值`,consume:`消费`,refund:`业务退款`,expire:`积分过期`,revoke:`积分撤销`,team_internal:`历史团队流转`}[t.type]||`其他`})},{title:`说明`,dataIndex:`description`,ellipsis:!0},{title:`总变动`,dataIndex:`amount`,width:110,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:Number(e)<0?`#ef4444`:`#10b981`},children:[Number(e)>0?`+`:``,Number(e||0)]})},{title:`个人积分`,dataIndex:`personalAmount`,width:110,align:`right`,render:e=>Number(e||0)===0?`-`:Number(e||0)},{title:`团队积分`,dataIndex:`teamAmount`,width:110,align:`right`,render:e=>Number(e||0)===0?`-`:Number(e||0)},{title:`业务场景`,dataIndex:`billingSceneLabel`,width:140,render:e=>e||`-`},{title:`Token`,dataIndex:`totalTokens`,width:100,align:`right`,render:e=>e==null?`-`:Number(e).toLocaleString()},{title:`时间`,dataIndex:`createdAt`,width:180,render:e=>e?new Date(e).toLocaleString(`zh-CN`,{hour12:!1}):`-`}],dataSource:n.records||[],pagination:!1,scroll:{x:1050}}),(0,$.jsx)(`div`,{style:{marginTop:16,textAlign:`right`},children:(0,$.jsx)(FW,{current:i,pageSize:o,total:Number(n.total||0),onChange:(e,t)=>{a(e),s(t)}})})]})},zse={alipay:`支付宝`,wechat:`微信支付`,bank_transfer:`银行转账`,cash:`现金`,other:`其他-线下收款`},Bse={online_payment:`线上支付`,admin_offline:`后台线下成交`},M7={pending:`待支付`,paid:`已支付`,fulfilled:`已履约`,refunded:`已退款`,cancelled:`已取消`,expired:`已过期`,failed:`失败`,processing:`处理中`},Vse=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)(),[f,p]=(0,S.useState)([null,null]),m=(0,S.useCallback)(async()=>{t(!0);try{let e=await b5(o,c,{statusFilter:u,startDate:f[0]?.format?.(`YYYY-MM-DD`),endDate:f[1]?.format?.(`YYYY-MM-DD`)});r(e.items||[]),a(Number(e.total||0))}finally{t(!1)}},[o,c,u,f]);return(0,S.useEffect)(()=>{m()},[m]),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,marginBottom:14},children:[(0,$.jsx)(TV,{}),(0,$.jsx)(Q.Title,{level:5,style:{margin:0},children:`订单记录`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`线下售后订单同样在此只读展示`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16,flexWrap:`wrap`},children:[(0,$.jsx)(VC,{allowClear:!0,placeholder:`订单状态`,style:{width:140},value:u,onChange:e=>{d(e),s(1)},options:Object.entries(M7).filter(([e])=>[`pending`,`paid`,`refunded`,`cancelled`,`expired`,`failed`].includes(e)).map(([e,t])=>({value:e,label:t}))}),(0,$.jsx)(OB.RangePicker,{value:f,onChange:e=>{p(e||[null,null]),s(1)},placeholder:[`开始日期`,`结束日期`]})]}),(0,$.jsx)(nG,{spinning:e,children:n.length===0?(0,$.jsx)(dC,{description:`暂无订单记录`}):(0,$.jsx)(aQ,{rowKey:`id`,columns:[{title:`订单号`,dataIndex:`orderNo`,width:210,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,code:!0,children:e})},{title:`订单来源`,dataIndex:`orderSource`,width:120,render:(e,t)=>(0,$.jsx)(vQ,{color:e===`admin_offline`?`purple`:`blue`,children:t.orderSourceLabel||Bse[e]||`其他来源`})},{title:`商品`,dataIndex:`productNameSnapshot`,width:180,ellipsis:!0,render:(e,t)=>(0,$.jsxs)(`span`,{children:[e||`-`,Number(t.quantity||1)>1?` × ${t.quantity}`:``]})},{title:`支付方式`,dataIndex:`paymentMethod`,width:125,render:(e,t)=>t.paymentMethodLabel||(e===`other`&&t.offlinePaymentDetail?t.offlinePaymentDetail:zse[e])||`其他支付方式`},{title:`实际金额`,dataIndex:`amount`,width:110,align:`right`,render:e=>`¥${Number(e||0).toFixed(2)}`},{title:`状态`,dataIndex:`status`,width:100,render:(e,t)=>(0,$.jsx)(vQ,{children:t.statusLabel||M7[e]||`其他状态`})},{title:`创建时间`,dataIndex:`createdAt`,width:180,render:e=>e?new Date(e).toLocaleString(`zh-CN`,{hour12:!1}):`-`},{title:`支付时间`,dataIndex:`paidAt`,width:180,render:e=>e?new Date(e).toLocaleString(`zh-CN`,{hour12:!1}):`-`}],dataSource:n,pagination:!1,scroll:{x:1150}})}),(0,$.jsx)(`div`,{style:{marginTop:16,textAlign:`right`},children:(0,$.jsx)(FW,{current:o,pageSize:c,total:i,showSizeChanger:!0,onChange:(e,t)=>{s(e),l(t)}})})]})},Hse=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d(),f()},[c]);let d=async()=>{t(!0);try{let e=await h5(c,u);r(e.items||[]),s(e.total||0)}catch{r([])}t(!1)},f=async()=>{try{a(await g5())}catch{a(0)}},p=async e=>{try{await _5(e),d(),f()}catch{}};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(f2,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消息中心`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`未读 `,i,` 条`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(nG,{spinning:e,children:n.length===0?(0,$.jsx)(dC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无消息`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(aQ,{dataSource:n,columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>{let t={system:{color:`#6366f1`,label:`系统`,bg:`rgba(99,102,241,0.1)`,icon:(0,$.jsx)(s8,{style:{fontSize:14}})},credit:{color:`#f59e0b`,label:`积分`,bg:`rgba(245,158,11,0.1)`,icon:(0,$.jsx)(B8,{style:{fontSize:14}})},promo:{color:`#8b5cf6`,label:`活动`,bg:`rgba(139,92,246,0.1)`,icon:(0,$.jsx)(Z4,{style:{fontSize:14}})}},n=t[e]||t.system;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:n.color},children:n.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:n.color,fontWeight:500},children:n.label})]})}},{title:`标题`,dataIndex:`title`,key:`title`,ellipsis:!0},{title:`内容`,dataIndex:`content`,key:`content`,ellipsis:!0,render:e=>(0,$.jsx)(`div`,{style:{maxWidth:300},dangerouslySetInnerHTML:{__html:e}})},{title:`状态`,dataIndex:`isRead`,key:`isRead`,width:80,render:(e,t)=>e??t.is_read?(0,$.jsx)(vQ,{color:`gray`,style:{background:`rgba(148,163,184,0.1)`},children:`已读`}):(0,$.jsx)(vQ,{color:`purple`,style:{background:`rgba(139,92,246,0.1)`},children:`未读`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>{if(!e)return`-`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/(1e3*60*60));if(r<1)return`刚刚`;if(r<24)return`${r}小时前`;let i=Math.floor(r/24);return i<7?`${i}天前`:t.toLocaleDateString(`zh-CN`)}},{title:`操作`,key:`action`,width:100,render:(e,t)=>t.isRead??t.is_read?null:(0,$.jsx)(X,{type:`text`,size:`small`,onClick:()=>p(t.id),style:{color:`#6366f1`},children:`标记已读`})}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(FW,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})})},N7=()=>{let[e]=On(),[t,n]=(0,S.useState)(`credits`);return(0,S.useEffect)(()=>{(e.get(`tab`)||`credits`)===`orders`?n(`orders`):n(`credits`)},[e]),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(gL,{activeKey:t,onChange:n,items:[{key:`credits`,label:`积分明细`},{key:`orders`,label:`订单记录`}],style:{marginBottom:24},size:`large`}),t===`credits`&&(0,$.jsx)(Rse,{}),t===`orders`&&(0,$.jsx)(Vse,{})]})};function P7(e){return`/static/${e.startsWith(`/`)?e.slice(1):e}&w=300&q=50`}var Use=(e,t)=>e<=1?6:e===2||e===4||e===3?3:2,Wse=e=>k7(e).label,Gse=300,Kse=.6,qse=e=>{let t=Math.sin(e*9999)*1e4;return t-Math.floor(t)},F7=(e,t=0)=>{if(!e)return 0;let n=new Date(e).getTime();if(isNaN(n))return 0;let r=Math.max(0,(Date.now()-n)/1e3);if(r>=Gse)return 99;let i=Math.min(99,r*Kse),a=t*3+qse(t+1)*8;return i=Math.max(0,i-a),i},Jse=({item:e,isPending:t,isCompleted:n,onAnimationComplete:r,index:i=0})=>{let[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),l=(0,S.useRef)(null);return(0,S.useEffect)(()=>{s||o(F7(e.createdAt,i))},[e,i,s]),(0,S.useEffect)(()=>{if(n&&!s){c(!0);return}if(!t&&!s){l.current&&=(clearInterval(l.current),null);return}return l.current=window.setInterval(()=>{s||o(F7(e.createdAt,i))},1e3),()=>{l.current&&=(clearInterval(l.current),null)}},[e.createdAt,t,n,s,e.id,i]),(0,S.useEffect)(()=>{if(s){let e=a,t=Date.now(),n=()=>{let i=Date.now()-t,a=Math.min(i/800,1),s=1-(1-a)**3;o(e+(100-e)*s),a<1?requestAnimationFrame(n):setTimeout(()=>{r?.()},100)};requestAnimationFrame(n)}},[s,a,r]),!t&&!s?null:(0,$.jsx)(`div`,{style:{marginTop:4},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,fontSize:13,color:`#8b5cf6`,fontWeight:700,textShadow:`0 0 8px rgba(139, 92, 246, 0.3)`,transition:`all 0.3s ease-out`},children:[Math.round(a),`%`]})})},Yse=({task:e,onPreview:t,resolveUrl:n=e=>e||``})=>{let r=Math.max(1,Math.min(5,Number(e.generationCount||e.childItems?.length||1))),i=[...e.childItems||[]].sort((e,t)=>Number(e.generationIndex||0)-Number(t.generationIndex||0)),a=i.length>0?i:r>1?Array.from({length:r},(t,n)=>({id:`${e.id||`task`}-placeholder-${n+1}`,genType:e.genType,status:e.status,displayStatus:e.displayStatus,pipelineStage:e.pipelineStage,generationIndex:n+1,errorMessage:e.errorMessage,createdAt:e.createdAt})):[e],[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=`gen-task-resource-grid-animations`;if(document.getElementById(e))return;let t=document.createElement(`style`);t.id=e,t.textContent=` + `})]})})})]}),(0,$.jsx)(`div`,{className:`desktop-content`,style:{flex:1,background:`#f1f2f3`,borderRadius:`20px`,boxShadow:`0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04)`,padding:`24px 32px 32px`,border:`1px solid rgba(0, 0, 0, 0.06)`,overflow:`auto`,minHeight:0},children:!Ge&&(0,$.jsx)(wt,{context:{openContactModal:()=>c(!0)}})})]}),(0,$.jsx)(`div`,{className:`mobile-header`,children:(0,$.jsxs)(`div`,{className:`mobile-header-content`,children:[(0,$.jsx)(`div`,{className:`mobile-menu-btn`,onClick:()=>xe(!0),children:(0,$.jsx)(W3,{style:{fontSize:20}})}),(0,$.jsx)(`div`,{className:`mobile-header-title`,children:Fe}),(0,$.jsx)(`div`,{className:`mobile-header-right`,children:(0,$.jsxs)(`div`,{className:`mobile-credits-badge`,onClick:()=>u(!0),children:[(0,$.jsx)(z8,{}),(0,$.jsx)(`span`,{children:n?.credits||0})]})})]})}),(0,$.jsx)(`div`,{className:`mobile-content`,children:Ge&&(0,$.jsx)(wt,{context:{openContactModal:()=>c(!0)}})}),(0,$.jsxs)(uV,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:10,flexShrink:0,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.35)`},children:Le?(0,$.jsx)(`img`,{src:Le,alt:`logo`,style:{width:24,height:24,objectFit:`contain`}}):(0,$.jsx)(w8,{style:{fontSize:18,color:`#ffffff`}})}),(0,$.jsx)(`span`,{style:{fontWeight:700,fontSize:16,color:`#1e293b`},children:Fe})]}),placement:`left`,onClose:()=>xe(!1),open:be,size:280,closable:!0,className:`mobile-menu-drawer`,styles:{header:{borderBottom:`1px solid #f1f5f9`,padding:`16px 20px`},body:{padding:`12px 8px`,display:`flex`,flexDirection:`column`}},children:[(0,$.jsxs)(`div`,{style:{flex:1,overflow:`auto`,paddingBottom:12},children:[(0,$.jsx)(`div`,{style:{padding:`12px 8px 16px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsx)(Bw,{size:44,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,flexShrink:0},children:(0,$.jsx)(P8,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,marginBottom:2},children:n?.username||`用户`}),(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`},children:[(0,$.jsx)(z8,{style:{color:`#f59e0b`,marginRight:4}}),`积分: `,(0,$.jsx)(`span`,{style:{color:`#f59e0b`,fontWeight:600},children:n?.credits??0})]})]})]})}),(0,$.jsx)(n7,{data:Ue}),it.map(e=>{let t=e.menu_type??e.menuType,n=rt[e.id]&&rt[e.id].length>0,r=e.path===tt,i=Ne[e.id],a=r7[e.icon]||(0,$.jsx)(c3,{});return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`mobile-menu-item ${r&&!n?`mobile-menu-item-active`:``} ${t===`group`?`mobile-menu-group`:``}`,onClick:()=>at(e),children:[t!==`group`&&(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:r?`#6366f1`:`#64748b`},children:a}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{paddingLeft:0,color:t===`group`?`#94a3b8`:r?`#4f46e5`:`#475569`,fontWeight:t===`group`||r?600:400,fontSize:t===`group`?12:15,textTransform:t===`group`?`uppercase`:`none`,letterSpacing:t===`group`?.5:0},children:e.label}),(t===`group`||n)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#cbd5e1`,transition:`transform 0.2s ease`,transform:i?`rotate(90deg)`:`rotate(0deg)`},children:(0,$.jsx)(Bg,{})})]}),(t===`group`||n)&&i&&(0,$.jsx)(`div`,{className:`mobile-submenu`,children:(rt[e.id]||[]).map(e=>{let t=e.path===tt,n=r7[e.icon]||(0,$.jsx)(c3,{});return(0,$.jsxs)(`div`,{className:`mobile-menu-item mobile-submenu-item ${t?`mobile-menu-item-active`:``}`,onClick:()=>at(e),children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:t?`#6366f1`:`#94a3b8`},children:n}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:t?`#4f46e5`:`#64748b`,fontWeight:t?600:400,fontSize:14},children:e.label})]},e.id)})})]},e.id)})]}),(0,$.jsxs)(`div`,{style:{padding:`8px 0`,borderTop:`1px solid #f1f5f9`},children:[(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/user-center?tab=credits`),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#f59e0b`},children:(0,$.jsx)(z8,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`积分明细`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/user-center?tab=orders`),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#6366f1`},children:(0,$.jsx)(wV,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`订单记录`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{e(`/messages`),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#8b5cf6`},children:(0,$.jsx)(d2,{})}),(0,$.jsxs)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:[`消息中心`,ve>0&&(0,$.jsx)(_Q,{color:`red`,style:{marginLeft:8,fontSize:11},children:ve})]})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{o(!0),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#0ea5e9`},children:(0,$.jsx)(k3,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#475569`},children:`个人信息`})]}),(0,$.jsx)(`div`,{style:{height:8}}),(0,$.jsxs)(`div`,{className:`mobile-menu-item mobile-recharge-item`,onClick:()=>{u(!0),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#fff`},children:(0,$.jsx)(BI,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#fff`,fontWeight:600},children:`充值积分`})]}),(0,$.jsxs)(`div`,{className:`mobile-menu-item`,onClick:()=>{ut(),xe(!1)},children:[(0,$.jsx)(`span`,{className:`mobile-menu-icon`,style:{color:`#ef4444`},children:(0,$.jsx)(F3,{})}),(0,$.jsx)(`span`,{className:`mobile-menu-label`,style:{color:`#ef4444`},children:`退出登录`})]})]})]}),(0,$.jsx)(EG,{title:(0,$.jsxs)(yV,{children:[(0,$.jsx)(o8,{}),`账号设置`]}),open:a,onCancel:()=>{o(!1),d.resetFields(),f.resetFields()},width:440,footer:null,children:(0,$.jsxs)(hL,{defaultActiveKey:`profile`,children:[(0,$.jsx)(hL.TabPane,{tab:`个人信息`,children:(0,$.jsxs)(pH,{form:f,layout:`vertical`,style:{marginTop:20},onValuesChange:()=>{},children:[(0,$.jsx)(pH.Item,{name:`username`,label:`用户名`,rules:[{required:!0,message:`请输入用户名`},{min:3,message:`用户名至少3位`}],children:(0,$.jsx)(JU,{placeholder:`请输入用户名`,size:`large`,prefix:(0,$.jsx)(P8,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(pH.Item,{children:(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:lt,style:{width:`100%`},children:`确认修改`})})]})},`profile`),(0,$.jsx)(hL.TabPane,{tab:`修改密码`,children:(0,$.jsxs)(pH,{form:d,layout:`vertical`,style:{marginTop:20},onValuesChange:()=>{},children:[(0,$.jsx)(pH.Item,{name:`oldPwd`,label:`原密码`,rules:[{required:!0,message:`请输入原密码`}],children:(0,$.jsx)(JU.Password,{placeholder:`请输入原密码`,size:`large`,prefix:(0,$.jsx)(k3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(pH.Item,{name:`newPwd`,label:`新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(JU.Password,{placeholder:`请输入新密码(至少6位)`,size:`large`,prefix:(0,$.jsx)(k3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(pH.Item,{name:`confirmPwd`,label:`确认新密码`,rules:[{required:!0,message:`请再次输入新密码`},({getFieldValue:e})=>({validator(t,n){return!n||e(`newPwd`)===n?Promise.resolve():Promise.reject(Error(`两次密码不一致`))}})],children:(0,$.jsx)(JU.Password,{placeholder:`请再次输入新密码`,size:`large`,prefix:(0,$.jsx)(k3,{style:{color:`#94a3b8`,marginRight:8}})})}),(0,$.jsx)(pH.Item,{children:(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:ct,style:{width:`100%`},children:`确认修改`})})]})},`password`)]})}),(0,$.jsx)(jm,{theme:{token:{colorPrimary:`#6366f1`,borderRadius:8}},children:(0,$.jsx)(EG,{open:l,onCancel:()=>u(!1),footer:null,width:`100%`,centered:!1,style:{top:0,maxWidth:`100vw`,margin:0,paddingBottom:0},styles:{body:{padding:0,height:`100vh`,overflow:`auto`,scrollbarWidth:`none`,msOverflowStyle:`none`},mask:{background:`rgba(0,0,0,0.45)`},header:{display:`none`}},closable:!0,className:`recharge-fullscreen-modal`,title:null,closeIcon:(0,$.jsx)(ju,{style:{fontSize:18}}),children:(0,$.jsx)(`div`,{style:{width:`100%`,minHeight:`100vh`,background:`#f8fafc`,position:`relative`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`0 auto`,padding:`24px`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:20},children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:8},children:`订阅套餐`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`个人和团队订阅均可重复购买、多实例同时有效;季卡和年卡仅在订阅内部按月发放积分,不属于自动续费。`})]}),w===`personal`&&E.length>0&&(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #e8eaed`},children:[(0,$.jsxs)(Q.Text,{strong:!0,children:[`当前有效个人订阅:`,E.length,` 张`]}),(0,$.jsx)(`div`,{style:{marginTop:8,display:`flex`,gap:8,flexWrap:`wrap`},children:E.map(e=>(0,$.jsxs)(_Q,{color:`purple`,children:[e.productName,` · `,e.billingCycleLabel||`其他周期`,` · 到期 `,new Date(e.expiresAt).toLocaleString(`zh-CN`,{hour12:!1})]},e.id))})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginBottom:10},children:(0,$.jsx)(hL,{activeKey:w,onChange:e=>{T(e),m(null)},items:[{key:`personal`,label:`普通订阅`},...x.length>0?[{key:`team`,label:`团队订阅`}]:[]],centered:!0,size:`large`,tabBarStyle:{marginBottom:0}})}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:16,marginBottom:20},children:(0,$.jsxs)(KF.Group,{value:j,onChange:e=>{M(e.target.value),m(null)},buttonStyle:`solid`,children:[(0,$.jsx)(KF.Button,{value:`monthly`,children:`月套餐`}),(0,$.jsx)(KF.Button,{value:`quarterly`,children:`季套餐`}),(0,$.jsx)(KF.Button,{value:`yearly`,children:`年套餐`})]})}),N.length===0?(0,$.jsx)(`div`,{style:{padding:48,textAlign:`center`,color:`#94a3b8`},children:w===`team`?`暂无可购买的团队订阅套餐,请联系管理员配置并上架套餐。`:`暂无可订阅套餐,请联系管理员配置并上架套餐。`}):(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:16,flexWrap:`wrap`},children:N.map(e=>{let t=a7[e.tierCode||``]||a7.default,n=e.regularPrice||e.price,r=e.currentPrice??e.price,i=n&&Number(n)>Number(r),a=e.monthlyGrantCredits?`${Number(e.monthlyGrantCredits).toLocaleString()} 积分/月`:`${Number(e.grantCredits||0).toLocaleString()} 积分`;return(0,$.jsx)(`div`,{style:{width:250,display:`flex`,flexDirection:`column`,borderRadius:14,overflow:`hidden`,background:`#fff`,border:`1px solid #e8eaed`,position:`relative`,transition:`all 0.2s`},children:(0,$.jsxs)(`div`,{style:{padding:`16px 14px 12px`,background:`#fafbfc`,flex:1},children:[e.priceType===`first_purchase`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,background:`#fff2e8`,color:`#fa541c`,fontSize:11,padding:`2px 8px`,borderRadius:10,fontWeight:500},children:`首充价`}),e.priceType===`activity`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,background:`#fff1f0`,color:`#cf1322`,fontSize:11,padding:`2px 8px`,borderRadius:10,fontWeight:500},children:`活动价`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,background:t.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#fff`,fontSize:14},children:t.icon}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14},children:e.name}),e.productType===`team_subscription`&&(0,$.jsx)(_Q,{color:`blue`,style:{marginLeft:6,fontSize:10},children:`团队套餐`}),(0,$.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:e.description||e.tierLabel||`订阅套餐`})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsxs)(`span`,{style:{fontSize:24,fontWeight:700,color:`#1a1a2e`},children:[`¥`,r]}),i&&(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#94a3b8`,textDecoration:`line-through`,marginLeft:6},children:[`¥`,n]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{children:a}),(0,$.jsxs)(`span`,{children:[`共 `,e.grantCount,` 次`]})]}),e.unavailableReason&&(0,$.jsx)(`div`,{style:{padding:`6px 14px`,fontSize:13,color:`#dc2626`,background:`#fef2f2`,marginTop:`20px`},children:e.unavailableReason}),(0,$.jsx)(`div`,{style:{padding:`10px 14px`,borderTop:`1px solid #f0f0f0`},children:(0,$.jsx)(X,{block:!0,size:`small`,disabled:e.canPurchase===!1||!W.alipay&&!W.wechat,loading:R&&p===e.id,onClick:()=>{m(e.id),ft(e.id,e)},style:{borderRadius:8,background:e.canPurchase===!1?`#f5f5f5`:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:e.canPurchase===!1?`#94a3b8`:`#fff`,border:`none`,fontWeight:600,height:34,fontSize:13},children:e.canPurchase===!1?`不可购买`:`立即订阅`})}),e.features&&e.features.length>0&&(0,$.jsx)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px dashed #e2e8f0`},children:e.features.map((e,t)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`,lineHeight:`20px`,marginBottom:2},children:[(0,$.jsx)(Tu,{style:{color:`#4c49cc`,fontSize:14,flexShrink:0,marginTop:2}}),(0,$.jsx)(`span`,{style:{fontSize:14,margin:`4px`},children:e})]},t))})]})},e.id)})})]}),(0,$.jsx)(`div`,{style:{marginBottom:24,background:`#fff`,borderRadius:12,padding:24,border:`1px solid #e8eaed`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(z8,{style:{color:`#6366f1`,fontSize:24}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`积分充值`}),(0,$.jsxs)(Q.Text,{type:`secondary`,style:{fontSize:12},children:[`当前积分:`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontWeight:600},children:n?.credits??0})]})]})]}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(c8,{}),onClick:()=>A(!0),style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,height:42,paddingLeft:20,paddingRight:20},children:`积分商城`})]})}),(0,$.jsxs)(`div`,{style:{marginBottom:24,borderRadius:16,overflow:`hidden`,background:`#fff`,border:`1px solid #e8eaed`},children:[(0,$.jsx)(`div`,{style:{padding:`24px 24px 0`,textAlign:`center`},children:(0,$.jsx)(Q.Title,{level:3,style:{color:`#1a1a2e`,marginBottom:16},children:`常见问题`})}),(0,$.jsx)(a_,{accordion:!0,expandIcon:({isActive:e})=>e?(0,$.jsx)(ER,{style:{color:`#64748b`}}):(0,$.jsx)(jC,{style:{color:`#64748b`}}),style:{background:`#fff`,border:`none`},items:dse.map(e=>({key:e.key,label:(0,$.jsx)(`span`,{style:{color:`#1a1a2e`,fontSize:14,fontWeight:500},children:e.label}),children:e.children,style:{background:`#fff`,borderBottom:`1px solid #e8eaed`}}))}),(0,$.jsxs)(`div`,{style:{padding:`24px`,borderTop:`1px solid #e8eaed`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,cursor:`pointer`,transition:`background 0.2s`},onClick:()=>{c(!0)},onMouseEnter:e=>{e.currentTarget.style.background=`#f8fafc`},onMouseLeave:e=>{e.currentTarget.style.background=`#fff`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(q3,{style:{color:`#64748b`,fontSize:18}}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`,fontSize:14,fontWeight:500},children:`联系客服`})]}),(0,$.jsx)(Bg,{style:{color:`#64748b`,fontSize:14}})]})]})]})})})}),(0,$.jsxs)(EG,{title:(0,$.jsxs)(yV,{children:[(0,$.jsx)(z8,{}),`积分商城`]}),open:k,onCancel:()=>A(!1),footer:null,width:720,closable:!0,styles:{body:{padding:20}},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:(0,$.jsxs)(yV,{children:[(0,$.jsx)(Q.Text,{children:`当前积分:`}),(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#6366f1`,fontSize:18},children:n?.credits??0})]})}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(160px, 1fr))`,gap:12,maxHeight:400,overflowY:`auto`,paddingRight:4},children:[_.length===0&&(0,$.jsx)(`div`,{style:{width:`100%`,padding:32,textAlign:`center`,color:`#94a3b8`},children:`暂无可购买的积分增值包`}),_.map(e=>{let t=Number(e.grantCredits||0),n=use(t),r=e.currentPrice||e.price;return(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,background:`#fff`,border:p===e.id?`2px solid #e8eaed`:`1px solid #e8eaed`,position:`relative`,transition:`all 0.2s`},children:[e.description&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:-1,right:8,background:`#fff2e8`,color:`#fa541c`,fontSize:11,padding:`2px 8px`,borderRadius:10,fontWeight:500},children:e.description}),(0,$.jsxs)(`div`,{style:{padding:`12px 10px 8px`,background:`#fafbfc`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,marginBottom:4},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,flexShrink:0,background:n.gradient,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:14,color:`#fff`},children:n.icon}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12},children:e.name}),(0,$.jsxs)(`div`,{style:{fontSize:11,fontWeight:600,color:`#6366f1`},children:[t.toLocaleString(),` 积分`]})]})]}),(0,$.jsxs)(`div`,{style:{marginTop:4,fontSize:18,fontWeight:700,color:`#1a1a2e`},children:[`¥`,r]}),(0,$.jsxs)(Q.Text,{type:`secondary`,style:{fontSize:10},children:[`有效期 `,Number(e.validityMonths||1),` 个月`]})]}),(0,$.jsx)(`div`,{style:{padding:`6px 10px`,borderTop:`1px solid #f0f0f0`},children:(0,$.jsx)(X,{block:!0,size:`small`,disabled:!W.alipay&&!W.wechat,loading:R&&p===e.id,onClick:()=>{m(e.id),ft(e.id,e)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,border:`none`,fontWeight:600,height:28,fontSize:12},children:`购买`})})]},e.id)})]})]}),(0,$.jsx)(EG,{open:P,onCancel:async()=>{if(dt(),ee.current){try{await x5(ee.current)}catch{}ee.current=null}localStorage.removeItem(_e),F(!1),ne(null),re(null),oe(!1),ce(`alipay`),le.resetFields()},footer:null,width:`50%`,closable:!0,title:(0,$.jsxs)(Q.Title,{level:5,style:{margin:0},children:[`开通`,G?.title||K?.product?.name||`会员服务`,G?.credits||K?.product?.grantCredits||K?.product?.monthlyGrantCredits?` ${Number(G?.credits||K?.product?.grantCredits||K?.product?.monthlyGrantCredits||0).toLocaleString()} 积分`:``]}),styles:{body:{padding:0,borderRadius:16,overflow:`hidden`},footer:{borderRadius:16,borderTop:`1px solid #f0f0f0`,padding:`16px 24px`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,minHeight:380},children:[(0,$.jsxs)(`div`,{style:{flex:1,padding:24,background:`#fff`,borderRight:`1px solid #f0f0f0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,marginBottom:8,display:`block`},children:`商品信息`}),(0,$.jsxs)(`div`,{style:{padding:14,background:`#f8fafc`,borderRadius:10,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:6},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1a1a2e`},children:G?.tierName||G?.title||K?.product?.name||`积分充值`}),(G?.periodLabel||K?.product?.billingCycle)&&(0,$.jsx)(_Q,{color:`purple`,style:{fontSize:11,margin:0,borderRadius:6,padding:`0 6px`},children:G?.periodLabel||{monthly:`月套餐`,quarterly:`季套餐`,yearly:`年套餐`}[K?.product?.billingCycle]||``})]}),(0,$.jsxs)(`div`,{style:{fontSize:22,fontWeight:700,color:`#6366f1`,lineHeight:1.4},children:[`¥`,G?.price??Number(K?.product?.currentPrice||K?.product?.price||0)*(K?.product?.productType===`team_subscription`?ie:1),(G?.originalPrice||K?.product?.regularPrice)&&Number(G?.originalPrice||K?.product?.regularPrice||0)>Number(G?.price||K?.product?.currentPrice||K?.product?.price||0)&&(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#94a3b8`,textDecoration:`line-through`,marginLeft:8,fontWeight:400},children:[`¥`,G?.originalPrice||K?.product?.regularPrice]})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,marginBottom:8,display:`block`},children:`订单明细`}),(0,$.jsxs)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:8,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`积分数量`}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`},children:(G?.credits==null?K?.product?.grantCredits||K?.product?.monthlyGrantCredits:G.credits)?`${Number(G?.credits||K?.product?.grantCredits||K?.product?.monthlyGrantCredits||0).toLocaleString()} 积分`:`-`})]}),K?.product?.productType===`team_subscription`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`团队席位数量`}),q?(0,$.jsxs)(`span`,{children:[ie,` 席`]}):(0,$.jsx)(sz,{min:2,max:20,precision:0,value:ie,onChange:e=>ae(Number(e||2))})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`购买方式`}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`},children:G?.isSubscription??!!K?.product?.billingCycle?`独立订阅实例,不自动续费`:`一次性购买`})]}),(0,$.jsx)(`div`,{style:{height:1,background:`#e2e8f0`,margin:`8px 0`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`商品原价`}),(0,$.jsxs)(`span`,{style:{color:`#1a1a2e`},children:[`¥`,G?.originalPrice||K?.product?.regularPrice||G?.price||K?.product?.price||0]})]}),(0,$.jsx)(`div`,{style:{height:1,background:`#e2e8f0`,margin:`8px 0`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 0`},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#1a1a2e`},children:`应付金额`}),(0,$.jsxs)(`span`,{style:{fontSize:18,fontWeight:700,color:`#6366f1`},children:[`¥`,G?.price??Number(K?.product?.currentPrice||K?.product?.price||0)*(K?.product?.productType===`team_subscription`?ie:1)]})]})]})]})]}),(0,$.jsxs)(`div`,{style:{width:`50%`,padding:20,background:`#fff`,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,background:`#f3f4f6`,borderRadius:10,padding:4,marginBottom:20},children:[(0,$.jsxs)(`div`,{onClick:()=>ce(`alipay`),style:{flex:1,textAlign:`center`,padding:`8px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:600,background:se===`alipay`?`#fff`:`transparent`,color:se===`alipay`?`#1677ff`:`#64748b`,boxShadow:se===`alipay`?`0 2px 8px rgba(0,0,0,0.08)`:`none`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6},children:[(0,$.jsx)(A0,{style:{color:se===`alipay`?`#1677ff`:`#94a3b8`}}),`支付宝支付`]}),(0,$.jsxs)(`div`,{onClick:()=>{ce(`corporate`),ge()},style:{flex:1,textAlign:`center`,padding:`8px 0`,borderRadius:8,cursor:`pointer`,fontSize:14,fontWeight:600,background:se===`corporate`?`#fff`:`transparent`,color:se===`corporate`?`#6366f1`:`#64748b`,boxShadow:se===`corporate`?`0 2px 8px rgba(0,0,0,0.08)`:`none`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6},children:[(0,$.jsx)(a2,{style:{color:se===`corporate`?`#6366f1`:`#94a3b8`}}),`对公转账`]})]}),se===`alipay`&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,marginBottom:12},children:[(0,$.jsx)(A0,{style:{fontSize:18,color:`#1677ff`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#64748b`},children:`请用支付宝扫码支付`})]}),(0,$.jsx)(`div`,{style:{position:`relative`,width:180,height:180,borderRadius:12,border:`1px solid #f0f0f0`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#fff`},children:q&&G?.qrCode?(0,$.jsx)(D0,{value:G.qrCode,size:150,level:`M`}):(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsxs)(`div`,{style:{fontSize:13,color:`#64748b`,marginBottom:12},children:[`确认商品和金额后`,(0,$.jsx)(`br`,{}),`生成二维码`]}),(0,$.jsx)(X,{type:`primary`,loading:R,onClick:pt,style:{borderRadius:8,height:36,fontWeight:600},children:`确认使用支付宝支付`})]})}),q&&(0,$.jsxs)(`div`,{style:{marginTop:12,fontSize:12,color:`#94a3b8`},children:[B,` 秒后二维码失效`]}),q&&(0,$.jsx)(X,{danger:!0,style:{marginTop:14,borderRadius:8},onClick:async()=>{if(dt(),ee.current){try{await x5(ee.current)}catch{}ee.current=null}localStorage.removeItem(_e),F(!1),ne(null),re(null),oe(!1),Z.info(`已取消支付`)},children:`取消转账`}),(0,$.jsxs)(`div`,{style:{marginTop:8,fontSize:11,color:`#94a3b8`,textAlign:`center`},children:[`开通即代表同意`,(0,$.jsx)(`br`,{}),`《用户服务协议》`]})]}),se===`corporate`&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,marginBottom:8,display:`block`,fontWeight:600},children:`收款账户信息`}),(0,$.jsx)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:8,border:`1px solid #e2e8f0`,minHeight:80,display:`flex`,alignItems:`center`},children:me?(0,$.jsx)(`div`,{style:{width:`100%`,textAlign:`center`,color:`#94a3b8`,fontSize:12},children:`加载中...`}):fe?.hasAccount&&fe?.account?(0,$.jsxs)(`div`,{style:{width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12,marginBottom:4},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`账户名称`}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`,fontWeight:500},children:fe.account.accountName})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12,marginBottom:4},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`开户银行`}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`,fontWeight:500,display:`flex`,alignItems:`center`,gap:4},children:fe.account.bankName})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`4px 0`,fontSize:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`账号`}),(0,$.jsx)(`span`,{style:{color:`#1a1a2e`,fontWeight:500,fontFamily:`monospace`},children:fe.account.accountNo})]})]}):(0,$.jsx)(`div`,{style:{width:`100%`,textAlign:`center`,color:`#94a3b8`,fontSize:12},children:`暂无收款账户信息`})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`,marginBottom:4,display:`block`,fontWeight:600},children:`填写您的打款信息`}),(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#ef4444`,marginBottom:8,display:`block`},children:`注:打款金额需与所标注金额一致,不然无法开通,银行信息需正确填写`}),(0,$.jsxs)(pH,{form:le,layout:`vertical`,size:`small`,requiredMark:!1,children:[(0,$.jsx)(pH.Item,{name:`accountName`,label:`账户名称`,rules:[{required:!0,message:`请输入账户名称`}],style:{marginBottom:10},children:(0,$.jsx)(JU,{placeholder:`请输入付款方账户名称`})}),(0,$.jsx)(pH.Item,{name:`bankName`,label:`开户银行`,rules:[{required:!0,message:`请输入开户银行`}],style:{marginBottom:10},children:(0,$.jsx)(JU,{placeholder:`请输入开户银行`,prefix:(0,$.jsx)(a2,{style:{color:`#94a3b8`}})})}),(0,$.jsx)(pH.Item,{name:`bankAccount`,label:`账号`,rules:[{required:!0,message:`请输入账号`}],style:{marginBottom:8},children:(0,$.jsx)(JU,{placeholder:`请输入付款方账号`})})]})]}),(0,$.jsx)(X,{type:`primary`,block:!0,size:`large`,loading:ue,onClick:mt,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,fontWeight:600,height:38,fontSize:14},children:`提交对公转账`}),(0,$.jsx)(`div`,{style:{marginTop:8,fontSize:11,color:`#94a3b8`,textAlign:`center`},children:`提交后客服将在 12 个小时日内审核到账,如遇问题,请联系客服。`})]})]})]})}),(0,$.jsx)(sse,{}),(0,$.jsx)(`div`,{className:`contact-button-wrapper`,style:{right:`${De.x}px`,bottom:`${window.innerHeight-De.y}px`},children:(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`div`,{className:`contact-tooltip`,style:{opacity:+!!Se},children:`联系我们`}),(0,$.jsx)(`button`,{className:`contact-button ${ke?`dragging`:``}`,onMouseEnter:()=>Ce(!0),onMouseLeave:()=>Ce(!1),onMouseDown:Ze,onMouseUp:$e,children:(0,$.jsx)(q3,{style:{fontSize:20}})})]})}),(0,$.jsx)(EG,{title:(0,$.jsxs)(yV,{children:[(0,$.jsx)(q3,{}),`联系我们`]}),open:s,onCancel:()=>{c(!1),we.resetFields()},footer:null,width:480,className:`contact-modal`,children:(0,$.jsxs)(`div`,{style:{marginTop:8},children:[(0,$.jsxs)(pH,{form:we,layout:`vertical`,children:[(0,$.jsx)(pH.Item,{name:`name`,label:`姓名`,rules:[{required:!0,message:`请输入姓名`}],children:(0,$.jsx)(JU,{placeholder:`请输入您的姓名`,size:`large`})}),(0,$.jsx)(pH.Item,{name:`phone`,label:`手机号`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(JU,{placeholder:`请输入您的手机号`,size:`large`})}),(0,$.jsx)(pH.Item,{name:`companyName`,label:`公司名称`,rules:[{required:!0,message:`请输入公司名称`}],children:(0,$.jsx)(JU,{placeholder:`请输入公司名称`,size:`large`})}),(0,$.jsx)(pH.Item,{name:`industry`,label:`您的行业`,rules:[{required:!0,message:`请输入您的行业`}],children:(0,$.jsx)(JU,{placeholder:`请输入您的行业`,size:`large`})}),(0,$.jsx)(pH.Item,{name:`message`,label:`留言(选填)`,children:(0,$.jsx)(JU.TextArea,{placeholder:`请输入您的需求或问题`,rows:3,style:{borderRadius:10}})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,display:`flex`,gap:12},children:[(0,$.jsx)(X,{size:`large`,onClick:()=>{c(!1),we.resetFields()},style:{borderRadius:10,flex:1},children:`取消`}),(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:gt,loading:Te,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,flex:1},children:`提交`})]})]})})]})},pse=`http://localhost:8000/api`,mse=()=>{let{checkAuth:e}=$5(),[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(`password`),[a,o]=(0,S.useState)(`password`),[s]=On(),c=s.get(`redirect`),l=s.get(`tab`),[u,d]=(0,S.useState)(0),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(!1),[C,w]=(0,S.useState)(0),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),j=(()=>{try{let e=localStorage.getItem(`siteInfo`);if(e){let t=JSON.parse(e);return{siteName:t.siteName||`智创`,siteLogo:t.siteLogo||``}}}catch{}return{siteName:`智创`,siteLogo:``}})(),[M,N]=(0,S.useState)(j.siteName),[P,F]=(0,S.useState)(j.siteLogo),[I,L]=(0,S.useState)(``),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(``),[H,U]=(0,S.useState)(``),ee=Ye(),{login:W}=$5(),[te]=pH.useForm(),[G]=pH.useForm(),[ne]=pH.useForm();(0,S.useEffect)(()=>{f5().then(e=>{N(e.siteName),F(e.siteLogo),L(e.loginBgVideo||``),V(e.userAgreementPrivacyUrl),U(e.siteCopyright)}).catch(()=>{})},[]),(0,S.useEffect)(()=>{l===`register`&&i(`register`)},[l]),(0,S.useEffect)(()=>{if(s.get(`kicked_out`)===`1`){Z.warning(`您的账号已在其他设备登录,请重新登录`);let e=new URL(window.location.href);e.searchParams.delete(`kicked_out`),window.history.replaceState({},``,e.toString())}},[s]);let K=()=>{if(c)try{ee(decodeURIComponent(c));return}catch{}ee(`/home`)},re=()=>m?!0:(Z.warning(`请先阅读并同意用户协议及隐私政策`),!1),ie=async()=>{if(re())try{let t=await te.validateFields();await W(t.phone,t.password,void 0,t.rememberMe),Z.success(`登录成功,欢迎回来`),await e(),K()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}},ae=async()=>{if(re())try{let t=G.getFieldsValue();if(!t.phone||!t.code){Z.error(`请填写手机号和验证码`);return}n(!0),await iae(t.phone,t.code),Z.success(`登录成功,欢迎回来`),await e(),K()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t)}finally{n(!1)}},q=async()=>{if(re())try{let t=await ne.validateFields();n(!0),await aae(t.phone,t.regCode,t.password),Z.success(`注册成功`),await e(),K()}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`注册失败`;Z.error(t)}finally{n(!1)}},oe=(e,t)=>{e(60);let n=setInterval(()=>{e(e=>e<=1?(clearInterval(n),_(!1),t?O(!0):A(!0),0):e-1)},1e3)};(0,S.useEffect)(()=>{u===0&&r===`phone`&&x(!1)},[u,r]);let se=async(e,t)=>{try{if(!e||!/^1\d{10}$/.test(e)){Z.error(`请输入正确的手机号`);return}if(t){_(!0),y(!1);return}if(!b){_(!0),x(!1);return}let n=``;n=r===`register`?`register`:`login`,await p5(e,n),oe(t?p:d),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(y(!1),p(0)):(x(!1),d(0)),w(e=>e+1)}},ce=async(e=!1)=>{let t=r===`register`?ne.getFieldValue(`phone`):G.getFieldValue(`phone`);try{let e=``;e=r===`register`?`register`:`login`,await p5(t,e),r===`register`?(y(!0),oe(p,!0)):(x(!0),oe(d,!1)),Z.success(`验证码已发送`)}catch(e){let t=e?.response?.data?.detail||e?.response?.data?.message||e?.message||`登录失败`;Z.error(t),r===`register`?(y(!1),p(0),O(!0)):(x(!1),d(0),A(!0)),w(e=>e+1)}},le=e=>{o(e),i(e),d(0),p(0),x(!1),y(!1),_(!1),O(!1),A(!1),w(e=>e+1),e===`password`?te.resetFields():G.resetFields()},ue={background:`#fff`,border:`1.5px solid #e2e8f0`,color:`#1e293b`,borderRadius:10,fontSize:14},de=e=>{if(!e){Z.warning(`暂未上传协议文件`);return}e.startsWith(`http://`)||e.startsWith(`https://`)?window.open(e,`_blank`):window.open(`${pse.replace(/\/api$/,``)}${e}`,`_blank`)};return(0,$.jsxs)(`div`,{className:`login-page`,children:[(0,$.jsx)(hse,{src:I,onReady:()=>z(!0)}),(0,$.jsx)(`div`,{className:`login-bg-overlay`,style:{opacity:+!!R}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,opacity:+!!R,transition:`opacity 0.5s ease`,pointerEvents:R?`auto`:`none`},children:[(0,$.jsx)(`div`,{className:`login-slogan`,children:(0,$.jsx)(`span`,{className:`login-slogan-text`,children:`AI赋能创意,素材触手可及`})}),(0,$.jsx)(`div`,{className:`login-center`,children:(0,$.jsxs)(_L,{className:`login-card`,styles:{body:{padding:`32px 32px`}},children:[(0,$.jsx)(`div`,{className:`login-card-header`,children:(0,$.jsxs)(`div`,{className:`login-logo-row`,children:[P?(0,$.jsx)(`img`,{src:P,alt:`logo`,className:`login-logo-img`}):(0,$.jsx)(`div`,{className:`login-logo-placeholder`,children:(0,$.jsx)(w8,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`span`,{className:`login-site-name`,children:M})]})}),(0,$.jsx)(Q.Text,{className:`login-card-subtitle`,children:r===`register`?`注册新账号,开始创作视频`:`登录您的账号,开始创作`}),r!==`register`&&(0,$.jsx)(`div`,{className:`login-tabs`,children:[`password`,`phone`].map(e=>(0,$.jsx)(`div`,{onClick:()=>le(e),className:`login-tab ${a===e?`login-tab-active`:``}`,children:e===`password`?`密码登录`:`验证码登录`},e))}),r===`password`&&(0,$.jsxs)(pH,{form:te,size:`large`,layout:`vertical`,onFinish:ie,children:[(0,$.jsx)(pH.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(JU,{prefix:(0,$.jsx)(X3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,style:ue})}),(0,$.jsx)(pH.Item,{name:`password`,rules:[{required:!0,message:`请输入密码`}],children:(0,$.jsx)(JU.Password,{prefix:(0,$.jsx)(k3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入密码`,style:ue})}),(0,$.jsx)(pH.Item,{name:`rememberMe`,valuePropName:`checked`,style:{marginBottom:12},children:(0,$.jsx)(pR,{children:`记住我的登录状态`})}),(0,$.jsx)(pH.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,htmlType:`submit`,loading:t,block:!0,className:`login-submit-btn`,children:`登 录`})})]}),r===`phone`&&(0,$.jsxs)(pH,{form:G,size:`large`,layout:`vertical`,children:[(0,$.jsx)(pH.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(JU,{prefix:(0,$.jsx)(X3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:ue})}),(0,$.jsx)(pH.Item,{name:`code`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(yV.Compact,{style:{width:`100%`},children:[(0,$.jsx)(JU,{prefix:(0,$.jsx)($6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!b,style:{...ue,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(X,{disabled:u>0,style:{fontSize:14,fontWeight:400},onClick:()=>{k?(x(!1),_(!0),w(e=>e+1)):g&&!b?(E(!0),setTimeout(()=>E(!1),500)):se(G.getFieldValue(`phone`))},className:`login-code-btn`,children:u>0?`${u}s`:k?`重新发送`:`获取验证码`})]})}),g&&(0,$.jsx)(pH.Item,{style:{marginBottom:12},children:(0,$.jsx)(o7,{onSuccess:ce,isVerified:b,shake:T})},C),(0,$.jsx)(pH.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,onClick:ae,loading:t,block:!0,className:`login-submit-btn`,children:`登 录`})})]}),r===`register`&&(0,$.jsxs)(pH,{form:ne,size:`large`,layout:`vertical`,children:[(0,$.jsx)(pH.Item,{name:`phone`,rules:[{required:!0,message:`请输入手机号`},{pattern:/^1\d{10}$/,message:`请输入正确的手机号`}],children:(0,$.jsx)(JU,{prefix:(0,$.jsx)(X3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入手机号`,maxLength:11,style:ue})}),(0,$.jsx)(pH.Item,{name:`regCode`,rules:[{required:!0,message:`请输入验证码`}],children:(0,$.jsxs)(yV.Compact,{style:{width:`100%`},children:[(0,$.jsx)(JU,{prefix:(0,$.jsx)($6,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请输入验证码`,maxLength:6,disabled:!v,style:{...ue,borderRadius:`10px 0 0 10px`,flex:1}}),(0,$.jsx)(X,{disabled:f>0,style:{fontSize:14,fontWeight:400},onClick:()=>{D?(y(!1),_(!0),w(e=>e+1)):g&&!v?(E(!0),setTimeout(()=>E(!1),500)):se(ne.getFieldValue(`phone`),!0)},className:`login-code-btn`,children:f>0?`${f}s`:D?`重新发送`:`获取验证码`})]})}),g&&(0,$.jsx)(pH.Item,{style:{marginBottom:12},children:(0,$.jsx)(o7,{onSuccess:ce,isVerified:v,shake:T})},C),(0,$.jsx)(pH.Item,{name:`password`,rules:[{required:!0,message:`请设置密码`},{min:6,message:`密码至少6位`}],children:(0,$.jsx)(JU.Password,{prefix:(0,$.jsx)(k3,{style:{color:`#94a3b8`,marginRight:8}}),placeholder:`请设置密码(至少6位)`,style:ue})}),(0,$.jsx)(pH.Item,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,onClick:q,loading:t,block:!0,className:`login-submit-btn`,children:`注 册`})})]}),(0,$.jsx)(`div`,{className:`login-agreement`,children:(0,$.jsx)(pR,{checked:m,onChange:e=>h(e.target.checked),children:(0,$.jsxs)(`span`,{className:`login-agreement-text`,children:[`我已阅读并同意`,(0,$.jsx)(`span`,{onClick:e=>{e.stopPropagation(),de(B)},className:`login-link`,children:`《用户协议及隐私政策》`})]})})}),(0,$.jsx)(`div`,{className:`login-footer`,children:r===`register`?(0,$.jsx)(Q.Text,{className:`login-switch-btn`,onClick:()=>{i(`password`),o(`password`),O(!1),A(!1),y(!1),_(!1),w(e=>e+1),ne.resetFields()},children:`已有账号?去登录`}):(0,$.jsx)(Q.Text,{className:`login-switch-btn`,onClick:()=>{i(`register`),O(!1),A(!1),y(!1),_(!1),w(e=>e+1)},children:`没有账号?立即注册`})})]})}),H&&(0,$.jsx)(`div`,{className:`login-copyright-wrapper`,children:(0,$.jsx)(`div`,{className:`login-copyright`,children:H})})]})]})},hse=({src:e,onReady:t})=>{let[n,r]=(0,S.useState)(!1),i=S.useRef(null),a=()=>{n||(r(!0),i.current?.play().catch(()=>{}),t())};if(!e)return t(),null;let o=e.toLowerCase().endsWith(`.gif`),s=e.toLowerCase().endsWith(`.webp`);return o||s?(0,$.jsx)(`img`,{className:`login-bg-video`,src:e,alt:``,onLoad:a,onError:a}):(0,$.jsxs)($.Fragment,{children:[!n&&(0,$.jsx)(`div`,{className:`login-bg-video login-bg-placeholder`}),(0,$.jsx)(`video`,{ref:i,className:`login-bg-video`,style:{opacity:+!!n},autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:`auto`,onCanPlayThrough:a,onCanPlay:a,onError:a,children:(0,$.jsx)(`source`,{src:e,type:e.endsWith(`.webm`)?`video/webm`:e.endsWith(`.mov`)?`video/quicktime`:`video/mp4`})})]})},o7=({onSuccess:e,isVerified:t,shake:n})=>{let r=S.useRef(null),i=S.useRef(null),a=S.useRef(null),o=S.useRef(0),s=S.useRef(!1),[c,l]=S.useState(360),u=c-50;S.useEffect(()=>{let e=()=>{if(r.current){let e=r.current.offsetWidth;e>0&&l(e)}};e();let t=new ResizeObserver(e);return r.current&&t.observe(r.current),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let d=n=>{if(s.current||t)return;let r=Math.max(0,Math.min(n,u));o.current=r,i.current&&(i.current.style.left=`${r}px`),a.current&&(a.current.style.width=`${r+50}px`),r>=u-5&&(s.current=!0,i.current&&(i.current.style.background=`#22c55e`,i.current.innerHTML=``),a.current&&(a.current.style.width=`${c}px`,a.current.style.background=`#dcfce7`),e())};return(0,$.jsxs)(`div`,{ref:r,onMouseDown:e=>{if(e.preventDefault(),s.current||t)return;let n=r.current;if(!n)return;let c=n.getBoundingClientRect(),l=e=>{d(e.clientX-c.left-50/2)},f=()=>{document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,f),!s.current&&o.current{if(s.current||t)return;e.preventDefault();let n=r.current;if(!n)return;let c=n.getBoundingClientRect();d(e.touches[0].clientX-c.left-50/2);let l=e=>{d(e.touches[0].clientX-c.left-50/2)},f=()=>{document.removeEventListener(`touchmove`,l),document.removeEventListener(`touchend`,f),!s.current&&o.current({page:1,pageSize:10,total:0,items:[]}),s7=G8((e,t)=>({projects:[],records:gse(),loading:!1,mediaType:`video`,countType:`请选择`,generationCount:1,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`9:16`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],inputValue:``,currentMedia:[],fetchProjects:async()=>{e({loading:!0});try{e({projects:await cae(),loading:!1})}catch{e({loading:!1})}},createProject:async(n,r)=>{let i=await lae(n,r);return e({projects:[i,...t().projects]}),i},deleteProject:async n=>{await uae(n),e({projects:t().projects.filter(e=>e.id!==n)})},fetchRecords:async(t={})=>{e({loading:!0});try{e({records:await i5(t),loading:!1})}catch{e({loading:!1})}},optimizePrompt:async(n,r)=>{let i=await dae(n,r);try{await $5.getState().checkAuth()}catch{}let a=t().records,o=a.items.findIndex(e=>e.id===i.record.id),s=o>=0?a.items.map(e=>e.id===i.record.id?i.record:e):[i.record,...a.items];return e({records:{...a,total:o>=0?a.total:a.total+1,items:s}}),i},generateVideo:async n=>{let r=await xae(n);try{await $5.getState().checkAuth()}catch{}let i=t().records;return e({records:{...i,items:i.items.map(e=>e.id===n?r:e)}}),r},retryGeneration:async n=>{let r=await Sae(n);try{await $5.getState().checkAuth()}catch{}let i=t().records;return e({records:{...i,items:i.items.map(e=>e.id===n?r:e)}}),r},updateRecordReferences:(n,r)=>{let i=t().records;e({records:{...i,items:i.items.map(e=>e.id===n?{...e,references:r}:e)}})},setMediaType:t=>e({mediaType:t}),setCountType:t=>e({countType:t}),setGenerationCount:t=>e({generationCount:t}),setImageSettings:(t,n,r,i)=>e({selectedRatio:t,selectedResolution:n,width:r,height:i}),setVideoSettings:(t,n,r)=>e({videoDuration:t,videoAspectRatio:n,videoResolution:r}),setEngineOptions:t=>e({engineOptions:t}),setSelectedRatio:t=>e({selectedRatio:t}),setSelectedResolution:t=>e({selectedResolution:t}),setWidth:t=>e({width:t}),setHeight:t=>e({height:t}),setVideoDuration:t=>e({videoDuration:t}),setVideoAspectRatio:t=>e({videoAspectRatio:t}),setVideoResolution:t=>e({videoResolution:t}),setEnginesele:t=>e({enginesele:t}),setInputValue:t=>e({inputValue:t}),setCurrentMedia:t=>e({currentMedia:t}),resetGenerationConfig:()=>e({mediaType:`image`,countType:`请选择`,generationCount:1,selectedRatio:`1:1`,selectedResolution:`2K`,width:2048,height:2048,videoDuration:5,videoAspectRatio:`9:16`,videoResolution:`720p`,engineOptions:{ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]},enginesele:[],inputValue:``,currentMedia:[]})})),c7=480;function l7(e){if(!e)return`-`;let t=e.trim();if(!t)return`-`;let n=t.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/);if(!n)return t.slice(0,16).replace(`T`,` `);let[,r,i,a,o,s,c,l]=n,u=Date.UTC(+r,i-1,+a,+o,+s,+c);if(l&&l!==`Z`){let e=l[0]===`+`?1:-1,[t,n]=l.slice(1).split(`:`),r=u-e*(t*60+ +n)*6e4+c7*6e4,i=new Date(r);return`${i.getUTCFullYear()}-${u7(i.getUTCMonth()+1)}-${u7(i.getUTCDate())} ${u7(i.getUTCHours())}:${u7(i.getUTCMinutes())}`}let d=l===`Z`?u+c7*6e4:u,f=new Date(d);return`${f.getUTCFullYear()}-${u7(f.getUTCMonth()+1)}-${u7(f.getUTCDate())} ${u7(f.getUTCHours())}:${u7(f.getUTCMinutes())}`}function u7(e){return e<10?`0${e}`:String(e)}function d7(e){if(!e)return`-`;let t=e.match(/\.(\d{1,6})/)?.[1]?.padEnd(6,`0`)||`000000`,n=_se(e);return n===`-`?n:`${n}.${t}`}function _se(e){let t=e.trim(),n=t.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/);if(!n)return t.replace(`T`,` `);let[,r,i,a,o,s,c,l]=n,u=Date.UTC(+r,i-1,+a,+o,+s,+c),d=u;if(l===`Z`)d+=c7*6e4;else if(l){let e=l[0]===`+`?1:-1,t=l.slice(1).replace(`:`,``);d=u-e*(t.slice(0,2)*60+ +t.slice(2,4))*6e4+c7*6e4}let f=new Date(d);return`${f.getUTCFullYear()}-${u7(f.getUTCMonth()+1)}-${u7(f.getUTCDate())} ${u7(f.getUTCHours())}:${u7(f.getUTCMinutes())}:${u7(f.getUTCSeconds())}`}var f7=[`#f97316`,`#3b82f6`,`#8b5cf6`,`#10b981`,`#eab308`,`#6366f1`,`#ef4444`,`#06b6d4`,`#64748b`,`#78716c`],p7={ShoppingCartOutlined:(0,$.jsx)(c8,{}),BookOutlined:(0,$.jsx)(m2,{}),HomeOutlined:(0,$.jsx)(c3,{}),FireOutlined:(0,$.jsx)(M4,{}),RocketOutlined:(0,$.jsx)(X6,{}),SkinOutlined:(0,$.jsx)(mie,{}),CompassOutlined:(0,$.jsx)(n4,{}),HeartOutlined:(0,$.jsx)(n3,{}),CarOutlined:(0,$.jsx)(E2,{}),CameraOutlined:(0,$.jsx)(C2,{}),CloudOutlined:(0,$.jsx)(R2,{}),StarOutlined:(0,$.jsx)(v8,{}),TrophyOutlined:(0,$.jsx)(O8,{}),ThunderboltOutlined:(0,$.jsx)(w8,{}),BulbOutlined:(0,$.jsx)(b2,{}),CoffeeOutlined:(0,$.jsx)(X2,{}),CrownOutlined:(0,$.jsx)(c4,{}),DashboardOutlined:(0,$.jsx)(d4,{}),FlagOutlined:(0,$.jsx)(F4,{}),GlobalOutlined:(0,$.jsx)($4,{}),GiftOutlined:(0,$.jsx)(X4,{}),LaptopOutlined:(0,$.jsx)(_3,{}),MobileOutlined:(0,$.jsx)(X3,{}),MonitorOutlined:(0,$.jsx)($3,{}),PayCircleOutlined:(0,$.jsx)(m6,{}),PictureOutlined:(0,$.jsx)(C6,{}),PlayCircleOutlined:(0,$.jsx)(M6,{}),SafetyOutlined:(0,$.jsx)($6,{}),ShoppingOutlined:(0,$.jsx)(uie,{}),SmileOutlined:(0,$.jsx)(p8,{}),SoundOutlined:(0,$.jsx)(g8,{}),TagOutlined:(0,$.jsx)(Cie,{}),TeamOutlined:(0,$.jsx)(S8,{}),ToolOutlined:(0,$.jsx)(Die,{}),TruckOutlined:(0,$.jsx)(Mie,{}),VideoCameraOutlined:(0,$.jsx)(L8,{}),WalletOutlined:(0,$.jsx)(z8,{}),BankOutlined:(0,$.jsx)(a2,{}),BuildOutlined:(0,$.jsx)(_2,{}),ExperimentOutlined:(0,$.jsx)(b4,{}),HighlightOutlined:(0,$.jsx)(a3,{}),IdcardOutlined:(0,$.jsx)(d3,{}),MedicineBoxOutlined:(0,$.jsx)(V3,{}),ReadOutlined:(0,$.jsx)(R6,{}),RestOutlined:(0,$.jsx)(V6,{}),SketchOutlined:(0,$.jsx)(fie,{}),SolutionOutlined:(0,$.jsx)(_ie,{})},vse=()=>{let[e,t]=(0,S.useState)(!1),[n]=pH.useForm(),r=Ye(),{projects:i,fetchProjects:a,createProject:o,deleteProject:s}=s7(),[c,l]=(0,S.useState)([]);(0,S.useEffect)(()=>{a(),_5().then(l).catch(()=>{})},[]);let u=Object.fromEntries(c.map((e,t)=>[e.key,{label:e.label,color:f7[t%f7.length],icon:e.icon||`AppstoreOutlined`}]));return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`垂直行业提示词智能优化(新手专属,一键生成标准素材)`}),(0,$.jsxs)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:[`共 `,i.length,` 个项目 · 按行业分类管理`]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(wV,{}),onClick:()=>r(`/records`),size:`large`,style:{background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`,fontWeight:600,borderRadius:10,height:42},children:`项目记录`}),(0,$.jsx)(X,{icon:(0,$.jsx)(BI,{}),onClick:()=>t(!0),size:`large`,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`,fontWeight:600,borderRadius:10,height:42,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`},children:`新建项目`})]})]}),i.length===0?(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:`还没有项目,创建您的第一个视频项目`,style:{padding:`60px 0`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(BI,{}),onClick:()=>t(!0),size:`large`,children:`创建第一个项目`})}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},className:`stagger-children`,children:i.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card project-item animate-slideInCard`,onClick:()=>r(`/projects/${e.id}/generate`),style:{display:`flex`,alignItems:`center`,padding:`18px 22px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,animationDelay:`${t*.06}s`},children:[(0,$.jsx)(`div`,{style:{width:50,height:50,borderRadius:14,flexShrink:0,background:`${u[e.industry]?.color||`#64748b`}12`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,marginRight:16,color:u[e.industry]?.color||`#64748b`},children:p7[u[e.industry]?.icon]||(0,$.jsx)(I0,{})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4,flexWrap:`wrap`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1a1a2e`},children:e.name}),(0,$.jsx)(_Q,{color:u[e.industry]?.color||`#64748b`,style:{borderRadius:6,margin:0},children:u[e.industry]?.label||e.industry})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(_B,{style:{fontSize:12,color:`#94a3b8`}}),(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`创建于 `,l7(e.createdAt)]})]})]}),(0,$.jsxs)(`div`,{className:`project-actions`,style:{display:`flex`,alignItems:`center`,gap:8,marginLeft:16},children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M6,{}),onClick:t=>{t.stopPropagation(),r(`/projects/${e.id}/generate`)},style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,borderRadius:10,fontWeight:600,height:36,boxShadow:`0 4px 12px rgba(99,102,241,0.25)`},children:`生成`}),(0,$.jsx)(AG,{title:`确定删除该项目?`,description:`项目下的生成记录将一并删除`,onConfirm:async t=>{t?.stopPropagation(),await s(e.id),Z.success(`项目已删除`)},onCancel:e=>e?.stopPropagation(),children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(jQ,{}),onClick:e=>e.stopPropagation(),style:{borderRadius:10,height:36,background:`rgba(239,68,68,0.06)`,border:`1px solid rgba(239,68,68,0.15)`,color:`#ef4444`}})}),(0,$.jsx)(Bg,{className:`mobile-hide`,style:{color:`#cbd5e1`,fontSize:12}})]})]},e.id))}),(0,$.jsx)(EG,{title:(0,$.jsxs)(yV,{children:[(0,$.jsx)(I0,{}),`新建项目`]}),open:e,onOk:async()=>{try{let e=await n.validateFields(),i=await o(e.name,e.industry);Z.success(`项目创建成功`),t(!1),n.resetFields(),r(`/projects/${i.id}/generate`)}catch{}},onCancel:()=>{t(!1),n.resetFields()},okText:`创建`,cancelText:`取消`,width:480,children:(0,$.jsxs)(pH,{form:n,layout:`vertical`,style:{marginTop:20},children:[(0,$.jsx)(pH.Item,{name:`name`,label:`项目名称`,rules:[{required:!0,message:`请输入项目名称`}],children:(0,$.jsx)(JU,{placeholder:`例如:618电商大促宣传片`,prefix:(0,$.jsx)(pX,{}),size:`large`})}),(0,$.jsx)(pH.Item,{name:`industry`,label:`所属行业`,rules:[{required:!0,message:`请选择行业`}],children:(0,$.jsx)(zC,{placeholder:`选择项目所属行业`,size:`large`,children:c.map((e,t)=>(0,$.jsx)(zC.Option,{value:e.key,children:(0,$.jsxs)(yV,{children:[p7[e.icon]||(0,$.jsx)(I0,{}),` `,e.label]})},e.key))})})]})})]})};async function m7(e){try{if(navigator.clipboard&&typeof navigator.clipboard.writeText==`function`)return await navigator.clipboard.writeText(e),!0;let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`0`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}var{Text:h7}=Q,yse={real_person:{title:`选择真人素材库`,empty:`暂无可选 Active 真人素材`,projectError:`加载真人素材项目失败`,assetError:`加载真人素材失败`,fallbackName:`真人素材`},aigc_virtual:{title:`选择虚拟素材库`,empty:`暂无可选 Active 虚拟素材`,projectError:`加载虚拟素材项目失败`,assetError:`加载虚拟素材失败`,fallbackName:`虚拟素材`}},g7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,bse=e=>e.assetType===`Video`?g7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.providerUrl):g7(`static`+(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.providerUrl)+`?w=300&q=50`),xse=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},_7=({open:e,libraryType:t=`real_person`,selectedIds:n=[],maxCount:r=20,onClose:i,onSelect:a,maxImageCount:o,maxVideoCount:s,usedImageCount:c,usedVideoCount:l,usedVideoDuration:u,maxVideoDuration:d,accept:f})=>{let p=yse[t],[m,h]=(0,S.useState)([]),[g,_]=(0,S.useState)(),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(f===`image/*`?`Image`:void 0),[C,w]=(0,S.useState)([]),[T,E]=(0,S.useState)(new Map),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),j=(0,S.useMemo)(()=>new Set(T.keys()),[T]),M=async()=>{O(!0);try{let e=(await(t===`aigc_virtual`?Z5:Y5)({page:1,pageSize:100,status:`active`})).items||[];h(e),_(t=>t&&e.some(e=>e.id===t)?t:e[0]?.id)}catch(e){Z.error(e?.message||p.projectError)}finally{O(!1)}},N=async()=>{A(!0);try{w((await(t===`aigc_virtual`?zoe:Noe)({projectId:g,keyword:v.trim()||void 0,assetType:b,page:1,pageSize:100})).items||[])}catch(e){Z.error(e?.message||p.assetError)}finally{A(!1)}};(0,S.useEffect)(()=>{e&&setTimeout(()=>{E(new Map),y(``),x(void 0),_(void 0),w([]),M()},0)},[e,t]),(0,S.useEffect)(()=>{g&&setTimeout(()=>{N()},0)},[g,b]);let P=e=>{if(n.includes(e.id)){Z.info(`该素材已添加`);return}if(f===`image/*`&&e.assetType===`Video`){Z.warning(`当前仅支持选择图片素材`);return}E(t=>{let n=new Map(t);return n.has(e.id)?(n.delete(e.id),n):n.size>=r?(Z.warning(`最多选择 ${r} 个参考素材`),t):(n.set(e.id,e),n)})},F=(0,S.useMemo)(()=>{let e=Array.from(T.values()).filter(e=>e.assetType===`Image`).length,t=Array.from(T.values()).filter(e=>e.assetType===`Video`).length,n=Array.from(T.values()).filter(e=>e.assetType===`Video`).reduce((e,t)=>e+(t.videoDuration||0),0),r=o!==void 0&&c!==void 0?o-c:1/0,i=s!==void 0&&l!==void 0?s-l:1/0,a=d!==void 0&&u!==void 0?d-u:1/0;return e>r||t>i||n>a},[T,o,c,s,l,d,u]);return(0,$.jsxs)(EG,{title:`${p.title}`,open:e,onCancel:i,width:920,destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:i,children:`取消`},`cancel`),(0,$.jsxs)(X,{type:`primary`,onClick:()=>{let e=Array.from(T.values()).filter(e=>!n.includes(e.id));if(!e.length){Z.warning(`请选择至少一个${t===`aigc_virtual`?`虚拟`:`真人`}素材`);return}a(e),i()},disabled:F,style:{background:F?`#94a3b8`:`#8b5cf6`,opacity:F?.6:1,cursor:F?`not-allowed`:`pointer`},children:[`添加选中素材(`,T.size,`)`]},`ok`)],children:[f!==`image/*`&&(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:20,marginBottom:16,padding:`12px 16px`,background:`#fafafa`,borderRadius:8},children:(()=>{let e=Array.from(T.values()).filter(e=>e.assetType===`Image`).length,t=Array.from(T.values()).filter(e=>e.assetType===`Video`).length,n=Array.from(T.values()).filter(e=>e.assetType===`Video`).reduce((e,t)=>e+(t.videoDuration||0),0),r=o!==void 0&&c!==void 0?o-c:1/0,i=s!==void 0&&l!==void 0?s-l:1/0,a=d!==void 0&&u!==void 0?d-u:1/0,f=e>r,p=t>i,m=n>a;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:f?`#ef4444`:`#64748b`,fontWeight:f?600:400},children:[`还可选取图片 `,e,`/`,o!==void 0&&c!==void 0?o-c:`-`,` 张`]}),(0,$.jsxs)(`span`,{style:{fontSize:13,color:p||m?`#ef4444`:`#64748b`,fontWeight:p||m?600:400},children:[`视频还可选取 `,t,`/`,s!==void 0&&l!==void 0?s-l:`-`,` 个(`,n.toFixed(1),`/`,d!==void 0&&u!==void 0?(d-u).toFixed(1):`-`,`秒)`]})]})})()}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`240px 1fr`,gap:16,height:500},children:[(0,$.jsxs)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,background:`#fafafa`,overflowY:`auto`,height:`100%`},children:[(0,$.jsxs)(yV,{style:{width:`100%`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(h7,{strong:!0,children:`项目组`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(IK,{}),onClick:M,loading:D})]}),(0,$.jsx)(tG,{spinning:D,children:m.length===0?(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:`暂无项目组`}):(0,$.jsx)(`div`,{children:m.map(e=>(0,$.jsx)(`div`,{onClick:()=>_(e.id),style:{cursor:`pointer`,padding:`10px 12px`,borderRadius:10,marginBottom:6,border:g===e.id?`1px solid #8b5cf6`:`1px solid transparent`,background:g===e.id?`#f5f3ff`:`#fff`},children:(0,$.jsxs)(`div`,{style:{width:`100%`},children:[(0,$.jsx)(h7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),(0,$.jsx)(h7,{type:`secondary`,style:{fontSize:12},children:typeof e.activeImageAssetCount==`number`||typeof e.activeVideoAssetCount==`number`?` 图 ${e.activeImageAssetCount||0} / 视 ${e.activeVideoAssetCount||0}`:``})]})},e.id))})})]}),(0,$.jsxs)(`div`,{style:{overflowY:`auto`,height:`100%`},children:[(0,$.jsxs)(yV,{style:{width:`100%`,marginBottom:12},children:[(0,$.jsx)(JU,{allowClear:!0,prefix:(0,$.jsx)(PC,{}),placeholder:`搜索素材名称`,value:v,onChange:e=>y(e.target.value),onPressEnter:N}),(0,$.jsx)(zC,{allowClear:f!==`image/*`,placeholder:`素材类型`,value:b,onChange:x,style:{width:116},options:f===`image/*`?[{value:`Image`,label:`图片`}]:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{icon:(0,$.jsx)(IK,{}),onClick:N,loading:k,children:`刷新`})]}),(0,$.jsx)(tG,{spinning:k,children:C.length===0?(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:p.empty,style:{marginTop:120}}):(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(140px, 1fr))`,gap:12,maxHeight:420,overflowY:`auto`,paddingRight:4},children:C.filter(e=>f!==`image/*`||e.assetType===`Image`).map(e=>{let t=j.has(e.id)||n.includes(e.id),r=n.includes(e.id),i=bse(e),a=e.assetType===`Video`;return(0,$.jsxs)(`div`,{onClick:()=>P(e),style:{cursor:r?`not-allowed`:`pointer`,border:t?`2px solid #8b5cf6`:`1px solid #edf0f5`,borderRadius:12,overflow:`hidden`,background:`#fff`,boxShadow:t?`0 8px 20px rgba(139,92,246,0.18)`:`0 4px 12px rgba(15,23,42,0.04)`,opacity:r?.62:1,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{aspectRatio:`1 / 1`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[i?a?(0,$.jsx)(`video`,{src:i,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:i,alt:e.name||p.fallbackName,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):a?(0,$.jsx)(L8,{style:{fontSize:32,color:`#94a3b8`}}):(0,$.jsx)(C6,{style:{fontSize:32,color:`#94a3b8`}}),a&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:8,bottom:8,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:xse(e.videoDuration)})]}),t&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:24,height:24,borderRadius:12,background:`#8b5cf6`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(OC,{})}),(0,$.jsxs)(`div`,{style:{padding:10},children:[(0,$.jsx)(h7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name||`未命名素材`}),(0,$.jsxs)(yV,{wrap:!0,size:4,style:{marginTop:6},children:[(0,$.jsx)(_Q,{color:a?`blue`:`default`,children:a?`视频`:`图片`}),(0,$.jsx)(_Q,{children:e.projectName})]})]})]},e.id)})})})]})]})]})},v7=({src:e,size:t=`normal`})=>{let n=(0,S.useRef)(null),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(1),[d,f]=(0,S.useState)(!1),p=e=>`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`,m=(0,S.useCallback)(()=>{n.current&&(r?n.current.pause():n.current.play(),i(!r))},[r]),h=(0,S.useCallback)(()=>{n.current&&o(n.current.currentTime)},[]),g=(0,S.useCallback)(()=>{n.current&&c(n.current.duration)},[]),_=(0,S.useCallback)(()=>{i(!1),o(0)},[]),v=(0,S.useCallback)(e=>{if(!n.current||s===0)return;let t=e.currentTarget.getBoundingClientRect(),r=(e.clientX-t.left)/t.width*s;n.current.currentTime=r,o(r)},[s]),y=(0,S.useCallback)(e=>{if(!n.current)return;let t=parseFloat(e.target.value);n.current.volume=t,u(t),f(t===0)},[]),b=(0,S.useCallback)(()=>{n.current&&(d?(n.current.volume=l||.5,f(!1)):(n.current.volume=0,f(!0)))},[d,l]);(0,S.useEffect)(()=>{let e=n.current;if(e)return e.addEventListener(`timeupdate`,h),e.addEventListener(`loadedmetadata`,g),e.addEventListener(`ended`,_),()=>{e.removeEventListener(`timeupdate`,h),e.removeEventListener(`loadedmetadata`,g),e.removeEventListener(`ended`,_)}},[h,g,_]);let x=s>0?a/s*100:0;return(0,$.jsxs)(`div`,{style:{width:`100%`,height:t===`small`?130:112,background:`#f1f5f9`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:t===`small`?`16px 16px`:`12px 16px`},children:[(0,$.jsx)(`audio`,{ref:n,src:e}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,width:`100%`},children:[(0,$.jsx)(`button`,{onClick:m,style:{width:48,height:48,borderRadius:`50%`,background:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,border:`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,flexShrink:0},children:r?(0,$.jsx)(c6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(M6,{style:{fontSize:24,color:`#fff`,marginLeft:2}})}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:8},children:[(0,$.jsxs)(`div`,{onClick:v,style:{height:5,background:`#e2e8f0`,borderRadius:10,cursor:`pointer`,overflow:`visible`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{height:`100%`,width:`${x}%`,background:`linear-gradient(90deg, #8b5cf6, #a78bfa)`,borderRadius:10,transition:`width 0.1s linear`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,left:`${x}%`,top:`50%`,transform:`translate(-50%, -50%)`,width:t===`small`?12:14,height:t===`small`?12:14,background:`#fff`,borderRadius:`50%`,boxShadow:`0 2px 6px rgba(0,0,0,0.15)`,opacity:+(x>0),transition:`opacity 0.2s`}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{fontSize:t===`small`?11:12,color:`#64748b`},children:p(a)}),(0,$.jsx)(`span`,{style:{fontSize:t===`small`?11:12,color:`#64748b`},children:p(s)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0},children:[(0,$.jsx)(`button`,{onClick:b,style:{border:`none`,background:`transparent`,cursor:`pointer`,padding:0},children:d?(0,$.jsx)(F2,{style:{fontSize:t===`small`?14:16,color:`#94a3b8`}}):(0,$.jsx)(g8,{style:{fontSize:t===`small`?14:16,color:`#94a3b8`}})}),(0,$.jsx)(`input`,{type:`range`,min:`0`,max:`1`,step:`0.1`,value:d?0:l,onChange:y,style:{width:t===`small`?40:50,height:4,borderRadius:2,appearance:`none`,background:`#e2e8f0`,cursor:`pointer`}})]})]})]})},{Text:y7}=Q,b7=e=>{if(!e)return``;if(/^data:|blob:/i.test(e))return e;if(/^https?:\/\//i.test(e)){let t=new URL(e);return t.pathname.startsWith(`/uploads`)?t.pathname+t.search:e}return`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`},x7=(e,t)=>{if(e<300||e>6e3)return`图片宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`图片高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;return n<.4||n>2.5?`图片宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`:null},S7=(e,t)=>{if(e<300||e>6e3)return`视频宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`视频高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;if(n<.4||n>2.5)return`视频宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`;let r=e*t;return r<409600?`视频总像素数过小(${e}×${t}=${r}),需 ≥ 640×640=409600`:r>8295044?`视频总像素数过大(${e}×${t}=${r}),需 ≤ 3326×2494=8295044`:null},Sse=e=>{let t=e,n=t.width||t.videoWidth||t.imageWidth||0,r=t.height||t.videoHeight||t.imageHeight||0;if(e.resourceType===`image`){if(n>0&&r>0)return x7(n,r)}else if(e.resourceType===`video`&&n>0&&r>0)return S7(n,r);return null},Cse=e=>new Promise(t=>{let n=new Image;n.onload=()=>{t({width:n.width,height:n.height})},n.onerror=()=>{t({width:0,height:0})},n.src=e}),wse=e=>e===`video`?(0,$.jsx)(L8,{}):e===`audio`?(0,$.jsx)(Z0,{}):(0,$.jsx)(C6,{}),Tse=e=>e===`video`?`视频`:e===`audio`?`音频`:`图片`,Ese=({open:e,onClose:t,onSelect:n,allowedTypes:r,selectedIds:i=[],title:a=`选择历史上传素材`,maxImageCount:o,maxVideoCount:s,usedImageCount:c,usedVideoCount:l,maxVideoDuration:u,usedVideoDuration:d,maxAudioCount:f,usedAudioCount:p,maxAudioDuration:m,usedAudioDuration:h,hideLimitHint:g,defaultResourceType:_})=>{let[v,y]=(0,S.useState)(_||``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(1),[T,E]=(0,S.useState)(10),[D,O]=(0,S.useState)(1),[k,A]=(0,S.useState)(8),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)(!1),[F,I]=(0,S.useState)([]),[L,R]=(0,S.useState)(0),[z,B]=(0,S.useState)(``),[V,H]=(0,S.useState)([]),[U,ee]=(0,S.useState)(0),[W,te]=(0,S.useState)(new Map),G=(0,S.useMemo)(()=>new Set(i),[i]),ne=(0,S.useMemo)(()=>new Set(r||[`image`,`video`,`audio`]),[JSON.stringify(r)]),K=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`image`).length,[W]),re=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`video`).length,[W]),ie=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`video`).reduce((e,t)=>e+(t.durationSeconds||0),0),[W]),ae=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`audio`).length,[W]),q=(0,S.useMemo)(()=>Array.from(W.values()).filter(e=>e.resourceType===`audio`).reduce((e,t)=>e+(t.durationSeconds||0),0),[W]),oe=(0,S.useMemo)(()=>o!==void 0&&c!==void 0?o-c:1/0,[o,c]),se=(0,S.useMemo)(()=>s!==void 0&&l!==void 0?s-l:1/0,[s,l]),ce=(0,S.useMemo)(()=>u!==void 0&&d!==void 0?u-d:1/0,[u,d]),le=(0,S.useMemo)(()=>f!==void 0&&p!==void 0?f-p:1/0,[f,p]),ue=(0,S.useMemo)(()=>m!==void 0&&h!==void 0?m-h:1/0,[m,h]),de=(0,S.useMemo)(()=>K>oe,[K,oe]),fe=(0,S.useMemo)(()=>re>se,[re,se]),pe=(0,S.useMemo)(()=>ie>ce,[ie,ce]),me=(0,S.useMemo)(()=>ae>le,[ae,le]),he=(0,S.useMemo)(()=>q>ue,[q,ue]),ge=(0,S.useCallback)(async()=>{if(e){P(!0);try{let e=await K5({resourceType:v||void 0,keyword:b||void 0,page:C,pageSize:T,scene:`picker`});I(C===1?e.groups||[]:t=>[...t,...e.groups||[]]),R(e.totalDays||0)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),C===1&&I([]),R(0)}finally{P(!1)}}},[ne,b,e,C,T,v]),_e=(0,S.useCallback)(async e=>{M(!0);try{let t=await q5(e,{resourceType:v||void 0,keyword:b||void 0,page:D,pageSize:8,scene:`picker`});H((t.items||[]).filter(e=>ne.has(e.resourceType))),ee(t.total||0)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),H([]),ee(0)}finally{M(!1)}},[ne,b,D,k,v]);(0,S.useEffect)(()=>{e&&ge()},[e,C,ge]),(0,S.useEffect)(()=>{z&&O(1)},[z]),(0,S.useEffect)(()=>{z&&_e(z)},[z,D,_e]),(0,S.useEffect)(()=>{e&&te(new Map)},[e]),(0,S.useEffect)(()=>{e&&(y(_||``),w(1))},[e,_]);let ve=async e=>{if(G.has(e.id)){Z.warning(`该素材已经在参考内容中`);return}let t=e,n=t.width||t.videoWidth||t.imageWidth||0,r=t.height||t.videoHeight||t.imageHeight||0;if(e.resourceType===`image`){if(n<=0||r<=0){let t=b7(e.previewUrl||e.displayUrl||e.resourceUrl);if(t){let e=await Cse(t);n=e.width,r=e.height}}if(n>0&&r>0){let t=x7(n,r);if(t){Z.error(`${e.fileName||`图片`}:${t}`);return}}}else if(e.resourceType===`video`&&n>0&&r>0){let t=S7(n,r);if(t){Z.error(`${e.fileName||`视频`}:${t}`);return}}te(t=>{let n=new Map(t);return n.has(e.id)?n.delete(e.id):n.set(e.id,e),n})},ye=()=>{let e=Array.from(W.values());if(e.length===0){Z.warning(`请先选择历史素材`);return}n(e),te(new Map),t()},be=(0,S.useMemo)(()=>[{label:`全部`,value:``},{label:`图片`,value:`image`},{label:`视频`,value:`video`},{label:`音频`,value:`audio`}].filter(e=>!e.value||ne.has(e.value)),[ne]);return(0,$.jsxs)(EG,{title:a,open:e,onCancel:t,width:1e3,centered:!0,destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:t,children:`取消`},`cancel`),(0,$.jsxs)(X,{type:`primary`,onClick:ye,style:{background:`#8b5cf6`},disabled:de||fe||pe||me||he,children:[`应用选择 (`,W.size,`)`]},`ok`)],children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(yV,{wrap:!0,children:[(0,$.jsx)(zC,{value:v,options:be,style:{width:120},onChange:e=>{y(e),w(1)}}),(0,$.jsx)(JU,{allowClear:!0,value:b,prefix:(0,$.jsx)(PC,{}),placeholder:`搜索文件名`,style:{width:220},onChange:e=>x(e.target.value),onPressEnter:()=>{w(1),ge()}}),(0,$.jsx)(X,{icon:(0,$.jsx)(IK,{}),onClick:ge,children:`刷新`})]}),!g&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginTop:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:de?`#ef4444`:`#64748b`,fontWeight:de?600:400},children:[`还可选取图片 `,K,`/`,o!==void 0&&c!==void 0?o-c:`-`,` 张`]}),(0,$.jsxs)(`span`,{style:{fontSize:13,color:fe||pe?`#ef4444`:`#64748b`,fontWeight:fe||pe?600:400},children:[`视频还可选取 `,re,`/`,s!==void 0&&l!==void 0?s-l:`-`,` 个(`,ie.toFixed(1),`/`,u!==void 0&&d!==void 0?(u-d).toFixed(1):`-`,`秒)`]}),f!==void 0&&(0,$.jsxs)(`span`,{style:{fontSize:13,color:me||he?`#ef4444`:`#64748b`,fontWeight:me||he?600:400},children:[`音频还可选取 `,ae,`/`,f!==void 0&&p!==void 0?f-p:`-`,` 个(`,q.toFixed(1),`/`,m!==void 0&&h!==void 0?(m-h).toFixed(1):`-`,`秒)`]})]})]}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`240px 1fr`,gap:16,height:500},children:[(0,$.jsxs)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,background:`#fafafa`,overflowY:`auto`},children:[(0,$.jsx)(y7,{strong:!0,style:{fontSize:14},children:`日期列表`}),(0,$.jsx)(tG,{spinning:N,children:F.length===0?(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:`暂无日期`,style:{padding:`40px 0`}}):(0,$.jsxs)(`div`,{style:{marginTop:12},children:[F.map(e=>(0,$.jsxs)(`div`,{onClick:()=>B(e.generatedDate),style:{padding:`10px 12px`,borderRadius:10,marginBottom:6,cursor:`pointer`,border:z===e.generatedDate?`1px solid #8b5cf6`:`1px solid transparent`,background:z===e.generatedDate?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(`div`,{style:{fontSize:13,fontWeight:500,color:`#334155`},children:e.generatedDate}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:[`共 `,e.total,` 个素材`]})]},e.generatedDate)),L>F.length&&(0,$.jsx)(`div`,{style:{marginTop:12,textAlign:`center`},children:(0,$.jsx)(X,{size:`small`,onClick:()=>w(C+1),children:`加载更多`})})]})})]}),(0,$.jsx)(`div`,{style:{border:`1px solid #eef0f4`,borderRadius:12,padding:12,overflowY:`auto`},children:(0,$.jsx)(tG,{spinning:j,children:z?V.length===0?(0,$.jsx)(lC,{description:`该日期暂无可复用的历史上传素材`,style:{padding:`48px 0`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(150px, 1fr))`,gap:14},children:V.map(e=>{let t=W.has(e.id),n=G.has(e.id),r=Sse(e),i=n||!!r,a=e.previewUrl||e.displayUrl||e.resourceUrl,o=b7(e.resourceType===`image`?`static`+a+`?w=300&q=50`:a);return(0,$.jsxs)(`div`,{onClick:()=>!i&&ve(e),style:{position:`relative`,borderRadius:14,border:t?`2px solid #8b5cf6`:`1px solid #e2e8f0`,background:i?`#f8fafc`:`#fff`,opacity:i?.55:1,cursor:i?`not-allowed`:`pointer`,overflow:`hidden`,boxShadow:t?`0 10px 24px rgba(139, 92, 246, 0.18)`:`0 6px 18px rgba(15,23,42,0.06)`},title:r||void 0,children:[(0,$.jsx)(`div`,{style:{background:`#f1f5f9`},children:e.resourceType===`image`?(0,$.jsx)(`img`,{src:o,alt:e.fileName||e.id,style:{width:`100%`,height:130,objectFit:`cover`}}):e.resourceType===`video`?(0,$.jsx)(`video`,{src:o,muted:!0,style:{width:`100%`,height:130,objectFit:`cover`}}):(0,$.jsx)(v7,{src:o,size:`small`})}),(0,$.jsxs)(`div`,{style:{padding:10},children:[(0,$.jsxs)(yV,{size:6,style:{marginBottom:6},children:[(0,$.jsx)(_Q,{color:`purple`,icon:wse(e.resourceType),style:{margin:0},children:Tse(e.resourceType)}),e.durationSeconds?(0,$.jsxs)(_Q,{style:{margin:0},children:[Number(e.durationSeconds).toFixed(1),`s`]}):null,r&&(0,$.jsx)(_Q,{color:`red`,style:{margin:0},children:`尺寸不符`})]}),(0,$.jsx)(y7,{ellipsis:!0,style:{display:`block`,fontSize:13,color:`#334155`},title:e.fileName||e.id,children:e.fileName||e.id}),(0,$.jsx)(y7,{type:`secondary`,style:{fontSize:12},children:e.moduleLabel||`普通上传`})]}),t&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,width:24,height:24,borderRadius:12,background:`#8b5cf6`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(OC,{})}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8},children:(0,$.jsx)(_Q,{children:`已选`})}),r&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`rgba(239, 68, 68, 0.9)`,color:`#fff`,padding:`4px 8px`,fontSize:11,textAlign:`center`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:r})]},e.id)})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:16,paddingBottom:8},children:(0,$.jsx)(PW,{current:D,pageSize:k,total:U,showSizeChanger:!0,pageSizeOptions:[8],onChange:(e,t)=>{O(e),A(t)}})})]}):(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:`请选择日期`,style:{padding:`80px 0`}})})})]})]})},C7=({children:e,accept:t=`image/*,video/*`,multiple:n=!0,onLocalSelect:r,onHistorySelect:i,onPortraitSelect:a,onPortraitLibrarySelect:o,uploading:s,tooltipTitle:c,maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,usedVideoDuration:p,maxVideoDuration:m,maxAudioCount:h,usedAudioCount:g,maxAudioDuration:_,usedAudioDuration:v,hideLimitHint:y,mediaType:b})=>{let x=(0,S.useRef)(null),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(`real_person`),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(!1),N=()=>{A(!1),x.current?.click()},P=e=>{let t=e.target.files;t&&r&&r(Array.from(t)),x.current&&(x.current.value=``)},F=e=>{if(A(!1),a){E(e),w(!0);return}if(o){o(e);return}E(e),w(!0)},I=(0,$.jsxs)(`div`,{style:{padding:`4px 0`,minWidth:180},children:[(0,$.jsxs)(`div`,{onClick:()=>{N()},style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(pX,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`本地上传`})]}),(0,$.jsxs)(`div`,{onClick:()=>{A(!1),O(!0)},style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(m4,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`从资产中选择`})]}),b!==`image`&&(0,$.jsxs)(`div`,{onClick:()=>F(`real_person`),style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(P8,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`真人素材库`})]}),b!==`image`&&(0,$.jsxs)(`div`,{onClick:()=>F(`aigc_virtual`),style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 16px`,cursor:`pointer`,transition:`background 0.15s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#f1f5f9`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(S8,{style:{fontSize:14,color:`#64748b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#334155`},children:`虚拟素材库`})]})]});return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`input`,{ref:x,type:`file`,accept:t,multiple:n,onChange:P,style:{display:`none`}}),c?(0,$.jsx)(kw,{title:c,children:(0,$.jsx)(Lw,{content:I,open:k,onOpenChange:A,trigger:`click`,placement:`bottomLeft`,children:(0,$.jsx)(`div`,{style:{cursor:s?`not-allowed`:`pointer`},children:e})})}):(0,$.jsx)(Lw,{content:I,open:k,onOpenChange:A,trigger:`click`,placement:`bottomLeft`,children:(0,$.jsx)(`div`,{style:{cursor:s?`not-allowed`:`pointer`},children:e})}),(0,$.jsx)(Ese,{open:D,onClose:()=>O(!1),onSelect:e=>{i?.(e),O(!1)},allowedTypes:t.includes(`audio`)?[`image`,`video`,`audio`]:[`image`,`video`],maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,maxVideoDuration:m,usedVideoDuration:p,maxAudioCount:h,usedAudioCount:g,maxAudioDuration:_,usedAudioDuration:v,hideLimitHint:y,defaultResourceType:b===`image`?`image`:``}),(0,$.jsx)(_7,{open:C,libraryType:T,onClose:()=>w(!1),onSelect:e=>{a?.(e),w(!1)},accept:t,maxCount:t===`image/*`&&!n?1:void 0,maxImageCount:l,maxVideoCount:u,usedImageCount:d,usedVideoCount:f,usedVideoDuration:p,maxVideoDuration:m})]})};function Dse(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(16).padStart(12,`0`)}-${Math.random().toString(16).slice(2,10).padStart(8,`0`)}-4xxx-yxxx-${Math.random().toString(16).slice(2,12)}`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var Ose={prompt_processing:`optimizing`,ready:`prompt_optimized`,generating:`generating`,success:`completed`,failure:`failed`},kse=new Set([`pending`,`optimizing`,`generating`]),w7=new Set([`queued`,`preparing`,`creating_provider_task`,`provider_result_staged`,`waiting_remote`,`polling`,`result_ready`,`download_queued`,`downloading`,`retry_waiting`,`recovery_inconsistent`,`upscale_queued`,`upscale_processing`,`upscale_polling`,`upscale_downloading`,`upscale_finalizing`,`upscale_retry_waiting`]),T7=new Set([`completed`,`done`]),E7=new Set([`failed`,`timeout`,`download_failed`,`upscale_failed`]),Ase=new Set([...T7,...E7,`deleted`]),jse={pending:`待处理`,optimizing:`提词处理中`,prompt_optimized:`待生成`,generating:`生成中`,queued:`生成中`,preparing:`生成中`,creating_provider_task:`生成中`,provider_result_staged:`生成中`,waiting_remote:`生成中`,polling:`生成中`,result_ready:`生成中`,download_queued:`生成中`,downloading:`生成中`,retry_waiting:`生成中`,recovery_inconsistent:`生成中`,upscale_queued:`生成中`,upscale_processing:`生成中`,upscale_polling:`生成中`,upscale_downloading:`生成中`,upscale_finalizing:`生成中`,upscale_retry_waiting:`生成中`,completed:`成功`,done:`成功`,timeout:`失败`,download_failed:`失败`,upscale_failed:`失败`,failed:`失败`,deleted:`已删除`},Mse={pending:`default`,optimizing:`processing`,prompt_optimized:`blue`,generating:`processing`,queued:`processing`,preparing:`processing`,creating_provider_task:`processing`,provider_result_staged:`processing`,waiting_remote:`processing`,polling:`processing`,result_ready:`processing`,download_queued:`processing`,downloading:`processing`,retry_waiting:`orange`,recovery_inconsistent:`orange`,upscale_queued:`purple`,upscale_processing:`purple`,upscale_polling:`purple`,upscale_downloading:`purple`,upscale_finalizing:`purple`,upscale_retry_waiting:`orange`,completed:`success`,done:`success`,failed:`error`,timeout:`error`,download_failed:`error`,upscale_failed:`error`,deleted:`default`},D7=e=>String(e||``).trim().toLowerCase(),Nse=e=>{let t=D7(e);return jse[t]||t||`未知状态`},Pse=e=>Mse[D7(e)]||`default`,O7=e=>{let t=D7(e.status),n=D7(e.displayStatus),r=D7(e.pipelineStage),i=Ose[D7(e.clientStatus)]||``,a=i||n||t||r||`pending`;E7.has(r)||E7.has(t)||E7.has(n)?a=E7.has(r)?r:E7.has(t)?t:n:T7.has(t)||T7.has(n)?a=T7.has(t)?t:n:!i&&r&&w7.has(r)&&(a=r);let o=E7.has(a),s=T7.has(a),c=typeof e.shouldPoll==`boolean`?e.shouldPoll:!o&&!s&&(kse.has(t)||w7.has(r)),l=c;return{status:t,displayStatus:n,pipelineStage:r,effectiveKey:a,label:Nse(a),color:Pse(a),isActive:l,isSuccess:s,isFailure:o,isTerminal:Ase.has(a),canGenerate:typeof e.canGenerate==`boolean`?e.canGenerate:t===`prompt_optimized`,canRetry:typeof e.canRetry==`boolean`?e.canRetry:o,shouldPoll:c}},k7=({label:e,value:t,options:n,suffix:r,expanded:i,onToggle:a,onSelect:o,onClose:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(null),u=(0,S.useRef)(i),[d,f]=(0,S.useState)(null);return u.current=i,(0,S.useEffect)(()=>{if(i&&c.current){let e=c.current.getBoundingClientRect();f({bottom:window.innerHeight-e.top+4,left:e.left,width:Math.max(e.width,100)})}else f(null)},[i]),(0,S.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||l.current?.contains(e.target)||u.current&&s()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i,s]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:c,onClick:a,translate:`no`,style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:`#fff`,border:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsxs)(`span`,{style:{fontSize:13,color:`#374151`,fontWeight:500,lineHeight:`18px`},children:[t,r]}),(0,$.jsx)(gZ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0deg)`}})]}),d&&(0,Vi.createPortal)((0,$.jsxs)(`div`,{ref:l,style:{position:`fixed`,bottom:d.bottom,left:d.left,minWidth:d.width,maxHeight:200,overflowY:`auto`,background:`#fff`,borderRadius:12,padding:6,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:n.map((e,n)=>{let r=t===e;return(0,$.jsx)(`div`,{onClick:()=>{o(e),s()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:r?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:r?`#fff`:`#1a1a2e`,fontWeight:r?600:400},onMouseEnter:e=>{r||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{r||(e.currentTarget.style.background=`transparent`)},children:e},n)})})]}),document.body)]})},Fse=({group:e,groupName:t,selected:n,expanded:r,onToggle:i,onSelect:a,onClose:o})=>{let s=(0,S.useRef)(null),c=(0,S.useRef)(null),l=(0,S.useRef)(r),[u,d]=(0,S.useState)(null);return l.current=r,(0,S.useEffect)(()=>{if(r&&s.current){let e=s.current.getBoundingClientRect();d({bottom:window.innerHeight-e.top+4,left:e.left})}else d(null)},[r]),(0,S.useEffect)(()=>{if(!r)return;let e=e=>{s.current?.contains(e.target)||c.current?.contains(e.target)||l.current&&o()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[r,o]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{ref:s,onClick:()=>i(t),style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,cursor:`pointer`,userSelect:`none`,transition:`background 0.2s, border-color 0.2s`,background:`#ffffffff`,border:`1px solid #e2e8f0`,minWidth:70,whiteSpace:`nowrap`,flexShrink:0},children:[(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#374151`,fontWeight:500,lineHeight:`18px`},children:n||e.name}),(0,$.jsx)(gZ,{style:{fontSize:9,color:`#94a3b8`,transition:`transform 0.2s`,transform:r?`rotate(180deg)`:`rotate(0deg)`}})]}),u&&(0,Vi.createPortal)((0,$.jsxs)(`div`,{ref:c,style:{position:`fixed`,bottom:u.bottom,left:u.left,background:`#fff`,borderRadius:12,padding:8,minWidth:160,zIndex:99999,boxShadow:`0 8px 30px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:10,color:`#94a3b8`,display:`block`,padding:`2px 6px 4px`},children:e.name}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:e.options.map((e,r)=>{let i=n===e;return(0,$.jsx)(`div`,{onClick:()=>{a(e,t),o()},style:{padding:`6px 10px`,borderRadius:8,fontSize:13,cursor:`pointer`,transition:`all 0.15s`,background:i?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`transparent`,color:i?`#fff`:`#1a1a2e`,fontWeight:i?600:400},onMouseEnter:e=>{i||(e.currentTarget.style.background=`#f1f5f9`)},onMouseLeave:e=>{i||(e.currentTarget.style.background=`transparent`)},children:e},r)})})]}),document.body)]})},A7=({src:e,width:t=48,height:n=48})=>{let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let r=document.createElement(`video`);r.muted=!0,r.preload=`metadata`,r.crossOrigin=`anonymous`;let a=()=>{o(r.duration),r.currentTime=Math.min(1,r.duration*.1)},s=()=>{try{let e=document.createElement(`canvas`);e.width=t*2,e.height=n*2;let a=e.getContext(`2d`);a&&(a.drawImage(r,0,0,e.width,e.height),i(e.toDataURL(`image/jpeg`,.7)))}catch{}};return r.addEventListener(`loadedmetadata`,a),r.addEventListener(`seeked`,s),r.src=e,()=>{r.removeEventListener(`loadedmetadata`,a),r.removeEventListener(`seeked`,s)}},[e,t,n]),(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#1a1a2e`},children:[r?(0,$.jsx)(`img`,{src:r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(M6,{style:{color:`#fff`,fontSize:18}})}),a!=null&&(0,$.jsx)(`span`,{style:{position:`absolute`,bottom:2,right:2,fontSize:9,color:`#fff`,background:`rgba(0,0,0,0.6)`,borderRadius:4,padding:`1px 4px`,lineHeight:1.3},children:(e=>`${Math.round(e)}s`)(a)})]})},Ise=()=>{let{projectId:e}=$e(),t=Ye(),[n]=pH.useForm(),{projects:r,records:i,fetchProjects:a,fetchRecords:o,optimizePrompt:s,generateVideo:c,retryGeneration:l}=s7(),u=i.items,{user:d}=$5(),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(null),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(!1),[C,w]=(0,S.useState)({}),[T,E]=(0,S.useState)({}),[D,O]=(0,S.useState)({}),[k,A]=(0,S.useState)({}),[j,M]=(0,S.useState)({}),N=(0,S.useRef)(null),P=(0,S.useCallback)(e=>{if(!e)return 0;let t=new Date(e).getTime(),n=(Date.now()-t)/1e3;return n>=180?99:Math.min(99,n*.6)},[]);(0,S.useEffect)(()=>{let e=Object.entries(T).filter(([,e])=>e===`generating`).map(([e])=>e);if(e.length===0){N.current&&=(clearInterval(N.current),null);return}let t=()=>{e.forEach(e=>{let t=s7.getState().records.items.find(t=>t.id===e);if(t?.createdAt){let n=P(t.createdAt);O(t=>({...t,[e]:n})),A(t=>({...t,[e]:n}))}})};return t(),N.current=window.setInterval(t,1e3),()=>{N.current&&=(clearInterval(N.current),null)}},[T,P]),(0,S.useEffect)(()=>{Object.entries(T).forEach(([e,t])=>{if(t===`done`&&!j[e]){M(t=>({...t,[e]:!0}));let t=k[e]||0,n=Date.now(),r=()=>{let i=Date.now()-n,a=Math.min(i/800,1),o=1-(1-a)**3,s=t+(100-t)*o;A(t=>({...t,[e]:s})),a<1&&requestAnimationFrame(r)};requestAnimationFrame(r)}})},[T]),(0,S.useEffect)(()=>{Object.entries(T).forEach(([e,t])=>{if(t===`generating`){let t=s7.getState().records.items.find(t=>t.id===e);if(t?.createdAt){let n=P(t.createdAt);O(t=>({...t,[e]:n})),A(t=>({...t,[e]:n}))}}})},[g]);let[F,I]=(0,S.useState)({}),[L,R]=(0,S.useState)(null),[z,B]=(0,S.useState)(null),[V,H]=(0,S.useState)([]),[U,ee]=(0,S.useState)(!1),[W,te]=(0,S.useState)(``),[G,ne]=(0,S.useState)(!1),[K,re]=(0,S.useState)(``),ie=(0,S.useRef)(null),[ae,q]=(0,S.useState)({}),[oe,se]=(0,S.useState)({}),[ce,le]=(0,S.useState)({}),[ue,de]=(0,S.useState)(null),[fe,pe]=(0,S.useState)(null),[me,he]=(0,S.useState)(5),[ge,_e]=(0,S.useState)(`9:16`),[ve,ye]=(0,S.useState)(`720p`),[be,xe]=(0,S.useState)([]),[Se,Ce]=(0,S.useState)([]),[we,Te]=(0,S.useState)(``),[Ee,De]=(0,S.useState)(!1),[Oe,ke]=(0,S.useState)(null),[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`720p`,`1080p`],durations:[5,8,10,12,15]});(0,S.useMemo)(()=>Me.durations.map(e=>`${e}`),[Me.durations]),(0,S.useCallback)(()=>{ke(e=>e===`duration`?null:`duration`)},[]),(0,S.useCallback)(()=>{ke(null)},[]);let Pe=(0,S.useCallback)(e=>{de(t=>t===e?null:e)},[]),Fe=(0,S.useCallback)(()=>{de(null)},[]);(0,S.useCallback)(e=>{he(parseInt(e))},[]);let Ie=(0,S.useCallback)((e,t)=>{le(n=>{let r={...n};return r[t]===e?delete r[t]:r[t]=e,r})},[]),[Le,Re]=(0,S.useState)(0),[ze,Be]=(0,S.useState)(0),[Ve,He]=(0,S.useState)(`video`),[Ue,We]=(0,S.useState)(`1:1`),[Ge,Ke]=(0,S.useState)(`2K`),[qe,Je]=(0,S.useState)(2048),[Xe,Ze]=(0,S.useState)(2048),[Qe,et]=(0,S.useState)(!1),[tt,nt]=(0,S.useState)([]),[rt,it]=(0,S.useState)([]),[at,ot]=(0,S.useState)([]),st=(e,t)=>{if(e<300||e>6e3)return`图片宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`图片高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;return n<.4||n>2.5?`图片宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`:null},ct=(e,t)=>{if(e<300||e>6e3)return`视频宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`视频高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;if(n<.4||n>2.5)return`视频宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`;let r=e*t;return r<409600?`视频总像素数过小(${e}×${t}=${r}),需 ≥ 640×640=409600`:r>8295044?`视频总像素数过大(${e}×${t}=${r}),需 ≤ 3326×2494=8295044`:null},lt=async e=>{let t=e.type.startsWith(`image/`),n=e.type.startsWith(`video/`);if(!t&&!n)return Z.error(`仅支持图片或视频文件`),!1;let r=n?100:10;if(e.size/1024/1024>r)return Z.error(`${n?`视频`:`图片`}大小不能超过${r}MB`),!1;let i=V.filter(e=>e.type===`image`).length,a=V.filter(e=>e.type===`video`).length,o=V.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(t&&i>=5)return Z.error(`最多上传5张图片`),!1;if(n&&a>=2)return Z.error(`最多上传2个视频`),!1;let s=0;if(n){let t=await new Promise(t=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{t({duration:n.duration||0,width:n.videoWidth||0,height:n.videoHeight||0}),n.remove()},n.onerror=()=>{t({duration:0,width:0,height:0}),n.remove()},n.src=URL.createObjectURL(e)});if(s=t.duration,t.width>0&&t.height>0){let e=ct(t.width,t.height);if(e)return Z.error(`${e}`),!1}if(o+s>15)return Z.error(`视频总时长不能超过15秒`),!1}else{let t=await new Promise(t=>{let n=document.createElement(`img`);n.onload=()=>{t({width:n.width,height:n.height}),URL.revokeObjectURL(n.src)},n.onerror=()=>{t({width:0,height:0}),URL.revokeObjectURL(n.src)},n.src=URL.createObjectURL(e)});if(t.width>0&&t.height>0){let e=st(t.width,t.height);if(e)return Z.error(`${e}`),!1}}ee(!0);try{let r;r=t?await o5(e):await s5(e,s);let o=t?`图片`:`视频`,c=t?i+1:a+1;H(e=>[...e,{url:r.url,type:t?`image`:`video`,name:`${o}${c}`,duration:n?s:void 0}]),Z.success(`${o}上传成功`)}catch{Z.error(`上传失败`)}finally{ee(!1)}return!1};(0,S.useEffect)(()=>{if(Pae().then(e=>{nt(e.video),ot(e.image)}),E5().then(e=>{it(e)}),!Qe&&!Ae)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&(et(!1),je(!1))};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[Qe,Ae]);let ut=e=>{let t=Array.isArray(e)?e:[];return{inputImageCount:t.filter(e=>e.type===`image`).length,inputVideoDuration:t.filter(e=>e.type===`video`).reduce((e,t)=>e+Number(t.duration||0),0)}},dt=()=>{let e={};if(e=rt.find(e=>e.modelConfigId===(g?.engineId||we)&&e.genType===Ve&&e.resolution===(Ve===`video`?g?.resolution||ve:g?.imageSize||Ge)),e||=Ve===`video`?{perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0}:{perSecondCredits:.1,baseCredits:2,ratio:3,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},Ve===`video`){let t=((g?.duration||me)*e.perSecondCredits+e.baseCredits)*e.ratio;if(g?.includeMediaReferences??Ee){let n=ut(g?.references||V);if(n.inputVideoDuration>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n.inputVideoDuration)*(e.inputVideoRatio||1);t+=r}if(n.inputImageCount>0){let r=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*n.inputImageCount)*(e.inputImageRatio||1);t+=r}}return Number(t.toFixed(2))}else{let t=e.baseCredits*e.ratio;if(g?.includeMediaReferences??Ee){let n=ut(g?.references||V);if(n.inputImageCount>0){let r=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*n.inputImageCount)*(e.inputImageRatio||1);t+=r}}return Number(t.toFixed(2))}},ft=e=>{let t=e.genType||e.gen_type||`video`,n=e.engineId||e.engine_id,r=e.resolution,i=Number(e.duration||0),a=e.imageSize||e.image_size,o=e.includeMediaReferences??e.include_media_references??!1,s=e.references||[],c=rt.find(e=>e.modelConfigId===n&&e.genType===t&&e.resolution===(t===`video`?r:a));c||=t===`video`?{perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0}:{perSecondCredits:.1,baseCredits:2,ratio:3,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0};let l=0;if(t===`video`){if(l=(i*c.perSecondCredits+c.baseCredits)*c.ratio,o){let e=ut(s);if(e.inputVideoDuration>0){let t=((c.inputVideoBaseCredits||0)+(c.inputVideoPerSecondCredits||0)*e.inputVideoDuration)*(c.inputVideoRatio||1);l+=t}if(e.inputImageCount>0){let t=((c.inputImageBaseCredits||0)+(c.inputImagePerImageCredits||0)*e.inputImageCount)*(c.inputImageRatio||1);l+=t}}}else if(l=c.baseCredits*c.ratio,o){let e=ut(s);if(e.inputImageCount>0){let t=((c.inputImageBaseCredits||0)+(c.inputImagePerImageCredits||0)*e.inputImageCount)*(c.inputImageRatio||1);l+=t}}return Number(l.toFixed(2))},pt=e=>{St(e);let t=Tt[Ge]?.[e];if(t){let[e,n]=t.split(/x/i).map(Number);Je(e),Ze(n)}},mt=e=>{wt(e);let t=Object.keys(Tt[e]||{});gt(t.map(e=>({value:e,label:e})));let n=t.includes(Ue)?Ue:t[0]||`1:1`;n!==Ue&&We(n);let r=Tt[e]?.[n];if(r){let[e,t]=r.split(/x/i).map(Number);Je(e),Ze(t)}},[ht,gt]=(0,S.useState)([]),[_t,vt]=(0,S.useState)([]),[yt,bt]=(0,S.useState)([]),[xt,St]=(0,S.useState)(0),[Ct,wt]=(0,S.useState)(0),[Tt,Et]=(0,S.useState)({});(0,S.useEffect)(()=>{yt[Ct]&&yt[Ct][xt]!==void 0&&(Je(yt[Ct][xt].substring(0,4)),Ze(yt[Ct][xt].substring(5)))},[xt]),(0,S.useEffect)(()=>{yt[Ct]&&yt[Ct][xt]!==void 0&&(Je(yt[Ct][xt].substring(0,4)),Ze(yt[Ct][xt].substring(5)))},[Ct]);let Dt=()=>{Je(Xe),Ze(qe)},Ot=e=>{let t=e.target.value===`image`?`image`:`video`;He(t);let n=(t===`image`?Se:be).filter(e=>e.supportsUniversalReference!==!1);n.length>0&&At(n[0].id)};(0,S.useEffect)(()=>{_5().then(e=>{q(Object.fromEntries(e.map(e=>[e.key,e.label]))),se(Object.fromEntries(e.map(e=>[e.key,e.optionGroups||[]])))}).catch(()=>{}),wae().then(e=>{let t=e.items||[];Ce(t);let n=t?.[0]?.supportedSizes||{};Et(n);let r=Object.keys(n);vt(r.map(e=>({value:e,label:e})));let i=r.includes(Ge)?Ge:r[0]||`2K`,a=Object.keys(n[i]||{});gt(a.map(e=>({value:e,label:e})));let o=a.includes(Ue)?Ue:a[0]||`1:1`;o!==Ue&&We(o);let s=n[i]?.[o];if(s){let[e,t]=s.split(/x/i).map(Number);Je(e),Ze(t)}}).catch(()=>{}),Cae().then(e=>{if(xe(e.items||[]),e.items?.length){let t=e.items[0];Te(e=>e||t.id),Ne({ratios:t.supportedRatios?.length?t.supportedRatios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions?.length?t.supportedResolutions:[`720p`,`1080p`],durations:t.supportedDurations?.length?t.supportedDurations:[5,8,10,12,15]})}}).catch(()=>{})},[]),(0,S.useEffect)(()=>{if(!g)return;let e=g.genType||Ve,t=e===`image`?Se:be,n=g.engineId||``,r=t.find(e=>e.id===n)||t[0];if(r)if(Te(r.id),e===`image`){let e=r.supportedSizes||{};Et(e);let t=Object.keys(e),n=t.includes(g.imageSize||``)?g.imageSize:t[0]||g.imageSize||`2K`;Ke(n);let i=Object.keys(e[n]||{}),a=i.includes(g.imageProportion||``)?g.imageProportion:i[0]||g.imageProportion||`1:1`;We(a);let o=e[n]?.[a]||g.imagePx||``;if(o){let[e,t]=String(o).split(/x/i).map(Number);e>0&&t>0&&(Je(e),Ze(t))}}else Ne({ratios:r.supportedRatios?.length?r.supportedRatios:[`16:9`],resolutions:r.supportedResolutions?.length?r.supportedResolutions:[`720p`],durations:r.supportedDurations?.length?r.supportedDurations:[5]}),r.supportedRatios?.includes(ge)||_e(r.supportedRatios?.[0]||`16:9`),r.supportedResolutions?.includes(ve)||ye(r.supportedResolutions?.[0]||`720p`),r.supportedDurations?.includes(me)||he(r.supportedDurations?.[0]||g.duration||5);De(!!g.includeMediaReferences)},[g?.id,g?.engineId,be,Se]);let kt=e=>{let t=be.find(t=>t.id===e)||be[0];return{ratios:t?.supportedRatios?.length?t.supportedRatios:[`16:9`],resolutions:t?.supportedResolutions?.length?t.supportedResolutions:[`720p`],durations:t?.supportedDurations?.length?t.supportedDurations:[5]}},At=e=>{Te(e);let t=(Ve===`image`?Se:be).find(t=>t.id===e);if(!t)return;if(Ve===`image`){let e=t.supportedSizes||{};Et(e);let n=Object.keys(e);vt(n.map(e=>({value:e,label:e})));let r=n.includes(Ge)?Ge:n[0]||`2K`,i=Object.keys(e[r]||{});gt(i.map(e=>({value:e,label:e})));let a=i.includes(Ue)?Ue:i[0]||`1:1`;Ke(r),We(a);let o=e[r]?.[a]||``;if(o){let[e,t]=String(o).split(/x/i).map(Number);e>0&&t>0&&(Je(e),Ze(t))}return}let n=kt(e);Ne(n),_e(n.ratios[0]),ye(n.resolutions[0]),he(n.durations[0])};(0,S.useEffect)(()=>{a(),o({projectId:e,page:1,pageSize:100})},[e,a,o]);let jt=(0,S.useRef)(!1);(0,S.useEffect)(()=>{jt.current||u.length===0||(jt.current=!0,u.forEach(t=>{t.projectId===e&&t.status===`generating`&&(E(e=>({...e,[t.id]:`generating`})),nn(t.id)),t.projectId===e&&t.status===`optimizing`&&zt(t.id)}))},[u,e]);let Mt=(0,S.useRef)(new Set),Nt=(0,S.useRef)(null),Pt=(0,S.useRef)(null),Ft=e=>{Mt.current.add(e),Rt()},It=e=>{Mt.current.delete(e),Mt.current.size===0&&Lt()},Lt=()=>{Nt.current&&=(clearInterval(Nt.current),null),Pt.current&&=(Pt.current.abort(),null)},Rt=()=>{Nt.current||=setInterval(async()=>{try{Pt.current&&Pt.current.abort();let t=new AbortController;Pt.current=t;let n=await i5({projectId:e,page:1,pageSize:100,signal:t.signal});Pt.current=null;let r=Array.from(Mt.current),i=[];if(r.length>0){let e=s7.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t)return t.status!==`optimizing`&&i.push(e.id),t}return e});s7.setState({records:{...e,items:t}}),i.forEach(e=>{It(e)})}}catch(e){e.name}},3e3)},zt=e=>{Ft(e)},Bt=(0,S.useRef)(!1),Vt=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(Bt.current||u.length===0)return;let t=localStorage.getItem(`pending_optimize`);if(t)try{let{key:n,projectId:r,prompt:i,duration:a,engineId:o,genType:s,aspectRatio:c,resolution:l,imageSize:d,imageProportion:f,imagePx:p,includeMediaReferences:m,referenceIds:g,ts:v}=JSON.parse(t);if(Date.now()-v>300*1e3||r!==e){localStorage.removeItem(`pending_optimize`);return}if(Vt.current===n)return;let b=u.find(e=>e.projectId===r&&e.originalPrompt===i&&e.duration===a&&e.engineId===o&&String(e.genType||`video`)===String(s||`video`)&&String(e.aspectRatio||``)===String(c||``)&&String(e.resolution||``)===String(l||``)&&String(e.imageSize||``)===String(d||``)&&String(e.imageProportion||``)===String(f||``)&&String(e.imagePx||``)===String(p||``)&&!!e.includeMediaReferences==!!m&&JSON.stringify((e.references||[]).map(e=>e.upload_resource_id||e.url).filter(Boolean).sort())===JSON.stringify((g||[]).slice().sort())&&e.status===`prompt_optimized`&&new Date(e.createdAt).getTime()>v-1e4);b?(Bt.current=!0,localStorage.removeItem(`pending_optimize`),_(b),y(b.optimizedPrompt||``),Re(b.textCreditsCost),Be(b.textTokensUsed),h(!0),Z.success({content:`优化请求已恢复,消耗 ${b.textCreditsCost} 积分`,key:`recovery`})):Date.now()-v>3e4&&localStorage.removeItem(`pending_optimize`)}catch{localStorage.removeItem(`pending_optimize`)}},[u,e]);let Ht=r.find(t=>t.id===e),Ut=u.filter(t=>t.projectId===e),Wt=Ht?.name??`项目`,Gt=(0,S.useMemo)(()=>Ht&&oe[Ht.industry]||[],[Ht,oe]),Kt=d?.credits??0,qt=Kt>=dt(),Jt=async()=>{try{if(!e){Z.error(`项目ID为空,请先选择项目`);return}let t=await n.validateFields();if(!t.prompt||!t.prompt.trim()){Z.error(`请输入视频/图片描述`);return}if(!we){Z.error(`请选择生成引擎`);return}if(Ve===`video`&&(!ge||!ve)){Z.error(`请选择视频比例和分辨率`);return}p(!0);let r=Object.entries(ce).map(([e,t])=>`@${e}:${t}`),i=r.length>0?`${t.prompt}\n\n${r.join(`;`)}`:t.prompt,a=Dse();localStorage.setItem(`pending_optimize`,JSON.stringify({key:a,projectId:e,prompt:i,duration:me,engineId:we,genType:Ve,aspectRatio:Ve===`video`?ge:``,resolution:Ve===`video`?ve:``,imageSize:Ve===`image`?Ge:``,imageProportion:Ve===`image`?Ue:``,imagePx:Ve===`image`?`${qe}x${Xe}`:``,includeMediaReferences:Ee,referenceIds:V.map(e=>e.upload_resource_id||e.url).filter(Boolean).sort(),ts:Date.now()})),Vt.current=a;let o=await s(e,{prompt:i,duration:Ve===`video`?me:void 0,genType:Ve,engineId:we,includeMediaReferences:Ee,aspectRatio:Ve===`video`?ge:void 0,resolution:Ve===`video`?ve:void 0,references:V.length>0?V:void 0,idempotencyKey:a,image_size:Ve===`image`?Ge:void 0,image_proportion:Ve===`image`?Ue:void 0,image_px:Ve===`image`?qe+`x`+Xe:void 0});localStorage.removeItem(`pending_optimize`),Vt.current=null,_(o.record),y(o.record.optimizedPrompt||``),Re(o.textCreditsCost),Be(o.textTokensUsed),h(!0),Z.success({content:`「${Wt}」提示词优化完成,消耗 ${o.textCreditsCost} 积分`,key:`optimize`})}catch(e){let t=e?.response?.data?.message||e?.message||`操作失败,请稍后重试`;Z.error(t)}finally{p(!1),localStorage.removeItem(`pending_optimize`),Vt.current=null}},Yt=(0,S.useRef)(new Set),Xt=(0,S.useRef)(null),Zt=(0,S.useRef)(null),Qt=e=>{Yt.current.add(e),tn()},$t=e=>{Yt.current.delete(e),Yt.current.size===0&&en()},en=()=>{Xt.current&&=(clearInterval(Xt.current),null),Zt.current&&=(Zt.current.abort(),null)},tn=()=>{Xt.current||=setInterval(async()=>{try{Zt.current&&Zt.current.abort();let t=new AbortController;Zt.current=t;let n=await i5({projectId:e,page:1,pageSize:100,signal:t.signal});Zt.current=null;let r=Array.from(Yt.current),i=[];if(r.length>0){let e=s7.getState().records,t=e.items.map(e=>{if(r.includes(e.id)){let t=n.items.find(t=>t.id===e.id);if(t){let n=T[e.id];return t.shouldPoll??t.status===`generating`?n!==`generating`&&E(t=>({...t,[e.id]:`generating`})):i.push(e.id),t}}return e});s7.setState({records:{...e,items:t}}),i.forEach(e=>{let t=n.items.find(t=>t.id===e);$t(e),t?.status===`completed`?(E(t=>({...t,[e]:`done`})),_(n=>n?.id===e?t:n),Z.success({content:`「${Wt}」视频生成完成!`,key:e,duration:5})):t?.status===`failed`&&(E(t=>({...t,[e]:`failed`})),_(n=>n?.id===e?t:n),Z.error({content:`「${Wt}」视频生成失败: ${t.errorMessage||`未知错误`}`,key:e,duration:5}))})}}catch(e){e.name}},5e3)},nn=e=>{Qt(e)};(0,S.useEffect)(()=>()=>{en(),Lt()},[]),(0,S.useEffect)(()=>{u.filter(e=>e.shouldPoll??e.status===`generating`).forEach(e=>{E(t=>({...t,[e.id]:`generating`})),nn(e.id)})},[u]);let rn=async e=>{w(t=>({...t,[e]:!0})),E(t=>({...t,[e]:`generating`})),Z.loading({content:`「${Wt}」正在提交视频生成...`,duration:0,key:e});try{let t=Ut.find(t=>t.id===e)||g;if(!t||t.canGenerate===!1)throw Error(t?.configFallbackHint||`该记录当前不可生成,请重新生成提词`);let n=t.id===g?.id?v:F[e];n&&n!==t.optimizedPrompt&&await u5(e,n),(await c(e)).status===`failed`?(E(t=>({...t,[e]:`failed`})),Z.error({content:`「${Wt}」提交失败`,key:e,duration:3})):(Z.success({content:`「${Wt}」已提交,正在生成中...`,key:e,duration:3}),nn(e))}catch(t){E(t=>({...t,[e]:`failed`}));let n=`提交失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),Z.error({content:`${n}`,key:e,duration:3})}finally{w(t=>({...t,[e]:!1}))}},an=e=>{let t=T[e.id];return O7({status:(t===`done`?`completed`:t)||e.status,pipelineStage:t?null:e.pipelineStage,clientStatus:t?null:e.clientStatus,shouldPoll:t?t===`generating`:e.shouldPoll,canGenerate:e.canGenerate,canRetry:e.canRetry})},on=e=>e.isActive?(0,$.jsx)(Ym,{style:{animation:`spinSlow 1s linear infinite`}}):e.isSuccess?(0,$.jsx)(M2,{}):e.isFailure?(0,$.jsx)(F2,{}):(0,$.jsx)(bB,{});return(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,height:`calc(100vh - 8px)`,padding:`24px`,background:`#fff`,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{className:`gen-header animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(H0,{}),onClick:()=>t(`/projects`),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:Wt}),Ht&&(0,$.jsx)(_Q,{style:{background:`rgba(99, 102, 241, 0.08)`,border:`1px solid rgba(99, 102, 241, 0.15)`,color:`#6366f1`,borderRadius:6},children:ae[Ht.industry]||Ht.industry})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:13},children:`描述视频 → AI优化 → 生成视频`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsxs)(_Q,{style:{background:`rgba(99, 102, 241, 0.08)`,border:`1px solid rgba(99, 102, 241, 0.15)`,color:`#6366f1`,borderRadius:20,fontSize:13,padding:`4px 14px`},children:[`剩余 `,Kt,` 积分`]})]}),!m&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{marginBottom:24,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 2px 12px rgba(0,0,0,0.03)`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{marginRight:70,position:`relative`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,fontWeight:500,color:`#475569`,marginRight:16},children:`生成类型:`}),(0,$.jsxs)(KF.Group,{defaultValue:`video`,buttonStyle:`solid`,onChange:Ot,children:[(0,$.jsxs)(KF.Button,{value:`video`,children:[(0,$.jsx)(L8,{style:{marginRight:6,fontSize:14}}),` `,`视频`]}),(0,$.jsxs)(KF.Button,{value:`image`,style:{zIndex:0},children:[(0,$.jsx)(C6,{style:{marginRight:6,fontSize:14}}),` `,`图片`]})]})]}),Ve===`video`&&[{icon:(0,$.jsx)($Q,{}),label:`描述视频+时长`,color:`#6366f1`},{icon:(0,$.jsx)(w8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(X6,{}),label:`选择参数生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t)),Ve===`image`&&[{icon:(0,$.jsx)($Q,{}),label:`描述图片+尺寸`,color:`#6366f1`},{icon:(0,$.jsx)(w8,{}),label:`AI智能优化`,color:`#8b5cf6`},{icon:(0,$.jsx)(X6,{}),label:`图片生成`,color:`#10b981`}].map((e,t)=>(0,$.jsxs)(S.Fragment,{children:[t>0&&(0,$.jsx)(`div`,{style:{width:40,height:1,background:`linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0)`,margin:`0 12px`,flexShrink:0}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:10,background:`${e.color}12`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:e.color,fontSize:15},children:e.icon})}),(0,$.jsx)(Q.Text,{style:{fontSize:13,fontWeight:500,color:`#1a1a2e`},children:e.label})]})]},t))]})}),(0,$.jsxs)(pH,{form:n,initialValues:{},children:[(0,$.jsx)(pH.Item,{name:`prompt`,noStyle:!0,rules:[{required:!0,message:`请输入视频描述`}],style:{display:`none`}}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{borderRadius:20,background:`#fff`,border:`1px solid #f0f0f5`,boxShadow:`0 4px 24px rgba(0,0,0,0.04)`,overflow:`visible`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`12px 16px 0`,minHeight:60},children:[V.map((e,t)=>(0,$.jsxs)(`div`,{className:`ref-thumb`,style:{position:`relative`,width:48,height:48,borderRadius:12,overflow:`visible`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,overflow:`hidden`,border:`1px solid #e2e8f0`,cursor:`pointer`},onClick:()=>{e.type===`video`&&pe(`https://ceshi.apiforeign.minzhongzc.com${e.url}`)},children:e.type===`image`?(0,$.jsx)(pU,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,$.jsx)(A7,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`})}),(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),l5(e.url).catch(()=>{}),H(e=>e.filter((e,n)=>n!==t))},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(0,0,0,0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`,backdropFilter:`blur(4px)`},children:(0,$.jsx)(F2,{style:{color:`#fff`,fontSize:10}})})]},t)),(0,$.jsx)(C7,{accept:`image/*,video/*`,mediaType:Ve,onLocalSelect:e=>{e.forEach(async e=>{await lt(e)})},onHistorySelect:e=>{e.forEach(e=>{H(t=>[...t,{url:e.resourceUrl||e.previewUrl||e.displayUrl||``,type:e.resourceType,name:e.fileName||``}])}),Z.success(`成功添加${e.length}个历史记录`)},onPortraitSelect:e=>{e.forEach(e=>{H(t=>[...t,{url:e.previewUrl||``,type:e.assetType===`Video`?`video`:`image`,name:e.name||`真人素材`,source:`private_portrait_asset`,private_asset_id:e.id,label:``,duration:e.assetType===`Video`?e.videoDuration||0:void 0}])}),Z.success(`已添加 ${e.length} 个真人素材参考`)},uploading:U,tooltipTitle:`图片${V.filter(e=>e.type===`image`).length}/5,视频${V.filter(e=>e.type===`video`).length}/2`,maxImageCount:5,maxVideoCount:2,usedImageCount:V.filter(e=>e.type===`image`).length,usedVideoCount:V.filter(e=>e.type===`video`).length,usedVideoDuration:V.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,children:(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`,flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99,102,241,0.04)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`,e.currentTarget.style.background=`transparent`},children:U?(0,$.jsx)(Ym,{style:{fontSize:18,color:`#6366f1`}}):(0,$.jsx)(BI,{style:{fontSize:18,color:`#94a3b8`}})})})]}),(0,$.jsx)(`div`,{style:{padding:`8px 16px 4px`},children:(0,$.jsx)(JU.TextArea,{ref:ie,value:W,onChange:e=>{let t=e.target.value;te(t),n.setFieldsValue({prompt:t});let r=t.lastIndexOf(`@`);if(r>=0){let e=t.slice(r+1);if(!e.includes(` `)&&!e.includes(` +`)){ne(!0),re(e);return}}ne(!1)},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await lt(e)}))},rows:3,placeholder:`上传参考素材后(手动开启是否参与最终生成,如不开启则只用做模型理解)、输入文字,自由组合图、文多元素。输入 @ 可引用参考内容...`,maxLength:500,variant:`borderless`,autoSize:{minRows:2,maxRows:6},style:{padding:`6px 2px`,fontSize:15,lineHeight:1.7,resize:`none`,caretColor:`#6366f1`}})}),G&&V.length>0&&(0,$.jsx)(`div`,{style:{margin:`0 16px 8px`,background:`#fff`,borderRadius:10,boxShadow:`0 6px 24px rgba(0,0,0,0.12)`,border:`1px solid #e2e8f0`,padding:6,maxHeight:180,overflowY:`auto`},children:(()=>{let e=V.filter(e=>!K||e.name.includes(K));return(e.length>0?e:V).map((e,t)=>{let r=V.indexOf(e);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:8,cursor:`pointer`,transition:`background 0.15s`},onMouseEnter:e=>e.currentTarget.style.background=`#f1f5f9`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,onMouseDown:t=>{t.preventDefault();let i=ie.current?.resizableTextArea?.textArea||ie.current?.nativeElement?.querySelector(`textarea`)||ie.current;if(!i||!i.value)return;let a=i.value,o=a.lastIndexOf(`@`),s=e.name||(e.type===`image`?`图片${r+1}`:`视频${r+1}`),c=a.slice(0,o)+`@${s} `;te(c),n.setFieldValue(`prompt`,c),ne(!1),setTimeout(()=>{i.focus(),i.selectionStart=c.length,i.selectionEnd=c.length},50)},children:[(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,overflow:`hidden`,background:e.type===`image`?`#f1f5f9`:`#1a1a2e`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:e.type===`image`?(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(M6,{style:{color:`#fff`,fontSize:14}})}),(0,$.jsx)(Q.Text,{style:{fontSize:13},children:e.name||(e.type===`image`?`图片${r+1}`:`视频${r+1}`)}),(0,$.jsx)(_Q,{style:{marginLeft:`auto`,fontSize:11},children:e.type===`image`?`图片`:`视频`})]},t)})})()}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 12px 12px`,gap:8,flexWrap:`wrap`,position:`relative`,zIndex:50,minHeight:48},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,flexWrap:`wrap`},children:[(0,$.jsx)(k7,{label:`引擎`,value:(Ve===`image`?Se:be).filter(e=>e.supportsUniversalReference!==!1).find(e=>e.id===we)?.name||`选择引擎`,options:(Ve===`image`?Se:be).filter(e=>e.supportsUniversalReference!==!1).map(e=>e.name),expanded:Oe===`engine`,onToggle:()=>ke(Oe===`engine`?null:`engine`),onSelect:e=>{let t=(Ve===`image`?Se:be).filter(e=>e.supportsUniversalReference!==!1).find(t=>t.name===e);t&&At(t.id),ke(null)},onClose:()=>ke(null)}),Ve!==`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{je(!Ae),ke(null)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(b3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[ge,` · `,me,`s · `,ve]})]}),Ae&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:Me.ratios.map(e=>{let[t,n]=e.split(`:`).map(Number),r=t>=n?18:Math.round(t/n*18),i=n>=t?18:Math.round(n/t*18);return(0,$.jsxs)(`button`,{onClick:()=>_e(e),style:{flex:`0 0 calc(12.5% - 4px)`,minWidth:44,height:52,borderRadius:6,border:ge===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:ge===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:r,height:i,border:`2px solid ${ge===e?`#6366f1`:`#9ca3af`}`,borderRadius:3,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:ge===e?`#6366f1`:`#6b7280`,fontWeight:ge===e?600:400},children:e})]},e)})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(me-Math.min(...Me.durations))/(Math.max(...Me.durations)-Math.min(...Me.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...Me.durations),max:Math.max(...Me.durations),value:me,onChange:e=>he(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:me}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:Me.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>ye(e),style:{flex:1,height:42,borderRadius:8,border:ve===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:ve===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:ve===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]}),Gt.map((e,t)=>{let n=ue===e.name,r=ce[e.name];return(0,$.jsx)(Fse,{group:e,groupName:e.name,selected:r,expanded:n,onToggle:Pe,onSelect:Ie,onClose:Fe},`og-${t}`)})]}),Ve==`image`&&(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{et(!Qe),ke(null)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(b3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[Ue===`auto`?`智能`:Ue,` · `,Ge,` · `,qe,`×`,Xe]})]}),Qe&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8,fontSize:13,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:ht.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{We(e.value),pt(e.label)},style:{flex:`0 0 calc(11.11% - 5px)`,minWidth:48,height:52,borderRadius:6,border:Ue===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Ue===e.value?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?20:Math.round(t/n*20)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?20:Math.round(n/t*20)})(),border:`2px solid ${Ue===e.value?`#6366f1`:`#9ca3af`}`,borderRadius:(e.value,3),marginBottom:3,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:8,color:Ue===e.value?`#6366f1`:`#9ca3af`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:10,color:Ue===e.value?`#6366f1`:`#6b7280`,fontWeight:Ue===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8,fontSize:13,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:_t.map(e=>(0,$.jsx)(`button`,{onClick:()=>{Ke(e.value),mt(e.label)},style:{flex:1,height:44,borderRadius:6,border:Ge===e.value?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:Ge===e.value?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:Ge===e.value?`#fff`:`#4b5563`},children:[e.value,e.value===`4k`&&(0,$.jsx)(`span`,{style:{marginLeft:3},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8,fontSize:13,fontWeight:500,color:`#666666`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`W`}),(0,$.jsx)(JU,{value:qe,onChange:e=>Je(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:36,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:13,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`button`,{onClick:Dt,style:{width:26,height:26,borderRadius:6,border:`1px solid #e5e7eb`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#6366f1`},children:(0,$.jsx)(QH,{style:{fontSize:12}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:140},children:[(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12,marginRight:6},children:`H`}),(0,$.jsx)(JU,{value:Xe,onChange:e=>Ze(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:6,height:36,border:`1px solid #e5e7eb`,backgroundColor:`#f9fafb`,fontSize:13,fontWeight:600,color:`#1f2937`}})]}),(0,$.jsx)(`span`,{style:{color:`#9ca3af`,fontSize:12},children:`PX`})]})]})]})]}),V.length>0&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(gq,{size:`small`,checked:Ee,onChange:De}),(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`生成时携带附件`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[Ve===`image`&&(0,$.jsx)(`span`,{style:{color:`#7c7c7c`,fontSize:14},children:`(请在左侧选择图片比例和尺寸)`}),(0,$.jsx)(kw,{title:`LLM积分由服务端按当前功能场景直接消费`,placement:`top`,children:(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:()=>{Jt()},loading:f,style:{borderRadius:10,fontWeight:600,minWidth:140,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99,102,241,0.35)`},children:`AI优化提示词`})})]})]})]})]})]}),m&&g&&(0,$.jsxs)(_L,{className:`animate-fadeInUp`,style:{borderRadius:16},styles:{body:{padding:`24px 28px`}},children:[!T[g.id]||T[g.id]===`idle`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:24,padding:`14px 18px`,borderRadius:12,background:`linear-gradient(135deg, rgba(16,185,129,0.06), rgba(5,150,105,0.06))`,border:`1px solid rgba(16,185,129,0.15)`},children:[(0,$.jsx)(M2,{style:{color:`#10b981`,fontSize:22}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`},children:`提示词优化完成`}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`文本优化消耗 `,Le,` 积分· 您可以编辑提示词后选择参数生成视频`]})]})]}):(0,$.jsxs)(`div`,{style:{marginBottom:24,padding:`16px 18px`,borderRadius:12,display:`flex`,alignItems:`center`,gap:12,background:T[g.id]===`failed`?`rgba(239,68,68,0.04)`:T[g.id]===`done`?`rgba(16,185,129,0.04)`:`rgba(99,102,241,0.04)`,border:`1px solid ${T[g.id]===`failed`?`rgba(239,68,68,0.12)`:T[g.id]===`done`?`rgba(16,185,129,0.12)`:`rgba(99,102,241,0.12)`}`},children:[T[g.id]===`generating`&&(0,$.jsx)(Ym,{style:{color:`#6366f1`,fontSize:18},spin:!0}),T[g.id]===`done`&&(0,$.jsx)(M2,{style:{color:`#10b981`,fontSize:18}}),T[g.id]===`failed`&&(0,$.jsx)(F2,{style:{color:`#ef4444`,fontSize:18}}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:T[g.id]===`failed`?`#ef4444`:T[g.id]===`done`?`#10b981`:`#6366f1`},children:[T[g.id]===`generating`&&(0,$.jsxs)(`span`,{children:[Ve===`image`?`图片`:`视频`,`生成中,请稍候...`]}),T[g.id]===`done`&&`${Ve===`image`?`图片`:`视频`}生成成功`,T[g.id]===`failed`&&`${Ve===`image`?`图片`:`视频`}生成失败,请重试`]})]}),!T[g.id]||T[g.id]===`idle`||T[g.id]===`failed`?(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#64748b`,lineHeight:1.7},children:g.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 45%`,minWidth:240},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!b&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!b&&(0,$.jsxs)(yV,{size:4,children:[(0,$.jsx)(kw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(S$,{}),onClick:async()=>{let e=await m7(v);Z.success(e?`已复制`:`复制失败`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(kw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)($Q,{}),onClick:()=>x(!0),style:{color:`#6366f1`}})})]})]}),b?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(JU.TextArea,{value:v,onChange:e=>y(e.target.value),rows:5,style:{borderRadius:12,fontSize:14,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>{y(g.optimizedPrompt||``),x(!1)},children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{x(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:100},children:(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#1a1a2e`,lineHeight:1.7},children:v})})]})]}):(0,$.jsxs)(`div`,{className:`gen-prompt-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 55%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`,minHeight:80},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.6},children:g.originalPrompt})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,!b&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!b&&(0,$.jsxs)(yV,{size:4,children:[(0,$.jsx)(kw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(S$,{}),onClick:async()=>{let e=await m7(v);Z.success(e?`已复制`:`复制失败`)},style:{color:`#94a3b8`}})}),(0,$.jsx)(kw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)($Q,{}),onClick:()=>x(!0),style:{color:`#6366f1`}})})]})]}),b?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(JU.TextArea,{value:v,onChange:e=>y(e.target.value),rows:5,style:{borderRadius:12,fontSize:13,lineHeight:1.6,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>{y(g.optimizedPrompt||``),x(!1)},children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{x(!1),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:14,borderRadius:12,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`,minHeight:120},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.6},children:v})})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:280},children:[g.videoUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成视频`}),(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,border:`1px solid #f0f0f5`,background:`#000`},children:(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${g.videoUrl}`,controls:!0,style:{width:`100%`,maxHeight:350,display:`block`}})})]}),g.imageUrl&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`生成图片`}),(0,$.jsx)(pU,{src:`https://ceshi.apiforeign.minzhongzc.com${g.imageUrl}`,style:{width:`100%`,maxHeight:350,objectFit:`contain`,borderRadius:12,border:`1px solid #f0f0f5`},preview:!0})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`wrap`,gap:12,marginTop:20,padding:`14px 18px`,borderRadius:12,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`引擎`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:(Ve===`image`?Se:be).find(e=>e.id===g.engineId)?.name||`-`})]}),Ve!==`image`&&(0,$.jsx)(`div`,{style:{borderRadius:12,background:`#f8f9fc`,padding:`8px 12px`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 12px`,borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`时长`}),(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`},children:[g.duration||me,`s`]})]}),(0,$.jsx)(k7,{label:`比例`,value:g.aspectRatio||ge,options:[String(g.aspectRatio||ge)],expanded:!1,onToggle:()=>void 0,onSelect:()=>void 0,onClose:()=>ke(null)}),(0,$.jsx)(k7,{label:`分辨率`,value:g.resolution||ve,options:[String(g.resolution||ve)],expanded:!1,onToggle:()=>void 0,onSelect:()=>void 0,onClose:()=>ke(null)})]})}),Ve==`image`&&g&&(0,$.jsx)(`div`,{style:{marginTop:24,borderRadius:12,background:`#f8f9fc`,width:`25%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-around`},children:[(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`分辨率`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:g.imageSize||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面比例`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:g.imageProportion||`-`})]}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`,marginBottom:4},children:`画面尺寸`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1a1a2e`},children:g.imagePx||`-`})]})]})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`6px 12px`,borderRadius:10,background:`rgba(255, 255, 255, 0.95)`,border:`1px solid rgba(231, 234, 240, 0.95)`,boxShadow:`0 2px 8px rgba(47, 52, 64, 0.03)`,flexShrink:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`3px 8px`,borderRadius:6,background:`rgba(99, 102, 241, 0.08)`,flexShrink:0},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#6366f1`,fontWeight:500},children:`文字积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#6366f1`,fontWeight:700},children:Le})]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12,fontWeight:500,flexShrink:0},children:`+`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`3px 8px`,borderRadius:6,background:`rgba(16, 185, 129, 0.08)`,flexShrink:0},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#10b981`,fontWeight:500},children:[`预估`,Ve===`image`?`图`:`视`,`积分`]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:13,color:`#10b981`,fontWeight:700},children:dt()})]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12,fontWeight:500,flexShrink:0},children:`=`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 10px`,borderRadius:6,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%)`,border:`1px solid rgba(99, 102, 241, 0.2)`,flexShrink:0},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#6366f1`,fontWeight:600},children:`总计`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#6366f1`,fontWeight:800},children:(Le+dt()).toFixed(2)})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginLeft:`auto`},children:[(0,$.jsxs)(X,{size:`large`,onClick:()=>{h(!1),_(null),y(``),te(``),H([]),le({}),de(null),ke(null),n.resetFields()},style:{borderRadius:12,minWidth:120,height:44,fontWeight:500},children:[`配置新`,Ve===`image`?`图片`:`视频`]}),(0,$.jsx)(kw,{title:qt?``:`积分不足`,children:(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(X6,{}),onClick:()=>rn(g.id),loading:T[g.id]===`generating`,disabled:!qt||g.canGenerate===!1||T[g.id]===`generating`||T[g.id]===`done`,style:{borderRadius:12,minWidth:180,height:44,fontWeight:600,background:T[g.id]===`done`?`#10b981`:qt?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#d1d5db`,border:`none`,boxShadow:qt?`0 8px 24px rgba(99,102,241,0.3)`:`none`},children:T[g.id]===`done`?`生成完成`:T[g.id]===`generating`?`生成中...`:`生成${Ve===`image`?`图片`:`视频`} (${dt()}积分)`})})]})]}),g.references&&g.references.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:`参考内容`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:g.references.map((e,t)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{e.type===`video`&&pe(`https://ceshi.apiforeign.minzhongzc.com${e.url}`)},children:[e.type===`image`?(0,$.jsx)(pU,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(A7,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,width:64,height:64}),(0,$.jsx)(_Q,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:e.name})]},t))})]})]}),Ut.length>0&&(0,$.jsxs)(`div`,{style:{marginTop:24},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,display:`block`,marginBottom:12},children:`本项目生成记录`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,background:`#fff`,borderRadius:12,padding:8,border:`1px solid #f0f0f5`},className:`stagger-children`,children:Ut.map((e,t)=>{let n=an(e),r=n.effectiveKey,i=F[e.id]??(e.optimizedPrompt||e.originalPrompt),a=z===e.id,o=e.genType||`image`;return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.05}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>B(a?null:e.id),style:{padding:`12px 16px`,borderRadius:a?`8px 8px 0 0`:8,background:`#fafafa`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:o===`image`?`#fef3c7`:`#dbeafe`},children:o===`image`?(0,$.jsx)(C6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(L8,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(gZ,{style:{color:`#6366f1`,fontSize:11,flexShrink:0}}):(0,$.jsx)(k2,{style:{color:`#cbd5e1`,fontSize:11,flexShrink:0}}),(0,$.jsx)(_Q,{color:n.color,icon:on(n),style:{margin:0},children:n.label}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:i}),r===`prompt_optimized`&&(0,$.jsx)(_Q,{color:`processing`,style:{padding:`3px 10px`,fontSize:12,margin:0,flexShrink:0},children:`待生成`}),o===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.imageSize||`-`,` ·`,` `,e.imageProportion||`-`,` ·`,` `,e.imagePx||`-`,` ·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:l7(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` ·`,` `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` `,`·`,` `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:l7(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation()})]}),a&&(0,$.jsx)(`div`,{style:{background:`#fff`,borderRadius:`0 0 8px 8px`,padding:`18px 20px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:260},children:[(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词`,` `,(r===`prompt_optimized`||n.isFailure)&&L!==e.id&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),L!==e.id&&(0,$.jsxs)(yV,{size:4,children:[(0,$.jsx)(kw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(S$,{}),onClick:async()=>{let e=await m7(i);Z.success(e?`已复制`:`复制失败`)},style:{color:`#94a3b8`}})}),(r===`prompt_optimized`||n.isFailure)&&(0,$.jsx)(kw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)($Q,{}),onClick:()=>{R(e.id),I(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt??``}))},style:{color:`#6366f1`}})})]})]}),L===e.id?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(JU.TextArea,{value:i,onChange:t=>I(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>R(null),children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{I(t=>({...t,[e.id]:i})),R(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:r===`prompt_optimized`?`rgba(99,102,241,0.02)`:`#f8f9fc`,border:r===`prompt_optimized`?`1px solid rgba(99,102,241,0.1)`:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:i})})]}),o===`image`?(0,$.jsx)(`div`,{style:{padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:(0,$.jsx)(`div`,{children:(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:[{label:`引擎`,value:`${e.engineName}`},{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`图片积分`,value:`${e.creditsCost||0}`},{label:`分辨率`,value:e.imageSize||`-`},{label:`比例`,value:e.imageProportion||`-`},{label:`尺寸`,value:e.imagePx||`-`},{label:`附件`,value:e.includeMediaReferences?`生成时携带`:`仅用于提词或不携带`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{width:`21%`,textAlign:`left`,marginBottom:10},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#1a1a2e`},children:e.value})]},t))})})}):(0,$.jsx)(`div`,{style:{padding:`10px 14px`,borderRadius:10,background:`#f8f9fc`},children:(0,$.jsx)(`div`,{children:(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:[{label:`引擎`,value:`${e.engineName}`},{label:`文字积分`,value:`${e.textCreditsCost||0}`},{label:`视频积分`,value:`${e.creditsCost||0}`},{label:`时长`,value:e.duration?`${e.duration}秒`:`-`},{label:`比例`,value:e.aspectRatio||`-`},{label:`分辨率`,value:e.resolution||`-`},{label:`附件`,value:e.includeMediaReferences?`生成时携带`:`仅用于提词或不携带`}].map((e,t)=>(0,$.jsxs)(`div`,{style:{width:`21%`,textAlign:`left`,marginBottom:10,marginRight:10},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#1a1a2e`},children:e.value})]},t))})})}),(e.references&&e.references.length>0||n.isFailure)&&(0,$.jsxs)(`div`,{style:{marginTop:14},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:8},children:[`参考素材`,` `,n.isFailure&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可删除/添加后重试)`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[e.references?.map((t,r)=>(0,$.jsxs)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`visible`,border:`1px solid #e2e8f0`,position:`relative`,cursor:`pointer`},onClick:()=>{t.type===`video`&&pe(`https://ceshi.apiforeign.minzhongzc.com${t.url}`)},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,overflow:`hidden`},children:t.type===`image`?(0,$.jsx)(pU,{src:`https://ceshi.apiforeign.minzhongzc.com${t.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},preview:!0}):(0,$.jsx)(A7,{src:`https://ceshi.apiforeign.minzhongzc.com${t.url}`,width:64,height:64})}),(0,$.jsx)(_Q,{style:{position:`absolute`,bottom:0,left:0,right:0,margin:0,fontSize:9,textAlign:`center`,borderRadius:`0 0 8px 8px`,background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,padding:`0 2px`},children:t.name}),n.isFailure&&(0,$.jsx)(`div`,{className:`ref-delete`,onClick:n=>{n.stopPropagation(),l5(t.url).catch(()=>{});let i=e.references.filter((e,t)=>t!==r);s7.getState().updateRecordReferences(e.id,i)},style:{position:`absolute`,top:-4,right:-4,width:16,height:16,borderRadius:`50%`,background:`rgba(239,68,68,0.8)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,opacity:0,transition:`opacity 0.15s`},children:(0,$.jsx)(F2,{style:{color:`#fff`,fontSize:10}})})]},r)),n.isFailure&&(0,$.jsx)(V1,{accept:`image/*,video/*`,showUploadList:!1,multiple:!0,beforeUpload:t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`);return!n&&!r?(Z.error(`仅支持图片或视频文件`),!1):(n?o5(t).then(n=>{let r={url:n.url,type:`image`,name:t.name||`图片`},i=e.references||[];s7.getState().updateRecordReferences(e.id,[...i,r]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`)):new Promise(e=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{e(n.duration||0),n.remove()},n.onerror=()=>{e(0),n.remove()},n.src=URL.createObjectURL(t)}).then(n=>{s5(t,n).then(r=>{let i={url:r.url,type:`video`,name:t.name||`视频`,duration:n||void 0},a=e.references||[];s7.getState().updateRecordReferences(e.id,[...a,i]),Z.success(`上传成功`)}).catch(()=>Z.error(`上传失败`))}),!1)},children:(0,$.jsx)(kw,{title:`添加参考素材`,children:(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:10,border:`1.5px dashed #d9d9d9`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#d9d9d9`},children:(0,$.jsx)(BI,{style:{fontSize:18,color:`#94a3b8`}})})})})]})]})]}),(0,$.jsxs)(`div`,{style:{flex:`1 1 40%`,minWidth:220,position:`relative`},children:[r===`prompt_optimized`&&(0,$.jsxs)(`div`,{style:{position:`absolute`,inset:0,padding:16,borderRadius:12,background:`#f8f9fc`,border:`1px solid #e2e8f0`,display:`flex`,flexDirection:`column`,justifyContent:`space-between`},children:[(0,$.jsx)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:[o===`video`?`视频`:`图片`,`等待生成`]})}),(0,$.jsx)(kw,{title:(d?.credits||0){if((d?.credits||0){let t=document.createElement(`a`);t.href=`https://ceshi.apiforeign.minzhongzc.com${o===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${o===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:180,overflow:`hidden`},children:o===`video`?(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,borderRadius:0}}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,borderRadius:0}})}),(0,$.jsxs)(`div`,{style:{padding:`8px 12px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(yV,{children:[o===`video`?(0,$.jsx)(L8,{style:{color:`#6366f1`,fontSize:13}}):(0,$.jsx)(C6,{style:{color:`#6366f1`,fontSize:13}}),(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:11,color:`#94a3b8`},children:l7(e.generatedAt)})]})]}):n.isFailure?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10,padding:16},children:[(0,$.jsx)(F2,{style:{color:`#ef4444`,fontSize:28}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14,fontWeight:600},children:[o===`video`?`视频`:`图片`,`生成失败`]}),e.errorMessage&&(0,$.jsx)(Q.Text,{style:{color:`#ef4444`,fontSize:12,textAlign:`center`,lineHeight:1.6},children:e.errorMessage})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:180,borderRadius:12,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:10},children:[(0,$.jsx)(bB,{style:{color:`#94a3b8`,fontSize:28}}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:13},children:o===`image`?`待生成图片`:`待生成视频`})]})]})]})})]},e.id)})})]}),(0,$.jsx)(EG,{open:!!fe,onCancel:()=>pe(null),footer:null,width:480,centered:!0,destroyOnHidden:!0,closable:!1,title:null,styles:{body:{padding:0,background:`#000`,position:`relative`}},children:fe&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:fe,controls:!0,autoPlay:!0,style:{width:`100%`,display:`block`,maxHeight:`70vh`}}),(0,$.jsx)(`div`,{onClick:()=>pe(null),style:{position:`absolute`,top:8,right:8,width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,transition:`background 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.85)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(0,0,0,0.6)`},children:(0,$.jsx)(Kie,{style:{color:`#fff`,fontSize:16}})})]})})]})},Lse=()=>{let e=Ye(),{records:t,projects:n,fetchRecords:r,fetchProjects:i,generateVideo:a,retryGeneration:o}=s7(),s=t.items,[c,l]=(0,S.useState)(1),[u,d]=(0,S.useState)(10),[f,p]=(0,S.useState)({}),[m,h]=(0,S.useState)(void 0),[g,_]=(0,S.useState)(void 0),[v,y]=(0,S.useState)({}),[b,x]=(0,S.useState)(null),[C,w]=(0,S.useState)(null),T=async e=>{let t=e.genType||`image`,n=e.canRetry===!0;if(!n&&(e.canGenerate===!1||!e.configComplete)||n&&!e.configComplete){Z.error(`该记录生成配置不完整,请重新生成提词`);return}p(t=>({...t,[e.id]:!0})),Z.loading({content:`「${e.projectName}」正在提交${t===`video`?`视频`:`图片`}生成...`,duration:0,key:e.id});try{if(n)await o(e.id);else{let t=v[e.id];t&&t!==e.optimizedPrompt&&await u5(e.id,t),await a(e.id)}Z.success({content:`「${e.projectName}」已提交,正在生成中...`,key:e.id,duration:3})}catch(t){Z.error({content:t?.response?.data?.detail||t?.message||`提交生成失败`,key:e.id,duration:3})}finally{p(t=>({...t,[e.id]:!1}))}};(0,S.useEffect)(()=>{i()},[i]),(0,S.useEffect)(()=>{r({projectId:m,status:g,page:c,pageSize:u})},[r,m,g,c,u]);let E=s;return(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20,padding:`16px 24px`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(H0,{}),onClick:()=>e(`/projects`),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:2,style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`项目记录`}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`},children:`查看所有视频生成记录,点击记录查看完整内容和视频`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),(0,$.jsxs)(`div`,{className:`record-filter-bar animate-fadeInUp`,style:{display:`flex`,gap:12,marginBottom:20,padding:`14px 20px`,borderRadius:14,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(yV,{children:[(0,$.jsx)(E4,{style:{color:`#94a3b8`}}),(0,$.jsx)(zC,{placeholder:`全部项目`,allowClear:!0,style:{width:200},onChange:e=>{h(e),l(1)},children:n.map(e=>(0,$.jsx)(zC.Option,{value:e.id,children:e.name},e.id))}),(0,$.jsxs)(zC,{placeholder:`全部状态`,allowClear:!0,style:{width:140},onChange:e=>{_(e),l(1)},children:[(0,$.jsx)(zC.Option,{value:`prompt_optimized`,children:`待生成`}),(0,$.jsx)(zC.Option,{value:`generating`,children:`生成中`}),(0,$.jsx)(zC.Option,{value:`completed`,children:`已完成`}),(0,$.jsx)(zC.Option,{value:`failed`,children:`失败`})]})]}),(0,$.jsxs)(Q.Text,{style:{marginLeft:`auto`,lineHeight:`32px`,color:`#94a3b8`,fontSize:13},children:[`共 `,t.total,` 条记录`]})]}),E.length===0?(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:60}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},className:`stagger-children`,children:E.map((e,t)=>{let n=b===e.id,r=v[e.id]??e.optimizedPrompt,i=f[e.id],a=C===e.id,o=e.genType||`image`,s=O7(e);return(0,$.jsxs)(`div`,{className:`animate-slideInCard`,style:{animationDelay:`${t*.04}s`},children:[(0,$.jsxs)(`div`,{className:`record-item`,onClick:()=>w(a?null:e.id),style:{padding:`14px 20px`,borderRadius:a?`14px 14px 0 0`:14,background:`#fff`,border:`1px solid #f0f0f5`,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,background:o===`image`?`#fef3c7`:`#dbeafe`},children:o===`image`?(0,$.jsx)(C6,{style:{color:`#d97706`,fontSize:12}}):(0,$.jsx)(L8,{style:{color:`#2563eb`,fontSize:12}})}),a?(0,$.jsx)(gZ,{style:{color:`#6366f1`,fontSize:12,flexShrink:0}}):(0,$.jsx)(k2,{style:{color:`#cbd5e1`,fontSize:12,flexShrink:0}}),(0,$.jsx)(_Q,{color:s.color,icon:s.isActive?(0,$.jsx)(Ym,{spin:!0}):s.isSuccess?(0,$.jsx)(M2,{}):s.isFailure?(0,$.jsx)(F2,{}):(0,$.jsx)(bB,{}),style:{margin:0},children:s.label}),(0,$.jsx)(_Q,{style:{background:`#f0f0ff`,border:`none`,color:`#6366f1`,margin:0},children:e.projectName}),(0,$.jsx)(Q.Text,{style:{flex:1,fontSize:13,color:`#475569`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r}),o===`image`?(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.imageSize||`-`,` · `,e.imageProportion||`-`,` · `,e.imagePx||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:l7(e.createdAt)})]}):(0,$.jsxs)(`span`,{className:`mobile-meta`,translate:`no`,style:{fontSize:12,color:`#94a3b8`,flexShrink:0},children:[e.duration?`${e.duration}秒`:`-`,` · `,e.aspectRatio||`-`,` · `,e.resolution||`-`,` · `,(0,$.jsx)(`span`,{className:`date-display`,translate:`no`,children:l7(e.createdAt)})]}),(0,$.jsx)(`div`,{className:`record-actions`,onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(yV,{children:[e.status===`prompt_optimized`&&(0,$.jsx)(X,{type:`primary`,size:`small`,icon:(0,$.jsx)(M6,{}),loading:i,disabled:!e.configComplete||e.canGenerate===!1,onClick:()=>T(e),style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`生成`}),s.isActive&&(0,$.jsx)(_Q,{color:`processing`,icon:(0,$.jsx)(Ym,{spin:!0}),style:{padding:`4px 12px`,fontSize:12},children:`生成中...`}),s.isFailure&&(0,$.jsx)(X,{type:`primary`,danger:!0,size:`small`,icon:(0,$.jsx)(M6,{}),loading:i,disabled:!e.configComplete||e.canRetry===!1,onClick:()=>T(e),style:{borderRadius:8},children:`重试`})]})})]}),a&&(0,$.jsx)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderTop:`none`,borderRadius:`0 0 14px 14px`,padding:`20px 24px`,animation:`fadeInUp 0.25s ease both`},children:(0,$.jsxs)(`div`,{className:`gen-detail-row`,style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:`1 1 50%`,minWidth:280},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`,display:`block`,marginBottom:6},children:`原始提示词`}),(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`#f8f9fc`,border:`1px solid #f0f0f5`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#64748b`,lineHeight:1.7},children:e.originalPrompt})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`优化后的提示词 `,e.status===`prompt_optimized`&&(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`(可编辑)`})]}),!n&&(0,$.jsxs)(yV,{size:4,children:[(0,$.jsx)(kw,{title:`复制`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(S$,{}),onClick:async()=>{let e=await m7(r);Z.success(e?`已复制`:`复制失败`)},style:{color:`#94a3b8`}})}),e.status===`prompt_optimized`&&(0,$.jsx)(kw,{title:`编辑`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)($Q,{}),onClick:()=>{x(e.id),y(t=>({...t,[e.id]:t[e.id]??e.optimizedPrompt}))},style:{color:`#6366f1`}})})]})]}),n?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(JU.TextArea,{value:r,onChange:t=>y(n=>({...n,[e.id]:t.target.value})),rows:4,style:{borderRadius:10,fontSize:13,lineHeight:1.7,border:`1px solid rgba(99,102,241,0.25)`,background:`rgba(99,102,241,0.02)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,marginTop:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>x(null),children:`取消`}),(0,$.jsx)(X,{size:`small`,type:`primary`,onClick:()=>{y(t=>({...t,[e.id]:r})),x(null),Z.success(`提示词已更新`)},style:{borderRadius:6,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`},children:`保存`})]})]}):(0,$.jsx)(`div`,{style:{padding:12,borderRadius:10,background:`rgba(99,102,241,0.02)`,border:`1px solid rgba(99,102,241,0.1)`},children:(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#1a1a2e`,lineHeight:1.7},children:r})})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,padding:`12px 16px`,borderRadius:10,background:`#f8f9fc`},children:o===`image`?[{label:`分辨率`,value:e.imageSize?`${e.imageSize} `:`-`},{label:`画面比例`,value:e.imageProportion?`${e.imageProportion} `:`-`},{label:`画面尺寸`,value:e.imagePx?`${e.imagePx} `:`-`},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost} `:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t)):[{label:`时长`,value:e.duration?`${e.duration} 秒`:`-`},{label:`画面比例`,value:e.aspectRatio||(e.status===`prompt_optimized`?`配置缺失`:`-`)},{label:`分辨率`,value:e.resolution||(e.status===`prompt_optimized`?`配置缺失`:`-`)},{label:`消耗积分`,value:e.creditsCost?`${e.creditsCost}`:`-`,highlight:!!e.creditsCost}].map((e,t)=>(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsx)(Q.Text,{style:{fontSize:11,color:`#94a3b8`,display:`block`},children:e.label}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:e.highlight?`#6366f1`:`#1a1a2e`},children:e.value})]},t))}),e.status===`prompt_optimized`&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(X6,{}),loading:i,disabled:!e.configComplete||e.canGenerate===!1,onClick:()=>T(e),style:{borderRadius:12,fontWeight:600,height:44,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 8px 24px rgba(99,102,241,0.3)`},children:o===`video`?`生成视频`:`生成图片`})}),s.isFailure&&(0,$.jsx)(`div`,{style:{marginTop:16,display:`flex`,justifyContent:`flex-end`},children:(0,$.jsxs)(X,{type:`primary`,danger:!0,size:`large`,icon:(0,$.jsx)(M6,{}),loading:i,disabled:!e.configComplete||e.canRetry===!1,onClick:()=>T(e),style:{borderRadius:12,fontWeight:600,height:44},children:[`重新生成`,o===`video`?`视频`:`图片`]})})]}),(0,$.jsx)(`div`,{style:{flex:`1 1 40%`,minWidth:240},children:s.isActive?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04))`,border:`1px dashed rgba(99,102,241,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(Ym,{style:{color:`#6366f1`,fontSize:32},spin:!0}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成中...`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`请耐心等待,生成完成后将自动展示`})]}):s.isSuccess&&(e.videoUrl||e.imageUrl)?(0,$.jsxs)(`div`,{style:{borderRadius:14,overflow:`hidden`,border:`1px solid #f0f0f5`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,right:10,zIndex:10},children:(0,$.jsx)(kw,{title:`下载${o===`video`?`视频`:`图片`}`,children:(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(F1,{}),onClick:()=>{let t=document.createElement(`a`);t.href=`https://ceshi.apiforeign.minzhongzc.com${o===`video`?e.videoUrl:e.imageUrl}&download=1`,t.download=`${e.projectName}${o===`video`?`.mp4`:`.png`}`,t.click()},style:{background:`rgba(0,0,0,0.5)`,border:`none`,color:`#fff`,backdropFilter:`blur(4px)`,borderRadius:8},children:`下载`})})}),(0,$.jsx)(`div`,{style:{minHeight:280,overflow:`hidden`},children:o===`video`?(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.videoUrl}`,controls:!0,preload:`metadata`,style:{width:`100%`,height:`400px`,display:`block`}}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.imageUrl}`,alt:e.projectName,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`,display:`block`}})}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`#fafbff`},children:[(0,$.jsxs)(yV,{children:[o===`video`?(0,$.jsx)(L8,{style:{color:`#6366f1`}}):(0,$.jsx)(C6,{style:{color:`#6366f1`}}),(0,$.jsx)(Q.Text,{style:{fontSize:13,color:`#475569`},children:e.projectName})]}),e.generatedAt&&(0,$.jsxs)(`span`,{className:`date-display`,translate:`no`,style:{fontSize:12,color:`#94a3b8`},children:[`生成于 `,l7(e.generatedAt)]})]})]}):s.isFailure?(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`rgba(239,68,68,0.03)`,border:`1px dashed rgba(239,68,68,0.2)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(F2,{style:{color:`#ef4444`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#ef4444`,fontSize:14},children:[o===`video`?`视频`:`图片`,`生成失败`]}),(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:`请在左侧点击重新生成`})]}):(0,$.jsxs)(`div`,{style:{height:`100%`,minHeight:200,borderRadius:14,background:`#f8f9fc`,border:`1px dashed #e2e8f0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:12},children:[(0,$.jsx)(bB,{style:{color:`#94a3b8`,fontSize:32}}),(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:14},children:[`待生成`,o===`video`?`视频`:`图片`]}),(0,$.jsx)(Q.Text,{style:{color:`#cbd5e1`,fontSize:12},children:`点击左侧生成按钮开始生成`})]})})]})})]},e.id)})}),t.total>0&&(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:18},children:(0,$.jsx)(PW,{current:t.page||c,pageSize:t.pageSize||u,total:t.total,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{l(e),d(t)}})})]})},Rse=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)({personalCredits:0,teamAvailableCredits:0,teamFrozenCredits:0,credits:0,nextExpiringCredits:0,nextLastUsableAt:null}),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(20);return(0,S.useEffect)(()=>{(async()=>{t(!0);try{let[e,t]=await Promise.all([d5(1,1),ose(o,c)]);r({personalCredits:Number(e.personalCredits||0),teamAvailableCredits:Number(e.teamAvailableCredits||0),teamFrozenCredits:Number(e.teamFrozenCredits||0),credits:Number(e.credits||e.availableCredits||0),nextExpiringCredits:Number(e.nextExpiringCredits||0),nextLastUsableAt:e.nextLastUsableAt||null}),a(t||[])}finally{t(!1)}})()},[o,c]),(0,$.jsxs)(tG,{spinning:e,children:[(0,$.jsx)(sq,{gutter:[16,16],style:{marginBottom:18},children:[{title:`个人可用积分`,value:n.personalCredits,icon:(0,$.jsx)(z8,{}),note:`个人积分可正常用于业务消费`},{title:`团队可用积分`,value:n.teamAvailableCredits,icon:(0,$.jsx)(S8,{}),note:`仅统计当前有效席位可消费额度`},{title:`团队冻结积分`,value:n.teamFrozenCredits,icon:(0,$.jsx)(k3,{}),note:`团队禁用期间继续发放和过期,但不可消费`},{title:`总可消费积分`,value:n.credits,icon:(0,$.jsx)(z8,{}),note:`个人积分 + 当前可用团队积分`}].map(e=>(0,$.jsx)(bR,{xs:24,sm:12,lg:6,children:(0,$.jsxs)(`div`,{style:{background:`#fff`,border:`1px solid #f0f0f5`,borderRadius:16,padding:20,minHeight:132},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,color:`#64748b`,alignItems:`center`},children:[e.icon,(0,$.jsx)(`span`,{children:e.title})]}),(0,$.jsx)(`div`,{style:{fontSize:30,fontWeight:800,color:`#1e293b`,margin:`10px 0 6px`},children:e.value.toLocaleString()}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:e.note})]})},e.title))}),n.nextExpiringCredits>0&&(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:`10px 14px`,borderRadius:10,background:`#fffbe6`,color:`#8c6d1f`},children:[`最近将有 `,n.nextExpiringCredits.toLocaleString(),` 积分到期,最后可用时间:`,n.nextLastUsableAt?d7(n.nextLastUsableAt):`-`,`。`]}),(0,$.jsx)(Q.Title,{level:5,children:`个人积分批次`}),i.length===0?(0,$.jsx)(lC,{description:`暂无个人积分批次`}):(0,$.jsx)(iQ,{rowKey:`id`,columns:[{title:`资金域`,dataIndex:`creditScopeLabel`,width:110,render:(e,t)=>(0,$.jsx)(_Q,{color:t.creditScope===`team`?`blue`:`green`,children:e||(t.creditScope===`team`?`团队积分`:`个人积分`)})},{title:`积分等级`,dataIndex:`creditLevelLabel`,width:120,render:e=>e||`-`},{title:`来源`,dataIndex:`sourceTypeLabel`,width:150,render:e=>e||`-`},{title:`发放积分`,dataIndex:`grantAmount`,width:110,align:`right`},{title:`剩余积分`,dataIndex:`unspentAmount`,width:110,align:`right`,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:Number(e||0).toLocaleString()})},{title:`状态`,dataIndex:`statusLabel`,width:100,render:e=>(0,$.jsx)(_Q,{children:e||`其他状态`})},{title:`最后可用时间`,dataIndex:`lastUsableAt`,width:190,render:e=>e?d7(e):`-`}],dataSource:i,pagination:!1,scroll:{x:900}}),(0,$.jsx)(`div`,{style:{marginTop:16,textAlign:`right`},children:(0,$.jsx)(PW,{current:o,pageSize:c,onChange:(e,t)=>{s(e),l(t)},showSizeChanger:!0,pageSizeOptions:[20,50,100]})})]})},zse=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)({records:[],total:0,credits:0,personalCredits:0,teamAvailableCredits:0,teamFrozenCredits:0,totalGranted:0,totalConsumed:0}),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10);return(0,S.useEffect)(()=>{(async()=>{t(!0);try{r(await d5(i,o))}finally{t(!1)}})()},[i,o]),(0,$.jsxs)(tG,{spinning:e,children:[(0,$.jsx)(sq,{gutter:[12,12],style:{marginBottom:20},children:[[`总可消费积分`,Number(n.credits||0),(0,$.jsx)(z8,{})],[`个人可用积分`,Number(n.personalCredits||0),(0,$.jsx)(z8,{})],[`团队可用积分`,Number(n.teamAvailableCredits||0),(0,$.jsx)(S8,{})],[`团队冻结积分`,Number(n.teamFrozenCredits||0),(0,$.jsx)(k3,{})]].map(([e,t,n])=>(0,$.jsx)(bR,{xs:12,lg:6,children:(0,$.jsxs)(`div`,{style:{border:`1px solid #f0f0f5`,background:`#fff`,padding:18,borderRadius:14},children:[(0,$.jsxs)(`div`,{style:{color:`#64748b`},children:[n,` `,e]}),(0,$.jsx)(`div`,{style:{fontSize:26,fontWeight:800,marginTop:8},children:Number(t).toLocaleString()})]})},e))}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:10},children:[(0,$.jsxs)(Q.Title,{level:5,style:{margin:0},children:[(0,$.jsx)(w8,{}),` 积分流水`]}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`},children:[`累计获得 `,Number(n.totalGranted||0).toLocaleString(),` · 累计消耗 `,Number(n.totalConsumed||0).toLocaleString()]})]}),(n.records||[]).length===0?(0,$.jsx)(lC,{description:`暂无积分变动记录`}):(0,$.jsx)(iQ,{rowKey:`id`,columns:[{title:`类型`,dataIndex:`typeLabel`,width:110,render:(e,t)=>(0,$.jsx)(_Q,{children:e||{recharge:`发放/充值`,consume:`消费`,refund:`业务退款`,expire:`积分过期`,revoke:`积分撤销`,team_internal:`历史团队流转`}[t.type]||`其他`})},{title:`说明`,dataIndex:`description`,ellipsis:!0},{title:`总变动`,dataIndex:`amount`,width:110,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:Number(e)<0?`#ef4444`:`#10b981`},children:[Number(e)>0?`+`:``,Number(e||0)]})},{title:`个人积分`,dataIndex:`personalAmount`,width:110,align:`right`,render:e=>Number(e||0)===0?`-`:Number(e||0)},{title:`团队积分`,dataIndex:`teamAmount`,width:110,align:`right`,render:e=>Number(e||0)===0?`-`:Number(e||0)},{title:`业务场景`,dataIndex:`billingSceneLabel`,width:140,render:e=>e||`-`},{title:`Token`,dataIndex:`totalTokens`,width:100,align:`right`,render:e=>e==null?`-`:Number(e).toLocaleString()},{title:`时间`,dataIndex:`createdAt`,width:180,render:e=>e?new Date(e).toLocaleString(`zh-CN`,{hour12:!1}):`-`}],dataSource:n.records||[],pagination:!1,scroll:{x:1050}}),(0,$.jsx)(`div`,{style:{marginTop:16,textAlign:`right`},children:(0,$.jsx)(PW,{current:i,pageSize:o,total:Number(n.total||0),onChange:(e,t)=>{a(e),s(t)}})})]})},Bse={alipay:`支付宝`,wechat:`微信支付`,bank_transfer:`银行转账`,cash:`现金`,other:`其他-线下收款`},Vse={online_payment:`线上支付`,admin_offline:`后台线下成交`},j7={pending:`待支付`,paid:`已支付`,fulfilled:`已履约`,refunded:`已退款`,cancelled:`已取消`,expired:`已过期`,failed:`失败`,processing:`处理中`},Hse=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(1),[c,l]=(0,S.useState)(10),[u,d]=(0,S.useState)(),[f,p]=(0,S.useState)([null,null]),m=(0,S.useCallback)(async()=>{t(!0);try{let e=await y5(o,c,{statusFilter:u,startDate:f[0]?.format?.(`YYYY-MM-DD`),endDate:f[1]?.format?.(`YYYY-MM-DD`)});r(e.items||[]),a(Number(e.total||0))}finally{t(!1)}},[o,c,u,f]);return(0,S.useEffect)(()=>{m()},[m]),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,marginBottom:14},children:[(0,$.jsx)(wV,{}),(0,$.jsx)(Q.Title,{level:5,style:{margin:0},children:`订单记录`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`线下售后订单同样在此只读展示`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:16,flexWrap:`wrap`},children:[(0,$.jsx)(zC,{allowClear:!0,placeholder:`订单状态`,style:{width:140},value:u,onChange:e=>{d(e),s(1)},options:Object.entries(j7).filter(([e])=>[`pending`,`paid`,`refunded`,`cancelled`,`expired`,`failed`].includes(e)).map(([e,t])=>({value:e,label:t}))}),(0,$.jsx)(DB.RangePicker,{value:f,onChange:e=>{p(e||[null,null]),s(1)},placeholder:[`开始日期`,`结束日期`]})]}),(0,$.jsx)(tG,{spinning:e,children:n.length===0?(0,$.jsx)(lC,{description:`暂无订单记录`}):(0,$.jsx)(iQ,{rowKey:`id`,columns:[{title:`订单号`,dataIndex:`orderNo`,width:210,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,code:!0,children:e})},{title:`订单来源`,dataIndex:`orderSource`,width:120,render:(e,t)=>(0,$.jsx)(_Q,{color:e===`admin_offline`?`purple`:`blue`,children:t.orderSourceLabel||Vse[e]||`其他来源`})},{title:`商品`,dataIndex:`productNameSnapshot`,width:180,ellipsis:!0,render:(e,t)=>(0,$.jsxs)(`span`,{children:[e||`-`,Number(t.quantity||1)>1?` × ${t.quantity}`:``]})},{title:`支付方式`,dataIndex:`paymentMethod`,width:125,render:(e,t)=>t.paymentMethodLabel||(e===`other`&&t.offlinePaymentDetail?t.offlinePaymentDetail:Bse[e])||`其他支付方式`},{title:`实际金额`,dataIndex:`amount`,width:110,align:`right`,render:e=>`¥${Number(e||0).toFixed(2)}`},{title:`状态`,dataIndex:`status`,width:100,render:(e,t)=>(0,$.jsx)(_Q,{children:t.statusLabel||j7[e]||`其他状态`})},{title:`创建时间`,dataIndex:`createdAt`,width:180,render:e=>e?new Date(e).toLocaleString(`zh-CN`,{hour12:!1}):`-`},{title:`支付时间`,dataIndex:`paidAt`,width:180,render:e=>e?new Date(e).toLocaleString(`zh-CN`,{hour12:!1}):`-`}],dataSource:n,pagination:!1,scroll:{x:1150}})}),(0,$.jsx)(`div`,{style:{marginTop:16,textAlign:`right`},children:(0,$.jsx)(PW,{current:o,pageSize:c,total:i,showSizeChanger:!0,onChange:(e,t)=>{s(e),l(t)}})})]})},Use=()=>{let[e,t]=(0,S.useState)(!0),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)(1),[u]=(0,S.useState)(10);(0,S.useEffect)(()=>{d(),f()},[c]);let d=async()=>{t(!0);try{let e=await m5(c,u);r(e.items||[]),s(e.total||0)}catch{r([])}t(!1)},f=async()=>{try{a(await h5())}catch{a(0)}},p=async e=>{try{await g5(e),d(),f()}catch{}};return(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(d2,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消息中心`}),(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:[`未读 `,i,` 条`]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:(0,$.jsx)(tG,{spinning:e,children:n.length===0?(0,$.jsx)(lC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无消息`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(iQ,{dataSource:n,columns:[{title:`类型`,dataIndex:`type`,key:`type`,width:100,render:e=>{let t={system:{color:`#6366f1`,label:`系统`,bg:`rgba(99,102,241,0.1)`,icon:(0,$.jsx)(o8,{style:{fontSize:14}})},credit:{color:`#f59e0b`,label:`积分`,bg:`rgba(245,158,11,0.1)`,icon:(0,$.jsx)(z8,{style:{fontSize:14}})},promo:{color:`#8b5cf6`,label:`活动`,bg:`rgba(139,92,246,0.1)`,icon:(0,$.jsx)(X4,{style:{fontSize:14}})}},n=t[e]||t.system;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:n.color},children:n.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:n.color,fontWeight:500},children:n.label})]})}},{title:`标题`,dataIndex:`title`,key:`title`,ellipsis:!0},{title:`内容`,dataIndex:`content`,key:`content`,ellipsis:!0,render:e=>(0,$.jsx)(`div`,{style:{maxWidth:300},dangerouslySetInnerHTML:{__html:e}})},{title:`状态`,dataIndex:`isRead`,key:`isRead`,width:80,render:(e,t)=>e??t.is_read?(0,$.jsx)(_Q,{color:`gray`,style:{background:`rgba(148,163,184,0.1)`},children:`已读`}):(0,$.jsx)(_Q,{color:`purple`,style:{background:`rgba(139,92,246,0.1)`},children:`未读`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>{if(!e)return`-`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/(1e3*60*60));if(r<1)return`刚刚`;if(r<24)return`${r}小时前`;let i=Math.floor(r/24);return i<7?`${i}天前`:t.toLocaleDateString(`zh-CN`)}},{title:`操作`,key:`action`,width:100,render:(e,t)=>t.isRead??t.is_read?null:(0,$.jsx)(X,{type:`text`,size:`small`,onClick:()=>p(t.id),style:{color:`#6366f1`},children:`标记已读`})}],rowKey:`id`,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(PW,{current:c,pageSize:u,total:o,onChange:e=>{l(e)},size:`small`})})]})})})]})})},M7=()=>{let[e]=On(),[t,n]=(0,S.useState)(`credits`);return(0,S.useEffect)(()=>{(e.get(`tab`)||`credits`)===`orders`?n(`orders`):n(`credits`)},[e]),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(hL,{activeKey:t,onChange:n,items:[{key:`credits`,label:`积分明细`},{key:`orders`,label:`订单记录`}],style:{marginBottom:24},size:`large`}),t===`credits`&&(0,$.jsx)(zse,{}),t===`orders`&&(0,$.jsx)(Hse,{})]})};function N7(e){return`/static/${e.startsWith(`/`)?e.slice(1):e}&w=300&q=50`}var Wse=(e,t)=>e<=1?6:e===2||e===4||e===3?3:2,Gse=e=>O7(e).label,Kse=300,qse=.6,Jse=e=>{let t=Math.sin(e*9999)*1e4;return t-Math.floor(t)},P7=(e,t=0)=>{if(!e)return 0;let n=new Date(e).getTime();if(isNaN(n))return 0;let r=Math.max(0,(Date.now()-n)/1e3);if(r>=Kse)return 99;let i=Math.min(99,r*qse),a=t*3+Jse(t+1)*8;return i=Math.max(0,i-a),i},Yse=({item:e,isPending:t,isCompleted:n,onAnimationComplete:r,index:i=0})=>{let[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),l=(0,S.useRef)(null);return(0,S.useEffect)(()=>{s||o(P7(e.createdAt,i))},[e,i,s]),(0,S.useEffect)(()=>{if(n&&!s){c(!0);return}if(!t&&!s){l.current&&=(clearInterval(l.current),null);return}return l.current=window.setInterval(()=>{s||o(P7(e.createdAt,i))},1e3),()=>{l.current&&=(clearInterval(l.current),null)}},[e.createdAt,t,n,s,e.id,i]),(0,S.useEffect)(()=>{if(s){let e=a,t=Date.now(),n=()=>{let i=Date.now()-t,a=Math.min(i/800,1),s=1-(1-a)**3;o(e+(100-e)*s),a<1?requestAnimationFrame(n):setTimeout(()=>{r?.()},100)};requestAnimationFrame(n)}},[s,a,r]),!t&&!s?null:(0,$.jsx)(`div`,{style:{marginTop:4},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,fontSize:13,color:`#8b5cf6`,fontWeight:700,textShadow:`0 0 8px rgba(139, 92, 246, 0.3)`,transition:`all 0.3s ease-out`},children:[Math.round(a),`%`]})})},Xse=({task:e,onPreview:t,resolveUrl:n=e=>e||``})=>{let r=Math.max(1,Math.min(5,Number(e.generationCount||e.childItems?.length||1))),i=[...e.childItems||[]].sort((e,t)=>Number(e.generationIndex||0)-Number(t.generationIndex||0)),a=i.length>0?i:r>1?Array.from({length:r},(t,n)=>({id:`${e.id||`task`}-placeholder-${n+1}`,genType:e.genType,status:e.status,displayStatus:e.displayStatus,pipelineStage:e.pipelineStage,generationIndex:n+1,errorMessage:e.errorMessage,createdAt:e.createdAt})):[e],[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=`gen-task-resource-grid-animations`;if(document.getElementById(e))return;let t=document.createElement(`style`);t.id=e,t.textContent=` .gen-task-loading-bg { position: relative; overflow: hidden; @@ -511,11 +511,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho 75% { transform: translate(100px, -20px); } 100% { transform: translate(60px, -40px); } } - `,document.head.appendChild(t)},[]),(0,S.useEffect)(()=>{a.slice(0,5).forEach((e,t)=>{let n=k7(e),r=n.isActive,i=n.isSuccess,a=e.id||`${t}`;i&&!c.current.has(a)&&r===!1&&(c.current.add(a),s(e=>{let t=new Set(e);return t.add(a),t}))})},[a]);let l=e=>{s(t=>{let n=new Set(t);return n.delete(e),n})};return(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`grid`,gridTemplateColumns:`repeat(6, minmax(0, 1fr))`,gridAutoRows:`minmax(0, 1fr)`,gap:r>1?6:0},children:a.slice(0,5).map((r,i)=>{let s=k7(r),c=s.effectiveKey,u=r.imageUrl?n(P7(r.imageUrl)):``,d=n(r.videoUrl),f=r.videoCoverUrl?n(P7(r.videoCoverUrl)):``,p=(r.genType||e.genType)===`video`,m=p?!!d:!!u,h=s.isActive,g=s.isSuccess,_=r.id||`${i}`,v=o.has(_),y=g&&!v,b=v?`加载中`:Wse(r);return(0,$.jsxs)(`div`,{style:{gridColumn:`span ${Use(a.length,i)}`,minWidth:0,minHeight:0,position:`relative`,overflow:`hidden`,borderRadius:a.length===1?12:8,background:`#ffffff`,border:`1px solid #E7EAF0`},children:[m&&s.isSuccess&&y?(0,$.jsxs)(`button`,{type:`button`,onClick:()=>t(p?d:u,p?`video`:`image`),style:{width:`100%`,height:`100%`,border:0,padding:0,background:`transparent`,cursor:`pointer`,position:`relative`},children:[p?f?(0,$.jsx)(`img`,{src:f,alt:`生成结果${r.generationIndex||i+1}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`video`,{src:d,muted:!0,preload:`metadata`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:u,alt:`生成结果${r.generationIndex||i+1}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}),p?(0,$.jsx)(A6,{style:{position:`absolute`,left:`50%`,top:`50%`,transform:`translate(-50%, -50%)`,fontSize:a.length>2?28:46,color:`rgba(255,255,255,.92)`,filter:`drop-shadow(0 4px 10px rgba(0,0,0,.28))`}}):null]}):(0,$.jsxs)(`div`,{className:h||v?`gen-task-loading-bg`:``,style:{width:`100%`,height:`100%`,minHeight:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:7,padding:8,textAlign:`center`},children:[h||v?(0,$.jsx)(`span`,{className:`gen-task-aurora-3`}):null,h||v?(0,$.jsx)(Xm,{spin:!0,style:{color:`#8b5cf6`,fontSize:a.length>2?20:34}}):(0,$.jsx)(Vie,{style:{color:c===`deleted`?`#98A2B3`:`#A45B5B`,fontSize:a.length>2?20:34}}),(0,$.jsx)(`span`,{style:{fontSize:a.length>2?10:12,color:h||v?`#8b5cf6`:c===`deleted`?`#98A2B3`:`#A45B5B`,fontWeight:500},children:b}),(0,$.jsx)(Jse,{item:r,isPending:h||v,isCompleted:g,onAnimationComplete:()=>l(_),index:r.generationIndex||i}),!h&&r.errorMessage&&a.length<=2?(0,$.jsx)(`span`,{style:{fontSize:10,color:`#A45B5B`,lineHeight:1.3,maxHeight:28,overflow:`hidden`},children:r.errorMessage}):null]}),a.length>1?(0,$.jsxs)(`span`,{style:{position:`absolute`,top:5,left:5,zIndex:2,padding:`1px 6px`,borderRadius:10,background:`rgba(17,24,39,.58)`,color:`#fff`,fontSize:10},children:[`#`,r.generationIndex||i+1]}):null]},r.id||`${i}`)})})},{Text:I7}=Q,Xse=({items:e,selectedId:t,onSelect:n})=>e.length?(0,$.jsx)(bV,{orientation:`vertical`,style:{width:`100%`},size:10,children:e.map(e=>{let r=t===e.id;return(0,$.jsxs)(`div`,{onClick:()=>n(e),style:{padding:14,borderRadius:14,cursor:`pointer`,border:r?`1px solid #8b5cf6`:`1px solid #e2e8f0`,background:r?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(bV,{style:{width:`100%`,justifyContent:`space-between`},align:`start`,children:(0,$.jsxs)(`div`,{style:{minWidth:0},children:[(0,$.jsx)(I7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),e.description&&(0,$.jsx)(I7,{type:`secondary`,ellipsis:!0,style:{display:`block`,fontSize:12},children:e.description})]})}),(0,$.jsxs)(bV,{wrap:!0,size:4,style:{marginTop:10},children:[(0,$.jsxs)(vQ,{children:[`总 `,e.assetCount||0]}),(0,$.jsxs)(vQ,{color:`green`,children:[`图 `,e.imageAssetCount||0]}),(0,$.jsxs)(vQ,{color:`blue`,children:[`视频 `,e.videoAssetCount||0]})]})]},e.id)})}):(0,$.jsx)(dC,{description:`暂无项目组`}),Zse={Active:`green`,Processing:`processing`,Failed:`red`,local_deleted:`default`,remote_deleted:`default`,delete_failed:`red`},Qse={Active:`入库成功`,Processing:`入库处理中`,Failed:`入库失败`,local_deleted:`本地已删除`,remote_deleted:`远程已删除`,delete_failed:`删除失败`},L7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,R7=e=>e.assetType===`Video`?L7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.remoteUrl||e.sourceUrl):L7(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.remoteUrl||e.sourceUrl),$se=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},ece=({items:e,onDelete:t,onRefresh:n})=>{let r=(0,S.useRef)(null),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(`Image`);(0,S.useEffect)(()=>(e.some(e=>e.status!==`Failed`&&e.status!==`Active`)&&n?r.current||=window.setInterval(()=>{n()},3e3):r.current&&=(clearInterval(r.current),null),()=>{r.current&&=(clearInterval(r.current),null)}),[e,n]);let u=e=>{let t=R7(e);t&&(s(t),l(e.assetType===`Video`?`Video`:`Image`),a(!0))};return e.length?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`,gap:14},children:e.map(e=>{let n=e.assetType===`Video`,r=R7(e);return(0,$.jsx)(vL,{hoverable:!0,bodyStyle:{padding:12},style:{borderRadius:16,overflow:`hidden`,borderColor:`#eef2f7`},cover:(0,$.jsxs)(`div`,{style:{height:170,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[r?n&&e.videoCoverUrl?(0,$.jsx)(`img`,{src:r,alt:e.name||`视频封面`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(`video`,{src:r,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:r,alt:e.name||``,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(R8,{style:{fontSize:42,color:`#64748b`}}):(0,$.jsx)(w6,{style:{fontSize:42,color:`#64748b`}}),n&&(0,$.jsx)(vQ,{color:`blue`,style:{position:`absolute`,left:10,top:10},children:`视频`}),r&&(0,$.jsx)(X,{size:`small`,shape:`circle`,icon:(0,$.jsx)(DU,{}),style:{position:`absolute`,right:10,top:10},onClick:()=>u(e)}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:10,bottom:10,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:$se(e.videoDuration)})]}),children:(0,$.jsxs)(bV,{direction:`vertical`,size:8,style:{width:`100%`},children:[(0,$.jsx)(jw,{title:e.name||e.remoteAssetId||e.id,children:(0,$.jsx)(`div`,{style:{fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name||e.remoteAssetId||`未命名素材`})}),(0,$.jsxs)(bV,{wrap:!0,size:4,children:[(0,$.jsx)(vQ,{color:Zse[e.status]||`default`,children:Qse[e.status]||e.status}),(0,$.jsx)(vQ,{color:n?`blue`:`default`,children:n?`视频`:`图片`})]}),(0,$.jsx)(bV,{size:6,wrap:!0,children:(0,$.jsx)(jG,{title:`确认删除这个素材吗?`,onConfirm:()=>t(e.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(MQ,{}),children:`删除`})})})]})},e.id)})}),(0,$.jsx)(DG,{title:`素材预览`,open:i,onCancel:()=>a(!1),footer:null,width:760,destroyOnClose:!0,children:(0,$.jsx)(`div`,{style:{minHeight:420,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#0f172a`,borderRadius:12,overflow:`hidden`},children:c===`Video`?(0,$.jsx)(`video`,{src:o,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:520}}):(0,$.jsx)(`img`,{src:o,alt:`素材预览`,style:{maxWidth:`100%`,maxHeight:520,objectFit:`contain`}})})})]}):(0,$.jsx)(dC,{description:`暂无素材`})},z7=(0,S.createContext)(void 0),tce=({children:e,refreshConfig:t})=>(0,$.jsx)(z7.Provider,{value:{refreshConfig:t},children:e}),B7=()=>{let e=(0,S.useContext)(z7);if(!e)throw Error(`useLibrary must be used within a LibraryProvider`);return e},V7=2,H7=15,nce=e=>new Promise(t=>{if(!e.type.startsWith(`video/`)){t(null);return}let n=URL.createObjectURL(e),r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{let e=Number.isFinite(r.duration)?r.duration:null;URL.revokeObjectURL(n),t(e)},r.onerror=()=>{URL.revokeObjectURL(n),t(null)},r.src=n}),rce=e=>e==null||!Number.isFinite(e)||e<=0?(Z.error(`无法读取视频秒数,请检查视频文件是否损坏`),!1):eH7?(Z.error(`视频素材最长不能超过 ${H7} 秒`),!1):!0,ice=({projectId:e,open:t,onClose:n,onSuccess:r})=>{let{refreshConfig:i}=B7(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)({}),[l,u]=(0,S.useState)({}),[d,f]=(0,S.useState)({}),[p,m]=(0,S.useState)({}),[h,g]=(0,S.useState)(!1),_=()=>{o([]),c({}),u({}),f({}),m({})};return(0,$.jsx)(DG,{title:`上传真人素材`,open:t,onCancel:()=>{_(),n()},onOk:async()=>{let t=a.filter(e=>l[e.uid]===`uploaded`);if(t.length===0){Z.warning(`请等待文件上传完成后再提交入库`);return}g(!0);try{for(let n of t){let t=n.originFileObj;if(!t)continue;let r=d[n.uid];if(!r)continue;m(e=>({...e,[n.uid]:`importing`}));let i=t.type.startsWith(`image/`)?`Image`:`Video`;await koe(e,{url:r.url,assetType:i,name:s[n.uid]?.trim()||t.name,videoDuration:r.duration_seconds,fileSize:r.file_size_bytes??t.size,mimeType:t.type||null,uploadResourceId:r.resource_id||null}),m(e=>({...e,[n.uid]:`imported`}))}Z.success(`已成功提交 ${t.length} 个素材入库,处理中`),i(),setTimeout(()=>{_(),r(),n()},1500)}catch(e){Z.error(e?.message||`提交入库失败`)}finally{g(!1)}},confirmLoading:h,okText:`提交入库`,destroyOnHidden:!0,width:650,okButtonProps:{disabled:a.length===0||a.some(e=>l[e.uid]!==`uploaded`)},children:(0,$.jsx)(`div`,{style:{maxHeight:600,overflow:`auto`,marginTop:30},children:(0,$.jsxs)(bV,{direction:`vertical`,style:{width:`100%`},size:14,children:[(0,$.jsx)(H1,{accept:`image/*,video/*`,fileList:a,multiple:!0,beforeUpload:async e=>{let t=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,n=e.type.startsWith(`image/`),r=URL.createObjectURL(e),i={uid:t,name:e.name,status:`uploading`,originFileObj:e,thumbUrl:r,type:e.type};o(e=>[...e,i]),c(e=>({...e,[t]:``})),u(e=>({...e,[t]:`uploading`}));try{let r=n?`Image`:`Video`,i=r===`Video`?await nce(e):null;if(r===`Video`&&!rce(i))return u(e=>({...e,[t]:`error`})),!1;let a=r===`Video`?await pae(e,i||void 0):await fae(e);f(e=>({...e,[t]:{url:a.url,duration_seconds:a.duration_seconds,file_size_bytes:a.file_size_bytes,resource_id:a.resource_id}})),u(e=>({...e,[t]:`uploaded`}))}catch{u(e=>({...e,[t]:`error`})),Z.error(`文件 ${e.name} 上传失败`)}return!1},listType:`picture`,itemRender:(e,t,n)=>{let r=t.type?.startsWith(`video/`)||t.name.match(/\.(mp4|mov|avi|webm)$/i),i=l[t.uid],a=p[t.uid];return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:12,border:`1px solid #e5e7eb`,borderRadius:8,marginBottom:8},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:8,overflow:`hidden`,flexShrink:0},children:t.thumbUrl||t.url?r?(0,$.jsx)(`video`,{src:t.thumbUrl||t.url,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:t.thumbUrl||t.url,alt:t.name,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#f1f5f9`},children:r?(0,$.jsx)(R8,{style:{color:`#94a3b8`,fontSize:20}}):(0,$.jsx)(w6,{style:{color:`#94a3b8`,fontSize:20}})})}),(0,$.jsx)(`span`,{style:{width:`20%`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,fontSize:13,color:`#64748b`,flexShrink:0},children:t.name}),(0,$.jsx)(YU,{style:{width:200,flexShrink:0},value:s[t.uid]||``,onChange:e=>c({...s,[t.uid]:e.target.value}),placeholder:`素材名称,默认使用文件名`,maxLength:256}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[i===`uploading`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(nG,{size:`small`,style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`},children:`上传中`})]}),i===`uploaded`&&!a&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#10b981`},children:`✓ 上传完成`}),i===`error`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`},children:`✗ 上传失败`}),a===`importing`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(nG,{size:`small`,style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`},children:`入库中`})]}),a===`imported`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#10b981`},children:`✓ 已入库校验`}),a===`error`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`},children:`✗ 入库失败`})]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),o(e=>e.filter(e=>e.uid!==t.uid)),c(e=>{let n={...e};return delete n[t.uid],n}),u(e=>{let n={...e};return delete n[t.uid],n}),f(e=>{let n={...e};return delete n[t.uid],n}),m(e=>{let n={...e};return delete n[t.uid],n})},style:{width:28,height:28,borderRadius:`50%`,backgroundColor:`#f1f5f9`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(MQ,{style:{color:`#64748b`,fontSize:14}})})]})},children:(0,$.jsx)(X,{icon:(0,$.jsx)(M8,{}),children:`选择图片或视频`})}),(0,$.jsxs)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:12,color:`#64748b`,fontSize:13},children:[`当前开放图片和视频,音频暂不接入。视频素材必须在 `,V7,`~`,H7,` 秒内;入库后会经过火山真人一致性校验,入库校验成功 后才可用于 AI 创作。`]})]})})})},ace=({project:e,onDeleted:t,onChanged:n})=>{let{refreshConfig:r}=B7(),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(),[m,h]=(0,S.useState)(),[g,_]=(0,S.useState)(1),[v,y]=(0,S.useState)(20),[b,x]=(0,S.useState)(0),C=async(t=g,n=v)=>{s(!0);try{let r=await Aoe(e.id,{page:t,pageSize:n,keyword:u,status:f,assetType:m});a(r.items),x(r.total||0),_(t),y(n)}catch(e){Z.error(e?.message||`加载素材失败`)}finally{s(!1)}};(0,S.useEffect)(()=>{C(1,v)},[e.id,u,f,m]);let w=async e=>{try{await joe(e),await C(g,v),n(),r(),Z.success(`素材已删除`)}catch(e){Z.error(e?.message||`删除素材失败`)}},T=async()=>{try{await Doe(e.id),Z.success(`项目组已删除`),t()}catch(e){Z.error(e?.message||`删除项目组失败`)}},E=e.status===`active`;return(0,$.jsxs)(vL,{title:(0,$.jsx)(bV,{children:(0,$.jsx)(`span`,{children:e.name})}),extra:(0,$.jsxs)(bV,{children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M8,{}),disabled:!E,onClick:()=>l(!0),children:`上传素材`}),(0,$.jsx)(jG,{title:`确认删除这个真人素材项目组吗?`,onConfirm:T,children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(MQ,{}),children:`删除项目组`})})]}),style:{borderRadius:16},children:[!E&&(0,$.jsx)(Q.Paragraph,{style:{color:`#f97316`},children:`项目组未完成真人认证,暂不能上传素材。请重新创建项目组并完成手机扫码认证。`}),(0,$.jsxs)(bV,{style:{width:`100%`,marginBottom:16},wrap:!0,children:[(0,$.jsx)(YU.Search,{allowClear:!0,placeholder:`搜索素材名称`,value:u,onChange:e=>d(e.target.value),onSearch:()=>C(1,v),style:{width:240}}),(0,$.jsx)(VC,{allowClear:!0,placeholder:`素材状态`,value:f,onChange:e=>p(e),style:{width:150},options:[{value:`Processing`,label:`处理中`},{value:`Active`,label:`可用`},{value:`Failed`,label:`失败`}]}),(0,$.jsx)(VC,{allowClear:!0,placeholder:`素材类型`,value:m,onChange:e=>h(e),style:{width:130},options:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{onClick:()=>C(1,v),children:`筛选`})]}),(0,$.jsx)(nG,{spinning:o,children:i.length===0?(0,$.jsx)(dC,{description:`暂无素材,上传图片/视频后会异步入库`,style:{marginTop:80}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ece,{items:i,loading:o,onDelete:w,onRefresh:()=>C(g,v)}),(0,$.jsx)(`div`,{style:{textAlign:`right`,marginTop:16},children:(0,$.jsx)(FW,{current:g,pageSize:v,total:b,showSizeChanger:!0,showTotal:e=>`共 ${e} 个素材`,onChange:(e,t)=>C(e,t)})})]})}),(0,$.jsx)(ice,{projectId:e.id,open:c,onClose:()=>l(!1),onSuccess:()=>{C(1,v),n()}})]})},U7=`group_active`,W7=2e3,oce=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),[g]=mH.useForm(),_=(0,S.useRef)(null),v=()=>{_.current&&=(window.clearInterval(_.current),null)},y=()=>{v(),s(!1),l(!1),h(!1),d(null),p(null),g.resetFields()},b=async()=>{a(!0);try{let e=await X5({pageSize:100,status:`active`});t(e.items),r(t=>t?e.items.find(e=>e.id===t.id)||e.items[0]||null:e.items[0]||null)}catch(e){Z.error(e?.message||`加载真人素材项目组失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]),(0,S.useEffect)(()=>()=>v(),[]);let x=async e=>{v(),h(!1),Z.success(`真人认证完成,项目组已创建成功`),s(!1),p(null),d(null),g.resetFields();let n=await X5({pageSize:100,status:`active`});t(n.items),r(n.items.find(t=>t.id===e)||n.items[0]||null)},C=(e,t,n)=>{v(),h(!0);let r=async()=>{try{let n=await Ooe(e);if(p(n),n.status===U7){await x(t);return}[`callback_failed`,`failed`,`expired`].includes(n.status)&&(v(),h(!1),Z.error(n.errorMessage||`真人认证未完成,请重新创建项目组`))}catch(e){v(),h(!1),Z.error(e?.message||`轮询真人认证状态失败`)}};_.current=window.setInterval(r,Math.max(1e3,n||W7)),r()},w=async()=>{let e=await g.validateFields();l(!0);try{let t=`${window.location.origin}/private-portrait-authorized`,n=await Eoe({...e,callbackRedirectUrl:t});d(n.project),p(n.validateSession),Z.success(`请使用手机扫码完成人脸认证`),n.validateSession?.id&&C(n.validateSession.id,n.project.id,n.pollIntervalMs||W7)}catch(e){Z.error(e?.message||`创建项目组认证二维码失败`)}finally{l(!1)}},T=f?.h5Link||``,E=f?.status===U7;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`真人素材库`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`创建项目组时先完成真人认证,认证成功后项目组才会正式创建并可上传素材。`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(VI,{}),onClick:()=>s(!0),style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`创建项目组`})]}),(0,$.jsxs)(cq,{gutter:16,children:[(0,$.jsx)(xR,{xs:24,lg:5,children:(0,$.jsx)(vL,{style:{borderRadius:16,minHeight:520},children:(0,$.jsx)(nG,{spinning:i,children:e.length===0?(0,$.jsx)(dC,{description:`暂无真人项目组`}):(0,$.jsx)(Xse,{items:e,selectedId:n?.id,onSelect:r})})})}),(0,$.jsx)(xR,{xs:24,lg:19,children:n?(0,$.jsx)(ace,{project:n,onDeleted:()=>{r(null),b()},onChanged:b}):(0,$.jsx)(vL,{style:{borderRadius:16,minHeight:520,textAlign:`center`,color:`#94a3b8`},children:`请先创建或选择一个真人素材项目组`})})]}),(0,$.jsx)(DG,{title:`新建真人素材项目组`,open:o,onCancel:y,footer:f?[(0,$.jsx)(X,{onClick:y,children:`关闭`},`close`)]:void 0,onOk:f?void 0:w,okText:`开始认证并创建`,confirmLoading:c,mask:{closable:!m},children:f?(0,$.jsxs)(bV,{direction:`vertical`,align:`center`,size:16,style:{width:`100%`},children:[E?(0,$.jsx)(N2,{style:{fontSize:54,color:`#22c55e`}}):T?(0,$.jsx)(HK,{value:T,size:220}):(0,$.jsx)(nG,{}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Title,{level:5,style:{marginBottom:8},children:u?.name||`真人素材项目组`}),(0,$.jsx)(Q.Text,{type:E?`success`:`secondary`,children:E?`认证成功,项目组正在刷新`:`请使用手机扫码完成人脸认证,成功后回到电脑端查看项目组。`})]})]}):(0,$.jsxs)(mH,{form:g,layout:`vertical`,children:[(0,$.jsx)(mH.Item,{label:`项目组名称`,name:`name`,rules:[{required:!0,message:`请输入项目组名称`}],children:(0,$.jsx)(YU,{placeholder:`例如:达人A、客户B、张三人像`})}),(0,$.jsx)(mH.Item,{label:`描述`,name:`description`,children:(0,$.jsx)(YU.TextArea,{rows:3,placeholder:`可选`})}),(0,$.jsx)(Q.Paragraph,{type:`secondary`,style:{marginBottom:0},children:`点击后会生成真人认证二维码。手机扫码认证成功后,项目组才会出现在项目列表中。`})]})})]})},{Text:G7}=Q,K7=2,q7=15,sce={creating:{label:`本地创建中`,color:`processing`},Processing:{label:`入库处理中`,color:`processing`},Active:{label:`入库成功`,color:`success`},Failed:{label:`入库失败`,color:`error`},local_deleted:{label:`本地已删`,color:`default`},remote_deleted:{label:`远端已删`,color:`default`},delete_failed:{label:`远端删除失败`,color:`error`}},cce=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},J7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,Y7=e=>e.assetType===`Video`?J7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.remoteUrl||e.sourceUrl):J7(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.remoteUrl||e.sourceUrl),lce=e=>new Promise(t=>{if(!e.type.startsWith(`video/`)){t(null);return}let n=URL.createObjectURL(e),r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{let e=Number.isFinite(r.duration)?r.duration:null;URL.revokeObjectURL(n),t(e)},r.onerror=()=>{URL.revokeObjectURL(n),t(null)},r.src=n}),uce=(e,t)=>e==null||!Number.isFinite(e)||e<=0?(t(`无法读取视频秒数,请检查视频文件是否损坏`),!1):eq7?(t(`视频素材最长不能超过 ${q7} 秒`),!1):!0,dce=({status:e})=>{let t=e||`-`,n=sce[t];return(0,$.jsx)(vQ,{color:n?.color||`default`,children:n?.label||t})},fce=()=>{let{message:e}=nx.useApp(),{refreshConfig:t}=B7(),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(20),[g,_]=(0,S.useState)(0),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(),[C,w]=(0,S.useState)(),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)([]),[F,I]=(0,S.useState)({}),[L,R]=(0,S.useState)({}),[z,B]=(0,S.useState)({}),[V,H]=(0,S.useState)({}),[U,ee]=(0,S.useState)(!1),[W,te]=(0,S.useState)(``),[G,ne]=(0,S.useState)(`Image`),[K]=mH.useForm(),re=(0,S.useRef)(null),ie=(0,S.useMemo)(()=>n.find(e=>e.id===i)||null,[n,i]),ae=async()=>{l(!0);try{let e=(await Q5({page:1,pageSize:100,status:`active`})).items||[];r(e),a(t=>t&&e.some(e=>e.id===t)?t:e[0]?.id)}catch(t){e.error(t?.message||`加载虚拟人像项目组失败`)}finally{l(!1)}},q=async(t=f,n=m)=>{if(!i){s([]),_(0);return}d(!0);try{let e=await Ioe(i,{page:t,pageSize:n,keyword:v.trim()||void 0,status:b,assetType:C});s(e.items||[]),_(e.total||0),p(t),h(n)}catch(t){e.error(t?.message||`加载虚拟人像素材失败`)}finally{d(!1)}},oe=async()=>{await ae()};(0,S.useEffect)(()=>{oe()},[]),(0,S.useEffect)(()=>{i&&q(1,m)},[i]),(0,S.useEffect)(()=>(o.some(e=>e.status!==`Failed`&&e.status!==`Active`)&&i?re.current||=window.setInterval(()=>{q(f,m)},3e3):re.current&&=(clearInterval(re.current),null),()=>{re.current&&=(clearInterval(re.current),null)}),[o,i,f,m]);let se=async()=>{let t=await K.validateFields();O(!0);try{let n=await Noe(t);e.success(`虚拟人像项目组已创建`),E(!1),K.resetFields(),await ae(),a(n.id)}catch(t){e.error(t?.message||`创建项目组失败`)}finally{O(!1)}},ce=async()=>{if(!i){e.warning(`请先创建或选择项目组`);return}if(N.length===0){e.warning(`请先选择图片或视频素材`);return}let n=N.filter(e=>L[e.uid]===`uploaded`);if(n.length===0){e.warning(`请等待文件上传完成后再提交入库`);return}M(!0);try{for(let e of n){let t=e.originFileObj;if(!t)continue;let n=z[e.uid];if(!n)continue;H(t=>({...t,[e.uid]:`importing`}));let r=t.type.startsWith(`image/`)?`Image`:`Video`;await Foe(i,{url:n.url,assetType:r,name:F[e.uid]?.trim()||t.name,videoDuration:n.duration_seconds,fileSize:n.file_size_bytes??t.size,mimeType:t.type||null,uploadResourceId:n.resource_id||null}),H(t=>({...t,[e.uid]:`imported`}))}e.success(`已成功提交 ${n.length} 个素材入库,处理中`),setTimeout(()=>{A(!1),P([]),I({}),R({}),B({}),H({})},1500),await Promise.all([ae(),q(1,m),t()])}catch(t){e.error(t?.message||`提交入库失败`)}finally{M(!1)}},le=async n=>{try{await Loe(n),e.success(`素材已删除,远端删除将异步执行`),await Promise.all([ae(),q(f,m),t()])}catch(t){e.error(t?.message||`删除素材失败`)}},ue=async()=>{if(i)try{await Poe(i),e.success(`项目组已删除,远端资产组将异步删除`),a(void 0),await oe()}catch(t){e.error(t?.message||`删除项目组失败`)}},de=t=>{let n=Y7(t);if(!n){e.warning(`暂无可预览地址`);return}te(n),ne(t.assetType===`Video`?`Video`:`Image`),ee(!0)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`虚拟素材库`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`可提前上传虚拟人像素材,后续生成视频时可直接使用。`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(VI,{}),onClick:()=>E(!0),style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`创建项目组`})]}),(0,$.jsxs)(cq,{gutter:[10,10],children:[(0,$.jsx)(xR,{xs:24,lg:5,children:(0,$.jsx)(vL,{style:{borderRadius:16,minHeight:520,margin:`0 auto`,maxWidth:1200},children:(0,$.jsx)(nG,{spinning:c,children:n.length===0?(0,$.jsx)(dC,{description:`暂无虚拟人像项目组`}):(0,$.jsx)(bV,{orientation:`vertical`,style:{width:`100%`},size:10,children:n.map(e=>{let t=i===e.id;return(0,$.jsxs)(`div`,{onClick:()=>a(e.id),style:{padding:14,borderRadius:14,cursor:`pointer`,border:t?`1px solid #8b5cf6`:`1px solid #e2e8f0`,background:t?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(bV,{style:{width:`100%`,justifyContent:`space-between`},align:`start`,children:(0,$.jsxs)(`div`,{style:{minWidth:0},children:[(0,$.jsx)(G7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),e.description&&(0,$.jsx)(G7,{type:`secondary`,ellipsis:!0,style:{display:`block`,fontSize:12},children:e.description})]})}),(0,$.jsxs)(bV,{wrap:!0,size:4,style:{marginTop:10},children:[(0,$.jsxs)(vQ,{children:[`总 `,e.assetCount||0]}),(0,$.jsxs)(vQ,{color:`green`,children:[`图 `,e.imageAssetCount||0]}),(0,$.jsxs)(vQ,{color:`blue`,children:[`视频 `,e.videoAssetCount||0]})]})]},e.id)})})})})}),(0,$.jsx)(xR,{xs:24,lg:19,children:(0,$.jsxs)(vL,{title:ie?ie.name:`素材资产`,extra:(0,$.jsxs)(bV,{wrap:!0,children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(M8,{}),disabled:!i,onClick:()=>A(!0),style:{borderRadius:8,fontWeight:600,borderColor:`transparent`},children:`上传图片/视频`}),i&&(0,$.jsx)(jG,{title:`确认删除当前虚拟人像项目组吗?`,onConfirm:ue,children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(MQ,{}),style:{borderRadius:8,fontWeight:600},children:`删除项目组`})})]}),style:{borderRadius:16,minHeight:520},children:[(0,$.jsxs)(bV,{style:{width:`100%`,marginBottom:16},wrap:!0,children:[(0,$.jsx)(YU.Search,{allowClear:!0,placeholder:`搜索素材名称`,value:v,onChange:e=>y(e.target.value),onSearch:()=>q(1,m),style:{width:240,borderRadius:8},enterButton:!0}),(0,$.jsx)(VC,{allowClear:!0,placeholder:`素材状态`,value:b,onChange:e=>x(e),style:{width:140,borderRadius:8},options:[{value:`Processing`,label:`处理中`},{value:`Active`,label:`可用`},{value:`Failed`,label:`失败`}]}),(0,$.jsx)(VC,{allowClear:!0,placeholder:`素材类型`,value:C,onChange:e=>w(e),style:{width:120,borderRadius:8},options:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>q(1,m),style:{borderRadius:8,fontWeight:600,borderColor:`transparent`},children:`筛选`})]}),(0,$.jsx)(nG,{spinning:u,children:i?o.length===0?(0,$.jsx)(dC,{description:`暂无素材,上传图片/视频后会异步入库`,style:{marginTop:80}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`,gap:14},children:o.map(e=>{let t=Y7(e),n=e.assetType===`Video`;return(0,$.jsx)(vL,{hoverable:!0,styles:{body:{padding:12}},style:{borderRadius:16,overflow:`hidden`,borderColor:`#eef2f7`},cover:(0,$.jsxs)(`div`,{style:{height:170,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[t?n&&e.videoCoverUrl?(0,$.jsx)(`img`,{src:t,alt:e.name||`视频封面`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(`video`,{src:t,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:t,alt:e.name||`虚拟人像素材`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(R8,{style:{fontSize:42,color:`#64748b`}}):(0,$.jsx)(w6,{style:{fontSize:42,color:`#64748b`}}),n&&(0,$.jsx)(vQ,{color:`blue`,style:{position:`absolute`,left:10,top:10},children:`视频`}),t&&(0,$.jsx)(X,{size:`small`,shape:`circle`,icon:(0,$.jsx)(DU,{}),style:{position:`absolute`,right:10,top:10},onClick:()=>de(e)}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:10,bottom:10,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:cce(e.videoDuration)})]}),children:(0,$.jsxs)(bV,{direction:`vertical`,size:8,style:{width:`100%`},children:[(0,$.jsx)(jw,{title:e.name||e.remoteAssetId||e.id,children:(0,$.jsx)(`div`,{style:{fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name||e.remoteAssetId||`未命名素材`})}),(0,$.jsxs)(bV,{wrap:!0,size:4,children:[(0,$.jsx)(dce,{status:e.status}),(0,$.jsx)(vQ,{color:n?`blue`:`default`,children:n?`视频`:`图片`})]}),(0,$.jsx)(bV,{size:6,wrap:!0,children:(0,$.jsx)(jG,{title:`确认删除这个虚拟人像素材吗?`,onConfirm:()=>le(e.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(MQ,{}),children:`删除`})})})]})},e.id)})}),(0,$.jsx)(`div`,{style:{textAlign:`right`,marginTop:16},children:(0,$.jsx)(FW,{current:f,pageSize:m,total:g,showSizeChanger:!0,showTotal:e=>`共 ${e} 个素材`,onChange:(e,t)=>q(e,t)})})]}):(0,$.jsx)(dC,{description:`请先创建或选择项目组`,style:{marginTop:80}})})]})})]}),(0,$.jsx)(DG,{title:`创建虚拟人像项目组`,open:T,onCancel:()=>E(!1),onOk:se,confirmLoading:D,okText:`创建项目组`,children:(0,$.jsxs)(mH,{form:K,layout:`vertical`,children:[(0,$.jsx)(mH.Item,{name:`name`,label:`项目组名称`,rules:[{required:!0,message:`请输入项目组名称`}],children:(0,$.jsx)(YU,{placeholder:`例如:虚拟主播A / 品牌代言人B`,maxLength:128})}),(0,$.jsx)(mH.Item,{name:`description`,label:`描述`,children:(0,$.jsx)(YU.TextArea,{placeholder:`可填写人物设定、服装风格、素材要求等`,maxLength:2e3,rows:4})})]})}),(0,$.jsx)(DG,{title:`上传虚拟人像素材`,open:k,onCancel:()=>A(!1),onOk:ce,confirmLoading:j,okText:`提交入库`,width:650,okButtonProps:{disabled:N.length===0||N.some(e=>L[e.uid]!==`uploaded`)},children:(0,$.jsx)(`div`,{style:{maxHeight:600,overflow:`auto`,marginTop:30},children:(0,$.jsxs)(bV,{direction:`vertical`,style:{width:`100%`},size:14,children:[(0,$.jsx)(H1,{accept:`image/*,video/*`,fileList:N,multiple:!0,beforeUpload:async t=>{let n=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,r=t.type.startsWith(`image/`),i=URL.createObjectURL(t),a={uid:n,name:t.name,status:`uploading`,originFileObj:t,thumbUrl:i,type:t.type};P(e=>[...e,a]),I(e=>({...e,[n]:``})),R(e=>({...e,[n]:`uploading`}));try{let i=r?`Image`:`Video`,a=i===`Video`?await lce(t):null;if(i===`Video`&&!uce(a,e.error))return R(e=>({...e,[n]:`error`})),!1;let o=i===`Video`?await hae(t,a||void 0):await mae(t);B(e=>({...e,[n]:{url:o.url,duration_seconds:o.duration_seconds,file_size_bytes:o.file_size_bytes,resource_id:o.resource_id}})),R(e=>({...e,[n]:`uploaded`}))}catch{R(e=>({...e,[n]:`error`})),e.error(`文件 ${t.name} 上传失败`)}return!1},listType:`picture`,itemRender:(e,t,n)=>{let r=t.type?.startsWith(`video/`)||t.name.match(/\.(mp4|mov|avi|webm)$/i),i=L[t.uid],a=V[t.uid];return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:12,border:`1px solid #e5e7eb`,borderRadius:8,marginBottom:8},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:8,overflow:`hidden`,flexShrink:0},children:t.thumbUrl||t.url?r?(0,$.jsx)(`video`,{src:t.thumbUrl||t.url,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:t.thumbUrl||t.url,alt:t.name,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#f1f5f9`},children:r?(0,$.jsx)(R8,{style:{color:`#94a3b8`,fontSize:20}}):(0,$.jsx)(w6,{style:{color:`#94a3b8`,fontSize:20}})})}),(0,$.jsx)(`span`,{style:{width:`20%`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,fontSize:13,color:`#64748b`,flexShrink:0},children:t.name}),(0,$.jsx)(YU,{style:{width:200,flexShrink:0},value:F[t.uid]||``,onChange:e=>I({...F,[t.uid]:e.target.value}),placeholder:`素材名称,默认使用文件名`,maxLength:256}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[i===`uploading`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(nG,{size:`small`,style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`},children:`上传中`})]}),i===`uploaded`&&!a&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#10b981`},children:`✓ 上传完成`}),i===`error`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`},children:`✗ 上传失败`}),a===`importing`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(nG,{size:`small`,style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`},children:`入库中`})]}),a===`imported`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#10b981`},children:`✓ 已入库校验`}),a===`error`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`},children:`✗ 入库失败`})]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),P(e=>e.filter(e=>e.uid!==t.uid)),I(e=>{let n={...e};return delete n[t.uid],n}),R(e=>{let n={...e};return delete n[t.uid],n}),B(e=>{let n={...e};return delete n[t.uid],n}),H(e=>{let n={...e};return delete n[t.uid],n})},style:{width:28,height:28,borderRadius:`50%`,backgroundColor:`#f1f5f9`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(MQ,{style:{color:`#64748b`,fontSize:14}})})]})},children:(0,$.jsx)(X,{icon:(0,$.jsx)(M8,{}),children:`选择图片或视频`})}),(0,$.jsxs)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:12,color:`#64748b`,fontSize:13},children:[`当前开放图片和视频,视频素材必须在 `,K7,`~`,q7,` 秒内;提交后会调用火山 CreateAsset 异步处理,状态变为 入库校验成功 后才可用于 AI 创作。`]})]})})}),(0,$.jsx)(DG,{title:`素材预览`,open:U,onCancel:()=>ee(!1),footer:null,width:760,destroyOnHidden:!0,children:(0,$.jsx)(`div`,{style:{minHeight:420,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#0f172a`,borderRadius:12,overflow:`hidden`},children:G===`Video`?(0,$.jsx)(`video`,{src:W,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:520}}):(0,$.jsx)(`img`,{src:W,alt:`素材预览`,style:{maxWidth:`100%`,maxHeight:520,objectFit:`contain`}})})})]})},{Title:pce,Text:mce,Paragraph:hce}=Q,X7=e=>e===`aigc_virtual`?`aigc_virtual`:`real_person`,gce=()=>{let[e,t]=On(),[n,r]=(0,S.useState)(()=>X7(e.get(`portraitTab`))),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)(),u=async()=>{try{a(n===`aigc_virtual`?await Z5():await Y5())}catch(e){Z.error(e?.message||`加载配置失败`)}};(0,S.useEffect)(()=>{(async()=>{try{if(n===`aigc_virtual`){let[e,t]=await Promise.all([Z5(),Q5({page:1,pageSize:100,status:`active`})]);a(e);let n=t.items||[];s(n),l(e=>e&&n.some(t=>t.id===e)?e:n[0]?.id)}else{let[e,t]=await Promise.all([Y5(),X5({pageSize:100,status:`active`})]);a(e);let n=t.items||[];s(n),l(e=>e&&n.some(t=>t.id===e)?e:n[0]?.id)}}catch(e){Z.error(e?.message||`加载数据失败`)}})()},[n]),(0,S.useMemo)(()=>o.find(e=>e.id===c)||null,[o,c]);let d=(0,S.useMemo)(()=>i?`已用 ${i.usedAssetCount||0} / ${i.assetLimit||0} 个素材,剩余 ${i.remainingAssetCount||0}`:`额度加载中`,[i]),f=(0,S.useMemo)(()=>[{key:`real_person`,label:`真人素材库`,children:(0,$.jsx)(oce,{})},{key:`aigc_virtual`,label:`虚拟素材库`,children:(0,$.jsx)(fce,{})}],[]);return(0,$.jsx)(tce,{refreshConfig:u,children:(0,$.jsx)(`div`,{children:(0,$.jsx)(gL,{activeKey:n,onChange:n=>{let i=X7(n);r(i);let a=new URLSearchParams(e);a.set(`filterType`,`private_portrait`),a.set(`portraitTab`,i),t(a,{replace:!0})},items:f,destroyOnHidden:!1,tabBarExtraContent:(0,$.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:`#4f46e5`,marginTop:8},children:[d,`。真人/虚拟共用,图片/视频共用。`]})})})})},{Header:_ce,Sider:vce,Content:yce}=iW,{TextArea:bce}=YU,{Option:xce}=VC,{Text:Z7}=Q,Sce=`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/api\/?$/i,``).replace(/\/$/,``),Cce=e=>{if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${Sce}${t.startsWith(`/`)?t:`/${t}`}`:``},wce=()=>{let{message:e}=nx.useApp(),t=Ke(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(`1`),[o,s]=(0,S.useState)([]),{mediaType:c,countType:l,generationCount:u,selectedRatio:d,selectedResolution:f,width:p,height:m,videoDuration:h,videoAspectRatio:g,videoResolution:_,engineOptions:v,enginesele:y,inputValue:b,setMediaType:x,setCountType:C,setGenerationCount:w,setSelectedRatio:T,setSelectedResolution:E,setWidth:D,setHeight:O,setVideoDuration:k,setVideoAspectRatio:A,setVideoResolution:j,setEngineOptions:M,setEnginesele:N,setInputValue:P,currentMedia:F,setCurrentMedia:I}=c7(),L=Array.isArray(y)?{}:y,R=(c===`image`?L.image:L.video)?.find(e=>e.id===l),z=R?.maxImageCount??4,B=R?.maxVideoCount??1,V=!!R?.multiGenerationEnabled,H=V?Math.max(1,Math.min(5,Number(R?.maxGenerationCount||1))):1,U=c===`image`?F.filter(e=>e.type===`image`).length:0,ee=c===`image`?Math.max(1,Number(R?.multiImageMaxImages||15)-U):5,W=Math.max(1,Math.min(5,H,c===`image`?ee:5)),[te,G]=(0,S.useState)(!1),[ne,K]=(0,S.useState)(!1),[re,ie]=(0,S.useState)(!1),[ae,q]=(0,S.useState)(`universal`),[oe,se]=(0,S.useState)(null),[ce,le]=(0,S.useState)(null),[ue,de]=(0,S.useState)(null),[fe,pe]=(0,S.useState)(!1),[me,he]=(0,S.useState)(!1),[ge,_e]=(0,S.useState)(`real_person`),[ve,ye]=(0,S.useState)(!1),be=(0,S.useRef)(null),xe=(0,S.useCallback)(()=>{be.current&&=(window.clearTimeout(be.current),null),ye(!0)},[]),Se=(0,S.useCallback)(()=>{be.current&&window.clearTimeout(be.current),be.current=window.setTimeout(()=>{ye(!1),be.current=null},260)},[]),[Ce,we]=(0,S.useState)(!1),Te=(0,S.useRef)(null),Ee=(0,S.useRef)(!1),[De,Oe]=(0,S.useState)({top:0,left:0}),ke=e=>{let t=0,n=0,r=0;return e.map(e=>e.type===`image`?(t++,`图片${t}`):e.type===`video`?(n++,`视频${n}`):(r++,`音频${r}`))},[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)(``),[Pe,Fe]=(0,S.useState)(`image`),Ie=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(Ae&&Pe===`video`){let e=()=>{Ie.current&&Ie.current.play().catch(()=>{})};Ie.current&&(Ie.current.readyState>=2?e():Ie.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),Ie.current&&(Ie.current.removeEventListener(`loadedmetadata`,e),Ie.current.pause())}}else Ie.current&&Ie.current.pause()},[Ae,Pe]);let Le=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},Re=e=>{let t=Le(e);return t?Math.floor(Date.now()/1e3)>t:!1},[ze,Be]=(0,S.useState)(!1),[Ve,He]=(0,S.useState)(``),[Ue,We]=(0,S.useState)(`image`),[Ge,qe]=(0,S.useState)(``),Je=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(ze&&Ue===`video`&&Je.current){let e=Je.current;e.currentTime=0,e.muted=!1;let t=e.play();t&&typeof t.catch==`function`&&t.catch(()=>{e.muted=!0,e.play().catch(()=>{})})}else if(!ze&&Je.current){let e=Je.current;e.pause(),e.muted=!0,e.currentTime=0}},[ze,Ue,Ve]);let[Ye,Xe]=(0,S.useState)(null),[Ze,Qe]=(0,S.useState)(0),[$e,et]=(0,S.useState)(!1),[tt,nt]=(0,S.useState)(null),[rt,it]=(0,S.useState)({x:0,y:0}),[at,ot]=(0,S.useState)(!1),[st,ct]=(0,S.useState)(!1),[lt,ut]=(0,S.useState)([]),[dt,ft]=(0,S.useState)([]),[pt,mt]=(0,S.useState)({}),[ht,gt]=(0,S.useState)(!1),[_t,vt]=(0,S.useState)(!1),[yt,bt]=(0,S.useState)([]),[xt,St]=(0,S.useState)([]),[Ct,wt]=(0,S.useState)([]),Tt=()=>{let e={};if(e=Ct.find(e=>e.modelConfigId===l&&e.genType===c&&e.resolution===(c===`video`?_:f)),e||(c===`video`?(e={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(_===`1080p`||_===`720p`||_===`480p`)&&(e.ratio=1.3)):(e={perSecondCredits:.1,baseCredits:2,ratio:3,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(f===`2K`||f===`4K`||f===`1K`)&&(e.ratio=3))),c===`video`){let t=(h*e.perSecondCredits+e.baseCredits)*e.ratio,n=F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n)*(e.inputVideoRatio||1);t+=r}let r=F.filter(e=>e.type===`image`).length;if(r>0){let n=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*r)*(e.inputImageRatio||1);t+=n}return Number((t*u).toFixed(2))}else{let t=e.baseCredits*e.ratio,n=F.filter(e=>e.type===`image`).length;if(n>0){let r=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*n)*(e.inputImageRatio||1);t+=r}return Number((t*u).toFixed(2))}},Et=(0,S.useRef)(null),Dt=(0,S.useRef)(null),Ot=(0,S.useRef)(null);(0,S.useRef)(!0);let kt=(0,S.useRef)(!1),At=(0,S.useRef)(0);o.find(e=>e.id===i);let[jt,Mt]=(0,S.useState)([]),[Nt,Pt]=(0,S.useState)({page:1,pageSize:20}),[Ft,It]=(0,S.useState)(0),[Lt,Rt]=(0,S.useState)(!1);(0,S.useEffect)(()=>{let e=t.state;e&&(e.generationPrompt&&P(e.generationPrompt),e.mediaReferences&&Array.isArray(e.mediaReferences)&&e.mediaReferences.length>0&&I(e.mediaReferences.map(e=>{let t=e.url||e.resourceUrl||e.previewUrl||``,n=t.startsWith(`http`)?t:`https://ceshi.apiforeign.minzhongzc.com${t}`;return{...e,name:e.name||`参考${e.type}`,type:e.type===`video`?`video`:e.type===`audio`?`audio`:`image`,url:n,duration:e.duration||0,label:e.label||``}})),e.aspectRatio&&A(e.aspectRatio),window.history.replaceState({},``,window.location.pathname))},[t.state]),(0,S.useEffect)(()=>()=>{be.current&&window.clearTimeout(be.current)},[]);let zt=(0,S.useCallback)((e=`instant`)=>{let t=Dt.current;t&&(At.current=Date.now(),requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:e})}))},[]);(0,S.useEffect)(()=>{if(jt.length>0&&!kt.current){let e=setTimeout(()=>{zt(`smooth`),kt.current=!0},300);return()=>clearTimeout(e)}},[jt.length,zt]),(0,S.useEffect)(()=>{if(Ee.current){Ee.current=!1;return}if(!re)return;let e=Array.isArray(y)?{}:y,t=c===`image`?e.image:e.video;t&&t.length>0&&(t.some(e=>e.id===l)||C(t[0].id))},[c,y,re]),(0,S.useEffect)(()=>{re&&w(1)},[c,l,re,w]),(0,S.useEffect)(()=>{u>W&&(w(W),c===`image`&&e.info(`受当前引擎或参考图数量限制,本次最多生成 ${W} 份`))},[u,W,c,w,e]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;_t&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&vt(!1),ht&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&>(!1),at&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ot(!1),st&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ct(!1),fe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&pe(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[_t,ht,at,st,fe]),(0,S.useEffect)(()=>{if(Ee.current){Ee.current=!1;return}if(c!==`video`)return;let e=L.video?.find(e=>e.id===l);if(!e)return;let t=e.supportsFirstLastFrame??!1,n=e.supportsUniversalReference??!0;q(e=>n?`universal`:e===`universal`&&!n&&t?`first_last_frame`:e)},[l,c,y]),(0,S.useEffect)(()=>{C5().then(e=>{if(N(e.engine),ie(!0),e.engine.video&&e.engine.video.length>0){let t=e.engine.video[0],n=e.engine.video.find(e=>e.id===l)||t;M({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]}),n.supportedRatios?.includes(g)||A(n.supportedRatios?.[0]||`16:9`),n.supportedResolutions?.includes(_)||j(n.supportedResolutions?.[0]||`720p`),n.supportedDurations?.includes(h)||k(n.supportedDurations?.[0]||5),l===`请选择`&&C(n.id)}if(e.engine.image&&e.engine.image.length>0){let t=e.engine.image.find(e=>e.id===l)||e.engine.image[0],n=t.supportedSizes||{},r=Object.keys(n).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),i=r[0]||`2K`,a=Object.keys(n[i]||{});if(ut(a.map(e=>({value:e,label:e}))),mt(n),ft(r.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),n[i]&&n[i][a[0]]){let[e,t]=n[i][a[0]].split(/[×x]/);D(Number(e)),O(Number(t)),T(a[0]),E(i)}l===`请选择`&&C(t.id)}}).catch(()=>{}),D5().then(e=>{wt(e)}),w5(Nt).then(e=>{let t=e.total;Mt(e.items),It(t)})},[]),(0,S.useEffect)(()=>{if(Ot.current&&=(clearInterval(Ot.current),null),jt.some(e=>e.status===`generating`))return Ot.current=window.setInterval(()=>{w5(Nt).then(e=>{Mt(t=>t.map(t=>t.status===`generating`&&e.items.find(e=>e.id===t.id)||t)),It(e.total)}).catch(e=>{})},1e4),()=>{Ot.current&&=(clearInterval(Ot.current),null)}},[jt,Nt]),(0,S.useEffect)(()=>{if(!at)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ot(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[at]),(0,S.useEffect)(()=>{if(!st)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ct(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[st]);let Bt=e=>{let t=Object.keys(pt).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),n=pt[f]&&pt[f][e]?f:t.find(t=>pt[t]&&pt[t][e])||t[0];if(n&&pt[n]&&pt[n][e]){let[t,r]=pt[n][e].split(/[×x]/);D(Number(t)),O(Number(r)),T(e),E(n)}},Vt=e=>{pt[e]||(e=Object.keys(pt).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)})[0]||e);let t=pt[e]?Object.keys(pt[e]):[];ut(t.map(e=>({value:e,label:e})));let n=t.includes(d)?d:t[0]||``;if(n&&pt[e]&&pt[e][n]){let[t,r]=pt[e][n].split(/[×x]/);D(Number(t)),O(Number(r)),T(n),E(e)}},Ht=()=>{D(m),O(p)},Ut=y?.video?.find(e=>e.id===l),Wt=Ut?.supportsFirstLastFrame??!1,Gt=Ut?.supportsUniversalReference??!0,Kt=e=>{e===`first_last_frame`&&!Wt||e===`universal`&&!Gt||(q(e),pe(!1),I([]),P(``))},qt=()=>{let e=oe;se(ce),le(e)},Jt=()=>{se(null),le(null)},Yt=()=>{le(null)},Xt=async()=>{let t=c===`video`&&ae===`first_last_frame`;if(t){if(!b.trim()){e.warning(`请输入内容`);return}}else if(!b.trim()&&F.length===0){e.warning(`请输入内容或上传图片/视频`);return}let n=e=>e.replace(/([A-Z])/g,`_$1`).toLowerCase(),r=e=>!e||typeof e!=`object`?e:Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map(([e,t])=>[n(e),r(t)])),i;t?(i=[],oe&&i.push(r({...oe,role:`first_frame`})),ce&&i.push(r({...ce,role:`last_frame`})),i.length===0&&(i=void 0)):i=F.length>0?F.map(e=>{if(e.type===`image`){let{duration:t,...n}=e;return r(n)}return r(e)}):void 0;let a={id:``,gen_type:c,original_prompt:b.trim(),engine_id:l,idempotency_key:new Date().toLocaleString(`zh-CN`),generation_count:u,media_references:i,...c===`image`&&{image_size:f,image_proportion:d,image_px:p+`x`+m},...c===`video`&&{duration:h,aspect_ratio:g,resolution:_}};K(!0),Pae(a).then(()=>{P(``),I([]),se(null),le(null),w(1);let e={...Nt,page:1};Pt(e),w5(e).then(e=>{let t=e.items.map(e=>(e.media_references&&Array.isArray(e.media_references)&&(e.mediaReferences=e.media_references.map(e=>({...e,display_url:e.display_url||e.displayUrl,preview_url:e.preview_url||e.previewUrl,private_asset_id:e.private_asset_id||e.privateAssetId,provider_url:e.provider_url||e.providerUrl,remote_asset_id:e.remote_asset_id||e.remoteAssetId}))),e)),n=Array.isArray(t)&&t.length>0?t[t.length-1]:null;n&&Mt(e=>[...e,n]),It(e.total),setTimeout(()=>{Et.current?.scrollIntoView({behavior:`smooth`})},100)}).catch(e=>{})}).catch(t=>{let n=`创建任务失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),e.error({content:n,duration:3})}).finally(()=>{K(!1)}),setTimeout(()=>{K(!1)},3e3)},Zt=async()=>{if(jt.length>=Ft)return;let e=Dt.current;if(!e)return;let t=e.scrollTop,n=e.scrollHeight;Rt(!0);try{let r=Nt.page+1,i=await w5({...Nt,page:r}),a=Array.isArray(i)?{items:i,total:i.length}:i;a.total&&It(a.total),Pt(e=>({...e,page:r})),Mt(e=>{let t=new Set(e.map(e=>e.id));return[...(a.items||[]).filter(e=>!e.id||t.has(e.id)?!1:(t.add(e.id),!0)).reverse(),...e]}),setTimeout(()=>{e.scrollTop=t+(e.scrollHeight-n)},200)}catch{}finally{Rt(!1)}},Qt=e=>new Promise((t,n)=>{let r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{window.URL.revokeObjectURL(r.src),t(r.duration)},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法获取视频时长`))},r.src=URL.createObjectURL(e)}),$t=e=>new Promise((t,n)=>{let r=document.createElement(`audio`);r.preload=`metadata`,r.onloadedmetadata=()=>{URL.revokeObjectURL(r.src),t(r.duration)},r.onerror=()=>{URL.revokeObjectURL(r.src),n(Error(`无法获取音频时长`))},r.src=URL.createObjectURL(e)}),en=e=>{let t=e.startsWith(`http`)?e:`https://ceshi.apiforeign.minzhongzc.com${e}`;if(Ye===t){let e=document.getElementById(`audio-player`);e&&e.pause(),Xe(null)}else Xe(t)},tn=e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>{window.URL.revokeObjectURL(r.src),t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法读取图片尺寸`))},r.src=URL.createObjectURL(e)}),nn=e=>new Promise((t,n)=>{let r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{window.URL.revokeObjectURL(r.src),t({width:r.videoWidth,height:r.videoHeight,duration:r.duration})},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法读取视频尺寸`))},r.src=URL.createObjectURL(e)}),rn=(e,t)=>{if(e<300||e>6e3)return`图片宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`图片高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;return n<.4||n>2.5?`图片宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`:null},an=(e,t)=>{if(e<300||e>6e3)return`视频宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`视频高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;if(n<.4||n>2.5)return`视频宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`;let r=e*t;return r<409600?`视频总像素数过小(${e}×${t}=${r}),需 ≥ 640×640=409600`:r>8295044?`视频总像素数过大(${e}×${t}=${r}),需 ≤ 3326×2494=8295044`:null},on=async(t,n)=>{let r=t.type.startsWith(`image/`),i=t.type.startsWith(`video/`);if(c===`video`&&ae===`first_last_frame`){if(!r)return e.error(`首尾帧模式仅支持上传图片`),!1;if(t.size/1024/1024>10)return e.error(`图片大小不能超过10MB`),!1;try{let{width:n,height:r}=await tn(t),i=rn(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let i=n||ue;if(!i)return e.error(`请选择首帧或尾帧上传位置`),!1;G(!0);try{let n=await s5(t),r={name:t.name,type:`image`,url:n.url,role:i===`first`?`first_frame`:`last_frame`};i===`first`?se(r):le(r),e.success(`图片上传成功`)}catch(t){let n=t?.response?.data?.message||t?.response?.data?.detail||t?.message||`上传失败`;e.error(n)}finally{G(!1),de(null)}return!1}let a=t.type.startsWith(`audio/`);if(!r&&!i&&!a)return e.error(`仅支持图片、视频或音频文件`),!1;if(a){let n=t.name.split(`.`).pop()?.toLowerCase();if(![`wav`,`mp3`].includes(n||``))return e.error(`音频仅支持wav和mp3格式`),!1}if(c===`image`&&(i||a))return e.error(`图片模式仅支持上传图片`),!1;if(a&&c!==`video`)return e.error(`仅视频模式支持上传音频`),!1;let o=i?100:a?50:10,s=i?`视频`:a?`音频`:`图片`;if(t.size/1024/1024>o)return e.error(`${s}大小不能超过${o}MB`),!1;if(r)try{let{width:n,height:r}=await tn(t),i=rn(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let l=F.filter(e=>e.type===`image`).length;if(r&&l>=Nn)return e.error(`该引擎最多上传${Nn}张图片`),!1;let u=F.filter(e=>e.type===`video`).length;if(i&&u>=Pn)return e.error(`该引擎最多上传${Pn}个视频`),!1;let d=F.filter(e=>e.type===`audio`).length;if(a&&d>=Fn)return e.error(`该引擎最多上传${Fn}个音频`),!1;let f=0,p=0;if(i)try{if(f=await Qt(t),f<2)return e.error(`视频素材最短不能少于 2 秒`),!1;let n=F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n+f>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${(n+f).toFixed(1)} 秒`),!1;let{width:r,height:i}=await nn(t),a=an(r,i);if(a)return e.error(a),!1}catch{return e.error(`无法获取视频信息,请检查文件是否损坏`),!1}if(a)try{if(p=await $t(t),p<2)return e.error(`音频素材最短不能少于 2 秒`),!1;let n=F.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0);if(n+p>15)return e.error(`所有音频素材总时长不能超过 15 秒,当前 ${(n+p).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取音频信息,请检查文件是否损坏`),!1}G(!0);try{let e;e=r?await s5(t):a?await o5(t,p):await c5(t,f);let n=r?`image`:a?`audio`:`video`,o=[...F,{name:t.name,type:n,url:e.url,label:``,...i&&{duration:f},...a&&{duration:p}}],s=ke(o);I(o.map((e,t)=>({...e,label:s[t]})))}catch(t){let n=t?.response?.data?.message||t?.response?.data?.detail||t?.message||`上传失败`;e.error(n)}finally{G(!1)}return!1},sn=async t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`),i=t.type.startsWith(`audio/`);if(!n&&!r&&!i)return e.error(`仅支持图片、视频或音频文件`),!1;let a=r?100:i?50:30;if(t.size/1024/1024>a)return e.error(`${r?`视频`:i?`音频`:`图片`}大小不能超过${a}MB`),!1;if(n||r){let n=c7.getState().currentMedia.filter(e=>e.type===`image`||e.type===`video`).reduce((e,t)=>e+(Number(t.fileSizeBytes)||0),0),r=(n+t.size)/1024/1024;if(r>64)return e.error(`所有图片和视频总大小不能超过64MB,当前已${(n/1024/1024).toFixed(1)}MB,加上此文件后${r.toFixed(1)}MB`),!1}if(i){let n=t.name.split(`.`).pop()?.toLowerCase();if(![`wav`,`mp3`].includes(n||``))return e.error(`音频仅支持wav和mp3格式`),!1}if(n)try{let{width:n,height:r}=await tn(t),i=rn(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let o=0,s=0;if(r)try{if(o=await Qt(t),o<2)return e.error(`视频素材最短不能少于 2 秒`),!1;let n=c7.getState().currentMedia.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n+o>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${(n+o).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取视频信息,请检查文件是否损坏`),!1}if(i)try{if(s=await $t(t),s<2)return e.error(`音频素材最短不能少于 2 秒`),!1;let n=c7.getState().currentMedia.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0);if(n+s>15)return e.error(`所有音频素材总时长不能超过 15 秒,当前 ${(n+s).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取音频信息,请检查文件是否损坏`),!1}let c=n?`image`:i?`audio`:`video`,l={name:t.name,type:c,url:``,label:``,...r&&{duration:o},...i&&{duration:s}},u=c7.getState().currentMedia;if(!un(u,[l]))return!1;try{let e;return e=n?await s5(t):i?await o5(t,s):await c5(t,o),{name:l.name,type:l.type,url:e.url,label:l.label||``,fileSizeBytes:t.size,...l.duration!==void 0&&{duration:l.duration}}}catch(t){let n=t?.response?.data?.message||t?.response?.data?.detail||t?.message||`上传失败`;return e.error(n),!1}},cn=async t=>{let n=0,r=0;G(!0);for(let e of t){let t=await sn(e);if(t){let e=[...c7.getState().currentMedia,t],r=ke(e);I(e.map((e,t)=>({...e,label:r[t]}))),n++}else r++}G(!1),n>0&&e.success(`成功上传${n}个文件${r>0?`,${r}个文件上传失败`:``}`)},ln=(e,t)=>e.filter(e=>e.type===t).reduce((e,t)=>e+(Number(t.duration)||0),0),un=(t,n)=>{if(!n.length)return!1;if(c===`image`&&n.some(e=>e.type!==`image`))return e.error(`图片模式仅支持添加图片素材`),!1;if(n.some(e=>e.type===`audio`)&&c!==`video`)return e.error(`仅视频模式支持添加音频素材`),!1;let r=t.filter(e=>e.type===`image`).length,i=t.filter(e=>e.type===`video`).length,a=t.filter(e=>e.type===`audio`).length,o=n.filter(e=>e.type===`image`).length,s=n.filter(e=>e.type===`video`).length,l=n.filter(e=>e.type===`audio`).length;if(r+o>Nn)return e.error(`该引擎最多上传${Nn}张图片,当前还能添加 ${Math.max(0,Nn-r)} 张`),!1;if(i+s>Pn)return e.error(`该引擎最多上传${Pn}个视频,当前还能添加 ${Math.max(0,Pn-i)} 个`),!1;if(a+l>Fn)return e.error(`该引擎最多上传${Fn}个音频,当前还能添加 ${Math.max(0,Fn-a)} 个`),!1;for(let t of n){if(t.type!==`video`)continue;let n=Number(t.duration);if(!Number.isFinite(n)||n<=0)return e.error(`${t.name||`视频素材`}缺少视频秒数,不能用于 AI 创作`),!1;if(n<2)return e.error(`${t.name||`视频素材`}最短不能少于 2 秒`),!1;if(n>15)return e.error(`${t.name||`视频素材`}最长不能超过 15 秒`),!1}let u=ln(t,`video`)+ln(n,`video`);if(u>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${u.toFixed(1)} 秒`),!1;let d=ln(t,`audio`)+ln(n,`audio`);return d>15?(e.error(`所有音频素材总时长不能超过 15 秒,当前 ${d.toFixed(1)} 秒`),!1):!0},dn=t=>{let n=t.mediaReference,r=n?.type||t.resourceType,i=n?.url||t.resourceUrl||t.displayUrl||t.previewUrl||``;if(!i)return e.error(`${t.fileName||t.id} 缺少素材地址,不能用于 AI 创作`),null;if(r===`audio`&&c!==`video`)return e.error(`仅视频模式支持添加音频素材`),null;let a=Number(n?.duration??t.durationSeconds);return{name:n?.name||t.fileName||t.id,type:r,url:i,source:`upload_resource`,upload_resource_id:t.id,label:``,...(r===`video`||r===`audio`)&&Number.isFinite(a)&&a>0?{duration:a}:{}}},fn=t=>{let n=t.map(dn).filter(Boolean);if(!n.length)return;let r=c7.getState().currentMedia;if(!un(r,n))return;let i=[...r,...n],a=ke(i);I(i.map((e,t)=>({...e,label:a[t]}))),e.success(`已添加 ${n.length} 个历史上传素材参考`)},pn=t=>{if(t.assetType===`Audio`)return e.error(`音频私域素材暂不支持用于 AI 创作`),null;let n=t.assetType===`Video`?`video`:`image`,r=ge===`aigc_virtual`?`虚拟素材`:`真人素材`,i=n===`video`?t.videoCoverUrl||t.previewUrl||t.displayUrl||t.providerUrl||``:t.previewUrl||t.displayUrl||t.videoCoverUrl||t.providerUrl||``;return{name:t.name||r,type:n,url:i,source:`private_portrait_asset`,private_asset_id:t.id,label:``,...n===`video`&&{duration:Number(t.videoDuration)||void 0}}},mn=e=>{_e(e),he(!0)},hn=t=>{let n=t.map(pn).filter(Boolean),r=c7.getState().currentMedia;if(!un(r,n))return;let i=[...r,...n],a=ke(i);I(i.map((e,t)=>({...e,label:a[t]}))),e.success(`已添加 ${n.length} 个${ge===`aigc_virtual`?`虚拟`:`真人`}素材参考`)},gn=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,_n=e=>{let t=F.filter((t,n)=>n!==e),n=ke(t);I(t.map((e,t)=>({...e,label:n[t]})))},vn=(e,t)=>{let n=e.selectionStart;return t.slice(0,n).match(/@([^@\s]*)$/)&&F.length>0?(we(!0),!0):(we(!1),!1)},yn=e=>/[\u4e00-\u9fa5]/.test(e),bn=e=>{if(!e.trim())return 0;if(yn(e))return e.replace(/\s/g,``).length;{let t=e.trim().split(/\s+/);return t[0]===``?0:t.length}},xn=e=>e.trim()?yn(e)?500:1e3:500,Sn=e=>{let t=e.target.value,n=xn(t);if(bn(t)<=n)P(t),vn(e.target,t);else if(yn(t)){let r=t,i=0;for(let e=0;en)){r=t.slice(0,e);break}P(r),vn(e.target,r)}else{let r=t.trim().split(/\s+/).slice(0,n).join(` `);P(r),vn(e.target,r)}},Cn=e=>{Ce&&e.key===`Escape`&&we(!1)},wn=e=>{let t=Te.current?.resizableTextArea?.textArea;if(!t)return;let n=t.selectionStart,r=b.slice(0,n),i=b.slice(n),a=r.lastIndexOf(`@`);if(a===-1){we(!1);return}P(r.slice(0,a)+`@${e} `+i),we(!1),setTimeout(()=>{let n=a+e.length+2;t.focus(),t.setSelectionRange(n,n)},0)},Tn=()=>{je(!1),Ne(``),Ie.current&&Ie.current.pause()},En=e=>{if(e.preventDefault(),e.stopPropagation(),!Me)return;let t=Me.replace(`/static`,``).replace(/&w=\d+/i,``).replace(/&q=\d+/i,``);t.includes(`download=1`)||(t+=`&download=1`);let n=document.createElement(`a`);n.href=t,n.download=Pe===`image`?`image.png`:`video.mp4`,document.body.appendChild(n),n.click(),document.body.removeChild(n)},Dn=e=>{let t=String(e?.type||``).toLowerCase(),n=String(e?.url||e?.name||``).toLowerCase();return t.includes(`video`)||/\.(mp4|mov|avi|webm|m4v)(\?|$)/.test(n)?`video`:t.includes(`audio`)||/\.(mp3|wav|ogg|aac|m4a)(\?|$)/.test(n)?`audio`:`image`},On=e=>e?/^https?:\/\//i.test(e)?e:`https://ceshi.apiforeign.minzhongzc.com${e}`:``,kn=e=>{e?.url&&(He(e.url),We(Dn(e)),qe(e.name||`附件`),Be(!0))},An=c===`video`&&ae===`first_last_frame`,jn=!te&&(An?!!(b.trim()||oe):!!(b.trim()||F.length>0)),Mn=c===`image`?`输入画面描述,或上传图片参考风格、构图、主体与光影。例:@图片1 参考色调,生成一张简洁高级的产品海报。`:An?`首帧尾帧可以不传,如需传入建议描述首帧到尾帧的主体动作、镜头运动、节奏与转场。例:从首帧自然推进到尾帧,产品居中突出,动作平滑连贯。`:`上传最多12个参考素材,输入文字或 @ 引用参考内容,自由组合图、文、视频。例:@图片1 模仿 @视频1 的动作。`,Nn=z,Pn=B,Fn=R?.maxAudioCount??1;return(0,$.jsxs)(iW,{className:`ai-create-page`,style:{margin:`-24px -32px -32px`,borderRadius:22,height:`calc(100vh - 34px)`,background:`rgba(255, 255, 255, 0.52)`,overflow:`hidden`},children:[(0,$.jsx)(`audio`,{id:`audio-player`,src:Ye||null,autoPlay:!0,onEnded:()=>Xe(null),style:{display:`none`}}),(0,$.jsxs)(iW,{style:{display:`flex`,flex:1,background:`rgba(255, 255, 255, 0.52)`},children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`16px 24px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`,backdropFilter:`blur(22px)`,border:`1px solid rgba(231, 234, 240, 0.82)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:`15%`,height:1,background:`linear-gradient(90deg, transparent, rgba(117,106,136,0.18), rgba(232,227,236,0.48), transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,textAlign:`center`},children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`AI创作`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#667085`,margin:`4px 0 0 0`},children:`输入想法、剧本或上传参考,智能生成视频/图片`})]}),(0,$.jsx)(`div`,{style:{width:`15%`,height:1,background:`linear-gradient(90deg, transparent, rgba(232,227,236,0.48), rgba(117,106,136,0.18), transparent)`,borderRadius:1}})]})}),(0,$.jsxs)(yce,{style:{flex:1,margin:0,padding:`20px 24px 22px`,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minHeight:0},children:[jt.length===0&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:50,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:16},children:(0,$.jsx)(J6,{style:{fontSize:40,color:`#fff`}})}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:500,color:`#2f3440`},children:`你好,想创作什么?`}),(0,$.jsx)(`p`,{style:{margin:8,fontSize:13,color:`#98a2b3`},children:`输入想法、剧本或上传参考,开始你的创作之旅`})]}),jt.length>0&&(0,$.jsxs)(`div`,{ref:Dt,className:`ai-create-scroll`,style:{flex:1,overflowY:`auto`,paddingRight:10,paddingBottom:18},onScroll:e=>{let t=e.currentTarget;!(Date.now()-At.current<500)&&kt.current&&t.scrollTop<=50&&!Lt&&jt.length{let t=e;return jt.map(e=>(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(J6,{style:{color:`#fff`,fontSize:16}})}),(0,$.jsx)(`div`,{style:{flex:1},children:(0,$.jsxs)(`div`,{style:{background:`rgb(255, 255, 255)`,backdropFilter:`blur(18px)`,borderRadius:`22px`,padding:`14px 16px`,width:`70%`,minWidth:500,boxSizing:`border-box`,boxShadow:`0 18px 50px rgba(47, 52, 64, 0.075)`,position:`relative`,border:`1px solid rgba(231, 234, 240, 0.9)`},children:[(0,$.jsxs)(`div`,{style:{margin:4,fontSize:11,color:`#98a2b3`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:8,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:e.createdAt?.replace(`T`,` `).split(`.`)[0]}),(0,$.jsx)(`span`,{style:{background:(e.genType,`rgba(139, 92, 246, 0.10)`),color:(e.genType,`#8b5cf6`),padding:`2px 8px`,borderRadius:12,fontWeight:500,fontSize:11,marginLeft:8},children:e.genType===`image`?`图片生成`:`视频生成`})]}),e.mediaReferences&&e.mediaReferences.length>0&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,zIndex:100},children:(0,$.jsx)(`span`,{style:{padding:`4px 12px`,borderRadius:16,color:`#8b5cf6`,cursor:`pointer`,fontWeight:500,border:`1px solid rgba(139, 92, 246, 0.2)`,background:`rgba(139, 92, 246, 0.04)`},onClick:t=>{t.stopPropagation();let n=t.currentTarget.getBoundingClientRect();it({x:n.left,y:n.top-10}),nt(e.id),et(!0)},children:`附件详情`})}),(0,$.jsxs)(`div`,{style:{position:`absolute`,bottom:8,right:8,zIndex:100,display:`flex`,gap:6},children:[(0,$.jsxs)(`button`,{onClick:n=>{n.stopPropagation(),P(e.originalPrompt||``);let r=!0,i=e.engineId||e.engineSnapshot?.id||e.engine_id;if(i&&e.genType){let n=Array.isArray(y)?{}:y,a=(e.genType===`image`?n.image:n.video)?.find(e=>e.id===i);if(a){if(C(a.id),e.genType===`video`&&M({ratios:a.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:a.supportedResolutions||[`480p`,`720p`,`1080p`],durations:a.supportedDurations||[5,8,10,12,15]}),e.genType===`image`){let e=a.supportedSizes||{},t=Object.keys(e).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),n=t[0]||`2K`,r=Object.keys(e[n]||{});if(ut(r.map(e=>({value:e,label:e}))),mt(e),ft(t.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),e[n]&&e[n][r[0]]){let[t,i]=e[n][r[0]].split(/[×x]/);D(Number(t)),O(Number(i)),T(r[0]),E(n)}}}else t.error(`该引擎已删除,无法重新编辑`),r=!1}if(r){if(e.genType&&(Ee.current=!0,x(e.genType)),e.mediaReferences&&e.mediaReferences.length>0)if(e.mediaReferences.some(e=>e.role===`first_frame`||e.role===`last_frame`)&&e.genType===`video`){let t=e.mediaReferences.find(e=>e.role===`first_frame`),n=e.mediaReferences.find(e=>e.role===`last_frame`);se(t?{...t,label:t.label||``,duration:t.duration}:null),le(n?{...n,label:n.label||``,duration:n.duration}:null),I([]),q(`first_last_frame`)}else if(I(e.mediaReferences.map(e=>({...e,name:e.name,type:e.type,url:e.url,label:e.label||``,role:e.role,duration:e.duration}))),se(null),le(null),e.genType===`video`){let e=L.video?.find(e=>e.id===i);if(e){let t=e.supportsUniversalReference??!0,n=e.supportsFirstLastFrame??!1;q(t?`universal`:n?`first_last_frame`:`universal`)}else q(`universal`)}else q(`universal`);else if(I([]),se(null),le(null),e.genType===`video`){let e=y?.video?.find(e=>e.id===i);if(e){let t=e.supportsUniversalReference??!0,n=e.supportsFirstLastFrame??!1;q(t?`universal`:n?`first_last_frame`:`universal`)}}t.success(`已加载到编辑区`)}},style:{height:28,padding:`0 10px`,borderRadius:10,border:`none`,background:`rgba(139, 92, 246, 0.08)`,color:`#8b5cf6`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,gap:4,fontSize:12},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`},children:[(0,$.jsx)(LK,{style:{fontSize:12}}),`重新编辑`]}),(0,$.jsx)(jG,{title:`确定要删除吗?`,onConfirm:async()=>{try{await Fae(e.id),t.success(`删除成功`),Mt(t=>t.filter(t=>t.id!==e.id)),It(e=>e-1)}catch(e){let n=e?.response?.data?.message||e?.message||`删除失败`;t.error(n)}},okText:`确定`,cancelText:`取消`,children:(0,$.jsxs)(`button`,{onClick:e=>e.stopPropagation(),style:{height:28,padding:`0 10px`,borderRadius:10,border:`none`,background:`rgba(139, 92, 246, 0.08)`,color:`#8b5cf6`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,gap:4,fontSize:12},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(164, 91, 91, 0.1)`,e.currentTarget.style.color=`#A45B5B`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},children:[(0,$.jsx)(MQ,{style:{fontSize:12}}),`删除`]})})]}),(e.status===`generating`||e.status===`failed`||e.status===`completed`)&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16,marginTop:16,width:`100%`,alignItems:`flex-start`},children:[(0,$.jsx)(`div`,{style:{width:`50%`,overflow:`hidden`,borderRadius:12,position:`relative`,height:220,border:`1px solid #E7EAF0`,boxShadow:`0 4px 12px rgba(139, 92, 246, 0.08)`,background:`linear-gradient(135deg, #ffffff 0%, #FAFBFC 100%)`},children:(0,$.jsx)(Yse,{task:e,resolveUrl:Cce,onPreview:(e,t)=>{Ne(e),Fe(t),je(!0)}})}),(0,$.jsxs)(`div`,{style:{width:`50%`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsx)(`div`,{style:{background:`#FFFFFF`,borderRadius:12,padding:12,border:`1px solid #E7EAF0`,flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`p`,{style:{width:`100%`,height:150,overflow:`auto`,padding:0,marginTop:0,marginBottom:0,lineHeight:2,color:`#475467`,fontSize:13},children:e.originalPrompt})}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#667085`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#8b5cf6`,fontWeight:500},children:e.engineSnapshot?.name||`未知引擎`}),(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#667085`},children:e.genType===`image`?`${e.imageProportion||``} · ${e.imagePx||``} · ${e.imageSize||``}`:`${e.duration||``}秒 · ${e.aspectRatio||``} · ${e.resolution||``}`}),(0,$.jsxs)(`span`,{style:{fontSize:14,borderRadius:16,color:`#8b5cf6`},children:[`消耗积分:`,e.creditsCost]})]})]})]})]})})]})},e.id))})(),(0,$.jsx)(`div`,{ref:Et})]}),$e&&tt&&(()=>{let e=jt.find(e=>e.id===tt)?.mediaReferences||[];return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`transparent`,zIndex:9998},onClick:()=>{et(!1),nt(null)}}),(0,$.jsxs)(`div`,{className:`ai-reference-expanded-tray ai-attachment-popover`,style:{position:`fixed`,top:`max(84px, ${rt.y-96}px)`,left:`max(24px, min(${rt.x-250}px, calc(100vw - 456px)))`,width:424,padding:`12px 12px 10px`,borderRadius:18,background:`rgba(255,255,255,0.98)`,border:`1px solid #E7EAF0`,boxShadow:`0 24px 60px rgba(31, 41, 55, 0.12)`,backdropFilter:`blur(18px)`,zIndex:9999,pointerEvents:`auto`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:10},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#344054`,fontWeight:800},children:`参考附件`}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98A2B3`,fontWeight:600},children:`点击素材查看,或直接下载原文件`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:(0,$.jsx)(`button`,{onClick:()=>{et(!1),nt(null)},style:{width:26,height:26,borderRadius:`50%`,border:`1px solid transparent`,background:`#F6F7FA`,cursor:`pointer`,color:`#98a2b3`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#EEF1F6`,e.currentTarget.style.color=`#2f3440`},onMouseLeave:e=>{e.currentTarget.style.background=`#F6F7FA`,e.currentTarget.style.color=`#98a2b3`},children:(0,$.jsx)(ju,{style:{fontSize:12}})})})]}),(0,$.jsx)(`div`,{className:`ai-reference-tray-scroll`,style:{display:`flex`,gap:10,overflowX:`auto`,padding:`2px 2px 4px`},children:e.map((e,t)=>{let n=Dn(e),r=e.label||(e.role===`first_frame`?`首帧`:e.role===`last_frame`?`尾帧`:`${n===`image`?`图片`:n===`video`?`视频`:`音频`}${t+1}`);return(0,$.jsxs)(`div`,{style:{flex:`0 0 92px`,width:92,borderRadius:16,background:`#FFFFFF`,border:`1px solid #E7EAF0`,boxShadow:`0 8px 18px rgba(31, 41, 55, 0.06)`,padding:7,boxSizing:`border-box`},children:[(0,$.jsx)(`div`,{onClick:t=>{n===`audio`?(t.stopPropagation(),en(e.url)):(kn(e),et(!1),nt(null))},style:{position:`relative`,width:`100%`,height:70,borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#F7F8FA`,border:`1px solid rgba(231, 234, 240, 0.9)`},children:n===`image`?(0,$.jsx)(`img`,{src:On(e.url),alt:e.name||r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):n===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:On(e.url),muted:!0,playsInline:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(31, 41, 55, 0.08)`},children:(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:`50%`,background:`rgba(47, 52, 64, 0.72)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 18px rgba(31, 41, 55, 0.22)`},children:(0,$.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`#fff`,children:(0,$.jsx)(`path`,{d:`M8 5v14l11-7z`})})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`},children:Ye===(e.url.startsWith(`http`)?e.url:`https://ceshi.apiforeign.minzhongzc.com${e.url}`)?(0,$.jsx)(f6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(Q0,{style:{fontSize:24,color:`#fff`}})})}),(0,$.jsx)(`div`,{title:e.name||r,style:{marginTop:6,color:`#667085`,fontSize:10,fontWeight:700,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,textAlign:`center`},children:e.name||r}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:5,marginTop:7},children:(0,$.jsx)(`button`,{onClick:()=>{kn(e),et(!1),nt(null)},style:{flex:1,height:24,borderRadius:9,border:`1px solid #E7EAF0`,background:`#F8FAFC`,color:`#8b5cf6`,fontSize:11,fontWeight:700,cursor:`pointer`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#EEF1F6`},onMouseLeave:e=>{e.currentTarget.style.background=`#F8FAFC`},children:`查看`})})]},`${e.url||e.name||t}-${t}`)})})]})]})})(),(0,$.jsxs)(`div`,{style:{position:`relative`,background:`rgba(255, 255, 255, 0.52)`,borderRadius:24,padding:`18px 72px 16px 20px`,boxShadow:`0 22px 64px rgba(31, 41, 55, 0.08), 0 1px 0 rgba(255,255,255,0.98) inset`,transition:`all 0.25s ease`,border:`1px solid rgba(231, 234, 240, 0.78)`,backdropFilter:`blur(24px)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:18,alignItems:`flex-end`,marginBottom:14},children:[(0,$.jsx)(`div`,{style:{width:An?220:70,minWidth:An?220:70,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`flex-start`,paddingTop:2,gap:8},children:c===`video`&&ae===`first_last_frame`?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`row`,alignItems:`stretch`,gap:12,width:`100%`,height:100},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,flex:1,minWidth:0,height:100,borderRadius:12,border:`1px solid #E7EAF0`,background:`#ffffff`,boxShadow:`0 6px 16px rgba(47, 52, 64, 0.04)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left:10,right:10,display:`flex`,alignItems:`center`,justifyContent:`space-between`,zIndex:2},children:(0,$.jsx)(`span`,{style:{fontSize:11,fontWeight:600,color:`#8b5cf6`,lineHeight:1},children:`首帧(可选)`})}),oe?(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64},children:[(0,$.jsx)(`img`,{src:gn(oe.url),alt:oe.name,onClick:()=>{He(oe.url),We(`image`),qe(oe.name),Be(!0)},style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,cursor:`pointer`,border:`1px solid rgba(139, 92, 246, 0.2)`,boxShadow:`0 3px 10px rgba(47, 52, 64, 0.06)`}}),(0,$.jsx)(`button`,{onClick:Jt,style:{position:`absolute`,top:-6,right:-6,width:18,height:18,border:`none`,background:`#A45B5B`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:9,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 4px rgba(164, 91, 91, 0.3)`,zIndex:10},children:(0,$.jsx)(MQ,{style:{fontSize:9}})})]}):(0,$.jsx)(w7,{accept:`image/*`,multiple:!1,mediaType:`image`,onLocalSelect:e=>{e.length>0&&on(e[0],`first`)},onHistorySelect:t=>{if(t.length>0){let n=t[0];se({name:n.fileName||``,type:`image`,url:n.resourceUrl||n.previewUrl||n.displayUrl||``,role:`first_frame`,label:``}),e.success(`成功添加首帧`)}},onPortraitSelect:t=>{if(t.length>0){let n=t[0],r=n.previewUrl||n.displayUrl||n.videoCoverUrl||n.providerUrl||``;se({name:n.name||`首帧图片`,type:`image`,url:r,role:`first_frame`,label:``,source:`private_portrait_asset`,private_asset_id:n.id}),e.success(`成功添加首帧`)}},uploading:te,children:(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(139, 92, 246, 0.28)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,backgroundColor:`rgba(139, 92, 246, 0.04)`,flexDirection:`column`,gap:4},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#a78bfa`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(139, 92, 246, 0.28)`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.04)`},children:[(0,$.jsx)(VI,{style:{fontSize:18,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,fontWeight:500},children:`上传首帧`})]})})]}),(0,$.jsx)(`button`,{onClick:qt,disabled:!oe||!ce,title:`调换首尾帧`,style:{width:32,height:32,alignSelf:`center`,borderRadius:50,border:`1px solid rgba(231, 234, 240, 0.95)`,background:oe&&ce?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#F3F5F8`,cursor:oe&&ce?`pointer`:`not-allowed`,color:oe&&ce?`#fff`:`#98A2B3`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:oe&&ce?`0 6px 14px rgba(139, 92, 246, 0.24)`:`none`,transition:`all 0.2s ease`,flexShrink:0},onMouseEnter:e=>{oe&&ce&&(e.currentTarget.style.transform=`scale(1.06)`)},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:(0,$.jsx)($H,{style:{fontSize:14}})}),(0,$.jsxs)(`div`,{style:{position:`relative`,flex:1,minWidth:0,height:100,borderRadius:12,border:`1px solid #E7EAF0`,background:`#ffffff`,boxShadow:`0 6px 16px rgba(47, 52, 64, 0.04)`,overflow:`hidden`,opacity:oe?1:.5},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left:10,right:10,display:`flex`,alignItems:`center`,justifyContent:`space-between`,zIndex:2},children:(0,$.jsx)(`span`,{style:{fontSize:11,fontWeight:600,color:`#8b5cf6`,lineHeight:1},children:`尾帧`})}),ce?(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64},children:[(0,$.jsx)(`img`,{src:gn(ce.url),alt:ce.name,onClick:()=>{He(ce.url),We(`image`),qe(ce.name),Be(!0)},style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,cursor:`pointer`,border:`1px solid rgba(139, 92, 246, 0.2)`,boxShadow:`0 3px 10px rgba(47, 52, 64, 0.06)`}}),(0,$.jsx)(`button`,{onClick:Yt,style:{position:`absolute`,top:-6,right:-6,width:18,height:18,border:`none`,background:`#A45B5B`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:9,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 4px rgba(164, 91, 91, 0.3)`,zIndex:10},children:(0,$.jsx)(MQ,{style:{fontSize:9}})})]}):oe?(0,$.jsx)(w7,{accept:`image/*`,multiple:!1,mediaType:`image`,onLocalSelect:e=>{e.length>0&&on(e[0],`last`)},onHistorySelect:t=>{if(t.length>0){let n=t[0];le({name:n.fileName||``,type:`image`,url:n.resourceUrl||n.previewUrl||n.displayUrl||``,role:`last_frame`,label:``}),e.success(`成功添加尾帧`)}},onPortraitSelect:t=>{if(t.length>0){let n=t[0],r=n.previewUrl||n.displayUrl||n.videoCoverUrl||n.providerUrl||``;le({name:n.name||`尾帧图片`,type:`image`,url:r,role:`last_frame`,label:``,source:`private_portrait_asset`,private_asset_id:n.id}),e.success(`成功添加尾帧`)}},uploading:te,children:(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(139, 92, 246, 0.24)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,backgroundColor:`rgba(139, 92, 246, 0.04)`,flexDirection:`column`,gap:4},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#a78bfa`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(139, 92, 246, 0.24)`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.04)`},children:[(0,$.jsx)(VI,{style:{fontSize:18,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,fontWeight:500},children:`上传尾帧`})]})}):(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(226, 232, 240, 0.4)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`not-allowed`,backgroundColor:`rgba(241, 245, 249, 0.5)`,flexDirection:`column`,gap:4},children:[(0,$.jsx)(VI,{style:{fontSize:18,color:`#cbd5e1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#94a3b8`,fontWeight:500},children:`请先上传首帧`})]})]})]}):(0,$.jsx)($.Fragment,{children:!(c===`video`&&ae===`first_last_frame`)&&(0,$.jsxs)(`div`,{style:{position:`relative`,width:64,height:72,marginTop:`-10`},onMouseEnter:xe,onMouseLeave:Se,children:[F.length===0&&(0,$.jsx)(w7,{accept:c===`image`?`image/*`:`image/*,video/*,audio/*`,onLocalSelect:cn,onHistorySelect:fn,onPortraitLibrarySelect:e=>{mn(e)},uploading:te,tooltipTitle:c===`image`?`图片${F.filter(e=>e.type===`image`).length}/${z}`:`图片${F.filter(e=>e.type===`image`).length}/${z}, + `,document.head.appendChild(t)},[]),(0,S.useEffect)(()=>{a.slice(0,5).forEach((e,t)=>{let n=O7(e),r=n.isActive,i=n.isSuccess,a=e.id||`${t}`;i&&!c.current.has(a)&&r===!1&&(c.current.add(a),s(e=>{let t=new Set(e);return t.add(a),t}))})},[a]);let l=e=>{s(t=>{let n=new Set(t);return n.delete(e),n})};return(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`grid`,gridTemplateColumns:`repeat(6, minmax(0, 1fr))`,gridAutoRows:`minmax(0, 1fr)`,gap:r>1?6:0},children:a.slice(0,5).map((r,i)=>{let s=O7(r),c=s.effectiveKey,u=r.imageUrl?n(N7(r.imageUrl)):``,d=n(r.videoUrl),f=r.videoCoverUrl?n(N7(r.videoCoverUrl)):``,p=(r.genType||e.genType)===`video`,m=p?!!d:!!u,h=s.isActive,g=s.isSuccess,_=r.id||`${i}`,v=o.has(_),y=g&&!v,b=v?`加载中`:Gse(r);return(0,$.jsxs)(`div`,{style:{gridColumn:`span ${Wse(a.length,i)}`,minWidth:0,minHeight:0,position:`relative`,overflow:`hidden`,borderRadius:a.length===1?12:8,background:`#ffffff`,border:`1px solid #E7EAF0`},children:[m&&s.isSuccess&&y?(0,$.jsxs)(`button`,{type:`button`,onClick:()=>t(p?d:u,p?`video`:`image`),style:{width:`100%`,height:`100%`,border:0,padding:0,background:`transparent`,cursor:`pointer`,position:`relative`},children:[p?f?(0,$.jsx)(`img`,{src:f,alt:`生成结果${r.generationIndex||i+1}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`video`,{src:d,muted:!0,preload:`metadata`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:u,alt:`生成结果${r.generationIndex||i+1}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}),p?(0,$.jsx)(k6,{style:{position:`absolute`,left:`50%`,top:`50%`,transform:`translate(-50%, -50%)`,fontSize:a.length>2?28:46,color:`rgba(255,255,255,.92)`,filter:`drop-shadow(0 4px 10px rgba(0,0,0,.28))`}}):null]}):(0,$.jsxs)(`div`,{className:h||v?`gen-task-loading-bg`:``,style:{width:`100%`,height:`100%`,minHeight:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:7,padding:8,textAlign:`center`},children:[h||v?(0,$.jsx)(`span`,{className:`gen-task-aurora-3`}):null,h||v?(0,$.jsx)(Ym,{spin:!0,style:{color:`#8b5cf6`,fontSize:a.length>2?20:34}}):(0,$.jsx)(Hie,{style:{color:c===`deleted`?`#98A2B3`:`#A45B5B`,fontSize:a.length>2?20:34}}),(0,$.jsx)(`span`,{style:{fontSize:a.length>2?10:12,color:h||v?`#8b5cf6`:c===`deleted`?`#98A2B3`:`#A45B5B`,fontWeight:500},children:b}),(0,$.jsx)(Yse,{item:r,isPending:h||v,isCompleted:g,onAnimationComplete:()=>l(_),index:r.generationIndex||i}),!h&&r.errorMessage&&a.length<=2?(0,$.jsx)(`span`,{style:{fontSize:10,color:`#A45B5B`,lineHeight:1.3,maxHeight:28,overflow:`hidden`},children:r.errorMessage}):null]}),a.length>1?(0,$.jsxs)(`span`,{style:{position:`absolute`,top:5,left:5,zIndex:2,padding:`1px 6px`,borderRadius:10,background:`rgba(17,24,39,.58)`,color:`#fff`,fontSize:10},children:[`#`,r.generationIndex||i+1]}):null]},r.id||`${i}`)})})},{Text:F7}=Q,Zse=({items:e,selectedId:t,onSelect:n})=>e.length?(0,$.jsx)(yV,{orientation:`vertical`,style:{width:`100%`},size:10,children:e.map(e=>{let r=t===e.id;return(0,$.jsxs)(`div`,{onClick:()=>n(e),style:{padding:14,borderRadius:14,cursor:`pointer`,border:r?`1px solid #8b5cf6`:`1px solid #e2e8f0`,background:r?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(yV,{style:{width:`100%`,justifyContent:`space-between`},align:`start`,children:(0,$.jsxs)(`div`,{style:{minWidth:0},children:[(0,$.jsx)(F7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),e.description&&(0,$.jsx)(F7,{type:`secondary`,ellipsis:!0,style:{display:`block`,fontSize:12},children:e.description})]})}),(0,$.jsxs)(yV,{wrap:!0,size:4,style:{marginTop:10},children:[(0,$.jsxs)(_Q,{children:[`总 `,e.assetCount||0]}),(0,$.jsxs)(_Q,{color:`green`,children:[`图 `,e.imageAssetCount||0]}),(0,$.jsxs)(_Q,{color:`blue`,children:[`视频 `,e.videoAssetCount||0]})]})]},e.id)})}):(0,$.jsx)(lC,{description:`暂无项目组`}),Qse={Active:`green`,Processing:`processing`,Failed:`red`,local_deleted:`default`,remote_deleted:`default`,delete_failed:`red`},$se={Active:`入库成功`,Processing:`入库处理中`,Failed:`入库失败`,local_deleted:`本地已删除`,remote_deleted:`远程已删除`,delete_failed:`删除失败`},I7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,L7=e=>e.assetType===`Video`?I7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.remoteUrl||e.sourceUrl):I7(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.remoteUrl||e.sourceUrl),ece=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},tce=({items:e,onDelete:t,onRefresh:n})=>{let r=(0,S.useRef)(null),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(`Image`);(0,S.useEffect)(()=>(e.some(e=>e.status!==`Failed`&&e.status!==`Active`)&&n?r.current||=window.setInterval(()=>{n()},3e3):r.current&&=(clearInterval(r.current),null),()=>{r.current&&=(clearInterval(r.current),null)}),[e,n]);let u=e=>{let t=L7(e);t&&(s(t),l(e.assetType===`Video`?`Video`:`Image`),a(!0))};return e.length?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`,gap:14},children:e.map(e=>{let n=e.assetType===`Video`,r=L7(e);return(0,$.jsx)(_L,{hoverable:!0,bodyStyle:{padding:12},style:{borderRadius:16,overflow:`hidden`,borderColor:`#eef2f7`},cover:(0,$.jsxs)(`div`,{style:{height:170,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[r?n&&e.videoCoverUrl?(0,$.jsx)(`img`,{src:r,alt:e.name||`视频封面`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(`video`,{src:r,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:r,alt:e.name||``,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(L8,{style:{fontSize:42,color:`#64748b`}}):(0,$.jsx)(C6,{style:{fontSize:42,color:`#64748b`}}),n&&(0,$.jsx)(_Q,{color:`blue`,style:{position:`absolute`,left:10,top:10},children:`视频`}),r&&(0,$.jsx)(X,{size:`small`,shape:`circle`,icon:(0,$.jsx)(EU,{}),style:{position:`absolute`,right:10,top:10},onClick:()=>u(e)}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:10,bottom:10,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:ece(e.videoDuration)})]}),children:(0,$.jsxs)(yV,{direction:`vertical`,size:8,style:{width:`100%`},children:[(0,$.jsx)(kw,{title:e.name||e.remoteAssetId||e.id,children:(0,$.jsx)(`div`,{style:{fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name||e.remoteAssetId||`未命名素材`})}),(0,$.jsxs)(yV,{wrap:!0,size:4,children:[(0,$.jsx)(_Q,{color:Qse[e.status]||`default`,children:$se[e.status]||e.status}),(0,$.jsx)(_Q,{color:n?`blue`:`default`,children:n?`视频`:`图片`})]}),(0,$.jsx)(yV,{size:6,wrap:!0,children:(0,$.jsx)(AG,{title:`确认删除这个素材吗?`,onConfirm:()=>t(e.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(jQ,{}),children:`删除`})})})]})},e.id)})}),(0,$.jsx)(EG,{title:`素材预览`,open:i,onCancel:()=>a(!1),footer:null,width:760,destroyOnClose:!0,children:(0,$.jsx)(`div`,{style:{minHeight:420,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#0f172a`,borderRadius:12,overflow:`hidden`},children:c===`Video`?(0,$.jsx)(`video`,{src:o,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:520}}):(0,$.jsx)(`img`,{src:o,alt:`素材预览`,style:{maxWidth:`100%`,maxHeight:520,objectFit:`contain`}})})})]}):(0,$.jsx)(lC,{description:`暂无素材`})},R7=(0,S.createContext)(void 0),nce=({children:e,refreshConfig:t})=>(0,$.jsx)(R7.Provider,{value:{refreshConfig:t},children:e}),z7=()=>{let e=(0,S.useContext)(R7);if(!e)throw Error(`useLibrary must be used within a LibraryProvider`);return e},B7=2,V7=15,rce=e=>new Promise(t=>{if(!e.type.startsWith(`video/`)){t(null);return}let n=URL.createObjectURL(e),r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{let e=Number.isFinite(r.duration)?r.duration:null;URL.revokeObjectURL(n),t(e)},r.onerror=()=>{URL.revokeObjectURL(n),t(null)},r.src=n}),ice=e=>e==null||!Number.isFinite(e)||e<=0?(Z.error(`无法读取视频秒数,请检查视频文件是否损坏`),!1):eV7?(Z.error(`视频素材最长不能超过 ${V7} 秒`),!1):!0,ace=({projectId:e,open:t,onClose:n,onSuccess:r})=>{let{refreshConfig:i}=z7(),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)({}),[l,u]=(0,S.useState)({}),[d,f]=(0,S.useState)({}),[p,m]=(0,S.useState)({}),[h,g]=(0,S.useState)(!1),_=()=>{o([]),c({}),u({}),f({}),m({})};return(0,$.jsx)(EG,{title:`上传真人素材`,open:t,onCancel:()=>{_(),n()},onOk:async()=>{let t=a.filter(e=>l[e.uid]===`uploaded`);if(t.length===0){Z.warning(`请等待文件上传完成后再提交入库`);return}g(!0);try{for(let n of t){let t=n.originFileObj;if(!t)continue;let r=d[n.uid];if(!r)continue;m(e=>({...e,[n.uid]:`importing`}));let i=t.type.startsWith(`image/`)?`Image`:`Video`;await Aoe(e,{url:r.url,assetType:i,name:s[n.uid]?.trim()||t.name,videoDuration:r.duration_seconds,fileSize:r.file_size_bytes??t.size,mimeType:t.type||null,uploadResourceId:r.resource_id||null}),m(e=>({...e,[n.uid]:`imported`}))}Z.success(`已成功提交 ${t.length} 个素材入库,处理中`),i(),setTimeout(()=>{_(),r(),n()},1500)}catch(e){Z.error(e?.message||`提交入库失败`)}finally{g(!1)}},confirmLoading:h,okText:`提交入库`,destroyOnHidden:!0,width:650,okButtonProps:{disabled:a.length===0||a.some(e=>l[e.uid]!==`uploaded`)},children:(0,$.jsx)(`div`,{style:{maxHeight:600,overflow:`auto`,marginTop:30},children:(0,$.jsxs)(yV,{direction:`vertical`,style:{width:`100%`},size:14,children:[(0,$.jsx)(V1,{accept:`image/*,video/*`,fileList:a,multiple:!0,beforeUpload:async e=>{let t=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,n=e.type.startsWith(`image/`),r=URL.createObjectURL(e),i={uid:t,name:e.name,status:`uploading`,originFileObj:e,thumbUrl:r,type:e.type};o(e=>[...e,i]),c(e=>({...e,[t]:``})),u(e=>({...e,[t]:`uploading`}));try{let r=n?`Image`:`Video`,i=r===`Video`?await rce(e):null;if(r===`Video`&&!ice(i))return u(e=>({...e,[t]:`error`})),!1;let a=r===`Video`?await mae(e,i||void 0):await pae(e);f(e=>({...e,[t]:{url:a.url,duration_seconds:a.duration_seconds,file_size_bytes:a.file_size_bytes,resource_id:a.resource_id}})),u(e=>({...e,[t]:`uploaded`}))}catch{u(e=>({...e,[t]:`error`})),Z.error(`文件 ${e.name} 上传失败`)}return!1},listType:`picture`,itemRender:(e,t,n)=>{let r=t.type?.startsWith(`video/`)||t.name.match(/\.(mp4|mov|avi|webm)$/i),i=l[t.uid],a=p[t.uid];return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:12,border:`1px solid #e5e7eb`,borderRadius:8,marginBottom:8},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:8,overflow:`hidden`,flexShrink:0},children:t.thumbUrl||t.url?r?(0,$.jsx)(`video`,{src:t.thumbUrl||t.url,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:t.thumbUrl||t.url,alt:t.name,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#f1f5f9`},children:r?(0,$.jsx)(L8,{style:{color:`#94a3b8`,fontSize:20}}):(0,$.jsx)(C6,{style:{color:`#94a3b8`,fontSize:20}})})}),(0,$.jsx)(`span`,{style:{width:`20%`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,fontSize:13,color:`#64748b`,flexShrink:0},children:t.name}),(0,$.jsx)(JU,{style:{width:200,flexShrink:0},value:s[t.uid]||``,onChange:e=>c({...s,[t.uid]:e.target.value}),placeholder:`素材名称,默认使用文件名`,maxLength:256}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[i===`uploading`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(tG,{size:`small`,style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`},children:`上传中`})]}),i===`uploaded`&&!a&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#10b981`},children:`✓ 上传完成`}),i===`error`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`},children:`✗ 上传失败`}),a===`importing`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(tG,{size:`small`,style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`},children:`入库中`})]}),a===`imported`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#10b981`},children:`✓ 已入库校验`}),a===`error`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`},children:`✗ 入库失败`})]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),o(e=>e.filter(e=>e.uid!==t.uid)),c(e=>{let n={...e};return delete n[t.uid],n}),u(e=>{let n={...e};return delete n[t.uid],n}),f(e=>{let n={...e};return delete n[t.uid],n}),m(e=>{let n={...e};return delete n[t.uid],n})},style:{width:28,height:28,borderRadius:`50%`,backgroundColor:`#f1f5f9`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(jQ,{style:{color:`#64748b`,fontSize:14}})})]})},children:(0,$.jsx)(X,{icon:(0,$.jsx)(j8,{}),children:`选择图片或视频`})}),(0,$.jsxs)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:12,color:`#64748b`,fontSize:13},children:[`当前开放图片和视频,音频暂不接入。视频素材必须在 `,B7,`~`,V7,` 秒内;入库后会经过火山真人一致性校验,入库校验成功 后才可用于 AI 创作。`]})]})})})},oce=({project:e,onDeleted:t,onChanged:n})=>{let{refreshConfig:r}=z7(),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(),[m,h]=(0,S.useState)(),[g,_]=(0,S.useState)(1),[v,y]=(0,S.useState)(20),[b,x]=(0,S.useState)(0),C=async(t=g,n=v)=>{s(!0);try{let r=await joe(e.id,{page:t,pageSize:n,keyword:u,status:f,assetType:m});a(r.items),x(r.total||0),_(t),y(n)}catch(e){Z.error(e?.message||`加载素材失败`)}finally{s(!1)}};(0,S.useEffect)(()=>{C(1,v)},[e.id,u,f,m]);let w=async e=>{try{await Moe(e),await C(g,v),n(),r(),Z.success(`素材已删除`)}catch(e){Z.error(e?.message||`删除素材失败`)}},T=async()=>{try{await Ooe(e.id),Z.success(`项目组已删除`),t()}catch(e){Z.error(e?.message||`删除项目组失败`)}},E=e.status===`active`;return(0,$.jsxs)(_L,{title:(0,$.jsx)(yV,{children:(0,$.jsx)(`span`,{children:e.name})}),extra:(0,$.jsxs)(yV,{children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(j8,{}),disabled:!E,onClick:()=>l(!0),children:`上传素材`}),(0,$.jsx)(AG,{title:`确认删除这个真人素材项目组吗?`,onConfirm:T,children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(jQ,{}),children:`删除项目组`})})]}),style:{borderRadius:16},children:[!E&&(0,$.jsx)(Q.Paragraph,{style:{color:`#f97316`},children:`项目组未完成真人认证,暂不能上传素材。请重新创建项目组并完成手机扫码认证。`}),(0,$.jsxs)(yV,{style:{width:`100%`,marginBottom:16},wrap:!0,children:[(0,$.jsx)(JU.Search,{allowClear:!0,placeholder:`搜索素材名称`,value:u,onChange:e=>d(e.target.value),onSearch:()=>C(1,v),style:{width:240}}),(0,$.jsx)(zC,{allowClear:!0,placeholder:`素材状态`,value:f,onChange:e=>p(e),style:{width:150},options:[{value:`Processing`,label:`处理中`},{value:`Active`,label:`可用`},{value:`Failed`,label:`失败`}]}),(0,$.jsx)(zC,{allowClear:!0,placeholder:`素材类型`,value:m,onChange:e=>h(e),style:{width:130},options:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{onClick:()=>C(1,v),children:`筛选`})]}),(0,$.jsx)(tG,{spinning:o,children:i.length===0?(0,$.jsx)(lC,{description:`暂无素材,上传图片/视频后会异步入库`,style:{marginTop:80}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(tce,{items:i,loading:o,onDelete:w,onRefresh:()=>C(g,v)}),(0,$.jsx)(`div`,{style:{textAlign:`right`,marginTop:16},children:(0,$.jsx)(PW,{current:g,pageSize:v,total:b,showSizeChanger:!0,showTotal:e=>`共 ${e} 个素材`,onChange:(e,t)=>C(e,t)})})]})}),(0,$.jsx)(ace,{projectId:e.id,open:c,onClose:()=>l(!1),onSuccess:()=>{C(1,v),n()}})]})},H7=`group_active`,U7=2e3,sce=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(!1),[g]=pH.useForm(),_=(0,S.useRef)(null),v=()=>{_.current&&=(window.clearInterval(_.current),null)},y=()=>{v(),s(!1),l(!1),h(!1),d(null),p(null),g.resetFields()},b=async()=>{a(!0);try{let e=await Y5({pageSize:100,status:`active`});t(e.items),r(t=>t?e.items.find(e=>e.id===t.id)||e.items[0]||null:e.items[0]||null)}catch(e){Z.error(e?.message||`加载真人素材项目组失败`)}finally{a(!1)}};(0,S.useEffect)(()=>{b()},[]),(0,S.useEffect)(()=>()=>v(),[]);let x=async e=>{v(),h(!1),Z.success(`真人认证完成,项目组已创建成功`),s(!1),p(null),d(null),g.resetFields();let n=await Y5({pageSize:100,status:`active`});t(n.items),r(n.items.find(t=>t.id===e)||n.items[0]||null)},C=(e,t,n)=>{v(),h(!0);let r=async()=>{try{let n=await koe(e);if(p(n),n.status===H7){await x(t);return}[`callback_failed`,`failed`,`expired`].includes(n.status)&&(v(),h(!1),Z.error(n.errorMessage||`真人认证未完成,请重新创建项目组`))}catch(e){v(),h(!1),Z.error(e?.message||`轮询真人认证状态失败`)}};_.current=window.setInterval(r,Math.max(1e3,n||U7)),r()},w=async()=>{let e=await g.validateFields();l(!0);try{let t=`${window.location.origin}/private-portrait-authorized`,n=await Doe({...e,callbackRedirectUrl:t});d(n.project),p(n.validateSession),Z.success(`请使用手机扫码完成人脸认证`),n.validateSession?.id&&C(n.validateSession.id,n.project.id,n.pollIntervalMs||U7)}catch(e){Z.error(e?.message||`创建项目组认证二维码失败`)}finally{l(!1)}},T=f?.h5Link||``,E=f?.status===H7;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`真人素材库`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`创建项目组时先完成真人认证,认证成功后项目组才会正式创建并可上传素材。`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(BI,{}),onClick:()=>s(!0),style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`创建项目组`})]}),(0,$.jsxs)(sq,{gutter:16,children:[(0,$.jsx)(bR,{xs:24,lg:5,children:(0,$.jsx)(_L,{style:{borderRadius:16,minHeight:520},children:(0,$.jsx)(tG,{spinning:i,children:e.length===0?(0,$.jsx)(lC,{description:`暂无真人项目组`}):(0,$.jsx)(Zse,{items:e,selectedId:n?.id,onSelect:r})})})}),(0,$.jsx)(bR,{xs:24,lg:19,children:n?(0,$.jsx)(oce,{project:n,onDeleted:()=>{r(null),b()},onChanged:b}):(0,$.jsx)(_L,{style:{borderRadius:16,minHeight:520,textAlign:`center`,color:`#94a3b8`},children:`请先创建或选择一个真人素材项目组`})})]}),(0,$.jsx)(EG,{title:`新建真人素材项目组`,open:o,onCancel:y,footer:f?[(0,$.jsx)(X,{onClick:y,children:`关闭`},`close`)]:void 0,onOk:f?void 0:w,okText:`开始认证并创建`,confirmLoading:c,mask:{closable:!m},children:f?(0,$.jsxs)(yV,{direction:`vertical`,align:`center`,size:16,style:{width:`100%`},children:[E?(0,$.jsx)(M2,{style:{fontSize:54,color:`#22c55e`}}):T?(0,$.jsx)(VK,{value:T,size:220}):(0,$.jsx)(tG,{}),(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(Q.Title,{level:5,style:{marginBottom:8},children:u?.name||`真人素材项目组`}),(0,$.jsx)(Q.Text,{type:E?`success`:`secondary`,children:E?`认证成功,项目组正在刷新`:`请使用手机扫码完成人脸认证,成功后回到电脑端查看项目组。`})]})]}):(0,$.jsxs)(pH,{form:g,layout:`vertical`,children:[(0,$.jsx)(pH.Item,{label:`项目组名称`,name:`name`,rules:[{required:!0,message:`请输入项目组名称`}],children:(0,$.jsx)(JU,{placeholder:`例如:达人A、客户B、张三人像`})}),(0,$.jsx)(pH.Item,{label:`描述`,name:`description`,children:(0,$.jsx)(JU.TextArea,{rows:3,placeholder:`可选`})}),(0,$.jsx)(Q.Paragraph,{type:`secondary`,style:{marginBottom:0},children:`点击后会生成真人认证二维码。手机扫码认证成功后,项目组才会出现在项目列表中。`})]})})]})},{Text:W7}=Q,G7=2,K7=15,cce={creating:{label:`本地创建中`,color:`processing`},Processing:{label:`入库处理中`,color:`processing`},Active:{label:`入库成功`,color:`success`},Failed:{label:`入库失败`,color:`error`},local_deleted:{label:`本地已删`,color:`default`},remote_deleted:{label:`远端已删`,color:`default`},delete_failed:{label:`远端删除失败`,color:`error`}},lce=e=>{let t=Number(e||0);return!Number.isFinite(t)||t<=0?`-`:`${t.toFixed(t>=10?0:1)}s`},q7=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,J7=e=>e.assetType===`Video`?q7(e.videoCoverUrl||e.previewUrl||e.displayUrl||e.remoteUrl||e.sourceUrl):q7(e.previewUrl||e.displayUrl||e.videoCoverUrl||e.remoteUrl||e.sourceUrl),uce=e=>new Promise(t=>{if(!e.type.startsWith(`video/`)){t(null);return}let n=URL.createObjectURL(e),r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{let e=Number.isFinite(r.duration)?r.duration:null;URL.revokeObjectURL(n),t(e)},r.onerror=()=>{URL.revokeObjectURL(n),t(null)},r.src=n}),dce=(e,t)=>e==null||!Number.isFinite(e)||e<=0?(t(`无法读取视频秒数,请检查视频文件是否损坏`),!1):eK7?(t(`视频素材最长不能超过 ${K7} 秒`),!1):!0,fce=({status:e})=>{let t=e||`-`,n=cce[t];return(0,$.jsx)(_Q,{color:n?.color||`default`,children:n?.label||t})},pce=()=>{let{message:e}=ex.useApp(),{refreshConfig:t}=z7(),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(20),[g,_]=(0,S.useState)(0),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(),[C,w]=(0,S.useState)(),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)([]),[F,I]=(0,S.useState)({}),[L,R]=(0,S.useState)({}),[z,B]=(0,S.useState)({}),[V,H]=(0,S.useState)({}),[U,ee]=(0,S.useState)(!1),[W,te]=(0,S.useState)(``),[G,ne]=(0,S.useState)(`Image`),[K]=pH.useForm(),re=(0,S.useRef)(null),ie=(0,S.useMemo)(()=>n.find(e=>e.id===i)||null,[n,i]),ae=async()=>{l(!0);try{let e=(await Z5({page:1,pageSize:100,status:`active`})).items||[];r(e),a(t=>t&&e.some(e=>e.id===t)?t:e[0]?.id)}catch(t){e.error(t?.message||`加载虚拟人像项目组失败`)}finally{l(!1)}},q=async(t=f,n=m)=>{if(!i){s([]),_(0);return}d(!0);try{let e=await Loe(i,{page:t,pageSize:n,keyword:v.trim()||void 0,status:b,assetType:C});s(e.items||[]),_(e.total||0),p(t),h(n)}catch(t){e.error(t?.message||`加载虚拟人像素材失败`)}finally{d(!1)}},oe=async()=>{await ae()};(0,S.useEffect)(()=>{oe()},[]),(0,S.useEffect)(()=>{i&&q(1,m)},[i]),(0,S.useEffect)(()=>(o.some(e=>e.status!==`Failed`&&e.status!==`Active`)&&i?re.current||=window.setInterval(()=>{q(f,m)},3e3):re.current&&=(clearInterval(re.current),null),()=>{re.current&&=(clearInterval(re.current),null)}),[o,i,f,m]);let se=async()=>{let t=await K.validateFields();O(!0);try{let n=await Poe(t);e.success(`虚拟人像项目组已创建`),E(!1),K.resetFields(),await ae(),a(n.id)}catch(t){e.error(t?.message||`创建项目组失败`)}finally{O(!1)}},ce=async()=>{if(!i){e.warning(`请先创建或选择项目组`);return}if(N.length===0){e.warning(`请先选择图片或视频素材`);return}let n=N.filter(e=>L[e.uid]===`uploaded`);if(n.length===0){e.warning(`请等待文件上传完成后再提交入库`);return}M(!0);try{for(let e of n){let t=e.originFileObj;if(!t)continue;let n=z[e.uid];if(!n)continue;H(t=>({...t,[e.uid]:`importing`}));let r=t.type.startsWith(`image/`)?`Image`:`Video`;await Ioe(i,{url:n.url,assetType:r,name:F[e.uid]?.trim()||t.name,videoDuration:n.duration_seconds,fileSize:n.file_size_bytes??t.size,mimeType:t.type||null,uploadResourceId:n.resource_id||null}),H(t=>({...t,[e.uid]:`imported`}))}e.success(`已成功提交 ${n.length} 个素材入库,处理中`),setTimeout(()=>{A(!1),P([]),I({}),R({}),B({}),H({})},1500),await Promise.all([ae(),q(1,m),t()])}catch(t){e.error(t?.message||`提交入库失败`)}finally{M(!1)}},le=async n=>{try{await Roe(n),e.success(`素材已删除,远端删除将异步执行`),await Promise.all([ae(),q(f,m),t()])}catch(t){e.error(t?.message||`删除素材失败`)}},ue=async()=>{if(i)try{await Foe(i),e.success(`项目组已删除,远端资产组将异步删除`),a(void 0),await oe()}catch(t){e.error(t?.message||`删除项目组失败`)}},de=t=>{let n=J7(t);if(!n){e.warning(`暂无可预览地址`);return}te(n),ne(t.assetType===`Video`?`Video`:`Image`),ee(!0)};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:`虚拟素材库`}),(0,$.jsx)(Q.Text,{type:`secondary`,children:`可提前上传虚拟人像素材,后续生成视频时可直接使用。`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(BI,{}),onClick:()=>E(!0),style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`创建项目组`})]}),(0,$.jsxs)(sq,{gutter:[10,10],children:[(0,$.jsx)(bR,{xs:24,lg:5,children:(0,$.jsx)(_L,{style:{borderRadius:16,minHeight:520,margin:`0 auto`,maxWidth:1200},children:(0,$.jsx)(tG,{spinning:c,children:n.length===0?(0,$.jsx)(lC,{description:`暂无虚拟人像项目组`}):(0,$.jsx)(yV,{orientation:`vertical`,style:{width:`100%`},size:10,children:n.map(e=>{let t=i===e.id;return(0,$.jsxs)(`div`,{onClick:()=>a(e.id),style:{padding:14,borderRadius:14,cursor:`pointer`,border:t?`1px solid #8b5cf6`:`1px solid #e2e8f0`,background:t?`#f5f3ff`:`#fff`},children:[(0,$.jsx)(yV,{style:{width:`100%`,justifyContent:`space-between`},align:`start`,children:(0,$.jsxs)(`div`,{style:{minWidth:0},children:[(0,$.jsx)(W7,{strong:!0,ellipsis:!0,style:{display:`block`},children:e.name}),e.description&&(0,$.jsx)(W7,{type:`secondary`,ellipsis:!0,style:{display:`block`,fontSize:12},children:e.description})]})}),(0,$.jsxs)(yV,{wrap:!0,size:4,style:{marginTop:10},children:[(0,$.jsxs)(_Q,{children:[`总 `,e.assetCount||0]}),(0,$.jsxs)(_Q,{color:`green`,children:[`图 `,e.imageAssetCount||0]}),(0,$.jsxs)(_Q,{color:`blue`,children:[`视频 `,e.videoAssetCount||0]})]})]},e.id)})})})})}),(0,$.jsx)(bR,{xs:24,lg:19,children:(0,$.jsxs)(_L,{title:ie?ie.name:`素材资产`,extra:(0,$.jsxs)(yV,{wrap:!0,children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(j8,{}),disabled:!i,onClick:()=>A(!0),style:{borderRadius:8,fontWeight:600,borderColor:`transparent`},children:`上传图片/视频`}),i&&(0,$.jsx)(AG,{title:`确认删除当前虚拟人像项目组吗?`,onConfirm:ue,children:(0,$.jsx)(X,{danger:!0,icon:(0,$.jsx)(jQ,{}),style:{borderRadius:8,fontWeight:600},children:`删除项目组`})})]}),style:{borderRadius:16,minHeight:520},children:[(0,$.jsxs)(yV,{style:{width:`100%`,marginBottom:16},wrap:!0,children:[(0,$.jsx)(JU.Search,{allowClear:!0,placeholder:`搜索素材名称`,value:v,onChange:e=>y(e.target.value),onSearch:()=>q(1,m),style:{width:240,borderRadius:8},enterButton:!0}),(0,$.jsx)(zC,{allowClear:!0,placeholder:`素材状态`,value:b,onChange:e=>x(e),style:{width:140,borderRadius:8},options:[{value:`Processing`,label:`处理中`},{value:`Active`,label:`可用`},{value:`Failed`,label:`失败`}]}),(0,$.jsx)(zC,{allowClear:!0,placeholder:`素材类型`,value:C,onChange:e=>w(e),style:{width:120,borderRadius:8},options:[{value:`Image`,label:`图片`},{value:`Video`,label:`视频`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>q(1,m),style:{borderRadius:8,fontWeight:600,borderColor:`transparent`},children:`筛选`})]}),(0,$.jsx)(tG,{spinning:u,children:i?o.length===0?(0,$.jsx)(lC,{description:`暂无素材,上传图片/视频后会异步入库`,style:{marginTop:80}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`,gap:14},children:o.map(e=>{let t=J7(e),n=e.assetType===`Video`;return(0,$.jsx)(_L,{hoverable:!0,styles:{body:{padding:12}},style:{borderRadius:16,overflow:`hidden`,borderColor:`#eef2f7`},cover:(0,$.jsxs)(`div`,{style:{height:170,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},children:[t?n&&e.videoCoverUrl?(0,$.jsx)(`img`,{src:t,alt:e.name||`视频封面`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(`video`,{src:t,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:t,alt:e.name||`虚拟人像素材`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):n?(0,$.jsx)(L8,{style:{fontSize:42,color:`#64748b`}}):(0,$.jsx)(C6,{style:{fontSize:42,color:`#64748b`}}),n&&(0,$.jsx)(_Q,{color:`blue`,style:{position:`absolute`,left:10,top:10},children:`视频`}),t&&(0,$.jsx)(X,{size:`small`,shape:`circle`,icon:(0,$.jsx)(EU,{}),style:{position:`absolute`,right:10,top:10},onClick:()=>de(e)}),n&&(0,$.jsx)(`div`,{style:{position:`absolute`,left:10,bottom:10,padding:`2px 6px`,borderRadius:8,background:`rgba(15,23,42,0.72)`,color:`#fff`,fontSize:12},children:lce(e.videoDuration)})]}),children:(0,$.jsxs)(yV,{direction:`vertical`,size:8,style:{width:`100%`},children:[(0,$.jsx)(kw,{title:e.name||e.remoteAssetId||e.id,children:(0,$.jsx)(`div`,{style:{fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name||e.remoteAssetId||`未命名素材`})}),(0,$.jsxs)(yV,{wrap:!0,size:4,children:[(0,$.jsx)(fce,{status:e.status}),(0,$.jsx)(_Q,{color:n?`blue`:`default`,children:n?`视频`:`图片`})]}),(0,$.jsx)(yV,{size:6,wrap:!0,children:(0,$.jsx)(AG,{title:`确认删除这个虚拟人像素材吗?`,onConfirm:()=>le(e.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(jQ,{}),children:`删除`})})})]})},e.id)})}),(0,$.jsx)(`div`,{style:{textAlign:`right`,marginTop:16},children:(0,$.jsx)(PW,{current:f,pageSize:m,total:g,showSizeChanger:!0,showTotal:e=>`共 ${e} 个素材`,onChange:(e,t)=>q(e,t)})})]}):(0,$.jsx)(lC,{description:`请先创建或选择项目组`,style:{marginTop:80}})})]})})]}),(0,$.jsx)(EG,{title:`创建虚拟人像项目组`,open:T,onCancel:()=>E(!1),onOk:se,confirmLoading:D,okText:`创建项目组`,children:(0,$.jsxs)(pH,{form:K,layout:`vertical`,children:[(0,$.jsx)(pH.Item,{name:`name`,label:`项目组名称`,rules:[{required:!0,message:`请输入项目组名称`}],children:(0,$.jsx)(JU,{placeholder:`例如:虚拟主播A / 品牌代言人B`,maxLength:128})}),(0,$.jsx)(pH.Item,{name:`description`,label:`描述`,children:(0,$.jsx)(JU.TextArea,{placeholder:`可填写人物设定、服装风格、素材要求等`,maxLength:2e3,rows:4})})]})}),(0,$.jsx)(EG,{title:`上传虚拟人像素材`,open:k,onCancel:()=>A(!1),onOk:ce,confirmLoading:j,okText:`提交入库`,width:650,okButtonProps:{disabled:N.length===0||N.some(e=>L[e.uid]!==`uploaded`)},children:(0,$.jsx)(`div`,{style:{maxHeight:600,overflow:`auto`,marginTop:30},children:(0,$.jsxs)(yV,{direction:`vertical`,style:{width:`100%`},size:14,children:[(0,$.jsx)(V1,{accept:`image/*,video/*`,fileList:N,multiple:!0,beforeUpload:async t=>{let n=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,r=t.type.startsWith(`image/`),i=URL.createObjectURL(t),a={uid:n,name:t.name,status:`uploading`,originFileObj:t,thumbUrl:i,type:t.type};P(e=>[...e,a]),I(e=>({...e,[n]:``})),R(e=>({...e,[n]:`uploading`}));try{let i=r?`Image`:`Video`,a=i===`Video`?await uce(t):null;if(i===`Video`&&!dce(a,e.error))return R(e=>({...e,[n]:`error`})),!1;let o=i===`Video`?await gae(t,a||void 0):await hae(t);B(e=>({...e,[n]:{url:o.url,duration_seconds:o.duration_seconds,file_size_bytes:o.file_size_bytes,resource_id:o.resource_id}})),R(e=>({...e,[n]:`uploaded`}))}catch{R(e=>({...e,[n]:`error`})),e.error(`文件 ${t.name} 上传失败`)}return!1},listType:`picture`,itemRender:(e,t,n)=>{let r=t.type?.startsWith(`video/`)||t.name.match(/\.(mp4|mov|avi|webm)$/i),i=L[t.uid],a=V[t.uid];return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:12,border:`1px solid #e5e7eb`,borderRadius:8,marginBottom:8},children:[(0,$.jsx)(`div`,{style:{width:64,height:64,borderRadius:8,overflow:`hidden`,flexShrink:0},children:t.thumbUrl||t.url?r?(0,$.jsx)(`video`,{src:t.thumbUrl||t.url,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`img`,{src:t.thumbUrl||t.url,alt:t.name,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#f1f5f9`},children:r?(0,$.jsx)(L8,{style:{color:`#94a3b8`,fontSize:20}}):(0,$.jsx)(C6,{style:{color:`#94a3b8`,fontSize:20}})})}),(0,$.jsx)(`span`,{style:{width:`20%`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,fontSize:13,color:`#64748b`,flexShrink:0},children:t.name}),(0,$.jsx)(JU,{style:{width:200,flexShrink:0},value:F[t.uid]||``,onChange:e=>I({...F,[t.uid]:e.target.value}),placeholder:`素材名称,默认使用文件名`,maxLength:256}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[i===`uploading`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(tG,{size:`small`,style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`},children:`上传中`})]}),i===`uploaded`&&!a&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#10b981`},children:`✓ 上传完成`}),i===`error`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`},children:`✗ 上传失败`}),a===`importing`&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(tG,{size:`small`,style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`},children:`入库中`})]}),a===`imported`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#10b981`},children:`✓ 已入库校验`}),a===`error`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`},children:`✗ 入库失败`})]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),P(e=>e.filter(e=>e.uid!==t.uid)),I(e=>{let n={...e};return delete n[t.uid],n}),R(e=>{let n={...e};return delete n[t.uid],n}),B(e=>{let n={...e};return delete n[t.uid],n}),H(e=>{let n={...e};return delete n[t.uid],n})},style:{width:28,height:28,borderRadius:`50%`,backgroundColor:`#f1f5f9`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(jQ,{style:{color:`#64748b`,fontSize:14}})})]})},children:(0,$.jsx)(X,{icon:(0,$.jsx)(j8,{}),children:`选择图片或视频`})}),(0,$.jsxs)(`div`,{style:{padding:12,background:`#f8fafc`,borderRadius:12,color:`#64748b`,fontSize:13},children:[`当前开放图片和视频,视频素材必须在 `,G7,`~`,K7,` 秒内;提交后会调用火山 CreateAsset 异步处理,状态变为 入库校验成功 后才可用于 AI 创作。`]})]})})}),(0,$.jsx)(EG,{title:`素材预览`,open:U,onCancel:()=>ee(!1),footer:null,width:760,destroyOnHidden:!0,children:(0,$.jsx)(`div`,{style:{minHeight:420,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#0f172a`,borderRadius:12,overflow:`hidden`},children:G===`Video`?(0,$.jsx)(`video`,{src:W,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:520}}):(0,$.jsx)(`img`,{src:W,alt:`素材预览`,style:{maxWidth:`100%`,maxHeight:520,objectFit:`contain`}})})})]})},{Title:mce,Text:hce,Paragraph:gce}=Q,Y7=e=>e===`aigc_virtual`?`aigc_virtual`:`real_person`,_ce=()=>{let[e,t]=On(),[n,r]=(0,S.useState)(()=>Y7(e.get(`portraitTab`))),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)(),u=async()=>{try{a(n===`aigc_virtual`?await X5():await J5())}catch(e){Z.error(e?.message||`加载配置失败`)}};(0,S.useEffect)(()=>{(async()=>{try{if(n===`aigc_virtual`){let[e,t]=await Promise.all([X5(),Z5({page:1,pageSize:100,status:`active`})]);a(e);let n=t.items||[];s(n),l(e=>e&&n.some(t=>t.id===e)?e:n[0]?.id)}else{let[e,t]=await Promise.all([J5(),Y5({pageSize:100,status:`active`})]);a(e);let n=t.items||[];s(n),l(e=>e&&n.some(t=>t.id===e)?e:n[0]?.id)}}catch(e){Z.error(e?.message||`加载数据失败`)}})()},[n]),(0,S.useMemo)(()=>o.find(e=>e.id===c)||null,[o,c]);let d=(0,S.useMemo)(()=>i?`已用 ${i.usedAssetCount||0} / ${i.assetLimit||0} 个素材,剩余 ${i.remainingAssetCount||0}`:`额度加载中`,[i]),f=(0,S.useMemo)(()=>[{key:`real_person`,label:`真人素材库`,children:(0,$.jsx)(sce,{})},{key:`aigc_virtual`,label:`虚拟素材库`,children:(0,$.jsx)(pce,{})}],[]);return(0,$.jsx)(nce,{refreshConfig:u,children:(0,$.jsx)(`div`,{children:(0,$.jsx)(hL,{activeKey:n,onChange:n=>{let i=Y7(n);r(i);let a=new URLSearchParams(e);a.set(`filterType`,`private_portrait`),a.set(`portraitTab`,i),t(a,{replace:!0})},items:f,destroyOnHidden:!1,tabBarExtraContent:(0,$.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:`#4f46e5`,marginTop:8},children:[d,`。真人/虚拟共用,图片/视频共用。`]})})})})},{Header:vce,Sider:yce,Content:bce}=rW,{TextArea:xce}=JU,{Option:Sce}=zC,{Text:X7}=Q,Cce=`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/api\/?$/i,``).replace(/\/$/,``),wce=e=>{if(!e)return``;let t=String(e).trim();return t?/^(https?:)?\/\//i.test(t)||/^(blob|data):/i.test(t)?t:`${Cce}${t.startsWith(`/`)?t:`/${t}`}`:``},Tce=()=>{let{message:e}=ex.useApp(),t=Ke(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(`1`),[o,s]=(0,S.useState)([]),{mediaType:c,countType:l,generationCount:u,selectedRatio:d,selectedResolution:f,width:p,height:m,videoDuration:h,videoAspectRatio:g,videoResolution:_,engineOptions:v,enginesele:y,inputValue:b,setMediaType:x,setCountType:C,setGenerationCount:w,setSelectedRatio:T,setSelectedResolution:E,setWidth:D,setHeight:O,setVideoDuration:k,setVideoAspectRatio:A,setVideoResolution:j,setEngineOptions:M,setEnginesele:N,setInputValue:P,currentMedia:F,setCurrentMedia:I}=s7(),L=Array.isArray(y)?{}:y,R=(c===`image`?L.image:L.video)?.find(e=>e.id===l),z=R?.maxImageCount??4,B=R?.maxVideoCount??1,V=!!R?.multiGenerationEnabled,H=V?Math.max(1,Math.min(5,Number(R?.maxGenerationCount||1))):1,U=c===`image`?F.filter(e=>e.type===`image`).length:0,ee=c===`image`?Math.max(1,Number(R?.multiImageMaxImages||15)-U):5,W=Math.max(1,Math.min(5,H,c===`image`?ee:5)),[te,G]=(0,S.useState)(!1),[ne,K]=(0,S.useState)(!1),[re,ie]=(0,S.useState)(!1),[ae,q]=(0,S.useState)(`universal`),[oe,se]=(0,S.useState)(null),[ce,le]=(0,S.useState)(null),[ue,de]=(0,S.useState)(null),[fe,pe]=(0,S.useState)(!1),[me,he]=(0,S.useState)(!1),[ge,_e]=(0,S.useState)(`real_person`),[ve,ye]=(0,S.useState)(!1),be=(0,S.useRef)(null),xe=(0,S.useCallback)(()=>{be.current&&=(window.clearTimeout(be.current),null),ye(!0)},[]),Se=(0,S.useCallback)(()=>{be.current&&window.clearTimeout(be.current),be.current=window.setTimeout(()=>{ye(!1),be.current=null},260)},[]),[Ce,we]=(0,S.useState)(!1),Te=(0,S.useRef)(null),Ee=(0,S.useRef)(!1),[De,Oe]=(0,S.useState)({top:0,left:0}),ke=e=>{let t=0,n=0,r=0;return e.map(e=>e.type===`image`?(t++,`图片${t}`):e.type===`video`?(n++,`视频${n}`):(r++,`音频${r}`))},[Ae,je]=(0,S.useState)(!1),[Me,Ne]=(0,S.useState)(``),[Pe,Fe]=(0,S.useState)(`image`),Ie=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(Ae&&Pe===`video`){let e=()=>{Ie.current&&Ie.current.play().catch(()=>{})};Ie.current&&(Ie.current.readyState>=2?e():Ie.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),Ie.current&&(Ie.current.removeEventListener(`loadedmetadata`,e),Ie.current.pause())}}else Ie.current&&Ie.current.pause()},[Ae,Pe]);let Le=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},Re=e=>{let t=Le(e);return t?Math.floor(Date.now()/1e3)>t:!1},[ze,Be]=(0,S.useState)(!1),[Ve,He]=(0,S.useState)(``),[Ue,We]=(0,S.useState)(`image`),[Ge,qe]=(0,S.useState)(``),Je=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(ze&&Ue===`video`&&Je.current){let e=Je.current;e.currentTime=0,e.muted=!1;let t=e.play();t&&typeof t.catch==`function`&&t.catch(()=>{e.muted=!0,e.play().catch(()=>{})})}else if(!ze&&Je.current){let e=Je.current;e.pause(),e.muted=!0,e.currentTime=0}},[ze,Ue,Ve]);let[Ye,Xe]=(0,S.useState)(null),[Ze,Qe]=(0,S.useState)(0),[$e,et]=(0,S.useState)(!1),[tt,nt]=(0,S.useState)(null),[rt,it]=(0,S.useState)({x:0,y:0}),[at,ot]=(0,S.useState)(!1),[st,ct]=(0,S.useState)(!1),[lt,ut]=(0,S.useState)([]),[dt,ft]=(0,S.useState)([]),[pt,mt]=(0,S.useState)({}),[ht,gt]=(0,S.useState)(!1),[_t,vt]=(0,S.useState)(!1),[yt,bt]=(0,S.useState)([]),[xt,St]=(0,S.useState)([]),[Ct,wt]=(0,S.useState)([]),Tt=()=>{let e={};if(e=Ct.find(e=>e.modelConfigId===l&&e.genType===c&&e.resolution===(c===`video`?_:f)),e||(c===`video`?(e={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(_===`1080p`||_===`720p`||_===`480p`)&&(e.ratio=1.3)):(e={perSecondCredits:.1,baseCredits:2,ratio:3,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(f===`2K`||f===`4K`||f===`1K`)&&(e.ratio=3))),c===`video`){let t=(h*e.perSecondCredits+e.baseCredits)*e.ratio,n=F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n)*(e.inputVideoRatio||1);t+=r}let r=F.filter(e=>e.type===`image`).length;if(r>0){let n=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*r)*(e.inputImageRatio||1);t+=n}return Number((t*u).toFixed(2))}else{let t=e.baseCredits*e.ratio,n=F.filter(e=>e.type===`image`).length;if(n>0){let r=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*n)*(e.inputImageRatio||1);t+=r}return Number((t*u).toFixed(2))}},Et=(0,S.useRef)(null),Dt=(0,S.useRef)(null),Ot=(0,S.useRef)(null);(0,S.useRef)(!0);let kt=(0,S.useRef)(!1),At=(0,S.useRef)(0);o.find(e=>e.id===i);let[jt,Mt]=(0,S.useState)([]),[Nt,Pt]=(0,S.useState)({page:1,pageSize:20}),[Ft,It]=(0,S.useState)(0),[Lt,Rt]=(0,S.useState)(!1);(0,S.useEffect)(()=>{let e=t.state;e&&(e.generationPrompt&&P(e.generationPrompt),e.mediaReferences&&Array.isArray(e.mediaReferences)&&e.mediaReferences.length>0&&I(e.mediaReferences.map(e=>{let t=e.url||e.resourceUrl||e.previewUrl||``,n=t.startsWith(`http`)?t:`https://ceshi.apiforeign.minzhongzc.com${t}`;return{...e,name:e.name||`参考${e.type}`,type:e.type===`video`?`video`:e.type===`audio`?`audio`:`image`,url:n,duration:e.duration||0,label:e.label||``}})),e.aspectRatio&&A(e.aspectRatio),window.history.replaceState({},``,window.location.pathname))},[t.state]),(0,S.useEffect)(()=>()=>{be.current&&window.clearTimeout(be.current)},[]);let zt=(0,S.useCallback)((e=`instant`)=>{let t=Dt.current;t&&(At.current=Date.now(),requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:e})}))},[]);(0,S.useEffect)(()=>{if(jt.length>0&&!kt.current){let e=setTimeout(()=>{zt(`smooth`),kt.current=!0},300);return()=>clearTimeout(e)}},[jt.length,zt]),(0,S.useEffect)(()=>{if(Ee.current){Ee.current=!1;return}if(!re)return;let e=Array.isArray(y)?{}:y,t=c===`image`?e.image:e.video;t&&t.length>0&&(t.some(e=>e.id===l)||C(t[0].id))},[c,y,re]),(0,S.useEffect)(()=>{re&&w(1)},[c,l,re,w]),(0,S.useEffect)(()=>{u>W&&(w(W),c===`image`&&e.info(`受当前引擎或参考图数量限制,本次最多生成 ${W} 份`))},[u,W,c,w,e]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;_t&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&vt(!1),ht&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&>(!1),at&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ot(!1),st&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ct(!1),fe&&!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&pe(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[_t,ht,at,st,fe]),(0,S.useEffect)(()=>{if(Ee.current){Ee.current=!1;return}if(c!==`video`)return;let e=L.video?.find(e=>e.id===l);if(!e)return;let t=e.supportsFirstLastFrame??!1,n=e.supportsUniversalReference??!0;q(e=>n?`universal`:e===`universal`&&!n&&t?`first_last_frame`:e)},[l,c,y]),(0,S.useEffect)(()=>{S5().then(e=>{if(N(e.engine),ie(!0),e.engine.video&&e.engine.video.length>0){let t=e.engine.video[0],n=e.engine.video.find(e=>e.id===l)||t;M({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]}),n.supportedRatios?.includes(g)||A(n.supportedRatios?.[0]||`16:9`),n.supportedResolutions?.includes(_)||j(n.supportedResolutions?.[0]||`720p`),n.supportedDurations?.includes(h)||k(n.supportedDurations?.[0]||5),l===`请选择`&&C(n.id)}if(e.engine.image&&e.engine.image.length>0){let t=e.engine.image.find(e=>e.id===l)||e.engine.image[0],n=t.supportedSizes||{},r=Object.keys(n).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),i=r[0]||`2K`,a=Object.keys(n[i]||{});if(ut(a.map(e=>({value:e,label:e}))),mt(n),ft(r.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),n[i]&&n[i][a[0]]){let[e,t]=n[i][a[0]].split(/[×x]/);D(Number(e)),O(Number(t)),T(a[0]),E(i)}l===`请选择`&&C(t.id)}}).catch(()=>{}),E5().then(e=>{wt(e)}),C5(Nt).then(e=>{let t=e.total;Mt(e.items),It(t)})},[]),(0,S.useEffect)(()=>{if(Ot.current&&=(clearInterval(Ot.current),null),jt.some(e=>e.status===`generating`))return Ot.current=window.setInterval(()=>{C5(Nt).then(e=>{Mt(t=>t.map(t=>t.status===`generating`&&e.items.find(e=>e.id===t.id)||t)),It(e.total)}).catch(e=>{})},1e4),()=>{Ot.current&&=(clearInterval(Ot.current),null)}},[jt,Nt]),(0,S.useEffect)(()=>{if(!at)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ot(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[at]),(0,S.useEffect)(()=>{if(!st)return;let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&ct(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[st]);let Bt=e=>{let t=Object.keys(pt).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),n=pt[f]&&pt[f][e]?f:t.find(t=>pt[t]&&pt[t][e])||t[0];if(n&&pt[n]&&pt[n][e]){let[t,r]=pt[n][e].split(/[×x]/);D(Number(t)),O(Number(r)),T(e),E(n)}},Vt=e=>{pt[e]||(e=Object.keys(pt).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)})[0]||e);let t=pt[e]?Object.keys(pt[e]):[];ut(t.map(e=>({value:e,label:e})));let n=t.includes(d)?d:t[0]||``;if(n&&pt[e]&&pt[e][n]){let[t,r]=pt[e][n].split(/[×x]/);D(Number(t)),O(Number(r)),T(n),E(e)}},Ht=()=>{D(m),O(p)},Ut=y?.video?.find(e=>e.id===l),Wt=Ut?.supportsFirstLastFrame??!1,Gt=Ut?.supportsUniversalReference??!0,Kt=e=>{e===`first_last_frame`&&!Wt||e===`universal`&&!Gt||(q(e),pe(!1),I([]),P(``))},qt=()=>{let e=oe;se(ce),le(e)},Jt=()=>{se(null),le(null)},Yt=()=>{le(null)},Xt=async()=>{let t=c===`video`&&ae===`first_last_frame`;if(t){if(!b.trim()){e.warning(`请输入内容`);return}}else if(!b.trim()&&F.length===0){e.warning(`请输入内容或上传图片/视频`);return}let n=e=>e.replace(/([A-Z])/g,`_$1`).toLowerCase(),r=e=>!e||typeof e!=`object`?e:Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map(([e,t])=>[n(e),r(t)])),i;t?(i=[],oe&&i.push(r({...oe,role:`first_frame`})),ce&&i.push(r({...ce,role:`last_frame`})),i.length===0&&(i=void 0)):i=F.length>0?F.map(e=>{if(e.type===`image`){let{duration:t,...n}=e;return r(n)}return r(e)}):void 0;let a={id:``,gen_type:c,original_prompt:b.trim(),engine_id:l,idempotency_key:new Date().toLocaleString(`zh-CN`),generation_count:u,media_references:i,...c===`image`&&{image_size:f,image_proportion:d,image_px:p+`x`+m},...c===`video`&&{duration:h,aspect_ratio:g,resolution:_}};K(!0),Fae(a).then(()=>{P(``),I([]),se(null),le(null),w(1);let e={...Nt,page:1};Pt(e),C5(e).then(e=>{let t=e.items.map(e=>(e.media_references&&Array.isArray(e.media_references)&&(e.mediaReferences=e.media_references.map(e=>({...e,display_url:e.display_url||e.displayUrl,preview_url:e.preview_url||e.previewUrl,private_asset_id:e.private_asset_id||e.privateAssetId,provider_url:e.provider_url||e.providerUrl,remote_asset_id:e.remote_asset_id||e.remoteAssetId}))),e)),n=Array.isArray(t)&&t.length>0?t[t.length-1]:null;n&&Mt(e=>[...e,n]),It(e.total),setTimeout(()=>{Et.current?.scrollIntoView({behavior:`smooth`})},100)}).catch(e=>{})}).catch(t=>{let n=`创建任务失败`;t?.response?.data?.detail?n=t.response.data.detail:t?.data?.detail?n=t.data.detail:t?.detail?n=t.detail:t?.message&&(n=t.message),e.error({content:n,duration:3})}).finally(()=>{K(!1)}),setTimeout(()=>{K(!1)},3e3)},Zt=async()=>{if(jt.length>=Ft)return;let e=Dt.current;if(!e)return;let t=e.scrollTop,n=e.scrollHeight;Rt(!0);try{let r=Nt.page+1,i=await C5({...Nt,page:r}),a=Array.isArray(i)?{items:i,total:i.length}:i;a.total&&It(a.total),Pt(e=>({...e,page:r})),Mt(e=>{let t=new Set(e.map(e=>e.id));return[...(a.items||[]).filter(e=>!e.id||t.has(e.id)?!1:(t.add(e.id),!0)).reverse(),...e]}),setTimeout(()=>{e.scrollTop=t+(e.scrollHeight-n)},200)}catch{}finally{Rt(!1)}},Qt=e=>new Promise((t,n)=>{let r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{window.URL.revokeObjectURL(r.src),t(r.duration)},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法获取视频时长`))},r.src=URL.createObjectURL(e)}),$t=e=>new Promise((t,n)=>{let r=document.createElement(`audio`);r.preload=`metadata`,r.onloadedmetadata=()=>{URL.revokeObjectURL(r.src),t(r.duration)},r.onerror=()=>{URL.revokeObjectURL(r.src),n(Error(`无法获取音频时长`))},r.src=URL.createObjectURL(e)}),en=e=>{let t=e.startsWith(`http`)?e:`https://ceshi.apiforeign.minzhongzc.com${e}`;if(Ye===t){let e=document.getElementById(`audio-player`);e&&e.pause(),Xe(null)}else Xe(t)},tn=e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>{window.URL.revokeObjectURL(r.src),t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法读取图片尺寸`))},r.src=URL.createObjectURL(e)}),nn=e=>new Promise((t,n)=>{let r=document.createElement(`video`);r.preload=`metadata`,r.onloadedmetadata=()=>{window.URL.revokeObjectURL(r.src),t({width:r.videoWidth,height:r.videoHeight,duration:r.duration})},r.onerror=()=>{window.URL.revokeObjectURL(r.src),n(Error(`无法读取视频尺寸`))},r.src=URL.createObjectURL(e)}),rn=(e,t)=>{if(e<300||e>6e3)return`图片宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`图片高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;return n<.4||n>2.5?`图片宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`:null},an=(e,t)=>{if(e<300||e>6e3)return`视频宽度需在 300~6000px 之间,当前为 ${e}px`;if(t<300||t>6e3)return`视频高度需在 300~6000px 之间,当前为 ${t}px`;let n=e/t;if(n<.4||n>2.5)return`视频宽高比需在 0.4~2.5 之间,当前为 ${n.toFixed(2)}`;let r=e*t;return r<409600?`视频总像素数过小(${e}×${t}=${r}),需 ≥ 640×640=409600`:r>8295044?`视频总像素数过大(${e}×${t}=${r}),需 ≤ 3326×2494=8295044`:null},on=async(t,n)=>{let r=t.type.startsWith(`image/`),i=t.type.startsWith(`video/`);if(c===`video`&&ae===`first_last_frame`){if(!r)return e.error(`首尾帧模式仅支持上传图片`),!1;if(t.size/1024/1024>10)return e.error(`图片大小不能超过10MB`),!1;try{let{width:n,height:r}=await tn(t),i=rn(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let i=n||ue;if(!i)return e.error(`请选择首帧或尾帧上传位置`),!1;G(!0);try{let n=await o5(t),r={name:t.name,type:`image`,url:n.url,role:i===`first`?`first_frame`:`last_frame`};i===`first`?se(r):le(r),e.success(`图片上传成功`)}catch(t){let n=t?.response?.data?.message||t?.response?.data?.detail||t?.message||`上传失败`;e.error(n)}finally{G(!1),de(null)}return!1}let a=t.type.startsWith(`audio/`);if(!r&&!i&&!a)return e.error(`仅支持图片、视频或音频文件`),!1;if(a){let n=t.name.split(`.`).pop()?.toLowerCase();if(![`wav`,`mp3`].includes(n||``))return e.error(`音频仅支持wav和mp3格式`),!1}if(c===`image`&&(i||a))return e.error(`图片模式仅支持上传图片`),!1;if(a&&c!==`video`)return e.error(`仅视频模式支持上传音频`),!1;let o=i?100:a?50:10,s=i?`视频`:a?`音频`:`图片`;if(t.size/1024/1024>o)return e.error(`${s}大小不能超过${o}MB`),!1;if(r)try{let{width:n,height:r}=await tn(t),i=rn(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let l=F.filter(e=>e.type===`image`).length;if(r&&l>=Nn)return e.error(`该引擎最多上传${Nn}张图片`),!1;let u=F.filter(e=>e.type===`video`).length;if(i&&u>=Pn)return e.error(`该引擎最多上传${Pn}个视频`),!1;let d=F.filter(e=>e.type===`audio`).length;if(a&&d>=Fn)return e.error(`该引擎最多上传${Fn}个音频`),!1;let f=0,p=0;if(i)try{if(f=await Qt(t),f<2)return e.error(`视频素材最短不能少于 2 秒`),!1;let n=F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n+f>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${(n+f).toFixed(1)} 秒`),!1;let{width:r,height:i}=await nn(t),a=an(r,i);if(a)return e.error(a),!1}catch{return e.error(`无法获取视频信息,请检查文件是否损坏`),!1}if(a)try{if(p=await $t(t),p<2)return e.error(`音频素材最短不能少于 2 秒`),!1;let n=F.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0);if(n+p>15)return e.error(`所有音频素材总时长不能超过 15 秒,当前 ${(n+p).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取音频信息,请检查文件是否损坏`),!1}G(!0);try{let e;e=r?await o5(t):a?await a5(t,p):await s5(t,f);let n=r?`image`:a?`audio`:`video`,o=[...F,{name:t.name,type:n,url:e.url,label:``,...i&&{duration:f},...a&&{duration:p}}],s=ke(o);I(o.map((e,t)=>({...e,label:s[t]})))}catch(t){let n=t?.response?.data?.message||t?.response?.data?.detail||t?.message||`上传失败`;e.error(n)}finally{G(!1)}return!1},sn=async t=>{let n=t.type.startsWith(`image/`),r=t.type.startsWith(`video/`),i=t.type.startsWith(`audio/`);if(!n&&!r&&!i)return e.error(`仅支持图片、视频或音频文件`),!1;let a=r?100:i?50:30;if(t.size/1024/1024>a)return e.error(`${r?`视频`:i?`音频`:`图片`}大小不能超过${a}MB`),!1;if(n||r){let n=s7.getState().currentMedia.filter(e=>e.type===`image`||e.type===`video`).reduce((e,t)=>e+(Number(t.fileSizeBytes)||0),0),r=(n+t.size)/1024/1024;if(r>64)return e.error(`所有图片和视频总大小不能超过64MB,当前已${(n/1024/1024).toFixed(1)}MB,加上此文件后${r.toFixed(1)}MB`),!1}if(i){let n=t.name.split(`.`).pop()?.toLowerCase();if(![`wav`,`mp3`].includes(n||``))return e.error(`音频仅支持wav和mp3格式`),!1}if(n)try{let{width:n,height:r}=await tn(t),i=rn(n,r);if(i)return e.error(i),!1}catch{return e.error(`无法读取图片尺寸,请检查文件是否损坏`),!1}let o=0,s=0;if(r)try{if(o=await Qt(t),o<2)return e.error(`视频素材最短不能少于 2 秒`),!1;let n=s7.getState().currentMedia.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0);if(n+o>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${(n+o).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取视频信息,请检查文件是否损坏`),!1}if(i)try{if(s=await $t(t),s<2)return e.error(`音频素材最短不能少于 2 秒`),!1;let n=s7.getState().currentMedia.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0);if(n+s>15)return e.error(`所有音频素材总时长不能超过 15 秒,当前 ${(n+s).toFixed(1)} 秒`),!1}catch{return e.error(`无法获取音频信息,请检查文件是否损坏`),!1}let c=n?`image`:i?`audio`:`video`,l={name:t.name,type:c,url:``,label:``,...r&&{duration:o},...i&&{duration:s}},u=s7.getState().currentMedia;if(!un(u,[l]))return!1;try{let e;return e=n?await o5(t):i?await a5(t,s):await s5(t,o),{name:l.name,type:l.type,url:e.url,label:l.label||``,fileSizeBytes:t.size,...l.duration!==void 0&&{duration:l.duration}}}catch(t){let n=t?.response?.data?.message||t?.response?.data?.detail||t?.message||`上传失败`;return e.error(n),!1}},cn=async t=>{let n=0,r=0;G(!0);for(let e of t){let t=await sn(e);if(t){let e=[...s7.getState().currentMedia,t],r=ke(e);I(e.map((e,t)=>({...e,label:r[t]}))),n++}else r++}G(!1),n>0&&e.success(`成功上传${n}个文件${r>0?`,${r}个文件上传失败`:``}`)},ln=(e,t)=>e.filter(e=>e.type===t).reduce((e,t)=>e+(Number(t.duration)||0),0),un=(t,n)=>{if(!n.length)return!1;if(c===`image`&&n.some(e=>e.type!==`image`))return e.error(`图片模式仅支持添加图片素材`),!1;if(n.some(e=>e.type===`audio`)&&c!==`video`)return e.error(`仅视频模式支持添加音频素材`),!1;let r=t.filter(e=>e.type===`image`).length,i=t.filter(e=>e.type===`video`).length,a=t.filter(e=>e.type===`audio`).length,o=n.filter(e=>e.type===`image`).length,s=n.filter(e=>e.type===`video`).length,l=n.filter(e=>e.type===`audio`).length;if(r+o>Nn)return e.error(`该引擎最多上传${Nn}张图片,当前还能添加 ${Math.max(0,Nn-r)} 张`),!1;if(i+s>Pn)return e.error(`该引擎最多上传${Pn}个视频,当前还能添加 ${Math.max(0,Pn-i)} 个`),!1;if(a+l>Fn)return e.error(`该引擎最多上传${Fn}个音频,当前还能添加 ${Math.max(0,Fn-a)} 个`),!1;for(let t of n){if(t.type!==`video`)continue;let n=Number(t.duration);if(!Number.isFinite(n)||n<=0)return e.error(`${t.name||`视频素材`}缺少视频秒数,不能用于 AI 创作`),!1;if(n<2)return e.error(`${t.name||`视频素材`}最短不能少于 2 秒`),!1;if(n>15)return e.error(`${t.name||`视频素材`}最长不能超过 15 秒`),!1}let u=ln(t,`video`)+ln(n,`video`);if(u>15)return e.error(`所有视频素材总时长不能超过 15 秒,当前 ${u.toFixed(1)} 秒`),!1;let d=ln(t,`audio`)+ln(n,`audio`);return d>15?(e.error(`所有音频素材总时长不能超过 15 秒,当前 ${d.toFixed(1)} 秒`),!1):!0},dn=t=>{let n=t.mediaReference,r=n?.type||t.resourceType,i=n?.url||t.resourceUrl||t.displayUrl||t.previewUrl||``;if(!i)return e.error(`${t.fileName||t.id} 缺少素材地址,不能用于 AI 创作`),null;if(r===`audio`&&c!==`video`)return e.error(`仅视频模式支持添加音频素材`),null;let a=Number(n?.duration??t.durationSeconds);return{name:n?.name||t.fileName||t.id,type:r,url:i,source:`upload_resource`,upload_resource_id:t.id,label:``,...(r===`video`||r===`audio`)&&Number.isFinite(a)&&a>0?{duration:a}:{}}},fn=t=>{let n=t.map(dn).filter(Boolean);if(!n.length)return;let r=s7.getState().currentMedia;if(!un(r,n))return;let i=[...r,...n],a=ke(i);I(i.map((e,t)=>({...e,label:a[t]}))),e.success(`已添加 ${n.length} 个历史上传素材参考`)},pn=t=>{if(t.assetType===`Audio`)return e.error(`音频私域素材暂不支持用于 AI 创作`),null;let n=t.assetType===`Video`?`video`:`image`,r=ge===`aigc_virtual`?`虚拟素材`:`真人素材`,i=n===`video`?t.videoCoverUrl||t.previewUrl||t.displayUrl||t.providerUrl||``:t.previewUrl||t.displayUrl||t.videoCoverUrl||t.providerUrl||``;return{name:t.name||r,type:n,url:i,source:`private_portrait_asset`,private_asset_id:t.id,label:``,...n===`video`&&{duration:Number(t.videoDuration)||void 0}}},mn=e=>{_e(e),he(!0)},hn=t=>{let n=t.map(pn).filter(Boolean),r=s7.getState().currentMedia;if(!un(r,n))return;let i=[...r,...n],a=ke(i);I(i.map((e,t)=>({...e,label:a[t]}))),e.success(`已添加 ${n.length} 个${ge===`aigc_virtual`?`虚拟`:`真人`}素材参考`)},gn=e=>e?e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,_n=e=>{let t=F.filter((t,n)=>n!==e),n=ke(t);I(t.map((e,t)=>({...e,label:n[t]})))},vn=(e,t)=>{let n=e.selectionStart;return t.slice(0,n).match(/@([^@\s]*)$/)&&F.length>0?(we(!0),!0):(we(!1),!1)},yn=e=>/[\u4e00-\u9fa5]/.test(e),bn=e=>{if(!e.trim())return 0;if(yn(e))return e.replace(/\s/g,``).length;{let t=e.trim().split(/\s+/);return t[0]===``?0:t.length}},xn=e=>e.trim()?yn(e)?500:1e3:500,Sn=e=>{let t=e.target.value,n=xn(t);if(bn(t)<=n)P(t),vn(e.target,t);else if(yn(t)){let r=t,i=0;for(let e=0;en)){r=t.slice(0,e);break}P(r),vn(e.target,r)}else{let r=t.trim().split(/\s+/).slice(0,n).join(` `);P(r),vn(e.target,r)}},Cn=e=>{Ce&&e.key===`Escape`&&we(!1)},wn=e=>{let t=Te.current?.resizableTextArea?.textArea;if(!t)return;let n=t.selectionStart,r=b.slice(0,n),i=b.slice(n),a=r.lastIndexOf(`@`);if(a===-1){we(!1);return}P(r.slice(0,a)+`@${e} `+i),we(!1),setTimeout(()=>{let n=a+e.length+2;t.focus(),t.setSelectionRange(n,n)},0)},Tn=()=>{je(!1),Ne(``),Ie.current&&Ie.current.pause()},En=e=>{if(e.preventDefault(),e.stopPropagation(),!Me)return;let t=Me.replace(`/static`,``).replace(/&w=\d+/i,``).replace(/&q=\d+/i,``);t.includes(`download=1`)||(t+=`&download=1`);let n=document.createElement(`a`);n.href=t,n.download=Pe===`image`?`image.png`:`video.mp4`,document.body.appendChild(n),n.click(),document.body.removeChild(n)},Dn=e=>{let t=String(e?.type||``).toLowerCase(),n=String(e?.url||e?.name||``).toLowerCase();return t.includes(`video`)||/\.(mp4|mov|avi|webm|m4v)(\?|$)/.test(n)?`video`:t.includes(`audio`)||/\.(mp3|wav|ogg|aac|m4a)(\?|$)/.test(n)?`audio`:`image`},On=e=>e?/^https?:\/\//i.test(e)?e:`https://ceshi.apiforeign.minzhongzc.com${e}`:``,kn=e=>{e?.url&&(He(e.url),We(Dn(e)),qe(e.name||`附件`),Be(!0))},An=c===`video`&&ae===`first_last_frame`,jn=!te&&(An?!!(b.trim()||oe):!!(b.trim()||F.length>0)),Mn=c===`image`?`输入画面描述,或上传图片参考风格、构图、主体与光影。例:@图片1 参考色调,生成一张简洁高级的产品海报。`:An?`首帧尾帧可以不传,如需传入建议描述首帧到尾帧的主体动作、镜头运动、节奏与转场。例:从首帧自然推进到尾帧,产品居中突出,动作平滑连贯。`:`上传最多12个参考素材,输入文字或 @ 引用参考内容,自由组合图、文、视频。例:@图片1 模仿 @视频1 的动作。`,Nn=z,Pn=B,Fn=R?.maxAudioCount??1;return(0,$.jsxs)(rW,{className:`ai-create-page`,style:{margin:`-24px -32px -32px`,borderRadius:22,height:`calc(100vh - 34px)`,background:`rgba(255, 255, 255, 0.52)`,overflow:`hidden`},children:[(0,$.jsx)(`audio`,{id:`audio-player`,src:Ye||null,autoPlay:!0,onEnded:()=>Xe(null),style:{display:`none`}}),(0,$.jsxs)(rW,{style:{display:`flex`,flex:1,background:`rgba(255, 255, 255, 0.52)`},children:[(0,$.jsx)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`16px 24px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`,backdropFilter:`blur(22px)`,border:`1px solid rgba(231, 234, 240, 0.82)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(`div`,{style:{width:`15%`,height:1,background:`linear-gradient(90deg, transparent, rgba(117,106,136,0.18), rgba(232,227,236,0.48), transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,textAlign:`center`},children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`AI创作`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#667085`,margin:`4px 0 0 0`},children:`输入想法、剧本或上传参考,智能生成视频/图片`})]}),(0,$.jsx)(`div`,{style:{width:`15%`,height:1,background:`linear-gradient(90deg, transparent, rgba(232,227,236,0.48), rgba(117,106,136,0.18), transparent)`,borderRadius:1}})]})}),(0,$.jsxs)(bce,{style:{flex:1,margin:0,padding:`20px 24px 22px`,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minHeight:0},children:[jt.length===0&&(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:50,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:16},children:(0,$.jsx)(q6,{style:{fontSize:40,color:`#fff`}})}),(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:500,color:`#2f3440`},children:`你好,想创作什么?`}),(0,$.jsx)(`p`,{style:{margin:8,fontSize:13,color:`#98a2b3`},children:`输入想法、剧本或上传参考,开始你的创作之旅`})]}),jt.length>0&&(0,$.jsxs)(`div`,{ref:Dt,className:`ai-create-scroll`,style:{flex:1,overflowY:`auto`,paddingRight:10,paddingBottom:18},onScroll:e=>{let t=e.currentTarget;!(Date.now()-At.current<500)&&kt.current&&t.scrollTop<=50&&!Lt&&jt.length{let t=e;return jt.map(e=>(0,$.jsx)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`flex-start`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:36,height:36,borderRadius:12,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,$.jsx)(q6,{style:{color:`#fff`,fontSize:16}})}),(0,$.jsx)(`div`,{style:{flex:1},children:(0,$.jsxs)(`div`,{style:{background:`rgb(255, 255, 255)`,backdropFilter:`blur(18px)`,borderRadius:`22px`,padding:`14px 16px`,width:`70%`,minWidth:500,boxSizing:`border-box`,boxShadow:`0 18px 50px rgba(47, 52, 64, 0.075)`,position:`relative`,border:`1px solid rgba(231, 234, 240, 0.9)`},children:[(0,$.jsxs)(`div`,{style:{margin:4,fontSize:11,color:`#98a2b3`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:8,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:e.createdAt?.replace(`T`,` `).split(`.`)[0]}),(0,$.jsx)(`span`,{style:{background:(e.genType,`rgba(139, 92, 246, 0.10)`),color:(e.genType,`#8b5cf6`),padding:`2px 8px`,borderRadius:12,fontWeight:500,fontSize:11,marginLeft:8},children:e.genType===`image`?`图片生成`:`视频生成`})]}),e.mediaReferences&&e.mediaReferences.length>0&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8,zIndex:100},children:(0,$.jsx)(`span`,{style:{padding:`4px 12px`,borderRadius:16,color:`#8b5cf6`,cursor:`pointer`,fontWeight:500,border:`1px solid rgba(139, 92, 246, 0.2)`,background:`rgba(139, 92, 246, 0.04)`},onClick:t=>{t.stopPropagation();let n=t.currentTarget.getBoundingClientRect();it({x:n.left,y:n.top-10}),nt(e.id),et(!0)},children:`附件详情`})}),(0,$.jsxs)(`div`,{style:{position:`absolute`,bottom:8,right:8,zIndex:100,display:`flex`,gap:6},children:[(0,$.jsxs)(`button`,{onClick:n=>{n.stopPropagation(),P(e.originalPrompt||``);let r=!0,i=e.engineId||e.engineSnapshot?.id||e.engine_id;if(i&&e.genType){let n=Array.isArray(y)?{}:y,a=(e.genType===`image`?n.image:n.video)?.find(e=>e.id===i);if(a){if(C(a.id),e.genType===`video`&&M({ratios:a.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:a.supportedResolutions||[`480p`,`720p`,`1080p`],durations:a.supportedDurations||[5,8,10,12,15]}),e.genType===`image`){let e=a.supportedSizes||{},t=Object.keys(e).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),n=t[0]||`2K`,r=Object.keys(e[n]||{});if(ut(r.map(e=>({value:e,label:e}))),mt(e),ft(t.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),e[n]&&e[n][r[0]]){let[t,i]=e[n][r[0]].split(/[×x]/);D(Number(t)),O(Number(i)),T(r[0]),E(n)}}}else t.error(`该引擎已删除,无法重新编辑`),r=!1}if(r){if(e.genType&&(Ee.current=!0,x(e.genType)),e.mediaReferences&&e.mediaReferences.length>0)if(e.mediaReferences.some(e=>e.role===`first_frame`||e.role===`last_frame`)&&e.genType===`video`){let t=e.mediaReferences.find(e=>e.role===`first_frame`),n=e.mediaReferences.find(e=>e.role===`last_frame`);se(t?{...t,label:t.label||``,duration:t.duration}:null),le(n?{...n,label:n.label||``,duration:n.duration}:null),I([]),q(`first_last_frame`)}else if(I(e.mediaReferences.map(e=>({...e,name:e.name,type:e.type,url:e.url,label:e.label||``,role:e.role,duration:e.duration}))),se(null),le(null),e.genType===`video`){let e=L.video?.find(e=>e.id===i);if(e){let t=e.supportsUniversalReference??!0,n=e.supportsFirstLastFrame??!1;q(t?`universal`:n?`first_last_frame`:`universal`)}else q(`universal`)}else q(`universal`);else if(I([]),se(null),le(null),e.genType===`video`){let e=y?.video?.find(e=>e.id===i);if(e){let t=e.supportsUniversalReference??!0,n=e.supportsFirstLastFrame??!1;q(t?`universal`:n?`first_last_frame`:`universal`)}}t.success(`已加载到编辑区`)}},style:{height:28,padding:`0 10px`,borderRadius:10,border:`none`,background:`rgba(139, 92, 246, 0.08)`,color:`#8b5cf6`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,gap:4,fontSize:12},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`},children:[(0,$.jsx)(IK,{style:{fontSize:12}}),`重新编辑`]}),(0,$.jsx)(AG,{title:`确定要删除吗?`,onConfirm:async()=>{try{await Iae(e.id),t.success(`删除成功`),Mt(t=>t.filter(t=>t.id!==e.id)),It(e=>e-1)}catch(e){let n=e?.response?.data?.message||e?.message||`删除失败`;t.error(n)}},okText:`确定`,cancelText:`取消`,children:(0,$.jsxs)(`button`,{onClick:e=>e.stopPropagation(),style:{height:28,padding:`0 10px`,borderRadius:10,border:`none`,background:`rgba(139, 92, 246, 0.08)`,color:`#8b5cf6`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`,gap:4,fontSize:12},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(164, 91, 91, 0.1)`,e.currentTarget.style.color=`#A45B5B`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},children:[(0,$.jsx)(jQ,{style:{fontSize:12}}),`删除`]})})]}),(e.status===`generating`||e.status===`failed`||e.status===`completed`)&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16,marginTop:16,width:`100%`,alignItems:`flex-start`},children:[(0,$.jsx)(`div`,{style:{width:`50%`,overflow:`hidden`,borderRadius:12,position:`relative`,height:220,border:`1px solid #E7EAF0`,boxShadow:`0 4px 12px rgba(139, 92, 246, 0.08)`,background:`linear-gradient(135deg, #ffffff 0%, #FAFBFC 100%)`},children:(0,$.jsx)(Xse,{task:e,resolveUrl:wce,onPreview:(e,t)=>{Ne(e),Fe(t),je(!0)}})}),(0,$.jsxs)(`div`,{style:{width:`50%`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,$.jsx)(`div`,{style:{background:`#FFFFFF`,borderRadius:12,padding:12,border:`1px solid #E7EAF0`,flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`p`,{style:{width:`100%`,height:150,overflow:`auto`,padding:0,marginTop:0,marginBottom:0,lineHeight:2,color:`#475467`,fontSize:13},children:e.originalPrompt})}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#667085`,textAlign:`left`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#8b5cf6`,fontWeight:500},children:e.engineSnapshot?.name||`未知引擎`}),(0,$.jsx)(`span`,{style:{borderRadius:16,color:`#667085`},children:e.genType===`image`?`${e.imageProportion||``} · ${e.imagePx||``} · ${e.imageSize||``}`:`${e.duration||``}秒 · ${e.aspectRatio||``} · ${e.resolution||``}`}),(0,$.jsxs)(`span`,{style:{fontSize:14,borderRadius:16,color:`#8b5cf6`},children:[`消耗积分:`,e.creditsCost]})]})]})]})]})})]})},e.id))})(),(0,$.jsx)(`div`,{ref:Et})]}),$e&&tt&&(()=>{let e=jt.find(e=>e.id===tt)?.mediaReferences||[];return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`transparent`,zIndex:9998},onClick:()=>{et(!1),nt(null)}}),(0,$.jsxs)(`div`,{className:`ai-reference-expanded-tray ai-attachment-popover`,style:{position:`fixed`,top:`max(84px, ${rt.y-96}px)`,left:`max(24px, min(${rt.x-250}px, calc(100vw - 456px)))`,width:424,padding:`12px 12px 10px`,borderRadius:18,background:`rgba(255,255,255,0.98)`,border:`1px solid #E7EAF0`,boxShadow:`0 24px 60px rgba(31, 41, 55, 0.12)`,backdropFilter:`blur(18px)`,zIndex:9999,pointerEvents:`auto`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:10},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#344054`,fontWeight:800},children:`参考附件`}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98A2B3`,fontWeight:600},children:`点击素材查看,或直接下载原文件`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:(0,$.jsx)(`button`,{onClick:()=>{et(!1),nt(null)},style:{width:26,height:26,borderRadius:`50%`,border:`1px solid transparent`,background:`#F6F7FA`,cursor:`pointer`,color:`#98a2b3`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#EEF1F6`,e.currentTarget.style.color=`#2f3440`},onMouseLeave:e=>{e.currentTarget.style.background=`#F6F7FA`,e.currentTarget.style.color=`#98a2b3`},children:(0,$.jsx)(ju,{style:{fontSize:12}})})})]}),(0,$.jsx)(`div`,{className:`ai-reference-tray-scroll`,style:{display:`flex`,gap:10,overflowX:`auto`,padding:`2px 2px 4px`},children:e.map((e,t)=>{let n=Dn(e),r=e.label||(e.role===`first_frame`?`首帧`:e.role===`last_frame`?`尾帧`:`${n===`image`?`图片`:n===`video`?`视频`:`音频`}${t+1}`);return(0,$.jsxs)(`div`,{style:{flex:`0 0 92px`,width:92,borderRadius:16,background:`#FFFFFF`,border:`1px solid #E7EAF0`,boxShadow:`0 8px 18px rgba(31, 41, 55, 0.06)`,padding:7,boxSizing:`border-box`},children:[(0,$.jsx)(`div`,{onClick:t=>{n===`audio`?(t.stopPropagation(),en(e.url)):(kn(e),et(!1),nt(null))},style:{position:`relative`,width:`100%`,height:70,borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#F7F8FA`,border:`1px solid rgba(231, 234, 240, 0.9)`},children:n===`image`?(0,$.jsx)(`img`,{src:On(e.url),alt:e.name||r,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):n===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:On(e.url),muted:!0,playsInline:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(31, 41, 55, 0.08)`},children:(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:`50%`,background:`rgba(47, 52, 64, 0.72)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 18px rgba(31, 41, 55, 0.22)`},children:(0,$.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`#fff`,children:(0,$.jsx)(`path`,{d:`M8 5v14l11-7z`})})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`},children:Ye===(e.url.startsWith(`http`)?e.url:`https://ceshi.apiforeign.minzhongzc.com${e.url}`)?(0,$.jsx)(d6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(Z0,{style:{fontSize:24,color:`#fff`}})})}),(0,$.jsx)(`div`,{title:e.name||r,style:{marginTop:6,color:`#667085`,fontSize:10,fontWeight:700,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,textAlign:`center`},children:e.name||r}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:5,marginTop:7},children:(0,$.jsx)(`button`,{onClick:()=>{kn(e),et(!1),nt(null)},style:{flex:1,height:24,borderRadius:9,border:`1px solid #E7EAF0`,background:`#F8FAFC`,color:`#8b5cf6`,fontSize:11,fontWeight:700,cursor:`pointer`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#EEF1F6`},onMouseLeave:e=>{e.currentTarget.style.background=`#F8FAFC`},children:`查看`})})]},`${e.url||e.name||t}-${t}`)})})]})]})})(),(0,$.jsxs)(`div`,{style:{position:`relative`,background:`rgba(255, 255, 255, 0.52)`,borderRadius:24,padding:`18px 72px 16px 20px`,boxShadow:`0 22px 64px rgba(31, 41, 55, 0.08), 0 1px 0 rgba(255,255,255,0.98) inset`,transition:`all 0.25s ease`,border:`1px solid rgba(231, 234, 240, 0.78)`,backdropFilter:`blur(24px)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:18,alignItems:`flex-end`,marginBottom:14},children:[(0,$.jsx)(`div`,{style:{width:An?220:70,minWidth:An?220:70,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`flex-start`,paddingTop:2,gap:8},children:c===`video`&&ae===`first_last_frame`?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`row`,alignItems:`stretch`,gap:12,width:`100%`,height:100},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,flex:1,minWidth:0,height:100,borderRadius:12,border:`1px solid #E7EAF0`,background:`#ffffff`,boxShadow:`0 6px 16px rgba(47, 52, 64, 0.04)`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left:10,right:10,display:`flex`,alignItems:`center`,justifyContent:`space-between`,zIndex:2},children:(0,$.jsx)(`span`,{style:{fontSize:11,fontWeight:600,color:`#8b5cf6`,lineHeight:1},children:`首帧(可选)`})}),oe?(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64},children:[(0,$.jsx)(`img`,{src:gn(oe.url),alt:oe.name,onClick:()=>{He(oe.url),We(`image`),qe(oe.name),Be(!0)},style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,cursor:`pointer`,border:`1px solid rgba(139, 92, 246, 0.2)`,boxShadow:`0 3px 10px rgba(47, 52, 64, 0.06)`}}),(0,$.jsx)(`button`,{onClick:Jt,style:{position:`absolute`,top:-6,right:-6,width:18,height:18,border:`none`,background:`#A45B5B`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:9,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 4px rgba(164, 91, 91, 0.3)`,zIndex:10},children:(0,$.jsx)(jQ,{style:{fontSize:9}})})]}):(0,$.jsx)(C7,{accept:`image/*`,multiple:!1,mediaType:`image`,onLocalSelect:e=>{e.length>0&&on(e[0],`first`)},onHistorySelect:t=>{if(t.length>0){let n=t[0];se({name:n.fileName||``,type:`image`,url:n.resourceUrl||n.previewUrl||n.displayUrl||``,role:`first_frame`,label:``}),e.success(`成功添加首帧`)}},onPortraitSelect:t=>{if(t.length>0){let n=t[0],r=n.previewUrl||n.displayUrl||n.videoCoverUrl||n.providerUrl||``;se({name:n.name||`首帧图片`,type:`image`,url:r,role:`first_frame`,label:``,source:`private_portrait_asset`,private_asset_id:n.id}),e.success(`成功添加首帧`)}},uploading:te,children:(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(139, 92, 246, 0.28)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,backgroundColor:`rgba(139, 92, 246, 0.04)`,flexDirection:`column`,gap:4},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#a78bfa`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(139, 92, 246, 0.28)`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.04)`},children:[(0,$.jsx)(BI,{style:{fontSize:18,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,fontWeight:500},children:`上传首帧`})]})})]}),(0,$.jsx)(`button`,{onClick:qt,disabled:!oe||!ce,title:`调换首尾帧`,style:{width:32,height:32,alignSelf:`center`,borderRadius:50,border:`1px solid rgba(231, 234, 240, 0.95)`,background:oe&&ce?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#F3F5F8`,cursor:oe&&ce?`pointer`:`not-allowed`,color:oe&&ce?`#fff`:`#98A2B3`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:oe&&ce?`0 6px 14px rgba(139, 92, 246, 0.24)`:`none`,transition:`all 0.2s ease`,flexShrink:0},onMouseEnter:e=>{oe&&ce&&(e.currentTarget.style.transform=`scale(1.06)`)},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`},children:(0,$.jsx)(QH,{style:{fontSize:14}})}),(0,$.jsxs)(`div`,{style:{position:`relative`,flex:1,minWidth:0,height:100,borderRadius:12,border:`1px solid #E7EAF0`,background:`#ffffff`,boxShadow:`0 6px 16px rgba(47, 52, 64, 0.04)`,overflow:`hidden`,opacity:oe?1:.5},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,left:10,right:10,display:`flex`,alignItems:`center`,justifyContent:`space-between`,zIndex:2},children:(0,$.jsx)(`span`,{style:{fontSize:11,fontWeight:600,color:`#8b5cf6`,lineHeight:1},children:`尾帧`})}),ce?(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64},children:[(0,$.jsx)(`img`,{src:gn(ce.url),alt:ce.name,onClick:()=>{He(ce.url),We(`image`),qe(ce.name),Be(!0)},style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,cursor:`pointer`,border:`1px solid rgba(139, 92, 246, 0.2)`,boxShadow:`0 3px 10px rgba(47, 52, 64, 0.06)`}}),(0,$.jsx)(`button`,{onClick:Yt,style:{position:`absolute`,top:-6,right:-6,width:18,height:18,border:`none`,background:`#A45B5B`,borderRadius:50,cursor:`pointer`,color:`#fff`,fontSize:9,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 4px rgba(164, 91, 91, 0.3)`,zIndex:10},children:(0,$.jsx)(jQ,{style:{fontSize:9}})})]}):oe?(0,$.jsx)(C7,{accept:`image/*`,multiple:!1,mediaType:`image`,onLocalSelect:e=>{e.length>0&&on(e[0],`last`)},onHistorySelect:t=>{if(t.length>0){let n=t[0];le({name:n.fileName||``,type:`image`,url:n.resourceUrl||n.previewUrl||n.displayUrl||``,role:`last_frame`,label:``}),e.success(`成功添加尾帧`)}},onPortraitSelect:t=>{if(t.length>0){let n=t[0],r=n.previewUrl||n.displayUrl||n.videoCoverUrl||n.providerUrl||``;le({name:n.name||`尾帧图片`,type:`image`,url:r,role:`last_frame`,label:``,source:`private_portrait_asset`,private_asset_id:n.id}),e.success(`成功添加尾帧`)}},uploading:te,children:(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(139, 92, 246, 0.24)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,backgroundColor:`rgba(139, 92, 246, 0.04)`,flexDirection:`column`,gap:4},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#a78bfa`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.08)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(139, 92, 246, 0.24)`,e.currentTarget.style.backgroundColor=`rgba(139, 92, 246, 0.04)`},children:[(0,$.jsx)(BI,{style:{fontSize:18,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#8b5cf6`,fontWeight:500},children:`上传尾帧`})]})}):(0,$.jsxs)(`div`,{style:{position:`absolute`,left:10,right:10,bottom:10,height:64,borderRadius:8,border:`1px dashed rgba(226, 232, 240, 0.4)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`not-allowed`,backgroundColor:`rgba(241, 245, 249, 0.5)`,flexDirection:`column`,gap:4},children:[(0,$.jsx)(BI,{style:{fontSize:18,color:`#cbd5e1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#94a3b8`,fontWeight:500},children:`请先上传首帧`})]})]})]}):(0,$.jsx)($.Fragment,{children:!(c===`video`&&ae===`first_last_frame`)&&(0,$.jsxs)(`div`,{style:{position:`relative`,width:64,height:72,marginTop:`-10`},onMouseEnter:xe,onMouseLeave:Se,children:[F.length===0&&(0,$.jsx)(C7,{accept:c===`image`?`image/*`:`image/*,video/*,audio/*`,onLocalSelect:cn,onHistorySelect:fn,onPortraitLibrarySelect:e=>{mn(e)},uploading:te,tooltipTitle:c===`image`?`图片${F.filter(e=>e.type===`image`).length}/${z}`:`图片${F.filter(e=>e.type===`image`).length}/${z}, 视频${F.filter(e=>e.type===`video`).length}/${B}${Fn>0?`, - 音频${F.filter(e=>e.type===`audio`).length}/${Fn}`:``}`,maxImageCount:z,maxVideoCount:B,usedImageCount:F.filter(e=>e.type===`image`).length,usedVideoCount:F.filter(e=>e.type===`video`).length,usedVideoDuration:F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Fn>0?Fn:void 0,usedAudioCount:F.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:F.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),hideLimitHint:c===`image`,mediaType:c,children:(0,$.jsx)(`div`,{style:{width:54,height:74,borderRadius:7,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,background:`#f4f4f4`,flexDirection:`column`,gap:5,transform:`rotate(-7deg)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(0deg) translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(-7deg)`},children:te?(0,$.jsx)(Xm,{style:{fontSize:17,color:`#667085`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(VI,{style:{fontSize:18,color:`#667085`,lineHeight:1}}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(2, 14px)`,columnGap:2,justifyContent:`center`,color:`#344054`,fontSize:12,fontWeight:700,lineHeight:1.05,letterSpacing:0},children:[(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`参`}),(0,$.jsx)(`span`,{children:`考`})]}),(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`内`}),(0,$.jsx)(`span`,{children:`容`})]})]})]})})}),F.length>0&&(0,$.jsx)($.Fragment,{children:F.map((e,t)=>{let n=Math.min(F.length,3)-1-t,r=ve?t*58:t<3?t*6:18,i=ve?!0:t<3;return(0,$.jsx)(`div`,{style:{position:`absolute`,left:r,bottom:0,zIndex:t+1,transition:`all 0.28s cubic-bezier(0.4, 0, 0.2, 1)`,transform:ve?`scale(1) rotate(0deg)`:`scale(${t<3?1-n*.08:0}) rotate(${t<3?-3+t*1.5:0}deg)`,opacity:i?ve?1:1-n*.15:0,pointerEvents:i?`auto`:`none`},children:(0,$.jsxs)(`div`,{style:{position:`relative`,width:52,height:60},children:[e.type===`image`?(0,$.jsx)(`img`,{src:gn(e.url),alt:e.name,onClick:()=>{He(e.url),We(`image`),qe(e.name),Be(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):e.type===`video`?(0,$.jsx)(`video`,{src:gn(e.url),muted:!0,onClick:()=>{He(e.url),We(`video`),qe(e.name),Be(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):(0,$.jsx)(`div`,{onClick:t=>{t.stopPropagation(),en(e.url)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:Ye===gn(e.url)?(0,$.jsx)(f6,{style:{fontSize:20,color:`#fff`}}):(0,$.jsx)(Q0,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`button`,{onClick:()=>_n(t),style:{position:`absolute`,top:-6,right:-6,width:20,height:20,borderRadius:50,background:`#1f2937`,border:`none`,color:`#fff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 6px rgba(0,0,0,0.2)`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#dc2626`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#1f2937`,e.currentTarget.style.transform=`scale(1)`},children:(0,$.jsx)(MQ,{style:{fontSize:10}})})]})},`stack-${t}`)})}),F.length>0&&(0,$.jsx)(w7,{accept:c===`image`?`image/*`:`image/*,video/*,audio/*`,onLocalSelect:cn,onHistorySelect:fn,onPortraitLibrarySelect:e=>{mn(e)},uploading:te,tooltipTitle:c===`image`?`图片${F.filter(e=>e.type===`image`).length}/${z}`:`图片${F.filter(e=>e.type===`image`).length}/${z}, + 音频${F.filter(e=>e.type===`audio`).length}/${Fn}`:``}`,maxImageCount:z,maxVideoCount:B,usedImageCount:F.filter(e=>e.type===`image`).length,usedVideoCount:F.filter(e=>e.type===`video`).length,usedVideoDuration:F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Fn>0?Fn:void 0,usedAudioCount:F.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:F.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),hideLimitHint:c===`image`,mediaType:c,children:(0,$.jsx)(`div`,{style:{width:54,height:74,borderRadius:7,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,background:`#f4f4f4`,flexDirection:`column`,gap:5,transform:`rotate(-7deg)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(0deg) translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(-7deg)`},children:te?(0,$.jsx)(Ym,{style:{fontSize:17,color:`#667085`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(BI,{style:{fontSize:18,color:`#667085`,lineHeight:1}}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(2, 14px)`,columnGap:2,justifyContent:`center`,color:`#344054`,fontSize:12,fontWeight:700,lineHeight:1.05,letterSpacing:0},children:[(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`参`}),(0,$.jsx)(`span`,{children:`考`})]}),(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`内`}),(0,$.jsx)(`span`,{children:`容`})]})]})]})})}),F.length>0&&(0,$.jsx)($.Fragment,{children:F.map((e,t)=>{let n=Math.min(F.length,3)-1-t,r=ve?t*58:t<3?t*6:18,i=ve?!0:t<3;return(0,$.jsx)(`div`,{style:{position:`absolute`,left:r,bottom:0,zIndex:t+1,transition:`all 0.28s cubic-bezier(0.4, 0, 0.2, 1)`,transform:ve?`scale(1) rotate(0deg)`:`scale(${t<3?1-n*.08:0}) rotate(${t<3?-3+t*1.5:0}deg)`,opacity:i?ve?1:1-n*.15:0,pointerEvents:i?`auto`:`none`},children:(0,$.jsxs)(`div`,{style:{position:`relative`,width:52,height:60},children:[e.type===`image`?(0,$.jsx)(`img`,{src:gn(e.url),alt:e.name,onClick:()=>{He(e.url),We(`image`),qe(e.name),Be(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):e.type===`video`?(0,$.jsx)(`video`,{src:gn(e.url),muted:!0,onClick:()=>{He(e.url),We(`video`),qe(e.name),Be(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):(0,$.jsx)(`div`,{onClick:t=>{t.stopPropagation(),en(e.url)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:Ye===gn(e.url)?(0,$.jsx)(d6,{style:{fontSize:20,color:`#fff`}}):(0,$.jsx)(Z0,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`button`,{onClick:()=>_n(t),style:{position:`absolute`,top:-6,right:-6,width:20,height:20,borderRadius:50,background:`#1f2937`,border:`none`,color:`#fff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 6px rgba(0,0,0,0.2)`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#dc2626`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#1f2937`,e.currentTarget.style.transform=`scale(1)`},children:(0,$.jsx)(jQ,{style:{fontSize:10}})})]})},`stack-${t}`)})}),F.length>0&&(0,$.jsx)(C7,{accept:c===`image`?`image/*`:`image/*,video/*,audio/*`,onLocalSelect:cn,onHistorySelect:fn,onPortraitLibrarySelect:e=>{mn(e)},uploading:te,tooltipTitle:c===`image`?`图片${F.filter(e=>e.type===`image`).length}/${z}`:`图片${F.filter(e=>e.type===`image`).length}/${z}, 视频${F.filter(e=>e.type===`video`).length}/${B}${Fn>0?`, - 音频${F.filter(e=>e.type===`audio`).length}/${Fn}`:``}`,maxImageCount:z,maxVideoCount:B,usedImageCount:F.filter(e=>e.type===`image`).length,usedVideoCount:F.filter(e=>e.type===`video`).length,usedVideoDuration:F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Fn>0?Fn:void 0,usedAudioCount:F.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:F.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),hideLimitHint:c===`image`,mediaType:c,children:(0,$.jsx)(`div`,{style:{position:`absolute`,right:0,bottom:0,width:28,height:28,borderRadius:50,background:`#ffffff`,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s ease`,boxShadow:`0 2px 8px rgba(47, 52, 64, 0.08)`,zIndex:100},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#8b5cf6`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(139, 92, 246, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.08)`},children:(0,$.jsx)(VI,{style:{fontSize:14,color:`#8b5cf6`,lineHeight:1}})})})]})})}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,padding:`0`,backgroundColor:`transparent`,borderRadius:0,border:`none`,boxShadow:`none`,transition:`all 0.2s ease`,position:`relative`,minHeight:An?92:74},children:[(0,$.jsx)(bce,{ref:Te,value:b,onChange:Sn,onKeyDown:Cn,onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await on(e)}))},placeholder:Mn,autoSize:{minRows:3,maxRows:6},style:{width:`100%`,borderRadius:0,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.72,color:`#2f3440`,fontWeight:500,resize:`none`,backgroundColor:`transparent`,padding:10},disabled:ne}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,paddingRight:10,marginTop:2},children:(0,$.jsxs)(`span`,{style:{fontSize:11,color:bn(b)>xn(b)?`#ef4444`:`#9ca3af`},children:[bn(b),` / `,xn(b)]})}),Ce&&F.length>0&&ae===`universal`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:`100%`,left:10,marginBottom:8,zIndex:1e3,background:`#fff`,borderRadius:16,boxShadow:`0 18px 42px rgba(47, 52, 64, 0.12)`,border:`1px solid #E7EAF0`,padding:8,minWidth:160,maxHeight:260,overflowY:`auto`},children:F.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>wn(e.label),style:{padding:`8px 12px`,borderRadius:6,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#2f3440`,transition:`all 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.color=`#2f3440`},children:[e.type===`image`?(0,$.jsx)(w6,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(R8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{children:e.label})]},t))})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:14,marginTop:10,paddingTop:13,borderTop:`1px solid rgba(231, 234, 240, 0.76)`},children:[(0,$.jsxs)(bV,{size:8,wrap:!0,style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{gt(!1),ot(!1),ct(!1),pe(!1),vt(e=>!e)},className:`image-settings-trigger`,style:{minWidth:118,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[c===`video`?(0,$.jsx)(R8,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(w6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(Z7,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`video`?`视频生成`:`图片生成`}),(0,$.jsx)(_Z,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),_t&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`创作类型`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[{value:`video`,label:`视频生成`,icon:R8},{value:`image`,label:`图片生成`,icon:w6}].map(e=>(0,$.jsxs)(`button`,{onClick:()=>{x(e.value),vt(!1),I([]),P(``)},style:{flex:1,minHeight:48,borderRadius:10,border:c===e.value?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:c===e.value?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8},children:[(0,$.jsx)(e.icon,{style:{fontSize:14,color:c===e.value?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:c===e.value?600:500,color:c===e.value?`#8b5cf6`:`#475467`},children:e.label})]},e.value))})]})})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{vt(!1),ot(!1),ct(!1),pe(!1),gt(e=>!e)},className:`image-settings-trigger`,style:{minWidth:174,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(s8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(Z7,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`image`?L.image?.find(e=>e.id===l)?.name:L.video?.find(e=>e.id===l)?.name||`选择引擎`}),(0,$.jsx)(_Z,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),ht&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?L.image:L.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{if(C(e.id),c===`video`&&(M({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(g)||A(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(_)||j(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(h)||k(e.supportedDurations?.[0]||5)),c===`image`){let t=e.supportedSizes||{},n=Object.keys(t).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),r=n[0]||`2K`,i=Object.keys(t[r]||{});if(ut(i.map(e=>({value:e,label:e}))),mt(t),ft(n.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),t[r]&&t[r][i[0]]){let[e,n]=t[r][i[0]].split(/[×x]/);D(Number(e)),O(Number(n)),T(i[0]),E(r)}}gt(!1)},style:{flex:1,minHeight:48,borderRadius:10,border:l===e.id?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:l===e.id?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:l===e.id?600:500,color:l===e.id?`#8b5cf6`:`#475467`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98a2b3`}})]},e.id))})]})})]}),c===`video`&&(Wt||Gt)&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{vt(!1),gt(!1),ot(!1),ct(!1),pe(!fe)},className:`image-settings-trigger`,style:{minWidth:118,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(w6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(Z7,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:ae===`universal`?`全能参考`:`首尾帧`}),(0,$.jsx)(_Z,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),fe&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`参考模式`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`button`,{onClick:()=>{Kt(`universal`),pe(!1)},disabled:!Gt,style:{flex:1,minHeight:48,borderRadius:10,border:ae===`universal`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:ae===`universal`?`#f5f3ff`:`#ffffff`,cursor:Gt?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Gt?1:.4},children:[(0,$.jsx)(w6,{style:{fontSize:14,color:ae===`universal`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:ae===`universal`?600:500,color:ae===`universal`?`#8b5cf6`:`#475467`},children:`全能参考`}),!Gt&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]}),(0,$.jsxs)(`button`,{onClick:()=>{Kt(`first_last_frame`),pe(!1)},disabled:!Wt,style:{flex:1,minHeight:48,borderRadius:10,border:ae===`first_last_frame`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:ae===`first_last_frame`?`#f5f3ff`:`#ffffff`,cursor:Wt?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Wt?1:.4},children:[(0,$.jsx)($H,{style:{fontSize:14,color:ae===`first_last_frame`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:ae===`first_last_frame`?600:500,color:ae===`first_last_frame`?`#8b5cf6`:`#475467`},children:`首尾帧`}),!Wt&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]})]})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{vt(!1),gt(!1),ct(!1),pe(!1),ot(!at)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(x3,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsxs)(Z7,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:[d===`auto`?`智能`:d,` · `,f===`1K`?`1K标清`:f===`2K`?`2K高清`:`4K超清`,` · `,p,`×`,m]}),V&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#8b5cf6`},children:u})]}),(0,$.jsx)(_Z,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),at&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:lt.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{T(e.value),Bt(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:d===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:d===e.value?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${d===e.value?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:d===e.value?`#8b5cf6`:`#98a2b3`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:d===e.value?`#8b5cf6`:`#667085`,fontWeight:d===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:dt.map(e=>(0,$.jsx)(`button`,{onClick:()=>{E(e.value),Vt(e.value)},style:{flex:1,height:42,borderRadius:6,border:f===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:f===e.value?`#8b5cf6`:`#FFFFFF`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:f===e.value?`#fff`:`#475467`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(YU,{value:p,onChange:e=>D(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`button`,{onClick:Ht,style:{width:24,height:24,borderRadius:4,border:`1px solid #E7EAF0`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#8b5cf6`},children:(0,$.jsx)($H,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(YU,{value:m,onChange:e=>O(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11},children:`PX`})]})]}),V&&(0,$.jsxs)(`div`,{style:{marginTop:16,paddingTop:16,borderTop:`1px solid #f0f0f5`},children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`生成数量`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:Array.from({length:W},(e,t)=>t+1).map(e=>(0,$.jsx)(`button`,{onClick:()=>w(e),disabled:W<=1,style:{flex:1,height:42,borderRadius:6,border:u===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:u===e?`#8b5cf6`:`#FFFFFF`,cursor:W<=1?`not-allowed`:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`,opacity:W<=1?.5:1},children:(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:u===e?`#fff`:`#475467`},children:e})},e))})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{vt(!1),gt(!1),ot(!1),pe(!1),ct(!st)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(x3,{style:{fontSize:14,color:`#2f3440`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:g}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:_?.toUpperCase?.()||_}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:[h,`秒`]}),V&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:`#8b5cf6`},children:[u,`份`]})]}),(0,$.jsx)(_Z,{style:{fontSize:10,color:`#667085`,marginLeft:`auto`}})]}),st&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:v.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>A(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:g===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:g===e?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${g===e?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:g===e?`#8b5cf6`:`#667085`,fontWeight:g===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#E7EAF0`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#8b5cf6`,width:`${(h-Math.min(...v.durations))/(Math.max(...v.durations)-Math.min(...v.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...v.durations),max:Math.max(...v.durations),value:h,onChange:e=>k(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(`input`,{type:`number`,min:Math.min(...v.durations),max:Math.max(...v.durations),value:h,onChange:e=>{let t=Number(e.target.value);isNaN(t)||k(Math.min(Math.max(t,Math.min(...v.durations)),Math.max(...v.durations)))},style:{width:56,height:32,textAlign:`center`,border:`1px solid #E7EAF0`,borderRadius:6,fontSize:14,fontWeight:600,color:`#2f3440`,outline:`none`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#98a2b3`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:v.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>j(e),style:{flex:1,height:42,borderRadius:6,border:_===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:_===e?`#8b5cf6`:`#FFFFFF`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:_===e?`#fff`:`#475467`},children:e})},e))})]}),V&&(0,$.jsxs)(`div`,{style:{marginTop:16,paddingTop:16,borderTop:`1px solid #f0f0f5`},children:[(0,$.jsx)(Z7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`生成数量`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:Array.from({length:W},(e,t)=>t+1).map(e=>(0,$.jsx)(`button`,{onClick:()=>w(e),disabled:W<=1,style:{flex:1,height:42,borderRadius:6,border:u===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:u===e?`#8b5cf6`:`#FFFFFF`,cursor:W<=1?`not-allowed`:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`,opacity:W<=1?.5:1},children:(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:u===e?`#fff`:`#475467`},children:e})},e))})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexShrink:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,color:`#667085`,whiteSpace:`nowrap`,height:34,padding:`0 12px`,borderRadius:11,background:`rgba(255, 255, 255, 0.92)`,border:`1px solid rgba(231, 234, 240, 0.92)`,boxShadow:`0 4px 12px rgba(47, 52, 64, 0.04)`},children:[(0,$.jsx)(Z7,{style:{fontSize:13,color:`#667085`,fontWeight:600},children:`预估积分:`}),(0,$.jsx)(Z7,{style:{fontSize:13,color:`#2f3440`,fontWeight:800},children:Tt()})]}),(0,$.jsx)(X,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(Y0,{}),onClick:Xt,disabled:!jn,loading:ne,style:{flexShrink:0,width:36,height:36,borderRadius:`50%`,background:jn?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#E7EAF0`,color:`#ffffff`,opacity:jn?1:.86,boxShadow:jn?`0 10px 24px rgba(139, 92, 246, 0.28)`:`inset 0 0 0 1px rgba(139, 92, 246, 0.18)`,cursor:jn?`pointer`:`not-allowed`,transition:`all 0.2s ease`,border:`none`}})]})]})]})]})]}),(0,$.jsx)(`style`,{children:` + 音频${F.filter(e=>e.type===`audio`).length}/${Fn}`:``}`,maxImageCount:z,maxVideoCount:B,usedImageCount:F.filter(e=>e.type===`image`).length,usedVideoCount:F.filter(e=>e.type===`video`).length,usedVideoDuration:F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Fn>0?Fn:void 0,usedAudioCount:F.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:F.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),hideLimitHint:c===`image`,mediaType:c,children:(0,$.jsx)(`div`,{style:{position:`absolute`,right:0,bottom:0,width:28,height:28,borderRadius:50,background:`#ffffff`,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s ease`,boxShadow:`0 2px 8px rgba(47, 52, 64, 0.08)`,zIndex:100},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#8b5cf6`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(139, 92, 246, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.08)`},children:(0,$.jsx)(BI,{style:{fontSize:14,color:`#8b5cf6`,lineHeight:1}})})})]})})}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,padding:`0`,backgroundColor:`transparent`,borderRadius:0,border:`none`,boxShadow:`none`,transition:`all 0.2s ease`,position:`relative`,minHeight:An?92:74},children:[(0,$.jsx)(xce,{ref:Te,value:b,onChange:Sn,onKeyDown:Cn,onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await on(e)}))},placeholder:Mn,autoSize:{minRows:3,maxRows:6},style:{width:`100%`,borderRadius:0,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.72,color:`#2f3440`,fontWeight:500,resize:`none`,backgroundColor:`transparent`,padding:10},disabled:ne}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,paddingRight:10,marginTop:2},children:(0,$.jsxs)(`span`,{style:{fontSize:11,color:bn(b)>xn(b)?`#ef4444`:`#9ca3af`},children:[bn(b),` / `,xn(b)]})}),Ce&&F.length>0&&ae===`universal`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:`100%`,left:10,marginBottom:8,zIndex:1e3,background:`#fff`,borderRadius:16,boxShadow:`0 18px 42px rgba(47, 52, 64, 0.12)`,border:`1px solid #E7EAF0`,padding:8,minWidth:160,maxHeight:260,overflowY:`auto`},children:F.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>wn(e.label),style:{padding:`8px 12px`,borderRadius:6,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#2f3440`,transition:`all 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.color=`#2f3440`},children:[e.type===`image`?(0,$.jsx)(C6,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(L8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{children:e.label})]},t))})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:14,marginTop:10,paddingTop:13,borderTop:`1px solid rgba(231, 234, 240, 0.76)`},children:[(0,$.jsxs)(yV,{size:8,wrap:!0,style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{gt(!1),ot(!1),ct(!1),pe(!1),vt(e=>!e)},className:`image-settings-trigger`,style:{minWidth:118,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[c===`video`?(0,$.jsx)(L8,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(C6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(X7,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`video`?`视频生成`:`图片生成`}),(0,$.jsx)(gZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),_t&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`创作类型`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[{value:`video`,label:`视频生成`,icon:L8},{value:`image`,label:`图片生成`,icon:C6}].map(e=>(0,$.jsxs)(`button`,{onClick:()=>{x(e.value),vt(!1),I([]),P(``)},style:{flex:1,minHeight:48,borderRadius:10,border:c===e.value?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:c===e.value?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8},children:[(0,$.jsx)(e.icon,{style:{fontSize:14,color:c===e.value?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:c===e.value?600:500,color:c===e.value?`#8b5cf6`:`#475467`},children:e.label})]},e.value))})]})})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{vt(!1),ot(!1),ct(!1),pe(!1),gt(e=>!e)},className:`image-settings-trigger`,style:{minWidth:174,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(o8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(X7,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`image`?L.image?.find(e=>e.id===l)?.name:L.video?.find(e=>e.id===l)?.name||`选择引擎`}),(0,$.jsx)(gZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),ht&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?L.image:L.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{if(C(e.id),c===`video`&&(M({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(g)||A(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(_)||j(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(h)||k(e.supportedDurations?.[0]||5)),c===`image`){let t=e.supportedSizes||{},n=Object.keys(t).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),r=n[0]||`2K`,i=Object.keys(t[r]||{});if(ut(i.map(e=>({value:e,label:e}))),mt(t),ft(n.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),t[r]&&t[r][i[0]]){let[e,n]=t[r][i[0]].split(/[×x]/);D(Number(e)),O(Number(n)),T(i[0]),E(r)}}gt(!1)},style:{flex:1,minHeight:48,borderRadius:10,border:l===e.id?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:l===e.id?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:l===e.id?600:500,color:l===e.id?`#8b5cf6`:`#475467`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98a2b3`}})]},e.id))})]})})]}),c===`video`&&(Wt||Gt)&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{vt(!1),gt(!1),ot(!1),ct(!1),pe(!fe)},className:`image-settings-trigger`,style:{minWidth:118,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(C6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(X7,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:ae===`universal`?`全能参考`:`首尾帧`}),(0,$.jsx)(gZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),fe&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`参考模式`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`button`,{onClick:()=>{Kt(`universal`),pe(!1)},disabled:!Gt,style:{flex:1,minHeight:48,borderRadius:10,border:ae===`universal`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:ae===`universal`?`#f5f3ff`:`#ffffff`,cursor:Gt?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Gt?1:.4},children:[(0,$.jsx)(C6,{style:{fontSize:14,color:ae===`universal`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:ae===`universal`?600:500,color:ae===`universal`?`#8b5cf6`:`#475467`},children:`全能参考`}),!Gt&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]}),(0,$.jsxs)(`button`,{onClick:()=>{Kt(`first_last_frame`),pe(!1)},disabled:!Wt,style:{flex:1,minHeight:48,borderRadius:10,border:ae===`first_last_frame`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:ae===`first_last_frame`?`#f5f3ff`:`#ffffff`,cursor:Wt?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Wt?1:.4},children:[(0,$.jsx)(QH,{style:{fontSize:14,color:ae===`first_last_frame`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:ae===`first_last_frame`?600:500,color:ae===`first_last_frame`?`#8b5cf6`:`#475467`},children:`首尾帧`}),!Wt&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]})]})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{vt(!1),gt(!1),ct(!1),pe(!1),ot(!at)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(b3,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsxs)(X7,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:[d===`auto`?`智能`:d,` · `,f===`1K`?`1K标清`:f===`2K`?`2K高清`:`4K超清`,` · `,p,`×`,m]}),V&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#8b5cf6`},children:u})]}),(0,$.jsx)(gZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),at&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:lt.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{T(e.value),Bt(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:d===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:d===e.value?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${d===e.value?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:d===e.value?`#8b5cf6`:`#98a2b3`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:d===e.value?`#8b5cf6`:`#667085`,fontWeight:d===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:dt.map(e=>(0,$.jsx)(`button`,{onClick:()=>{E(e.value),Vt(e.value)},style:{flex:1,height:42,borderRadius:6,border:f===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:f===e.value?`#8b5cf6`:`#FFFFFF`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:f===e.value?`#fff`:`#475467`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(JU,{value:p,onChange:e=>D(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`button`,{onClick:Ht,style:{width:24,height:24,borderRadius:4,border:`1px solid #E7EAF0`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#8b5cf6`},children:(0,$.jsx)(QH,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(JU,{value:m,onChange:e=>O(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11},children:`PX`})]})]}),V&&(0,$.jsxs)(`div`,{style:{marginTop:16,paddingTop:16,borderTop:`1px solid #f0f0f5`},children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`生成数量`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:Array.from({length:W},(e,t)=>t+1).map(e=>(0,$.jsx)(`button`,{onClick:()=>w(e),disabled:W<=1,style:{flex:1,height:42,borderRadius:6,border:u===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:u===e?`#8b5cf6`:`#FFFFFF`,cursor:W<=1?`not-allowed`:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`,opacity:W<=1?.5:1},children:(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:u===e?`#fff`:`#475467`},children:e})},e))})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{vt(!1),gt(!1),ot(!1),pe(!1),ct(!st)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(b3,{style:{fontSize:14,color:`#2f3440`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:g}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:_?.toUpperCase?.()||_}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:[h,`秒`]}),V&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:`#8b5cf6`},children:[u,`份`]})]}),(0,$.jsx)(gZ,{style:{fontSize:10,color:`#667085`,marginLeft:`auto`}})]}),st&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:v.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>A(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:g===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:g===e?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${g===e?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:g===e?`#8b5cf6`:`#667085`,fontWeight:g===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#E7EAF0`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#8b5cf6`,width:`${(h-Math.min(...v.durations))/(Math.max(...v.durations)-Math.min(...v.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...v.durations),max:Math.max(...v.durations),value:h,onChange:e=>k(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(`input`,{type:`number`,min:Math.min(...v.durations),max:Math.max(...v.durations),value:h,onChange:e=>{let t=Number(e.target.value);isNaN(t)||k(Math.min(Math.max(t,Math.min(...v.durations)),Math.max(...v.durations)))},style:{width:56,height:32,textAlign:`center`,border:`1px solid #E7EAF0`,borderRadius:6,fontSize:14,fontWeight:600,color:`#2f3440`,outline:`none`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#98a2b3`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:v.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>j(e),style:{flex:1,height:42,borderRadius:6,border:_===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:_===e?`#8b5cf6`:`#FFFFFF`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:_===e?`#fff`:`#475467`},children:e})},e))})]}),V&&(0,$.jsxs)(`div`,{style:{marginTop:16,paddingTop:16,borderTop:`1px solid #f0f0f5`},children:[(0,$.jsx)(X7,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`生成数量`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:Array.from({length:W},(e,t)=>t+1).map(e=>(0,$.jsx)(`button`,{onClick:()=>w(e),disabled:W<=1,style:{flex:1,height:42,borderRadius:6,border:u===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:u===e?`#8b5cf6`:`#FFFFFF`,cursor:W<=1?`not-allowed`:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`,opacity:W<=1?.5:1},children:(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:u===e?`#fff`:`#475467`},children:e})},e))})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexShrink:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,color:`#667085`,whiteSpace:`nowrap`,height:34,padding:`0 12px`,borderRadius:11,background:`rgba(255, 255, 255, 0.92)`,border:`1px solid rgba(231, 234, 240, 0.92)`,boxShadow:`0 4px 12px rgba(47, 52, 64, 0.04)`},children:[(0,$.jsx)(X7,{style:{fontSize:13,color:`#667085`,fontWeight:600},children:`预估积分:`}),(0,$.jsx)(X7,{style:{fontSize:13,color:`#2f3440`,fontWeight:800},children:Tt()})]}),(0,$.jsx)(X,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(J0,{}),onClick:Xt,disabled:!jn,loading:ne,style:{flexShrink:0,width:36,height:36,borderRadius:`50%`,background:jn?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#E7EAF0`,color:`#ffffff`,opacity:jn?1:.86,boxShadow:jn?`0 10px 24px rgba(139, 92, 246, 0.28)`:`inset 0 0 0 1px rgba(139, 92, 246, 0.18)`,cursor:jn?`pointer`:`not-allowed`,transition:`all 0.2s ease`,border:`none`}})]})]})]})]})]}),(0,$.jsx)(`style`,{children:` .ai-create-page { --ai-accent: #8b5cf6; @@ -579,22 +579,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } } - `}),(0,$.jsx)(DG,{open:Ae,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Tn,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(I1,{}),onClick:En,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},disabled:Re(Me),children:Re(Me)?`资源已过期`:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:Re(Me)?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`40px`},children:(0,$.jsx)(`p`,{style:{fontSize:16,color:`#A45B5B`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})}):Pe===`image`?(0,$.jsx)(`img`,{src:`${Me}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:Ie,src:`${Me}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(DG,{open:ze,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`附件预览`})]}),onCancel:()=>{if(Je.current){let e=Je.current;e.pause(),e.muted=!0,e.currentTime=0}Be(!1)},afterClose:()=>{if(Je.current){let e=Je.current;e.pause(),e.muted=!0}},width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`}}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:Ue===`image`?(0,$.jsx)(`img`,{src:gn(`/static${Ve}?w=300&q=50`),alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:Je,src:gn(Ve),controls:!0,playsInline:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(v7,{open:me,libraryType:ge,onClose:()=>he(!1),onSelect:hn,selectedIds:F.map(e=>e.private_asset_id).filter(Boolean),maxCount:Math.max(1,Nn+Pn),maxImageCount:z,maxVideoCount:B,usedImageCount:F.filter(e=>e.type===`image`).length,usedVideoCount:F.filter(e=>e.type===`video`).length,usedVideoDuration:F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,accept:c===`image`?`image/*`:`image/*,video/*`})]})},{Header:Tce,Content:Ece}=iW,{TextArea:Dce}=YU,Oce=`https://ceshi.apiforeign.minzhongzc.com`,kce=e=>{if(!e)return!1;let t=e.supportsUniversalReference??e.supports_universal_reference,n=e.maxImageCount??e.max_image_count;return t!==!1&&(n==null||Number(n)>=1)},Q7=e=>e?/^https?:\/\//i.test(e)||e.startsWith(`blob:`)?e:`${Oce}${e}`:``,Ace=()=>{let e=Ye(),{user:t}=e7(),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(20),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)([]),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(20),[v,y]=(0,S.useState)(0),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(null),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(null),[F,I]=(0,S.useState)(null),[L,R]=(0,S.useState)(``),[z,B]=(0,S.useState)(``),[V,H]=(0,S.useState)(!1),[U,ee]=(0,S.useState)(!1),[W,te]=(0,S.useState)([]),[G,ne]=(0,S.useState)(``),[K,re]=(0,S.useState)(5),[ie,ae]=(0,S.useState)(`9:16`),[q,oe]=(0,S.useState)(`480p`),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(!1),[de,fe]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[pe,me]=(0,S.useState)([]),[he,ge]=(0,S.useState)(!1),_e=(0,S.useRef)(null),ve=(0,S.useRef)(null),ye=(0,S.useRef)(null);(0,S.useEffect)(()=>{C5().then(e=>{let t=e?.engine?.video||[];if(te(t),t.length>0){let e=t[0],n=(()=>{let t=e.maxDuration??e.max_duration;if(t!=null)return Number(t);let n=e.supportedDurations;return Array.isArray(n)&&n.length>0?Math.max(...n):15})(),r=e.supportedDurations,i=Array.from({length:n-4},(e,t)=>t+5),a=Array.from(new Set([...r||[],...i].sort((e,t)=>e-t)));ne(e.id),ae(e.supportedRatios?.includes(`9:16`)?`9:16`:e.supportedRatios?.[0]||`9:16`),oe(e.supportedResolutions?.[0]||`480p`),re((r||[]).find(e=>e<=n)??i[0]??5),fe({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:a.length>0?a:i})}}).catch(()=>Z.error(`视频引擎加载失败`)),D5().then(e=>me(Array.isArray(e)?e:[])).catch(()=>me([]))},[]),(0,S.useEffect)(()=>{if(!be)return;let e=(()=>{let e=be.maxDuration??be.max_duration;if(e!=null)return Number(e);let t=be.supportedDurations;return Array.isArray(t)&&t.length>0?Math.max(...t):15})(),t=be.supportedDurations,n=Array.from({length:Math.max(e-4,1)},(e,t)=>t+5),r=Array.from(new Set([...t||[],...n].sort((e,t)=>e-t)));fe(t=>{let i=t.durations;return(i.length>0?Math.max(...i):0)===e?t:{ratios:be.supportedRatios||t.ratios,resolutions:be.supportedResolutions||t.resolutions,durations:r.length>0?r:n}}),re(r=>r<=e?r:(t||[]).find(t=>t<=e)??n[0]??5)},[G]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&(ce(!1),ue(!1))};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]);let be=W.find(e=>e.id===G),xe=(()=>{if(!be)return 15;let e=be.maxDuration??be.max_duration;if(e!=null)return Number(e);let t=be.supportedDurations;return Array.isArray(t)&&t.length>0?Math.max(...t):15})(),Se=!L||kce(be),Ce=(()=>{let e=pe.find(e=>e.modelConfigId===G&&e.genType===`video`&&e.resolution===q);if(!e)return 0;let t=(Number(e.baseCredits||0)+Number(e.perSecondCredits||0)*K)*Number(e.ratio||1);return L&&(t+=(Number(e.inputImageBaseCredits||0)+Number(e.inputImagePerImageCredits||0))*Number(e.inputImageRatio||1)),Number(t.toFixed(2))})(),we=(e,t,n=!1)=>{O5(e,t).then(e=>{if(e.items){p(n?t=>t.map(t=>{let n=e.items.find(e=>e.id===t.id);return n&&n.status!==t.status?n:t}):e.items);let t=e.items.some(e=>e.status===`processing`);t&&!_e.current?_e.current=setInterval(()=>{we(m,g,!0)},5e3):!t&&_e.current&&(clearInterval(_e.current),_e.current=null)}e.total!==void 0&&y(e.total)}).catch(e=>{})},Te=e=>{h(e),we(e,g)},Ee=(e,t,n=!1,a)=>{O5(e,t,a).then(e=>{if(e.items){r(n?t=>t.map(t=>{let n=e.items.find(e=>e.id===t.id);return n&&n.status!==t.status?n:t}):e.items);let t=e.items.some(e=>e.status===`processing`);t&&!ve.current?ve.current=setInterval(()=>{Ee(i,o,!0,u)},5e3):!t&&ve.current&&(clearInterval(ve.current),ve.current=null)}e.total!==void 0&&l(e.total)}).catch(e=>{})};(0,S.useEffect)(()=>(Ee(i,o),we(m,g),()=>{_e.current&&=(clearInterval(_e.current),null),ve.current&&=(clearInterval(ve.current),null)}),[]);let De=(e,t)=>{a(e),s(t),Ee(e,t,!1,u)},Oe=()=>{a(1),Ee(1,o,!1,u)},ke=async e=>{if(!e.type.startsWith(`video/`))return Z.error(`只能上传视频文件`),!1;if(!(e.size/1024/1024<50))return Z.error(`视频大小不能超过50MB`),!1;let t=document.createElement(`video`);return t.preload=`metadata`,new Promise(n=>{t.onloadedmetadata=async()=>{if(t.duration<2){Z.error(`视频时长不能少于2秒`),URL.revokeObjectURL(t.src),n(!1);return}if(t.duration>xe){Z.error(`视频时长不能超过${xe}秒`),URL.revokeObjectURL(t.src),n(!1);return}H(!0);try{let r=await _ae(e,t.duration);O(e),A(r.url),M(r.resource_id||``),P(t.duration);let i=Math.round(t.duration);re(de.durations.reduce((e,t)=>Math.abs(t-i){Z.error(`视频文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},Ae=async e=>{if(!e.type.startsWith(`image/`))return Z.error(`只能上传图片文件`),!1;if(!(e.size/1024/1024<10))return Z.error(`图片大小不能超过10MB`),!1;let t=new Image;return new Promise(n=>{t.onload=async()=>{let r=t.width/t.height;Math.abs(r-.75)<.1||Math.abs(r-.5625),ee(!0);try{let t=await gae(e);I(e),R(t.url),B(t.resource_id||``),Z.success(`图片上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`图片上传失败`),n(!1)}finally{ee(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`图片文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},je=()=>{k&&URL.revokeObjectURL(k),O(null),A(``)},Me=()=>{L&&URL.revokeObjectURL(L),I(null),R(``)},Ne=()=>{if(!k){Z.warning(`请上传复刻视频`);return}if(!G||!K||!ie||!q){Z.warning(`请选择完整的视频生成参数`);return}if(!Se){Z.warning(`当前视频引擎不支持参考图片,请移除素材图片或切换引擎`);return}let t=ye.current||`hot_v2_${Date.now()}_${Math.random().toString(16).slice(2)}`;ye.current=t,Iae({material_video_url:k,material_image_url:L||void 0,material_video_resource_id:j||void 0,material_image_resource_id:z||void 0,material_video_duration_seconds:N||void 0,source_project_name:b.trim()||void 0,target_project_name:C.trim()||void 0,project_description:T.trim()||void 0,core_content_point:T.trim()||void 0,video_config:{engine_id:G,duration:K,aspect_ratio:ie,resolution:q},idempotency_key:t}).then(t=>{let n=t.id||t.projectId||t.detail?.id;ye.current=null,A(``),M(``),P(null),R(``),B(``),I(null),x(``),w(``),E(``),we(1,20),Z.success(`项目已创建,视频提词正在生成`),n&&e(`/initial/${n}/initialinfo?flow_version=v2`)}).catch(e=>{Z.error(e?.message||`视频开头复刻失败`)})};return(0,$.jsxs)(`div`,{className:`replication-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,boxSizing:`border-box`},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{width:`68%`,background:`#f1f2f3`,backdropFilter:`blur(20px)`,display:`flex`,flexDirection:`column`,borderRadius:20,overflow:`hidden`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`16px 24px`,paddingBottom:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,paddingBottom:12},children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款复刻`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`上传参考视频与产品图片,一键复刻爆款视频开头`})]})}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`6px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>ge(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,background:`transparent`,borderRight:`1px solid rgba(99, 102, 241, 0.08)`,overflowY:`auto`,scrollbarWidth:`none`},children:f.length>0?(0,$.jsxs)(`div`,{style:{height:`100%`,padding:`24px`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24},children:(0,$.jsx)(`h2`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`},children:`历史生成作品`})}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(190px, 1fr))`,gap:16},children:f.map(t=>(0,$.jsxs)(`div`,{style:{border:`1px solid rgba(99, 102, 241, 0.6)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`,cursor:`pointer`,transition:`transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},onClick:()=>e(`/initial/${t.id}/initialinfo?flow_version=${t.flowVersion===`v2`?`v2`:`v1`}`),onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-6px)`,e.currentTarget.style.boxShadow=`0 12px 32px rgba(99, 102, 241, 0.12)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.06)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`1/1`},children:[t.finalVideoUrl?(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${P7(t.finalVideoCoverUrl)}`,alt:t.targetProjectName,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:60,height:60,borderRadius:`50%`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(R8,{style:{fontSize:24,color:`#fff`}})})}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:8,right:8,padding:`4px 12px`,background:`rgba(0,0,0,0.7)`,borderRadius:16,fontSize:10,color:`#fff`,backdropFilter:`blur(4px)`},children:(()=>{let e=t.status,n=t.current_step_code||t.currentStepCode;if(n===`image_prompt_optimize`)switch(e){case`waiting_user`:return`等待融合图生成`;case`processing`:return`图片提示词生成中`;case`completed`:return`图片提示词生成成功`;case`failed`:return`图片提示词生成失败`;default:return e||`待处理`}else if(n===`image_generate`)switch(e){case`waiting_user`:return`等待生成视频提示词`;case`processing`:return`融合图生成中`;case`completed`:return`融合图生成成功`;case`failed`:return`融合图生成失败`;default:return e||`待处理`}else if(n===`video_prompt_optimize`)switch(e){case`waiting_user`:return`等待最终视频生成`;case`processing`:return`视频提示词生成中`;case`completed`:return`视频提示词生成成功`;case`failed`:return`视频提示词生成失败`;default:return e||`待处理`}else if(n===`video_generate`)switch(e){case`waiting_user`:return``;case`processing`:return`最终视频生成中`;case`completed`:return`最终视频生成成功`;case`failed`:return`最终视频生成失败`;default:return e||`待处理`}else if(n===`material_input`)switch(e){case`waiting_user`:return`等待生成图片提示词`;case`processing`:return`素材处理中`;case`completed`:return`素材上传成功`;case`failed`:return`素材上传失败`;default:return e||`待处理`}else return{pending:`子任务待处理`,waiting_user:`等待用户确认或触发`,processing:`子任务处理中`,completed:`子任务完成`,failed:`子任务失败`,cancelled:`子任务取消`}[e]||e||`待处理`})()})]}),(0,$.jsxs)(`div`,{style:{padding:14},children:[(0,$.jsx)(`h4`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t.targetProjectName||`未命名作品`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:6},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:12,color:`#64748b`},children:t.createdAt?new Date(t.createdAt).toLocaleDateString(`zh-CN`):``}),(()=>{let e=t.status;return e===`waiting_user`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#f59e0b`},children:`等待下一步`}):e===`processing`?(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#6366f1`,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:`进行中`}),(0,$.jsx)(`span`,{style:{animation:`dots 1s infinite`},children:`...`}),(0,$.jsx)(`style`,{children:` + `}),(0,$.jsx)(EG,{open:Ae,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Tn,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(F1,{}),onClick:En,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},disabled:Re(Me),children:Re(Me)?`资源已过期`:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:Re(Me)?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`40px`},children:(0,$.jsx)(`p`,{style:{fontSize:16,color:`#A45B5B`,marginBottom:16},children:`图片/视频资源已过期,请刷新重新加载~`})}):Pe===`image`?(0,$.jsx)(`img`,{src:`${Me}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:Ie,src:`${Me}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(EG,{open:ze,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`附件预览`})]}),onCancel:()=>{if(Je.current){let e=Je.current;e.pause(),e.muted=!0,e.currentTime=0}Be(!1)},afterClose:()=>{if(Je.current){let e=Je.current;e.pause(),e.muted=!0}},width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`}}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:Ue===`image`?(0,$.jsx)(`img`,{src:gn(`/static${Ve}?w=300&q=50`),alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:Je,src:gn(Ve),controls:!0,playsInline:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(_7,{open:me,libraryType:ge,onClose:()=>he(!1),onSelect:hn,selectedIds:F.map(e=>e.private_asset_id).filter(Boolean),maxCount:Math.max(1,Nn+Pn),maxImageCount:z,maxVideoCount:B,usedImageCount:F.filter(e=>e.type===`image`).length,usedVideoCount:F.filter(e=>e.type===`video`).length,usedVideoDuration:F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,accept:c===`image`?`image/*`:`image/*,video/*`})]})},{Header:Ece,Content:Dce}=rW,{TextArea:Oce}=JU,kce=`https://ceshi.apiforeign.minzhongzc.com`,Ace=e=>{if(!e)return!1;let t=e.supportsUniversalReference??e.supports_universal_reference,n=e.maxImageCount??e.max_image_count;return t!==!1&&(n==null||Number(n)>=1)},Z7=e=>e?/^https?:\/\//i.test(e)||e.startsWith(`blob:`)?e:`${kce}${e}`:``,jce=()=>{let e=Ye(),{user:t}=$5(),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(20),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)([]),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(20),[v,y]=(0,S.useState)(0),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(null),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(null),[F,I]=(0,S.useState)(null),[L,R]=(0,S.useState)(``),[z,B]=(0,S.useState)(``),[V,H]=(0,S.useState)(!1),[U,ee]=(0,S.useState)(!1),[W,te]=(0,S.useState)([]),[G,ne]=(0,S.useState)(``),[K,re]=(0,S.useState)(5),[ie,ae]=(0,S.useState)(`9:16`),[q,oe]=(0,S.useState)(`480p`),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(!1),[de,fe]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[pe,me]=(0,S.useState)([]),[he,ge]=(0,S.useState)(!1),_e=(0,S.useRef)(null),ve=(0,S.useRef)(null),ye=(0,S.useRef)(null);(0,S.useEffect)(()=>{S5().then(e=>{let t=e?.engine?.video||[];if(te(t),t.length>0){let e=t[0],n=(()=>{let t=e.maxDuration??e.max_duration;if(t!=null)return Number(t);let n=e.supportedDurations;return Array.isArray(n)&&n.length>0?Math.max(...n):15})(),r=e.supportedDurations,i=Array.from({length:n-4},(e,t)=>t+5),a=Array.from(new Set([...r||[],...i].sort((e,t)=>e-t)));ne(e.id),ae(e.supportedRatios?.includes(`9:16`)?`9:16`:e.supportedRatios?.[0]||`9:16`),oe(e.supportedResolutions?.[0]||`480p`),re((r||[]).find(e=>e<=n)??i[0]??5),fe({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:a.length>0?a:i})}}).catch(()=>Z.error(`视频引擎加载失败`)),E5().then(e=>me(Array.isArray(e)?e:[])).catch(()=>me([]))},[]),(0,S.useEffect)(()=>{if(!be)return;let e=(()=>{let e=be.maxDuration??be.max_duration;if(e!=null)return Number(e);let t=be.supportedDurations;return Array.isArray(t)&&t.length>0?Math.max(...t):15})(),t=be.supportedDurations,n=Array.from({length:Math.max(e-4,1)},(e,t)=>t+5),r=Array.from(new Set([...t||[],...n].sort((e,t)=>e-t)));fe(t=>{let i=t.durations;return(i.length>0?Math.max(...i):0)===e?t:{ratios:be.supportedRatios||t.ratios,resolutions:be.supportedResolutions||t.resolutions,durations:r.length>0?r:n}}),re(r=>r<=e?r:(t||[]).find(t=>t<=e)??n[0]??5)},[G]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&(ce(!1),ue(!1))};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]);let be=W.find(e=>e.id===G),xe=(()=>{if(!be)return 15;let e=be.maxDuration??be.max_duration;if(e!=null)return Number(e);let t=be.supportedDurations;return Array.isArray(t)&&t.length>0?Math.max(...t):15})(),Se=!L||Ace(be),Ce=(()=>{let e=pe.find(e=>e.modelConfigId===G&&e.genType===`video`&&e.resolution===q);if(!e)return 0;let t=(Number(e.baseCredits||0)+Number(e.perSecondCredits||0)*K)*Number(e.ratio||1);return L&&(t+=(Number(e.inputImageBaseCredits||0)+Number(e.inputImagePerImageCredits||0))*Number(e.inputImageRatio||1)),Number(t.toFixed(2))})(),we=(e,t,n=!1)=>{D5(e,t).then(e=>{if(e.items){p(n?t=>t.map(t=>{let n=e.items.find(e=>e.id===t.id);return n&&n.status!==t.status?n:t}):e.items);let t=e.items.some(e=>e.status===`processing`);t&&!_e.current?_e.current=setInterval(()=>{we(m,g,!0)},5e3):!t&&_e.current&&(clearInterval(_e.current),_e.current=null)}e.total!==void 0&&y(e.total)}).catch(e=>{})},Te=e=>{h(e),we(e,g)},Ee=(e,t,n=!1,a)=>{D5(e,t,a).then(e=>{if(e.items){r(n?t=>t.map(t=>{let n=e.items.find(e=>e.id===t.id);return n&&n.status!==t.status?n:t}):e.items);let t=e.items.some(e=>e.status===`processing`);t&&!ve.current?ve.current=setInterval(()=>{Ee(i,o,!0,u)},5e3):!t&&ve.current&&(clearInterval(ve.current),ve.current=null)}e.total!==void 0&&l(e.total)}).catch(e=>{})};(0,S.useEffect)(()=>(Ee(i,o),we(m,g),()=>{_e.current&&=(clearInterval(_e.current),null),ve.current&&=(clearInterval(ve.current),null)}),[]);let De=(e,t)=>{a(e),s(t),Ee(e,t,!1,u)},Oe=()=>{a(1),Ee(1,o,!1,u)},ke=async e=>{if(!e.type.startsWith(`video/`))return Z.error(`只能上传视频文件`),!1;if(!(e.size/1024/1024<50))return Z.error(`视频大小不能超过50MB`),!1;let t=document.createElement(`video`);return t.preload=`metadata`,new Promise(n=>{t.onloadedmetadata=async()=>{if(t.duration<2){Z.error(`视频时长不能少于2秒`),URL.revokeObjectURL(t.src),n(!1);return}if(t.duration>xe){Z.error(`视频时长不能超过${xe}秒`),URL.revokeObjectURL(t.src),n(!1);return}H(!0);try{let r=await vae(e,t.duration);O(e),A(r.url),M(r.resource_id||``),P(t.duration);let i=Math.round(t.duration);re(de.durations.reduce((e,t)=>Math.abs(t-i){Z.error(`视频文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},Ae=async e=>{if(!e.type.startsWith(`image/`))return Z.error(`只能上传图片文件`),!1;if(!(e.size/1024/1024<10))return Z.error(`图片大小不能超过10MB`),!1;let t=new Image;return new Promise(n=>{t.onload=async()=>{let r=t.width/t.height;Math.abs(r-.75)<.1||Math.abs(r-.5625),ee(!0);try{let t=await _ae(e);I(e),R(t.url),B(t.resource_id||``),Z.success(`图片上传成功`),n(!1)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`图片上传失败`),n(!1)}finally{ee(!1),URL.revokeObjectURL(t.src)}},t.onerror=()=>{Z.error(`图片文件无效`),URL.revokeObjectURL(t.src),n(!1)},t.src=URL.createObjectURL(e)})},je=()=>{k&&URL.revokeObjectURL(k),O(null),A(``)},Me=()=>{L&&URL.revokeObjectURL(L),I(null),R(``)},Ne=()=>{if(!k){Z.warning(`请上传复刻视频`);return}if(!G||!K||!ie||!q){Z.warning(`请选择完整的视频生成参数`);return}if(!Se){Z.warning(`当前视频引擎不支持参考图片,请移除素材图片或切换引擎`);return}let t=ye.current||`hot_v2_${Date.now()}_${Math.random().toString(16).slice(2)}`;ye.current=t,Lae({material_video_url:k,material_image_url:L||void 0,material_video_resource_id:j||void 0,material_image_resource_id:z||void 0,material_video_duration_seconds:N||void 0,source_project_name:b.trim()||void 0,target_project_name:C.trim()||void 0,project_description:T.trim()||void 0,core_content_point:T.trim()||void 0,video_config:{engine_id:G,duration:K,aspect_ratio:ie,resolution:q},idempotency_key:t}).then(t=>{let n=t.id||t.projectId||t.detail?.id;ye.current=null,A(``),M(``),P(null),R(``),B(``),I(null),x(``),w(``),E(``),we(1,20),Z.success(`项目已创建,视频提词正在生成`),n&&e(`/initial/${n}/initialinfo?flow_version=v2`)}).catch(e=>{Z.error(e?.message||`视频开头复刻失败`)})};return(0,$.jsxs)(`div`,{className:`replication-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,boxSizing:`border-box`},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{width:`68%`,background:`#f1f2f3`,backdropFilter:`blur(20px)`,display:`flex`,flexDirection:`column`,borderRadius:20,overflow:`hidden`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`16px 24px`,paddingBottom:0,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,paddingBottom:12},children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款复刻`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`上传参考视频与产品图片,一键复刻爆款视频开头`})]})}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`6px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>ge(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,background:`transparent`,borderRight:`1px solid rgba(99, 102, 241, 0.08)`,overflowY:`auto`,scrollbarWidth:`none`},children:f.length>0?(0,$.jsxs)(`div`,{style:{height:`100%`,padding:`24px`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24},children:(0,$.jsx)(`h2`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`},children:`历史生成作品`})}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(190px, 1fr))`,gap:16},children:f.map(t=>(0,$.jsxs)(`div`,{style:{border:`1px solid rgba(99, 102, 241, 0.6)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`,cursor:`pointer`,transition:`transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},onClick:()=>e(`/initial/${t.id}/initialinfo?flow_version=${t.flowVersion===`v2`?`v2`:`v1`}`),onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-6px)`,e.currentTarget.style.boxShadow=`0 12px 32px rgba(99, 102, 241, 0.12)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(99, 102, 241, 0.06)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`1/1`},children:[t.finalVideoUrl?(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${N7(t.finalVideoCoverUrl)}`,alt:t.targetProjectName,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:60,height:60,borderRadius:`50%`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(L8,{style:{fontSize:24,color:`#fff`}})})}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:8,right:8,padding:`4px 12px`,background:`rgba(0,0,0,0.7)`,borderRadius:16,fontSize:10,color:`#fff`,backdropFilter:`blur(4px)`},children:(()=>{let e=t.status,n=t.current_step_code||t.currentStepCode;if(n===`image_prompt_optimize`)switch(e){case`waiting_user`:return`等待融合图生成`;case`processing`:return`图片提示词生成中`;case`completed`:return`图片提示词生成成功`;case`failed`:return`图片提示词生成失败`;default:return e||`待处理`}else if(n===`image_generate`)switch(e){case`waiting_user`:return`等待生成视频提示词`;case`processing`:return`融合图生成中`;case`completed`:return`融合图生成成功`;case`failed`:return`融合图生成失败`;default:return e||`待处理`}else if(n===`video_prompt_optimize`)switch(e){case`waiting_user`:return`等待最终视频生成`;case`processing`:return`视频提示词生成中`;case`completed`:return`视频提示词生成成功`;case`failed`:return`视频提示词生成失败`;default:return e||`待处理`}else if(n===`video_generate`)switch(e){case`waiting_user`:return``;case`processing`:return`最终视频生成中`;case`completed`:return`最终视频生成成功`;case`failed`:return`最终视频生成失败`;default:return e||`待处理`}else if(n===`material_input`)switch(e){case`waiting_user`:return`等待生成图片提示词`;case`processing`:return`素材处理中`;case`completed`:return`素材上传成功`;case`failed`:return`素材上传失败`;default:return e||`待处理`}else return{pending:`子任务待处理`,waiting_user:`等待用户确认或触发`,processing:`子任务处理中`,completed:`子任务完成`,failed:`子任务失败`,cancelled:`子任务取消`}[e]||e||`待处理`})()})]}),(0,$.jsxs)(`div`,{style:{padding:14},children:[(0,$.jsx)(`h4`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t.targetProjectName||`未命名作品`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:6},children:[(0,$.jsx)(`p`,{style:{margin:0,fontSize:12,color:`#64748b`},children:t.createdAt?new Date(t.createdAt).toLocaleDateString(`zh-CN`):``}),(()=>{let e=t.status;return e===`waiting_user`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#f59e0b`},children:`等待下一步`}):e===`processing`?(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#6366f1`,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`span`,{children:`进行中`}),(0,$.jsx)(`span`,{style:{animation:`dots 1s infinite`},children:`...`}),(0,$.jsx)(`style`,{children:` @keyframes dots { 0%, 20% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } } - `})]}):e===`failed`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#ef4444`},children:`失败`}):e===`completed`&&t.finalVideoUrl?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#10b981`},children:`任务完成`}):null})()]})]})]},t.id))}),(0,$.jsx)(`div`,{style:{paddingTop:20,paddingBottom:20,display:`flex`,justifyContent:`center`},children:(0,$.jsx)(FW,{current:m,pageSize:g,total:v,onChange:Te,showSizeChanger:!1,showQuickJumper:!1,showTotal:e=>`共 ${e} 条`,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:m===1?`#f9fafb`:`#fff`,cursor:m===1?`not-allowed`:`pointer`,color:m===1?`#d1d5db`:`#6b7280`,fontSize:14},disabled:m===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:m>=Math.ceil(v/g)?`#f9fafb`:`#fff`,cursor:m>=Math.ceil(v/g)?`not-allowed`:`pointer`,color:m>=Math.ceil(v/g)?`#d1d5db`:`#6b7280`,fontSize:14},disabled:m>=Math.ceil(v/g),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:6,background:e===m?`#6366f1`:`#fff`,color:e===m?`#fff`:`#374151`,fontWeight:e===m?500:400,cursor:`pointer`,fontSize:14},children:e}):n})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px`},children:[(0,$.jsxs)(`div`,{style:{width:120,height:120,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:24,position:`relative`},children:[(0,$.jsx)(`div`,{style:{width:60,height:60,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:20,position:`absolute`,bottom:0,right:10}}),(0,$.jsx)(`div`,{style:{width:50,height:50,border:`2px solid rgba(99, 102, 241, 0.2)`,borderRadius:16,position:`absolute`,top:0,left:10}}),(0,$.jsx)(`div`,{style:{width:56,height:56,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.25)`},children:(0,$.jsx)(R8,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`,marginBottom:8},children:`暂无生成内容`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#64748b`,textAlign:`center`,padding:`0 40px`,lineHeight:1.6},children:`请完善素材与卖点,生成专属爆款复刻视频`})]})})]}),(0,$.jsx)(`div`,{className:`replication-form`,style:{overflow:`auto`,width:`30%`,background:`transparent`,backdropFilter:`blur(20px)`,borderRadius:20,position:`relative`,zIndex:10,scrollbarWidth:`none`},children:(0,$.jsxs)(`div`,{className:`replication-form-content`,style:{width:`100%`,height:`100%`,background:`rgba(258, 250, 252, 0.2)`,padding:24,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{marginBottom:10},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`},children:[`上传复刻视频`,(0,$.jsx)(`span`,{style:{color:`#f94444`},children:`(必选)`})]}),(0,$.jsxs)(`p`,{style:{fontSize:12,color:`#64748b`,fontWeight:400,margin:`4px 0 0`},children:[`当前引擎最多可上传 `,xe,` 秒`]})]}),k?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`video`,{src:Q7(k),controls:!0,style:{width:`100%`,borderRadius:12,maxHeight:200,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:je,style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`})]}):(0,$.jsx)(H1,{style:{width:`100%`},beforeUpload:ke,showUploadList:!1,accept:`video/mp4,video/quicktime,.mp4,.mov`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:24,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:V?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:40,height:40,margin:`0 auto 12px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsxs)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:[`支持的文件类型:MP4、MOV | 视频最大时长:`,xe,` 秒 | 最大大小:50M`]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:48,height:48,margin:`0 auto 12px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(R8,{style:{fontSize:24,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`点击或拖拽上传视频`}),(0,$.jsxs)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:[`支持的文件类型:MP4、MOV | 视频最大时长:`,xe,` 秒 | 最大大小:50M`]})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:[`上传产品图片`,(0,$.jsx)(`span`,{children:`(可选)`})]}),L?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`img`,{src:Q7(L),alt:`产品图片`,style:{width:`100%`,borderRadius:12,maxHeight:200,objectFit:`contain`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:Me,style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`})]}):(0,$.jsx)(w7,{accept:`image/*`,multiple:!1,mediaType:`image`,uploading:U,maxImageCount:1,usedImageCount:0,onLocalSelect:e=>{e[0]&&Ae(e[0])},onHistorySelect:e=>{let t=e[0];t&&(I(null),R(t.resourceUrl||t.previewUrl||t.displayUrl||``),B(t.id),Z.success(`历史图片已选择`))},children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:20,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:U?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:36,height:36,margin:`0 auto 10px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:44,height:44,margin:`0 auto 10px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:14,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(w6,{style:{fontSize:22,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`+ 点击上传`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:[`原产品名称`,(0,$.jsx)(`span`,{children:`(可选)`})]}),(0,$.jsx)(YU,{value:b,onChange:e=>x(e.target.value),placeholder:`请输入原产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:50,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[b.length,`/50`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:[`自有产品名称`,(0,$.jsx)(`span`,{children:`(可选)`})]}),(0,$.jsx)(YU,{value:C,onChange:e=>w(e.target.value),placeholder:`请输入自有产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:50,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[C.length,`/50`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:[`产品卖点`,(0,$.jsx)(`span`,{children:`(可选)`})]}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(Dce,{value:T,onChange:e=>E(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:10,fontSize:13,height:80,resize:`none`,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},rows:3,maxLength:200}),(0,$.jsxs)(`span`,{style:{position:`absolute`,right:10,bottom:8,color:`#94a3b8`,fontSize:12},children:[T.length,`/200`]})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:12,display:`grid`,gap:10},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`},children:[`视频生成参数`,(0,$.jsx)(`span`,{style:{color:`#f94444`},children:`(必选)`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{ce(!se),ue(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(s8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:W.find(e=>e.id===G)?.name||`选择引擎`})]}),se&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-19,width:300,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:300,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:W.filter(e=>e.supportsUniversalReference!==!1).map(e=>(0,$.jsx)(`button`,{type:`button`,onClick:()=>{ne(e.id);let t=(()=>{let t=e.maxDuration??e.max_duration;if(t!=null)return Number(t);let n=e.supportedDurations;return Array.isArray(n)&&n.length>0?Math.max(...n):15})(),n=e.supportedDurations,r=Array.from({length:t-4},(e,t)=>t+5),i=Array.from(new Set([...n||[],...r].sort((e,t)=>e-t)));fe({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:i}),e.supportedRatios?.includes(ie)||ae(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(q)||oe(e.supportedResolutions?.[0]||`720p`),(!i.includes(K)||K>t)&&re(i.find(e=>e<=t)??i[0]??5),ce(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:G===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:G===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:G===e.id?600:500,color:G===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name})},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{ue(!le),ce(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(x3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[ie,` · `,K,`s · `,q]})]}),le&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:320,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:de.ratios.map(e=>{let[t,n]=e.split(`:`).map(Number),r=t>=n?18:Math.round(t/n*18),i=n>=t?18:Math.round(n/t*18);return(0,$.jsxs)(`button`,{onClick:()=>ae(e),style:{flex:`0 0 calc(12.5% - 4px)`,minWidth:44,height:52,borderRadius:6,border:ie===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:ie===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:r,height:i,border:`2px solid ${ie===e?`#6366f1`:`#9ca3af`}`,borderRadius:3,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:ie===e?`#6366f1`:`#6b7280`,fontWeight:ie===e?600:400},children:e})]},e)})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(K-Math.min(...de.durations))/(xe-Math.min(...de.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...de.durations),max:xe,value:K,onChange:e=>re(Math.min(Number(e.target.value),xe)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:K}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:de.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>oe(e),style:{flex:1,height:42,borderRadius:8,border:q===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:q===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:q===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]})]}),(0,$.jsx)(jw,{title:(t?.credits||0){if((t?.credits||0)ge(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(YU,{placeholder:`搜索产品名称`,value:u,onChange:e=>d(e.target.value),onPressEnter:Oe,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(X,{type:`primary`,onClick:Oe,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:`0 24px 24px`},children:(0,$.jsx)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`},children:(0,$.jsx)(aQ,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`,width:100,render:e=>(0,$.jsx)(`span`,{style:{fontSize:13,color:`#1e293b`,fontWeight:500},children:e||`-`})},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,width:220,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#64748b`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#64748b`}})();return(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,width:200,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,width:220,render:(t,n)=>(0,$.jsxs)(bV,{children:[(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo?flow_version=${n.flowVersion===`v2`?`v2`:`v1`}`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},children:`查看详情`}),(0,$.jsx)(jG,{title:`确认删除这个爆款开头复刻任务吗?`,onConfirm:async()=>{try{await foe(n.id,n.flowVersion),Z.success(`删除成功`),Ee(1,o,!1,u)}catch{Z.error(`删除失败`)}},children:(0,$.jsx)(`button`,{style:{color:`#ef4444`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(239, 68, 68, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.12)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.08)`},children:`删除`})})]})}],dataSource:n,rowKey:`id`,pagination:{current:i,pageSize:o,total:c,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:De,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:i===1?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:i===1?`not-allowed`:`pointer`,color:i===1?`#94a3b8`:`#6366f1`,fontSize:14},disabled:i===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:i>=Math.ceil(c/o)?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:i>=Math.ceil(c/o)?`not-allowed`:`pointer`,color:i>=Math.ceil(c/o)?`#94a3b8`:`#6366f1`,fontSize:14},disabled:i>=Math.ceil(c/o),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:8,background:e===i?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#fff`,color:e===i?`#fff`:`#475569`,fontWeight:e===i?600:400,cursor:`pointer`,fontSize:14},children:e}):n},style:{fontSize:13},scroll:{y:350}})})})]})]})};function $7(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function e9(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function t9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function jce(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function n9(e){if(!$7(e))return null;let t=e9(e,`key`);return t?{key:t,label:e9(e,`label`)||t,type:e9(e,`type`)||void 0,enabled:t9(e,!0,`enabled`),editable:t9(e,!0,`editable`),maxLength:jce(e,`maxLength`,`max_length`)}:null}function r9(e){if(!$7(e))return null;let t=e.data;return $7(t)?t:Array.isArray(e.sections)?e:null}function Mce(e){return!!r9(e)}function i9(e){let t=r9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=n9(e);if(!t||!$7(e))return null;let n=Array.isArray(e.children)?e.children.map(n9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(n9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(n9).filter(Boolean):[];return{...t,contentKey:e9(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function a9(e){if(e==null)return``;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function o9(e){let t=a9(e);return t.length>40||t.includes(` -`)||t.includes(`,`)||t.includes(`。`)||t.includes(`;`)||t.includes(`;`)}function s9(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function c9(e,t,n,r){let i=s9(e||{});return $7(i[t])||(i[t]={}),i[t][n]=r,i}function l9(e,t,n,r,i){let a=s9(e||{});return Array.isArray(a[t])||(a[t]=[]),$7(a[t][n])||(a[t][n]={}),a[t][n][r]=i,a}function u9(e,t){if(!$7(e))return`视频提示词不能为空`;let n=i9(t);if(!n.length)return`视频提词配置缺失,无法保存`;for(let t of n){if(!t.editable)continue;let n=e[t.key];if(t.type===`object`){if(!$7(n))continue;for(let e of t.children)if(!(!e.enabled||!e.editable||!e.maxLength)&&a9(n[e.key]).length>e.maxLength)return`字段【${t.label}.${e.label}】长度不能超过 ${e.maxLength} 个字符`;continue}if(t.type===`flow`){if(!Array.isArray(n))continue;for(let e=0;en.maxLength)return`字段【${t.label} 第 ${e+1} 项.${n.label}】长度不能超过 ${n.maxLength} 个字符`}}continue}if(t.editable&&t.maxLength&&a9(n).length>t.maxLength)return`字段【${t.label}】长度不能超过 ${t.maxLength} 个字符`}return null}var{Text:d9}=Q,{TextArea:f9}=YU;function p9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function m9({value:e}){let t=e===`true`?`是`:e===`false`?`否`:a9(e);return o9(e)?(0,$.jsx)(f9,{value:t,rows:Math.min(6,Math.max(2,Math.ceil(t.length/42))),disabled:!0,style:{borderRadius:10,color:`#64748b`,border:`1px solid #e2e8f0`,background:`#f8fafc`}}):(0,$.jsx)(YU,{value:t,disabled:!0,style:{borderRadius:10,color:`#64748b`,border:`1px solid #e2e8f0`,background:`#f8fafc`}})}function h9({value:e,maxLength:t,onChange:n}){let r=a9(e),i={value:r,maxLength:t,showCount:!!t,onChange:e=>n(e.target.value),style:{borderRadius:10,border:`1px solid #e2e8f0`,transition:`all 0.2s ease`}};return o9(e)?(0,$.jsx)(f9,{...i,rows:Math.min(8,Math.max(3,Math.ceil(r.length/42)))}):(0,$.jsx)(YU,{...i})}function g9({value:e,onChange:t}){let n=e===!0||e===`true`;return(0,$.jsxs)(qF.Group,{value:n,onChange:e=>t(e.target.value),style:{display:`flex`,gap:24},children:[(0,$.jsx)(qF,{value:!0,style:{fontSize:14,color:`#475569`},children:`是`}),(0,$.jsx)(qF,{value:!1,style:{fontSize:14,color:`#475569`},children:`否`})]})}var _9=({value:e,schemaConfigSnapshot:t,onChange:n})=>{let r=p9(e)?e:{},i=i9(t),[a,o]=(0,S.useState)(``),s=(0,S.useRef)(null),c=e=>{o(e.key);let t=document.getElementById(`section-${e.key}`);if(t&&s.current){let e=s.current.getBoundingClientRect(),n=t.getBoundingClientRect().top-e.top+s.current.scrollTop;s.current.scrollTo({top:n,behavior:`smooth`})}};if((0,S.useEffect)(()=>{let e=i.filter(e=>e.key in r);e.length>0&&!a&&o(e[0].key)},[i,r,a]),(0,S.useEffect)(()=>{let e=s.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect(),n=t.height/2,s=``,c=1/0;for(let e of i){if(!(e.key in r))continue;let i=document.getElementById(`section-${e.key}`);if(!i)continue;let a=i.getBoundingClientRect(),o=a.top,l=a.bottom;if(l>t.top&&o{e.removeEventListener(`scroll`,t)}},[i,r]),!Mce(t))return(0,$.jsxs)(bV,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,$.jsx)(Jf,{type:`warning`,showIcon:!0,message:`视频提词配置缺失,暂不能编辑`,description:`请刷新详情后重试;如果仍然缺失,请联系管理员排查第4步 schema_config_snapshot 返回。`}),Object.keys(r).length?(0,$.jsx)(`pre`,{style:{margin:0,padding:12,borderRadius:10,background:`#f8fafc`,maxHeight:420,overflow:`auto`,color:`#475569`},children:JSON.stringify(r,null,2)}):null]});if(!i.length)return(0,$.jsx)(Jf,{type:`warning`,showIcon:!0,message:`视频提词配置为空`,description:`当前 Schema 配置没有可展示字段。`});let l=e=>{let t=p9(r[e.key])?r[e.key]:{},i=e.children.filter(e=>e.enabled);return i.length?(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:3,height:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(d9,{strong:!0,style:{color:`#334155`,fontSize:14,fontWeight:600},children:e.label})]}),(0,$.jsx)(`div`,{style:{padding:`16px`,backgroundColor:`#fff`,borderRadius:12,border:`1px solid #e2e8f0`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:i.map(i=>(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{marginBottom:6},children:(0,$.jsx)(d9,{style:{color:`#64748b`,fontSize:12},children:i.label})}),i.editable?i.type===`boolean`?(0,$.jsx)(g9,{value:t[i.key],onChange:t=>n(c9(r,e.key,i.key,t))}):(0,$.jsx)(h9,{value:t[i.key],maxLength:i.maxLength,onChange:t=>n(c9(r,e.key,i.key,t))}):(0,$.jsx)(m9,{value:t[i.key]})]},i.key))})]},e.key):null},u=e=>{let t=Array.isArray(r[e.key])?r[e.key]:[],i=[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...e.itemFields.filter(e=>e.enabled)];return(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:3,height:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(d9,{strong:!0,style:{color:`#334155`,fontSize:14,fontWeight:600},children:e.label}),(0,$.jsx)(vQ,{style:{borderRadius:4,fontSize:11,padding:`2px 8px`,background:`#f1f5f9`,color:`#64748b`,border:`none`},children:`锁定条目和时间段`})]}),(0,$.jsx)(`div`,{style:{padding:`16px`,backgroundColor:`#fff`,borderRadius:12,border:`1px solid #e2e8f0`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:t.length===0?(0,$.jsx)(d9,{style:{color:`#94a3b8`,fontSize:12},children:`暂无内容`}):t.map((a,o)=>{let s=p9(a)?a:{};return(0,$.jsxs)(`div`,{style:{marginBottom:o===t.length-1?0:16,paddingBottom:o===t.length-1?0:16,borderBottom:o===t.length-1?`none`:`1px dashed #e2e8f0`},children:[(0,$.jsxs)(d9,{strong:!0,style:{display:`block`,marginBottom:10,color:`#475569`,fontSize:13},children:[`第 `,o+1,` 段`]}),i.map(t=>(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsx)(`div`,{style:{marginBottom:6},children:(0,$.jsx)(d9,{style:{color:`#64748b`,fontSize:12},children:t.label})}),t.editable?t.type===`boolean`?(0,$.jsx)(g9,{value:s[t.key],onChange:i=>n(l9(r,e.key,o,t.key,i))}):(0,$.jsx)(h9,{value:s[t.key],maxLength:t.maxLength,onChange:i=>n(l9(r,e.key,o,t.key,i))}):(0,$.jsx)(m9,{value:s[t.key]})]},t.key))]},`${e.key}-${o}`)})})]},e.key)},d=e=>e.key in r?(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:3,height:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(d9,{strong:!0,style:{color:`#334155`,fontSize:14,fontWeight:600},children:e.label})]}),(0,$.jsx)(`div`,{style:{padding:`16px`,backgroundColor:`#fff`,borderRadius:12,border:`1px solid #e2e8f0`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:e.editable?(0,$.jsx)(h9,{value:r[e.key],maxLength:e.maxLength,onChange:t=>{let i=s9(r);i[e.key]=t,n(i)}}):(0,$.jsx)(m9,{value:r[e.key]})})]},e.key):null,f=i.filter(e=>e.key in r).map(e=>({key:e.key,label:e.label})),p=e=>e.key in r?e.type===`object`?l(e):e.type===`flow`?u(e):d(e):null;return(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`row`,maxHeight:500},children:[(0,$.jsx)(`div`,{style:{width:180,flexShrink:0,background:`#fff`,borderRight:`1px solid #e2e8f0`,overflowY:`auto`},children:(0,$.jsx)(GE,{mode:`inline`,selectedKeys:[a],onClick:c,style:{height:`100%`,borderRight:0},theme:`light`,items:f.map(e=>({...e,style:{borderRadius:8,margin:`4px 8px`,padding:`8px 12px`,color:`#64748b`,fontSize:13,transition:`all 0.2s ease`,maxHeight:500}}))})}),(0,$.jsx)(`div`,{ref:s,style:{flex:1,padding:`20px`,overflowY:`auto`,background:`#f8fafc`},children:i.map(e=>(0,$.jsx)(`div`,{id:`section-${e.key}`,children:p(e)},e.key))})]})},{Title:Nce,Text:v9}=Q,{TextArea:Pce}=YU;function Fce(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}var y9=e=>e?/^https?:\/\//i.test(e)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``;function Ice(){let e=Ye(),{creatID:t}=$e(),[n]=On(),r=n.get(`flow_version`)===`v2`?`v2`:`v1`,{user:i}=e7(),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(`image`),[p,m]=(0,S.useState)({}),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)({}),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),[F,I]=(0,S.useState)(!1),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(!1),[V,H]=(0,S.useState)(5),[U,ee]=(0,S.useState)(`16:9`),[W,te]=(0,S.useState)(`480p`),[G,ne]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[K,re]=(0,S.useState)([]),[ie,ae]=(0,S.useState)(0),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(1),[le,ue]=(0,S.useState)(20),[de,fe]=(0,S.useState)(0),[pe,me]=(0,S.useState)(``),[he,ge]=(0,S.useState)({}),[_e,ve]=(0,S.useState)(!1),[ye,be]=(0,S.useState)([]),[xe,Se]=(0,S.useState)([]),[Ce,we]=(0,S.useState)(!1),[Te,Ee]=(0,S.useState)(``),[De,Oe]=(0,S.useState)(`image`),[ke,Ae]=(0,S.useState)(!1),je=S.useRef(null);(0,S.useEffect)(()=>{if(Ce&&De===`video`){let e=()=>{je.current&&je.current.play().catch(()=>{})};je.current&&(je.current.readyState>=2?e():je.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),je.current&&(je.current.removeEventListener(`loadedmetadata`,e),je.current.pause())}}else je.current&&je.current.pause()},[Ce,De]);let Me=(e,t,n=!1)=>{Ee(e),Oe(t),Ae(n),we(!0)},Ne=()=>{we(!1),Ee(``),je.current&&je.current.pause()},Pe=e=>{if(e.preventDefault(),e.stopPropagation(),!Te)return;let t=document.createElement(`a`);t.href=`https://ceshi.apiforeign.minzhongzc.com${Te}&download=1`,t.download=De===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},Fe=r===`v2`,Ie=(0,S.useMemo)(()=>Fe?[{id:1,title:`素材与项目信息`,description:`固定素材和项目描述`,childId:1},{id:2,title:`生成视频提示词`,description:`生成并确认视频提示词`,childId:4},{id:3,title:`生成最终视频`,description:`使用当前视频提示词生成视频`,childId:5}]:[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}],[Fe]),Le=(0,S.useMemo)(()=>Ie.map((e,t)=>({...e,status:ye[t]?.status||``,id:ye[t]?.id||t,output:ye[t]?.output||``,input:ye[t]?.input||{},engineId:ye[t]?.input?.payload?.videoConfig?.engineId||``,errorMessage:ye[t]?.errorMessage||``})),[Ie,ye]),Re=(0,S.useRef)(!1);(0,S.useEffect)(()=>{if(!Le.some(e=>e.status))return;let e=[...Le].reverse().find(e=>e.status===`processing`);if(e){Se([String(e.childId)]),Re.current=!1;return}if(Re.current){Re.current=!1;return}let t=[...Le].reverse().find(e=>e.status===`completed`&&e.childId!==1);if(t){Se([String(t.childId)]);return}Se([])},[Le]);let ze=(e,t,n)=>{O5(e,t,n).then(e=>{e.items&&oe(e.items),e.total!==void 0&&fe(e.total)}).catch(e=>{})},Be=(e,t)=>{ce(e),ue(t),ze(e,t,pe)},Ve=()=>{ce(1),ze(1,le,pe)};(0,S.useEffect)(()=>{ze(se,le)},[]),(0,S.useEffect)(()=>{C5().then(e=>{let t=(e.engine?.video||[]).filter(e=>e.supportsUniversalReference!==!1),n=(e.engine?.image||[]).filter(e=>e.supportsUniversalReference!==!1);if(A({video:t,image:n}),t.length>0){M(t[0].id);let e=t[0];ne({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]})}n.length>0&&P(n[0].id)}).catch(e=>{})},[]),(0,S.useEffect)(()=>{D5().then(e=>{re(e)}).catch(()=>{})},[]);let He=()=>{let e={};e=K.find(e=>e.modelConfigId===j&&e.genType===`video`&&e.resolution===W),e||(e={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(W===`1080p`||W===`720p`||W===`480p`)&&(e.ratio=1.3));let t=(V*e.perSecondCredits+e.baseCredits)*e.ratio,n=he?.videoGeneration?.inputMedia?.video?.duration||0;if(n>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n)*(e.inputVideoRatio||1);t+=r}let r=Fe?+!!he?.material?.materialImageUrl:he?.videoGeneration?.inputMedia?.image?.length||0;if(r>0){let n=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*r)*(e.inputImageRatio||1);t+=n}ae(Number(t.toFixed(2)))},Ue=()=>{let e=Le[1]?.input?.payload?.videoConfig||Le[1]?.input?.payload?.video_config;if(!e)return 0;let t=e?.engineId||e?.engine_id,n=e?.resolution,r=e?.duration||V,i={};i=K.find(e=>e.modelConfigId===t&&e.genType===`video`&&e.resolution===n),i||={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0};let a=(r*i.perSecondCredits+i.baseCredits)*i.ratio,o=he?.videoGeneration?.inputMedia?.video?.duration||0;if(o>0){let e=((i.inputVideoBaseCredits||0)+(i.inputVideoPerSecondCredits||0)*o)*(i.inputVideoRatio||1);a+=e}let s=Fe?+!!he?.material?.materialImageUrl:he?.videoGeneration?.inputMedia?.image?.length||0;if(s>0){let e=((i.inputImageBaseCredits||0)+(i.inputImagePerImageCredits||0)*s)*(i.inputImageRatio||1);a+=e}return Number(a.toFixed(2))};(0,S.useEffect)(()=>{K.length>0&&j&&He()},[K,j,V,W,he]),(0,S.useEffect)(()=>()=>{x.current&&=(clearInterval(x.current),null)},[]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(I(!1),R(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&(ve(!0),k5(t,r).then(e=>{ge(e),e.steps&&be(e.steps)}).catch(e=>{Z.error(e?.message||`加载任务详情失败`)}).finally(()=>{ve(!1)}))},[t,r]),(0,S.useEffect)(()=>{let e=he?.status===`processing`||ye.some(e=>e?.status===`processing`);e&&!x.current?x.current=setInterval(Ke,15e3):!e&&x.current&&(clearInterval(x.current),x.current=null)},[he?.status,ye,t,r]);let We=(e,t,n,r)=>{f(t||`image`),v(n?String(n):``),t===`video`?(g(r||null),m(e&&typeof e==`object`?Fce(e):{}),c(``)):(g(null),c(e||``),m({})),o(!0)},Ge=async()=>{if(d===`image`){if(!he?.id||!_){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!s||!s.trim()){Z.warning(`图片提示词不能为空`);return}b(!0);try{await Bae(he.id,_,{prompt:s.trim()}),Z.success(`图片提示词已保存`),qe(),o(!1),v(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{b(!1)}return}if(!he?.id||!_){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!p||typeof p!=`object`||Object.keys(p).length===0){Z.warning(`视频提示词不能为空`);return}if(!h){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=u9(p,h);if(e){Z.warning(e);return}b(!0);try{await(Fe?Rae:qae)(he.id,_,{prompt_schema:p}),Z.success(`视频提示词已保存`),qe(),o(!1),v(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{b(!1)}},Ke=()=>{t&&k5(t,r).then(e=>{ge(e),e.steps&&be(e.steps)}).catch(e=>{console.error(`轮询任务详情失败`,e)})},qe=()=>{t&&k5(t,r).then(e=>{ge(e),e.steps&&be(e.steps)}).catch(e=>{Z.error(e?.message||`刷新任务详情失败`)})},Je=e=>{let t={engine_id:N,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};A5(he.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),qe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Xe=()=>{let e={engine_id:N,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};A5(he.id,Le[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),qe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ze=e=>{let t={engine_id:j,duration:V,aspect_ratio:U,resolution:W,target_platform:`抖音`};Vae(he.id,e.toString(),t).then(e=>{qe(),Z.info(`正在生成视频提示词,请稍候...`)}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Qe=async(e,t)=>{try{Fe?await zae(he.id,String(e)):await Hae(he.id,String(e),{engine_id:t||``}),Z.info(`正在生成视频,请稍候...`),qe()}catch(e){let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)}},et=async()=>{let e=Fe?Le[1]:Le[3];e?.id&&await Qe(e.id,e.engineId||``)},tt=async e=>{if(!(!Fe||!he?.id||!e||!j))try{await Lae(he.id,e,{video_config:{engine_id:j,duration:V,aspect_ratio:U,resolution:W}}),Z.info(`正在按新视频参数重新生成视频提示词,请稍候...`),qe()}catch(e){Z.error(e?.message||`重新生成视频提示词失败`)}};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[_e&&(0,$.jsxs)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,background:`linear-gradient(135deg, rgba(250, 248, 255, 0.95) 0%, rgba(245, 243, 255, 0.95) 50%, rgba(240, 249, 255, 0.95) 100%)`,backdropFilter:`blur(12px)`,zIndex:9999,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:20,opacity:1,transition:`opacity 0.3s ease`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:60,height:60,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`,border:`2px solid rgba(99, 102, 241, 0.08)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`,border:`2px solid transparent`,borderTopColor:`#6366f1`,borderRightColor:`#8b5cf6`,borderRadius:`50%`,animation:`spinSlow 0.8s linear infinite`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:40,height:40,border:`2px solid transparent`,borderBottomColor:`#a855f7`,borderLeftColor:`#c084fc`,borderRadius:`50%`,animation:`spinSlow 1.2s linear infinite reverse`}}),(0,$.jsx)(`div`,{style:{width:8,height:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,borderRadius:`50%`,boxShadow:`0 0 12px rgba(99, 102, 241, 0.6)`}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{fontSize:16,color:`#4f46e5`,fontWeight:600,letterSpacing:.5},children:`加载中`}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#94a3b8`,fontWeight:400},children:`正在获取任务详情...`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:4,marginTop:8},children:[0,1,2].map(e=>(0,$.jsx)(`div`,{style:{width:4,height:4,background:`#a5b4fc`,borderRadius:`50%`,animation:`spinSlow ${.8+e*.2}s ease-in-out infinite`,animationDelay:`${e*.15}s`}},e))})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(U0,{}),onClick:()=>e(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>u(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box video-container`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:he?.material?.materialVideoUrl?`pointer`:`default`,position:`relative`},onClick:()=>he?.material?.materialVideoUrl&&Me(he.material.materialVideoUrl,`video`),children:he?.material?.materialVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:y9(he.material.materialVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`contain`}}),(0,$.jsx)(`div`,{className:`video-overlay`,children:(0,$.jsx)(N6,{style:{fontSize:48,color:`#fff`,opacity:.9}})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:he?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>he?.material?.materialImageUrl&&Me(he.material.materialImageUrl,`image`),children:he?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:y9(he.material.materialImageUrl),alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),(0,$.jsx)(`div`,{style:{margin:`20px 0`,height:1,background:`linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent)`,borderRadius:.5}}),he?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Me(he.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${he.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),he?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsxs)(`div`,{className:`medio_box video-container`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`,position:`relative`},onClick:()=>Me(he.finalVideoUrl,`video`,!0),children:[(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${he.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}),(0,$.jsx)(`div`,{className:`video-overlay`,children:(0,$.jsx)(N6,{style:{fontSize:48,color:`#fff`,opacity:.9}})})]})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(o_,{activeKey:xe,onChange:Se,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:Le.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(N2,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(v9,{style:{color:`#475569`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:he?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:y9(he.material.materialVideoUrl),style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(v9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:he?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:y9(he.material.materialImageUrl),alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`原产品名称:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Le[0]?.input?.payload?.sourceProjectName||`-`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`自有产品名称:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Le[0]?.input?.payload?.targetProjectName||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`产品卖点:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Le[0]?.input?.payload?.coreContentPoint||`-`})]})]})]}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(v9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(bV,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(e$,{}),onClick:()=>We(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(X,{onClick:()=>{Re.current=!0,Se(t=>t.filter(t=>t!==String(e.childId))),Je(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[he.finalImageUrl?(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${he.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(e$,{}),onClick:()=>Xe(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),!Fe&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{I(!F),R(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(s8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(v9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:k.video?.find(e=>e.id===j)?.name||`选择引擎`})]}),F&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(v9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:k.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{M(e.id),ne({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(U)||ee(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(W)||te(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(V)||H(e.supportedDurations?.[0]||5),I(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:j===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:j===e.id?600:500,color:j===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{let e=Le[1]?.input?.payload?.videoConfig||Le[1]?.input?.payload?.video_config;if(e){let t=e?.engineId||e?.engine_id,n=k.video?.find(e=>String(e.id)===String(t));n&&(M(n.id),ne({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]})),ee(e?.aspectRatio||e?.aspect_ratio||`16:9`),te(e?.resolution||`480p`),H(e?.duration||5)}R(!L),I(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(x3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(v9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[U,` · `,V,`s · `,W]})]}),L&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(v9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:G.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>ee(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:U===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:U===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${U===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:U===e?`#6366f1`:`#6b7280`,fontWeight:U===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(v9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(V-Math.min(...G.durations))/(Math.max(...G.durations)-Math.min(...G.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...G.durations),max:Math.max(...G.durations),value:V,onChange:e=>H(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:V}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(v9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:G.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>te(e),style:{flex:1,height:42,borderRadius:6,border:W===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:W===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:W===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(jw,{title:(i?.credits||0){if((i?.credits||0)t.filter(t=>t!==String(e.childId))),Ze(e.id)},disabled:e.status!==`completed`||(i?.credits||0){let e=Le[1]?.input?.payload?.videoConfig||Le[1]?.input?.payload?.video_config,t=e?.engineId||e?.engine_id,n=t?(k.video||[]).find(e=>String(e.id)===String(t))?.name:``;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`引擎:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:n||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`比例:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.aspectRatio||e?.aspect_ratio||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`分辨率:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.resolution||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`时长:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.duration||`-`})]})]})})()})}),(0,$.jsxs)(bV,{style:{marginTop:16,gap:12,width:`100%`,flexWrap:`wrap`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(e$,{}),onClick:()=>We(he?.videoGeneration?.promptSchema,`video`,e.id,he?.videoGeneration?.schemaConfigSnapshot),style:{flex:`0 0 auto`,minWidth:160,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!he?.videoGeneration?.promptSchema||!he?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),Fe&&(0,$.jsx)(jw,{title:`LLM积分由服务端按当前功能场景直接消费`,placement:`top`,children:(0,$.jsx)(X,{type:`default`,onClick:()=>{let t=Le[1]?.input?.payload?.videoConfig||Le[1]?.input?.payload?.video_config;if(t){let e=t?.engineId||t?.engine_id,n=k.video?.find(t=>String(t.id)===String(e));n&&(M(n.id),ne({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]})),ee(t?.aspectRatio||t?.aspect_ratio||`16:9`),te(t?.resolution||`480p`),H(t?.duration||5)}E(String(e.id)),w(!0)},style:{flex:`0 0 auto`,minWidth:160,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500},disabled:e.status===`processing`||Le[2]?.status===`processing`,children:`重新生成视频提词`})}),(0,$.jsx)(jw,{title:(i?.credits||0){let t=Ue();if((i?.credits||0)t.filter(t=>t!==String(e.childId))),Qe(e.id,e.engineId)},type:`primary`,style:{flex:`1 0 auto`,minWidth:140,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`||(i?.credits||0){let e=Ue();if((i?.credits||0){let e=`https://ceshi.apiforeign.minzhongzc.com${he?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(DG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:d===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:a,onCancel:()=>{y||o(!1)},footer:[(0,$.jsx)(X,{onClick:()=>o(!1),disabled:y,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:Ge,loading:y,disabled:y,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:`80%`,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:d===`image`?(0,$.jsx)(Pce,{value:s,onChange:e=>c(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:600,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(_9,{value:p,schemaConfigSnapshot:h,onChange:m})})}),(0,$.jsxs)(DG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:l,onCancel:()=>u(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(YU,{placeholder:`搜索产品名称`,value:pe,onChange:e=>me(e.target.value),onPressEnter:Ve,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(X,{type:`primary`,onClick:Ve,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(aQ,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,render:e=>{if(!e)return`-`;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}},{title:`操作`,key:`action`,align:`center`,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>{u(!1),e(`/initial/${n.id}/initialinfo?flow_version=${n.flowVersion===`v2`?`v2`:`v1`}`)},style:{color:`#6366f1`,textDecoration:`none`,fontSize:12,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`,fontWeight:500},children:`查看详情`})}],dataSource:q,rowKey:`id`,pagination:{current:se,pageSize:le,total:de,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:Be},style:{fontSize:13},scroll:{y:350}})]}),(0,$.jsx)(DG,{open:Ce,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Ne,width:800,footer:ke?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(I1,{}),onClick:Pe,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}):null,centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:De===`image`?(0,$.jsx)(`img`,{src:Te.startsWith(`http`)?Te:`https://ceshi.apiforeign.minzhongzc.com${Te}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:je,src:Te.startsWith(`http`)?Te:`https://ceshi.apiforeign.minzhongzc.com${Te}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(DG,{open:C,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#6366f1`,letterSpacing:.4},children:`重新生成视频提词`})]}),onCancel:()=>w(!1),width:400,footer:null,centered:!0,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(VC,{value:j,onChange:e=>{let t=k.video?.find(t=>t.id===e);t&&(M(t.id),ne({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]}),t.supportedRatios?.includes(U)||ee(t.supportedRatios?.[0]||`16:9`),t.supportedResolutions?.includes(W)||te(t.supportedResolutions?.[0]||`720p`),t.supportedDurations?.includes(V)||H(t.supportedDurations?.[0]||5))},style:{width:`100%`,borderRadius:8},options:k.video?.map(e=>({value:e.id,label:e.name})),placeholder:`请选择引擎`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:G.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>ee(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:U===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:U===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${U===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:U===e?`#6366f1`:`#6b7280`,fontWeight:U===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(V-Math.min(...G.durations))/(Math.max(...G.durations)-Math.min(...G.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...G.durations),max:Math.max(...G.durations),value:V,onChange:e=>H(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:V}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:G.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>te(e),style:{flex:1,height:42,borderRadius:8,border:W===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:W===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:W===e?`#fff`:`#4b5563`},children:e})},e))})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:16},children:[(0,$.jsx)(X,{onClick:()=>w(!1),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500},children:`取消`}),(0,$.jsx)(X,{onClick:()=>{if(!j){Z.warning(`请选择视频引擎`);return}tt(T),w(!1)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:!j,children:`确认生成`})]})]})})]})}var Lce={not_required:{label:`无需单独分析`,color:`default`,active:!1,terminal:!0,failure:!1},pending:{label:`等待分析`,color:`default`,active:!0,terminal:!1,failure:!1},processing:{label:`分析中`,color:`processing`,active:!0,terminal:!1,failure:!1},completed:{label:`分析完成`,color:`success`,active:!1,terminal:!0,failure:!1},failed:{label:`分析失败`,color:`error`,active:!1,terminal:!0,failure:!0}},Rce={pending:{label:`等待切割`,color:`default`,active:!0,terminal:!1,failure:!1},processing:{label:`切割中`,color:`processing`,active:!0,terminal:!1,failure:!1},retry_waiting:{label:`等待切割重试`,color:`warning`,active:!0,terminal:!1,failure:!1},completed:{label:`切割完成`,color:`success`,active:!1,terminal:!0,failure:!1},failed:{label:`切割失败`,color:`error`,active:!1,terminal:!0,failure:!0}},zce={pending_analysis:{label:`等待分析`,color:`default`,active:!0,terminal:!1,failure:!1},analyzing:{label:`分析中`,color:`processing`,active:!0,terminal:!1,failure:!1},analysis_completed:{label:`分析完成`,color:`blue`,active:!1,terminal:!1,failure:!1},analysis_failed:{label:`分析失败`,color:`error`,active:!1,terminal:!0,failure:!0},splitting:{label:`拆镜中`,color:`processing`,active:!0,terminal:!1,failure:!1},split_completed:{label:`拆镜完成`,color:`success`,active:!1,terminal:!0,failure:!1},partial_failed:{label:`部分失败`,color:`warning`,active:!1,terminal:!0,failure:!0},failed:{label:`失败`,color:`error`,active:!1,terminal:!0,failure:!0},deleted:{label:`已删除`,color:`default`,active:!1,terminal:!0,failure:!1}},Bce=new Set([`pending`,`waiting_user`,`processing`]),b9=e=>String(e||``).trim().toLowerCase(),x9=(e,t,n)=>({key:e,...t[e]||{label:e||n,color:`default`,active:!1,terminal:!1,failure:!1}}),S9=e=>x9(b9(e),Lce,`未知分析状态`),C9=e=>x9(b9(e),Rce,`未知切割状态`),w9=e=>x9(b9(e),zce,`未知任务状态`),Vce=e=>{let t=b9(e.analysisStatus||e.analysis_status),n=b9(e.splitStatus||e.split_status),r=b9(e.moduleProjectStatus||e.module_project_status);return S9(t).active||C9(n).active||Bce.has(r)},Hce=e=>{let t=w9(e);return(0,$.jsx)(vQ,{color:t.color,children:t.label})};function Uce(){let{message:e}=nx.useApp(),t=Ye(),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)([]),[v,y]=(0,S.useState)(1),[b,x]=(0,S.useState)(10),[C,w]=(0,S.useState)(0),[T,E]=(0,S.useState)(``),D=(0,S.useRef)(null),O=(0,S.useRef)(null),k=(0,S.useCallback)(()=>{n&&n.startsWith(`blob:`)&&URL.revokeObjectURL(n),r(``),a(``),s(``),p(0),d(``)},[n]),A=async t=>{if(!t.type.startsWith(`video/`))return s(`请选择视频文件`),!1;if(t.size>100*1024*1024)return s(`视频文件大小不能超过 100MB`),!1;let n=await new Promise(e=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{e(n.duration),URL.revokeObjectURL(n.src)},n.onerror=()=>{e(0)},n.src=URL.createObjectURL(t)});if(n>190)return s(`视频时长不能超过 3分钟`),!1;k(),h(!0);try{let i=await yae(t,n);r(i.url),a(i.resource_id||``),s(``),e.success(`视频上传成功`)}catch{s(`视频上传失败,请重试`),e.error(`视频上传失败`)}finally{h(!1)}return!1},j=(0,S.useCallback)(()=>{D.current&&p(D.current.duration)},[]),M=async()=>{if(!n||!u.trim()){e.warning(`请先上传视频并输入产品名称`);return}h(!0);try{await Jae({video_url:n,video_duration_seconds:f,video_resource_id:i||void 0,title:u.trim(),idempotency_key:`shot_${Date.now()}`});let r=await I5(1,20,T);e.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${r.items[0].id}/removeinfo`)},3e3),k()}catch(t){let n=``;t instanceof Error?n=t.message:typeof t==`string`&&(n=t),e.error(n||`任务创建失败,请重试`)}finally{h(!1)}},N=(0,S.useCallback)(async(t,n,r)=>{try{let e=await I5(t,n,r);_(e.items||[]),w(e.total||0),y(t),x(n)}catch{e.error(`获取列表失败`)}},[]),P=(e,t)=>{N(e,t,T)},F=()=>{N(1,10,T)},I=()=>{l(!0),N(1,10,T)},L=g.some(e=>w9(e.status).active);return(0,S.useEffect)(()=>{if(!c||!L)return;let e=()=>{document.visibilityState===`visible`&&N(v,b,T)},t=window.setInterval(e,3e4);return document.addEventListener(`visibilitychange`,e),()=>{window.clearInterval(t),document.removeEventListener(`visibilitychange`,e)}},[v,N,L,c,b,T]),(0,$.jsx)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,overflow:`auto`,background:`transparent`,position:`relative`,padding:`20px 32px`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`0 auto`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`})]})}),(0,$.jsx)(X,{type:`primary`,ghost:!0,icon:(0,$.jsx)(TV,{}),onClick:I,style:{borderRadius:10,padding:`6px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`创作记录`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:720,margin:`0 auto`},children:[o&&(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(239, 68, 68, 0.2)`,borderRadius:12,padding:`14px 20px`,marginBottom:24,color:`#ef4444`,fontSize:14,textAlign:`center`,fontWeight:500},children:o}),!n&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(H1.Dragger,{accept:`video/*`,beforeUpload:A,showUploadList:!1,disabled:m,style:{background:m?`rgba(243, 244, 246, 0.3)`:`transparent`,border:`2px dashed ${m?`rgba(209, 213, 219, 0.5)`:`rgba(99, 102, 241, 0.3)`}`,borderRadius:24,padding:`56px 20px`,cursor:m?`not-allowed`:`pointer`,margin:0},children:m?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,border:`4px solid #6366f1`,borderTopColor:`transparent`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#6366f1`,margin:`0 0 8px 0`,fontWeight:600},children:`上传中...`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`请稍候,视频正在上传`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(G2,{style:{fontSize:40,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#1e293b`,margin:`0 0 8px 0`,fontWeight:600},children:`点击或拖拽到此上传视频文件`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`支持 MP4、MOV 格式视频,最大支持 100MB 的文件,支持上传 3 分钟内的视频`})]})})]}),n&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,overflow:`hidden`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsxs)(`div`,{style:{borderRadius:22,background:`#ffffff`,padding:`24px`,position:`relative`,zIndex:1},children:[(0,$.jsx)(jG,{title:`确定要删除吗?`,okText:`确定`,cancelText:`取消`,onConfirm:k,children:(0,$.jsx)(`button`,{style:{position:`absolute`,top:20,right:20,width:36,height:36,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.05)`,borderRadius:10,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:16,color:`#6366f1`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.borderColor=`rgba(239, 68, 68, 0.3)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.color=`#6366f1`},children:`🗑️`})}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginBottom:20},children:(0,$.jsx)(`video`,{ref:D,src:`https://ceshi.apiforeign.minzhongzc.com${n}`,controls:!0,onLoadedMetadata:j,style:{maxWidth:`100%`,maxHeight:320,borderRadius:12,background:`#000`,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`}})}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsxs)(`label`,{style:{display:`block`,fontSize:14,fontWeight:500,color:`#334155`,marginBottom:8},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(YU,{placeholder:`请输入产品名称`,value:u,onChange:e=>d(e.target.value),style:{width:`100%`,height:44,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`}})]}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginTop:16},children:(0,$.jsx)(`button`,{onClick:M,disabled:!n||!u.trim()||m,style:{padding:`14px 56px`,background:n&&u.trim()&&!m?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`:`#e2e8f0`,color:`white`,border:`none`,borderRadius:12,fontSize:15,fontWeight:600,cursor:n&&u.trim()&&!m?`pointer`:`not-allowed`,boxShadow:n&&u.trim()&&!m?`0 6px 20px rgba(99, 102, 241, 0.3)`:`none`,display:`inline-flex`,alignItems:`center`,gap:10,transition:`all 0.3s ease`},onMouseEnter:e=>{n&&u.trim()&&!m&&(e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 8px 25px rgba(99, 102, 241, 0.4)`)},onMouseLeave:e=>{n&&u.trim()&&!m&&(e.currentTarget.style.transform=`traslnateY(0)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.3)`)},children:(0,$.jsx)(`span`,{children:m?`创建中...`:`创建`})})})]})]}),(0,$.jsx)(`canvas`,{ref:O,style:{display:`none`}}),(0,$.jsxs)(DG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:c,onCancel:()=>l(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(YU,{placeholder:`搜索产品名称`,value:T,onChange:e=>E(e.target.value),onPressEnter:F,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(X,{type:`primary`,onClick:F,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:`0 24px 24px`},children:(0,$.jsx)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`},children:(0,$.jsx)(aQ,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`状态`,dataIndex:`status`,key:`status`,render:e=>Hce(e)},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:n=>(0,$.jsxs)(bV,{children:[(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`}),(0,$.jsx)(jG,{title:`确认删除这个拆镜项目吗?`,onConfirm:async()=>{try{await doe(n.id),e.success(`删除成功`),N(v,b,T)}catch{e.error(`删除失败`)}},children:(0,$.jsx)(X,{type:`text`,danger:!0,style:{color:`#ef4444`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(239, 68, 68, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`},children:`删除`})})]})}],dataSource:g,rowKey:`id`,pagination:{current:v,pageSize:b,total:C,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:P,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:300},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})})]})]})]})})}var Wce=c(o(((e,t)=>{(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof l==`function`&&l;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=Error(`Cannot find module '`+o+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return n[o].exports}for(var a=typeof l==`function`&&l,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` -\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return G(e,t,g,15,8,0)},n.deflateInit2=G,n.deflateReset=te,n.deflateResetKeep=W,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){var t;for(t=0;t>1;1<=n;n--)W(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],W(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,W(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?ie(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),te(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),{Text:Gce}=Q,T9=e=>e?/^(https?:|data:|blob:)/i.test(e)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,Kce=e=>e===`video`?(0,$.jsx)(R8,{}):e===`audio`?(0,$.jsx)(Q0,{}):(0,$.jsx)(w6,{}),qce=e=>e===`video`?`视频`:e===`audio`?`音频`:`图片`,E9=e=>{let t=Number(e||0);return t>=1024*1024?`${(t/1024/1024).toFixed(1)} MB`:t>=1024?`${(t/1024).toFixed(1)} KB`:`${t} B`},D9=()=>{let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(new Set),[g,_]=(0,S.useState)(null),[v,y]=(0,S.useState)(!1),b=(0,S.useMemo)(()=>u.flatMap(e=>e.items||[]),[u]),x=(0,S.useCallback)(async()=>{l(!0);try{let t=await q5({resourceType:e||void 0,keyword:n||void 0,page:i,pageSize:o,scene:`record`});d(t.groups||[]),p(t.totalDays||0),h(new Set)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),d([]),p(0)}finally{l(!1)}},[n,i,o,e]);(0,S.useEffect)(()=>{x()},[x]);let C=e=>{h(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},w=()=>{let e=b.map(e=>e.id);h(t=>t.size===e.length?new Set:new Set(e))},T=async t=>{let r=(t.page||1)+1;try{let i=await J5(t.generatedDate,{resourceType:e||void 0,keyword:n||void 0,page:r,pageSize:10,scene:`record`});d(e=>e.map(e=>e.generatedDate===t.generatedDate?{...e,page:r,items:[...e.items,...i.items||[]]}:e))}catch(e){Z.error(e?.message||`加载更多失败`)}},E=e=>{DG.confirm({title:`确认删除历史上传素材`,content:`确定删除 ${e.fileName||e.id} 吗?删除后会释放上传容量,并在提交成功后清理真实文件。`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{try{await u5(e.resourceUrl),Z.success(`删除成功`),x()}catch(e){Z.error(e?.message||`删除失败`)}}})},D=()=>{if(m.size===0){Z.warning(`请先选择要删除的上传素材`);return}if(m.size>30){Z.warning(`一次最多删除 30 条上传素材`);return}let e=Array.from(m);DG.confirm({title:`确认批量删除历史上传素材`,content:`确定删除选中的 ${e.length} 条上传素材吗?删除后会释放上传容量,并在提交成功后清理真实文件。`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{try{let t=await Toe(e);Z.success(`删除成功,释放 ${E9(t?.releasedSizeBytes||0)}`),x()}catch(e){Z.error(e?.message||`批量删除失败`)}}})},O=e=>{let t=document.createElement(`a`);t.href=T9(e.resourceUrl),t.download=e.fileName||e.id,document.body.appendChild(t),t.click(),document.body.removeChild(t)},k=(e,t=`card`)=>{let n=T9(e.previewUrl||e.displayUrl||e.resourceUrl),r=t===`card`?{width:`100%`,height:130,objectFit:`cover`}:{width:`100%`,maxHeight:620,objectFit:`contain`};return e.resourceType===`image`?(0,$.jsx)(`img`,{src:n,alt:e.fileName||e.id,style:r}):e.resourceType===`video`?(0,$.jsx)(`video`,{src:n,controls:t===`preview`,muted:t===`card`,style:r}):(0,$.jsx)(y7,{src:n,size:t===`card`?`small`:`normal`})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(bV,{size:8,wrap:!0,children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14,marginRight:4},children:`媒体类型:`}),(0,$.jsx)(X,{type:e===``?`primary`:`default`,onClick:()=>{t(``),a(1)},style:{borderRadius:8,fontWeight:600,borderColor:e===``?`transparent`:`#e2e8f0`,color:e===``?`#fff`:`#64748b`},children:`全部`}),(0,$.jsx)(X,{type:e===`image`?`primary`:`default`,onClick:()=>{t(`image`),a(1)},style:{borderRadius:8,fontWeight:600,borderColor:e===`image`?`transparent`:`#e2e8f0`,color:e===`image`?`#fff`:`#64748b`},children:`图片`}),(0,$.jsx)(X,{type:e===`video`?`primary`:`default`,onClick:()=>{t(`video`),a(1)},style:{borderRadius:8,fontWeight:600,borderColor:e===`video`?`transparent`:`#e2e8f0`,color:e===`video`?`#fff`:`#64748b`},children:`视频`}),(0,$.jsx)(X,{type:e===`audio`?`primary`:`default`,onClick:()=>{t(`audio`),a(1)},style:{borderRadius:8,fontWeight:600,borderColor:e===`audio`?`transparent`:`#e2e8f0`,color:e===`audio`?`#fff`:`#64748b`},children:`音频`})]}),(0,$.jsxs)(bV,{size:8,wrap:!0,children:[(0,$.jsx)(YU.Search,{allowClear:!0,value:n,placeholder:`搜索文件名或URL`,onChange:e=>r(e.target.value),onSearch:()=>{a(1),x()},style:{width:240,borderRadius:8},enterButton:!0}),v?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{onClick:w,style:{borderRadius:8,fontWeight:600,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#334155`},children:m.size&&m.size===b.length?`取消全选`:`全选`}),(0,$.jsxs)(X,{danger:!0,onClick:D,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #ef4444, #dc2626)`,border:`none`,color:`#fff`},children:[`批量删除 `,m.size>0&&`(${m.size})`]}),(0,$.jsx)(X,{onClick:()=>{y(!1),h(new Set)},style:{borderRadius:8,fontWeight:600,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`},children:`取消选择`})]}):(0,$.jsx)(X,{type:`primary`,onClick:()=>y(!0),style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`批量操作`})]})]}),(0,$.jsx)(nG,{spinning:c,children:u.length===0?(0,$.jsx)(dC,{description:`暂无可展示的历史上传素材`,style:{padding:`60px 0`}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:28},children:u.map(e=>(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{fontSize:18,fontWeight:700,color:`#1e293b`},children:e.generatedDate}),(0,$.jsxs)(Gce,{type:`secondary`,children:[`共 `,e.total,` 个素材`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`flex-start`},children:e.items.map(e=>{let t=m.has(e.id);return(0,$.jsxs)(`div`,{style:{width:`17%`,minWidth:240,margin:16,border:t?`2px solid #8b5cf6`:`1px solid #e2e8f0`,borderRadius:16,overflow:`hidden`,background:`#fff`,boxShadow:`0 10px 24px rgba(15,23,42,0.06)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,background:`#f1f5f9`,cursor:v?`pointer`:`default`},onClick:()=>v&&C(e.id),children:[k(e),v&&(0,$.jsx)(mR,{checked:t,onChange:()=>C(e.id),style:{position:`absolute`,top:10,left:10,background:`#fff`,borderRadius:6,padding:4}}),(0,$.jsx)(vQ,{color:`purple`,icon:Kce(e.resourceType),style:{position:`absolute`,top:10,right:10,margin:0},children:qce(e.resourceType)})]}),(0,$.jsxs)(`div`,{style:{padding:12,paddingTop:0},children:[(0,$.jsxs)(bV,{size:4,wrap:!0,style:{marginTop:8},children:[(0,$.jsx)(vQ,{style:{margin:0},children:e.moduleLabel}),(0,$.jsx)(vQ,{style:{margin:0},children:E9(e.fileSizeBytes)}),e.durationSeconds?(0,$.jsxs)(vQ,{style:{margin:0},children:[Number(e.durationSeconds).toFixed(1),`s`]}):null]}),(0,$.jsxs)(bV,{style:{marginTop:12},children:[(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(DU,{}),onClick:()=>_(e),children:`预览`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(I1,{}),onClick:()=>O(e),children:`下载`}),(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(MQ,{}),onClick:()=>E(e),children:`删除`})]})]})]},e.id)})}),e.items.lengthT(e),children:`加载更多`})})]},e.generatedDate))})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:24},children:(0,$.jsx)(FW,{current:i,pageSize:o,total:f,showSizeChanger:!0,pageSizeOptions:[5,10],onChange:(e,t)=>{a(e),s(t)}})}),(0,$.jsx)(DG,{open:!!g,title:`预览`,footer:null,width:900,centered:!0,destroyOnHidden:!0,onCancel:()=>_(null),children:g?k(g,`preview`):null})]})},{Search:Jce}=YU,{Text:Yce}=Q,Xce=e=>{let t=S.useRef(!1);(0,S.useEffect)(()=>{if(t.current)return;let n=()=>{t.current||(t.current=!0,e?.())};return document.readyState===`complete`?n():window.addEventListener(`load`,n),()=>{window.removeEventListener(`load`,n)}},[e])},Zce=()=>{let[e,t]=(0,S.useState)(!1);Xce(()=>{t(!0)});let[n]=On(),r=Ye(),[i,a]=(0,S.useState)(n.get(`filterType`)===`private_portrait`?`private_portrait`:n.get(`filterType`)===`upload_resource`?`upload_resource`:`project`),[o,s]=(0,S.useState)(`video`),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)({page:1,pageSize:10}),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(new Set),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(null),C=S.createRef(),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),[M,N]=(0,S.useState)([[]]),[P,F]=(0,S.useState)([``]),[I,L]=(0,S.useState)([]),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(0),[H,U]=(0,S.useState)([void 0]),[ee,W]=(0,S.useState)(new Map),[te,G]=(0,S.useState)(``),[ne,K]=(0,S.useState)(new Map),re=(0,S.useRef)(new Map);(0,S.useEffect)(()=>()=>{re.current.forEach(e=>clearTimeout(e)),re.current.clear()},[]);let[ie,ae]=(0,S.useState)(1),[q,oe]=(0,S.useState)(10),[se,ce]=(0,S.useState)([!1]),[le,ue]=(0,S.useState)(`new`),[de,fe]=(0,S.useState)([]),[pe,me]=(0,S.useState)(!1),[he,ge]=(0,S.useState)([]),[_e,ve]=(0,S.useState)({}),[ye,be]=(0,S.useState)(`2`),[xe,Se]=(0,S.useState)(``),[Ce,we]=(0,S.useState)([]),[Te,Ee]=(0,S.useState)(!1),[De,Oe]=(0,S.useState)(!1),[ke,Ae]=(0,S.useState)([]),[je,Me]=(0,S.useState)(0),[Ne,Pe]=(0,S.useState)(1),[Fe,Ie]=(0,S.useState)(10),[Le,Re]=(0,S.useState)(!1),[ze,Be]=(0,S.useState)(``),[Ve,He]=(0,S.useState)(!1),[Ue,We]=(0,S.useState)(new Set),Ge=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},Ke=e=>{let t=Ge(e);return t?Math.floor(Date.now()/1e3)>t:!1},qe=(e,t=!1)=>{let n=`https://ceshi.apiforeign.minzhongzc.com`,r=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${r}${P7(e)}`:`${r}/${e.startsWith(`/`)?e.slice(1):e}`},Je=async e=>{if(x(e),y(!0),window.dispatchEvent(new Event(`previewOpen`)),e.videoUrl&&e.videoUrl.trim()&&!e.imagePx)try{let t=await _t(e.videoUrl);t&&x(e=>e&&{...e,imagePx:t})}catch{}},Xe=()=>{C.current&&(C.current.pause(),C.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),y(!1)},Ze=e=>e.generatedResourceId||e.id,Qe=e=>!!e.generatedResourceId,$e=e=>{if(!e)return!0;let t=e.match(/^(\d+)x(\d+)$/);if(!t)return!0;let n=parseInt(t[1],10),r=parseInt(t[2],10),i=n/r;return n>=r?n>=480&&n<=2560&&r>=270&&r<=1440&&i>=1.775&&i<=1.784:n>=270&&n<=1440&&r>=480&&r<=2560&&i>=.555&&i<=.564},et=e=>{We(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},tt=()=>{let e=c.flatMap(e=>e.items.map(e=>Ze(e)));Ue.size===e.length?We(new Set):We(new Set(e))},nt=async()=>{if(Ue.size===0){Z.warning(`请先选择要下载的媒体`);return}if(Ue.size>30){Z.warning(`最多只能单次下载30个文件`);return}let e=[];c.forEach(t=>{t.items.forEach(t=>{Ue.has(Ze(t))&&e.push(t)})});let t=new Wce.default,n=`https://ceshi.apiforeign.minzhongzc.com`,r=t.folder(`downloads`),i=!1,a=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,o=((t.videoUrl||t.imageUrl).split(`/`).pop()||`file_${Date.now()}`).split(`?`)[0];try{let t=await fetch(e);if(!t.ok)throw Error(`Network response was not ok`);let n=await t.blob();r?.file(o,n),a++}catch{i=!0;break}}if(i){Z.destroy(`downloadProgress`),Z.info(`由于跨域限制,将逐个下载文件`),e.forEach((e,t)=>{setTimeout(()=>{let t=`${n}${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=t,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},t*500)});return}let o=await t.generateAsync({type:`blob`}),s=document.createElement(`a`);s.href=URL.createObjectURL(o),s.download=`downloads_${Date.now()}.zip`,s.click(),URL.revokeObjectURL(s.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${a} 个文件`),He(!1),We(new Set)},rt=async()=>{if(Ue.size===0){Z.warning(`请先选择要删除的媒体`);return}if(Ue.size>30){Z.warning(`最多只能单次删除30个文件`);return}let e=c.flatMap(e=>e.items.filter(e=>Ue.has(Ze(e)))),t=``;t=i===`shot_replicate`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:e.map((e,t)=>(0,$.jsxs)(`li`,{style:{marginBottom:4,color:`#334155`},children:[e.shotReplicateProjectTitle,`— —`,e.shotSegmentLabel]},t))}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]}):i===`hot_opening_replicate`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`爆款开头复刻中以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:e.map((e,t)=>(0,$.jsx)(`li`,{style:{marginBottom:4,color:`#334155`},children:e.moduleProjectTitle},t))}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]}):`确定删除选中的 ${Ue.size} 条记录吗?`,DG.confirm({title:`确认删除`,content:t,okText:`确定删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:async()=>{let e=``;i===`project`?e=`generation_record`:i===`creation`?e=`chat_task`:i===`hot_opening_replicate`?e=`hot_opening_replicate`:i===`shot_replicate`&&(e=`shot_replicate`);let t=[];c.forEach(e=>{e.items.forEach(e=>{Ue.has(Ze(e))&&t.push(e)})});let n=[];e===`generation_record`||e===`chat_task`?n=t.map(e=>e.id):e===`hot_opening_replicate`?n=t.map(e=>e.moduleProjectId):e===`shot_replicate`&&(n=t.map(e=>e.shotSegmentId));let r={history_source:e,ids:n};try{await G5(r),Z.success(`删除成功`),He(!1),We(new Set),d(e=>({...e,page:1})),vt()}catch{Z.error(`删除失败,请重试`)}}})},it=async()=>{Ee(!0);try{let e=await N5({page:1,pageSize:100});we(e.data?.data||e.data||[])}catch{}finally{Ee(!1)}},at=()=>{if(Ue.size===0){Z.warning(`请先选择要推送的媒体`);return}N([[]]),F([``]),U([void 0]),be(`2`),Se(``),it(),j(!0)},ot=()=>{if(!b)return;let e=Ze(b);We(new Set([e])),N([[]]),F([``]),U([void 0]),W(new Map),G(``),be(`2`),Se(``),it(),j(!0)},st=async(e,t)=>{z(!0);try{let n=await M5({page:e,page_size:t});L(n?.data||n||[]),V(n.pagination.total||0)}catch{L([]),V(0)}finally{z(!1)}},ct=async()=>{me(!0);try{let[e,t]=await Promise.all([Soe(),U5()]);fe(e?.data||[]);let n=t?.data||[],r={};n.forEach(e=>{r[e.openType]=e.typeName}),ve(r)}catch{fe([]),ve({})}finally{me(!1)}},lt=async()=>{Re(!0);try{let e=await moe({status:ze||void 0,page:Ne,pageSize:Fe});Ae(e?.data||e||[]),Me(e.pagination?.total||e.total||0)}catch{Ae([]),Me(0)}finally{Re(!1)}},ut=()=>{Oe(!0),Pe(1),Be(``),lt()},dt=()=>{Pe(1),lt()},ft=(e,t)=>{Pe(e),Ie(t),lt()},pt=async()=>{if(Ue.size===0){Z.warning(`请先选择要推送的媒体`);return}let e=new Map;c.forEach(t=>{t.items.forEach(t=>{let n=Ze(t);e.set(n,t)})});let t=[];if(le===`new`){let n=H.filter(e=>e!==void 0);if(n.length===0){Z.warning(`请先选择授权账户`);return}for(let r=0;re.accountId)||[];if(a.length===0){Z.warning(`第 ${r+1} 组授权账户未设置账户ID,已跳过`);continue}let o=new Map;for(let t of Ue){let n=e.get(t),r;n&&Qe(n)&&(r=`generated_resources`),o.has(r)||o.set(r,[]),o.get(r).push(t)}o.forEach((e,n)=>{t.push({advertiser_ids:a,resource_ids:e,oauth_id:i.value,source_model:n,is_pre_test:ye,pre_test_template:xe})})}}else{if(he.length===0){Z.warning(`请先选择历史账户`);return}for(let n of he){let r=new Map;for(let t of Ue){let n=e.get(t),a;a=n&&Qe(n)?`generated_resources`:i===`project`?`generation_records`:`chat_generation_tasks`,r.has(a)||r.set(a,[]),r.get(a).push(t)}r.forEach((e,r)=>{t.push({advertiser_ids:[n.advertiserId],resource_ids:e,oauth_id:String(n.oauthId),source_model:r,is_pre_test:ye,pre_test_template:xe})})}}k(!0);try{let e=await poe({tasks:t});e.errors?.length>0?Z.warning(e.message):e.code===0?Z.success(e.message):Z.error(e.message),He(!1),We(new Set),j(!1),N([[]]),F([``]),U([void 0]),ge([]),W(new Map),G(``),be(`2`),Se(``)}catch(e){Z.error(e.message||`批量推送失败`)}finally{k(!1)}},mt=async(e,t)=>{if(t.trim())try{let n=(await V5({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;l(t=>t.map(t=>({...t,items:t.items.map(t=>Ze(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){Z.error(e.message||`文件名更新失败`)}},ht=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await V5({filenames:e.map(e=>({source_id:e,file_name:t}))}),r=new Map;n?.results?.forEach(e=>{e.success&&e.newFileName&&r.set(e.sourceId,e.newFileName)}),l(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=Ze(e);if(i.has(n)){let i=r.get(n)||t;return{...e,fileName:i}}return e})}))});let i=n?.successCount||0;Z.success(`已更新 ${i} 个文件名`)}catch(e){Z.error(e.message||`文件名更新失败`)}},gt=e=>{T(e)},_t=e=>new Promise(t=>{let n=document.createElement(`video`),r=`https://ceshi.apiforeign.minzhongzc.com`,i=e.startsWith(`/`)?e.slice(1):e;n.src=`${r.endsWith(`/`)?r.slice(0,-1):r}/${i}`,n.crossOrigin=`anonymous`,n.onloadedmetadata=()=>{let e=n.videoWidth,r=n.videoHeight;n.remove(),t(`${e}x${r}`)},n.onerror=()=>{n.remove(),t(``)},n.onabort=()=>{n.remove(),t(``)},setTimeout(()=>{n.remove(),t(``)},5e3)}),vt=()=>{if(i===`private_portrait`||i===`upload_resource`){h(!1),l([]);return}h(!0);let e=``;i===`project`?e=`generation_record`:i===`hot_opening_replicate`?e=`hot_opening_replicate`:i===`shot_replicate`&&(e=`shot_replicate`);let t=`?gen_type=${o}&page=${u.page}&page_size=${u.pageSize}`;if(e&&(t=`?gen_type=${o}&history_source=${e}&page=${u.page}&page_size=${u.pageSize}`),E&&E.trim()&&(t+=`&keyword=${encodeURIComponent(E.trim())}`),w){let t=`${w}?gen_type=${o}&page=${u.page}&page_size=${u.pageSize}`;e&&(t=`${w}?gen_type=${o}&history_source=${e}&page=${u.page}&page_size=${u.pageSize}`),E&&E.trim()&&(t+=`&keyword=${encodeURIComponent(E.trim())}`),E5(t).then(e=>{let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e.generatedDate,items:t,total:e.total,page:e.page}];n&&n[0].items.length>0?l(n):l([])}).catch(e=>{}).finally(()=>{h(!1)})}else T5(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),u.page===1?l(t):l(e=>[...e,...t]),p(e?.totalDays||0)}).catch(e=>{u.page===1&&l([])}).finally(()=>{h(!1)})};(0,S.useEffect)(()=>{vt()},[i,o,u.page,w]);let yt=()=>{m||d(e=>({...e,page:e.page+1}))},bt=async(e,t,n)=>{if(g.has(t))return;_(e=>new Set([...e,t]));let r=n+1,a=``;i===`project`?a=`generation_record`:i===`hot_opening_replicate`?a=`hot_opening_replicate`:i===`shot_replicate`&&(a=`shot_replicate`);let s=`${e}?gen_type=${o}&page=${r}&page_size=${u.pageSize}`;a&&(s=`${e}?gen_type=${o}&history_source=${a}&page=${r}&page_size=${u.pageSize}`),E&&E.trim()&&(s+=`&keyword=${encodeURIComponent(E.trim())}`);try{let t=(await E5(s)).items||[];t&&t.length>0&&l(n=>n.map(n=>n.generatedDate===e?{...n,items:[...n.items,...t],page:r}:n))}catch{}finally{_(e=>{let n=new Set(e);return n.delete(t),n})}};return(0,S.useEffect)(()=>{d(e=>({...e,page:1})),D(``)},[i,o]),(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsx)(gL,{activeKey:i,onChange:e=>{a(e),He(!1),We(new Set)},items:[{key:`project`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(mX,{}),` 项目记录`]})},{key:`creation`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(TV,{}),` 创作记录`]})},{key:`hot_opening_replicate`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(y8,{}),` 爆款复刻`]})},{key:`shot_replicate`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(N6,{}),` 拆镜复刻`]})},{key:`private_portrait`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(F8,{}),` 私域素材库`]})},{key:`upload_resource`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(M8,{}),` 历史素材`]})}],size:`middle`,style:{marginBottom:12}}),i===`private_portrait`?(0,$.jsx)(gce,{}):i===`upload_resource`?(0,$.jsx)(D9,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14,marginRight:4},children:`媒体类型:`}),(0,$.jsx)(X,{type:o===`video`?`primary`:`default`,onClick:()=>{s(`video`),He(!1),We(new Set)},style:{borderRadius:8,fontWeight:600,borderColor:o===`video`?`transparent`:`#e2e8f0`,color:o===`video`?`#fff`:`#64748b`},icon:(0,$.jsx)(R8,{}),children:`视频`}),(0,$.jsx)(X,{type:o===`image`?`primary`:`default`,onClick:()=>{s(`image`),He(!1),We(new Set)},style:{borderRadius:8,fontWeight:600,borderColor:o===`image`?`transparent`:`#e2e8f0`,color:o===`image`?`#fff`:`#64748b`},icon:(0,$.jsx)(w6,{}),children:`图片`})]}),(0,$.jsxs)(bV,{size:8,wrap:!0,children:[(0,$.jsx)(OB,{picker:`date`,value:w?(0,JE.default)(w):void 0,onChange:(e,t)=>gt(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`,allowClear:!0}),(0,$.jsx)(YU.Search,{placeholder:`搜索提示词`,allowClear:!0,value:E,onChange:e=>{let t=e.target.value;D(t),t||(d(e=>({...e,page:1})),vt())},onSearch:()=>{d(e=>({...e,page:1})),vt()},style:{width:240,borderRadius:8},enterButton:!0}),(0,$.jsx)(X,{icon:(0,$.jsx)(xB,{}),onClick:ut,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`},children:`推送任务历史`}),Ve?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{onClick:Ue.size===c.reduce((e,t)=>e+t.items.length,0)&&c.length>0?()=>{We(new Set)}:tt,style:{borderRadius:8,fontWeight:600,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#334155`},children:Ue.size===c.reduce((e,t)=>e+t.items.length,0)&&c.length>0?`取消全选`:`全选`}),(0,$.jsx)(X,{onClick:()=>{He(!1),We(new Set)},style:{borderRadius:8,fontWeight:600,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`},children:`取消选择`}),(0,$.jsxs)(X,{danger:!0,onClick:rt,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #ef4444, #dc2626)`,border:`none`,color:`#fff`},children:[`删除 `,Ue.size>0&&`(${Ue.size})`]}),(0,$.jsxs)(X,{onClick:nt,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,color:`#fff`},children:[`下载 `,Ue.size>0&&`(${Ue.size})`]}),(0,$.jsx)(X,{type:`primary`,onClick:at,loading:O,disabled:O||Ue.size===0,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,color:`#fff`},children:O?`推送中...`:`推送至账户 ${Ue.size>0?`(${Ue.size})`:``}`})]}):(0,$.jsx)(X,{type:`primary`,onClick:()=>He(!0),style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`批量操作`})]})]}),m?(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},children:(0,$.jsx)(nG,{indicator:(0,$.jsx)(Xm,{style:{fontSize:24,color:`#64748b`},spin:!0}),description:`加载中...`,size:`large`})}):c.length===0?(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[c.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#64748b`,marginBottom:12,paddingLeft:8},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items.map(e=>{let t=o===`video`&&e.videoCoverUrl?qe(e.videoCoverUrl,!0):qe(o===`video`?e.videoUrl:e.imageUrl,!0),n=o===`video`&&e.videoCoverUrl||o===`image`,r=Ue.has(Ze(e));return(0,$.jsxs)(`div`,{className:`media-card`,style:{width:160,height:120,position:`relative`,borderRadius:4,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:()=>Ve?et(Ze(e)):Je(e),onMouseEnter:e=>{Ve||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{Ve||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[n?(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[(0,$.jsx)(`img`,{src:t,alt:`预览`,loading:`lazy`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+(ne.get(Ze(e))===`loaded`),transition:`opacity 0.3s`},onLoad:()=>{K(t=>{let n=new Map(t);return n.set(Ze(e),`loaded`),n})},onError:()=>{K(t=>{let n=new Map(t);return n.set(Ze(e),`error`),n})}}),ne.get(Ze(e))!==`loaded`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,backgroundColor:`#cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,animation:ne.get(Ze(e))===`loading`?`pulse 1.5s infinite`:`none`},children:e.mediaType===`video`?(0,$.jsx)(R8,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(w6,{style:{color:`#64748b`,fontSize:16}})})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(R8,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Yce,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),Ve&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,width:22,height:22,borderRadius:`50%`,backgroundColor:r?`#6366f1`:`rgba(255,255,255,0.92)`,border:r?`2px solid #6366f1`:`2px solid #cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,boxShadow:r?`0 2px 8px rgba(99,102,241,0.4)`:`0 1px 3px rgba(0,0,0,0.1)`,transition:`all 0.15s ease`},onClick:t=>{t.stopPropagation(),et(Ze(e))},children:r&&(0,$.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,children:(0,$.jsx)(`path`,{d:`M10 3L4.5 8.5L2 6`,stroke:`white`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`})})}),r&&o===`video`&&e.imagePx&&!$e(e.imagePx)&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:36,left:8,right:8,padding:`4px 8px`,backgroundColor:`rgba(239, 68, 68, 0.9)`,color:`#fff`,fontSize:12,borderRadius:4,zIndex:10},children:`视频实际尺寸可能不符合平台推送要求`})]}),!Ve&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`linear-gradient(transparent, rgba(0,0,0,0.5))`,padding:`8px`,color:`#fff`,fontSize:12,opacity:0,transition:`opacity 0.2s`},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0`},children:`点击预览`}),(0,$.jsx)(`div`,{className:`media-download-btn`,children:(0,$.jsx)(jw,{title:`下载`,children:(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.5)`,backdropFilter:`blur(4px)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`background 0.15s`},onClick:t=>{t.stopPropagation();let n=`https://ceshi.apiforeign.minzhongzc.com${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=n,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},children:(0,$.jsx)(I1,{style:{color:`#fff`,fontSize:14}})})})})]}),Ve&&r&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,border:`3px solid #6366f1`,borderRadius:4,pointerEvents:`none`,zIndex:5,boxShadow:`inset 0 0 0 1px rgba(99,102,241,0.2)`}})]},Ze(e))})}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(X,{onClick:()=>bt(e.generatedDate,e.items,e.page),loading:g.has(e.generatedDate),disabled:g.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:g.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),c.length>0&&f>c.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(X,{onClick:yt,loading:m,disabled:m,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:m?`加载中...`:`加载更多`})})]})]}),(0,$.jsxs)(DG,{title:`推送任务历史`,open:De,onCancel:()=>Oe(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,gap:4},children:[(0,$.jsx)(VC,{value:ze,onChange:e=>Be(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待推送`},{value:`2`,label:`推送中`},{value:`3`,label:`推送成功`},{value:`4`,label:`推送失败`}],allowClear:!0}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(X,{type:`primary`,onClick:dt,style:{borderRadius:8},children:`查询`}),(0,$.jsx)(X,{icon:(0,$.jsx)(LK,{}),onClick:dt,style:{borderRadius:8},children:`刷新`})]})]}),(0,$.jsx)(aQ,{dataSource:ke,columns:[{title:`素材名称`,dataIndex:`fileName`,key:`fileName`,width:200},{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:180},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>(0,$.jsx)(vQ,{color:{1:`#f59e0b`,2:`#6366f1`,3:`#10b981`,4:`#ef4444`}[e]||`#64748b`,style:{borderRadius:4},children:{1:`待推送`,2:`推送中`,3:`推送成功`,4:`推送失败`}[e]||e})},{title:`备注`,dataIndex:`note`,key:`note`,width:160,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:180,render:e=>k9(e)},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:180,render:e=>k9(e)}],loading:Le,scroll:{x:`max-content`},pagination:{current:Ne,pageSize:Fe,total:je,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:ft},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),v&&b&&(0,$.jsx)(DG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:b.title||`预览`})]}),open:v,onCancel:Xe,width:1200,footer:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`#fff`,borderTop:`1px solid #f1f5f9`},children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(I1,{}),onClick:()=>{C.current&&C.current.pause();let e=`https://ceshi.apiforeign.minzhongzc.com${b.videoUrl||b.imageUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=``,document.body.appendChild(t),t.click(),document.body.removeChild(t)},style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,fontWeight:600,padding:`8px 24px`},disabled:Ke(b.videoUrl||b.imageUrl),children:Ke(b.videoUrl||b.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(MQ,{}),onClick:()=>{let e=``,t=``;if(i===`shot_replicate`?(e=b.shotSegmentId,t=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:(0,$.jsxs)(`li`,{style:{marginBottom:4,color:`#334155`},children:[b.shotReplicateProjectTitle,`— —`,b.shotSegmentLabel]})}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]})):i===`hot_opening_replicate`?(e=b.moduleProjectId,t=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`爆款开头复刻中以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:(0,$.jsx)(`li`,{style:{marginBottom:4,color:`#334155`},children:b.moduleProjectTitle})}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]})):(e=b.id,t=`确定删除该记录吗?`),!e){Z.warning(`无法获取删除ID`);return}DG.confirm({title:`确认删除`,content:t,okText:`确定删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:async()=>{let t=``;i===`project`?t=`generation_record`:i===`creation`?t=`chat_task`:i===`hot_opening_replicate`?t=`hot_opening_replicate`:i===`shot_replicate`&&(t=`shot_replicate`);let n={history_source:t,ids:[e]};try{await G5(n),Z.success(`删除成功`),Xe(),d(e=>({...e,page:1})),vt()}catch{Z.error(`删除失败,请重试`)}}})},style:{borderRadius:8,background:`linear-gradient(135deg, #bf0b0a 0%, #ff8165 100%)`,fontWeight:600,padding:`8px 24px`},disabled:Ke(b.videoUrl||b.imageUrl),children:`删除`}),(0,$.jsx)(X,{onClick:ot,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600,padding:`8px 24px`},disabled:Ke(b.videoUrl||b.imageUrl),children:`推送媒体后台`}),(0,$.jsx)(X,{onClick:()=>{if(!b)return;let e=b.videoUrl||b.imageUrl||``;if(!e){Z.warning(`无法获取媒体地址`);return}if(Ke(e)){Z.warning(`资源已过期,无法编辑`);return}let t=b.videoUrl?`video`:`image`,n=e.startsWith(`http`)?e:`https://ceshi.apiforeign.minzhongzc.com${e}`,i=b.title||b.id||`导入素材`;Xe(),r(`/videoediting?mediaUrl=${encodeURIComponent(n)}&mediaType=${t}&mediaName=${encodeURIComponent(i)}`)},style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,color:`#fff`,fontWeight:600,padding:`8px 24px`},disabled:Ke(b.videoUrl||b.imageUrl),children:`去编辑`})]}),style:{borderRadius:16,overflow:`hidden`},styles:{body:{height:500,display:`flex`,flexDirection:`column`,padding:0},header:{background:`#fff`,borderBottom:`1px solid #f1f5f9`,padding:`16px 24px`},mask:{backgroundColor:`rgba(0, 0, 0, 0.5)`}},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,height:`100%`,background:`#f8fafc`},children:[(0,$.jsx)(`div`,{style:{width:`70%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,padding:20},children:Ke(b.videoUrl||b.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`,backgroundColor:`#fff`,borderRadius:12},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:15,color:`#ef4444`,fontWeight:500,marginBottom:8},children:`资源已过期`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#94a3b8`},children:`请刷新页面重新加载`})]}):o===`video`?(0,$.jsx)(`video`,{ref:C,src:`https://ceshi.apiforeign.minzhongzc.com${b.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`100%`,borderRadius:12,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${P7(b.imageUrl)}`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:12}})}),(0,$.jsxs)(`div`,{style:{width:`30%`,height:`100%`,overflowY:`auto`,scrollbarWidth:`none`,backgroundColor:`#fff`,padding:24,borderLeft:`1px solid #f1f5f9`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:20},children:[(0,$.jsx)(`div`,{style:{width:2,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:1}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,fontWeight:600},children:`文件信息`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:o===`video`?`视频`:`图片`})]}),i===`hot_opening_replicate`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类属`}),(0,$.jsxs)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:[`爆款复刻——`,b.moduleProjectTitle]})]}),i===`shot_replicate`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类属`}),(0,$.jsxs)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:[b.shotReplicateProjectTitle,`— —`,b.shotSegmentLabel]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:b.originalPrompt})]}),o===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.imagePx})]})]}),o===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.resolution})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:`${b.duration}秒`||`-`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:k9(b.createdAt||b.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.engine||b.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px solid #f1f5f9`,margin:`20px 0`}}),b.mediaReferences&&b.mediaReferences.length>0&&![`hot_opening_replicate`,`shot_replicate`].includes(i)&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:16},children:[(0,$.jsx)(`div`,{style:{width:2,height:18,background:`linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%)`,borderRadius:1}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,fontWeight:600},children:`依靠附件`})]}),b.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{C.current&&C.current.pause();let t=`https://ceshi.apiforeign.minzhongzc.com${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:10,padding:`10px 12px`,borderRadius:8,cursor:`pointer`,backgroundColor:`#f8fafc`,marginBottom:8,transition:`all 0.25s ease`,border:`1px solid transparent`},onMouseEnter:e=>{let t=e.currentTarget;t.style.backgroundColor=`#e0f2fe`,t.style.borderColor=`#bae6fd`},onMouseLeave:e=>{let t=e.currentTarget;t.style.backgroundColor=`#f8fafc`,t.style.borderColor=`transparent`},children:[e.type===`image`?(0,$.jsx)(w6,{style:{color:`#3b82f6`,fontSize:16}}):(0,$.jsx)(R8,{style:{color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:e.name||`媒体${t+1}`})]},e.url))]})]})]})}),(0,$.jsx)(DG,{title:Ue.size===1?`推送配置`:`批量推送配置`,open:A,onCancel:()=>{j(!1),N([[]]),F([``]),U([void 0]),W(new Map),G(``)},footer:null,width:900,mask:{closable:!1},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:[`选中素材 (`,Ue.size,`个)`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`统一修改名称:`}),(0,$.jsx)(YU,{value:te,onChange:e=>G(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(X,{type:`primary`,size:`small`,onClick:()=>{te.trim()&&Ue.size>0&&ht(Array.from(Ue),te)},disabled:!te.trim()||Ue.size===0,style:{borderRadius:8},children:`应用`})]}),(0,$.jsx)(`div`,{style:{maxHeight:300,overflow:`auto`,border:`1px solid #f0f0f0`,borderRadius:8,padding:12},children:(()=>{let e=new Map;return c.forEach(t=>{t.items.forEach(t=>{let n=Ze(t);e.set(n,t)})}),Array.from(Ue).map(t=>{let n=e.get(t);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`1px solid #f5f5f5`},children:[(0,$.jsx)(`div`,{style:{width:60,height:40,borderRadius:4,backgroundColor:`#f5f5f5`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,flexShrink:0},children:(()=>{let e=o===`video`?n?.videoCoverUrl:n?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`https://ceshi.apiforeign.minzhongzc.com`;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}${P7(e)}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})()}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#1e293b`},children:n?.fileName||`素材 ${n.id}`})}),(0,$.jsx)(YU,{value:ee.has(t)?ee.get(t):n?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(ee);r.set(t,n),W(r)},onBlur:()=>{let e=ee.get(t)||n?.fileName||``;e.trim()&&mt(t,e)},onKeyDown:e=>{if(e.key===`Enter`){let e=ee.get(t)||n?.fileName||``;e.trim()&&mt(t,e)}},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`是否开启前测:`}),(0,$.jsx)(VC,{value:ye,onChange:e=>{be(e),e===`1`?F5().then(e=>{Se(e?.data?.id||``)}).catch(()=>{}):Se(``)},style:{width:120},options:[{value:`1`,label:`是`},{value:`2`,label:`否`}]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`前测模板:`}),(0,$.jsx)(VC,{value:xe,onChange:e=>Se(e),style:{width:200},disabled:ye!==`1`,loading:Te,placeholder:ye===`1`?`选择前测模板`:`请先开启前测`,options:Ce.map(e=>({value:e.id,label:e.name}))})]})]}),(0,$.jsx)(gL,{size:`small`,activeKey:le,onChange:e=>{ue(e),e===`history`&&ct()},items:[{key:`new`,label:`新增账户`},{key:`history`,label:`历史账户`}]}),le===`new`&&(0,$.jsxs)(`div`,{children:[H.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:12,border:`1px solid #e2e8f0`,borderRadius:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`},children:[`授权账户 `,t+1]}),H.length>1&&(0,$.jsx)(X,{type:`text`,danger:!0,onClick:()=>{let e=[...H],n=[...P],r=[...M],i=[...se];e.splice(t,1),n.splice(t,1),r.splice(t,1),i.splice(t,1),U(e),F(n),N(r),ce(i)},children:`删除`})]}),(0,$.jsx)(VC,{value:e,onChange:e=>{let n=[...H];n[t]=e,U(n)},placeholder:`点击选择授权账户`,style:{width:`100%`,marginBottom:12,borderRadius:8},popupRender:()=>(0,$.jsx)(`div`,{style:{padding:8,width:800,maxHeight:500,overflow:`auto`},children:(0,$.jsx)(aQ,{dataSource:I,columns:[{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,width:120},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,width:160,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120}],loading:R,pagination:{current:ie,pageSize:q,total:B,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ae(e),oe(t),st(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:n=>({onClick:()=>{let e=String(n.id),r=[...H];r[t]={value:e,label:String(n.accountId)+`-`+(n.accountName||`-`)},U(r);let i=[...se];i[t]=!1,ce(i)},style:{cursor:`pointer`,backgroundColor:e?.value===String(n.id)?`#e6f7ff`:void 0}})})}),open:se[t],onOpenChange:e=>{let n=[...se];n[t]=e,ce(n),e&&st(1,q)},labelInValue:!0,fieldNames:{label:`accountUserid`,value:`id`}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:`粘贴账户ID(每行一个或用逗号分隔)`}),(0,$.jsx)(YU.TextArea,{value:P[t],onChange:e=>{let n=e.target.value,r=[...P];r[t]=n,F(r);let i=n.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0),a=[...new Set(i)].map(e=>({accountId:e})),o=new Set,s=a.filter(e=>o.has(e.accountId)?!1:(o.add(e.accountId),!0)),c=[...M];c[t]=s,N(c)},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如: + `})]}):e===`failed`?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#ef4444`},children:`失败`}):e===`completed`&&t.finalVideoUrl?(0,$.jsx)(`span`,{style:{fontSize:11,color:`#10b981`},children:`任务完成`}):null})()]})]})]},t.id))}),(0,$.jsx)(`div`,{style:{paddingTop:20,paddingBottom:20,display:`flex`,justifyContent:`center`},children:(0,$.jsx)(PW,{current:m,pageSize:g,total:v,onChange:Te,showSizeChanger:!1,showQuickJumper:!1,showTotal:e=>`共 ${e} 条`,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:m===1?`#f9fafb`:`#fff`,cursor:m===1?`not-allowed`:`pointer`,color:m===1?`#d1d5db`:`#6b7280`,fontSize:14},disabled:m===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid #e5e7eb`,borderRadius:6,background:m>=Math.ceil(v/g)?`#f9fafb`:`#fff`,cursor:m>=Math.ceil(v/g)?`not-allowed`:`pointer`,color:m>=Math.ceil(v/g)?`#d1d5db`:`#6b7280`,fontSize:14},disabled:m>=Math.ceil(v/g),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:6,background:e===m?`#6366f1`:`#fff`,color:e===m?`#fff`:`#374151`,fontWeight:e===m?500:400,cursor:`pointer`,fontSize:14},children:e}):n})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px`},children:[(0,$.jsxs)(`div`,{style:{width:120,height:120,display:`flex`,alignItems:`center`,justifyContent:`center`,marginBottom:24,position:`relative`},children:[(0,$.jsx)(`div`,{style:{width:60,height:60,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:20,position:`absolute`,bottom:0,right:10}}),(0,$.jsx)(`div`,{style:{width:50,height:50,border:`2px solid rgba(99, 102, 241, 0.2)`,borderRadius:16,position:`absolute`,top:0,left:10}}),(0,$.jsx)(`div`,{style:{width:56,height:56,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.25)`},children:(0,$.jsx)(L8,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:600,color:`#1e293b`,marginBottom:8},children:`暂无生成内容`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#64748b`,textAlign:`center`,padding:`0 40px`,lineHeight:1.6},children:`请完善素材与卖点,生成专属爆款复刻视频`})]})})]}),(0,$.jsx)(`div`,{className:`replication-form`,style:{overflow:`auto`,width:`30%`,background:`transparent`,backdropFilter:`blur(20px)`,borderRadius:20,position:`relative`,zIndex:10,scrollbarWidth:`none`},children:(0,$.jsxs)(`div`,{className:`replication-form-content`,style:{width:`100%`,height:`100%`,background:`rgba(258, 250, 252, 0.2)`,padding:24,overflowY:`auto`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{marginBottom:10},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`},children:[`上传复刻视频`,(0,$.jsx)(`span`,{style:{color:`#f94444`},children:`(必选)`})]}),(0,$.jsxs)(`p`,{style:{fontSize:12,color:`#64748b`,fontWeight:400,margin:`4px 0 0`},children:[`当前引擎最多可上传 `,xe,` 秒`]})]}),k?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`video`,{src:Z7(k),controls:!0,style:{width:`100%`,borderRadius:12,maxHeight:200,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:je,style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`})]}):(0,$.jsx)(V1,{style:{width:`100%`},beforeUpload:ke,showUploadList:!1,accept:`video/mp4,video/quicktime,.mp4,.mov`,children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:24,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:V?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:40,height:40,margin:`0 auto 12px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsxs)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:[`支持的文件类型:MP4、MOV | 视频最大时长:`,xe,` 秒 | 最大大小:50M`]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:48,height:48,margin:`0 auto 12px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:16,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(L8,{style:{fontSize:24,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`点击或拖拽上传视频`}),(0,$.jsxs)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:[`支持的文件类型:MP4、MOV | 视频最大时长:`,xe,` 秒 | 最大大小:50M`]})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10},children:[`上传产品图片`,(0,$.jsx)(`span`,{children:`(可选)`})]}),L?(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`img`,{src:Z7(L),alt:`产品图片`,style:{width:`100%`,borderRadius:12,maxHeight:200,objectFit:`contain`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.08)`}}),(0,$.jsx)(`button`,{onClick:Me,style:{position:`absolute`,top:8,right:8,width:28,height:28,border:`none`,background:`rgba(239, 68, 68, 0.9)`,borderRadius:`50%`,cursor:`pointer`,color:`#fff`,fontSize:16,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10,transition:`all 0.2s`},children:`×`})]}):(0,$.jsx)(C7,{accept:`image/*`,multiple:!1,mediaType:`image`,uploading:U,maxImageCount:1,usedImageCount:0,onLocalSelect:e=>{e[0]&&Ae(e[0])},onHistorySelect:e=>{let t=e[0];t&&(I(null),R(t.resourceUrl||t.previewUrl||t.displayUrl||``),B(t.id),Z.success(`历史图片已选择`))},children:(0,$.jsx)(`div`,{style:{border:`2px dashed rgba(99, 102, 241, 0.3)`,borderRadius:12,padding:20,textAlign:`center`,cursor:`pointer`,transition:`all 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,background:`rgba(99, 102, 241, 0.02)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.background=`rgba(99, 102, 241, 0.02)`},children:U?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{width:36,height:36,margin:`0 auto 10px`,border:`3px solid rgba(99, 102, 241, 0.2)`,borderTopColor:`#6366f1`,borderRadius:`50%`,animation:`spin 1s linear infinite`}}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#6366f1`,fontWeight:500},children:`上传中...`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:44,height:44,margin:`0 auto 10px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:14,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(C6,{style:{fontSize:22,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:13,color:`#475569`,fontWeight:500},children:`+ 点击上传`}),(0,$.jsx)(`p`,{style:{margin:0,fontSize:11,color:`#94a3b8`,marginTop:4},children:`支持 JPG, JPEG, PNG 格式,图片比例为 3:4 或 9:16 效果最佳`})]})})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:[`原产品名称`,(0,$.jsx)(`span`,{children:`(可选)`})]}),(0,$.jsx)(JU,{value:b,onChange:e=>x(e.target.value),placeholder:`请输入原产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:50,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[b.length,`/50`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:[`自有产品名称`,(0,$.jsx)(`span`,{children:`(可选)`})]}),(0,$.jsx)(JU,{value:C,onChange:e=>w(e.target.value),placeholder:`请输入自有产品名称`,style:{borderRadius:10,height:40,fontSize:13,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},maxLength:50,suffix:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[C.length,`/50`]})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:13,fontWeight:500,color:`#475569`,marginBottom:8},children:[`产品卖点`,(0,$.jsx)(`span`,{children:`(可选)`})]}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(Oce,{value:T,onChange:e=>E(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:10,fontSize:13,height:80,resize:`none`,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},rows:3,maxLength:200}),(0,$.jsxs)(`span`,{style:{position:`absolute`,right:10,bottom:8,color:`#94a3b8`,fontSize:12},children:[T.length,`/200`]})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:12,display:`grid`,gap:10},children:[(0,$.jsxs)(`p`,{style:{margin:0,fontSize:14,fontWeight:600,color:`#1e293b`},children:[`视频生成参数`,(0,$.jsx)(`span`,{style:{color:`#f94444`},children:`(必选)`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{ce(!se),ue(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(o8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:W.find(e=>e.id===G)?.name||`选择引擎`})]}),se&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-19,width:300,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:300,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:W.filter(e=>e.supportsUniversalReference!==!1).map(e=>(0,$.jsx)(`button`,{type:`button`,onClick:()=>{ne(e.id);let t=(()=>{let t=e.maxDuration??e.max_duration;if(t!=null)return Number(t);let n=e.supportedDurations;return Array.isArray(n)&&n.length>0?Math.max(...n):15})(),n=e.supportedDurations,r=Array.from({length:t-4},(e,t)=>t+5),i=Array.from(new Set([...n||[],...r].sort((e,t)=>e-t)));fe({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:i}),e.supportedRatios?.includes(ie)||ae(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(q)||oe(e.supportedResolutions?.[0]||`720p`),(!i.includes(K)||K>t)&&re(i.find(e=>e<=t)??i[0]??5),ce(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:G===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:G===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:G===e.id?600:500,color:G===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name})},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{ue(!le),ce(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(b3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[ie,` · `,K,`s · `,q]})]}),le&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:320,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:de.ratios.map(e=>{let[t,n]=e.split(`:`).map(Number),r=t>=n?18:Math.round(t/n*18),i=n>=t?18:Math.round(n/t*18);return(0,$.jsxs)(`button`,{onClick:()=>ae(e),style:{flex:`0 0 calc(12.5% - 4px)`,minWidth:44,height:52,borderRadius:6,border:ie===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:ie===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:r,height:i,border:`2px solid ${ie===e?`#6366f1`:`#9ca3af`}`,borderRadius:3,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:ie===e?`#6366f1`:`#6b7280`,fontWeight:ie===e?600:400},children:e})]},e)})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(K-Math.min(...de.durations))/(xe-Math.min(...de.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...de.durations),max:xe,value:K,onChange:e=>re(Math.min(Number(e.target.value),xe)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:K}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:de.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>oe(e),style:{flex:1,height:42,borderRadius:8,border:q===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:q===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:q===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]})]}),(0,$.jsx)(kw,{title:(t?.credits||0){if((t?.credits||0)ge(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(JU,{placeholder:`搜索产品名称`,value:u,onChange:e=>d(e.target.value),onPressEnter:Oe,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(X,{type:`primary`,onClick:Oe,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:`0 24px 24px`},children:(0,$.jsx)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`},children:(0,$.jsx)(iQ,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`,width:100,render:e=>(0,$.jsx)(`span`,{style:{fontSize:13,color:`#1e293b`,fontWeight:500},children:e||`-`})},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,width:220,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#64748b`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#64748b`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#64748b`}})();return(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,width:200,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,width:220,render:(t,n)=>(0,$.jsxs)(yV,{children:[(0,$.jsx)(`button`,{onClick:()=>e(`/initial/${n.id}/initialinfo?flow_version=${n.flowVersion===`v2`?`v2`:`v1`}`),style:{color:`#6366f1`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},children:`查看详情`}),(0,$.jsx)(AG,{title:`确认删除这个爆款开头复刻任务吗?`,onConfirm:async()=>{try{await poe(n.id,n.flowVersion),Z.success(`删除成功`),Ee(1,o,!1,u)}catch{Z.error(`删除失败`)}},children:(0,$.jsx)(`button`,{style:{color:`#ef4444`,textDecoration:`none`,fontSize:13,border:`none`,background:`rgba(239, 68, 68, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.12)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.08)`},children:`删除`})})]})}],dataSource:n,rowKey:`id`,pagination:{current:i,pageSize:o,total:c,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:De,itemRender:(e,t,n)=>t===`prev`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:i===1?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:i===1?`not-allowed`:`pointer`,color:i===1?`#94a3b8`:`#6366f1`,fontSize:14},disabled:i===1,children:`‹`}):t===`next`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`1px solid rgba(99, 102, 241, 0.15)`,borderRadius:8,background:i>=Math.ceil(c/o)?`rgba(243, 244, 246, 0.5)`:`#fff`,cursor:i>=Math.ceil(c/o)?`not-allowed`:`pointer`,color:i>=Math.ceil(c/o)?`#94a3b8`:`#6366f1`,fontSize:14},disabled:i>=Math.ceil(c/o),children:`›`}):t===`page`?(0,$.jsx)(`button`,{style:{minWidth:32,height:32,border:`none`,borderRadius:8,background:e===i?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`:`#fff`,color:e===i?`#fff`:`#475569`,fontWeight:e===i?600:400,cursor:`pointer`,fontSize:14},children:e}):n},style:{fontSize:13},scroll:{y:350}})})})]})]})};function Q7(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function $7(e,...t){for(let n of t){let t=e[n];if(t!=null&&String(t).trim()!==``)return String(t)}return``}function e9(e,t,...n){for(let t of n){let n=e[t];if(n===!0||n===!1)return n;if(n===`true`)return!0;if(n===`false`)return!1}return t}function Mce(e,...t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;if(typeof t==`string`&&t.trim()){let e=Number(t);if(Number.isFinite(e)&&e>0)return e}}}function t9(e){if(!Q7(e))return null;let t=$7(e,`key`);return t?{key:t,label:$7(e,`label`)||t,type:$7(e,`type`)||void 0,enabled:e9(e,!0,`enabled`),editable:e9(e,!0,`editable`),maxLength:Mce(e,`maxLength`,`max_length`)}:null}function n9(e){if(!Q7(e))return null;let t=e.data;return Q7(t)?t:Array.isArray(e.sections)?e:null}function Nce(e){return!!n9(e)}function r9(e){let t=n9(e);return(Array.isArray(t?.sections)?t.sections:[]).map(e=>{let t=t9(e);if(!t||!Q7(e))return null;let n=Array.isArray(e.children)?e.children.map(t9).filter(Boolean):[],r=Array.isArray(e.itemFields)?e.itemFields.map(t9).filter(Boolean):Array.isArray(e.item_fields)?e.item_fields.map(t9).filter(Boolean):[];return{...t,contentKey:$7(e,`contentKey`,`content_key`)||void 0,children:n,itemFields:r}}).filter(e=>!!e&&e.enabled)}function i9(e){if(e==null)return``;if(typeof e==`object`)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function a9(e){let t=i9(e);return t.length>40||t.includes(` +`)||t.includes(`,`)||t.includes(`。`)||t.includes(`;`)||t.includes(`;`)}function o9(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function s9(e,t,n,r){let i=o9(e||{});return Q7(i[t])||(i[t]={}),i[t][n]=r,i}function c9(e,t,n,r,i){let a=o9(e||{});return Array.isArray(a[t])||(a[t]=[]),Q7(a[t][n])||(a[t][n]={}),a[t][n][r]=i,a}function l9(e,t){if(!Q7(e))return`视频提示词不能为空`;let n=r9(t);if(!n.length)return`视频提词配置缺失,无法保存`;for(let t of n){if(!t.editable)continue;let n=e[t.key];if(t.type===`object`){if(!Q7(n))continue;for(let e of t.children)if(!(!e.enabled||!e.editable||!e.maxLength)&&i9(n[e.key]).length>e.maxLength)return`字段【${t.label}.${e.label}】长度不能超过 ${e.maxLength} 个字符`;continue}if(t.type===`flow`){if(!Array.isArray(n))continue;for(let e=0;en.maxLength)return`字段【${t.label} 第 ${e+1} 项.${n.label}】长度不能超过 ${n.maxLength} 个字符`}}continue}if(t.editable&&t.maxLength&&i9(n).length>t.maxLength)return`字段【${t.label}】长度不能超过 ${t.maxLength} 个字符`}return null}var{Text:u9}=Q,{TextArea:d9}=JU;function f9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function p9({value:e}){let t=e===`true`?`是`:e===`false`?`否`:i9(e);return a9(e)?(0,$.jsx)(d9,{value:t,rows:Math.min(6,Math.max(2,Math.ceil(t.length/42))),disabled:!0,style:{borderRadius:10,color:`#64748b`,border:`1px solid #e2e8f0`,background:`#f8fafc`}}):(0,$.jsx)(JU,{value:t,disabled:!0,style:{borderRadius:10,color:`#64748b`,border:`1px solid #e2e8f0`,background:`#f8fafc`}})}function m9({value:e,maxLength:t,onChange:n}){let r=i9(e),i={value:r,maxLength:t,showCount:!!t,onChange:e=>n(e.target.value),style:{borderRadius:10,border:`1px solid #e2e8f0`,transition:`all 0.2s ease`}};return a9(e)?(0,$.jsx)(d9,{...i,rows:Math.min(8,Math.max(3,Math.ceil(r.length/42)))}):(0,$.jsx)(JU,{...i})}function h9({value:e,onChange:t}){let n=e===!0||e===`true`;return(0,$.jsxs)(KF.Group,{value:n,onChange:e=>t(e.target.value),style:{display:`flex`,gap:24},children:[(0,$.jsx)(KF,{value:!0,style:{fontSize:14,color:`#475569`},children:`是`}),(0,$.jsx)(KF,{value:!1,style:{fontSize:14,color:`#475569`},children:`否`})]})}var g9=({value:e,schemaConfigSnapshot:t,onChange:n})=>{let r=f9(e)?e:{},i=r9(t),[a,o]=(0,S.useState)(``),s=(0,S.useRef)(null),c=e=>{o(e.key);let t=document.getElementById(`section-${e.key}`);if(t&&s.current){let e=s.current.getBoundingClientRect(),n=t.getBoundingClientRect().top-e.top+s.current.scrollTop;s.current.scrollTo({top:n,behavior:`smooth`})}};if((0,S.useEffect)(()=>{let e=i.filter(e=>e.key in r);e.length>0&&!a&&o(e[0].key)},[i,r,a]),(0,S.useEffect)(()=>{let e=s.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect(),n=t.height/2,s=``,c=1/0;for(let e of i){if(!(e.key in r))continue;let i=document.getElementById(`section-${e.key}`);if(!i)continue;let a=i.getBoundingClientRect(),o=a.top,l=a.bottom;if(l>t.top&&o{e.removeEventListener(`scroll`,t)}},[i,r]),!Nce(t))return(0,$.jsxs)(yV,{direction:`vertical`,size:12,style:{width:`100%`},children:[(0,$.jsx)(Jf,{type:`warning`,showIcon:!0,message:`视频提词配置缺失,暂不能编辑`,description:`请刷新详情后重试;如果仍然缺失,请联系管理员排查第4步 schema_config_snapshot 返回。`}),Object.keys(r).length?(0,$.jsx)(`pre`,{style:{margin:0,padding:12,borderRadius:10,background:`#f8fafc`,maxHeight:420,overflow:`auto`,color:`#475569`},children:JSON.stringify(r,null,2)}):null]});if(!i.length)return(0,$.jsx)(Jf,{type:`warning`,showIcon:!0,message:`视频提词配置为空`,description:`当前 Schema 配置没有可展示字段。`});let l=e=>{let t=f9(r[e.key])?r[e.key]:{},i=e.children.filter(e=>e.enabled);return i.length?(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:3,height:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(u9,{strong:!0,style:{color:`#334155`,fontSize:14,fontWeight:600},children:e.label})]}),(0,$.jsx)(`div`,{style:{padding:`16px`,backgroundColor:`#fff`,borderRadius:12,border:`1px solid #e2e8f0`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:i.map(i=>(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{marginBottom:6},children:(0,$.jsx)(u9,{style:{color:`#64748b`,fontSize:12},children:i.label})}),i.editable?i.type===`boolean`?(0,$.jsx)(h9,{value:t[i.key],onChange:t=>n(s9(r,e.key,i.key,t))}):(0,$.jsx)(m9,{value:t[i.key],maxLength:i.maxLength,onChange:t=>n(s9(r,e.key,i.key,t))}):(0,$.jsx)(p9,{value:t[i.key]})]},i.key))})]},e.key):null},u=e=>{let t=Array.isArray(r[e.key])?r[e.key]:[],i=[{key:`时间段`,label:`时间段`,enabled:!0,editable:!1},...e.itemFields.filter(e=>e.enabled)];return(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:3,height:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(u9,{strong:!0,style:{color:`#334155`,fontSize:14,fontWeight:600},children:e.label}),(0,$.jsx)(_Q,{style:{borderRadius:4,fontSize:11,padding:`2px 8px`,background:`#f1f5f9`,color:`#64748b`,border:`none`},children:`锁定条目和时间段`})]}),(0,$.jsx)(`div`,{style:{padding:`16px`,backgroundColor:`#fff`,borderRadius:12,border:`1px solid #e2e8f0`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:t.length===0?(0,$.jsx)(u9,{style:{color:`#94a3b8`,fontSize:12},children:`暂无内容`}):t.map((a,o)=>{let s=f9(a)?a:{};return(0,$.jsxs)(`div`,{style:{marginBottom:o===t.length-1?0:16,paddingBottom:o===t.length-1?0:16,borderBottom:o===t.length-1?`none`:`1px dashed #e2e8f0`},children:[(0,$.jsxs)(u9,{strong:!0,style:{display:`block`,marginBottom:10,color:`#475569`,fontSize:13},children:[`第 `,o+1,` 段`]}),i.map(t=>(0,$.jsxs)(`div`,{style:{marginBottom:14},children:[(0,$.jsx)(`div`,{style:{marginBottom:6},children:(0,$.jsx)(u9,{style:{color:`#64748b`,fontSize:12},children:t.label})}),t.editable?t.type===`boolean`?(0,$.jsx)(h9,{value:s[t.key],onChange:i=>n(c9(r,e.key,o,t.key,i))}):(0,$.jsx)(m9,{value:s[t.key],maxLength:t.maxLength,onChange:i=>n(c9(r,e.key,o,t.key,i))}):(0,$.jsx)(p9,{value:s[t.key]})]},t.key))]},`${e.key}-${o}`)})})]},e.key)},d=e=>e.key in r?(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:3,height:16,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(u9,{strong:!0,style:{color:`#334155`,fontSize:14,fontWeight:600},children:e.label})]}),(0,$.jsx)(`div`,{style:{padding:`16px`,backgroundColor:`#fff`,borderRadius:12,border:`1px solid #e2e8f0`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:e.editable?(0,$.jsx)(m9,{value:r[e.key],maxLength:e.maxLength,onChange:t=>{let i=o9(r);i[e.key]=t,n(i)}}):(0,$.jsx)(p9,{value:r[e.key]})})]},e.key):null,f=i.filter(e=>e.key in r).map(e=>({key:e.key,label:e.label})),p=e=>e.key in r?e.type===`object`?l(e):e.type===`flow`?u(e):d(e):null;return(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`row`,maxHeight:500},children:[(0,$.jsx)(`div`,{style:{width:180,flexShrink:0,background:`#fff`,borderRight:`1px solid #e2e8f0`,overflowY:`auto`},children:(0,$.jsx)(HE,{mode:`inline`,selectedKeys:[a],onClick:c,style:{height:`100%`,borderRight:0},theme:`light`,items:f.map(e=>({...e,style:{borderRadius:8,margin:`4px 8px`,padding:`8px 12px`,color:`#64748b`,fontSize:13,transition:`all 0.2s ease`,maxHeight:500}}))})}),(0,$.jsx)(`div`,{ref:s,style:{flex:1,padding:`20px`,overflowY:`auto`,background:`#f8fafc`},children:i.map(e=>(0,$.jsx)(`div`,{id:`section-${e.key}`,children:p(e)},e.key))})]})},{Title:Pce,Text:_9}=Q,{TextArea:Fce}=JU;function Ice(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}var v9=e=>e?/^https?:\/\//i.test(e)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``;function Lce(){let e=Ye(),{creatID:t}=$e(),[n]=On(),r=n.get(`flow_version`)===`v2`?`v2`:`v1`,{user:i}=$5(),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(`image`),[p,m]=(0,S.useState)({}),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(!1),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)({}),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(``),[F,I]=(0,S.useState)(!1),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(!1),[V,H]=(0,S.useState)(5),[U,ee]=(0,S.useState)(`16:9`),[W,te]=(0,S.useState)(`480p`),[G,ne]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[K,re]=(0,S.useState)([]),[ie,ae]=(0,S.useState)(0),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(1),[le,ue]=(0,S.useState)(20),[de,fe]=(0,S.useState)(0),[pe,me]=(0,S.useState)(``),[he,ge]=(0,S.useState)({}),[_e,ve]=(0,S.useState)(!1),[ye,be]=(0,S.useState)([]),[xe,Se]=(0,S.useState)([]),[Ce,we]=(0,S.useState)(!1),[Te,Ee]=(0,S.useState)(``),[De,Oe]=(0,S.useState)(`image`),[ke,Ae]=(0,S.useState)(!1),je=S.useRef(null);(0,S.useEffect)(()=>{if(Ce&&De===`video`){let e=()=>{je.current&&je.current.play().catch(()=>{})};je.current&&(je.current.readyState>=2?e():je.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),je.current&&(je.current.removeEventListener(`loadedmetadata`,e),je.current.pause())}}else je.current&&je.current.pause()},[Ce,De]);let Me=(e,t,n=!1)=>{Ee(e),Oe(t),Ae(n),we(!0)},Ne=()=>{we(!1),Ee(``),je.current&&je.current.pause()},Pe=e=>{if(e.preventDefault(),e.stopPropagation(),!Te)return;let t=document.createElement(`a`);t.href=`https://ceshi.apiforeign.minzhongzc.com${Te}&download=1`,t.download=De===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},Fe=r===`v2`,Ie=(0,S.useMemo)(()=>Fe?[{id:1,title:`素材与项目信息`,description:`固定素材和项目描述`,childId:1},{id:2,title:`生成视频提示词`,description:`生成并确认视频提示词`,childId:4},{id:3,title:`生成最终视频`,description:`使用当前视频提示词生成视频`,childId:5}]:[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}],[Fe]),Le=(0,S.useMemo)(()=>Ie.map((e,t)=>({...e,status:ye[t]?.status||``,id:ye[t]?.id||t,output:ye[t]?.output||``,input:ye[t]?.input||{},engineId:ye[t]?.input?.payload?.videoConfig?.engineId||``,errorMessage:ye[t]?.errorMessage||``})),[Ie,ye]),Re=(0,S.useRef)(!1);(0,S.useEffect)(()=>{if(!Le.some(e=>e.status))return;let e=[...Le].reverse().find(e=>e.status===`processing`);if(e){Se([String(e.childId)]),Re.current=!1;return}if(Re.current){Re.current=!1;return}let t=[...Le].reverse().find(e=>e.status===`completed`&&e.childId!==1);if(t){Se([String(t.childId)]);return}Se([])},[Le]);let ze=(e,t,n)=>{D5(e,t,n).then(e=>{e.items&&oe(e.items),e.total!==void 0&&fe(e.total)}).catch(e=>{})},Be=(e,t)=>{ce(e),ue(t),ze(e,t,pe)},Ve=()=>{ce(1),ze(1,le,pe)};(0,S.useEffect)(()=>{ze(se,le)},[]),(0,S.useEffect)(()=>{S5().then(e=>{let t=(e.engine?.video||[]).filter(e=>e.supportsUniversalReference!==!1),n=(e.engine?.image||[]).filter(e=>e.supportsUniversalReference!==!1);if(A({video:t,image:n}),t.length>0){M(t[0].id);let e=t[0];ne({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]})}n.length>0&&P(n[0].id)}).catch(e=>{})},[]),(0,S.useEffect)(()=>{E5().then(e=>{re(e)}).catch(()=>{})},[]);let He=()=>{let e={};e=K.find(e=>e.modelConfigId===j&&e.genType===`video`&&e.resolution===W),e||(e={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0},(W===`1080p`||W===`720p`||W===`480p`)&&(e.ratio=1.3));let t=(V*e.perSecondCredits+e.baseCredits)*e.ratio,n=he?.videoGeneration?.inputMedia?.video?.duration||0;if(n>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n)*(e.inputVideoRatio||1);t+=r}let r=Fe?+!!he?.material?.materialImageUrl:he?.videoGeneration?.inputMedia?.image?.length||0;if(r>0){let n=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*r)*(e.inputImageRatio||1);t+=n}ae(Number(t.toFixed(2)))},Ue=()=>{let e=Le[1]?.input?.payload?.videoConfig||Le[1]?.input?.payload?.video_config;if(!e)return 0;let t=e?.engineId||e?.engine_id,n=e?.resolution,r=e?.duration||V,i={};i=K.find(e=>e.modelConfigId===t&&e.genType===`video`&&e.resolution===n),i||={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0};let a=(r*i.perSecondCredits+i.baseCredits)*i.ratio,o=he?.videoGeneration?.inputMedia?.video?.duration||0;if(o>0){let e=((i.inputVideoBaseCredits||0)+(i.inputVideoPerSecondCredits||0)*o)*(i.inputVideoRatio||1);a+=e}let s=Fe?+!!he?.material?.materialImageUrl:he?.videoGeneration?.inputMedia?.image?.length||0;if(s>0){let e=((i.inputImageBaseCredits||0)+(i.inputImagePerImageCredits||0)*s)*(i.inputImageRatio||1);a+=e}return Number(a.toFixed(2))};(0,S.useEffect)(()=>{K.length>0&&j&&He()},[K,j,V,W,he]),(0,S.useEffect)(()=>()=>{x.current&&=(clearInterval(x.current),null)},[]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(I(!1),R(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&(ve(!0),O5(t,r).then(e=>{ge(e),e.steps&&be(e.steps)}).catch(e=>{Z.error(e?.message||`加载任务详情失败`)}).finally(()=>{ve(!1)}))},[t,r]),(0,S.useEffect)(()=>{let e=he?.status===`processing`||ye.some(e=>e?.status===`processing`);e&&!x.current?x.current=setInterval(Ke,15e3):!e&&x.current&&(clearInterval(x.current),x.current=null)},[he?.status,ye,t,r]);let We=(e,t,n,r)=>{f(t||`image`),v(n?String(n):``),t===`video`?(g(r||null),m(e&&typeof e==`object`?Ice(e):{}),c(``)):(g(null),c(e||``),m({})),o(!0)},Ge=async()=>{if(d===`image`){if(!he?.id||!_){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!s||!s.trim()){Z.warning(`图片提示词不能为空`);return}b(!0);try{await Vae(he.id,_,{prompt:s.trim()}),Z.success(`图片提示词已保存`),qe(),o(!1),v(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{b(!1)}return}if(!he?.id||!_){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!p||typeof p!=`object`||Object.keys(p).length===0){Z.warning(`视频提示词不能为空`);return}if(!h){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=l9(p,h);if(e){Z.warning(e);return}b(!0);try{await(Fe?zae:Jae)(he.id,_,{prompt_schema:p}),Z.success(`视频提示词已保存`),qe(),o(!1),v(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{b(!1)}},Ke=()=>{t&&O5(t,r).then(e=>{ge(e),e.steps&&be(e.steps)}).catch(e=>{console.error(`轮询任务详情失败`,e)})},qe=()=>{t&&O5(t,r).then(e=>{ge(e),e.steps&&be(e.steps)}).catch(e=>{Z.error(e?.message||`刷新任务详情失败`)})},Je=e=>{let t={engine_id:N,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};k5(he.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),qe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Xe=()=>{let e={engine_id:N,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};k5(he.id,Le[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),qe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ze=e=>{let t={engine_id:j,duration:V,aspect_ratio:U,resolution:W,target_platform:`抖音`};Hae(he.id,e.toString(),t).then(e=>{qe(),Z.info(`正在生成视频提示词,请稍候...`)}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Qe=async(e,t)=>{try{Fe?await Bae(he.id,String(e)):await Uae(he.id,String(e),{engine_id:t||``}),Z.info(`正在生成视频,请稍候...`),qe()}catch(e){let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)}},et=async()=>{let e=Fe?Le[1]:Le[3];e?.id&&await Qe(e.id,e.engineId||``)},tt=async e=>{if(!(!Fe||!he?.id||!e||!j))try{await Rae(he.id,e,{video_config:{engine_id:j,duration:V,aspect_ratio:U,resolution:W}}),Z.info(`正在按新视频参数重新生成视频提示词,请稍候...`),qe()}catch(e){Z.error(e?.message||`重新生成视频提示词失败`)}};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[_e&&(0,$.jsxs)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,background:`linear-gradient(135deg, rgba(250, 248, 255, 0.95) 0%, rgba(245, 243, 255, 0.95) 50%, rgba(240, 249, 255, 0.95) 100%)`,backdropFilter:`blur(12px)`,zIndex:9999,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:20,opacity:1,transition:`opacity 0.3s ease`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:60,height:60,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`,border:`2px solid rgba(99, 102, 241, 0.08)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`,border:`2px solid transparent`,borderTopColor:`#6366f1`,borderRightColor:`#8b5cf6`,borderRadius:`50%`,animation:`spinSlow 0.8s linear infinite`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,width:40,height:40,border:`2px solid transparent`,borderBottomColor:`#a855f7`,borderLeftColor:`#c084fc`,borderRadius:`50%`,animation:`spinSlow 1.2s linear infinite reverse`}}),(0,$.jsx)(`div`,{style:{width:8,height:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,borderRadius:`50%`,boxShadow:`0 0 12px rgba(99, 102, 241, 0.6)`}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{fontSize:16,color:`#4f46e5`,fontWeight:600,letterSpacing:.5},children:`加载中`}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#94a3b8`,fontWeight:400},children:`正在获取任务详情...`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:4,marginTop:8},children:[0,1,2].map(e=>(0,$.jsx)(`div`,{style:{width:4,height:4,background:`#a5b4fc`,borderRadius:`50%`,animation:`spinSlow ${.8+e*.2}s ease-in-out infinite`,animationDelay:`${e*.15}s`}},e))})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(H0,{}),onClick:()=>e(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`爆款复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>u(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box video-container`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:he?.material?.materialVideoUrl?`pointer`:`default`,position:`relative`},onClick:()=>he?.material?.materialVideoUrl&&Me(he.material.materialVideoUrl,`video`),children:he?.material?.materialVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:v9(he.material.materialVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`contain`}}),(0,$.jsx)(`div`,{className:`video-overlay`,children:(0,$.jsx)(M6,{style:{fontSize:48,color:`#fff`,opacity:.9}})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:he?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>he?.material?.materialImageUrl&&Me(he.material.materialImageUrl,`image`),children:he?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:v9(he.material.materialImageUrl),alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),(0,$.jsx)(`div`,{style:{margin:`20px 0`,height:1,background:`linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent)`,borderRadius:.5}}),he?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Me(he.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${he.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),he?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsxs)(`div`,{className:`medio_box video-container`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`,position:`relative`},onClick:()=>Me(he.finalVideoUrl,`video`,!0),children:[(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${he.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}),(0,$.jsx)(`div`,{className:`video-overlay`,children:(0,$.jsx)(M6,{style:{fontSize:48,color:`#fff`,opacity:.9}})})]})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(a_,{activeKey:xe,onChange:Se,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:Le.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(M2,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(_9,{style:{color:`#475569`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:he?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:v9(he.material.materialVideoUrl),style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(_9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:10,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:he?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:v9(he.material.materialImageUrl),alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`原产品名称:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Le[0]?.input?.payload?.sourceProjectName||`-`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`自有产品名称:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Le[0]?.input?.payload?.targetProjectName||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`产品卖点:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Le[0]?.input?.payload?.coreContentPoint||`-`})]})]})]}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(_9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(yV,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)($Q,{}),onClick:()=>We(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(X,{onClick:()=>{Re.current=!0,Se(t=>t.filter(t=>t!==String(e.childId))),Je(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[he.finalImageUrl?(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${he.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)($Q,{}),onClick:()=>Xe(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),!Fe&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{I(!F),R(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(o8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(_9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:k.video?.find(e=>e.id===j)?.name||`选择引擎`})]}),F&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(_9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:k.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{M(e.id),ne({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(U)||ee(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(W)||te(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(V)||H(e.supportedDurations?.[0]||5),I(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:j===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:j===e.id?600:500,color:j===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{let e=Le[1]?.input?.payload?.videoConfig||Le[1]?.input?.payload?.video_config;if(e){let t=e?.engineId||e?.engine_id,n=k.video?.find(e=>String(e.id)===String(t));n&&(M(n.id),ne({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]})),ee(e?.aspectRatio||e?.aspect_ratio||`16:9`),te(e?.resolution||`480p`),H(e?.duration||5)}R(!L),I(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(b3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(_9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[U,` · `,V,`s · `,W]})]}),L&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(_9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:G.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>ee(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:U===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:U===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${U===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:U===e?`#6366f1`:`#6b7280`,fontWeight:U===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(_9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(V-Math.min(...G.durations))/(Math.max(...G.durations)-Math.min(...G.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...G.durations),max:Math.max(...G.durations),value:V,onChange:e=>H(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:V}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(_9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:G.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>te(e),style:{flex:1,height:42,borderRadius:6,border:W===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:W===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:W===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(kw,{title:(i?.credits||0){if((i?.credits||0)t.filter(t=>t!==String(e.childId))),Ze(e.id)},disabled:e.status!==`completed`||(i?.credits||0){let e=Le[1]?.input?.payload?.videoConfig||Le[1]?.input?.payload?.video_config,t=e?.engineId||e?.engine_id,n=t?(k.video||[]).find(e=>String(e.id)===String(t))?.name:``;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`引擎:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:n||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`比例:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.aspectRatio||e?.aspect_ratio||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`分辨率:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.resolution||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`时长:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.duration||`-`})]})]})})()})}),(0,$.jsxs)(yV,{style:{marginTop:16,gap:12,width:`100%`,flexWrap:`wrap`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)($Q,{}),onClick:()=>We(he?.videoGeneration?.promptSchema,`video`,e.id,he?.videoGeneration?.schemaConfigSnapshot),style:{flex:`0 0 auto`,minWidth:160,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!he?.videoGeneration?.promptSchema||!he?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),Fe&&(0,$.jsx)(kw,{title:`LLM积分由服务端按当前功能场景直接消费`,placement:`top`,children:(0,$.jsx)(X,{type:`default`,onClick:()=>{let t=Le[1]?.input?.payload?.videoConfig||Le[1]?.input?.payload?.video_config;if(t){let e=t?.engineId||t?.engine_id,n=k.video?.find(t=>String(t.id)===String(e));n&&(M(n.id),ne({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]})),ee(t?.aspectRatio||t?.aspect_ratio||`16:9`),te(t?.resolution||`480p`),H(t?.duration||5)}E(String(e.id)),w(!0)},style:{flex:`0 0 auto`,minWidth:160,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500},disabled:e.status===`processing`||Le[2]?.status===`processing`,children:`重新生成视频提词`})}),(0,$.jsx)(kw,{title:(i?.credits||0){let t=Ue();if((i?.credits||0)t.filter(t=>t!==String(e.childId))),Qe(e.id,e.engineId)},type:`primary`,style:{flex:`1 0 auto`,minWidth:140,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`||(i?.credits||0){let e=Ue();if((i?.credits||0){let e=`https://ceshi.apiforeign.minzhongzc.com${he?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(EG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:d===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:a,onCancel:()=>{y||o(!1)},footer:[(0,$.jsx)(X,{onClick:()=>o(!1),disabled:y,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:Ge,loading:y,disabled:y,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:`80%`,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:d===`image`?(0,$.jsx)(Fce,{value:s,onChange:e=>c(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:600,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(g9,{value:p,schemaConfigSnapshot:h,onChange:m})})}),(0,$.jsxs)(EG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:l,onCancel:()=>u(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(JU,{placeholder:`搜索产品名称`,value:pe,onChange:e=>me(e.target.value),onPressEnter:Ve,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(X,{type:`primary`,onClick:Ve,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(iQ,{columns:[{title:`产品名称`,dataIndex:`targetProjectName`,key:`targetProjectName`,align:`center`},{title:`状态`,dataIndex:`status`,key:`status`,align:`center`,render:(e,t)=>{let n=e,r=t.current_step_code||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,align:`center`,render:e=>{if(!e)return`-`;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}},{title:`操作`,key:`action`,align:`center`,render:(t,n)=>(0,$.jsx)(`button`,{onClick:()=>{u(!1),e(`/initial/${n.id}/initialinfo?flow_version=${n.flowVersion===`v2`?`v2`:`v1`}`)},style:{color:`#6366f1`,textDecoration:`none`,fontSize:12,border:`none`,background:`rgba(99, 102, 241, 0.08)`,padding:`4px 12px`,borderRadius:8,cursor:`pointer`,transition:`all 0.2s`,fontWeight:500},children:`查看详情`})}],dataSource:q,rowKey:`id`,pagination:{current:se,pageSize:le,total:de,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:Be},style:{fontSize:13},scroll:{y:350}})]}),(0,$.jsx)(EG,{open:Ce,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Ne,width:800,footer:ke?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(F1,{}),onClick:Pe,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}):null,centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:De===`image`?(0,$.jsx)(`img`,{src:Te.startsWith(`http`)?Te:`https://ceshi.apiforeign.minzhongzc.com${Te}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:je,src:Te.startsWith(`http`)?Te:`https://ceshi.apiforeign.minzhongzc.com${Te}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})}),(0,$.jsx)(EG,{open:C,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#6366f1`,letterSpacing:.4},children:`重新生成视频提词`})]}),onCancel:()=>w(!1),width:400,footer:null,centered:!0,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(zC,{value:j,onChange:e=>{let t=k.video?.find(t=>t.id===e);t&&(M(t.id),ne({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]}),t.supportedRatios?.includes(U)||ee(t.supportedRatios?.[0]||`16:9`),t.supportedResolutions?.includes(W)||te(t.supportedResolutions?.[0]||`720p`),t.supportedDurations?.includes(V)||H(t.supportedDurations?.[0]||5))},style:{width:`100%`,borderRadius:8},options:k.video?.map(e=>({value:e.id,label:e.name})),placeholder:`请选择引擎`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:G.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>ee(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:U===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:U===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${U===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:U===e?`#6366f1`:`#6b7280`,fontWeight:U===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(V-Math.min(...G.durations))/(Math.max(...G.durations)-Math.min(...G.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...G.durations),max:Math.max(...G.durations),value:V,onChange:e=>H(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:V}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:G.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>te(e),style:{flex:1,height:42,borderRadius:8,border:W===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:W===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:W===e?`#fff`:`#4b5563`},children:e})},e))})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:16},children:[(0,$.jsx)(X,{onClick:()=>w(!1),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500},children:`取消`}),(0,$.jsx)(X,{onClick:()=>{if(!j){Z.warning(`请选择视频引擎`);return}tt(T),w(!1)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:!j,children:`确认生成`})]})]})})]})}var Rce={not_required:{label:`无需单独分析`,color:`default`,active:!1,terminal:!0,failure:!1},pending:{label:`等待分析`,color:`default`,active:!0,terminal:!1,failure:!1},processing:{label:`分析中`,color:`processing`,active:!0,terminal:!1,failure:!1},completed:{label:`分析完成`,color:`success`,active:!1,terminal:!0,failure:!1},failed:{label:`分析失败`,color:`error`,active:!1,terminal:!0,failure:!0}},zce={pending:{label:`等待切割`,color:`default`,active:!0,terminal:!1,failure:!1},processing:{label:`切割中`,color:`processing`,active:!0,terminal:!1,failure:!1},retry_waiting:{label:`等待切割重试`,color:`warning`,active:!0,terminal:!1,failure:!1},completed:{label:`切割完成`,color:`success`,active:!1,terminal:!0,failure:!1},failed:{label:`切割失败`,color:`error`,active:!1,terminal:!0,failure:!0}},Bce={pending_analysis:{label:`等待分析`,color:`default`,active:!0,terminal:!1,failure:!1},analyzing:{label:`分析中`,color:`processing`,active:!0,terminal:!1,failure:!1},analysis_completed:{label:`分析完成`,color:`blue`,active:!1,terminal:!1,failure:!1},analysis_failed:{label:`分析失败`,color:`error`,active:!1,terminal:!0,failure:!0},splitting:{label:`拆镜中`,color:`processing`,active:!0,terminal:!1,failure:!1},split_completed:{label:`拆镜完成`,color:`success`,active:!1,terminal:!0,failure:!1},partial_failed:{label:`部分失败`,color:`warning`,active:!1,terminal:!0,failure:!0},failed:{label:`失败`,color:`error`,active:!1,terminal:!0,failure:!0},deleted:{label:`已删除`,color:`default`,active:!1,terminal:!0,failure:!1}},Vce=new Set([`pending`,`waiting_user`,`processing`]),y9=e=>String(e||``).trim().toLowerCase(),b9=(e,t,n)=>({key:e,...t[e]||{label:e||n,color:`default`,active:!1,terminal:!1,failure:!1}}),x9=e=>b9(y9(e),Rce,`未知分析状态`),S9=e=>b9(y9(e),zce,`未知切割状态`),C9=e=>b9(y9(e),Bce,`未知任务状态`),Hce=e=>{let t=y9(e.analysisStatus||e.analysis_status),n=y9(e.splitStatus||e.split_status),r=y9(e.moduleProjectStatus||e.module_project_status);return x9(t).active||S9(n).active||Vce.has(r)},Uce=e=>{let t=C9(e);return(0,$.jsx)(_Q,{color:t.color,children:t.label})};function Wce(){let{message:e}=ex.useApp(),t=Ye(),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)([]),[v,y]=(0,S.useState)(1),[b,x]=(0,S.useState)(10),[C,w]=(0,S.useState)(0),[T,E]=(0,S.useState)(``),D=(0,S.useRef)(null),O=(0,S.useRef)(null),k=(0,S.useCallback)(()=>{n&&n.startsWith(`blob:`)&&URL.revokeObjectURL(n),r(``),a(``),s(``),p(0),d(``)},[n]),A=async t=>{if(!t.type.startsWith(`video/`))return s(`请选择视频文件`),!1;if(t.size>100*1024*1024)return s(`视频文件大小不能超过 100MB`),!1;let n=await new Promise(e=>{let n=document.createElement(`video`);n.preload=`metadata`,n.onloadedmetadata=()=>{e(n.duration),URL.revokeObjectURL(n.src)},n.onerror=()=>{e(0)},n.src=URL.createObjectURL(t)});if(n>190)return s(`视频时长不能超过 3分钟`),!1;k(),h(!0);try{let i=await bae(t,n);r(i.url),a(i.resource_id||``),s(``),e.success(`视频上传成功`)}catch{s(`视频上传失败,请重试`),e.error(`视频上传失败`)}finally{h(!1)}return!1},j=(0,S.useCallback)(()=>{D.current&&p(D.current.duration)},[]),M=async()=>{if(!n||!u.trim()){e.warning(`请先上传视频并输入产品名称`);return}h(!0);try{await Yae({video_url:n,video_duration_seconds:f,video_resource_id:i||void 0,title:u.trim(),idempotency_key:`shot_${Date.now()}`});let r=await F5(1,20,T);e.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${r.items[0].id}/removeinfo`)},3e3),k()}catch(t){let n=``;t instanceof Error?n=t.message:typeof t==`string`&&(n=t),e.error(n||`任务创建失败,请重试`)}finally{h(!1)}},N=(0,S.useCallback)(async(t,n,r)=>{try{let e=await F5(t,n,r);_(e.items||[]),w(e.total||0),y(t),x(n)}catch{e.error(`获取列表失败`)}},[]),P=(e,t)=>{N(e,t,T)},F=()=>{N(1,10,T)},I=()=>{l(!0),N(1,10,T)},L=g.some(e=>C9(e.status).active);return(0,S.useEffect)(()=>{if(!c||!L)return;let e=()=>{document.visibilityState===`visible`&&N(v,b,T)},t=window.setInterval(e,3e4);return document.addEventListener(`visibilitychange`,e),()=>{window.clearInterval(t),document.removeEventListener(`visibilitychange`,e)}},[v,N,L,c,b,T]),(0,$.jsx)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,overflow:`auto`,background:`transparent`,position:`relative`,padding:`20px 32px`},children:(0,$.jsxs)(`div`,{style:{maxWidth:1200,margin:`0 auto`,position:`relative`,zIndex:10},children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24,padding:`16px 24px`,borderRadius:16,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`,flexWrap:`wrap`,gap:12},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`})]})}),(0,$.jsx)(X,{type:`primary`,ghost:!0,icon:(0,$.jsx)(wV,{}),onClick:I,style:{borderRadius:10,padding:`6px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`创作记录`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:720,margin:`0 auto`},children:[o&&(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(239, 68, 68, 0.2)`,borderRadius:12,padding:`14px 20px`,marginBottom:24,color:`#ef4444`,fontSize:14,textAlign:`center`,fontWeight:500},children:o}),!n&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(V1.Dragger,{accept:`video/*`,beforeUpload:A,showUploadList:!1,disabled:m,style:{background:m?`rgba(243, 244, 246, 0.3)`:`transparent`,border:`2px dashed ${m?`rgba(209, 213, 219, 0.5)`:`rgba(99, 102, 241, 0.3)`}`,borderRadius:24,padding:`56px 20px`,cursor:m?`not-allowed`:`pointer`,margin:0},children:m?(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,border:`4px solid #6366f1`,borderTopColor:`transparent`,borderRadius:`50%`,animation:`spin 1s linear infinite`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#6366f1`,margin:`0 0 8px 0`,fontWeight:600},children:`上传中...`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`请稍候,视频正在上传`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{width:100,height:100,margin:`0 auto 20px`,background:`linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%)`,borderRadius:24,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(W2,{style:{fontSize:40,color:`#6366f1`}})}),(0,$.jsx)(`p`,{style:{fontSize:16,color:`#1e293b`,margin:`0 0 8px 0`,fontWeight:600},children:`点击或拖拽到此上传视频文件`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:0},children:`支持 MP4、MOV 格式视频,最大支持 100MB 的文件,支持上传 3 分钟内的视频`})]})})]}),n&&(0,$.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%)`,backdropFilter:`blur(20px)`,borderRadius:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,overflow:`hidden`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsxs)(`div`,{style:{borderRadius:22,background:`#ffffff`,padding:`24px`,position:`relative`,zIndex:1},children:[(0,$.jsx)(AG,{title:`确定要删除吗?`,okText:`确定`,cancelText:`取消`,onConfirm:k,children:(0,$.jsx)(`button`,{style:{position:`absolute`,top:20,right:20,width:36,height:36,border:`1px solid rgba(99, 102, 241, 0.2)`,background:`rgba(99, 102, 241, 0.05)`,borderRadius:10,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:16,color:`#6366f1`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`,e.currentTarget.style.borderColor=`rgba(239, 68, 68, 0.3)`,e.currentTarget.style.color=`#ef4444`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.05)`,e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`,e.currentTarget.style.color=`#6366f1`},children:`🗑️`})}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginBottom:20},children:(0,$.jsx)(`video`,{ref:D,src:`https://ceshi.apiforeign.minzhongzc.com${n}`,controls:!0,onLoadedMetadata:j,style:{maxWidth:`100%`,maxHeight:320,borderRadius:12,background:`#000`,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`}})}),(0,$.jsxs)(`div`,{style:{marginBottom:24},children:[(0,$.jsxs)(`label`,{style:{display:`block`,fontSize:14,fontWeight:500,color:`#334155`,marginBottom:8},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(JU,{placeholder:`请输入产品名称`,value:u,onChange:e=>d(e.target.value),style:{width:`100%`,height:44,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.2)`}})]}),(0,$.jsx)(`div`,{style:{textAlign:`center`,marginTop:16},children:(0,$.jsx)(`button`,{onClick:M,disabled:!n||!u.trim()||m,style:{padding:`14px 56px`,background:n&&u.trim()&&!m?`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`:`#e2e8f0`,color:`white`,border:`none`,borderRadius:12,fontSize:15,fontWeight:600,cursor:n&&u.trim()&&!m?`pointer`:`not-allowed`,boxShadow:n&&u.trim()&&!m?`0 6px 20px rgba(99, 102, 241, 0.3)`:`none`,display:`inline-flex`,alignItems:`center`,gap:10,transition:`all 0.3s ease`},onMouseEnter:e=>{n&&u.trim()&&!m&&(e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 8px 25px rgba(99, 102, 241, 0.4)`)},onMouseLeave:e=>{n&&u.trim()&&!m&&(e.currentTarget.style.transform=`traslnateY(0)`,e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.3)`)},children:(0,$.jsx)(`span`,{children:m?`创建中...`:`创建`})})})]})]}),(0,$.jsx)(`canvas`,{ref:O,style:{display:`none`}}),(0,$.jsxs)(EG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`创作记录`})]}),open:c,onCancel:()=>l(!1),width:850,footer:null,style:{borderRadius:20},styles:{body:{height:580,display:`flex`,flexDirection:`column`,padding:0},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,margin:`16px 24px`,flexShrink:0},children:[(0,$.jsx)(JU,{placeholder:`搜索产品名称`,value:T,onChange:e=>E(e.target.value),onPressEnter:F,style:{width:220,borderRadius:10,marginRight:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(X,{type:`primary`,onClick:F,style:{borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:`0 24px 24px`},children:(0,$.jsx)(`div`,{style:{background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(10px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.06)`},children:(0,$.jsx)(iQ,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`状态`,dataIndex:`status`,key:`status`,render:e=>Uce(e)},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:n=>(0,$.jsxs)(yV,{children:[(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`}),(0,$.jsx)(AG,{title:`确认删除这个拆镜项目吗?`,onConfirm:async()=>{try{await foe(n.id),e.success(`删除成功`),N(v,b,T)}catch{e.error(`删除失败`)}},children:(0,$.jsx)(X,{type:`text`,danger:!0,style:{color:`#ef4444`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(239, 68, 68, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`},children:`删除`})})]})}],dataSource:g,rowKey:`id`,pagination:{current:v,pageSize:b,total:C,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:P,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:300},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})})]})]})]})})}var Gce=c(o(((e,t)=>{(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof l==`function`&&l;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=Error(`Cannot find module '`+o+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return n[o].exports}for(var a=typeof l==`function`&&l,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` +\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new U(4,4,8,4,V),new U(4,5,16,8,V),new U(4,6,32,32,V),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return G(e,t,g,15,8,0)},n.deflateInit2=G,n.deflateReset=te,n.deflateResetKeep=W,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function H(e){var t;for(t=0;t>1;1<=n;n--)W(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],W(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,W(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?ie(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),te(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),{Text:Kce}=Q,w9=e=>e?/^(https?:|data:|blob:)/i.test(e)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``,qce=e=>e===`video`?(0,$.jsx)(L8,{}):e===`audio`?(0,$.jsx)(Z0,{}):(0,$.jsx)(C6,{}),Jce=e=>e===`video`?`视频`:e===`audio`?`音频`:`图片`,T9=e=>{let t=Number(e||0);return t>=1024*1024?`${(t/1024/1024).toFixed(1)} MB`:t>=1024?`${(t/1024).toFixed(1)} KB`:`${t} B`},E9=()=>{let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(1),[o,s]=(0,S.useState)(10),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)([]),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(new Set),[g,_]=(0,S.useState)(null),[v,y]=(0,S.useState)(!1),b=(0,S.useMemo)(()=>u.flatMap(e=>e.items||[]),[u]),x=(0,S.useCallback)(async()=>{l(!0);try{let t=await K5({resourceType:e||void 0,keyword:n||void 0,page:i,pageSize:o,scene:`record`});d(t.groups||[]),p(t.totalDays||0),h(new Set)}catch(e){Z.error(e?.message||`加载历史上传素材失败`),d([]),p(0)}finally{l(!1)}},[n,i,o,e]);(0,S.useEffect)(()=>{x()},[x]);let C=e=>{h(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},w=()=>{let e=b.map(e=>e.id);h(t=>t.size===e.length?new Set:new Set(e))},T=async t=>{let r=(t.page||1)+1;try{let i=await q5(t.generatedDate,{resourceType:e||void 0,keyword:n||void 0,page:r,pageSize:10,scene:`record`});d(e=>e.map(e=>e.generatedDate===t.generatedDate?{...e,page:r,items:[...e.items,...i.items||[]]}:e))}catch(e){Z.error(e?.message||`加载更多失败`)}},E=e=>{EG.confirm({title:`确认删除历史上传素材`,content:`确定删除 ${e.fileName||e.id} 吗?删除后会释放上传容量,并在提交成功后清理真实文件。`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{try{await l5(e.resourceUrl),Z.success(`删除成功`),x()}catch(e){Z.error(e?.message||`删除失败`)}}})},D=()=>{if(m.size===0){Z.warning(`请先选择要删除的上传素材`);return}if(m.size>30){Z.warning(`一次最多删除 30 条上传素材`);return}let e=Array.from(m);EG.confirm({title:`确认批量删除历史上传素材`,content:`确定删除选中的 ${e.length} 条上传素材吗?删除后会释放上传容量,并在提交成功后清理真实文件。`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{try{let t=await Eoe(e);Z.success(`删除成功,释放 ${T9(t?.releasedSizeBytes||0)}`),x()}catch(e){Z.error(e?.message||`批量删除失败`)}}})},O=e=>{let t=document.createElement(`a`);t.href=w9(e.resourceUrl),t.download=e.fileName||e.id,document.body.appendChild(t),t.click(),document.body.removeChild(t)},k=(e,t=`card`)=>{let n=w9(e.previewUrl||e.displayUrl||e.resourceUrl),r=t===`card`?{width:`100%`,height:130,objectFit:`cover`}:{width:`100%`,maxHeight:620,objectFit:`contain`};return e.resourceType===`image`?(0,$.jsx)(`img`,{src:n,alt:e.fileName||e.id,style:r}):e.resourceType===`video`?(0,$.jsx)(`video`,{src:n,controls:t===`preview`,muted:t===`card`,style:r}):(0,$.jsx)(v7,{src:n,size:t===`card`?`small`:`normal`})};return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(yV,{size:8,wrap:!0,children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14,marginRight:4},children:`媒体类型:`}),(0,$.jsx)(X,{type:e===``?`primary`:`default`,onClick:()=>{t(``),a(1)},style:{borderRadius:8,fontWeight:600,borderColor:e===``?`transparent`:`#e2e8f0`,color:e===``?`#fff`:`#64748b`},children:`全部`}),(0,$.jsx)(X,{type:e===`image`?`primary`:`default`,onClick:()=>{t(`image`),a(1)},style:{borderRadius:8,fontWeight:600,borderColor:e===`image`?`transparent`:`#e2e8f0`,color:e===`image`?`#fff`:`#64748b`},children:`图片`}),(0,$.jsx)(X,{type:e===`video`?`primary`:`default`,onClick:()=>{t(`video`),a(1)},style:{borderRadius:8,fontWeight:600,borderColor:e===`video`?`transparent`:`#e2e8f0`,color:e===`video`?`#fff`:`#64748b`},children:`视频`}),(0,$.jsx)(X,{type:e===`audio`?`primary`:`default`,onClick:()=>{t(`audio`),a(1)},style:{borderRadius:8,fontWeight:600,borderColor:e===`audio`?`transparent`:`#e2e8f0`,color:e===`audio`?`#fff`:`#64748b`},children:`音频`})]}),(0,$.jsxs)(yV,{size:8,wrap:!0,children:[(0,$.jsx)(JU.Search,{allowClear:!0,value:n,placeholder:`搜索文件名或URL`,onChange:e=>r(e.target.value),onSearch:()=>{a(1),x()},style:{width:240,borderRadius:8},enterButton:!0}),v?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{onClick:w,style:{borderRadius:8,fontWeight:600,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#334155`},children:m.size&&m.size===b.length?`取消全选`:`全选`}),(0,$.jsxs)(X,{danger:!0,onClick:D,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #ef4444, #dc2626)`,border:`none`,color:`#fff`},children:[`批量删除 `,m.size>0&&`(${m.size})`]}),(0,$.jsx)(X,{onClick:()=>{y(!1),h(new Set)},style:{borderRadius:8,fontWeight:600,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`},children:`取消选择`})]}):(0,$.jsx)(X,{type:`primary`,onClick:()=>y(!0),style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`批量操作`})]})]}),(0,$.jsx)(tG,{spinning:c,children:u.length===0?(0,$.jsx)(lC,{description:`暂无可展示的历史上传素材`,style:{padding:`60px 0`}}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:28},children:u.map(e=>(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{fontSize:18,fontWeight:700,color:`#1e293b`},children:e.generatedDate}),(0,$.jsxs)(Kce,{type:`secondary`,children:[`共 `,e.total,` 个素材`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`flex-start`},children:e.items.map(e=>{let t=m.has(e.id);return(0,$.jsxs)(`div`,{style:{width:`17%`,minWidth:240,margin:16,border:t?`2px solid #8b5cf6`:`1px solid #e2e8f0`,borderRadius:16,overflow:`hidden`,background:`#fff`,boxShadow:`0 10px 24px rgba(15,23,42,0.06)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,background:`#f1f5f9`,cursor:v?`pointer`:`default`},onClick:()=>v&&C(e.id),children:[k(e),v&&(0,$.jsx)(pR,{checked:t,onChange:()=>C(e.id),style:{position:`absolute`,top:10,left:10,background:`#fff`,borderRadius:6,padding:4}}),(0,$.jsx)(_Q,{color:`purple`,icon:qce(e.resourceType),style:{position:`absolute`,top:10,right:10,margin:0},children:Jce(e.resourceType)})]}),(0,$.jsxs)(`div`,{style:{padding:12,paddingTop:0},children:[(0,$.jsxs)(yV,{size:4,wrap:!0,style:{marginTop:8},children:[(0,$.jsx)(_Q,{style:{margin:0},children:e.moduleLabel}),(0,$.jsx)(_Q,{style:{margin:0},children:T9(e.fileSizeBytes)}),e.durationSeconds?(0,$.jsxs)(_Q,{style:{margin:0},children:[Number(e.durationSeconds).toFixed(1),`s`]}):null]}),(0,$.jsxs)(yV,{style:{marginTop:12},children:[(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(EU,{}),onClick:()=>_(e),children:`预览`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(F1,{}),onClick:()=>O(e),children:`下载`}),(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(jQ,{}),onClick:()=>E(e),children:`删除`})]})]})]},e.id)})}),e.items.lengthT(e),children:`加载更多`})})]},e.generatedDate))})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:24},children:(0,$.jsx)(PW,{current:i,pageSize:o,total:f,showSizeChanger:!0,pageSizeOptions:[5,10],onChange:(e,t)=>{a(e),s(t)}})}),(0,$.jsx)(EG,{open:!!g,title:`预览`,footer:null,width:900,centered:!0,destroyOnHidden:!0,onCancel:()=>_(null),children:g?k(g,`preview`):null})]})},{Search:Yce}=JU,{Text:Xce}=Q,Zce=e=>{let t=S.useRef(!1);(0,S.useEffect)(()=>{if(t.current)return;let n=()=>{t.current||(t.current=!0,e?.())};return document.readyState===`complete`?n():window.addEventListener(`load`,n),()=>{window.removeEventListener(`load`,n)}},[e])},Qce=()=>{let[e,t]=(0,S.useState)(!1);Zce(()=>{t(!0)});let[n]=On(),r=Ye(),[i,a]=(0,S.useState)(n.get(`filterType`)===`private_portrait`?`private_portrait`:n.get(`filterType`)===`upload_resource`?`upload_resource`:`project`),[o,s]=(0,S.useState)(`video`),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)({page:1,pageSize:10}),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(new Set),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)(null),C=S.createRef(),[w,T]=(0,S.useState)(``),[E,D]=(0,S.useState)(``),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),[M,N]=(0,S.useState)([[]]),[P,F]=(0,S.useState)([``]),[I,L]=(0,S.useState)([]),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(0),[H,U]=(0,S.useState)([void 0]),[ee,W]=(0,S.useState)(new Map),[te,G]=(0,S.useState)(``),[ne,K]=(0,S.useState)(new Map),re=(0,S.useRef)(new Map);(0,S.useEffect)(()=>()=>{re.current.forEach(e=>clearTimeout(e)),re.current.clear()},[]);let[ie,ae]=(0,S.useState)(1),[q,oe]=(0,S.useState)(10),[se,ce]=(0,S.useState)([!1]),[le,ue]=(0,S.useState)(`new`),[de,fe]=(0,S.useState)([]),[pe,me]=(0,S.useState)(!1),[he,ge]=(0,S.useState)([]),[_e,ve]=(0,S.useState)({}),[ye,be]=(0,S.useState)(`2`),[xe,Se]=(0,S.useState)(``),[Ce,we]=(0,S.useState)([]),[Te,Ee]=(0,S.useState)(!1),[De,Oe]=(0,S.useState)(!1),[ke,Ae]=(0,S.useState)([]),[je,Me]=(0,S.useState)(0),[Ne,Pe]=(0,S.useState)(1),[Fe,Ie]=(0,S.useState)(10),[Le,Re]=(0,S.useState)(!1),[ze,Be]=(0,S.useState)(``),[Ve,He]=(0,S.useState)(!1),[Ue,We]=(0,S.useState)(new Set),Ge=e=>{if(!e)return null;try{let t=new URL(e).searchParams.get(`exp`);return t?parseInt(t,10):null}catch{try{let t=e.indexOf(`?`);if(t!==-1){let n=e.substring(t+1),r=new URLSearchParams(n).get(`exp`);if(r)return parseInt(r,10)}return null}catch{return null}}},Ke=e=>{let t=Ge(e);return t?Math.floor(Date.now()/1e3)>t:!1},qe=(e,t=!1)=>{let n=`https://ceshi.apiforeign.minzhongzc.com`,r=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${r}${N7(e)}`:`${r}/${e.startsWith(`/`)?e.slice(1):e}`},Je=async e=>{if(x(e),y(!0),window.dispatchEvent(new Event(`previewOpen`)),e.videoUrl&&e.videoUrl.trim()&&!e.imagePx)try{let t=await _t(e.videoUrl);t&&x(e=>e&&{...e,imagePx:t})}catch{}},Xe=()=>{C.current&&(C.current.pause(),C.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),y(!1)},Ze=e=>e.generatedResourceId||e.id,Qe=e=>!!e.generatedResourceId,$e=e=>{if(!e)return!0;let t=e.match(/^(\d+)x(\d+)$/);if(!t)return!0;let n=parseInt(t[1],10),r=parseInt(t[2],10),i=n/r;return n>=r?n>=480&&n<=2560&&r>=270&&r<=1440&&i>=1.775&&i<=1.784:n>=270&&n<=1440&&r>=480&&r<=2560&&i>=.555&&i<=.564},et=e=>{We(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},tt=()=>{let e=c.flatMap(e=>e.items.map(e=>Ze(e)));Ue.size===e.length?We(new Set):We(new Set(e))},nt=async()=>{if(Ue.size===0){Z.warning(`请先选择要下载的媒体`);return}if(Ue.size>30){Z.warning(`最多只能单次下载30个文件`);return}let e=[];c.forEach(t=>{t.items.forEach(t=>{Ue.has(Ze(t))&&e.push(t)})});let t=new Gce.default,n=`https://ceshi.apiforeign.minzhongzc.com`,r=t.folder(`downloads`),i=!1,a=0;Z.loading({content:`下载中,请稍候...`,key:`downloadProgress`});for(let t of e){let e=`${n}${t.videoUrl||t.imageUrl}`,o=((t.videoUrl||t.imageUrl).split(`/`).pop()||`file_${Date.now()}`).split(`?`)[0];try{let t=await fetch(e);if(!t.ok)throw Error(`Network response was not ok`);let n=await t.blob();r?.file(o,n),a++}catch{i=!0;break}}if(i){Z.destroy(`downloadProgress`),Z.info(`由于跨域限制,将逐个下载文件`),e.forEach((e,t)=>{setTimeout(()=>{let t=`${n}${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=t,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},t*500)});return}let o=await t.generateAsync({type:`blob`}),s=document.createElement(`a`);s.href=URL.createObjectURL(o),s.download=`downloads_${Date.now()}.zip`,s.click(),URL.revokeObjectURL(s.href),Z.destroy(`downloadProgress`),Z.success(`下载完成,共 ${a} 个文件`),He(!1),We(new Set)},rt=async()=>{if(Ue.size===0){Z.warning(`请先选择要删除的媒体`);return}if(Ue.size>30){Z.warning(`最多只能单次删除30个文件`);return}let e=c.flatMap(e=>e.items.filter(e=>Ue.has(Ze(e)))),t=``;t=i===`shot_replicate`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:e.map((e,t)=>(0,$.jsxs)(`li`,{style:{marginBottom:4,color:`#334155`},children:[e.shotReplicateProjectTitle,`— —`,e.shotSegmentLabel]},t))}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]}):i===`hot_opening_replicate`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`爆款开头复刻中以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:e.map((e,t)=>(0,$.jsx)(`li`,{style:{marginBottom:4,color:`#334155`},children:e.moduleProjectTitle},t))}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]}):`确定删除选中的 ${Ue.size} 条记录吗?`,EG.confirm({title:`确认删除`,content:t,okText:`确定删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:async()=>{let e=``;i===`project`?e=`generation_record`:i===`creation`?e=`chat_task`:i===`hot_opening_replicate`?e=`hot_opening_replicate`:i===`shot_replicate`&&(e=`shot_replicate`);let t=[];c.forEach(e=>{e.items.forEach(e=>{Ue.has(Ze(e))&&t.push(e)})});let n=[];e===`generation_record`||e===`chat_task`?n=t.map(e=>e.id):e===`hot_opening_replicate`?n=t.map(e=>e.moduleProjectId):e===`shot_replicate`&&(n=t.map(e=>e.shotSegmentId));let r={history_source:e,ids:n};try{await W5(r),Z.success(`删除成功`),He(!1),We(new Set),d(e=>({...e,page:1})),vt()}catch{Z.error(`删除失败,请重试`)}}})},it=async()=>{Ee(!0);try{let e=await M5({page:1,pageSize:100});we(e.data?.data||e.data||[])}catch{}finally{Ee(!1)}},at=()=>{if(Ue.size===0){Z.warning(`请先选择要推送的媒体`);return}N([[]]),F([``]),U([void 0]),be(`2`),Se(``),it(),j(!0)},ot=()=>{if(!b)return;let e=Ze(b);We(new Set([e])),N([[]]),F([``]),U([void 0]),W(new Map),G(``),be(`2`),Se(``),it(),j(!0)},st=async(e,t)=>{z(!0);try{let n=await j5({page:e,page_size:t});L(n?.data||n||[]),V(n.pagination.total||0)}catch{L([]),V(0)}finally{z(!1)}},ct=async()=>{me(!0);try{let[e,t]=await Promise.all([Coe(),H5()]);fe(e?.data||[]);let n=t?.data||[],r={};n.forEach(e=>{r[e.openType]=e.typeName}),ve(r)}catch{fe([]),ve({})}finally{me(!1)}},lt=async()=>{Re(!0);try{let e=await hoe({status:ze||void 0,page:Ne,pageSize:Fe});Ae(e?.data||e||[]),Me(e.pagination?.total||e.total||0)}catch{Ae([]),Me(0)}finally{Re(!1)}},ut=()=>{Oe(!0),Pe(1),Be(``),lt()},dt=()=>{Pe(1),lt()},ft=(e,t)=>{Pe(e),Ie(t),lt()},pt=async()=>{if(Ue.size===0){Z.warning(`请先选择要推送的媒体`);return}let e=new Map;c.forEach(t=>{t.items.forEach(t=>{let n=Ze(t);e.set(n,t)})});let t=[];if(le===`new`){let n=H.filter(e=>e!==void 0);if(n.length===0){Z.warning(`请先选择授权账户`);return}for(let r=0;re.accountId)||[];if(a.length===0){Z.warning(`第 ${r+1} 组授权账户未设置账户ID,已跳过`);continue}let o=new Map;for(let t of Ue){let n=e.get(t),r;n&&Qe(n)&&(r=`generated_resources`),o.has(r)||o.set(r,[]),o.get(r).push(t)}o.forEach((e,n)=>{t.push({advertiser_ids:a,resource_ids:e,oauth_id:i.value,source_model:n,is_pre_test:ye,pre_test_template:xe})})}}else{if(he.length===0){Z.warning(`请先选择历史账户`);return}for(let n of he){let r=new Map;for(let t of Ue){let n=e.get(t),a;a=n&&Qe(n)?`generated_resources`:i===`project`?`generation_records`:`chat_generation_tasks`,r.has(a)||r.set(a,[]),r.get(a).push(t)}r.forEach((e,r)=>{t.push({advertiser_ids:[n.advertiserId],resource_ids:e,oauth_id:String(n.oauthId),source_model:r,is_pre_test:ye,pre_test_template:xe})})}}k(!0);try{let e=await moe({tasks:t});e.errors?.length>0?Z.warning(e.message):e.code===0?Z.success(e.message):Z.error(e.message),He(!1),We(new Set),j(!1),N([[]]),F([``]),U([void 0]),ge([]),W(new Map),G(``),be(`2`),Se(``)}catch(e){Z.error(e.message||`批量推送失败`)}finally{k(!1)}},mt=async(e,t)=>{if(t.trim())try{let n=(await B5({filenames:[{source_id:e,file_name:t}]}))?.results?.find(t=>t.source_id===e)?.new_file_name||t;l(t=>t.map(t=>({...t,items:t.items.map(t=>Ze(t)===e?{...t,fileName:n}:t)}))),Z.success(`文件名更新成功`)}catch(e){Z.error(e.message||`文件名更新失败`)}},ht=async(e,t)=>{if(!(!t.trim()||e.length===0))try{let n=await B5({filenames:e.map(e=>({source_id:e,file_name:t}))}),r=new Map;n?.results?.forEach(e=>{e.success&&e.newFileName&&r.set(e.sourceId,e.newFileName)}),l(n=>{let i=new Set(e);return n.map(e=>({...e,items:e.items.map(e=>{let n=Ze(e);if(i.has(n)){let i=r.get(n)||t;return{...e,fileName:i}}return e})}))});let i=n?.successCount||0;Z.success(`已更新 ${i} 个文件名`)}catch(e){Z.error(e.message||`文件名更新失败`)}},gt=e=>{T(e)},_t=e=>new Promise(t=>{let n=document.createElement(`video`),r=`https://ceshi.apiforeign.minzhongzc.com`,i=e.startsWith(`/`)?e.slice(1):e;n.src=`${r.endsWith(`/`)?r.slice(0,-1):r}/${i}`,n.crossOrigin=`anonymous`,n.onloadedmetadata=()=>{let e=n.videoWidth,r=n.videoHeight;n.remove(),t(`${e}x${r}`)},n.onerror=()=>{n.remove(),t(``)},n.onabort=()=>{n.remove(),t(``)},setTimeout(()=>{n.remove(),t(``)},5e3)}),vt=()=>{if(i===`private_portrait`||i===`upload_resource`){h(!1),l([]);return}h(!0);let e=``;i===`project`?e=`generation_record`:i===`hot_opening_replicate`?e=`hot_opening_replicate`:i===`shot_replicate`&&(e=`shot_replicate`);let t=`?gen_type=${o}&page=${u.page}&page_size=${u.pageSize}`;if(e&&(t=`?gen_type=${o}&history_source=${e}&page=${u.page}&page_size=${u.pageSize}`),E&&E.trim()&&(t+=`&keyword=${encodeURIComponent(E.trim())}`),w){let t=`${w}?gen_type=${o}&page=${u.page}&page_size=${u.pageSize}`;e&&(t=`${w}?gen_type=${o}&history_source=${e}&page=${u.page}&page_size=${u.pageSize}`),E&&E.trim()&&(t+=`&keyword=${encodeURIComponent(E.trim())}`),T5(t).then(e=>{let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e.generatedDate,items:t,total:e.total,page:e.page}];n&&n[0].items.length>0?l(n):l([])}).catch(e=>{}).finally(()=>{h(!1)})}else w5(t).then(e=>{let t=Array.isArray(e)?e:e?.groups||[];t.forEach(e=>{e.page=1}),u.page===1?l(t):l(e=>[...e,...t]),p(e?.totalDays||0)}).catch(e=>{u.page===1&&l([])}).finally(()=>{h(!1)})};(0,S.useEffect)(()=>{vt()},[i,o,u.page,w]);let yt=()=>{m||d(e=>({...e,page:e.page+1}))},bt=async(e,t,n)=>{if(g.has(t))return;_(e=>new Set([...e,t]));let r=n+1,a=``;i===`project`?a=`generation_record`:i===`hot_opening_replicate`?a=`hot_opening_replicate`:i===`shot_replicate`&&(a=`shot_replicate`);let s=`${e}?gen_type=${o}&page=${r}&page_size=${u.pageSize}`;a&&(s=`${e}?gen_type=${o}&history_source=${a}&page=${r}&page_size=${u.pageSize}`),E&&E.trim()&&(s+=`&keyword=${encodeURIComponent(E.trim())}`);try{let t=(await T5(s)).items||[];t&&t.length>0&&l(n=>n.map(n=>n.generatedDate===e?{...n,items:[...n.items,...t],page:r}:n))}catch{}finally{_(e=>{let n=new Set(e);return n.delete(t),n})}};return(0,S.useEffect)(()=>{d(e=>({...e,page:1})),D(``)},[i,o]),(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsx)(hL,{activeKey:i,onChange:e=>{a(e),He(!1),We(new Set)},items:[{key:`project`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(pX,{}),` 项目记录`]})},{key:`creation`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(wV,{}),` 创作记录`]})},{key:`hot_opening_replicate`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(v8,{}),` 爆款复刻`]})},{key:`shot_replicate`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(M6,{}),` 拆镜复刻`]})},{key:`private_portrait`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(P8,{}),` 私域素材库`]})},{key:`upload_resource`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(j8,{}),` 历史素材`]})}],size:`middle`,style:{marginBottom:12}}),i===`private_portrait`?(0,$.jsx)(_ce,{}):i===`upload_resource`?(0,$.jsx)(E9,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:14,marginRight:4},children:`媒体类型:`}),(0,$.jsx)(X,{type:o===`video`?`primary`:`default`,onClick:()=>{s(`video`),He(!1),We(new Set)},style:{borderRadius:8,fontWeight:600,borderColor:o===`video`?`transparent`:`#e2e8f0`,color:o===`video`?`#fff`:`#64748b`},icon:(0,$.jsx)(L8,{}),children:`视频`}),(0,$.jsx)(X,{type:o===`image`?`primary`:`default`,onClick:()=>{s(`image`),He(!1),We(new Set)},style:{borderRadius:8,fontWeight:600,borderColor:o===`image`?`transparent`:`#e2e8f0`,color:o===`image`?`#fff`:`#64748b`},icon:(0,$.jsx)(C6,{}),children:`图片`})]}),(0,$.jsxs)(yV,{size:8,wrap:!0,children:[(0,$.jsx)(DB,{picker:`date`,value:w?(0,GE.default)(w):void 0,onChange:(e,t)=>gt(t||``),format:`YYYY-MM-DD`,style:{width:160,borderRadius:8,border:`1px solid #e2e8f0`},placeholder:`选择日期`,allowClear:!0}),(0,$.jsx)(JU.Search,{placeholder:`搜索提示词`,allowClear:!0,value:E,onChange:e=>{let t=e.target.value;D(t),t||(d(e=>({...e,page:1})),vt())},onSearch:()=>{d(e=>({...e,page:1})),vt()},style:{width:240,borderRadius:8},enterButton:!0}),(0,$.jsx)(X,{icon:(0,$.jsx)(bB,{}),onClick:ut,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`},children:`推送任务历史`}),Ve?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{onClick:Ue.size===c.reduce((e,t)=>e+t.items.length,0)&&c.length>0?()=>{We(new Set)}:tt,style:{borderRadius:8,fontWeight:600,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#334155`},children:Ue.size===c.reduce((e,t)=>e+t.items.length,0)&&c.length>0?`取消全选`:`全选`}),(0,$.jsx)(X,{onClick:()=>{He(!1),We(new Set)},style:{borderRadius:8,fontWeight:600,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`},children:`取消选择`}),(0,$.jsxs)(X,{danger:!0,onClick:rt,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #ef4444, #dc2626)`,border:`none`,color:`#fff`},children:[`删除 `,Ue.size>0&&`(${Ue.size})`]}),(0,$.jsxs)(X,{onClick:nt,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,color:`#fff`},children:[`下载 `,Ue.size>0&&`(${Ue.size})`]}),(0,$.jsx)(X,{type:`primary`,onClick:at,loading:O,disabled:O||Ue.size===0,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,color:`#fff`},children:O?`推送中...`:`推送至账户 ${Ue.size>0?`(${Ue.size})`:``}`})]}):(0,$.jsx)(X,{type:`primary`,onClick:()=>He(!0),style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`批量操作`})]})]}),m?(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},children:(0,$.jsx)(tG,{indicator:(0,$.jsx)(Ym,{style:{fontSize:24,color:`#64748b`},spin:!0}),description:`加载中...`,size:`large`})}):c.length===0?(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:`暂无生成记录`,style:{padding:`60px 0`}}):(0,$.jsxs)(`div`,{style:{padding:`0 4px`},children:[c.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:32},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#64748b`,marginBottom:12,paddingLeft:8},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items.map(e=>{let t=o===`video`&&e.videoCoverUrl?qe(e.videoCoverUrl,!0):qe(o===`video`?e.videoUrl:e.imageUrl,!0),n=o===`video`&&e.videoCoverUrl||o===`image`,r=Ue.has(Ze(e));return(0,$.jsxs)(`div`,{className:`media-card`,style:{width:160,height:120,position:`relative`,borderRadius:4,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:()=>Ve?et(Ze(e)):Je(e),onMouseEnter:e=>{Ve||(e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`)},onMouseLeave:e=>{Ve||(e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`)},children:[n?(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},children:[(0,$.jsx)(`img`,{src:t,alt:`预览`,loading:`lazy`,style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+(ne.get(Ze(e))===`loaded`),transition:`opacity 0.3s`},onLoad:()=>{K(t=>{let n=new Map(t);return n.set(Ze(e),`loaded`),n})},onError:()=>{K(t=>{let n=new Map(t);return n.set(Ze(e),`error`),n})}}),ne.get(Ze(e))!==`loaded`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:8,backgroundColor:`#cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,animation:ne.get(Ze(e))===`loading`?`pulse 1.5s infinite`:`none`},children:e.mediaType===`video`?(0,$.jsx)(L8,{style:{color:`#64748b`,fontSize:16}}):(0,$.jsx)(C6,{style:{color:`#64748b`,fontSize:16}})})})]}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1e293b`},children:[(0,$.jsx)(L8,{style:{color:`#64748b`,fontSize:24}}),(0,$.jsx)(Xce,{style:{fontSize:12,color:`#94a3b8`,marginTop:4},children:`暂无封面`})]}),Ve&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,width:22,height:22,borderRadius:`50%`,backgroundColor:r?`#6366f1`:`rgba(255,255,255,0.92)`,border:r?`2px solid #6366f1`:`2px solid #cbd5e1`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,zIndex:10,boxShadow:r?`0 2px 8px rgba(99,102,241,0.4)`:`0 1px 3px rgba(0,0,0,0.1)`,transition:`all 0.15s ease`},onClick:t=>{t.stopPropagation(),et(Ze(e))},children:r&&(0,$.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,children:(0,$.jsx)(`path`,{d:`M10 3L4.5 8.5L2 6`,stroke:`white`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`})})}),r&&o===`video`&&e.imagePx&&!$e(e.imagePx)&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:36,left:8,right:8,padding:`4px 8px`,backgroundColor:`rgba(239, 68, 68, 0.9)`,color:`#fff`,fontSize:12,borderRadius:4,zIndex:10},children:`视频实际尺寸可能不符合平台推送要求`})]}),!Ve&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,background:`linear-gradient(transparent, rgba(0,0,0,0.5))`,padding:`8px`,color:`#fff`,fontSize:12,opacity:0,transition:`opacity 0.2s`},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0`},children:`点击预览`}),(0,$.jsx)(`div`,{className:`media-download-btn`,children:(0,$.jsx)(kw,{title:`下载`,children:(0,$.jsx)(`div`,{style:{width:28,height:28,borderRadius:`50%`,background:`rgba(0,0,0,0.5)`,backdropFilter:`blur(4px)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`background 0.15s`},onClick:t=>{t.stopPropagation();let n=`https://ceshi.apiforeign.minzhongzc.com${e.videoUrl||e.imageUrl}&download=1`,r=document.createElement(`a`);r.href=n,r.download=``,document.body.appendChild(r),r.click(),document.body.removeChild(r)},children:(0,$.jsx)(F1,{style:{color:`#fff`,fontSize:14}})})})})]}),Ve&&r&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,border:`3px solid #6366f1`,borderRadius:4,pointerEvents:`none`,zIndex:5,boxShadow:`inset 0 0 0 1px rgba(99,102,241,0.2)`}})]},Ze(e))})}),e.total&&e.total>e.items.length&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(X,{onClick:()=>bt(e.generatedDate,e.items,e.page),loading:g.has(e.generatedDate),disabled:g.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:g.has(e.date)?`加载中...`:`查看全部 (${e.total})`})})]},t)),c.length>0&&f>c.length&&(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:`20px 0`},children:(0,$.jsx)(X,{onClick:yt,loading:m,disabled:m,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:500},children:m?`加载中...`:`加载更多`})})]})]}),(0,$.jsxs)(EG,{title:`推送任务历史`,open:De,onCancel:()=>Oe(!1),footer:null,width:800,style:{borderRadius:8},mask:{closable:!1},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,display:`flex`,gap:4},children:[(0,$.jsx)(zC,{value:ze,onChange:e=>Be(e),placeholder:`选择状态`,style:{width:200,marginRight:12},options:[{value:`1`,label:`待推送`},{value:`2`,label:`推送中`},{value:`3`,label:`推送成功`},{value:`4`,label:`推送失败`}],allowClear:!0}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(X,{type:`primary`,onClick:dt,style:{borderRadius:8},children:`查询`}),(0,$.jsx)(X,{icon:(0,$.jsx)(IK,{}),onClick:dt,style:{borderRadius:8},children:`刷新`})]})]}),(0,$.jsx)(iQ,{dataSource:ke,columns:[{title:`素材名称`,dataIndex:`fileName`,key:`fileName`,width:200},{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:180},{title:`状态`,dataIndex:`status`,key:`status`,width:100,render:e=>(0,$.jsx)(_Q,{color:{1:`#f59e0b`,2:`#6366f1`,3:`#10b981`,4:`#ef4444`}[e]||`#64748b`,style:{borderRadius:4},children:{1:`待推送`,2:`推送中`,3:`推送成功`,4:`推送失败`}[e]||e})},{title:`备注`,dataIndex:`note`,key:`note`,width:160,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:e||`-`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:180,render:e=>O9(e)},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:180,render:e=>O9(e)}],loading:Le,scroll:{x:`max-content`},pagination:{current:Ne,pageSize:Fe,total:je,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:ft},rowKey:(e,t)=>e.task_id||e.resource_id||t,size:`small`})]}),v&&b&&(0,$.jsx)(EG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:b.title||`预览`})]}),open:v,onCancel:Xe,width:1200,footer:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`#fff`,borderTop:`1px solid #f1f5f9`},children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(F1,{}),onClick:()=>{C.current&&C.current.pause();let e=`https://ceshi.apiforeign.minzhongzc.com${b.videoUrl||b.imageUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=``,document.body.appendChild(t),t.click(),document.body.removeChild(t)},style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 16px rgba(99, 102, 241, 0.35)`,fontWeight:600,padding:`8px 24px`},disabled:Ke(b.videoUrl||b.imageUrl),children:Ke(b.videoUrl||b.imageUrl)?`资源已过期`:`下载`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(jQ,{}),onClick:()=>{let e=``,t=``;if(i===`shot_replicate`?(e=b.shotSegmentId,t=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:(0,$.jsxs)(`li`,{style:{marginBottom:4,color:`#334155`},children:[b.shotReplicateProjectTitle,`— —`,b.shotSegmentLabel]})}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]})):i===`hot_opening_replicate`?(e=b.moduleProjectId,t=(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:8},children:`爆款开头复刻中以下内容所连带的图片和视频都将被删除:`}),(0,$.jsx)(`ul`,{style:{margin:0,paddingLeft:20},children:(0,$.jsx)(`li`,{style:{marginBottom:4,color:`#334155`},children:b.moduleProjectTitle})}),(0,$.jsx)(`div`,{style:{marginTop:12},children:`确定删除吗?`})]})):(e=b.id,t=`确定删除该记录吗?`),!e){Z.warning(`无法获取删除ID`);return}EG.confirm({title:`确认删除`,content:t,okText:`确定删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:async()=>{let t=``;i===`project`?t=`generation_record`:i===`creation`?t=`chat_task`:i===`hot_opening_replicate`?t=`hot_opening_replicate`:i===`shot_replicate`&&(t=`shot_replicate`);let n={history_source:t,ids:[e]};try{await W5(n),Z.success(`删除成功`),Xe(),d(e=>({...e,page:1})),vt()}catch{Z.error(`删除失败,请重试`)}}})},style:{borderRadius:8,background:`linear-gradient(135deg, #bf0b0a 0%, #ff8165 100%)`,fontWeight:600,padding:`8px 24px`},disabled:Ke(b.videoUrl||b.imageUrl),children:`删除`}),(0,$.jsx)(X,{onClick:ot,style:{borderRadius:8,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#64748b`,fontWeight:600,padding:`8px 24px`},disabled:Ke(b.videoUrl||b.imageUrl),children:`推送媒体后台`}),(0,$.jsx)(X,{onClick:()=>{if(!b)return;let e=b.videoUrl||b.imageUrl||``;if(!e){Z.warning(`无法获取媒体地址`);return}if(Ke(e)){Z.warning(`资源已过期,无法编辑`);return}let t=b.videoUrl?`video`:`image`,n=e.startsWith(`http`)?e:`https://ceshi.apiforeign.minzhongzc.com${e}`,i=b.title||b.id||`导入素材`;Xe(),r(`/videoediting?mediaUrl=${encodeURIComponent(n)}&mediaType=${t}&mediaName=${encodeURIComponent(i)}`)},style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,color:`#fff`,fontWeight:600,padding:`8px 24px`},disabled:Ke(b.videoUrl||b.imageUrl),children:`去编辑`})]}),style:{borderRadius:16,overflow:`hidden`},styles:{body:{height:500,display:`flex`,flexDirection:`column`,padding:0},header:{background:`#fff`,borderBottom:`1px solid #f1f5f9`,padding:`16px 24px`},mask:{backgroundColor:`rgba(0, 0, 0, 0.5)`}},children:(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,height:`100%`,background:`#f8fafc`},children:[(0,$.jsx)(`div`,{style:{width:`70%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,padding:20},children:Ke(b.videoUrl||b.imageUrl)?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px`,backgroundColor:`#fff`,borderRadius:12},children:[(0,$.jsx)(`div`,{style:{fontSize:48,marginBottom:16},children:`⚠️`}),(0,$.jsx)(`p`,{style:{fontSize:15,color:`#ef4444`,fontWeight:500,marginBottom:8},children:`资源已过期`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#94a3b8`},children:`请刷新页面重新加载`})]}):o===`video`?(0,$.jsx)(`video`,{ref:C,src:`https://ceshi.apiforeign.minzhongzc.com${b.videoUrl}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`100%`,borderRadius:12,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${N7(b.imageUrl)}`,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:12}})}),(0,$.jsxs)(`div`,{style:{width:`30%`,height:`100%`,overflowY:`auto`,scrollbarWidth:`none`,backgroundColor:`#fff`,padding:24,borderLeft:`1px solid #f1f5f9`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:20},children:[(0,$.jsx)(`div`,{style:{width:2,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:1}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,fontWeight:600},children:`文件信息`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:14},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类型`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:o===`video`?`视频`:`图片`})]}),i===`hot_opening_replicate`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类属`}),(0,$.jsxs)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:[`爆款复刻——`,b.moduleProjectTitle]})]}),i===`shot_replicate`&&(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`类属`}),(0,$.jsxs)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:[b.shotReplicateProjectTitle,`— —`,b.shotSegmentLabel]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`请求`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500,wordBreak:`break-all`,lineHeight:`1.5`},children:b.originalPrompt})]}),o===`image`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.imageProportion})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.imageSize})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`尺寸`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.imagePx})]})]}),o===`video`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`比例`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.aspectRatio})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`分辨率`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.resolution})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`时长`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:`${b.duration}秒`||`-`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`创建时间`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:O9(b.createdAt||b.generatedDate)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13,fontWeight:500},children:`生成引擎`}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:600},children:b.engine||b.engineName||`-`})]})]}),(0,$.jsx)(`div`,{style:{borderTop:`1px solid #f1f5f9`,margin:`20px 0`}}),b.mediaReferences&&b.mediaReferences.length>0&&![`hot_opening_replicate`,`shot_replicate`].includes(i)&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:16},children:[(0,$.jsx)(`div`,{style:{width:2,height:18,background:`linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%)`,borderRadius:1}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,fontWeight:600},children:`依靠附件`})]}),b.mediaReferences.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>{C.current&&C.current.pause();let t=`https://ceshi.apiforeign.minzhongzc.com${e.url}`;window.open(t,`_blank`)},style:{display:`flex`,alignItems:`center`,gap:10,padding:`10px 12px`,borderRadius:8,cursor:`pointer`,backgroundColor:`#f8fafc`,marginBottom:8,transition:`all 0.25s ease`,border:`1px solid transparent`},onMouseEnter:e=>{let t=e.currentTarget;t.style.backgroundColor=`#e0f2fe`,t.style.borderColor=`#bae6fd`},onMouseLeave:e=>{let t=e.currentTarget;t.style.backgroundColor=`#f8fafc`,t.style.borderColor=`transparent`},children:[e.type===`image`?(0,$.jsx)(C6,{style:{color:`#3b82f6`,fontSize:16}}):(0,$.jsx)(L8,{style:{color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{color:`#334155`,fontSize:13,fontWeight:500},children:e.name||`媒体${t+1}`})]},e.url))]})]})]})}),(0,$.jsx)(EG,{title:Ue.size===1?`推送配置`:`批量推送配置`,open:A,onCancel:()=>{j(!1),N([[]]),F([``]),U([void 0]),W(new Map),G(``)},footer:null,width:900,mask:{closable:!1},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:[`选中素材 (`,Ue.size,`个)`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#64748b`},children:`统一修改名称:`}),(0,$.jsx)(JU,{value:te,onChange:e=>G(e.target.value),placeholder:`输入名称后点击应用`,style:{flex:1,borderRadius:8},size:`small`}),(0,$.jsx)(X,{type:`primary`,size:`small`,onClick:()=>{te.trim()&&Ue.size>0&&ht(Array.from(Ue),te)},disabled:!te.trim()||Ue.size===0,style:{borderRadius:8},children:`应用`})]}),(0,$.jsx)(`div`,{style:{maxHeight:300,overflow:`auto`,border:`1px solid #f0f0f0`,borderRadius:8,padding:12},children:(()=>{let e=new Map;return c.forEach(t=>{t.items.forEach(t=>{let n=Ze(t);e.set(n,t)})}),Array.from(Ue).map(t=>{let n=e.get(t);return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`1px solid #f5f5f5`},children:[(0,$.jsx)(`div`,{style:{width:60,height:40,borderRadius:4,backgroundColor:`#f5f5f5`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,flexShrink:0},children:(()=>{let e=o===`video`?n?.videoCoverUrl:n?.imageUrl;if(!e)return(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:`预览`});let t=`https://ceshi.apiforeign.minzhongzc.com`;return(0,$.jsx)(`img`,{src:`${t.endsWith(`/`)?t.slice(0,-1):t}${N7(e)}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})()}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsx)(Q.Text,{style:{fontSize:12,color:`#1e293b`},children:n?.fileName||`素材 ${n.id}`})}),(0,$.jsx)(JU,{value:ee.has(t)?ee.get(t):n?.fileName||``,onChange:e=>{let n=e.target.value,r=new Map(ee);r.set(t,n),W(r)},onBlur:()=>{let e=ee.get(t)||n?.fileName||``;e.trim()&&mt(t,e)},onKeyDown:e=>{if(e.key===`Enter`){let e=ee.get(t)||n?.fileName||``;e.trim()&&mt(t,e)}},placeholder:`输入新名称`,style:{width:200,borderRadius:4},size:`small`})]},t)})})()})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`是否开启前测:`}),(0,$.jsx)(zC,{value:ye,onChange:e=>{be(e),e===`1`?P5().then(e=>{Se(e?.data?.id||``)}).catch(()=>{}):Se(``)},style:{width:120},options:[{value:`1`,label:`是`},{value:`2`,label:`否`}]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`前测模板:`}),(0,$.jsx)(zC,{value:xe,onChange:e=>Se(e),style:{width:200},disabled:ye!==`1`,loading:Te,placeholder:ye===`1`?`选择前测模板`:`请先开启前测`,options:Ce.map(e=>({value:e.id,label:e.name}))})]})]}),(0,$.jsx)(hL,{size:`small`,activeKey:le,onChange:e=>{ue(e),e===`history`&&ct()},items:[{key:`new`,label:`新增账户`},{key:`history`,label:`历史账户`}]}),le===`new`&&(0,$.jsxs)(`div`,{children:[H.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:12,border:`1px solid #e2e8f0`,borderRadius:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`},children:[`授权账户 `,t+1]}),H.length>1&&(0,$.jsx)(X,{type:`text`,danger:!0,onClick:()=>{let e=[...H],n=[...P],r=[...M],i=[...se];e.splice(t,1),n.splice(t,1),r.splice(t,1),i.splice(t,1),U(e),F(n),N(r),ce(i)},children:`删除`})]}),(0,$.jsx)(zC,{value:e,onChange:e=>{let n=[...H];n[t]=e,U(n)},placeholder:`点击选择授权账户`,style:{width:`100%`,marginBottom:12,borderRadius:8},popupRender:()=>(0,$.jsx)(`div`,{style:{padding:8,width:800,maxHeight:500,overflow:`auto`},children:(0,$.jsx)(iQ,{dataSource:I,columns:[{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:120},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`,width:120},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,width:160,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,width:120}],loading:R,pagination:{current:ie,pageSize:q,total:B,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{ae(e),oe(t),st(e,t)}},rowKey:`id`,size:`small`,scroll:{x:`max-content`},onRow:n=>({onClick:()=>{let e=String(n.id),r=[...H];r[t]={value:e,label:String(n.accountId)+`-`+(n.accountName||`-`)},U(r);let i=[...se];i[t]=!1,ce(i)},style:{cursor:`pointer`,backgroundColor:e?.value===String(n.id)?`#e6f7ff`:void 0}})})}),open:se[t],onOpenChange:e=>{let n=[...se];n[t]=e,ce(n),e&&st(1,q)},labelInValue:!0,fieldNames:{label:`accountUserid`,value:`id`}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#475569`,marginBottom:8,display:`block`},children:`粘贴账户ID(每行一个或用逗号分隔)`}),(0,$.jsx)(JU.TextArea,{value:P[t],onChange:e=>{let n=e.target.value,r=[...P];r[t]=n,F(r);let i=n.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0),a=[...new Set(i)].map(e=>({accountId:e})),o=new Set,s=a.filter(e=>o.has(e.accountId)?!1:(o.add(e.accountId),!0)),c=[...M];c[t]=s,N(c)},placeholder:`粘贴账户ID,每行一个或用逗号分隔,例如: 10001,10002,10003 - 10004`,rows:3,style:{borderRadius:8}})]},t)),(0,$.jsx)(X,{type:`dashed`,block:!0,onClick:()=>{U([...H,void 0]),F([...P,``]),N([...M,[]]),ce([...se,!1])},style:{borderRadius:8,marginBottom:16},children:`+ 新增授权账户组`})]}),le===`history`&&(0,$.jsx)(`div`,{style:{padding:8},children:pe?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):de.length===0?(0,$.jsx)(dC,{description:`暂无可选账户`}):(0,$.jsx)(ZQ,{style:{width:`100%`},dataSource:de.filter(e=>e.advertiserId).map((e,t)=>({key:String(e.advertiserId)||`item-${t}`,title:String(e.advertiserId),description:e.advertiserName||``,...e})),targetKeys:he.filter(e=>e.advertiserId).map(e=>String(e.advertiserId)),onChange:e=>{ge(de.filter(t=>t.advertiserId&&e.includes(String(t.advertiserId))))},titles:[`可选账户列表`,`已选账户列表`],showSearch:!0,filterOption:(e,t)=>String(t.advertiserId).toLowerCase().includes(e.toLowerCase())||t.advertiserName&&t.advertiserName.toLowerCase().includes(e.toLowerCase()),children:({direction:e,filteredItems:t,onItemSelect:n,onItemSelectAll:r,selectedKeys:i,disabled:a})=>(0,$.jsx)(aQ,{rowSelection:{getCheckboxProps:()=>({disabled:a}),onChange:e=>{r(e,`replace`)},selectedRowKeys:i,selections:[aQ.SELECTION_ALL,aQ.SELECTION_INVERT,aQ.SELECTION_NONE]},columns:[{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:120},{title:`账户名称`,dataIndex:`advertiserName`,key:`advertiserName`,width:150}],dataSource:t,size:`small`,style:{pointerEvents:a?`none`:void 0},pagination:!1,scroll:{x:`max-content`,y:400},onRow:({key:e,disabled:t})=>({onClick:()=>{t||a||n(e,!i.includes(e))}})})})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(X,{onClick:()=>{j(!1),N([[]]),F([``]),U([void 0]),W(new Map),G(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(X,{type:`primary`,onClick:pt,loading:O,disabled:O||(le===`new`?M.every(e=>e.length===0):he.length===0),style:{borderRadius:8},children:O?`推送中...`:`开始推送`})]})]})})]})},O9=document.createElement(`style`);O9.textContent=` + 10004`,rows:3,style:{borderRadius:8}})]},t)),(0,$.jsx)(X,{type:`dashed`,block:!0,onClick:()=>{U([...H,void 0]),F([...P,``]),N([...M,[]]),ce([...se,!1])},style:{borderRadius:8,marginBottom:16},children:`+ 新增授权账户组`})]}),le===`history`&&(0,$.jsx)(`div`,{style:{padding:8},children:pe?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:40},children:`加载中...`}):de.length===0?(0,$.jsx)(lC,{description:`暂无可选账户`}):(0,$.jsx)(XQ,{style:{width:`100%`},dataSource:de.filter(e=>e.advertiserId).map((e,t)=>({key:String(e.advertiserId)||`item-${t}`,title:String(e.advertiserId),description:e.advertiserName||``,...e})),targetKeys:he.filter(e=>e.advertiserId).map(e=>String(e.advertiserId)),onChange:e=>{ge(de.filter(t=>t.advertiserId&&e.includes(String(t.advertiserId))))},titles:[`可选账户列表`,`已选账户列表`],showSearch:!0,filterOption:(e,t)=>String(t.advertiserId).toLowerCase().includes(e.toLowerCase())||t.advertiserName&&t.advertiserName.toLowerCase().includes(e.toLowerCase()),children:({direction:e,filteredItems:t,onItemSelect:n,onItemSelectAll:r,selectedKeys:i,disabled:a})=>(0,$.jsx)(iQ,{rowSelection:{getCheckboxProps:()=>({disabled:a}),onChange:e=>{r(e,`replace`)},selectedRowKeys:i,selections:[iQ.SELECTION_ALL,iQ.SELECTION_INVERT,iQ.SELECTION_NONE]},columns:[{title:`账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:120},{title:`账户名称`,dataIndex:`advertiserName`,key:`advertiserName`,width:150}],dataSource:t,size:`small`,style:{pointerEvents:a?`none`:void 0},pagination:!1,scroll:{x:`max-content`,y:400},onRow:({key:e,disabled:t})=>({onClick:()=>{t||a||n(e,!i.includes(e))}})})})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`flex-end`},children:[(0,$.jsx)(X,{onClick:()=>{j(!1),N([[]]),F([``]),U([void 0]),W(new Map),G(``)},style:{borderRadius:8},children:`取消`}),(0,$.jsx)(X,{type:`primary`,onClick:pt,loading:O,disabled:O||(le===`new`?M.every(e=>e.length===0):he.length===0),style:{borderRadius:8},children:O?`推送中...`:`开始推送`})]})]})})]})},D9=document.createElement(`style`);D9.textContent=` @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } -`,document.head.appendChild(O9);function k9(e){if(!e)return`-`;let t=new Date(e);return isNaN(t.getTime())?`-`:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}var A9=[{id:`AD_APP_ACTIVATE`,name:`AD_APP_ACTIVATE`,label:`应用-激活`,description:`应用激活行为`},{id:`AD_APP_AUTH`,name:`AD_APP_AUTH`,label:`应用-授信`,description:`应用授信行为`},{id:`AD_APP_BOOK`,name:`AD_APP_BOOK`,label:`应用-预约表单`,description:`应用预约表单`},{id:`AD_APP_BUY`,name:`AD_APP_BUY`,label:`应用-APP内付费`,description:`APP内付费行为`},{id:`AD_APP_CLICKS`,name:`AD_APP_CLICKS`,label:`应用-点击量`,description:`应用点击量`},{id:`AD_APP_DETAIL`,name:`AD_APP_DETAIL`,label:`应用-APP内详情页到站UV`,description:`APP内详情页到站UV`},{id:`AD_APP_DOWNLOADED`,name:`AD_APP_DOWNLOADED`,label:`应用-下载完成`,description:`应用下载完成`},{id:`AD_APP_INSTALLED`,name:`AD_APP_INSTALLED`,label:`应用-安装完成`,description:`应用安装完成`},{id:`AD_APP_KEY_BEHAVIOR`,name:`AD_APP_KEY_BEHAVIOR`,label:`应用-关键行为`,description:`应用关键行为`},{id:`AD_APP_ORDER`,name:`AD_APP_ORDER`,label:`应用-APP内下单`,description:`APP内下单行为`},{id:`AD_APP_PAY`,name:`AD_APP_PAY`,label:`应用-付费`,description:`应用付费行为`},{id:`AD_APP_PRE_AUTH`,name:`AD_APP_PRE_AUTH`,label:`应用-预授信`,description:`应用预授信行为`},{id:`AD_APP_PRE_DOWNLOAD`,name:`AD_APP_PRE_DOWNLOAD`,label:`应用-预约下载`,description:`应用预约下载`},{id:`AD_APP_PUSH_ORDER`,name:`AD_APP_PUSH_ORDER`,label:`应用-首次发单(乘客)`,description:`首次发单行为`},{id:`AD_APP_REGISTER`,name:`AD_APP_REGISTER`,label:`应用-注册`,description:`应用注册行为`},{id:`AD_APP_SHOW`,name:`AD_APP_SHOW`,label:`应用-展示量`,description:`应用展示量`},{id:`AD_APP_SUBMIT`,name:`AD_APP_SUBMIT`,label:`应用-提交认证`,description:`应用提交认证`},{id:`AD_APP_VIEW`,name:`AD_APP_VIEW`,label:`应用-APP内访问`,description:`APP内访问行为`},{id:`AD_CLUE_AUTH`,name:`AD_CLUE_AUTH`,label:`销售线索收集-授信`,description:`销售线索授信`},{id:`AD_CLUE_BUTTON`,name:`AD_CLUE_BUTTON`,label:`销售线索收集-按钮跳转`,description:`按钮跳转`},{id:`AD_CLUE_CLICKS`,name:`AD_CLUE_CLICKS`,label:`销售线索收集-点击量`,description:`点击量`},{id:`AD_CLUE_CONFIRM`,name:`AD_CLUE_CONFIRM`,label:`销售线索收集-回访-信息确认`,description:`回访信息确认`},{id:`AD_CLUE_CONSULT`,name:`AD_CLUE_CONSULT`,label:`销售线索收集-有效咨询`,description:`有效咨询`},{id:`AD_CLUE_CONSULT_MSG`,name:`AD_CLUE_CONSULT_MSG`,label:`销售线索收集-留资咨询`,description:`留资咨询`},{id:`AD_CLUE_COUPON`,name:`AD_CLUE_COUPON`,label:`销售线索收集-卡券领取`,description:`卡券领取`},{id:`AD_CLUE_CUSTOMER`,name:`AD_CLUE_CUSTOMER`,label:`销售线索收集-有效获客`,description:`有效获客`},{id:`AD_CLUE_CVT`,name:`AD_CLUE_CVT`,label:`销售线索收集-多转化`,description:`多转化`},{id:`AD_CLUE_DONE`,name:`AD_CLUE_DONE`,label:`销售线索收集-完件`,description:`完件`},{id:`AD_CLUE_FORM`,name:`AD_CLUE_FORM`,label:`销售线索收集-表单提交`,description:`表单提交`},{id:`AD_CLUE_FRIENDS`,name:`AD_CLUE_FRIENDS`,label:`销售线索收集-回访-加为好友`,description:`回访加为好友`},{id:`AD_CLUE_INSURANCE`,name:`AD_CLUE_INSURANCE`,label:`销售线索收集-保险支付`,description:`保险支付`},{id:`AD_CLUE_INTENTION`,name:`AD_CLUE_INTENTION`,label:`销售线索收集-存在意向`,description:`存在意向`},{id:`AD_CLUE_INTENTION_FORM`,name:`AD_CLUE_INTENTION_FORM`,label:`销售线索收集-意向表单`,description:`意向表单`},{id:`AD_CLUE_INTENTION_TEL`,name:`AD_CLUE_INTENTION_TEL`,label:`销售线索收集-意向话单`,description:`意向话单`},{id:`AD_CLUE_MESSAGE`,name:`AD_CLUE_MESSAGE`,label:`销售线索收集-私信消息`,description:`私信消息`},{id:`AD_CLUE_MONEY`,name:`AD_CLUE_MONEY`,label:`销售线索收集-放款`,description:`放款`},{id:`AD_CLUE_MSG`,name:`AD_CLUE_MSG`,label:`销售线索收集-私信留资`,description:`私信留资`},{id:`AD_CLUE_PAGE`,name:`AD_CLUE_PAGE`,label:`销售线索收集-访问目标页面`,description:`访问目标页面`},{id:`AD_CLUE_PAY`,name:`AD_CLUE_PAY`,label:`销售线索收集-付费`,description:`付费`},{id:`AD_CLUE_PRE_AUTH`,name:`AD_CLUE_PRE_AUTH`,label:`销售线索收集-预授信`,description:`预授信`},{id:`AD_CLUE_PROTENTIAL_DEAL`,name:`AD_CLUE_PROTENTIAL_DEAL`,label:`销售线索收集-回访-高潜成交`,description:`回访高潜成交`},{id:`AD_CLUE_PUSH_ORDER`,name:`AD_CLUE_PUSH_ORDER`,label:`销售线索收集-首次发单(乘客)`,description:`首次发单`},{id:`AD_CLUE_REGISTER`,name:`AD_CLUE_REGISTER`,label:`销售线索收集-注册`,description:`注册`},{id:`AD_CLUE_SHOW`,name:`AD_CLUE_SHOW`,label:`销售线索收集-展示量`,description:`展示量`},{id:`AD_CLUE_SUBMIT`,name:`AD_CLUE_SUBMIT`,label:`销售线索收集-提交认证`,description:`提交认证`},{id:`AD_CLUE_TEL`,name:`AD_CLUE_TEL`,label:`销售线索收集-智能电话确认接通`,description:`智能电话确认接通`},{id:`AD_CLUE_TEL_CALL`,name:`AD_CLUE_TEL_CALL`,label:`销售线索收集-电话接通`,description:`电话接通`},{id:`AD_CLUE_WX_ADD`,name:`AD_CLUE_WX_ADD`,label:`销售线索收集-微信-添加企业微信`,description:`添加企业微信`},{id:`AD_CLUE_WX_COPY`,name:`AD_CLUE_WX_COPY`,label:`销售线索收集-微信复制`,description:`微信复制`},{id:`AD_CLUE_WX_MSG`,name:`AD_CLUE_WX_MSG`,label:`销售线索收集-微信-用户首次消息`,description:`用户首次消息`},{id:`AD_ECP_APP_BUY`,name:`AD_ECP_APP_BUY`,label:`电商-app内下单`,description:`电商app内下单`},{id:`AD_ECP_APP_DETAIL`,name:`AD_ECP_APP_DETAIL`,label:`电商-app内详情页到站uv`,description:`电商app内详情页到站uv`},{id:`AD_ECP_APP_VIEW`,name:`AD_ECP_APP_VIEW`,label:`电商-app内访问`,description:`电商app内访问`},{id:`AD_ECP_BUTTON`,name:`AD_ECP_BUTTON`,label:`电商-按钮跳转`,description:`电商按钮跳转`},{id:`AD_ECP_INTEREST`,name:`AD_ECP_INTEREST`,label:`电商-引流电商种草`,description:`引流电商种草`},{id:`AD_ECP_SHOP`,name:`AD_ECP_SHOP`,label:`电商-调起店铺`,description:`调起店铺`},{id:`AD_ECP_SHOP_STAY`,name:`AD_ECP_SHOP_STAY`,label:`电商-店铺停留`,description:`店铺停留`},{id:`AD_MINIAPP_ACTIVATE`,name:`AD_MINIAPP_ACTIVATE`,label:`快应用-激活`,description:`快应用激活`},{id:`AD_MINIAPP_KEY_BEHAVIOR`,name:`AD_MINIAPP_KEY_BEHAVIOR`,label:`快应用-关键行为`,description:`快应用关键行为`},{id:`AD_MINIAPP_PAY`,name:`AD_MINIAPP_PAY`,label:`快应用-付费`,description:`快应用付费`},{id:`AD_MINIAPP_REGISTER`,name:`AD_MINIAPP_REGISTER`,label:`快应用-注册`,description:`快应用注册`},{id:`AD_NATIVE_ACTIVATE`,name:`AD_NATIVE_ACTIVATE`,label:`原声互动-激活`,description:`原声互动激活`},{id:`AD_NATIVE_CLICKS`,name:`AD_NATIVE_CLICKS`,label:`原声互动-组件点击`,description:`组件点击`},{id:`AD_NATIVE_FANS_GROUP`,name:`AD_NATIVE_FANS_GROUP`,label:`原声互动-粉丝入群`,description:`粉丝入群`},{id:`AD_NATIVE_FOLLOW`,name:`AD_NATIVE_FOLLOW`,label:`原声互动-帐号关注`,description:`帐号关注`},{id:`AD_NATIVE_INTERACTIVE`,name:`AD_NATIVE_INTERACTIVE`,label:`原声互动-互动`,description:`互动`},{id:`AD_NATIVE_LIVE`,name:`AD_NATIVE_LIVE`,label:`原声互动-预约直播`,description:`预约直播`},{id:`AD_NATIVE_LIVE_DONATE`,name:`AD_NATIVE_LIVE_DONATE`,label:`原声互动-直播间营销捐赠`,description:`直播间营销捐赠`},{id:`AD_NATIVE_LIVE_PAY`,name:`AD_NATIVE_LIVE_PAY`,label:`原声互动-直播间打赏`,description:`直播间打赏`},{id:`AD_NATIVE_LIVE_STAY`,name:`AD_NATIVE_LIVE_STAY`,label:`原声互动-直播间停留`,description:`直播间停留`},{id:`AD_NATIVE_LIVE_VIEW`,name:`AD_NATIVE_LIVE_VIEW`,label:`原声互动-直播间观看`,description:`直播间观看`},{id:`AD_NATIVE_PAY`,name:`AD_NATIVE_PAY`,label:`原声互动-付费`,description:`原声互动付费`},{id:`AD_PRODUCT_ACTIVATE`,name:`AD_PRODUCT_ACTIVATE`,label:`商品-激活`,description:`商品激活`},{id:`AD_PRODUCT_APP_BUY`,name:`AD_PRODUCT_APP_BUY`,label:`商品-app内下单`,description:`商品app内下单`},{id:`AD_PRODUCT_APP_DETAIL`,name:`AD_PRODUCT_APP_DETAIL`,label:`商品-app内详情页到站uv`,description:`商品app内详情页到站uv`},{id:`AD_PRODUCT_APP_PAY`,name:`AD_PRODUCT_APP_PAY`,label:`商品-app内付费`,description:`商品app内付费`},{id:`AD_PRODUCT_APP_VIEW`,name:`AD_PRODUCT_APP_VIEW`,label:`商品-app内访问`,description:`商品app内访问`},{id:`AD_PRODUCT_FORM`,name:`AD_PRODUCT_FORM`,label:`商品-表单提交`,description:`商品表单提交`},{id:`AD_PRODUCT_KEY_BEHAVIOR`,name:`AD_PRODUCT_KEY_BEHAVIOR`,label:`商品-关键行为`,description:`商品关键行为`},{id:`AD_PRODUCT_PAY`,name:`AD_PRODUCT_PAY`,label:`商品-付费`,description:`商品付费`},{id:`AD_TINYAPP_ACTIVATE`,name:`AD_TINYAPP_ACTIVATE`,label:`小程序-激活`,description:`小程序激活`},{id:`AD_TINYAPP_KEY_BEHAVIOR`,name:`AD_TINYAPP_KEY_BEHAVIOR`,label:`小程序-关键行为`,description:`小程序关键行为`},{id:`AD_TINYAPP_PAY`,name:`AD_TINYAPP_PAY`,label:`小程序-付费`,description:`小程序付费`},{id:`QC_LIVE_BUY`,name:`QC_LIVE_BUY`,label:`直播投放-直播间下单`,description:`直播间下单`},{id:`QC_LIVE_CHECK`,name:`QC_LIVE_CHECK`,label:`直播投放-直播间结算`,description:`直播间结算`},{id:`QC_LIVE_COMMENTS`,name:`QC_LIVE_COMMENTS`,label:`直播投放-直播间评论`,description:`直播间评论`},{id:`QC_LIVE_DEAL`,name:`QC_LIVE_DEAL`,label:`直播投放-直播间成交`,description:`直播间成交`},{id:`QC_LIVE_ENTRY`,name:`QC_LIVE_ENTRY`,label:`直播投放-进入直播间`,description:`进入直播间`},{id:`QC_LIVE_FANS`,name:`QC_LIVE_FANS`,label:`直播投放-直播间粉丝提升`,description:`直播间粉丝提升`},{id:`QC_LIVE_HIT`,name:`QC_LIVE_HIT`,label:`直播投放-直播加热`,description:`直播加热`},{id:`QC_LIVE_PRODUCT_CLICKS`,name:`QC_LIVE_PRODUCT_CLICKS`,label:`直播投放-直播间商品点击`,description:`直播间商品点击`},{id:`QC_LIVE_ROI_CHECK`,name:`QC_LIVE_ROI_CHECK`,label:`直播投放-结算roi`,description:`结算roi`},{id:`QC_LIVE_ROI_DEAL`,name:`QC_LIVE_ROI_DEAL`,label:`直播投放-支付roi-直播间成交`,description:`支付roi直播间成交`},{id:`QC_LIVE_ROI_QC`,name:`QC_LIVE_ROI_QC`,label:`直播投放-支付roi-千川直接+间接订单`,description:`支付roi千川订单`},{id:`QC_PRODUCT_BUY`,name:`QC_PRODUCT_BUY`,label:`商品投放-商品购买`,description:`商品购买`},{id:`QC_PRODUCT_COMMENTS`,name:`QC_PRODUCT_COMMENTS`,label:`商品投放-点赞评论`,description:`点赞评论`},{id:`QC_PRODUCT_FANS`,name:`QC_PRODUCT_FANS`,label:`商品投放-粉丝提升`,description:`粉丝提升`},{id:`QC_PRODUCT_INTEREST`,name:`QC_PRODUCT_INTEREST`,label:`商品投放-人群种草`,description:`人群种草`},{id:`QC_PRODUCT_QC`,name:`QC_PRODUCT_QC`,label:`商品投放-千川直接+间接订单`,description:`千川订单`},{id:`QC_PRODUCT_ROI`,name:`QC_PRODUCT_ROI`,label:`商品投放-商品支付roi`,description:`商品支付roi`}],Qce=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},$ce=()=>{let{message:e}=nx.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(`create`),[d,f]=(0,S.useState)(null),[p]=mH.useForm(),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(1),[b,x]=(0,S.useState)(10),[C,w]=(0,S.useState)(`AD`),[T,E]=(0,S.useState)(void 0),[D,O]=(0,S.useState)([]),[k,A]=(0,S.useState)({}),[j,M]=(0,S.useState)({});(0,S.useEffect)(()=>{N()},[v,b]),(0,S.useEffect)(()=>{P()},[]);let N=async t=>{o(!0);try{let e=await N5({page:t?.page??v,pageSize:t?.pageSize??b,platform:t?.platform??T});n(e.data||[]),i(e.pagination?.total||0),y(e.pagination?.page||1),x(e.pagination?.pageSize||10)}catch{e.error(`获取前测列表失败`)}finally{o(!1)}},P=async()=>{try{let e=localStorage.getItem(`preTestAreaData`);if(e){let t=JSON.parse(e);O(t.areaOptions),A(t.cityCodeMap),M(t.provinceCityMap);return}let t=(await B5({level:`ONE_LEVEL`})).data||[],n={},r={},i=await Promise.all(t.map(async e=>{let t=[];try{t=((await B5({level:`TWO_LEVEL`,parent_code:e.code})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0}));let i=t.map(e=>e.value);r[e.code]=i,t.forEach(e=>{n[e.value]=e.label})}catch(t){console.error(`获取省份 ${e.name} 的城市失败`,t),r[e.code]=[]}return{value:e.code,label:e.name,isLeaf:!1,children:t}})),a={areaOptions:i,cityCodeMap:n,provinceCityMap:r};localStorage.setItem(`preTestAreaData`,JSON.stringify(a)),O(i),A(n),M(r)}catch{e.error(`获取省份信息失败`)}},F=async t=>{let n=t[t.length-1];n.loading=!0;try{n.children=((await B5({level:`TWO_LEVEL`,parent_code:n.value})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0})),n.loading=!1,O([...D])}catch{e.error(`获取城市信息失败`),n.loading=!1,O([...D])}},I=t.map((e,t)=>({...e,index:(v-1)*b+t+1,key:e.id})),L=[{title:`前测模板编号`,dataIndex:`id`,key:`id`,width:120,render:e=>(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#1e293b`,fontSize:13},children:e})},{title:`模板名称`,dataIndex:`name`,key:`name`,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500,fontSize:13},children:e})},{title:`平台`,dataIndex:`platform`,key:`platform`,render:e=>(0,$.jsx)(vQ,{color:e===`AD`?`blue`:e===`QIANCHUAN`?`green`:`orange`,style:{borderRadius:6,fontSize:12},children:e===`AD`?`AD`:e===`QIANCHUAN`?`千川`:`本地推`})},{title:`转化目标`,dataIndex:`externalAction`,key:`externalAction`,ellipsis:!0,width:200,render:e=>{if(!e)return(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`});let t=A9.find(t=>t.name===e.trim());return(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:t?t.label:e})}},{title:`目标转化成本`,dataIndex:`cpaBid`,key:`cpaBid`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`受众性别`,dataIndex:`audienceGender`,key:`audienceGender`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===`ALL`?`不限`:e===`MALE`?`男`:e===`FEMALE`?`女`:e||`-`})},{title:`受众年龄`,dataIndex:`audienceAge`,key:`audienceAge`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`受众地区`,dataIndex:`audienceRegion`,key:`audienceRegion`,ellipsis:!0,width:300,render:e=>{if(!Array.isArray(e)||e.length===0)return(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`});let t=e.map(e=>k[String(e)]||String(e));return(0,$.jsx)(YU.TextArea,{value:t.join(`, `)||`-`,readOnly:!0,autoSize:{minRows:1,maxRows:4},style:{resize:`none`,border:`none`,background:`transparent`,padding:0},placeholder:`-`})}},{title:`网络类型`,dataIndex:`audienceNetwork`,key:`audienceNetwork`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`客户主体名称`,dataIndex:`cusName`,key:`cusName`,ellipsis:!0,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e||`-`})},{title:`出价类型`,dataIndex:`pricingType`,key:`pricingType`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e||`-`})},{title:`目标点击成本`,dataIndex:`cpcBid`,key:`cpcBid`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`预算金额`,dataIndex:`budget`,key:`budget`,width:100,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`默认模板`,dataIndex:`isDefault`,key:`isDefault`,width:90,render:e=>(0,$.jsx)(vQ,{color:e?`green`:`default`,style:{borderRadius:6,fontSize:12},children:e?`是`:`否`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:Qce(e)})},{title:`操作`,dataIndex:`operation`,fixed:`right`,key:`operation`,render:(e,t)=>(0,$.jsxs)(bV,{size:4,children:[(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(DU,{}),style:{color:`#6366f1`,fontSize:12},onClick:()=>B(t),children:`详情`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(e$,{}),style:{color:`#6366f1`,fontSize:12},onClick:()=>V(t),children:`编辑`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(MQ,{}),style:{color:`#ef4444`,fontSize:12},onClick:()=>H(t),children:`删除`})]})}],R=()=>{p.resetFields(),w(`AD`),u(`create`),f(null),c(!0)},z=async e=>{f(e),w(e.platform||`AD`);let t=e.audienceRegion||[],n=[];for(let e of t){let t=String(e);if(t.length>=6){let e=t.slice(0,2);F(e),n.push([e,t])}}p.setFieldsValue({name:e.name,note:e.note,platform:e.platform,external_action:e.externalAction,cpa_bid:e.cpaBid,audience_gender:e.audienceGender,audience_age:e.audienceAge||[],audience_region:n,audience_network:e.audienceNetwork||[],cus_name:e.cusName,pricing_type:e.pricingType,cost_cap:e.costCap===void 0?!1:e.costCap,target_cost:e.targetCost===void 0?!1:e.targetCost,nobid:e.nobid===void 0?!1:e.nobid,cpc_bid:e.cpcBid,budget:e.budget,is_default:e.isDefault===void 0?!1:e.isDefault})},B=async t=>{try{let e=(await P5(t.id)).data;u(`detail`),z(e),c(!0)}catch{e.error(`获取详情失败`)}},V=async t=>{try{let e=(await P5(t.id)).data;u(`edit`),z(e),c(!0)}catch{e.error(`获取详情失败`)}},H=t=>{DG.confirm({title:`确认删除`,content:`确定要删除该前测模板吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await Kae(t.id),e.success(`删除成功`),N()}catch{e.error(`删除失败`)}}})};return(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 80px)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(TV,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`素材前测模板`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,alignItems:`center`},children:[(0,$.jsx)(VC,{placeholder:`投放平台`,value:T,onChange:e=>E(e),style:{width:140},allowClear:!0,options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>{y(1),N()},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(X,{type:`primary`,size:`medium`,icon:(0,$.jsx)(VI,{}),loading:a,onClick:R,style:{borderRadius:12,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99,102,241,0.3)`},children:`新增模板`})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,boxShadow:`0 4px 20px rgba(0,0,0,0.04)`,overflow:`hidden`},children:[(0,$.jsx)(aQ,{dataSource:I,columns:L,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},onRow:()=>({style:{cursor:`pointer`,transition:`background-color 0.15s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#f8fafc`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`transparent`}})}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(FW,{current:v,pageSize:b,total:r,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,pageSizeOptions:[`10`,`20`,`50`,`100`],onChange:(e,t)=>{y(e),x(t)},size:`small`})})]}),(0,$.jsx)(DG,{title:(0,$.jsx)(bV,{children:l===`create`?`新增前测模板(选填项如填写需准确填写)`:l===`edit`?`编辑前测模板(选填项如填写需准确填写)`:`前测模板详情`}),open:s,onCancel:()=>{c(!1),p.resetFields(),w(`AD`)},onOk:async()=>{try{let t=await p.validateFields();_(!0);let n=[];(t.audience_region||[]).forEach(e=>{if(e.length===1){let t=j[e[0]]||[];n.push(...t)}else e.length>=2&&n.push(e[e.length-1])});let r={name:t.name,note:t.note,platform:t.platform,external_action:t.external_action,cpa_bid:t.cpa_bid||0,audience_gender:t.audience_gender,audience_age:t.audience_age||[],audience_region:n,audience_network:t.audience_network||[],cus_name:t.cus_name,pricing_type:t.pricing_type,cost_cap:t.cost_cap||!1,target_cost:t.target_cost||!1,nobid:t.nobid||!1,cpc_bid:t.cpc_bid||0,budget:t.budget||0,is_default:t.is_default||!1};l===`edit`&&d?(await Gae(d.id,r),e.success(`前测模板更新成功`)):(await Wae(r),e.success(`前测模板创建成功`)),c(!1),p.resetFields(),N()}catch(t){t?.message?e.error(t.message):t?.response?.data?.message?e.error(t.response.data.message):e.error(l===`edit`?`更新失败,请重试`:`创建失败,请重试`)}finally{_(!1)}},okText:l===`detail`?``:`提交`,cancelText:`取消`,width:720,height:600,confirmLoading:g,style:{borderRadius:16},footer:l===`detail`?null:void 0,children:(0,$.jsxs)(mH,{form:p,layout:`vertical`,style:{marginTop:16},disabled:l===`detail`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(mH.Item,{style:{flex:1},name:`name`,label:`模板名称`,rules:[{required:!0,message:`请输入模板名称`}],children:(0,$.jsx)(YU,{placeholder:`请输入模板名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(mH.Item,{style:{flex:1},name:`platform`,label:`平台`,initialValue:`AD`,rules:[{required:!0,message:`请选择平台`}],children:(0,$.jsx)(VC,{placeholder:`请选择平台`,style:{borderRadius:8,height:40},onChange:e=>{w(e)},options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]})})]}),(0,$.jsx)(o_,{defaultActiveKey:[],activeKey:m?[`optional`]:[],onChange:()=>h(!m),children:(0,$.jsxs)(o_.Panel,{header:`选填项`,children:[C!==`LOCAL`&&(0,$.jsx)(mH.Item,{name:`external_action`,label:`转化目标`,children:(0,$.jsx)(VC,{placeholder:`请选择转化目标`,style:{borderRadius:8,height:40},options:A9.filter(e=>C===`AD`?e.name.startsWith(`AD_`):C===`QIANCHUAN`?e.name.startsWith(`QC_`):C===`LOCAL`?e.name.startsWith(`LOCAL_`):!0).map(e=>({value:e.name,label:(0,$.jsxs)(`span`,{children:[e.label,e.description&&(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:4},children:[`(`,e.description,`)`]})]})}))})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(mH.Item,{style:{flex:1},name:`cpa_bid`,label:`目标转化成本`,rules:[{type:`number`,min:1,max:1e4,message:`取值范围: 1-10000`}],getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(YU,{type:`number`,placeholder:`取值范围: 1-10000,精确到小数点后2位`,style:{borderRadius:8,height:40},min:1,max:1e4,step:.01})}),(0,$.jsx)(mH.Item,{style:{flex:1},name:`audience_gender`,label:`受众性别`,children:(0,$.jsx)(VC,{placeholder:`请选择受众性别`,style:{borderRadius:8,height:40},options:[{value:`ALL`,label:`不限`},{value:`MALE`,label:`男`},{value:`FEMALE`,label:`女`}]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(mH.Item,{style:{flex:1},name:`audience_age`,label:`受众年龄`,children:(0,$.jsx)(VC,{mode:`multiple`,placeholder:`请选择受众年龄(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:[{value:`ALL`,label:`不限`},{value:`18-23`,label:`18-23岁`},{value:`24-30`,label:`24-30岁`},{value:`31-40`,label:`31-40岁`},{value:`41-49`,label:`41-49岁`},{value:`50`,label:`50岁以上`}]})}),(0,$.jsx)(mH.Item,{style:{flex:1},name:`audience_network`,label:`网络类型`,children:(0,$.jsx)(VC,{mode:`multiple`,placeholder:`请选择网络类型(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:[{value:`ALL`,label:`不限`},{value:`5G`,label:`5G`},{value:`4G`,label:`4G`},{value:`3G`,label:`3G`},{value:`2G`,label:`2G`},{value:`WIFI`,label:`wifi`}]})})]}),(0,$.jsx)(mH.Item,{name:`audience_region`,label:`受众地区`,children:(0,$.jsx)(dR,{multiple:!0,placeholder:`请选择受众地区(可多选)`,style:{borderRadius:8,minHeight:40},options:D,maxTagCount:`responsive`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(mH.Item,{style:{flex:1},name:`cus_name`,label:`客户主体名称`,children:(0,$.jsx)(YU,{placeholder:`请输入客户主体名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(mH.Item,{style:{flex:1},name:`pricing_type`,label:`出价类型`,children:(0,$.jsx)(VC,{placeholder:`请选择出价类型`,style:{borderRadius:8,height:40},options:[{value:`OCPC`,label:`OCPC`},{value:`CPA`,label:`CPA`},{value:`OCPM`,label:`OCPM`}]})})]}),C==`AD`&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(mH.Item,{style:{flex:1},name:`cost_cap`,label:`是否最优成本出价`,initialValue:!1,children:(0,$.jsx)(VC,{placeholder:`是否最优成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(mH.Item,{style:{flex:1},name:`target_cost`,label:`是否稳定成本出价`,initialValue:!1,children:(0,$.jsx)(VC,{placeholder:`是否稳定成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(mH.Item,{style:{flex:1},name:`nobid`,label:`是否最大转化出价`,initialValue:!1,children:(0,$.jsx)(VC,{placeholder:`是否最大转化出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(mH.Item,{style:{flex:1},name:`cpc_bid`,label:`目标点击成本`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(YU,{type:`number`,placeholder:`请输入目标点击成本`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(mH.Item,{style:{flex:1},name:`budget`,label:`预算金额`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(YU,{type:`number`,placeholder:`请输入预算金额`,style:{borderRadius:8,height:40}})})]}),(0,$.jsx)(mH.Item,{name:`note`,label:`备注`,children:(0,$.jsx)(YU.TextArea,{placeholder:`请输入备注`,rows:2,style:{borderRadius:8}})}),(0,$.jsx)(mH.Item,{name:`is_default`,label:`默认模板`,initialValue:!1,children:(0,$.jsx)(VC,{placeholder:`请选择默认模板`,style:{borderRadius:8,height:40},options:[{value:!0,label:`是`},{value:!1,label:`否`}]})})]},`optional`)})]})})]})},j9=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},ele=e=>{let t=`https://ceshi.apiforeign.minzhongzc.com`;if(e.startsWith(`http://`)||e.startsWith(`https://`))return e;let n=e.startsWith(`/`)?e.slice(1):e;return`${t.endsWith(`/`)?t.slice(0,-1):t}/${n}`},tle=()=>{let{message:e}=nx.useApp(),t=Ye(),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(void 0),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(0),[v,y]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``}),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)([]),[T,E]=(0,S.useState)([]);(0,S.useEffect)(()=>{k(),O(),D()},[]);let D=async()=>{try{await F5()}catch{}},O=async()=>{try{let e=(await U5()).data||[],t={},n=[];e.forEach(e=>{t[e.openType]=e.typeName,n.push({value:e.openType,label:e.typeName})}),x(t),w(n),E(e)}catch(e){console.error(`加载开户方式列表失败:`,e)}},k=async(t=1,n=10,i=v)=>{s(!0);try{let e=await M5({page:t,page_size:n,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&r(e.data.data||e.data),e.pagination&&(_(e.pagination.total||0),p(e.pagination.page||1),h(e.pagination.pageSize||10))):r(e||[])}catch{e.error(`获取授权列表失败`)}finally{s(!1)}},A=()=>{l(!0)},j=async()=>{if(!u){e.warning(`请选择开户方式`);return}a(!0);try{let t=await j5({open_type:u});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{a(!1),l(!1),d(void 0)}},M=async t=>{try{let n=await j5({open_type:t.openType});n.authUrl?window.open(n.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`重新授权失败`)}},N=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权绑定账户ID`,dataIndex:`accountId`,key:`accountId`},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权登录账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:b[e]||e})},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,$.jsx)(vQ,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`授权有效时间`,dataIndex:`refreshTokenExpired`,key:`refreshTokenExpired`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:j9(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:j9(e)})},{title:`操作`,dataIndex:`action`,fixed:`right`,key:`action`,width:190,render:(e,n)=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{type:`link`,onClick:()=>t(`/authacc?oauth_id=${n.id}`),style:{color:`#6366f1`,padding:0},children:`查看授权账户`}),(0,$.jsx)(X,{type:`link`,onClick:()=>M(n),style:{color:`#00c49f`,padding:0,marginLeft:8},children:`重新授权`})]})}],P=n.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(A3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(YU,{placeholder:`授权绑定账户ID`,value:v.account_id,onChange:e=>y(t=>({...t,account_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{p(1),k(1,m)}}),(0,$.jsx)(YU,{placeholder:`授权登录账户用户ID`,value:v.account_userid,onChange:e=>y(t=>({...t,account_userid:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{p(1),k(1,m)}}),(0,$.jsx)(VC,{placeholder:`开户方式`,value:v.open_type,onChange:e=>y(t=>({...t,open_type:e})),style:{width:140},allowClear:!0,options:C}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:()=>{p(1),k(1,m)},children:`搜索`})]}),(0,$.jsx)(X,{type:`primary`,size:`medium`,icon:(0,$.jsx)(VI,{}),onClick:A,loading:i,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(aQ,{dataSource:P,columns:N,loading:o,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(FW,{current:f,pageSize:m,total:g,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{p(e),h(t),k(e,t)},size:`small`})})]}),(0,$.jsx)(DG,{title:`选择开户方式`,open:c,onOk:j,onCancel:()=>{l(!1),d(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:i,width:700,children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`,maxHeight:420,overflowY:`auto`},children:T.map(e=>(0,$.jsxs)(`div`,{onClick:()=>d(e.openType),style:{width:`calc(33.33% - 12px)`,cursor:`pointer`,borderRadius:12,border:`2px solid ${u===e.openType?`#6366f1`:`#e2e8f0`}`,padding:16,transition:`all 0.3s ease`,background:u===e.openType?`#f0f1ff`:`#fff`},children:[(0,$.jsx)(`div`,{style:{width:`100%`,height:48,marginBottom:12,borderRadius:8,overflow:`hidden`},children:e.thumb?(0,$.jsx)(`img`,{src:ele(e.thumb),alt:e.typeName,style:{width:`100%`,height:`100%`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Q.Text,{type:`secondary`,children:`暂无图片`})})}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:e.typeName}),(0,$.jsx)(`p`,{style:{fontSize:12,color:`#64748b`,marginTop:8,marginBottom:0,lineHeight:1.5},children:e.description})]},e.id))})})]})},nle=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},rle=()=>{let e=Ye(),[t]=On(),{message:n}=nx.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(0),[p,m]=(0,S.useState)({advertiser_id:``,oauth_id:``,advertiser_name:``}),[h,g]=(0,S.useState)({});(0,S.useEffect)(()=>{let e=t.get(`oauth_id`);e?(m(t=>({...t,oauth_id:e})),v(1,10,{...p,oauth_id:e})):v(),_()},[]);let _=async()=>{try{let e=(await U5()).data||[],t={},n=[];e.forEach(e=>{t[e.openType]=e.typeName,n.push({value:e.openType,label:e.typeName})}),g(t)}catch(e){console.error(`加载开户方式列表失败:`,e)}},v=async(e=1,t=10,r=p)=>{o(!0);try{let n=await boe({advertiser_id:r.advertiser_id||``,oauth_id:r.oauth_id||``,advertiser_name:r.advertiser_name||``,page:e,page_size:t});n?(n.data&&i(n.data.data||n.data),n.pagination&&(f(n.pagination.total||0),c(n.pagination.page||1),u(n.pagination.pageSize||10))):i(n||[])}catch{n.error(`获取授权列表失败`)}finally{o(!1)}},y=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`广告主账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:160},{title:`广告主账户名称`,dataIndex:`advertiserName`,key:`advertiserName`},{title:`广告主账户角色`,dataIndex:`advertiserRole`,key:`advertiserRole`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户登录账号ID`,dataIndex:`accountUserid`,key:`accountUserid`},{title:`授权账户登录账号名称`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权ID`,dataIndex:`oauthId`,key:`oauthId`},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:h[e]||e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:nle(e)})},{title:`操作`,fixed:`right`,dataIndex:`action`,key:`action`,render:(e,t)=>(0,$.jsx)(bV,{children:(0,$.jsx)(X,{size:`small`,danger:!0,onClick:()=>{DG.confirm({title:`确认删除`,content:`确定要删除该授权账户吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await xoe({id:t.id}),n.success(`删除成功`),v(s,l)}catch{n.error(`删除失败`)}}})},children:`删除`})})}],b=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/authorization`)},x=r.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(U0,{}),onClick:b}),(0,$.jsx)(A3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(YU,{placeholder:`广告主账户ID`,value:p.advertiser_id,onChange:e=>m(t=>({...t,advertiser_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(YU,{placeholder:`授权ID`,value:p.oauth_id,onChange:e=>m(t=>({...t,oauth_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(YU,{placeholder:`广告主账户名称`,value:p.advertiser_name,onChange:e=>m(t=>({...t,advertiser_name:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:()=>{c(1),v(1,l)},children:`搜索`})]})}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(aQ,{dataSource:x,columns:y,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(FW,{current:s,pageSize:l,total:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{c(e),u(t),v(e,t)},size:`small`})})]})]})},M9=[{key:`is_ad_high_quality_material`,label:`AD优质`,noLabel:`AD非优质素材`,unknownLabel:`AD未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_ecp_high_quality_material`,label:`千川优质`,noLabel:`千川非优质素材`,unknownLabel:`千川未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_local_high_quality_material`,label:`本地推优质`,noLabel:`本地推非优质`,unknownLabel:`本地推未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_inefficient_material`,label:`低效`,noLabel:`非低效`,unknownLabel:`是否低效未知`,yesColor:`red`,noColor:`green`,unknownColor:`default`},{key:`is_first_publish_material`,label:`首发`,noLabel:`非首发`,unknownLabel:`是否首发未知`,yesColor:`blue`,noColor:`default`,unknownColor:`default`}],ile=({preResult:e})=>{let[t,n]=(0,S.useState)(null),[r,i]=(0,S.useState)(!1);if(S.useEffect(()=>{if(!e){n(null),i(!1);return}try{n(JSON.parse(e)),i(!1)}catch{n(null),i(!0)}},[e]),!e||r||!t)return(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`-`});let a=e=>{let n=M9.find(t=>t.key===e);if(!n)return null;let r=t[e],i=r===`YES`,a=r===`NO`;if(r===`UNKNOWN`)return null;let o,s;return i?(o=n.label,s=n.yesColor):a&&(o=n.noLabel,s=n.noColor),{tag:(0,$.jsx)(vQ,{color:s,style:{marginRight:6,fontSize:12,borderRadius:4},children:o},e),detail:{label:n.label.replace(`优质`,`优质素材`),value:o,color:s}}};return(0,$.jsx)(zw,{content:(0,$.jsxs)(`div`,{style:{maxWidth:500,padding:`8px 0`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,color:`#1e293b`},children:`前测结果详情`}),(0,$.jsxs)(HB,{column:1,size:`small`,style:{marginBottom:12},children:[(0,$.jsx)(HB.Item,{label:`视频ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.video_id}),(0,$.jsx)(HB.Item,{label:`广告主ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.advertiser_id}),(0,$.jsx)(HB.Item,{label:`素材ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.material_id})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:8},children:`质量评估`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8,marginBottom:12},children:M9.map(e=>{let n=t[e.key],r=n===`YES`,i=n===`NO`;if(n===`UNKNOWN`)return null;let a,o;return r?(a=e.label,o=e.yesColor):i&&(a=e.noLabel,o=e.noColor),(0,$.jsx)(vQ,{color:o,style:{fontSize:12,borderRadius:4},children:a},e.key)})}),t.not_ad_high_quality_reason&&t.not_ad_high_quality_reason.length>0&&(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#ef4444`,display:`block`,marginBottom:8},children:`AD非优质原因`}),(0,$.jsx)(uG,{dataSource:t.not_ad_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(uG.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]}),t.not_ecp_high_quality_reason&&t.not_ecp_high_quality_reason.length>0&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#ef4444`,display:`block`,marginBottom:8},children:`千川非优质原因`}),(0,$.jsx)(uG,{dataSource:t.not_ecp_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(uG.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]})]}),title:null,trigger:`hover`,placement:`topLeft`,overlayStyle:{borderRadius:12,boxShadow:`0 8px 24px rgba(0,0,0,0.12)`},children:(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:4},children:M9.map(e=>a(e.key)?.tag)})})},ale=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},ole=e=>{if(!e)return``;let t=`https://ceshi.apiforeign.minzhongzc.com`,n=e.startsWith(`/`)?e.slice(1):e;return`${t.endsWith(`/`)?t.slice(0,-1):t}/${n}`},sle={image:{label:`图片`,color:`green`},video:{label:`视频`,color:`blue`}},cle={FAILED:{label:`失败`,color:`error`},PENDING:{label:`处理中`,color:`processing`},SUCCESS:{label:`成功`,color:`success`}},lle=()=>{let{message:e}=nx.useApp(),t=Ye(),n=S.createRef(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(1),[d,f]=(0,S.useState)(10),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(new Set),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(`image`),E=()=>{n.current&&(n.current.pause(),n.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),b(!1)},[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)([]),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)({advertiser_id:``,material_id:``,upload_id:``,file_name:``,resource_type:void 0});(0,S.useEffect)(()=>{F()},[]);let F=async(t=1,n=10,r=N)=>{c(!0);try{let e=await voe({advertiser_id:r.advertiser_id||void 0,material_id:r.material_id||void 0,upload_id:r.upload_id||void 0,file_name:r.file_name||void 0,resource_type:r.resource_type,page:t,page_size:n});e?.code===0?(o(e.data||[]),i(e.data||[]),m(e.total||0)):(o([]),m(0))}catch(t){e.error(`获取素材列表失败`),console.error(`获取素材列表失败:`,t)}finally{c(!1)}},I=[{title:`广告主ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:100},{title:`素材ID`,dataIndex:`materialId`,key:`materialId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`上传平台Id`,dataIndex:`uploadId`,key:`uploadId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`资源类型`,dataIndex:`resourceType`,key:`resourceType`,width:100,render:e=>{let t=sle[e];return(0,$.jsx)(vQ,{color:t?.color,children:t?.label||e})}},{title:`预览`,key:`preview`,width:100,render:(e,t)=>{let n=t.resource?.resourceUrl||t.resource?.remoteUrl;return n?(0,$.jsx)(X,{type:`link`,icon:(0,$.jsx)(DU,{}),onClick:()=>{C(ole(n)),T(t.resourceType===`video`?`video`:`image`),b(!0)},size:`small`,children:`查看`}):(0,$.jsx)(vQ,{children:`-`})}},{title:`文件名`,dataIndex:[`resource`,`fileName`],key:`fileName`,width:160,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:e||`-`})},{title:`文件大小`,dataIndex:[`resource`,`fileSizeBytes`],key:`fileSizeBytes`,ellipsis:!0,render:e=>`${(e/1024/1024).toFixed(2)} MB`},{title:`前测状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=cle[e];return(0,$.jsx)(vQ,{color:t?.color,children:t?.label||e||`-`})}},{title:`前测结果`,dataIndex:`preResult`,key:`preResult`,width:120,render:e=>(0,$.jsx)(ile,{preResult:e})},{title:`备注`,dataIndex:`note`,key:`note`,width:150,render:e=>(0,$.jsx)(YU.TextArea,{value:e||``,readOnly:!0,autoSize:{minRows:1,maxRows:4},style:{color:`#94a3b8`,resize:`none`,border:`none`,background:`transparent`,padding:0},placeholder:`-`})},{title:`用户ID`,dataIndex:`userId`,key:`userId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:e||`-`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:ale(e)})},{title:`操作`,fixed:`right`,key:`action`,render:(e,n)=>(0,$.jsx)(X,{type:`link`,onClick:()=>t(`/consume?advertiserId=${n.advertiserId}`),style:{color:`#6366f1`,padding:0},children:`查看消耗`})}],L=a.map((e,t)=>({...e,index:t+1,key:e.id})),R=async()=>{if(h.size===0){e.warning(`请先选择要推送的前测模板`);return}M(!0);try{let[e,t]=await Promise.all([N5({page:1,pageSize:100}),F5()]);A(e.data||[]),O(t.data?.id||``)}catch{e.error(`获取前测模板列表失败`)}finally{M(!1)}v(!0)},z=async()=>{if(h.size===0){e.warning(`请先选择要推送的素材`);return}if(!D){e.warning(`请选择前测模板`);return}try{await Coe({resources_material_ids:Array.from(h),pre_test_template_id:D}),e.success(`推送素材成功`),v(!1),g(new Set)}catch(t){e.error(t.message||`推送素材失败`)}},B=r.filter(e=>h.has(e.id));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(mX,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`素材列表`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[(0,$.jsx)(YU,{placeholder:`广告主ID`,value:N.advertiser_id,onChange:e=>P(t=>({...t,advertiser_id:e.target.value})),style:{width:150,borderRadius:8},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(YU,{placeholder:`素材ID`,value:N.material_id,onChange:e=>P(t=>({...t,material_id:e.target.value})),style:{width:150,borderRadius:8},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(YU,{placeholder:`上传ID`,value:N.upload_id,onChange:e=>P(t=>({...t,upload_id:e.target.value})),style:{width:150,borderRadius:8},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(YU,{placeholder:`文件名`,value:N.file_name,onChange:e=>P(t=>({...t,file_name:e.target.value})),style:{width:140,borderRadius:8},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(VC,{placeholder:`资源类型`,value:N.resource_type,onChange:e=>P(t=>({...t,resource_type:e})),style:{width:110,borderRadius:8},allowClear:!0,options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>{u(1),F(1,d)},style:{borderRadius:8,fontWeight:600,borderColor:`transparent`},children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(J6,{}),onClick:()=>t(`/generated?filterType=private_portrait&portraitTab=aigc_virtual`),style:{borderRadius:8,fontWeight:600,borderColor:`#8b5cf6`,color:`#7c3aed`,background:`#f5f3ff`},children:`私域虚拟人像库`}),(0,$.jsxs)(X,{type:`primary`,loading:j,onClick:R,disabled:h.size===0,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`},children:[`推送前测 `,h.size>0&&`(${h.size})`]})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(aQ,{dataSource:L,columns:I,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},rowSelection:{type:`checkbox`,selectedRowKeys:Array.from(h),onChange:e=>{g(new Set(e))}}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(FW,{current:l,pageSize:d,total:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{u(e),f(t),F(e,t)},size:`small`})})]}),(0,$.jsxs)(DG,{title:`推送前测`,open:_,onCancel:()=>{v(!1),g(new Set)},onOk:z,okText:`推送`,cancelText:`取消`,width:600,style:{borderRadius:16},children:[(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,marginBottom:24},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`前测模板:`}),(0,$.jsx)(VC,{value:D,onChange:e=>O(e),style:{width:200},loading:j,placeholder:`选择前测模板`,options:k.map(e=>({value:e.id,label:e.name}))})]})}),(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`,display:`block`,marginBottom:12},children:[`已选素材 (`,h.size,`)`]}),(0,$.jsx)(`div`,{style:{maxHeight:200,overflowY:`auto`},children:B.length>0?(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:B.map(e=>(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:12,background:`#f8fafc`,borderRadius:8},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:e.resource.fileName}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`ID: `,e.id]})]})},e.id))}):(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`},children:`暂无选中的前测模板`})})]})]}),(0,$.jsx)(DG,{title:`预览`,open:y,onCancel:E,footer:null,width:600,style:{borderRadius:16},children:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:400},children:w===`video`?(0,$.jsx)(`video`,{ref:n,src:x,controls:!0,style:{maxWidth:`100%`,maxHeight:400,borderRadius:8},autoPlay:!0}):(0,$.jsx)(`img`,{src:x,alt:`预览`,style:{maxWidth:`100%`,maxHeight:400,borderRadius:8}})})})]})},{Text:ule}=Q,dle=2,fle=15,N9=7,P9=160,F9=90;function I9(e){return String(e).padStart(2,`0`)}function L9(e){return Number.isFinite(e)?Math.max(0,Math.round(e)):0}function R9(e){let t=L9(e),n=Math.floor(t/60),r=t%60;return`${I9(n)}:${I9(r)}`}function z9(e,t,n){return Math.min(Math.max(e,t),n)}function ple(e,t){return e[0]===t[0]&&e[1]===t[1]}function B9(e,t,n=8e3){return new Promise((r,i)=>{let a,o=()=>{a&&window.clearTimeout(a),e.removeEventListener(t,s),e.removeEventListener(`error`,c)},s=()=>{o(),r()},c=()=>{o(),i(Error(`视频${t}失败`))};e.addEventListener(t,s,{once:!0}),e.addEventListener(`error`,c,{once:!0}),a=window.setTimeout(()=>{o(),i(Error(`视频${t}超时`))},n)})}function mle(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}async function hle(e,t){let n=Math.max(0,t);if(Math.abs(e.currentTime-n)>.01){let t=B9(e,`seeked`);e.currentTime=n,await t}await mle()}function gle(e,t,n){let r;try{r=e.getImageData(0,0,t,n).data}catch{return!1}let i=0,a=0;for(let e=0;e0&&a/i>=.85}async function _le(e,t,n,r,i){let a=Math.max(0,i-.05),o=Array.from(new Set([r,r+.2,r+.5,r+1,r+2].map(e=>Math.min(e,a)).filter(e=>e>=0&&e<=a)));for(let i of o)try{if(await hle(e,i),t.clearRect(0,0,P9,F9),t.drawImage(e,0,0,P9,F9),gle(t,P9,F9))continue;return{second:r,captureSecond:i,image:n.toDataURL(`image/jpeg`,.76),status:`success`,fallback:Math.abs(i-r)>.01}}catch{}return{second:r,image:``,status:`failed`}}function V9(e,t,n){return!e||e<=0?[0,t]:[0,Math.min(e,Math.max(t,Math.min(N9,n)))]}var vle=({open:e,videoUrl:t,title:n=`手动拆镜`,loading:r=!1,minDuration:i=dle,maxDuration:a=fle,onCancel:o,onConfirm:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(!1),u=(0,S.useRef)([0,i]),d=(0,S.useRef)(0),f=(0,S.useRef)(null),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)([0,i]),[y,b]=(0,S.useState)([]),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)(``),O=(0,S.useMemo)(()=>Math.max(0,Math.floor(p||0)),[p]),k=(0,S.useMemo)(()=>Math.max(0,_[1]-_[0]),[_]),A=O>0&&O{v(t=>{let n=typeof e==`function`?e(t):e;return ple(t,n)?t:(u.current=n,n)})},[]),M=(0,S.useCallback)(e=>{let t=L9(e);d.current!==t&&(d.current=t,g(t))},[]),N=(0,S.useCallback)(e=>{let t=c.current;if(!t||!O)return;let n=L9(z9(e,0,O));try{t.currentTime=n}catch{}M(n)},[O,M]);(0,S.useEffect)(()=>{if(!e){l.current=!0,T(!1),b([]),C(!1),m(0),M(0),D(``),j([0,i]),c.current&&c.current.pause();return}l.current=!1,T(!1),C(!0),b([]),m(0),M(0),D(``),j([0,i]);let n=document.createElement(`video`);return n.crossOrigin=`anonymous`,n.muted=!0,n.playsInline=!0,n.preload=`auto`,n.src=t,(async()=>{try{if(await B9(n,`loadedmetadata`),await B9(n,`loadeddata`).catch(()=>void 0),l.current)return;let e=Number.isFinite(n.duration)?n.duration:0,t=Math.max(0,Math.floor(e));if(m(e),j(V9(t,i,a)),!e||t<=0){D(`视频时长异常,无法抽取帧`);return}let r=document.createElement(`canvas`);r.width=P9,r.height=F9;let o=r.getContext(`2d`,{willReadFrequently:!0});if(!o){D(`当前浏览器不支持 Canvas 抽帧`);return}let s=Array.from({length:t},(e,t)=>({second:t,image:``,status:`loading`}));b(s);let c=[...s];for(let i=0;i{l.current=!0,n.pause(),n.removeAttribute(`src`),n.load()}},[e,t,i,a,M,j]);let P=(0,S.useCallback)(e=>{if(!O)return;D(``);let t=[Number(e[0]),Number(e[1])];j([Math.max(0,Math.min(O,t[0])),Math.max(t[0],Math.min(O,t[1]))])},[O,j]),F=(0,S.useCallback)(()=>{N(u.current[0])},[N]),I=(0,S.useCallback)(e=>{if(!O||A)return;let t=z9(k||Math.min(N9,a),i,Math.min(a,O)),n=z9(e,0,Math.max(0,O-t));n=L9(n);let r=[n,n+t];j(r),N(r[0])},[A,O,a,i,N,k,j]);return(0,$.jsx)(DG,{title:n,open:e,onCancel:o,width:Math.min(window.innerWidth-40,1400),destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:o,disabled:r,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:async()=>{if(!O||O<=0){D(`请等待视频加载完成`);return}if(A){D(`视频总时长不足 ${i} 秒,无法手动拆镜`);return}if(ka){D(`拆镜片段不能超过 ${a} 秒`);return}D(``),await s({startSecond:_[0],endSecond:_[1],durationSecond:k})},loading:r,disabled:r||A||!O,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:`确认拆镜`},`confirm`)],children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:18},children:[(0,$.jsx)(`style`,{children:` +`,document.head.appendChild(D9);function O9(e){if(!e)return`-`;let t=new Date(e);return isNaN(t.getTime())?`-`:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`}var k9=[{id:`AD_APP_ACTIVATE`,name:`AD_APP_ACTIVATE`,label:`应用-激活`,description:`应用激活行为`},{id:`AD_APP_AUTH`,name:`AD_APP_AUTH`,label:`应用-授信`,description:`应用授信行为`},{id:`AD_APP_BOOK`,name:`AD_APP_BOOK`,label:`应用-预约表单`,description:`应用预约表单`},{id:`AD_APP_BUY`,name:`AD_APP_BUY`,label:`应用-APP内付费`,description:`APP内付费行为`},{id:`AD_APP_CLICKS`,name:`AD_APP_CLICKS`,label:`应用-点击量`,description:`应用点击量`},{id:`AD_APP_DETAIL`,name:`AD_APP_DETAIL`,label:`应用-APP内详情页到站UV`,description:`APP内详情页到站UV`},{id:`AD_APP_DOWNLOADED`,name:`AD_APP_DOWNLOADED`,label:`应用-下载完成`,description:`应用下载完成`},{id:`AD_APP_INSTALLED`,name:`AD_APP_INSTALLED`,label:`应用-安装完成`,description:`应用安装完成`},{id:`AD_APP_KEY_BEHAVIOR`,name:`AD_APP_KEY_BEHAVIOR`,label:`应用-关键行为`,description:`应用关键行为`},{id:`AD_APP_ORDER`,name:`AD_APP_ORDER`,label:`应用-APP内下单`,description:`APP内下单行为`},{id:`AD_APP_PAY`,name:`AD_APP_PAY`,label:`应用-付费`,description:`应用付费行为`},{id:`AD_APP_PRE_AUTH`,name:`AD_APP_PRE_AUTH`,label:`应用-预授信`,description:`应用预授信行为`},{id:`AD_APP_PRE_DOWNLOAD`,name:`AD_APP_PRE_DOWNLOAD`,label:`应用-预约下载`,description:`应用预约下载`},{id:`AD_APP_PUSH_ORDER`,name:`AD_APP_PUSH_ORDER`,label:`应用-首次发单(乘客)`,description:`首次发单行为`},{id:`AD_APP_REGISTER`,name:`AD_APP_REGISTER`,label:`应用-注册`,description:`应用注册行为`},{id:`AD_APP_SHOW`,name:`AD_APP_SHOW`,label:`应用-展示量`,description:`应用展示量`},{id:`AD_APP_SUBMIT`,name:`AD_APP_SUBMIT`,label:`应用-提交认证`,description:`应用提交认证`},{id:`AD_APP_VIEW`,name:`AD_APP_VIEW`,label:`应用-APP内访问`,description:`APP内访问行为`},{id:`AD_CLUE_AUTH`,name:`AD_CLUE_AUTH`,label:`销售线索收集-授信`,description:`销售线索授信`},{id:`AD_CLUE_BUTTON`,name:`AD_CLUE_BUTTON`,label:`销售线索收集-按钮跳转`,description:`按钮跳转`},{id:`AD_CLUE_CLICKS`,name:`AD_CLUE_CLICKS`,label:`销售线索收集-点击量`,description:`点击量`},{id:`AD_CLUE_CONFIRM`,name:`AD_CLUE_CONFIRM`,label:`销售线索收集-回访-信息确认`,description:`回访信息确认`},{id:`AD_CLUE_CONSULT`,name:`AD_CLUE_CONSULT`,label:`销售线索收集-有效咨询`,description:`有效咨询`},{id:`AD_CLUE_CONSULT_MSG`,name:`AD_CLUE_CONSULT_MSG`,label:`销售线索收集-留资咨询`,description:`留资咨询`},{id:`AD_CLUE_COUPON`,name:`AD_CLUE_COUPON`,label:`销售线索收集-卡券领取`,description:`卡券领取`},{id:`AD_CLUE_CUSTOMER`,name:`AD_CLUE_CUSTOMER`,label:`销售线索收集-有效获客`,description:`有效获客`},{id:`AD_CLUE_CVT`,name:`AD_CLUE_CVT`,label:`销售线索收集-多转化`,description:`多转化`},{id:`AD_CLUE_DONE`,name:`AD_CLUE_DONE`,label:`销售线索收集-完件`,description:`完件`},{id:`AD_CLUE_FORM`,name:`AD_CLUE_FORM`,label:`销售线索收集-表单提交`,description:`表单提交`},{id:`AD_CLUE_FRIENDS`,name:`AD_CLUE_FRIENDS`,label:`销售线索收集-回访-加为好友`,description:`回访加为好友`},{id:`AD_CLUE_INSURANCE`,name:`AD_CLUE_INSURANCE`,label:`销售线索收集-保险支付`,description:`保险支付`},{id:`AD_CLUE_INTENTION`,name:`AD_CLUE_INTENTION`,label:`销售线索收集-存在意向`,description:`存在意向`},{id:`AD_CLUE_INTENTION_FORM`,name:`AD_CLUE_INTENTION_FORM`,label:`销售线索收集-意向表单`,description:`意向表单`},{id:`AD_CLUE_INTENTION_TEL`,name:`AD_CLUE_INTENTION_TEL`,label:`销售线索收集-意向话单`,description:`意向话单`},{id:`AD_CLUE_MESSAGE`,name:`AD_CLUE_MESSAGE`,label:`销售线索收集-私信消息`,description:`私信消息`},{id:`AD_CLUE_MONEY`,name:`AD_CLUE_MONEY`,label:`销售线索收集-放款`,description:`放款`},{id:`AD_CLUE_MSG`,name:`AD_CLUE_MSG`,label:`销售线索收集-私信留资`,description:`私信留资`},{id:`AD_CLUE_PAGE`,name:`AD_CLUE_PAGE`,label:`销售线索收集-访问目标页面`,description:`访问目标页面`},{id:`AD_CLUE_PAY`,name:`AD_CLUE_PAY`,label:`销售线索收集-付费`,description:`付费`},{id:`AD_CLUE_PRE_AUTH`,name:`AD_CLUE_PRE_AUTH`,label:`销售线索收集-预授信`,description:`预授信`},{id:`AD_CLUE_PROTENTIAL_DEAL`,name:`AD_CLUE_PROTENTIAL_DEAL`,label:`销售线索收集-回访-高潜成交`,description:`回访高潜成交`},{id:`AD_CLUE_PUSH_ORDER`,name:`AD_CLUE_PUSH_ORDER`,label:`销售线索收集-首次发单(乘客)`,description:`首次发单`},{id:`AD_CLUE_REGISTER`,name:`AD_CLUE_REGISTER`,label:`销售线索收集-注册`,description:`注册`},{id:`AD_CLUE_SHOW`,name:`AD_CLUE_SHOW`,label:`销售线索收集-展示量`,description:`展示量`},{id:`AD_CLUE_SUBMIT`,name:`AD_CLUE_SUBMIT`,label:`销售线索收集-提交认证`,description:`提交认证`},{id:`AD_CLUE_TEL`,name:`AD_CLUE_TEL`,label:`销售线索收集-智能电话确认接通`,description:`智能电话确认接通`},{id:`AD_CLUE_TEL_CALL`,name:`AD_CLUE_TEL_CALL`,label:`销售线索收集-电话接通`,description:`电话接通`},{id:`AD_CLUE_WX_ADD`,name:`AD_CLUE_WX_ADD`,label:`销售线索收集-微信-添加企业微信`,description:`添加企业微信`},{id:`AD_CLUE_WX_COPY`,name:`AD_CLUE_WX_COPY`,label:`销售线索收集-微信复制`,description:`微信复制`},{id:`AD_CLUE_WX_MSG`,name:`AD_CLUE_WX_MSG`,label:`销售线索收集-微信-用户首次消息`,description:`用户首次消息`},{id:`AD_ECP_APP_BUY`,name:`AD_ECP_APP_BUY`,label:`电商-app内下单`,description:`电商app内下单`},{id:`AD_ECP_APP_DETAIL`,name:`AD_ECP_APP_DETAIL`,label:`电商-app内详情页到站uv`,description:`电商app内详情页到站uv`},{id:`AD_ECP_APP_VIEW`,name:`AD_ECP_APP_VIEW`,label:`电商-app内访问`,description:`电商app内访问`},{id:`AD_ECP_BUTTON`,name:`AD_ECP_BUTTON`,label:`电商-按钮跳转`,description:`电商按钮跳转`},{id:`AD_ECP_INTEREST`,name:`AD_ECP_INTEREST`,label:`电商-引流电商种草`,description:`引流电商种草`},{id:`AD_ECP_SHOP`,name:`AD_ECP_SHOP`,label:`电商-调起店铺`,description:`调起店铺`},{id:`AD_ECP_SHOP_STAY`,name:`AD_ECP_SHOP_STAY`,label:`电商-店铺停留`,description:`店铺停留`},{id:`AD_MINIAPP_ACTIVATE`,name:`AD_MINIAPP_ACTIVATE`,label:`快应用-激活`,description:`快应用激活`},{id:`AD_MINIAPP_KEY_BEHAVIOR`,name:`AD_MINIAPP_KEY_BEHAVIOR`,label:`快应用-关键行为`,description:`快应用关键行为`},{id:`AD_MINIAPP_PAY`,name:`AD_MINIAPP_PAY`,label:`快应用-付费`,description:`快应用付费`},{id:`AD_MINIAPP_REGISTER`,name:`AD_MINIAPP_REGISTER`,label:`快应用-注册`,description:`快应用注册`},{id:`AD_NATIVE_ACTIVATE`,name:`AD_NATIVE_ACTIVATE`,label:`原声互动-激活`,description:`原声互动激活`},{id:`AD_NATIVE_CLICKS`,name:`AD_NATIVE_CLICKS`,label:`原声互动-组件点击`,description:`组件点击`},{id:`AD_NATIVE_FANS_GROUP`,name:`AD_NATIVE_FANS_GROUP`,label:`原声互动-粉丝入群`,description:`粉丝入群`},{id:`AD_NATIVE_FOLLOW`,name:`AD_NATIVE_FOLLOW`,label:`原声互动-帐号关注`,description:`帐号关注`},{id:`AD_NATIVE_INTERACTIVE`,name:`AD_NATIVE_INTERACTIVE`,label:`原声互动-互动`,description:`互动`},{id:`AD_NATIVE_LIVE`,name:`AD_NATIVE_LIVE`,label:`原声互动-预约直播`,description:`预约直播`},{id:`AD_NATIVE_LIVE_DONATE`,name:`AD_NATIVE_LIVE_DONATE`,label:`原声互动-直播间营销捐赠`,description:`直播间营销捐赠`},{id:`AD_NATIVE_LIVE_PAY`,name:`AD_NATIVE_LIVE_PAY`,label:`原声互动-直播间打赏`,description:`直播间打赏`},{id:`AD_NATIVE_LIVE_STAY`,name:`AD_NATIVE_LIVE_STAY`,label:`原声互动-直播间停留`,description:`直播间停留`},{id:`AD_NATIVE_LIVE_VIEW`,name:`AD_NATIVE_LIVE_VIEW`,label:`原声互动-直播间观看`,description:`直播间观看`},{id:`AD_NATIVE_PAY`,name:`AD_NATIVE_PAY`,label:`原声互动-付费`,description:`原声互动付费`},{id:`AD_PRODUCT_ACTIVATE`,name:`AD_PRODUCT_ACTIVATE`,label:`商品-激活`,description:`商品激活`},{id:`AD_PRODUCT_APP_BUY`,name:`AD_PRODUCT_APP_BUY`,label:`商品-app内下单`,description:`商品app内下单`},{id:`AD_PRODUCT_APP_DETAIL`,name:`AD_PRODUCT_APP_DETAIL`,label:`商品-app内详情页到站uv`,description:`商品app内详情页到站uv`},{id:`AD_PRODUCT_APP_PAY`,name:`AD_PRODUCT_APP_PAY`,label:`商品-app内付费`,description:`商品app内付费`},{id:`AD_PRODUCT_APP_VIEW`,name:`AD_PRODUCT_APP_VIEW`,label:`商品-app内访问`,description:`商品app内访问`},{id:`AD_PRODUCT_FORM`,name:`AD_PRODUCT_FORM`,label:`商品-表单提交`,description:`商品表单提交`},{id:`AD_PRODUCT_KEY_BEHAVIOR`,name:`AD_PRODUCT_KEY_BEHAVIOR`,label:`商品-关键行为`,description:`商品关键行为`},{id:`AD_PRODUCT_PAY`,name:`AD_PRODUCT_PAY`,label:`商品-付费`,description:`商品付费`},{id:`AD_TINYAPP_ACTIVATE`,name:`AD_TINYAPP_ACTIVATE`,label:`小程序-激活`,description:`小程序激活`},{id:`AD_TINYAPP_KEY_BEHAVIOR`,name:`AD_TINYAPP_KEY_BEHAVIOR`,label:`小程序-关键行为`,description:`小程序关键行为`},{id:`AD_TINYAPP_PAY`,name:`AD_TINYAPP_PAY`,label:`小程序-付费`,description:`小程序付费`},{id:`QC_LIVE_BUY`,name:`QC_LIVE_BUY`,label:`直播投放-直播间下单`,description:`直播间下单`},{id:`QC_LIVE_CHECK`,name:`QC_LIVE_CHECK`,label:`直播投放-直播间结算`,description:`直播间结算`},{id:`QC_LIVE_COMMENTS`,name:`QC_LIVE_COMMENTS`,label:`直播投放-直播间评论`,description:`直播间评论`},{id:`QC_LIVE_DEAL`,name:`QC_LIVE_DEAL`,label:`直播投放-直播间成交`,description:`直播间成交`},{id:`QC_LIVE_ENTRY`,name:`QC_LIVE_ENTRY`,label:`直播投放-进入直播间`,description:`进入直播间`},{id:`QC_LIVE_FANS`,name:`QC_LIVE_FANS`,label:`直播投放-直播间粉丝提升`,description:`直播间粉丝提升`},{id:`QC_LIVE_HIT`,name:`QC_LIVE_HIT`,label:`直播投放-直播加热`,description:`直播加热`},{id:`QC_LIVE_PRODUCT_CLICKS`,name:`QC_LIVE_PRODUCT_CLICKS`,label:`直播投放-直播间商品点击`,description:`直播间商品点击`},{id:`QC_LIVE_ROI_CHECK`,name:`QC_LIVE_ROI_CHECK`,label:`直播投放-结算roi`,description:`结算roi`},{id:`QC_LIVE_ROI_DEAL`,name:`QC_LIVE_ROI_DEAL`,label:`直播投放-支付roi-直播间成交`,description:`支付roi直播间成交`},{id:`QC_LIVE_ROI_QC`,name:`QC_LIVE_ROI_QC`,label:`直播投放-支付roi-千川直接+间接订单`,description:`支付roi千川订单`},{id:`QC_PRODUCT_BUY`,name:`QC_PRODUCT_BUY`,label:`商品投放-商品购买`,description:`商品购买`},{id:`QC_PRODUCT_COMMENTS`,name:`QC_PRODUCT_COMMENTS`,label:`商品投放-点赞评论`,description:`点赞评论`},{id:`QC_PRODUCT_FANS`,name:`QC_PRODUCT_FANS`,label:`商品投放-粉丝提升`,description:`粉丝提升`},{id:`QC_PRODUCT_INTEREST`,name:`QC_PRODUCT_INTEREST`,label:`商品投放-人群种草`,description:`人群种草`},{id:`QC_PRODUCT_QC`,name:`QC_PRODUCT_QC`,label:`商品投放-千川直接+间接订单`,description:`千川订单`},{id:`QC_PRODUCT_ROI`,name:`QC_PRODUCT_ROI`,label:`商品投放-商品支付roi`,description:`商品支付roi`}],$ce=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},ele=()=>{let{message:e}=ex.useApp(),[t,n]=(0,S.useState)([]),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(`create`),[d,f]=(0,S.useState)(null),[p]=pH.useForm(),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(1),[b,x]=(0,S.useState)(10),[C,w]=(0,S.useState)(`AD`),[T,E]=(0,S.useState)(void 0),[D,O]=(0,S.useState)([]),[k,A]=(0,S.useState)({}),[j,M]=(0,S.useState)({});(0,S.useEffect)(()=>{N()},[v,b]),(0,S.useEffect)(()=>{P()},[]);let N=async t=>{o(!0);try{let e=await M5({page:t?.page??v,pageSize:t?.pageSize??b,platform:t?.platform??T});n(e.data||[]),i(e.pagination?.total||0),y(e.pagination?.page||1),x(e.pagination?.pageSize||10)}catch{e.error(`获取前测列表失败`)}finally{o(!1)}},P=async()=>{try{let e=localStorage.getItem(`preTestAreaData`);if(e){let t=JSON.parse(e);O(t.areaOptions),A(t.cityCodeMap),M(t.provinceCityMap);return}let t=(await z5({level:`ONE_LEVEL`})).data||[],n={},r={},i=await Promise.all(t.map(async e=>{let t=[];try{t=((await z5({level:`TWO_LEVEL`,parent_code:e.code})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0}));let i=t.map(e=>e.value);r[e.code]=i,t.forEach(e=>{n[e.value]=e.label})}catch(t){console.error(`获取省份 ${e.name} 的城市失败`,t),r[e.code]=[]}return{value:e.code,label:e.name,isLeaf:!1,children:t}})),a={areaOptions:i,cityCodeMap:n,provinceCityMap:r};localStorage.setItem(`preTestAreaData`,JSON.stringify(a)),O(i),A(n),M(r)}catch{e.error(`获取省份信息失败`)}},F=async t=>{let n=t[t.length-1];n.loading=!0;try{n.children=((await z5({level:`TWO_LEVEL`,parent_code:n.value})).data||[]).map(e=>({value:e.code,label:e.name,isLeaf:!0})),n.loading=!1,O([...D])}catch{e.error(`获取城市信息失败`),n.loading=!1,O([...D])}},I=t.map((e,t)=>({...e,index:(v-1)*b+t+1,key:e.id})),L=[{title:`前测模板编号`,dataIndex:`id`,key:`id`,width:120,render:e=>(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#1e293b`,fontSize:13},children:e})},{title:`模板名称`,dataIndex:`name`,key:`name`,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500,fontSize:13},children:e})},{title:`平台`,dataIndex:`platform`,key:`platform`,render:e=>(0,$.jsx)(_Q,{color:e===`AD`?`blue`:e===`QIANCHUAN`?`green`:`orange`,style:{borderRadius:6,fontSize:12},children:e===`AD`?`AD`:e===`QIANCHUAN`?`千川`:`本地推`})},{title:`转化目标`,dataIndex:`externalAction`,key:`externalAction`,ellipsis:!0,width:200,render:e=>{if(!e)return(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`});let t=k9.find(t=>t.name===e.trim());return(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:t?t.label:e})}},{title:`目标转化成本`,dataIndex:`cpaBid`,key:`cpaBid`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`受众性别`,dataIndex:`audienceGender`,key:`audienceGender`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===`ALL`?`不限`:e===`MALE`?`男`:e===`FEMALE`?`女`:e||`-`})},{title:`受众年龄`,dataIndex:`audienceAge`,key:`audienceAge`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`受众地区`,dataIndex:`audienceRegion`,key:`audienceRegion`,ellipsis:!0,width:300,render:e=>{if(!Array.isArray(e)||e.length===0)return(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`-`});let t=e.map(e=>k[String(e)]||String(e));return(0,$.jsx)(JU.TextArea,{value:t.join(`, `)||`-`,readOnly:!0,autoSize:{minRows:1,maxRows:4},style:{resize:`none`,border:`none`,background:`transparent`,padding:0},placeholder:`-`})}},{title:`网络类型`,dataIndex:`audienceNetwork`,key:`audienceNetwork`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:Array.isArray(e)?e.join(`, `):e||`-`})},{title:`客户主体名称`,dataIndex:`cusName`,key:`cusName`,ellipsis:!0,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e||`-`})},{title:`出价类型`,dataIndex:`pricingType`,key:`pricingType`,width:90,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e||`-`})},{title:`目标点击成本`,dataIndex:`cpcBid`,key:`cpcBid`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`预算金额`,dataIndex:`budget`,key:`budget`,width:100,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontSize:13},children:e===void 0?`-`:e})},{title:`默认模板`,dataIndex:`isDefault`,key:`isDefault`,width:90,render:e=>(0,$.jsx)(_Q,{color:e?`green`:`default`,style:{borderRadius:6,fontSize:12},children:e?`是`:`否`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`,fontSize:12},children:$ce(e)})},{title:`操作`,dataIndex:`operation`,fixed:`right`,key:`operation`,render:(e,t)=>(0,$.jsxs)(yV,{size:4,children:[(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(EU,{}),style:{color:`#6366f1`,fontSize:12},onClick:()=>B(t),children:`详情`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)($Q,{}),style:{color:`#6366f1`,fontSize:12},onClick:()=>V(t),children:`编辑`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(jQ,{}),style:{color:`#ef4444`,fontSize:12},onClick:()=>H(t),children:`删除`})]})}],R=()=>{p.resetFields(),w(`AD`),u(`create`),f(null),c(!0)},z=async e=>{f(e),w(e.platform||`AD`);let t=e.audienceRegion||[],n=[];for(let e of t){let t=String(e);if(t.length>=6){let e=t.slice(0,2);F(e),n.push([e,t])}}p.setFieldsValue({name:e.name,note:e.note,platform:e.platform,external_action:e.externalAction,cpa_bid:e.cpaBid,audience_gender:e.audienceGender,audience_age:e.audienceAge||[],audience_region:n,audience_network:e.audienceNetwork||[],cus_name:e.cusName,pricing_type:e.pricingType,cost_cap:e.costCap===void 0?!1:e.costCap,target_cost:e.targetCost===void 0?!1:e.targetCost,nobid:e.nobid===void 0?!1:e.nobid,cpc_bid:e.cpcBid,budget:e.budget,is_default:e.isDefault===void 0?!1:e.isDefault})},B=async t=>{try{let e=(await N5(t.id)).data;u(`detail`),z(e),c(!0)}catch{e.error(`获取详情失败`)}},V=async t=>{try{let e=(await N5(t.id)).data;u(`edit`),z(e),c(!0)}catch{e.error(`获取详情失败`)}},H=t=>{EG.confirm({title:`确认删除`,content:`确定要删除该前测模板吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await qae(t.id),e.success(`删除成功`),N()}catch{e.error(`删除失败`)}}})};return(0,$.jsxs)(`div`,{style:{minHeight:`calc(100vh - 80px)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(wV,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`素材前测模板`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,alignItems:`center`},children:[(0,$.jsx)(zC,{placeholder:`投放平台`,value:T,onChange:e=>E(e),style:{width:140},allowClear:!0,options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>{y(1),N()},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(X,{type:`primary`,size:`medium`,icon:(0,$.jsx)(BI,{}),loading:a,onClick:R,style:{borderRadius:12,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99,102,241,0.3)`},children:`新增模板`})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:16,boxShadow:`0 4px 20px rgba(0,0,0,0.04)`,overflow:`hidden`},children:[(0,$.jsx)(iQ,{dataSource:I,columns:L,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},onRow:()=>({style:{cursor:`pointer`,transition:`background-color 0.15s`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#f8fafc`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`transparent`}})}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(PW,{current:v,pageSize:b,total:r,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,pageSizeOptions:[`10`,`20`,`50`,`100`],onChange:(e,t)=>{y(e),x(t)},size:`small`})})]}),(0,$.jsx)(EG,{title:(0,$.jsx)(yV,{children:l===`create`?`新增前测模板(选填项如填写需准确填写)`:l===`edit`?`编辑前测模板(选填项如填写需准确填写)`:`前测模板详情`}),open:s,onCancel:()=>{c(!1),p.resetFields(),w(`AD`)},onOk:async()=>{try{let t=await p.validateFields();_(!0);let n=[];(t.audience_region||[]).forEach(e=>{if(e.length===1){let t=j[e[0]]||[];n.push(...t)}else e.length>=2&&n.push(e[e.length-1])});let r={name:t.name,note:t.note,platform:t.platform,external_action:t.external_action,cpa_bid:t.cpa_bid||0,audience_gender:t.audience_gender,audience_age:t.audience_age||[],audience_region:n,audience_network:t.audience_network||[],cus_name:t.cus_name,pricing_type:t.pricing_type,cost_cap:t.cost_cap||!1,target_cost:t.target_cost||!1,nobid:t.nobid||!1,cpc_bid:t.cpc_bid||0,budget:t.budget||0,is_default:t.is_default||!1};l===`edit`&&d?(await Kae(d.id,r),e.success(`前测模板更新成功`)):(await Gae(r),e.success(`前测模板创建成功`)),c(!1),p.resetFields(),N()}catch(t){t?.message?e.error(t.message):t?.response?.data?.message?e.error(t.response.data.message):e.error(l===`edit`?`更新失败,请重试`:`创建失败,请重试`)}finally{_(!1)}},okText:l===`detail`?``:`提交`,cancelText:`取消`,width:720,height:600,confirmLoading:g,style:{borderRadius:16},footer:l===`detail`?null:void 0,children:(0,$.jsxs)(pH,{form:p,layout:`vertical`,style:{marginTop:16},disabled:l===`detail`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(pH.Item,{style:{flex:1},name:`name`,label:`模板名称`,rules:[{required:!0,message:`请输入模板名称`}],children:(0,$.jsx)(JU,{placeholder:`请输入模板名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(pH.Item,{style:{flex:1},name:`platform`,label:`平台`,initialValue:`AD`,rules:[{required:!0,message:`请选择平台`}],children:(0,$.jsx)(zC,{placeholder:`请选择平台`,style:{borderRadius:8,height:40},onChange:e=>{w(e)},options:[{value:`AD`,label:`AD`},{value:`QIANCHUAN`,label:`千川`},{value:`LOCAL`,label:`本地推`}]})})]}),(0,$.jsx)(a_,{defaultActiveKey:[],activeKey:m?[`optional`]:[],onChange:()=>h(!m),children:(0,$.jsxs)(a_.Panel,{header:`选填项`,children:[C!==`LOCAL`&&(0,$.jsx)(pH.Item,{name:`external_action`,label:`转化目标`,children:(0,$.jsx)(zC,{placeholder:`请选择转化目标`,style:{borderRadius:8,height:40},options:k9.filter(e=>C===`AD`?e.name.startsWith(`AD_`):C===`QIANCHUAN`?e.name.startsWith(`QC_`):C===`LOCAL`?e.name.startsWith(`LOCAL_`):!0).map(e=>({value:e.name,label:(0,$.jsxs)(`span`,{children:[e.label,e.description&&(0,$.jsxs)(Q.Text,{style:{color:`#94a3b8`,fontSize:12,marginLeft:4},children:[`(`,e.description,`)`]})]})}))})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(pH.Item,{style:{flex:1},name:`cpa_bid`,label:`目标转化成本`,rules:[{type:`number`,min:1,max:1e4,message:`取值范围: 1-10000`}],getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(JU,{type:`number`,placeholder:`取值范围: 1-10000,精确到小数点后2位`,style:{borderRadius:8,height:40},min:1,max:1e4,step:.01})}),(0,$.jsx)(pH.Item,{style:{flex:1},name:`audience_gender`,label:`受众性别`,children:(0,$.jsx)(zC,{placeholder:`请选择受众性别`,style:{borderRadius:8,height:40},options:[{value:`ALL`,label:`不限`},{value:`MALE`,label:`男`},{value:`FEMALE`,label:`女`}]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(pH.Item,{style:{flex:1},name:`audience_age`,label:`受众年龄`,children:(0,$.jsx)(zC,{mode:`multiple`,placeholder:`请选择受众年龄(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:[{value:`ALL`,label:`不限`},{value:`18-23`,label:`18-23岁`},{value:`24-30`,label:`24-30岁`},{value:`31-40`,label:`31-40岁`},{value:`41-49`,label:`41-49岁`},{value:`50`,label:`50岁以上`}]})}),(0,$.jsx)(pH.Item,{style:{flex:1},name:`audience_network`,label:`网络类型`,children:(0,$.jsx)(zC,{mode:`multiple`,placeholder:`请选择网络类型(可多选)`,style:{borderRadius:8,minHeight:40},maxTagCount:`responsive`,options:[{value:`ALL`,label:`不限`},{value:`5G`,label:`5G`},{value:`4G`,label:`4G`},{value:`3G`,label:`3G`},{value:`2G`,label:`2G`},{value:`WIFI`,label:`wifi`}]})})]}),(0,$.jsx)(pH.Item,{name:`audience_region`,label:`受众地区`,children:(0,$.jsx)(uR,{multiple:!0,placeholder:`请选择受众地区(可多选)`,style:{borderRadius:8,minHeight:40},options:D,maxTagCount:`responsive`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(pH.Item,{style:{flex:1},name:`cus_name`,label:`客户主体名称`,children:(0,$.jsx)(JU,{placeholder:`请输入客户主体名称`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(pH.Item,{style:{flex:1},name:`pricing_type`,label:`出价类型`,children:(0,$.jsx)(zC,{placeholder:`请选择出价类型`,style:{borderRadius:8,height:40},options:[{value:`OCPC`,label:`OCPC`},{value:`CPA`,label:`CPA`},{value:`OCPM`,label:`OCPM`}]})})]}),C==`AD`&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(pH.Item,{style:{flex:1},name:`cost_cap`,label:`是否最优成本出价`,initialValue:!1,children:(0,$.jsx)(zC,{placeholder:`是否最优成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(pH.Item,{style:{flex:1},name:`target_cost`,label:`是否稳定成本出价`,initialValue:!1,children:(0,$.jsx)(zC,{placeholder:`是否稳定成本出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})}),(0,$.jsx)(pH.Item,{style:{flex:1},name:`nobid`,label:`是否最大转化出价`,initialValue:!1,children:(0,$.jsx)(zC,{placeholder:`是否最大转化出价`,style:{borderRadius:8,height:40},options:[{value:!0,label:`开启`},{value:!1,label:`关闭`}]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16},children:[(0,$.jsx)(pH.Item,{style:{flex:1},name:`cpc_bid`,label:`目标点击成本`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(JU,{type:`number`,placeholder:`请输入目标点击成本`,style:{borderRadius:8,height:40}})}),(0,$.jsx)(pH.Item,{style:{flex:1},name:`budget`,label:`预算金额`,getValueFromEvent:e=>parseFloat(e.target.value)||void 0,children:(0,$.jsx)(JU,{type:`number`,placeholder:`请输入预算金额`,style:{borderRadius:8,height:40}})})]}),(0,$.jsx)(pH.Item,{name:`note`,label:`备注`,children:(0,$.jsx)(JU.TextArea,{placeholder:`请输入备注`,rows:2,style:{borderRadius:8}})}),(0,$.jsx)(pH.Item,{name:`is_default`,label:`默认模板`,initialValue:!1,children:(0,$.jsx)(zC,{placeholder:`请选择默认模板`,style:{borderRadius:8,height:40},options:[{value:!0,label:`是`},{value:!1,label:`否`}]})})]},`optional`)})]})})]})},A9=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},tle=e=>{let t=`https://ceshi.apiforeign.minzhongzc.com`;if(e.startsWith(`http://`)||e.startsWith(`https://`))return e;let n=e.startsWith(`/`)?e.slice(1):e;return`${t.endsWith(`/`)?t.slice(0,-1):t}/${n}`},nle=()=>{let{message:e}=ex.useApp(),t=Ye(),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(void 0),[f,p]=(0,S.useState)(1),[m,h]=(0,S.useState)(10),[g,_]=(0,S.useState)(0),[v,y]=(0,S.useState)({account_userid:``,open_type:void 0,account_id:``}),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)([]),[T,E]=(0,S.useState)([]);(0,S.useEffect)(()=>{k(),O(),D()},[]);let D=async()=>{try{await P5()}catch{}},O=async()=>{try{let e=(await H5()).data||[],t={},n=[];e.forEach(e=>{t[e.openType]=e.typeName,n.push({value:e.openType,label:e.typeName})}),x(t),w(n),E(e)}catch(e){console.error(`加载开户方式列表失败:`,e)}},k=async(t=1,n=10,i=v)=>{s(!0);try{let e=await j5({page:t,page_size:n,account_userid:i.account_userid||void 0,open_type:i.open_type,account_id:i.account_id||void 0});e?(e.data&&r(e.data.data||e.data),e.pagination&&(_(e.pagination.total||0),p(e.pagination.page||1),h(e.pagination.pageSize||10))):r(e||[])}catch{e.error(`获取授权列表失败`)}finally{s(!1)}},A=()=>{l(!0)},j=async()=>{if(!u){e.warning(`请选择开户方式`);return}a(!0);try{let t=await A5({open_type:u});t.authUrl?window.open(t.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`请求授权失败`)}finally{a(!1),l(!1),d(void 0)}},M=async t=>{try{let n=await A5({open_type:t.openType});n.authUrl?window.open(n.authUrl,`_blank`):e.error(`获取授权链接失败`)}catch{e.error(`重新授权失败`)}},N=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`授权绑定账户ID`,dataIndex:`accountId`,key:`accountId`},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权登录账户用户ID`,dataIndex:`accountUserid`,key:`accountUserid`,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`授权账户用户名`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:b[e]||e})},{title:`是否敏感物料授权`,dataIndex:`materialAuthStatus`,key:`materialAuthStatus`,width:100,render:e=>(0,$.jsx)(_Q,{color:e?`green`:`default`,children:e?`是`:`否`})},{title:`授权有效时间`,dataIndex:`refreshTokenExpired`,key:`refreshTokenExpired`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:A9(e)})},{title:`更新时间`,dataIndex:`updatedAt`,key:`updatedAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:A9(e)})},{title:`操作`,dataIndex:`action`,fixed:`right`,key:`action`,width:190,render:(e,n)=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{type:`link`,onClick:()=>t(`/authacc?oauth_id=${n.id}`),style:{color:`#6366f1`,padding:0},children:`查看授权账户`}),(0,$.jsx)(X,{type:`link`,onClick:()=>M(n),style:{color:`#00c49f`,padding:0,marginLeft:8},children:`重新授权`})]})}],P=n.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(k3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(JU,{placeholder:`授权绑定账户ID`,value:v.account_id,onChange:e=>y(t=>({...t,account_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{p(1),k(1,m)}}),(0,$.jsx)(JU,{placeholder:`授权登录账户用户ID`,value:v.account_userid,onChange:e=>y(t=>({...t,account_userid:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{p(1),k(1,m)}}),(0,$.jsx)(zC,{placeholder:`开户方式`,value:v.open_type,onChange:e=>y(t=>({...t,open_type:e})),style:{width:140},allowClear:!0,options:C}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:()=>{p(1),k(1,m)},children:`搜索`})]}),(0,$.jsx)(X,{type:`primary`,size:`medium`,icon:(0,$.jsx)(BI,{}),onClick:A,loading:i,style:{borderRadius:8,fontSize:14,fontWeight:500},children:`点击授权`})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(iQ,{dataSource:P,columns:N,loading:o,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(PW,{current:f,pageSize:m,total:g,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{p(e),h(t),k(e,t)},size:`small`})})]}),(0,$.jsx)(EG,{title:`选择开户方式`,open:c,onOk:j,onCancel:()=>{l(!1),d(void 0)},okText:`确认授权`,cancelText:`取消`,confirmLoading:i,width:700,children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,flexWrap:`wrap`,maxHeight:420,overflowY:`auto`},children:T.map(e=>(0,$.jsxs)(`div`,{onClick:()=>d(e.openType),style:{width:`calc(33.33% - 12px)`,cursor:`pointer`,borderRadius:12,border:`2px solid ${u===e.openType?`#6366f1`:`#e2e8f0`}`,padding:16,transition:`all 0.3s ease`,background:u===e.openType?`#f0f1ff`:`#fff`},children:[(0,$.jsx)(`div`,{style:{width:`100%`,height:48,marginBottom:12,borderRadius:8,overflow:`hidden`},children:e.thumb?(0,$.jsx)(`img`,{src:tle(e.thumb),alt:e.typeName,style:{width:`100%`,height:`100%`,display:`block`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,background:`#f1f5f9`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Q.Text,{type:`secondary`,children:`暂无图片`})})}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:e.typeName}),(0,$.jsx)(`p`,{style:{fontSize:12,color:`#64748b`,marginTop:8,marginBottom:0,lineHeight:1.5},children:e.description})]},e.id))})})]})},rle=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},ile=()=>{let e=Ye(),[t]=On(),{message:n}=ex.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(1),[l,u]=(0,S.useState)(10),[d,f]=(0,S.useState)(0),[p,m]=(0,S.useState)({advertiser_id:``,oauth_id:``,advertiser_name:``}),[h,g]=(0,S.useState)({});(0,S.useEffect)(()=>{let e=t.get(`oauth_id`);e?(m(t=>({...t,oauth_id:e})),v(1,10,{...p,oauth_id:e})):v(),_()},[]);let _=async()=>{try{let e=(await H5()).data||[],t={},n=[];e.forEach(e=>{t[e.openType]=e.typeName,n.push({value:e.openType,label:e.typeName})}),g(t)}catch(e){console.error(`加载开户方式列表失败:`,e)}},v=async(e=1,t=10,r=p)=>{o(!0);try{let n=await xoe({advertiser_id:r.advertiser_id||``,oauth_id:r.oauth_id||``,advertiser_name:r.advertiser_name||``,page:e,page_size:t});n?(n.data&&i(n.data.data||n.data),n.pagination&&(f(n.pagination.total||0),c(n.pagination.page||1),u(n.pagination.pageSize||10))):i(n||[])}catch{n.error(`获取授权列表失败`)}finally{o(!1)}},y=[{title:`ID`,dataIndex:`id`,key:`id`},{title:`广告主账户ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:160},{title:`广告主账户名称`,dataIndex:`advertiserName`,key:`advertiserName`},{title:`广告主账户角色`,dataIndex:`advertiserRole`,key:`advertiserRole`},{title:`授权账户ID`,dataIndex:`accountId`,key:`accountId`,width:160},{title:`授权账户名称`,dataIndex:`accountName`,key:`accountName`},{title:`授权账户角色`,dataIndex:`accountRole`,key:`accountRole`,render:e=>({ADVERTISER:`客户`,CUSTOMER_ADMIN:`普通版工作台-管理员`,CUSTOMER_OPERATOR:`普通版工作台-协作者`,AGENT:`代理商`,CHILD_AGENT:`二级代理商`,PLATFORM_ROLE_STAR:`星图账户`,PLATFORM_ROLE_SHOP_ACCOUNT:`抖音店铺账户`,PLATFORM_ROLE_QIANCHUAN_AGENT:`千川代理商`,PLATFORM_ROLE_STAR_AGENT:`星图代理商`,PLATFORM_ROLE_AWEME:`抖音号`,PLATFORM_ROLE_STAR_MCN:`星图MCN机构`,PLATFORM_ROLE_STAR_ISV:`星图服务商`,AGENT_SYSTEM_ACCOUNT:`代理商系统账户`,PLATFORM_ROLE_LOCAL_AGENT:`本地推代理商`,PLATFORM_ROLE_YUNTU_BRAND_ISV_ADMIN:`云图品牌服务商管理员`,PLATFORM_ROLE_LIFE:`抖音来客账户`,PLATFORM_ROLE_ENTERPRISE_BP_ADMIN:`升级版工作台管理员`,PLATFORM_ROLE_ENTERPRISE_BP_OPERATOR:`升级版工作台协作者`})[e]||e},{title:`授权账户登录账号ID`,dataIndex:`accountUserid`,key:`accountUserid`},{title:`授权账户登录账号名称`,dataIndex:`accountUsername`,key:`accountUsername`},{title:`授权ID`,dataIndex:`oauthId`,key:`oauthId`},{title:`开户方式`,dataIndex:`openType`,key:`openType`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:h[e]||e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:rle(e)})},{title:`操作`,fixed:`right`,dataIndex:`action`,key:`action`,render:(e,t)=>(0,$.jsx)(yV,{children:(0,$.jsx)(X,{size:`small`,danger:!0,onClick:()=>{EG.confirm({title:`确认删除`,content:`确定要删除该授权账户吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await Soe({id:t.id}),n.success(`删除成功`),v(s,l)}catch{n.error(`删除失败`)}}})},children:`删除`})})}],b=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/authorization`)},x=r.map((e,t)=>({...e,index:t+1,key:e.id}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(H0,{}),onClick:b}),(0,$.jsx)(k3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`授权管理`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(JU,{placeholder:`广告主账户ID`,value:p.advertiser_id,onChange:e=>m(t=>({...t,advertiser_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(JU,{placeholder:`授权ID`,value:p.oauth_id,onChange:e=>m(t=>({...t,oauth_id:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(JU,{placeholder:`广告主账户名称`,value:p.advertiser_name,onChange:e=>m(t=>({...t,advertiser_name:e.target.value})),style:{width:180},allowClear:!0,onPressEnter:()=>{c(1),v(1,l)}}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:()=>{c(1),v(1,l)},children:`搜索`})]})}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(iQ,{dataSource:x,columns:y,loading:a,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(PW,{current:s,pageSize:l,total:d,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{c(e),u(t),v(e,t)},size:`small`})})]})]})},j9=[{key:`is_ad_high_quality_material`,label:`AD优质`,noLabel:`AD非优质素材`,unknownLabel:`AD未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_ecp_high_quality_material`,label:`千川优质`,noLabel:`千川非优质素材`,unknownLabel:`千川未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_local_high_quality_material`,label:`本地推优质`,noLabel:`本地推非优质`,unknownLabel:`本地推未知`,yesColor:`green`,noColor:`red`,unknownColor:`default`},{key:`is_inefficient_material`,label:`低效`,noLabel:`非低效`,unknownLabel:`是否低效未知`,yesColor:`red`,noColor:`green`,unknownColor:`default`},{key:`is_first_publish_material`,label:`首发`,noLabel:`非首发`,unknownLabel:`是否首发未知`,yesColor:`blue`,noColor:`default`,unknownColor:`default`}],ale=({preResult:e})=>{let[t,n]=(0,S.useState)(null),[r,i]=(0,S.useState)(!1);if(S.useEffect(()=>{if(!e){n(null),i(!1);return}try{n(JSON.parse(e)),i(!1)}catch{n(null),i(!0)}},[e]),!e||r||!t)return(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`-`});let a=e=>{let n=j9.find(t=>t.key===e);if(!n)return null;let r=t[e],i=r===`YES`,a=r===`NO`;if(r===`UNKNOWN`)return null;let o,s;return i?(o=n.label,s=n.yesColor):a&&(o=n.noLabel,s=n.noColor),{tag:(0,$.jsx)(_Q,{color:s,style:{marginRight:6,fontSize:12,borderRadius:4},children:o},e),detail:{label:n.label.replace(`优质`,`优质素材`),value:o,color:s}}};return(0,$.jsx)(Lw,{content:(0,$.jsxs)(`div`,{style:{maxWidth:500,padding:`8px 0`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,display:`block`,marginBottom:12,color:`#1e293b`},children:`前测结果详情`}),(0,$.jsxs)(VB,{column:1,size:`small`,style:{marginBottom:12},children:[(0,$.jsx)(VB.Item,{label:`视频ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.video_id}),(0,$.jsx)(VB.Item,{label:`广告主ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.advertiser_id}),(0,$.jsx)(VB.Item,{label:`素材ID`,labelStyle:{fontWeight:500,color:`#64748b`},contentStyle:{color:`#1e293b`},children:t.material_id})]}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#64748b`,display:`block`,marginBottom:8},children:`质量评估`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8,marginBottom:12},children:j9.map(e=>{let n=t[e.key],r=n===`YES`,i=n===`NO`;if(n===`UNKNOWN`)return null;let a,o;return r?(a=e.label,o=e.yesColor):i&&(a=e.noLabel,o=e.noColor),(0,$.jsx)(_Q,{color:o,style:{fontSize:12,borderRadius:4},children:a},e.key)})}),t.not_ad_high_quality_reason&&t.not_ad_high_quality_reason.length>0&&(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#ef4444`,display:`block`,marginBottom:8},children:`AD非优质原因`}),(0,$.jsx)(lG,{dataSource:t.not_ad_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(lG.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]}),t.not_ecp_high_quality_reason&&t.not_ecp_high_quality_reason.length>0&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:12,color:`#ef4444`,display:`block`,marginBottom:8},children:`千川非优质原因`}),(0,$.jsx)(lG,{dataSource:t.not_ecp_high_quality_reason,renderItem:(e,t)=>(0,$.jsxs)(lG.Item,{style:{padding:`4px 0`,fontSize:12,color:`#64748b`},children:[t+1,`. `,e]},t),size:`small`})]})]}),title:null,trigger:`hover`,placement:`topLeft`,overlayStyle:{borderRadius:12,boxShadow:`0 8px 24px rgba(0,0,0,0.12)`},children:(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:4},children:j9.map(e=>a(e.key)?.tag)})})},ole=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},sle=e=>{if(!e)return``;let t=`https://ceshi.apiforeign.minzhongzc.com`,n=e.startsWith(`/`)?e.slice(1):e;return`${t.endsWith(`/`)?t.slice(0,-1):t}/${n}`},cle={image:{label:`图片`,color:`green`},video:{label:`视频`,color:`blue`}},lle={FAILED:{label:`失败`,color:`error`},PENDING:{label:`处理中`,color:`processing`},SUCCESS:{label:`成功`,color:`success`}},ule=()=>{let{message:e}=ex.useApp(),t=Ye(),n=S.createRef(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(1),[d,f]=(0,S.useState)(10),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(new Set),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(!1),[x,C]=(0,S.useState)(``),[w,T]=(0,S.useState)(`image`),E=()=>{n.current&&(n.current.pause(),n.current.currentTime=0),document.querySelectorAll(`video`).forEach(e=>{e.pause(),e.currentTime=0}),b(!1)},[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)([]),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)({advertiser_id:``,material_id:``,upload_id:``,file_name:``,resource_type:void 0});(0,S.useEffect)(()=>{F()},[]);let F=async(t=1,n=10,r=N)=>{c(!0);try{let e=await yoe({advertiser_id:r.advertiser_id||void 0,material_id:r.material_id||void 0,upload_id:r.upload_id||void 0,file_name:r.file_name||void 0,resource_type:r.resource_type,page:t,page_size:n});e?.code===0?(o(e.data||[]),i(e.data||[]),m(e.total||0)):(o([]),m(0))}catch(t){e.error(`获取素材列表失败`),console.error(`获取素材列表失败:`,t)}finally{c(!1)}},I=[{title:`广告主ID`,dataIndex:`advertiserId`,key:`advertiserId`,width:100},{title:`素材ID`,dataIndex:`materialId`,key:`materialId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`上传平台Id`,dataIndex:`uploadId`,key:`uploadId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:e?`#1e293b`:`#94a3b8`},children:e||`-`})},{title:`资源类型`,dataIndex:`resourceType`,key:`resourceType`,width:100,render:e=>{let t=cle[e];return(0,$.jsx)(_Q,{color:t?.color,children:t?.label||e})}},{title:`预览`,key:`preview`,width:100,render:(e,t)=>{let n=t.resource?.resourceUrl||t.resource?.remoteUrl;return n?(0,$.jsx)(X,{type:`link`,icon:(0,$.jsx)(EU,{}),onClick:()=>{C(sle(n)),T(t.resourceType===`video`?`video`:`image`),b(!0)},size:`small`,children:`查看`}):(0,$.jsx)(_Q,{children:`-`})}},{title:`文件名`,dataIndex:[`resource`,`fileName`],key:`fileName`,width:160,ellipsis:!0,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:e||`-`})},{title:`文件大小`,dataIndex:[`resource`,`fileSizeBytes`],key:`fileSizeBytes`,ellipsis:!0,render:e=>`${(e/1024/1024).toFixed(2)} MB`},{title:`前测状态`,dataIndex:`status`,key:`status`,width:100,render:e=>{let t=lle[e];return(0,$.jsx)(_Q,{color:t?.color,children:t?.label||e||`-`})}},{title:`前测结果`,dataIndex:`preResult`,key:`preResult`,width:120,render:e=>(0,$.jsx)(ale,{preResult:e})},{title:`备注`,dataIndex:`note`,key:`note`,width:150,render:e=>(0,$.jsx)(JU.TextArea,{value:e||``,readOnly:!0,autoSize:{minRows:1,maxRows:4},style:{color:`#94a3b8`,resize:`none`,border:`none`,background:`transparent`,padding:0},placeholder:`-`})},{title:`用户ID`,dataIndex:`userId`,key:`userId`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:e||`-`})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,width:160,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:ole(e)})},{title:`操作`,fixed:`right`,key:`action`,render:(e,n)=>(0,$.jsx)(X,{type:`link`,onClick:()=>t(`/consume?advertiserId=${n.advertiserId}`),style:{color:`#6366f1`,padding:0},children:`查看消耗`})}],L=a.map((e,t)=>({...e,index:t+1,key:e.id})),R=async()=>{if(h.size===0){e.warning(`请先选择要推送的前测模板`);return}M(!0);try{let[e,t]=await Promise.all([M5({page:1,pageSize:100}),P5()]);A(e.data||[]),O(t.data?.id||``)}catch{e.error(`获取前测模板列表失败`)}finally{M(!1)}v(!0)},z=async()=>{if(h.size===0){e.warning(`请先选择要推送的素材`);return}if(!D){e.warning(`请选择前测模板`);return}try{await woe({resources_material_ids:Array.from(h),pre_test_template_id:D}),e.success(`推送素材成功`),v(!1),g(new Set)}catch(t){e.error(t.message||`推送素材失败`)}},B=r.filter(e=>h.has(e.id));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[(0,$.jsx)(pX,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`素材列表`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[(0,$.jsx)(JU,{placeholder:`广告主ID`,value:N.advertiser_id,onChange:e=>P(t=>({...t,advertiser_id:e.target.value})),style:{width:150,borderRadius:8},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(JU,{placeholder:`素材ID`,value:N.material_id,onChange:e=>P(t=>({...t,material_id:e.target.value})),style:{width:150,borderRadius:8},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(JU,{placeholder:`上传ID`,value:N.upload_id,onChange:e=>P(t=>({...t,upload_id:e.target.value})),style:{width:150,borderRadius:8},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(JU,{placeholder:`文件名`,value:N.file_name,onChange:e=>P(t=>({...t,file_name:e.target.value})),style:{width:140,borderRadius:8},allowClear:!0,onPressEnter:()=>{u(1),F(1,d)}}),(0,$.jsx)(zC,{placeholder:`资源类型`,value:N.resource_type,onChange:e=>P(t=>({...t,resource_type:e})),style:{width:110,borderRadius:8},allowClear:!0,options:[{value:`image`,label:`图片`},{value:`video`,label:`视频`}]}),(0,$.jsx)(X,{type:`primary`,onClick:()=>{u(1),F(1,d)},style:{borderRadius:8,fontWeight:600,borderColor:`transparent`},children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(q6,{}),onClick:()=>t(`/generated?filterType=private_portrait&portraitTab=aigc_virtual`),style:{borderRadius:8,fontWeight:600,borderColor:`#8b5cf6`,color:`#7c3aed`,background:`#f5f3ff`},children:`私域虚拟人像库`}),(0,$.jsxs)(X,{type:`primary`,loading:j,onClick:R,disabled:h.size===0,style:{borderRadius:8,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,color:`#fff`},children:[`推送前测 `,h.size>0&&`(${h.size})`]})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(iQ,{dataSource:L,columns:I,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`},rowSelection:{type:`checkbox`,selectedRowKeys:Array.from(h),onChange:e=>{g(new Set(e))}}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(PW,{current:l,pageSize:d,total:p,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{u(e),f(t),F(e,t)},size:`small`})})]}),(0,$.jsxs)(EG,{title:`推送前测`,open:_,onCancel:()=>{v(!1),g(new Set)},onOk:z,okText:`推送`,cancelText:`取消`,width:600,style:{borderRadius:16},children:[(0,$.jsx)(`div`,{style:{display:`flex`,gap:16,marginBottom:24},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(Q.Text,{style:{fontSize:14,color:`#475569`},children:`前测模板:`}),(0,$.jsx)(zC,{value:D,onChange:e=>O(e),style:{width:200},loading:j,placeholder:`选择前测模板`,options:k.map(e=>({value:e.id,label:e.name}))})]})}),(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`,display:`block`,marginBottom:12},children:[`已选素材 (`,h.size,`)`]}),(0,$.jsx)(`div`,{style:{maxHeight:200,overflowY:`auto`},children:B.length>0?(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:B.map(e=>(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:12,background:`#f8fafc`,borderRadius:8},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:e.resource.fileName}),(0,$.jsxs)(Q.Text,{style:{fontSize:12,color:`#94a3b8`},children:[`ID: `,e.id]})]})},e.id))}):(0,$.jsx)(Q.Text,{style:{color:`#94a3b8`},children:`暂无选中的前测模板`})})]})]}),(0,$.jsx)(EG,{title:`预览`,open:y,onCancel:E,footer:null,width:600,style:{borderRadius:16},children:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:400},children:w===`video`?(0,$.jsx)(`video`,{ref:n,src:x,controls:!0,style:{maxWidth:`100%`,maxHeight:400,borderRadius:8},autoPlay:!0}):(0,$.jsx)(`img`,{src:x,alt:`预览`,style:{maxWidth:`100%`,maxHeight:400,borderRadius:8}})})})]})},{Text:dle}=Q,fle=2,ple=15,M9=7,N9=160,P9=90;function F9(e){return String(e).padStart(2,`0`)}function I9(e){return Number.isFinite(e)?Math.max(0,Math.round(e)):0}function L9(e){let t=I9(e),n=Math.floor(t/60),r=t%60;return`${F9(n)}:${F9(r)}`}function R9(e,t,n){return Math.min(Math.max(e,t),n)}function mle(e,t){return e[0]===t[0]&&e[1]===t[1]}function z9(e,t,n=8e3){return new Promise((r,i)=>{let a,o=()=>{a&&window.clearTimeout(a),e.removeEventListener(t,s),e.removeEventListener(`error`,c)},s=()=>{o(),r()},c=()=>{o(),i(Error(`视频${t}失败`))};e.addEventListener(t,s,{once:!0}),e.addEventListener(`error`,c,{once:!0}),a=window.setTimeout(()=>{o(),i(Error(`视频${t}超时`))},n)})}function hle(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}async function gle(e,t){let n=Math.max(0,t);if(Math.abs(e.currentTime-n)>.01){let t=z9(e,`seeked`);e.currentTime=n,await t}await hle()}function _le(e,t,n){let r;try{r=e.getImageData(0,0,t,n).data}catch{return!1}let i=0,a=0;for(let e=0;e0&&a/i>=.85}async function vle(e,t,n,r,i){let a=Math.max(0,i-.05),o=Array.from(new Set([r,r+.2,r+.5,r+1,r+2].map(e=>Math.min(e,a)).filter(e=>e>=0&&e<=a)));for(let i of o)try{if(await gle(e,i),t.clearRect(0,0,N9,P9),t.drawImage(e,0,0,N9,P9),_le(t,N9,P9))continue;return{second:r,captureSecond:i,image:n.toDataURL(`image/jpeg`,.76),status:`success`,fallback:Math.abs(i-r)>.01}}catch{}return{second:r,image:``,status:`failed`}}function B9(e,t,n){return!e||e<=0?[0,t]:[0,Math.min(e,Math.max(t,Math.min(M9,n)))]}var yle=({open:e,videoUrl:t,title:n=`手动拆镜`,loading:r=!1,minDuration:i=fle,maxDuration:a=ple,onCancel:o,onConfirm:s})=>{let c=(0,S.useRef)(null),l=(0,S.useRef)(!1),u=(0,S.useRef)([0,i]),d=(0,S.useRef)(0),f=(0,S.useRef)(null),[p,m]=(0,S.useState)(0),[h,g]=(0,S.useState)(0),[_,v]=(0,S.useState)([0,i]),[y,b]=(0,S.useState)([]),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)(``),O=(0,S.useMemo)(()=>Math.max(0,Math.floor(p||0)),[p]),k=(0,S.useMemo)(()=>Math.max(0,_[1]-_[0]),[_]),A=O>0&&O{v(t=>{let n=typeof e==`function`?e(t):e;return mle(t,n)?t:(u.current=n,n)})},[]),M=(0,S.useCallback)(e=>{let t=I9(e);d.current!==t&&(d.current=t,g(t))},[]),N=(0,S.useCallback)(e=>{let t=c.current;if(!t||!O)return;let n=I9(R9(e,0,O));try{t.currentTime=n}catch{}M(n)},[O,M]);(0,S.useEffect)(()=>{if(!e){l.current=!0,T(!1),b([]),C(!1),m(0),M(0),D(``),j([0,i]),c.current&&c.current.pause();return}l.current=!1,T(!1),C(!0),b([]),m(0),M(0),D(``),j([0,i]);let n=document.createElement(`video`);return n.crossOrigin=`anonymous`,n.muted=!0,n.playsInline=!0,n.preload=`auto`,n.src=t,(async()=>{try{if(await z9(n,`loadedmetadata`),await z9(n,`loadeddata`).catch(()=>void 0),l.current)return;let e=Number.isFinite(n.duration)?n.duration:0,t=Math.max(0,Math.floor(e));if(m(e),j(B9(t,i,a)),!e||t<=0){D(`视频时长异常,无法抽取帧`);return}let r=document.createElement(`canvas`);r.width=N9,r.height=P9;let o=r.getContext(`2d`,{willReadFrequently:!0});if(!o){D(`当前浏览器不支持 Canvas 抽帧`);return}let s=Array.from({length:t},(e,t)=>({second:t,image:``,status:`loading`}));b(s);let c=[...s];for(let i=0;i{l.current=!0,n.pause(),n.removeAttribute(`src`),n.load()}},[e,t,i,a,M,j]);let P=(0,S.useCallback)(e=>{if(!O)return;D(``);let t=[Number(e[0]),Number(e[1])];j([Math.max(0,Math.min(O,t[0])),Math.max(t[0],Math.min(O,t[1]))])},[O,j]),F=(0,S.useCallback)(()=>{N(u.current[0])},[N]),I=(0,S.useCallback)(e=>{if(!O||A)return;let t=R9(k||Math.min(M9,a),i,Math.min(a,O)),n=R9(e,0,Math.max(0,O-t));n=I9(n);let r=[n,n+t];j(r),N(r[0])},[A,O,a,i,N,k,j]);return(0,$.jsx)(EG,{title:n,open:e,onCancel:o,width:Math.min(window.innerWidth-40,1400),destroyOnHidden:!0,footer:[(0,$.jsx)(X,{onClick:o,disabled:r,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:async()=>{if(!O||O<=0){D(`请等待视频加载完成`);return}if(A){D(`视频总时长不足 ${i} 秒,无法手动拆镜`);return}if(ka){D(`拆镜片段不能超过 ${a} 秒`);return}D(``),await s({startSecond:_[0],endSecond:_[1],durationSecond:k})},loading:r,disabled:r||A||!O,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},children:`确认拆镜`},`confirm`)],children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:18},children:[(0,$.jsx)(`style`,{children:` .ant-slider-handle::after { height: 80px !important; width: 10px !important; @@ -606,8 +606,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho height: 80px !important; margin-top: -37px !important; } - `}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,background:`#fff`,borderRadius:16,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:c,src:t,crossOrigin:`anonymous`,preload:`metadata`,playsInline:!0,onLoadedMetadata:e=>{let t=Number.isFinite(e.currentTarget.duration)?e.currentTarget.duration:0;if(!t)return;let n=Math.max(0,Math.floor(t));m(e=>Math.floor(e||0)===n?e:t),j(e=>e[1]>i||e[0]!==0?e:V9(n,i,a))},onTimeUpdate:()=>{let e=c.current;e&&(M(L9(e.currentTime||0)),w&&e.currentTime>=u.current[1]&&(e.pause(),e.currentTime=u.current[1],M(u.current[1]),T(!1)))},onPause:()=>T(!1),style:{maxHeight:320,objectFit:`contain`,background:`#111`}})}),(0,$.jsxs)(`div`,{style:{borderRadius:20,background:`#f0f5ff`,padding:`20px 24px`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:16,marginBottom:18},children:[(0,$.jsx)(X,{type:`text`,icon:w?(0,$.jsx)(o6,{}):(0,$.jsx)(A6,{}),onClick:async()=>{let e=c.current;if(!(!e||!O)){if(w){e.pause(),T(!1);return}(e.currentTime<_[0]||e.currentTime>=_[1])&&(e.currentTime=_[0],M(_[0]));try{await e.play(),T(!0),D(``)}catch{D(`视频播放失败,请检查视频地址`)}}},disabled:!O||A,style:{fontSize:20,color:`#1e293b`,padding:0}}),(0,$.jsxs)(`span`,{style:{fontSize:18,color:`#1e293b`,fontFamily:`monospace`},children:[R9(h),` / `,R9(O)]})]}),(0,$.jsxs)(`div`,{ref:f,style:{overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,msOverflowStyle:`none`,padding:`0 6px`},children:[(0,$.jsx)(`style`,{children:` + `}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,background:`#fff`,borderRadius:16,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:c,src:t,crossOrigin:`anonymous`,preload:`metadata`,playsInline:!0,onLoadedMetadata:e=>{let t=Number.isFinite(e.currentTarget.duration)?e.currentTarget.duration:0;if(!t)return;let n=Math.max(0,Math.floor(t));m(e=>Math.floor(e||0)===n?e:t),j(e=>e[1]>i||e[0]!==0?e:B9(n,i,a))},onTimeUpdate:()=>{let e=c.current;e&&(M(I9(e.currentTime||0)),w&&e.currentTime>=u.current[1]&&(e.pause(),e.currentTime=u.current[1],M(u.current[1]),T(!1)))},onPause:()=>T(!1),style:{maxHeight:320,objectFit:`contain`,background:`#111`}})}),(0,$.jsxs)(`div`,{style:{borderRadius:20,background:`#f0f5ff`,padding:`20px 24px`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:16,marginBottom:18},children:[(0,$.jsx)(X,{type:`text`,icon:w?(0,$.jsx)(a6,{}):(0,$.jsx)(k6,{}),onClick:async()=>{let e=c.current;if(!(!e||!O)){if(w){e.pause(),T(!1);return}(e.currentTime<_[0]||e.currentTime>=_[1])&&(e.currentTime=_[0],M(_[0]));try{await e.play(),T(!0),D(``)}catch{D(`视频播放失败,请检查视频地址`)}}},disabled:!O||A,style:{fontSize:20,color:`#1e293b`,padding:0}}),(0,$.jsxs)(`span`,{style:{fontSize:18,color:`#1e293b`,fontFamily:`monospace`},children:[L9(h),` / `,L9(O)]})]}),(0,$.jsxs)(`div`,{ref:f,style:{overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,msOverflowStyle:`none`,padding:`0 6px`},children:[(0,$.jsx)(`style`,{children:` div::-webkit-scrollbar { display: none; } - `}),(0,$.jsx)(`div`,{style:{margin:`auto`,display:`flex`,flexDirection:`column`,width:y.length>0?`${y.length*80+Math.max(0,y.length-1)*1}px`:`100%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,height:86,borderRadius:12,background:`#fff`,gap:1,position:`relative`},children:[x&&y.length===0?(0,$.jsxs)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(nG,{size:`small`}),(0,$.jsx)(ule,{style:{marginLeft:8,color:`#64748b`},children:`正在抽取每秒帧...`})]}):y.length>0?y.map(e=>{let t=e.second>=_[0]&&e.second<_[1];return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>I(e.second),title:`${e.second}s${e.fallback?`,实际取帧 ${e.captureSecond?.toFixed(1)}s`:``}`,style:{minWidth:80,flex:`0 0 80px`,height:86,borderTop:t?`5px solid #6366f1`:`none`,borderBottom:t?`5px solid #6366f1`:`none`,padding:0,background:`transparent`,overflow:`hidden`,cursor:A?`not-allowed`:`pointer`,position:`relative`},children:[e.status===`success`&&e.image?(0,$.jsx)(`img`,{src:e.image,alt:`${e.second}s`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):e.status===`loading`?(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(nG,{size:`small`})}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:12,background:`#fff`},children:[(0,$.jsxs)(`span`,{children:[e.second,`s`]}),(0,$.jsx)(`span`,{style:{fontSize:11},children:`无有效帧`})]}),(0,$.jsxs)(`span`,{style:{position:`absolute`,left:0,bottom:3,color:`#ffffffff`,fontSize:16,textShadow:`0 1px 3px rgba(0,0,0,.7)`},children:[e.second,`s`]})]},e.second)}):(0,$.jsx)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:`暂无帧预览,请确认视频是否加载完成`}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:-10,left:0,right:0,bottom:0},children:(0,$.jsx)(Qz,{range:!0,min:0,max:O||a,step:1,value:_,onChange:P,onChangeComplete:F,tooltip:{formatter:e=>`${L9(Number(e||0))}s`},disabled:!O||A,styles:{track:{background:`#6969dd63`,height:86,borderRadius:12,margin:`0 `},rail:{height:86,borderRadius:12},handle:{width:20,height:86,marginTop:0,borderRadius:`50%`}}})})]})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`,color:`#64748b`,fontSize:14},children:[`已选取 `,k,`s`]}),E&&(0,$.jsx)(`div`,{style:{marginTop:12,padding:`10px 14px`,borderRadius:8,background:`rgba(239, 68, 68, 0.08)`,border:`1px solid rgba(239, 68, 68, 0.15)`,color:`#ef4444`,fontSize:13,textAlign:`center`},children:E})]})]})})},{TextArea:yle}=YU,ble=`https://ceshi.apiforeign.minzhongzc.com`,H9=2,U9=15,xle=e=>{if(!e)return!1;let t=e.supportsUniversalReference??e.supports_universal_reference,n=e.maxImageCount??e.max_image_count;return t!==!1&&(n==null||Number(n)>=1)};function W9(e){return e?/^https?:\/\//i.test(e)?e:`${ble}${e}`:``}var Sle=S.memo(({record:e,onPreview:t})=>{let n=e.segmentVideoUrl;if(n)return(0,$.jsxs)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},onClick:()=>t(W9(n)),children:[(0,$.jsx)(`video`,{src:W9(n),style:{width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:0,height:0,borderTop:`8px solid transparent`,borderBottom:`8px solid transparent`,borderLeft:`14px solid #6366f1`,marginLeft:2}})})})]});let r=C9(e.splitStatus||e.split_status);return(0,$.jsx)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6,fontSize:12},children:[r.active?(0,$.jsx)(nG,{size:`small`,style:{color:`#f59e0b`}}):null,(0,$.jsx)(`span`,{style:{color:r.failure?`#ef4444`:r.active?`#f59e0b`:`#94a3b8`},children:r.label})]})})});function Cle(){let{creatID:e}=$e(),t=Ye(),{user:n}=e7(),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(null),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),h=(0,S.useRef)(null),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)([]),[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)(5),[j,M]=(0,S.useState)(`9:16`),[N,P]=(0,S.useState)(`480p`),[F,I]=(0,S.useState)(!1),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[V,H]=(0,S.useState)([]),[U,ee]=(0,S.useState)(null),[W,te]=(0,S.useState)([]),[G,ne]=(0,S.useState)(1),[K,re]=(0,S.useState)(20),[ie,ae]=(0,S.useState)(0),[q,oe]=(0,S.useState)(!1),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(!1),de=(0,S.useRef)(null),fe=(0,S.useRef)(null),pe=(0,S.useRef)(null),me=(0,S.useMemo)(()=>W9(U?.videoUrl),[U?.videoUrl]);(0,S.useEffect)(()=>{C5().then(e=>{let t=e?.engine?.video||[];if(E(t),t.length>0){let e=t[0],n=(()=>{let t=e.maxDuration??e.max_duration;if(t!=null)return Number(t);let n=e.supportedDurations;return Array.isArray(n)&&n.length>0?Math.max(...n):15})(),r=e.supportedDurations,i=Array.from({length:Math.max(n-4,1)},(e,t)=>t+5),a=Array.from(new Set([...r||[],...i].sort((e,t)=>e-t)));O(e.id),M(e.supportedRatios?.includes(`9:16`)?`9:16`:e.supportedRatios?.[0]||`9:16`),P(e.supportedResolutions?.[0]||`480p`),A((r||[]).find(e=>e<=n)??i[0]??5),B({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:a.length>0?a:i})}}).catch(()=>Z.error(`视频引擎加载失败`)),D5().then(e=>H(Array.isArray(e)?e:[])).catch(()=>H([]))},[]),(0,S.useEffect)(()=>{if(!ge)return;let e=(()=>{let e=ge.maxDuration??ge.max_duration;if(e!=null)return Number(e);let t=ge.supportedDurations;return Array.isArray(t)&&t.length>0?Math.max(...t):15})(),t=ge.supportedDurations,n=Array.from({length:Math.max(e-4,1)},(e,t)=>t+5),r=Array.from(new Set([...t||[],...n].sort((e,t)=>e-t)));B(t=>{let i=t.durations;return(i.length>0?Math.max(...i):0)===e?t:{ratios:ge.supportedRatios||t.ratios,resolutions:ge.supportedResolutions||t.resolutions,durations:r.length>0?r:n}}),A(r=>r<=e?r:(t||[]).find(t=>t<=e)??n[0]??5)},[D]);let he=(0,S.useRef)(null),ge=T.find(e=>e.id===D),_e=(()=>{if(!ge)return 15;let e=ge.maxDuration??ge.max_duration;if(e!=null)return Number(e);let t=ge.supportedDurations;return Array.isArray(t)&&t.length>0?Math.max(...t):15})(),ve=!b||xle(ge),ye=(0,S.useMemo)(()=>{let e=V.find(e=>e.modelConfigId===D&&e.genType===`video`&&e.resolution===N);if(!e)return 0;let t=(Number(e.baseCredits||0)+Number(e.perSecondCredits||0)*k)*Number(e.ratio||1);return b&&(t+=(Number(e.inputImageBaseCredits||0)+Number(e.inputImagePerImageCredits||0))*Number(e.inputImageRatio||1)),Number(t.toFixed(2))},[V,D,b,k,N]),be=Number(n?.credits||0)W.length===0?`AI自动拆分`:W.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[W]),Se=(0,S.useCallback)(async()=>{if(e)try{ee(await L5(e))}catch{Z.error(`获取任务详情失败`)}},[e]),Ce=(0,S.useCallback)(async()=>{if(e)try{let t=await Zae(e,G,K);te(t.items||[]),ae(t.total||0)}catch{Z.error(`获取拆镜列表失败`)}},[e,G,K]),we=(0,S.useCallback)(e=>{f(e),m(!0)},[]),Te=(0,S.useCallback)(async()=>{if(e)try{await soe(e),Z.success(`重新分析已提交`),pe.current=Date.now(),await Se()}catch(e){Z.error(e?.message||`重新分析失败`)}},[e,Se]),Ee=(0,S.useCallback)(async e=>{try{await loe(e),Z.success(`重新分析已提交`),Ce()}catch(e){Z.error(e?.message||`重新分析失败`)}},[Ce]),De=(0,S.useCallback)(async e=>{try{await uoe(e),Z.success(`重新切割已提交`),await Ce()}catch(e){Z.error(e?.message||`重新切割失败`)}},[Ce]),Oe=(0,S.useCallback)(async e=>{try{await coe(e),Z.success(`删除成功`),Ce()}catch(e){Z.error(e?.message||`删除失败`)}},[Ce]),ke=(0,S.useCallback)(async()=>{await Promise.all([Se(),Ce()])},[Se,Ce]);(0,S.useEffect)(()=>(ke(),()=>{de.current&&window.clearTimeout(de.current),fe.current&&window.clearTimeout(fe.current)}),[ke]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&(I(!1),R(!1))};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]),(0,S.useEffect)(()=>{if(U?.analysisStatus!==`processing`||!e){pe.current=null,fe.current&&=(window.clearTimeout(fe.current),null);return}pe.current||=Date.now();let t=async()=>{if(document.visibilityState===`visible`)try{ee(await L5(e))}catch{}},n=()=>{if(!fe.current)return;let e=Date.now()-(pe.current||Date.now()),r=e<6e4?3e3:e<6e5?1e4:3e4;fe.current=window.setTimeout(async()=>{await t(),n()},r)};fe.current=window.setTimeout(async()=>{await t(),n()},3e3);let r=()=>{document.visibilityState===`visible`&&t()};return document.addEventListener(`visibilitychange`,r),()=>{fe.current&&=(window.clearTimeout(fe.current),null),document.removeEventListener(`visibilitychange`,r)}},[U?.analysisStatus,e]);let Ae=W.some(e=>Vce(e));(0,S.useEffect)(()=>{if(!Ae||!e){de.current&&=(window.clearTimeout(de.current),null);return}let t=async()=>{document.visibilityState===`visible`&&await Ce()};de.current=window.setTimeout(()=>void t(),3e4);let n=()=>{document.visibilityState===`visible`&&t()};return document.addEventListener(`visibilitychange`,n),()=>{de.current&&=(window.clearTimeout(de.current),null),document.removeEventListener(`visibilitychange`,n)}},[e,Ce,Ae]);let je=(e,t)=>{c(e),u(t),i(!0)},Me=()=>{i(!1),c(null),_(``),u(``),y(``),x(``),w(``)},Ne=async e=>{try{let t=await vae(e);x(t.url),w(t.resource_id||``),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},Pe=async()=>{if(!s){Z.warning(`请先选择拆镜片段`);return}if(!D){Z.warning(`请选择视频引擎`);return}if(!ve){Z.warning(`当前视频引擎不支持参考图片,请移除素材图片或切换引擎`);return}if(be){Z.warning(`积分不足,请充值后再创建复刻项目`);return}let e=he.current,n=e?.segmentId===s?e.key:`shot_v2_${s}_${Date.now()}_${Math.random().toString(16).slice(2)}`;he.current={segmentId:s,key:n};let r={target_project_name:g.trim(),core_content_point:v.trim(),project_description:v.trim()||void 0,material_image_url:b||void 0,material_image_resource_id:C||void 0,video_config:{engine_id:D,duration:k,aspect_ratio:j,resolution:N},idempotency_key:n};oe(!0);try{let e=await Qae(s,r),n=e?.projectId||e?.id||e?.detail?.id;he.current=null,Z.success(`项目已创建,视频提词正在生成`),Me(),await Ce(),n&&t(`/removelens/${n}/removefenbu?flow_version=v2`)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`创建失败,请重试`)}finally{oe(!1)}},Fe=async()=>{if(e){ue(!0);try{let t=W.some(e=>e.sourceMode===`ai_suggestion`);await Yae(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await ke()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{ue(!1)}}},Ie=()=>{if(!me){Z.warning(`原视频地址不存在`);return}o(!0)},Le=async t=>{if(e){if(t.durationSecondU9){Z.warning(`拆镜片段不能超过 ${U9} 秒`);return}ce(!0);try{await Xae(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),o(!1),await ke()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{ce(!1)}}},Re=e=>(e?.splitStatus||e?.split_status)===`completed`&&!!(e?.segmentVideoUrl||e?.segment_video_url),ze=(0,S.useMemo)(()=>[{title:`片段`,width:100,fixed:`left`,align:`center`,render:(e,t)=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#333`},children:t.segmentName||`片段${t.segmentIndex||``}`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#999`},children:t.timeNode}),t.sourceMode===`custom`&&(0,$.jsx)(vQ,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(vQ,{color:`orange`,style:{marginTop:6},children:`自动`})]})},{title:`片段视频`,width:150,align:`center`,render:(e,t)=>(0,$.jsx)(Sle,{record:t,onPreview:we})},{title:`视频内容`,width:500,align:`left`,render:(e,t)=>{let n=C9(t.split_status||t.splitStatus);if(n.active)return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(nG,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:n.label})]});if(n.failure)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:n.label});if(t.source_mode===`ai_suggestion`||t.sourceMode===`ai_suggestion`)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:t.segmentContent||t.lastError||`-`});let r=S9(t.analysis_status||t.analysisStatus);return r.active?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(nG,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:r.label})]}):r.failure?(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:r.label}):(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:r.key&&r.key!==`completed`?r.label:t.segmentContent||t.lastError||`-`})}},{title:`视频类型`,width:120,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,fontWeight:500},children:t.segmentCategory||`-`})},{title:`状态`,width:120,align:`center`,dataIndex:`moduleProjectStatus`,render:(e,t)=>{let n=e,r=t.moduleProjectCurrentStepCode||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return n||`-`}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return t.moduleProjectId?{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}:{text:`待生成任务`,color:`#94a3b8`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`操作`,width:200,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[n.moduleProjectId?(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu?flow_version=${n.moduleProjectFlowVersion===`v2`?`v2`:`v1`}`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(X,{type:`text`,onClick:()=>je(String(n.id),n.segmentName),disabled:!Re(n),style:{color:Re(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:Re(n)?`视频生成`:`待切割完成`}),S9(n.analysisStatus||n.analysis_status).failure&&(0,$.jsx)(X,{type:`text`,onClick:()=>Ee(String(n.id)),style:{color:`#f89411ff`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`重新分析`}),C9(n.splitStatus||n.split_status).failure&&(0,$.jsx)(X,{type:`text`,onClick:()=>De(String(n.id)),style:{color:`#f89411ff`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`重新切割`}),(0,$.jsx)(jG,{title:`确定删除此片段?`,onConfirm:()=>Oe(String(n.id)),okText:`确定`,cancelText:`取消`,children:(0,$.jsx)(X,{type:`text`,style:{color:`#ef4444`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`删除`})})]})}],[]),Be=(0,S.useMemo)(()=>(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,background:`#fff`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,background:`linear-gradient(135deg, rgba(99,102,241,0.02) 0%, transparent 100%)`},children:[(0,$.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`,margin:0},children:`拆镜片段列表`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,marginLeft:12},children:[`共 `,W.length,` 个片段`]})]}),(0,$.jsx)(aQ,{columns:ze,dataSource:W,pagination:{current:G,pageSize:K,total:ie,onChange:(e,t)=>{ne(e),re(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},bordered:!1,rowKey:`id`,scroll:{y:300},style:{flex:1},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`,height:80,overflow:`auto`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(255, 255, 255, 1)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})]}),[W,ze,G,K,ie]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(U0,{}),onClick:()=>t(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),U?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,display:`flex`,alignItems:`center`,gap:30,padding:24,border:`1px solid rgba(99, 102, 241, 0.1)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`,cursor:`pointer`},onClick:()=>{f(me),m(!0)},onMouseEnter:e=>{let t=e.currentTarget.querySelector(`div:last-child`);t&&(t.style.opacity=`1`)},onMouseLeave:e=>{let t=e.currentTarget.querySelector(`div:last-child`);t&&(t.style.opacity=`0`)},children:[(0,$.jsx)(`video`,{src:me,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:0,transition:`opacity 0.2s`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#6366f1`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,$.jsx)(`polygon`,{points:`5 3 19 12 5 21 5 3`})})})})]}),U.analysisStatus===`failed`&&(0,$.jsx)(`div`,{style:{marginTop:12,textAlign:`center`},children:(0,$.jsx)(X,{onClick:Te,style:{width:`100%`,padding:`6px 16px`,borderRadius:8,fontSize:12,border:`1px solid #ef4444`,color:`#ef4444`,background:`rgba(239, 68, 68, 0.05)`,cursor:U.analysisStatus===`processing`?`not-allowed`:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{U.analysisStatus!==`processing`&&(e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`)},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.05)`},children:U.analysisStatus===`processing`?`分析中...`:`重新分析`})})]}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,position:`relative`,zIndex:1},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`h2`,{style:{fontSize:20,fontWeight:600,marginBottom:16,background:`linear-gradient(135deg, #1e293b 0%, #334155 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频总结`}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`上传时间: `,U.createdAt?new Date(U.createdAt).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):`-`]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`产品名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:U.title})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`受众群体:`}),U.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(nG,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):U.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(U.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(vQ,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):U.analysisStatus===`failed`?(0,$.jsx)(`span`,{style:{color:`#ef4444`,fontSize:14},children:`分析失败`}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),U.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(nG,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):U.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:U.originalVideoContent}):U.analysisStatus===`failed`?(0,$.jsx)(`span`,{style:{color:`#ef4444`,fontSize:14},children:`分析失败`}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(X,{type:`default`,onClick:Ie,disabled:!me||se||U?.analysisStatus===`processing`,style:{flex:1,height:52,borderRadius:12,border:`2px solid rgba(99, 102, 241, 0.3)`,color:`#6366f1`,fontWeight:600,fontSize:15,background:`rgba(255, 255, 255, 0.9)`,backdropFilter:`blur(10px)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`none`},children:`手动`}),(0,$.jsx)(jG,{title:xe===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:Fe,children:(0,$.jsxs)(X,{type:`primary`,loading:le,disabled:le||U?.analysisStatus===`processing`,style:{flex:1,height:52,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.3)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 25px rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.3)`},children:[(0,$.jsx)(`span`,{style:{position:`relative`,zIndex:1},children:xe}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:`-100%`,width:`100%`,height:`100%`,background:`linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent)`,transition:`left 0.5s ease`},onMouseEnter:e=>{e.currentTarget.style.left=`100%`}}),U?.aiSuggestions&&U.aiSuggestions.length>0&&(0,$.jsx)(jw,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(U?.ai_suggestions||U?.aiSuggestions||[]).map(e=>(0,$.jsxs)(`div`,{style:{marginBottom:8,fontSize:13,lineHeight:1.5},children:[(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#6366f1`},children:[e.index,`.`]}),(0,$.jsx)(`span`,{style:{marginLeft:4,color:`#000000ff`},children:e.timeNode}),(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{style:{color:`#666`},children:e.content})]},e.index))]}),placement:`top`,trigger:`hover`,styles:{container:{backgroundColor:`#fff`,height:300,overflowY:`auto`,border:`1px solid rgba(99, 102, 241, 0.1)`,borderRadius:12,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.12)`}},children:(0,$.jsx)(`span`,{style:{marginLeft:8,fontSize:13,opacity:.9},children:`(AI 镜头拆分方案)`})})]})})]}),Be]}):(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{fontSize:16,color:`#999`},children:`加载中...`})})]}),(0,$.jsx)(vle,{open:a,videoUrl:me,title:`手动视频切片`,loading:se,minDuration:H9,maxDuration:U9,onCancel:()=>o(!1),onConfirm:Le}),(0,$.jsx)(dV,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`智能视频复刻`}),l&&(0,$.jsxs)(`span`,{style:{fontSize:14,color:`#64748b`},children:[`- `,l]})]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),Me()},style:{width:24,height:24,border:`none`,background:`transparent`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:20},children:`×`})]}),placement:`right`,closable:!1,onClose:Me,open:r,size:480,styles:{body:{padding:`24px`,background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`},section:{borderRadius:`20px 0 0 20px`,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:[(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:`素材图片(可选)`}),b?(0,$.jsxs)(`div`,{style:{width:120,height:120,borderRadius:8,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`img`,{src:W9(b),alt:`素材图`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),(0,$.jsx)(`button`,{onClick:()=>{x(``),w(``)},style:{position:`absolute`,bottom:4,right:4,width:24,height:24,borderRadius:`50%`,backgroundColor:`rgba(0,0,0,.5)`,border:`none`,cursor:`pointer`},children:(0,$.jsx)(MQ,{style:{color:`#fff`,fontSize:12}})})]}):(0,$.jsx)(w7,{accept:`image/*`,multiple:!1,mediaType:`image`,maxImageCount:1,usedImageCount:0,onLocalSelect:e=>{e[0]&&Ne(e[0])},onHistorySelect:e=>{let t=e[0];t&&(x(t.resourceUrl||t.previewUrl||t.displayUrl||``),w(t.id),Z.success(`历史图片已选择`))},children:(0,$.jsxs)(`div`,{style:{width:120,height:120,borderRadius:8,border:`2px dashed rgba(99,102,241,.3)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,gap:6},children:[(0,$.jsx)(VI,{style:{fontSize:20,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`上传或选择历史图片`})]})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:`项目名称(可选)`}),(0,$.jsx)(YU,{value:g,onChange:e=>_(e.target.value),placeholder:`请输入项目名称`,style:{height:44,borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:50,showCount:!0})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:`项目描述(可选)`}),(0,$.jsx)(yle,{value:v,onChange:e=>y(e.target.value),placeholder:`请输入项目描述`,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:200,showCount:!0,rows:3})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`视频参数`,(0,$.jsx)(`span`,{style:{color:`#f94444`},children:`(必选)`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{I(!F),R(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(s8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:T.find(e=>e.id===D)?.name||`选择引擎`})]}),F&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:T.filter(e=>e.supportsUniversalReference!==!1).map(e=>(0,$.jsxs)(`button`,{type:`button`,onClick:()=>{O(e.id);let t=(()=>{let t=e.maxDuration??e.max_duration;if(t!=null)return Number(t);let n=e.supportedDurations;return Array.isArray(n)&&n.length>0?Math.max(...n):15})(),n=e.supportedDurations,r=Array.from({length:Math.max(t-4,1)},(e,t)=>t+5),i=Array.from(new Set([...n||[],...r].sort((e,t)=>e-t)));B({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:i}),e.supportedRatios?.includes(j)||M(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(N)||P(e.supportedResolutions?.[0]||`720p`),(!i.includes(k)||k>t)&&A(i.find(e=>e<=t)??i[0]??5),I(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:D===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:D===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:D===e.id?600:500,color:D===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{R(!L),I(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(x3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[j,` · `,k,`s · `,N]})]}),L&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:z.ratios.map(e=>{let[t,n]=e.split(`:`).map(Number),r=t>=n?18:Math.round(t/n*18),i=n>=t?18:Math.round(n/t*18);return(0,$.jsxs)(`button`,{onClick:()=>M(e),style:{flex:`0 0 calc(12.5% - 4px)`,minWidth:44,height:52,borderRadius:6,border:j===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:r,height:i,border:`2px solid ${j===e?`#6366f1`:`#9ca3af`}`,borderRadius:3,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:j===e?`#6366f1`:`#6b7280`,fontWeight:j===e?600:400},children:e})]},e)})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(k-Math.min(...z.durations))/(_e-Math.min(...z.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...z.durations),max:_e,value:k,onChange:e=>A(Math.min(Number(e.target.value),_e)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:k}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:z.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>P(e),style:{flex:1,height:42,borderRadius:8,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:N===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(`div`,{style:{color:ve?`#6366f1`:`#ef4444`,fontSize:13},children:ve?``:`当前引擎不支持参考图片,请移除素材图片或切换引擎。`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,marginTop:8},children:(0,$.jsx)(jw,{title:(n?.credits||0){if((n?.credits||0)m(!1),afterClose:()=>{h.current&&(h.current.pause(),h.current.currentTime=0)},footer:null,width:640,centered:!0,styles:{body:{padding:24},header:{borderBottom:`1px solid #e0e0e0`,padding:`20px 24px`}},children:(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:h,controls:!0,src:d||``,style:{width:`100%`,maxHeight:420,objectFit:`contain`,backgroundColor:`#000`},playsInline:!0,"webkit-playsinline":`true`,autoPlay:!0})})})]})}var{Title:wle,Text:G9}=Q,{TextArea:Tle}=YU;function Ele(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}var K9=e=>e?/^https?:\/\//i.test(e)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``;function Dle(){let e=Ye(),{creatID:t}=$e(),[n]=On(),r=n.get(`flow_version`)===`v2`?`v2`:`v1`,{user:i}=e7(),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(`image`),[_,v]=(0,S.useState)({}),[y,b]=(0,S.useState)(null),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)({}),[F,I]=(0,S.useState)(``),[L,R]=(0,S.useState)(``),[z,B]=(0,S.useState)(!1),[V,H]=(0,S.useState)(!1),[U,ee]=(0,S.useState)(5),[W,te]=(0,S.useState)(`16:9`),[G,ne]=(0,S.useState)(`480p`),[K,re]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[ie,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)(1),[se,ce]=(0,S.useState)(20),[le,ue]=(0,S.useState)(0),[de,fe]=(0,S.useState)(``),[pe,me]=(0,S.useState)({}),[he,ge]=(0,S.useState)([]),[_e,ve]=(0,S.useState)([]),[ye,be]=(0,S.useState)(!1),[xe,Se]=(0,S.useState)(``),[Ce,we]=(0,S.useState)(`image`),[Te,Ee]=(0,S.useState)(!1),De=S.useRef(null);(0,S.useEffect)(()=>{if(ye&&Ce===`video`){let e=()=>{De.current&&De.current.play().catch(()=>{})};De.current&&(De.current.readyState>=2?e():De.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),De.current&&(De.current.removeEventListener(`loadedmetadata`,e),De.current.pause())}}else De.current&&De.current.pause()},[ye,Ce]);let Oe=r===`v2`,ke=(0,S.useMemo)(()=>Oe?[{id:1,title:`素材与项目信息`,description:`固定片段素材和项目描述`,childId:1},{id:2,title:`生成视频提示词`,description:`生成并确认视频提示词`,childId:4},{id:3,title:`生成最终视频`,description:`使用当前视频提示词生成视频`,childId:5}]:[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}],[Oe]),Ae=(0,S.useMemo)(()=>ke.map((e,t)=>({...e,status:he[t]?.status||``,id:he[t]?.id||t,output:he[t]?.output||``,input:he[t]?.input||{},engineId:he[t]?.input?.payload?.videoConfig?.engineId||``,errorMessage:he[t]?.errorMessage||``})),[ke,he]),je=(0,S.useRef)(!1);(0,S.useEffect)(()=>{if(!Ae.some(e=>e.status))return;let e=[...Ae].reverse().find(e=>e.status===`processing`);if(e){ve([String(e.childId)]),je.current=!1;return}if(je.current){je.current=!1;return}let t=[...Ae].reverse().find(e=>e.status===`completed`&&e.childId!==1);if(t){ve([String(t.childId)]);return}ve([])},[Ae]);let Me=(e,t,n)=>{I5(e,t,n).then(e=>{e.items&&ae(e.items),e.total!==void 0&&ue(e.total)}).catch(e=>{})},Ne=(e,t)=>{oe(e),ce(t),Me(e,t,de)},Pe=()=>{Me(1,20,de)};(0,S.useEffect)(()=>{Me(q,se,de)},[]),(0,S.useEffect)(()=>{C5().then(e=>{let t=(e.engine?.video||[]).filter(e=>e.supportsUniversalReference!==!1),n=(e.engine?.image||[]).filter(e=>e.supportsUniversalReference!==!1);if(P({video:t,image:n}),t.length>0){I(t[0].id);let e=t[0];re({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]})}n.length>0&&R(n[0].id)}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{x.current&&=(clearInterval(x.current),null)},[]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(B(!1),H(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&R5(t,r).then(e=>{me(e),e.steps&&ge(e.steps)}).catch(e=>{Z.error(e?.message||`加载任务详情失败`)})},[t,r]),(0,S.useEffect)(()=>{let e=pe?.status===`processing`||he.some(e=>e?.status===`processing`);e&&!x.current?x.current=setInterval(ze,3e4):!e&&x.current&&(clearInterval(x.current),x.current=null)},[pe?.status,he,t,r]),(0,S.useEffect)(()=>{D5().then(e=>{c(e)}).catch(()=>{})},[]);let Fe=()=>{let e={};e=s.find(e=>e.modelConfigId===F&&e.genType===`video`&&e.resolution===G),e||={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0};let t=(U*e.perSecondCredits+e.baseCredits)*e.ratio,n=pe?.videoGeneration?.inputMedia?.video?.duration||0;if(n>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n)*(e.inputVideoRatio||1);t+=r}let r=Oe?+!!pe?.material?.materialImageUrl:pe?.videoGeneration?.inputMedia?.image?.length||0;if(r>0){let n=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*r)*(e.inputImageRatio||1);t+=n}u(Number(t.toFixed(2)))},Ie=()=>{let e=Ae[1]?.input?.payload?.videoConfig||Ae[1]?.input?.payload?.video_config;if(!e)return 0;let t=e?.engineId||e?.engine_id,n=e?.resolution,r=e?.duration||U,i={};i=s.find(e=>e.modelConfigId===t&&e.genType===`video`&&e.resolution===n),i||={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0};let a=(r*i.perSecondCredits+i.baseCredits)*i.ratio,o=pe?.videoGeneration?.inputMedia?.video?.duration||0;if(o>0){let e=((i.inputVideoBaseCredits||0)+(i.inputVideoPerSecondCredits||0)*o)*(i.inputVideoRatio||1);a+=e}let c=Oe?+!!pe?.material?.materialImageUrl:pe?.videoGeneration?.inputMedia?.image?.length||0;if(c>0){let e=((i.inputImageBaseCredits||0)+(i.inputImagePerImageCredits||0)*c)*(i.inputImageRatio||1);a+=e}return Number(a.toFixed(2))};(0,S.useEffect)(()=>{s.length>0&&F&&Fe()},[s,F,U,G,pe]);let Le=(e,t,n,r)=>{g(t||`image`),w(n?String(n):``),t===`video`?(b(r||null),v(e&&typeof e==`object`?Ele(e):{}),f(``)):(b(null),f(e||``),v({})),o(!0)},Re=async()=>{if(h===`image`){if(!pe?.id||!C){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!d||!d.trim()){Z.warning(`图片提示词不能为空`);return}E(!0);try{await roe(pe.id,C,{prompt:d.trim()}),Z.success(`图片提示词已保存`),Be(),o(!1),w(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{E(!1)}return}if(!pe?.id||!C){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!_||typeof _!=`object`||Object.keys(_).length===0){Z.warning(`视频提示词不能为空`);return}if(!y){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=u9(_,y);if(e){Z.warning(e);return}E(!0);try{await(Oe?eoe:ioe)(pe.id,C,{prompt_schema:_}),Z.success(`视频提示词已保存`),Be(),o(!1),w(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{E(!1)}},ze=()=>{t&&R5(t,r).then(e=>{me(e),e.steps&&ge(e.steps)}).catch(e=>{console.error(`轮询任务详情失败`,e)})},Be=()=>{t&&R5(t,r).then(e=>{me(e),e.steps&&ge(e.steps)}).catch(e=>{Z.error(e?.message||`刷新任务详情失败`)})},Ve=(e,t,n=!1)=>{Se(e),we(t),Ee(n),be(!0)},He=()=>{be(!1),Se(``),De.current&&De.current.pause()},Ue=e=>{if(e.preventDefault(),e.stopPropagation(),!xe)return;let t=document.createElement(`a`);t.href=`https://ceshi.apiforeign.minzhongzc.com${xe}&download=1`,t.download=Ce===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},We=e=>{noe(pe.id,e.toString()).then(e=>{Z.info(`正在生成图片提示词,请稍候...`),Be()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ge=e=>{let t={engine_id:L,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};z5(pe.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),Be()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ke=()=>{let e={engine_id:L,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};z5(pe.id,Ae[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),Be()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},qe=e=>{let t={engine_id:F,duration:U,aspect_ratio:W,resolution:G,target_platform:`抖音`};aoe(pe.id,e.toString(),t).then(e=>{Z.info(`正在生成视频提示词,请稍候...`),Be()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Je=async(e,t)=>{try{Oe?await toe(pe.id,String(e)):await ooe(pe.id,String(e),{engine_id:t||``}),Z.info(`正在生成视频,请稍候...`),Be()}catch(e){let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)}},Xe=async()=>{let e=Oe?Ae[1]:Ae[3];e?.id&&await Je(e.id,e.engineId||``)},Ze=async e=>{if(!(!Oe||!pe?.id||!e||!F)){M(!0);try{await $ae(pe.id,e,{video_config:{engine_id:F,duration:U,aspect_ratio:W,resolution:G}}),Z.info(`正在按新视频参数重新生成视频提示词,请稍候...`),Be()}catch(e){Z.error(e?.message||`重新生成视频提示词失败`)}finally{M(!1)}}};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(U0,{}),onClick:()=>window.history.back(),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`拆镜复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>m(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box video-container`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:pe?.material?.materialVideoUrl?`pointer`:`default`,position:`relative`},onClick:()=>pe?.material?.materialVideoUrl&&Ve(pe.material.materialVideoUrl,`video`),children:pe?.material?.materialVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:K9(pe.material.materialVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`contain`}}),(0,$.jsx)(`div`,{className:`video-overlay`,children:(0,$.jsx)(N6,{style:{fontSize:48,color:`#fff`,opacity:.9}})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:pe?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>pe?.material?.materialImageUrl&&Ve(pe.material.materialImageUrl,`image`),children:pe?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K9(pe.material.materialImageUrl),alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),pe?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Ve(pe.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${pe.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),pe?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsxs)(`div`,{className:`medio_box video-container`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`,position:`relative`},onClick:()=>Ve(pe.finalVideoUrl,`video`,!0),children:[(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${pe.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}),(0,$.jsx)(`div`,{className:`video-overlay`,children:(0,$.jsx)(N6,{style:{fontSize:48,color:`#fff`,opacity:.9}})})]})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(o_,{activeKey:_e,onChange:ve,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:Ae.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(N2,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(G9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:pe?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:K9(pe.material.materialVideoUrl),style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(G9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:pe?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:K9(pe.material.materialImageUrl),alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`原产品名称:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Ae[0]?.input?.payload?.sourceProjectName||`-`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`自有产品名称:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Ae[0]?.input?.payload?.targetProjectName||`-`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`产品卖点:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Ae[0]?.input?.payload?.coreContentPoint||`-`})]})]}),!Oe&&(0,$.jsx)(jw,{title:`LLM积分由服务端按当前功能场景直接消费`,placement:`top`,children:(0,$.jsx)(X,{onClick:()=>{We(e.id)},type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片提示词`})})]}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(G9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(bV,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(e$,{}),onClick:()=>Le(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(X,{onClick:()=>{je.current=!0,ve(t=>t.filter(t=>t!==String(e.childId))),Ge(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[pe.finalImageUrl?(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${pe.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(e$,{}),onClick:()=>Ke(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{B(!z),H(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(s8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(G9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:N.video?.find(e=>e.id===F)?.name||`选择引擎`})]}),z&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(G9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:N.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{I(e.id),re({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(W)||te(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(G)||ne(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(U)||ee(e.supportedDurations?.[0]||5),B(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:F===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:F===e.id?600:500,color:F===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{let e=Ae[1]?.input?.payload?.videoConfig||Ae[1]?.input?.payload?.video_config;if(e){let t=e?.engineId||e?.engine_id,n=N.video?.find(e=>String(e.id)===String(t));n&&(I(n.id),re({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]})),te(e?.aspectRatio||e?.aspect_ratio||`16:9`),ne(e?.resolution||`480p`),ee(e?.duration||5)}H(!V),B(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(x3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(G9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[W,` · `,U,`s · `,G]})]}),V&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(G9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:K.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>te(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:W===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:W===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${W===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:W===e?`#6366f1`:`#6b7280`,fontWeight:W===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(G9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(U-Math.min(...K.durations))/(Math.max(...K.durations)-Math.min(...K.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...K.durations),max:Math.max(...K.durations),value:U,onChange:e=>ee(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:U}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(G9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:K.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>ne(e),style:{flex:1,height:42,borderRadius:6,border:G===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:G===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:G===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(jw,{title:(i?.credits||0){if((i?.credits||0)t.filter(t=>t!==String(e.childId))),qe(e.id)},disabled:e.status!==`completed`||(i?.credits||0){let e=Ae[1]?.input?.payload?.videoConfig||Ae[1]?.input?.payload?.video_config,t=e?.engineId||e?.engine_id,n=t?(N.video||[]).find(e=>String(e.id)===String(t))?.name:``;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`引擎:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:n||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`比例:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.aspectRatio||e?.aspect_ratio||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`分辨率:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.resolution||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`时长:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.duration||`-`})]})]})})()})}),(0,$.jsxs)(bV,{style:{marginTop:16,gap:12,width:`100%`,flexWrap:`wrap`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(e$,{}),onClick:()=>Le(pe?.videoGeneration?.promptSchema,`video`,e.id,pe?.videoGeneration?.schemaConfigSnapshot),style:{flex:`0 0 auto`,minWidth:160,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!pe?.videoGeneration?.promptSchema||!pe?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),Oe&&(0,$.jsx)(jw,{title:`LLM积分由服务端按当前功能场景直接消费`,placement:`top`,children:(0,$.jsx)(X,{type:`default`,onClick:()=>{let t=Ae[1]?.input?.payload?.videoConfig||Ae[1]?.input?.payload?.video_config;if(t){let e=t?.engineId||t?.engine_id,n=N.video?.find(t=>String(t.id)===String(e));n&&(I(n.id),re({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]})),te(t?.aspectRatio||t?.aspect_ratio||`16:9`),ne(t?.resolution||`480p`),ee(t?.duration||5)}A(String(e.id)),O(!0)},style:{flex:`0 0 auto`,minWidth:160,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500},disabled:e.status===`processing`||Ae[2]?.status===`processing`,children:`重新生成视频提词`})}),(0,$.jsx)(jw,{title:(i?.credits||0){let t=Ie();if((i?.credits||0)t.filter(t=>t!==String(e.childId))),Je(e.id,e.engineId)},type:`primary`,style:{flex:`1 0 auto`,minWidth:140,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`||(i?.credits||0){let e=Ie();if((i?.credits||0){let e=`https://ceshi.apiforeign.minzhongzc.com${pe?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(DG,{open:D,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#6366f1`,letterSpacing:.4},children:`重新生成视频提词`})]}),onCancel:()=>O(!1),width:400,footer:null,centered:!0,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(VC,{value:F,onChange:e=>{let t=N.video?.find(t=>t.id===e);t&&(I(t.id),re({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]}),t.supportedRatios?.includes(W)||te(t.supportedRatios?.[0]||`16:9`),t.supportedResolutions?.includes(G)||ne(t.supportedResolutions?.[0]||`720p`),t.supportedDurations?.includes(U)||ee(t.supportedDurations?.[0]||5))},style:{width:`100%`,borderRadius:8},options:N.video?.map(e=>({value:e.id,label:e.name})),placeholder:`请选择引擎`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:K.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>te(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:W===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:W===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${W===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:W===e?`#6366f1`:`#6b7280`,fontWeight:W===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(U-Math.min(...K.durations))/(Math.max(...K.durations)-Math.min(...K.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...K.durations),max:Math.max(...K.durations),value:U,onChange:e=>ee(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:U}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:K.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>ne(e),style:{flex:1,height:42,borderRadius:8,border:G===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:G===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:G===e?`#fff`:`#4b5563`},children:e})},e))})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:16},children:[(0,$.jsx)(X,{onClick:()=>O(!1),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500},children:`取消`}),(0,$.jsx)(X,{onClick:()=>{if(!F){Z.warning(`请选择视频引擎`);return}Ze(k),O(!1)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:!F,children:`确认生成`})]})]})}),(0,$.jsx)(DG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:h===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:a,onCancel:()=>{T||o(!1)},footer:[(0,$.jsx)(X,{onClick:()=>o(!1),disabled:T,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:Re,loading:T,disabled:T,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:h===`image`?(0,$.jsx)(Tle,{value:d,onChange:e=>f(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(_9,{value:_,schemaConfigSnapshot:y,onChange:v})})}),(0,$.jsxs)(DG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:p,onCancel:()=>m(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(YU,{placeholder:`搜索产品名称`,value:de,onChange:e=>fe(e.target.value),onPressEnter:Pe,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(X,{type:`primary`,onClick:Pe,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(aQ,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(X,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:ie,rowKey:`id`,pagination:{current:q,pageSize:se,total:le,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:Ne,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]}),(0,$.jsx)(DG,{open:ye,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:He,width:800,footer:Te?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(I1,{}),onClick:Ue,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}):null,centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:Ce===`image`?(0,$.jsx)(`img`,{src:xe.startsWith(`http`)?xe:`https://ceshi.apiforeign.minzhongzc.com${xe}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:De,src:xe.startsWith(`http`)?xe:`https://ceshi.apiforeign.minzhongzc.com${xe}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}var Ole=({asset:e,index:t,onPreview:n})=>{let[r,i]=(0,S.useState)(!1);return(0,$.jsx)(`div`,{className:`project-card`,onClick:()=>n(e),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,flexShrink:0,width:`18%`,position:`relative`},children:(0,$.jsx)(`div`,{style:{position:`relative`,aspectRatio:`9/16`},children:e.mediaType===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},muted:!0,playsInline:!0}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,background:`rgba(0,0,0,0.5)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(N6,{style:{fontSize:24,color:`#fff`}})})})]}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,alt:e.title||`素材 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})})};function kle(e){if(!e)return`-`;let t=String(e).trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``);let[r=``,i=``]=t.split(`T`),[,a=``,o=``]=r.split(`-`),s=i.slice(0,5);return!a||!o?`-`:`${a}-${o} ${s}`}var Ale=()=>{let e=Ye(),[t,n]=(0,S.useState)(`project`),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(null),[h,g]=(0,S.useState)(``),_=(0,S.useRef)(null),v=(0,S.useRef)(``),[y,b]=(0,S.useState)(`cases`),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(null),E=(0,S.useRef)(null);(0,S.useEffect)(()=>{woe().then(e=>{if(e?.items?.length>0){c(e.items);let t=e.items[0].id;u(t),W5(t).then(e=>{e?.categories?.[0]?.assets&&f(e.categories[0].assets)})}})},[]),(0,S.useEffect)(()=>()=>{E.current&&=(E.current.pause(),null),T(null),C(null),document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()})},[]),(0,S.useEffect)(()=>{if(!p){E.current&&=(E.current.pause(),null),T(null),C(null),g(``),v.current=``,document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()});return}let e=p.id||p.url;v.current=e;let t=(e,n)=>n===0?e:t(n,e%n),n=p.width||p.videoWidth||p.imageWidth||0,r=p.height||p.videoHeight||p.imageHeight||0;if(n&&r){let e=t(n,r);g(`${n/e}:${r/e}`);return}if(g(``),p.mediaType===`video`){let n=_.current,r=()=>{if(v.current!==e)return;let r=n.videoWidth,i=n.videoHeight;if(!r||!i)return;let a=t(r,i);g(`${r/a}:${i/a}`)};if(n?.removeEventListener(`loadedmetadata`,r),n&&n.videoWidth&&n.videoHeight){let e=t(n.videoWidth,n.videoHeight);g(`${n.videoWidth/e}:${n.videoHeight/e}`)}else n?.addEventListener(`loadedmetadata`,r);return()=>{n?.removeEventListener(`loadedmetadata`,r)}}else{let n=new Image;n.crossOrigin=`anonymous`,n.onload=()=>{if(v.current!==e)return;let r=n.width,i=n.height;if(!r||!i){g(`未知`);return}let a=t(r,i);g(`${r/a}:${i/a}`)},n.onerror=()=>{v.current===e&&g(`未知`)},n.src=`https://ceshi.apiforeign.minzhongzc.com${p.url}`}},[p]),(0,S.useEffect)(()=>{(async()=>{try{yoe(10).then(e=>{for(let t in e)e[t].forEach(e=>{e.type=t,o(t=>[...t,e])});o(e=>e)})}catch{}})()},[]);let D=e=>{n(e)},O=[{icon:(0,$.jsx)(TV,{style:{fontSize:24}}),title:`行业智造`,description:`新建项目、设置图文视频参数、核对信息并生成素材`,action:`立即创作`,path:`/projects`},{icon:(0,$.jsx)(J6,{style:{fontSize:24}}),title:`AI创作`,description:`输入想法、剧本或上传参考,智能生成视频/图片`,action:`立即生成`,path:`/conversation`},{icon:(0,$.jsx)(TV,{style:{fontSize:24}}),title:`爆款复刻`,description:`上传参考视频与产品图片,一键复刻爆款`,action:`立即创作`,path:`/initial`},{icon:(0,$.jsx)(i8,{style:{fontSize:24}}),title:`拆镜复刻`,description:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`,action:`开始拆镜`,path:`/removelens`}],k=[{key:`all`,label:`全部`},{key:`project`,label:`项目媒体`},{key:`chatAi`,label:`AI成片`},{key:`hotOpeningReplicate`,label:`爆款复刻`},{key:`shotReplicate`,label:`拆镜复刻`}],A=t===`all`?a:a.filter(e=>e.type===t);return(0,$.jsxs)(`div`,{className:`content_box`,style:{backgroundColor:`#fff`,borderRadius:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsx)(`h3`,{children:`首页工作台 `}),(0,$.jsxs)(`p`,{style:{cursor:`pointer`,fontSize:12,letterSpacing:.3,padding:`10px 16px`,backgroundColor:`#ffffffff`,borderRadius:30,boxShadow:`0px 4px 12px 0px rgba(0, 0, 0, 0.1)`},children:[`如需进行账户素材推送:`,(0,$.jsxs)(`span`,{style:{color:`#1a50bbff`},onClick:()=>{e(`/authorization`)},children:[`一键推送`,(0,$.jsx)(K0,{style:{marginLeft:8,transform:`rotate(0deg)`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`20px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:16},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`AI 创作入口`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`一键开启智能创作`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:12},children:O.map((t,n)=>{let r=[{color:`#3b82f6`,light:`rgba(59,130,246,0.12)`,tag:`项目`},{color:`#6366f1`,light:`rgba(99,102,241,0.12)`,tag:`复刻`},{color:`#f97316`,light:`rgba(249,115,22,0.12)`,tag:`拆镜`},{color:`#10b981`,light:`rgba(16,185,129,0.12)`,tag:`云创`}],i=r[n]||r[0];return(0,$.jsxs)(`div`,{onClick:()=>e(t.path),className:`project-card`,style:{flex:`1 1 280px`,minWidth:280,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`,transition:`all 0.3s cubic-bezier(0.4,0,0.2,1)`,position:`relative`,display:`flex`,alignItems:`center`,gap:14,minHeight:96},onMouseEnter:e=>{e.currentTarget.style.borderColor=i.color,e.currentTarget.style.boxShadow=`0 8px 24px ${i.light}`,e.currentTarget.style.background=i.light,e.currentTarget.style.transform=`translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.boxShadow=`none`,e.currentTarget.style.background=`#fff`,e.currentTarget.style.transform=`translateY(0)`},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,background:i.light,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,transition:`all 0.3s ease`,color:i.color},onMouseEnter:e=>{e.currentTarget.style.background=i.color,e.currentTarget.style.color=`#fff`},onMouseLeave:e=>{e.currentTarget.style.background=i.light,e.currentTarget.style.color=i.color},children:(0,$.jsx)(`span`,{style:{fontSize:20,display:`flex`,transition:`all 0.3s ease`},children:t.icon})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,flex:1,minWidth:0},children:t.title}),(0,$.jsx)(`span`,{style:{fontSize:10,color:i.color,padding:`2px 7px`,borderRadius:4,background:i.light,fontWeight:600,flexShrink:0},children:i.tag})]}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,lineHeight:1.5,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:t.description})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,color:i.color,fontSize:13,fontWeight:600,flexShrink:0},children:[t.action,(0,$.jsx)(K0,{style:{fontSize:12}})]})]},n)})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:8},children:[{key:`cases`,label:`素材案例`},{key:`works`,label:`近期作品`}].map(e=>(0,$.jsx)(`button`,{onClick:()=>b(e.key),style:{padding:`6px 16px`,borderRadius:8,fontSize:13,fontWeight:500,border:`none`,cursor:`pointer`,transition:`all 0.25s ease`,background:y===e.key?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f1f5f9`,color:y===e.key?`#fff`:`#64748b`},children:e.label},e.key))})}),y===`works`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(gL,{activeKey:t,onChange:D,items:k.map(e=>({key:e.key,label:e.label})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:A.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(w6,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无作品`})]}):A.map(t=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>{let n=t.moduleProjectId;t.type===`hotOpeningReplicate`&&n!=null?e(`/initial/${n}/initialinfo?flow_version=${t.moduleProjectFlowVersion===`v2`?`v2`:`v1`}`):t.type===`shotReplicate`&&n!=null?e(`/removelens/${n}/removefenbu?flow_version=${t.moduleProjectFlowVersion===`v2`?`v2`:`v1`}`):t.type===`chatAi`?e(`/conversation`):t.type===`project`&&e(`/project`)},style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:[(()=>{let e=t.type!==`hotOpeningReplicate`&&(String(t.resourceType??``).toLowerCase()===`image`||t.resourceType===1||String(t.resourceType??``)===`1`),n=``;return n=e?`/static`+t.resultUrl+`&w=300&p=50`||``:(t.type,t.coverUrl||t.resultUrl||t.resultUrl||``),(0,$.jsx)(`img`,{src:n?n.startsWith(`http`)?n:`https://ceshi.apiforeign.minzhongzc.com`+n:``,alt:t.title||t.name||`作品`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})(),String(t.resourceType??``).toLowerCase()===`image`?null:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(R8,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`,paddingTop:0},children:(0,$.jsxs)(`div`,{style:{marginTop:6,display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,border:`1px solid #3b82f6`,borderRadius:4,color:`#3b82f6`,fontSize:11,fontWeight:500,background:`#fff`,lineHeight:1.4,whiteSpace:`nowrap`},children:{project:`项目媒体`,chatAi:`AI成片`,hotOpeningReplicate:`爆款复刻`,shotReplicate:`拆镜复刻`}[t.type]||`其他`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`·`}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:kle(t.generatedTime)})]})})]},t.id||`${t.type}-${Math.random()}`))})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(gL,{activeKey:l,onChange:e=>{u(e),W5(e).then(e=>{e?.categories?.[0]?.assets?f(e.categories[0].assets):f([])})},items:s.map(e=>({key:e.id,label:e.name})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`flex`,flexWrap:`wrap`,gap:16,justifyContent:`flex-start`,overflowX:`auto`,paddingBottom:8},children:d.length===0?(0,$.jsxs)(`div`,{style:{flex:1,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(w6,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无素材`})]}):d.map((e,t)=>(0,$.jsx)(Ole,{asset:e,index:t,onPreview:m},e.id||t))})]})]}),(0,$.jsxs)(DG,{open:!!p,onCancel:()=>{_.current?.pause(),m(null),g(``),v.current=``},footer:null,width:900,centered:!0,className:`preview-modal`,style:{borderRadius:16,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,height:580,paddingTop:30},children:[(0,$.jsx)(`div`,{style:{flex:1,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:24},children:(0,$.jsxs)(`div`,{style:{maxWidth:`100%`,maxHeight:500,borderRadius:12,overflow:`hidden`,background:`#0f172a`},children:[p?.mediaType===`video`?(0,$.jsx)(`video`,{ref:_,src:`https://ceshi.apiforeign.minzhongzc.com${p.url}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:500,objectFit:`contain`},"webkit-playsinline":`true`}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${p?.url}`,alt:p?.title,style:{maxWidth:`100%`,maxHeight:500,objectFit:`contain`}}),p?.mediaType===`video`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:32,right:32,fontSize:11,color:`#fff`,background:`rgba(0,0,0,0.6)`,padding:`3px 8px`,borderRadius:4},children:`AI生成`})]})}),(0,$.jsxs)(`div`,{style:{flex:1,padding:24,overflowY:`auto`},children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#fff`,marginBottom:16},children:`创意详情`}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:16},children:[(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`比例:`}),h||`计算中...`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#000000ff`,marginBottom:8},children:`视频提示词`}),(0,$.jsx)(`div`,{style:{fontSize:13,color:`#000000ff`,lineHeight:1.6},children:p?.generationPrompt})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:`视频参考图`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:p?.mediaReferences&&p.mediaReferences.length>0?p.mediaReferences.map((e,t)=>{let n=e.url||e.resourceUrl||e.previewUrl||``,r=n.startsWith(`http`)?n:`https://ceshi.apiforeign.minzhongzc.com${n}`;return e.type===`video`?(0,$.jsxs)(`div`,{style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`,position:`relative`},children:[(0,$.jsx)(`video`,{src:r,muted:!0,onClick:e=>{e.stopPropagation();let n=e.currentTarget;x===t?(n.pause(),C(null)):(document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()}),n.play(),C(t))},className:`preview-video-item`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),x!==t&&(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(R8,{style:{fontSize:18,color:`#fff`}})})]},t):e.type===`audio`?(0,$.jsx)(`div`,{onClick:e=>{if(e.stopPropagation(),w===r)E.current&&E.current.pause(),T(null);else{E.current&&E.current.pause();let e=new Audio(r);E.current=e,e.onended=()=>{T(null)},e.play(),T(r)}},style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`,background:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:w===r?(0,$.jsx)(f6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(Q0,{style:{fontSize:24,color:`#fff`}})},t):(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`},children:(0,$.jsx)(`img`,{src:r,alt:`参考图 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})},t)}):(0,$.jsx)($.Fragment,{})})]})]})]}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,borderTop:`1px solid #334155`,display:`flex`,alignItems:`center`,justifyContent:`flex-end`},children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(X,{onClick:()=>{e(`/conversation`,{state:{generationPrompt:p?.generationPrompt,mediaReferences:p?.mediaReferences,aspectRatio:h}})},style:{padding:`8px 24px`,borderRadius:8,background:`#3b82f6`,border:`none`,color:`#fff`,fontSize:13,fontWeight:500},children:`去AI创作`})})})]})]})},{RangePicker:jle}=OB,q9={borderRadius:8,fontWeight:600},J9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),Mle=()=>{let e=Ye(),[t]=On(),{message:n}=nx.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(1),[x,C]=(0,S.useState)(10),[w,T]=(0,S.useState)(t.get(`advertiserId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,JE.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),[A,j]=(0,S.useState)(``);(0,S.useEffect)(()=>{N(),M()},[]);let M=async(e=1,t=10,r,a)=>{c(!0);try{let n=await hoe({advertiser_id:a??w,consume_date:r??E,page:e,page_size:t});i(n.data||[]),o(n.pagination?.total||0),b(n.pagination?.page||1),C(n.pagination?.pageSize||10)}catch{n.error(`加载数据失败`)}finally{c(!1)}},N=async()=>{try{let e=((await H5()).data||[]).map(e=>({name:J9(e.field),description:e.description}));m(e);let t=localStorage.getItem(`consumeColumns`);g(t?JSON.parse(t):e.map(e=>e.name))}catch{n.error(`加载表头字段失败`)}},P=r.map((e,t)=>({...e,index:t+1,key:e.id})),F=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/materials`)},I=()=>{b(1),M(1,x)},L=()=>{DG.confirm({title:`拉取消耗数据`,content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`同步日期:`}),(0,$.jsx)(OB,{value:(0,JE.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,JE.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),style:{width:`100%`}})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`广告主ID(可选):`}),(0,$.jsx)(YU,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await goe({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},R=h.map(e=>p.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[t.get(`advertiserId`)&&(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(U0,{}),onClick:F}),(0,$.jsx)(v4,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[(0,$.jsx)(YU,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180,borderRadius:8},allowClear:!0,onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(jle,{value:E?[(0,JE.default)(E[0]),(0,JE.default)(E[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?D([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):D(void 0)},style:{borderRadius:8}}),(0,$.jsx)(X,{type:`primary`,onClick:I,style:{...q9,borderColor:`transparent`},children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(bie,{}),onClick:L,loading:l,style:q9,children:`拉取消耗`}),(0,$.jsx)(X,{icon:(0,$.jsx)(s8,{}),onClick:()=>f(!0),style:{...q9,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#334155`},children:`自定义表头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(aQ,{dataSource:P,columns:R,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(FW,{current:y,pageSize:x,total:a,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{b(e),C(t),M(e,t)},size:`small`})})]}),(0,$.jsx)(DG,{title:`自定义表头`,open:d,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(h)),n.success(`表头设置已保存`),f(!1)},onCancel:()=>{f(!1),v(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(YU,{placeholder:`搜索指标...`,value:_,allowClear:!0,onChange:e=>v(e.target.value),style:{marginBottom:8}}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,$.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,$.jsx)(mR,{checked:h.length===p.length&&p.length>0,indeterminate:h.length>0&&h.length{e.target.checked?g(p.map(e=>e.name)):g([])},style:{marginBottom:12},children:`全选`}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:p.filter(e=>e.description.toLowerCase().includes(_.toLowerCase())||e.name.toLowerCase().includes(_.toLowerCase())).map(e=>(0,$.jsx)(mR,{checked:h.includes(e.name),onChange:t=>{t.target.checked?g(t=>[...t,e.name]):g(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,h.length,`)`]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(X,{size:`small`,onClick:async()=>{try{let e=((await H5()).data||[]).map(e=>({name:J9(e.field),description:e.description}));m(e),g(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),n.success(`表头字段已更新`)}catch{n.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:h.length===0?(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,$.jsx)(`div`,{children:h.map((e,t)=>{let n=p.find(t=>t.name===e);return(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...h],[t]=e.splice(n,1);e.splice(r,0,t),g(e)}},children:[(0,$.jsx)(Q.Text,{children:n?.description||e}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},Nle=()=>{let e=Ye(),[t]=On(),{message:n}=nx.useApp(),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{let r=t.get(`auth_code`),a=t.get(`state`);if(!r||!a){o(!1),i(10);return}let s={auth_code:r,state:a,app_id:t.get(`app_id`)||void 0,material_auth_status:t.get(`material_auth_status`)||void 0,scope:t.get(`scope`)||void 0,uid:t.get(`uid`)||void 0};(async()=>{try{let t=await Uae(s);c(!0),o(!1),n.success(t?.message||`授权成功`),setTimeout(()=>{e(`/authorization`)},1500)}catch(e){let t=e?.message||`授权失败`;u(t),o(!1),n.error(t)}})();let l=setInterval(()=>{i(e=>e>=11?(o(!1),e):e+1)},1e3);return()=>{clearInterval(l)}},[e,t,n]);let d=()=>{i(0),o(!0),c(!1),u(``),window.location.href=`/authorization`};return s?(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`#dcfce7`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:(0,$.jsx)(Q.Text,{style:{fontSize:40,color:`#22c55e`},children:`✓`})}),(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权成功`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`正在跳转至授权管理页面...`})]})}):(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:a&&r<10?(0,$.jsx)(nG,{size:`large`,description:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(xB,{style:{fontSize:40,color:`#fff`}})}),l?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权失败`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:l}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(LK,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):r>=10?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权无响应`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`请重新授权`}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(LK,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权中,请等待`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`正在等待平台完成授权操作`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8},children:[(0,$.jsx)(xB,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},Ple=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fed7aa 100%)`,border:`1px solid rgba(245, 158, 11, 0.18)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(245, 158, 11, 0.3)`},children:(0,$.jsx)(l2,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700,backgroundImage:`linear-gradient(90deg, #f59e0b 0%, #d97706 30%, #ea580c 50%, #d97706 70%, #f59e0b 100%)`},children:`行业爆款大盘`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#b45309`},children:[(0,$.jsx)(G6,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`实时追踪全网热门素材趋势`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#78716c`,fontSize:14,lineHeight:1.7},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsx)(`div`,{style:{position:`relative`},children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(k8,{style:{marginRight:8,color:`#6366f1`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`爆款素材榜单`}),(0,$.jsx)(`span`,{style:{marginLeft:10,fontSize:12,fontWeight:400,color:`#94a3b8`}})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,zIndex:1,inset:0,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:2,color:`#fff`,borderRadius:6},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(A3,{style:{marginRight:6}}),`立即解锁全部`,(0,$.jsx)(K0,{style:{marginLeft:4,fontSize:12}})]})}),[{rank:1,title:`夏日美妆教程:3 步打造奶油肌`,author:`美妆博主·小雅`,views:`128.4w`,likes:`12.6w`,comments:`8,234`,tag:`NO.1`,tagColor:`#f59e0b`},{rank:2,title:`平价穿搭 | 学生党一周不重样`,author:`穿搭达人·Miki`,views:`96.2w`,likes:`9.8w`,comments:`6,128`,tag:`NO.2`,tagColor:`#a78bfa`},{rank:3,title:`探店 vlog | 网红咖啡馆测评`,author:`美食探店·阿伦`,views:`78.5w`,likes:`7.4w`,comments:`4,892`,tag:`NO.3`,tagColor:`#6366f1`},{rank:4,title:`iPhone 16 Pro 一周深度体验`,author:`数码评测·老王`,views:`65.7w`,likes:`6.1w`,comments:`3,847`,tag:`NO.4`,tagColor:`#94a3b8`}].map(e=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{display:`flex`,gap:14,padding:14,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:140,height:80,flexShrink:0,borderRadius:10,overflow:`hidden`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(N6,{style:{fontSize:28,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:600},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:4,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:e.author}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,fontSize:12,color:`#64748b`},children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(DU,{style:{marginRight:3}}),e.views]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(w3,{style:{marginRight:3}}),e.likes]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(e4,{style:{marginRight:3}}),e.comments]})]})]})]},e.rank))]})]})})]}),Fle=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(`image`),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(`all`),u=(e,n)=>{r(e),a(n),t(!0)},d=(e,t)=>{let n=document.createElement(`a`);n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},f=[{value:`all`,label:`全部行业`},{value:`fashion`,label:`时尚穿搭`},{value:`food`,label:`美食探店`},{value:`travel`,label:`旅行风景`},{value:`tech`,label:`数码科技`},{value:`beauty`,label:`美妆护肤`},{value:`home`,label:`家居生活`},{value:`母婴`,label:`母婴亲子`}],p=[{id:1,type:`image`,url:`https://images.unsplash.com/photo-1522337360788-8b13dee7a37e?w=400&q=80`,title:`时尚街拍`,tag:`热门`,industry:`fashion`,aspectRatio:1.3},{id:2,type:`video`,url:`https://www.w3schools.com/html/mov_bbb.mp4`,poster:`https://images.unsplash.com/photo-1492691527719-9d1e07e534b4?w=400&q=80`,title:`自然风景`,tag:`推荐`,industry:`travel`,aspectRatio:1.5},{id:3,type:`image`,url:`https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=400&q=80`,title:`湖光山色`,tag:`热门`,industry:`travel`,aspectRatio:.75},{id:4,type:`image`,url:`https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400&q=80`,title:`山脉风光`,tag:`新品`,industry:`travel`,aspectRatio:1.4},{id:5,type:`video`,url:`https://www.w3schools.com/html/movie.mp4`,poster:`https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=400&q=80`,title:`森林探索`,tag:`推荐`,industry:`travel`,aspectRatio:.67},{id:6,type:`image`,url:`https://images.unsplash.com/photo-1470770841072-f978cf4d019e?w=400&q=80`,title:`山间湖泊`,tag:`热门`,industry:`travel`,aspectRatio:1.7},{id:7,type:`image`,url:`https://images.unsplash.com/photo-1501785888041-af3ef285b470?w=400&q=80`,title:`海岸风光`,tag:`推荐`,industry:`travel`,aspectRatio:.8},{id:8,type:`video`,url:`https://www.w3schools.com/html/mov_bbb.mp4`,poster:`https://images.unsplash.com/photo-1472214103451-9374bd1c798e?w=400&q=80`,title:`城市夜景`,tag:`新品`,industry:`travel`,aspectRatio:1.33},{id:9,type:`image`,url:`https://images.unsplash.com/photo-1447752875215-b2761acb3c5d?w=400&q=80`,title:`森林小径`,tag:`热门`,industry:`travel`,aspectRatio:1.5},{id:10,type:`image`,url:`https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=400&q=80`,title:`美食摆盘`,tag:`热门`,industry:`food`,aspectRatio:1.2},{id:11,type:`image`,url:`https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?w=400&q=80`,title:`时尚穿搭`,tag:`推荐`,industry:`fashion`,aspectRatio:1},{id:12,type:`video`,url:`https://www.w3schools.com/html/mov_bbb.mp4`,poster:`https://images.unsplash.com/photo-1498050108023-c5249f4df085?w=400&q=80`,title:`数码产品`,tag:`新品`,industry:`tech`,aspectRatio:1.4}],m=(0,S.useMemo)(()=>p.filter(e=>{let t=o?e.title.toLowerCase().includes(o.toLowerCase()):!0,n=c===`all`?!0:e.industry===c;return t&&n}),[o,c]),h=e=>{u((e.type,e.url),e.type)};return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fce7f3 100%)`,border:`1px solid rgba(139, 92, 246, 0.12)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(139, 92, 246, 0.3)`},children:(0,$.jsx)(Z4,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700},children:`创意素材案例`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#7c3aed`},children:[(0,$.jsx)(l4,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`探索 AI 创作无限可能`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:14,lineHeight:1.7},children:`精选 AI 生成的优秀素材案例,展示 AI 创作的无限潜力与创意灵感`})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(y8,{style:{marginRight:8,color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`精选案例展示`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(VC,{value:c,onChange:e=>l(e),style:{width:140},options:f}),(0,$.jsx)(YU.Search,{placeholder:`搜索行业案例`,allowClear:!0,enterButton:(0,$.jsx)(IC,{}),size:`middle`,value:o,onChange:e=>s(e.target.value),onSearch:e=>s(e),style:{width:240}})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16,color:`#64748b`,fontSize:13},children:[`共找到 `,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontWeight:600},children:m.length}),` 个案例`]}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{columnCount:5,columnGap:12,marginBottom:16},children:m.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>h(e),style:{breakInside:`avoid`,marginBottom:12,borderRadius:10,overflow:`hidden`,cursor:`pointer`,position:`relative`,boxShadow:`0 4px 12px rgba(0, 0, 0, 0.08)`,transition:`transform 0.3s ease, box-shadow 0.3s ease`,animation:`fadeInUp 0.5s ease ${t*.1}s both`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-4px)`,e.currentTarget.style.boxShadow=`0 8px 24px rgba(0, 0, 0, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(0, 0, 0, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:`100%`,paddingBottom:`${1/e.aspectRatio*100}%`,backgroundColor:`#f3f4f6`},children:[e.type===`image`?(0,$.jsx)(`img`,{src:e.url,alt:e.title,style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:e.poster,alt:e.title,style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,objectFit:`cover`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:48,height:48,borderRadius:`50%`,background:`rgba(0, 0, 0, 0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(N6,{style:{fontSize:32,color:`#fff`}})})]}),(0,$.jsxs)(`div`,{style:{position:`absolute`,top:12,left:12,padding:`4px 8px`,borderRadius:6,background:`rgba(0, 0, 0, 0.6)`,backdropFilter:`blur(4px)`,display:`flex`,alignItems:`center`,gap:4},children:[e.type===`image`?(0,$.jsx)(w6,{style:{fontSize:12,color:`#fff`}}):(0,$.jsx)(R8,{style:{fontSize:12,color:`#fff`}}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#fff`,fontWeight:500},children:e.type===`image`?`图片`:`视频`})]})]}),(0,$.jsx)(`div`,{style:{padding:12,background:`#fff`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#1f2937`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,flex:1,marginRight:8},children:e.title}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#fff`,padding:`2px 8px`,borderRadius:4,background:e.tag===`热门`?`#ef4444`:e.tag===`推荐`?`#6366f1`:`#f59e0b`,whiteSpace:`nowrap`},children:e.tag})]})})]},e.id))}),m.length===0&&(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 20px`,color:`#94a3b8`},children:[(0,$.jsx)(IC,{style:{fontSize:48,marginBottom:16,opacity:.5}}),(0,$.jsx)(`div`,{style:{fontSize:15},children:`暂无符合条件的案例`}),(0,$.jsx)(`div`,{style:{fontSize:13,marginTop:8},children:`请尝试调整搜索关键词或行业筛选`}),(0,$.jsx)(X,{style:{marginTop:16,borderRadius:8},onClick:()=>{s(``),l(`all`)},children:`重置筛选`})]})]}),(0,$.jsx)(DG,{open:e,onCancel:()=>t(!1),footer:[(0,$.jsx)(X,{icon:(0,$.jsx)(I1,{}),onClick:()=>d(n,i===`image`?`image.jpg`:`video.mp4`),type:`primary`,style:{borderRadius:8},children:`下载`},`download`)],width:800,centered:!0,styles:{body:{padding:0}},children:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:400,borderRadius:8,overflow:`hidden`},children:i===`image`?(0,$.jsx)(`img`,{src:n,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`60vh`,objectFit:`contain`}}):(0,$.jsx)(`video`,{src:n,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`60vh`,objectFit:`contain`}})})})]})},{RangePicker:Ile}=OB,Y9=e=>e?new Date(e).toLocaleString(`zh-CN`,{hour12:!1}):`-`,Lle=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(1),[f,p]=(0,S.useState)([]),[m,h]=(0,S.useState)([]),[g,_]=(0,S.useState)([]),[v,y]=(0,S.useState)([]),[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)({items:[],total:0}),[T,E]=(0,S.useState)(1),[D,O]=(0,S.useState)(),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(),[N,P]=(0,S.useState)([null,null]),[F,I]=(0,S.useState)(!1),[L,R]=(0,S.useState)({open:!1}),[z]=mH.useForm(),[B,V]=(0,S.useState)(!1),[H]=mH.useForm(),U=!!e?.isReadOnly,ee=!!e,W=(0,S.useCallback)(async()=>{I(!0);try{let e=await Boe().catch(()=>[]);r(e||[]);let n=await zoe().catch(()=>null);t(n);let i=n?.id||e?.[0]?.id;if(a(e=>e||i),n){let[e,t,n,r,i,a]=await Promise.all([Voe(u,20),Uoe(),qoe(),Joe(),Yoe(),Qoe()]);s(e?.items||[]),l(Number(e?.total||0)),p(t||[]),h(n||[]),_(r||[]),y(i||[]),x(a||[])}else s([]),p([]),h([]),_([]),y([]),x([])}finally{I(!1)}},[u]),te=(0,S.useCallback)(async()=>{if(!i){w({items:[],total:0});return}try{w(await nse({teamId:i,page:T,pageSize:20,phone:k||void 0,subscriptionId:j,recordType:D,startDate:N[0]?.format?.(`YYYY-MM-DD`),endDate:N[1]?.format?.(`YYYY-MM-DD`)})||{items:[],total:0})}catch(e){Z.error(e?.message||`团队流水加载失败`)}},[i,T,k,j,D,N]);(0,S.useEffect)(()=>{W()},[W]),(0,S.useEffect)(()=>{te()},[te]);let G=e=>{z.resetFields();let t=f.find(t=>t.subscription?.id===e),n=Math.max(1,Number(t?.seatLimit||1)-Number(t?.activeSeatCount||0)),r=Number(t?.periodUnallocatedCredits||0)>0?Math.floor(Number(t?.periodUnallocatedCredits||0)/n*100)/100:void 0;z.setFieldsValue({monthlyAllocatedCredits:r}),R({open:!0,subscriptionId:e})},ne=e=>{z.setFieldsValue({userId:e.userId,monthlyAllocatedCredits:e.monthlyAllocatedCredits}),R({open:!0,subscriptionId:e.subscriptionId,seat:e})},K=async()=>{try{let e=await z.validateFields();L.seat?await Goe(L.seat.id,Number(e.monthlyAllocatedCredits)):await Woe(String(L.subscriptionId),String(e.userId),Number(e.monthlyAllocatedCredits)),Z.success(L.seat?`席位额度已更新`:`席位已创建`),R({open:!1}),await W()}catch(e){e?.errorFields||Z.error(e?.message||`席位保存失败`)}},re=async e=>{try{await Koe(e),Z.success(`席位已取消,未使用额度已释放`),await W()}catch(e){Z.error(e?.message||`席位取消失败`)}},ie=[{title:`成员`,dataIndex:`username`,render:(t,n)=>(0,$.jsxs)(bV,{children:[(0,$.jsx)(`span`,{children:t}),n.id===e?.managerId&&(0,$.jsx)(vQ,{color:`purple`,children:`队长`})]})},{title:`手机号`,dataIndex:`phone`,render:e=>e||`-`},{title:`个人积分`,dataIndex:`personalCredits`,align:`right`,render:e=>Number(e||0).toLocaleString()},{title:`团队可用`,dataIndex:`teamAvailableCredits`,align:`right`,render:e=>Number(e||0).toLocaleString()},{title:`团队冻结`,dataIndex:`teamFrozenCredits`,align:`right`,render:e=>Number(e||0).toLocaleString()},{title:`操作`,width:110,render:(t,n)=>n.id===e?.managerId?`-`:(0,$.jsx)(jG,{title:`确认将该成员设为新队长?`,description:`仅当所有团队订阅均已结束且没有未完成团队订单时可操作。`,onConfirm:async()=>{try{await Hoe(n.id),Z.success(`团队队长已更换`),await W()}catch(e){Z.error(e?.message||`更换队长失败`)}},children:(0,$.jsx)(X,{type:`link`,disabled:U,icon:(0,$.jsx)(Lie,{}),children:`设为队长`})})}],ae=e=>[{title:`成员`,dataIndex:`username`,render:e=>e||`-`},{title:`月分配额度`,dataIndex:`monthlyAllocatedCredits`,align:`right`},{title:`本期净消耗`,dataIndex:`currentPeriodUsedCredits`,align:`right`},{title:`本期剩余额度`,dataIndex:`currentPeriodRemainingCredits`,align:`right`},{title:`状态`,dataIndex:`statusLabel`,render:e=>(0,$.jsx)(vQ,{children:e||`其他状态`})},{title:`操作`,width:140,render:(e,t)=>t.status===`active`?(0,$.jsxs)(bV,{children:[(0,$.jsx)(X,{size:`small`,onClick:()=>ne(t),disabled:U,children:`改额度`}),(0,$.jsx)(jG,{title:`确认取消席位?`,onConfirm:()=>re(t.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,disabled:U,children:`取消`})})]}):`-`}],q=f.length===0?(0,$.jsx)(dC,{description:`暂无团队订阅`}):(0,$.jsx)(bV,{direction:`vertical`,size:16,style:{width:`100%`},children:f.map(e=>{let t=e.subscription||{};return(0,$.jsxs)(vL,{title:(0,$.jsxs)(bV,{children:[(0,$.jsx)(B8,{}),(0,$.jsx)(`span`,{children:t.productNameSnapshot||`团队订阅套餐`}),(0,$.jsx)(vQ,{children:t.billingCycleLabel||`订阅周期`}),(0,$.jsx)(vQ,{color:t.status===`active`?`green`:`default`,children:t.statusLabel||`其他状态`})]}),extra:(0,$.jsx)(X,{icon:(0,$.jsx)(VI,{}),disabled:U||t.status!==`active`||e.activeSeatCount>=e.seatLimit,onClick:()=>G(t.id),children:`分配席位`}),children:[(0,$.jsxs)(cq,{gutter:[12,12],style:{marginBottom:12},children:[(0,$.jsxs)(xR,{span:6,children:[`席位:`,(0,$.jsxs)(`b`,{children:[e.activeSeatCount,`/`,e.seatLimit]})]}),(0,$.jsxs)(xR,{span:6,children:[`本期总积分:`,(0,$.jsx)(`b`,{children:Number(e.periodTotalCredits||0).toLocaleString()})]}),(0,$.jsxs)(xR,{span:6,children:[`本期剩余资金:`,(0,$.jsx)(`b`,{children:Number(e.periodUnspentCredits||0).toLocaleString()})]}),(0,$.jsxs)(xR,{span:6,children:[`未分配积分:`,(0,$.jsx)(`b`,{children:Number(e.periodUnallocatedCredits||0).toLocaleString()})]}),(0,$.jsxs)(xR,{span:12,children:[`订阅实例:`,(0,$.jsx)(Q.Text,{copyable:t.subscriptionNo?{text:t.subscriptionNo}:!1,children:t.subscriptionNo||`-`})]}),(0,$.jsxs)(xR,{span:12,children:[`订阅到期:`,Y9(t.expiresAt)]}),(0,$.jsxs)(xR,{span:24,children:[`本期:`,Y9(e.currentPeriodStartAt),` ~ `,Y9(e.currentPeriodExpiresAt)]})]}),(0,$.jsx)(aQ,{rowKey:`id`,size:`small`,pagination:!1,columns:ae(e),dataSource:e.seats||[],scroll:{x:850}})]},t.id)})}),oe=[{title:`邀请码`,dataIndex:`code`,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,children:e})},{title:`状态`,dataIndex:`status`,render:e=>(0,$.jsx)(vQ,{children:e===`active`?`有效`:`已撤销`})},{title:`使用次数`,render:(e,t)=>`${t.useCount||0}${t.maxUses?` / ${t.maxUses}`:``}`},{title:`过期时间`,dataIndex:`expiresAt`,render:e=>e?Y9(e):`长期有效`},{title:`操作`,render:(e,t)=>t.status===`active`?(0,$.jsx)(X,{type:`link`,danger:!0,disabled:U,onClick:async()=>{try{await Zoe(t.id),await W(),Z.success(`邀请码已撤销`)}catch(e){Z.error(e?.message||`撤销失败`)}},children:`撤销`}):`-`}],se=[{title:`申请人`,dataIndex:`username`},{title:`手机号`,dataIndex:`phone`,render:e=>e||`-`},{title:`状态`,dataIndex:`status`,render:e=>(0,$.jsx)(vQ,{children:{pending:`待审批`,approved:`已通过`,rejected:`已拒绝`}[e]||`其他状态`})},{title:`申请时间`,dataIndex:`createdAt`,render:e=>Y9(e)},{title:`操作`,render:(e,t)=>t.status===`pending`?(0,$.jsxs)(bV,{children:[(0,$.jsx)(X,{size:`small`,type:`primary`,disabled:U,onClick:async()=>{try{await $5(t.id,`approve`),await W(),Z.success(`已通过申请`)}catch(e){Z.error(e?.message||`操作失败`)}},children:`通过`}),(0,$.jsx)(X,{size:`small`,danger:!0,disabled:U,onClick:async()=>{try{await $5(t.id,`reject`),await W(),Z.success(`已拒绝申请`)}catch(e){Z.error(e?.message||`操作失败`)}},children:`拒绝`})]}):`-`}],ce=[{title:`成员`,dataIndex:`username`,width:120},{title:`类型`,dataIndex:`recordTypeLabel`,width:110,render:e=>(0,$.jsx)(vQ,{children:e||`其他`})},{title:`团队积分变动`,dataIndex:`teamAmount`,width:130,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:Number(e)<0?`#ef4444`:`#10b981`},children:[Number(e)>0?`+`:``,Number(e||0)]})},{title:`说明`,dataIndex:`description`,ellipsis:!0},{title:`订阅实例`,dataIndex:`subscriptionNo`,width:190,render:e=>(0,$.jsx)(Q.Text,{copyable:e&&e!==`历史订阅`?{text:e}:!1,children:e||`历史订阅`})},{title:`周期ID`,dataIndex:`subscriptionPeriodId`,width:180,ellipsis:!0},{title:`席位ID`,dataIndex:`seatId`,width:180,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:180,render:e=>Y9(e)}],le=ee?[{key:`subscriptions`,label:`订阅与席位`,children:q},{key:`members`,label:`团队成员`,children:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(aQ,{rowKey:`id`,columns:ie,dataSource:o,pagination:!1,scroll:{x:850}}),(0,$.jsx)(FW,{style:{marginTop:12,textAlign:`right`},current:u,pageSize:20,total:c,onChange:d})]})},{key:`usage`,label:`成员月消耗`,children:m.length?(0,$.jsx)(aQ,{rowKey:e=>`${e.userId}-${e.subscriptionPeriodId}`,pagination:!1,dataSource:m,scroll:{x:1400},columns:[{title:`成员`,dataIndex:`username`,width:120},{title:`订阅实例`,dataIndex:`subscriptionNo`,width:190,render:e=>(0,$.jsx)(Q.Text,{copyable:e&&e!==`历史订阅`?{text:e}:!1,children:e||`历史订阅`})},{title:`套餐名称`,dataIndex:`subscriptionName`,width:180,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e||`历史团队订阅`})},{title:`等级编码`,width:190,render:(e,t)=>(0,$.jsxs)(`span`,{children:[t.tierLabel||`未知等级`,t.tierCode?`(${t.tierCode})`:``,t.tierRank?` / ${t.tierRank}`:``]})},{title:`套餐周期`,dataIndex:`billingCycleLabel`,width:110,render:e=>(0,$.jsx)(vQ,{children:e||`未知周期`})},{title:`月度周期`,dataIndex:`periodLabel`,width:110,render:(e,t)=>e||(t.periodSequence>0?`第${t.periodSequence}个月`:`历史周期`)},{title:`周期时间`,width:320,render:(e,t)=>`${Y9(t.periodStartAt)} ~ ${Y9(t.periodExpiresAt)}`},{title:`本期净消耗`,dataIndex:`consumedCredits`,width:130,align:`right`,render:e=>Number(e||0).toLocaleString()}]}):(0,$.jsx)(dC,{description:`暂无团队积分消耗`})},{key:`invite`,label:`邀请与审批`,children:(0,$.jsxs)(bV,{direction:`vertical`,style:{width:`100%`},size:18,children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(VI,{}),disabled:U,onClick:()=>V(!0),children:`创建邀请码`}),(0,$.jsx)(aQ,{rowKey:`id`,size:`small`,pagination:!1,columns:oe,dataSource:v}),(0,$.jsx)(Q.Title,{level:5,children:`加入申请`}),(0,$.jsx)(aQ,{rowKey:`id`,size:`small`,pagination:!1,columns:se,dataSource:b})]})},{key:`history`,label:`队长任期`,children:g.length?(0,$.jsx)(aQ,{rowKey:`id`,pagination:!1,dataSource:g,columns:[{title:`队长`,dataIndex:`managerName`},{title:`任期开始`,dataIndex:`startedAt`,render:e=>Y9(e)},{title:`任期结束`,dataIndex:`endedAt`,render:e=>e?Y9(e):(0,$.jsx)(vQ,{color:`green`,children:`当前任期`})}]}):(0,$.jsx)(dC,{description:`暂无任期记录`})}]:[],ue={key:`flow`,label:`团队积分流水`,children:(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(bV,{wrap:!0,style:{marginBottom:12},children:[(0,$.jsx)(VC,{style:{width:220},value:i,onChange:e=>{a(e),E(1)},options:n.map(e=>({value:e.id,label:`${e.name}${e.isCurrentManager?`(当前队长)`:`(历史任期)`}`}))}),(0,$.jsx)(YU,{allowClear:!0,placeholder:`成员手机号`,style:{width:150},value:k,onChange:e=>A(e.target.value)}),(0,$.jsx)(VC,{allowClear:!0,placeholder:`流水类型`,style:{width:130},value:D,onChange:e=>{O(e),E(1)},options:[{value:`recharge`,label:`发放/充值`},{value:`consume`,label:`消费`},{value:`refund`,label:`业务退款`},{value:`expire`,label:`积分过期`},{value:`revoke`,label:`积分撤销`}]}),ee&&(0,$.jsx)(VC,{allowClear:!0,placeholder:`团队订阅`,style:{width:220},value:j,onChange:e=>{M(e),E(1)},options:f.map(e=>({value:e.subscription.id,label:`${e.subscription.subscriptionNo||`未编号`} · ${e.subscription.productNameSnapshot||`团队订阅套餐`}`}))}),(0,$.jsx)(Ile,{value:N,onChange:e=>{P(e||[null,null]),E(1)}}),(0,$.jsx)(X,{icon:(0,$.jsx)(LK,{}),onClick:te,children:`刷新`}),(0,$.jsx)(X,{icon:(0,$.jsx)(I1,{}),onClick:()=>{let e=rse({teamId:i,phone:k||void 0,subscriptionId:j,recordType:D,startDate:N[0]?.format?.(`YYYY-MM-DD`),endDate:N[1]?.format?.(`YYYY-MM-DD`)});window.open(e,`_blank`)},children:`导出`})]}),(0,$.jsx)(aQ,{rowKey:`id`,columns:ce,dataSource:C.items||[],pagination:!1,scroll:{x:1200}}),(0,$.jsx)(FW,{style:{marginTop:12,textAlign:`right`},current:T,pageSize:20,total:Number(C.total||0),onChange:E})]})};return!e&&n.length===0&&!F?(0,$.jsx)(dC,{description:`您当前不是团队队长,也没有可查看的历史队长任期`}):(0,$.jsxs)(`div`,{children:[e&&(0,$.jsx)(vL,{loading:F,style:{marginBottom:16},children:(0,$.jsxs)(cq,{align:`middle`,justify:`space-between`,children:[(0,$.jsxs)(xR,{children:[(0,$.jsxs)(bV,{children:[(0,$.jsx)(C8,{}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:e.name}),(0,$.jsx)(vQ,{color:e.status===`active`?`green`:`red`,children:e.statusLabel||(e.status===`active`?`启用`:`禁用`)})]}),(0,$.jsxs)(`div`,{style:{color:`#64748b`,marginTop:8},children:[`成员 `,e.memberCount,` 人 · 当前队长 `,e.managerName||`-`]})]}),(0,$.jsx)(xR,{children:U&&(0,$.jsx)(vQ,{icon:(0,$.jsx)(A3,{}),color:`red`,children:`团队已禁用,仅允许只读查看`})})]})}),U&&(0,$.jsx)(Jf,{type:`warning`,showIcon:!0,message:`团队业务已冻结`,description:`团队订阅仍会正常发放积分、自然滚期和过期;当前团队积分显示为冻结且不会参与结算。团队重新启用后,仅恢复届时仍有效的团队积分。`,style:{marginBottom:16}}),!ee&&(0,$.jsx)(Jf,{type:`info`,showIcon:!0,message:`历史队长只读权限`,description:`您可以查看自己担任队长任期内的整个团队积分流水,但没有当前团队管理权限。`,style:{marginBottom:16}}),(0,$.jsx)(gL,{items:[...le,ue]}),(0,$.jsx)(DG,{open:L.open,title:L.seat?`修改席位月额度`:`分配团队订阅席位`,onCancel:()=>R({open:!1}),onOk:K,okText:`确认保存`,cancelText:`取消`,children:(0,$.jsxs)(mH,{form:z,layout:`vertical`,children:[!L.seat&&(0,$.jsx)(mH.Item,{name:`userId`,label:`团队成员`,rules:[{required:!0,message:`请选择团队成员`}],children:(0,$.jsx)(VC,{showSearch:!0,optionFilterProp:`label`,options:o.map(t=>({value:t.id,label:`${t.username}${t.id===e?.managerId?`(队长)`:``}`}))})}),(0,$.jsx)(mH.Item,{name:`monthlyAllocatedCredits`,label:`每周期可消费团队积分`,rules:[{required:!0,message:`请输入席位额度`}],extra:`额度必须大于0;修改低于已用额度时,本期剩余额度按0处理,不追回已完成消费。`,children:(0,$.jsx)(cz,{min:.01,precision:2,style:{width:`100%`}})})]})}),(0,$.jsx)(DG,{open:B,title:`创建团队邀请码`,onCancel:()=>V(!1),onOk:async()=>{try{let e=await H.validateFields(),t=await Xoe(e.maxUses,e.expiresAt?.toISOString());V(!1),H.resetFields(),await W(),DG.success({title:`邀请码已创建`,content:(0,$.jsx)(Q.Text,{copyable:!0,children:t.code})})}catch(e){e?.errorFields||Z.error(e?.message||`创建邀请码失败`)}},okText:`创建`,cancelText:`取消`,children:(0,$.jsxs)(mH,{form:H,layout:`vertical`,children:[(0,$.jsx)(mH.Item,{name:`maxUses`,label:`最大使用次数`,children:(0,$.jsx)(cz,{min:1,precision:0,style:{width:`100%`},placeholder:`留空表示不限制`})}),(0,$.jsx)(mH.Item,{name:`expiresAt`,label:`过期时间`,children:(0,$.jsx)(OB,{showTime:!0,style:{width:`100%`},disabledDate:e=>e&&e.isBefore((0,JE.default)().startOf(`day`))})})]})})]})},Rle=()=>{let[e]=On(),t=Ye(),n=e.get(`code`)||``,{user:r,loading:i,checkAuth:a}=e7(),[o,s]=(0,S.useState)(!0),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(`VideoGen.AI`),[v,y]=(0,S.useState)(``);return(0,S.useEffect)(()=>{a(),p5().then(e=>{_(e.siteName),y(e.siteLogo)}).catch(()=>{})},[a]),(0,S.useEffect)(()=>{if(!n){s(!1);return}i||(s(!0),(r?$oe(n):ese(n)).then(e=>{l(e),e?.valid&&r&&!e.alreadyInTeam&&!e.hasPendingRequest&&h(!0)}).catch(()=>l(null)).finally(()=>s(!1)))},[n,r,i]),i||o?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:`60vh`},children:(0,$.jsx)(nG,{size:`large`})}):f?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(sq,{status:`success`,icon:(0,$.jsx)(N2,{style:{color:`#6366f1`}}),title:`申请已提交`,subTitle:`您的加入申请已提交,请等待团队管理人审批。审批通过后将自动加入团队。`,extra:(0,$.jsx)(bV,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):!n||!c?.valid?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(sq,{status:`error`,title:`邀请链接无效`,subTitle:`该邀请链接可能已过期或不存在,请联系团队管理人重新获取。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):c.alreadyInTeam?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(sq,{status:`info`,title:`您已在此团队中`,subTitle:`您已经是「${c.teamName}」的成员了,无需再次加入。`,extra:(0,$.jsx)(bV,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):c.hasPendingRequest?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(sq,{status:`info`,title:`申请待审批`,subTitle:`您已提交加入「${c.teamName}」的申请,请等待团队管理人审批。`,extra:(0,$.jsx)(bV,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`40px 20px`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:480},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,marginBottom:32},children:[v?(0,$.jsx)(`img`,{src:v,alt:`logo`,style:{width:40,height:40,borderRadius:10}}):(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(T8,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{fontSize:22,fontWeight:700,color:`#1e293b`,letterSpacing:.5},children:g})]}),(0,$.jsxs)(vL,{variant:`outlined`,style:{borderRadius:16,width:`100%`,textAlign:`center`},children:[(0,$.jsx)(C8,{style:{fontSize:48,color:`#6366f1`,marginBottom:16}}),(0,$.jsx)(Q.Title,{level:3,children:`加入团队`}),(0,$.jsx)(Q.Text,{style:{fontSize:16,color:`#475569`,display:`block`,marginBottom:8},children:`您被邀请加入团队`}),(0,$.jsxs)(Q.Title,{level:4,style:{color:`#6366f1`,margin:`16px 0 24px`},children:[`「`,c.teamName,`」`]}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{display:`block`,marginBottom:24},children:`加入后团队管理人可以为您分配积分、查看您的积分使用情况。`}),r?(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,loading:u,onClick:()=>h(!0),children:`申请加入`}):(0,$.jsxs)(bV,{direction:`vertical`,style:{width:`100%`},size:12,children:[(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,icon:(0,$.jsx)(N3,{}),onClick:()=>{t(`/login?redirect=${encodeURIComponent(window.location.pathname+window.location.search)}`)},children:`登录后申请加入`}),(0,$.jsx)(X,{size:`large`,block:!0,icon:(0,$.jsx)(Pie,{}),onClick:()=>{t(`/login?tab=register&redirect=${encodeURIComponent(window.location.pathname+window.location.search)}`)},children:`注册新账号`}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:`登录或注册后将自动提交加入申请`})]})]})]})}),(0,$.jsxs)(DG,{title:(0,$.jsxs)(bV,{children:[(0,$.jsx)(C8,{style:{color:`#6366f1`}}),`确认加入团队`]}),open:m,onOk:async()=>{if(n)try{d(!0),await tse(n),p(!0),h(!1),Z.success(`申请已提交`)}catch(e){Z.error(e?.message||`申请失败`)}finally{d(!1)}},onCancel:()=>h(!1),okText:`确认加入`,cancelText:`取消`,confirmLoading:u,width:420,children:[(0,$.jsxs)(`p`,{style:{marginBottom:0},children:[`您确定要加入团队 `,(0,$.jsxs)(`strong`,{style:{color:`#6366f1`},children:[`「`,c.teamName,`」`]}),` 吗?`]}),(0,$.jsx)(`p`,{style:{marginTop:8,color:`#64748b`,fontSize:13},children:`提交后需等待团队管理人审批,审批通过后将自动加入团队。`})]})]})},zle=new Set([`group_active`,`callback_success`]),Ble=()=>{let e=(0,S.useMemo)(()=>new URLSearchParams(window.location.search),[]),t=e.get(`status`)||``,n=e.get(`resultCode`)||``,r=zle.has(t)||n===`10000`;return(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`,padding:20},children:(0,$.jsxs)(vL,{style:{width:`100%`,maxWidth:520,borderRadius:18},children:[(0,$.jsx)(sq,{status:r?`success`:`error`,title:r?`真人认证已完成`:`真人认证未完成`,subTitle:r?`请回到电脑端查看,项目组已创建成功。`:`请回到电脑端重新发起创建项目组。`,extra:[(0,$.jsx)(X,{type:`primary`,onClick:()=>{let e=/MicroMessenger/i.test(navigator.userAgent),t=/AlipayClient/i.test(navigator.userAgent),n=/Android|iPhone|iPad/i.test(navigator.userAgent);if(e)try{window.opener=null,window.open(``,`_self`),window.close()}catch{Z.info(`请点击右上角关闭按钮`)}else if(t)try{window.close()}catch{Z.info(`请点击左上角返回`)}else if(n)try{window.history.back()}catch{window.location.href=`/`}else try{window.close()}catch{window.location.href=`/`}},children:`关闭页面`},`close`)]}),(0,$.jsx)(Q.Paragraph,{type:`secondary`,style:{textAlign:`center`,marginBottom:0,fontSize:13,marginTop:12},children:`如无法自动关闭,请手动关闭页面`})]})})},Vle=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u]=mH.useForm(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(new Map),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)([]),[O,k]=(0,S.useState)(0),[A,j]=(0,S.useState)(1),[M]=(0,S.useState)(10),[N,P]=(0,S.useState)([null,null]),[F,I]=(0,S.useState)([null,null]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(!1),[V,H]=(0,S.useState)(!1),[U,ee]=(0,S.useState)(null),W=async(e=A)=>{T(!0);try{let t=await b5(e,M,{invoiceMode:!0,startDate:N[0]||void 0,endDate:N[1]||void 0});D((t.items||[]).map(e=>({...e,_occupied:!!e.isOccupied,_occupiedBy:e.occupiedBy}))),k(t.total||0)}catch{D([]),k(0)}T(!1)},[te,G]=(0,S.useState)(1),[ne]=(0,S.useState)(10),[K,re]=(0,S.useState)(0),ie=(0,S.useRef)(!1),ae=async()=>{r(!0);try{let e=await Dae({page:te,pageSize:ne});t((e.items||[]).map(e=>({id:e.id,orderNo:e.invoiceNo,orderType:e.headerType===`company`?`企业`:`个人`,amount:e.totalAmount,createdAt:e.createdAt,status:e.status===`success`?`issued`:e.status===`failed`?`rejected`:`processing`,headerName:e.headerName,headerType:e.headerType,headerTaxNo:e.headerTaxNo,selectedOrders:e.orders||[],email:e.email,failureReason:e.failureReason}))),re(e.total||0)}catch{}r(!1)};(0,S.useEffect)(()=>{ae(),le()},[]),(0,S.useEffect)(()=>{if(!ie.current){ie.current=!0;return}ae()},[te]),(0,S.useEffect)(()=>{d&&(j(1),W(1))},[d]);let q=[{title:`发票编号`,dataIndex:`orderNo`,key:`orderNo`,width:200,render:e=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:13,color:`#64748b`},children:e})},{title:`发票类型`,dataIndex:`orderType`,key:`orderType`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#374151`},children:e})},{title:`总金额`,dataIndex:`amount`,key:`amount`,width:120,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,fontSize:14,color:`#1e293b`},children:[`¥`,e.toFixed(2)]})},{title:`开具时间`,dataIndex:`createdAt`,key:`createdAt`,width:180,render:e=>e?(0,$.jsx)(`span`,{style:{color:`#64748b`},children:new Date(e).toLocaleString(`zh-CN`)}):`-`},{title:`发票状态`,dataIndex:`status`,key:`status`,width:120,render:e=>{let t={pending:{color:`#f59e0b`,label:`待开具`,bg:`rgba(245,158,11,0.1)`},processing:{color:`#0ea5e9`,label:`开具中`,bg:`rgba(14,165,233,0.1)`},issued:{color:`#10b981`,label:`已开具`,bg:`rgba(16,185,129,0.1)`},rejected:{color:`#ef4444`,label:`已驳回`,bg:`rgba(239,68,68,0.1)`}}[e]||{color:`#64748b`,label:e,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(vQ,{color:t.color,style:{background:t.bg,fontWeight:500,padding:`4px 12px`},children:t.label})}},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,$.jsx)(X,{type:`link`,size:`small`,onClick:()=>{ee(t),H(!0)},children:`详情`})}],oe=[{title:`订单号`,key:`orderNo`,width:200,render:(e,t)=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:13,color:`#64748b`},children:t.order_no||t.orderNo||t.id})},{title:`支付方式`,key:`paymentMethod`,width:100,render:(e,t)=>{let n=t.payment_method||t.paymentMethod||`wechat`,r={alipay:{icon:(0,$.jsx)(j0,{style:{fontSize:16}}),label:`支付宝`,color:`#1677ff`},wechat:{icon:(0,$.jsx)(Uie,{style:{fontSize:16}}),label:`微信支付`,color:`#07c160`}},i=r[n]||r.wechat;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:i.color},children:i.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#374151`},children:i.label})]})}},{title:`金额`,key:`amount`,width:100,align:`right`,render:(e,t)=>{let n=t.amount||t.total_amount||0;return(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,fontSize:14,color:`#1e293b`},children:[`¥`,typeof n==`number`?n.toFixed(2):n]})}},{title:`获得积分`,key:`credits`,width:100,align:`center`,render:(e,t)=>{let n=t.credits||t.credit_amount||0;return(0,$.jsx)(Q.Text,{strong:!0,style:{fontWeight:600,fontSize:14,color:`#f59e0b`},children:n})}},{title:`状态`,key:`status`,width:120,render:(e,t)=>{if(t._occupied)return(0,$.jsx)(vQ,{color:`orange`,style:{fontWeight:500,padding:`4px 12px`},title:t._occupiedBy?`发票号:${t._occupiedBy}`:void 0,children:`已申请开票`});let n=t.status||`pending`,r={pending:{color:`#f59e0b`,label:`待支付`,bg:`rgba(245,158,11,0.1)`},paid:{color:`#10b981`,label:`已支付`,bg:`rgba(16,185,129,0.1)`},refunded:{color:`#94a3b8`,label:`已退款`,bg:`rgba(148,163,184,0.1)`},failed:{color:`#ef4444`,label:`支付失败`,bg:`rgba(239,68,68,0.1)`},cancelled:{color:`#64748b`,label:`已取消`,bg:`rgba(100,116,139,0.1)`},processing:{color:`#0ea5e9`,label:`处理中`,bg:`rgba(14,165,233,0.1)`}}[n]||{color:`#64748b`,label:n,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(vQ,{color:r.color,style:{background:r.bg,fontWeight:500,padding:`4px 12px`},children:r.label})}},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}},{title:`支付时间`,key:`paidAt`,width:180,render:(e,t)=>{let n=t.paid_at||t.paidAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],se=[{title:`发票抬头`,dataIndex:`name`,key:`name`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:e})},{title:`发票抬头类型`,dataIndex:`type`,key:`type`,width:140,render:e=>(0,$.jsx)(`span`,{style:{color:`#475569`},children:e===`company`?`企业`:`个人`})},{title:`纳税号`,dataIndex:`taxNo`,key:`taxNo`,width:200,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:e||`-`})},{title:`是否默认`,dataIndex:`isDefault`,key:`isDefault`,width:100,render:e=>e?(0,$.jsx)(vQ,{color:`#f59e0b`,style:{background:`rgba(245,158,11,0.1)`,color:`#d97706`},children:`默认`}):(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`-`})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[!t.isDefault&&(0,$.jsx)(X,{type:`link`,size:`small`,onClick:()=>fe(t.id),children:`设为默认`}),(0,$.jsx)(X,{type:`link`,size:`small`,danger:!0,onClick:()=>de(t.id),children:`删除`})]})}],ce=i,le=async()=>{try{a(((await Oae()).items||[]).map(e=>({id:e.id,name:e.name,type:e.type,taxNo:e.taxNo,registerAddress:e.registerAddress,bankName:e.bankName,registerPhone:e.registerPhone,bankAccount:e.bankAccount,email:e.email,isDefault:e.isDefault})))}catch{}},ue=async()=>{try{let e=await u.validateFields(),t=e.type===`company`,n=e.isDefault===`yes`||i.length===0&&!i.some(e=>e.isDefault);await kae({type:e.type,name:e.name,taxNo:t?e.taxNo:void 0,registerAddress:t?e.registerAddress:void 0,bankName:t?e.bankName:void 0,registerPhone:t?e.registerPhone:void 0,bankAccount:t?e.bankAccount:void 0,email:e.email,isDefault:n}),u.resetFields(),l(!1),Z.success(`发票抬头添加成功`),le()}catch(e){if(e?.errorFields)Z.warning(`请完善表单信息`);else{let t=e?.message||e?.response?.data?.detail||`添加失败`;Z.error(t)}}},de=e=>{DG.confirm({title:`删除发票抬头`,content:`确定要删除该发票抬头吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await Aae(e),Z.success(`删除成功`),le()}catch(e){Z.error(e?.message||`删除失败`)}}})},fe=async e=>{try{await jae(e),Z.success(`已设为默认`),le()}catch(e){Z.error(e?.message||`设置失败`)}},pe=()=>{if(p.size===0){Z.warning(`请至少选择一个订单`);return}f(!1);let e=ce.find(e=>e.isDefault);v(e?.id||ce[0]?.id||null),b(e?.email||ce[0]?.email||``),g(!0)},me=async()=>{if(!_){Z.warning(`请选择一个发票抬头`);return}let e=ce.find(e=>e.id===_),t=(e?.email||``).trim();if(!t){Z.warning(`该发票抬头未填写邮箱,请先在抬头管理中设置邮箱`);return}let n=Array.from(p.values()).map(e=>e.id||e.orderNo||e.order_no).filter(Boolean);if(n.length===0){Z.warning(`请至少选择一个订单`);return}C(!0);try{await Eae({headerType:e?.type,headerName:e?.name||``,headerTaxNo:e?.taxNo,headerRegisterAddress:e?.registerAddress,headerRegisterPhone:e?.registerPhone,headerBankName:e?.bankName,headerBankAccount:e?.bankAccount,email:t,orderIds:n}),Z.success(`开票申请已提交,请等待审核`),g(!1),m(new Map),v(null),b(``),ae()}catch(e){let t=e?.message||e?.response?.data?.detail||`提交失败,请稍后重试`;Z.error(t)}C(!1)},he={selectedRowKeys:Array.from(p.keys()),onChange:(e,t)=>{let n=new Map(p);E.map(e=>e.order_no||e.orderNo||e.id).forEach(e=>n.delete(e)),e.forEach(e=>{let r=t.find(t=>(t.order_no||t.orderNo||t.id)===e);r&&!r._occupied&&n.set(e,r)}),m(n)},preserveSelectedRowKeys:!0,getCheckboxProps:e=>({name:e.order_no||e.orderNo||e.id,disabled:!!e._occupied})},ge=Array.from(p.values()).reduce((e,t)=>e+(t.amount||t.total_amount||0),0),_e=p.size;return(0,$.jsxs)(`div`,{className:`content_box`,style:{backgroundColor:`#fff`,borderRadius:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(TV,{style:{color:`#6366f1`,fontSize:20}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:20,color:`#1e293b`},children:`申请开票`})]}),(0,$.jsxs)(bV,{children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(VI,{}),onClick:()=>f(!0),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,borderRadius:10,fontWeight:500},children:`开票`}),(0,$.jsx)(X,{icon:(0,$.jsx)(VI,{}),onClick:()=>s(!0),style:{borderColor:`#e2e8f0`,borderRadius:10,fontWeight:500},children:`管理发票抬头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#f8fafc`,borderRadius:12,padding:`16px 20px`,marginBottom:24,border:`1px solid #f1f5f9`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#475569`,display:`block`,marginBottom:8},children:`特别说明:`}),(0,$.jsxs)(`div`,{style:{color:`#64748b`,fontSize:13,lineHeight:2},children:[(0,$.jsxs)(`div`,{children:[`◎ 为落实中办、国办印发的《关于进一步深化税收征管改革的意见》要求,继续加大全面数字化的电子发票(以下简称数电发票)推广使用力度,我们将提供数电发票开具。详细情况可阅读`,(0,$.jsx)(`a`,{onClick:e=>{e.preventDefault(),B(!0)},style:{color:`#6366f1`,cursor:`pointer`},children:`《全面数字化电子发票说明》`}),`。`]}),(0,$.jsx)(`div`,{children:`◎ 下单1小时后方可申请开票!`}),(0,$.jsxs)(`div`,{children:[`◎ 为提高开票效率,请仔细阅读`,(0,$.jsx)(`a`,{onClick:e=>{e.preventDefault(),R(!0)},style:{color:`#6366f1`,cursor:`pointer`},children:`《开票须知》`}),`。`]})]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:n?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:60},children:`加载中...`}):e.length===0?(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无申请开票记录`}),style:{padding:`60px 0`}}):(0,$.jsx)(aQ,{dataSource:e,columns:q,rowKey:`id`,pagination:{current:te,pageSize:ne,total:K,onChange:e=>{G(e)}},bordered:!1})}),(0,$.jsx)(DG,{title:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`发票详情`}),open:V,onCancel:()=>{H(!1),ee(null)},width:720,footer:[(0,$.jsx)(X,{type:`primary`,onClick:()=>{H(!1),ee(null)},children:`关闭`},`close`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:U&&(0,$.jsxs)(`div`,{style:{padding:`24px 28px`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,display:`block`,marginBottom:12},children:`发票信息`}),(0,$.jsx)(`div`,{style:{background:`#f8fafc`,borderRadius:10,padding:`16px 20px`},children:(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`100px 1fr 100px 1fr`,gap:`12px 16px`,fontSize:13},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`发票编号:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontFamily:`monospace`},children:U.orderNo}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`开票时间:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:U.createTime}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`发票金额:`}),(0,$.jsxs)(`span`,{style:{color:`#ef4444`,fontWeight:600},children:[`¥`,U.amount.toFixed(2)]}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`发票状态:`}),(0,$.jsx)(`span`,{children:(0,$.jsx)(vQ,{color:U.status===`pending`?`#f59e0b`:U.status===`processing`?`#0ea5e9`:U.status===`issued`?`#10b981`:`#ef4444`,style:{background:U.status===`pending`?`rgba(245,158,11,0.1)`:U.status===`processing`?`rgba(14,165,233,0.1)`:U.status===`issued`?`rgba(16,185,129,0.1)`:`rgba(239,68,68,0.1)`,color:U.status===`pending`?`#d97706`:U.status===`processing`?`#0284c7`:U.status===`issued`?`#059669`:`#dc2626`,fontWeight:500,padding:`4px 12px`},children:U.status===`pending`?`待开具`:U.status===`processing`?`开具中`:U.status===`issued`?`已开具`:`已驳回`})}),U.email&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`接收邮箱:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:U.email})]}),U.failureReason&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`失败原因:`}),(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:U.failureReason})]})]})})]}),U.headerName&&(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,display:`block`,marginBottom:12},children:`发票抬头`}),(0,$.jsx)(`div`,{style:{background:`#f8fafc`,borderRadius:10,padding:`16px 20px`},children:(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`100px 1fr`,gap:`12px 16px`,fontSize:13},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`抬头类型:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:U.headerType===`company`?`企业`:`个人`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`抬头名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:U.headerName}),U.headerTaxNo&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`纳税人识别号:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontFamily:`monospace`},children:U.headerTaxNo})]})]})})]}),U.selectedOrders&&U.selectedOrders.length>0&&(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,display:`block`,marginBottom:12},children:[`订单明细(共 `,U.selectedOrders.length,` 笔)`]}),(0,$.jsx)(aQ,{dataSource:U.selectedOrders,columns:[{title:`订单号`,key:`orderNo`,render:(e,t)=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:12,color:`#64748b`},children:t.order_no||t.orderNo||t.orderNo||t.id})},{title:`金额`,key:`amount`,align:`right`,render:(e,t)=>(0,$.jsxs)(`span`,{style:{fontWeight:600,color:`#1e293b`},children:[`¥`,(t.amount||t.total_amount||0).toFixed(2)]})}],rowKey:e=>e.order_no||e.orderNo||e.id,pagination:!1,bordered:!1,size:`small`})]})]})}),(0,$.jsx)(DG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,paddingRight:30},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`选择订单`}),(0,$.jsxs)(Q.Text,{style:{fontSize:13,color:`#64748b`},children:[`已选 `,_e,` 项,合计 ¥`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontWeight:600},children:ge.toFixed(2)})]})]}),open:d,onCancel:()=>{f(!1),m(new Map)},width:`70%`,footer:[(0,$.jsx)(X,{onClick:()=>{f(!1),m(new Map)},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:pe,children:`确定`},`confirm`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsxs)(`div`,{style:{padding:`0 24px 24px`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 0`,borderBottom:`1px solid #f1f5f9`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`支付时间:`}),(0,$.jsx)(OB.RangePicker,{size:`small`,value:F,onChange:e=>{I(e),e&&e[0]&&e[1]?P([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):P([null,null]),j(1),setTimeout(()=>W(1),0)},allowClear:!0,placeholder:[`开始日期`,`结束日期`],style:{width:280}})]}),(0,$.jsx)(nG,{spinning:w,children:E.length===0?(0,$.jsx)(dC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无符合条件的订单`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(aQ,{dataSource:E,columns:oe,scroll:{y:500},rowKey:e=>e.order_no||e.orderNo||e.id,rowSelection:he,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(FW,{current:A,pageSize:M,total:O,onChange:e=>{j(e),W(e)},size:`small`})})]})})]})}),(0,$.jsx)(DG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,paddingRight:30},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`选择发票抬头`}),(0,$.jsxs)(Q.Text,{style:{fontSize:13,color:`#64748b`},children:[`开票金额:¥`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontWeight:600},children:ge.toFixed(2)})]})]}),open:h,onCancel:()=>{g(!1),v(null),m(new Map),b(``)},width:820,footer:[(0,$.jsx)(X,{onClick:()=>{g(!1),v(null),m(new Map),b(``)},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,loading:x,onClick:me,children:`确定`},`confirm`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsx)(`div`,{style:{padding:`0 24px 24px`},children:(0,$.jsx)(aQ,{dataSource:ce,columns:[{title:`选择`,key:`select`,width:60,render:(e,t)=>(0,$.jsx)(qF,{checked:_===t.id,onChange:()=>{v(t.id),t.email&&!y&&b(t.email)}})},{title:`发票抬头`,dataIndex:`name`,key:`name`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:e})},{title:`抬头类型`,dataIndex:`type`,key:`type`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#475569`},children:e===`company`?`企业`:`个人`})},{title:`纳税人识别号`,dataIndex:`taxNo`,key:`taxNo`,width:200,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:e||`-`})},{title:`是否默认`,dataIndex:`isDefault`,key:`isDefault`,width:100,render:e=>e?(0,$.jsx)(vQ,{color:`#f59e0b`,style:{background:`rgba(245,158,11,0.1)`,color:`#d97706`},children:`默认`}):(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`-`})}],rowKey:`id`,pagination:!1,bordered:!1})})}),(0,$.jsx)(DG,{title:(0,$.jsxs)(`div`,{style:{padding:`16px 20px`,display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`我的发票抬头`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(VI,{}),onClick:()=>l(!0),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,borderRadius:8,fontWeight:500},children:`添加常用发票抬头`})]}),open:o,onCancel:()=>s(!1),width:900,footer:null,centered:!0,styles:{body:{}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsx)(`div`,{style:{padding:`0 24px 24px`,height:`500px`,marginTop:8},children:i.length===0?(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无发票抬头,请点击「添加常用发票抬头」添加`}),style:{padding:`60px 0`}}):(0,$.jsx)(aQ,{dataSource:i,columns:se,rowKey:`id`,pagination:!1,bordered:!1})})}),(0,$.jsx)(DG,{title:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`我的发票抬头`}),open:c,onCancel:()=>{l(!1),u.resetFields()},width:640,footer:null,centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsx)(`div`,{style:{padding:`20px 24px 24px`},children:(0,$.jsxs)(mH,{form:u,layout:`horizontal`,initialValues:{type:`company`,isDefault:`no`},labelCol:{style:{width:90,textAlign:`right`,marginRight:12,whiteSpace:`nowrap`}},wrapperCol:{style:{flex:1}},children:[(0,$.jsx)(mH.Item,{name:`type`,label:`抬头类型:`,rules:[{required:!0,message:`请选择抬头类型`}],children:(0,$.jsxs)(qF.Group,{children:[(0,$.jsx)(qF,{value:`company`,children:`企业`}),(0,$.jsx)(qF,{value:`personal`,children:`个人`})]})}),(0,$.jsx)(mH.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.type!==t.type,children:()=>{let e=u.getFieldValue(`type`)===`company`;return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:`0 16px`},children:[(0,$.jsx)(mH.Item,{name:`name`,label:e?`公司名称:`:`个人姓名:`,rules:[{required:!0,message:e?`请输入公司名称`:`请输入个人姓名`}],children:(0,$.jsx)(YU,{placeholder:e?`请输入公司名称`:`请输入个人姓名`})}),e&&(0,$.jsx)(mH.Item,{name:`taxNo`,label:`公司税号:`,rules:[{required:!0,message:`请输入公司税号`}],children:(0,$.jsx)(YU,{placeholder:`请输入公司税号`})}),e&&(0,$.jsx)(mH.Item,{name:`registerAddress`,label:`注册地址:`,children:(0,$.jsx)(YU,{placeholder:`请输入注册地址`})}),e&&(0,$.jsx)(mH.Item,{name:`bankName`,label:`开户银行:`,children:(0,$.jsx)(YU,{placeholder:`请输入开户银行`})}),e&&(0,$.jsx)(mH.Item,{name:`registerPhone`,label:`注册电话:`,children:(0,$.jsx)(YU,{placeholder:`请输入注册电话`})}),e&&(0,$.jsx)(mH.Item,{name:`bankAccount`,label:`银行账号:`,children:(0,$.jsx)(YU,{placeholder:`请输入银行账号`})}),(0,$.jsx)(mH.Item,{name:`email`,label:`接收邮箱:`,rules:[{required:!0,message:`请输入接收邮箱`},{pattern:/^[\w.\-]+@[\w.\-]+\.\w+$/,message:`请输入正确的邮箱格式`}],children:(0,$.jsx)(YU,{placeholder:`发票将发送至该邮箱`})})]})})}}),(0,$.jsx)(mH.Item,{name:`isDefault`,label:`设为默认:`,rules:[{required:!0,message:`请选择是否设为默认`}],children:(0,$.jsxs)(qF.Group,{children:[(0,$.jsx)(qF,{value:`yes`,children:`是`}),(0,$.jsx)(qF,{value:`no`,children:`否`})]})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:24,marginLeft:102},children:(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:ue,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,borderRadius:10,paddingLeft:40,paddingRight:40,fontWeight:500},children:`提交`})})]})})}),(0,$.jsx)(DG,{title:null,open:L,onCancel:()=>R(!1),width:640,footer:[(0,$.jsx)(X,{type:`primary`,onClick:()=>R(!1),children:`我知道了`},`close`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsxs)(`div`,{style:{padding:`24px 28px`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,display:`block`,marginBottom:20},children:`开票须知`}),(0,$.jsxs)(`div`,{style:{color:`#475569`,fontSize:14,lineHeight:2},children:[(0,$.jsx)(`p`,{style:{margin:0},children:`尊敬的用户您好!`}),(0,$.jsx)(`p`,{style:{margin:`4px 0 16px`},children:`感谢您的支持,请仔细阅读以下内容:`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`1. 平台开具的发票均为增值税发票;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`2. 为落实中办、国办印发的《关于进一步深化税收征管改革的意见》要求,云图网积极推广开具全面数字化电子发票(简称全电发票或数电发票);发票信息填写无误后,会于5个工作日内开具,并发送至您提交的交付邮箱;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`3. 开票金额与您实际支付金额一致;`}),(0,$.jsx)(`p`,{style:{margin:0},children:`4. 发票申请过程中有任何问题,可填写用户反馈沟通。`})]})]})}),(0,$.jsx)(DG,{title:null,open:z,onCancel:()=>B(!1),width:720,footer:[(0,$.jsx)(X,{type:`primary`,onClick:()=>B(!1),children:`我知道了`},`close`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsxs)(`div`,{style:{padding:`24px 28px`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,display:`block`,marginBottom:20},children:`全面数字化电子发票说明`}),(0,$.jsxs)(`div`,{style:{color:`#475569`,fontSize:14,lineHeight:2},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,fontWeight:500,color:`#1e293b`},children:`1. 什么是数电发票?`}),(0,$.jsx)(`p`,{style:{margin:`0 0 16px`},children:`是指全面数字化的电子发票,即发票信息全面数字化(依托可信身份体系和电子发票服务平台,以去介质、去版式、标签化、要素化、授信制、赋码制为基本特征,覆盖全领域、全环节、全要素的全新发票,与纸质发票具有同等法律效力)。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,fontWeight:500,color:`#1e293b`},children:`2. 数电发票可以开什么票种?`}),(0,$.jsx)(`p`,{style:{margin:`0 0 16px`},children:`数电发票可以开增值税普通票及增值税专票(均是电子发票)。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,fontWeight:500,color:`#1e293b`},children:`3. 数电发票与电子发票的不同`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3.1 数电发票无联次;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3.2 数电发票无发票代码,只有发票号码(20位);`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3.3 数电发票仅显示纳税人识别号和纳税人名称;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3.4 数电发票只有开票人,无收款人和复核人,无销售方(章)信息;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 16px`},children:`3.5 新增了动态二维码。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,fontWeight:500,color:`#1e293b`},children:`4. 数电发票怎么开,怎么交付?`}),(0,$.jsx)(`p`,{style:{margin:`0 0 16px`},children:`现有开具方式需要您选择电子发票填写信息申请,默认以PDF文件形式送至您提供的邮箱,如果您有特殊需求,可备注PDF格式及XML格式,如忘记备注可联系在线客服申请另选格式重复交付不受影响。`}),(0,$.jsx)(`p`,{style:{margin:0},children:`5. 请您认真核对信息无误后提交`})]})]})})]})},Hle=[{key:`project`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(mX,{}),` 项目记录`]})},{key:`creation`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(TV,{}),` 创作记录`]})},{key:`hot_opening_replicate`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(y8,{}),` 爆款复刻`]})},{key:`shot_replicate`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(N6,{}),` 拆镜复刻`]})},{key:`upload_resource`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(M8,{}),` 历史素材`]})}],Ule=({open:e,onClose:t,mediaType:n=`video`,onSelect:r})=>{let i=Ye(),[a,o]=(0,S.useState)(`project`),[s,c]=(0,S.useState)(n),[l,u]=(0,S.useState)([]),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(new Set),[h,g]=(0,S.useState)(1),[_]=(0,S.useState)(10),[v,y]=(0,S.useState)(0),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(null),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(new Map),j=(0,S.useCallback)((e,t=!1)=>{let n=`https://ceshi.apiforeign.minzhongzc.com`,r=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${r}${P7(e)}`:`${r}${e}`},[]),M=e=>e.generatedResourceId||e.id,N=e=>{try{let t=new URL(e,window.location.origin).searchParams.get(`exp`);return t?Math.floor(Date.now()/1e3)>parseInt(t):!1}catch{return!1}},P=(0,S.useCallback)(()=>{if(a===`upload_resource`){f(!1),u([]);return}f(!0);let e=``;a===`project`?e=`generation_record`:a===`hot_opening_replicate`?e=`hot_opening_replicate`:a===`shot_replicate`&&(e=`shot_replicate`);let t=`?gen_type=${s}&page=${h}&page_size=${_}`;if(e&&(t=`?gen_type=${s}&history_source=${e}&page=${h}&page_size=${_}`),b.trim()&&(t+=`&keyword=${encodeURIComponent(b.trim())}`),C){let t=`${C}?gen_type=${s}&page=${h}&page_size=${_}`;e&&(t=`${C}?gen_type=${s}&history_source=${e}&page=${h}&page_size=${_}`),b.trim()&&(t+=`&keyword=${encodeURIComponent(b.trim())}`),E5(t).then(e=>{console.log(`[CreationRecordPicker] gethistoryItems response:`,e);let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e?.generated_date||e?.generatedDate||``,items:t,total:e?.total??t.length,page:e?.page??1}];u(n&&n[0].items.length>0?n:[]),y(e?.totalDays||e?.total_days||0)}).catch(e=>{console.error(`[CreationRecordPicker] gethistoryItems error:`,e),u([])}).finally(()=>f(!1))}else T5(t).then(e=>{console.log(`[CreationRecordPicker] gethistory response:`,e);let t=[];Array.isArray(e)?t=e:e?.groups?t=(Array.isArray(e.groups)?e.groups:[e.groups]).map(e=>({generatedDate:e.generated_date||e.generatedDate||``,items:e.items||[],total:e.total??0,page:e.page??1})):e?.items?t=[{generatedDate:e.generated_date||e.generatedDate||``,items:e.items,total:e.total??e.items.length,page:e.page??1}]:e&&typeof e==`object`&&(t=[{generatedDate:e.generated_date||e.generatedDate||``,items:[e],total:e.total??1,page:1}]),t.forEach(e=>{e.page===void 0&&(e.page=1),e.total===void 0&&(e.total=e.items?.length||0)}),u(h===1?t:e=>[...e,...t]),y(e?.totalDays||e?.total_days||0)}).catch(e=>{console.error(`[CreationRecordPicker] gethistory error:`,e),h===1&&u([])}).finally(()=>f(!1))},[a,s,h,_,b,C]);(0,S.useEffect)(()=>{e&&(u([]),A(new Map),P())},[e,a,s,h,C]),(0,S.useEffect)(()=>{e&&(c(n),g(1),x(``),w(``),u([]),A(new Map))},[e,n]);let F=e=>{r?(r(e),t()):(E(e),O(!0))},I=()=>{O(!1),E(null)},L=()=>{if(!T)return;let e=T.videoUrl||T.imageUrl||``;if(!e){Z.warning(`无法获取媒体地址`);return}if(N(e)){Z.warning(`资源已过期,无法编辑`);return}let n=T.videoUrl?`video`:`image`,r=e.startsWith(`http`)?e:`https://ceshi.apiforeign.minzhongzc.com${e}`,a=T.title||T.id||`导入素材`;I(),t(),i(`/videoediting?mediaUrl=${encodeURIComponent(r)}&mediaType=${n}&mediaName=${encodeURIComponent(a)}`)},R=()=>{g(1),P()},z=async(e,t)=>{if(p.has(e))return;m(t=>new Set([...t,e]));let n=t+1,r=``;a===`project`?r=`generation_record`:a===`hot_opening_replicate`?r=`hot_opening_replicate`:a===`shot_replicate`&&(r=`shot_replicate`);let i=`${e}?gen_type=${s}&page=${n}&page_size=${_}`;r&&(i=`${e}?gen_type=${s}&history_source=${r}&page=${n}&page_size=${_}`),b.trim()&&(i+=`&keyword=${encodeURIComponent(b.trim())}`);try{let t=await E5(i),r=t?.items||[];r.length>0&&u(i=>i.map(i=>i.generatedDate===e?{...i,items:[...i.items,...r],page:n,total:t?.total??i.total}:i))}catch(e){console.error(`[CreationRecordPicker] handleGroupLoadMore error:`,e)}finally{m(t=>{let n=new Set(t);return n.delete(e),n})}},B=e=>{let t=s===`video`&&e.videoCoverUrl?j(e.videoCoverUrl,!0):j(s===`video`?e.videoUrl:e.imageUrl,!0),n=s===`video`&&e.videoCoverUrl||s===`image`,r=M(e);return(0,$.jsxs)(`div`,{style:{width:140,height:100,position:`relative`,borderRadius:6,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:()=>F(e),onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`},children:[n?(0,$.jsx)(`img`,{src:t,alt:`预览`,loading:`lazy`,ref:e=>{e&&e.complete&&k.get(r)!==`loaded`&&A(e=>{if(e.get(r)===`loaded`)return e;let t=new Map(e);return t.set(r,`loaded`),t})},style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+(k.get(r)===`loaded`),transition:`opacity 0.3s`},onLoad:()=>{A(e=>{if(e.get(r)===`loaded`)return e;let t=new Map(e);return t.set(r,`loaded`),t})},onError:()=>{A(e=>{if(e.get(r)===`loaded`)return e;let t=new Map(e);return t.set(r,`loaded`),t})}}):(0,$.jsx)(`video`,{src:j(e.videoUrl),style:{width:`100%`,height:`100%`,objectFit:`cover`},preload:`metadata`,muted:!0}),s===`video`&&(0,$.jsxs)(`div`,{style:{position:`absolute`,bottom:4,right:4,background:`rgba(0,0,0,0.6)`,color:`#fff`,borderRadius:4,padding:`1px 6px`,fontSize:10},children:[(0,$.jsx)(R8,{style:{marginRight:2}}),`视频`]})]},r)};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(DG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(TV,{style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontWeight:600},children:`选择创作记录`})]}),open:e,onCancel:t,width:900,footer:null,destroyOnHidden:!0,styles:{body:{maxHeight:`70vh`,overflow:`auto`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12},children:[(0,$.jsx)(X,{type:s===`video`?`primary`:`default`,icon:(0,$.jsx)(R8,{}),onClick:()=>{c(`video`),g(1)},size:`small`,children:`视频`}),(0,$.jsx)(X,{type:s===`image`?`primary`:`default`,icon:(0,$.jsx)(w6,{}),onClick:()=>{c(`image`),g(1)},size:`small`,children:`图片`})]}),(0,$.jsx)(gL,{activeKey:a,onChange:e=>{o(e),g(1),w(``)},items:Hle,size:`small`,style:{marginBottom:12}}),a===`upload_resource`?(0,$.jsx)(D9,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12},children:[(0,$.jsx)(YU,{placeholder:`搜索关键词...`,value:b,onChange:e=>x(e.target.value),onPressEnter:R,prefix:(0,$.jsx)(IC,{style:{color:`#94a3b8`}}),style:{flex:1},size:`small`}),(0,$.jsx)(X,{type:`primary`,size:`small`,onClick:R,children:`搜索`})]}),(0,$.jsx)(nG,{spinning:d,children:l.length===0&&!d?(0,$.jsx)(dC,{description:`暂无记录`,style:{padding:`40px 0`}}):(0,$.jsxs)(`div`,{children:[l.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[e.generatedDate&&(0,$.jsx)(`div`,{style:{fontSize:13,fontWeight:600,color:`#64748b`,marginBottom:8,display:`flex`,alignItems:`center`,gap:4},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items?.map(e=>B(e))}),e.total!=null&&e.total>(e.items?.length||0)&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(X,{onClick:()=>z(e.generatedDate,e.page||1),loading:p.has(e.generatedDate),disabled:p.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:p.has(e.generatedDate)?`加载中...`:`加载更多 (${e.items?.length||0}/${e.total})`})})]},t)),l.length>0&&v>l.length&&(0,$.jsx)(`div`,{style:{padding:`16px 0 8px`,textAlign:`center`},children:(0,$.jsx)(X,{onClick:()=>g(e=>e+1),loading:d,disabled:d,size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:d?`加载中...`:`加载更多 (${l.length}/${v})`})})]})})]})]}),(0,$.jsx)(DG,{title:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:600},children:T?.title||`预览`})}),open:D,onCancel:I,width:800,footer:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12},children:[(0,$.jsx)(X,{onClick:I,children:`关闭`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(I1,{}),onClick:()=>{if(!T)return;let e=`https://ceshi.apiforeign.minzhongzc.com${T.videoUrl||T.imageUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=``,document.body.appendChild(t),t.click(),document.body.removeChild(t)},disabled:N(T?.videoUrl||T?.imageUrl||``),children:N(T?.videoUrl||T?.imageUrl||``)?`资源已过期`:`下载`}),(0,$.jsx)(X,{type:`primary`,onClick:L,disabled:N(T?.videoUrl||T?.imageUrl||``),style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,fontWeight:600},children:`去编辑`})]}),styles:{body:{height:400,display:`flex`,flexDirection:`column`,padding:0}},children:T&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`#000`},children:T.videoUrl?(0,$.jsx)(`video`,{src:j(T.videoUrl),controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`100%`}}):(0,$.jsx)(`img`,{src:j(T.imageUrl,!0),alt:`预览`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`}})})})]})},{TextArea:X9}=YU,Z9={video:{bg:`rgba(99,102,241,0.15)`,bgActive:`rgba(99,102,241,0.45)`,border:`rgba(99,102,241,0.25)`,borderActive:`rgba(99,102,241,0.5)`,icon:(0,$.jsx)(R8,{style:{color:`#6366f1`,fontSize:14}})},audio:{bg:`rgba(16,185,129,0.15)`,bgActive:`rgba(16,185,129,0.45)`,border:`rgba(16,185,129,0.25)`,borderActive:`rgba(16,185,129,0.5)`,icon:(0,$.jsx)(_8,{style:{color:`#10b981`,fontSize:14}})},image:{bg:`rgba(245,158,11,0.15)`,bgActive:`rgba(245,158,11,0.45)`,border:`rgba(245,158,11,0.25)`,borderActive:`rgba(245,158,11,0.5)`,icon:(0,$.jsx)(w6,{style:{color:`#f59e0b`,fontSize:14}})},text:{bg:`rgba(59,130,246,0.15)`,bgActive:`rgba(59,130,246,0.45)`,border:`rgba(59,130,246,0.25)`,borderActive:`rgba(59,130,246,0.5)`,icon:(0,$.jsx)(z4,{style:{color:`#3b82f6`,fontSize:14}})},watermark:{bg:`rgba(100,116,139,0.15)`,bgActive:`rgba(100,116,139,0.45)`,border:`rgba(100,116,139,0.25)`,borderActive:`rgba(100,116,139,0.5)`,icon:(0,$.jsx)(TV,{style:{color:`#64748b`,fontSize:14}})}},Wle=()=>{let e=Ye(),[t]=On(),[n,r]=(0,S.useState)(`video`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(0),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(80),[v,y]=(0,S.useState)(50),[b,x]=(0,S.useState)(null),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(`中文`),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(`text`),[F,I]=(0,S.useState)(!1),L=(0,S.useRef)(null),R=(0,S.useRef)(null),z=(0,S.useRef)(null),B=(0,S.useRef)(null),V=(0,S.useRef)(null),H=(0,S.useRef)(null),U=(0,S.useRef)(null),ee=(0,S.useRef)(null),W=(0,S.useRef)(null),te=(0,S.useRef)(null),G=(0,S.useRef)(0),ne=(0,S.useRef)(!1),K=(0,S.useRef)(null),re=(0,S.useRef)(null),ie=e=>{let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60);return`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`},ae=e=>{switch(e){case`video`:return`video/*`;case`audio`:return`audio/*`;case`image`:return`image/*`;case`watermark`:return`image/*`;default:return``}},q=e=>{let t=e.target.files;if(!t||t.length===0)return;if(n===`text`){P(`text`),M(``),A(!0);return}let r=n===`watermark`?`watermark`:n,i=[];Array.from(t).forEach(e=>{let t=URL.createObjectURL(e);i.push({id:`${Date.now()}-${Math.random()}`,type:r,name:e.name,url:t})}),a(e=>[...e,...i]),Z.success(`已导入 ${i.length} 个${Pe.find(e=>e.key===n)?.label}素材`),V.current&&(V.current.value=``)};(0,S.useEffect)(()=>{let n=t.get(`mediaUrl`),i=t.get(`mediaType`),o=t.get(`mediaName`)||`导入素材`;if(n&&i){let t=i===`image`?`image`:`video`,s={id:`${Date.now()}-${Math.random()}`,type:t,name:o,url:n};a(e=>[...e,s]),r(t),Z.success(`已导入创作记录素材:${o}`),e(`/videoediting`,{replace:!0})}},[t]);let oe=e=>{P(e),M(``),A(!0)},se=()=>{let e=j.trim();if(!e){Z.warning(`请输入内容`);return}let t={id:`${Date.now()}-${Math.random()}`,type:N,name:e.slice(0,20),text:e};a(e=>[...e,t]),A(!1),Z.success(N===`watermark`?`已添加水印`:`已添加文本`)},ce=e=>e.length>0?Math.max(...e.map(e=>e.start+e.duration)):0,le=e=>e.length>0?Math.max(...e.map(e=>e.start+e.duration)):0,ue=(0,S.useCallback)(()=>{if(!b){Z.warning(`请先选择要分割的片段`);return}let e=o.find(e=>e.id===b);if(!e)return;let t=c-e.start;if(t<=0||t>=e.duration){Z.warning(`播放头不在选中片段内`);return}let n={...e,duration:t,originalDuration:e.originalDuration,trimStart:e.trimStart},r={...e,id:`${Date.now()}-${Math.random()}`,start:e.start+t,duration:e.duration-t,trimStart:e.trimStart+t};s(t=>[...t.filter(t=>t.id!==e.id),n,r]),x(r.id),Z.success(`已分割片段`)},[b,o,c]),de=(0,S.useCallback)((e,t)=>{s(n=>n.map(n=>n.id===e?{...n,start:Math.max(0,t)}:n))},[]),fe=(0,S.useCallback)((e,t)=>{s(n=>n.map(n=>{if(n.id!==e)return n;let r=n.type===`video`||n.type===`audio`?n.originalDuration-.1:999,i=Math.max(0,Math.min(t,r)),a=i-n.trimStart;return{...n,trimStart:i,start:n.start+a,duration:Math.max(.1,n.duration-a)}}))},[]),pe=(0,S.useCallback)((e,t)=>{s(n=>n.map(n=>{if(n.id!==e)return n;let r=n.type===`video`||n.type===`audio`?n.originalDuration-n.trimStart:999,i=Math.max(.1,Math.min(t,r));return{...n,duration:i}}))},[]),me=(0,S.useCallback)((e,t,n)=>{s(r=>r.map(r=>r.id===e?{...r,[t]:n}:r))},[]),he=(0,S.useCallback)(e=>{let t=e=>e===`image`?{x:50,y:50,width:25,height:20,opacity:1,zIndex:4}:e===`text`?{x:50,y:85,width:60,height:10,opacity:1,zIndex:5}:e===`watermark`?{x:85,y:85,width:15,height:8,opacity:.4,zIndex:6}:e===`video`?{zIndex:2}:e===`audio`?{zIndex:1}:{zIndex:0},n=n=>({id:`${Date.now()}-${Math.random()}`,mediaId:e.id,type:e.type,start:0,duration:n,originalDuration:n,trimStart:0,url:e.url,name:e.text||e.name,text:e.text,...t(e.type)});if(e.type===`video`){let t=document.createElement(`video`);t.src=e.url,t.onloadedmetadata=()=>{let r=t.duration||5;s(e=>{let t=n(r);t.start=ce(e);let i=[...e,t];return d(le(i)),i}),Z.success(`已添加视频:${e.name}`)}}else if(e.type===`audio`){let t=document.createElement(`audio`);t.src=e.url,t.onloadedmetadata=()=>{let r=t.duration||5;s(e=>{let t=n(r);t.start=ce(e);let i=[...e,t];return d(le(i)),i}),Z.success(`已添加音频:${e.name}`)}}else e.type===`image`?(s(e=>{let t=n(5);t.start=ce(e);let r=[...e,t];return d(le(r)),r}),Z.success(`已添加图片:${e.name}`)):e.type===`text`?(s(e=>{let t=n(3);t.start=ce(e);let r=[...e,t];return d(le(r)),r}),Z.success(`已添加文本:${e.text}`)):e.type===`watermark`&&(s(e=>{let t=n(e.length>0?Math.max(...e.map(e=>e.start+e.duration)):10);t.start=0;let r=[...e,t];return d(le(r)),r}),Z.success(`已添加水印:${e.text||e.name}`))},[]),ge=(0,S.useCallback)(()=>{let e={version:`1.0`,exportedAt:new Date().toISOString(),mediaLibrary:i.map(e=>({id:e.id,type:e.type,name:e.name,url:e.url,duration:e.duration,thumbnail:e.thumbnail,text:e.text})),tracks:o.map(e=>({id:e.id,mediaId:e.mediaId,type:e.type,start:e.start,duration:e.duration,originalDuration:e.originalDuration,trimStart:e.trimStart,url:e.url,name:e.name,text:e.text,x:e.x,y:e.y,width:e.width,height:e.height,opacity:e.opacity,zIndex:e.zIndex})),currentTime:c,duration:u,playbackRate:m,volume:g,zoom:v,activeTab:n};return JSON.stringify(e,null,2)},[i,o,c,u,m,g,v,n]),_e=(0,S.useCallback)(e=>{try{let t=JSON.parse(e);if(!t||!Array.isArray(t.tracks)){Z.error(`无效的编辑器状态文件`);return}a(t.mediaLibrary||[]),s(t.tracks||[]),l(t.currentTime||0),d(t.duration||0),h(t.playbackRate||1),_(t.volume??80),y(t.zoom||50),t.activeTab&&r(t.activeTab),Z.success(`已恢复编辑器状态`)}catch{Z.error(`解析 JSON 失败`)}},[]),ve=(0,S.useCallback)(()=>{let e=ge(),t=new Blob([e],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`video-edit-${new Date().toISOString().slice(0,19).replace(/[:T]/g,`-`)}.json`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),Z.success(`已导出编辑器状态 JSON`)},[ge]),ye=(0,S.useRef)(null),be=(0,S.useCallback)(()=>{ye.current?.click()},[]),xe=(0,S.useCallback)(e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=e=>{let t=e.target?.result;_e(t)},n.readAsText(t),e.target&&(e.target.value=``)},[_e]),Se=e=>u>0?e/u*100:0,Ce=(0,S.useCallback)(e=>{if(!U.current)return;let t=U.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width;if(r<=0)return;let i=Math.max(0,Math.min(1,n/r))*u;l(i),L.current&&(L.current.currentTime=i),R.current&&(R.current.currentTime=i)},[u]),we=(0,S.useCallback)(e=>{if(e.stopPropagation(),e.preventDefault(),!U.current)return;let t=U.current.getBoundingClientRect(),n=e=>{let n=e.clientX-t.left;l(Math.max(0,Math.min(1,n/t.width))*u)},r=()=>{document.removeEventListener(`mousemove`,n),document.removeEventListener(`mouseup`,r);let i=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width))*u;L.current&&(L.current.currentTime=i),R.current&&(R.current.currentTime=i)};document.addEventListener(`mousemove`,n),document.addEventListener(`mouseup`,r)},[u]),Te=(0,S.useCallback)((e,t,n)=>{e.stopPropagation(),e.preventDefault(),x(t.id);let r=U.current?.getBoundingClientRect(),i=(r?r.width:1)/Math.max(u,.01);K.current={segmentId:t.id,mode:n,startX:e.clientX,startTime:c,originalStart:t.start,originalDuration:t.duration,originalTrimStart:t.trimStart};let a=e=>{let t=K.current;if(!t||!U.current)return;let n=(e.clientX-t.startX)/i;t.mode===`move`?de(t.segmentId,Math.max(0,t.originalStart+n)):t.mode===`trimLeft`?fe(t.segmentId,t.originalTrimStart+n):t.mode===`trimRight`&&pe(t.segmentId,Math.max(.1,t.originalDuration+n))},o=()=>{K.current=null,document.removeEventListener(`mousemove`,a),document.removeEventListener(`mouseup`,o)};document.addEventListener(`mousemove`,a),document.addEventListener(`mouseup`,o)},[c,u,de,fe,pe]),Ee=(0,S.useCallback)((e,t,n,r)=>{e.stopPropagation(),e.preventDefault(),x(t.id);let i=t.width??25,a=t.height??20,o=t.x??50,s=t.y??50;re.current={segmentId:t.id,mode:n,startX:e.clientX,startY:e.clientY,origX:o,origY:s,origW:i,origH:a,handle:r};let c=ee.current?.getBoundingClientRect();if(!c)return;let l=c.width,u=c.height,d=e=>{let t=re.current;if(!t)return;let n=(e.clientX-t.startX)/l*100,r=(e.clientY-t.startY)/u*100;if(t.mode===`move`)me(t.segmentId,`x`,Math.max(0,Math.min(100,t.origX+n))),me(t.segmentId,`y`,Math.max(0,Math.min(100,t.origY+r)));else if(t.mode===`resize`){let e=t.origW,i=t.origH,a=t.origX,o=t.origY,s=t.handle||`se`;if(s.includes(`e`)&&(e=Math.max(3,t.origW+n)),s.includes(`s`)&&(i=Math.max(3,t.origH+r)),s.includes(`w`)){let r=t.origX+t.origW-n;e=Math.max(3,r-t.origX),a=t.origX+(t.origW-e)}if(s.includes(`n`)){let e=t.origY+t.origH-r;i=Math.max(3,e-t.origY),o=t.origY+(t.origH-i)}(s===`e`||s===`w`)&&(i=t.origH,o=t.origY),me(t.segmentId,`width`,Math.min(100,e)),me(t.segmentId,`height`,Math.min(100,i)),s.includes(`w`)&&me(t.segmentId,`x`,Math.max(0,a)),s.includes(`n`)&&me(t.segmentId,`y`,Math.max(0,o))}},f=()=>{re.current=null,document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f)};document.addEventListener(`mousemove`,d),document.addEventListener(`mouseup`,f)},[me]),De=(0,S.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e)),x(null)},[]),Oe=(0,S.useCallback)(e=>{s(t=>t.map(t=>t.id===e?{...t,zIndex:(t.zIndex??0)+1}:t))},[]),ke=(0,S.useCallback)(e=>{s(t=>t.map(t=>t.id===e?{...t,zIndex:Math.max(0,(t.zIndex??0)-1)}:t))},[]),Ae=()=>{if(ne.current){if(L.current&&ze){let e=L.current.currentTime;l(ze.start+e-ze.trimStart);return}if(R.current&&Ve){let e=R.current.currentTime;l(Ve.start+e-Ve.trimStart)}}},je=e=>{if(!z.current)return;let t=z.current.getBoundingClientRect(),n=(e.clientX-t.left)/t.width*u;l(n),L.current&&(L.current.currentTime=n),R.current&&(R.current.currentTime=n)},Me=e=>{let t=Math.max(0,Math.min(u,c+e));l(t),L.current&&(L.current.currentTime=t),R.current&&(R.current.currentTime=t)},Ne=()=>{if(o.length===0){Z.warning(`请先添加视频片段`);return}Z.success(`导出任务已提交,请稍候...`)},Pe=[{key:`video`,icon:(0,$.jsx)(R8,{}),label:`视频`},{key:`audio`,icon:(0,$.jsx)(_8,{}),label:`音频`},{key:`image`,icon:(0,$.jsx)(w6,{}),label:`图片`},{key:`text`,icon:(0,$.jsx)(z4,{}),label:`文本`},{key:`watermark`,icon:(0,$.jsx)(TV,{}),label:`水印`}],Fe=e=>Z9[e].icon,Ie=o.find(e=>e.id===b),Le=o.filter(e=>e.type===`video`&&c>=e.start&&c(e.zIndex??0)-(t.zIndex??0)),Re=Le.length>0?Le[Le.length-1]:null,ze=o.find(e=>e.type===`video`&&c>=e.start&&ce.type!==`text`&&e.type!==`watermark`&&e.type!==`image`?!1:c>=e.start&&c(e.zIndex??0)-(t.zIndex??0)),Ve=o.find(e=>e.type===`audio`&&c>=e.start&&c{let e=!f;if(ne.current=e,p(e),te.current!==null&&(cancelAnimationFrame(te.current),te.current=null),e){let e=Le.some(e=>e.type===`video`&&e.url),t=Ve&&R.current,n=e||t;if(e&&L.current&&ze){let e=Math.max(0,c-ze.start+ze.trimStart);L.current.currentTime=e,L.current.play().catch(()=>{})}if(t&&(R.current.currentTime=Math.max(0,c-Ve.start+Ve.trimStart),R.current.play().catch(()=>{})),!n){G.current=performance.now();let e=t=>{if(!ne.current)return;let n=(t-G.current)/1e3;G.current=t,l(e=>{let t=e+n;return t>=u?(ne.current=!1,p(!1),u):t}),ne.current&&(te.current=requestAnimationFrame(e))};te.current=requestAnimationFrame(e)}}else L.current&&L.current.pause(),R.current&&R.current.pause()},[f,Le,ze,Ve,c,u]),Ue=i.filter(e=>n===`watermark`?e.type===`watermark`:e.type===n);(0,S.useEffect)(()=>{L.current&&(L.current.volume=g/100),R.current&&(R.current.volume=g/100)},[g]),(0,S.useEffect)(()=>{L.current&&(L.current.playbackRate=m),R.current&&(R.current.playbackRate=m)},[m]),(0,S.useEffect)(()=>{if(Re?.type===`video`&&L.current){let e=c-Re.start+Re.trimStart;Math.abs(L.current.currentTime-e)>.1&&(L.current.currentTime=Math.max(0,e))}if(Ve&&R.current){let e=c-Ve.start+Ve.trimStart;Math.abs(R.current.currentTime-e)>.1&&(R.current.currentTime=Math.max(0,e))}},[c,Re,Ve]);let We=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(!Re){We.current=null;return}let e=`${Re.id}-${Re.type}`;We.current!==e&&f&&setTimeout(()=>{Re.type===`video`&&L.current&&(L.current.currentTime=Re.trimStart,L.current.play().catch(()=>{}))},30),We.current=e},[Re,f]);let Ge=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(!Ve){Ge.current=null;return}let e=Ve.id;Ge.current!==e&&f&&Ve.url&&setTimeout(()=>{R.current&&(R.current.currentTime=Ve.trimStart,R.current.play().catch(()=>{}))},30),Ge.current=e},[Ve,f]),(0,S.useEffect)(()=>()=>{te.current!==null&&(cancelAnimationFrame(te.current),te.current=null),i.forEach(e=>{e.url&&URL.revokeObjectURL(e.url)})},[]);let Ke=e=>{if(!e)return null;let t=e.start+e.duration;return o.filter(n=>(n.type===`video`||n.type===`image`)&&n.id!==e.id&&n.start>t-.01).sort((e,t)=>e.start-t.start)[0]||null},qe=(0,S.useCallback)(()=>{if(!Re)return;let e=Ke(Re);if(e){if(l(e.start),e.type===`video`&&L.current){let t=()=>{L.current&&ne.current&&(L.current.currentTime=e.trimStart,L.current.play().catch(()=>{}))};L.current.readyState>=1?t():L.current.addEventListener(`loadedmetadata`,t,{once:!0})}}else ne.current=!1,p(!1),l(Re.start+Re.duration),te.current!==null&&(cancelAnimationFrame(te.current),te.current=null)},[Re,o]),Je=(0,S.useCallback)(()=>{ne.current&&L.current&&ze&&(L.current.currentTime=ze.trimStart,L.current.play().catch(()=>{}))},[ze]),Xe=(0,S.useCallback)(()=>{if(Ve&&ne.current){let e=o.filter(e=>e.type===`audio`&&e.id!==Ve.id&&e.start>=Ve.start+Ve.duration-.01).sort((e,t)=>e.start-t.start)[0];if(e)setTimeout(()=>{R.current&&ne.current&&(R.current.currentTime=e.trimStart,R.current.play().catch(()=>{}))},50);else{G.current=performance.now();let e=t=>{if(!ne.current)return;let n=(t-G.current)/1e3;G.current=t,l(e=>{let t=e+n;return t>=u?(ne.current=!1,p(!1),u):t}),ne.current&&(te.current=requestAnimationFrame(e))};te.current=requestAnimationFrame(e)}}},[Ve,o,u]),Ze=[],Qe=Math.ceil(u||10),$e=Math.max(1,Math.floor(Qe/10));for(let e=0;e<=Qe;e+=$e)Ze.push(e);return(0,$.jsxs)(`div`,{className:`content_box`,style:{backgroundColor:`#fff`,width:`100vw`,height:`100vh`,display:`flex`,flexDirection:`column`,overflow:`hidden`,margin:0},children:[(0,$.jsxs)(`div`,{style:{height:56,background:`#ffffff`,borderBottom:`1px solid #e8ecf2`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 20px`,flexShrink:0,boxShadow:`0 1px 2px rgba(15, 23, 42, 0.03)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,minWidth:0},children:[(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(Gw,{}),onClick:()=>e(`/videoprojects`),children:`返回`}),(0,$.jsx)(`div`,{style:{width:1,height:20,background:`#e2e8f0`}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`},children:`视频剪辑工作台`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:[o.length,` 个片段 · 总时长 `,ie(u)]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(nie,{}),onClick:ve,children:`保存草稿`}),(0,$.jsx)(X,{icon:(0,$.jsx)(h3,{}),onClick:be,children:`加载草稿`}),(0,$.jsx)(`input`,{ref:ye,type:`file`,accept:`.json`,style:{display:`none`},onChange:xe}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(w4,{}),onClick:Ne,children:`导出视频`})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,overflow:`hidden`,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{width:220,minWidth:180,maxWidth:220,background:`#ffffff`,borderRight:`1px solid #e8ecf2`,display:`flex`,flexDirection:`column`,flexShrink:0,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,padding:`10px 8px 8px`,gap:4,borderBottom:`1px solid #eef2f7`,flexShrink:0},children:Pe.map(e=>(0,$.jsx)(jw,{title:e.label,placement:`bottom`,children:(0,$.jsx)(`div`,{onClick:()=>r(e.key),style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,background:n===e.key?`rgba(99,102,241,0.1)`:`transparent`,color:n===e.key?`#6366f1`:`#64748b`,transition:`all 0.2s`,fontSize:15},children:e.icon})},e.key))}),(0,$.jsxs)(`div`,{style:{padding:`12px`,flexShrink:0},children:[n===`text`||n===`watermark`?(0,$.jsx)(X,{block:!0,icon:(0,$.jsx)(h3,{}),onClick:()=>{oe(n===`text`?`text`:`watermark`)},children:n===`text`?`添加文本`:`添加水印`}):(0,$.jsx)(SV,{menu:{items:[{key:`local`,icon:(0,$.jsx)(_X,{}),label:`本地上传`,onClick:()=>V.current?.click()},{key:`record`,icon:(0,$.jsx)(TV,{}),label:`创作记录`,onClick:()=>I(!0)}]},placement:`bottom`,trigger:[`click`],children:(0,$.jsxs)(X,{block:!0,icon:(0,$.jsx)(h3,{}),children:[`导入`,Pe.find(e=>e.key===n)?.label,(0,$.jsx)(NC,{style:{fontSize:10,opacity:.7,marginLeft:4}})]})}),(0,$.jsx)(`input`,{ref:V,type:`file`,accept:ae(n),multiple:!0,style:{display:`none`},onChange:q})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`0 12px`,minHeight:0},children:Ue.length===0?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px 12px`,color:`#94a3b8`},children:[(0,$.jsx)(h3,{style:{fontSize:32,marginBottom:12,opacity:.5}}),(0,$.jsx)(`div`,{style:{fontSize:13},children:n===`text`?`点击上方按钮添加文本`:n===`watermark`?`点击上方按钮添加水印`:`点击上方按钮导入素材`})]}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:Ue.map(e=>(0,$.jsxs)(`div`,{onClick:()=>he(e),style:{background:`#f8fafc`,border:`1px solid #e2e8f0`,borderRadius:8,padding:8,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:10},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#c7d2fe`,e.currentTarget.style.background=`#eef2ff`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.background=`#f8fafc`},children:[e.type===`video`&&e.url?(0,$.jsxs)(`div`,{style:{width:72,height:44,borderRadius:6,overflow:`hidden`,background:`#1e293b`,flexShrink:0,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(`video`,{src:e.url,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`rgba(255,255,255,0.9)`,fontSize:18,pointerEvents:`none`},children:(0,$.jsx)(A6,{})})]}):(e.type===`image`||e.type===`watermark`)&&e.url?(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:6,overflow:`hidden`,background:`#e2e8f0`,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`img`,{src:e.url,alt:e.name,draggable:!1,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}})}):(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:6,flexShrink:0,background:`#e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20},children:Fe(e.type)}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:13,fontWeight:500,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},title:e.text||e.name,children:e.text||e.name}),(0,$.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`,marginTop:2},children:e.type===`video`?`视频`:e.type===`image`?`图片`:e.type===`watermark`?`水印`:`文本`})]})]},e.id))})}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,borderTop:`1px solid #eef2f7`,color:`#94a3b8`,fontSize:11,textAlign:`center`,flexShrink:0},children:`选择素材添加到时间线`})]}),(0,$.jsxs)(`div`,{ref:W,style:{flex:1,minWidth:0,background:`#f1f5f9`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,padding:16,minHeight:0,background:`#ffffff`},children:o.length>0?(0,$.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:`100%`,minWidth:400,minHeight:300,borderRadius:12,overflow:`hidden`,boxShadow:`0 8px 32px rgba(15, 23, 42, 0.2)`,background:`#000`},children:[Le.map((e,t)=>{let n={position:`absolute`,inset:0,width:`100%`,height:`100%`,zIndex:e.zIndex??t};if(e.type===`video`&&e.url){let r=t===Le.findIndex(e=>e.type===`video`);return(0,$.jsx)(`video`,{ref:r?L:void 0,src:e.url,onTimeUpdate:r?Ae:void 0,onPlay:r?()=>p(!0):void 0,onPause:r?()=>p(!1):void 0,onEnded:r?qe:void 0,onLoadedMetadata:r?Je:void 0,style:{...n,objectFit:`contain`,background:`#000`}},e.id)}return e.type===`image`&&e.url?(0,$.jsx)(`img`,{src:e.url,alt:e.name,style:{...n,objectFit:`contain`}},e.id):null}),Le.length===0&&(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`#000`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(x6,{style:{fontSize:48,marginBottom:8,opacity:.4}}),(0,$.jsx)(`div`,{style:{fontSize:13}})]})}),(0,$.jsx)(`div`,{ref:ee,style:{position:`absolute`,inset:0,pointerEvents:`none`}}),Be.filter(e=>e.type===`image`&&e.url).map(e=>{let t=b===e.id,n=e.x??50,r=e.y??50,i=e.width??25,a=e.height??20,o=e.opacity??1;return(0,$.jsxs)(`div`,{onMouseDown:t=>Ee(t,e,`move`),onClick:t=>{t.stopPropagation(),x(e.id)},style:{position:`absolute`,left:`${n}%`,top:`${r}%`,width:`${i}%`,height:`${a}%`,transform:`translate(-50%, -50%)`,cursor:`move`,zIndex:e.zIndex??4,pointerEvents:`auto`,opacity:o},children:[(0,$.jsx)(`img`,{src:e.url,alt:e.name,draggable:!1,style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,border:t?`2px solid #6366f1`:`2px solid rgba(255,255,255,0.8)`,boxShadow:t?`0 0 0 2px rgba(99,102,241,0.3), 0 4px 12px rgba(0,0,0,0.3)`:`0 4px 12px rgba(0,0,0,0.3)`,pointerEvents:`none`}}),t&&(0,$.jsx)($.Fragment,{children:[`nw`,`n`,`ne`,`e`,`se`,`s`,`sw`,`w`].map(t=>{let n=t.length===2,r={};return t.includes(`n`)&&(r.top=-6),t.includes(`s`)&&(r.bottom=-6),t.includes(`w`)&&(r.left=-6),t.includes(`e`)&&(r.right=-6),!t.includes(`n`)&&!t.includes(`s`)&&(r.top=`50%`),!t.includes(`w`)&&!t.includes(`e`)&&(r.left=`50%`),!t.includes(`n`)&&!t.includes(`s`)&&(r.transform=`translateY(-50%)`),!t.includes(`w`)&&!t.includes(`e`)&&(r.transform=`translateX(-50%)`),(0,$.jsx)(`div`,{onMouseDown:n=>Ee(n,e,`resize`,t),style:{position:`absolute`,width:n?10:8,height:n?10:8,background:`#fff`,border:`1.5px solid #6366f1`,borderRadius:2,cursor:`${t}-resize`,zIndex:10,...r}},t)})})]},e.id)}),Be.filter(e=>e.type===`text`).map(e=>{let t=b===e.id,n=e.x??50,r=e.y??85,i=e.opacity??1;return(0,$.jsx)(`div`,{onMouseDown:t=>Ee(t,e,`move`),onClick:t=>{t.stopPropagation(),x(e.id)},style:{position:`absolute`,left:`${n}%`,top:`${r}%`,transform:`translate(-50%, -50%)`,fontSize:28,fontWeight:700,color:`#fff`,textShadow:`0 2px 12px rgba(0,0,0,0.8), 0 0 4px rgba(0,0,0,0.5)`,cursor:`move`,zIndex:e.zIndex??5,whiteSpace:`nowrap`,maxWidth:`90%`,overflow:`hidden`,textOverflow:`ellipsis`,opacity:i,padding:`4px 8px`,outline:t?`2px dashed #6366f1`:`none`,outlineOffset:2,pointerEvents:`auto`},children:e.text||e.name},e.id)}),Be.filter(e=>e.type===`watermark`).map(e=>{let t=b===e.id,n=e.x??85,r=e.y??85,i=e.opacity??.4;return(0,$.jsx)(`div`,{onMouseDown:t=>Ee(t,e,`move`),onClick:t=>{t.stopPropagation(),x(e.id)},style:{position:`absolute`,left:`${n}%`,top:`${r}%`,transform:`translate(-50%, -50%)`,fontSize:14,color:`rgba(255,255,255,${i})`,fontWeight:500,cursor:`move`,zIndex:e.zIndex??6,padding:t?`2px 4px`:void 0,outline:t?`2px dashed #6366f1`:`none`,outlineOffset:2,pointerEvents:`auto`},children:e.text||e.name},e.id)}),Ve?.url&&(0,$.jsx)(`audio`,{ref:R,src:Ve.url,onTimeUpdate:Ae,onPlay:()=>p(!0),onPause:()=>p(!1),onEnded:Xe,style:{display:`none`}},Ve.id)]}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsx)(x6,{style:{fontSize:64,marginBottom:16,opacity:.35}}),(0,$.jsx)(`div`,{style:{fontSize:14,color:`#64748b`},children:`选择素材开始创作`}),(0,$.jsx)(`div`,{style:{fontSize:12,marginTop:4},children:`从左侧导入视频、音频或图片`})]})}),(0,$.jsxs)(`div`,{style:{height:48,background:`#ffffff`,borderTop:`1px solid #e8ecf2`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,padding:`0 16px`,flexShrink:0,color:`#1e293b`,flexWrap:`wrap`},children:[(0,$.jsxs)(`span`,{style:{color:`#64748b`,fontSize:13,fontFamily:`monospace`},children:[ie(c),` / `,ie(u)]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(t2,{}),onClick:()=>Me(-5),disabled:o.length===0}),(0,$.jsx)(X,{type:`text`,icon:f?(0,$.jsx)(l6,{}):(0,$.jsx)(N6,{}),onClick:He,disabled:o.length===0,style:{color:`#6366f1`,fontSize:22,width:44,height:44}}),(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(H4,{}),onClick:()=>Me(5),disabled:o.length===0})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(_8,{style:{color:`#64748b`}}),(0,$.jsx)(Qz,{value:g,onChange:_,style:{width:80},tooltip:{formatter:e=>`${e}%`}})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[.5,1,1.5,2].map(e=>(0,$.jsxs)(X,{size:`small`,type:m===e?`primary`:`default`,onClick:()=>h(e),style:{width:40,height:24,fontSize:11},children:[e,`x`]},e))}),(0,$.jsx)(`div`,{style:{width:1,height:20,background:`#e2e8f0`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(jw,{title:`在播放头处分割`,children:(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(i8,{}),onClick:ue,disabled:!b,children:`分割`})}),(0,$.jsx)(aU,{style:{color:`#64748b`,cursor:`pointer`},onClick:()=>y(e=>Math.max(10,e-10))}),(0,$.jsxs)(`span`,{style:{color:`#64748b`,fontSize:12,minWidth:32,textAlign:`center`},children:[v,`%`]}),(0,$.jsx)(nU,{style:{color:`#64748b`,cursor:`pointer`},onClick:()=>y(e=>Math.min(100,e+10))}),(0,$.jsx)(`div`,{style:{width:1,height:20,background:`#e2e8f0`}}),(0,$.jsx)(jw,{title:D?`退出全屏`:`全屏预览`,children:D?(0,$.jsx)(G4,{style:{color:`#6366f1`,cursor:`pointer`,fontSize:18},onClick:()=>O(!1)}):(0,$.jsx)(J4,{style:{color:`#64748b`,cursor:`pointer`,fontSize:18},onClick:()=>O(!0)})})]})]}),(0,$.jsxs)(`div`,{ref:z,onClick:je,style:{height:4,background:`#e2e8f0`,cursor:`pointer`,position:`relative`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,left:0,top:0,height:`100%`,width:`${u>0?c/u*100:0}%`,background:`#6366f1`,borderRadius:`0 2px 2px 0`,transition:`width 0.1s linear`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,left:`${u>0?c/u*100:0}%`,top:-4,width:8,height:12,background:`#6366f1`,borderRadius:2,transform:`translateX(-50%)`,boxShadow:`0 0 8px rgba(99,102,241,0.3)`}})]})]}),(0,$.jsxs)(`div`,{style:{width:200,minWidth:160,maxWidth:200,background:`#ffffff`,borderLeft:`1px solid #e8ecf2`,display:`flex`,flexDirection:`column`,flexShrink:0,overflow:`hidden`,color:`#1e293b`},children:[(0,$.jsxs)(`div`,{style:{padding:`10px 12px`,borderBottom:`1px solid #eef2f7`,display:`flex`,alignItems:`center`,gap:4,flexShrink:0,flexWrap:`wrap`},children:[(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(Oie,{}),children:`翻译`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(i8,{}),children:`剪辑`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(e3,{}),children:`语言`})]}),(0,$.jsxs)(`div`,{style:{padding:`12px`,borderBottom:`1px solid #eef2f7`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,marginBottom:8},children:`目标语言`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[`中文`,`英文`,`日文`,`韩文`].map(e=>(0,$.jsx)(`div`,{onClick:()=>E(e),style:{padding:`6px 12px`,borderRadius:6,cursor:`pointer`,background:T===e?`rgba(99,102,241,0.1)`:`transparent`,color:T===e?`#6366f1`:`#64748b`,fontSize:13,transition:`all 0.2s`,border:T===e?`1px solid rgba(99,102,241,0.3)`:`1px solid transparent`},children:e},e))})]}),(0,$.jsxs)(`div`,{style:{padding:`12px`,flex:1,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,marginBottom:8},children:`剪辑描述`}),(0,$.jsx)(X9,{value:C,onChange:e=>w(e.target.value),placeholder:`选择一个视频片段,开始你的创作...`,style:{flex:1,minHeight:100,borderRadius:8,resize:`none`}})]}),Ie&&(0,$.jsxs)(`div`,{style:{padding:`10px 12px`,borderTop:`1px solid #eef2f7`,background:`#f8fafc`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:6},children:`当前选中`}),(0,$.jsx)(`div`,{style:{fontSize:13,color:`#6366f1`,marginBottom:6,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:Ie.name}),(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2},children:[`时长 `,Ie.duration.toFixed(1),`s / 原始 `,Ie.originalDuration.toFixed(1),`s`]}),(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:8},children:[`起始 `,Ie.start.toFixed(1),`s · 裁剪 `,Ie.trimStart.toFixed(1),`s`]}),(Ie.type===`image`||Ie.type===`text`||Ie.type===`watermark`)&&(0,$.jsxs)(`div`,{style:{borderTop:`1px solid #e2e8f0`,paddingTop:8,marginBottom:8},children:[(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`透明度`}),(0,$.jsxs)(`span`,{children:[Math.round((Ie.opacity??1)*100),`%`]})]}),(0,$.jsx)(Qz,{min:0,max:1,step:.05,value:Ie.opacity??1,onChange:e=>me(Ie.id,`opacity`,e)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:8},children:[(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`X位置`}),(0,$.jsxs)(`span`,{children:[Math.round(Ie.x??50),`%`]})]}),(0,$.jsx)(Qz,{min:0,max:100,value:Ie.x??50,onChange:e=>me(Ie.id,`x`,e)})]}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`Y位置`}),(0,$.jsxs)(`span`,{children:[Math.round(Ie.y??50),`%`]})]}),(0,$.jsx)(Qz,{min:0,max:100,value:Ie.y??50,onChange:e=>me(Ie.id,`y`,e)})]})]}),Ie.type===`image`&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:8},children:[(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`宽度`}),(0,$.jsxs)(`span`,{children:[Math.round(Ie.width??25),`%`]})]}),(0,$.jsx)(Qz,{min:3,max:100,value:Ie.width??25,onChange:e=>me(Ie.id,`width`,e)})]}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`高度`}),(0,$.jsxs)(`span`,{children:[Math.round(Ie.height??20),`%`]})]}),(0,$.jsx)(Qz,{min:3,max:100,value:Ie.height??20,onChange:e=>me(Ie.id,`height`,e)})]})]}),(0,$.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:`在预览区拖拽移动,拖拽边缘缩放`})]}),(0,$.jsxs)(`div`,{style:{marginTop:12,padding:10,background:`#f8fafc`,borderRadius:8,border:`1px solid #e8ecf2`},children:[(0,$.jsxs)(`div`,{style:{fontSize:12,fontWeight:500,color:`#334155`,marginBottom:8,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`图层顺序`}),(0,$.jsxs)(vQ,{color:`blue`,style:{margin:0},children:[`层级 `,Ie.zIndex??0]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(Y0,{}),onClick:()=>Oe(Ie.id),disabled:(Ie.zIndex??0)>=10,style:{flex:1},children:`上移`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(B0,{}),onClick:()=>ke(Ie.id),disabled:(Ie.zIndex??0)<=0,style:{flex:1},children:`下移`})]}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:6},children:`数值越大越靠上`})]}),(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(MQ,{}),onClick:()=>De(Ie.id),style:{width:`100%`,marginTop:12},children:`删除片段`})]})]})]}),(0,$.jsxs)(`div`,{style:{height:180,background:`#ffffff`,borderTop:`1px solid #e8ecf2`,flexShrink:0},children:[(0,$.jsxs)(`div`,{style:{height:36,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 16px`,background:`#f8fafc`,borderBottom:`1px solid #e8ecf2`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(e$,{}),children:`轨道`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`},children:[o.length,` 个片段 · `,ie(u)]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:(0,$.jsx)(Qz,{value:v,onChange:y,style:{width:100},tooltip:{formatter:e=>`缩放 ${e}%`}})})]}),(0,$.jsx)(`div`,{style:{position:`relative`,height:20,padding:`0 16px 0 72px`,overflow:`hidden`,background:`#f8fafc`},children:(0,$.jsx)(`div`,{style:{position:`absolute`,left:0,right:0,top:0,bottom:0},children:Ze.map(e=>(0,$.jsx)(`div`,{style:{position:`absolute`,left:`${Se(e)}%`,top:0,width:1,height:e%($e*5)==0?20:10,background:e%($e*5)==0?`#94a3b8`:`#cbd5e1`},children:e%($e*5)==0&&(0,$.jsx)(`span`,{style:{position:`absolute`,top:2,left:-16,fontSize:10,color:`#64748b`},children:ie(e).slice(3)})},e))})}),(0,$.jsxs)(`div`,{ref:H,style:{position:`relative`,height:120,padding:`0 16px 0 72px`,display:`flex`,flexDirection:`column`},children:[o.length===0&&(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`从左侧选择素材,添加到时间线开始创作。`}),(0,$.jsxs)(`div`,{ref:U,onClick:Ce,style:{position:`relative`,flex:1,cursor:`crosshair`},children:[[`video`,`audio`,`image`,`text`,`watermark`].map(e=>{let t=o.filter(t=>t.type===e);if(t.length===0)return null;let n=Z9[e];return(0,$.jsxs)(`div`,{style:{display:`flex`,height:28,marginBottom:2,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{position:`absolute`,left:-64,top:2,width:60,height:24,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,fontSize:10,color:`#475569`,background:n.bg,border:`1px solid ${n.border}`,borderRadius:6,padding:`0 6px`},children:[n.icon,(0,$.jsx)(`span`,{style:{fontWeight:500},children:Pe.find(t=>t.key===e)?.label})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:28},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,left:0,right:0,bottom:0,height:1,background:`#f1f5f9`}}),t.map(e=>{let t=b===e.id,r=Se(e.start),i=Se(e.duration);return(0,$.jsxs)(`div`,{onClick:t=>{t.stopPropagation(),x(e.id)},onMouseDown:t=>Te(t,e,`move`),style:{position:`absolute`,left:`${r}%`,width:`${i}%`,height:22,top:2,background:t?n.bgActive:n.bg,border:`1px solid ${t?n.borderActive:n.border}`,borderRadius:6,cursor:`grab`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`0 10px`,overflow:`hidden`,transition:`background 0.15s, border-color 0.15s`,userSelect:`none`,boxShadow:t?`0 2px 8px rgba(99,102,241,0.25)`:`0 1px 2px rgba(0,0,0,0.04)`},title:`${e.name} · ${e.duration.toFixed(1)}s`,children:[(0,$.jsx)(`span`,{style:{fontSize:11,color:`#334155`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontWeight:500},children:e.name}),(0,$.jsx)(`div`,{onMouseDown:t=>Te(t,e,`trimLeft`),style:{position:`absolute`,left:-3,top:`50%`,transform:`translateY(-50%)`,width:6,height:16,background:t?`#6366f1`:`#94a3b8`,borderRadius:2,cursor:`ew-resize`,zIndex:2,flexShrink:0}}),(0,$.jsx)(`div`,{onMouseDown:t=>Te(t,e,`trimRight`),style:{position:`absolute`,right:-3,top:`50%`,transform:`translateY(-50%)`,width:6,height:16,background:t?`#6366f1`:`#94a3b8`,borderRadius:2,cursor:`ew-resize`,zIndex:2,flexShrink:0}})]},e.id)})]})]},e)}),o.length>0&&(0,$.jsx)(`div`,{ref:B,onMouseDown:we,style:{position:`absolute`,left:`${Se(c)}%`,top:0,bottom:0,width:2,marginLeft:-1,background:`#ef4444`,cursor:`ew-resize`,zIndex:10,transition:`left 0.05s linear`},children:(0,$.jsx)(`div`,{style:{position:`absolute`,top:-2,left:-4,width:10,height:10,background:`#ef4444`,borderRadius:`50%`,boxShadow:`0 0 8px rgba(239,68,68,0.5)`,cursor:`grab`}})})]})]})]}),D&&(0,$.jsxs)(`div`,{style:{position:`fixed`,inset:0,background:`#000`,zIndex:9999,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},onClick:()=>O(!1),children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:16,right:16,zIndex:10},children:(0,$.jsx)(X,{icon:(0,$.jsx)(G4,{}),onClick:()=>O(!1),style:{background:`rgba(255,255,255,0.1)`,color:`#fff`,border:`none`},children:`退出全屏`})}),o.length>0&&(0,$.jsxs)(`div`,{style:{position:`relative`,maxWidth:`90vw`,maxHeight:`85vh`,borderRadius:12,overflow:`hidden`},onClick:e=>e.stopPropagation(),children:[Re?.type===`video`&&Re.url&&(0,$.jsx)(`video`,{src:Re.url,autoPlay:!0,onTimeUpdate:Ae,onLoadedMetadata:e=>d(e.target.duration),style:{maxWidth:`90vw`,maxHeight:`85vh`,objectFit:`contain`}}),Re?.type===`image`&&Re.url&&(0,$.jsx)(`img`,{src:Re.url,alt:Re.name,style:{maxWidth:`90vw`,maxHeight:`85vh`,objectFit:`contain`}}),Be.filter(e=>e.type===`text`).map(e=>(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:48,left:`50%`,transform:`translateX(-50%)`,fontSize:36,fontWeight:700,color:`#fff`,textShadow:`0 2px 12px rgba(0,0,0,0.8)`},children:e.text||e.name},e.id)),Be.filter(e=>e.type===`watermark`).map(e=>(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:20,right:20,fontSize:18,color:`rgba(255,255,255,${e.opacity??.4})`,fontWeight:500},children:e.text||e.name},e.id))]}),(0,$.jsxs)(`div`,{style:{position:`absolute`,bottom:24,display:`flex`,alignItems:`center`,gap:16,color:`#fff`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`span`,{style:{fontFamily:`monospace`},children:[ie(c),` / `,ie(u)]}),(0,$.jsx)(X,{type:`text`,icon:f?(0,$.jsx)(l6,{style:{color:`#fff`,fontSize:32}}):(0,$.jsx)(N6,{style:{color:`#fff`,fontSize:32}}),onClick:He})]})]}),(0,$.jsxs)(DG,{title:N===`watermark`?`添加水印`:`添加文本`,open:k,onOk:se,onCancel:()=>A(!1),okText:`确定`,cancelText:`取消`,width:440,children:[(0,$.jsx)(`div`,{style:{marginBottom:8,fontSize:13,color:`#64748b`},children:N===`watermark`?`输入水印文字,将作为半透明叠加层显示在视频右下角`:`输入文本内容,将作为字幕或标题叠加在视频上`}),(0,$.jsx)(X9,{value:j,onChange:e=>M(e.target.value),placeholder:N===`watermark`?`请输入水印文字...`:`请输入文本内容...`,autoSize:{minRows:2,maxRows:5},autoFocus:!0,onPressEnter:se})]}),(0,$.jsx)(Ule,{open:F,onClose:()=>I(!1),mediaType:n===`image`?`image`:`video`,onSelect:e=>{let t=e.videoUrl||e.imageUrl||``;if(!t){Z.warning(`无法获取媒体地址`);return}let n=e.videoUrl?`video`:`image`,i=t.startsWith(`http`)?t:`https://ceshi.apiforeign.minzhongzc.com${t}`,o=e.title||e.id||`导入素材`,s={id:`${Date.now()}-${Math.random()}`,type:n,name:o,url:i};a(e=>[...e,s]),r(n),he(s),Z.success(`已从资产导入:${o}`)}})]})},{TextArea:Q9}=YU,Gle=()=>{let e=Ye(),[t,n]=(0,S.useState)([{id:`demo-1`,name:`示例项目`,description:`这是一个视频剪辑示例项目`,createdAt:(0,JE.default)().subtract(2,`day`).format(`YYYY-MM-DD HH:mm`),updatedAt:(0,JE.default)().subtract(1,`day`).format(`YYYY-MM-DD HH:mm`)}]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(null),[l,u]=(0,S.useState)({name:``,description:``}),d=()=>{if(!l.name.trim()){Z.warning(`请输入项目名称`);return}let t={id:`proj-${Date.now()}`,name:l.name.trim(),description:l.description.trim(),createdAt:(0,JE.default)().format(`YYYY-MM-DD HH:mm`),updatedAt:(0,JE.default)().format(`YYYY-MM-DD HH:mm`)};n(e=>[t,...e]),i(!1),u({name:``,description:``}),Z.success(`项目创建成功`),e(`/videoediting?id=${t.id}`)},f=e=>{c(e),u({name:e.name,description:e.description}),o(!0)},p=()=>{if(s){if(!l.name.trim()){Z.warning(`请输入项目名称`);return}n(e=>e.map(e=>e.id===s.id?{...e,name:l.name.trim(),description:l.description.trim(),updatedAt:(0,JE.default)().format(`YYYY-MM-DD HH:mm`)}:e)),o(!1),c(null),u({name:``,description:``}),Z.success(`项目已更新`)}},m=e=>{n(t=>t.filter(t=>t.id!==e)),Z.success(`项目已删除`)},h=t=>{e(`/videoediting?id=${t.id}`)},g=e=>({items:[{key:`rename`,icon:(0,$.jsx)(e$,{}),label:`重命名`,onClick:()=>f(e)},{key:`delete`,icon:(0,$.jsx)(MQ,{}),label:`删除`,danger:!0,onClick:()=>{DG.confirm({title:`确认删除`,content:`确定要删除项目「${e.name}」吗?`,okText:`删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:()=>m(e.id)})}}]});return(0,$.jsxs)(`div`,{className:`content_box`,style:{background:`#fff`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:22,fontWeight:600,color:`#1e293b`},children:`视频剪辑项目`}),(0,$.jsx)(`p`,{style:{margin:`4px 0 0`,fontSize:13,color:`#64748b`},children:`创建和管理你的视频剪辑项目`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(VI,{}),size:`large`,onClick:()=>{u({name:``,description:``}),i(!0)},children:`创建项目`})]}),t.length===0?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:400},children:(0,$.jsx)(dC,{image:dC.PRESENTED_IMAGE_SIMPLE,description:(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`暂无项目,点击「创建项目」开始剪辑`}),children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(VI,{}),onClick:()=>{u({name:``,description:``}),i(!0)},children:`创建项目`})})}):(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(280px, 1fr))`,gap:16},children:t.map(e=>(0,$.jsxs)(vL,{hoverable:!0,style:{borderRadius:12,overflow:`hidden`,transition:`all 0.2s ease`,border:`1px solid #e8ecf2`},bodyStyle:{padding:0},children:[(0,$.jsxs)(`div`,{onClick:()=>h(e),style:{height:160,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,position:`relative`},children:[(0,$.jsx)(R8,{style:{fontSize:48,color:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8},children:(0,$.jsx)(SV,{menu:g(e),trigger:[`click`],placement:`bottomRight`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(ME,{style:{color:`#fff`,fontSize:18}}),style:{background:`rgba(0,0,0,0.3)`,borderRadius:6},onClick:e=>e.stopPropagation()})})})]}),(0,$.jsxs)(`div`,{onClick:()=>h(e),style:{padding:`14px 16px`,cursor:`pointer`},children:[(0,$.jsx)(`div`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,marginBottom:4},children:e.name}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,marginBottom:8},children:e.description||`暂无描述`}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,fontSize:12,color:`#94a3b8`},children:(0,$.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(xB,{}),e.updatedAt]})})]})]},e.id))}),(0,$.jsx)(DG,{title:`创建视频剪辑项目`,open:r,onOk:d,onCancel:()=>i(!1),okText:`创建并开始剪辑`,cancelText:`取消`,width:480,children:(0,$.jsxs)(`div`,{style:{paddingTop:8},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`label`,{style:{display:`block`,marginBottom:6,fontSize:13,fontWeight:500,color:`#475569`},children:`项目名称`}),(0,$.jsx)(YU,{placeholder:`请输入项目名称`,value:l.name,onChange:e=>u(t=>({...t,name:e.target.value})),maxLength:30})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{style:{display:`block`,marginBottom:6,fontSize:13,fontWeight:500,color:`#475569`},children:`项目描述(可选)`}),(0,$.jsx)(Q9,{placeholder:`请输入项目描述`,value:l.description,onChange:e=>u(t=>({...t,description:e.target.value})),rows:3,maxLength:100})]})]})}),(0,$.jsx)(DG,{title:`编辑项目`,open:a,onOk:p,onCancel:()=>{o(!1),c(null)},okText:`保存`,cancelText:`取消`,width:480,children:(0,$.jsxs)(`div`,{style:{paddingTop:8},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`label`,{style:{display:`block`,marginBottom:6,fontSize:13,fontWeight:500,color:`#475569`},children:`项目名称`}),(0,$.jsx)(YU,{placeholder:`请输入项目名称`,value:l.name,onChange:e=>u(t=>({...t,name:e.target.value})),maxLength:30})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{style:{display:`block`,marginBottom:6,fontSize:13,fontWeight:500,color:`#475569`},children:`项目描述(可选)`}),(0,$.jsx)(Q9,{placeholder:`请输入项目描述`,value:l.description,onChange:e=>u(t=>({...t,description:e.target.value})),rows:3,maxLength:100})]})]})})]})};JE.default.locale(`zh-cn`);var $9=({children:e})=>{let{user:t,loading:n,checkAuth:r}=e7();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,$.jsx)(nG,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=e7();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(Mm,{locale:t0.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8,fontFamily:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif`},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,$.jsx)(nx,{children:(0,$.jsx)(_n,{children:(0,$.jsxs)(Dt,{children:[(0,$.jsx)(Tt,{path:`/login`,element:(0,$.jsx)(pse,{})}),(0,$.jsx)(Tt,{path:`/join-team`,element:(0,$.jsx)(Rle,{})}),(0,$.jsx)(Tt,{path:`/private-portrait-authorized`,element:(0,$.jsx)(Ble,{})}),(0,$.jsxs)(Tt,{path:`/`,element:(0,$.jsx)($9,{children:(0,$.jsx)(dse,{})}),children:[(0,$.jsx)(Tt,{index:!0,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})}),(0,$.jsx)(Tt,{path:`projects`,element:(0,$.jsx)(_se,{})}),(0,$.jsx)(Tt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(Fse,{})}),(0,$.jsx)(Tt,{path:`records`,element:(0,$.jsx)(Ise,{})}),(0,$.jsx)(Tt,{path:`credits`,element:(0,$.jsx)(Lse,{})}),(0,$.jsx)(Tt,{path:`credit-records`,element:(0,$.jsx)(N7,{})}),(0,$.jsx)(Tt,{path:`order-records`,element:(0,$.jsx)(N7,{})}),(0,$.jsx)(Tt,{path:`user-center`,element:(0,$.jsx)(N7,{})}),(0,$.jsx)(Tt,{path:`messages`,element:(0,$.jsx)(Hse,{})}),(0,$.jsx)(Tt,{path:`home`,element:(0,$.jsx)(Ale,{})}),(0,$.jsx)(Tt,{path:`conversation`,element:(0,$.jsx)(wce,{})}),(0,$.jsx)(Tt,{path:`initial`,element:(0,$.jsx)(Ace,{})}),(0,$.jsx)(Tt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(Ice,{})}),(0,$.jsx)(Tt,{path:`removelens`,element:(0,$.jsx)(Uce,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(Cle,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(Dle,{})}),(0,$.jsx)(Tt,{path:`generated`,element:(0,$.jsx)(Zce,{})}),(0,$.jsx)(Tt,{path:`pretest`,element:(0,$.jsx)($ce,{})}),(0,$.jsx)(Tt,{path:`authorization`,element:(0,$.jsx)(tle,{})}),(0,$.jsx)(Tt,{path:`authoriza-waiting`,element:(0,$.jsx)(Nle,{})}),(0,$.jsx)(Tt,{path:`materials`,element:(0,$.jsx)(lle,{})}),(0,$.jsx)(Tt,{path:`materials/private-portrait-virtual`,element:(0,$.jsx)(Ct,{to:`/generated?filterType=private_portrait&portraitTab=aigc_virtual`,replace:!0})}),(0,$.jsx)(Tt,{path:`consume`,element:(0,$.jsx)(Mle,{})}),(0,$.jsx)(Tt,{path:`popular`,element:(0,$.jsx)(Ple,{})}),(0,$.jsx)(Tt,{path:`authacc`,element:(0,$.jsx)(rle,{})}),(0,$.jsx)(Tt,{path:`creativeplaza`,element:(0,$.jsx)(Fle,{})}),(0,$.jsx)(Tt,{path:`team-management`,element:(0,$.jsx)(Lle,{})}),(0,$.jsx)(Tt,{path:`invoice`,element:(0,$.jsx)(Vle,{})}),(0,$.jsx)(Tt,{path:`videoprojects`,element:(0,$.jsx)(Gle,{})})]}),(0,$.jsx)(Tt,{path:`/videoediting`,element:(0,$.jsx)($9,{children:(0,$.jsx)(Wle,{})})}),(0,$.jsx)(Tt,{path:`*`,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})})]})})})})},{})); \ No newline at end of file + `}),(0,$.jsx)(`div`,{style:{margin:`auto`,display:`flex`,flexDirection:`column`,width:y.length>0?`${y.length*80+Math.max(0,y.length-1)*1}px`:`100%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,height:86,borderRadius:12,background:`#fff`,gap:1,position:`relative`},children:[x&&y.length===0?(0,$.jsxs)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(tG,{size:`small`}),(0,$.jsx)(dle,{style:{marginLeft:8,color:`#64748b`},children:`正在抽取每秒帧...`})]}):y.length>0?y.map(e=>{let t=e.second>=_[0]&&e.second<_[1];return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>I(e.second),title:`${e.second}s${e.fallback?`,实际取帧 ${e.captureSecond?.toFixed(1)}s`:``}`,style:{minWidth:80,flex:`0 0 80px`,height:86,borderTop:t?`5px solid #6366f1`:`none`,borderBottom:t?`5px solid #6366f1`:`none`,padding:0,background:`transparent`,overflow:`hidden`,cursor:A?`not-allowed`:`pointer`,position:`relative`},children:[e.status===`success`&&e.image?(0,$.jsx)(`img`,{src:e.image,alt:`${e.second}s`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):e.status===`loading`?(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(tG,{size:`small`})}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:12,background:`#fff`},children:[(0,$.jsxs)(`span`,{children:[e.second,`s`]}),(0,$.jsx)(`span`,{style:{fontSize:11},children:`无有效帧`})]}),(0,$.jsxs)(`span`,{style:{position:`absolute`,left:0,bottom:3,color:`#ffffffff`,fontSize:16,textShadow:`0 1px 3px rgba(0,0,0,.7)`},children:[e.second,`s`]})]},e.second)}):(0,$.jsx)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:`暂无帧预览,请确认视频是否加载完成`}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:-10,left:0,right:0,bottom:0},children:(0,$.jsx)(Zz,{range:!0,min:0,max:O||a,step:1,value:_,onChange:P,onChangeComplete:F,tooltip:{formatter:e=>`${I9(Number(e||0))}s`},disabled:!O||A,styles:{track:{background:`#6969dd63`,height:86,borderRadius:12,margin:`0 `},rail:{height:86,borderRadius:12},handle:{width:20,height:86,marginTop:0,borderRadius:`50%`}}})})]})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`,color:`#64748b`,fontSize:14},children:[`已选取 `,k,`s`]}),E&&(0,$.jsx)(`div`,{style:{marginTop:12,padding:`10px 14px`,borderRadius:8,background:`rgba(239, 68, 68, 0.08)`,border:`1px solid rgba(239, 68, 68, 0.15)`,color:`#ef4444`,fontSize:13,textAlign:`center`},children:E})]})]})})},{TextArea:ble}=JU,xle=`https://ceshi.apiforeign.minzhongzc.com`,V9=2,H9=15,Sle=e=>{if(!e)return!1;let t=e.supportsUniversalReference??e.supports_universal_reference,n=e.maxImageCount??e.max_image_count;return t!==!1&&(n==null||Number(n)>=1)};function U9(e){return e?/^https?:\/\//i.test(e)?e:`${xle}${e}`:``}var Cle=S.memo(({record:e,onPreview:t})=>{let n=e.segmentVideoUrl;if(n)return(0,$.jsxs)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},onClick:()=>t(U9(n)),children:[(0,$.jsx)(`video`,{src:U9(n),style:{width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:0,height:0,borderTop:`8px solid transparent`,borderBottom:`8px solid transparent`,borderLeft:`14px solid #6366f1`,marginLeft:2}})})})]});let r=S9(e.splitStatus||e.split_status);return(0,$.jsx)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6,fontSize:12},children:[r.active?(0,$.jsx)(tG,{size:`small`,style:{color:`#f59e0b`}}):null,(0,$.jsx)(`span`,{style:{color:r.failure?`#ef4444`:r.active?`#f59e0b`:`#94a3b8`},children:r.label})]})})});function wle(){let{creatID:e}=$e(),t=Ye(),{user:n}=$5(),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(null),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!1),h=(0,S.useRef)(null),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)([]),[D,O]=(0,S.useState)(``),[k,A]=(0,S.useState)(5),[j,M]=(0,S.useState)(`9:16`),[N,P]=(0,S.useState)(`480p`),[F,I]=(0,S.useState)(!1),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[V,H]=(0,S.useState)([]),[U,ee]=(0,S.useState)(null),[W,te]=(0,S.useState)([]),[G,ne]=(0,S.useState)(1),[K,re]=(0,S.useState)(20),[ie,ae]=(0,S.useState)(0),[q,oe]=(0,S.useState)(!1),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(!1),de=(0,S.useRef)(null),fe=(0,S.useRef)(null),pe=(0,S.useRef)(null),me=(0,S.useMemo)(()=>U9(U?.videoUrl),[U?.videoUrl]);(0,S.useEffect)(()=>{S5().then(e=>{let t=e?.engine?.video||[];if(E(t),t.length>0){let e=t[0],n=(()=>{let t=e.maxDuration??e.max_duration;if(t!=null)return Number(t);let n=e.supportedDurations;return Array.isArray(n)&&n.length>0?Math.max(...n):15})(),r=e.supportedDurations,i=Array.from({length:Math.max(n-4,1)},(e,t)=>t+5),a=Array.from(new Set([...r||[],...i].sort((e,t)=>e-t)));O(e.id),M(e.supportedRatios?.includes(`9:16`)?`9:16`:e.supportedRatios?.[0]||`9:16`),P(e.supportedResolutions?.[0]||`480p`),A((r||[]).find(e=>e<=n)??i[0]??5),B({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:a.length>0?a:i})}}).catch(()=>Z.error(`视频引擎加载失败`)),E5().then(e=>H(Array.isArray(e)?e:[])).catch(()=>H([]))},[]),(0,S.useEffect)(()=>{if(!ge)return;let e=(()=>{let e=ge.maxDuration??ge.max_duration;if(e!=null)return Number(e);let t=ge.supportedDurations;return Array.isArray(t)&&t.length>0?Math.max(...t):15})(),t=ge.supportedDurations,n=Array.from({length:Math.max(e-4,1)},(e,t)=>t+5),r=Array.from(new Set([...t||[],...n].sort((e,t)=>e-t)));B(t=>{let i=t.durations;return(i.length>0?Math.max(...i):0)===e?t:{ratios:ge.supportedRatios||t.ratios,resolutions:ge.supportedResolutions||t.resolutions,durations:r.length>0?r:n}}),A(r=>r<=e?r:(t||[]).find(t=>t<=e)??n[0]??5)},[D]);let he=(0,S.useRef)(null),ge=T.find(e=>e.id===D),_e=(()=>{if(!ge)return 15;let e=ge.maxDuration??ge.max_duration;if(e!=null)return Number(e);let t=ge.supportedDurations;return Array.isArray(t)&&t.length>0?Math.max(...t):15})(),ve=!b||Sle(ge),ye=(0,S.useMemo)(()=>{let e=V.find(e=>e.modelConfigId===D&&e.genType===`video`&&e.resolution===N);if(!e)return 0;let t=(Number(e.baseCredits||0)+Number(e.perSecondCredits||0)*k)*Number(e.ratio||1);return b&&(t+=(Number(e.inputImageBaseCredits||0)+Number(e.inputImagePerImageCredits||0))*Number(e.inputImageRatio||1)),Number(t.toFixed(2))},[V,D,b,k,N]),be=Number(n?.credits||0)W.length===0?`AI自动拆分`:W.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[W]),Se=(0,S.useCallback)(async()=>{if(e)try{ee(await I5(e))}catch{Z.error(`获取任务详情失败`)}},[e]),Ce=(0,S.useCallback)(async()=>{if(e)try{let t=await Qae(e,G,K);te(t.items||[]),ae(t.total||0)}catch{Z.error(`获取拆镜列表失败`)}},[e,G,K]),we=(0,S.useCallback)(e=>{f(e),m(!0)},[]),Te=(0,S.useCallback)(async()=>{if(e)try{await coe(e),Z.success(`重新分析已提交`),pe.current=Date.now(),await Se()}catch(e){Z.error(e?.message||`重新分析失败`)}},[e,Se]),Ee=(0,S.useCallback)(async e=>{try{await uoe(e),Z.success(`重新分析已提交`),Ce()}catch(e){Z.error(e?.message||`重新分析失败`)}},[Ce]),De=(0,S.useCallback)(async e=>{try{await doe(e),Z.success(`重新切割已提交`),await Ce()}catch(e){Z.error(e?.message||`重新切割失败`)}},[Ce]),Oe=(0,S.useCallback)(async e=>{try{await loe(e),Z.success(`删除成功`),Ce()}catch(e){Z.error(e?.message||`删除失败`)}},[Ce]),ke=(0,S.useCallback)(async()=>{await Promise.all([Se(),Ce()])},[Se,Ce]);(0,S.useEffect)(()=>(ke(),()=>{de.current&&window.clearTimeout(de.current),fe.current&&window.clearTimeout(fe.current)}),[ke]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-popover`)&&!t.closest(`.image-settings-trigger`)&&(I(!1),R(!1))};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]),(0,S.useEffect)(()=>{if(U?.analysisStatus!==`processing`||!e){pe.current=null,fe.current&&=(window.clearTimeout(fe.current),null);return}pe.current||=Date.now();let t=async()=>{if(document.visibilityState===`visible`)try{ee(await I5(e))}catch{}},n=()=>{if(!fe.current)return;let e=Date.now()-(pe.current||Date.now()),r=e<6e4?3e3:e<6e5?1e4:3e4;fe.current=window.setTimeout(async()=>{await t(),n()},r)};fe.current=window.setTimeout(async()=>{await t(),n()},3e3);let r=()=>{document.visibilityState===`visible`&&t()};return document.addEventListener(`visibilitychange`,r),()=>{fe.current&&=(window.clearTimeout(fe.current),null),document.removeEventListener(`visibilitychange`,r)}},[U?.analysisStatus,e]);let Ae=W.some(e=>Hce(e));(0,S.useEffect)(()=>{if(!Ae||!e){de.current&&=(window.clearTimeout(de.current),null);return}let t=async()=>{document.visibilityState===`visible`&&await Ce()};de.current=window.setTimeout(()=>void t(),3e4);let n=()=>{document.visibilityState===`visible`&&t()};return document.addEventListener(`visibilitychange`,n),()=>{de.current&&=(window.clearTimeout(de.current),null),document.removeEventListener(`visibilitychange`,n)}},[e,Ce,Ae]);let je=(e,t)=>{c(e),u(t),i(!0)},Me=()=>{i(!1),c(null),_(``),u(``),y(``),x(``),w(``)},Ne=async e=>{try{let t=await yae(e);x(t.url),w(t.resource_id||``),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},Pe=async()=>{if(!s){Z.warning(`请先选择拆镜片段`);return}if(!D){Z.warning(`请选择视频引擎`);return}if(!ve){Z.warning(`当前视频引擎不支持参考图片,请移除素材图片或切换引擎`);return}if(be){Z.warning(`积分不足,请充值后再创建复刻项目`);return}let e=he.current,n=e?.segmentId===s?e.key:`shot_v2_${s}_${Date.now()}_${Math.random().toString(16).slice(2)}`;he.current={segmentId:s,key:n};let r={target_project_name:g.trim(),core_content_point:v.trim(),project_description:v.trim()||void 0,material_image_url:b||void 0,material_image_resource_id:C||void 0,video_config:{engine_id:D,duration:k,aspect_ratio:j,resolution:N},idempotency_key:n};oe(!0);try{let e=await $ae(s,r),n=e?.projectId||e?.id||e?.detail?.id;he.current=null,Z.success(`项目已创建,视频提词正在生成`),Me(),await Ce(),n&&t(`/removelens/${n}/removefenbu?flow_version=v2`)}catch(e){let t=``;if(e instanceof Error)try{t=JSON.parse(e.message).detail||e.message}catch{t=e.message}Z.error(t||`创建失败,请重试`)}finally{oe(!1)}},Fe=async()=>{if(e){ue(!0);try{let t=W.some(e=>e.sourceMode===`ai_suggestion`);await Xae(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await ke()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{ue(!1)}}},Ie=()=>{if(!me){Z.warning(`原视频地址不存在`);return}o(!0)},Le=async t=>{if(e){if(t.durationSecondH9){Z.warning(`拆镜片段不能超过 ${H9} 秒`);return}ce(!0);try{await Zae(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),o(!1),await ke()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{ce(!1)}}},Re=e=>(e?.splitStatus||e?.split_status)===`completed`&&!!(e?.segmentVideoUrl||e?.segment_video_url),ze=(0,S.useMemo)(()=>[{title:`片段`,width:100,fixed:`left`,align:`center`,render:(e,t)=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#333`},children:t.segmentName||`片段${t.segmentIndex||``}`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#999`},children:t.timeNode}),t.sourceMode===`custom`&&(0,$.jsx)(_Q,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(_Q,{color:`orange`,style:{marginTop:6},children:`自动`})]})},{title:`片段视频`,width:150,align:`center`,render:(e,t)=>(0,$.jsx)(Cle,{record:t,onPreview:we})},{title:`视频内容`,width:500,align:`left`,render:(e,t)=>{let n=S9(t.split_status||t.splitStatus);if(n.active)return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(tG,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:n.label})]});if(n.failure)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:n.label});if(t.source_mode===`ai_suggestion`||t.sourceMode===`ai_suggestion`)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:t.segmentContent||t.lastError||`-`});let r=x9(t.analysis_status||t.analysisStatus);return r.active?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(tG,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:r.label})]}):r.failure?(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:r.label}):(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:r.key&&r.key!==`completed`?r.label:t.segmentContent||t.lastError||`-`})}},{title:`视频类型`,width:120,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,fontWeight:500},children:t.segmentCategory||`-`})},{title:`状态`,width:120,align:`center`,dataIndex:`moduleProjectStatus`,render:(e,t)=>{let n=e,r=t.moduleProjectCurrentStepCode||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return n||`-`}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return t.moduleProjectId?{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}:{text:`待生成任务`,color:`#94a3b8`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`操作`,width:200,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[n.moduleProjectId?(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu?flow_version=${n.moduleProjectFlowVersion===`v2`?`v2`:`v1`}`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(X,{type:`text`,onClick:()=>je(String(n.id),n.segmentName),disabled:!Re(n),style:{color:Re(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:Re(n)?`视频生成`:`待切割完成`}),x9(n.analysisStatus||n.analysis_status).failure&&(0,$.jsx)(X,{type:`text`,onClick:()=>Ee(String(n.id)),style:{color:`#f89411ff`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`重新分析`}),S9(n.splitStatus||n.split_status).failure&&(0,$.jsx)(X,{type:`text`,onClick:()=>De(String(n.id)),style:{color:`#f89411ff`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`重新切割`}),(0,$.jsx)(AG,{title:`确定删除此片段?`,onConfirm:()=>Oe(String(n.id)),okText:`确定`,cancelText:`取消`,children:(0,$.jsx)(X,{type:`text`,style:{color:`#ef4444`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`删除`})})]})}],[]),Be=(0,S.useMemo)(()=>(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,background:`#fff`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,background:`linear-gradient(135deg, rgba(99,102,241,0.02) 0%, transparent 100%)`},children:[(0,$.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`,margin:0},children:`拆镜片段列表`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,marginLeft:12},children:[`共 `,W.length,` 个片段`]})]}),(0,$.jsx)(iQ,{columns:ze,dataSource:W,pagination:{current:G,pageSize:K,total:ie,onChange:(e,t)=>{ne(e),re(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条`},bordered:!1,rowKey:`id`,scroll:{y:300},style:{flex:1},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`,height:80,overflow:`auto`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(255, 255, 255, 1)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})]}),[W,ze,G,K,ie]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(H0,{}),onClick:()=>t(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),U?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,display:`flex`,alignItems:`center`,gap:30,padding:24,border:`1px solid rgba(99, 102, 241, 0.1)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`,cursor:`pointer`},onClick:()=>{f(me),m(!0)},onMouseEnter:e=>{let t=e.currentTarget.querySelector(`div:last-child`);t&&(t.style.opacity=`1`)},onMouseLeave:e=>{let t=e.currentTarget.querySelector(`div:last-child`);t&&(t.style.opacity=`0`)},children:[(0,$.jsx)(`video`,{src:me,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:0,transition:`opacity 0.2s`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#6366f1`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,$.jsx)(`polygon`,{points:`5 3 19 12 5 21 5 3`})})})})]}),U.analysisStatus===`failed`&&(0,$.jsx)(`div`,{style:{marginTop:12,textAlign:`center`},children:(0,$.jsx)(X,{onClick:Te,style:{width:`100%`,padding:`6px 16px`,borderRadius:8,fontSize:12,border:`1px solid #ef4444`,color:`#ef4444`,background:`rgba(239, 68, 68, 0.05)`,cursor:U.analysisStatus===`processing`?`not-allowed`:`pointer`,transition:`all 0.2s`},onMouseEnter:e=>{U.analysisStatus!==`processing`&&(e.currentTarget.style.background=`rgba(239, 68, 68, 0.1)`)},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(239, 68, 68, 0.05)`},children:U.analysisStatus===`processing`?`分析中...`:`重新分析`})})]}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,position:`relative`,zIndex:1},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`h2`,{style:{fontSize:20,fontWeight:600,marginBottom:16,background:`linear-gradient(135deg, #1e293b 0%, #334155 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频总结`}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`上传时间: `,U.createdAt?new Date(U.createdAt).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):`-`]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`产品名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:U.title})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`受众群体:`}),U.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(tG,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):U.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(U.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(_Q,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):U.analysisStatus===`failed`?(0,$.jsx)(`span`,{style:{color:`#ef4444`,fontSize:14},children:`分析失败`}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),U.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(tG,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):U.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:U.originalVideoContent}):U.analysisStatus===`failed`?(0,$.jsx)(`span`,{style:{color:`#ef4444`,fontSize:14},children:`分析失败`}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(X,{type:`default`,onClick:Ie,disabled:!me||se||U?.analysisStatus===`processing`,style:{flex:1,height:52,borderRadius:12,border:`2px solid rgba(99, 102, 241, 0.3)`,color:`#6366f1`,fontWeight:600,fontSize:15,background:`rgba(255, 255, 255, 0.9)`,backdropFilter:`blur(10px)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`none`},children:`手动`}),(0,$.jsx)(AG,{title:xe===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:Fe,children:(0,$.jsxs)(X,{type:`primary`,loading:le,disabled:le||U?.analysisStatus===`processing`,style:{flex:1,height:52,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.3)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 25px rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.3)`},children:[(0,$.jsx)(`span`,{style:{position:`relative`,zIndex:1},children:xe}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:`-100%`,width:`100%`,height:`100%`,background:`linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent)`,transition:`left 0.5s ease`},onMouseEnter:e=>{e.currentTarget.style.left=`100%`}}),U?.aiSuggestions&&U.aiSuggestions.length>0&&(0,$.jsx)(kw,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(U?.ai_suggestions||U?.aiSuggestions||[]).map(e=>(0,$.jsxs)(`div`,{style:{marginBottom:8,fontSize:13,lineHeight:1.5},children:[(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#6366f1`},children:[e.index,`.`]}),(0,$.jsx)(`span`,{style:{marginLeft:4,color:`#000000ff`},children:e.timeNode}),(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{style:{color:`#666`},children:e.content})]},e.index))]}),placement:`top`,trigger:`hover`,styles:{container:{backgroundColor:`#fff`,height:300,overflowY:`auto`,border:`1px solid rgba(99, 102, 241, 0.1)`,borderRadius:12,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.12)`}},children:(0,$.jsx)(`span`,{style:{marginLeft:8,fontSize:13,opacity:.9},children:`(AI 镜头拆分方案)`})})]})})]}),Be]}):(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{fontSize:16,color:`#999`},children:`加载中...`})})]}),(0,$.jsx)(yle,{open:a,videoUrl:me,title:`手动视频切片`,loading:se,minDuration:V9,maxDuration:H9,onCancel:()=>o(!1),onConfirm:Le}),(0,$.jsx)(uV,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`智能视频复刻`}),l&&(0,$.jsxs)(`span`,{style:{fontSize:14,color:`#64748b`},children:[`- `,l]})]}),(0,$.jsx)(`button`,{onClick:e=>{e.stopPropagation(),Me()},style:{width:24,height:24,border:`none`,background:`transparent`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:20},children:`×`})]}),placement:`right`,closable:!1,onClose:Me,open:r,size:480,styles:{body:{padding:`24px`,background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`},section:{borderRadius:`20px 0 0 20px`,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:[(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:`素材图片(可选)`}),b?(0,$.jsxs)(`div`,{style:{width:120,height:120,borderRadius:8,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`img`,{src:U9(b),alt:`素材图`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),(0,$.jsx)(`button`,{onClick:()=>{x(``),w(``)},style:{position:`absolute`,bottom:4,right:4,width:24,height:24,borderRadius:`50%`,backgroundColor:`rgba(0,0,0,.5)`,border:`none`,cursor:`pointer`},children:(0,$.jsx)(jQ,{style:{color:`#fff`,fontSize:12}})})]}):(0,$.jsx)(C7,{accept:`image/*`,multiple:!1,mediaType:`image`,maxImageCount:1,usedImageCount:0,onLocalSelect:e=>{e[0]&&Ne(e[0])},onHistorySelect:e=>{let t=e[0];t&&(x(t.resourceUrl||t.previewUrl||t.displayUrl||``),w(t.id),Z.success(`历史图片已选择`))},children:(0,$.jsxs)(`div`,{style:{width:120,height:120,borderRadius:8,border:`2px dashed rgba(99,102,241,.3)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,gap:6},children:[(0,$.jsx)(BI,{style:{fontSize:20,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`上传或选择历史图片`})]})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:`项目名称(可选)`}),(0,$.jsx)(JU,{value:g,onChange:e=>_(e.target.value),placeholder:`请输入项目名称`,style:{height:44,borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:50,showCount:!0})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsx)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:`项目描述(可选)`}),(0,$.jsx)(ble,{value:v,onChange:e=>y(e.target.value),placeholder:`请输入项目描述`,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:200,showCount:!0,rows:3})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`视频参数`,(0,$.jsx)(`span`,{style:{color:`#f94444`},children:`(必选)`})]}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{I(!F),R(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(o8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:T.find(e=>e.id===D)?.name||`选择引擎`})]}),F&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:T.filter(e=>e.supportsUniversalReference!==!1).map(e=>(0,$.jsxs)(`button`,{type:`button`,onClick:()=>{O(e.id);let t=(()=>{let t=e.maxDuration??e.max_duration;if(t!=null)return Number(t);let n=e.supportedDurations;return Array.isArray(n)&&n.length>0?Math.max(...n):15})(),n=e.supportedDurations,r=Array.from({length:Math.max(t-4,1)},(e,t)=>t+5),i=Array.from(new Set([...n||[],...r].sort((e,t)=>e-t)));B({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:i}),e.supportedRatios?.includes(j)||M(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(N)||P(e.supportedResolutions?.[0]||`720p`),(!i.includes(k)||k>t)&&A(i.find(e=>e<=t)??i[0]??5),I(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:D===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:D===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:D===e.id?600:500,color:D===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{R(!L),I(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(b3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[j,` · `,k,`s · `,N]})]}),L&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:z.ratios.map(e=>{let[t,n]=e.split(`:`).map(Number),r=t>=n?18:Math.round(t/n*18),i=n>=t?18:Math.round(n/t*18);return(0,$.jsxs)(`button`,{onClick:()=>M(e),style:{flex:`0 0 calc(12.5% - 4px)`,minWidth:44,height:52,borderRadius:6,border:j===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:j===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:r,height:i,border:`2px solid ${j===e?`#6366f1`:`#9ca3af`}`,borderRadius:3,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:j===e?`#6366f1`:`#6b7280`,fontWeight:j===e?600:400},children:e})]},e)})})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(k-Math.min(...z.durations))/(_e-Math.min(...z.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...z.durations),max:_e,value:k,onChange:e=>A(Math.min(Number(e.target.value),_e)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:k}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:z.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>P(e),style:{flex:1,height:42,borderRadius:8,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:N===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(`div`,{style:{color:ve?`#6366f1`:`#ef4444`,fontSize:13},children:ve?``:`当前引擎不支持参考图片,请移除素材图片或切换引擎。`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,marginTop:8},children:(0,$.jsx)(kw,{title:(n?.credits||0){if((n?.credits||0)m(!1),afterClose:()=>{h.current&&(h.current.pause(),h.current.currentTime=0)},footer:null,width:640,centered:!0,styles:{body:{padding:24},header:{borderBottom:`1px solid #e0e0e0`,padding:`20px 24px`}},children:(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:h,controls:!0,src:d||``,style:{width:`100%`,maxHeight:420,objectFit:`contain`,backgroundColor:`#000`},playsInline:!0,"webkit-playsinline":`true`,autoPlay:!0})})})]})}var{Title:Tle,Text:W9}=Q,{TextArea:Ele}=JU;function Dle(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}var G9=e=>e?/^https?:\/\//i.test(e)?e:`${`https://ceshi.apiforeign.minzhongzc.com`.replace(/\/$/,``)}${e.startsWith(`/`)?``:`/`}${e}`:``;function K9(){let e=Ye(),{creatID:t}=$e(),[n]=On(),r=n.get(`flow_version`)===`v2`?`v2`:`v1`,{user:i}=$5(),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(0),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(`image`),[_,v]=(0,S.useState)({}),[y,b]=(0,S.useState)(null),x=(0,S.useRef)(null),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)({}),[F,I]=(0,S.useState)(``),[L,R]=(0,S.useState)(``),[z,B]=(0,S.useState)(!1),[V,H]=(0,S.useState)(!1),[U,ee]=(0,S.useState)(5),[W,te]=(0,S.useState)(`16:9`),[G,ne]=(0,S.useState)(`480p`),[K,re]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[ie,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)(1),[se,ce]=(0,S.useState)(20),[le,ue]=(0,S.useState)(0),[de,fe]=(0,S.useState)(``),[pe,me]=(0,S.useState)({}),[he,ge]=(0,S.useState)([]),[_e,ve]=(0,S.useState)([]),[ye,be]=(0,S.useState)(!1),[xe,Se]=(0,S.useState)(``),[Ce,we]=(0,S.useState)(`image`),[Te,Ee]=(0,S.useState)(!1),De=S.useRef(null);(0,S.useEffect)(()=>{if(ye&&Ce===`video`){let e=()=>{De.current&&De.current.play().catch(()=>{})};De.current&&(De.current.readyState>=2?e():De.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),De.current&&(De.current.removeEventListener(`loadedmetadata`,e),De.current.pause())}}else De.current&&De.current.pause()},[ye,Ce]);let Oe=r===`v2`,ke=(0,S.useMemo)(()=>Oe?[{id:1,title:`素材与项目信息`,description:`固定片段素材和项目描述`,childId:1},{id:2,title:`生成视频提示词`,description:`生成并确认视频提示词`,childId:4},{id:3,title:`生成最终视频`,description:`使用当前视频提示词生成视频`,childId:5}]:[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}],[Oe]),Ae=(0,S.useMemo)(()=>ke.map((e,t)=>({...e,status:he[t]?.status||``,id:he[t]?.id||t,output:he[t]?.output||``,input:he[t]?.input||{},engineId:he[t]?.input?.payload?.videoConfig?.engineId||``,errorMessage:he[t]?.errorMessage||``})),[ke,he]),je=(0,S.useRef)(!1);(0,S.useEffect)(()=>{if(!Ae.some(e=>e.status))return;let e=[...Ae].reverse().find(e=>e.status===`processing`);if(e){ve([String(e.childId)]),je.current=!1;return}if(je.current){je.current=!1;return}let t=[...Ae].reverse().find(e=>e.status===`completed`&&e.childId!==1);if(t){ve([String(t.childId)]);return}ve([])},[Ae]);let Me=(e,t,n)=>{F5(e,t,n).then(e=>{e.items&&ae(e.items),e.total!==void 0&&ue(e.total)}).catch(e=>{})},Ne=(e,t)=>{oe(e),ce(t),Me(e,t,de)},Pe=()=>{Me(1,20,de)};(0,S.useEffect)(()=>{Me(q,se,de)},[]),(0,S.useEffect)(()=>{S5().then(e=>{let t=(e.engine?.video||[]).filter(e=>e.supportsUniversalReference!==!1),n=(e.engine?.image||[]).filter(e=>e.supportsUniversalReference!==!1);if(P({video:t,image:n}),t.length>0){I(t[0].id);let e=t[0];re({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]})}n.length>0&&R(n[0].id)}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{x.current&&=(clearInterval(x.current),null)},[]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(B(!1),H(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&L5(t,r).then(e=>{me(e),e.steps&&ge(e.steps)}).catch(e=>{Z.error(e?.message||`加载任务详情失败`)})},[t,r]),(0,S.useEffect)(()=>{let e=pe?.status===`processing`||he.some(e=>e?.status===`processing`);e&&!x.current?x.current=setInterval(ze,3e4):!e&&x.current&&(clearInterval(x.current),x.current=null)},[pe?.status,he,t,r]),(0,S.useEffect)(()=>{E5().then(e=>{c(e)}).catch(()=>{})},[]);let Fe=()=>{let e={};e=s.find(e=>e.modelConfigId===F&&e.genType===`video`&&e.resolution===G),e||={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0};let t=(U*e.perSecondCredits+e.baseCredits)*e.ratio,n=pe?.videoGeneration?.inputMedia?.video?.duration||0;if(n>0){let r=((e.inputVideoBaseCredits||0)+(e.inputVideoPerSecondCredits||0)*n)*(e.inputVideoRatio||1);t+=r}let r=Oe?+!!pe?.material?.materialImageUrl:pe?.videoGeneration?.inputMedia?.image?.length||0;if(r>0){let n=((e.inputImageBaseCredits||0)+(e.inputImagePerImageCredits||0)*r)*(e.inputImageRatio||1);t+=n}u(Number(t.toFixed(2)))},Ie=()=>{let e=Ae[1]?.input?.payload?.videoConfig||Ae[1]?.input?.payload?.video_config;if(!e)return 0;let t=e?.engineId||e?.engine_id,n=e?.resolution,r=e?.duration||U,i={};i=s.find(e=>e.modelConfigId===t&&e.genType===`video`&&e.resolution===n),i||={perSecondCredits:2,baseCredits:60,ratio:1.3,inputVideoRatio:1.3,inputVideoBaseCredits:0,inputVideoPerSecondCredits:15,inputImageRatio:1,inputImageBaseCredits:0,inputImagePerImageCredits:0};let a=(r*i.perSecondCredits+i.baseCredits)*i.ratio,o=pe?.videoGeneration?.inputMedia?.video?.duration||0;if(o>0){let e=((i.inputVideoBaseCredits||0)+(i.inputVideoPerSecondCredits||0)*o)*(i.inputVideoRatio||1);a+=e}let c=Oe?+!!pe?.material?.materialImageUrl:pe?.videoGeneration?.inputMedia?.image?.length||0;if(c>0){let e=((i.inputImageBaseCredits||0)+(i.inputImagePerImageCredits||0)*c)*(i.inputImageRatio||1);a+=e}return Number(a.toFixed(2))};(0,S.useEffect)(()=>{s.length>0&&F&&Fe()},[s,F,U,G,pe]);let Le=(e,t,n,r)=>{g(t||`image`),w(n?String(n):``),t===`video`?(b(r||null),v(e&&typeof e==`object`?Dle(e):{}),f(``)):(b(null),f(e||``),v({})),o(!0)},Re=async()=>{if(h===`image`){if(!pe?.id||!C){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!d||!d.trim()){Z.warning(`图片提示词不能为空`);return}E(!0);try{await ioe(pe.id,C,{prompt:d.trim()}),Z.success(`图片提示词已保存`),Be(),o(!1),w(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{E(!1)}return}if(!pe?.id||!C){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!_||typeof _!=`object`||Object.keys(_).length===0){Z.warning(`视频提示词不能为空`);return}if(!y){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=l9(_,y);if(e){Z.warning(e);return}E(!0);try{await(Oe?toe:aoe)(pe.id,C,{prompt_schema:_}),Z.success(`视频提示词已保存`),Be(),o(!1),w(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{E(!1)}},ze=()=>{t&&L5(t,r).then(e=>{me(e),e.steps&&ge(e.steps)}).catch(e=>{console.error(`轮询任务详情失败`,e)})},Be=()=>{t&&L5(t,r).then(e=>{me(e),e.steps&&ge(e.steps)}).catch(e=>{Z.error(e?.message||`刷新任务详情失败`)})},Ve=(e,t,n=!1)=>{Se(e),we(t),Ee(n),be(!0)},He=()=>{be(!1),Se(``),De.current&&De.current.pause()},Ue=e=>{if(e.preventDefault(),e.stopPropagation(),!xe)return;let t=document.createElement(`a`);t.href=`https://ceshi.apiforeign.minzhongzc.com${xe}&download=1`,t.download=Ce===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},We=e=>{roe(pe.id,e.toString()).then(e=>{Z.info(`正在生成图片提示词,请稍候...`),Be()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ge=e=>{let t={engine_id:L,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};R5(pe.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),Be()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ke=()=>{let e={engine_id:L,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};R5(pe.id,Ae[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),Be()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},qe=e=>{let t={engine_id:F,duration:U,aspect_ratio:W,resolution:G,target_platform:`抖音`};ooe(pe.id,e.toString(),t).then(e=>{Z.info(`正在生成视频提示词,请稍候...`),Be()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Je=async(e,t)=>{try{Oe?await noe(pe.id,String(e)):await soe(pe.id,String(e),{engine_id:t||``}),Z.info(`正在生成视频,请稍候...`),Be()}catch(e){let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)}},Xe=async()=>{let e=Oe?Ae[1]:Ae[3];e?.id&&await Je(e.id,e.engineId||``)},Ze=async e=>{if(!(!Oe||!pe?.id||!e||!F)){M(!0);try{await eoe(pe.id,e,{video_config:{engine_id:F,duration:U,aspect_ratio:W,resolution:G}}),Z.info(`正在按新视频参数重新生成视频提示词,请稍候...`),Be()}catch(e){Z.error(e?.message||`重新生成视频提示词失败`)}finally{M(!1)}}};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(H0,{}),onClick:()=>window.history.back(),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`拆镜复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>m(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box video-container`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:pe?.material?.materialVideoUrl?`pointer`:`default`,position:`relative`},onClick:()=>pe?.material?.materialVideoUrl&&Ve(pe.material.materialVideoUrl,`video`),children:pe?.material?.materialVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:G9(pe.material.materialVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`contain`}}),(0,$.jsx)(`div`,{className:`video-overlay`,children:(0,$.jsx)(M6,{style:{fontSize:48,color:`#fff`,opacity:.9}})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:pe?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>pe?.material?.materialImageUrl&&Ve(pe.material.materialImageUrl,`image`),children:pe?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G9(pe.material.materialImageUrl),alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),pe?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Ve(pe.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${pe.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),pe?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsxs)(`div`,{className:`medio_box video-container`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`,position:`relative`},onClick:()=>Ve(pe.finalVideoUrl,`video`,!0),children:[(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${pe.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}),(0,$.jsx)(`div`,{className:`video-overlay`,children:(0,$.jsx)(M6,{style:{fontSize:48,color:`#fff`,opacity:.9}})})]})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(a_,{activeKey:_e,onChange:ve,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:Ae.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(M2,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(W9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:pe?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:G9(pe.material.materialVideoUrl),style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(W9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:pe?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G9(pe.material.materialImageUrl),alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`原产品名称:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Ae[0]?.input?.payload?.sourceProjectName||`-`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`自有产品名称:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Ae[0]?.input?.payload?.targetProjectName||`-`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:8},children:`产品卖点:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:Ae[0]?.input?.payload?.coreContentPoint||`-`})]})]}),!Oe&&(0,$.jsx)(kw,{title:`LLM积分由服务端按当前功能场景直接消费`,placement:`top`,children:(0,$.jsx)(X,{onClick:()=>{We(e.id)},type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片提示词`})})]}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(W9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(yV,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)($Q,{}),onClick:()=>Le(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(X,{onClick:()=>{je.current=!0,ve(t=>t.filter(t=>t!==String(e.childId))),Ge(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[pe.finalImageUrl?(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${pe.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)($Q,{}),onClick:()=>Ke(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{B(!z),H(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(o8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(W9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:N.video?.find(e=>e.id===F)?.name||`选择引擎`})]}),z&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(W9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:N.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{I(e.id),re({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(W)||te(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(G)||ne(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(U)||ee(e.supportedDurations?.[0]||5),B(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:F===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:F===e.id?600:500,color:F===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{let e=Ae[1]?.input?.payload?.videoConfig||Ae[1]?.input?.payload?.video_config;if(e){let t=e?.engineId||e?.engine_id,n=N.video?.find(e=>String(e.id)===String(t));n&&(I(n.id),re({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]})),te(e?.aspectRatio||e?.aspect_ratio||`16:9`),ne(e?.resolution||`480p`),ee(e?.duration||5)}H(!V),B(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(b3,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(W9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[W,` · `,U,`s · `,G]})]}),V&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(W9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:K.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>te(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:W===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:W===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${W===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:W===e?`#6366f1`:`#6b7280`,fontWeight:W===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(W9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(U-Math.min(...K.durations))/(Math.max(...K.durations)-Math.min(...K.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...K.durations),max:Math.max(...K.durations),value:U,onChange:e=>ee(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:U}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(W9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:K.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>ne(e),style:{flex:1,height:42,borderRadius:6,border:G===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:G===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:G===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(kw,{title:(i?.credits||0){if((i?.credits||0)t.filter(t=>t!==String(e.childId))),qe(e.id)},disabled:e.status!==`completed`||(i?.credits||0){let e=Ae[1]?.input?.payload?.videoConfig||Ae[1]?.input?.payload?.video_config,t=e?.engineId||e?.engine_id,n=t?(N.video||[]).find(e=>String(e.id)===String(t))?.name:``;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`引擎:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:n||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`比例:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.aspectRatio||e?.aspect_ratio||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`分辨率:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.resolution||`-`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#666666`,marginRight:4},children:`时长:`}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#4b5563`},children:e?.duration||`-`})]})]})})()})}),(0,$.jsxs)(yV,{style:{marginTop:16,gap:12,width:`100%`,flexWrap:`wrap`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)($Q,{}),onClick:()=>Le(pe?.videoGeneration?.promptSchema,`video`,e.id,pe?.videoGeneration?.schemaConfigSnapshot),style:{flex:`0 0 auto`,minWidth:160,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!pe?.videoGeneration?.promptSchema||!pe?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),Oe&&(0,$.jsx)(kw,{title:`LLM积分由服务端按当前功能场景直接消费`,placement:`top`,children:(0,$.jsx)(X,{type:`default`,onClick:()=>{let t=Ae[1]?.input?.payload?.videoConfig||Ae[1]?.input?.payload?.video_config;if(t){let e=t?.engineId||t?.engine_id,n=N.video?.find(t=>String(t.id)===String(e));n&&(I(n.id),re({ratios:n.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:n.supportedResolutions||[`480p`,`720p`,`1080p`],durations:n.supportedDurations||[5,8,10,12,15]})),te(t?.aspectRatio||t?.aspect_ratio||`16:9`),ne(t?.resolution||`480p`),ee(t?.duration||5)}A(String(e.id)),O(!0)},style:{flex:`0 0 auto`,minWidth:160,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500},disabled:e.status===`processing`||Ae[2]?.status===`processing`,children:`重新生成视频提词`})}),(0,$.jsx)(kw,{title:(i?.credits||0){let t=Ie();if((i?.credits||0)t.filter(t=>t!==String(e.childId))),Je(e.id,e.engineId)},type:`primary`,style:{flex:`1 0 auto`,minWidth:140,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`||(i?.credits||0){let e=Ie();if((i?.credits||0){let e=`https://ceshi.apiforeign.minzhongzc.com${pe?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(EG,{open:D,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#6366f1`,letterSpacing:.4},children:`重新生成视频提词`})]}),onCancel:()=>O(!1),width:400,footer:null,centered:!0,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`}},children:(0,$.jsxs)(`div`,{style:{padding:`16px 0`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(zC,{value:F,onChange:e=>{let t=N.video?.find(t=>t.id===e);t&&(I(t.id),re({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]}),t.supportedRatios?.includes(W)||te(t.supportedRatios?.[0]||`16:9`),t.supportedResolutions?.includes(G)||ne(t.supportedResolutions?.[0]||`720p`),t.supportedDurations?.includes(U)||ee(t.supportedDurations?.[0]||5))},style:{width:`100%`,borderRadius:8},options:N.video?.map(e=>({value:e.id,label:e.name})),placeholder:`请选择引擎`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:K.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>te(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:W===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:W===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${W===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:W===e?`#6366f1`:`#6b7280`,fontWeight:W===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(U-Math.min(...K.durations))/(Math.max(...K.durations)-Math.min(...K.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...K.durations),max:Math.max(...K.durations),value:U,onChange:e=>ee(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:U}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`span`,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:K.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>ne(e),style:{flex:1,height:42,borderRadius:8,border:G===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:G===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:G===e?`#fff`:`#4b5563`},children:e})},e))})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:16},children:[(0,$.jsx)(X,{onClick:()=>O(!1),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500},children:`取消`}),(0,$.jsx)(X,{onClick:()=>{if(!F){Z.warning(`请选择视频引擎`);return}Ze(k),O(!1)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:!F,children:`确认生成`})]})]})}),(0,$.jsx)(EG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:h===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:a,onCancel:()=>{T||o(!1)},footer:[(0,$.jsx)(X,{onClick:()=>o(!1),disabled:T,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:Re,loading:T,disabled:T,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:h===`image`?(0,$.jsx)(Ele,{value:d,onChange:e=>f(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(g9,{value:_,schemaConfigSnapshot:y,onChange:v})})}),(0,$.jsxs)(EG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:p,onCancel:()=>m(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(JU,{placeholder:`搜索产品名称`,value:de,onChange:e=>fe(e.target.value),onPressEnter:Pe,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(X,{type:`primary`,onClick:Pe,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(iQ,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(X,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:ie,rowKey:`id`,pagination:{current:q,pageSize:se,total:le,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:Ne,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]}),(0,$.jsx)(EG,{open:ye,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:He,width:800,footer:Te?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(F1,{}),onClick:Ue,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}):null,centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:Ce===`image`?(0,$.jsx)(`img`,{src:xe.startsWith(`http`)?xe:`https://ceshi.apiforeign.minzhongzc.com${xe}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:De,src:xe.startsWith(`http`)?xe:`https://ceshi.apiforeign.minzhongzc.com${xe}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}var Ole=({asset:e,index:t,onPreview:n})=>{let[r,i]=(0,S.useState)(!1);return(0,$.jsx)(`div`,{className:`project-card`,onClick:()=>n(e),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,flexShrink:0,width:`18%`,position:`relative`},children:(0,$.jsx)(`div`,{style:{position:`relative`,aspectRatio:`9/16`},children:e.mediaType===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},muted:!0,playsInline:!0}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,background:`rgba(0,0,0,0.5)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(M6,{style:{fontSize:24,color:`#fff`}})})})]}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${e.url}`,alt:e.title||`素材 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})})};function kle(e){if(!e)return`-`;let t=String(e).trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``);let[r=``,i=``]=t.split(`T`),[,a=``,o=``]=r.split(`-`),s=i.slice(0,5);return!a||!o?`-`:`${a}-${o} ${s}`}var Ale=()=>{let e=Ye(),[t,n]=(0,S.useState)(`project`),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(null),[h,g]=(0,S.useState)(``),_=(0,S.useRef)(null),v=(0,S.useRef)(``),[y,b]=(0,S.useState)(`cases`),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)(null),E=(0,S.useRef)(null);(0,S.useEffect)(()=>{Toe().then(e=>{if(e?.items?.length>0){c(e.items);let t=e.items[0].id;u(t),U5(t).then(e=>{e?.categories?.[0]?.assets&&f(e.categories[0].assets)})}})},[]),(0,S.useEffect)(()=>()=>{E.current&&=(E.current.pause(),null),T(null),C(null),document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()})},[]),(0,S.useEffect)(()=>{if(!p){E.current&&=(E.current.pause(),null),T(null),C(null),g(``),v.current=``,document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()});return}let e=p.id||p.url;v.current=e;let t=(e,n)=>n===0?e:t(n,e%n),n=p.width||p.videoWidth||p.imageWidth||0,r=p.height||p.videoHeight||p.imageHeight||0;if(n&&r){let e=t(n,r);g(`${n/e}:${r/e}`);return}if(g(``),p.mediaType===`video`){let n=_.current,r=()=>{if(v.current!==e)return;let r=n.videoWidth,i=n.videoHeight;if(!r||!i)return;let a=t(r,i);g(`${r/a}:${i/a}`)};if(n?.removeEventListener(`loadedmetadata`,r),n&&n.videoWidth&&n.videoHeight){let e=t(n.videoWidth,n.videoHeight);g(`${n.videoWidth/e}:${n.videoHeight/e}`)}else n?.addEventListener(`loadedmetadata`,r);return()=>{n?.removeEventListener(`loadedmetadata`,r)}}else{let n=new Image;n.crossOrigin=`anonymous`,n.onload=()=>{if(v.current!==e)return;let r=n.width,i=n.height;if(!r||!i){g(`未知`);return}let a=t(r,i);g(`${r/a}:${i/a}`)},n.onerror=()=>{v.current===e&&g(`未知`)},n.src=`https://ceshi.apiforeign.minzhongzc.com${p.url}`}},[p]),(0,S.useEffect)(()=>{(async()=>{try{boe(10).then(e=>{for(let t in e)e[t].forEach(e=>{e.type=t,o(t=>[...t,e])});o(e=>e)})}catch{}})()},[]);let D=e=>{n(e)},O=[{icon:(0,$.jsx)(wV,{style:{fontSize:24}}),title:`行业智造`,description:`新建项目、设置图文视频参数、核对信息并生成素材`,action:`立即创作`,path:`/projects`},{icon:(0,$.jsx)(q6,{style:{fontSize:24}}),title:`AI创作`,description:`输入想法、剧本或上传参考,智能生成视频/图片`,action:`立即生成`,path:`/conversation`},{icon:(0,$.jsx)(wV,{style:{fontSize:24}}),title:`爆款复刻`,description:`上传参考视频与产品图片,一键复刻爆款`,action:`立即创作`,path:`/initial`},{icon:(0,$.jsx)(r8,{style:{fontSize:24}}),title:`拆镜复刻`,description:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`,action:`开始拆镜`,path:`/removelens`}],k=[{key:`all`,label:`全部`},{key:`project`,label:`项目媒体`},{key:`chatAi`,label:`AI成片`},{key:`hotOpeningReplicate`,label:`爆款复刻`},{key:`shotReplicate`,label:`拆镜复刻`}],A=t===`all`?a:a.filter(e=>e.type===t);return(0,$.jsxs)(`div`,{className:`content_box`,style:{backgroundColor:`#fff`,borderRadius:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsx)(`h3`,{children:`首页工作台 `}),(0,$.jsxs)(`p`,{style:{cursor:`pointer`,fontSize:12,letterSpacing:.3,padding:`10px 16px`,backgroundColor:`#ffffffff`,borderRadius:30,boxShadow:`0px 4px 12px 0px rgba(0, 0, 0, 0.1)`},children:[`如需进行账户素材推送:`,(0,$.jsxs)(`span`,{style:{color:`#1a50bbff`},onClick:()=>{e(`/authorization`)},children:[`一键推送`,(0,$.jsx)(G0,{style:{marginLeft:8,transform:`rotate(0deg)`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`20px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:16},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`AI 创作入口`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`一键开启智能创作`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:12},children:O.map((t,n)=>{let r=[{color:`#3b82f6`,light:`rgba(59,130,246,0.12)`,tag:`项目`},{color:`#6366f1`,light:`rgba(99,102,241,0.12)`,tag:`复刻`},{color:`#f97316`,light:`rgba(249,115,22,0.12)`,tag:`拆镜`},{color:`#10b981`,light:`rgba(16,185,129,0.12)`,tag:`云创`}],i=r[n]||r[0];return(0,$.jsxs)(`div`,{onClick:()=>e(t.path),className:`project-card`,style:{flex:`1 1 280px`,minWidth:280,padding:`16px 20px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`,transition:`all 0.3s cubic-bezier(0.4,0,0.2,1)`,position:`relative`,display:`flex`,alignItems:`center`,gap:14,minHeight:96},onMouseEnter:e=>{e.currentTarget.style.borderColor=i.color,e.currentTarget.style.boxShadow=`0 8px 24px ${i.light}`,e.currentTarget.style.background=i.light,e.currentTarget.style.transform=`translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.boxShadow=`none`,e.currentTarget.style.background=`#fff`,e.currentTarget.style.transform=`translateY(0)`},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,background:i.light,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,transition:`all 0.3s ease`,color:i.color},onMouseEnter:e=>{e.currentTarget.style.background=i.color,e.currentTarget.style.color=`#fff`},onMouseLeave:e=>{e.currentTarget.style.background=i.light,e.currentTarget.style.color=i.color},children:(0,$.jsx)(`span`,{style:{fontSize:20,display:`flex`,transition:`all 0.3s ease`},children:t.icon})}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,flex:1,minWidth:0},children:t.title}),(0,$.jsx)(`span`,{style:{fontSize:10,color:i.color,padding:`2px 7px`,borderRadius:4,background:i.light,fontWeight:600,flexShrink:0},children:i.tag})]}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,lineHeight:1.5,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:t.description})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,color:i.color,fontSize:13,fontWeight:600,flexShrink:0},children:[t.action,(0,$.jsx)(G0,{style:{fontSize:12}})]})]},n)})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:8},children:[{key:`cases`,label:`素材案例`},{key:`works`,label:`近期作品`}].map(e=>(0,$.jsx)(`button`,{onClick:()=>b(e.key),style:{padding:`6px 16px`,borderRadius:8,fontSize:13,fontWeight:500,border:`none`,cursor:`pointer`,transition:`all 0.25s ease`,background:y===e.key?`linear-gradient(135deg, #6366f1, #8b5cf6)`:`#f1f5f9`,color:y===e.key?`#fff`:`#64748b`},children:e.label},e.key))})}),y===`works`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(hL,{activeKey:t,onChange:D,items:k.map(e=>({key:e.key,label:e.label})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:A.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(C6,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无作品`})]}):A.map(t=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>{let n=t.moduleProjectId;t.type===`hotOpeningReplicate`&&n!=null?e(`/initial/${n}/initialinfo?flow_version=${t.moduleProjectFlowVersion===`v2`?`v2`:`v1`}`):t.type===`shotReplicate`&&n!=null?e(`/removelens/${n}/removefenbu?flow_version=${t.moduleProjectFlowVersion===`v2`?`v2`:`v1`}`):t.type===`chatAi`?e(`/conversation`):t.type===`project`&&e(`/project`)},style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:[(()=>{let e=t.type!==`hotOpeningReplicate`&&(String(t.resourceType??``).toLowerCase()===`image`||t.resourceType===1||String(t.resourceType??``)===`1`),n=``;return n=e?`/static`+t.resultUrl+`&w=300&p=50`||``:(t.type,t.coverUrl||t.resultUrl||t.resultUrl||``),(0,$.jsx)(`img`,{src:n?n.startsWith(`http`)?n:`https://ceshi.apiforeign.minzhongzc.com`+n:``,alt:t.title||t.name||`作品`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})(),String(t.resourceType??``).toLowerCase()===`image`?null:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(L8,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`,paddingTop:0},children:(0,$.jsxs)(`div`,{style:{marginTop:6,display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,border:`1px solid #3b82f6`,borderRadius:4,color:`#3b82f6`,fontSize:11,fontWeight:500,background:`#fff`,lineHeight:1.4,whiteSpace:`nowrap`},children:{project:`项目媒体`,chatAi:`AI成片`,hotOpeningReplicate:`爆款复刻`,shotReplicate:`拆镜复刻`}[t.type]||`其他`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`·`}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:kle(t.generatedTime)})]})})]},t.id||`${t.type}-${Math.random()}`))})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(hL,{activeKey:l,onChange:e=>{u(e),U5(e).then(e=>{e?.categories?.[0]?.assets?f(e.categories[0].assets):f([])})},items:s.map(e=>({key:e.id,label:e.name})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`flex`,flexWrap:`wrap`,gap:16,justifyContent:`flex-start`,overflowX:`auto`,paddingBottom:8},children:d.length===0?(0,$.jsxs)(`div`,{style:{flex:1,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(C6,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无素材`})]}):d.map((e,t)=>(0,$.jsx)(Ole,{asset:e,index:t,onPreview:m},e.id||t))})]})]}),(0,$.jsxs)(EG,{open:!!p,onCancel:()=>{_.current?.pause(),m(null),g(``),v.current=``},footer:null,width:900,centered:!0,className:`preview-modal`,style:{borderRadius:16,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,height:580,paddingTop:30},children:[(0,$.jsx)(`div`,{style:{flex:1,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:24},children:(0,$.jsxs)(`div`,{style:{maxWidth:`100%`,maxHeight:500,borderRadius:12,overflow:`hidden`,background:`#0f172a`},children:[p?.mediaType===`video`?(0,$.jsx)(`video`,{ref:_,src:`https://ceshi.apiforeign.minzhongzc.com${p.url}`,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:500,objectFit:`contain`},"webkit-playsinline":`true`}):(0,$.jsx)(`img`,{src:`https://ceshi.apiforeign.minzhongzc.com${p?.url}`,alt:p?.title,style:{maxWidth:`100%`,maxHeight:500,objectFit:`contain`}}),p?.mediaType===`video`&&(0,$.jsx)(`div`,{style:{position:`absolute`,top:32,right:32,fontSize:11,color:`#fff`,background:`rgba(0,0,0,0.6)`,padding:`3px 8px`,borderRadius:4},children:`AI生成`})]})}),(0,$.jsxs)(`div`,{style:{flex:1,padding:24,overflowY:`auto`},children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#fff`,marginBottom:16},children:`创意详情`}),(0,$.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:16},children:[(0,$.jsx)(`span`,{style:{color:`#6366f1`},children:`比例:`}),h||`计算中...`]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#000000ff`,marginBottom:8},children:`视频提示词`}),(0,$.jsx)(`div`,{style:{fontSize:13,color:`#000000ff`,lineHeight:1.6},children:p?.generationPrompt})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:`视频参考图`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:p?.mediaReferences&&p.mediaReferences.length>0?p.mediaReferences.map((e,t)=>{let n=e.url||e.resourceUrl||e.previewUrl||``,r=n.startsWith(`http`)?n:`https://ceshi.apiforeign.minzhongzc.com${n}`;return e.type===`video`?(0,$.jsxs)(`div`,{style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`,position:`relative`},children:[(0,$.jsx)(`video`,{src:r,muted:!0,onClick:e=>{e.stopPropagation();let n=e.currentTarget;x===t?(n.pause(),C(null)):(document.querySelectorAll(`.preview-video-item`).forEach(e=>{e.pause()}),n.play(),C(t))},className:`preview-video-item`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}),x!==t&&(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(L8,{style:{fontSize:18,color:`#fff`}})})]},t):e.type===`audio`?(0,$.jsx)(`div`,{onClick:e=>{if(e.stopPropagation(),w===r)E.current&&E.current.pause(),T(null);else{E.current&&E.current.pause();let e=new Audio(r);E.current=e,e.onended=()=>{T(null)},e.play(),T(r)}},style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`,background:`linear-gradient(135deg, #8b5cf6, #a78bfa)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:w===r?(0,$.jsx)(d6,{style:{fontSize:24,color:`#fff`}}):(0,$.jsx)(Z0,{style:{fontSize:24,color:`#fff`}})},t):(0,$.jsx)(`div`,{style:{width:80,height:80,borderRadius:8,overflow:`hidden`,cursor:`pointer`},children:(0,$.jsx)(`img`,{src:r,alt:`参考图 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})},t)}):(0,$.jsx)($.Fragment,{})})]})]})]}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,borderTop:`1px solid #334155`,display:`flex`,alignItems:`center`,justifyContent:`flex-end`},children:(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(X,{onClick:()=>{e(`/conversation`,{state:{generationPrompt:p?.generationPrompt,mediaReferences:p?.mediaReferences,aspectRatio:h}})},style:{padding:`8px 24px`,borderRadius:8,background:`#3b82f6`,border:`none`,color:`#fff`,fontSize:13,fontWeight:500},children:`去AI创作`})})})]})]})},{RangePicker:jle}=DB,q9={borderRadius:8,fontWeight:600},J9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),Mle=()=>{let e=Ye(),[t]=On(),{message:n}=ex.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(1),[x,C]=(0,S.useState)(10),[w,T]=(0,S.useState)(t.get(`advertiserId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,GE.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),[A,j]=(0,S.useState)(``);(0,S.useEffect)(()=>{N(),M()},[]);let M=async(e=1,t=10,r,a)=>{c(!0);try{let n=await goe({advertiser_id:a??w,consume_date:r??E,page:e,page_size:t});i(n.data||[]),o(n.pagination?.total||0),b(n.pagination?.page||1),C(n.pagination?.pageSize||10)}catch{n.error(`加载数据失败`)}finally{c(!1)}},N=async()=>{try{let e=((await V5()).data||[]).map(e=>({name:J9(e.field),description:e.description}));m(e);let t=localStorage.getItem(`consumeColumns`);g(t?JSON.parse(t):e.map(e=>e.name))}catch{n.error(`加载表头字段失败`)}},P=r.map((e,t)=>({...e,index:t+1,key:e.id})),F=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/materials`)},I=()=>{b(1),M(1,x)},L=()=>{EG.confirm({title:`拉取消耗数据`,content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`同步日期:`}),(0,$.jsx)(DB,{value:(0,GE.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,GE.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),style:{width:`100%`}})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`广告主ID(可选):`}),(0,$.jsx)(JU,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await _oe({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},R=h.map(e=>p.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[t.get(`advertiserId`)&&(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(H0,{}),onClick:F}),(0,$.jsx)(_4,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16,padding:`12px 16px`,borderRadius:12,background:`#fff`,border:`1px solid #f0f0f5`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[(0,$.jsx)(JU,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180,borderRadius:8},allowClear:!0,onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(jle,{value:E?[(0,GE.default)(E[0]),(0,GE.default)(E[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?D([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):D(void 0)},style:{borderRadius:8}}),(0,$.jsx)(X,{type:`primary`,onClick:I,style:{...q9,borderColor:`transparent`},children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(xie,{}),onClick:L,loading:l,style:q9,children:`拉取消耗`}),(0,$.jsx)(X,{icon:(0,$.jsx)(o8,{}),onClick:()=>f(!0),style:{...q9,background:`#f8f9fc`,border:`1px solid #e2e8f0`,color:`#334155`},children:`自定义表头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(iQ,{dataSource:P,columns:R,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(PW,{current:y,pageSize:x,total:a,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{b(e),C(t),M(e,t)},size:`small`})})]}),(0,$.jsx)(EG,{title:`自定义表头`,open:d,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(h)),n.success(`表头设置已保存`),f(!1)},onCancel:()=>{f(!1),v(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(JU,{placeholder:`搜索指标...`,value:_,allowClear:!0,onChange:e=>v(e.target.value),style:{marginBottom:8}}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,$.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,$.jsx)(pR,{checked:h.length===p.length&&p.length>0,indeterminate:h.length>0&&h.length{e.target.checked?g(p.map(e=>e.name)):g([])},style:{marginBottom:12},children:`全选`}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:p.filter(e=>e.description.toLowerCase().includes(_.toLowerCase())||e.name.toLowerCase().includes(_.toLowerCase())).map(e=>(0,$.jsx)(pR,{checked:h.includes(e.name),onChange:t=>{t.target.checked?g(t=>[...t,e.name]):g(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,h.length,`)`]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(X,{size:`small`,onClick:async()=>{try{let e=((await V5()).data||[]).map(e=>({name:J9(e.field),description:e.description}));m(e),g(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),n.success(`表头字段已更新`)}catch{n.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:h.length===0?(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,$.jsx)(`div`,{children:h.map((e,t)=>{let n=p.find(t=>t.name===e);return(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...h],[t]=e.splice(n,1);e.splice(r,0,t),g(e)}},children:[(0,$.jsx)(Q.Text,{children:n?.description||e}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},Nle=()=>{let e=Ye(),[t]=On(),{message:n}=ex.useApp(),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{let r=t.get(`auth_code`),a=t.get(`state`);if(!r||!a){o(!1),i(10);return}let s={auth_code:r,state:a,app_id:t.get(`app_id`)||void 0,material_auth_status:t.get(`material_auth_status`)||void 0,scope:t.get(`scope`)||void 0,uid:t.get(`uid`)||void 0};(async()=>{try{let t=await Wae(s);c(!0),o(!1),n.success(t?.message||`授权成功`),setTimeout(()=>{e(`/authorization`)},1500)}catch(e){let t=e?.message||`授权失败`;u(t),o(!1),n.error(t)}})();let l=setInterval(()=>{i(e=>e>=11?(o(!1),e):e+1)},1e3);return()=>{clearInterval(l)}},[e,t,n]);let d=()=>{i(0),o(!0),c(!1),u(``),window.location.href=`/authorization`};return s?(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`#dcfce7`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:(0,$.jsx)(Q.Text,{style:{fontSize:40,color:`#22c55e`},children:`✓`})}),(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权成功`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`正在跳转至授权管理页面...`})]})}):(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:a&&r<10?(0,$.jsx)(tG,{size:`large`,description:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(bB,{style:{fontSize:40,color:`#fff`}})}),l?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权失败`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:l}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(IK,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):r>=10?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权无响应`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`请重新授权`}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)(IK,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权中,请等待`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`正在等待平台完成授权操作`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8},children:[(0,$.jsx)(bB,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},Ple=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fed7aa 100%)`,border:`1px solid rgba(245, 158, 11, 0.18)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(245, 158, 11, 0.3)`},children:(0,$.jsx)(c2,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700,backgroundImage:`linear-gradient(90deg, #f59e0b 0%, #d97706 30%, #ea580c 50%, #d97706 70%, #f59e0b 100%)`},children:`行业爆款大盘`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#b45309`},children:[(0,$.jsx)(W6,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`实时追踪全网热门素材趋势`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#78716c`,fontSize:14,lineHeight:1.7},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsx)(`div`,{style:{position:`relative`},children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(O8,{style:{marginRight:8,color:`#6366f1`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`爆款素材榜单`}),(0,$.jsx)(`span`,{style:{marginLeft:10,fontSize:12,fontWeight:400,color:`#94a3b8`}})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,zIndex:1,inset:0,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:2,color:`#fff`,borderRadius:6},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(k3,{style:{marginRight:6}}),`立即解锁全部`,(0,$.jsx)(G0,{style:{marginLeft:4,fontSize:12}})]})}),[{rank:1,title:`夏日美妆教程:3 步打造奶油肌`,author:`美妆博主·小雅`,views:`128.4w`,likes:`12.6w`,comments:`8,234`,tag:`NO.1`,tagColor:`#f59e0b`},{rank:2,title:`平价穿搭 | 学生党一周不重样`,author:`穿搭达人·Miki`,views:`96.2w`,likes:`9.8w`,comments:`6,128`,tag:`NO.2`,tagColor:`#a78bfa`},{rank:3,title:`探店 vlog | 网红咖啡馆测评`,author:`美食探店·阿伦`,views:`78.5w`,likes:`7.4w`,comments:`4,892`,tag:`NO.3`,tagColor:`#6366f1`},{rank:4,title:`iPhone 16 Pro 一周深度体验`,author:`数码评测·老王`,views:`65.7w`,likes:`6.1w`,comments:`3,847`,tag:`NO.4`,tagColor:`#94a3b8`}].map(e=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{display:`flex`,gap:14,padding:14,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:140,height:80,flexShrink:0,borderRadius:10,overflow:`hidden`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(M6,{style:{fontSize:28,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:600},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:4,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:e.author}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,fontSize:12,color:`#64748b`},children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(EU,{style:{marginRight:3}}),e.views]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(C3,{style:{marginRight:3}}),e.likes]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)($2,{style:{marginRight:3}}),e.comments]})]})]})]},e.rank))]})]})})]}),Fle=()=>{let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(``),[i,a]=(0,S.useState)(`image`),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(`all`),u=(e,n)=>{r(e),a(n),t(!0)},d=(e,t)=>{let n=document.createElement(`a`);n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},f=[{value:`all`,label:`全部行业`},{value:`fashion`,label:`时尚穿搭`},{value:`food`,label:`美食探店`},{value:`travel`,label:`旅行风景`},{value:`tech`,label:`数码科技`},{value:`beauty`,label:`美妆护肤`},{value:`home`,label:`家居生活`},{value:`母婴`,label:`母婴亲子`}],p=[{id:1,type:`image`,url:`https://images.unsplash.com/photo-1522337360788-8b13dee7a37e?w=400&q=80`,title:`时尚街拍`,tag:`热门`,industry:`fashion`,aspectRatio:1.3},{id:2,type:`video`,url:`https://www.w3schools.com/html/mov_bbb.mp4`,poster:`https://images.unsplash.com/photo-1492691527719-9d1e07e534b4?w=400&q=80`,title:`自然风景`,tag:`推荐`,industry:`travel`,aspectRatio:1.5},{id:3,type:`image`,url:`https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=400&q=80`,title:`湖光山色`,tag:`热门`,industry:`travel`,aspectRatio:.75},{id:4,type:`image`,url:`https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400&q=80`,title:`山脉风光`,tag:`新品`,industry:`travel`,aspectRatio:1.4},{id:5,type:`video`,url:`https://www.w3schools.com/html/movie.mp4`,poster:`https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=400&q=80`,title:`森林探索`,tag:`推荐`,industry:`travel`,aspectRatio:.67},{id:6,type:`image`,url:`https://images.unsplash.com/photo-1470770841072-f978cf4d019e?w=400&q=80`,title:`山间湖泊`,tag:`热门`,industry:`travel`,aspectRatio:1.7},{id:7,type:`image`,url:`https://images.unsplash.com/photo-1501785888041-af3ef285b470?w=400&q=80`,title:`海岸风光`,tag:`推荐`,industry:`travel`,aspectRatio:.8},{id:8,type:`video`,url:`https://www.w3schools.com/html/mov_bbb.mp4`,poster:`https://images.unsplash.com/photo-1472214103451-9374bd1c798e?w=400&q=80`,title:`城市夜景`,tag:`新品`,industry:`travel`,aspectRatio:1.33},{id:9,type:`image`,url:`https://images.unsplash.com/photo-1447752875215-b2761acb3c5d?w=400&q=80`,title:`森林小径`,tag:`热门`,industry:`travel`,aspectRatio:1.5},{id:10,type:`image`,url:`https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=400&q=80`,title:`美食摆盘`,tag:`热门`,industry:`food`,aspectRatio:1.2},{id:11,type:`image`,url:`https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?w=400&q=80`,title:`时尚穿搭`,tag:`推荐`,industry:`fashion`,aspectRatio:1},{id:12,type:`video`,url:`https://www.w3schools.com/html/mov_bbb.mp4`,poster:`https://images.unsplash.com/photo-1498050108023-c5249f4df085?w=400&q=80`,title:`数码产品`,tag:`新品`,industry:`tech`,aspectRatio:1.4}],m=(0,S.useMemo)(()=>p.filter(e=>{let t=o?e.title.toLowerCase().includes(o.toLowerCase()):!0,n=c===`all`?!0:e.industry===c;return t&&n}),[o,c]),h=e=>{u((e.type,e.url),e.type)};return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fce7f3 100%)`,border:`1px solid rgba(139, 92, 246, 0.12)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(139, 92, 246, 0.3)`},children:(0,$.jsx)(X4,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700},children:`创意素材案例`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#7c3aed`},children:[(0,$.jsx)(c4,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`探索 AI 创作无限可能`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:14,lineHeight:1.7},children:`精选 AI 生成的优秀素材案例,展示 AI 创作的无限潜力与创意灵感`})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(v8,{style:{marginRight:8,color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`精选案例展示`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(zC,{value:c,onChange:e=>l(e),style:{width:140},options:f}),(0,$.jsx)(JU.Search,{placeholder:`搜索行业案例`,allowClear:!0,enterButton:(0,$.jsx)(PC,{}),size:`middle`,value:o,onChange:e=>s(e.target.value),onSearch:e=>s(e),style:{width:240}})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16,color:`#64748b`,fontSize:13},children:[`共找到 `,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontWeight:600},children:m.length}),` 个案例`]}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{columnCount:5,columnGap:12,marginBottom:16},children:m.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>h(e),style:{breakInside:`avoid`,marginBottom:12,borderRadius:10,overflow:`hidden`,cursor:`pointer`,position:`relative`,boxShadow:`0 4px 12px rgba(0, 0, 0, 0.08)`,transition:`transform 0.3s ease, box-shadow 0.3s ease`,animation:`fadeInUp 0.5s ease ${t*.1}s both`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-4px)`,e.currentTarget.style.boxShadow=`0 8px 24px rgba(0, 0, 0, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(0, 0, 0, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:`100%`,paddingBottom:`${1/e.aspectRatio*100}%`,backgroundColor:`#f3f4f6`},children:[e.type===`image`?(0,$.jsx)(`img`,{src:e.url,alt:e.title,style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,objectFit:`cover`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:e.poster,alt:e.title,style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,objectFit:`cover`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:48,height:48,borderRadius:`50%`,background:`rgba(0, 0, 0, 0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(M6,{style:{fontSize:32,color:`#fff`}})})]}),(0,$.jsxs)(`div`,{style:{position:`absolute`,top:12,left:12,padding:`4px 8px`,borderRadius:6,background:`rgba(0, 0, 0, 0.6)`,backdropFilter:`blur(4px)`,display:`flex`,alignItems:`center`,gap:4},children:[e.type===`image`?(0,$.jsx)(C6,{style:{fontSize:12,color:`#fff`}}):(0,$.jsx)(L8,{style:{fontSize:12,color:`#fff`}}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#fff`,fontWeight:500},children:e.type===`image`?`图片`:`视频`})]})]}),(0,$.jsx)(`div`,{style:{padding:12,background:`#fff`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:500,color:`#1f2937`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,flex:1,marginRight:8},children:e.title}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#fff`,padding:`2px 8px`,borderRadius:4,background:e.tag===`热门`?`#ef4444`:e.tag===`推荐`?`#6366f1`:`#f59e0b`,whiteSpace:`nowrap`},children:e.tag})]})})]},e.id))}),m.length===0&&(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 20px`,color:`#94a3b8`},children:[(0,$.jsx)(PC,{style:{fontSize:48,marginBottom:16,opacity:.5}}),(0,$.jsx)(`div`,{style:{fontSize:15},children:`暂无符合条件的案例`}),(0,$.jsx)(`div`,{style:{fontSize:13,marginTop:8},children:`请尝试调整搜索关键词或行业筛选`}),(0,$.jsx)(X,{style:{marginTop:16,borderRadius:8},onClick:()=>{s(``),l(`all`)},children:`重置筛选`})]})]}),(0,$.jsx)(EG,{open:e,onCancel:()=>t(!1),footer:[(0,$.jsx)(X,{icon:(0,$.jsx)(F1,{}),onClick:()=>d(n,i===`image`?`image.jpg`:`video.mp4`),type:`primary`,style:{borderRadius:8},children:`下载`},`download`)],width:800,centered:!0,styles:{body:{padding:0}},children:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:400,borderRadius:8,overflow:`hidden`},children:i===`image`?(0,$.jsx)(`img`,{src:n,alt:`预览`,style:{maxWidth:`100%`,maxHeight:`60vh`,objectFit:`contain`}}):(0,$.jsx)(`video`,{src:n,controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`60vh`,objectFit:`contain`}})})})]})},{RangePicker:Ile}=DB,Y9=e=>e?new Date(e).toLocaleString(`zh-CN`,{hour12:!1}):`-`,Lle=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)([]),[i,a]=(0,S.useState)(),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(1),[f,p]=(0,S.useState)([]),[m,h]=(0,S.useState)([]),[g,_]=(0,S.useState)([]),[v,y]=(0,S.useState)([]),[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)({items:[],total:0}),[T,E]=(0,S.useState)(1),[D,O]=(0,S.useState)(),[k,A]=(0,S.useState)(``),[j,M]=(0,S.useState)(),[N,P]=(0,S.useState)([null,null]),[F,I]=(0,S.useState)(!1),[L,R]=(0,S.useState)({open:!1}),[z]=pH.useForm(),[B,V]=(0,S.useState)(!1),[H]=pH.useForm(),U=!!e?.isReadOnly,ee=!!e,W=(0,S.useCallback)(async()=>{I(!0);try{let e=await Voe().catch(()=>[]);r(e||[]);let n=await Boe().catch(()=>null);t(n);let i=n?.id||e?.[0]?.id;if(a(e=>e||i),n){let[e,t,n,r,i,a]=await Promise.all([Hoe(u,20),Woe(),Joe(),Yoe(),Xoe(),$oe()]);s(e?.items||[]),l(Number(e?.total||0)),p(t||[]),h(n||[]),_(r||[]),y(i||[]),x(a||[])}else s([]),p([]),h([]),_([]),y([]),x([])}finally{I(!1)}},[u]),te=(0,S.useCallback)(async()=>{if(!i){w({items:[],total:0});return}try{w(await rse({teamId:i,page:T,pageSize:20,phone:k||void 0,subscriptionId:j,recordType:D,startDate:N[0]?.format?.(`YYYY-MM-DD`),endDate:N[1]?.format?.(`YYYY-MM-DD`)})||{items:[],total:0})}catch(e){Z.error(e?.message||`团队流水加载失败`)}},[i,T,k,j,D,N]);(0,S.useEffect)(()=>{W()},[W]),(0,S.useEffect)(()=>{te()},[te]);let G=e=>{z.resetFields();let t=f.find(t=>t.subscription?.id===e),n=Math.max(1,Number(t?.seatLimit||1)-Number(t?.activeSeatCount||0)),r=Number(t?.periodUnallocatedCredits||0)>0?Math.floor(Number(t?.periodUnallocatedCredits||0)/n*100)/100:void 0;z.setFieldsValue({monthlyAllocatedCredits:r}),R({open:!0,subscriptionId:e})},ne=e=>{z.setFieldsValue({userId:e.userId,monthlyAllocatedCredits:e.monthlyAllocatedCredits}),R({open:!0,subscriptionId:e.subscriptionId,seat:e})},K=async()=>{try{let e=await z.validateFields();L.seat?await Koe(L.seat.id,Number(e.monthlyAllocatedCredits)):await Goe(String(L.subscriptionId),String(e.userId),Number(e.monthlyAllocatedCredits)),Z.success(L.seat?`席位额度已更新`:`席位已创建`),R({open:!1}),await W()}catch(e){e?.errorFields||Z.error(e?.message||`席位保存失败`)}},re=async e=>{try{await qoe(e),Z.success(`席位已取消,未使用额度已释放`),await W()}catch(e){Z.error(e?.message||`席位取消失败`)}},ie=[{title:`成员`,dataIndex:`username`,render:(t,n)=>(0,$.jsxs)(yV,{children:[(0,$.jsx)(`span`,{children:t}),n.id===e?.managerId&&(0,$.jsx)(_Q,{color:`purple`,children:`队长`})]})},{title:`手机号`,dataIndex:`phone`,render:e=>e||`-`},{title:`个人积分`,dataIndex:`personalCredits`,align:`right`,render:e=>Number(e||0).toLocaleString()},{title:`团队可用`,dataIndex:`teamAvailableCredits`,align:`right`,render:e=>Number(e||0).toLocaleString()},{title:`团队冻结`,dataIndex:`teamFrozenCredits`,align:`right`,render:e=>Number(e||0).toLocaleString()},{title:`操作`,width:110,render:(t,n)=>n.id===e?.managerId?`-`:(0,$.jsx)(AG,{title:`确认将该成员设为新队长?`,description:`仅当所有团队订阅均已结束且没有未完成团队订单时可操作。`,onConfirm:async()=>{try{await Uoe(n.id),Z.success(`团队队长已更换`),await W()}catch(e){Z.error(e?.message||`更换队长失败`)}},children:(0,$.jsx)(X,{type:`link`,disabled:U,icon:(0,$.jsx)(Rie,{}),children:`设为队长`})})}],ae=e=>[{title:`成员`,dataIndex:`username`,render:e=>e||`-`},{title:`月分配额度`,dataIndex:`monthlyAllocatedCredits`,align:`right`},{title:`本期净消耗`,dataIndex:`currentPeriodUsedCredits`,align:`right`},{title:`本期剩余额度`,dataIndex:`currentPeriodRemainingCredits`,align:`right`},{title:`状态`,dataIndex:`statusLabel`,render:e=>(0,$.jsx)(_Q,{children:e||`其他状态`})},{title:`操作`,width:140,render:(e,t)=>t.status===`active`?(0,$.jsxs)(yV,{children:[(0,$.jsx)(X,{size:`small`,onClick:()=>ne(t),disabled:U,children:`改额度`}),(0,$.jsx)(AG,{title:`确认取消席位?`,onConfirm:()=>re(t.id),children:(0,$.jsx)(X,{size:`small`,danger:!0,disabled:U,children:`取消`})})]}):`-`}],q=f.length===0?(0,$.jsx)(lC,{description:`暂无团队订阅`}):(0,$.jsx)(yV,{direction:`vertical`,size:16,style:{width:`100%`},children:f.map(e=>{let t=e.subscription||{};return(0,$.jsxs)(_L,{title:(0,$.jsxs)(yV,{children:[(0,$.jsx)(z8,{}),(0,$.jsx)(`span`,{children:t.productNameSnapshot||`团队订阅套餐`}),(0,$.jsx)(_Q,{children:t.billingCycleLabel||`订阅周期`}),(0,$.jsx)(_Q,{color:t.status===`active`?`green`:`default`,children:t.statusLabel||`其他状态`})]}),extra:(0,$.jsx)(X,{icon:(0,$.jsx)(BI,{}),disabled:U||t.status!==`active`||e.activeSeatCount>=e.seatLimit,onClick:()=>G(t.id),children:`分配席位`}),children:[(0,$.jsxs)(sq,{gutter:[12,12],style:{marginBottom:12},children:[(0,$.jsxs)(bR,{span:6,children:[`席位:`,(0,$.jsxs)(`b`,{children:[e.activeSeatCount,`/`,e.seatLimit]})]}),(0,$.jsxs)(bR,{span:6,children:[`本期总积分:`,(0,$.jsx)(`b`,{children:Number(e.periodTotalCredits||0).toLocaleString()})]}),(0,$.jsxs)(bR,{span:6,children:[`本期剩余资金:`,(0,$.jsx)(`b`,{children:Number(e.periodUnspentCredits||0).toLocaleString()})]}),(0,$.jsxs)(bR,{span:6,children:[`未分配积分:`,(0,$.jsx)(`b`,{children:Number(e.periodUnallocatedCredits||0).toLocaleString()})]}),(0,$.jsxs)(bR,{span:12,children:[`订阅实例:`,(0,$.jsx)(Q.Text,{copyable:t.subscriptionNo?{text:t.subscriptionNo}:!1,children:t.subscriptionNo||`-`})]}),(0,$.jsxs)(bR,{span:12,children:[`订阅到期:`,Y9(t.expiresAt)]}),(0,$.jsxs)(bR,{span:24,children:[`本期:`,Y9(e.currentPeriodStartAt),` ~ `,Y9(e.currentPeriodExpiresAt)]})]}),(0,$.jsx)(iQ,{rowKey:`id`,size:`small`,pagination:!1,columns:ae(e),dataSource:e.seats||[],scroll:{x:850}})]},t.id)})}),oe=[{title:`邀请码`,dataIndex:`code`,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,children:e})},{title:`状态`,dataIndex:`status`,render:e=>(0,$.jsx)(_Q,{children:e===`active`?`有效`:`已撤销`})},{title:`使用次数`,render:(e,t)=>`${t.useCount||0}${t.maxUses?` / ${t.maxUses}`:``}`},{title:`过期时间`,dataIndex:`expiresAt`,render:e=>e?Y9(e):`长期有效`},{title:`操作`,render:(e,t)=>t.status===`active`?(0,$.jsx)(X,{type:`link`,danger:!0,disabled:U,onClick:async()=>{try{await Qoe(t.id),await W(),Z.success(`邀请码已撤销`)}catch(e){Z.error(e?.message||`撤销失败`)}},children:`撤销`}):`-`}],se=[{title:`申请人`,dataIndex:`username`},{title:`手机号`,dataIndex:`phone`,render:e=>e||`-`},{title:`状态`,dataIndex:`status`,render:e=>(0,$.jsx)(_Q,{children:{pending:`待审批`,approved:`已通过`,rejected:`已拒绝`}[e]||`其他状态`})},{title:`申请时间`,dataIndex:`createdAt`,render:e=>Y9(e)},{title:`操作`,render:(e,t)=>t.status===`pending`?(0,$.jsxs)(yV,{children:[(0,$.jsx)(X,{size:`small`,type:`primary`,disabled:U,onClick:async()=>{try{await Q5(t.id,`approve`),await W(),Z.success(`已通过申请`)}catch(e){Z.error(e?.message||`操作失败`)}},children:`通过`}),(0,$.jsx)(X,{size:`small`,danger:!0,disabled:U,onClick:async()=>{try{await Q5(t.id,`reject`),await W(),Z.success(`已拒绝申请`)}catch(e){Z.error(e?.message||`操作失败`)}},children:`拒绝`})]}):`-`}],ce=[{title:`成员`,dataIndex:`username`,width:120},{title:`类型`,dataIndex:`recordTypeLabel`,width:110,render:e=>(0,$.jsx)(_Q,{children:e||`其他`})},{title:`团队积分变动`,dataIndex:`teamAmount`,width:130,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{color:Number(e)<0?`#ef4444`:`#10b981`},children:[Number(e)>0?`+`:``,Number(e||0)]})},{title:`说明`,dataIndex:`description`,ellipsis:!0},{title:`订阅实例`,dataIndex:`subscriptionNo`,width:190,render:e=>(0,$.jsx)(Q.Text,{copyable:e&&e!==`历史订阅`?{text:e}:!1,children:e||`历史订阅`})},{title:`周期ID`,dataIndex:`subscriptionPeriodId`,width:180,ellipsis:!0},{title:`席位ID`,dataIndex:`seatId`,width:180,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:180,render:e=>Y9(e)}],le=ee?[{key:`subscriptions`,label:`订阅与席位`,children:q},{key:`members`,label:`团队成员`,children:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(iQ,{rowKey:`id`,columns:ie,dataSource:o,pagination:!1,scroll:{x:850}}),(0,$.jsx)(PW,{style:{marginTop:12,textAlign:`right`},current:u,pageSize:20,total:c,onChange:d})]})},{key:`usage`,label:`成员月消耗`,children:m.length?(0,$.jsx)(iQ,{rowKey:e=>`${e.userId}-${e.subscriptionPeriodId}`,pagination:!1,dataSource:m,scroll:{x:1400},columns:[{title:`成员`,dataIndex:`username`,width:120},{title:`订阅实例`,dataIndex:`subscriptionNo`,width:190,render:e=>(0,$.jsx)(Q.Text,{copyable:e&&e!==`历史订阅`?{text:e}:!1,children:e||`历史订阅`})},{title:`套餐名称`,dataIndex:`subscriptionName`,width:180,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e||`历史团队订阅`})},{title:`等级编码`,width:190,render:(e,t)=>(0,$.jsxs)(`span`,{children:[t.tierLabel||`未知等级`,t.tierCode?`(${t.tierCode})`:``,t.tierRank?` / ${t.tierRank}`:``]})},{title:`套餐周期`,dataIndex:`billingCycleLabel`,width:110,render:e=>(0,$.jsx)(_Q,{children:e||`未知周期`})},{title:`月度周期`,dataIndex:`periodLabel`,width:110,render:(e,t)=>e||(t.periodSequence>0?`第${t.periodSequence}个月`:`历史周期`)},{title:`周期时间`,width:320,render:(e,t)=>`${Y9(t.periodStartAt)} ~ ${Y9(t.periodExpiresAt)}`},{title:`本期净消耗`,dataIndex:`consumedCredits`,width:130,align:`right`,render:e=>Number(e||0).toLocaleString()}]}):(0,$.jsx)(lC,{description:`暂无团队积分消耗`})},{key:`invite`,label:`邀请与审批`,children:(0,$.jsxs)(yV,{direction:`vertical`,style:{width:`100%`},size:18,children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(BI,{}),disabled:U,onClick:()=>V(!0),children:`创建邀请码`}),(0,$.jsx)(iQ,{rowKey:`id`,size:`small`,pagination:!1,columns:oe,dataSource:v}),(0,$.jsx)(Q.Title,{level:5,children:`加入申请`}),(0,$.jsx)(iQ,{rowKey:`id`,size:`small`,pagination:!1,columns:se,dataSource:b})]})},{key:`history`,label:`队长任期`,children:g.length?(0,$.jsx)(iQ,{rowKey:`id`,pagination:!1,dataSource:g,columns:[{title:`队长`,dataIndex:`managerName`},{title:`任期开始`,dataIndex:`startedAt`,render:e=>Y9(e)},{title:`任期结束`,dataIndex:`endedAt`,render:e=>e?Y9(e):(0,$.jsx)(_Q,{color:`green`,children:`当前任期`})}]}):(0,$.jsx)(lC,{description:`暂无任期记录`})}]:[],ue={key:`flow`,label:`团队积分流水`,children:(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(yV,{wrap:!0,style:{marginBottom:12},children:[(0,$.jsx)(zC,{style:{width:220},value:i,onChange:e=>{a(e),E(1)},options:n.map(e=>({value:e.id,label:`${e.name}${e.isCurrentManager?`(当前队长)`:`(历史任期)`}`}))}),(0,$.jsx)(JU,{allowClear:!0,placeholder:`成员手机号`,style:{width:150},value:k,onChange:e=>A(e.target.value)}),(0,$.jsx)(zC,{allowClear:!0,placeholder:`流水类型`,style:{width:130},value:D,onChange:e=>{O(e),E(1)},options:[{value:`recharge`,label:`发放/充值`},{value:`consume`,label:`消费`},{value:`refund`,label:`业务退款`},{value:`expire`,label:`积分过期`},{value:`revoke`,label:`积分撤销`}]}),ee&&(0,$.jsx)(zC,{allowClear:!0,placeholder:`团队订阅`,style:{width:220},value:j,onChange:e=>{M(e),E(1)},options:f.map(e=>({value:e.subscription.id,label:`${e.subscription.subscriptionNo||`未编号`} · ${e.subscription.productNameSnapshot||`团队订阅套餐`}`}))}),(0,$.jsx)(Ile,{value:N,onChange:e=>{P(e||[null,null]),E(1)}}),(0,$.jsx)(X,{icon:(0,$.jsx)(IK,{}),onClick:te,children:`刷新`}),(0,$.jsx)(X,{icon:(0,$.jsx)(F1,{}),onClick:()=>{let e=ise({teamId:i,phone:k||void 0,subscriptionId:j,recordType:D,startDate:N[0]?.format?.(`YYYY-MM-DD`),endDate:N[1]?.format?.(`YYYY-MM-DD`)});window.open(e,`_blank`)},children:`导出`})]}),(0,$.jsx)(iQ,{rowKey:`id`,columns:ce,dataSource:C.items||[],pagination:!1,scroll:{x:1200}}),(0,$.jsx)(PW,{style:{marginTop:12,textAlign:`right`},current:T,pageSize:20,total:Number(C.total||0),onChange:E})]})};return!e&&n.length===0&&!F?(0,$.jsx)(lC,{description:`您当前不是团队队长,也没有可查看的历史队长任期`}):(0,$.jsxs)(`div`,{children:[e&&(0,$.jsx)(_L,{loading:F,style:{marginBottom:16},children:(0,$.jsxs)(sq,{align:`middle`,justify:`space-between`,children:[(0,$.jsxs)(bR,{children:[(0,$.jsxs)(yV,{children:[(0,$.jsx)(S8,{}),(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:e.name}),(0,$.jsx)(_Q,{color:e.status===`active`?`green`:`red`,children:e.statusLabel||(e.status===`active`?`启用`:`禁用`)})]}),(0,$.jsxs)(`div`,{style:{color:`#64748b`,marginTop:8},children:[`成员 `,e.memberCount,` 人 · 当前队长 `,e.managerName||`-`]})]}),(0,$.jsx)(bR,{children:U&&(0,$.jsx)(_Q,{icon:(0,$.jsx)(k3,{}),color:`red`,children:`团队已禁用,仅允许只读查看`})})]})}),U&&(0,$.jsx)(Jf,{type:`warning`,showIcon:!0,message:`团队业务已冻结`,description:`团队订阅仍会正常发放积分、自然滚期和过期;当前团队积分显示为冻结且不会参与结算。团队重新启用后,仅恢复届时仍有效的团队积分。`,style:{marginBottom:16}}),!ee&&(0,$.jsx)(Jf,{type:`info`,showIcon:!0,message:`历史队长只读权限`,description:`您可以查看自己担任队长任期内的整个团队积分流水,但没有当前团队管理权限。`,style:{marginBottom:16}}),(0,$.jsx)(hL,{items:[...le,ue]}),(0,$.jsx)(EG,{open:L.open,title:L.seat?`修改席位月额度`:`分配团队订阅席位`,onCancel:()=>R({open:!1}),onOk:K,okText:`确认保存`,cancelText:`取消`,children:(0,$.jsxs)(pH,{form:z,layout:`vertical`,children:[!L.seat&&(0,$.jsx)(pH.Item,{name:`userId`,label:`团队成员`,rules:[{required:!0,message:`请选择团队成员`}],children:(0,$.jsx)(zC,{showSearch:!0,optionFilterProp:`label`,options:o.map(t=>({value:t.id,label:`${t.username}${t.id===e?.managerId?`(队长)`:``}`}))})}),(0,$.jsx)(pH.Item,{name:`monthlyAllocatedCredits`,label:`每周期可消费团队积分`,rules:[{required:!0,message:`请输入席位额度`}],extra:`额度必须大于0;修改低于已用额度时,本期剩余额度按0处理,不追回已完成消费。`,children:(0,$.jsx)(sz,{min:.01,precision:2,style:{width:`100%`}})})]})}),(0,$.jsx)(EG,{open:B,title:`创建团队邀请码`,onCancel:()=>V(!1),onOk:async()=>{try{let e=await H.validateFields(),t=await Zoe(e.maxUses,e.expiresAt?.toISOString());V(!1),H.resetFields(),await W(),EG.success({title:`邀请码已创建`,content:(0,$.jsx)(Q.Text,{copyable:!0,children:t.code})})}catch(e){e?.errorFields||Z.error(e?.message||`创建邀请码失败`)}},okText:`创建`,cancelText:`取消`,children:(0,$.jsxs)(pH,{form:H,layout:`vertical`,children:[(0,$.jsx)(pH.Item,{name:`maxUses`,label:`最大使用次数`,children:(0,$.jsx)(sz,{min:1,precision:0,style:{width:`100%`},placeholder:`留空表示不限制`})}),(0,$.jsx)(pH.Item,{name:`expiresAt`,label:`过期时间`,children:(0,$.jsx)(DB,{showTime:!0,style:{width:`100%`},disabledDate:e=>e&&e.isBefore((0,GE.default)().startOf(`day`))})})]})})]})},Rle=()=>{let[e]=On(),t=Ye(),n=e.get(`code`)||``,{user:r,loading:i,checkAuth:a}=$5(),[o,s]=(0,S.useState)(!0),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(!1),[g,_]=(0,S.useState)(`VideoGen.AI`),[v,y]=(0,S.useState)(``);return(0,S.useEffect)(()=>{a(),f5().then(e=>{_(e.siteName),y(e.siteLogo)}).catch(()=>{})},[a]),(0,S.useEffect)(()=>{if(!n){s(!1);return}i||(s(!0),(r?ese(n):tse(n)).then(e=>{l(e),e?.valid&&r&&!e.alreadyInTeam&&!e.hasPendingRequest&&h(!0)}).catch(()=>l(null)).finally(()=>s(!1)))},[n,r,i]),i||o?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:`60vh`},children:(0,$.jsx)(tG,{size:`large`})}):f?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(oq,{status:`success`,icon:(0,$.jsx)(M2,{style:{color:`#6366f1`}}),title:`申请已提交`,subTitle:`您的加入申请已提交,请等待团队管理人审批。审批通过后将自动加入团队。`,extra:(0,$.jsx)(yV,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):!n||!c?.valid?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(oq,{status:`error`,title:`邀请链接无效`,subTitle:`该邀请链接可能已过期或不存在,请联系团队管理人重新获取。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):c.alreadyInTeam?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(oq,{status:`info`,title:`您已在此团队中`,subTitle:`您已经是「${c.teamName}」的成员了,无需再次加入。`,extra:(0,$.jsx)(yV,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):c.hasPendingRequest?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(oq,{status:`info`,title:`申请待审批`,subTitle:`您已提交加入「${c.teamName}」的申请,请等待团队管理人审批。`,extra:(0,$.jsx)(yV,{children:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`40px 20px`},children:(0,$.jsxs)(`div`,{style:{width:`100%`,maxWidth:480},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,marginBottom:32},children:[v?(0,$.jsx)(`img`,{src:v,alt:`logo`,style:{width:40,height:40,borderRadius:10}}):(0,$.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(w8,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`span`,{style:{fontSize:22,fontWeight:700,color:`#1e293b`,letterSpacing:.5},children:g})]}),(0,$.jsxs)(_L,{variant:`outlined`,style:{borderRadius:16,width:`100%`,textAlign:`center`},children:[(0,$.jsx)(S8,{style:{fontSize:48,color:`#6366f1`,marginBottom:16}}),(0,$.jsx)(Q.Title,{level:3,children:`加入团队`}),(0,$.jsx)(Q.Text,{style:{fontSize:16,color:`#475569`,display:`block`,marginBottom:8},children:`您被邀请加入团队`}),(0,$.jsxs)(Q.Title,{level:4,style:{color:`#6366f1`,margin:`16px 0 24px`},children:[`「`,c.teamName,`」`]}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{display:`block`,marginBottom:24},children:`加入后团队管理人可以为您分配积分、查看您的积分使用情况。`}),r?(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,loading:u,onClick:()=>h(!0),children:`申请加入`}):(0,$.jsxs)(yV,{direction:`vertical`,style:{width:`100%`},size:12,children:[(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,icon:(0,$.jsx)(M3,{}),onClick:()=>{t(`/login?redirect=${encodeURIComponent(window.location.pathname+window.location.search)}`)},children:`登录后申请加入`}),(0,$.jsx)(X,{size:`large`,block:!0,icon:(0,$.jsx)(Fie,{}),onClick:()=>{t(`/login?tab=register&redirect=${encodeURIComponent(window.location.pathname+window.location.search)}`)},children:`注册新账号`}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:`登录或注册后将自动提交加入申请`})]})]})]})}),(0,$.jsxs)(EG,{title:(0,$.jsxs)(yV,{children:[(0,$.jsx)(S8,{style:{color:`#6366f1`}}),`确认加入团队`]}),open:m,onOk:async()=>{if(n)try{d(!0),await nse(n),p(!0),h(!1),Z.success(`申请已提交`)}catch(e){Z.error(e?.message||`申请失败`)}finally{d(!1)}},onCancel:()=>h(!1),okText:`确认加入`,cancelText:`取消`,confirmLoading:u,width:420,children:[(0,$.jsxs)(`p`,{style:{marginBottom:0},children:[`您确定要加入团队 `,(0,$.jsxs)(`strong`,{style:{color:`#6366f1`},children:[`「`,c.teamName,`」`]}),` 吗?`]}),(0,$.jsx)(`p`,{style:{marginTop:8,color:`#64748b`,fontSize:13},children:`提交后需等待团队管理人审批,审批通过后将自动加入团队。`})]})]})},zle=new Set([`group_active`,`callback_success`]),Ble=()=>{let e=(0,S.useMemo)(()=>new URLSearchParams(window.location.search),[]),t=e.get(`status`)||``,n=e.get(`resultCode`)||``,r=zle.has(t)||n===`10000`;return(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#f8fafc`,padding:20},children:(0,$.jsxs)(_L,{style:{width:`100%`,maxWidth:520,borderRadius:18},children:[(0,$.jsx)(oq,{status:r?`success`:`error`,title:r?`真人认证已完成`:`真人认证未完成`,subTitle:r?`请回到电脑端查看,项目组已创建成功。`:`请回到电脑端重新发起创建项目组。`,extra:[(0,$.jsx)(X,{type:`primary`,onClick:()=>{let e=/MicroMessenger/i.test(navigator.userAgent),t=/AlipayClient/i.test(navigator.userAgent),n=/Android|iPhone|iPad/i.test(navigator.userAgent);if(e)try{window.opener=null,window.open(``,`_self`),window.close()}catch{Z.info(`请点击右上角关闭按钮`)}else if(t)try{window.close()}catch{Z.info(`请点击左上角返回`)}else if(n)try{window.history.back()}catch{window.location.href=`/`}else try{window.close()}catch{window.location.href=`/`}},children:`关闭页面`},`close`)]}),(0,$.jsx)(Q.Paragraph,{type:`secondary`,style:{textAlign:`center`,marginBottom:0,fontSize:13,marginTop:12},children:`如无法自动关闭,请手动关闭页面`})]})})},Vle=()=>{let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(!1),[u]=pH.useForm(),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(new Map),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(!1),[w,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)([]),[O,k]=(0,S.useState)(0),[A,j]=(0,S.useState)(1),[M]=(0,S.useState)(10),[N,P]=(0,S.useState)([null,null]),[F,I]=(0,S.useState)([null,null]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(!1),[V,H]=(0,S.useState)(!1),[U,ee]=(0,S.useState)(null),W=async(e=A)=>{T(!0);try{let t=await y5(e,M,{invoiceMode:!0,startDate:N[0]||void 0,endDate:N[1]||void 0});D((t.items||[]).map(e=>({...e,_occupied:!!e.isOccupied,_occupiedBy:e.occupiedBy}))),k(t.total||0)}catch{D([]),k(0)}T(!1)},[te,G]=(0,S.useState)(1),[ne]=(0,S.useState)(10),[K,re]=(0,S.useState)(0),ie=(0,S.useRef)(!1),ae=async()=>{r(!0);try{let e=await Oae({page:te,pageSize:ne});t((e.items||[]).map(e=>({id:e.id,orderNo:e.invoiceNo,orderType:e.headerType===`company`?`企业`:`个人`,amount:e.totalAmount,createdAt:e.createdAt,status:e.status===`success`?`issued`:e.status===`failed`?`rejected`:`processing`,headerName:e.headerName,headerType:e.headerType,headerTaxNo:e.headerTaxNo,selectedOrders:e.orders||[],email:e.email,failureReason:e.failureReason}))),re(e.total||0)}catch{}r(!1)};(0,S.useEffect)(()=>{ae(),le()},[]),(0,S.useEffect)(()=>{if(!ie.current){ie.current=!0;return}ae()},[te]),(0,S.useEffect)(()=>{d&&(j(1),W(1))},[d]);let q=[{title:`发票编号`,dataIndex:`orderNo`,key:`orderNo`,width:200,render:e=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:13,color:`#64748b`},children:e})},{title:`发票类型`,dataIndex:`orderType`,key:`orderType`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#374151`},children:e})},{title:`总金额`,dataIndex:`amount`,key:`amount`,width:120,align:`right`,render:e=>(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,fontSize:14,color:`#1e293b`},children:[`¥`,e.toFixed(2)]})},{title:`开具时间`,dataIndex:`createdAt`,key:`createdAt`,width:180,render:e=>e?(0,$.jsx)(`span`,{style:{color:`#64748b`},children:new Date(e).toLocaleString(`zh-CN`)}):`-`},{title:`发票状态`,dataIndex:`status`,key:`status`,width:120,render:e=>{let t={pending:{color:`#f59e0b`,label:`待开具`,bg:`rgba(245,158,11,0.1)`},processing:{color:`#0ea5e9`,label:`开具中`,bg:`rgba(14,165,233,0.1)`},issued:{color:`#10b981`,label:`已开具`,bg:`rgba(16,185,129,0.1)`},rejected:{color:`#ef4444`,label:`已驳回`,bg:`rgba(239,68,68,0.1)`}}[e]||{color:`#64748b`,label:e,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(_Q,{color:t.color,style:{background:t.bg,fontWeight:500,padding:`4px 12px`},children:t.label})}},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,$.jsx)(X,{type:`link`,size:`small`,onClick:()=>{ee(t),H(!0)},children:`详情`})}],oe=[{title:`订单号`,key:`orderNo`,width:200,render:(e,t)=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:13,color:`#64748b`},children:t.order_no||t.orderNo||t.id})},{title:`支付方式`,key:`paymentMethod`,width:100,render:(e,t)=>{let n=t.payment_method||t.paymentMethod||`wechat`,r={alipay:{icon:(0,$.jsx)(A0,{style:{fontSize:16}}),label:`支付宝`,color:`#1677ff`},wechat:{icon:(0,$.jsx)(Wie,{style:{fontSize:16}}),label:`微信支付`,color:`#07c160`}},i=r[n]||r.wechat;return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{color:i.color},children:i.icon}),(0,$.jsx)(`span`,{style:{fontSize:13,color:`#374151`},children:i.label})]})}},{title:`金额`,key:`amount`,width:100,align:`right`,render:(e,t)=>{let n=t.amount||t.total_amount||0;return(0,$.jsxs)(Q.Text,{strong:!0,style:{fontWeight:700,fontSize:14,color:`#1e293b`},children:[`¥`,typeof n==`number`?n.toFixed(2):n]})}},{title:`获得积分`,key:`credits`,width:100,align:`center`,render:(e,t)=>{let n=t.credits||t.credit_amount||0;return(0,$.jsx)(Q.Text,{strong:!0,style:{fontWeight:600,fontSize:14,color:`#f59e0b`},children:n})}},{title:`状态`,key:`status`,width:120,render:(e,t)=>{if(t._occupied)return(0,$.jsx)(_Q,{color:`orange`,style:{fontWeight:500,padding:`4px 12px`},title:t._occupiedBy?`发票号:${t._occupiedBy}`:void 0,children:`已申请开票`});let n=t.status||`pending`,r={pending:{color:`#f59e0b`,label:`待支付`,bg:`rgba(245,158,11,0.1)`},paid:{color:`#10b981`,label:`已支付`,bg:`rgba(16,185,129,0.1)`},refunded:{color:`#94a3b8`,label:`已退款`,bg:`rgba(148,163,184,0.1)`},failed:{color:`#ef4444`,label:`支付失败`,bg:`rgba(239,68,68,0.1)`},cancelled:{color:`#64748b`,label:`已取消`,bg:`rgba(100,116,139,0.1)`},processing:{color:`#0ea5e9`,label:`处理中`,bg:`rgba(14,165,233,0.1)`}}[n]||{color:`#64748b`,label:n,bg:`rgba(100,116,139,0.1)`};return(0,$.jsx)(_Q,{color:r.color,style:{background:r.bg,fontWeight:500,padding:`4px 12px`},children:r.label})}},{title:`创建时间`,key:`createdAt`,width:180,render:(e,t)=>{let n=t.created_at||t.createdAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}},{title:`支付时间`,key:`paidAt`,width:180,render:(e,t)=>{let n=t.paid_at||t.paidAt;return n?new Date(n).toLocaleString(`zh-CN`):`-`}}],se=[{title:`发票抬头`,dataIndex:`name`,key:`name`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:e})},{title:`发票抬头类型`,dataIndex:`type`,key:`type`,width:140,render:e=>(0,$.jsx)(`span`,{style:{color:`#475569`},children:e===`company`?`企业`:`个人`})},{title:`纳税号`,dataIndex:`taxNo`,key:`taxNo`,width:200,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:e||`-`})},{title:`是否默认`,dataIndex:`isDefault`,key:`isDefault`,width:100,render:e=>e?(0,$.jsx)(_Q,{color:`#f59e0b`,style:{background:`rgba(245,158,11,0.1)`,color:`#d97706`},children:`默认`}):(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`-`})},{title:`操作`,key:`action`,width:120,render:(e,t)=>(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[!t.isDefault&&(0,$.jsx)(X,{type:`link`,size:`small`,onClick:()=>fe(t.id),children:`设为默认`}),(0,$.jsx)(X,{type:`link`,size:`small`,danger:!0,onClick:()=>de(t.id),children:`删除`})]})}],ce=i,le=async()=>{try{a(((await kae()).items||[]).map(e=>({id:e.id,name:e.name,type:e.type,taxNo:e.taxNo,registerAddress:e.registerAddress,bankName:e.bankName,registerPhone:e.registerPhone,bankAccount:e.bankAccount,email:e.email,isDefault:e.isDefault})))}catch{}},ue=async()=>{try{let e=await u.validateFields(),t=e.type===`company`,n=e.isDefault===`yes`||i.length===0&&!i.some(e=>e.isDefault);await Aae({type:e.type,name:e.name,taxNo:t?e.taxNo:void 0,registerAddress:t?e.registerAddress:void 0,bankName:t?e.bankName:void 0,registerPhone:t?e.registerPhone:void 0,bankAccount:t?e.bankAccount:void 0,email:e.email,isDefault:n}),u.resetFields(),l(!1),Z.success(`发票抬头添加成功`),le()}catch(e){if(e?.errorFields)Z.warning(`请完善表单信息`);else{let t=e?.message||e?.response?.data?.detail||`添加失败`;Z.error(t)}}},de=e=>{EG.confirm({title:`删除发票抬头`,content:`确定要删除该发票抬头吗?`,okText:`确定`,cancelText:`取消`,onOk:async()=>{try{await jae(e),Z.success(`删除成功`),le()}catch(e){Z.error(e?.message||`删除失败`)}}})},fe=async e=>{try{await Mae(e),Z.success(`已设为默认`),le()}catch(e){Z.error(e?.message||`设置失败`)}},pe=()=>{if(p.size===0){Z.warning(`请至少选择一个订单`);return}f(!1);let e=ce.find(e=>e.isDefault);v(e?.id||ce[0]?.id||null),b(e?.email||ce[0]?.email||``),g(!0)},me=async()=>{if(!_){Z.warning(`请选择一个发票抬头`);return}let e=ce.find(e=>e.id===_),t=(e?.email||``).trim();if(!t){Z.warning(`该发票抬头未填写邮箱,请先在抬头管理中设置邮箱`);return}let n=Array.from(p.values()).map(e=>e.id||e.orderNo||e.order_no).filter(Boolean);if(n.length===0){Z.warning(`请至少选择一个订单`);return}C(!0);try{await Dae({headerType:e?.type,headerName:e?.name||``,headerTaxNo:e?.taxNo,headerRegisterAddress:e?.registerAddress,headerRegisterPhone:e?.registerPhone,headerBankName:e?.bankName,headerBankAccount:e?.bankAccount,email:t,orderIds:n}),Z.success(`开票申请已提交,请等待审核`),g(!1),m(new Map),v(null),b(``),ae()}catch(e){let t=e?.message||e?.response?.data?.detail||`提交失败,请稍后重试`;Z.error(t)}C(!1)},he={selectedRowKeys:Array.from(p.keys()),onChange:(e,t)=>{let n=new Map(p);E.map(e=>e.order_no||e.orderNo||e.id).forEach(e=>n.delete(e)),e.forEach(e=>{let r=t.find(t=>(t.order_no||t.orderNo||t.id)===e);r&&!r._occupied&&n.set(e,r)}),m(n)},preserveSelectedRowKeys:!0,getCheckboxProps:e=>({name:e.order_no||e.orderNo||e.id,disabled:!!e._occupied})},ge=Array.from(p.values()).reduce((e,t)=>e+(t.amount||t.total_amount||0),0),_e=p.size;return(0,$.jsxs)(`div`,{className:`content_box`,style:{backgroundColor:`#fff`,borderRadius:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(wV,{style:{color:`#6366f1`,fontSize:20}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:20,color:`#1e293b`},children:`申请开票`})]}),(0,$.jsxs)(yV,{children:[(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(BI,{}),onClick:()=>f(!0),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,borderRadius:10,fontWeight:500},children:`开票`}),(0,$.jsx)(X,{icon:(0,$.jsx)(BI,{}),onClick:()=>s(!0),style:{borderColor:`#e2e8f0`,borderRadius:10,fontWeight:500},children:`管理发票抬头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#f8fafc`,borderRadius:12,padding:`16px 20px`,marginBottom:24,border:`1px solid #f1f5f9`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{color:`#475569`,display:`block`,marginBottom:8},children:`特别说明:`}),(0,$.jsxs)(`div`,{style:{color:`#64748b`,fontSize:13,lineHeight:2},children:[(0,$.jsxs)(`div`,{children:[`◎ 为落实中办、国办印发的《关于进一步深化税收征管改革的意见》要求,继续加大全面数字化的电子发票(以下简称数电发票)推广使用力度,我们将提供数电发票开具。详细情况可阅读`,(0,$.jsx)(`a`,{onClick:e=>{e.preventDefault(),B(!0)},style:{color:`#6366f1`,cursor:`pointer`},children:`《全面数字化电子发票说明》`}),`。`]}),(0,$.jsx)(`div`,{children:`◎ 下单1小时后方可申请开票!`}),(0,$.jsxs)(`div`,{children:[`◎ 为提高开票效率,请仔细阅读`,(0,$.jsx)(`a`,{onClick:e=>{e.preventDefault(),R(!0)},style:{color:`#6366f1`,cursor:`pointer`},children:`《开票须知》`}),`。`]})]})]}),(0,$.jsx)(`div`,{style:{borderRadius:16,background:`#fff`,border:`1px solid #f0f0f5`,overflow:`hidden`},children:n?(0,$.jsx)(`div`,{style:{textAlign:`center`,padding:60},children:`加载中...`}):e.length===0?(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无申请开票记录`}),style:{padding:`60px 0`}}):(0,$.jsx)(iQ,{dataSource:e,columns:q,rowKey:`id`,pagination:{current:te,pageSize:ne,total:K,onChange:e=>{G(e)}},bordered:!1})}),(0,$.jsx)(EG,{title:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`发票详情`}),open:V,onCancel:()=>{H(!1),ee(null)},width:720,footer:[(0,$.jsx)(X,{type:`primary`,onClick:()=>{H(!1),ee(null)},children:`关闭`},`close`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:U&&(0,$.jsxs)(`div`,{style:{padding:`24px 28px`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,display:`block`,marginBottom:12},children:`发票信息`}),(0,$.jsx)(`div`,{style:{background:`#f8fafc`,borderRadius:10,padding:`16px 20px`},children:(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`100px 1fr 100px 1fr`,gap:`12px 16px`,fontSize:13},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`发票编号:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontFamily:`monospace`},children:U.orderNo}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`开票时间:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:U.createTime}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`发票金额:`}),(0,$.jsxs)(`span`,{style:{color:`#ef4444`,fontWeight:600},children:[`¥`,U.amount.toFixed(2)]}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`发票状态:`}),(0,$.jsx)(`span`,{children:(0,$.jsx)(_Q,{color:U.status===`pending`?`#f59e0b`:U.status===`processing`?`#0ea5e9`:U.status===`issued`?`#10b981`:`#ef4444`,style:{background:U.status===`pending`?`rgba(245,158,11,0.1)`:U.status===`processing`?`rgba(14,165,233,0.1)`:U.status===`issued`?`rgba(16,185,129,0.1)`:`rgba(239,68,68,0.1)`,color:U.status===`pending`?`#d97706`:U.status===`processing`?`#0284c7`:U.status===`issued`?`#059669`:`#dc2626`,fontWeight:500,padding:`4px 12px`},children:U.status===`pending`?`待开具`:U.status===`processing`?`开具中`:U.status===`issued`?`已开具`:`已驳回`})}),U.email&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`接收邮箱:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:U.email})]}),U.failureReason&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`失败原因:`}),(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:U.failureReason})]})]})})]}),U.headerName&&(0,$.jsxs)(`div`,{style:{marginBottom:20},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,display:`block`,marginBottom:12},children:`发票抬头`}),(0,$.jsx)(`div`,{style:{background:`#f8fafc`,borderRadius:10,padding:`16px 20px`},children:(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`100px 1fr`,gap:`12px 16px`,fontSize:13},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`抬头类型:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:U.headerType===`company`?`企业`:`个人`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`抬头名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`},children:U.headerName}),U.headerTaxNo&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`纳税人识别号:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontFamily:`monospace`},children:U.headerTaxNo})]})]})})]}),U.selectedOrders&&U.selectedOrders.length>0&&(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:15,color:`#1e293b`,display:`block`,marginBottom:12},children:[`订单明细(共 `,U.selectedOrders.length,` 笔)`]}),(0,$.jsx)(iQ,{dataSource:U.selectedOrders,columns:[{title:`订单号`,key:`orderNo`,render:(e,t)=>(0,$.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:12,color:`#64748b`},children:t.order_no||t.orderNo||t.orderNo||t.id})},{title:`金额`,key:`amount`,align:`right`,render:(e,t)=>(0,$.jsxs)(`span`,{style:{fontWeight:600,color:`#1e293b`},children:[`¥`,(t.amount||t.total_amount||0).toFixed(2)]})}],rowKey:e=>e.order_no||e.orderNo||e.id,pagination:!1,bordered:!1,size:`small`})]})]})}),(0,$.jsx)(EG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,paddingRight:30},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`选择订单`}),(0,$.jsxs)(Q.Text,{style:{fontSize:13,color:`#64748b`},children:[`已选 `,_e,` 项,合计 ¥`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontWeight:600},children:ge.toFixed(2)})]})]}),open:d,onCancel:()=>{f(!1),m(new Map)},width:`70%`,footer:[(0,$.jsx)(X,{onClick:()=>{f(!1),m(new Map)},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:pe,children:`确定`},`confirm`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsxs)(`div`,{style:{padding:`0 24px 24px`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 0`,borderBottom:`1px solid #f1f5f9`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#94a3b8`,fontSize:13},children:`支付时间:`}),(0,$.jsx)(DB.RangePicker,{size:`small`,value:F,onChange:e=>{I(e),e&&e[0]&&e[1]?P([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):P([null,null]),j(1),setTimeout(()=>W(1),0)},allowClear:!0,placeholder:[`开始日期`,`结束日期`],style:{width:280}})]}),(0,$.jsx)(tG,{spinning:w,children:E.length===0?(0,$.jsx)(lC,{description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无符合条件的订单`})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(iQ,{dataSource:E,columns:oe,scroll:{y:500},rowKey:e=>e.order_no||e.orderNo||e.id,rowSelection:he,pagination:!1,bordered:!1}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(PW,{current:A,pageSize:M,total:O,onChange:e=>{j(e),W(e)},size:`small`})})]})})]})}),(0,$.jsx)(EG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,paddingRight:30},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`选择发票抬头`}),(0,$.jsxs)(Q.Text,{style:{fontSize:13,color:`#64748b`},children:[`开票金额:¥`,(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontWeight:600},children:ge.toFixed(2)})]})]}),open:h,onCancel:()=>{g(!1),v(null),m(new Map),b(``)},width:820,footer:[(0,$.jsx)(X,{onClick:()=>{g(!1),v(null),m(new Map),b(``)},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,loading:x,onClick:me,children:`确定`},`confirm`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsx)(`div`,{style:{padding:`0 24px 24px`},children:(0,$.jsx)(iQ,{dataSource:ce,columns:[{title:`选择`,key:`select`,width:60,render:(e,t)=>(0,$.jsx)(KF,{checked:_===t.id,onChange:()=>{v(t.id),t.email&&!y&&b(t.email)}})},{title:`发票抬头`,dataIndex:`name`,key:`name`,render:e=>(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:e})},{title:`抬头类型`,dataIndex:`type`,key:`type`,width:120,render:e=>(0,$.jsx)(`span`,{style:{color:`#475569`},children:e===`company`?`企业`:`个人`})},{title:`纳税人识别号`,dataIndex:`taxNo`,key:`taxNo`,width:200,render:e=>(0,$.jsx)(`span`,{style:{color:`#64748b`},children:e||`-`})},{title:`是否默认`,dataIndex:`isDefault`,key:`isDefault`,width:100,render:e=>e?(0,$.jsx)(_Q,{color:`#f59e0b`,style:{background:`rgba(245,158,11,0.1)`,color:`#d97706`},children:`默认`}):(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`-`})}],rowKey:`id`,pagination:!1,bordered:!1})})}),(0,$.jsx)(EG,{title:(0,$.jsxs)(`div`,{style:{padding:`16px 20px`,display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`我的发票抬头`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(BI,{}),onClick:()=>l(!0),style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,borderRadius:8,fontWeight:500},children:`添加常用发票抬头`})]}),open:o,onCancel:()=>s(!1),width:900,footer:null,centered:!0,styles:{body:{}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsx)(`div`,{style:{padding:`0 24px 24px`,height:`500px`,marginTop:8},children:i.length===0?(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`暂无发票抬头,请点击「添加常用发票抬头」添加`}),style:{padding:`60px 0`}}):(0,$.jsx)(iQ,{dataSource:i,columns:se,rowKey:`id`,pagination:!1,bordered:!1})})}),(0,$.jsx)(EG,{title:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16,color:`#1e293b`},children:`我的发票抬头`}),open:c,onCancel:()=>{l(!1),u.resetFields()},width:640,footer:null,centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsx)(`div`,{style:{padding:`20px 24px 24px`},children:(0,$.jsxs)(pH,{form:u,layout:`horizontal`,initialValues:{type:`company`,isDefault:`no`},labelCol:{style:{width:90,textAlign:`right`,marginRight:12,whiteSpace:`nowrap`}},wrapperCol:{style:{flex:1}},children:[(0,$.jsx)(pH.Item,{name:`type`,label:`抬头类型:`,rules:[{required:!0,message:`请选择抬头类型`}],children:(0,$.jsxs)(KF.Group,{children:[(0,$.jsx)(KF,{value:`company`,children:`企业`}),(0,$.jsx)(KF,{value:`personal`,children:`个人`})]})}),(0,$.jsx)(pH.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.type!==t.type,children:()=>{let e=u.getFieldValue(`type`)===`company`;return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:`0 16px`},children:[(0,$.jsx)(pH.Item,{name:`name`,label:e?`公司名称:`:`个人姓名:`,rules:[{required:!0,message:e?`请输入公司名称`:`请输入个人姓名`}],children:(0,$.jsx)(JU,{placeholder:e?`请输入公司名称`:`请输入个人姓名`})}),e&&(0,$.jsx)(pH.Item,{name:`taxNo`,label:`公司税号:`,rules:[{required:!0,message:`请输入公司税号`}],children:(0,$.jsx)(JU,{placeholder:`请输入公司税号`})}),e&&(0,$.jsx)(pH.Item,{name:`registerAddress`,label:`注册地址:`,children:(0,$.jsx)(JU,{placeholder:`请输入注册地址`})}),e&&(0,$.jsx)(pH.Item,{name:`bankName`,label:`开户银行:`,children:(0,$.jsx)(JU,{placeholder:`请输入开户银行`})}),e&&(0,$.jsx)(pH.Item,{name:`registerPhone`,label:`注册电话:`,children:(0,$.jsx)(JU,{placeholder:`请输入注册电话`})}),e&&(0,$.jsx)(pH.Item,{name:`bankAccount`,label:`银行账号:`,children:(0,$.jsx)(JU,{placeholder:`请输入银行账号`})}),(0,$.jsx)(pH.Item,{name:`email`,label:`接收邮箱:`,rules:[{required:!0,message:`请输入接收邮箱`},{pattern:/^[\w.\-]+@[\w.\-]+\.\w+$/,message:`请输入正确的邮箱格式`}],children:(0,$.jsx)(JU,{placeholder:`发票将发送至该邮箱`})})]})})}}),(0,$.jsx)(pH.Item,{name:`isDefault`,label:`设为默认:`,rules:[{required:!0,message:`请选择是否设为默认`}],children:(0,$.jsxs)(KF.Group,{children:[(0,$.jsx)(KF,{value:`yes`,children:`是`}),(0,$.jsx)(KF,{value:`no`,children:`否`})]})}),(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:24,marginLeft:102},children:(0,$.jsx)(X,{type:`primary`,size:`large`,onClick:ue,style:{background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,borderRadius:10,paddingLeft:40,paddingRight:40,fontWeight:500},children:`提交`})})]})})}),(0,$.jsx)(EG,{title:null,open:L,onCancel:()=>R(!1),width:640,footer:[(0,$.jsx)(X,{type:`primary`,onClick:()=>R(!1),children:`我知道了`},`close`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsxs)(`div`,{style:{padding:`24px 28px`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,display:`block`,marginBottom:20},children:`开票须知`}),(0,$.jsxs)(`div`,{style:{color:`#475569`,fontSize:14,lineHeight:2},children:[(0,$.jsx)(`p`,{style:{margin:0},children:`尊敬的用户您好!`}),(0,$.jsx)(`p`,{style:{margin:`4px 0 16px`},children:`感谢您的支持,请仔细阅读以下内容:`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`1. 平台开具的发票均为增值税发票;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`2. 为落实中办、国办印发的《关于进一步深化税收征管改革的意见》要求,云图网积极推广开具全面数字化电子发票(简称全电发票或数电发票);发票信息填写无误后,会于5个工作日内开具,并发送至您提交的交付邮箱;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`},children:`3. 开票金额与您实际支付金额一致;`}),(0,$.jsx)(`p`,{style:{margin:0},children:`4. 发票申请过程中有任何问题,可填写用户反馈沟通。`})]})]})}),(0,$.jsx)(EG,{title:null,open:z,onCancel:()=>B(!1),width:720,footer:[(0,$.jsx)(X,{type:`primary`,onClick:()=>B(!1),children:`我知道了`},`close`)],centered:!0,styles:{body:{padding:0}},closeIcon:(0,$.jsx)(ju,{style:{fontSize:16,color:`#94a3b8`}}),children:(0,$.jsxs)(`div`,{style:{padding:`24px 28px`},children:[(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:18,color:`#1e293b`,display:`block`,marginBottom:20},children:`全面数字化电子发票说明`}),(0,$.jsxs)(`div`,{style:{color:`#475569`,fontSize:14,lineHeight:2},children:[(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,fontWeight:500,color:`#1e293b`},children:`1. 什么是数电发票?`}),(0,$.jsx)(`p`,{style:{margin:`0 0 16px`},children:`是指全面数字化的电子发票,即发票信息全面数字化(依托可信身份体系和电子发票服务平台,以去介质、去版式、标签化、要素化、授信制、赋码制为基本特征,覆盖全领域、全环节、全要素的全新发票,与纸质发票具有同等法律效力)。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,fontWeight:500,color:`#1e293b`},children:`2. 数电发票可以开什么票种?`}),(0,$.jsx)(`p`,{style:{margin:`0 0 16px`},children:`数电发票可以开增值税普通票及增值税专票(均是电子发票)。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,fontWeight:500,color:`#1e293b`},children:`3. 数电发票与电子发票的不同`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3.1 数电发票无联次;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3.2 数电发票无发票代码,只有发票号码(20位);`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3.3 数电发票仅显示纳税人识别号和纳税人名称;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 4px`},children:`3.4 数电发票只有开票人,无收款人和复核人,无销售方(章)信息;`}),(0,$.jsx)(`p`,{style:{margin:`0 0 16px`},children:`3.5 新增了动态二维码。`}),(0,$.jsx)(`p`,{style:{margin:`0 0 8px`,fontWeight:500,color:`#1e293b`},children:`4. 数电发票怎么开,怎么交付?`}),(0,$.jsx)(`p`,{style:{margin:`0 0 16px`},children:`现有开具方式需要您选择电子发票填写信息申请,默认以PDF文件形式送至您提供的邮箱,如果您有特殊需求,可备注PDF格式及XML格式,如忘记备注可联系在线客服申请另选格式重复交付不受影响。`}),(0,$.jsx)(`p`,{style:{margin:0},children:`5. 请您认真核对信息无误后提交`})]})]})})]})},Hle=[{key:`project`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(pX,{}),` 项目记录`]})},{key:`creation`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(wV,{}),` 创作记录`]})},{key:`hot_opening_replicate`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(v8,{}),` 爆款复刻`]})},{key:`shot_replicate`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(M6,{}),` 拆镜复刻`]})},{key:`upload_resource`,label:(0,$.jsxs)(`span`,{children:[(0,$.jsx)(j8,{}),` 历史素材`]})}],Ule=({open:e,onClose:t,mediaType:n=`video`,onSelect:r})=>{let i=Ye(),[a,o]=(0,S.useState)(`project`),[s,c]=(0,S.useState)(n),[l,u]=(0,S.useState)([]),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(new Set),[h,g]=(0,S.useState)(1),[_]=(0,S.useState)(10),[v,y]=(0,S.useState)(0),[b,x]=(0,S.useState)(``),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(null),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(new Map),j=(0,S.useCallback)((e,t=!1)=>{let n=`https://ceshi.apiforeign.minzhongzc.com`,r=n.endsWith(`/`)?n.slice(0,-1):n;return t?`${r}${N7(e)}`:`${r}${e}`},[]),M=e=>e.generatedResourceId||e.id,N=e=>{try{let t=new URL(e,window.location.origin).searchParams.get(`exp`);return t?Math.floor(Date.now()/1e3)>parseInt(t):!1}catch{return!1}},P=(0,S.useCallback)(()=>{if(a===`upload_resource`){f(!1),u([]);return}f(!0);let e=``;a===`project`?e=`generation_record`:a===`hot_opening_replicate`?e=`hot_opening_replicate`:a===`shot_replicate`&&(e=`shot_replicate`);let t=`?gen_type=${s}&page=${h}&page_size=${_}`;if(e&&(t=`?gen_type=${s}&history_source=${e}&page=${h}&page_size=${_}`),b.trim()&&(t+=`&keyword=${encodeURIComponent(b.trim())}`),C){let t=`${C}?gen_type=${s}&page=${h}&page_size=${_}`;e&&(t=`${C}?gen_type=${s}&history_source=${e}&page=${h}&page_size=${_}`),b.trim()&&(t+=`&keyword=${encodeURIComponent(b.trim())}`),T5(t).then(e=>{console.log(`[CreationRecordPicker] gethistoryItems response:`,e);let t=Array.isArray(e)?e:e?.items||[],n=[{generatedDate:e?.generated_date||e?.generatedDate||``,items:t,total:e?.total??t.length,page:e?.page??1}];u(n&&n[0].items.length>0?n:[]),y(e?.totalDays||e?.total_days||0)}).catch(e=>{console.error(`[CreationRecordPicker] gethistoryItems error:`,e),u([])}).finally(()=>f(!1))}else w5(t).then(e=>{console.log(`[CreationRecordPicker] gethistory response:`,e);let t=[];Array.isArray(e)?t=e:e?.groups?t=(Array.isArray(e.groups)?e.groups:[e.groups]).map(e=>({generatedDate:e.generated_date||e.generatedDate||``,items:e.items||[],total:e.total??0,page:e.page??1})):e?.items?t=[{generatedDate:e.generated_date||e.generatedDate||``,items:e.items,total:e.total??e.items.length,page:e.page??1}]:e&&typeof e==`object`&&(t=[{generatedDate:e.generated_date||e.generatedDate||``,items:[e],total:e.total??1,page:1}]),t.forEach(e=>{e.page===void 0&&(e.page=1),e.total===void 0&&(e.total=e.items?.length||0)}),u(h===1?t:e=>[...e,...t]),y(e?.totalDays||e?.total_days||0)}).catch(e=>{console.error(`[CreationRecordPicker] gethistory error:`,e),h===1&&u([])}).finally(()=>f(!1))},[a,s,h,_,b,C]);(0,S.useEffect)(()=>{e&&(u([]),A(new Map),P())},[e,a,s,h,C]),(0,S.useEffect)(()=>{e&&(c(n),g(1),x(``),w(``),u([]),A(new Map))},[e,n]);let F=e=>{r?(r(e),t()):(E(e),O(!0))},I=()=>{O(!1),E(null)},L=()=>{if(!T)return;let e=T.videoUrl||T.imageUrl||``;if(!e){Z.warning(`无法获取媒体地址`);return}if(N(e)){Z.warning(`资源已过期,无法编辑`);return}let n=T.videoUrl?`video`:`image`,r=e.startsWith(`http`)?e:`https://ceshi.apiforeign.minzhongzc.com${e}`,a=T.title||T.id||`导入素材`;I(),t(),i(`/videoediting?mediaUrl=${encodeURIComponent(r)}&mediaType=${n}&mediaName=${encodeURIComponent(a)}`)},R=()=>{g(1),P()},z=async(e,t)=>{if(p.has(e))return;m(t=>new Set([...t,e]));let n=t+1,r=``;a===`project`?r=`generation_record`:a===`hot_opening_replicate`?r=`hot_opening_replicate`:a===`shot_replicate`&&(r=`shot_replicate`);let i=`${e}?gen_type=${s}&page=${n}&page_size=${_}`;r&&(i=`${e}?gen_type=${s}&history_source=${r}&page=${n}&page_size=${_}`),b.trim()&&(i+=`&keyword=${encodeURIComponent(b.trim())}`);try{let t=await T5(i),r=t?.items||[];r.length>0&&u(i=>i.map(i=>i.generatedDate===e?{...i,items:[...i.items,...r],page:n,total:t?.total??i.total}:i))}catch(e){console.error(`[CreationRecordPicker] handleGroupLoadMore error:`,e)}finally{m(t=>{let n=new Set(t);return n.delete(e),n})}},B=e=>{let t=s===`video`&&e.videoCoverUrl?j(e.videoCoverUrl,!0):j(s===`video`?e.videoUrl:e.imageUrl,!0),n=s===`video`&&e.videoCoverUrl||s===`image`,r=M(e);return(0,$.jsxs)(`div`,{style:{width:140,height:100,position:`relative`,borderRadius:6,cursor:`pointer`,overflow:`hidden`,boxShadow:`0 2px 8px rgba(0,0,0,0.1)`,transition:`transform 0.2s, box-shadow 0.2s`},onClick:()=>F(e),onMouseEnter:e=>{e.currentTarget.style.transform=`scale(1.05)`,e.currentTarget.style.boxShadow=`0 4px 16px rgba(0,0,0,0.2)`},onMouseLeave:e=>{e.currentTarget.style.transform=`scale(1)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(0,0,0,0.1)`},children:[n?(0,$.jsx)(`img`,{src:t,alt:`预览`,loading:`lazy`,ref:e=>{e&&e.complete&&k.get(r)!==`loaded`&&A(e=>{if(e.get(r)===`loaded`)return e;let t=new Map(e);return t.set(r,`loaded`),t})},style:{width:`100%`,height:`100%`,objectFit:`cover`,opacity:+(k.get(r)===`loaded`),transition:`opacity 0.3s`},onLoad:()=>{A(e=>{if(e.get(r)===`loaded`)return e;let t=new Map(e);return t.set(r,`loaded`),t})},onError:()=>{A(e=>{if(e.get(r)===`loaded`)return e;let t=new Map(e);return t.set(r,`loaded`),t})}}):(0,$.jsx)(`video`,{src:j(e.videoUrl),style:{width:`100%`,height:`100%`,objectFit:`cover`},preload:`metadata`,muted:!0}),s===`video`&&(0,$.jsxs)(`div`,{style:{position:`absolute`,bottom:4,right:4,background:`rgba(0,0,0,0.6)`,color:`#fff`,borderRadius:4,padding:`1px 6px`,fontSize:10},children:[(0,$.jsx)(L8,{style:{marginRight:2}}),`视频`]})]},r)};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(EG,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(wV,{style:{color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontWeight:600},children:`选择创作记录`})]}),open:e,onCancel:t,width:900,footer:null,destroyOnHidden:!0,styles:{body:{maxHeight:`70vh`,overflow:`auto`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12},children:[(0,$.jsx)(X,{type:s===`video`?`primary`:`default`,icon:(0,$.jsx)(L8,{}),onClick:()=>{c(`video`),g(1)},size:`small`,children:`视频`}),(0,$.jsx)(X,{type:s===`image`?`primary`:`default`,icon:(0,$.jsx)(C6,{}),onClick:()=>{c(`image`),g(1)},size:`small`,children:`图片`})]}),(0,$.jsx)(hL,{activeKey:a,onChange:e=>{o(e),g(1),w(``)},items:Hle,size:`small`,style:{marginBottom:12}}),a===`upload_resource`?(0,$.jsx)(E9,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:12},children:[(0,$.jsx)(JU,{placeholder:`搜索关键词...`,value:b,onChange:e=>x(e.target.value),onPressEnter:R,prefix:(0,$.jsx)(PC,{style:{color:`#94a3b8`}}),style:{flex:1},size:`small`}),(0,$.jsx)(X,{type:`primary`,size:`small`,onClick:R,children:`搜索`})]}),(0,$.jsx)(tG,{spinning:d,children:l.length===0&&!d?(0,$.jsx)(lC,{description:`暂无记录`,style:{padding:`40px 0`}}):(0,$.jsxs)(`div`,{children:[l.map((e,t)=>(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[e.generatedDate&&(0,$.jsx)(`div`,{style:{fontSize:13,fontWeight:600,color:`#64748b`,marginBottom:8,display:`flex`,alignItems:`center`,gap:4},children:e.generatedDate}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:e.items?.map(e=>B(e))}),e.total!=null&&e.total>(e.items?.length||0)&&(0,$.jsx)(`div`,{style:{padding:`12px 0`,textAlign:`left`},children:(0,$.jsx)(X,{onClick:()=>z(e.generatedDate,e.page||1),loading:p.has(e.generatedDate),disabled:p.has(e.generatedDate),size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:p.has(e.generatedDate)?`加载中...`:`加载更多 (${e.items?.length||0}/${e.total})`})})]},t)),l.length>0&&v>l.length&&(0,$.jsx)(`div`,{style:{padding:`16px 0 8px`,textAlign:`center`},children:(0,$.jsx)(X,{onClick:()=>g(e=>e+1),loading:d,disabled:d,size:`small`,style:{borderRadius:6,background:`transparent`,border:`1px dashed #cbd5e1`,color:`#64748b`,fontSize:12},children:d?`加载中...`:`加载更多 (${l.length}/${v})`})})]})})]})]}),(0,$.jsx)(EG,{title:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:600},children:T?.title||`预览`})}),open:D,onCancel:I,width:800,footer:(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12},children:[(0,$.jsx)(X,{onClick:I,children:`关闭`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(F1,{}),onClick:()=>{if(!T)return;let e=`https://ceshi.apiforeign.minzhongzc.com${T.videoUrl||T.imageUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=``,document.body.appendChild(t),t.click(),document.body.removeChild(t)},disabled:N(T?.videoUrl||T?.imageUrl||``),children:N(T?.videoUrl||T?.imageUrl||``)?`资源已过期`:`下载`}),(0,$.jsx)(X,{type:`primary`,onClick:L,disabled:N(T?.videoUrl||T?.imageUrl||``),style:{background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,border:`none`,fontWeight:600},children:`去编辑`})]}),styles:{body:{height:400,display:`flex`,flexDirection:`column`,padding:0}},children:T&&(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`#000`},children:T.videoUrl?(0,$.jsx)(`video`,{src:j(T.videoUrl),controls:!0,autoPlay:!0,style:{maxWidth:`100%`,maxHeight:`100%`}}):(0,$.jsx)(`img`,{src:j(T.imageUrl,!0),alt:`预览`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`}})})})]})},{TextArea:X9}=JU,Z9={video:{bg:`rgba(99,102,241,0.15)`,bgActive:`rgba(99,102,241,0.45)`,border:`rgba(99,102,241,0.25)`,borderActive:`rgba(99,102,241,0.5)`,icon:(0,$.jsx)(L8,{style:{color:`#6366f1`,fontSize:14}})},audio:{bg:`rgba(16,185,129,0.15)`,bgActive:`rgba(16,185,129,0.45)`,border:`rgba(16,185,129,0.25)`,borderActive:`rgba(16,185,129,0.5)`,icon:(0,$.jsx)(g8,{style:{color:`#10b981`,fontSize:14}})},image:{bg:`rgba(245,158,11,0.15)`,bgActive:`rgba(245,158,11,0.45)`,border:`rgba(245,158,11,0.25)`,borderActive:`rgba(245,158,11,0.5)`,icon:(0,$.jsx)(C6,{style:{color:`#f59e0b`,fontSize:14}})},text:{bg:`rgba(59,130,246,0.15)`,bgActive:`rgba(59,130,246,0.45)`,border:`rgba(59,130,246,0.25)`,borderActive:`rgba(59,130,246,0.5)`,icon:(0,$.jsx)(R4,{style:{color:`#3b82f6`,fontSize:14}})},watermark:{bg:`rgba(100,116,139,0.15)`,bgActive:`rgba(100,116,139,0.45)`,border:`rgba(100,116,139,0.25)`,borderActive:`rgba(100,116,139,0.5)`,icon:(0,$.jsx)(wV,{style:{color:`#64748b`,fontSize:14}})}},Wle=()=>{let e=Ye(),[t]=On(),[n,r]=(0,S.useState)(`video`),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)(0),[u,d]=(0,S.useState)(0),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(1),[g,_]=(0,S.useState)(80),[v,y]=(0,S.useState)(50),[b,x]=(0,S.useState)(null),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(`中文`),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(``),[N,P]=(0,S.useState)(`text`),[F,I]=(0,S.useState)(!1),L=(0,S.useRef)(null),R=(0,S.useRef)(null),z=(0,S.useRef)(null),B=(0,S.useRef)(null),V=(0,S.useRef)(null),H=(0,S.useRef)(null),U=(0,S.useRef)(null),ee=(0,S.useRef)(null),W=(0,S.useRef)(null),te=(0,S.useRef)(null),G=(0,S.useRef)(0),ne=(0,S.useRef)(!1),K=(0,S.useRef)(null),re=(0,S.useRef)(null),ie=e=>{let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60);return`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`},ae=e=>{switch(e){case`video`:return`video/*`;case`audio`:return`audio/*`;case`image`:return`image/*`;case`watermark`:return`image/*`;default:return``}},q=e=>{let t=e.target.files;if(!t||t.length===0)return;if(n===`text`){P(`text`),M(``),A(!0);return}let r=n===`watermark`?`watermark`:n,i=[];Array.from(t).forEach(e=>{let t=URL.createObjectURL(e);i.push({id:`${Date.now()}-${Math.random()}`,type:r,name:e.name,url:t})}),a(e=>[...e,...i]),Z.success(`已导入 ${i.length} 个${Pe.find(e=>e.key===n)?.label}素材`),V.current&&(V.current.value=``)};(0,S.useEffect)(()=>{let n=t.get(`mediaUrl`),i=t.get(`mediaType`),o=t.get(`mediaName`)||`导入素材`;if(n&&i){let t=i===`image`?`image`:`video`,s={id:`${Date.now()}-${Math.random()}`,type:t,name:o,url:n};a(e=>[...e,s]),r(t),Z.success(`已导入创作记录素材:${o}`),e(`/videoediting`,{replace:!0})}},[t]);let oe=e=>{P(e),M(``),A(!0)},se=()=>{let e=j.trim();if(!e){Z.warning(`请输入内容`);return}let t={id:`${Date.now()}-${Math.random()}`,type:N,name:e.slice(0,20),text:e};a(e=>[...e,t]),A(!1),Z.success(N===`watermark`?`已添加水印`:`已添加文本`)},ce=e=>e.length>0?Math.max(...e.map(e=>e.start+e.duration)):0,le=e=>e.length>0?Math.max(...e.map(e=>e.start+e.duration)):0,ue=(0,S.useCallback)(()=>{if(!b){Z.warning(`请先选择要分割的片段`);return}let e=o.find(e=>e.id===b);if(!e)return;let t=c-e.start;if(t<=0||t>=e.duration){Z.warning(`播放头不在选中片段内`);return}let n={...e,duration:t,originalDuration:e.originalDuration,trimStart:e.trimStart},r={...e,id:`${Date.now()}-${Math.random()}`,start:e.start+t,duration:e.duration-t,trimStart:e.trimStart+t};s(t=>[...t.filter(t=>t.id!==e.id),n,r]),x(r.id),Z.success(`已分割片段`)},[b,o,c]),de=(0,S.useCallback)((e,t)=>{s(n=>n.map(n=>n.id===e?{...n,start:Math.max(0,t)}:n))},[]),fe=(0,S.useCallback)((e,t)=>{s(n=>n.map(n=>{if(n.id!==e)return n;let r=n.type===`video`||n.type===`audio`?n.originalDuration-.1:999,i=Math.max(0,Math.min(t,r)),a=i-n.trimStart;return{...n,trimStart:i,start:n.start+a,duration:Math.max(.1,n.duration-a)}}))},[]),pe=(0,S.useCallback)((e,t)=>{s(n=>n.map(n=>{if(n.id!==e)return n;let r=n.type===`video`||n.type===`audio`?n.originalDuration-n.trimStart:999,i=Math.max(.1,Math.min(t,r));return{...n,duration:i}}))},[]),me=(0,S.useCallback)((e,t,n)=>{s(r=>r.map(r=>r.id===e?{...r,[t]:n}:r))},[]),he=(0,S.useCallback)(e=>{let t=e=>e===`image`?{x:50,y:50,width:25,height:20,opacity:1,zIndex:4}:e===`text`?{x:50,y:85,width:60,height:10,opacity:1,zIndex:5}:e===`watermark`?{x:85,y:85,width:15,height:8,opacity:.4,zIndex:6}:e===`video`?{zIndex:2}:e===`audio`?{zIndex:1}:{zIndex:0},n=n=>({id:`${Date.now()}-${Math.random()}`,mediaId:e.id,type:e.type,start:0,duration:n,originalDuration:n,trimStart:0,url:e.url,name:e.text||e.name,text:e.text,...t(e.type)});if(e.type===`video`){let t=document.createElement(`video`);t.src=e.url,t.onloadedmetadata=()=>{let r=t.duration||5;s(e=>{let t=n(r);t.start=ce(e);let i=[...e,t];return d(le(i)),i}),Z.success(`已添加视频:${e.name}`)}}else if(e.type===`audio`){let t=document.createElement(`audio`);t.src=e.url,t.onloadedmetadata=()=>{let r=t.duration||5;s(e=>{let t=n(r);t.start=ce(e);let i=[...e,t];return d(le(i)),i}),Z.success(`已添加音频:${e.name}`)}}else e.type===`image`?(s(e=>{let t=n(5);t.start=ce(e);let r=[...e,t];return d(le(r)),r}),Z.success(`已添加图片:${e.name}`)):e.type===`text`?(s(e=>{let t=n(3);t.start=ce(e);let r=[...e,t];return d(le(r)),r}),Z.success(`已添加文本:${e.text}`)):e.type===`watermark`&&(s(e=>{let t=n(e.length>0?Math.max(...e.map(e=>e.start+e.duration)):10);t.start=0;let r=[...e,t];return d(le(r)),r}),Z.success(`已添加水印:${e.text||e.name}`))},[]),ge=(0,S.useCallback)(()=>{let e={version:`1.0`,exportedAt:new Date().toISOString(),mediaLibrary:i.map(e=>({id:e.id,type:e.type,name:e.name,url:e.url,duration:e.duration,thumbnail:e.thumbnail,text:e.text})),tracks:o.map(e=>({id:e.id,mediaId:e.mediaId,type:e.type,start:e.start,duration:e.duration,originalDuration:e.originalDuration,trimStart:e.trimStart,url:e.url,name:e.name,text:e.text,x:e.x,y:e.y,width:e.width,height:e.height,opacity:e.opacity,zIndex:e.zIndex})),currentTime:c,duration:u,playbackRate:m,volume:g,zoom:v,activeTab:n};return JSON.stringify(e,null,2)},[i,o,c,u,m,g,v,n]),_e=(0,S.useCallback)(e=>{try{let t=JSON.parse(e);if(!t||!Array.isArray(t.tracks)){Z.error(`无效的编辑器状态文件`);return}a(t.mediaLibrary||[]),s(t.tracks||[]),l(t.currentTime||0),d(t.duration||0),h(t.playbackRate||1),_(t.volume??80),y(t.zoom||50),t.activeTab&&r(t.activeTab),Z.success(`已恢复编辑器状态`)}catch{Z.error(`解析 JSON 失败`)}},[]),ve=(0,S.useCallback)(()=>{let e=ge(),t=new Blob([e],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`video-edit-${new Date().toISOString().slice(0,19).replace(/[:T]/g,`-`)}.json`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),Z.success(`已导出编辑器状态 JSON`)},[ge]),ye=(0,S.useRef)(null),be=(0,S.useCallback)(()=>{ye.current?.click()},[]),xe=(0,S.useCallback)(e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=e=>{let t=e.target?.result;_e(t)},n.readAsText(t),e.target&&(e.target.value=``)},[_e]),Se=e=>u>0?e/u*100:0,Ce=(0,S.useCallback)(e=>{if(!U.current)return;let t=U.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width;if(r<=0)return;let i=Math.max(0,Math.min(1,n/r))*u;l(i),L.current&&(L.current.currentTime=i),R.current&&(R.current.currentTime=i)},[u]),we=(0,S.useCallback)(e=>{if(e.stopPropagation(),e.preventDefault(),!U.current)return;let t=U.current.getBoundingClientRect(),n=e=>{let n=e.clientX-t.left;l(Math.max(0,Math.min(1,n/t.width))*u)},r=()=>{document.removeEventListener(`mousemove`,n),document.removeEventListener(`mouseup`,r);let i=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width))*u;L.current&&(L.current.currentTime=i),R.current&&(R.current.currentTime=i)};document.addEventListener(`mousemove`,n),document.addEventListener(`mouseup`,r)},[u]),Te=(0,S.useCallback)((e,t,n)=>{e.stopPropagation(),e.preventDefault(),x(t.id);let r=U.current?.getBoundingClientRect(),i=(r?r.width:1)/Math.max(u,.01);K.current={segmentId:t.id,mode:n,startX:e.clientX,startTime:c,originalStart:t.start,originalDuration:t.duration,originalTrimStart:t.trimStart};let a=e=>{let t=K.current;if(!t||!U.current)return;let n=(e.clientX-t.startX)/i;t.mode===`move`?de(t.segmentId,Math.max(0,t.originalStart+n)):t.mode===`trimLeft`?fe(t.segmentId,t.originalTrimStart+n):t.mode===`trimRight`&&pe(t.segmentId,Math.max(.1,t.originalDuration+n))},o=()=>{K.current=null,document.removeEventListener(`mousemove`,a),document.removeEventListener(`mouseup`,o)};document.addEventListener(`mousemove`,a),document.addEventListener(`mouseup`,o)},[c,u,de,fe,pe]),Ee=(0,S.useCallback)((e,t,n,r)=>{e.stopPropagation(),e.preventDefault(),x(t.id);let i=t.width??25,a=t.height??20,o=t.x??50,s=t.y??50;re.current={segmentId:t.id,mode:n,startX:e.clientX,startY:e.clientY,origX:o,origY:s,origW:i,origH:a,handle:r};let c=ee.current?.getBoundingClientRect();if(!c)return;let l=c.width,u=c.height,d=e=>{let t=re.current;if(!t)return;let n=(e.clientX-t.startX)/l*100,r=(e.clientY-t.startY)/u*100;if(t.mode===`move`)me(t.segmentId,`x`,Math.max(0,Math.min(100,t.origX+n))),me(t.segmentId,`y`,Math.max(0,Math.min(100,t.origY+r)));else if(t.mode===`resize`){let e=t.origW,i=t.origH,a=t.origX,o=t.origY,s=t.handle||`se`;if(s.includes(`e`)&&(e=Math.max(3,t.origW+n)),s.includes(`s`)&&(i=Math.max(3,t.origH+r)),s.includes(`w`)){let r=t.origX+t.origW-n;e=Math.max(3,r-t.origX),a=t.origX+(t.origW-e)}if(s.includes(`n`)){let e=t.origY+t.origH-r;i=Math.max(3,e-t.origY),o=t.origY+(t.origH-i)}(s===`e`||s===`w`)&&(i=t.origH,o=t.origY),me(t.segmentId,`width`,Math.min(100,e)),me(t.segmentId,`height`,Math.min(100,i)),s.includes(`w`)&&me(t.segmentId,`x`,Math.max(0,a)),s.includes(`n`)&&me(t.segmentId,`y`,Math.max(0,o))}},f=()=>{re.current=null,document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f)};document.addEventListener(`mousemove`,d),document.addEventListener(`mouseup`,f)},[me]),De=(0,S.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e)),x(null)},[]),Oe=(0,S.useCallback)(e=>{s(t=>t.map(t=>t.id===e?{...t,zIndex:(t.zIndex??0)+1}:t))},[]),ke=(0,S.useCallback)(e=>{s(t=>t.map(t=>t.id===e?{...t,zIndex:Math.max(0,(t.zIndex??0)-1)}:t))},[]),Ae=()=>{if(ne.current){if(L.current&&ze){let e=L.current.currentTime;l(ze.start+e-ze.trimStart);return}if(R.current&&Ve){let e=R.current.currentTime;l(Ve.start+e-Ve.trimStart)}}},je=e=>{if(!z.current)return;let t=z.current.getBoundingClientRect(),n=(e.clientX-t.left)/t.width*u;l(n),L.current&&(L.current.currentTime=n),R.current&&(R.current.currentTime=n)},Me=e=>{let t=Math.max(0,Math.min(u,c+e));l(t),L.current&&(L.current.currentTime=t),R.current&&(R.current.currentTime=t)},Ne=()=>{if(o.length===0){Z.warning(`请先添加视频片段`);return}Z.success(`导出任务已提交,请稍候...`)},Pe=[{key:`video`,icon:(0,$.jsx)(L8,{}),label:`视频`},{key:`audio`,icon:(0,$.jsx)(g8,{}),label:`音频`},{key:`image`,icon:(0,$.jsx)(C6,{}),label:`图片`},{key:`text`,icon:(0,$.jsx)(R4,{}),label:`文本`},{key:`watermark`,icon:(0,$.jsx)(wV,{}),label:`水印`}],Fe=e=>Z9[e].icon,Ie=o.find(e=>e.id===b),Le=o.filter(e=>e.type===`video`&&c>=e.start&&c(e.zIndex??0)-(t.zIndex??0)),Re=Le.length>0?Le[Le.length-1]:null,ze=o.find(e=>e.type===`video`&&c>=e.start&&ce.type!==`text`&&e.type!==`watermark`&&e.type!==`image`?!1:c>=e.start&&c(e.zIndex??0)-(t.zIndex??0)),Ve=o.find(e=>e.type===`audio`&&c>=e.start&&c{let e=!f;if(ne.current=e,p(e),te.current!==null&&(cancelAnimationFrame(te.current),te.current=null),e){let e=Le.some(e=>e.type===`video`&&e.url),t=Ve&&R.current,n=e||t;if(e&&L.current&&ze){let e=Math.max(0,c-ze.start+ze.trimStart);L.current.currentTime=e,L.current.play().catch(()=>{})}if(t&&(R.current.currentTime=Math.max(0,c-Ve.start+Ve.trimStart),R.current.play().catch(()=>{})),!n){G.current=performance.now();let e=t=>{if(!ne.current)return;let n=(t-G.current)/1e3;G.current=t,l(e=>{let t=e+n;return t>=u?(ne.current=!1,p(!1),u):t}),ne.current&&(te.current=requestAnimationFrame(e))};te.current=requestAnimationFrame(e)}}else L.current&&L.current.pause(),R.current&&R.current.pause()},[f,Le,ze,Ve,c,u]),Ue=i.filter(e=>n===`watermark`?e.type===`watermark`:e.type===n);(0,S.useEffect)(()=>{L.current&&(L.current.volume=g/100),R.current&&(R.current.volume=g/100)},[g]),(0,S.useEffect)(()=>{L.current&&(L.current.playbackRate=m),R.current&&(R.current.playbackRate=m)},[m]),(0,S.useEffect)(()=>{if(Re?.type===`video`&&L.current){let e=c-Re.start+Re.trimStart;Math.abs(L.current.currentTime-e)>.1&&(L.current.currentTime=Math.max(0,e))}if(Ve&&R.current){let e=c-Ve.start+Ve.trimStart;Math.abs(R.current.currentTime-e)>.1&&(R.current.currentTime=Math.max(0,e))}},[c,Re,Ve]);let We=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(!Re){We.current=null;return}let e=`${Re.id}-${Re.type}`;We.current!==e&&f&&setTimeout(()=>{Re.type===`video`&&L.current&&(L.current.currentTime=Re.trimStart,L.current.play().catch(()=>{}))},30),We.current=e},[Re,f]);let Ge=(0,S.useRef)(null);(0,S.useEffect)(()=>{if(!Ve){Ge.current=null;return}let e=Ve.id;Ge.current!==e&&f&&Ve.url&&setTimeout(()=>{R.current&&(R.current.currentTime=Ve.trimStart,R.current.play().catch(()=>{}))},30),Ge.current=e},[Ve,f]),(0,S.useEffect)(()=>()=>{te.current!==null&&(cancelAnimationFrame(te.current),te.current=null),i.forEach(e=>{e.url&&URL.revokeObjectURL(e.url)})},[]);let Ke=e=>{if(!e)return null;let t=e.start+e.duration;return o.filter(n=>(n.type===`video`||n.type===`image`)&&n.id!==e.id&&n.start>t-.01).sort((e,t)=>e.start-t.start)[0]||null},qe=(0,S.useCallback)(()=>{if(!Re)return;let e=Ke(Re);if(e){if(l(e.start),e.type===`video`&&L.current){let t=()=>{L.current&&ne.current&&(L.current.currentTime=e.trimStart,L.current.play().catch(()=>{}))};L.current.readyState>=1?t():L.current.addEventListener(`loadedmetadata`,t,{once:!0})}}else ne.current=!1,p(!1),l(Re.start+Re.duration),te.current!==null&&(cancelAnimationFrame(te.current),te.current=null)},[Re,o]),Je=(0,S.useCallback)(()=>{ne.current&&L.current&&ze&&(L.current.currentTime=ze.trimStart,L.current.play().catch(()=>{}))},[ze]),Xe=(0,S.useCallback)(()=>{if(Ve&&ne.current){let e=o.filter(e=>e.type===`audio`&&e.id!==Ve.id&&e.start>=Ve.start+Ve.duration-.01).sort((e,t)=>e.start-t.start)[0];if(e)setTimeout(()=>{R.current&&ne.current&&(R.current.currentTime=e.trimStart,R.current.play().catch(()=>{}))},50);else{G.current=performance.now();let e=t=>{if(!ne.current)return;let n=(t-G.current)/1e3;G.current=t,l(e=>{let t=e+n;return t>=u?(ne.current=!1,p(!1),u):t}),ne.current&&(te.current=requestAnimationFrame(e))};te.current=requestAnimationFrame(e)}}},[Ve,o,u]),Ze=[],Qe=Math.ceil(u||10),$e=Math.max(1,Math.floor(Qe/10));for(let e=0;e<=Qe;e+=$e)Ze.push(e);return(0,$.jsxs)(`div`,{className:`content_box`,style:{backgroundColor:`#fff`,width:`100vw`,height:`100vh`,display:`flex`,flexDirection:`column`,overflow:`hidden`,margin:0},children:[(0,$.jsxs)(`div`,{style:{height:56,background:`#ffffff`,borderBottom:`1px solid #e8ecf2`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 20px`,flexShrink:0,boxShadow:`0 1px 2px rgba(15, 23, 42, 0.03)`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,minWidth:0},children:[(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(Uw,{}),onClick:()=>e(`/videoprojects`),children:`返回`}),(0,$.jsx)(`div`,{style:{width:1,height:20,background:`#e2e8f0`}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`},children:`视频剪辑工作台`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:[o.length,` 个片段 · 总时长 `,ie(u)]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(rie,{}),onClick:ve,children:`保存草稿`}),(0,$.jsx)(X,{icon:(0,$.jsx)(m3,{}),onClick:be,children:`加载草稿`}),(0,$.jsx)(`input`,{ref:ye,type:`file`,accept:`.json`,style:{display:`none`},onChange:xe}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(C4,{}),onClick:Ne,children:`导出视频`})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,overflow:`hidden`,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{width:220,minWidth:180,maxWidth:220,background:`#ffffff`,borderRight:`1px solid #e8ecf2`,display:`flex`,flexDirection:`column`,flexShrink:0,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,padding:`10px 8px 8px`,gap:4,borderBottom:`1px solid #eef2f7`,flexShrink:0},children:Pe.map(e=>(0,$.jsx)(kw,{title:e.label,placement:`bottom`,children:(0,$.jsx)(`div`,{onClick:()=>r(e.key),style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,background:n===e.key?`rgba(99,102,241,0.1)`:`transparent`,color:n===e.key?`#6366f1`:`#64748b`,transition:`all 0.2s`,fontSize:15},children:e.icon})},e.key))}),(0,$.jsxs)(`div`,{style:{padding:`12px`,flexShrink:0},children:[n===`text`||n===`watermark`?(0,$.jsx)(X,{block:!0,icon:(0,$.jsx)(m3,{}),onClick:()=>{oe(n===`text`?`text`:`watermark`)},children:n===`text`?`添加文本`:`添加水印`}):(0,$.jsx)(xV,{menu:{items:[{key:`local`,icon:(0,$.jsx)(gX,{}),label:`本地上传`,onClick:()=>V.current?.click()},{key:`record`,icon:(0,$.jsx)(wV,{}),label:`创作记录`,onClick:()=>I(!0)}]},placement:`bottom`,trigger:[`click`],children:(0,$.jsxs)(X,{block:!0,icon:(0,$.jsx)(m3,{}),children:[`导入`,Pe.find(e=>e.key===n)?.label,(0,$.jsx)(jC,{style:{fontSize:10,opacity:.7,marginLeft:4}})]})}),(0,$.jsx)(`input`,{ref:V,type:`file`,accept:ae(n),multiple:!0,style:{display:`none`},onChange:q})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`0 12px`,minHeight:0},children:Ue.length===0?(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`40px 12px`,color:`#94a3b8`},children:[(0,$.jsx)(m3,{style:{fontSize:32,marginBottom:12,opacity:.5}}),(0,$.jsx)(`div`,{style:{fontSize:13},children:n===`text`?`点击上方按钮添加文本`:n===`watermark`?`点击上方按钮添加水印`:`点击上方按钮导入素材`})]}):(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:Ue.map(e=>(0,$.jsxs)(`div`,{onClick:()=>he(e),style:{background:`#f8fafc`,border:`1px solid #e2e8f0`,borderRadius:8,padding:8,cursor:`pointer`,transition:`all 0.2s`,display:`flex`,alignItems:`center`,gap:10},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#c7d2fe`,e.currentTarget.style.background=`#eef2ff`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.background=`#f8fafc`},children:[e.type===`video`&&e.url?(0,$.jsxs)(`div`,{style:{width:72,height:44,borderRadius:6,overflow:`hidden`,background:`#1e293b`,flexShrink:0,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(`video`,{src:e.url,muted:!0,style:{width:`100%`,height:`100%`,objectFit:`cover`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`rgba(255,255,255,0.9)`,fontSize:18,pointerEvents:`none`},children:(0,$.jsx)(k6,{})})]}):(e.type===`image`||e.type===`watermark`)&&e.url?(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:6,overflow:`hidden`,background:`#e2e8f0`,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`img`,{src:e.url,alt:e.name,draggable:!1,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}})}):(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:6,flexShrink:0,background:`#e2e8f0`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20},children:Fe(e.type)}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{color:`#1e293b`,fontSize:13,fontWeight:500,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},title:e.text||e.name,children:e.text||e.name}),(0,$.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`,marginTop:2},children:e.type===`video`?`视频`:e.type===`image`?`图片`:e.type===`watermark`?`水印`:`文本`})]})]},e.id))})}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,borderTop:`1px solid #eef2f7`,color:`#94a3b8`,fontSize:11,textAlign:`center`,flexShrink:0},children:`选择素材添加到时间线`})]}),(0,$.jsxs)(`div`,{ref:W,style:{flex:1,minWidth:0,background:`#f1f5f9`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,padding:16,minHeight:0,background:`#ffffff`},children:o.length>0?(0,$.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:`100%`,minWidth:400,minHeight:300,borderRadius:12,overflow:`hidden`,boxShadow:`0 8px 32px rgba(15, 23, 42, 0.2)`,background:`#000`},children:[Le.map((e,t)=>{let n={position:`absolute`,inset:0,width:`100%`,height:`100%`,zIndex:e.zIndex??t};if(e.type===`video`&&e.url){let r=t===Le.findIndex(e=>e.type===`video`);return(0,$.jsx)(`video`,{ref:r?L:void 0,src:e.url,onTimeUpdate:r?Ae:void 0,onPlay:r?()=>p(!0):void 0,onPause:r?()=>p(!1):void 0,onEnded:r?qe:void 0,onLoadedMetadata:r?Je:void 0,style:{...n,objectFit:`contain`,background:`#000`}},e.id)}return e.type===`image`&&e.url?(0,$.jsx)(`img`,{src:e.url,alt:e.name,style:{...n,objectFit:`contain`}},e.id):null}),Le.length===0&&(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`#000`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,$.jsx)(b6,{style:{fontSize:48,marginBottom:8,opacity:.4}}),(0,$.jsx)(`div`,{style:{fontSize:13}})]})}),(0,$.jsx)(`div`,{ref:ee,style:{position:`absolute`,inset:0,pointerEvents:`none`}}),Be.filter(e=>e.type===`image`&&e.url).map(e=>{let t=b===e.id,n=e.x??50,r=e.y??50,i=e.width??25,a=e.height??20,o=e.opacity??1;return(0,$.jsxs)(`div`,{onMouseDown:t=>Ee(t,e,`move`),onClick:t=>{t.stopPropagation(),x(e.id)},style:{position:`absolute`,left:`${n}%`,top:`${r}%`,width:`${i}%`,height:`${a}%`,transform:`translate(-50%, -50%)`,cursor:`move`,zIndex:e.zIndex??4,pointerEvents:`auto`,opacity:o},children:[(0,$.jsx)(`img`,{src:e.url,alt:e.name,draggable:!1,style:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:8,border:t?`2px solid #6366f1`:`2px solid rgba(255,255,255,0.8)`,boxShadow:t?`0 0 0 2px rgba(99,102,241,0.3), 0 4px 12px rgba(0,0,0,0.3)`:`0 4px 12px rgba(0,0,0,0.3)`,pointerEvents:`none`}}),t&&(0,$.jsx)($.Fragment,{children:[`nw`,`n`,`ne`,`e`,`se`,`s`,`sw`,`w`].map(t=>{let n=t.length===2,r={};return t.includes(`n`)&&(r.top=-6),t.includes(`s`)&&(r.bottom=-6),t.includes(`w`)&&(r.left=-6),t.includes(`e`)&&(r.right=-6),!t.includes(`n`)&&!t.includes(`s`)&&(r.top=`50%`),!t.includes(`w`)&&!t.includes(`e`)&&(r.left=`50%`),!t.includes(`n`)&&!t.includes(`s`)&&(r.transform=`translateY(-50%)`),!t.includes(`w`)&&!t.includes(`e`)&&(r.transform=`translateX(-50%)`),(0,$.jsx)(`div`,{onMouseDown:n=>Ee(n,e,`resize`,t),style:{position:`absolute`,width:n?10:8,height:n?10:8,background:`#fff`,border:`1.5px solid #6366f1`,borderRadius:2,cursor:`${t}-resize`,zIndex:10,...r}},t)})})]},e.id)}),Be.filter(e=>e.type===`text`).map(e=>{let t=b===e.id,n=e.x??50,r=e.y??85,i=e.opacity??1;return(0,$.jsx)(`div`,{onMouseDown:t=>Ee(t,e,`move`),onClick:t=>{t.stopPropagation(),x(e.id)},style:{position:`absolute`,left:`${n}%`,top:`${r}%`,transform:`translate(-50%, -50%)`,fontSize:28,fontWeight:700,color:`#fff`,textShadow:`0 2px 12px rgba(0,0,0,0.8), 0 0 4px rgba(0,0,0,0.5)`,cursor:`move`,zIndex:e.zIndex??5,whiteSpace:`nowrap`,maxWidth:`90%`,overflow:`hidden`,textOverflow:`ellipsis`,opacity:i,padding:`4px 8px`,outline:t?`2px dashed #6366f1`:`none`,outlineOffset:2,pointerEvents:`auto`},children:e.text||e.name},e.id)}),Be.filter(e=>e.type===`watermark`).map(e=>{let t=b===e.id,n=e.x??85,r=e.y??85,i=e.opacity??.4;return(0,$.jsx)(`div`,{onMouseDown:t=>Ee(t,e,`move`),onClick:t=>{t.stopPropagation(),x(e.id)},style:{position:`absolute`,left:`${n}%`,top:`${r}%`,transform:`translate(-50%, -50%)`,fontSize:14,color:`rgba(255,255,255,${i})`,fontWeight:500,cursor:`move`,zIndex:e.zIndex??6,padding:t?`2px 4px`:void 0,outline:t?`2px dashed #6366f1`:`none`,outlineOffset:2,pointerEvents:`auto`},children:e.text||e.name},e.id)}),Ve?.url&&(0,$.jsx)(`audio`,{ref:R,src:Ve.url,onTimeUpdate:Ae,onPlay:()=>p(!0),onPause:()=>p(!1),onEnded:Xe,style:{display:`none`}},Ve.id)]}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsx)(b6,{style:{fontSize:64,marginBottom:16,opacity:.35}}),(0,$.jsx)(`div`,{style:{fontSize:14,color:`#64748b`},children:`选择素材开始创作`}),(0,$.jsx)(`div`,{style:{fontSize:12,marginTop:4},children:`从左侧导入视频、音频或图片`})]})}),(0,$.jsxs)(`div`,{style:{height:48,background:`#ffffff`,borderTop:`1px solid #e8ecf2`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,padding:`0 16px`,flexShrink:0,color:`#1e293b`,flexWrap:`wrap`},children:[(0,$.jsxs)(`span`,{style:{color:`#64748b`,fontSize:13,fontFamily:`monospace`},children:[ie(c),` / `,ie(u)]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(e2,{}),onClick:()=>Me(-5),disabled:o.length===0}),(0,$.jsx)(X,{type:`text`,icon:f?(0,$.jsx)(c6,{}):(0,$.jsx)(M6,{}),onClick:He,disabled:o.length===0,style:{color:`#6366f1`,fontSize:22,width:44,height:44}}),(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(V4,{}),onClick:()=>Me(5),disabled:o.length===0})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(g8,{style:{color:`#64748b`}}),(0,$.jsx)(Zz,{value:g,onChange:_,style:{width:80},tooltip:{formatter:e=>`${e}%`}})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[.5,1,1.5,2].map(e=>(0,$.jsxs)(X,{size:`small`,type:m===e?`primary`:`default`,onClick:()=>h(e),style:{width:40,height:24,fontSize:11},children:[e,`x`]},e))}),(0,$.jsx)(`div`,{style:{width:1,height:20,background:`#e2e8f0`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(kw,{title:`在播放头处分割`,children:(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(r8,{}),onClick:ue,disabled:!b,children:`分割`})}),(0,$.jsx)(iU,{style:{color:`#64748b`,cursor:`pointer`},onClick:()=>y(e=>Math.max(10,e-10))}),(0,$.jsxs)(`span`,{style:{color:`#64748b`,fontSize:12,minWidth:32,textAlign:`center`},children:[v,`%`]}),(0,$.jsx)(tU,{style:{color:`#64748b`,cursor:`pointer`},onClick:()=>y(e=>Math.min(100,e+10))}),(0,$.jsx)(`div`,{style:{width:1,height:20,background:`#e2e8f0`}}),(0,$.jsx)(kw,{title:D?`退出全屏`:`全屏预览`,children:D?(0,$.jsx)(W4,{style:{color:`#6366f1`,cursor:`pointer`,fontSize:18},onClick:()=>O(!1)}):(0,$.jsx)(q4,{style:{color:`#64748b`,cursor:`pointer`,fontSize:18},onClick:()=>O(!0)})})]})]}),(0,$.jsxs)(`div`,{ref:z,onClick:je,style:{height:4,background:`#e2e8f0`,cursor:`pointer`,position:`relative`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,left:0,top:0,height:`100%`,width:`${u>0?c/u*100:0}%`,background:`#6366f1`,borderRadius:`0 2px 2px 0`,transition:`width 0.1s linear`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,left:`${u>0?c/u*100:0}%`,top:-4,width:8,height:12,background:`#6366f1`,borderRadius:2,transform:`translateX(-50%)`,boxShadow:`0 0 8px rgba(99,102,241,0.3)`}})]})]}),(0,$.jsxs)(`div`,{style:{width:200,minWidth:160,maxWidth:200,background:`#ffffff`,borderLeft:`1px solid #e8ecf2`,display:`flex`,flexDirection:`column`,flexShrink:0,overflow:`hidden`,color:`#1e293b`},children:[(0,$.jsxs)(`div`,{style:{padding:`10px 12px`,borderBottom:`1px solid #eef2f7`,display:`flex`,alignItems:`center`,gap:4,flexShrink:0,flexWrap:`wrap`},children:[(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(kie,{}),children:`翻译`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(r8,{}),children:`剪辑`}),(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)($4,{}),children:`语言`})]}),(0,$.jsxs)(`div`,{style:{padding:`12px`,borderBottom:`1px solid #eef2f7`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,marginBottom:8},children:`目标语言`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[`中文`,`英文`,`日文`,`韩文`].map(e=>(0,$.jsx)(`div`,{onClick:()=>E(e),style:{padding:`6px 12px`,borderRadius:6,cursor:`pointer`,background:T===e?`rgba(99,102,241,0.1)`:`transparent`,color:T===e?`#6366f1`:`#64748b`,fontSize:13,transition:`all 0.2s`,border:T===e?`1px solid rgba(99,102,241,0.3)`:`1px solid transparent`},children:e},e))})]}),(0,$.jsxs)(`div`,{style:{padding:`12px`,flex:1,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,marginBottom:8},children:`剪辑描述`}),(0,$.jsx)(X9,{value:C,onChange:e=>w(e.target.value),placeholder:`选择一个视频片段,开始你的创作...`,style:{flex:1,minHeight:100,borderRadius:8,resize:`none`}})]}),Ie&&(0,$.jsxs)(`div`,{style:{padding:`10px 12px`,borderTop:`1px solid #eef2f7`,background:`#f8fafc`,flexShrink:0},children:[(0,$.jsx)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:6},children:`当前选中`}),(0,$.jsx)(`div`,{style:{fontSize:13,color:`#6366f1`,marginBottom:6,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:Ie.name}),(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2},children:[`时长 `,Ie.duration.toFixed(1),`s / 原始 `,Ie.originalDuration.toFixed(1),`s`]}),(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:8},children:[`起始 `,Ie.start.toFixed(1),`s · 裁剪 `,Ie.trimStart.toFixed(1),`s`]}),(Ie.type===`image`||Ie.type===`text`||Ie.type===`watermark`)&&(0,$.jsxs)(`div`,{style:{borderTop:`1px solid #e2e8f0`,paddingTop:8,marginBottom:8},children:[(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`透明度`}),(0,$.jsxs)(`span`,{children:[Math.round((Ie.opacity??1)*100),`%`]})]}),(0,$.jsx)(Zz,{min:0,max:1,step:.05,value:Ie.opacity??1,onChange:e=>me(Ie.id,`opacity`,e)})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:8},children:[(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`X位置`}),(0,$.jsxs)(`span`,{children:[Math.round(Ie.x??50),`%`]})]}),(0,$.jsx)(Zz,{min:0,max:100,value:Ie.x??50,onChange:e=>me(Ie.id,`x`,e)})]}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`Y位置`}),(0,$.jsxs)(`span`,{children:[Math.round(Ie.y??50),`%`]})]}),(0,$.jsx)(Zz,{min:0,max:100,value:Ie.y??50,onChange:e=>me(Ie.id,`y`,e)})]})]}),Ie.type===`image`&&(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:8},children:[(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`宽度`}),(0,$.jsxs)(`span`,{children:[Math.round(Ie.width??25),`%`]})]}),(0,$.jsx)(Zz,{min:3,max:100,value:Ie.width??25,onChange:e=>me(Ie.id,`width`,e)})]}),(0,$.jsxs)(`div`,{style:{flex:1},children:[(0,$.jsxs)(`div`,{style:{fontSize:11,color:`#64748b`,marginBottom:2,display:`flex`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`高度`}),(0,$.jsxs)(`span`,{children:[Math.round(Ie.height??20),`%`]})]}),(0,$.jsx)(Zz,{min:3,max:100,value:Ie.height??20,onChange:e=>me(Ie.id,`height`,e)})]})]}),(0,$.jsx)(`div`,{style:{fontSize:11,color:`#94a3b8`},children:`在预览区拖拽移动,拖拽边缘缩放`})]}),(0,$.jsxs)(`div`,{style:{marginTop:12,padding:10,background:`#f8fafc`,borderRadius:8,border:`1px solid #e8ecf2`},children:[(0,$.jsxs)(`div`,{style:{fontSize:12,fontWeight:500,color:`#334155`,marginBottom:8,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{children:`图层顺序`}),(0,$.jsxs)(_Q,{color:`blue`,style:{margin:0},children:[`层级 `,Ie.zIndex??0]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(J0,{}),onClick:()=>Oe(Ie.id),disabled:(Ie.zIndex??0)>=10,style:{flex:1},children:`上移`}),(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)(z0,{}),onClick:()=>ke(Ie.id),disabled:(Ie.zIndex??0)<=0,style:{flex:1},children:`下移`})]}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#94a3b8`,marginTop:6},children:`数值越大越靠上`})]}),(0,$.jsx)(X,{size:`small`,danger:!0,icon:(0,$.jsx)(jQ,{}),onClick:()=>De(Ie.id),style:{width:`100%`,marginTop:12},children:`删除片段`})]})]})]}),(0,$.jsxs)(`div`,{style:{height:180,background:`#ffffff`,borderTop:`1px solid #e8ecf2`,flexShrink:0},children:[(0,$.jsxs)(`div`,{style:{height:36,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 16px`,background:`#f8fafc`,borderBottom:`1px solid #e8ecf2`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,icon:(0,$.jsx)($Q,{}),children:`轨道`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`},children:[o.length,` 个片段 · `,ie(u)]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:(0,$.jsx)(Zz,{value:v,onChange:y,style:{width:100},tooltip:{formatter:e=>`缩放 ${e}%`}})})]}),(0,$.jsx)(`div`,{style:{position:`relative`,height:20,padding:`0 16px 0 72px`,overflow:`hidden`,background:`#f8fafc`},children:(0,$.jsx)(`div`,{style:{position:`absolute`,left:0,right:0,top:0,bottom:0},children:Ze.map(e=>(0,$.jsx)(`div`,{style:{position:`absolute`,left:`${Se(e)}%`,top:0,width:1,height:e%($e*5)==0?20:10,background:e%($e*5)==0?`#94a3b8`:`#cbd5e1`},children:e%($e*5)==0&&(0,$.jsx)(`span`,{style:{position:`absolute`,top:2,left:-16,fontSize:10,color:`#64748b`},children:ie(e).slice(3)})},e))})}),(0,$.jsxs)(`div`,{ref:H,style:{position:`relative`,height:120,padding:`0 16px 0 72px`,display:`flex`,flexDirection:`column`},children:[o.length===0&&(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`从左侧选择素材,添加到时间线开始创作。`}),(0,$.jsxs)(`div`,{ref:U,onClick:Ce,style:{position:`relative`,flex:1,cursor:`crosshair`},children:[[`video`,`audio`,`image`,`text`,`watermark`].map(e=>{let t=o.filter(t=>t.type===e);if(t.length===0)return null;let n=Z9[e];return(0,$.jsxs)(`div`,{style:{display:`flex`,height:28,marginBottom:2,position:`relative`},children:[(0,$.jsxs)(`div`,{style:{position:`absolute`,left:-64,top:2,width:60,height:24,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,fontSize:10,color:`#475569`,background:n.bg,border:`1px solid ${n.border}`,borderRadius:6,padding:`0 6px`},children:[n.icon,(0,$.jsx)(`span`,{style:{fontWeight:500},children:Pe.find(t=>t.key===e)?.label})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:28},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,left:0,right:0,bottom:0,height:1,background:`#f1f5f9`}}),t.map(e=>{let t=b===e.id,r=Se(e.start),i=Se(e.duration);return(0,$.jsxs)(`div`,{onClick:t=>{t.stopPropagation(),x(e.id)},onMouseDown:t=>Te(t,e,`move`),style:{position:`absolute`,left:`${r}%`,width:`${i}%`,height:22,top:2,background:t?n.bgActive:n.bg,border:`1px solid ${t?n.borderActive:n.border}`,borderRadius:6,cursor:`grab`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`0 10px`,overflow:`hidden`,transition:`background 0.15s, border-color 0.15s`,userSelect:`none`,boxShadow:t?`0 2px 8px rgba(99,102,241,0.25)`:`0 1px 2px rgba(0,0,0,0.04)`},title:`${e.name} · ${e.duration.toFixed(1)}s`,children:[(0,$.jsx)(`span`,{style:{fontSize:11,color:`#334155`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontWeight:500},children:e.name}),(0,$.jsx)(`div`,{onMouseDown:t=>Te(t,e,`trimLeft`),style:{position:`absolute`,left:-3,top:`50%`,transform:`translateY(-50%)`,width:6,height:16,background:t?`#6366f1`:`#94a3b8`,borderRadius:2,cursor:`ew-resize`,zIndex:2,flexShrink:0}}),(0,$.jsx)(`div`,{onMouseDown:t=>Te(t,e,`trimRight`),style:{position:`absolute`,right:-3,top:`50%`,transform:`translateY(-50%)`,width:6,height:16,background:t?`#6366f1`:`#94a3b8`,borderRadius:2,cursor:`ew-resize`,zIndex:2,flexShrink:0}})]},e.id)})]})]},e)}),o.length>0&&(0,$.jsx)(`div`,{ref:B,onMouseDown:we,style:{position:`absolute`,left:`${Se(c)}%`,top:0,bottom:0,width:2,marginLeft:-1,background:`#ef4444`,cursor:`ew-resize`,zIndex:10,transition:`left 0.05s linear`},children:(0,$.jsx)(`div`,{style:{position:`absolute`,top:-2,left:-4,width:10,height:10,background:`#ef4444`,borderRadius:`50%`,boxShadow:`0 0 8px rgba(239,68,68,0.5)`,cursor:`grab`}})})]})]})]}),D&&(0,$.jsxs)(`div`,{style:{position:`fixed`,inset:0,background:`#000`,zIndex:9999,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},onClick:()=>O(!1),children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:16,right:16,zIndex:10},children:(0,$.jsx)(X,{icon:(0,$.jsx)(W4,{}),onClick:()=>O(!1),style:{background:`rgba(255,255,255,0.1)`,color:`#fff`,border:`none`},children:`退出全屏`})}),o.length>0&&(0,$.jsxs)(`div`,{style:{position:`relative`,maxWidth:`90vw`,maxHeight:`85vh`,borderRadius:12,overflow:`hidden`},onClick:e=>e.stopPropagation(),children:[Re?.type===`video`&&Re.url&&(0,$.jsx)(`video`,{src:Re.url,autoPlay:!0,onTimeUpdate:Ae,onLoadedMetadata:e=>d(e.target.duration),style:{maxWidth:`90vw`,maxHeight:`85vh`,objectFit:`contain`}}),Re?.type===`image`&&Re.url&&(0,$.jsx)(`img`,{src:Re.url,alt:Re.name,style:{maxWidth:`90vw`,maxHeight:`85vh`,objectFit:`contain`}}),Be.filter(e=>e.type===`text`).map(e=>(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:48,left:`50%`,transform:`translateX(-50%)`,fontSize:36,fontWeight:700,color:`#fff`,textShadow:`0 2px 12px rgba(0,0,0,0.8)`},children:e.text||e.name},e.id)),Be.filter(e=>e.type===`watermark`).map(e=>(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:20,right:20,fontSize:18,color:`rgba(255,255,255,${e.opacity??.4})`,fontWeight:500},children:e.text||e.name},e.id))]}),(0,$.jsxs)(`div`,{style:{position:`absolute`,bottom:24,display:`flex`,alignItems:`center`,gap:16,color:`#fff`},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`span`,{style:{fontFamily:`monospace`},children:[ie(c),` / `,ie(u)]}),(0,$.jsx)(X,{type:`text`,icon:f?(0,$.jsx)(c6,{style:{color:`#fff`,fontSize:32}}):(0,$.jsx)(M6,{style:{color:`#fff`,fontSize:32}}),onClick:He})]})]}),(0,$.jsxs)(EG,{title:N===`watermark`?`添加水印`:`添加文本`,open:k,onOk:se,onCancel:()=>A(!1),okText:`确定`,cancelText:`取消`,width:440,children:[(0,$.jsx)(`div`,{style:{marginBottom:8,fontSize:13,color:`#64748b`},children:N===`watermark`?`输入水印文字,将作为半透明叠加层显示在视频右下角`:`输入文本内容,将作为字幕或标题叠加在视频上`}),(0,$.jsx)(X9,{value:j,onChange:e=>M(e.target.value),placeholder:N===`watermark`?`请输入水印文字...`:`请输入文本内容...`,autoSize:{minRows:2,maxRows:5},autoFocus:!0,onPressEnter:se})]}),(0,$.jsx)(Ule,{open:F,onClose:()=>I(!1),mediaType:n===`image`?`image`:`video`,onSelect:e=>{let t=e.videoUrl||e.imageUrl||``;if(!t){Z.warning(`无法获取媒体地址`);return}let n=e.videoUrl?`video`:`image`,i=t.startsWith(`http`)?t:`https://ceshi.apiforeign.minzhongzc.com${t}`,o=e.title||e.id||`导入素材`,s={id:`${Date.now()}-${Math.random()}`,type:n,name:o,url:i};a(e=>[...e,s]),r(n),he(s),Z.success(`已从资产导入:${o}`)}})]})},{TextArea:Q9}=JU,Gle=()=>{let e=Ye(),[t,n]=(0,S.useState)([{id:`demo-1`,name:`示例项目`,description:`这是一个视频剪辑示例项目`,createdAt:(0,GE.default)().subtract(2,`day`).format(`YYYY-MM-DD HH:mm`),updatedAt:(0,GE.default)().subtract(1,`day`).format(`YYYY-MM-DD HH:mm`)}]),[r,i]=(0,S.useState)(!1),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(null),[l,u]=(0,S.useState)({name:``,description:``}),d=()=>{if(!l.name.trim()){Z.warning(`请输入项目名称`);return}let t={id:`proj-${Date.now()}`,name:l.name.trim(),description:l.description.trim(),createdAt:(0,GE.default)().format(`YYYY-MM-DD HH:mm`),updatedAt:(0,GE.default)().format(`YYYY-MM-DD HH:mm`)};n(e=>[t,...e]),i(!1),u({name:``,description:``}),Z.success(`项目创建成功`),e(`/videoediting?id=${t.id}`)},f=e=>{c(e),u({name:e.name,description:e.description}),o(!0)},p=()=>{if(s){if(!l.name.trim()){Z.warning(`请输入项目名称`);return}n(e=>e.map(e=>e.id===s.id?{...e,name:l.name.trim(),description:l.description.trim(),updatedAt:(0,GE.default)().format(`YYYY-MM-DD HH:mm`)}:e)),o(!1),c(null),u({name:``,description:``}),Z.success(`项目已更新`)}},m=e=>{n(t=>t.filter(t=>t.id!==e)),Z.success(`项目已删除`)},h=t=>{e(`/videoediting?id=${t.id}`)},g=e=>({items:[{key:`rename`,icon:(0,$.jsx)($Q,{}),label:`重命名`,onClick:()=>f(e)},{key:`delete`,icon:(0,$.jsx)(jQ,{}),label:`删除`,danger:!0,onClick:()=>{EG.confirm({title:`确认删除`,content:`确定要删除项目「${e.name}」吗?`,okText:`删除`,cancelText:`取消`,okButtonProps:{danger:!0},onOk:()=>m(e.id)})}}]});return(0,$.jsxs)(`div`,{className:`content_box`,style:{background:`#fff`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:24},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{style:{margin:0,fontSize:22,fontWeight:600,color:`#1e293b`},children:`视频剪辑项目`}),(0,$.jsx)(`p`,{style:{margin:`4px 0 0`,fontSize:13,color:`#64748b`},children:`创建和管理你的视频剪辑项目`})]}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(BI,{}),size:`large`,onClick:()=>{u({name:``,description:``}),i(!0)},children:`创建项目`})]}),t.length===0?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:400},children:(0,$.jsx)(lC,{image:lC.PRESENTED_IMAGE_SIMPLE,description:(0,$.jsx)(`span`,{style:{color:`#64748b`},children:`暂无项目,点击「创建项目」开始剪辑`}),children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(BI,{}),onClick:()=>{u({name:``,description:``}),i(!0)},children:`创建项目`})})}):(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(280px, 1fr))`,gap:16},children:t.map(e=>(0,$.jsxs)(_L,{hoverable:!0,style:{borderRadius:12,overflow:`hidden`,transition:`all 0.2s ease`,border:`1px solid #e8ecf2`},bodyStyle:{padding:0},children:[(0,$.jsxs)(`div`,{onClick:()=>h(e),style:{height:160,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,position:`relative`},children:[(0,$.jsx)(L8,{style:{fontSize:48,color:`rgba(255,255,255,0.8)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:8,right:8},children:(0,$.jsx)(xV,{menu:g(e),trigger:[`click`],placement:`bottomRight`,children:(0,$.jsx)(X,{type:`text`,size:`small`,icon:(0,$.jsx)(kE,{style:{color:`#fff`,fontSize:18}}),style:{background:`rgba(0,0,0,0.3)`,borderRadius:6},onClick:e=>e.stopPropagation()})})})]}),(0,$.jsxs)(`div`,{onClick:()=>h(e),style:{padding:`14px 16px`,cursor:`pointer`},children:[(0,$.jsx)(`div`,{style:{fontSize:15,fontWeight:600,color:`#1e293b`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,marginBottom:4},children:e.name}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,marginBottom:8},children:e.description||`暂无描述`}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,fontSize:12,color:`#94a3b8`},children:(0,$.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(bB,{}),e.updatedAt]})})]})]},e.id))}),(0,$.jsx)(EG,{title:`创建视频剪辑项目`,open:r,onOk:d,onCancel:()=>i(!1),okText:`创建并开始剪辑`,cancelText:`取消`,width:480,children:(0,$.jsxs)(`div`,{style:{paddingTop:8},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`label`,{style:{display:`block`,marginBottom:6,fontSize:13,fontWeight:500,color:`#475569`},children:`项目名称`}),(0,$.jsx)(JU,{placeholder:`请输入项目名称`,value:l.name,onChange:e=>u(t=>({...t,name:e.target.value})),maxLength:30})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{style:{display:`block`,marginBottom:6,fontSize:13,fontWeight:500,color:`#475569`},children:`项目描述(可选)`}),(0,$.jsx)(Q9,{placeholder:`请输入项目描述`,value:l.description,onChange:e=>u(t=>({...t,description:e.target.value})),rows:3,maxLength:100})]})]})}),(0,$.jsx)(EG,{title:`编辑项目`,open:a,onOk:p,onCancel:()=>{o(!1),c(null)},okText:`保存`,cancelText:`取消`,width:480,children:(0,$.jsxs)(`div`,{style:{paddingTop:8},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(`label`,{style:{display:`block`,marginBottom:6,fontSize:13,fontWeight:500,color:`#475569`},children:`项目名称`}),(0,$.jsx)(JU,{placeholder:`请输入项目名称`,value:l.name,onChange:e=>u(t=>({...t,name:e.target.value})),maxLength:30})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{style:{display:`block`,marginBottom:6,fontSize:13,fontWeight:500,color:`#475569`},children:`项目描述(可选)`}),(0,$.jsx)(Q9,{placeholder:`请输入项目描述`,value:l.description,onChange:e=>u(t=>({...t,description:e.target.value})),rows:3,maxLength:100})]})]})})]})};GE.default.locale(`zh-cn`);var $9=({children:e})=>{let{user:t,loading:n,checkAuth:r}=$5();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,$.jsx)(tG,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=$5();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(jm,{locale:e0.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8,fontFamily:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif`},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,$.jsx)(ex,{children:(0,$.jsx)(_n,{children:(0,$.jsxs)(Dt,{children:[(0,$.jsx)(Tt,{path:`/login`,element:(0,$.jsx)(mse,{})}),(0,$.jsx)(Tt,{path:`/join-team`,element:(0,$.jsx)(Rle,{})}),(0,$.jsx)(Tt,{path:`/private-portrait-authorized`,element:(0,$.jsx)(Ble,{})}),(0,$.jsxs)(Tt,{path:`/`,element:(0,$.jsx)($9,{children:(0,$.jsx)(fse,{})}),children:[(0,$.jsx)(Tt,{index:!0,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})}),(0,$.jsx)(Tt,{path:`projects`,element:(0,$.jsx)(vse,{})}),(0,$.jsx)(Tt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(Ise,{})}),(0,$.jsx)(Tt,{path:`records`,element:(0,$.jsx)(Lse,{})}),(0,$.jsx)(Tt,{path:`credits`,element:(0,$.jsx)(Rse,{})}),(0,$.jsx)(Tt,{path:`credit-records`,element:(0,$.jsx)(M7,{})}),(0,$.jsx)(Tt,{path:`order-records`,element:(0,$.jsx)(M7,{})}),(0,$.jsx)(Tt,{path:`user-center`,element:(0,$.jsx)(M7,{})}),(0,$.jsx)(Tt,{path:`messages`,element:(0,$.jsx)(Use,{})}),(0,$.jsx)(Tt,{path:`home`,element:(0,$.jsx)(Ale,{})}),(0,$.jsx)(Tt,{path:`conversation`,element:(0,$.jsx)(Tce,{})}),(0,$.jsx)(Tt,{path:`initial`,element:(0,$.jsx)(jce,{})}),(0,$.jsx)(Tt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(Lce,{})}),(0,$.jsx)(Tt,{path:`removelens`,element:(0,$.jsx)(Wce,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(wle,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(K9,{})}),(0,$.jsx)(Tt,{path:`generated`,element:(0,$.jsx)(Qce,{})}),(0,$.jsx)(Tt,{path:`pretest`,element:(0,$.jsx)(ele,{})}),(0,$.jsx)(Tt,{path:`authorization`,element:(0,$.jsx)(nle,{})}),(0,$.jsx)(Tt,{path:`authoriza-waiting`,element:(0,$.jsx)(Nle,{})}),(0,$.jsx)(Tt,{path:`materials`,element:(0,$.jsx)(ule,{})}),(0,$.jsx)(Tt,{path:`materials/private-portrait-virtual`,element:(0,$.jsx)(Ct,{to:`/generated?filterType=private_portrait&portraitTab=aigc_virtual`,replace:!0})}),(0,$.jsx)(Tt,{path:`consume`,element:(0,$.jsx)(Mle,{})}),(0,$.jsx)(Tt,{path:`popular`,element:(0,$.jsx)(Ple,{})}),(0,$.jsx)(Tt,{path:`authacc`,element:(0,$.jsx)(ile,{})}),(0,$.jsx)(Tt,{path:`creativeplaza`,element:(0,$.jsx)(Fle,{})}),(0,$.jsx)(Tt,{path:`team-management`,element:(0,$.jsx)(Lle,{})}),(0,$.jsx)(Tt,{path:`invoice`,element:(0,$.jsx)(Vle,{})}),(0,$.jsx)(Tt,{path:`videoprojects`,element:(0,$.jsx)(Gle,{})})]}),(0,$.jsx)(Tt,{path:`/videoediting`,element:(0,$.jsx)($9,{children:(0,$.jsx)(Wle,{})})}),(0,$.jsx)(Tt,{path:`*`,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})})]})})})})},{})); \ No newline at end of file diff --git a/video-gen-app/dist/index.html b/video-gen-app/dist/index.html index a541e895..11bb336c 100644 --- a/video-gen-app/dist/index.html +++ b/video-gen-app/dist/index.html @@ -27,7 +27,7 @@ 民众智创 - +