super-agent-sdk 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/widget.cjs CHANGED
@@ -1,33 +1,33 @@
1
- "use strict";var H0=Object.defineProperty;var V0=(e,t,n)=>t in e?H0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var J=(e,t,n)=>V0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),hm=require("react-dom/client"),S=require("react/jsx-runtime"),zn=require("./nosUploader-BD9gHyMF.cjs"),po=require("react-dom");function W0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=W0(b);function bm(e){const{sdk:t,sessionId:n,onSessionCreated:r,onRoundStart:o,onStreamStart:i,onStreamEnd:a,onError:s,onMessageSend:l}=e,[c,u]=b.useState([]),[d,f]=b.useState("ready"),[p,h]=b.useState(null),m=b.useRef(new Map),w=b.useRef(new Map),y=b.useRef(n),$=b.useRef(!0),x=b.useRef(c);y.current=n,$.current=c.length===0,x.current=c;const E=b.useCallback((z,D)=>{if(z===y.current)u(M=>{const L=w.current.get(z)??M,_=D(L);return w.current.set(z,_),_});else{const M=w.current.get(z)??[];w.current.set(z,D(M))}},[]),v=b.useCallback((z,D)=>{const M=m.current.get(z);M!=null&&M.stopTimer&&(clearTimeout(M.stopTimer),M.stopTimer=null),m.current.delete(z),w.current.delete(z),z===y.current&&f(D)},[]);b.useEffect(()=>{const z=n?m.current.get(n):void 0;f(z!=null&&z.busy?"streaming":"ready")},[n]);const C=b.useRef(()=>{}),I=b.useCallback((z,D,M)=>{var ne;const L=y.current;if(L&&((ne=m.current.get(L))!=null&&ne.busy))return;if(L){const F=q0(x.current);if(F){l==null||l(z),C.current(F,{action:"submit",value:z});return}}l==null||l(z);const _=M??z,V={id:`user_${Date.now()}`,role:"user",parts:[...(D??[]).map(F=>({type:"attachment",attachment:F})),{type:"text",content:_}],timestamp:Date.now(),rawContent:M!=null&&M!==z?z:void 0},X=`assistant_${Date.now()}`,P={id:X,role:"assistant",parts:[],timestamp:Date.now()},Y=$.current,K=x.current;u(F=>[...F,V,P]),L&&w.current.set(L,[...K,V,P]),f("submitted"),h(null);const T=F=>{let U="",re=0,j="",H=[],ee=!1,oe,B=null;w.current.has(F)||w.current.set(F,[...K,V,P]);const ie={abortController:null,busy:!0,stopTimer:null};m.current.set(F,ie);const ae=()=>{U&&(H.push({type:"thinking",content:U,durationMs:Date.now()-re}),U="",re=0)},Se=()=>{j&&(H.push({type:"text",content:j}),j="")},ye=()=>{const q=[...H];U&&q.push({type:"thinking",content:U,durationMs:Date.now()-re}),j&&q.push({type:"text",content:j}),E(F,me=>me.map(he=>he.id===X?{...he,parts:q,...oe?{roundId:oe}:{}}:he))};ie.abortController=t.chat({sessionId:F,message:z,attachments:D&&D.length>0?D:void 0,stream:!0,onMessage:q=>{switch(ee||(ee=!0,F===y.current&&f("streaming")),q.type){case"session.start":q.roundId&&(oe=q.roundId,o==null||o(q.roundId));break;case"user":q.content&&(B=q.content,E(F,me=>me.map(he=>he.id===V.id?{...he,parts:he.parts.map(se=>se.type==="text"?{...se,content:q.content}:se)}:he)));break;case"thinking":Se(),U||(re=Date.now()),U+=q.content;break;case"ai":ae(),j+=q.content;break;case"tool_call":ae(),Se(),H.push({type:"tool_call",toolName:q.toolName,toolCallId:q.toolCallId,args:q.args??"{}"});break;case"tool_result":ae(),Se(),H.push({type:"tool_result",toolName:q.toolName??"",toolCallId:q.toolCallId,content:q.content,artifacts:q.artifacts,renderMode:q.renderMode,html:q.html,markdown:q.markdown,defaultExpanded:q.defaultExpanded});break;case"interrupt":ae(),Se(),q.interrupt&&H.push({type:"interrupt",interrupt:q.interrupt,resolved:!1}),ye(),v(F,"ready");return;case"stop":q.content&&(j=q.content),ye();return}ye()},onDone:q=>{if((j||H.length>0||U)&&ye(),q.artifacts&&q.artifacts.length>0){const he=q.artifacts;E(F,se=>se.map(ue=>ue.id===X?{...ue,artifacts:he}:ue))}if(q.messageId){const he=q.messageId;E(F,se=>se.map(ue=>ue.id===X?{...ue,messageId:he}:ue))}const me=()=>{v(F,"ready"),a==null||a(q.sessionId||F)};if(Y){const he=(B??_).slice(0,30),se=q.sessionId||F;t.renameConversation(se,he).catch(()=>{}).finally(me)}else me()},onError:q=>{H.push({type:"error",content:q.message}),ye(),F===y.current&&(h(q),f("error")),s==null||s(q),v(F,"error")}}),i==null||i(F)};L?T(L):t.createSession().then(F=>{y.current==null&&(y.current=F,r==null||r(F)),T(F)}).catch(F=>{y.current==null&&(h(F instanceof Error?F:new Error(String(F))),f("error")),s==null||s(F instanceof Error?F:new Error(String(F)))})},[t,r,i,a,s,l,E,v]),N=b.useCallback(()=>{const z=y.current;if(!z)return;const D=m.current.get(z);D!=null&&D.busy&&(D.stopTimer&&clearTimeout(D.stopTimer),D.stopTimer=setTimeout(()=>{var M;D.stopTimer=null,(M=D.abortController)==null||M.abort(),v(z,"ready")},8e3),t.stopGeneration(z).catch(()=>{}))},[t,v]),A=b.useCallback(()=>{var _;const z=y.current;if(z&&((_=m.current.get(z))!=null&&_.busy))return;const D=c.findLastIndex(V=>V.role==="user");if(D<0)return;const M=c[D].rawContent??c[D].parts.filter(V=>V.type==="text").map(V=>V.content).join(""),L=c[D].parts.filter(V=>V.type==="attachment").map(V=>V.attachment);u(V=>V.slice(0,D)),I(M,L.length>0?L:void 0)},[c,I]),k=b.useCallback((z,D)=>{var re;const M=y.current;if(!M||(re=m.current.get(M))!=null&&re.busy)return;E(M,j=>j.map(H=>({...H,parts:H.parts.map(ee=>ee.type==="interrupt"&&ee.interrupt.interruptId===z?{...ee,resolved:!0,response:D}:ee)})));const L={abortController:null,busy:!0,stopTimer:null};m.current.set(M,L);const _=new AbortController;L.abortController=_;let V=0;E(M,j=>j.length>0&&j[j.length-1].role==="assistant"?(V=j[j.length-1].parts.length,j):(V=0,[...j,{id:`assistant_${Date.now()}`,role:"assistant",parts:[],timestamp:Date.now()}])),f("streaming");let X="",P=0,Y="",K=[],T;const ne=()=>{X&&(K.push({type:"thinking",content:X,durationMs:Date.now()-P}),X="",P=0)},F=()=>{Y&&(K.push({type:"text",content:Y}),Y="")},U=()=>{const j=[...K];X&&j.push({type:"thinking",content:X,durationMs:Date.now()-P}),Y&&j.push({type:"text",content:Y}),E(M,H=>{const ee=H.findLastIndex(oe=>oe.role==="assistant");return ee<0?H:H.map((oe,B)=>B===ee?{...oe,parts:[...oe.parts.slice(0,V),...j],...T?{roundId:T}:{}}:oe)})};t.respondInterrupt(z,M,D,j=>{let H=!1;switch(j.type){case"session.start":j.roundId&&(T=j.roundId);break;case"thinking":F(),X||(P=Date.now()),X+=j.content;break;case"ai":ne(),Y+=j.content;break;case"tool_call":ne(),F(),K.push({type:"tool_call",toolName:j.toolName,toolCallId:j.toolCallId,args:j.args??"{}"});break;case"tool_result":ne(),F(),K.push({type:"tool_result",toolName:j.toolName??"",toolCallId:j.toolCallId,content:j.content,artifacts:j.artifacts,renderMode:j.renderMode,html:j.html,markdown:j.markdown,defaultExpanded:j.defaultExpanded});break;case"interrupt":ne(),F(),j.interrupt&&K.push({type:"interrupt",interrupt:j.interrupt,resolved:!1}),H=!0;break;case"stop":j.content&&(Y=j.content),a==null||a(M),H=!0;break;case"done":{const ee=j.artifacts&&j.artifacts.length>0?j.artifacts:void 0;(j.messageId||ee)&&E(M,oe=>{const B=oe.findLastIndex(ie=>ie.role==="assistant");return B<0?oe:oe.map((ie,ae)=>ae===B?{...ie,...j.messageId?{messageId:j.messageId}:{},...ee?{artifacts:ee}:{}}:ie)}),a==null||a(M),H=!0;break}}U(),H&&v(M,"ready")},j=>{K.push({type:"error",content:j.message}),U(),M===y.current&&(h(j),f("error")),s==null||s(j),v(M,"error")},_.signal).catch(j=>{if((j==null?void 0:j.name)==="AbortError"){v(M,"ready");return}M===y.current&&(h(j instanceof Error?j:new Error(String(j))),f("error")),s==null||s(j instanceof Error?j:new Error(String(j))),v(M,"error")})},[t,s,a,E,v]);C.current=k;const R=b.useCallback((z,D)=>{y.current=z;const M=D??w.current.get(z)??[];w.current.set(z,M),u(M)},[]),O=b.useCallback(z=>m.current.has(z)?w.current.get(z)??null:null,[]);return{messages:c,status:d,error:p,sendMessage:I,stop:N,regenerate:A,setMessages:u,showSession:R,getLiveMessages:O,respondToInterrupt:k}}function q0(e){for(let t=e.length-1;t>=0;t--)for(let n=e[t].parts.length-1;n>=0;n--){const r=e[t].parts[n];if(r.type==="interrupt"&&!r.resolved&&r.interrupt.interruptId)return r.interrupt.interruptId}return null}const xm="sa_active_conversation",vs=20;function vd(e){try{return localStorage.getItem(`${xm}_${e}`)}catch{return null}}function X0(e,t){try{const n=`${xm}_${e}`;t?localStorage.setItem(n,t):localStorage.removeItem(n)}catch{}}function ym(e){const{sdk:t,onConversationChange:n}=e,r=t.botCode,[o,i]=b.useState([]),[a,s]=b.useState(()=>vd(r)),[l,c]=b.useState(!1),[u,d]=b.useState(!0),f=b.useRef(!0),p=b.useRef(1),h=b.useRef(!1);b.useEffect(()=>()=>{f.current=!1},[]);const m=b.useCallback(I=>{s(I),X0(r,I),I&&(n==null||n(I))},[r,n]),w=b.useCallback(async()=>{if(!h.current){h.current=!0,c(!0);try{p.current=1;const I=await t.listConversations({page:1,size:vs});if(!f.current)return;i(I.items),d(I.items.length<I.total);const N=vd(r);N&&!I.items.find(A=>A.sessionId===N)&&m(null)}catch{}finally{h.current=!1,f.current&&c(!1)}}},[t,m]),y=b.useCallback(async()=>{if(!(h.current||!u)){h.current=!0,c(!0);try{const I=p.current+1,N=await t.listConversations({page:I,size:vs});if(!f.current)return;p.current=I,i(k=>{const R=new Set(k.map(z=>z.sessionId)),O=N.items.filter(z=>!R.has(z.sessionId));return[...k,...O]});const A=p.current*vs;d(A<N.total)}catch{}finally{h.current=!1,f.current&&c(!1)}}},[t,u]),$=b.useCallback(async(I,N)=>(m(I),(N==null?void 0:N.fetchHistory)===!1?[]:await t.getMessages(I)),[t,m]),x=b.useCallback(async()=>{try{const I=await t.createSession(),N=new Date().toISOString();i(A=>[{sessionId:I,title:"新对话",createTime:N,updateTime:N},...A]),m(I)}catch{m(null)}},[t,m]),E=b.useCallback(async I=>{i(N=>N.filter(A=>A.sessionId!==I)),a===I&&m(null);try{await t.deleteConversation(I)}catch{}},[t,a,m]),v=b.useCallback(async(I,N)=>{await t.renameConversation(I,N),i(A=>A.map(k=>k.sessionId===I?{...k,title:N}:k))},[t]),{enabled:C=!0}=e;return b.useEffect(()=>{C&&w()},[C,w]),{conversations:o,activeConversationId:a,loading:l,hasMore:u,loadConversations:w,loadMore:y,switchConversation:$,newConversation:x,deleteConversation:E,renameConversation:v,setActiveConversationId:m}}function wm(e){return!e&&e!==0?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function vm(e){return e==="pdf"?"PDF":e==="docx"?"DOC":e==="html"?"HTM":e==="md"?"MD":e.slice(0,3).toUpperCase()||"FILE"}function U0(e,t){var o;const n=(e||"").toLowerCase();if(n.includes("html"))return"html";if(n.includes("markdown"))return"md";if(n.includes("pdf"))return"pdf";if(n.includes("wordprocessingml")||n==="application/msword")return"docx";const r=((o=(t||"").split(".").pop())==null?void 0:o.toLowerCase())??"";return r==="htm"||r==="html"?"html":r==="md"||r==="markdown"?"md":r==="pdf"?"pdf":r==="doc"||r==="docx"?"docx":r}function Cm(e){if(!e)return[];const t=[];for(const n of e)if(n.type==="file"&&n.data){const r=n.data.name??n.data.filename??"",o=n.data.mime??n.data.mime_type??n.data.mimeType;t.push({id:n.data.id??"",type:n.data.fileType??n.data.type??U0(o,r),filename:r,url:n.data.url??"",mime:o,size:n.data.size,summary:n.data.summary})}return t}async function pa(e){try{const t=await fetch(e.url);if(!t.ok)throw new Error(`HTTP ${t.status}`);const n=await t.blob(),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=e.filename,document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(r),4e3)}catch{const t=document.createElement("a");t.href=e.url,t.download=e.filename,t.target="_blank",document.body.appendChild(t),t.click(),t.remove()}}const G0=632,K0=640,Sm=b.createContext(null);function Fn(){const e=b.useContext(Sm);if(!e)throw new Error("useChatContext must be used within ChatProvider");return e}function fl({sdk:e,hooks:t,attachmentUploader:n,nosUpload:r,mode:o="floating",children:i}){const[a,s]=b.useState(!1),[l,c]=b.useState(!1),[u,d]=b.useState(null),[f,p]=b.useState(null),[h,m]=b.useState(!1),[w,y]=b.useState(!1),[$,x]=b.useState(null),[E,v]=b.useState(0),[C,I]=b.useState("split"),[N,A]=b.useState(!1),k=b.useCallback(H=>x(H),[]);b.useLayoutEffect(()=>{if(!$){v(0);return}const H=()=>{const oe=$.getBoundingClientRect().width;if(v(B=>B===oe?B:oe),o!=="fullpage"){I(B=>B==="cover"?B:"cover");return}I(B=>B==="cover"&&oe>=K0?"split":B==="split"&&oe<G0?"cover":B)};if(H(),typeof ResizeObserver>"u")return;const ee=new ResizeObserver(H);return ee.observe($),()=>ee.disconnect()},[$,o]),b.useEffect(()=>{l||A(!1)},[l]),b.useEffect(()=>{e.getToken().then(()=>{m(!0)}).catch(()=>{m(!0)})},[e]);const R=ym({sdk:e,onConversationChange:t==null?void 0:t.onConversationChange,enabled:h}),O=bm({sdk:e,sessionId:R.activeConversationId,onSessionCreated:H=>{R.setActiveConversationId(H)},onStreamStart:t==null?void 0:t.onStreamStart,onStreamEnd:H=>{var ee;(ee=t==null?void 0:t.onStreamEnd)==null||ee.call(t,H),R.loadConversations()},onError:t==null?void 0:t.onError,onMessageSend:t==null?void 0:t.onMessageSend}),z=b.useCallback(H=>{if(H.type==="link"){window.open(H.url,H.target??"_blank","noopener");return}p(H)},[]),D=b.useCallback(()=>p(null),[]),M=b.useRef(0),L=b.useCallback(async H=>{p(null),c(!1);const ee=++M.current;if(O.getLiveMessages(H)){await R.switchConversation(H,{fetchHistory:!1}),O.showSession(H),y(!1);return}y(!0);try{const oe=await R.switchConversation(H);if(M.current!==ee)return;O.showSession(H,oe)}finally{M.current===ee&&y(!1)}},[R,O]),_=b.useCallback(async()=>{p(null),c(!1),O.setMessages([]),await R.newConversation()},[R,O]),V=b.useCallback(async H=>{R.activeConversationId===H&&O.setMessages([]),await R.deleteConversation(H)},[R,O]);b.useEffect(()=>{R.activeConversationId&&O.messages.length===0&&(y(!0),e.getMessages(R.activeConversationId).then(H=>{O.setMessages(H)}).catch(()=>{}).finally(()=>y(!1)))},[]);const X=b.useCallback(()=>{s(H=>!H)},[]),P=b.useCallback(H=>{s(H)},[]),Y=b.useCallback(()=>{c(H=>!H),d(H=>null)},[]),K=b.useCallback(H=>{d(H),c(!0)},[]),T=b.useMemo(()=>{const H=new Set,ee=[];for(const oe of O.messages)if(oe.role==="assistant"&&oe.artifacts)for(const B of Cm(oe.artifacts)){const ie=B.id||`${B.url}:${B.filename}`;H.has(ie)||(H.add(ie),ee.push(B))}return ee},[O.messages]),ne=b.useCallback(async H=>{const ee=R.activeConversationId;if(!ee)return null;try{const oe=await e.getMessages(ee);O.setMessages(oe);const B=H?oe.filter(ie=>ie.role==="assistant"&&ie.roundId===H).pop():oe.findLast(ie=>ie.role==="assistant");return(B==null?void 0:B.messageId)??null}catch{return null}},[e,R.activeConversationId,O]),F=b.useCallback(H=>{if(typeof H!="string")return{messageId:H.messageId,roundId:H.roundId};const ee=O.messages.find(oe=>oe.id===H||oe.messageId===H);return ee?{messageId:ee.messageId,roundId:ee.roundId}:/^(user|assistant)_/.test(H)?{}:{messageId:H}},[O.messages]),U=b.useCallback((H,ee,oe)=>{const{messageId:B,roundId:ie}=F(H);if(B){e.feedback(B,ee,oe).catch(()=>{});return}ne(ie).then(ae=>{ae&&e.feedback(ae,ee,oe).catch(()=>{})})},[e,F,ne]),re=b.useCallback(H=>{const{messageId:ee,roundId:oe}=F(H);if(ee){e.cancelFeedback(ee).catch(()=>{});return}ne(oe).then(B=>{B&&e.cancelFeedback(B).catch(()=>{})})},[e,F,ne]),j=b.useMemo(()=>({sdk:e,status:O.status,error:O.error,messages:O.messages,conversations:R.conversations,activeConversationId:R.activeConversationId,isThreadListOpen:a,isArtifactDrawerOpen:l,allArtifacts:T,activePreviewArtifact:u,activePanel:f,hasMore:R.hasMore,conversationsLoading:R.loading,messagesLoading:w,containerWidth:E,previewLayoutMode:C,isDrawerFullscreen:N,setDrawerFullscreen:A,registerContentEl:k,sendMessage:O.sendMessage,attachmentUploader:n??null,nosUpload:r??null,stop:O.stop,regenerate:O.regenerate,switchConversation:L,newConversation:_,deleteConversation:V,renameConversation:R.renameConversation,loadMoreConversations:R.loadMore,toggleThreadList:X,setThreadListOpen:P,toggleArtifactDrawer:Y,openArtifactPreview:K,openPanel:z,closePanel:D,feedback:U,cancelFeedback:re,respondToInterrupt:O.respondToInterrupt}),[e,O.status,O.error,O.messages,O.sendMessage,O.stop,O.regenerate,O.respondToInterrupt,n,r,R.conversations,R.activeConversationId,R.renameConversation,R.hasMore,R.loadMore,R.loading,a,l,T,u,f,w,E,C,N,L,_,V,X,P,Y,K,z,D,U,re]);return S.jsx(Sm.Provider,{value:j,children:i})}const qt="https://ehr-web.netease.com/ehr-web/erh-super-agent",Gt={recently:`${qt}/recently.svg`,home:`${qt}/home.svg`,mergeWindow:`${qt}/merge_window.svg`,spiltWindow:`${qt}/spilt_window.svg`,close:`${qt}/close.svg`,message:`${qt}/message.svg`,messageCreate:`${qt}/message_create.svg`,customerService:`${qt}/customer_service.svg`,sendSolid:`${qt}/send_solid.svg`,capabilityIcons:[`${qt}/icon1.png`,`${qt}/icon2.png`,`${qt}/icon3.png`],triggerLogo:`${qt}/HRlogo.png`,logo:`${qt}/HRlogo2.png`,assistantAvatarGenerating:`${qt}/profile0.gif`,assistantAvatar:`${qt}/profile1.png`},Ut={TRIGGER_SIZE:56,TRIGGER_RIGHT:20,TRIGGER_BOTTOM:80,DEFAULT_WIDTH:400,DEFAULT_HEIGHT:648,MIN_WIDTH:360,MAX_WIDTH:800,MAX_HEIGHT_RATIO:.95};function Y0({defaultWidth:e=Ut.DEFAULT_WIDTH,defaultHeight:t=Ut.DEFAULT_HEIGHT,sidebarWidth:n=0}={}){const[r,o]=b.useState(e),[i,a]=b.useState({x:0,y:0}),[s,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),[p,h]=b.useState(()=>typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}),m=b.useRef(!1),w=b.useRef(0),y=b.useRef(r),$=b.useRef(!1),x=b.useRef({x:0,y:0}),E=b.useRef({x:0,y:0}),v=b.useRef(!1),C=b.useRef(null);b.useEffect(()=>{const D=()=>h({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]),b.useEffect(()=>()=>{var D;(D=C.current)==null||D.call(C)},[]);const I=Math.floor(p.height*Ut.MAX_HEIGHT_RATIO),N=Math.min(d||t,I),A=r+n;b.useEffect(()=>{if(!s){const D=p.width-A-20,M=p.height-N-20;a(L=>L.x===D&&L.y===M?L:{x:D,y:M})}},[s,A,N,p]);const k=b.useCallback(D=>{if(c||D.target.closest("button, input, textarea"))return;$.current=!0,v.current=!1,x.current={x:D.clientX,y:D.clientY},E.current={...i};const M=V=>{if(!$.current)return;const X=V.clientX-x.current.x,P=V.clientY-x.current.y;(Math.abs(X)>3||Math.abs(P)>3)&&(v.current=!0),v.current&&(l(!0),a({x:Math.max(-200,Math.min(E.current.x+X,window.innerWidth-100)),y:Math.max(0,Math.min(E.current.y+P,window.innerHeight-48))}))},L=()=>{$.current=!1,_()},_=()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",L),C.current=null};document.addEventListener("mousemove",M),document.addEventListener("mouseup",L),C.current=_},[c,i]),R=b.useCallback(D=>{D.preventDefault(),D.stopPropagation(),m.current=!0,w.current=D.clientX,y.current=r;const M=i.x+r,L=i.y,_=P=>{if(!m.current)return;const Y=P.clientX-w.current;let K=y.current-Y;if(K>Ut.MAX_WIDTH){m.current=!1,u(!0),X();return}K=Math.max(Ut.MIN_WIDTH,K),o(K),a({x:M-K,y:L})},V=()=>{m.current=!1,X()},X=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",V),C.current=null};document.addEventListener("mousemove",_),document.addEventListener("mouseup",V),C.current=X},[r,i]),O=b.useCallback(()=>{c&&o(e),u(D=>!D)},[c,e]),z=b.useCallback(()=>{u(!1),o(e),l(!1),f(null)},[e]);return{width:r,position:i,hasCustomPosition:s,isMaximized:c,lockedHeight:d,viewport:p,defaultHeight:t,totalWidth:A,windowHeight:N,startWindowDrag:k,startResize:R,toggleMaximize:O,setIsMaximized:u,setLockedHeight:f,setHasCustomPosition:l,reset:z}}function Q0(e){const{enabled:t,contentSelector:n,defaultHeight:r,onHeightChange:o}=e,i=b.useRef(null);return b.useEffect(()=>{if(!t||!i.current)return;const s=i.current.querySelector(n);if(!s)return;const l=()=>{const d=i.current;if(!d)return;const f=d.querySelector(n);if(!f)return;const p=d.offsetHeight-f.clientHeight,h=f.scrollHeight+p,m=Math.floor(window.innerHeight*Ut.MAX_HEIGHT_RATIO),w=Math.max(r,Math.min(h,m));o(y=>y===w?y:w)};l();const c=new ResizeObserver(()=>l());Array.from(s.children).forEach(d=>c.observe(d));const u=new MutationObserver(()=>{Array.from(s.children).forEach(d=>c.observe(d)),l()});return u.observe(s,{childList:!0,subtree:!0,characterData:!0}),()=>{c.disconnect(),u.disconnect()}},[t,n,r,o]),i}function Z0(e,t){const n=Ut.TRIGGER_SIZE;return{x:Math.max(8,Math.min(e,window.innerWidth-n-8)),y:Math.max(8,Math.min(t,window.innerHeight-n-8))}}function Em({isOpen:e,onClick:t,triggerLogo:n}){const[r,o]=b.useState(null),i=b.useRef(!1),a=b.useRef(!1),s=b.useRef({x:0,y:0}),l=b.useRef({x:0,y:0}),c=b.useRef(null);b.useEffect(()=>()=>{var p;(p=c.current)==null||p.call(c)},[]);const u=b.useCallback(p=>{if(p.button!==0)return;i.current=!0,a.current=!1,s.current={x:p.clientX,y:p.clientY};const h=p.currentTarget.getBoundingClientRect();l.current={x:h.left,y:h.top};const m=y=>{if(!i.current)return;const $=y.clientX-s.current.x,x=y.clientY-s.current.y;(Math.abs($)>4||Math.abs(x)>4)&&(a.current=!0),a.current&&o(Z0(l.current.x+$,l.current.y+x))},w=()=>{i.current=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",w),c.current=null};document.addEventListener("mousemove",m),document.addEventListener("mouseup",w),c.current=w},[]),d=b.useCallback(()=>{if(a.current){a.current=!1;return}t()},[t]),f=r?{left:r.x,top:r.y,width:Ut.TRIGGER_SIZE,height:Ut.TRIGGER_SIZE}:{right:Ut.TRIGGER_RIGHT,bottom:Ut.TRIGGER_BOTTOM,width:Ut.TRIGGER_SIZE,height:Ut.TRIGGER_SIZE};return S.jsx("button",{type:"button",className:`fixed z-[10000] flex items-center justify-center border-none bg-transparent p-0 transition-transform duration-200 ease-out hover:scale-[1.08] active:scale-95 ${e?"pointer-events-none scale-50 opacity-0":"opacity-100"}`,style:f,onMouseDown:u,onClick:d,"aria-label":"打开 AI 助手",title:"AI 助手",children:S.jsx("img",{src:n||Gt.triggerLogo,alt:"AI 助手",className:"block h-full w-full",draggable:!1})})}function zo({tooltip:e,onClick:t,children:n}){return S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white active:bg-[#F5F5F5]","data-tooltip":e,"aria-label":e,onClick:t,children:n})}function $m({onClose:e,onToggleThreadList:t,isMaximized:n=!1,onToggleMaximize:r,showHome:o=!1,onHome:i,showClose:a=!0,artifactCount:s=0,onToggleArtifactDrawer:l,panelTitle:c}){return S.jsxs("div",{className:"relative z-20 flex h-9 shrink-0 select-none items-center px-[15px]",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx(zo,{tooltip:"历史记录",onClick:t,children:S.jsx("img",{src:Gt.recently,alt:"",width:20,height:20})}),o&&i&&S.jsx(zo,{tooltip:c?"返回聊天":"回到首页",onClick:i,children:S.jsx("img",{src:Gt.home,alt:"",width:20,height:20})})]}),c&&S.jsx("div",{className:"pointer-events-none absolute inset-x-0 flex justify-center",children:S.jsx("span",{className:"max-w-[50%] truncate text-[15px] font-semibold text-[#18181b]",children:c})}),S.jsxs("div",{className:"ml-auto flex items-center gap-2.5",children:[s>0&&l&&S.jsx(zo,{tooltip:"会话产物",onClick:l,children:S.jsxs("span",{className:"relative flex items-center gap-1",children:[S.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),s>0&&S.jsx("span",{className:"absolute -right-2 -top-1.5 min-w-[14px] rounded-full bg-[var(--sa-primary)] px-0.5 text-center text-[9px] font-medium leading-[14px] text-white",children:s>99?"99+":s})]})}),r&&S.jsx(zo,{tooltip:n?"小窗":"大窗",onClick:r,children:S.jsx("img",{src:n?Gt.spiltWindow:Gt.mergeWindow,alt:"",width:20,height:20})}),a&&S.jsx(zo,{tooltip:"关闭",onClick:e,children:S.jsx("img",{src:Gt.close,alt:"",width:20,height:20})})]})]})}const Cd="sa-widget-open:";function Oi(e,t){if(!e)return!1;try{if(t===void 0)return sessionStorage.getItem(`${Cd}${e}`)==="1";sessionStorage.setItem(`${Cd}${e}`,t?"1":"0")}catch{}return!!t}const Oo=e=>String(e).padStart(2,"0");function J0(e){if(!e)return"";const t=new Date(e);return isNaN(t.getTime())?"":`${t.getFullYear()}-${Oo(t.getMonth()+1)}-${Oo(t.getDate())} ${Oo(t.getHours())}:${Oo(t.getMinutes())}:${Oo(t.getSeconds())}`}function km(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),r=n-6*864e5,o=[],i=[],a=[];for(const l of e){const c=new Date(l.updateTime).getTime();c>=n?o.push(l):c>=r?i.push(l):a.push(l)}const s=[];return o.length&&s.push({label:"今天",items:o}),i.length&&s.push({label:"最近 7 天",items:i}),a.length&&s.push({label:"更早",items:a}),s}function pl({width:e}){const{conversations:t,activeConversationId:n,switchConversation:r,newConversation:o,deleteConversation:i,renameConversation:a,hasMore:s,loadMoreConversations:l,conversationsLoading:c}=Fn(),[u,d]=b.useState(null),[f,p]=b.useState(""),[h,m]=b.useState(null),w=b.useRef(null),y=b.useCallback((v,C)=>{d(v),p(C??"")},[]),$=b.useCallback(v=>{f.trim()&&a(v,f.trim()),d(null)},[f,a]),x=b.useCallback(()=>{const v=w.current;!v||!s||v.scrollHeight-v.scrollTop-v.clientHeight<50&&l()},[s,l]),E=b.useMemo(()=>km(t),[t]);return S.jsxs("div",{className:"relative z-[5] flex h-full shrink-0 flex-col overflow-visible border-r border-[#ECECEC] bg-[#FAFAFA] p-3 animate-sa-history-in",style:{width:e??200},children:[S.jsxs("button",{type:"button",className:"sa-new-chat mb-4 flex h-8 w-full shrink-0 items-center justify-center gap-2 rounded-md text-[14px] font-medium transition-colors",onClick:o,children:[S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18}),S.jsx("span",{className:"sa-new-chat-text whitespace-nowrap",children:"新建对话"})]}),S.jsxs("div",{ref:w,className:"flex-1 overflow-y-auto",onScroll:x,children:[c&&t.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"加载中..."}),!c&&t.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"暂无记录"}),E.map(v=>S.jsxs("div",{className:"mb-1",children:[S.jsx("div",{className:"px-1 pb-1 pt-2 text-[11px] text-[#A0A0A0]",children:v.label}),v.items.map(C=>S.jsx("div",{className:`group relative mb-0.5 flex h-8 w-full cursor-pointer items-center gap-1 rounded-md px-0.5 text-[13px] transition-colors ${C.sessionId===n?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{u!==C.sessionId&&r(C.sessionId)},onMouseEnter:I=>{if(u===C.sessionId)return;const N=I.currentTarget.getBoundingClientRect();m({text:C.title||"新会话",x:N.right+8,y:N.top+N.height/2})},onMouseLeave:()=>m(null),children:u===C.sessionId?S.jsx("input",{className:"w-full rounded border border-[var(--sa-primary)] bg-white px-1.5 py-0.5 text-[12px] outline-none",value:f,onChange:I=>p(I.target.value),onBlur:()=>$(C.sessionId),onKeyDown:I=>{I.key==="Enter"&&$(C.sessionId),I.key==="Escape"&&d(null)},onClick:I=>I.stopPropagation(),autoFocus:!0}):S.jsxs(S.Fragment,{children:[S.jsx("img",{src:Gt.message,alt:"",width:16,height:16,className:"shrink-0 opacity-60"}),S.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-[#333]",children:C.title||"新会话"}),S.jsxs("span",{className:"hidden shrink-0 items-center gap-0.5 group-hover:flex",children:[S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[var(--sa-primary)]",onClick:I=>{I.stopPropagation(),y(C.sessionId,C.title)},title:"重命名",children:S.jsx("svg",{width:12,height:12,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})})}),S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[#ef4444]",onClick:I=>{I.stopPropagation(),i(C.sessionId)},title:"删除",children:S.jsx("svg",{width:12,height:12,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})})})]})]})},C.sessionId))]},v.label)),c&&t.length>0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:s?"加载更多...":"加载中..."}),!c&&s&&S.jsx("div",{className:"px-0.5 py-2 text-center text-[11px] text-[#C0C0C0]",children:"向下滚动加载更多"})]}),h&&S.jsx("div",{className:"pointer-events-none fixed z-[10001] whitespace-nowrap rounded border border-[#E8E8E8] bg-white px-2.5 py-1.5 text-[12px] leading-[1.4] text-[#333] shadow-[0_2px_8px_rgba(0,0,0,0.12)]",style:{left:h.x,top:h.y,transform:"translateY(-50%)"},children:h.text})]})}function Im(e){const t=b.useRef(null),n=b.useRef(!1),r=b.useRef(0),o=b.useCallback(()=>{const a=t.current;if(!a)return;const{scrollTop:s,scrollHeight:l,clientHeight:c}=a,u=l-s-c<40;s<r.current&&!u&&(n.current=!0),u&&(n.current=!1),r.current=s},[]);b.useEffect(()=>{const a=t.current;if(a)return a.addEventListener("scroll",o,{passive:!0}),()=>a.removeEventListener("scroll",o)},[o]),b.useEffect(()=>{if(n.current)return;const a=t.current;a&&requestAnimationFrame(()=>{a.scrollTop=a.scrollHeight})},e);const i=b.useCallback(()=>{n.current=!1;const a=t.current;a&&(a.scrollTop=a.scrollHeight)},[]);return{containerRef:t,scrollToBottom:i}}function ey(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ty=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ny=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ry={};function Sd(e,t){return(ry.jsx?ny:ty).test(e)}const oy=/[ \t\n\f\r]/g;function iy(e){return typeof e=="object"?e.type==="text"?Ed(e.value):!1:Ed(e)}function Ed(e){return e.replace(oy,"")===""}let gi=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};gi.prototype.normal={};gi.prototype.property={};gi.prototype.space=void 0;function Rm(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new gi(n,r,t)}function ml(e){return e.toLowerCase()}class dn{constructor(t,n){this.attribute=n,this.property=t}}dn.prototype.attribute="";dn.prototype.booleanish=!1;dn.prototype.boolean=!1;dn.prototype.commaOrSpaceSeparated=!1;dn.prototype.commaSeparated=!1;dn.prototype.defined=!1;dn.prototype.mustUseProperty=!1;dn.prototype.number=!1;dn.prototype.overloadedBoolean=!1;dn.prototype.property="";dn.prototype.spaceSeparated=!1;dn.prototype.space=void 0;let ay=0;const je=Br(),St=Br(),gl=Br(),fe=Br(),lt=Br(),Or=Br(),bn=Br();function Br(){return 2**++ay}const hl=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:St,commaOrSpaceSeparated:bn,commaSeparated:Or,number:fe,overloadedBoolean:gl,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Cs=Object.keys(hl);class tu extends dn{constructor(t,n,r,o){let i=-1;if(super(t,n),$d(this,"space",o),typeof r=="number")for(;++i<Cs.length;){const a=Cs[i];$d(this,Cs[i],(r&hl[a])===hl[a])}}}tu.prototype.defined=!0;function $d(e,t,n){n&&(e[t]=n)}function Co(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new tu(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[ml(r)]=r,n[ml(i.attribute)]=r}return new gi(t,n,e.space)}const Pm=Co({properties:{ariaActiveDescendant:null,ariaAtomic:St,ariaAutoComplete:null,ariaBusy:St,ariaChecked:St,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:St,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:St,ariaFlowTo:lt,ariaGrabbed:St,ariaHasPopup:null,ariaHidden:St,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:fe,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:lt,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:St,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Tm(e,t){return t in e?e[t]:t}function Nm(e,t){return Tm(e,t.toLowerCase())}const sy=Co({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Or,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alpha:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:lt,autoFocus:je,autoPlay:je,blocking:lt,capture:null,charSet:null,checked:je,cite:null,className:lt,closedBy:null,colorSpace:null,cols:fe,colSpan:fe,command:null,commandFor:null,content:null,contentEditable:St,controls:je,controlsList:lt,coords:fe|Or,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:gl,draggable:St,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:lt,height:fe,hidden:gl,high:fe,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:lt,itemRef:lt,itemScope:je,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:fe,pattern:null,ping:lt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:lt,required:je,reversed:je,rows:fe,rowSpan:fe,sandbox:lt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootCustomElementRegistry:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shadowRootSerializable:je,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:St,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:je,disablePictureInPicture:je,disableRemotePlayback:je,exportParts:Or,part:lt,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:Nm}),ly=Co({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:bn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Or,g2:Or,glyphName:Or,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:bn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bn,rev:bn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bn,requiredFeatures:bn,requiredFonts:bn,requiredFormats:bn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:bn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Tm}),Mm=Co({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Am=Co({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nm}),zm=Co({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),cy={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},uy=/[A-Z]/g,kd=/-[a-z]/g,dy=/^data[-\w.:]+$/i;function fy(e,t){const n=ml(t);let r=t,o=dn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&dy.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(kd,my);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!kd.test(i)){let a=i.replace(uy,py);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=tu}return new o(r,t)}function py(e){return"-"+e.toLowerCase()}function my(e){return e.charAt(1).toUpperCase()}const gy=Rm([Pm,sy,Mm,Am,zm],"html"),nu=Rm([Pm,ly,Mm,Am,zm],"svg");function hy(e){return e.join(" ").trim()}var ru={},Id=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,by=/\n/g,xy=/^\s*/,yy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,wy=/^:\s*/,vy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Cy=/^[;\s]*/,Sy=/^\s+|\s+$/g,Ey=`
2
- `,Rd="/",Pd="*",Tr="",$y="comment",ky="declaration";function Iy(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(h){var m=h.match(by);m&&(n+=m.length);var w=h.lastIndexOf(Ey);r=~w?h.length-w:r+h.length}function i(){var h={line:n,column:r};return function(m){return m.position=new a(h),c(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(m){var w=m[0];return o(w),e=e.slice(w.length),m}}function c(){l(xy)}function u(h){var m;for(h=h||[];m=d();)m!==!1&&h.push(m);return h}function d(){var h=i();if(!(Rd!=e.charAt(0)||Pd!=e.charAt(1))){for(var m=2;Tr!=e.charAt(m)&&(Pd!=e.charAt(m)||Rd!=e.charAt(m+1));)++m;if(m+=2,Tr===e.charAt(m-1))return s("End of comment missing");var w=e.slice(2,m-2);return r+=2,o(w),e=e.slice(m),r+=2,h({type:$y,comment:w})}}function f(){var h=i(),m=l(yy);if(m){if(d(),!l(wy))return s("property missing ':'");var w=l(vy),y=h({type:ky,property:Td(m[0].replace(Id,Tr)),value:w?Td(w[0].replace(Id,Tr)):Tr});return l(Cy),y}}function p(){var h=[];u(h);for(var m;m=f();)m!==!1&&(h.push(m),u(h));return h}return c(),p()}function Td(e){return e?e.replace(Sy,Tr):Tr}var Ry=Iy,Py=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ru,"__esModule",{value:!0});ru.default=Ny;const Ty=Py(Ry);function Ny(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Ty.default)(e),o=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:a,value:s}=i;o?t(a,s,i):s&&(n=n||{},n[a]=s)}),n}var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.camelCase=void 0;var My=/^--[a-zA-Z0-9_-]+$/,Ay=/-([a-z])/g,zy=/^[^-]+$/,Oy=/^-(webkit|moz|ms|o|khtml)-/,Dy=/^-(ms)-/,Ly=function(e){return!e||zy.test(e)||My.test(e)},Fy=function(e,t){return t.toUpperCase()},Nd=function(e,t){return"".concat(t,"-")},_y=function(e,t){return t===void 0&&(t={}),Ly(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Dy,Nd):e=e.replace(Oy,Nd),e.replace(Ay,Fy))};Ha.camelCase=_y;var jy=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},By=jy(ru),Hy=Ha;function bl(e,t){var n={};return!e||typeof e!="string"||(0,By.default)(e,function(r,o){r&&o&&(n[(0,Hy.camelCase)(r,t)]=o)}),n}bl.default=bl;var Vy=bl;const Wy=zn.getDefaultExportFromCjs(Vy),Om=Dm("end"),ou=Dm("start");function Dm(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function qy(e){const t=ou(e),n=Om(e);if(t&&n)return{start:t,end:n}}function Yo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Md(e.position):"start"in e||"end"in e?Md(e):"line"in e||"column"in e?xl(e):""}function xl(e){return Ad(e&&e.line)+":"+Ad(e&&e.column)}function Md(e){return xl(e&&e.start)+"-"+xl(e&&e.end)}function Ad(e){return e&&typeof e=="number"?e:1}class Zt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=Yo(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Zt.prototype.file="";Zt.prototype.name="";Zt.prototype.reason="";Zt.prototype.message="";Zt.prototype.stack="";Zt.prototype.column=void 0;Zt.prototype.line=void 0;Zt.prototype.ancestors=void 0;Zt.prototype.cause=void 0;Zt.prototype.fatal=void 0;Zt.prototype.place=void 0;Zt.prototype.ruleId=void 0;Zt.prototype.source=void 0;const iu={}.hasOwnProperty,Xy=new Map,Uy=/[A-Z]/g,Gy=new Set(["table","tbody","thead","tfoot","tr"]),Ky=new Set(["td","th"]),Lm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yy(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ow(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=rw(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?nu:gy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Fm(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Fm(e,t,n){if(t.type==="element")return Qy(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Zy(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ew(e,t,n);if(t.type==="mdxjsEsm")return Jy(e,t);if(t.type==="root")return tw(e,t,n);if(t.type==="text")return nw(e,t)}function Qy(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=nu,e.schema=o),e.ancestors.push(t);const i=jm(e,t.tagName,!1),a=iw(e,t);let s=su(e,t);return Gy.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!iy(l):!0})),_m(e,a,i,t),au(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Zy(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ri(e,t.position)}function Jy(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ri(e,t.position)}function ew(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=nu,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:jm(e,t.name,!0),a=aw(e,t),s=su(e,t);return _m(e,a,i,t),au(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function tw(e,t,n){const r={};return au(r,su(e,t)),e.create(t,e.Fragment,r,n)}function nw(e,t){return t.value}function _m(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function au(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function rw(e,t,n){return r;function r(o,i,a,s){const c=Array.isArray(a.children)?n:t;return s?c(i,a,s):c(i,a)}}function ow(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=ou(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function iw(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&iu.call(t.properties,o)){const i=sw(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Ky.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function aw(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else ri(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else ri(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function su(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Xy;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=o.get(l)||0;a=l+"-"+c,o.set(l,c+1)}}const s=Fm(e,i,a);s!==void 0&&n.push(s)}return n}function sw(e,t,n){const r=fy(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ey(n):hy(n)),r.property==="style"){let o=typeof n=="object"?n:lw(e,String(n));return e.stylePropertyNameCase==="css"&&(o=cw(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?cy[r.property]||r.property:r.attribute,n]}}function lw(e,t){try{return Wy(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Zt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Lm+"#cannot-parse-style-attribute",o}}function jm(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=Sd(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=Sd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return iu.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ri(e)}function ri(e,t){const n=new Zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Lm+"#cannot-handle-mdx-estrees-without-createevaluater",n}function cw(e){const t={};let n;for(n in e)iu.call(e,n)&&(t[uw(n)]=e[n]);return t}function uw(e){let t=e.replace(Uy,dw);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function dw(e){return"-"+e.toLowerCase()}const Ss={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},fw={};function lu(e,t){const n=fw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Bm(e,r,o)}function Bm(e,t,n){if(pw(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return zd(e.children,t,n)}return Array.isArray(e)?zd(e,t,n):""}function zd(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Bm(e[o],t,n);return r.join("")}function pw(e){return!!(e&&typeof e=="object")}const Od=document.createElement("i");function cu(e){const t="&"+e+";";Od.innerHTML=t;const n=Od.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function kn(e,t){return e.length>0?(wn(e,e.length,0,t),e):t}const Dd={}.hasOwnProperty;function Hm(e){const t={};let n=-1;for(;++n<e.length;)mw(t,e[n]);return t}function mw(e,t){let n;for(n in t){const o=(Dd.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Dd.call(o,a)||(o[a]=[]);const s=i[a];gw(o[a],Array.isArray(s)?s:s?[s]:[])}}}function gw(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wn(e,0,0,r)}function Vm(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=wr(/[A-Za-z]/),Kt=wr(/[\dA-Za-z]/),hw=wr(/[#-'*+\--9=?A-Z^-~]/);function ma(e){return e!==null&&(e<32||e===127)}const yl=wr(/\d/),bw=wr(/[\dA-Fa-f]/),xw=wr(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const Va=wr(new RegExp("\\p{P}|\\p{S}","u")),Fr=wr(/\s/);function wr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function So(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&Kt(e.charCodeAt(n+1))&&Kt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ke(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return We(l)?(e.enter(n),s(l)):t(l)}function s(l){return We(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const yw={tokenize:ww};function ww(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ae(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const vw={tokenize:Cw},Ld={tokenize:Sw};function Cw(e){const t=this,n=[];let r=0,o,i,a;return s;function s(x){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,l,c)(x)}return c(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&$();const E=t.events.length;let v=E,C;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){C=t.events[v][1].end;break}y(r);let I=E;for(;I<t.events.length;)t.events[I][1].end={...C},I++;return wn(t.events,v+1,0,t.events.slice(E)),t.events.length=I,c(x)}return s(x)}function c(x){if(r===n.length){if(!o)return f(x);if(o.currentConstruct&&o.currentConstruct.concrete)return h(x);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ld,u,d)(x)}function u(x){return o&&$(),y(r),f(x)}function d(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(x)}function f(x){return t.containerState={},e.attempt(Ld,p,h)(x)}function p(x){return r++,n.push([t.currentConstruct,t.containerState]),f(x)}function h(x){if(x===null){o&&$(),y(0),e.consume(x);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),m(x)}function m(x){if(x===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(x);return}return Ae(x)?(e.consume(x),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(x),m)}function w(x,E){const v=t.sliceStream(x);if(E&&v.push(null),x.previous=i,i&&(i.next=x),i=x,o.defineSkip(x.start),o.write(v),t.parser.lazy[x.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<a&&(!o.events[C][1].end||o.events[C][1].end.offset>a))return;const I=t.events.length;let N=I,A,k;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(A){k=t.events[N][1].end;break}A=!0}for(y(r),C=I;C<t.events.length;)t.events[C][1].end={...k},C++;wn(t.events,N+1,0,t.events.slice(I)),t.events.length=C}}function y(x){let E=n.length;for(;E-- >x;){const v=n[E];t.containerState=v[1],v[0].exit.call(t,e)}n.length=x}function $(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Sw(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function mo(e){if(e===null||ct(e)||Fr(e))return 1;if(Va(e))return 2}function Wa(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const wl={name:"attention",resolveAll:Ew,tokenize:$w};function Ew(e,t){let n=-1,r,o,i,a,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Fd(d,-l),Fd(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=kn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=kn(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=kn(c,Wa(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=kn(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=kn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,wn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $w(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=mo(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),u=mo(l),d=!u||u===2&&o||n.includes(l),f=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?d:d&&(o||!f)),c._close=!!(i===42?f:f&&(u||!d)),t(l)}}function Fd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kw={name:"autolink",tokenize:Iw};function Iw(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return nn(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||Kt(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Kt(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ma(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):hw(p)?(e.consume(p),c):n(p)}function u(p){return Kt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Kt(p))&&r++<63){const h=p===45?f:d;return e.consume(p),h}return n(p)}}const hi={partial:!0,tokenize:Rw};function Rw(e,t,n){return r;function r(i){return We(i)?Ke(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||Ae(i)?t(i):n(i)}}const Wm={continuation:{tokenize:Tw},exit:Nw,name:"blockQuote",tokenize:Pw};function Pw(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return We(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Tw(e,t,n){const r=this;return o;function o(a){return We(a)?Ke(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Wm,t,n)(a)}}function Nw(e){e.exit("blockQuote")}const qm={name:"characterEscape",tokenize:Mw};function Mw(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return xw(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Xm={name:"characterReference",tokenize:Aw};function Aw(e,t,n){const r=this;let o=0,i,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,a=Kt,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=bw,u):(e.enter("characterReferenceValue"),i=7,a=yl,u(d))}function u(d){if(d===59&&o){const f=e.exit("characterReferenceValue");return a===Kt&&!cu(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&o++<i?(e.consume(d),u):n(d)}}const _d={partial:!0,tokenize:Ow},jd={concrete:!0,name:"codeFenced",tokenize:zw};function zw(e,t,n){const r=this,o={partial:!0,tokenize:v};let i=0,a=0,s;return l;function l(C){return c(C)}function c(C){const I=r.events[r.events.length-1];return i=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(C)}function u(C){return C===s?(a++,e.consume(C),u):a<3?n(C):(e.exit("codeFencedFenceSequence"),We(C)?Ke(e,d,"whitespace")(C):d(C))}function d(C){return C===null||Ae(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(_d,m,E)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||Ae(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):We(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,p,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),f)}function p(C){return C===null||Ae(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||Ae(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===s?n(C):(e.consume(C),h)}function m(C){return e.attempt(o,E,w)(C)}function w(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return i>0&&We(C)?Ke(e,$,"linePrefix",i+1)(C):$(C)}function $(C){return C===null||Ae(C)?e.check(_d,m,E)(C):(e.enter("codeFlowValue"),x(C))}function x(C){return C===null||Ae(C)?(e.exit("codeFlowValue"),$(C)):(e.consume(C),x)}function E(C){return e.exit("codeFenced"),t(C)}function v(C,I,N){let A=0;return k;function k(M){return C.enter("lineEnding"),C.consume(M),C.exit("lineEnding"),R}function R(M){return C.enter("codeFencedFence"),We(M)?Ke(C,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):O(M)}function O(M){return M===s?(C.enter("codeFencedFenceSequence"),z(M)):N(M)}function z(M){return M===s?(A++,C.consume(M),z):A>=a?(C.exit("codeFencedFenceSequence"),We(M)?Ke(C,D,"whitespace")(M):D(M)):N(M)}function D(M){return M===null||Ae(M)?(C.exit("codeFencedFence"),I(M)):N(M)}}}function Ow(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Es={name:"codeIndented",tokenize:Lw},Dw={partial:!0,tokenize:Fw};function Lw(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),Ke(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Ae(c)?e.attempt(Dw,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ae(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function Fw(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Ke(e,i,"linePrefix",5)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Ae(a)?o(a):n(a)}}const _w={name:"codeText",previous:Bw,resolve:jw,tokenize:Hw};function jw(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Bw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Hw(e,t,n){let r=0,o,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),o=0,u(d)):Ae(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Ae(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",c(d))}}class Vw{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Do(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Do(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Do(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Do(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Do(this.left,n.reverse())}}}function Do(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Um(e){const t={};let n=-1,r,o,i,a,s,l,c;const u=new Vw(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ww(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(a=u.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...u.get(o)[1].start},s=u.slice(o,n),s.unshift(r),u.splice(o,n-o+1,s))}}return wn(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Ww(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const w=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,w.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),f=w.length;f--;){const y=s.slice(w[f],w[f+1]),$=i.pop();l.push([$,$+y.length-1]),e.splice($,2,y)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const qw={resolve:Uw,tokenize:Gw},Xw={partial:!0,tokenize:Kw};function Uw(e){return Um(e),e}function Gw(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):Ae(s)?e.check(Xw,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Kw(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ke(e,i,"linePrefix")}function i(a){if(a===null||Ae(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Gm(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),f):y===null||y===32||y===41||ma(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(s),f(y)):y===null||y===60||Ae(y)?n(y):(e.consume(y),y===92?h:p)}function h(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function m(y){return!u&&(y===null||y===41||ct(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||ma(y)?n(y):(e.consume(y),y===92?w:m)}function w(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Km(e,t,n,r,o,i){const a=this;let s=0,l;return c;function c(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(i),u}function u(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):Ae(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Ae(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!We(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function Ym(e,t,n,r,o,i){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(o),e.consume(f),e.exit(o),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):(e.enter(i),c(f))}function c(f){return f===a?(e.exit(i),l(a)):f===null?n(f):Ae(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ke(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===a||f===null||Ae(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===a||f===92?(e.consume(f),u):u(f)}}function Qo(e,t){let n;return r;function r(o){return Ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):We(o)?Ke(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Yw={name:"definition",tokenize:Zw},Qw={partial:!0,tokenize:Jw};function Zw(e,t,n){const r=this;let o;return i;function i(p){return e.enter("definition"),a(p)}function a(p){return Km.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return ct(p)?Qo(e,c)(p):c(p)}function c(p){return Gm(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(Qw,d,d)(p)}function d(p){return We(p)?Ke(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Ae(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function Jw(e,t,n){return r;function r(s){return ct(s)?Qo(e,o)(s):n(s)}function o(s){return Ym(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return We(s)?Ke(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Ae(s)?t(s):n(s)}}const e1={name:"hardBreakEscape",tokenize:t1};function t1(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return Ae(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const n1={name:"headingAtx",resolve:r1,tokenize:o1};function r1(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function o1(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||ct(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ae(u)?(e.exit("atxHeading"),t(u)):We(u)?Ke(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||ct(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const i1=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Bd=["pre","script","style","textarea"],a1={concrete:!0,name:"htmlFlow",resolveTo:c1,tokenize:u1},s1={partial:!0,tokenize:f1},l1={partial:!0,tokenize:d1};function c1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function u1(e,t,n){const r=this;let o,i,a,s,l;return c;function c(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),f):T===47?(e.consume(T),i=!0,m):T===63?(e.consume(T),o=3,r.interrupt?t:P):nn(T)?(e.consume(T),a=String.fromCharCode(T),w):n(T)}function f(T){return T===45?(e.consume(T),o=2,p):T===91?(e.consume(T),o=5,s=0,h):nn(T)?(e.consume(T),o=4,r.interrupt?t:P):n(T)}function p(T){return T===45?(e.consume(T),r.interrupt?t:P):n(T)}function h(T){const ne="CDATA[";return T===ne.charCodeAt(s++)?(e.consume(T),s===ne.length?r.interrupt?t:O:h):n(T)}function m(T){return nn(T)?(e.consume(T),a=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||ct(T)){const ne=T===47,F=a.toLowerCase();return!ne&&!i&&Bd.includes(F)?(o=1,r.interrupt?t(T):O(T)):i1.includes(a.toLowerCase())?(o=6,ne?(e.consume(T),y):r.interrupt?t(T):O(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):i?$(T):x(T))}return T===45||Kt(T)?(e.consume(T),a+=String.fromCharCode(T),w):n(T)}function y(T){return T===62?(e.consume(T),r.interrupt?t:O):n(T)}function $(T){return We(T)?(e.consume(T),$):k(T)}function x(T){return T===47?(e.consume(T),k):T===58||T===95||nn(T)?(e.consume(T),E):We(T)?(e.consume(T),x):k(T)}function E(T){return T===45||T===46||T===58||T===95||Kt(T)?(e.consume(T),E):v(T)}function v(T){return T===61?(e.consume(T),C):We(T)?(e.consume(T),v):x(T)}function C(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,I):We(T)?(e.consume(T),C):N(T)}function I(T){return T===l?(e.consume(T),l=null,A):T===null||Ae(T)?n(T):(e.consume(T),I)}function N(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||ct(T)?v(T):(e.consume(T),N)}function A(T){return T===47||T===62||We(T)?x(T):n(T)}function k(T){return T===62?(e.consume(T),R):n(T)}function R(T){return T===null||Ae(T)?O(T):We(T)?(e.consume(T),R):n(T)}function O(T){return T===45&&o===2?(e.consume(T),L):T===60&&o===1?(e.consume(T),_):T===62&&o===4?(e.consume(T),Y):T===63&&o===3?(e.consume(T),P):T===93&&o===5?(e.consume(T),X):Ae(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(s1,K,z)(T)):T===null||Ae(T)?(e.exit("htmlFlowData"),z(T)):(e.consume(T),O)}function z(T){return e.check(l1,D,K)(T)}function D(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),M}function M(T){return T===null||Ae(T)?z(T):(e.enter("htmlFlowData"),O(T))}function L(T){return T===45?(e.consume(T),P):O(T)}function _(T){return T===47?(e.consume(T),a="",V):O(T)}function V(T){if(T===62){const ne=a.toLowerCase();return Bd.includes(ne)?(e.consume(T),Y):O(T)}return nn(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),V):O(T)}function X(T){return T===93?(e.consume(T),P):O(T)}function P(T){return T===62?(e.consume(T),Y):T===45&&o===2?(e.consume(T),P):O(T)}function Y(T){return T===null||Ae(T)?(e.exit("htmlFlowData"),K(T)):(e.consume(T),Y)}function K(T){return e.exit("htmlFlow"),t(T)}}function d1(e,t,n){const r=this;return o;function o(a){return Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function f1(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(hi,t,n)}}const p1={name:"htmlText",tokenize:m1};function m1(e,t,n){const r=this;let o,i,a;return s;function s(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),l}function l(P){return P===33?(e.consume(P),c):P===47?(e.consume(P),v):P===63?(e.consume(P),x):nn(P)?(e.consume(P),N):n(P)}function c(P){return P===45?(e.consume(P),u):P===91?(e.consume(P),i=0,h):nn(P)?(e.consume(P),$):n(P)}function u(P){return P===45?(e.consume(P),p):n(P)}function d(P){return P===null?n(P):P===45?(e.consume(P),f):Ae(P)?(a=d,_(P)):(e.consume(P),d)}function f(P){return P===45?(e.consume(P),p):d(P)}function p(P){return P===62?L(P):P===45?f(P):d(P)}function h(P){const Y="CDATA[";return P===Y.charCodeAt(i++)?(e.consume(P),i===Y.length?m:h):n(P)}function m(P){return P===null?n(P):P===93?(e.consume(P),w):Ae(P)?(a=m,_(P)):(e.consume(P),m)}function w(P){return P===93?(e.consume(P),y):m(P)}function y(P){return P===62?L(P):P===93?(e.consume(P),y):m(P)}function $(P){return P===null||P===62?L(P):Ae(P)?(a=$,_(P)):(e.consume(P),$)}function x(P){return P===null?n(P):P===63?(e.consume(P),E):Ae(P)?(a=x,_(P)):(e.consume(P),x)}function E(P){return P===62?L(P):x(P)}function v(P){return nn(P)?(e.consume(P),C):n(P)}function C(P){return P===45||Kt(P)?(e.consume(P),C):I(P)}function I(P){return Ae(P)?(a=I,_(P)):We(P)?(e.consume(P),I):L(P)}function N(P){return P===45||Kt(P)?(e.consume(P),N):P===47||P===62||ct(P)?A(P):n(P)}function A(P){return P===47?(e.consume(P),L):P===58||P===95||nn(P)?(e.consume(P),k):Ae(P)?(a=A,_(P)):We(P)?(e.consume(P),A):L(P)}function k(P){return P===45||P===46||P===58||P===95||Kt(P)?(e.consume(P),k):R(P)}function R(P){return P===61?(e.consume(P),O):Ae(P)?(a=R,_(P)):We(P)?(e.consume(P),R):A(P)}function O(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),o=P,z):Ae(P)?(a=O,_(P)):We(P)?(e.consume(P),O):(e.consume(P),D)}function z(P){return P===o?(e.consume(P),o=void 0,M):P===null?n(P):Ae(P)?(a=z,_(P)):(e.consume(P),z)}function D(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||ct(P)?A(P):(e.consume(P),D)}function M(P){return P===47||P===62||ct(P)?A(P):n(P)}function L(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function _(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),V}function V(P){return We(P)?Ke(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):X(P)}function X(P){return e.enter("htmlTextData"),a(P)}}const uu={name:"labelEnd",resolveAll:x1,resolveTo:y1,tokenize:w1},g1={tokenize:v1},h1={tokenize:C1},b1={tokenize:S1};function x1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&wn(e,0,e.length,n),e}function y1(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=kn(s,e.slice(i+1,i+r+3)),s=kn(s,[["enter",u,t]]),s=kn(s,Wa(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=kn(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=kn(s,e.slice(a+1)),s=kn(s,[["exit",l,t]]),wn(e,i,e.length,s),e}function w1(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(f){return i?i._inactive?d(f):(a=r.parser.defined.includes(Mn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(g1,u,a?u:d)(f):f===91?e.attempt(h1,u,a?c:d)(f):a?u(f):d(f)}function c(f){return e.attempt(b1,u,d)(f)}function u(f){return t(f)}function d(f){return i._balanced=!0,n(f)}}function v1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return ct(d)?Qo(e,i)(d):i(d)}function i(d){return d===41?u(d):Gm(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ct(d)?Qo(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?Ym(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return ct(d)?Qo(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function C1(e,t,n){const r=this;return o;function o(s){return Km.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function S1(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const E1={name:"labelStartImage",resolveAll:uu.resolveAll,tokenize:$1};function $1(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const k1={name:"labelStartLink",resolveAll:uu.resolveAll,tokenize:I1};function I1(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const $s={name:"lineEnding",tokenize:R1};function R1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const na={name:"thematicBreak",tokenize:P1};function P1(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Ae(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),We(c)?Ke(e,s,"whitespace")(c):s(c))}}const ln={continuation:{tokenize:A1},exit:O1,name:"list",tokenize:M1},T1={partial:!0,tokenize:D1},N1={partial:!0,tokenize:z1};function M1(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(p){const h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:yl(p)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(na,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return yl(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(hi,r.interrupt?n:u,e.attempt(T1,f,d))}function u(p){return r.containerState.initialBlankLine=!0,i++,f(p)}function d(p){return We(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function A1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(hi,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!We(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(N1,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(e,e.attempt(ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function z1(e,t,n){const r=this;return Ke(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function O1(e){e.exit(this.containerState.type)}function D1(e,t,n){const r=this;return Ke(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!We(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Hd={name:"setextUnderline",resolveTo:L1,tokenize:F1};function L1(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function F1(e,t,n){const r=this;let o;return i;function i(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),We(c)?Ke(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ae(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const _1={tokenize:j1};function j1(e){const t=this,n=e.attempt(hi,r,e.attempt(this.parser.constructs.flowInitial,o,Ke(e,e.attempt(this.parser.constructs.flow,o,e.attempt(qw,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const B1={resolveAll:Zm()},H1=Qm("string"),V1=Qm("text");function Qm(e){return{resolveAll:Zm(e==="text"?W1:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=o[u];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Zm(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function W1(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const c=o[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const q1={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:Wm},X1={91:Yw},U1={[-2]:Es,[-1]:Es,32:Es},G1={35:n1,42:na,45:[Hd,na],60:a1,61:Hd,95:na,96:jd,126:jd},K1={38:Xm,92:qm},Y1={[-5]:$s,[-4]:$s,[-3]:$s,33:E1,38:Xm,42:wl,60:[kw,p1],91:k1,92:[e1,qm],93:uu,95:wl,96:_w},Q1={null:[wl,B1]},Z1={null:[42,95]},J1={null:[]},ev=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Z1,contentInitial:X1,disable:J1,document:q1,flow:G1,flowInitial:U1,insideSpan:Q1,string:K1,text:Y1},Symbol.toStringTag,{value:"Module"}));function tv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:I(v),check:I(C),consume:$,enter:x,exit:E,interrupt:I(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:h,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(R){return a=kn(a,R),w(),a[a.length-1]!==null?[]:(N(t,0),c.events=Wa(i,c.events,c),c.events)}function f(R,O){return rv(p(R),O)}function p(R){return nv(a,R)}function h(){const{_bufferIndex:R,_index:O,line:z,column:D,offset:M}=r;return{_bufferIndex:R,_index:O,line:z,column:D,offset:M}}function m(R){o[R.line]=R.column,k()}function w(){let R;for(;r._index<a.length;){const O=a[r._index];if(typeof O=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<O.length;)y(O.charCodeAt(r._bufferIndex));else y(O)}}function y(R){u=u(R)}function $(R){Ae(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,k()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function x(R,O){const z=O||{};return z.type=R,z.start=h(),c.events.push(["enter",z,c]),s.push(z),z}function E(R){const O=s.pop();return O.end=h(),c.events.push(["exit",O,c]),O}function v(R,O){N(R,O.from)}function C(R,O){O.restore()}function I(R,O){return z;function z(D,M,L){let _,V,X,P;return Array.isArray(D)?K(D):"tokenize"in D?K([D]):Y(D);function Y(U){return re;function re(j){const H=j!==null&&U[j],ee=j!==null&&U.null,oe=[...Array.isArray(H)?H:H?[H]:[],...Array.isArray(ee)?ee:ee?[ee]:[]];return K(oe)(j)}}function K(U){return _=U,V=0,U.length===0?L:T(U[V])}function T(U){return re;function re(j){return P=A(),X=U,U.partial||(c.currentConstruct=U),U.name&&c.parser.constructs.disable.null.includes(U.name)?F():U.tokenize.call(O?Object.assign(Object.create(c),O):c,l,ne,F)(j)}}function ne(U){return R(X,P),M}function F(U){return P.restore(),++V<_.length?T(_[V]):L}}}function N(R,O){R.resolveAll&&!i.includes(R)&&i.push(R),R.resolve&&wn(c.events,O,c.events.length-O,R.resolve(c.events.slice(O),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function A(){const R=h(),O=c.previous,z=c.currentConstruct,D=c.events.length,M=Array.from(s);return{from:D,restore:L};function L(){r=R,c.previous=O,c.currentConstruct=z,c.events.length=D,s=M,k()}}function k(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function nv(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function rv(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
1
+ "use strict";var H0=Object.defineProperty;var V0=(e,t,n)=>t in e?H0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>V0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),gm=require("react-dom/client"),S=require("react/jsx-runtime"),zn=require("./nosUploader-BD9gHyMF.cjs"),po=require("react-dom");function W0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=W0(b);function bm(e){const{sdk:t,sessionId:n,onSessionCreated:r,onRoundStart:o,onStreamStart:i,onStreamEnd:a,onError:s,onMessageSend:l,isToolCallVisible:c}=e,[u,d]=b.useState([]),[f,p]=b.useState("ready"),[g,m]=b.useState(null),w=b.useRef(new Map),y=b.useRef(new Map),$=b.useRef(n),x=b.useRef(!0),E=b.useRef(u);$.current=n,x.current=u.length===0,E.current=u;const C=b.useCallback((D,M)=>{if(D===$.current)d(O=>{const F=y.current.get(D)??O,H=M(F);return y.current.set(D,H),H});else{const O=y.current.get(D)??[];y.current.set(D,M(O))}},[]),v=b.useCallback((D,M)=>{const O=w.current.get(D);O!=null&&O.stopTimer&&(clearTimeout(O.stopTimer),O.stopTimer=null),w.current.delete(D),y.current.delete(D),D===$.current&&p(M)},[]);b.useEffect(()=>{const D=n?w.current.get(n):void 0;p(D!=null&&D.busy?"streaming":"ready")},[n]);const T=b.useRef(()=>{}),R=b.useCallback((D,M,O)=>{var W;const F=$.current;if(F&&((W=w.current.get(F))!=null&&W.busy))return;if(F){const j=q0(E.current);if(j){l==null||l(D),T.current(j,{action:"submit",value:D});return}}l==null||l(D);const H=O??D,X={id:`user_${Date.now()}`,role:"user",parts:[...(M??[]).map(j=>({type:"attachment",attachment:j})),{type:"text",content:H}],timestamp:Date.now(),rawContent:O!=null&&O!==D?D:void 0},I=`assistant_${Date.now()}`,Q={id:I,role:"assistant",parts:[],timestamp:Date.now()},Y=x.current,P=E.current;d(j=>[...j,X,Q]),F&&y.current.set(F,[...P,X,Q]),p("submitted"),m(null);const oe=j=>{let ne="",ee=0,_="",ae=[],fe=!1,q,ce=null;y.current.has(j)||y.current.set(j,[...P,X,Q]);const V={abortController:null,busy:!0,stopTimer:null};w.current.set(j,V);const le=()=>{ne&&(ae.push({type:"thinking",content:ne,durationMs:Date.now()-ee}),ne="",ee=0)},se=()=>{_&&(ae.push({type:"text",content:_}),_="")},G=()=>{const K=[...ae];ne&&K.push({type:"thinking",content:ne,durationMs:Date.now()-ee}),_&&K.push({type:"text",content:_}),C(j,we=>we.map(ie=>ie.id===I?{...ie,parts:K,...q?{roundId:q}:{}}:ie))};V.abortController=t.chat({sessionId:j,message:D,attachments:M&&M.length>0?M:void 0,stream:!0,onMessage:K=>{switch(fe||(fe=!0,j===$.current&&p("streaming")),K.type){case"session.start":K.roundId&&(q=K.roundId,o==null||o(K.roundId));break;case"user":K.content&&(ce=K.content,C(j,we=>we.map(ie=>ie.id===X.id?{...ie,parts:ie.parts.map(me=>me.type==="text"?{...me,content:K.content}:me)}:ie)));break;case"thinking":se(),ne||(ee=Date.now()),ne+=K.content;break;case"ai":le(),_+=K.content;break;case"tool_call":if(le(),se(),c&&!c(K.toolCode,K.toolName))break;ae.push({type:"tool_call",toolName:K.toolName,toolCallId:K.toolCallId,args:K.args??"{}"});break;case"tool_result":if(le(),se(),c&&!c(K.toolCode,K.toolName))break;ae.push({type:"tool_result",toolName:K.toolName??"",toolCallId:K.toolCallId,content:K.content,artifacts:K.artifacts,renderMode:K.renderMode,html:K.html,markdown:K.markdown,defaultExpanded:K.defaultExpanded});break;case"interrupt":le(),se(),K.interrupt&&ae.push({type:"interrupt",interrupt:K.interrupt,resolved:!1}),G(),v(j,"ready");return;case"stop":K.content&&(_=K.content),G();return}G()},onDone:K=>{if((_||ae.length>0||ne)&&G(),K.artifacts&&K.artifacts.length>0){const ie=K.artifacts;C(j,me=>me.map(pe=>pe.id===I?{...pe,artifacts:ie}:pe))}if(K.messageId){const ie=K.messageId;C(j,me=>me.map(pe=>pe.id===I?{...pe,messageId:ie}:pe))}ae.length===0&&!_&&!ne&&!(K.artifacts&&K.artifacts.length>0)&&C(j,ie=>ie.filter(me=>me.id!==I));const we=()=>{v(j,"ready"),a==null||a(K.sessionId||j)};if(Y){const ie=(ce??H).slice(0,30),me=K.sessionId||j;t.renameConversation(me,ie).catch(()=>{}).finally(we)}else we()},onError:K=>{ae.push({type:"error",content:K.message}),G(),j===$.current&&(m(K),p("error")),s==null||s(K),v(j,"error")}}),i==null||i(j)};F?oe(F):t.createSession().then(j=>{$.current==null&&($.current=j,r==null||r(j)),oe(j)}).catch(j=>{$.current==null&&(m(j instanceof Error?j:new Error(String(j))),p("error")),s==null||s(j instanceof Error?j:new Error(String(j)))})},[t,r,i,a,s,l,c,C,v]),A=b.useCallback(()=>{const D=$.current;if(!D)return;const M=w.current.get(D);M!=null&&M.busy&&(M.stopTimer&&clearTimeout(M.stopTimer),M.stopTimer=setTimeout(()=>{var O;M.stopTimer=null,(O=M.abortController)==null||O.abort(),v(D,"ready")},8e3),t.stopGeneration(D).catch(()=>{}))},[t,v]),k=b.useCallback(()=>{var H;const D=$.current;if(D&&((H=w.current.get(D))!=null&&H.busy))return;const M=u.findLastIndex(X=>X.role==="user");if(M<0)return;const O=u[M].rawContent??u[M].parts.filter(X=>X.type==="text").map(X=>X.content).join(""),F=u[M].parts.filter(X=>X.type==="attachment").map(X=>X.attachment);d(X=>X.slice(0,M)),R(O,F.length>0?F:void 0)},[u,R]),N=b.useCallback((D,M)=>{var ee;const O=$.current;if(!O||(ee=w.current.get(O))!=null&&ee.busy)return;C(O,_=>_.map(ae=>({...ae,parts:ae.parts.map(fe=>fe.type==="interrupt"&&fe.interrupt.interruptId===D?{...fe,resolved:!0,response:M}:fe)})));const F={abortController:null,busy:!0,stopTimer:null};w.current.set(O,F);const H=new AbortController;F.abortController=H;let X=0;C(O,_=>_.length>0&&_[_.length-1].role==="assistant"?(X=_[_.length-1].parts.length,_):(X=0,[..._,{id:`assistant_${Date.now()}`,role:"assistant",parts:[],timestamp:Date.now()}])),p("streaming");let I="",Q=0,Y="",P=[],oe;const W=()=>{I&&(P.push({type:"thinking",content:I,durationMs:Date.now()-Q}),I="",Q=0)},j=()=>{Y&&(P.push({type:"text",content:Y}),Y="")},ne=()=>{const _=[...P];I&&_.push({type:"thinking",content:I,durationMs:Date.now()-Q}),Y&&_.push({type:"text",content:Y}),C(O,ae=>{const fe=ae.findLastIndex(q=>q.role==="assistant");return fe<0?ae:ae.map((q,ce)=>ce===fe?{...q,parts:[...q.parts.slice(0,X),..._],...oe?{roundId:oe}:{}}:q)})};t.respondInterrupt(D,O,M,_=>{let ae=!1,fe=!1;switch(_.type){case"session.start":_.roundId&&(oe=_.roundId);break;case"thinking":j(),I||(Q=Date.now()),I+=_.content;break;case"ai":W(),Y+=_.content;break;case"tool_call":if(W(),j(),c&&!c(_.toolCode,_.toolName))break;P.push({type:"tool_call",toolName:_.toolName,toolCallId:_.toolCallId,args:_.args??"{}"});break;case"tool_result":if(W(),j(),c&&!c(_.toolCode,_.toolName))break;P.push({type:"tool_result",toolName:_.toolName??"",toolCallId:_.toolCallId,content:_.content,artifacts:_.artifacts,renderMode:_.renderMode,html:_.html,markdown:_.markdown,defaultExpanded:_.defaultExpanded});break;case"interrupt":W(),j(),_.interrupt&&P.push({type:"interrupt",interrupt:_.interrupt,resolved:!1}),ae=!0;break;case"stop":_.content&&(Y=_.content),a==null||a(O),ae=!0;break;case"done":{const q=_.artifacts&&_.artifacts.length>0?_.artifacts:void 0;if(X===0&&P.length===0&&!Y&&!I&&!(_.artifacts&&_.artifacts.length>0)&&(fe=!0,C(O,V=>{const le=V.findLastIndex(se=>se.role==="assistant");return le<0||V[le].parts.length>0?V:V.filter((se,G)=>G!==le)})),fe){a==null||a(O),ae=!0;break}(_.messageId||q)&&C(O,V=>{const le=V.findLastIndex(se=>se.role==="assistant");return le<0?V:V.map((se,G)=>G===le?{...se,..._.messageId?{messageId:_.messageId}:{},...q?{artifacts:q}:{}}:se)}),a==null||a(O),ae=!0;break}}fe||ne(),ae&&v(O,"ready")},_=>{P.push({type:"error",content:_.message}),ne(),O===$.current&&(m(_),p("error")),s==null||s(_),v(O,"error")},H.signal).catch(_=>{if((_==null?void 0:_.name)==="AbortError"){v(O,"ready");return}O===$.current&&(m(_ instanceof Error?_:new Error(String(_))),p("error")),s==null||s(_ instanceof Error?_:new Error(String(_))),v(O,"error")})},[t,s,a,C,v,c]);T.current=N;const z=b.useCallback((D,M)=>{$.current=D;const O=M??y.current.get(D)??[];y.current.set(D,O),d(O)},[]),L=b.useCallback(D=>w.current.has(D)?y.current.get(D)??null:null,[]);return{messages:u,status:f,error:g,sendMessage:R,stop:A,regenerate:k,setMessages:d,showSession:z,getLiveMessages:L,respondToInterrupt:N}}function q0(e){for(let t=e.length-1;t>=0;t--)for(let n=e[t].parts.length-1;n>=0;n--){const r=e[t].parts[n];if(r.type==="interrupt"&&!r.resolved&&r.interrupt.interruptId)return r.interrupt.interruptId}return null}const xm="sa_active_conversation",vs=20;function vd(e){try{return localStorage.getItem(`${xm}_${e}`)}catch{return null}}function X0(e,t){try{const n=`${xm}_${e}`;t?localStorage.setItem(n,t):localStorage.removeItem(n)}catch{}}function ym(e){const{sdk:t,onConversationChange:n,isToolCallVisible:r}=e,o=t.botCode,[i,a]=b.useState([]),[s,l]=b.useState(()=>vd(o)),[c,u]=b.useState(!1),[d,f]=b.useState(!0),p=b.useRef(!0),g=b.useRef(1),m=b.useRef(!1);b.useEffect(()=>()=>{p.current=!1},[]);const w=b.useCallback(R=>{l(R),X0(o,R),R&&(n==null||n(R))},[o,n]),y=b.useCallback(async()=>{if(!m.current){m.current=!0,u(!0);try{g.current=1;const R=await t.listConversations({page:1,size:vs});if(!p.current)return;a(R.items),f(R.items.length<R.total);const A=vd(o);A&&!R.items.find(k=>k.sessionId===A)&&w(null)}catch{}finally{m.current=!1,p.current&&u(!1)}}},[t,w]),$=b.useCallback(async()=>{if(!(m.current||!d)){m.current=!0,u(!0);try{const R=g.current+1,A=await t.listConversations({page:R,size:vs});if(!p.current)return;g.current=R,a(N=>{const z=new Set(N.map(D=>D.sessionId)),L=A.items.filter(D=>!z.has(D.sessionId));return[...N,...L]});const k=g.current*vs;f(k<A.total)}catch{}finally{m.current=!1,p.current&&u(!1)}}},[t,d]),x=b.useCallback(async(R,A)=>(w(R),(A==null?void 0:A.fetchHistory)===!1?[]:await t.getMessages(R,{isToolCallVisible:r})),[t,w,r]),E=b.useCallback(async()=>{try{const R=await t.createSession(),A=new Date().toISOString();a(k=>[{sessionId:R,title:"新对话",createTime:A,updateTime:A},...k]),w(R)}catch{w(null)}},[t,w]),C=b.useCallback(async R=>{a(A=>A.filter(k=>k.sessionId!==R)),s===R&&w(null);try{await t.deleteConversation(R)}catch{}},[t,s,w]),v=b.useCallback(async(R,A)=>{await t.renameConversation(R,A),a(k=>k.map(N=>N.sessionId===R?{...N,title:A}:N))},[t]),{enabled:T=!0}=e;return b.useEffect(()=>{T&&y()},[T,y]),{conversations:i,activeConversationId:s,loading:c,hasMore:d,loadConversations:y,loadMore:$,switchConversation:x,newConversation:E,deleteConversation:C,renameConversation:v,setActiveConversationId:w}}function wm(e){return!e&&e!==0?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function vm(e){return e==="pdf"?"PDF":e==="docx"?"DOC":e==="html"?"HTM":e==="md"?"MD":e.slice(0,3).toUpperCase()||"FILE"}function U0(e,t){var o;const n=(e||"").toLowerCase();if(n.includes("html"))return"html";if(n.includes("markdown"))return"md";if(n.includes("pdf"))return"pdf";if(n.includes("wordprocessingml")||n==="application/msword")return"docx";const r=((o=(t||"").split(".").pop())==null?void 0:o.toLowerCase())??"";return r==="htm"||r==="html"?"html":r==="md"||r==="markdown"?"md":r==="pdf"?"pdf":r==="doc"||r==="docx"?"docx":r}function Cm(e){if(!e)return[];const t=[];for(const n of e)if(n.type==="file"&&n.data){const r=n.data.name??n.data.filename??"",o=n.data.mime??n.data.mime_type??n.data.mimeType;t.push({id:n.data.id??"",type:n.data.fileType??n.data.type??U0(o,r),filename:r,url:n.data.url??"",mime:o,size:n.data.size,summary:n.data.summary})}return t}async function pa(e){try{const t=await fetch(e.url);if(!t.ok)throw new Error(`HTTP ${t.status}`);const n=await t.blob(),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=e.filename,document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(r),4e3)}catch{const t=document.createElement("a");t.href=e.url,t.download=e.filename,t.target="_blank",document.body.appendChild(t),t.click(),t.remove()}}const G0=632,K0=640,Sm=b.createContext(null);function Fn(){const e=b.useContext(Sm);if(!e)throw new Error("useChatContext must be used within ChatProvider");return e}function fl({sdk:e,hooks:t,attachmentUploader:n,nosUpload:r,mode:o="floating",toolCallDisplay:i,children:a}){const[s,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),[p,g]=b.useState(null),[m,w]=b.useState(!1),[y,$]=b.useState(!1),[x,E]=b.useState(null),[C,v]=b.useState(0),[T,R]=b.useState("split"),[A,k]=b.useState(!1),N=b.useCallback(V=>E(V),[]),z=(i==null?void 0:i.hidden)===!0,L=b.useMemo(()=>z?new Set(((i==null?void 0:i.visibleTools)??[]).map(V=>V.trim().toLowerCase())):null,[z,i]),D=b.useRef(new Set),M=b.useCallback((V,le)=>{var K,we;if(!z)return!0;if(!L||L.size===0)return!1;const se=!!(V&&L.has(V.toLowerCase())||le&&L.has(le.toLowerCase()));if(!se&&((we=(K=globalThis.process)==null?void 0:K.env)==null?void 0:we.NODE_ENV)!=="production"){const ie=`${le??"?"}|${V??"?"}`;D.current.has(ie)||(D.current.add(ie),console.warn(`[super-agent-sdk] 工具已隐藏: ${le} (id: ${V})。visibleTools: [${[...L].join(", ")}](admin 工具管理-编码列查 id;也支持展示名匹配)`))}return se},[z,L]);b.useLayoutEffect(()=>{if(!x){v(0);return}const V=()=>{const se=x.getBoundingClientRect().width;if(v(G=>G===se?G:se),o!=="fullpage"){R(G=>G==="cover"?G:"cover");return}R(G=>G==="cover"&&se>=K0?"split":G==="split"&&se<G0?"cover":G)};if(V(),typeof ResizeObserver>"u")return;const le=new ResizeObserver(V);return le.observe(x),()=>le.disconnect()},[x,o]),b.useEffect(()=>{c||k(!1)},[c]),b.useEffect(()=>{e.getToken().then(()=>{w(!0)}).catch(()=>{w(!0)})},[e]);const O=ym({sdk:e,onConversationChange:t==null?void 0:t.onConversationChange,enabled:m,isToolCallVisible:M}),F=bm({sdk:e,sessionId:O.activeConversationId,isToolCallVisible:M,onSessionCreated:V=>{O.setActiveConversationId(V)},onStreamStart:t==null?void 0:t.onStreamStart,onStreamEnd:V=>{var le;(le=t==null?void 0:t.onStreamEnd)==null||le.call(t,V),O.loadConversations()},onError:t==null?void 0:t.onError,onMessageSend:t==null?void 0:t.onMessageSend}),H=b.useCallback(V=>{if(V.type==="link"){window.open(V.url,V.target??"_blank","noopener");return}g(V)},[]),X=b.useCallback(()=>g(null),[]),I=b.useRef(0),Q=b.useCallback(async V=>{g(null),u(!1);const le=++I.current;if(F.getLiveMessages(V)){await O.switchConversation(V,{fetchHistory:!1}),F.showSession(V),$(!1);return}$(!0);try{const se=await O.switchConversation(V);if(I.current!==le)return;F.showSession(V,se)}finally{I.current===le&&$(!1)}},[O,F]),Y=b.useCallback(async()=>{g(null),u(!1),F.setMessages([]),await O.newConversation()},[O,F]),P=b.useCallback(async V=>{O.activeConversationId===V&&F.setMessages([]),await O.deleteConversation(V)},[O,F]);b.useEffect(()=>{O.activeConversationId&&F.messages.length===0&&($(!0),e.getMessages(O.activeConversationId,{isToolCallVisible:M}).then(V=>{F.setMessages(V)}).catch(()=>{}).finally(()=>$(!1)))},[]);const oe=b.useCallback(()=>{l(V=>!V)},[]),W=b.useCallback(V=>{l(V)},[]),j=b.useCallback(()=>{u(V=>!V),f(V=>null)},[]),ne=b.useCallback(V=>{f(V),u(!0)},[]),ee=b.useMemo(()=>{const V=new Set,le=[];for(const se of F.messages)if(se.role==="assistant"&&se.artifacts)for(const G of Cm(se.artifacts)){const K=G.id||`${G.url}:${G.filename}`;V.has(K)||(V.add(K),le.push(G))}return le},[F.messages]),_=b.useCallback(async V=>{const le=O.activeConversationId;if(!le)return null;try{const se=await e.getMessages(le,{isToolCallVisible:M});F.setMessages(se);const G=V?se.filter(K=>K.role==="assistant"&&K.roundId===V).pop():se.findLast(K=>K.role==="assistant");return(G==null?void 0:G.messageId)??null}catch{return null}},[e,O.activeConversationId,F,M]),ae=b.useCallback(V=>{if(typeof V!="string")return{messageId:V.messageId,roundId:V.roundId};const le=F.messages.find(se=>se.id===V||se.messageId===V);return le?{messageId:le.messageId,roundId:le.roundId}:/^(user|assistant)_/.test(V)?{}:{messageId:V}},[F.messages]),fe=b.useCallback((V,le,se)=>{const{messageId:G,roundId:K}=ae(V);if(G){e.feedback(G,le,se).catch(()=>{});return}_(K).then(we=>{we&&e.feedback(we,le,se).catch(()=>{})})},[e,ae,_]),q=b.useCallback(V=>{const{messageId:le,roundId:se}=ae(V);if(le){e.cancelFeedback(le).catch(()=>{});return}_(se).then(G=>{G&&e.cancelFeedback(G).catch(()=>{})})},[e,ae,_]),ce=b.useMemo(()=>({sdk:e,status:F.status,error:F.error,messages:F.messages,conversations:O.conversations,activeConversationId:O.activeConversationId,isThreadListOpen:s,isArtifactDrawerOpen:c,allArtifacts:ee,activePreviewArtifact:d,activePanel:p,hasMore:O.hasMore,conversationsLoading:O.loading,messagesLoading:y,containerWidth:C,previewLayoutMode:T,isDrawerFullscreen:A,setDrawerFullscreen:k,registerContentEl:N,sendMessage:F.sendMessage,attachmentUploader:n??null,nosUpload:r??null,stop:F.stop,regenerate:F.regenerate,switchConversation:Q,newConversation:Y,deleteConversation:P,renameConversation:O.renameConversation,loadMoreConversations:O.loadMore,toggleThreadList:oe,setThreadListOpen:W,toggleArtifactDrawer:j,openArtifactPreview:ne,openPanel:H,closePanel:X,feedback:fe,cancelFeedback:q,respondToInterrupt:F.respondToInterrupt}),[e,F.status,F.error,F.messages,F.sendMessage,F.stop,F.regenerate,F.respondToInterrupt,n,r,O.conversations,O.activeConversationId,O.renameConversation,O.hasMore,O.loadMore,O.loading,s,c,ee,d,p,y,C,T,A,Q,Y,P,oe,W,j,ne,H,X,fe,q]);return S.jsx(Sm.Provider,{value:ce,children:a})}const qt="https://ehr-web.netease.com/ehr-web/erh-super-agent",Gt={recently:`${qt}/recently.svg`,home:`${qt}/home.svg`,mergeWindow:`${qt}/merge_window.svg`,spiltWindow:`${qt}/spilt_window.svg`,close:`${qt}/close.svg`,message:`${qt}/message.svg`,messageCreate:`${qt}/message_create.svg`,customerService:`${qt}/customer_service.svg`,sendSolid:`${qt}/send_solid.svg`,capabilityIcons:[`${qt}/icon1.png`,`${qt}/icon2.png`,`${qt}/icon3.png`],triggerLogo:`${qt}/HRlogo.png`,logo:`${qt}/HRlogo2.png`,assistantAvatarGenerating:`${qt}/profile0.gif`,assistantAvatar:`${qt}/profile1.png`},Ut={TRIGGER_SIZE:56,TRIGGER_RIGHT:20,TRIGGER_BOTTOM:80,DEFAULT_WIDTH:400,DEFAULT_HEIGHT:648,MIN_WIDTH:360,MAX_WIDTH:800,MAX_HEIGHT_RATIO:.95};function Y0({defaultWidth:e=Ut.DEFAULT_WIDTH,defaultHeight:t=Ut.DEFAULT_HEIGHT,sidebarWidth:n=0}={}){const[r,o]=b.useState(e),[i,a]=b.useState({x:0,y:0}),[s,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),[p,g]=b.useState(()=>typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}),m=b.useRef(!1),w=b.useRef(0),y=b.useRef(r),$=b.useRef(!1),x=b.useRef({x:0,y:0}),E=b.useRef({x:0,y:0}),C=b.useRef(!1),v=b.useRef(null);b.useEffect(()=>{const D=()=>g({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]),b.useEffect(()=>()=>{var D;(D=v.current)==null||D.call(v)},[]);const T=Math.floor(p.height*Ut.MAX_HEIGHT_RATIO),R=Math.min(d||t,T),A=r+n;b.useEffect(()=>{if(!s){const D=p.width-A-20,M=p.height-R-20;a(O=>O.x===D&&O.y===M?O:{x:D,y:M})}},[s,A,R,p]);const k=b.useCallback(D=>{if(c||D.target.closest("button, input, textarea"))return;$.current=!0,C.current=!1,x.current={x:D.clientX,y:D.clientY},E.current={...i};const M=H=>{if(!$.current)return;const X=H.clientX-x.current.x,I=H.clientY-x.current.y;(Math.abs(X)>3||Math.abs(I)>3)&&(C.current=!0),C.current&&(l(!0),a({x:Math.max(-200,Math.min(E.current.x+X,window.innerWidth-100)),y:Math.max(0,Math.min(E.current.y+I,window.innerHeight-48))}))},O=()=>{$.current=!1,F()},F=()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",O),v.current=null};document.addEventListener("mousemove",M),document.addEventListener("mouseup",O),v.current=F},[c,i]),N=b.useCallback(D=>{D.preventDefault(),D.stopPropagation(),m.current=!0,w.current=D.clientX,y.current=r;const M=i.x+r,O=i.y,F=I=>{if(!m.current)return;const Q=I.clientX-w.current;let Y=y.current-Q;if(Y>Ut.MAX_WIDTH){m.current=!1,u(!0),X();return}Y=Math.max(Ut.MIN_WIDTH,Y),o(Y),a({x:M-Y,y:O})},H=()=>{m.current=!1,X()},X=()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",H),v.current=null};document.addEventListener("mousemove",F),document.addEventListener("mouseup",H),v.current=X},[r,i]),z=b.useCallback(()=>{c&&o(e),u(D=>!D)},[c,e]),L=b.useCallback(()=>{u(!1),o(e),l(!1),f(null)},[e]);return{width:r,position:i,hasCustomPosition:s,isMaximized:c,lockedHeight:d,viewport:p,defaultHeight:t,totalWidth:A,windowHeight:R,startWindowDrag:k,startResize:N,toggleMaximize:z,setIsMaximized:u,setLockedHeight:f,setHasCustomPosition:l,reset:L}}function Q0(e){const{enabled:t,contentSelector:n,defaultHeight:r,onHeightChange:o}=e,i=b.useRef(null);return b.useEffect(()=>{if(!t||!i.current)return;const s=i.current.querySelector(n);if(!s)return;const l=()=>{const d=i.current;if(!d)return;const f=d.querySelector(n);if(!f)return;const p=d.offsetHeight-f.clientHeight,g=f.scrollHeight+p,m=Math.floor(window.innerHeight*Ut.MAX_HEIGHT_RATIO),w=Math.max(r,Math.min(g,m));o(y=>y===w?y:w)};l();const c=new ResizeObserver(()=>l());Array.from(s.children).forEach(d=>c.observe(d));const u=new MutationObserver(()=>{Array.from(s.children).forEach(d=>c.observe(d)),l()});return u.observe(s,{childList:!0,subtree:!0,characterData:!0}),()=>{c.disconnect(),u.disconnect()}},[t,n,r,o]),i}function Z0(e,t){const n=Ut.TRIGGER_SIZE;return{x:Math.max(8,Math.min(e,window.innerWidth-n-8)),y:Math.max(8,Math.min(t,window.innerHeight-n-8))}}function Em({isOpen:e,onClick:t,triggerLogo:n}){const[r,o]=b.useState(null),i=b.useRef(!1),a=b.useRef(!1),s=b.useRef({x:0,y:0}),l=b.useRef({x:0,y:0}),c=b.useRef(null);b.useEffect(()=>()=>{var p;(p=c.current)==null||p.call(c)},[]);const u=b.useCallback(p=>{if(p.button!==0)return;i.current=!0,a.current=!1,s.current={x:p.clientX,y:p.clientY};const g=p.currentTarget.getBoundingClientRect();l.current={x:g.left,y:g.top};const m=y=>{if(!i.current)return;const $=y.clientX-s.current.x,x=y.clientY-s.current.y;(Math.abs($)>4||Math.abs(x)>4)&&(a.current=!0),a.current&&o(Z0(l.current.x+$,l.current.y+x))},w=()=>{i.current=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",w),c.current=null};document.addEventListener("mousemove",m),document.addEventListener("mouseup",w),c.current=w},[]),d=b.useCallback(()=>{if(a.current){a.current=!1;return}t()},[t]),f=r?{left:r.x,top:r.y,width:Ut.TRIGGER_SIZE,height:Ut.TRIGGER_SIZE}:{right:Ut.TRIGGER_RIGHT,bottom:Ut.TRIGGER_BOTTOM,width:Ut.TRIGGER_SIZE,height:Ut.TRIGGER_SIZE};return S.jsx("button",{type:"button",className:`fixed z-[10000] flex items-center justify-center border-none bg-transparent p-0 transition-transform duration-200 ease-out hover:scale-[1.08] active:scale-95 ${e?"pointer-events-none scale-50 opacity-0":"opacity-100"}`,style:f,onMouseDown:u,onClick:d,"aria-label":"打开 AI 助手",title:"AI 助手",children:S.jsx("img",{src:n||Gt.triggerLogo,alt:"AI 助手",className:"block h-full w-full",draggable:!1})})}function zo({tooltip:e,onClick:t,children:n}){return S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white active:bg-[#F5F5F5]","data-tooltip":e,"aria-label":e,onClick:t,children:n})}function $m({onClose:e,onToggleThreadList:t,isMaximized:n=!1,onToggleMaximize:r,showHome:o=!1,onHome:i,showClose:a=!0,artifactCount:s=0,onToggleArtifactDrawer:l,panelTitle:c}){return S.jsxs("div",{className:"relative z-20 flex h-9 shrink-0 select-none items-center px-[15px]",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx(zo,{tooltip:"历史记录",onClick:t,children:S.jsx("img",{src:Gt.recently,alt:"",width:20,height:20})}),o&&i&&S.jsx(zo,{tooltip:c?"返回聊天":"回到首页",onClick:i,children:S.jsx("img",{src:Gt.home,alt:"",width:20,height:20})})]}),c&&S.jsx("div",{className:"pointer-events-none absolute inset-x-0 flex justify-center",children:S.jsx("span",{className:"max-w-[50%] truncate text-[15px] font-semibold text-[#18181b]",children:c})}),S.jsxs("div",{className:"ml-auto flex items-center gap-2.5",children:[s>0&&l&&S.jsx(zo,{tooltip:"会话产物",onClick:l,children:S.jsxs("span",{className:"relative flex items-center gap-1",children:[S.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),s>0&&S.jsx("span",{className:"absolute -right-2 -top-1.5 min-w-[14px] rounded-full bg-[var(--sa-primary)] px-0.5 text-center text-[9px] font-medium leading-[14px] text-white",children:s>99?"99+":s})]})}),r&&S.jsx(zo,{tooltip:n?"小窗":"大窗",onClick:r,children:S.jsx("img",{src:n?Gt.spiltWindow:Gt.mergeWindow,alt:"",width:20,height:20})}),a&&S.jsx(zo,{tooltip:"关闭",onClick:e,children:S.jsx("img",{src:Gt.close,alt:"",width:20,height:20})})]})]})}const Cd="sa-widget-open:";function Oi(e,t){if(!e)return!1;try{if(t===void 0)return sessionStorage.getItem(`${Cd}${e}`)==="1";sessionStorage.setItem(`${Cd}${e}`,t?"1":"0")}catch{}return!!t}const Oo=e=>String(e).padStart(2,"0");function J0(e){if(!e)return"";const t=new Date(e);return isNaN(t.getTime())?"":`${t.getFullYear()}-${Oo(t.getMonth()+1)}-${Oo(t.getDate())} ${Oo(t.getHours())}:${Oo(t.getMinutes())}:${Oo(t.getSeconds())}`}function km(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),r=n-6*864e5,o=[],i=[],a=[];for(const l of e){const c=new Date(l.updateTime).getTime();c>=n?o.push(l):c>=r?i.push(l):a.push(l)}const s=[];return o.length&&s.push({label:"今天",items:o}),i.length&&s.push({label:"最近 7 天",items:i}),a.length&&s.push({label:"更早",items:a}),s}function pl({width:e}){const{conversations:t,activeConversationId:n,switchConversation:r,newConversation:o,deleteConversation:i,renameConversation:a,hasMore:s,loadMoreConversations:l,conversationsLoading:c}=Fn(),[u,d]=b.useState(null),[f,p]=b.useState(""),[g,m]=b.useState(null),w=b.useRef(null),y=b.useCallback((C,v)=>{d(C),p(v??"")},[]),$=b.useCallback(C=>{f.trim()&&a(C,f.trim()),d(null)},[f,a]),x=b.useCallback(()=>{const C=w.current;!C||!s||C.scrollHeight-C.scrollTop-C.clientHeight<50&&l()},[s,l]),E=b.useMemo(()=>km(t),[t]);return S.jsxs("div",{className:"relative z-[5] flex h-full shrink-0 flex-col overflow-visible border-r border-[#ECECEC] bg-[#FAFAFA] p-3 animate-sa-history-in",style:{width:e??200},children:[S.jsxs("button",{type:"button",className:"sa-new-chat mb-4 flex h-8 w-full shrink-0 items-center justify-center gap-2 rounded-md text-[14px] font-medium transition-colors",onClick:o,children:[S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18}),S.jsx("span",{className:"sa-new-chat-text whitespace-nowrap",children:"新建对话"})]}),S.jsxs("div",{ref:w,className:"flex-1 overflow-y-auto",onScroll:x,children:[c&&t.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"加载中..."}),!c&&t.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"暂无记录"}),E.map(C=>S.jsxs("div",{className:"mb-1",children:[S.jsx("div",{className:"px-1 pb-1 pt-2 text-[11px] text-[#A0A0A0]",children:C.label}),C.items.map(v=>S.jsx("div",{className:`group relative mb-0.5 flex h-8 w-full cursor-pointer items-center gap-1 rounded-md px-0.5 text-[13px] transition-colors ${v.sessionId===n?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{u!==v.sessionId&&r(v.sessionId)},onMouseEnter:T=>{if(u===v.sessionId)return;const R=T.currentTarget.getBoundingClientRect();m({text:v.title||"新会话",x:R.right+8,y:R.top+R.height/2})},onMouseLeave:()=>m(null),children:u===v.sessionId?S.jsx("input",{className:"w-full rounded border border-[var(--sa-primary)] bg-white px-1.5 py-0.5 text-[12px] outline-none",value:f,onChange:T=>p(T.target.value),onBlur:()=>$(v.sessionId),onKeyDown:T=>{T.key==="Enter"&&$(v.sessionId),T.key==="Escape"&&d(null)},onClick:T=>T.stopPropagation(),autoFocus:!0}):S.jsxs(S.Fragment,{children:[S.jsx("img",{src:Gt.message,alt:"",width:16,height:16,className:"shrink-0 opacity-60"}),S.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-[#333]",children:v.title||"新会话"}),S.jsxs("span",{className:"hidden shrink-0 items-center gap-0.5 group-hover:flex",children:[S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[var(--sa-primary)]",onClick:T=>{T.stopPropagation(),y(v.sessionId,v.title)},title:"重命名",children:S.jsx("svg",{width:12,height:12,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})})}),S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[#ef4444]",onClick:T=>{T.stopPropagation(),i(v.sessionId)},title:"删除",children:S.jsx("svg",{width:12,height:12,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})})})]})]})},v.sessionId))]},C.label)),c&&t.length>0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:s?"加载更多...":"加载中..."}),!c&&s&&S.jsx("div",{className:"px-0.5 py-2 text-center text-[11px] text-[#C0C0C0]",children:"向下滚动加载更多"})]}),g&&S.jsx("div",{className:"pointer-events-none fixed z-[10001] whitespace-nowrap rounded border border-[#E8E8E8] bg-white px-2.5 py-1.5 text-[12px] leading-[1.4] text-[#333] shadow-[0_2px_8px_rgba(0,0,0,0.12)]",style:{left:g.x,top:g.y,transform:"translateY(-50%)"},children:g.text})]})}function Im(e){const t=b.useRef(null),n=b.useRef(!1),r=b.useRef(0),o=b.useCallback(()=>{const a=t.current;if(!a)return;const{scrollTop:s,scrollHeight:l,clientHeight:c}=a,u=l-s-c<40;s<r.current&&!u&&(n.current=!0),u&&(n.current=!1),r.current=s},[]);b.useEffect(()=>{const a=t.current;if(a)return a.addEventListener("scroll",o,{passive:!0}),()=>a.removeEventListener("scroll",o)},[o]),b.useEffect(()=>{if(n.current)return;const a=t.current;a&&requestAnimationFrame(()=>{a.scrollTop=a.scrollHeight})},e);const i=b.useCallback(()=>{n.current=!1;const a=t.current;a&&(a.scrollTop=a.scrollHeight)},[]);return{containerRef:t,scrollToBottom:i}}function ey(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ty=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ny=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ry={};function Sd(e,t){return(ry.jsx?ny:ty).test(e)}const oy=/[ \t\n\f\r]/g;function iy(e){return typeof e=="object"?e.type==="text"?Ed(e.value):!1:Ed(e)}function Ed(e){return e.replace(oy,"")===""}let hi=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};hi.prototype.normal={};hi.prototype.property={};hi.prototype.space=void 0;function Rm(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new hi(n,r,t)}function ml(e){return e.toLowerCase()}class dn{constructor(t,n){this.attribute=n,this.property=t}}dn.prototype.attribute="";dn.prototype.booleanish=!1;dn.prototype.boolean=!1;dn.prototype.commaOrSpaceSeparated=!1;dn.prototype.commaSeparated=!1;dn.prototype.defined=!1;dn.prototype.mustUseProperty=!1;dn.prototype.number=!1;dn.prototype.overloadedBoolean=!1;dn.prototype.property="";dn.prototype.spaceSeparated=!1;dn.prototype.space=void 0;let ay=0;const je=Br(),St=Br(),hl=Br(),ge=Br(),lt=Br(),Or=Br(),bn=Br();function Br(){return 2**++ay}const gl=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:St,commaOrSpaceSeparated:bn,commaSeparated:Or,number:ge,overloadedBoolean:hl,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Cs=Object.keys(gl);class tu extends dn{constructor(t,n,r,o){let i=-1;if(super(t,n),$d(this,"space",o),typeof r=="number")for(;++i<Cs.length;){const a=Cs[i];$d(this,Cs[i],(r&gl[a])===gl[a])}}}tu.prototype.defined=!0;function $d(e,t,n){n&&(e[t]=n)}function Co(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new tu(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[ml(r)]=r,n[ml(i.attribute)]=r}return new hi(t,n,e.space)}const Tm=Co({properties:{ariaActiveDescendant:null,ariaAtomic:St,ariaAutoComplete:null,ariaBusy:St,ariaChecked:St,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:St,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:St,ariaFlowTo:lt,ariaGrabbed:St,ariaHasPopup:null,ariaHidden:St,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:ge,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:lt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:St,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Pm(e,t){return t in e?e[t]:t}function Nm(e,t){return Pm(e,t.toLowerCase())}const sy=Co({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Or,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alpha:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:lt,autoFocus:je,autoPlay:je,blocking:lt,capture:null,charSet:null,checked:je,cite:null,className:lt,closedBy:null,colorSpace:null,cols:ge,colSpan:ge,command:null,commandFor:null,content:null,contentEditable:St,controls:je,controlsList:lt,coords:ge|Or,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:hl,draggable:St,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:lt,height:ge,hidden:hl,high:ge,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:lt,itemRef:lt,itemScope:je,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:ge,pattern:null,ping:lt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:lt,required:je,reversed:je,rows:ge,rowSpan:ge,sandbox:lt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootCustomElementRegistry:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shadowRootSerializable:je,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:St,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:je,disablePictureInPicture:je,disableRemotePlayback:je,exportParts:Or,part:lt,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:Nm}),ly=Co({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:bn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Or,g2:Or,glyphName:Or,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:bn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bn,rev:bn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bn,requiredFeatures:bn,requiredFonts:bn,requiredFormats:bn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:bn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pm}),Mm=Co({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Am=Co({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nm}),zm=Co({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),cy={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},uy=/[A-Z]/g,kd=/-[a-z]/g,dy=/^data[-\w.:]+$/i;function fy(e,t){const n=ml(t);let r=t,o=dn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&dy.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(kd,my);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!kd.test(i)){let a=i.replace(uy,py);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=tu}return new o(r,t)}function py(e){return"-"+e.toLowerCase()}function my(e){return e.charAt(1).toUpperCase()}const hy=Rm([Tm,sy,Mm,Am,zm],"html"),nu=Rm([Tm,ly,Mm,Am,zm],"svg");function gy(e){return e.join(" ").trim()}var ru={},Id=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,by=/\n/g,xy=/^\s*/,yy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,wy=/^:\s*/,vy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Cy=/^[;\s]*/,Sy=/^\s+|\s+$/g,Ey=`
2
+ `,Rd="/",Td="*",Pr="",$y="comment",ky="declaration";function Iy(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(g){var m=g.match(by);m&&(n+=m.length);var w=g.lastIndexOf(Ey);r=~w?g.length-w:r+g.length}function i(){var g={line:n,column:r};return function(m){return m.position=new a(g),c(),m}}function a(g){this.start=g,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(g){var m=new Error(t.source+":"+n+":"+r+": "+g);if(m.reason=g,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(g){var m=g.exec(e);if(m){var w=m[0];return o(w),e=e.slice(w.length),m}}function c(){l(xy)}function u(g){var m;for(g=g||[];m=d();)m!==!1&&g.push(m);return g}function d(){var g=i();if(!(Rd!=e.charAt(0)||Td!=e.charAt(1))){for(var m=2;Pr!=e.charAt(m)&&(Td!=e.charAt(m)||Rd!=e.charAt(m+1));)++m;if(m+=2,Pr===e.charAt(m-1))return s("End of comment missing");var w=e.slice(2,m-2);return r+=2,o(w),e=e.slice(m),r+=2,g({type:$y,comment:w})}}function f(){var g=i(),m=l(yy);if(m){if(d(),!l(wy))return s("property missing ':'");var w=l(vy),y=g({type:ky,property:Pd(m[0].replace(Id,Pr)),value:w?Pd(w[0].replace(Id,Pr)):Pr});return l(Cy),y}}function p(){var g=[];u(g);for(var m;m=f();)m!==!1&&(g.push(m),u(g));return g}return c(),p()}function Pd(e){return e?e.replace(Sy,Pr):Pr}var Ry=Iy,Ty=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ru,"__esModule",{value:!0});ru.default=Ny;const Py=Ty(Ry);function Ny(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Py.default)(e),o=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:a,value:s}=i;o?t(a,s,i):s&&(n=n||{},n[a]=s)}),n}var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.camelCase=void 0;var My=/^--[a-zA-Z0-9_-]+$/,Ay=/-([a-z])/g,zy=/^[^-]+$/,Oy=/^-(webkit|moz|ms|o|khtml)-/,Dy=/^-(ms)-/,Ly=function(e){return!e||zy.test(e)||My.test(e)},Fy=function(e,t){return t.toUpperCase()},Nd=function(e,t){return"".concat(t,"-")},_y=function(e,t){return t===void 0&&(t={}),Ly(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Dy,Nd):e=e.replace(Oy,Nd),e.replace(Ay,Fy))};Ha.camelCase=_y;var jy=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},By=jy(ru),Hy=Ha;function bl(e,t){var n={};return!e||typeof e!="string"||(0,By.default)(e,function(r,o){r&&o&&(n[(0,Hy.camelCase)(r,t)]=o)}),n}bl.default=bl;var Vy=bl;const Wy=zn.getDefaultExportFromCjs(Vy),Om=Dm("end"),ou=Dm("start");function Dm(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function qy(e){const t=ou(e),n=Om(e);if(t&&n)return{start:t,end:n}}function Yo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Md(e.position):"start"in e||"end"in e?Md(e):"line"in e||"column"in e?xl(e):""}function xl(e){return Ad(e&&e.line)+":"+Ad(e&&e.column)}function Md(e){return xl(e&&e.start)+"-"+xl(e&&e.end)}function Ad(e){return e&&typeof e=="number"?e:1}class Zt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=Yo(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Zt.prototype.file="";Zt.prototype.name="";Zt.prototype.reason="";Zt.prototype.message="";Zt.prototype.stack="";Zt.prototype.column=void 0;Zt.prototype.line=void 0;Zt.prototype.ancestors=void 0;Zt.prototype.cause=void 0;Zt.prototype.fatal=void 0;Zt.prototype.place=void 0;Zt.prototype.ruleId=void 0;Zt.prototype.source=void 0;const iu={}.hasOwnProperty,Xy=new Map,Uy=/[A-Z]/g,Gy=new Set(["table","tbody","thead","tfoot","tr"]),Ky=new Set(["td","th"]),Lm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yy(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ow(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=rw(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?nu:hy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Fm(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Fm(e,t,n){if(t.type==="element")return Qy(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Zy(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ew(e,t,n);if(t.type==="mdxjsEsm")return Jy(e,t);if(t.type==="root")return tw(e,t,n);if(t.type==="text")return nw(e,t)}function Qy(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=nu,e.schema=o),e.ancestors.push(t);const i=jm(e,t.tagName,!1),a=iw(e,t);let s=su(e,t);return Gy.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!iy(l):!0})),_m(e,a,i,t),au(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Zy(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ri(e,t.position)}function Jy(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ri(e,t.position)}function ew(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=nu,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:jm(e,t.name,!0),a=aw(e,t),s=su(e,t);return _m(e,a,i,t),au(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function tw(e,t,n){const r={};return au(r,su(e,t)),e.create(t,e.Fragment,r,n)}function nw(e,t){return t.value}function _m(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function au(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function rw(e,t,n){return r;function r(o,i,a,s){const c=Array.isArray(a.children)?n:t;return s?c(i,a,s):c(i,a)}}function ow(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=ou(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function iw(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&iu.call(t.properties,o)){const i=sw(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Ky.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function aw(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else ri(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else ri(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function su(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Xy;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=o.get(l)||0;a=l+"-"+c,o.set(l,c+1)}}const s=Fm(e,i,a);s!==void 0&&n.push(s)}return n}function sw(e,t,n){const r=fy(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ey(n):gy(n)),r.property==="style"){let o=typeof n=="object"?n:lw(e,String(n));return e.stylePropertyNameCase==="css"&&(o=cw(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?cy[r.property]||r.property:r.attribute,n]}}function lw(e,t){try{return Wy(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Zt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Lm+"#cannot-parse-style-attribute",o}}function jm(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=Sd(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=Sd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return iu.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ri(e)}function ri(e,t){const n=new Zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Lm+"#cannot-handle-mdx-estrees-without-createevaluater",n}function cw(e){const t={};let n;for(n in e)iu.call(e,n)&&(t[uw(n)]=e[n]);return t}function uw(e){let t=e.replace(Uy,dw);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function dw(e){return"-"+e.toLowerCase()}const Ss={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},fw={};function lu(e,t){const n=fw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Bm(e,r,o)}function Bm(e,t,n){if(pw(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return zd(e.children,t,n)}return Array.isArray(e)?zd(e,t,n):""}function zd(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Bm(e[o],t,n);return r.join("")}function pw(e){return!!(e&&typeof e=="object")}const Od=document.createElement("i");function cu(e){const t="&"+e+";";Od.innerHTML=t;const n=Od.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function kn(e,t){return e.length>0?(wn(e,e.length,0,t),e):t}const Dd={}.hasOwnProperty;function Hm(e){const t={};let n=-1;for(;++n<e.length;)mw(t,e[n]);return t}function mw(e,t){let n;for(n in t){const o=(Dd.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Dd.call(o,a)||(o[a]=[]);const s=i[a];hw(o[a],Array.isArray(s)?s:s?[s]:[])}}}function hw(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wn(e,0,0,r)}function Vm(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=wr(/[A-Za-z]/),Kt=wr(/[\dA-Za-z]/),gw=wr(/[#-'*+\--9=?A-Z^-~]/);function ma(e){return e!==null&&(e<32||e===127)}const yl=wr(/\d/),bw=wr(/[\dA-Fa-f]/),xw=wr(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const Va=wr(new RegExp("\\p{P}|\\p{S}","u")),Fr=wr(/\s/);function wr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function So(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&Kt(e.charCodeAt(n+1))&&Kt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ke(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return We(l)?(e.enter(n),s(l)):t(l)}function s(l){return We(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const yw={tokenize:ww};function ww(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ae(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const vw={tokenize:Cw},Ld={tokenize:Sw};function Cw(e){const t=this,n=[];let r=0,o,i,a;return s;function s(x){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,l,c)(x)}return c(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&$();const E=t.events.length;let C=E,v;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){v=t.events[C][1].end;break}y(r);let T=E;for(;T<t.events.length;)t.events[T][1].end={...v},T++;return wn(t.events,C+1,0,t.events.slice(E)),t.events.length=T,c(x)}return s(x)}function c(x){if(r===n.length){if(!o)return f(x);if(o.currentConstruct&&o.currentConstruct.concrete)return g(x);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ld,u,d)(x)}function u(x){return o&&$(),y(r),f(x)}function d(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(x)}function f(x){return t.containerState={},e.attempt(Ld,p,g)(x)}function p(x){return r++,n.push([t.currentConstruct,t.containerState]),f(x)}function g(x){if(x===null){o&&$(),y(0),e.consume(x);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),m(x)}function m(x){if(x===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(x);return}return Ae(x)?(e.consume(x),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(x),m)}function w(x,E){const C=t.sliceStream(x);if(E&&C.push(null),x.previous=i,i&&(i.next=x),i=x,o.defineSkip(x.start),o.write(C),t.parser.lazy[x.start.line]){let v=o.events.length;for(;v--;)if(o.events[v][1].start.offset<a&&(!o.events[v][1].end||o.events[v][1].end.offset>a))return;const T=t.events.length;let R=T,A,k;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(A){k=t.events[R][1].end;break}A=!0}for(y(r),v=T;v<t.events.length;)t.events[v][1].end={...k},v++;wn(t.events,R+1,0,t.events.slice(T)),t.events.length=v}}function y(x){let E=n.length;for(;E-- >x;){const C=n[E];t.containerState=C[1],C[0].exit.call(t,e)}n.length=x}function $(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Sw(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function mo(e){if(e===null||ct(e)||Fr(e))return 1;if(Va(e))return 2}function Wa(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const wl={name:"attention",resolveAll:Ew,tokenize:$w};function Ew(e,t){let n=-1,r,o,i,a,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Fd(d,-l),Fd(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=kn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=kn(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=kn(c,Wa(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=kn(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=kn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,wn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $w(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=mo(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),u=mo(l),d=!u||u===2&&o||n.includes(l),f=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?d:d&&(o||!f)),c._close=!!(i===42?f:f&&(u||!d)),t(l)}}function Fd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kw={name:"autolink",tokenize:Iw};function Iw(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return nn(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||Kt(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Kt(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ma(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):gw(p)?(e.consume(p),c):n(p)}function u(p){return Kt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Kt(p))&&r++<63){const g=p===45?f:d;return e.consume(p),g}return n(p)}}const gi={partial:!0,tokenize:Rw};function Rw(e,t,n){return r;function r(i){return We(i)?Ke(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||Ae(i)?t(i):n(i)}}const Wm={continuation:{tokenize:Pw},exit:Nw,name:"blockQuote",tokenize:Tw};function Tw(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return We(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Pw(e,t,n){const r=this;return o;function o(a){return We(a)?Ke(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Wm,t,n)(a)}}function Nw(e){e.exit("blockQuote")}const qm={name:"characterEscape",tokenize:Mw};function Mw(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return xw(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Xm={name:"characterReference",tokenize:Aw};function Aw(e,t,n){const r=this;let o=0,i,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,a=Kt,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=bw,u):(e.enter("characterReferenceValue"),i=7,a=yl,u(d))}function u(d){if(d===59&&o){const f=e.exit("characterReferenceValue");return a===Kt&&!cu(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&o++<i?(e.consume(d),u):n(d)}}const _d={partial:!0,tokenize:Ow},jd={concrete:!0,name:"codeFenced",tokenize:zw};function zw(e,t,n){const r=this,o={partial:!0,tokenize:C};let i=0,a=0,s;return l;function l(v){return c(v)}function c(v){const T=r.events[r.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(v)}function u(v){return v===s?(a++,e.consume(v),u):a<3?n(v):(e.exit("codeFencedFenceSequence"),We(v)?Ke(e,d,"whitespace")(v):d(v))}function d(v){return v===null||Ae(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(_d,m,E)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(v))}function f(v){return v===null||Ae(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(v)):We(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,p,"whitespace")(v)):v===96&&v===s?n(v):(e.consume(v),f)}function p(v){return v===null||Ae(v)?d(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||Ae(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(v)):v===96&&v===s?n(v):(e.consume(v),g)}function m(v){return e.attempt(o,E,w)(v)}function w(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),y}function y(v){return i>0&&We(v)?Ke(e,$,"linePrefix",i+1)(v):$(v)}function $(v){return v===null||Ae(v)?e.check(_d,m,E)(v):(e.enter("codeFlowValue"),x(v))}function x(v){return v===null||Ae(v)?(e.exit("codeFlowValue"),$(v)):(e.consume(v),x)}function E(v){return e.exit("codeFenced"),t(v)}function C(v,T,R){let A=0;return k;function k(M){return v.enter("lineEnding"),v.consume(M),v.exit("lineEnding"),N}function N(M){return v.enter("codeFencedFence"),We(M)?Ke(v,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):z(M)}function z(M){return M===s?(v.enter("codeFencedFenceSequence"),L(M)):R(M)}function L(M){return M===s?(A++,v.consume(M),L):A>=a?(v.exit("codeFencedFenceSequence"),We(M)?Ke(v,D,"whitespace")(M):D(M)):R(M)}function D(M){return M===null||Ae(M)?(v.exit("codeFencedFence"),T(M)):R(M)}}}function Ow(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Es={name:"codeIndented",tokenize:Lw},Dw={partial:!0,tokenize:Fw};function Lw(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),Ke(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Ae(c)?e.attempt(Dw,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ae(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function Fw(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Ke(e,i,"linePrefix",5)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Ae(a)?o(a):n(a)}}const _w={name:"codeText",previous:Bw,resolve:jw,tokenize:Hw};function jw(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Bw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Hw(e,t,n){let r=0,o,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),o=0,u(d)):Ae(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Ae(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",c(d))}}class Vw{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Do(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Do(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Do(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Do(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Do(this.left,n.reverse())}}}function Do(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Um(e){const t={};let n=-1,r,o,i,a,s,l,c;const u=new Vw(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ww(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(a=u.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...u.get(o)[1].start},s=u.slice(o,n),s.unshift(r),u.splice(o,n-o+1,s))}}return wn(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Ww(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,g=0,m=0;const w=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,w.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),f=w.length;f--;){const y=s.slice(w[f],w[f+1]),$=i.pop();l.push([$,$+y.length-1]),e.splice($,2,y)}for(l.reverse(),f=-1;++f<l.length;)c[g+l[f][0]]=g+l[f][1],g+=l[f][1]-l[f][0]-1;return c}const qw={resolve:Uw,tokenize:Gw},Xw={partial:!0,tokenize:Kw};function Uw(e){return Um(e),e}function Gw(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):Ae(s)?e.check(Xw,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Kw(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ke(e,i,"linePrefix")}function i(a){if(a===null||Ae(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Gm(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),f):y===null||y===32||y===41||ma(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(s),f(y)):y===null||y===60||Ae(y)?n(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function m(y){return!u&&(y===null||y===41||ct(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||ma(y)?n(y):(e.consume(y),y===92?w:m)}function w(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Km(e,t,n,r,o,i){const a=this;let s=0,l;return c;function c(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(i),u}function u(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):Ae(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Ae(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!We(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function Ym(e,t,n,r,o,i){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(o),e.consume(f),e.exit(o),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):(e.enter(i),c(f))}function c(f){return f===a?(e.exit(i),l(a)):f===null?n(f):Ae(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ke(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===a||f===null||Ae(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===a||f===92?(e.consume(f),u):u(f)}}function Qo(e,t){let n;return r;function r(o){return Ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):We(o)?Ke(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Yw={name:"definition",tokenize:Zw},Qw={partial:!0,tokenize:Jw};function Zw(e,t,n){const r=this;let o;return i;function i(p){return e.enter("definition"),a(p)}function a(p){return Km.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return ct(p)?Qo(e,c)(p):c(p)}function c(p){return Gm(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(Qw,d,d)(p)}function d(p){return We(p)?Ke(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Ae(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function Jw(e,t,n){return r;function r(s){return ct(s)?Qo(e,o)(s):n(s)}function o(s){return Ym(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return We(s)?Ke(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Ae(s)?t(s):n(s)}}const e1={name:"hardBreakEscape",tokenize:t1};function t1(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return Ae(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const n1={name:"headingAtx",resolve:r1,tokenize:o1};function r1(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function o1(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||ct(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ae(u)?(e.exit("atxHeading"),t(u)):We(u)?Ke(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||ct(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const i1=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Bd=["pre","script","style","textarea"],a1={concrete:!0,name:"htmlFlow",resolveTo:c1,tokenize:u1},s1={partial:!0,tokenize:f1},l1={partial:!0,tokenize:d1};function c1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function u1(e,t,n){const r=this;let o,i,a,s,l;return c;function c(P){return u(P)}function u(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),i=!0,m):P===63?(e.consume(P),o=3,r.interrupt?t:I):nn(P)?(e.consume(P),a=String.fromCharCode(P),w):n(P)}function f(P){return P===45?(e.consume(P),o=2,p):P===91?(e.consume(P),o=5,s=0,g):nn(P)?(e.consume(P),o=4,r.interrupt?t:I):n(P)}function p(P){return P===45?(e.consume(P),r.interrupt?t:I):n(P)}function g(P){const oe="CDATA[";return P===oe.charCodeAt(s++)?(e.consume(P),s===oe.length?r.interrupt?t:z:g):n(P)}function m(P){return nn(P)?(e.consume(P),a=String.fromCharCode(P),w):n(P)}function w(P){if(P===null||P===47||P===62||ct(P)){const oe=P===47,W=a.toLowerCase();return!oe&&!i&&Bd.includes(W)?(o=1,r.interrupt?t(P):z(P)):i1.includes(a.toLowerCase())?(o=6,oe?(e.consume(P),y):r.interrupt?t(P):z(P)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):i?$(P):x(P))}return P===45||Kt(P)?(e.consume(P),a+=String.fromCharCode(P),w):n(P)}function y(P){return P===62?(e.consume(P),r.interrupt?t:z):n(P)}function $(P){return We(P)?(e.consume(P),$):k(P)}function x(P){return P===47?(e.consume(P),k):P===58||P===95||nn(P)?(e.consume(P),E):We(P)?(e.consume(P),x):k(P)}function E(P){return P===45||P===46||P===58||P===95||Kt(P)?(e.consume(P),E):C(P)}function C(P){return P===61?(e.consume(P),v):We(P)?(e.consume(P),C):x(P)}function v(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),l=P,T):We(P)?(e.consume(P),v):R(P)}function T(P){return P===l?(e.consume(P),l=null,A):P===null||Ae(P)?n(P):(e.consume(P),T)}function R(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ct(P)?C(P):(e.consume(P),R)}function A(P){return P===47||P===62||We(P)?x(P):n(P)}function k(P){return P===62?(e.consume(P),N):n(P)}function N(P){return P===null||Ae(P)?z(P):We(P)?(e.consume(P),N):n(P)}function z(P){return P===45&&o===2?(e.consume(P),O):P===60&&o===1?(e.consume(P),F):P===62&&o===4?(e.consume(P),Q):P===63&&o===3?(e.consume(P),I):P===93&&o===5?(e.consume(P),X):Ae(P)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(s1,Y,L)(P)):P===null||Ae(P)?(e.exit("htmlFlowData"),L(P)):(e.consume(P),z)}function L(P){return e.check(l1,D,Y)(P)}function D(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),M}function M(P){return P===null||Ae(P)?L(P):(e.enter("htmlFlowData"),z(P))}function O(P){return P===45?(e.consume(P),I):z(P)}function F(P){return P===47?(e.consume(P),a="",H):z(P)}function H(P){if(P===62){const oe=a.toLowerCase();return Bd.includes(oe)?(e.consume(P),Q):z(P)}return nn(P)&&a.length<8?(e.consume(P),a+=String.fromCharCode(P),H):z(P)}function X(P){return P===93?(e.consume(P),I):z(P)}function I(P){return P===62?(e.consume(P),Q):P===45&&o===2?(e.consume(P),I):z(P)}function Q(P){return P===null||Ae(P)?(e.exit("htmlFlowData"),Y(P)):(e.consume(P),Q)}function Y(P){return e.exit("htmlFlow"),t(P)}}function d1(e,t,n){const r=this;return o;function o(a){return Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function f1(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(gi,t,n)}}const p1={name:"htmlText",tokenize:m1};function m1(e,t,n){const r=this;let o,i,a;return s;function s(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),l}function l(I){return I===33?(e.consume(I),c):I===47?(e.consume(I),C):I===63?(e.consume(I),x):nn(I)?(e.consume(I),R):n(I)}function c(I){return I===45?(e.consume(I),u):I===91?(e.consume(I),i=0,g):nn(I)?(e.consume(I),$):n(I)}function u(I){return I===45?(e.consume(I),p):n(I)}function d(I){return I===null?n(I):I===45?(e.consume(I),f):Ae(I)?(a=d,F(I)):(e.consume(I),d)}function f(I){return I===45?(e.consume(I),p):d(I)}function p(I){return I===62?O(I):I===45?f(I):d(I)}function g(I){const Q="CDATA[";return I===Q.charCodeAt(i++)?(e.consume(I),i===Q.length?m:g):n(I)}function m(I){return I===null?n(I):I===93?(e.consume(I),w):Ae(I)?(a=m,F(I)):(e.consume(I),m)}function w(I){return I===93?(e.consume(I),y):m(I)}function y(I){return I===62?O(I):I===93?(e.consume(I),y):m(I)}function $(I){return I===null||I===62?O(I):Ae(I)?(a=$,F(I)):(e.consume(I),$)}function x(I){return I===null?n(I):I===63?(e.consume(I),E):Ae(I)?(a=x,F(I)):(e.consume(I),x)}function E(I){return I===62?O(I):x(I)}function C(I){return nn(I)?(e.consume(I),v):n(I)}function v(I){return I===45||Kt(I)?(e.consume(I),v):T(I)}function T(I){return Ae(I)?(a=T,F(I)):We(I)?(e.consume(I),T):O(I)}function R(I){return I===45||Kt(I)?(e.consume(I),R):I===47||I===62||ct(I)?A(I):n(I)}function A(I){return I===47?(e.consume(I),O):I===58||I===95||nn(I)?(e.consume(I),k):Ae(I)?(a=A,F(I)):We(I)?(e.consume(I),A):O(I)}function k(I){return I===45||I===46||I===58||I===95||Kt(I)?(e.consume(I),k):N(I)}function N(I){return I===61?(e.consume(I),z):Ae(I)?(a=N,F(I)):We(I)?(e.consume(I),N):A(I)}function z(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),o=I,L):Ae(I)?(a=z,F(I)):We(I)?(e.consume(I),z):(e.consume(I),D)}function L(I){return I===o?(e.consume(I),o=void 0,M):I===null?n(I):Ae(I)?(a=L,F(I)):(e.consume(I),L)}function D(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||ct(I)?A(I):(e.consume(I),D)}function M(I){return I===47||I===62||ct(I)?A(I):n(I)}function O(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function F(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),H}function H(I){return We(I)?Ke(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):X(I)}function X(I){return e.enter("htmlTextData"),a(I)}}const uu={name:"labelEnd",resolveAll:x1,resolveTo:y1,tokenize:w1},h1={tokenize:v1},g1={tokenize:C1},b1={tokenize:S1};function x1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&wn(e,0,e.length,n),e}function y1(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=kn(s,e.slice(i+1,i+r+3)),s=kn(s,[["enter",u,t]]),s=kn(s,Wa(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=kn(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=kn(s,e.slice(a+1)),s=kn(s,[["exit",l,t]]),wn(e,i,e.length,s),e}function w1(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(f){return i?i._inactive?d(f):(a=r.parser.defined.includes(Mn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(h1,u,a?u:d)(f):f===91?e.attempt(g1,u,a?c:d)(f):a?u(f):d(f)}function c(f){return e.attempt(b1,u,d)(f)}function u(f){return t(f)}function d(f){return i._balanced=!0,n(f)}}function v1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return ct(d)?Qo(e,i)(d):i(d)}function i(d){return d===41?u(d):Gm(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ct(d)?Qo(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?Ym(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return ct(d)?Qo(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function C1(e,t,n){const r=this;return o;function o(s){return Km.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function S1(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const E1={name:"labelStartImage",resolveAll:uu.resolveAll,tokenize:$1};function $1(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const k1={name:"labelStartLink",resolveAll:uu.resolveAll,tokenize:I1};function I1(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const $s={name:"lineEnding",tokenize:R1};function R1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const na={name:"thematicBreak",tokenize:T1};function T1(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Ae(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),We(c)?Ke(e,s,"whitespace")(c):s(c))}}const ln={continuation:{tokenize:A1},exit:O1,name:"list",tokenize:M1},P1={partial:!0,tokenize:D1},N1={partial:!0,tokenize:z1};function M1(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:yl(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(na,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return yl(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(gi,r.interrupt?n:u,e.attempt(P1,f,d))}function u(p){return r.containerState.initialBlankLine=!0,i++,f(p)}function d(p){return We(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function A1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(gi,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!We(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(N1,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(e,e.attempt(ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function z1(e,t,n){const r=this;return Ke(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function O1(e){e.exit(this.containerState.type)}function D1(e,t,n){const r=this;return Ke(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!We(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Hd={name:"setextUnderline",resolveTo:L1,tokenize:F1};function L1(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function F1(e,t,n){const r=this;let o;return i;function i(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),We(c)?Ke(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ae(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const _1={tokenize:j1};function j1(e){const t=this,n=e.attempt(gi,r,e.attempt(this.parser.constructs.flowInitial,o,Ke(e,e.attempt(this.parser.constructs.flow,o,e.attempt(qw,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const B1={resolveAll:Zm()},H1=Qm("string"),V1=Qm("text");function Qm(e){return{resolveAll:Zm(e==="text"?W1:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=o[u];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Zm(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function W1(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const c=o[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const q1={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:Wm},X1={91:Yw},U1={[-2]:Es,[-1]:Es,32:Es},G1={35:n1,42:na,45:[Hd,na],60:a1,61:Hd,95:na,96:jd,126:jd},K1={38:Xm,92:qm},Y1={[-5]:$s,[-4]:$s,[-3]:$s,33:E1,38:Xm,42:wl,60:[kw,p1],91:k1,92:[e1,qm],93:uu,95:wl,96:_w},Q1={null:[wl,B1]},Z1={null:[42,95]},J1={null:[]},ev=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Z1,contentInitial:X1,disable:J1,document:q1,flow:G1,flowInitial:U1,insideSpan:Q1,string:K1,text:Y1},Symbol.toStringTag,{value:"Module"}));function tv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:T(C),check:T(v),consume:$,enter:x,exit:E,interrupt:T(v,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(N){return a=kn(a,N),w(),a[a.length-1]!==null?[]:(R(t,0),c.events=Wa(i,c.events,c),c.events)}function f(N,z){return rv(p(N),z)}function p(N){return nv(a,N)}function g(){const{_bufferIndex:N,_index:z,line:L,column:D,offset:M}=r;return{_bufferIndex:N,_index:z,line:L,column:D,offset:M}}function m(N){o[N.line]=N.column,k()}function w(){let N;for(;r._index<a.length;){const z=a[r._index];if(typeof z=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<z.length;)y(z.charCodeAt(r._bufferIndex));else y(z)}}function y(N){u=u(N)}function $(N){Ae(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,k()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=N}function x(N,z){const L=z||{};return L.type=N,L.start=g(),c.events.push(["enter",L,c]),s.push(L),L}function E(N){const z=s.pop();return z.end=g(),c.events.push(["exit",z,c]),z}function C(N,z){R(N,z.from)}function v(N,z){z.restore()}function T(N,z){return L;function L(D,M,O){let F,H,X,I;return Array.isArray(D)?Y(D):"tokenize"in D?Y([D]):Q(D);function Q(j){return ne;function ne(ee){const _=ee!==null&&j[ee],ae=ee!==null&&j.null,fe=[...Array.isArray(_)?_:_?[_]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return Y(fe)(ee)}}function Y(j){return F=j,H=0,j.length===0?O:P(j[H])}function P(j){return ne;function ne(ee){return I=A(),X=j,j.partial||(c.currentConstruct=j),j.name&&c.parser.constructs.disable.null.includes(j.name)?W():j.tokenize.call(z?Object.assign(Object.create(c),z):c,l,oe,W)(ee)}}function oe(j){return N(X,I),M}function W(j){return I.restore(),++H<F.length?P(F[H]):O}}}function R(N,z){N.resolveAll&&!i.includes(N)&&i.push(N),N.resolve&&wn(c.events,z,c.events.length-z,N.resolve(c.events.slice(z),c)),N.resolveTo&&(c.events=N.resolveTo(c.events,c))}function A(){const N=g(),z=c.previous,L=c.currentConstruct,D=c.events.length,M=Array.from(s);return{from:D,restore:O};function O(){r=N,c.previous=z,c.currentConstruct=L,c.events.length=D,s=M,k()}}function k(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function nv(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function rv(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
3
3
  `;break}case-3:{a=`\r
4
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}function ov(e){const r={constructs:Hm([ev,...(e||{}).extensions||[]]),content:o(yw),defined:[],document:o(vw),flow:o(_1),lazy:{},string:o(H1),text:o(V1)};return r;function o(i){return a;function a(s){return tv(r,i,s)}}}function iv(e){for(;!Um(e););return e}const Vd=/[\0\t\n\r]/g;function av(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let c,u,d,f,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(Vd.lastIndex=d,c=Vd.exec(i),f=c&&c.index!==void 0?c.index:i.length,p=i.charCodeAt(f),!c){t=i.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(i.slice(d,f)),e+=f-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const sv=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lv(e){return e.replace(sv,cv)}function cv(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Vm(n.slice(i?2:1),i?16:10)}return cu(n)||e}const Jm={}.hasOwnProperty;function uv(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),dv(n)(iv(ov(n).document().write(av()(e,t,!0))))}function dv(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(he),autolinkProtocol:A,autolinkEmail:A,atxHeading:i(Se),blockQuote:i(ee),characterEscape:A,characterReference:A,codeFenced:i(oe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(oe,a),codeText:i(B,a),codeTextData:A,data:A,codeFlowValue:A,definition:i(ie),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ae),hardBreakEscape:i(ye),hardBreakTrailing:i(ye),htmlFlow:i(q,a),htmlFlowData:A,htmlText:i(q,a),htmlTextData:A,image:i(me),label:a,link:i(he),listItem:i(ue),listItemValue:f,listOrdered:i(se,d),listUnordered:i(se),paragraph:i(pe),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Se),strong:i(Ne),thematicBreak:i(Ie)},exit:{atxHeading:l(),atxHeadingSequence:v,autolink:l(),autolinkEmail:H,autolinkProtocol:j,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:F,characterReferenceMarkerNumeric:F,characterReferenceValue:U,characterReference:re,codeFenced:l(w),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:k,codeIndented:l(y),codeText:l(M),codeTextData:k,data:k,definition:l(),definitionDestinationString:E,definitionLabelString:$,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(O),hardBreakTrailing:l(O),htmlFlow:l(z),htmlFlowData:k,htmlText:l(D),htmlTextData:k,image:l(_),label:X,labelText:V,lineEnding:R,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ne,resourceDestinationString:P,resourceTitleString:Y,resource:K,setextHeading:l(N),setextHeadingLineSequence:I,setextHeadingText:C,strong:l(),thematicBreak:l()}};eg(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let Q={type:"root",children:[]};const le={stack:[Q],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},be=[];let $e=-1;for(;++$e<W.length;)if(W[$e][1].type==="listOrdered"||W[$e][1].type==="listUnordered")if(W[$e][0]==="enter")be.push($e);else{const ce=be.pop();$e=o(W,ce,$e)}for($e=-1;++$e<W.length;){const ce=t[W[$e][0]];Jm.call(ce,W[$e][1].type)&&ce[W[$e][1].type].call(Object.assign({sliceSerialize:W[$e][2].sliceSerialize},le),W[$e][1])}if(le.tokenStack.length>0){const ce=le.tokenStack[le.tokenStack.length-1];(ce[1]||Wd).call(le,void 0,ce[0])}for(Q.position={start:dr(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:dr(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)Q=t.transforms[$e](Q)||Q;return Q}function o(W,Q,le){let be=Q-1,$e=-1,ce=!1,te,ve,Re,Ue;for(;++be<=le;){const Pe=W[be];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?$e++:$e--,Ue=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&(te&&!Ue&&!$e&&!Re&&(Re=be),Ue=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ue=void 0}if(!$e&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||$e===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if(te){let ze=be;for(ve=void 0;ze--;){const Me=W[ze];if(Me[1].type==="lineEnding"||Me[1].type==="lineEndingBlank"){if(Me[0]==="exit")continue;ve&&(W[ve][1].type="lineEndingBlank",ce=!0),Me[1].type="lineEnding",ve=ze}else if(!(Me[1].type==="linePrefix"||Me[1].type==="blockQuotePrefix"||Me[1].type==="blockQuotePrefixWhitespace"||Me[1].type==="blockQuoteMarker"||Me[1].type==="listItemIndent"))break}Re&&(!ve||Re<ve)&&(te._spread=!0),te.end=Object.assign({},ve?W[ve][1].start:Pe[1].end),W.splice(ve||be,0,["exit",te,Pe[2]]),be++,le++}if(Pe[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};te=ze,W.splice(be,0,["enter",ze,Pe[2]]),be++,le++,Re=void 0,Ue=!0}}}return W[Q][1]._spread=ce,le}function i(W,Q){return le;function le(be){s.call(this,W(be),be),Q&&Q.call(this,be)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,Q,le){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([Q,le||void 0]),W.position={start:dr(Q.start),end:void 0}}function l(W){return Q;function Q(le){W&&W.call(this,le),c.call(this,le)}}function c(W,Q){const le=this.stack.pop(),be=this.tokenStack.pop();if(be)be[0].type!==W.type&&(Q?Q.call(this,W,be[0]):(be[1]||Wd).call(this,W,be[0]));else throw new Error("Cannot close `"+W.type+"` ("+Yo({start:W.start,end:W.end})+"): it’s not open");le.position.end=dr(W.end)}function u(){return lu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(W){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function p(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=W}function h(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=W}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W.replace(/(\r?\n|\r)$/g,"")}function $(W){const Q=this.resume(),le=this.stack[this.stack.length-1];le.label=Q,le.identifier=Mn(this.sliceSerialize(W)).toLowerCase()}function x(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.title=W}function E(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.url=W}function v(W){const Q=this.stack[this.stack.length-1];if(!Q.depth){const le=this.sliceSerialize(W).length;Q.depth=le}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function I(W){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function A(W){const le=this.stack[this.stack.length-1].children;let be=le[le.length-1];(!be||be.type!=="text")&&(be=Ee(),be.position={start:dr(W.start),end:void 0},le.push(be)),this.stack.push(be)}function k(W){const Q=this.stack.pop();Q.value+=this.sliceSerialize(W),Q.position.end=dr(W.end)}function R(W){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const le=Q.children[Q.children.length-1];le.position.end=dr(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(A.call(this,W),k.call(this,W))}function O(){this.data.atHardBreak=!0}function z(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W}function D(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W}function M(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W}function L(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Q,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function _(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Q,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function V(W){const Q=this.sliceSerialize(W),le=this.stack[this.stack.length-2];le.label=lv(Q),le.identifier=Mn(Q).toLowerCase()}function X(){const W=this.stack[this.stack.length-1],Q=this.resume(),le=this.stack[this.stack.length-1];if(this.data.inReference=!0,le.type==="link"){const be=W.children;le.children=be}else le.alt=Q}function P(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.url=W}function Y(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.title=W}function K(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ne(W){const Q=this.resume(),le=this.stack[this.stack.length-1];le.label=Q,le.identifier=Mn(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function F(W){this.data.characterReferenceType=W.type}function U(W){const Q=this.sliceSerialize(W),le=this.data.characterReferenceType;let be;le?(be=Vm(Q,le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):be=cu(Q);const $e=this.stack[this.stack.length-1];$e.value+=be}function re(W){const Q=this.stack.pop();Q.position.end=dr(W.end)}function j(W){k.call(this,W);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize(W)}function H(W){k.call(this,W);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize(W)}function ee(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function B(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ae(){return{type:"emphasis",children:[]}}function Se(){return{type:"heading",depth:0,children:[]}}function ye(){return{type:"break"}}function q(){return{type:"html",value:""}}function me(){return{type:"image",title:null,url:"",alt:null}}function he(){return{type:"link",title:null,url:"",children:[]}}function se(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function ue(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function pe(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function Ee(){return{type:"text",value:""}}function Ie(){return{type:"thematicBreak"}}}function dr(e){return{line:e.line,column:e.column,offset:e.offset}}function eg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?eg(e,r):fv(e,r)}}function fv(e,t){let n;for(n in t)if(Jm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Wd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Yo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is still open")}function pv(e){const t=this;t.parser=n;function n(r){return uv(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mv(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gv(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
- `}]}function hv(e,t){const n=t.value?t.value+`
6
- `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function bv(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xv(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yv(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=So(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function wv(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vv(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function tg(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function Cv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tg(e,t);const o={src:So(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function Sv(e,t){const n={src:So(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ev(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function $v(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tg(e,t);const o={href:So(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function kv(e,t){const n={href:So(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Iv(e,t,n){const r=e.all(t),o=n?Rv(n):ng(t),i={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
4
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}function ov(e){const r={constructs:Hm([ev,...(e||{}).extensions||[]]),content:o(yw),defined:[],document:o(vw),flow:o(_1),lazy:{},string:o(H1),text:o(V1)};return r;function o(i){return a;function a(s){return tv(r,i,s)}}}function iv(e){for(;!Um(e););return e}const Vd=/[\0\t\n\r]/g;function av(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let c,u,d,f,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(Vd.lastIndex=d,c=Vd.exec(i),f=c&&c.index!==void 0?c.index:i.length,p=i.charCodeAt(f),!c){t=i.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(i.slice(d,f)),e+=f-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const sv=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lv(e){return e.replace(sv,cv)}function cv(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Vm(n.slice(i?2:1),i?16:10)}return cu(n)||e}const Jm={}.hasOwnProperty;function uv(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),dv(n)(iv(ov(n).document().write(av()(e,t,!0))))}function dv(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(we),autolinkProtocol:A,autolinkEmail:A,atxHeading:i(le),blockQuote:i(ae),characterEscape:A,characterReference:A,codeFenced:i(fe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(fe,a),codeText:i(q,a),codeTextData:A,data:A,codeFlowValue:A,definition:i(ce),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(V),hardBreakEscape:i(se),hardBreakTrailing:i(se),htmlFlow:i(G,a),htmlFlowData:A,htmlText:i(G,a),htmlTextData:A,image:i(K),label:a,link:i(we),listItem:i(me),listItemValue:f,listOrdered:i(ie,d),listUnordered:i(ie),paragraph:i(pe),reference:P,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(le),strong:i(Ne),thematicBreak:i(Ie)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:_,autolinkProtocol:ee,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:j,characterReference:ne,codeFenced:l(w),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:k,codeIndented:l(y),codeText:l(M),codeTextData:k,data:k,definition:l(),definitionDestinationString:E,definitionLabelString:$,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(z),hardBreakTrailing:l(z),htmlFlow:l(L),htmlFlowData:k,htmlText:l(D),htmlTextData:k,image:l(F),label:X,labelText:H,lineEnding:N,link:l(O),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:oe,resourceDestinationString:I,resourceTitleString:Q,resource:Y,setextHeading:l(R),setextHeadingLineSequence:T,setextHeadingText:v,strong:l(),thematicBreak:l()}};eh(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let Z={type:"root",children:[]};const ue={stack:[Z],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},xe=[];let $e=-1;for(;++$e<B.length;)if(B[$e][1].type==="listOrdered"||B[$e][1].type==="listUnordered")if(B[$e][0]==="enter")xe.push($e);else{const de=xe.pop();$e=o(B,de,$e)}for($e=-1;++$e<B.length;){const de=t[B[$e][0]];Jm.call(de,B[$e][1].type)&&de[B[$e][1].type].call(Object.assign({sliceSerialize:B[$e][2].sliceSerialize},ue),B[$e][1])}if(ue.tokenStack.length>0){const de=ue.tokenStack[ue.tokenStack.length-1];(de[1]||Wd).call(ue,void 0,de[0])}for(Z.position={start:dr(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:dr(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)Z=t.transforms[$e](Z)||Z;return Z}function o(B,Z,ue){let xe=Z-1,$e=-1,de=!1,re,Ce,Re,Ue;for(;++xe<=ue;){const Te=B[xe];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Te[0]==="enter"?$e++:$e--,Ue=void 0;break}case"lineEndingBlank":{Te[0]==="enter"&&(re&&!Ue&&!$e&&!Re&&(Re=xe),Ue=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ue=void 0}if(!$e&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||$e===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(re){let ze=xe;for(Ce=void 0;ze--;){const Me=B[ze];if(Me[1].type==="lineEnding"||Me[1].type==="lineEndingBlank"){if(Me[0]==="exit")continue;Ce&&(B[Ce][1].type="lineEndingBlank",de=!0),Me[1].type="lineEnding",Ce=ze}else if(!(Me[1].type==="linePrefix"||Me[1].type==="blockQuotePrefix"||Me[1].type==="blockQuotePrefixWhitespace"||Me[1].type==="blockQuoteMarker"||Me[1].type==="listItemIndent"))break}Re&&(!Ce||Re<Ce)&&(re._spread=!0),re.end=Object.assign({},Ce?B[Ce][1].start:Te[1].end),B.splice(Ce||xe,0,["exit",re,Te[2]]),xe++,ue++}if(Te[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};re=ze,B.splice(xe,0,["enter",ze,Te[2]]),xe++,ue++,Re=void 0,Ue=!0}}}return B[Z][1]._spread=de,ue}function i(B,Z){return ue;function ue(xe){s.call(this,B(xe),xe),Z&&Z.call(this,xe)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(B,Z,ue){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([Z,ue||void 0]),B.position={start:dr(Z.start),end:void 0}}function l(B){return Z;function Z(ue){B&&B.call(this,ue),c.call(this,ue)}}function c(B,Z){const ue=this.stack.pop(),xe=this.tokenStack.pop();if(xe)xe[0].type!==B.type&&(Z?Z.call(this,B,xe[0]):(xe[1]||Wd).call(this,B,xe[0]));else throw new Error("Cannot close `"+B.type+"` ("+Yo({start:B.start,end:B.end})+"): it’s not open");ue.position.end=dr(B.end)}function u(){return lu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(B){if(this.data.expectingFirstListItemValue){const Z=this.stack[this.stack.length-2];Z.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function p(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.lang=B}function g(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.meta=B}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B.replace(/(\r?\n|\r)$/g,"")}function $(B){const Z=this.resume(),ue=this.stack[this.stack.length-1];ue.label=Z,ue.identifier=Mn(this.sliceSerialize(B)).toLowerCase()}function x(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.title=B}function E(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.url=B}function C(B){const Z=this.stack[this.stack.length-1];if(!Z.depth){const ue=this.sliceSerialize(B).length;Z.depth=ue}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function T(B){const Z=this.stack[this.stack.length-1];Z.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function A(B){const ue=this.stack[this.stack.length-1].children;let xe=ue[ue.length-1];(!xe||xe.type!=="text")&&(xe=Ee(),xe.position={start:dr(B.start),end:void 0},ue.push(xe)),this.stack.push(xe)}function k(B){const Z=this.stack.pop();Z.value+=this.sliceSerialize(B),Z.position.end=dr(B.end)}function N(B){const Z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ue=Z.children[Z.children.length-1];ue.position.end=dr(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Z.type)&&(A.call(this,B),k.call(this,B))}function z(){this.data.atHardBreak=!0}function L(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B}function D(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B}function M(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B}function O(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=Z,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function F(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=Z,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function H(B){const Z=this.sliceSerialize(B),ue=this.stack[this.stack.length-2];ue.label=lv(Z),ue.identifier=Mn(Z).toLowerCase()}function X(){const B=this.stack[this.stack.length-1],Z=this.resume(),ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,ue.type==="link"){const xe=B.children;ue.children=xe}else ue.alt=Z}function I(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.url=B}function Q(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.title=B}function Y(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function oe(B){const Z=this.resume(),ue=this.stack[this.stack.length-1];ue.label=Z,ue.identifier=Mn(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function W(B){this.data.characterReferenceType=B.type}function j(B){const Z=this.sliceSerialize(B),ue=this.data.characterReferenceType;let xe;ue?(xe=Vm(Z,ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):xe=cu(Z);const $e=this.stack[this.stack.length-1];$e.value+=xe}function ne(B){const Z=this.stack.pop();Z.position.end=dr(B.end)}function ee(B){k.call(this,B);const Z=this.stack[this.stack.length-1];Z.url=this.sliceSerialize(B)}function _(B){k.call(this,B);const Z=this.stack[this.stack.length-1];Z.url="mailto:"+this.sliceSerialize(B)}function ae(){return{type:"blockquote",children:[]}}function fe(){return{type:"code",lang:null,meta:null,value:""}}function q(){return{type:"inlineCode",value:""}}function ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function V(){return{type:"emphasis",children:[]}}function le(){return{type:"heading",depth:0,children:[]}}function se(){return{type:"break"}}function G(){return{type:"html",value:""}}function K(){return{type:"image",title:null,url:"",alt:null}}function we(){return{type:"link",title:null,url:"",children:[]}}function ie(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function me(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function pe(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function Ee(){return{type:"text",value:""}}function Ie(){return{type:"thematicBreak"}}}function dr(e){return{line:e.line,column:e.column,offset:e.offset}}function eh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?eh(e,r):fv(e,r)}}function fv(e,t){let n;for(n in t)if(Jm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Wd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Yo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is still open")}function pv(e){const t=this;t.parser=n;function n(r){return uv(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mv(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function hv(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
+ `}]}function gv(e,t){const n=t.value?t.value+`
6
+ `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function bv(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xv(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yv(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=So(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function wv(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vv(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function th(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function Cv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return th(e,t);const o={src:So(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function Sv(e,t){const n={src:So(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ev(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function $v(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return th(e,t);const o={href:So(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function kv(e,t){const n={href:So(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Iv(e,t,n){const r=e.all(t),o=n?Rv(n):nh(t),i={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
7
7
  `}),u.type==="element"&&u.tagName==="p"&&!o?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
8
- `});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function Rv(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ng(n[r])}return t}function ng(e){const t=e.spread;return t??e.children.length>1}function Pv(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Tv(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nv(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Mv(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Av(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=ou(t.children[1]),l=Om(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function zv(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<s;){const d=t.children[l],f={},p=a?a[l]:void 0;p&&(f.align=p);let h={type:"element",tagName:i,properties:f,children:[]};d&&(h.children=e.all(d),e.patch(d,h),h=e.applyData(d,h)),c.push(h)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function Ov(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qd=9,Xd=32;function Dv(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Ud(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Ud(t.slice(o),o>0,!1)),i.join("")}function Ud(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===qd||i===Xd;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===qd||i===Xd;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Lv(e,t){const n={type:"text",value:Dv(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Fv(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const _v={blockquote:mv,break:gv,code:hv,delete:bv,emphasis:xv,footnoteReference:yv,heading:wv,html:vv,imageReference:Cv,image:Sv,inlineCode:Ev,linkReference:$v,link:kv,listItem:Iv,list:Pv,paragraph:Tv,root:Nv,strong:Mv,table:Av,tableCell:Ov,tableRow:zv,text:Lv,thematicBreak:Fv,toml:Di,yaml:Di,definition:Di,footnoteDefinition:Di};function Di(){}const rg=-1,qa=0,Zo=1,ga=2,du=3,fu=4,pu=5,mu=6,og=7,ig=8,{defineProperty:jv}=Object,ag=typeof self=="object"?self:globalThis,Gd=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ag[e](t)},Bv=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case qa:case rg:return n(a,o);case Zo:{const s=n([],o);for(const l of a)s.push(r(l));return s}case ga:{const s=n({},o);for(const[l,c]of a){const u=r(l),d=r(c);u==="__proto__"?jv(s,u,{value:d,configurable:!0,enumerable:!0,writable:!0}):s[u]=d}return s}case du:return n(new Date(a),o);case fu:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case pu:{const s=n(new Map,o);for(const[l,c]of a)s.set(r(l),r(c));return s}case mu:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case og:{const{name:s,message:l}=a;return n(typeof ag[s]=="function"?Gd(s,l):new Error(l),o)}case ig:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}case"-0":return-0}return n(Gd(i,a),o)};return r},Kd=e=>Bv(new Map,e)(0),Pr="",{toString:Hv}={},{keys:Vv,is:Wv}=Object,Lo=e=>{const t=typeof e;if(t!=="object"||!e)return[qa,t];const n=Hv.call(e).slice(8,-1);switch(n){case"Array":return[Zo,Pr];case"Object":return[ga,Pr];case"Date":return[du,Pr];case"RegExp":return[fu,Pr];case"Map":return[pu,Pr];case"Set":return[mu,Pr];case"DataView":return[Zo,n]}return n.includes("Array")?[Zo,n]:e instanceof Error?[og,e.name||"Error"]:[ga,n]},Li=([e,t])=>e===qa&&(t==="function"||t==="symbol"),qv=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=Lo(a);switch(s){case qa:{let u=a;switch(l){case"bigint":s=ig,u=a.toString();break;case"number":if(!a&&Wv(a,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return o([rg],a)}return o([s,u],a)}case Zo:{if(l){let f=a;return l==="DataView"?f=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(a)),o([l,[...f]],a)}const u=[],d=o([s,u],a);for(const f of a)u.push(i(f));return d}case ga:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const u=[],d=o([s,u],a);for(const f of Vv(a))(e||!Li(Lo(a[f])))&&u.push([i(f),i(a[f])]);return d}case du:return o([s,isNaN(a.getTime())?Pr:a.toISOString()],a);case fu:{const{source:u,flags:d}=a;return o([s,{source:u,flags:d}],a)}case pu:{const u=[],d=o([s,u],a);for(const[f,p]of a)(e||!(Li(Lo(f))||Li(Lo(p))))&&u.push([i(f),i(p)]);return d}case mu:{const u=[],d=o([s,u],a);for(const f of a)(e||!Li(Lo(f)))&&u.push(i(f));return d}}const{message:c}=a;return o([s,{name:l,message:c}],a)};return i},Yd=(e,{json:t,lossy:n}={})=>{const r=[];return qv(!(t||n),!!t,new Map,r)(e),r},ha=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Kd(Yd(e,t)):structuredClone(e):(e,t)=>Kd(Yd(e,t));function Xv(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Uv(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Gv(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Xv,r=e.options.footnoteBackLabel||Uv,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),f=So(d.toLowerCase());let p=0;const h=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++p<=m;){h.length>0&&h.push({type:"text",value:" "});let $=typeof n=="string"?n:n(l,p);typeof $=="string"&&($={type:"text",value:$}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray($)?$:[$]})}const w=u[u.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const $=w.children[w.children.length-1];$&&$.type==="text"?$.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...h)}else u.push(...h);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(u,!0)};e.patch(c,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...ha(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
8
+ `});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function Rv(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=nh(n[r])}return t}function nh(e){const t=e.spread;return t??e.children.length>1}function Tv(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Pv(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nv(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Mv(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Av(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=ou(t.children[1]),l=Om(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function zv(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<s;){const d=t.children[l],f={},p=a?a[l]:void 0;p&&(f.align=p);let g={type:"element",tagName:i,properties:f,children:[]};d&&(g.children=e.all(d),e.patch(d,g),g=e.applyData(d,g)),c.push(g)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function Ov(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qd=9,Xd=32;function Dv(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Ud(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Ud(t.slice(o),o>0,!1)),i.join("")}function Ud(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===qd||i===Xd;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===qd||i===Xd;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Lv(e,t){const n={type:"text",value:Dv(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Fv(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const _v={blockquote:mv,break:hv,code:gv,delete:bv,emphasis:xv,footnoteReference:yv,heading:wv,html:vv,imageReference:Cv,image:Sv,inlineCode:Ev,linkReference:$v,link:kv,listItem:Iv,list:Tv,paragraph:Pv,root:Nv,strong:Mv,table:Av,tableCell:Ov,tableRow:zv,text:Lv,thematicBreak:Fv,toml:Di,yaml:Di,definition:Di,footnoteDefinition:Di};function Di(){}const rh=-1,qa=0,Zo=1,ha=2,du=3,fu=4,pu=5,mu=6,oh=7,ih=8,{defineProperty:jv}=Object,ah=typeof self=="object"?self:globalThis,Gd=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ah[e](t)},Bv=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case qa:case rh:return n(a,o);case Zo:{const s=n([],o);for(const l of a)s.push(r(l));return s}case ha:{const s=n({},o);for(const[l,c]of a){const u=r(l),d=r(c);u==="__proto__"?jv(s,u,{value:d,configurable:!0,enumerable:!0,writable:!0}):s[u]=d}return s}case du:return n(new Date(a),o);case fu:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case pu:{const s=n(new Map,o);for(const[l,c]of a)s.set(r(l),r(c));return s}case mu:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case oh:{const{name:s,message:l}=a;return n(typeof ah[s]=="function"?Gd(s,l):new Error(l),o)}case ih:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}case"-0":return-0}return n(Gd(i,a),o)};return r},Kd=e=>Bv(new Map,e)(0),Tr="",{toString:Hv}={},{keys:Vv,is:Wv}=Object,Lo=e=>{const t=typeof e;if(t!=="object"||!e)return[qa,t];const n=Hv.call(e).slice(8,-1);switch(n){case"Array":return[Zo,Tr];case"Object":return[ha,Tr];case"Date":return[du,Tr];case"RegExp":return[fu,Tr];case"Map":return[pu,Tr];case"Set":return[mu,Tr];case"DataView":return[Zo,n]}return n.includes("Array")?[Zo,n]:e instanceof Error?[oh,e.name||"Error"]:[ha,n]},Li=([e,t])=>e===qa&&(t==="function"||t==="symbol"),qv=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=Lo(a);switch(s){case qa:{let u=a;switch(l){case"bigint":s=ih,u=a.toString();break;case"number":if(!a&&Wv(a,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return o([rh],a)}return o([s,u],a)}case Zo:{if(l){let f=a;return l==="DataView"?f=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(a)),o([l,[...f]],a)}const u=[],d=o([s,u],a);for(const f of a)u.push(i(f));return d}case ha:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const u=[],d=o([s,u],a);for(const f of Vv(a))(e||!Li(Lo(a[f])))&&u.push([i(f),i(a[f])]);return d}case du:return o([s,isNaN(a.getTime())?Tr:a.toISOString()],a);case fu:{const{source:u,flags:d}=a;return o([s,{source:u,flags:d}],a)}case pu:{const u=[],d=o([s,u],a);for(const[f,p]of a)(e||!(Li(Lo(f))||Li(Lo(p))))&&u.push([i(f),i(p)]);return d}case mu:{const u=[],d=o([s,u],a);for(const f of a)(e||!Li(Lo(f)))&&u.push(i(f));return d}}const{message:c}=a;return o([s,{name:l,message:c}],a)};return i},Yd=(e,{json:t,lossy:n}={})=>{const r=[];return qv(!(t||n),!!t,new Map,r)(e),r},ga=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Kd(Yd(e,t)):structuredClone(e):(e,t)=>Kd(Yd(e,t));function Xv(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Uv(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Gv(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Xv,r=e.options.footnoteBackLabel||Uv,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),f=So(d.toLowerCase());let p=0;const g=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++p<=m;){g.length>0&&g.push({type:"text",value:" "});let $=typeof n=="string"?n:n(l,p);typeof $=="string"&&($={type:"text",value:$}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray($)?$:[$]})}const w=u[u.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const $=w.children[w.children.length-1];$&&$.type==="text"?$.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...g)}else u.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(u,!0)};e.patch(c,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...ga(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
9
9
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
10
- `}]}}const Xa=function(e){if(e==null)return Zv;if(typeof e=="function")return Ua(e);if(typeof e=="object")return Array.isArray(e)?Kv(e):Yv(e);if(typeof e=="string")return Qv(e);throw new Error("Expected function, string, or object as test")};function Kv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xa(e[n]);return Ua(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function Yv(e){const t=e;return Ua(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function Qv(e){return Ua(t);function t(n){return n&&n.type===e}}function Ua(e){return t;function t(n,r,o){return!!(Jv(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function Zv(){return!0}function Jv(e){return e!==null&&typeof e=="object"&&"type"in e}const sg=[],eC=!0,vl=!1,tC="skip";function lg(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Xa(o),a=r?-1:1;s(e,void 0,[])();function s(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=sg,h,m,w;if((!t||i(l,c,u[u.length-1]||void 0))&&(p=nC(n(l,u)),p[0]===vl))return p;if("children"in l&&l.children){const y=l;if(y.children&&p[0]!==tC)for(m=(r?y.children.length:-1)+a,w=u.concat(y);m>-1&&m<y.children.length;){const $=y.children[m];if(h=s($,m,w)(),h[0]===vl)return h;m=typeof h[1]=="number"?h[1]:m+a}}return p}}}function nC(e){return Array.isArray(e)?e:typeof e=="number"?[eC,e]:e==null?sg:[e]}function gu(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),lg(e,i,s,o);function s(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return a(l,d,u)}}const Cl={}.hasOwnProperty,rC={};function oC(e,t){const n=t||rC,r=new Map,o=new Map,i=new Map,a={..._v,...n.handlers},s={all:c,applyData:aC,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:iC,wrap:lC};return gu(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:o,f=String(u.identifier).toUpperCase();d.has(f)||d.set(f,u)}}),s;function l(u,d){const f=u.type,p=s.handlers[f];if(Cl.call(s.handlers,f)&&p)return p(s,u,d);if(s.options.passThrough&&s.options.passThrough.includes(f)){if("children"in u){const{children:m,...w}=u,y=ha(w);return y.children=s.all(u),y}return ha(u)}return(s.options.unknownHandler||sC)(s,u,d)}function c(u){const d=[];if("children"in u){const f=u.children;let p=-1;for(;++p<f.length;){const h=s.one(f[p],u);if(h){if(p&&f[p-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=Qd(h.value)),!Array.isArray(h)&&h.type==="element")){const m=h.children[0];m&&m.type==="text"&&(m.value=Qd(m.value))}Array.isArray(h)?d.push(...h):d.push(h)}}}return d}}function iC(e,t){e.position&&(t.position=qy(e))}function aC(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,ha(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function sC(e,t){const n=t.data||{},r="value"in t&&!(Cl.call(n,"hProperties")||Cl.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lC(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
10
+ `}]}}const Xa=function(e){if(e==null)return Zv;if(typeof e=="function")return Ua(e);if(typeof e=="object")return Array.isArray(e)?Kv(e):Yv(e);if(typeof e=="string")return Qv(e);throw new Error("Expected function, string, or object as test")};function Kv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xa(e[n]);return Ua(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function Yv(e){const t=e;return Ua(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function Qv(e){return Ua(t);function t(n){return n&&n.type===e}}function Ua(e){return t;function t(n,r,o){return!!(Jv(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function Zv(){return!0}function Jv(e){return e!==null&&typeof e=="object"&&"type"in e}const sh=[],eC=!0,vl=!1,tC="skip";function lh(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Xa(o),a=r?-1:1;s(e,void 0,[])();function s(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=sh,g,m,w;if((!t||i(l,c,u[u.length-1]||void 0))&&(p=nC(n(l,u)),p[0]===vl))return p;if("children"in l&&l.children){const y=l;if(y.children&&p[0]!==tC)for(m=(r?y.children.length:-1)+a,w=u.concat(y);m>-1&&m<y.children.length;){const $=y.children[m];if(g=s($,m,w)(),g[0]===vl)return g;m=typeof g[1]=="number"?g[1]:m+a}}return p}}}function nC(e){return Array.isArray(e)?e:typeof e=="number"?[eC,e]:e==null?sh:[e]}function hu(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),lh(e,i,s,o);function s(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return a(l,d,u)}}const Cl={}.hasOwnProperty,rC={};function oC(e,t){const n=t||rC,r=new Map,o=new Map,i=new Map,a={..._v,...n.handlers},s={all:c,applyData:aC,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:iC,wrap:lC};return hu(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:o,f=String(u.identifier).toUpperCase();d.has(f)||d.set(f,u)}}),s;function l(u,d){const f=u.type,p=s.handlers[f];if(Cl.call(s.handlers,f)&&p)return p(s,u,d);if(s.options.passThrough&&s.options.passThrough.includes(f)){if("children"in u){const{children:m,...w}=u,y=ga(w);return y.children=s.all(u),y}return ga(u)}return(s.options.unknownHandler||sC)(s,u,d)}function c(u){const d=[];if("children"in u){const f=u.children;let p=-1;for(;++p<f.length;){const g=s.one(f[p],u);if(g){if(p&&f[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Qd(g.value)),!Array.isArray(g)&&g.type==="element")){const m=g.children[0];m&&m.type==="text"&&(m.value=Qd(m.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function iC(e,t){e.position&&(t.position=qy(e))}function aC(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,ga(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function sC(e,t){const n=t.data||{},r="value"in t&&!(Cl.call(n,"hProperties")||Cl.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lC(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
11
  `});++r<e.length;)r&&n.push({type:"text",value:`
12
12
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
13
  `}),n}function Qd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zd(e,t){const n=oC(e,t),r=n.one(e,void 0),o=Gv(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
14
- `},o),i}function cC(e,t){return e&&"run"in e?async function(n,r){const o=Zd(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Zd(n,{file:r,...e||t})}}function Jd(e){if(e)throw e}var ra=Object.prototype.hasOwnProperty,cg=Object.prototype.toString,ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,nf=function(t){return typeof Array.isArray=="function"?Array.isArray(t):cg.call(t)==="[object Array]"},rf=function(t){if(!t||cg.call(t)!=="[object Object]")return!1;var n=ra.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ra.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||ra.call(t,o)},of=function(t,n){ef&&n.name==="__proto__"?ef(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},af=function(t,n){if(n==="__proto__")if(ra.call(t,n)){if(tf)return tf(t,n).value}else return;return t[n]},uC=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=af(s,n),o=af(t,n),s!==o&&(u&&o&&(rf(o)||(i=nf(o)))?(i?(i=!1,a=r&&nf(r)?r:[]):a=r&&rf(r)?r:{},of(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&of(s,{name:n,newValue:o}));return s};const ks=zn.getDefaultExportFromCjs(uC);function Sl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dC(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...c){const u=e[++i];let d=-1;if(l){a(l);return}for(;++d<o.length;)(c[d]===null||c[d]===void 0)&&(c[d]=o[d]);o=c,u?fC(u,s)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function fC(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return o(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const Wn={basename:pC,dirname:mC,extname:gC,join:hC,sep:"/"};function pC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bi(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function mC(e){if(bi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gC(e){bi(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function hC(...e){let t=-1,n;for(;++t<e.length;)bi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bC(n)}function bC(e){bi(e);const t=e.codePointAt(0)===47;let n=xC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function xC(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function bi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yC={cwd:wC};function wC(){return"/"}function El(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vC(e){if(typeof e=="string")e=new URL(e);else if(!El(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return CC(e)}function CC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Is=["history","path","basename","stem","extname","dirname"];class ug{constructor(t){let n;t?El(t)?n={path:t}:typeof t=="string"||SC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":yC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Is.length;){const i=Is[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)Is.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Wn.basename(this.path):void 0}set basename(t){Ps(t,"basename"),Rs(t,"basename"),this.path=Wn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Wn.dirname(this.path):void 0}set dirname(t){sf(this.basename,"dirname"),this.path=Wn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Wn.extname(this.path):void 0}set extname(t){if(Rs(t,"extname"),sf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Wn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){El(t)&&(t=vC(t)),Ps(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Wn.basename(this.path,this.extname):void 0}set stem(t){Ps(t,"stem"),Rs(t,"stem"),this.path=Wn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Zt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rs(e,t){if(e&&e.includes(Wn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wn.sep+"`")}function Ps(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function sf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function SC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const EC=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},$C={}.hasOwnProperty;class hu extends EC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dC()}copy(){const t=new hu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ks(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ms("data",this.frozen),this.namespace[t]=n,this):$C.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ms("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Fi(t),r=this.parser||this.Parser;return Ts("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ts("process",this.parser||this.Parser),Ns("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Fi(t),l=r.parse(s);r.run(l,s,function(u,d,f){if(u||!d||!f)return c(u);const p=d,h=r.stringify(p,f);RC(h)?f.value=h:f.result=h,c(u,f)});function c(u,d){u||!d?a(u):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ts("processSync",this.parser||this.Parser),Ns("processSync",this.compiler||this.Compiler),this.process(t,o),cf("processSync","process",n),r;function o(i,a){n=!0,Jd(i),r=a}}run(t,n,r){lf(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=Fi(n);o.run(t,l,c);function c(u,d,f){const p=d||t;u?s(u):a?a(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),cf("runSync","run",r),o;function i(a,s){Jd(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Fi(n),o=this.compiler||this.Compiler;return Ns("stringify",o),lf(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Ms("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(o.settings=ks(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];i(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...u]);else if(u.length>0){let[p,...h]=u;const m=r[f][1];Sl(m)&&Sl(p)&&(p=ks(!0,m,p)),r[f]=[c,p,...h]}}}}const kC=new hu().freeze();function Ts(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ns(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ms(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lf(e){if(!Sl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fi(e){return IC(e)?e:new ug(e)}function IC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RC(e){return typeof e=="string"||PC(e)}function PC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const TC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",uf=[],df={allowDangerousHtml:!0},NC=/^(https?|ircs?|mailto|xmpp)$/i,MC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function bu(e){const t=AC(e),n=zC(e);return OC(t.runSync(t.parse(n),n),e)}function AC(e){const t=e.rehypePlugins||uf,n=e.remarkPlugins||uf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...df}:df;return kC().use(pv).use(n).use(cC,r).use(t)}function zC(e){const t=e.children||"",n=new ug;return typeof t=="string"&&(n.value=t),n}function OC(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||DC;for(const u of MC)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+TC+u.id,void 0);return gu(e,c),Yy(e,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function c(u,d,f){if(u.type==="raw"&&f&&typeof d=="number")return a?f.children.splice(d,1):f.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let p;for(p in Ss)if(Object.hasOwn(Ss,p)&&Object.hasOwn(u.properties,p)){const h=u.properties[p],m=Ss[p];(m===null||m.includes(u.tagName))&&(u.properties[p]=l(String(h||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):i?i.includes(u.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(u,d,f)),p&&f&&typeof d=="number")return s&&u.children?f.children.splice(d,1,...u.children):f.children.splice(d,1),d}}}function DC(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||NC.test(e.slice(0,t))?e:""}function ff(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function LC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function FC(e,t,n){const o=Xa((n||{}).ignore||[]),i=_C(t);let a=-1;for(;++a<i.length;)lg(e,"text",s);function s(c,u){let d=-1,f;for(;++d<u.length;){const p=u[d],h=f?f.children:void 0;if(o(p,h?h.indexOf(p):void 0,f))return;f=p}if(f)return l(c,u)}function l(c,u){const d=u[u.length-1],f=i[a][0],p=i[a][1];let h=0;const w=d.children.indexOf(c);let y=!1,$=[];f.lastIndex=0;let x=f.exec(c.value);for(;x;){const E=x.index,v={index:x.index,input:x.input,stack:[...u,c]};let C=p(...x,v);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?f.lastIndex=E+1:(h!==E&&$.push({type:"text",value:c.value.slice(h,E)}),Array.isArray(C)?$.push(...C):C&&$.push(C),h=E+x[0].length,y=!0),!f.global)break;x=f.exec(c.value)}return y?(h<c.value.length&&$.push({type:"text",value:c.value.slice(h)}),d.children.splice(w,1,...$)):$=[c],w+$.length}}function _C(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([jC(o[0]),BC(o[1])])}return t}function jC(e){return typeof e=="string"?new RegExp(LC(e),"g"):e}function BC(e){return typeof e=="function"?e:function(){return e}}const As="phrasing",zs=["autolink","link","image","label"];function HC(){return{transforms:[KC],enter:{literalAutolink:WC,literalAutolinkEmail:Os,literalAutolinkHttp:Os,literalAutolinkWww:Os},exit:{literalAutolink:GC,literalAutolinkEmail:UC,literalAutolinkHttp:qC,literalAutolinkWww:XC}}}function VC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:As,notInConstruct:zs},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:As,notInConstruct:zs},{character:":",before:"[ps]",after:"\\/",inConstruct:As,notInConstruct:zs}]}}function WC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Os(e){this.config.enter.autolinkProtocol.call(this,e)}function qC(e){this.config.exit.autolinkProtocol.call(this,e)}function XC(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function UC(e){this.config.exit.autolinkEmail.call(this,e)}function GC(e){this.exit(e)}function KC(e){FC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,YC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),QC]],{ignore:["link","linkReference"]})}function YC(e,t,n,r,o){let i="";if(!dg(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!ZC(n)))return!1;const a=JC(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function QC(e,t,n,r){return!dg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ZC(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function JC(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=ff(e,"(");let i=ff(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function dg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Fr(n)||Va(n))&&(!t||n!==47)}fg.peek=lS;function eS(){this.buffer()}function tS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function nS(){this.buffer()}function rS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function oS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iS(e){this.exit(e)}function aS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sS(e){this.exit(e)}function lS(){return"["}function fg(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function cS(){return{enter:{gfmFootnoteCallString:eS,gfmFootnoteCall:tS,gfmFootnoteDefinitionLabelString:nS,gfmFootnoteDefinition:rS},exit:{gfmFootnoteCallString:oS,gfmFootnoteCall:iS,gfmFootnoteDefinitionLabelString:aS,gfmFootnoteDefinition:sS}}}function uS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,i,a){const s=i.createTracker(a);let l=s.move("[^");const c=i.enter("footnoteDefinition"),u=i.enter("label");return l+=s.move(i.safe(i.associationId(r),{before:l,after:"]"})),u(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
15
- `:" ")+i.indentLines(i.containerFlow(r,s.current()),t?pg:dS))),c(),l}}function dS(e,t,n){return t===0?e:pg(e,t,n)}function pg(e,t,n){return(n?"":" ")+e}const fS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mg.peek=bS;function pS(){return{canContainEols:["delete"],enter:{strikethrough:gS},exit:{strikethrough:hS}}}function mS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:fS}],handlers:{delete:mg}}}function gS(e){this.enter({type:"delete",children:[]},e)}function hS(e){this.exit(e)}function mg(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function bS(){return"~"}function xS(e){return e.length}function yS(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||xS,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],w=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const $=wS(e[u][y]);if(n.alignDelimiters!==!1){const x=o($);w[y]=x,(l[y]===void 0||x>l[y])&&(l[y]=x)}m.push($)}a[u]=m,s[u]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)i[d]=pf(r[d]);else{const m=pf(r);for(;++d<c;)i[d]=m}d=-1;const f=[],p=[];for(;++d<c;){const m=i[d];let w="",y="";m===99?(w=":",y=":"):m===108?w=":":m===114&&(y=":");let $=n.alignDelimiters===!1?1:Math.max(1,l[d]-w.length-y.length);const x=w+"-".repeat($)+y;n.alignDelimiters!==!1&&($=w.length+$+y.length,$>l[d]&&(l[d]=$),p[d]=$),f[d]=x}a.splice(1,0,f),s.splice(1,0,p),u=-1;const h=[];for(;++u<a.length;){const m=a[u],w=s[u];d=-1;const y=[];for(;++d<c;){const $=m[d]||"";let x="",E="";if(n.alignDelimiters!==!1){const v=l[d]-(w[d]||0),C=i[d];C===114?x=" ".repeat(v):C===99?v%2?(x=" ".repeat(v/2+.5),E=" ".repeat(v/2-.5)):(x=" ".repeat(v/2),E=x):E=" ".repeat(v)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&$==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(x),y.push($),n.alignDelimiters!==!1&&y.push(E),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}h.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return h.join(`
16
- `)}function wS(e){return e==null?"":String(e)}function pf(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function vS(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),CS);return o(),a}function CS(e,t,n){return">"+(n?"":" ")+e}function SS(e,t){return mf(e,t.inConstruct,!0)&&!mf(e,t.notInConstruct,!1)}function mf(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function gf(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
14
+ `},o),i}function cC(e,t){return e&&"run"in e?async function(n,r){const o=Zd(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Zd(n,{file:r,...e||t})}}function Jd(e){if(e)throw e}var ra=Object.prototype.hasOwnProperty,ch=Object.prototype.toString,ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,nf=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ch.call(t)==="[object Array]"},rf=function(t){if(!t||ch.call(t)!=="[object Object]")return!1;var n=ra.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ra.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||ra.call(t,o)},of=function(t,n){ef&&n.name==="__proto__"?ef(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},af=function(t,n){if(n==="__proto__")if(ra.call(t,n)){if(tf)return tf(t,n).value}else return;return t[n]},uC=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=af(s,n),o=af(t,n),s!==o&&(u&&o&&(rf(o)||(i=nf(o)))?(i?(i=!1,a=r&&nf(r)?r:[]):a=r&&rf(r)?r:{},of(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&of(s,{name:n,newValue:o}));return s};const ks=zn.getDefaultExportFromCjs(uC);function Sl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dC(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...c){const u=e[++i];let d=-1;if(l){a(l);return}for(;++d<o.length;)(c[d]===null||c[d]===void 0)&&(c[d]=o[d]);o=c,u?fC(u,s)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function fC(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return o(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const Wn={basename:pC,dirname:mC,extname:hC,join:gC,sep:"/"};function pC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bi(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function mC(e){if(bi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function hC(e){bi(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function gC(...e){let t=-1,n;for(;++t<e.length;)bi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bC(n)}function bC(e){bi(e);const t=e.codePointAt(0)===47;let n=xC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function xC(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function bi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yC={cwd:wC};function wC(){return"/"}function El(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vC(e){if(typeof e=="string")e=new URL(e);else if(!El(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return CC(e)}function CC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Is=["history","path","basename","stem","extname","dirname"];class uh{constructor(t){let n;t?El(t)?n={path:t}:typeof t=="string"||SC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":yC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Is.length;){const i=Is[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)Is.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Wn.basename(this.path):void 0}set basename(t){Ts(t,"basename"),Rs(t,"basename"),this.path=Wn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Wn.dirname(this.path):void 0}set dirname(t){sf(this.basename,"dirname"),this.path=Wn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Wn.extname(this.path):void 0}set extname(t){if(Rs(t,"extname"),sf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Wn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){El(t)&&(t=vC(t)),Ts(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Wn.basename(this.path,this.extname):void 0}set stem(t){Ts(t,"stem"),Rs(t,"stem"),this.path=Wn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Zt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rs(e,t){if(e&&e.includes(Wn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wn.sep+"`")}function Ts(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function sf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function SC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const EC=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},$C={}.hasOwnProperty;class gu extends EC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dC()}copy(){const t=new gu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ks(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ms("data",this.frozen),this.namespace[t]=n,this):$C.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ms("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Fi(t),r=this.parser||this.Parser;return Ps("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ps("process",this.parser||this.Parser),Ns("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Fi(t),l=r.parse(s);r.run(l,s,function(u,d,f){if(u||!d||!f)return c(u);const p=d,g=r.stringify(p,f);RC(g)?f.value=g:f.result=g,c(u,f)});function c(u,d){u||!d?a(u):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ps("processSync",this.parser||this.Parser),Ns("processSync",this.compiler||this.Compiler),this.process(t,o),cf("processSync","process",n),r;function o(i,a){n=!0,Jd(i),r=a}}run(t,n,r){lf(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=Fi(n);o.run(t,l,c);function c(u,d,f){const p=d||t;u?s(u):a?a(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),cf("runSync","run",r),o;function i(a,s){Jd(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Fi(n),o=this.compiler||this.Compiler;return Ns("stringify",o),lf(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Ms("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(o.settings=ks(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];i(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...u]);else if(u.length>0){let[p,...g]=u;const m=r[f][1];Sl(m)&&Sl(p)&&(p=ks(!0,m,p)),r[f]=[c,p,...g]}}}}const kC=new gu().freeze();function Ps(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ns(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ms(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lf(e){if(!Sl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fi(e){return IC(e)?e:new uh(e)}function IC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RC(e){return typeof e=="string"||TC(e)}function TC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",uf=[],df={allowDangerousHtml:!0},NC=/^(https?|ircs?|mailto|xmpp)$/i,MC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function bu(e){const t=AC(e),n=zC(e);return OC(t.runSync(t.parse(n),n),e)}function AC(e){const t=e.rehypePlugins||uf,n=e.remarkPlugins||uf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...df}:df;return kC().use(pv).use(n).use(cC,r).use(t)}function zC(e){const t=e.children||"",n=new uh;return typeof t=="string"&&(n.value=t),n}function OC(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||DC;for(const u of MC)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+PC+u.id,void 0);return hu(e,c),Yy(e,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function c(u,d,f){if(u.type==="raw"&&f&&typeof d=="number")return a?f.children.splice(d,1):f.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let p;for(p in Ss)if(Object.hasOwn(Ss,p)&&Object.hasOwn(u.properties,p)){const g=u.properties[p],m=Ss[p];(m===null||m.includes(u.tagName))&&(u.properties[p]=l(String(g||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):i?i.includes(u.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(u,d,f)),p&&f&&typeof d=="number")return s&&u.children?f.children.splice(d,1,...u.children):f.children.splice(d,1),d}}}function DC(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||NC.test(e.slice(0,t))?e:""}function ff(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function LC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function FC(e,t,n){const o=Xa((n||{}).ignore||[]),i=_C(t);let a=-1;for(;++a<i.length;)lh(e,"text",s);function s(c,u){let d=-1,f;for(;++d<u.length;){const p=u[d],g=f?f.children:void 0;if(o(p,g?g.indexOf(p):void 0,f))return;f=p}if(f)return l(c,u)}function l(c,u){const d=u[u.length-1],f=i[a][0],p=i[a][1];let g=0;const w=d.children.indexOf(c);let y=!1,$=[];f.lastIndex=0;let x=f.exec(c.value);for(;x;){const E=x.index,C={index:x.index,input:x.input,stack:[...u,c]};let v=p(...x,C);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?f.lastIndex=E+1:(g!==E&&$.push({type:"text",value:c.value.slice(g,E)}),Array.isArray(v)?$.push(...v):v&&$.push(v),g=E+x[0].length,y=!0),!f.global)break;x=f.exec(c.value)}return y?(g<c.value.length&&$.push({type:"text",value:c.value.slice(g)}),d.children.splice(w,1,...$)):$=[c],w+$.length}}function _C(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([jC(o[0]),BC(o[1])])}return t}function jC(e){return typeof e=="string"?new RegExp(LC(e),"g"):e}function BC(e){return typeof e=="function"?e:function(){return e}}const As="phrasing",zs=["autolink","link","image","label"];function HC(){return{transforms:[KC],enter:{literalAutolink:WC,literalAutolinkEmail:Os,literalAutolinkHttp:Os,literalAutolinkWww:Os},exit:{literalAutolink:GC,literalAutolinkEmail:UC,literalAutolinkHttp:qC,literalAutolinkWww:XC}}}function VC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:As,notInConstruct:zs},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:As,notInConstruct:zs},{character:":",before:"[ps]",after:"\\/",inConstruct:As,notInConstruct:zs}]}}function WC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Os(e){this.config.enter.autolinkProtocol.call(this,e)}function qC(e){this.config.exit.autolinkProtocol.call(this,e)}function XC(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function UC(e){this.config.exit.autolinkEmail.call(this,e)}function GC(e){this.exit(e)}function KC(e){FC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,YC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),QC]],{ignore:["link","linkReference"]})}function YC(e,t,n,r,o){let i="";if(!dh(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!ZC(n)))return!1;const a=JC(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function QC(e,t,n,r){return!dh(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ZC(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function JC(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=ff(e,"(");let i=ff(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function dh(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Fr(n)||Va(n))&&(!t||n!==47)}fh.peek=lS;function eS(){this.buffer()}function tS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function nS(){this.buffer()}function rS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function oS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iS(e){this.exit(e)}function aS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sS(e){this.exit(e)}function lS(){return"["}function fh(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function cS(){return{enter:{gfmFootnoteCallString:eS,gfmFootnoteCall:tS,gfmFootnoteDefinitionLabelString:nS,gfmFootnoteDefinition:rS},exit:{gfmFootnoteCallString:oS,gfmFootnoteCall:iS,gfmFootnoteDefinitionLabelString:aS,gfmFootnoteDefinition:sS}}}function uS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,i,a){const s=i.createTracker(a);let l=s.move("[^");const c=i.enter("footnoteDefinition"),u=i.enter("label");return l+=s.move(i.safe(i.associationId(r),{before:l,after:"]"})),u(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
15
+ `:" ")+i.indentLines(i.containerFlow(r,s.current()),t?ph:dS))),c(),l}}function dS(e,t,n){return t===0?e:ph(e,t,n)}function ph(e,t,n){return(n?"":" ")+e}const fS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mh.peek=bS;function pS(){return{canContainEols:["delete"],enter:{strikethrough:hS},exit:{strikethrough:gS}}}function mS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:fS}],handlers:{delete:mh}}}function hS(e){this.enter({type:"delete",children:[]},e)}function gS(e){this.exit(e)}function mh(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function bS(){return"~"}function xS(e){return e.length}function yS(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||xS,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],w=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const $=wS(e[u][y]);if(n.alignDelimiters!==!1){const x=o($);w[y]=x,(l[y]===void 0||x>l[y])&&(l[y]=x)}m.push($)}a[u]=m,s[u]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)i[d]=pf(r[d]);else{const m=pf(r);for(;++d<c;)i[d]=m}d=-1;const f=[],p=[];for(;++d<c;){const m=i[d];let w="",y="";m===99?(w=":",y=":"):m===108?w=":":m===114&&(y=":");let $=n.alignDelimiters===!1?1:Math.max(1,l[d]-w.length-y.length);const x=w+"-".repeat($)+y;n.alignDelimiters!==!1&&($=w.length+$+y.length,$>l[d]&&(l[d]=$),p[d]=$),f[d]=x}a.splice(1,0,f),s.splice(1,0,p),u=-1;const g=[];for(;++u<a.length;){const m=a[u],w=s[u];d=-1;const y=[];for(;++d<c;){const $=m[d]||"";let x="",E="";if(n.alignDelimiters!==!1){const C=l[d]-(w[d]||0),v=i[d];v===114?x=" ".repeat(C):v===99?C%2?(x=" ".repeat(C/2+.5),E=" ".repeat(C/2-.5)):(x=" ".repeat(C/2),E=x):E=" ".repeat(C)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&$==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(x),y.push($),n.alignDelimiters!==!1&&y.push(E),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}g.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
16
+ `)}function wS(e){return e==null?"":String(e)}function pf(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function vS(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),CS);return o(),a}function CS(e,t,n){return">"+(n?"":" ")+e}function SS(e,t){return mf(e,t.inConstruct,!0)&&!mf(e,t.notInConstruct,!1)}function mf(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function hf(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
17
17
  `&&SS(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
18
  `}function ES(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function $S(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function kS(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function IS(e,t,n,r){const o=kS(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if($S(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(i,RS);return d(),f}const s=n.createTracker(r),l=o.repeat(Math.max(ES(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const d=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
19
19
  `,encode:["`"],...s.current()})),d()}return u+=s.move(`
20
20
  `),i&&(u+=s.move(i+`
21
- `)),u+=s.move(l),c(),u}function RS(e,t,n){return(n?"":" ")+e}function xu(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function PS(e,t,n,r){const o=xu(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
22
- `,...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c}function TS(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function oi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ba(e,t,n){const r=mo(e),o=mo(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gg.peek=NS;function gg(e,t,n,r){const o=TS(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ba(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=oi(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ba(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+oi(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function NS(e,t,n){return n.options.emphasis||"*"}function MS(e,t){let n=!1;return gu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,vl}),!!((!e.depth||e.depth<3)&&lu(e)&&(t.options.setext||n))}function AS(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(MS(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...i.current(),before:`
21
+ `)),u+=s.move(l),c(),u}function RS(e,t,n){return(n?"":" ")+e}function xu(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function TS(e,t,n,r){const o=xu(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
22
+ `,...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c}function PS(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function oi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ba(e,t,n){const r=mo(e),o=mo(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}hh.peek=NS;function hh(e,t,n,r){const o=PS(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ba(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=oi(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ba(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+oi(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function NS(e,t,n){return n.options.emphasis||"*"}function MS(e,t){let n=!1;return hu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,vl}),!!((!e.depth||e.depth<3)&&lu(e)&&(t.options.setext||n))}function AS(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(MS(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...i.current(),before:`
23
23
  `,after:`
24
24
  `});return d(),u(),f+`
25
25
  `+(o===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
26
26
  `))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
27
- `,...i.current()});return/^[\t ]/.test(c)&&(c=oi(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}hg.peek=zS;function hg(e){return e.value||""}function zS(){return"<"}bg.peek=OS;function bg(e,t,n,r){const o=xu(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function OS(){return"!"}xg.peek=DS;function xg(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function DS(){return"!"}yg.peek=LS;function yg(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return o+r+o}function LS(){return"`"}function wg(e,t){const n=lu(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}vg.peek=FS;function vg(e,t,n,r){const o=xu(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(wg(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),n.stack=u,d}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function FS(e,t,n){return wg(e,n)?"<":"["}Cg.peek=_S;function Cg(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function _S(){return"["}function yu(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function jS(e){const t=yu(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function BS(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Sg(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function HS(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?BS(n):yu(n);const s=e.ordered?a==="."?")":".":jS(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Sg(n)===a&&u){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c}function VS(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function WS(e,t,n,r){const o=VS(n);let i=n.bulletCurrent||yu(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(d,f,p){return f?(p?"":" ".repeat(a))+d:(p?i:i+" ".repeat(a-i.length))+d}}function qS(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const XS=Xa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function US(e,t,n,r){return(e.children.some(function(a){return XS(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function GS(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Eg.peek=KS;function Eg(e,t,n,r){const o=GS(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ba(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=oi(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ba(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+oi(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function KS(e,t,n){return n.options.strong||"*"}function YS(e,t,n,r){return n.safe(e.value,r)}function QS(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ZS(e,t,n){const r=(Sg(n)+(n.options.ruleSpaces?" ":"")).repeat(QS(n));return n.options.ruleSpaces?r.slice(0,-1):r}const $g={blockquote:vS,break:gf,code:IS,definition:PS,emphasis:gg,hardBreak:gf,heading:AS,html:hg,image:bg,imageReference:xg,inlineCode:yg,link:vg,linkReference:Cg,list:HS,listItem:WS,paragraph:qS,root:US,strong:Eg,text:YS,thematicBreak:ZS};function JS(){return{enter:{table:eE,tableData:hf,tableHeader:hf,tableRow:nE},exit:{codeText:rE,table:tE,tableData:Ds,tableHeader:Ds,tableRow:Ds}}}function eE(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function tE(e){this.exit(e),this.data.inTable=void 0}function nE(e){this.enter({type:"tableRow",children:[]},e)}function Ds(e){this.exit(e)}function hf(e){this.enter({type:"tableCell",children:[]},e)}function rE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oE));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oE(e,t){return t==="|"?t:e}function iE(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:l,tableRow:s}};function a(p,h,m,w){return c(u(p,m,w),p.align)}function s(p,h,m,w){const y=d(p,m,w),$=c([y]);return $.slice(0,$.indexOf(`
29
- `))}function l(p,h,m,w){const y=m.enter("tableCell"),$=m.enter("phrasing"),x=m.containerPhrasing(p,{...w,before:i,after:i});return $(),y(),x}function c(p,h){return yS(p,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function u(p,h,m){const w=p.children;let y=-1;const $=[],x=h.enter("table");for(;++y<w.length;)$[y]=d(w[y],h,m);return x(),$}function d(p,h,m){const w=p.children;let y=-1;const $=[],x=h.enter("tableRow");for(;++y<w.length;)$[y]=l(w[y],p,h,m);return x(),$}function f(p,h,m){let w=$g.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function aE(){return{exit:{taskListCheckValueChecked:bf,taskListCheckValueUnchecked:bf,paragraph:lE}}}function sE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cE}}}function bf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lE(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cE(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=$g.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function uE(){return[HC(),cS(),pS(),JS(),aE()]}function dE(e){return{extensions:[VC(),uS(e),mS(),iE(e),sE()]}}const fE={tokenize:xE,partial:!0},kg={tokenize:yE,partial:!0},Ig={tokenize:wE,partial:!0},Rg={tokenize:vE,partial:!0},pE={tokenize:CE,partial:!0},Pg={name:"wwwAutolink",tokenize:hE,previous:Ng},Tg={name:"protocolAutolink",tokenize:bE,previous:Mg},lr={name:"emailAutolink",tokenize:gE,previous:Ag},Un={};function mE(){return{text:Un}}let kr=48;for(;kr<123;)Un[kr]=lr,kr++,kr===58?kr=65:kr===91&&(kr=97);Un[43]=lr;Un[45]=lr;Un[46]=lr;Un[95]=lr;Un[72]=[lr,Tg];Un[104]=[lr,Tg];Un[87]=[lr,Pg];Un[119]=[lr,Pg];function gE(e,t,n){const r=this;let o,i;return a;function a(d){return!$l(d)||!Ag.call(r,r.previous)||wu(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return $l(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(pE,u,c)(d):d===45||d===95||Kt(d)?(i=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),o=!0,l}function u(d){return i&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function hE(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Ng.call(r,r.previous)||wu(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(fE,e.attempt(kg,e.attempt(Ig,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function bE(e,t,n){const r=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&Mg.call(r,r.previous)&&!wu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(nn(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const f=o.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?c:(i=!0,l)):n(d)}function c(d){return d===null||ma(d)||ct(d)||Fr(d)||Va(d)?n(d):e.attempt(kg,e.attempt(Ig,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function xE(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function yE(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Rg,l,s)(c):c===null||ct(c)||Fr(c)||c!==45&&Va(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function wE(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Rg,t,i)(a):a===null||ct(a)||Fr(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function vE(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||ct(s)||Fr(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||ct(s)||Fr(s)?t(s):r(s)}function i(s){return nn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):nn(s)?(e.consume(s),a):n(s)}}function CE(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Kt(i)?n(i):t(i)}}function Ng(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ct(e)}function Mg(e){return!nn(e)}function Ag(e){return!(e===47||$l(e))}function $l(e){return e===43||e===45||e===46||e===95||Kt(e)}function wu(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const SE={tokenize:NE,partial:!0};function EE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:RE,continuation:{tokenize:PE},exit:TE}},text:{91:{name:"gfmFootnoteCall",tokenize:IE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$E,resolveTo:kE}}}}function $E(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Mn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function kE(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function IE(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(i>999||d===93&&!a||d===null||d===91||ct(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return o.includes(Mn(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ct(d)||(a=!0),i++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,c):c(d)}}function RE(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||ct(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Mn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ct(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function f(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ke(e,p,"gfmFootnoteDefinitionWhitespace")):n(h)}function p(h){return t(h)}}function PE(e,t,n){return e.check(hi,t,e.attempt(SE,t,n))}function TE(e){e.exit("gfmFootnoteDefinition")}function NE(e,t,n){const r=this;return Ke(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function ME(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},f=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",d,s]],p=s.parser.constructs.insideSpan.null;p&&wn(f,f.length,0,Wa(p,a.slice(c+1,l),s)),wn(f,f.length,0,[["exit",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),wn(a,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let d=0;return f;function f(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=mo(c);if(h===126)return d>1?l(h):(a.consume(h),d++,p);if(d<2&&!n)return l(h);const w=a.exit("strikethroughSequenceTemporary"),y=mo(h);return w._open=!y||y===2&&!!m,w._close=!m||m===2&&!!y,s(h)}}}class AE{constructor(){this.map=[]}add(t,n,r){zE(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0}}function zE(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function OE(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function DE(){return{flow:{null:{name:"table",tokenize:LE,resolveAll:FE}}}}function LE(e,t,n){const r=this;let o=0,i=0,a;return s;function s(k){let R=r.events.length-1;for(;R>-1;){const D=r.events[R][1].type;if(D==="lineEnding"||D==="linePrefix")R--;else break}const O=R>-1?r.events[R][1].type:null,z=O==="tableHead"||O==="tableRow"?C:l;return z===C&&r.parser.lazy[r.now().line]?n(k):z(k)}function l(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(a=!0,i+=1),u(k)}function u(k){return k===null?n(k):Ae(k)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):We(k)?Ke(e,u,"whitespace")(k):(i+=1,a&&(a=!1,o+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(k)))}function d(k){return k===null||k===124||ct(k)?(e.exit("data"),u(k)):(e.consume(k),k===92?f:d)}function f(k){return k===92||k===124?(e.consume(k),d):d(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),a=!1,We(k)?Ke(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):h(k))}function h(k){return k===45||k===58?w(k):k===124?(a=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),m):v(k)}function m(k){return We(k)?Ke(e,w,"whitespace")(k):w(k)}function w(k){return k===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(i+=1,y(k)):k===null||Ae(k)?E(k):v(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),$(k)):v(k)}function $(k){return k===45?(e.consume(k),$):k===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(k))}function x(k){return We(k)?Ke(e,E,"whitespace")(k):E(k)}function E(k){return k===124?h(k):k===null||Ae(k)?!a||o!==i?v(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):v(k)}function v(k){return n(k)}function C(k){return e.enter("tableRow"),I(k)}function I(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),I):k===null||Ae(k)?(e.exit("tableRow"),t(k)):We(k)?Ke(e,I,"whitespace")(k):(e.enter("data"),N(k))}function N(k){return k===null||k===124||ct(k)?(e.exit("data"),I(k)):(e.consume(k),k===92?A:N)}function A(k){return k===92||k===124?(e.consume(k),N):N(k)}}function FE(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,d;const f=new AE;for(;++n<e.length;){const p=e[n],h=p[1];p[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(xf(f,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=_i(f,t,i,o,void 0,d),i=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],d=_i(f,t,i,o,void 0,d)),i=a,a=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],d=_i(f,t,i,o,n,d)):a[1]!==0&&(d=_i(f,t,a,o,n,d)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&xf(f,t,l,c,u),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=OE(t.events,n))}return e}function _i(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},ro(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=ro(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=ro(t.events,n[2]),u=ro(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},ro(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function xf(e,t,n,r,o){const i=[],a=ro(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function ro(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const _E={name:"tasklistCheck",tokenize:BE};function jE(){return{text:{91:_E}}}function BE(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return ct(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return Ae(l)?t(l):We(l)?e.check({tokenize:HE},t,n)(l):n(l)}}function HE(e,t,n){return Ke(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function VE(e){return Hm([mE(),EE(),ME(e),DE(),jE()])}const WE={};function vu(e){const t=this,n=e||WE,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(VE(n)),i.push(uE()),a.push(dE(n))}function zg({content:e}){return S.jsx("div",{className:"sa-text-part",children:S.jsx(bu,{remarkPlugins:[vu],children:e})})}const qE="//at.alicdn.com/t/c/font_5210396_5l251pz1zln.js";let yf=!1;function Og(e=qE){if(yf||typeof document>"u")return;yf=!0;const t=e.split("?")[0].split("/").pop();if(t&&document.querySelector(`script[src*="${t}"]`))return;const n=document.createElement("script");n.src=e,document.head.appendChild(n)}Og();function Ze({name:e,size:t=16,color:n="currentColor",className:r,style:o}){return S.jsx("svg",{className:r,style:{width:t,height:t,fill:n,verticalAlign:"middle",...o},"aria-hidden":"true",children:S.jsx("use",{href:`#icon-agent-${e}`})})}function XE(e){const t=e/1e3;return t<10?`${t.toFixed(1)}s`:`${Math.round(t)}s`}function Dg({content:e,isStreaming:t,durationMs:n,expandWhileStreaming:r,showDuration:o}){const[i,a]=b.useState(!1),s=t&&r||i,l=!t&&o&&n!=null&&n>0?XE(n):null;return S.jsxs("div",{className:"sa-thinking-part",onClick:()=>a(!i),children:[S.jsxs("div",{className:"sa-thinking-header",children:[S.jsx("span",{className:"sa-thinking-icon",children:S.jsx(Ze,{name:"brain",size:14})}),S.jsxs("span",{className:"sa-thinking-label",children:[t?"思考中…":"已深度思考",l&&S.jsxs("span",{className:"sa-thinking-duration",children:[" · 用时 ",l]})]}),S.jsx("span",{className:`sa-thinking-arrow ${s?"expanded":""}`,children:S.jsx(Ze,{name:"chevron-right",size:12})})]}),s&&S.jsx("div",{className:"sa-thinking-content",children:e})]})}function Lg({toolName:e,toolCallId:t,args:n,pending:r,expandWhileStreaming:o}){const[i,a]=b.useState(!1),[s,l]=b.useState(!1),c=r&&o||i;let u=n;try{u=JSON.stringify(JSON.parse(n),null,2)}catch{}const d=b.useCallback(()=>{var f;(f=navigator.clipboard)==null||f.writeText(u).then(()=>{l(!0),setTimeout(()=>l(!1),2e3)}).catch(()=>{})},[u]);return S.jsxs("div",{className:"sa-tool-call-part",children:[S.jsxs("div",{className:"sa-tool-call-header",onClick:()=>a(!i),children:[S.jsx("span",{className:"sa-tool-icon",children:S.jsx(Ze,{name:"zap",size:14})}),S.jsxs("span",{className:"sa-tool-name",children:[r?"正在调用":"调用工具",": ",e]}),S.jsx("span",{className:`sa-thinking-arrow ${c?"expanded":""}`,children:S.jsx(Ze,{name:"chevron-right",size:12})})]}),c&&S.jsxs(S.Fragment,{children:[S.jsx("pre",{className:"sa-tool-args",children:u}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsxs("button",{className:"sa-action-btn",onClick:d,title:"复制",children:[S.jsx(Ze,{name:s?"circle-check":"copy",size:14})," ",s?"已复制":"复制"]})})]})]})}function wf({text:e}){const[t,n]=b.useState(!1),r=()=>{var o;(o=navigator.clipboard)==null||o.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)}).catch(()=>{})};return S.jsxs("button",{className:"sa-action-btn",onClick:r,title:"复制",children:[S.jsx(Ze,{name:t?"circle-check":"copy",size:14})," ",t?"已复制":"复制"]})}function UE({html:e}){const[t,n]=b.useState(null);return b.useEffect(()=>{let r=!1;return Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs")).then(o=>{r||n(o.default.sanitize(e,{FORCE_BODY:!0,ADD_ATTR:["target"]}))}),()=>{r=!0}},[e]),t===null?null:S.jsx("div",{className:"sa-tool-result-html-scroll",children:S.jsx("div",{className:"sa-tool-result-html sa-text-part",dangerouslySetInnerHTML:{__html:t}})})}function Fg({toolName:e,content:t,renderMode:n,html:r,defaultExpanded:o}){const[i,a]=b.useState(!!(o??n==="html"));let s=t;if(s)try{s=JSON.stringify(JSON.parse(s),null,2)}catch{}return S.jsxs("div",{className:"sa-tool-result-part",children:[S.jsxs("div",{className:"sa-tool-result-header",onClick:()=>a(!i),children:[S.jsx("span",{className:"sa-tool-icon",children:S.jsx(Ze,{name:"circle-check",size:14,color:"#10b981"})}),S.jsx("span",{className:"sa-tool-result-label",children:e||"工具返回"}),S.jsx("span",{className:`sa-thinking-arrow ${i?"expanded":""}`,children:S.jsx(Ze,{name:"chevron-right",size:12})})]}),i&&(n==="html"&&r?S.jsxs(S.Fragment,{children:[S.jsx(UE,{html:r}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(wf,{text:r})})]}):s?S.jsxs(S.Fragment,{children:[S.jsx("pre",{className:"sa-tool-result-content",children:s}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(wf,{text:s})})]}):S.jsx("pre",{className:"sa-tool-result-content",children:"—"}))]})}function _g({content:e,onRetry:t}){return S.jsxs("div",{className:"sa-error-part",children:[S.jsxs("div",{className:"sa-error-content",children:[S.jsx("span",{className:"sa-error-icon",children:S.jsx(Ze,{name:"triangle-alert",size:14})}),S.jsx("span",{children:e||"发生错误"})]}),t&&S.jsx("button",{className:"sa-error-retry",onClick:t,children:"重试"})]})}function jg(e){return e==null||Number.isNaN(e)?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function GE({attachment:e}){const t=S.jsxs(S.Fragment,{children:[S.jsx(Ze,{name:"file-text",size:14,color:"#6366f1"}),S.jsx("span",{className:"sa-attachment-chip-name",children:e.filename}),e.size!=null&&S.jsx("span",{className:"sa-attachment-chip-size",children:jg(e.size)})]});return e.url?S.jsx("a",{className:"sa-attachment-chip",href:e.url,target:"_blank",rel:"noreferrer",download:e.filename,title:`下载 ${e.filename}`,children:t}):S.jsx("span",{className:"sa-attachment-chip",title:e.filename,children:t})}function KE(e){if(e==null)return null;if(typeof e=="string")return e.trim()?e:null;if(Array.isArray(e))return e.length===0?null:e.map(t=>typeof t=="object"?JSON.stringify(t):String(t)).join("、");if(typeof e=="object")try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function xi({value:e}){const t=KE(e);return t==null?null:S.jsxs("div",{className:"sa-interrupt-answer",children:[S.jsx(Ze,{name:"text-cursor-input",size:14,color:"#6366f1"}),S.jsxs("span",{children:["你的回答:",t]})]})}function Eo({interrupt:e,icon:t,color:n}){const r=e.content?S.jsx(bu,{remarkPlugins:[vu],children:e.content}):null;return S.jsxs("div",{className:"sa-interrupt-content",children:[S.jsx(Ze,{name:t,size:16,color:n}),S.jsx("div",{className:"sa-interrupt-markdown sa-text-part",children:r})]})}function YE({interrupt:e,onRespond:t,disabled:n,answeredAction:r,answerValue:o}){var l,c;const i=e.options,a=(typeof(i==null?void 0:i[0])=="string"?i[0]:(l=i==null?void 0:i[0])==null?void 0:l.label)||"确认",s=(typeof(i==null?void 0:i[1])=="string"?i[1]:(c=i==null?void 0:i[1])==null?void 0:c.label)||"取消";return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"circle-alert",color:"#f59e0b"}),S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-primary ${r==="confirm"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"confirm"}),children:[S.jsx(Ze,{name:"check",size:14})," ",a]}),S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-secondary ${r==="cancel"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"cancel"}),children:[S.jsx(Ze,{name:"x",size:14})," ",s]})]}),n&&S.jsx(xi,{value:o}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function QE({interrupt:e,onRespond:t,disabled:n,answeredAction:r,answerValue:o}){var u,d,f,p;const i=e.options,a=(typeof(i==null?void 0:i[0])=="string"?i[0]:(u=i==null?void 0:i[0])==null?void 0:u.label)||"批准",s=(typeof(i==null?void 0:i[1])=="string"?i[1]:(d=i==null?void 0:i[1])==null?void 0:d.label)||"拒绝",l=(typeof(i==null?void 0:i[2])=="string"?i[2]:(f=i==null?void 0:i[2])==null?void 0:f.label)||"跳过",c=((p=e.metadata)==null?void 0:p.showSkip)!==!1;return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"circle-alert",color:"#f59e0b"}),S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-primary ${r==="approve"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"approve"}),children:[S.jsx(Ze,{name:"check",size:14})," ",a]}),S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-danger ${r==="reject"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"reject"}),children:[S.jsx(Ze,{name:"x",size:14})," ",s]}),c&&S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-secondary ${r==="skip"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"skip"}),children:[S.jsx(Ze,{name:"chevron-right",size:14})," ",l]})]}),n&&S.jsx(xi,{value:o}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function ZE(e){return typeof e=="string"?{value:e,label:e}:e}function JE({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=(e.options??[]).map(ZE),i=n&&r!=null&&!o.some(a=>a.value===r);return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"list",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-options",children:o.map(a=>{const s=r===a.value;return S.jsxs("button",{className:`sa-interrupt-option ${a.danger?"sa-interrupt-option-danger":""} ${s?"sa-interrupt-option-selected":""}`,disabled:n,onClick:()=>t({action:"select",value:a.value}),children:[S.jsx(Ze,{name:s?"circle-check":"circle",size:14}),a.icon&&S.jsx(Ze,{name:a.icon,size:14}),S.jsx("span",{children:a.label}),a.description&&S.jsx("span",{className:"sa-interrupt-option-desc",children:a.description})]},a.value)})}),i&&S.jsx(xi,{value:r}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function e$(e){return typeof e=="string"?{value:e,label:e}:e}function t$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=(e.options??[]).map(e$),i=Array.isArray(r)?r:r!=null?[String(r)]:[],[a,s]=b.useState(()=>new Set(i)),l=n?new Set(i):a,c=d=>{n||s(f=>{const p=new Set(f);return p.has(d)?p.delete(d):p.add(d),p})},u=n?i.filter(d=>!o.some(f=>f.value===d)):[];return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"list-checks",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-options",children:o.map(d=>S.jsxs("button",{className:`sa-interrupt-option ${l.has(d.value)?"sa-interrupt-option-selected":""}`,disabled:n,onClick:()=>c(d.value),children:[S.jsx(Ze,{name:l.has(d.value)?"square-check":"square",size:14}),S.jsx("span",{children:d.label})]},d.value))}),u.length>0&&S.jsx(xi,{value:u}),!n&&S.jsx("div",{className:"sa-interrupt-actions",children:S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:a.size===0,onClick:()=>t({action:"submit",value:Array.from(a)}),children:[S.jsx(Ze,{name:"check",size:14})," 确认 (",a.size,")"]})}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function n$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const[o,i]=b.useState(r??""),a=n&&r!=null?String(r):o,s=e.inputType??"text",l=s==="textarea",c=()=>{n||e.required&&!a.trim()||t({action:"submit",value:a.trim()})};return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"text-cursor-input",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-input-area",children:l?S.jsx("textarea",{className:"sa-interrupt-textarea",value:a,onChange:u=>i(u.target.value),placeholder:e.placeholder,maxLength:e.maxLength,rows:3,disabled:n}):S.jsx("input",{className:"sa-interrupt-input",type:s,value:a,onChange:u=>i(u.target.value),placeholder:e.placeholder,maxLength:e.maxLength,onKeyDown:u=>u.key==="Enter"&&c(),disabled:n})}),!n&&S.jsx("div",{className:"sa-interrupt-actions",children:S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:e.required?!a.trim():!1,onClick:c,children:[S.jsx(Ze,{name:"check",size:14})," 提交"]})}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function r$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=e.fields??[],i=typeof r=="object"&&r!=null&&!Array.isArray(r)?r:{},[a,s]=b.useState(()=>{const f={};for(const p of o)f[p.name]=i[p.name]??p.defaultValue??"";return f}),l=n&&r!=null&&typeof r=="object"&&!Array.isArray(r)?r:a,c=(f,p)=>{n||s(h=>({...h,[f]:p}))},u=!n&&o.every(f=>!f.required||a[f.name]),d=()=>{u&&t({action:"submit",value:a})};return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"file-text",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-form",children:o.map(f=>S.jsxs("div",{className:"sa-interrupt-form-field",children:[S.jsxs("label",{className:"sa-interrupt-form-label",children:[f.label,f.required&&S.jsx("span",{className:"sa-interrupt-form-required",children:"*"})]}),o$(f,l[f.name],p=>c(f.name,p),n)]},f.name))}),n&&typeof r=="string"&&S.jsx(xi,{value:r}),!n&&S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:!u,onClick:d,children:[S.jsx(Ze,{name:"check",size:14})," 提交"]}),S.jsx("button",{className:"sa-interrupt-btn sa-interrupt-btn-secondary",onClick:()=>t({action:"cancel"}),children:"取消"})]}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function vf(e){return typeof e=="string"?{value:e,label:e}:e}function o$(e,t,n,r){switch(e.type){case"textarea":return S.jsx("textarea",{className:"sa-interrupt-textarea",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,rows:3,disabled:r});case"select":{const o=(e.options??[]).map(vf);return S.jsxs("select",{className:"sa-interrupt-select",value:t,onChange:i=>n(i.target.value),disabled:r,children:[S.jsx("option",{value:"",children:"请选择"}),o.map(i=>S.jsx("option",{value:i.value,children:i.label},i.value))]})}case"multiSelect":{const o=(e.options??[]).map(vf),i=Array.isArray(t)?t:[],a=s=>{r||n(i.includes(s)?i.filter(l=>l!==s):[...i,s])};return S.jsx("div",{className:"sa-interrupt-options",children:o.map(s=>S.jsx("button",{type:"button",className:`sa-interrupt-option ${i.includes(s.value)?"sa-interrupt-option-selected":""}`,disabled:r,onClick:()=>a(s.value),children:s.label},s.value))})}case"password":return S.jsx("input",{className:"sa-interrupt-input",type:"password",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,disabled:r});default:return S.jsx("input",{className:"sa-interrupt-input",type:e.type==="number"?"number":e.type==="date"?"date":"text",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,disabled:r})}}function Bg({interrupt:e,resolved:t,response:n,onRespond:r}){const o=t,i=n==null?void 0:n.value;switch(e.interruptType){case"confirm":return S.jsx(YE,{interrupt:e,onRespond:r,disabled:o,answeredAction:n==null?void 0:n.action,answerValue:n==null?void 0:n.value});case"approve":return S.jsx(QE,{interrupt:e,onRespond:r,disabled:o,answeredAction:n==null?void 0:n.action,answerValue:n==null?void 0:n.value});case"select":return S.jsx(JE,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"multiSelect":return S.jsx(t$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"input":return S.jsx(n$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"form":return S.jsx(r$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});default:return S.jsxs("div",{className:"sa-interrupt-unknown",children:["未知的交互类型: ",e.interruptType]})}}function i$({files:e,artifactPreview:t}){const{openArtifactPreview:n}=Fn();return e.length===0?null:S.jsx("ul",{className:"sa-artifact-file-list",role:"list",children:e.map((r,o)=>S.jsxs("li",{className:"sa-artifact-file-card",onClick:t?()=>n(r):void 0,onKeyDown:t?i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n(r))}:void 0,tabIndex:t?0:void 0,role:t?"button":void 0,"aria-label":t?`预览 ${r.filename}`:void 0,style:t?{cursor:"pointer"}:void 0,children:[S.jsx("div",{className:"sa-artifact-file-icon",children:S.jsx("span",{className:"sa-artifact-chip-type",children:vm(r.type)})}),S.jsxs("div",{className:"sa-artifact-file-info",children:[S.jsx("span",{className:"sa-artifact-file-name",children:r.filename}),r.size!=null&&S.jsx("span",{className:"sa-artifact-file-size",children:wm(r.size)})]}),t&&S.jsx("button",{className:"sa-artifact-file-download",title:"下载","aria-label":`下载 ${r.filename}`,onClick:i=>{i.stopPropagation(),pa(r)},children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})})]},r.id||`art-${o}`))})}const a$=[{value:1,label:"事实错误"},{value:2,label:"逻辑问题"},{value:3,label:"不相关"},{value:4,label:"信息过时"},{value:5,label:"冗长啰嗦"},{value:6,label:"难以理解"}];function Hg({message:e,onCopy:t,onRegenerate:n,onFeedback:r}){var $;const{status:o,cancelFeedback:i}=Fn(),[a,s]=b.useState((($=e.feedback)==null?void 0:$.type)??null),[l,c]=b.useState(!1),[u,d]=b.useState(!1),f=b.useRef(null),p=b.useCallback(()=>{t(),c(!0),setTimeout(()=>c(!1),2e3)},[t]),h=b.useCallback(()=>{a==="like"?(s(null),i(e)):(s("like"),d(!1),r==null||r(e,"like"))},[a,e,r,i]),m=b.useCallback(()=>{a==="dislike"?(s(null),d(!1),i(e)):d(!0)},[a,e,i]),w=b.useCallback((x,E)=>{s("dislike"),d(!1),r==null||r(e,"dislike",{reason:x,remark:(E==null?void 0:E.trim())||void 0})},[e,r]),y=b.useCallback(()=>{d(!1)},[]);return b.useEffect(()=>{if(!u)return;const x=v=>{f.current&&!f.current.contains(v.target)&&d(!1)},E=v=>{v.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",x),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",E)}},[u]),o!=="ready"&&o!=="error"?null:S.jsxs("div",{className:"sa-action-bar",children:[S.jsxs("button",{className:"sa-action-btn",onClick:p,title:"复制",children:[S.jsx(Ze,{name:l?"circle-check":"copy",size:14})," ",l?"已复制":"复制"]}),n&&S.jsxs("button",{className:"sa-action-btn",onClick:n,title:"重新生成",children:[S.jsx(Ze,{name:"refresh-cw",size:14})," 重新生成"]}),r&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"sa-action-divider"}),S.jsx("button",{className:`sa-action-btn ${a==="like"?"sa-action-btn-active":""}`,onClick:h,title:"有用","aria-label":"点赞",children:S.jsx(Ze,{name:"thumbs-up",size:14})}),S.jsx("button",{className:`sa-action-btn ${a==="dislike"?"sa-action-btn-active":""}`,onClick:m,title:"无用","aria-label":"踩","aria-expanded":u,"aria-haspopup":"dialog",children:S.jsx(Ze,{name:"thumbs-down",size:14})})]}),u&&S.jsx("div",{ref:f,children:S.jsx(s$,{onSubmit:w,onCancel:y})})]})}function s$({onSubmit:e,onCancel:t}){const[n,r]=b.useState(void 0),[o,i]=b.useState("");return S.jsxs("div",{className:"sa-dislike-panel",children:[S.jsx("div",{className:"sa-dislike-panel-title",children:"请选择不满意的原因(可选)"}),S.jsx("div",{className:"sa-dislike-reasons",children:a$.map(a=>S.jsx("button",{className:`sa-dislike-reason-btn ${n===a.value?"active":""}`,onClick:()=>r(n===a.value?void 0:a.value),children:a.label},a.value))}),S.jsx("textarea",{className:"sa-dislike-remark",placeholder:"补充描述(选填,≤500 字)",maxLength:500,value:o,onChange:a=>i(a.target.value),rows:2}),S.jsxs("div",{className:"sa-dislike-actions",children:[S.jsx("button",{className:"sa-dislike-submit",onClick:()=>e(n,o||void 0),children:"提交"}),S.jsx("button",{className:"sa-dislike-cancel",onClick:t,children:"取消"})]})]})}const l$=/^(https?:\/\/|data:|blob:|\/\/|\/|\.\/|\.\.\/)/;function Cf({src:e,alt:t}){return e?l$.test(e)?S.jsx("img",{src:e,alt:t??"",className:"sa-msg-avatar",draggable:!1}):S.jsx("span",{className:"sa-msg-avatar sa-msg-avatar-text",children:e}):null}function Vg({message:e,isStreaming:t,isLast:n,slots:r,avatar:o,artifactPreview:i,showTimestamp:a,collapse:s}){const{regenerate:l,feedback:c,respondToInterrupt:u}=Fn(),d=b.useCallback(()=>{var D;const z=e.parts.filter(M=>M.type==="text").map(M=>M.content).join(`
30
- `);(D=navigator.clipboard)==null||D.writeText(z).catch(()=>{})},[e]),f=e.role==="user",p=r.Message;if(p)return S.jsx(p,{message:e,isStreaming:t,isLast:n,avatar:o,slots:r,onCopy:d,onRegenerate:l,onFeedback:c,showTimestamp:a,collapse:s});const h=r.TextPart??zg,m=r.ThinkingPart??Dg,w=r.ToolCallPart??Lg,y=r.ToolResultPart??Fg,$=r.ErrorPart??_g,x=r.ActionBar??Hg,E=s==null?void 0:s.thinking,v=s==null?void 0:s.toolCall,C=s?(E==null?void 0:E.expandWhileStreaming)??!0:!1,I=s?(E==null?void 0:E.showDuration)??!0:!1,N=s?(v==null?void 0:v.expandWhileStreaming)??!0:!1,A=new Set(e.parts.filter(z=>z.type==="tool_result").map(z=>z.toolCallId)),k=t&&n,R=!f&&e.parts.some(z=>z.type==="text"&&z.content),O=!f&&e.parts.some(z=>z.type==="thinking");return S.jsxs("div",{className:`sa-message ${f?"sa-message-user":"sa-message-assistant"}`,children:[!f&&S.jsx(Cf,{src:(o==null?void 0:o.assistant)||(t&&n?Gt.assistantAvatarGenerating:Gt.assistantAvatar),alt:"AI"}),S.jsxs("div",{className:"sa-message-content",children:[a&&S.jsx("span",{className:`sa-message-time ${f?"sa-message-time-right":""}`,children:J0(e.timestamp)}),S.jsxs("div",{className:"sa-message-body",children:[e.parts.map((z,D)=>{switch(z.type){case"text":return S.jsx(h,{content:z.content},D);case"attachment":return S.jsx(GE,{attachment:z.attachment},D);case"thinking":return S.jsx(m,{content:z.content,durationMs:z.durationMs,isStreaming:t&&n,expandWhileStreaming:C,showDuration:I},D);case"tool_call":return S.jsx(w,{toolName:z.toolName,toolCallId:z.toolCallId,args:z.args,pending:k&&!A.has(z.toolCallId),expandWhileStreaming:N},D);case"tool_result":return S.jsx(y,{toolName:z.toolName,toolCallId:z.toolCallId,content:z.content,artifacts:z.artifacts,renderMode:z.renderMode,html:z.html,defaultExpanded:z.defaultExpanded,artifactPreview:i},D);case"error":return S.jsx($,{content:z.content,onRetry:l},D);case"interrupt":return S.jsx(Bg,{interrupt:z.interrupt,resolved:z.resolved??!1,response:z.response,onRespond:M=>u(z.interrupt.interruptId,M)},D);default:return null}}),t&&n&&!f&&!R&&!O&&S.jsx("span",{className:"sa-thinking-indicator",children:"思考中…"}),!f&&e.artifacts&&e.artifacts.length>0&&S.jsx(i$,{files:Cm(e.artifacts),artifactPreview:i}),!f&&!t&&R&&S.jsx(x,{message:e,onCopy:d,onRegenerate:n?l:void 0,onFeedback:c})]})]}),f&&(o==null?void 0:o.user)&&S.jsx(Cf,{src:o.user,alt:"用户"})]})}function Wg({message:e,suggestedPrompts:t,onPromptClick:n,capabilities:r,quickLinks:o,logo:i,openPanel:a}){const s=l=>{if(l.onClick){l.onClick();return}const c=l.action;if(!c){l.prompt&&n(l.prompt);return}a==null||a(c.type==="link"?c:{...c,title:c.title??l.label})};return S.jsxs("div",{className:"flex flex-col gap-8 py-2",children:[S.jsxs("div",{className:"flex flex-col items-center gap-1 opacity-0 animate-sa-home-fade-in",children:[S.jsx("img",{src:i||Gt.logo,alt:"AI 助手",className:"block max-w-16 shrink-0 animate-sa-logo-float",draggable:!1}),S.jsx("h3",{className:"sa-shimmer-text m-0 mb-1 text-[18px] font-bold leading-[1.3] text-[#333] animate-sa-title-shimmer",children:e||"你好!有什么可以帮你的?"})]}),r&&r.length>0&&S.jsx("div",{className:"flex flex-col items-start gap-4 opacity-0 animate-sa-home-fade-in",style:{animationDelay:"150ms"},children:r.map(l=>S.jsxs("div",{className:"inline-flex w-full max-w-full min-w-0 items-center gap-[7px]",children:[l.icon&&S.jsx("img",{src:l.icon,alt:"",className:"h-[18px] w-[18px] shrink-0 object-contain",draggable:!1}),S.jsx("span",{className:"shrink-0 text-[14px] leading-[1.4] text-[#333]",children:l.label}),l.desc&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"h-[13px] w-px shrink-0 bg-[#DCDCDC]"}),S.jsx("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap text-[14px] leading-[1.4] text-[#9A9A9A]",children:l.desc})]})]},l.label))}),t&&t.length>0&&S.jsx("div",{className:"flex flex-col items-start gap-3",children:t.map((l,c)=>S.jsxs("button",{type:"button",className:"sa-chip inline-flex h-7 items-center gap-1 rounded-md px-3 text-[14px] leading-none text-[#333] opacity-0 transition-colors animate-sa-chip-in",style:{animationDelay:`${300+c*130}ms`},onClick:()=>n(l),children:[S.jsx("span",{className:"sa-chip-text overflow-hidden text-ellipsis whitespace-nowrap",children:l}),S.jsx("svg",{width:13,height:13,viewBox:"0 0 14 14",fill:"none",className:"shrink-0 text-[#9A9A9A]","aria-hidden":"true",children:S.jsx("path",{d:"M5 3L9 7L5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l}-${c}`))}),o&&o.length>0&&S.jsxs("div",{className:"opacity-0 animate-sa-home-fade-in",style:{animationDelay:"420ms"},children:[S.jsx("div",{className:"mb-3 text-[14px] leading-none text-[#A0A0A0]",children:"快速查看"}),S.jsx("div",{className:"flex flex-wrap items-center gap-[22px]",children:o.map(l=>S.jsxs("button",{type:"button",className:"inline-flex items-center gap-[7px] rounded-md px-1 py-1 transition-colors hover:bg-[#F5F5F5]",onClick:()=>s(l),children:[l.icon&&S.jsx("span",{className:"flex h-[18px] w-[18px] shrink-0 items-center justify-center opacity-70",children:S.jsx("img",{src:l.icon,alt:"",width:18,height:18,draggable:!1})}),S.jsx("span",{className:"text-[14px] leading-none text-[#333] transition-colors hover:text-[#1881F0]",children:l.label})]},l.label))})]})]})}function Cu({slots:e,welcomeMessage:t,suggestedPrompts:n,avatar:r,artifactPreview:o,capabilities:i,quickLinks:a,logo:s,showTimestamp:l,collapse:c}){const{messages:u,status:d,sendMessage:f,openPanel:p}=Fn(),{containerRef:h}=Im([u]),m=d==="streaming"||d==="submitted",w=e.WelcomeScreen??Wg,y=e.AppendContainer;return u.length===0?S.jsxs("div",{className:"sa-thread",ref:h,children:[S.jsx(w,{message:t,suggestedPrompts:n,onPromptClick:f,capabilities:i,quickLinks:a,logo:s,openPanel:p}),y&&S.jsx(y,{openPanel:p})]}):S.jsx("div",{className:"sa-thread",ref:h,children:u.map(($,x)=>S.jsx(Vg,{message:$,isStreaming:m,isLast:x===u.length-1,slots:e,avatar:r,artifactPreview:o,showTimestamp:l,collapse:c},$.id))})}function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$t.apply(null,arguments)}const Ge=e=>{const t=g.useRef(e);return t.current=e,g.useCallback((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])};function vn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}const Sf=process.env.NODE_ENV!=="test"&&vn()?g.useLayoutEffect:g.useEffect,Bt=(e,t)=>{const n=g.useRef(!0);Sf(()=>e(n.current),t),Sf(()=>(n.current=!1,()=>{n.current=!0}),[])},c$=e=>{const t=g.useRef(!1),[n,r]=g.useState(e);g.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function o(i,a){a&&t.current||r(i)}return[n,o]};function un(e,t){const[n,r]=b.useState(e),o=t!==void 0?t:n;return Bt(i=>{i||r(t)},[t]),[o,r]}let qg=e=>+setTimeout(e,16),Xg=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(qg=e=>window.requestAnimationFrame(e),Xg=e=>window.cancelAnimationFrame(e));let Ef=0;const Ga=new Map;function Ug(e){Ga.delete(e)}const xt=(e,t=1)=>{Ef+=1;const n=Ef;function r(o){if(o===0)Ug(n),e();else{const i=qg(()=>{r(o-1)});Ga.set(n,i)}}return r(t),n};xt.cancel=e=>{const t=Ga.get(e);return Ug(e),Xg(t)};process.env.NODE_ENV!=="production"&&(xt.ids=()=>Ga);function u$(e){const[t,n]=g.useState(e),r=g.useRef(null),o=Ge(()=>{if(r.current){const[a,s]=r.current;a?xt.cancel(s):clearTimeout(s),r.current=null}}),i=Ge((a,s)=>{const l=s||{frame:1};o(),l===!0?n(a):"ms"in l?r.current=[!1,setTimeout(()=>n(a),l.ms)]:r.current=[!0,xt(()=>n(a),l.frame)]});return[t,i]}function d$(){return{...g}.useId}let $f=0;const kf=d$(),Ka=kf?function(t){const n=kf();return t||(process.env.NODE_ENV==="test"?"test-id":n)}:function(t){const[n,r]=g.useState("ssr-id");return g.useEffect(()=>{const o=$f;$f+=1,r(`rc_unique_${o}`)},[]),t||(process.env.NODE_ENV==="test"?"test-id":n)};function Ya(e,t,n){const r=g.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function f$(e){const[,t]=g.useReducer(i=>i+1,0),n=g.useRef(e),r=Ge(()=>n.current),o=Ge(i=>{n.current=typeof i=="function"?i(n.current):i,t()});return[r,o]}var kl={exports:{}},nt={};/**
27
+ `,...i.current()});return/^[\t ]/.test(c)&&(c=oi(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}gh.peek=zS;function gh(e){return e.value||""}function zS(){return"<"}bh.peek=OS;function bh(e,t,n,r){const o=xu(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function OS(){return"!"}xh.peek=DS;function xh(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function DS(){return"!"}yh.peek=LS;function yh(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return o+r+o}function LS(){return"`"}function wh(e,t){const n=lu(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}vh.peek=FS;function vh(e,t,n,r){const o=xu(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(wh(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),n.stack=u,d}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function FS(e,t,n){return wh(e,n)?"<":"["}Ch.peek=_S;function Ch(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function _S(){return"["}function yu(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function jS(e){const t=yu(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function BS(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Sh(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function HS(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?BS(n):yu(n);const s=e.ordered?a==="."?")":".":jS(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Sh(n)===a&&u){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c}function VS(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function WS(e,t,n,r){const o=VS(n);let i=n.bulletCurrent||yu(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(d,f,p){return f?(p?"":" ".repeat(a))+d:(p?i:i+" ".repeat(a-i.length))+d}}function qS(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const XS=Xa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function US(e,t,n,r){return(e.children.some(function(a){return XS(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function GS(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Eh.peek=KS;function Eh(e,t,n,r){const o=GS(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ba(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=oi(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ba(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+oi(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function KS(e,t,n){return n.options.strong||"*"}function YS(e,t,n,r){return n.safe(e.value,r)}function QS(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ZS(e,t,n){const r=(Sh(n)+(n.options.ruleSpaces?" ":"")).repeat(QS(n));return n.options.ruleSpaces?r.slice(0,-1):r}const $h={blockquote:vS,break:hf,code:IS,definition:TS,emphasis:hh,hardBreak:hf,heading:AS,html:gh,image:bh,imageReference:xh,inlineCode:yh,link:vh,linkReference:Ch,list:HS,listItem:WS,paragraph:qS,root:US,strong:Eh,text:YS,thematicBreak:ZS};function JS(){return{enter:{table:eE,tableData:gf,tableHeader:gf,tableRow:nE},exit:{codeText:rE,table:tE,tableData:Ds,tableHeader:Ds,tableRow:Ds}}}function eE(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function tE(e){this.exit(e),this.data.inTable=void 0}function nE(e){this.enter({type:"tableRow",children:[]},e)}function Ds(e){this.exit(e)}function gf(e){this.enter({type:"tableCell",children:[]},e)}function rE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oE));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oE(e,t){return t==="|"?t:e}function iE(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:l,tableRow:s}};function a(p,g,m,w){return c(u(p,m,w),p.align)}function s(p,g,m,w){const y=d(p,m,w),$=c([y]);return $.slice(0,$.indexOf(`
29
+ `))}function l(p,g,m,w){const y=m.enter("tableCell"),$=m.enter("phrasing"),x=m.containerPhrasing(p,{...w,before:i,after:i});return $(),y(),x}function c(p,g){return yS(p,{align:g,alignDelimiters:r,padding:n,stringLength:o})}function u(p,g,m){const w=p.children;let y=-1;const $=[],x=g.enter("table");for(;++y<w.length;)$[y]=d(w[y],g,m);return x(),$}function d(p,g,m){const w=p.children;let y=-1;const $=[],x=g.enter("tableRow");for(;++y<w.length;)$[y]=l(w[y],p,g,m);return x(),$}function f(p,g,m){let w=$h.inlineCode(p,g,m);return m.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function aE(){return{exit:{taskListCheckValueChecked:bf,taskListCheckValueUnchecked:bf,paragraph:lE}}}function sE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cE}}}function bf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lE(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cE(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=$h.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function uE(){return[HC(),cS(),pS(),JS(),aE()]}function dE(e){return{extensions:[VC(),uS(e),mS(),iE(e),sE()]}}const fE={tokenize:xE,partial:!0},kh={tokenize:yE,partial:!0},Ih={tokenize:wE,partial:!0},Rh={tokenize:vE,partial:!0},pE={tokenize:CE,partial:!0},Th={name:"wwwAutolink",tokenize:gE,previous:Nh},Ph={name:"protocolAutolink",tokenize:bE,previous:Mh},lr={name:"emailAutolink",tokenize:hE,previous:Ah},Un={};function mE(){return{text:Un}}let kr=48;for(;kr<123;)Un[kr]=lr,kr++,kr===58?kr=65:kr===91&&(kr=97);Un[43]=lr;Un[45]=lr;Un[46]=lr;Un[95]=lr;Un[72]=[lr,Ph];Un[104]=[lr,Ph];Un[87]=[lr,Th];Un[119]=[lr,Th];function hE(e,t,n){const r=this;let o,i;return a;function a(d){return!$l(d)||!Ah.call(r,r.previous)||wu(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return $l(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(pE,u,c)(d):d===45||d===95||Kt(d)?(i=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),o=!0,l}function u(d){return i&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function gE(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Nh.call(r,r.previous)||wu(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(fE,e.attempt(kh,e.attempt(Ih,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function bE(e,t,n){const r=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&Mh.call(r,r.previous)&&!wu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(nn(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const f=o.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?c:(i=!0,l)):n(d)}function c(d){return d===null||ma(d)||ct(d)||Fr(d)||Va(d)?n(d):e.attempt(kh,e.attempt(Ih,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function xE(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function yE(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Rh,l,s)(c):c===null||ct(c)||Fr(c)||c!==45&&Va(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function wE(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Rh,t,i)(a):a===null||ct(a)||Fr(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function vE(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||ct(s)||Fr(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||ct(s)||Fr(s)?t(s):r(s)}function i(s){return nn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):nn(s)?(e.consume(s),a):n(s)}}function CE(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Kt(i)?n(i):t(i)}}function Nh(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ct(e)}function Mh(e){return!nn(e)}function Ah(e){return!(e===47||$l(e))}function $l(e){return e===43||e===45||e===46||e===95||Kt(e)}function wu(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const SE={tokenize:NE,partial:!0};function EE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:RE,continuation:{tokenize:TE},exit:PE}},text:{91:{name:"gfmFootnoteCall",tokenize:IE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$E,resolveTo:kE}}}}function $E(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Mn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function kE(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function IE(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(i>999||d===93&&!a||d===null||d===91||ct(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return o.includes(Mn(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ct(d)||(a=!0),i++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,c):c(d)}}function RE(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(g)}function u(g){if(a>999||g===93&&!s||g===null||g===91||ct(g))return n(g);if(g===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Mn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ct(g)||(s=!0),a++,e.consume(g),g===92?d:u}function d(g){return g===91||g===92||g===93?(e.consume(g),a++,u):u(g)}function f(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ke(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function TE(e,t,n){return e.check(gi,t,e.attempt(SE,t,n))}function PE(e){e.exit("gfmFootnoteDefinition")}function NE(e,t,n){const r=this;return Ke(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function ME(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},f=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",d,s]],p=s.parser.constructs.insideSpan.null;p&&wn(f,f.length,0,Wa(p,a.slice(c+1,l),s)),wn(f,f.length,0,[["exit",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),wn(a,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let d=0;return f;function f(g){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(g):(a.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const m=mo(c);if(g===126)return d>1?l(g):(a.consume(g),d++,p);if(d<2&&!n)return l(g);const w=a.exit("strikethroughSequenceTemporary"),y=mo(g);return w._open=!y||y===2&&!!m,w._close=!m||m===2&&!!y,s(g)}}}class AE{constructor(){this.map=[]}add(t,n,r){zE(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0}}function zE(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function OE(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function DE(){return{flow:{null:{name:"table",tokenize:LE,resolveAll:FE}}}}function LE(e,t,n){const r=this;let o=0,i=0,a;return s;function s(k){let N=r.events.length-1;for(;N>-1;){const D=r.events[N][1].type;if(D==="lineEnding"||D==="linePrefix")N--;else break}const z=N>-1?r.events[N][1].type:null,L=z==="tableHead"||z==="tableRow"?v:l;return L===v&&r.parser.lazy[r.now().line]?n(k):L(k)}function l(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(a=!0,i+=1),u(k)}function u(k){return k===null?n(k):Ae(k)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):We(k)?Ke(e,u,"whitespace")(k):(i+=1,a&&(a=!1,o+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(k)))}function d(k){return k===null||k===124||ct(k)?(e.exit("data"),u(k)):(e.consume(k),k===92?f:d)}function f(k){return k===92||k===124?(e.consume(k),d):d(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),a=!1,We(k)?Ke(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):g(k))}function g(k){return k===45||k===58?w(k):k===124?(a=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),m):C(k)}function m(k){return We(k)?Ke(e,w,"whitespace")(k):w(k)}function w(k){return k===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(i+=1,y(k)):k===null||Ae(k)?E(k):C(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),$(k)):C(k)}function $(k){return k===45?(e.consume(k),$):k===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(k))}function x(k){return We(k)?Ke(e,E,"whitespace")(k):E(k)}function E(k){return k===124?g(k):k===null||Ae(k)?!a||o!==i?C(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):C(k)}function C(k){return n(k)}function v(k){return e.enter("tableRow"),T(k)}function T(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),T):k===null||Ae(k)?(e.exit("tableRow"),t(k)):We(k)?Ke(e,T,"whitespace")(k):(e.enter("data"),R(k))}function R(k){return k===null||k===124||ct(k)?(e.exit("data"),T(k)):(e.consume(k),k===92?A:R)}function A(k){return k===92||k===124?(e.consume(k),R):R(k)}}function FE(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,d;const f=new AE;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(xf(f,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.add(n,0,[["enter",u,t]])),o=g.type==="tableDelimiterRow"?2:u?3:1):o&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=_i(f,t,i,o,void 0,d),i=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],d=_i(f,t,i,o,void 0,d)),i=a,a=[i[1],n,0,0])):g.type==="tableHead"?(s=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],d=_i(f,t,i,o,n,d)):a[1]!==0&&(d=_i(f,t,a,o,n,d)),o=0):o&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&xf(f,t,l,c,u),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=OE(t.events,n))}return e}function _i(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},ro(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=ro(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=ro(t.events,n[2]),u=ro(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,m=n[3]-n[2]-1;e.add(g,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},ro(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function xf(e,t,n,r,o){const i=[],a=ro(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function ro(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const _E={name:"tasklistCheck",tokenize:BE};function jE(){return{text:{91:_E}}}function BE(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return ct(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return Ae(l)?t(l):We(l)?e.check({tokenize:HE},t,n)(l):n(l)}}function HE(e,t,n){return Ke(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function VE(e){return Hm([mE(),EE(),ME(e),DE(),jE()])}const WE={};function vu(e){const t=this,n=e||WE,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(VE(n)),i.push(uE()),a.push(dE(n))}function zh({content:e}){return S.jsx("div",{className:"sa-text-part",children:S.jsx(bu,{remarkPlugins:[vu],children:e})})}const qE="//at.alicdn.com/t/c/font_5210396_5l251pz1zln.js";let yf=!1;function Oh(e=qE){if(yf||typeof document>"u")return;yf=!0;const t=e.split("?")[0].split("/").pop();if(t&&document.querySelector(`script[src*="${t}"]`))return;const n=document.createElement("script");n.src=e,document.head.appendChild(n)}Oh();function Ze({name:e,size:t=16,color:n="currentColor",className:r,style:o}){return S.jsx("svg",{className:r,style:{width:t,height:t,fill:n,verticalAlign:"middle",...o},"aria-hidden":"true",children:S.jsx("use",{href:`#icon-agent-${e}`})})}function XE(e){const t=e/1e3;return t<10?`${t.toFixed(1)}s`:`${Math.round(t)}s`}function Dh({content:e,isStreaming:t,durationMs:n,showDuration:r}){const[o,i]=b.useState(!1),a=o,s=!t&&r&&n!=null&&n>0?XE(n):null;return S.jsxs("div",{className:`sa-chain-node ${t?"sa-chain-loading":"sa-chain-done"}`,children:[S.jsxs("div",{className:"sa-chain-rail",children:[S.jsx("span",{className:"sa-chain-icon",children:t?S.jsx("span",{className:"sa-chain-spinner"}):S.jsx(Ze,{name:"brain",size:13})}),S.jsx("span",{className:"sa-chain-line"})]}),S.jsxs("div",{className:"sa-chain-main",children:[S.jsxs("div",{className:"sa-chain-header",onClick:()=>i(!o),children:[S.jsxs("span",{className:"sa-chain-title",children:[t?"思考中…":"已深度思考",s&&S.jsxs("span",{className:"sa-chain-duration",children:[" · 用时 ",s]})]}),S.jsx("span",{className:`sa-chain-arrow ${a?"expanded":""}`,children:S.jsx(Ze,{name:"chevron-right",size:12})})]}),a&&S.jsx("div",{className:"sa-chain-content",children:e})]})]})}function Lh({toolName:e,toolCallId:t,args:n,pending:r}){const[o,i]=b.useState(!1),[a,s]=b.useState(!1),l=o;let c=n;try{c=JSON.stringify(JSON.parse(n),null,2)}catch{}const u=b.useCallback(()=>{var d;(d=navigator.clipboard)==null||d.writeText(c).then(()=>{s(!0),setTimeout(()=>s(!1),2e3)}).catch(()=>{})},[c]);return S.jsxs("div",{className:`sa-chain-node ${r?"sa-chain-loading":"sa-chain-done"}`,children:[S.jsxs("div",{className:"sa-chain-rail",children:[S.jsx("span",{className:"sa-chain-icon",children:r?S.jsx("span",{className:"sa-chain-spinner"}):S.jsx(Ze,{name:"zap",size:13})}),S.jsx("span",{className:"sa-chain-line"})]}),S.jsxs("div",{className:"sa-chain-main",children:[S.jsxs("div",{className:"sa-chain-header",onClick:()=>i(!o),children:[S.jsxs("span",{className:"sa-chain-title",children:[r?"正在调用":"调用工具",": ",e]}),S.jsx("span",{className:`sa-chain-arrow ${l?"expanded":""}`,children:S.jsx(Ze,{name:"chevron-right",size:12})})]}),l&&S.jsxs(S.Fragment,{children:[S.jsx("pre",{className:"sa-tool-args",children:c}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsxs("button",{className:"sa-action-btn",onClick:u,title:"复制",children:[S.jsx(Ze,{name:a?"circle-check":"copy",size:14})," ",a?"已复制":"复制"]})})]})]})]})}function wf({text:e}){const[t,n]=b.useState(!1),r=()=>{var o;(o=navigator.clipboard)==null||o.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)}).catch(()=>{})};return S.jsxs("button",{className:"sa-action-btn",onClick:r,title:"复制",children:[S.jsx(Ze,{name:t?"circle-check":"copy",size:14})," ",t?"已复制":"复制"]})}function UE({html:e}){const[t,n]=b.useState(null);return b.useEffect(()=>{let r=!1;return Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs")).then(o=>{r||n(o.default.sanitize(e,{FORCE_BODY:!0,ADD_ATTR:["target"]}))}),()=>{r=!0}},[e]),t===null?null:S.jsx("div",{className:"sa-tool-result-html-scroll",children:S.jsx("div",{className:"sa-tool-result-html sa-text-part",dangerouslySetInnerHTML:{__html:t}})})}function GE(e,t){if(t!=="html"&&t!=="markdown")return null;const n=e.trim();if(!n)return null;try{const r=JSON.parse(n);if(typeof r=="object"&&r!==null&&!Array.isArray(r)&&typeof r.result=="string"&&r.result)return r.result.length>40?`${r.result.slice(0,40)}…`:r.result}catch{}return n.length>40?`${n.slice(0,40)}…`:n}function Fh({toolName:e,content:t,renderMode:n,html:r,defaultExpanded:o}){const[i,a]=b.useState(!!(o??n==="html")),s=GE(t,n);let l=t;if(l)try{l=JSON.stringify(JSON.parse(l),null,2)}catch{}return S.jsxs("div",{className:"sa-chain-node sa-chain-done sa-tool-result-part",children:[S.jsxs("div",{className:"sa-chain-rail",children:[S.jsx("span",{className:"sa-chain-icon sa-chain-icon-success",children:S.jsx(Ze,{name:"circle-check",size:13,color:"#10b981"})}),S.jsx("span",{className:"sa-chain-line"})]}),S.jsxs("div",{className:"sa-chain-main",children:[S.jsxs("div",{className:"sa-chain-header",onClick:()=>a(!i),children:[S.jsxs("span",{className:"sa-chain-title",children:[S.jsx("span",{className:"sa-tool-result-name",children:e||"工具返回"}),s&&S.jsx("span",{className:"sa-tool-result-summary",children:s})]}),S.jsx("span",{className:`sa-chain-arrow ${i?"expanded":""}`,children:S.jsx(Ze,{name:"chevron-right",size:12})})]}),i&&(n==="html"&&r?S.jsxs(S.Fragment,{children:[S.jsx(UE,{html:r}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(wf,{text:r})})]}):l?S.jsxs(S.Fragment,{children:[S.jsx("pre",{className:"sa-tool-result-content",children:l}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(wf,{text:l})})]}):S.jsx("pre",{className:"sa-tool-result-content",children:"—"}))]})]})}function _h({content:e,onRetry:t}){return S.jsxs("div",{className:"sa-error-part",children:[S.jsxs("div",{className:"sa-error-content",children:[S.jsx("span",{className:"sa-error-icon",children:S.jsx(Ze,{name:"triangle-alert",size:14})}),S.jsx("span",{children:e||"发生错误"})]}),t&&S.jsx("button",{className:"sa-error-retry",onClick:t,children:"重试"})]})}function jh(e){return e==null||Number.isNaN(e)?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function KE({attachment:e}){const t=S.jsxs(S.Fragment,{children:[S.jsx(Ze,{name:"file-text",size:14,color:"#6366f1"}),S.jsx("span",{className:"sa-attachment-chip-name",children:e.filename}),e.size!=null&&S.jsx("span",{className:"sa-attachment-chip-size",children:jh(e.size)})]});return e.url?S.jsx("a",{className:"sa-attachment-chip",href:e.url,target:"_blank",rel:"noreferrer",download:e.filename,title:`下载 ${e.filename}`,children:t}):S.jsx("span",{className:"sa-attachment-chip",title:e.filename,children:t})}function YE(e){if(e==null)return null;if(typeof e=="string")return e.trim()?e:null;if(Array.isArray(e))return e.length===0?null:e.map(t=>typeof t=="object"?JSON.stringify(t):String(t)).join("、");if(typeof e=="object")try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function xi({value:e}){const t=YE(e);return t==null?null:S.jsxs("div",{className:"sa-interrupt-answer",children:[S.jsx(Ze,{name:"text-cursor-input",size:14,color:"#6366f1"}),S.jsxs("span",{children:["你的回答:",t]})]})}function Eo({interrupt:e,icon:t,color:n}){const r=e.content?S.jsx(bu,{remarkPlugins:[vu],children:e.content}):null;return S.jsxs("div",{className:"sa-interrupt-content",children:[S.jsx(Ze,{name:t,size:16,color:n}),S.jsx("div",{className:"sa-interrupt-markdown sa-text-part",children:r})]})}function QE({interrupt:e,onRespond:t,disabled:n,answeredAction:r,answerValue:o}){var l,c;const i=e.options,a=(typeof(i==null?void 0:i[0])=="string"?i[0]:(l=i==null?void 0:i[0])==null?void 0:l.label)||"确认",s=(typeof(i==null?void 0:i[1])=="string"?i[1]:(c=i==null?void 0:i[1])==null?void 0:c.label)||"取消";return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"circle-alert",color:"#f59e0b"}),S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-primary ${r==="confirm"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"confirm"}),children:[S.jsx(Ze,{name:"check",size:14})," ",a]}),S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-secondary ${r==="cancel"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"cancel"}),children:[S.jsx(Ze,{name:"x",size:14})," ",s]})]}),n&&S.jsx(xi,{value:o}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function ZE({interrupt:e,onRespond:t,disabled:n,answeredAction:r,answerValue:o}){var u,d,f,p;const i=e.options,a=(typeof(i==null?void 0:i[0])=="string"?i[0]:(u=i==null?void 0:i[0])==null?void 0:u.label)||"批准",s=(typeof(i==null?void 0:i[1])=="string"?i[1]:(d=i==null?void 0:i[1])==null?void 0:d.label)||"拒绝",l=(typeof(i==null?void 0:i[2])=="string"?i[2]:(f=i==null?void 0:i[2])==null?void 0:f.label)||"跳过",c=((p=e.metadata)==null?void 0:p.showSkip)!==!1;return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"circle-alert",color:"#f59e0b"}),S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-primary ${r==="approve"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"approve"}),children:[S.jsx(Ze,{name:"check",size:14})," ",a]}),S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-danger ${r==="reject"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"reject"}),children:[S.jsx(Ze,{name:"x",size:14})," ",s]}),c&&S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-secondary ${r==="skip"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"skip"}),children:[S.jsx(Ze,{name:"chevron-right",size:14})," ",l]})]}),n&&S.jsx(xi,{value:o}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function JE(e){return typeof e=="string"?{value:e,label:e}:e}function e$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=(e.options??[]).map(JE),i=n&&r!=null&&!o.some(a=>a.value===r);return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"list",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-options",children:o.map(a=>{const s=r===a.value;return S.jsxs("button",{className:`sa-interrupt-option ${a.danger?"sa-interrupt-option-danger":""} ${s?"sa-interrupt-option-selected":""}`,disabled:n,onClick:()=>t({action:"select",value:a.value}),children:[S.jsx(Ze,{name:s?"circle-check":"circle",size:14}),a.icon&&S.jsx(Ze,{name:a.icon,size:14}),S.jsx("span",{children:a.label}),a.description&&S.jsx("span",{className:"sa-interrupt-option-desc",children:a.description})]},a.value)})}),i&&S.jsx(xi,{value:r}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function t$(e){return typeof e=="string"?{value:e,label:e}:e}function n$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=(e.options??[]).map(t$),i=Array.isArray(r)?r:r!=null?[String(r)]:[],[a,s]=b.useState(()=>new Set(i)),l=n?new Set(i):a,c=d=>{n||s(f=>{const p=new Set(f);return p.has(d)?p.delete(d):p.add(d),p})},u=n?i.filter(d=>!o.some(f=>f.value===d)):[];return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"list-checks",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-options",children:o.map(d=>S.jsxs("button",{className:`sa-interrupt-option ${l.has(d.value)?"sa-interrupt-option-selected":""}`,disabled:n,onClick:()=>c(d.value),children:[S.jsx(Ze,{name:l.has(d.value)?"square-check":"square",size:14}),S.jsx("span",{children:d.label})]},d.value))}),u.length>0&&S.jsx(xi,{value:u}),!n&&S.jsx("div",{className:"sa-interrupt-actions",children:S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:a.size===0,onClick:()=>t({action:"submit",value:Array.from(a)}),children:[S.jsx(Ze,{name:"check",size:14})," 确认 (",a.size,")"]})}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function r$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const[o,i]=b.useState(r??""),a=n&&r!=null?String(r):o,s=e.inputType??"text",l=s==="textarea",c=()=>{n||e.required&&!a.trim()||t({action:"submit",value:a.trim()})};return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"text-cursor-input",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-input-area",children:l?S.jsx("textarea",{className:"sa-interrupt-textarea",value:a,onChange:u=>i(u.target.value),placeholder:e.placeholder,maxLength:e.maxLength,rows:3,disabled:n}):S.jsx("input",{className:"sa-interrupt-input",type:s,value:a,onChange:u=>i(u.target.value),placeholder:e.placeholder,maxLength:e.maxLength,onKeyDown:u=>u.key==="Enter"&&c(),disabled:n})}),!n&&S.jsx("div",{className:"sa-interrupt-actions",children:S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:e.required?!a.trim():!1,onClick:c,children:[S.jsx(Ze,{name:"check",size:14})," 提交"]})}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function o$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=e.fields??[],i=typeof r=="object"&&r!=null&&!Array.isArray(r)?r:{},[a,s]=b.useState(()=>{const f={};for(const p of o)f[p.name]=i[p.name]??p.defaultValue??"";return f}),l=n&&r!=null&&typeof r=="object"&&!Array.isArray(r)?r:a,c=(f,p)=>{n||s(g=>({...g,[f]:p}))},u=!n&&o.every(f=>!f.required||a[f.name]),d=()=>{u&&t({action:"submit",value:a})};return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"file-text",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-form",children:o.map(f=>S.jsxs("div",{className:"sa-interrupt-form-field",children:[S.jsxs("label",{className:"sa-interrupt-form-label",children:[f.label,f.required&&S.jsx("span",{className:"sa-interrupt-form-required",children:"*"})]}),i$(f,l[f.name],p=>c(f.name,p),n)]},f.name))}),n&&typeof r=="string"&&S.jsx(xi,{value:r}),!n&&S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:!u,onClick:d,children:[S.jsx(Ze,{name:"check",size:14})," 提交"]}),S.jsx("button",{className:"sa-interrupt-btn sa-interrupt-btn-secondary",onClick:()=>t({action:"cancel"}),children:"取消"})]}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function vf(e){return typeof e=="string"?{value:e,label:e}:e}function i$(e,t,n,r){switch(e.type){case"textarea":return S.jsx("textarea",{className:"sa-interrupt-textarea",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,rows:3,disabled:r});case"select":{const o=(e.options??[]).map(vf);return S.jsxs("select",{className:"sa-interrupt-select",value:t,onChange:i=>n(i.target.value),disabled:r,children:[S.jsx("option",{value:"",children:"请选择"}),o.map(i=>S.jsx("option",{value:i.value,children:i.label},i.value))]})}case"multiSelect":{const o=(e.options??[]).map(vf),i=Array.isArray(t)?t:[],a=s=>{r||n(i.includes(s)?i.filter(l=>l!==s):[...i,s])};return S.jsx("div",{className:"sa-interrupt-options",children:o.map(s=>S.jsx("button",{type:"button",className:`sa-interrupt-option ${i.includes(s.value)?"sa-interrupt-option-selected":""}`,disabled:r,onClick:()=>a(s.value),children:s.label},s.value))})}case"password":return S.jsx("input",{className:"sa-interrupt-input",type:"password",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,disabled:r});default:return S.jsx("input",{className:"sa-interrupt-input",type:e.type==="number"?"number":e.type==="date"?"date":"text",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,disabled:r})}}function Bh({interrupt:e,resolved:t,response:n,onRespond:r}){const o=t,i=n==null?void 0:n.value;switch(e.interruptType){case"confirm":return S.jsx(QE,{interrupt:e,onRespond:r,disabled:o,answeredAction:n==null?void 0:n.action,answerValue:n==null?void 0:n.value});case"approve":return S.jsx(ZE,{interrupt:e,onRespond:r,disabled:o,answeredAction:n==null?void 0:n.action,answerValue:n==null?void 0:n.value});case"select":return S.jsx(e$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"multiSelect":return S.jsx(n$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"input":return S.jsx(r$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"form":return S.jsx(o$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});default:return S.jsxs("div",{className:"sa-interrupt-unknown",children:["未知的交互类型: ",e.interruptType]})}}function a$({files:e,artifactPreview:t}){const{openArtifactPreview:n}=Fn();return e.length===0?null:S.jsx("ul",{className:"sa-artifact-file-list",role:"list",children:e.map((r,o)=>S.jsxs("li",{className:"sa-artifact-file-card",onClick:t?()=>n(r):void 0,onKeyDown:t?i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n(r))}:void 0,tabIndex:t?0:void 0,role:t?"button":void 0,"aria-label":t?`预览 ${r.filename}`:void 0,style:t?{cursor:"pointer"}:void 0,children:[S.jsx("div",{className:"sa-artifact-file-icon",children:S.jsx("span",{className:"sa-artifact-chip-type",children:vm(r.type)})}),S.jsxs("div",{className:"sa-artifact-file-info",children:[S.jsx("span",{className:"sa-artifact-file-name",children:r.filename}),r.size!=null&&S.jsx("span",{className:"sa-artifact-file-size",children:wm(r.size)})]}),t&&S.jsx("button",{className:"sa-artifact-file-download",title:"下载","aria-label":`下载 ${r.filename}`,onClick:i=>{i.stopPropagation(),pa(r)},children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})})]},r.id||`art-${o}`))})}const s$=[{value:1,label:"事实错误"},{value:2,label:"逻辑问题"},{value:3,label:"不相关"},{value:4,label:"信息过时"},{value:5,label:"冗长啰嗦"},{value:6,label:"难以理解"}];function Hh({message:e,onCopy:t,onRegenerate:n,onFeedback:r}){var $;const{status:o,cancelFeedback:i}=Fn(),[a,s]=b.useState((($=e.feedback)==null?void 0:$.type)??null),[l,c]=b.useState(!1),[u,d]=b.useState(!1),f=b.useRef(null),p=b.useCallback(()=>{t(),c(!0),setTimeout(()=>c(!1),2e3)},[t]),g=b.useCallback(()=>{a==="like"?(s(null),i(e)):(s("like"),d(!1),r==null||r(e,"like"))},[a,e,r,i]),m=b.useCallback(()=>{a==="dislike"?(s(null),d(!1),i(e)):d(!0)},[a,e,i]),w=b.useCallback((x,E)=>{s("dislike"),d(!1),r==null||r(e,"dislike",{reason:x,remark:(E==null?void 0:E.trim())||void 0})},[e,r]),y=b.useCallback(()=>{d(!1)},[]);return b.useEffect(()=>{if(!u)return;const x=C=>{f.current&&!f.current.contains(C.target)&&d(!1)},E=C=>{C.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",x),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",E)}},[u]),o!=="ready"&&o!=="error"?null:S.jsxs("div",{className:"sa-action-bar",children:[S.jsxs("button",{className:"sa-action-btn",onClick:p,title:"复制",children:[S.jsx(Ze,{name:l?"circle-check":"copy",size:14})," ",l?"已复制":"复制"]}),n&&S.jsxs("button",{className:"sa-action-btn",onClick:n,title:"重新生成",children:[S.jsx(Ze,{name:"refresh-cw",size:14})," 重新生成"]}),r&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"sa-action-divider"}),S.jsx("button",{className:`sa-action-btn ${a==="like"?"sa-action-btn-active":""}`,onClick:g,title:"有用","aria-label":"点赞",children:S.jsx(Ze,{name:"thumbs-up",size:14})}),S.jsx("button",{className:`sa-action-btn ${a==="dislike"?"sa-action-btn-active":""}`,onClick:m,title:"无用","aria-label":"踩","aria-expanded":u,"aria-haspopup":"dialog",children:S.jsx(Ze,{name:"thumbs-down",size:14})})]}),u&&S.jsx("div",{ref:f,children:S.jsx(l$,{onSubmit:w,onCancel:y})})]})}function l$({onSubmit:e,onCancel:t}){const[n,r]=b.useState(void 0),[o,i]=b.useState("");return S.jsxs("div",{className:"sa-dislike-panel",children:[S.jsx("div",{className:"sa-dislike-panel-title",children:"请选择不满意的原因(可选)"}),S.jsx("div",{className:"sa-dislike-reasons",children:s$.map(a=>S.jsx("button",{className:`sa-dislike-reason-btn ${n===a.value?"active":""}`,onClick:()=>r(n===a.value?void 0:a.value),children:a.label},a.value))}),S.jsx("textarea",{className:"sa-dislike-remark",placeholder:"补充描述(选填,≤500 字)",maxLength:500,value:o,onChange:a=>i(a.target.value),rows:2}),S.jsxs("div",{className:"sa-dislike-actions",children:[S.jsx("button",{className:"sa-dislike-submit",onClick:()=>e(n,o||void 0),children:"提交"}),S.jsx("button",{className:"sa-dislike-cancel",onClick:t,children:"取消"})]})]})}const c$=/^(https?:\/\/|data:|blob:|\/\/|\/|\.\/|\.\.\/)/;function Cf({src:e,alt:t}){return e?c$.test(e)?S.jsx("img",{src:e,alt:t??"",className:"sa-msg-avatar",draggable:!1}):S.jsx("span",{className:"sa-msg-avatar sa-msg-avatar-text",children:e}):null}function Vh({message:e,isStreaming:t,isLast:n,slots:r,avatar:o,artifactPreview:i,showTimestamp:a,collapse:s}){const{regenerate:l,feedback:c,respondToInterrupt:u}=Fn(),d=b.useCallback(()=>{var L;const z=e.parts.filter(D=>D.type==="text").map(D=>D.content).join(`
30
+ `);(L=navigator.clipboard)==null||L.writeText(z).catch(()=>{})},[e]),f=e.role==="user",p=r.Message;if(p)return S.jsx(p,{message:e,isStreaming:t,isLast:n,avatar:o,slots:r,onCopy:d,onRegenerate:l,onFeedback:c,showTimestamp:a,collapse:s});const g=r.TextPart??zh,m=r.ThinkingPart??Dh,w=r.ToolCallPart??Lh,y=r.ToolResultPart??Fh,$=r.ErrorPart??_h,x=r.ActionBar??Hh,E=s==null?void 0:s.thinking,C=s?(E==null?void 0:E.showDuration)??!0:!1,v=new Set(e.parts.filter(z=>z.type==="tool_result").map(z=>z.toolCallId)),T=t&&n,R=!f&&e.parts.some(z=>z.type==="text"&&z.content),A=!f&&e.parts.some(z=>z.type==="thinking"),k=(z,L)=>{switch(z.type){case"text":return S.jsx(g,{content:z.content},L);case"attachment":return S.jsx(KE,{attachment:z.attachment},L);case"thinking":return S.jsx(m,{content:z.content,durationMs:z.durationMs,isStreaming:t&&n,showDuration:C},L);case"tool_call":return S.jsx(w,{toolName:z.toolName,toolCallId:z.toolCallId,args:z.args,pending:T&&!v.has(z.toolCallId)},L);case"tool_result":return S.jsx(y,{toolName:z.toolName,toolCallId:z.toolCallId,content:z.content,artifacts:z.artifacts,renderMode:z.renderMode,html:z.html,defaultExpanded:z.defaultExpanded,artifactPreview:i},L);case"error":return S.jsx($,{content:z.content,onRetry:l},L);case"interrupt":return S.jsx(Bh,{interrupt:z.interrupt,resolved:z.resolved??!1,response:z.response,onRespond:D=>u(z.interrupt.interruptId,D)},L);default:return null}},N=()=>{const z=new Set(["thinking","tool_call","tool_result"]),L=[];let D=[];const M=()=>{D.length>0&&(L.push(S.jsx("div",{className:"sa-chain-block",children:D},`chain-${L.length}`)),D=[])};return e.parts.forEach((O,F)=>{const H=k(O,F);z.has(O.type)?D.push(H):(M(),L.push(H))}),M(),L};return S.jsxs("div",{className:`sa-message ${f?"sa-message-user":"sa-message-assistant"}`,children:[!f&&S.jsx(Cf,{src:(o==null?void 0:o.assistant)||(t&&n?Gt.assistantAvatarGenerating:Gt.assistantAvatar),alt:"AI"}),S.jsxs("div",{className:"sa-message-content",children:[a&&S.jsx("span",{className:`sa-message-time ${f?"sa-message-time-right":""}`,children:J0(e.timestamp)}),S.jsxs("div",{className:"sa-message-body",children:[N(),t&&n&&!f&&!R&&!A&&S.jsx("span",{className:"sa-thinking-indicator",children:"思考中…"}),!f&&e.artifacts&&e.artifacts.length>0&&S.jsx(a$,{files:Cm(e.artifacts),artifactPreview:i}),!f&&!t&&R&&S.jsx(x,{message:e,onCopy:d,onRegenerate:n?l:void 0,onFeedback:c})]})]}),f&&(o==null?void 0:o.user)&&S.jsx(Cf,{src:o.user,alt:"用户"})]})}function Wh({message:e,suggestedPrompts:t,onPromptClick:n,capabilities:r,quickLinks:o,logo:i,openPanel:a}){const s=l=>{if(l.onClick){l.onClick();return}const c=l.action;if(!c){l.prompt&&n(l.prompt);return}a==null||a(c.type==="link"?c:{...c,title:c.title??l.label})};return S.jsxs("div",{className:"flex flex-col gap-8 py-2",children:[S.jsxs("div",{className:"flex flex-col items-center gap-1 opacity-0 animate-sa-home-fade-in",children:[S.jsx("img",{src:i||Gt.logo,alt:"AI 助手",className:"block max-w-16 shrink-0 animate-sa-logo-float",draggable:!1}),S.jsx("h3",{className:"sa-shimmer-text m-0 mb-1 text-[18px] font-bold leading-[1.3] text-[#333] animate-sa-title-shimmer",children:e||"你好!有什么可以帮你的?"})]}),r&&r.length>0&&S.jsx("div",{className:"flex flex-col items-start gap-4 opacity-0 animate-sa-home-fade-in",style:{animationDelay:"150ms"},children:r.map(l=>S.jsxs("div",{className:"inline-flex w-full max-w-full min-w-0 items-center gap-[7px]",children:[l.icon&&S.jsx("img",{src:l.icon,alt:"",className:"h-[18px] w-[18px] shrink-0 object-contain",draggable:!1}),S.jsx("span",{className:"shrink-0 text-[14px] leading-[1.4] text-[#333]",children:l.label}),l.desc&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"h-[13px] w-px shrink-0 bg-[#DCDCDC]"}),S.jsx("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap text-[14px] leading-[1.4] text-[#9A9A9A]",children:l.desc})]})]},l.label))}),t&&t.length>0&&S.jsx("div",{className:"flex flex-col items-start gap-3",children:t.map((l,c)=>S.jsxs("button",{type:"button",className:"sa-chip inline-flex h-7 items-center gap-1 rounded-md px-3 text-[14px] leading-none text-[#333] opacity-0 transition-colors animate-sa-chip-in",style:{animationDelay:`${300+c*130}ms`},onClick:()=>n(l),children:[S.jsx("span",{className:"sa-chip-text overflow-hidden text-ellipsis whitespace-nowrap",children:l}),S.jsx("svg",{width:13,height:13,viewBox:"0 0 14 14",fill:"none",className:"shrink-0 text-[#9A9A9A]","aria-hidden":"true",children:S.jsx("path",{d:"M5 3L9 7L5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l}-${c}`))}),o&&o.length>0&&S.jsxs("div",{className:"opacity-0 animate-sa-home-fade-in",style:{animationDelay:"420ms"},children:[S.jsx("div",{className:"mb-3 text-[14px] leading-none text-[#A0A0A0]",children:"快速查看"}),S.jsx("div",{className:"flex flex-wrap items-center gap-[22px]",children:o.map(l=>S.jsxs("button",{type:"button",className:"inline-flex items-center gap-[7px] rounded-md px-1 py-1 transition-colors hover:bg-[#F5F5F5]",onClick:()=>s(l),children:[l.icon&&S.jsx("span",{className:"flex h-[18px] w-[18px] shrink-0 items-center justify-center opacity-70",children:S.jsx("img",{src:l.icon,alt:"",width:18,height:18,draggable:!1})}),S.jsx("span",{className:"text-[14px] leading-none text-[#333] transition-colors hover:text-[#1881F0]",children:l.label})]},l.label))})]})]})}function Cu({slots:e,welcomeMessage:t,suggestedPrompts:n,avatar:r,artifactPreview:o,capabilities:i,quickLinks:a,logo:s,showTimestamp:l,collapse:c}){const{messages:u,status:d,sendMessage:f,openPanel:p}=Fn(),{containerRef:g}=Im([u]),m=d==="streaming"||d==="submitted",w=e.WelcomeScreen??Wh,y=e.AppendContainer;return u.length===0?S.jsxs("div",{className:"sa-thread",ref:g,children:[S.jsx(w,{message:t,suggestedPrompts:n,onPromptClick:f,capabilities:i,quickLinks:a,logo:s,openPanel:p}),y&&S.jsx(y,{openPanel:p})]}):S.jsx("div",{className:"sa-thread",ref:g,children:u.map(($,x)=>S.jsx(Vh,{message:$,isStreaming:m,isLast:x===u.length-1,slots:e,avatar:r,artifactPreview:o,showTimestamp:l,collapse:c},$.id))})}function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$t.apply(null,arguments)}const Ge=e=>{const t=h.useRef(e);return t.current=e,h.useCallback((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])};function vn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}const Sf=process.env.NODE_ENV!=="test"&&vn()?h.useLayoutEffect:h.useEffect,Bt=(e,t)=>{const n=h.useRef(!0);Sf(()=>e(n.current),t),Sf(()=>(n.current=!1,()=>{n.current=!0}),[])},u$=e=>{const t=h.useRef(!1),[n,r]=h.useState(e);h.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function o(i,a){a&&t.current||r(i)}return[n,o]};function un(e,t){const[n,r]=b.useState(e),o=t!==void 0?t:n;return Bt(i=>{i||r(t)},[t]),[o,r]}let qh=e=>+setTimeout(e,16),Xh=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(qh=e=>window.requestAnimationFrame(e),Xh=e=>window.cancelAnimationFrame(e));let Ef=0;const Ga=new Map;function Uh(e){Ga.delete(e)}const xt=(e,t=1)=>{Ef+=1;const n=Ef;function r(o){if(o===0)Uh(n),e();else{const i=qh(()=>{r(o-1)});Ga.set(n,i)}}return r(t),n};xt.cancel=e=>{const t=Ga.get(e);return Uh(e),Xh(t)};process.env.NODE_ENV!=="production"&&(xt.ids=()=>Ga);function d$(e){const[t,n]=h.useState(e),r=h.useRef(null),o=Ge(()=>{if(r.current){const[a,s]=r.current;a?xt.cancel(s):clearTimeout(s),r.current=null}}),i=Ge((a,s)=>{const l=s||{frame:1};o(),l===!0?n(a):"ms"in l?r.current=[!1,setTimeout(()=>n(a),l.ms)]:r.current=[!0,xt(()=>n(a),l.frame)]});return[t,i]}function f$(){return{...h}.useId}let $f=0;const kf=f$(),Ka=kf?function(t){const n=kf();return t||(process.env.NODE_ENV==="test"?"test-id":n)}:function(t){const[n,r]=h.useState("ssr-id");return h.useEffect(()=>{const o=$f;$f+=1,r(`rc_unique_${o}`)},[]),t||(process.env.NODE_ENV==="test"?"test-id":n)};function Ya(e,t,n){const r=h.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function p$(e){const[,t]=h.useReducer(i=>i+1,0),n=h.useRef(e),r=Ge(()=>n.current),o=Ge(i=>{n.current=typeof i=="function"?i(n.current):i,t()});return[r,o]}var kl={exports:{}},nt={};/**
31
31
  * @license React
32
32
  * react-is.production.js
33
33
  *
@@ -35,7 +35,7 @@
35
35
  *
36
36
  * This source code is licensed under the MIT license found in the
37
37
  * LICENSE file in the root directory of this source tree.
38
- */var If;function p$(){if(If)return nt;If=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(m){if(typeof m=="object"&&m!==null){var w=m.$$typeof;switch(w){case e:switch(m=m.type,m){case n:case o:case r:case l:case c:case f:return m;default:switch(m=m&&m.$$typeof,m){case a:case s:case d:case u:return m;case i:return m;default:return w}}case t:return w}}}return nt.ContextConsumer=i,nt.ContextProvider=a,nt.Element=e,nt.ForwardRef=s,nt.Fragment=n,nt.Lazy=d,nt.Memo=u,nt.Portal=t,nt.Profiler=o,nt.StrictMode=r,nt.Suspense=l,nt.SuspenseList=c,nt.isContextConsumer=function(m){return h(m)===i},nt.isContextProvider=function(m){return h(m)===a},nt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},nt.isForwardRef=function(m){return h(m)===s},nt.isFragment=function(m){return h(m)===n},nt.isLazy=function(m){return h(m)===d},nt.isMemo=function(m){return h(m)===u},nt.isPortal=function(m){return h(m)===t},nt.isProfiler=function(m){return h(m)===o},nt.isStrictMode=function(m){return h(m)===r},nt.isSuspense=function(m){return h(m)===l},nt.isSuspenseList=function(m){return h(m)===c},nt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===r||m===l||m===c||m===f||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===a||m.$$typeof===i||m.$$typeof===s||m.$$typeof===p||m.getModuleId!==void 0)},nt.typeOf=h,nt}var rt={};/**
38
+ */var If;function m$(){if(If)return nt;If=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function g(m){if(typeof m=="object"&&m!==null){var w=m.$$typeof;switch(w){case e:switch(m=m.type,m){case n:case o:case r:case l:case c:case f:return m;default:switch(m=m&&m.$$typeof,m){case a:case s:case d:case u:return m;case i:return m;default:return w}}case t:return w}}}return nt.ContextConsumer=i,nt.ContextProvider=a,nt.Element=e,nt.ForwardRef=s,nt.Fragment=n,nt.Lazy=d,nt.Memo=u,nt.Portal=t,nt.Profiler=o,nt.StrictMode=r,nt.Suspense=l,nt.SuspenseList=c,nt.isContextConsumer=function(m){return g(m)===i},nt.isContextProvider=function(m){return g(m)===a},nt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},nt.isForwardRef=function(m){return g(m)===s},nt.isFragment=function(m){return g(m)===n},nt.isLazy=function(m){return g(m)===d},nt.isMemo=function(m){return g(m)===u},nt.isPortal=function(m){return g(m)===t},nt.isProfiler=function(m){return g(m)===o},nt.isStrictMode=function(m){return g(m)===r},nt.isSuspense=function(m){return g(m)===l},nt.isSuspenseList=function(m){return g(m)===c},nt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===r||m===l||m===c||m===f||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===a||m.$$typeof===i||m.$$typeof===s||m.$$typeof===p||m.getModuleId!==void 0)},nt.typeOf=g,nt}var rt={};/**
39
39
  * @license React
40
40
  * react-is.development.js
41
41
  *
@@ -43,11 +43,11 @@
43
43
  *
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
- */var Rf;function m$(){return Rf||(Rf=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var w=m.$$typeof;switch(w){case t:switch(m=m.type,m){case r:case i:case o:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case s:case l:case f:case d:return m;case a:return m;default:return w}}case n:return w}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");rt.ContextConsumer=a,rt.ContextProvider=s,rt.Element=t,rt.ForwardRef=l,rt.Fragment=r,rt.Lazy=f,rt.Memo=d,rt.Portal=n,rt.Profiler=i,rt.StrictMode=o,rt.Suspense=c,rt.SuspenseList=u,rt.isContextConsumer=function(m){return e(m)===a},rt.isContextProvider=function(m){return e(m)===s},rt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},rt.isForwardRef=function(m){return e(m)===l},rt.isFragment=function(m){return e(m)===r},rt.isLazy=function(m){return e(m)===f},rt.isMemo=function(m){return e(m)===d},rt.isPortal=function(m){return e(m)===n},rt.isProfiler=function(m){return e(m)===i},rt.isStrictMode=function(m){return e(m)===o},rt.isSuspense=function(m){return e(m)===c},rt.isSuspenseList=function(m){return e(m)===u},rt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===o||m===c||m===u||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===d||m.$$typeof===s||m.$$typeof===a||m.$$typeof===l||m.$$typeof===h||m.getModuleId!==void 0)},rt.typeOf=e}()),rt}process.env.NODE_ENV==="production"?kl.exports=p$():kl.exports=m$();var Ls=kl.exports;const g$=Symbol.for("react.element"),h$=Symbol.for("react.transitional.element"),b$=Symbol.for("react.fragment");function Gg(e){return e&&typeof e=="object"&&(e.$$typeof===g$||e.$$typeof===h$)&&e.type===b$}const x$=Number(b.version.split(".")[0]),y$=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},Gn=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:n=>{e.forEach(r=>{y$(r,n)})}},Hr=(...e)=>Ya(()=>Gn(...e),e,(t,n)=>t.length!==n.length||t.every((r,o)=>r!==n[o])),$o=e=>{var n,r;if(!e)return!1;if(Su(e)&&x$>=19)return!0;const t=Ls.isMemo(e)?e.type.type:e.type;return!(typeof t=="function"&&!((n=t.prototype)!=null&&n.render)&&t.$$typeof!==Ls.ForwardRef||typeof e=="function"&&!((r=e.prototype)!=null&&r.render)&&e.$$typeof!==Ls.ForwardRef)};function Su(e){return b.isValidElement(e)&&!Gg(e)}const Kg=e=>Su(e)&&$o(e),cr=e=>{if(e&&Su(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function w$(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const Pf="data-rc-order",Tf="data-rc-priority",v$="rc-util-key",Il=new Map;function Yg({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:v$}function Qa(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function C$(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Eu(e){return Array.from((Il.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function Qg(e,t={}){if(!vn())return null;const{csp:n,prepend:r,priority:o=0}=t,i=C$(r),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(Pf,i),a&&o&&s.setAttribute(Tf,`${o}`),n!=null&&n.nonce&&(s.nonce=n==null?void 0:n.nonce),s.innerHTML=e;const l=Qa(t),{firstChild:c}=l;if(r){if(a){const u=(t.styles||Eu(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(Pf)))return!1;const f=Number(d.getAttribute(Tf)||0);return o>=f});if(u.length)return l.insertBefore(s,u[u.length-1].nextSibling),s}l.insertBefore(s,c)}else l.appendChild(s);return s}function Zg(e,t={}){let{styles:n}=t;return n||(n=Eu(Qa(t))),n.find(r=>r.getAttribute(Yg(t))===e)}function ii(e,t={}){const n=Zg(e,t);n&&Qa(t).removeChild(n)}function S$(e,t){const n=Il.get(e);if(!n||!w$(document,n)){const r=Qg("",t),{parentNode:o}=r;Il.set(e,o),e.removeChild(r)}}function Dr(e,t,n={}){var l,c,u;const r=Qa(n),o=Eu(r),i={...n,styles:o};S$(r,i);const a=Zg(t,i);if(a)return(l=i.csp)!=null&&l.nonce&&a.nonce!==((c=i.csp)==null?void 0:c.nonce)&&(a.nonce=(u=i.csp)==null?void 0:u.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const s=Qg(e,i);return s.setAttribute(Yg(i),t),s}function go(e){return e instanceof HTMLElement||e instanceof SVGElement}function $u(e){return e&&typeof e=="object"&&go(e.nativeElement)?e.nativeElement:go(e)?e:null}const ku=e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){const{width:t,height:n}=e.getBBox();if(t||n)return!0}if(e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();if(t||n)return!0}}return!1};function Nf(e,t=!1){if(ku(e)){const n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o);let a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function E$(e,t=!1){const n=[...e.querySelectorAll("*")].filter(r=>Nf(r,t));return Nf(e,t)&&n.unshift(e),n}function Jg(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}function eh(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function $$(e){return eh(e)instanceof ShadowRoot}function Rl(e){return $$(e)?eh(e):null}const Iu={TAB:9,ENTER:13,ESC:27,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function k$(e){const t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,n=document.createElement("div");n.id=t;const r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";let o,i;if(e){const l=getComputedStyle(e);r.scrollbarColor=l.scrollbarColor,r.scrollbarWidth=l.scrollbarWidth;const c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),d=parseInt(c.height,10);try{const f=u?`width: ${c.width};`:"",p=d?`height: ${c.height};`:"";Dr(`
46
+ */var Rf;function h$(){return Rf||(Rf=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var w=m.$$typeof;switch(w){case t:switch(m=m.type,m){case r:case i:case o:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case s:case l:case f:case d:return m;case a:return m;default:return w}}case n:return w}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");rt.ContextConsumer=a,rt.ContextProvider=s,rt.Element=t,rt.ForwardRef=l,rt.Fragment=r,rt.Lazy=f,rt.Memo=d,rt.Portal=n,rt.Profiler=i,rt.StrictMode=o,rt.Suspense=c,rt.SuspenseList=u,rt.isContextConsumer=function(m){return e(m)===a},rt.isContextProvider=function(m){return e(m)===s},rt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},rt.isForwardRef=function(m){return e(m)===l},rt.isFragment=function(m){return e(m)===r},rt.isLazy=function(m){return e(m)===f},rt.isMemo=function(m){return e(m)===d},rt.isPortal=function(m){return e(m)===n},rt.isProfiler=function(m){return e(m)===i},rt.isStrictMode=function(m){return e(m)===o},rt.isSuspense=function(m){return e(m)===c},rt.isSuspenseList=function(m){return e(m)===u},rt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===o||m===c||m===u||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===d||m.$$typeof===s||m.$$typeof===a||m.$$typeof===l||m.$$typeof===g||m.getModuleId!==void 0)},rt.typeOf=e}()),rt}process.env.NODE_ENV==="production"?kl.exports=m$():kl.exports=h$();var Ls=kl.exports;const g$=Symbol.for("react.element"),b$=Symbol.for("react.transitional.element"),x$=Symbol.for("react.fragment");function Gh(e){return e&&typeof e=="object"&&(e.$$typeof===g$||e.$$typeof===b$)&&e.type===x$}const y$=Number(b.version.split(".")[0]),w$=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},Gn=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:n=>{e.forEach(r=>{w$(r,n)})}},Hr=(...e)=>Ya(()=>Gn(...e),e,(t,n)=>t.length!==n.length||t.every((r,o)=>r!==n[o])),$o=e=>{var n,r;if(!e)return!1;if(Su(e)&&y$>=19)return!0;const t=Ls.isMemo(e)?e.type.type:e.type;return!(typeof t=="function"&&!((n=t.prototype)!=null&&n.render)&&t.$$typeof!==Ls.ForwardRef||typeof e=="function"&&!((r=e.prototype)!=null&&r.render)&&e.$$typeof!==Ls.ForwardRef)};function Su(e){return b.isValidElement(e)&&!Gh(e)}const Kh=e=>Su(e)&&$o(e),cr=e=>{if(e&&Su(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function v$(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const Tf="data-rc-order",Pf="data-rc-priority",C$="rc-util-key",Il=new Map;function Yh({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:C$}function Qa(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function S$(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Eu(e){return Array.from((Il.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function Qh(e,t={}){if(!vn())return null;const{csp:n,prepend:r,priority:o=0}=t,i=S$(r),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(Tf,i),a&&o&&s.setAttribute(Pf,`${o}`),n!=null&&n.nonce&&(s.nonce=n==null?void 0:n.nonce),s.innerHTML=e;const l=Qa(t),{firstChild:c}=l;if(r){if(a){const u=(t.styles||Eu(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(Tf)))return!1;const f=Number(d.getAttribute(Pf)||0);return o>=f});if(u.length)return l.insertBefore(s,u[u.length-1].nextSibling),s}l.insertBefore(s,c)}else l.appendChild(s);return s}function Zh(e,t={}){let{styles:n}=t;return n||(n=Eu(Qa(t))),n.find(r=>r.getAttribute(Yh(t))===e)}function ii(e,t={}){const n=Zh(e,t);n&&Qa(t).removeChild(n)}function E$(e,t){const n=Il.get(e);if(!n||!v$(document,n)){const r=Qh("",t),{parentNode:o}=r;Il.set(e,o),e.removeChild(r)}}function Dr(e,t,n={}){var l,c,u;const r=Qa(n),o=Eu(r),i={...n,styles:o};E$(r,i);const a=Zh(t,i);if(a)return(l=i.csp)!=null&&l.nonce&&a.nonce!==((c=i.csp)==null?void 0:c.nonce)&&(a.nonce=(u=i.csp)==null?void 0:u.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const s=Qh(e,i);return s.setAttribute(Yh(i),t),s}function ho(e){return e instanceof HTMLElement||e instanceof SVGElement}function $u(e){return e&&typeof e=="object"&&ho(e.nativeElement)?e.nativeElement:ho(e)?e:null}const ku=e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){const{width:t,height:n}=e.getBBox();if(t||n)return!0}if(e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();if(t||n)return!0}}return!1};function Nf(e,t=!1){if(ku(e)){const n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o);let a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function $$(e,t=!1){const n=[...e.querySelectorAll("*")].filter(r=>Nf(r,t));return Nf(e,t)&&n.unshift(e),n}function Jh(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}function eg(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function k$(e){return eg(e)instanceof ShadowRoot}function Rl(e){return k$(e)?eg(e):null}const Iu={TAB:9,ENTER:13,ESC:27,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function I$(e){const t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,n=document.createElement("div");n.id=t;const r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";let o,i;if(e){const l=getComputedStyle(e);r.scrollbarColor=l.scrollbarColor,r.scrollbarWidth=l.scrollbarWidth;const c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),d=parseInt(c.height,10);try{const f=u?`width: ${c.width};`:"",p=d?`height: ${c.height};`:"";Dr(`
47
47
  #${t}::-webkit-scrollbar {
48
48
  ${f}
49
49
  ${p}
50
- }`,t)}catch(f){console.error(f),o=u,i=d}}document.body.appendChild(n);const a=e&&o&&!Number.isNaN(o)?o:n.offsetWidth-n.clientWidth,s=e&&i&&!Number.isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),ii(t),{width:a,height:s}}function I$(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:k$(e)}let Pl={};const Ru=[],R$=e=>{Ru.push(e)};function xa(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=Ru.reduce((r,o)=>o(r??"","warning"),t);n&&console.error(`Warning: ${n}`)}}function P$(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=Ru.reduce((r,o)=>o(r??"","note"),t);n&&console.warn(`Note: ${n}`)}}function T$(){Pl={}}function th(e,t,n){!t&&!Pl[n]&&(e(!1,n),Pl[n]=!0)}function tt(e,t){th(xa,e,t)}function N$(e,t){th(P$,e,t)}tt.preMessage=R$;tt.resetWarned=T$;tt.noteOnce=N$;function ai(e,t,n=!1){const r=new Set;function o(i,a,s=1){const l=r.has(i);if(tt(!l,"Warning: There may be circular references"),l)return!1;if(i===a)return!0;if(n&&s>1)return!1;r.add(i);const c=s+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(let u=0;u<i.length;u++)if(!o(i[u],a[u],c))return!1;return!0}if(i&&a&&typeof i=="object"&&typeof a=="object"){const u=Object.keys(i);return u.length!==Object.keys(a).length?!1:u.every(d=>o(i[d],a[d],c))}return!1}return o(e,t)}function Tl(e){return e!=null}function yi(e){return Tl(e)&&e!==!1&&e!==""}var Pu={exports:{}};Pu.exports=Tu;Pu.exports.isMobile=Tu;Pu.exports.default=Tu;const M$=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,A$=/CrOS/,z$=/android|ipad|playbook|silk/i;function Tu(e){e||(e={});let t=e.ua;if(!t&&typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let n=M$.test(t)&&!A$.test(t)||!!e.tablet&&z$.test(t);return!n&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(n=!0),n}function Yt(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach(r=>{delete n[r]}),n}const O$=`accept acceptCharset accessKey action allowFullScreen allowTransparency
50
+ }`,t)}catch(f){console.error(f),o=u,i=d}}document.body.appendChild(n);const a=e&&o&&!Number.isNaN(o)?o:n.offsetWidth-n.clientWidth,s=e&&i&&!Number.isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),ii(t),{width:a,height:s}}function R$(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:I$(e)}let Tl={};const Ru=[],T$=e=>{Ru.push(e)};function xa(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=Ru.reduce((r,o)=>o(r??"","warning"),t);n&&console.error(`Warning: ${n}`)}}function P$(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=Ru.reduce((r,o)=>o(r??"","note"),t);n&&console.warn(`Note: ${n}`)}}function N$(){Tl={}}function tg(e,t,n){!t&&!Tl[n]&&(e(!1,n),Tl[n]=!0)}function tt(e,t){tg(xa,e,t)}function M$(e,t){tg(P$,e,t)}tt.preMessage=T$;tt.resetWarned=N$;tt.noteOnce=M$;function ai(e,t,n=!1){const r=new Set;function o(i,a,s=1){const l=r.has(i);if(tt(!l,"Warning: There may be circular references"),l)return!1;if(i===a)return!0;if(n&&s>1)return!1;r.add(i);const c=s+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(let u=0;u<i.length;u++)if(!o(i[u],a[u],c))return!1;return!0}if(i&&a&&typeof i=="object"&&typeof a=="object"){const u=Object.keys(i);return u.length!==Object.keys(a).length?!1:u.every(d=>o(i[d],a[d],c))}return!1}return o(e,t)}function Pl(e){return e!=null}function yi(e){return Pl(e)&&e!==!1&&e!==""}var Tu={exports:{}};Tu.exports=Pu;Tu.exports.isMobile=Pu;Tu.exports.default=Pu;const A$=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,z$=/CrOS/,O$=/android|ipad|playbook|silk/i;function Pu(e){e||(e={});let t=e.ua;if(!t&&typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let n=A$.test(t)&&!z$.test(t)||!!e.tablet&&O$.test(t);return!n&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(n=!0),n}function Yt(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach(r=>{delete n[r]}),n}const D$=`accept acceptCharset accessKey action allowFullScreen allowTransparency
51
51
  alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
52
52
  charSet checked classID className colSpan cols content contentEditable contextMenu
53
53
  controls coords crossOrigin data dateTime default defer dir disabled download draggable
@@ -58,7 +58,7 @@ ${p}
58
58
  optimum pattern placeholder poster preload radioGroup readOnly rel required
59
59
  reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
60
60
  shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
61
- summary tabIndex target title type useMap value width wmode wrap`,D$=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
61
+ summary tabIndex target title type useMap value width wmode wrap`,L$=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
62
62
  onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
63
63
  onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
64
64
  onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
@@ -69,7 +69,7 @@ ${p}
69
69
  onAnimationStart onAnimationEnd onAnimationIteration
70
70
  onTransitionEnd onTransitionRun onTransitionStart onTransitionCancel
71
71
  onBeforeInput onReset onInvalid
72
- onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,L$=`${O$} ${D$}`.split(/[\s\n]+/),F$="aria-",_$="data-";function Mf(e,t){return e.indexOf(t)===0}function nh(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||Mf(o,F$))||n.data&&Mf(o,_$)||n.attr&&L$.includes(o))&&(r[o]=e[o])}),r}function or(e,t={}){let n=[];return b.Children.forEach(e,r=>{r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(or(r)):Gg(r)&&r.props?n=n.concat(or(r.props.children,t)):n.push(r))}),n}function In(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function rh(e,t,n,r){if(!t.length)return n;const[o,...i]=t;let a;return!e&&typeof o=="number"?a=[]:Array.isArray(e)?a=[...e]:a={...e},r&&n===void 0&&i.length===1?delete a[o][i[0]]:a[o]=rh(a[o],i,n,r),a}function xn(e,t,n,r=!1){return t.length&&r&&n===void 0&&!In(e,t.slice(0,-1))?e:rh(e,t,n,r)}function j$(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Af(e){return Array.isArray(e)?[]:{}}const B$=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function H$(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=Af(e[0]);return e.forEach(i=>{function a(s,l){const c=new Set(l),u=In(i,s),d=Array.isArray(u);if(d||j$(u)){if(!c.has(u)){c.add(u);const f=In(o,s);d?o=xn(o,s,r(f,u)):(!f||typeof f!="object")&&(o=xn(o,s,Af(u))),B$(u).forEach(p=>{Object.getOwnPropertyDescriptor(u,p).enumerable&&a([...s,p],c)})}}else o=xn(o,s,u)}a([])}),o}function oo(...e){return H$(e)}const ya="__rc_react_root__";function V$(e,t){const n=t[ya]||hm.createRoot(t);n.render(e),t[ya]=n}async function W$(e){return Promise.resolve().then(()=>{var t;(t=e[ya])==null||t.unmount(),delete e[ya]})}function oh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=oh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Z(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=oh(e))&&(r&&(r+=" "),r+=t);return r}const ih=g.createContext({}),q$=e=>{const{children:t,...n}=e,r=g.useMemo(()=>({motion:n.motion}),[n.motion]);return g.createElement(ih.Provider,{value:r},t)},qn="none",ji="appear",Bi="enter",Hi="leave",zf="none",Tn="prepare",Nr="start",Mr="active",Nu="end",ah="prepared";function Of(e,t){const n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit${e}`]=`webkit${t}`,n[`Moz${e}`]=`moz${t}`,n[`ms${e}`]=`MS${t}`,n[`O${e}`]=`o${t.toLowerCase()}`,n}function X$(e,t){const n={animationend:Of("Animation","AnimationEnd"),transitionend:Of("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const U$=X$(vn(),typeof window<"u"?window:{});let sh={};vn()&&({style:sh}=document.createElement("div"));const Vi={};function lh(e){if(Vi[e])return Vi[e];const t=U$[e];if(t){const n=Object.keys(t),r=n.length;for(let o=0;o<r;o+=1){const i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in sh)return Vi[e]=t[i],Vi[e]}}return""}const ch=lh("animationend"),uh=lh("transitionend"),G$=!!(ch&&uh),Df=ch||"animationend",Lf=uh||"transitionend";function Ff(e,t){if(!e)return null;if(typeof e=="object"){const n=t.replace(/-\w/g,r=>r[1].toUpperCase());return e[n]}return`${e}-${t}`}const K$=e=>{const t=b.useRef();function n(o){o&&(o.removeEventListener(Lf,e),o.removeEventListener(Df,e))}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(Lf,e),o.addEventListener(Df,e),t.current=o)}return g.useEffect(()=>()=>{n(t.current),t.current=null},[]),[r,n]},dh=vn()?b.useLayoutEffect:b.useEffect,Y$=()=>{const e=g.useRef(null);function t(){xt.cancel(e.current)}function n(r,o=2){t();const i=xt(()=>{o<=1?r({isCanceled:()=>i!==e.current}):n(r,o-1)});e.current=i}return g.useEffect(()=>()=>{t()},[]),[n,t]},Q$=[Tn,Nr,Mr,Nu],Z$=[Tn,ah],fh=!1,J$=!0;function ph(e){return e===Mr||e===Nu}const ek=(e,t,n)=>{const[r,o]=c$(zf),[i,a]=Y$();function s(){o(Tn,!0)}const l=t?Z$:Q$;return dh(()=>{if(r!==zf&&r!==Nu){const c=l.indexOf(r),u=l[c+1],d=n(r);d===fh?o(u,!0):u&&i(f=>{function p(){f.isCanceled()||o(u,!0)}d===!0?p():Promise.resolve(d).then(p)})}},[e,r]),g.useEffect(()=>()=>{a()},[]),[s,r]};function tk(e,t,n,{motionEnter:r=!0,motionAppear:o=!0,motionLeave:i=!0,motionDeadline:a,motionLeaveImmediately:s,onAppearPrepare:l,onEnterPrepare:c,onLeavePrepare:u,onAppearStart:d,onEnterStart:f,onLeaveStart:p,onAppearActive:h,onEnterActive:m,onLeaveActive:w,onAppearEnd:y,onEnterEnd:$,onLeaveEnd:x,onVisibleChanged:E}){const[v,C]=g.useState(),[I,N]=f$(qn),[A,k]=g.useState([null,null]),R=I(),O=b.useRef(!1),z=b.useRef(null);function D(){return n()}const M=b.useRef(!1);function L(){N(qn),k([null,null])}const _=Ge(j=>{const H=I();if(H===qn)return;const ee=D();if(j&&!j.deadline&&j.target!==ee)return;const oe=M.current;let B;H===ji&&oe?B=y==null?void 0:y(ee,j):H===Bi&&oe?B=$==null?void 0:$(ee,j):H===Hi&&oe&&(B=x==null?void 0:x(ee,j)),oe&&B!==!1&&L()}),[V]=K$(_),X=j=>{switch(j){case ji:return{[Tn]:l,[Nr]:d,[Mr]:h};case Bi:return{[Tn]:c,[Nr]:f,[Mr]:m};case Hi:return{[Tn]:u,[Nr]:p,[Mr]:w};default:return{}}},P=g.useMemo(()=>X(R),[R]),[Y,K]=ek(R,!e,j=>{var H;if(j===Tn){const ee=P[Tn];return ee?ee(D()):fh}return j in P&&k([((H=P[j])==null?void 0:H.call(P,D(),null))||null,j]),j===Mr&&R!==qn&&(V(D()),a>0&&(clearTimeout(z.current),z.current=setTimeout(()=>{_({deadline:!0})},a))),j===ah&&L(),J$}),T=ph(K);M.current=T;const ne=b.useRef(null);dh(()=>{if(O.current&&ne.current===t)return;C(t);const j=O.current;O.current=!0;let H;!j&&t&&o&&(H=ji),j&&t&&r&&(H=Bi),(j&&!t&&i||!j&&s&&!t&&i)&&(H=Hi);const ee=X(H);H&&(e||ee[Tn])?(N(H),Y()):N(qn),ne.current=t},[t]),b.useEffect(()=>{(R===ji&&!o||R===Bi&&!r||R===Hi&&!i)&&N(qn)},[o,r,i]),b.useEffect(()=>()=>{O.current=!1,clearTimeout(z.current)},[]);const F=g.useRef(!1);b.useEffect(()=>{v&&(F.current=!0),v!==void 0&&R===qn&&((F.current||v)&&(E==null||E(v)),F.current=!0)},[v,R]);let U=A[0];P[Tn]&&K===Nr&&(U={transition:"none",...U});const re=A[1];return[I,K,U,v??t,!O.current&&R===qn&&e&&o?"NONE":K===Nr||K===Mr?re===K:!0]}function nk(e){return(e==null?void 0:e.length)<2}function rk(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function n(o,i){return!!(o.motionName&&t&&i!==!1)}const r=g.forwardRef((o,i)=>{const{visible:a=!0,removeOnLeave:s=!0,forceRender:l,children:c,motionName:u,leavedClassName:d,eventProps:f}=o,{motion:p}=g.useContext(ih),h=n(o,p),m=b.useRef();function w(){return $u(m.current)}const[y,$,x,E,v]=tk(h,a,w,o),C=y(),I=g.useRef(E);E&&(I.current=!0);const N=g.useMemo(()=>{const R={};return Object.defineProperties(R,{nativeElement:{enumerable:!0,get:w},inMotion:{enumerable:!0,get:()=>()=>y()!==qn},enableMotion:{enumerable:!0,get:()=>()=>h}}),R},[]);g.useImperativeHandle(i,()=>N,[]);const A=g.useRef(0);v&&(A.current+=1);const k=g.useMemo(()=>{if(v==="NONE")return null;let R;const O={...f,visible:a};if(!c)R=null;else if(C===qn)E?R=c({...O},m):!s&&I.current&&d?R=c({...O,className:d},m):l||!s&&!d?R=c({...O,style:{display:"none"}},m):R=null;else{let z;$===Tn?z="prepare":ph($)?z="active":$===Nr&&(z="start");const D=Ff(u,`${C}-${z}`);R=c({...O,className:Z(Ff(u,C),{[D]:D&&z,[u]:typeof u=="string"}),style:x},m)}return R},[A.current]);if(nk(c)&&Kg(k)){const R=cr(k);if(R!==m)return g.cloneElement(k,{ref:Gn(R,m)})}return k});return r.displayName="CSSMotion",r}const vr=rk(G$);var mh={};Object.defineProperty(mh,"__esModule",{value:!0});var Za=mh.default=ck;const ok=`accept acceptCharset accessKey action allowFullScreen allowTransparency
72
+ onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,F$=`${D$} ${L$}`.split(/[\s\n]+/),_$="aria-",j$="data-";function Mf(e,t){return e.indexOf(t)===0}function ng(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||Mf(o,_$))||n.data&&Mf(o,j$)||n.attr&&F$.includes(o))&&(r[o]=e[o])}),r}function or(e,t={}){let n=[];return b.Children.forEach(e,r=>{r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(or(r)):Gh(r)&&r.props?n=n.concat(or(r.props.children,t)):n.push(r))}),n}function In(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function rg(e,t,n,r){if(!t.length)return n;const[o,...i]=t;let a;return!e&&typeof o=="number"?a=[]:Array.isArray(e)?a=[...e]:a={...e},r&&n===void 0&&i.length===1?delete a[o][i[0]]:a[o]=rg(a[o],i,n,r),a}function xn(e,t,n,r=!1){return t.length&&r&&n===void 0&&!In(e,t.slice(0,-1))?e:rg(e,t,n,r)}function B$(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Af(e){return Array.isArray(e)?[]:{}}const H$=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function V$(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=Af(e[0]);return e.forEach(i=>{function a(s,l){const c=new Set(l),u=In(i,s),d=Array.isArray(u);if(d||B$(u)){if(!c.has(u)){c.add(u);const f=In(o,s);d?o=xn(o,s,r(f,u)):(!f||typeof f!="object")&&(o=xn(o,s,Af(u))),H$(u).forEach(p=>{Object.getOwnPropertyDescriptor(u,p).enumerable&&a([...s,p],c)})}}else o=xn(o,s,u)}a([])}),o}function oo(...e){return V$(e)}const ya="__rc_react_root__";function W$(e,t){const n=t[ya]||gm.createRoot(t);n.render(e),t[ya]=n}async function q$(e){return Promise.resolve().then(()=>{var t;(t=e[ya])==null||t.unmount(),delete e[ya]})}function og(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=og(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function J(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=og(e))&&(r&&(r+=" "),r+=t);return r}const ig=h.createContext({}),X$=e=>{const{children:t,...n}=e,r=h.useMemo(()=>({motion:n.motion}),[n.motion]);return h.createElement(ig.Provider,{value:r},t)},qn="none",ji="appear",Bi="enter",Hi="leave",zf="none",Pn="prepare",Nr="start",Mr="active",Nu="end",ag="prepared";function Of(e,t){const n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit${e}`]=`webkit${t}`,n[`Moz${e}`]=`moz${t}`,n[`ms${e}`]=`MS${t}`,n[`O${e}`]=`o${t.toLowerCase()}`,n}function U$(e,t){const n={animationend:Of("Animation","AnimationEnd"),transitionend:Of("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const G$=U$(vn(),typeof window<"u"?window:{});let sg={};vn()&&({style:sg}=document.createElement("div"));const Vi={};function lg(e){if(Vi[e])return Vi[e];const t=G$[e];if(t){const n=Object.keys(t),r=n.length;for(let o=0;o<r;o+=1){const i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in sg)return Vi[e]=t[i],Vi[e]}}return""}const cg=lg("animationend"),ug=lg("transitionend"),K$=!!(cg&&ug),Df=cg||"animationend",Lf=ug||"transitionend";function Ff(e,t){if(!e)return null;if(typeof e=="object"){const n=t.replace(/-\w/g,r=>r[1].toUpperCase());return e[n]}return`${e}-${t}`}const Y$=e=>{const t=b.useRef();function n(o){o&&(o.removeEventListener(Lf,e),o.removeEventListener(Df,e))}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(Lf,e),o.addEventListener(Df,e),t.current=o)}return h.useEffect(()=>()=>{n(t.current),t.current=null},[]),[r,n]},dg=vn()?b.useLayoutEffect:b.useEffect,Q$=()=>{const e=h.useRef(null);function t(){xt.cancel(e.current)}function n(r,o=2){t();const i=xt(()=>{o<=1?r({isCanceled:()=>i!==e.current}):n(r,o-1)});e.current=i}return h.useEffect(()=>()=>{t()},[]),[n,t]},Z$=[Pn,Nr,Mr,Nu],J$=[Pn,ag],fg=!1,ek=!0;function pg(e){return e===Mr||e===Nu}const tk=(e,t,n)=>{const[r,o]=u$(zf),[i,a]=Q$();function s(){o(Pn,!0)}const l=t?J$:Z$;return dg(()=>{if(r!==zf&&r!==Nu){const c=l.indexOf(r),u=l[c+1],d=n(r);d===fg?o(u,!0):u&&i(f=>{function p(){f.isCanceled()||o(u,!0)}d===!0?p():Promise.resolve(d).then(p)})}},[e,r]),h.useEffect(()=>()=>{a()},[]),[s,r]};function nk(e,t,n,{motionEnter:r=!0,motionAppear:o=!0,motionLeave:i=!0,motionDeadline:a,motionLeaveImmediately:s,onAppearPrepare:l,onEnterPrepare:c,onLeavePrepare:u,onAppearStart:d,onEnterStart:f,onLeaveStart:p,onAppearActive:g,onEnterActive:m,onLeaveActive:w,onAppearEnd:y,onEnterEnd:$,onLeaveEnd:x,onVisibleChanged:E}){const[C,v]=h.useState(),[T,R]=p$(qn),[A,k]=h.useState([null,null]),N=T(),z=b.useRef(!1),L=b.useRef(null);function D(){return n()}const M=b.useRef(!1);function O(){R(qn),k([null,null])}const F=Ge(ee=>{const _=T();if(_===qn)return;const ae=D();if(ee&&!ee.deadline&&ee.target!==ae)return;const fe=M.current;let q;_===ji&&fe?q=y==null?void 0:y(ae,ee):_===Bi&&fe?q=$==null?void 0:$(ae,ee):_===Hi&&fe&&(q=x==null?void 0:x(ae,ee)),fe&&q!==!1&&O()}),[H]=Y$(F),X=ee=>{switch(ee){case ji:return{[Pn]:l,[Nr]:d,[Mr]:g};case Bi:return{[Pn]:c,[Nr]:f,[Mr]:m};case Hi:return{[Pn]:u,[Nr]:p,[Mr]:w};default:return{}}},I=h.useMemo(()=>X(N),[N]),[Q,Y]=tk(N,!e,ee=>{var _;if(ee===Pn){const ae=I[Pn];return ae?ae(D()):fg}return ee in I&&k([((_=I[ee])==null?void 0:_.call(I,D(),null))||null,ee]),ee===Mr&&N!==qn&&(H(D()),a>0&&(clearTimeout(L.current),L.current=setTimeout(()=>{F({deadline:!0})},a))),ee===ag&&O(),ek}),P=pg(Y);M.current=P;const oe=b.useRef(null);dg(()=>{if(z.current&&oe.current===t)return;v(t);const ee=z.current;z.current=!0;let _;!ee&&t&&o&&(_=ji),ee&&t&&r&&(_=Bi),(ee&&!t&&i||!ee&&s&&!t&&i)&&(_=Hi);const ae=X(_);_&&(e||ae[Pn])?(R(_),Q()):R(qn),oe.current=t},[t]),b.useEffect(()=>{(N===ji&&!o||N===Bi&&!r||N===Hi&&!i)&&R(qn)},[o,r,i]),b.useEffect(()=>()=>{z.current=!1,clearTimeout(L.current)},[]);const W=h.useRef(!1);b.useEffect(()=>{C&&(W.current=!0),C!==void 0&&N===qn&&((W.current||C)&&(E==null||E(C)),W.current=!0)},[C,N]);let j=A[0];I[Pn]&&Y===Nr&&(j={transition:"none",...j});const ne=A[1];return[T,Y,j,C??t,!z.current&&N===qn&&e&&o?"NONE":Y===Nr||Y===Mr?ne===Y:!0]}function rk(e){return(e==null?void 0:e.length)<2}function ok(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function n(o,i){return!!(o.motionName&&t&&i!==!1)}const r=h.forwardRef((o,i)=>{const{visible:a=!0,removeOnLeave:s=!0,forceRender:l,children:c,motionName:u,leavedClassName:d,eventProps:f}=o,{motion:p}=h.useContext(ig),g=n(o,p),m=b.useRef();function w(){return $u(m.current)}const[y,$,x,E,C]=nk(g,a,w,o),v=y(),T=h.useRef(E);E&&(T.current=!0);const R=h.useMemo(()=>{const N={};return Object.defineProperties(N,{nativeElement:{enumerable:!0,get:w},inMotion:{enumerable:!0,get:()=>()=>y()!==qn},enableMotion:{enumerable:!0,get:()=>()=>g}}),N},[]);h.useImperativeHandle(i,()=>R,[]);const A=h.useRef(0);C&&(A.current+=1);const k=h.useMemo(()=>{if(C==="NONE")return null;let N;const z={...f,visible:a};if(!c)N=null;else if(v===qn)E?N=c({...z},m):!s&&T.current&&d?N=c({...z,className:d},m):l||!s&&!d?N=c({...z,style:{display:"none"}},m):N=null;else{let L;$===Pn?L="prepare":pg($)?L="active":$===Nr&&(L="start");const D=Ff(u,`${v}-${L}`);N=c({...z,className:J(Ff(u,v),{[D]:D&&L,[u]:typeof u=="string"}),style:x},m)}return N},[A.current]);if(rk(c)&&Kh(k)){const N=cr(k);if(N!==m)return h.cloneElement(k,{ref:Gn(N,m)})}return k});return r.displayName="CSSMotion",r}const vr=ok(K$);var mg={};Object.defineProperty(mg,"__esModule",{value:!0});var Za=mg.default=uk;const ik=`accept acceptCharset accessKey action allowFullScreen allowTransparency
73
73
  alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
74
74
  charSet checked classID className colSpan cols content contentEditable contextMenu
75
75
  controls coords crossOrigin data dateTime default defer dir disabled download draggable
@@ -80,7 +80,7 @@ ${p}
80
80
  optimum pattern placeholder poster preload radioGroup readOnly rel required
81
81
  reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
82
82
  shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
83
- summary tabIndex target title type useMap value width wmode wrap`,ik=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
83
+ summary tabIndex target title type useMap value width wmode wrap`,ak=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
84
84
  onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
85
85
  onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
86
86
  onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
@@ -91,13 +91,13 @@ ${p}
91
91
  onAnimationStart onAnimationEnd onAnimationIteration
92
92
  onTransitionEnd onTransitionRun onTransitionStart onTransitionCancel
93
93
  onBeforeInput onReset onInvalid
94
- onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,ak=`${ok} ${ik}`.split(/[\s\n]+/),sk="aria-",lk="data-";function _f(e,t){return e.indexOf(t)===0}function ck(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||_f(o,sk))||n.data&&_f(o,lk)||n.attr&&ak.includes(o))&&(r[o]=e[o])}),r}function gh(e,t){return b.useImperativeHandle(e,()=>{const n=t(),{nativeElement:r}=n;return new Proxy(r,{get(o,i){return n[i]?n[i]:Reflect.get(o,i)}})})}const uk=b.createContext({}),dk={classNames:{},styles:{},className:"",style:{},shortcutKeys:{}},Mu=e=>{const t=b.useContext(uk);return b.useMemo(()=>({...dk,...t[e]}),[t[e]])};function si(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}const fk="%";function Nl(e){return e.join(fk)}let jf=0;class pk{constructor(t){J(this,"instanceId");J(this,"cache",new Map);J(this,"updateTimes",new Map);J(this,"extracted",new Set);this.instanceId=t}get(t){return this.opGet(Nl(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(Nl(t),n)}opUpdate(t,n){const r=this.cache.get(t),o=n(r);o===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,o),this.updateTimes.set(t,jf),jf+=1)}}const Au="data-token-hash",nr="data-css-hash",mk="data-cache-path",er="__cssinjs_instance__";function gk(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${nr}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(o=>{o[er]||(o[er]=e),o[er]===e&&document.head.insertBefore(o,n)});const r={};Array.from(document.querySelectorAll(`style[${nr}]`)).forEach(o=>{var a;const i=o.getAttribute(nr);r[i]?o[er]===e&&((a=o.parentNode)==null||a.removeChild(o)):r[i]=!0})}return new pk(e)}const wi=g.createContext({hashPriority:"low",cache:gk(),defaultCache:!0,autoPrefix:!1});function hk(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const co=class co{constructor(){J(this,"cache");J(this,"keys");J(this,"cacheCallTimes");this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t,n=!1){let r={map:this.cache};return t.forEach(o=>{var i;r?r=(i=r==null?void 0:r.map)==null?void 0:i.get(o):r=void 0}),r!=null&&r.value&&n&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(t){var n;return(n=this.internalGet(t,!0))==null?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>co.MAX_CACHE_SIZE+co.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((i,a)=>{const[,s]=i;return this.internalGet(a)[1]<s?[a,this.internalGet(a)[1]]:i},[this.keys[0],this.cacheCallTimes]);this.delete(o)}this.keys.push(t)}let r=this.cache;t.forEach((o,i)=>{if(i===t.length-1)r.set(o,{value:[n,this.cacheCallTimes++]});else{const a=r.get(o);a?a.map||(a.map=new Map):r.set(o,{map:new Map}),r=r.get(o).map}})}deleteByPath(t,n){var i;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(i=r.value)==null?void 0:i[0];const o=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),o}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!hk(n,t)),this.deleteByPath(this.cache,t)}};J(co,"MAX_CACHE_SIZE",20),J(co,"MAX_CACHE_OFFSET",5);let Ml=co,Bf=0;class hh{constructor(t){J(this,"derivatives");J(this,"id");this.derivatives=Array.isArray(t)?t:[t],this.id=Bf,t.length===0&&xa(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Bf+=1}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const Fs=new Ml;function wa(e){const t=Array.isArray(e)?e:[e];return Fs.has(t)||Fs.set(t,new hh(t)),Fs.get(t)}const bk=new WeakMap,_s={};function xk(e,t){let n=bk;for(let r=0;r<t.length;r+=1){const o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(_s)||n.set(_s,e()),n.get(_s)}const Hf=new WeakMap;function Jo(e){let t=Hf.get(e)||"";return t||(Object.keys(e).forEach(n=>{const r=e[n];t+=n,r instanceof hh?t+=r.id:r&&typeof r=="object"?t+=Jo(r):t+=r}),t=si(t),Hf.set(e,t)),t}function yk(e,t){return si(`${t}_${Jo(e)}`)}const Al=vn();function xe(e){return typeof e=="number"?`${e}px`:e}function bh(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return"";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const wk=e=>e!=null;function zu(e,t){const n=typeof t=="function"?t():t;return n?{...e,csp:{...e.csp,nonce:n}}:e}const oa=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),vk=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",scope:i}=n||{};if(!Object.keys(e).length)return"";const a=`${bh({hashCls:r,hashPriority:o})}.${t}`,s=[i].flat().filter(Boolean);return`${s.length?s.map(c=>`${a}.${c}`).join(", "):a}{${Object.entries(e).map(([c,u])=>`${c}:${u};`).join("")}}`},xh=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",prefix:i,unitless:a,ignore:s,preserve:l}=n||{},c={},u={};return Object.entries(e).forEach(([d,f])=>{if(l!=null&&l[d])u[d]=f;else if((typeof f=="string"||typeof f=="number")&&!(s!=null&&s[d])){const p=oa(d,i);c[p]=typeof f=="number"&&!(a!=null&&a[d])?`${f}px`:String(f),u[d]=`var(${p})`}}),[u,vk(c,t,{scope:n==null?void 0:n.scope,hashCls:r,hashPriority:o})]};function Ck(){return!1}let zl=!1;function Sk(){return zl}const Ek=process.env.NODE_ENV==="production"?Ck:Sk;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(e&&typeof e.webpackHotUpdate=="function"){const t=e.webpackHotUpdate;e.webpackHotUpdate=(...n)=>(zl=!0,setTimeout(()=>{zl=!1},0),t(...n))}}const Wi=new Map;function Ou(e,t,n,r,o){const{cache:i}=g.useContext(wi),a=[e,...t],s=Nl(a),l=Ek(),c=f=>{i.opUpdate(s,p=>{const[h=0,m]=p||[void 0,void 0];let w=m;process.env.NODE_ENV!=="production"&&m&&l&&(r==null||r(w,l),w=null);const y=w||n(),$=[h,y];return f?f($):$})};g.useMemo(()=>{c()},[s]);let u=i.opGet(s);process.env.NODE_ENV!=="production"&&!u&&(c(),u=i.opGet(s));const d=u[1];return b.useInsertionEffect(()=>(c(([f,p])=>[f+1,p]),Wi.has(s)||(o==null||o(d),Wi.set(s,!0),Promise.resolve().then(()=>{Wi.delete(s)})),()=>{i.opUpdate(s,f=>{const[p=0,h]=f||[];return p-1===0?(r==null||r(h,!1),Wi.delete(s),null):[p-1,h]})}),[s]),d}const $k={},kk=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Ar=new Map;function Ik(e){Ar.set(e,(Ar.get(e)||0)+1)}function Rk(e,t){typeof document<"u"&&document.querySelectorAll(`style[${Au}="${e}"]`).forEach(r=>{var o;r[er]===t&&((o=r.parentNode)==null||o.removeChild(r))})}const Pk=-1;function Tk(e,t){Ar.set(e,(Ar.get(e)||0)-1);const n=new Set;Ar.forEach((r,o)=>{r<=0&&n.add(o)}),Ar.size-n.size>Pk&&n.forEach(r=>{Rk(r,t),Ar.delete(r)})}const Nk=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},Mk="token";function yh(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=b.useContext(wi),{salt:a="",override:s=$k,formatToken:l,getComputedToken:c,cssVar:u,nonce:d}=n,f=xk(()=>Object.assign({},...t),t),p=Jo(f),h=Jo(s),m=Jo(u);return Ou(Mk,[a,e.id,p,h,m],()=>{const y=c?c(f,s,e):Nk(f,s,e,l),$={...y},x=`${a}_${u.prefix}`,E=si(x),v=`${kk}-${E}`;$._tokenKey=yk($,x);const[C,I]=xh(y,u.key,{prefix:u.prefix,ignore:u.ignore,unitless:u.unitless,preserve:u.preserve,hashPriority:i,hashCls:u.hashed?v:void 0});return C._hashId=E,Ik(u.key),[C,v,$,I,u.key]},([,,,,y])=>{Tk(y,r)},([,,,y,$])=>{if(!y)return;let x={mark:nr,prepend:"queue",attachTo:o,priority:-999};x=zu(x,d);const E=Dr(y,si(`css-var-${$}`),x);E[er]=r,E.setAttribute(Au,$)})}var Ak={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ut="-ms-",ei="-moz-",Je="-webkit-",wh="comm",Du="rule",Lu="decl",zk="@import",Ok="@namespace",vh="@keyframes",Dk="@layer",Lk=Math.abs,ti=String.fromCharCode,Ol=Object.assign;function Fk(e,t){return Mt(e,0)^45?(((t<<2^Mt(e,0))<<2^Mt(e,1))<<2^Mt(e,2))<<2^Mt(e,3):0}function Ch(e){return e.trim()}function Zn(e,t){return(e=t.exec(e))?e[0]:e}function He(e,t,n){return e.replace(t,n)}function js(e,t){return e.indexOf(t)}function Mt(e,t){return e.charCodeAt(t)|0}function _r(e,t,n){return e.slice(t,n)}function Nn(e){return e.length}function Sh(e){return e.length}function Xo(e,t){return t.push(e),e}function _k(e,t){return e.map(t).join("")}function Vf(e,t){return e.filter(function(n){return!Zn(n,t)})}var Ja=1,ho=1,Eh=0,Rn=0,Et=0,ko="";function es(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ja,column:ho,length:a,return:"",siblings:s}}function pr(e,t){return Ol(es("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function qr(e){for(;e.root;)e=pr(e.root,{children:[e]});Xo(e,e.siblings)}function jk(){return Et}function Bk(){return Et=Rn>0?Mt(ko,--Rn):0,ho--,Et===10&&(ho=1,Ja--),Et}function An(){return Et=Rn<Eh?Mt(ko,Rn++):0,ho++,Et===10&&(ho=1,Ja++),Et}function gr(){return Mt(ko,Rn)}function ia(){return Rn}function ts(e,t){return _r(ko,e,t)}function li(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Hk(e){return Ja=ho=1,Eh=Nn(ko=e),Rn=0,[]}function Vk(e){return ko="",e}function Bs(e){return Ch(ts(Rn-1,Dl(e===91?e+2:e===40?e+1:e)))}function Wk(e){for(;(Et=gr())&&Et<33;)An();return li(e)>2||li(Et)>3?"":" "}function qk(e,t){for(;--t&&An()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return ts(e,ia()+(t<6&&gr()==32&&An()==32))}function Dl(e){for(;An();)switch(Et){case e:return Rn;case 34:case 39:e!==34&&e!==39&&Dl(Et);break;case 40:e===41&&Dl(e);break;case 92:An();break}return Rn}function Xk(e,t){for(;An()&&e+Et!==57;)if(e+Et===84&&gr()===47)break;return"/*"+ts(t,Rn-1)+"*"+ti(e===47?e:An())}function Uk(e){for(;!li(gr());)An();return ts(e,Rn)}function Wf(e){return Vk(aa("",null,null,null,[""],e=Hk(e),0,[0],e))}function aa(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,w=1,y=1,$=0,x=0,E="",v=o,C=i,I=r,N=E;w;)switch(h=x,x=An()){case 40:h!=108&&Mt(N,d-1)==58?($++,N+="("):N+=Bs(x);break;case 41:$--,N+=")";break;case 34:case 39:case 91:N+=Bs(x);break;case 9:case 10:case 13:case 32:if($>0){N+=ti(x);break}N+=Wk(h);break;case 92:N+=qk(ia()-1,7);continue;case 47:switch(gr()){case 42:case 47:Xo(Gk(Xk(An(),ia()),t,n,l),l),(li(h||1)==5||li(gr()||1)==5)&&Nn(N)&&_r(N,-1,void 0)!==" "&&(N+=" ");break;default:N+="/"}break;case 123*m:s[c++]=Nn(N)*y;case 125*m:case 59:case 0:if($>0&&x){N+=ti(x);break}switch(x){case 0:case 125:w=0;case 59+u:y==-1&&(N=He(N,/\f/g,"")),p>0&&(Nn(N)-d||m===0)&&Xo(p>32?Xf(N+";",r,n,d-1,l):Xf(He(N," ","")+";",r,n,d-2,l),l);break;case 59:N+=";";default:if(Xo(I=qf(N,t,n,c,u,o,s,E,v=[],C=[],d,i),i),x===123)if(u===0)aa(N,t,I,I,v,i,d,s,C);else{switch(f){case 99:if(Mt(N,3)===110)break;case 108:if(Mt(N,2)===97)break;default:u=0;case 100:case 109:case 115:}u?aa(e,I,I,r&&Xo(qf(e,I,I,0,0,o,s,E,o,v=[],d,C),C),o,C,d,s,r?v:C):aa(N,I,I,I,[""],C,0,s,C)}}c=u=p=0,m=y=1,E=N="",d=a;break;case 58:d=1+Nn(N),p=h;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Bk()==125)continue}switch(N+=ti(x),x*m){case 38:y=u>0?1:(N+="\f",-1);break;case 44:if($>0)break;s[c++]=(Nn(N)-1)*y,y=1;break;case 64:gr()===45&&(N+=Bs(An())),f=gr(),u=d=Nn(E=N+=Uk(ia())),x++;break;case 45:h===45&&Nn(N)==2&&(m=0)}}return i}function qf(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,p=o===0?i:[""],h=Sh(p),m=0,w=0,y=0;m<r;++m)for(var $=0,x=_r(e,f+1,f=Lk(w=a[m])),E=e;$<h;++$)(E=Ch(w>0?p[$]+" "+x:He(x,/&\f/g,p[$])))&&(l[y++]=E);return es(e,t,n,o===0?Du:s,l,c,u,d)}function Gk(e,t,n,r){return es(e,t,n,wh,ti(jk()),_r(e,2,-2),0,r)}function Xf(e,t,n,r,o){return es(e,t,n,Lu,_r(e,0,r),_r(e,r+1,-1),r,o)}function $h(e,t,n){switch(Fk(e,t)){case 5103:return Je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Je+e+e;case 4855:return Je+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return ei+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Je+e+ei+e+ut+e+e;case 5936:switch(Mt(e,t+11)){case 114:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Je+e+ut+e+e;case 6165:return Je+e+ut+"flex-"+e+e;case 5187:return Je+e+He(e,/(\w+).+(:[^]+)/,Je+"box-$1$2"+ut+"flex-$1$2")+e;case 5443:return Je+e+ut+"flex-item-"+He(e,/flex-|-self/g,"")+(Zn(e,/flex-|baseline/)?"":ut+"grid-row-"+He(e,/flex-|-self/g,""))+e;case 4675:return Je+e+ut+"flex-line-pack"+He(e,/align-content|flex-|-self/g,"")+e;case 5548:return Je+e+ut+He(e,"shrink","negative")+e;case 5292:return Je+e+ut+He(e,"basis","preferred-size")+e;case 6060:return Je+"box-"+He(e,"-grow","")+Je+e+ut+He(e,"grow","positive")+e;case 4554:return Je+He(e,/([^-])(transform)/g,"$1"+Je+"$2")+e;case 6187:return He(He(He(e,/(zoom-|grab)/,Je+"$1"),/(image-set)/,Je+"$1"),e,"")+e;case 5495:case 3959:return He(e,/(image-set\([^]*)/,Je+"$1$`$1");case 4968:return He(He(e,/(.+:)(flex-)?(.*)/,Je+"box-pack:$3"+ut+"flex-pack:$3"),/space-between/,"justify")+Je+e+e;case 4200:if(!Zn(e,/flex-|baseline/))return ut+"grid-column-align"+_r(e,t)+e;break;case 2592:case 3360:return ut+He(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,Zn(r.props,/grid-\w+-end/)})?~js(e+(n=n[t].value),"span")?e:ut+He(e,"-start","")+e+ut+"grid-row-span:"+(~js(n,"span")?Zn(n,/\d+/):+Zn(n,/\d+/)-+Zn(e,/\d+/))+";":ut+He(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Zn(r.props,/grid-\w+-start/)})?e:ut+He(He(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return He(e,/(.+)-inline(.+)/,Je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nn(e)-1-t>6)switch(Mt(e,t+1)){case 109:if(Mt(e,t+4)!==45)break;case 102:return He(e,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+ei+(Mt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~js(e,"stretch")?$h(He(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return He(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,a,s,l,c){return ut+o+":"+i+c+(a?ut+o+"-span:"+(s?l:+l-+i)+c:"")+e});case 4949:if(Mt(e,t+6)===121)return He(e,":",":"+Je)+e;break;case 6444:switch(Mt(e,Mt(e,14)===45?18:11)){case 120:return He(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Je+(Mt(e,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+ut+"$2box$3")+e;case 100:return He(e,":",":"+ut)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return He(e,"scroll-","scroll-snap-")+e}return e}function ci(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Uf(e,t,n,r){switch(e.type){case Dk:if(e.children.length)break;case zk:case Ok:case Lu:return e.return=e.return||e.value;case wh:return"";case vh:return e.return=e.value+"{"+ci(e.children,r)+"}";case Du:if(!Nn(e.value=e.props.join(",")))return""}return Nn(n=ci(e.children,r))?e.return=e.value+"{"+n+"}":""}function Kk(e){var t=Sh(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Yk(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Lu:e.return=$h(e.value,e.length,n);return;case vh:return ci([pr(e,{value:He(e.value,"@","@"+Je)})],r);case Du:if(e.length)return _k(n=e.props,function(o){switch(Zn(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":qr(pr(e,{props:[He(o,/:(read-\w+)/,":"+ei+"$1")]})),qr(pr(e,{props:[o]})),Ol(e,{props:Vf(n,r)});break;case"::placeholder":qr(pr(e,{props:[He(o,/:(plac\w+)/,":"+Je+"input-$1")]})),qr(pr(e,{props:[He(o,/:(plac\w+)/,":"+ei+"$1")]})),qr(pr(e,{props:[He(o,/:(plac\w+)/,ut+"input-$1")]})),qr(pr(e,{props:[o]})),Ol(e,{props:Vf(n,r)});break}return""})}}function kh(e,t){const{path:n,parentSelectors:r}=t;tt(!1,`[Ant Design CSS-in-JS] ${n?`Error in ${n}: `:""}${e}${r.length?` Selector: ${r.join(" | ")}`:""}`)}const Qk=(e,t,n)=>{if(e==="content"){const r=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof t!="string"||["normal","none","initial","inherit","unset"].indexOf(t)===-1&&!r.test(t)&&!t.startsWith("var(")&&(t.charAt(0)!==t.charAt(t.length-1)||t.charAt(0)!=='"'&&t.charAt(0)!=="'"))&&kh(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`,n)}},Zk=(e,t,n)=>{e==="animation"&&n.hashId&&t!=="none"&&kh(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`,n)},Gf="data-ant-cssinjs-cache-path",Ih="_FILE_STYLE__";let Lr,Rh=!0;function Jk(){var e;if(!Lr&&(Lr={},vn())){const t=document.createElement("div");t.className=Gf,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);let n=getComputedStyle(t).content||"";n=n.replace(/^"/,"").replace(/"$/,""),n.split(";").forEach(o=>{const[i,a]=o.split(":");Lr[i]=a});const r=document.querySelector(`style[${Gf}]`);r&&(Rh=!1,(e=r.parentNode)==null||e.removeChild(r)),document.body.removeChild(t)}}function e2(e){return Jk(),!!Lr[e]}function t2(e){const t=Lr[e];let n=null;if(t&&vn())if(Rh)n=Ih;else{const r=document.querySelector(`style[${nr}="${Lr[e]}"]`);r?n=r.innerHTML:delete Lr[e]}return[n,t]}const Ph="_skip_check_",Th="_multi_value_";function Hs(e,t){return(t?ci(Wf(e),Kk([Yk,Uf])):ci(Wf(e),Uf)).replace(/\{%%%\:[^;];}/g,";")}function n2(e){return typeof e=="object"&&e&&(Ph in e||Th in e)}function Kf(e,t,n="high"){if(!t)return e;const r=bh({hashCls:t,hashPriority:n});return e.split(",").map(i=>{var c;const a=i.trim().split(/\s+/);let s=a[0]||"";const l=((c=s.match(/^\w+/))==null?void 0:c[0])||"";return s=`${l}${r}${s.slice(l.length)}`,[s,...a.slice(1)].join(" ")}).join(",")}const Ll=(e,t={},{root:n,injectHash:r,parentSelectors:o}={root:!0,parentSelectors:[]})=>{const{hashId:i,layer:a,path:s,hashPriority:l,transformers:c=[],linters:u=[]}=t;let d="",f={};function p(w){const y=w.getName(i);if(!f[y]){const[$]=Ll(w.style,t,{root:!1,parentSelectors:o});f[y]=`@keyframes ${w.getName(i)}${$}`}}function h(w,y=[]){return w.forEach($=>{Array.isArray($)?h($,y):$&&y.push($)}),y}return h(Array.isArray(e)?e:[e]).forEach(w=>{const y=typeof w=="string"&&!n?{}:w;if(typeof y=="string")d+=`${y}
95
- `;else if(y._keyframe)p(y);else{const $=c.reduce((x,E)=>{var v;return((v=E==null?void 0:E.visit)==null?void 0:v.call(E,x))||x},y);Object.keys($).forEach(x=>{const E=$[x];if(typeof E=="object"&&E&&(x!=="animationName"||!E._keyframe)&&!n2(E)){let v=!1,C=x.trim(),I=!1;(n||r)&&i?C.startsWith("@")?v=!0:C==="&"?C=Kf("",i,l):C=Kf(x,i,l):n&&!i&&(C==="&"||C==="")&&(C="",I=!0);const[N,A]=Ll(E,t,{root:I,injectHash:v,parentSelectors:[...o,C]});f={...f,...A},d+=`${C}${N}`}else{let v=function(I,N){process.env.NODE_ENV!=="production"&&(typeof E!="object"||!(E!=null&&E[Ph]))&&[Qk,Zk,...u].forEach(R=>R(I,N,{path:s,hashId:i,parentSelectors:o}));const A=I.replace(/[A-Z]/g,R=>`-${R.toLowerCase()}`);let k=N;!Ak[I]&&typeof k=="number"&&k!==0&&(k=`${k}px`),I==="animationName"&&(N!=null&&N._keyframe)&&(p(N),k=N.getName(i)),d+=`${A}:${k};`};const C=(E==null?void 0:E.value)??E;typeof E=="object"&&(E!=null&&E[Th])&&Array.isArray(C)?C.forEach(I=>{v(x,I)}):wk(C)&&v(x,C)}})}}),n?a&&(d&&(d=`@layer ${a.name} {${d}}`),a.dependencies&&(f[`@layer ${a.name}`]=a.dependencies.map(w=>`@layer ${w}, ${a.name};`).join(`
96
- `))):d=`{${d}}`,[d,f]};function Nh(e,t){return si(`${e.join("%")}${t}`)}const r2="style";function Fl(e,t){const{path:n,hashId:r,layer:o,nonce:i,clientOnly:a,order:s=0}=e,{mock:l,hashPriority:c,container:u,transformers:d,linters:f,cache:p,layer:h,autoPrefix:m}=g.useContext(wi),w=[r||""];h&&w.push("layer"),w.push(...n);let y=Al;process.env.NODE_ENV!=="production"&&l!==void 0&&(y=l==="client"),Ou(r2,w,()=>{const $=w.join("|");if(e2($)){const[N,A]=t2($);if(N)return[N,A,{},a,s]}const x=t(),[E,v]=Ll(x,{hashId:r,hashPriority:c,layer:h?o:void 0,path:n.join("-"),transformers:d,linters:f}),C=Hs(E,m||!1),I=Nh(w,C);return[C,I,v,a,s]},($,x)=>{const[,E]=$;x&&Al&&ii(E,{mark:nr,attachTo:u})},$=>{const[x,E,v,,C]=$;if(y&&x!==Ih){let I={mark:nr,prepend:h?!1:"queue",attachTo:u,priority:C};I=zu(I,i);const N=[],A=[];Object.keys(v).forEach(R=>{R.startsWith("@layer")?N.push(R):A.push(R)}),N.forEach(R=>{Dr(Hs(v[R],m||!1),`_layer-${R}`,{...I,prepend:!0})});const k=Dr(x,E,I);k[er]=p.instanceId,process.env.NODE_ENV!=="production"&&k.setAttribute(mk,w.join("|")),A.forEach(R=>{Dr(Hs(v[R],m||!1),`_effect-${R}`,I)})}})}const o2="cssVar",i2=(e,t)=>{const{key:n,prefix:r,unitless:o,ignore:i,token:a,hashId:s,scope:l,nonce:c}=e,{cache:{instanceId:u},container:d,hashPriority:f}=b.useContext(wi),{_tokenKey:p}=a,h=Array.isArray(l)?l.join("@@"):l,m=[...e.path,n,h,p];return Ou(o2,m,()=>{const y=t(),[$,x]=xh(y,n,{prefix:r,unitless:o,ignore:i,scope:l,hashPriority:f,hashCls:s}),E=Nh(m,x);return[$,x,E,n]},([,,y])=>{Al&&ii(y,{mark:nr,attachTo:d})},([,y,$])=>{if(!y)return;let x={mark:nr,prepend:"queue",attachTo:d,priority:-999};x=zu(x,c);const E=Dr(y,$,x);E[er]=u,E.setAttribute(Au,n)})};class et{constructor(t,n){J(this,"name");J(this,"style");J(this,"_keyframe",!0);this.name=t,this.style=n}getName(t=""){return t?`${t}-${this.name}`:this.name}}function Xr(e){return e.notSplit=!0,e}Xr(["borderTop","borderBottom"]),Xr(["borderTop"]),Xr(["borderBottom"]),Xr(["borderLeft","borderRight"]),Xr(["borderLeft"]),Xr(["borderRight"]);const Fu=b.createContext({});function Mh(){}const{resetWarned:a2}=tt;let Yn=null;function s2(){Yn=null,a2()}let Ah=Mh;process.env.NODE_ENV!=="production"&&(Ah=(e,t,n)=>{tt(e,`[antd: ${t}] ${n}`),process.env.NODE_ENV==="test"&&s2()});const _u=Ah,zh=g.createContext({}),l2=process.env.NODE_ENV!=="production"?e=>{const{strict:t}=g.useContext(zh),n=(r,o,i)=>{if(!r)if(t===!1&&o==="deprecated"){const a=Yn;Yn||(Yn={}),Yn[e]=Yn[e]||[],Yn[e].includes(i||"")||Yn[e].push(i||""),a||console.warn("[antd] There exists deprecated usage in your code:",Yn)}else process.env.NODE_ENV!=="production"&&_u(r,e,i)};return n.deprecated=(r,o,i,a="")=>{n(r,"deprecated",`\`${o}\` is deprecated. Please use \`${i}\` instead.${a?` ${a}`:""}`)},n}:()=>{const e=()=>{};return e.deprecated=Mh,e},At=l2,_l=g.createContext(null);function c2({children:e,onBatchResize:t}){const n=g.useRef(0),r=g.useRef([]),o=g.useContext(_l),i=g.useCallback((a,s,l)=>{n.current+=1;const c=n.current;r.current.push({size:a,element:s,data:l}),Promise.resolve().then(()=>{c===n.current&&(t==null||t(r.current),r.current=[])}),o==null||o(a,s,l)},[t,o]);return g.createElement(_l.Provider,{value:i},e)}const tr=new Map;function Oh(e){e.forEach(t=>{var r;const{target:n}=t;(r=tr.get(n))==null||r.forEach(o=>o(n))})}let Vs;function Dh(){return Vs||(Vs=new ResizeObserver(Oh)),Vs}process.env.NODE_ENV;process.env.NODE_ENV;function u2(e,t){tr.has(e)||(tr.set(e,new Set),Dh().observe(e)),tr.get(e).add(t)}function d2(e,t){tr.has(e)&&(tr.get(e).delete(t),tr.get(e).size||(Dh().unobserve(e),tr.delete(e)))}function Lh(e,t,n,r){const o=g.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),i=Ge(l=>{const{width:c,height:u}=l.getBoundingClientRect(),{offsetWidth:d,offsetHeight:f}=l,p=Math.floor(c),h=Math.floor(u);if(o.current.width!==p||o.current.height!==h||o.current.offsetWidth!==d||o.current.offsetHeight!==f){const m={width:p,height:h,offsetWidth:d,offsetHeight:f};o.current=m;const w=d===Math.round(c)?c:d,y=f===Math.round(u)?u:f,$={...m,offsetWidth:w,offsetHeight:y};r==null||r($,l),Promise.resolve().then(()=>{n==null||n($,l)})}}),a=typeof t=="function",s=g.useRef(0);g.useEffect(()=>{const l=a?t():t;return l&&e?u2(l,i):e&&a&&(s.current+=1),()=>{l&&d2(l,i)}},[e,a?s.current:t])}function f2(e,t){const{children:n,disabled:r,onResize:o,data:i}=e,a=g.useRef(null),s=g.useContext(_l),l=typeof n=="function",c=l?n(a):n,u=!l&&g.isValidElement(c)&&$o(c),d=u?cr(c):null,f=Hr(d,a),p=()=>$u(a.current);return g.useImperativeHandle(t,()=>p()),Lh(!r,p,o,(h,m)=>{s==null||s(h,m,i)}),u?g.cloneElement(c,{ref:f}):c}const Fh=g.forwardRef(f2);process.env.NODE_ENV!=="production"&&(Fh.displayName="SingleObserver");function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jl.apply(this,arguments)}const p2="rc-observer-key";function m2(e,t){const{children:n}=e,r=typeof n=="function"?[n]:or(n);return process.env.NODE_ENV!=="production"&&(r.length>1?xa(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&xa(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map((o,i)=>{const a=(o==null?void 0:o.key)||`${p2}-${i}`;return g.createElement(Fh,jl({},e,{key:a,ref:i===0?t:void 0}),o)})}const Io=g.forwardRef(m2);process.env.NODE_ENV!=="production"&&(Io.displayName="ResizeObserver");Io.Collection=c2;function Bl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g2(e){if(Array.isArray(e))return Bl(e)}function h2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _h(e,t){if(e){if(typeof e=="string")return Bl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bl(e,t):void 0}}function b2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
97
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jr(e){return g2(e)||h2(e)||_h(e)||b2()}const va="ant",ju="anticon",x2=["outlined","borderless","filled","underlined"],y2=(e,t)=>t||(e?`${va}-${e}`:va),dt=g.createContext({getPrefixCls:y2,iconPrefixCls:ju}),{Consumer:G5}=dt,Yf={};function Kn(e){const t=g.useContext(dt),{getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}=t,a=t[e];return{classNames:Yf,styles:Yf,...a,getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}}function On(e){"@babel/helpers - typeof";return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(e)}function w2(e){if(Array.isArray(e))return e}function v2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function C2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
98
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jh(e,t){return w2(e)||v2(e,t)||_h(e,t)||C2()}function S2(e,t){if(On(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(On(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bh(e){var t=S2(e,"string");return On(t)=="symbol"?t:t+""}function Xn(e,t,n){return(t=Bh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qf(Object(n),!0).forEach(function(r){Xn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ns(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bh(r.key),r)}}function rs(e,t,n){return t&&E2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hl(e,t){return Hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hl(e,t)}function $2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hl(e,t)}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}function Hh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hh=function(){return!!e})()}function k2(e,t){if(t&&(On(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sa(e)}function I2(e){var t=Hh();return function(){var n,r=Ca(e);if(t){var o=Ca(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k2(this,n)}}var R2=rs(function e(){ns(this,e)}),Vh="CALC_UNIT",P2=new RegExp(Vh,"g");function Ws(e){return typeof e=="number"?"".concat(e).concat(Vh):e}var T2=function(e){$2(n,e);var t=I2(n);function n(r,o){var i;ns(this,n),i=t.call(this),Xn(sa(i),"result",""),Xn(sa(i),"unitlessCssVar",void 0),Xn(sa(i),"lowPriority",void 0);var a=On(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=Ws(r):a==="string"&&(i.result=r),i}return rs(n,[{key:"add",value:function(o){return o instanceof n?this.result="".concat(this.result," + ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," + ").concat(Ws(o))),this.lowPriority=!0,this}},{key:"sub",value:function(o){return o instanceof n?this.result="".concat(this.result," - ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," - ").concat(Ws(o))),this.lowPriority=!0,this}},{key:"mul",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," * ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," * ").concat(o)),this.lowPriority=!1,this}},{key:"div",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," / ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," / ").concat(o)),this.lowPriority=!1,this}},{key:"getResult",value:function(o){return this.lowPriority||o?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(o){var i=this,a=o||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=!1),this.result=this.result.replace(P2,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(R2),N2=function(t,n){var r=T2;return function(o){return new r(o,n)}},Zf=function(t,n){return"".concat([n,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Jf(e,t,n,r){var o=cn({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=jh(s,2),c=l[0],u=l[1];if(process.env.NODE_ENV!=="production"&&tt(!(o!=null&&o[c]),"Component Token `".concat(String(c),"` of ").concat(String(e)," is deprecated. Please use `").concat(String(u),"` instead.")),o!=null&&o[c]||o!=null&&o[u]){var d;(d=o[u])!==null&&d!==void 0||(o[u]=o==null?void 0:o[c])}})}var a=cn(cn({},n),o);return Object.keys(a).forEach(function(s){a[s]===t[s]&&delete a[s]}),a}var Wh=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",Vl=!0;function yt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!Wh)return Object.assign.apply(Object,[{}].concat(t));Vl=!1;var r={};return t.forEach(function(o){if(On(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),Vl=!0,r}var ep={};function M2(){}var A2=function(t){var n,r=t,o=M2;return Wh&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,s){if(Vl){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;ep[a]={global:Array.from(n),component:cn(cn({},(l=ep[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function tp(e,t,n){if(typeof n=="function"){var r;return n(yt(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function z2(e){return{max:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"max(".concat(r.map(function(i){return xe(i)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"min(".concat(r.map(function(i){return xe(i)}).join(","),")")}}}var O2=1e3*60*10,D2=function(){function e(){ns(this,e),Xn(this,"map",new Map),Xn(this,"objectIDMap",new WeakMap),Xn(this,"nextID",0),Xn(this,"lastAccessBeat",new Map),Xn(this,"accessBeat",0)}return rs(e,[{key:"set",value:function(n,r){this.clear();var o=this.getCompositeKey(n);this.map.set(o,r),this.lastAccessBeat.set(o,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),o=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,o}},{key:"getCompositeKey",value:function(n){var r=this,o=n.map(function(i){return i&&On(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(On(i),"_").concat(i)});return o.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>O2&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),np=new D2;function L2(e,t){return b.useMemo(function(){var n=np.get(t);if(n)return n;var r=e();return np.set(t,r),r},t)}var F2=function(){return{}};function qh(e){var t=e.useCSP,n=t===void 0?F2:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(f,p,h,m){var w=Array.isArray(f)?f[0]:f;function y(N){return"".concat(String(w)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var $=(m==null?void 0:m.unitless)||{},x=typeof s=="function"?s(f):{},E=cn(cn({},x),{},Xn({},y("zIndexPopup"),!0));Object.keys($).forEach(function(N){E[y(N)]=$[N]});var v=cn(cn({},m),{},{unitless:E,prefixToken:y}),C=u(f,p,h,v),I=c(w,h,v);return function(N){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,k=C(N,A),R=m==null?void 0:m.extraCssVarPrefixCls,O=typeof R=="function"?R({prefixCls:N,rootCls:A}):R,z=I(O!=null&&O.length?[A].concat(jr(O)):A);return[k,z]}}function c(f,p,h){var m=h.unitless,w=h.prefixToken,y=h.ignore;return function($){var x=r(),E=x.cssVar,v=x.realToken,C=n();return i2({path:[f],prefix:E.prefix,key:E.key,unitless:m,ignore:y,token:v,scope:$,nonce:function(){return C.nonce}},function(){var I=tp(f,v,p),N=Jf(f,v,I,{deprecatedTokens:h==null?void 0:h.deprecatedTokens});return I&&Object.keys(I).forEach(function(A){N[w(A)]=N[A],delete N[A]}),N}),E==null?void 0:E.key}}function u(f,p,h){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=Array.isArray(f)?f:[f,f],y=jh(w,1),$=y[0],x=w.join("-"),E=e.layer||{name:"antd"};return function(v){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v,I=r(),N=I.theme,A=I.realToken,k=I.hashId,R=I.token,O=I.cssVar,z=I.zeroRuntime,D=b.useMemo(function(){return z},[]);if(D)return k;var M=o(),L=M.rootPrefixCls,_=M.iconPrefixCls,V=n(),X="css",P=L2(function(){var F=new Set;return Object.keys(m.unitless||{}).forEach(function(U){F.add(oa(U,O.prefix)),F.add(oa(U,Zf($,O.prefix)))}),N2(X,F)},[X,$,O==null?void 0:O.prefix]),Y=z2(),K=Y.max,T=Y.min,ne={theme:N,token:R,hashId:k,nonce:function(){return V.nonce},clientOnly:m.clientOnly,layer:E,order:m.order||-999};return typeof i=="function"&&Fl(cn(cn({},ne),{},{clientOnly:!1,path:["Shared",L]}),function(){return i(R,{prefix:{rootPrefixCls:L,iconPrefixCls:_},csp:V})}),Fl(cn(cn({},ne),{},{path:[x,v,_]}),function(){if(m.injectStyle===!1)return[];var F=A2(R),U=F.token,re=F.flush,j=tp($,A,h),H=".".concat(v),ee=Jf($,A,j,{deprecatedTokens:m.deprecatedTokens});j&&On(j)==="object"&&Object.keys(j).forEach(function(ae){j[ae]="var(".concat(oa(ae,Zf($,O.prefix)),")")});var oe=yt(U,{componentCls:H,prefixCls:v,iconCls:".".concat(_),antCls:".".concat(L),calc:P,max:K,min:T},j),B=p(oe,{hashId:k,prefixCls:v,rootPrefixCls:L,iconPrefixCls:_});re($,ee);var ie=typeof a=="function"?a(oe,v,C,m.resetFont):null;return[m.resetStyle===!1?null:ie,B]}),k}}function d(f,p,h){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=u(f,p,h,cn({resetStyle:!1,order:-998},m)),y=function(x){var E=x.prefixCls,v=x.rootCls,C=v===void 0?E:v;return w(E,C),null};return process.env.NODE_ENV!=="production"&&(y.displayName="SubStyle_".concat(String(Array.isArray(f)?f.join("."):f))),y}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const xr=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function la(e){return(e+8)/e}function _2(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.E**(o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:la(n)}))}const j2="6.6.4",Xh={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},ui={...Xh,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
94
+ onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,sk=`${ik} ${ak}`.split(/[\s\n]+/),lk="aria-",ck="data-";function _f(e,t){return e.indexOf(t)===0}function uk(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||_f(o,lk))||n.data&&_f(o,ck)||n.attr&&sk.includes(o))&&(r[o]=e[o])}),r}function hg(e,t){return b.useImperativeHandle(e,()=>{const n=t(),{nativeElement:r}=n;return new Proxy(r,{get(o,i){return n[i]?n[i]:Reflect.get(o,i)}})})}const dk=b.createContext({}),fk={classNames:{},styles:{},className:"",style:{},shortcutKeys:{}},Mu=e=>{const t=b.useContext(dk);return b.useMemo(()=>({...fk,...t[e]}),[t[e]])};function si(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}const pk="%";function Nl(e){return e.join(pk)}let jf=0;class mk{constructor(t){te(this,"instanceId");te(this,"cache",new Map);te(this,"updateTimes",new Map);te(this,"extracted",new Set);this.instanceId=t}get(t){return this.opGet(Nl(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(Nl(t),n)}opUpdate(t,n){const r=this.cache.get(t),o=n(r);o===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,o),this.updateTimes.set(t,jf),jf+=1)}}const Au="data-token-hash",nr="data-css-hash",hk="data-cache-path",er="__cssinjs_instance__";function gk(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${nr}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(o=>{o[er]||(o[er]=e),o[er]===e&&document.head.insertBefore(o,n)});const r={};Array.from(document.querySelectorAll(`style[${nr}]`)).forEach(o=>{var a;const i=o.getAttribute(nr);r[i]?o[er]===e&&((a=o.parentNode)==null||a.removeChild(o)):r[i]=!0})}return new mk(e)}const wi=h.createContext({hashPriority:"low",cache:gk(),defaultCache:!0,autoPrefix:!1});function bk(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const co=class co{constructor(){te(this,"cache");te(this,"keys");te(this,"cacheCallTimes");this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t,n=!1){let r={map:this.cache};return t.forEach(o=>{var i;r?r=(i=r==null?void 0:r.map)==null?void 0:i.get(o):r=void 0}),r!=null&&r.value&&n&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(t){var n;return(n=this.internalGet(t,!0))==null?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>co.MAX_CACHE_SIZE+co.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((i,a)=>{const[,s]=i;return this.internalGet(a)[1]<s?[a,this.internalGet(a)[1]]:i},[this.keys[0],this.cacheCallTimes]);this.delete(o)}this.keys.push(t)}let r=this.cache;t.forEach((o,i)=>{if(i===t.length-1)r.set(o,{value:[n,this.cacheCallTimes++]});else{const a=r.get(o);a?a.map||(a.map=new Map):r.set(o,{map:new Map}),r=r.get(o).map}})}deleteByPath(t,n){var i;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(i=r.value)==null?void 0:i[0];const o=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),o}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!bk(n,t)),this.deleteByPath(this.cache,t)}};te(co,"MAX_CACHE_SIZE",20),te(co,"MAX_CACHE_OFFSET",5);let Ml=co,Bf=0;class gg{constructor(t){te(this,"derivatives");te(this,"id");this.derivatives=Array.isArray(t)?t:[t],this.id=Bf,t.length===0&&xa(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Bf+=1}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const Fs=new Ml;function wa(e){const t=Array.isArray(e)?e:[e];return Fs.has(t)||Fs.set(t,new gg(t)),Fs.get(t)}const xk=new WeakMap,_s={};function yk(e,t){let n=xk;for(let r=0;r<t.length;r+=1){const o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(_s)||n.set(_s,e()),n.get(_s)}const Hf=new WeakMap;function Jo(e){let t=Hf.get(e)||"";return t||(Object.keys(e).forEach(n=>{const r=e[n];t+=n,r instanceof gg?t+=r.id:r&&typeof r=="object"?t+=Jo(r):t+=r}),t=si(t),Hf.set(e,t)),t}function wk(e,t){return si(`${t}_${Jo(e)}`)}const Al=vn();function ye(e){return typeof e=="number"?`${e}px`:e}function bg(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return"";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const vk=e=>e!=null;function zu(e,t){const n=typeof t=="function"?t():t;return n?{...e,csp:{...e.csp,nonce:n}}:e}const oa=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),Ck=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",scope:i}=n||{};if(!Object.keys(e).length)return"";const a=`${bg({hashCls:r,hashPriority:o})}.${t}`,s=[i].flat().filter(Boolean);return`${s.length?s.map(c=>`${a}.${c}`).join(", "):a}{${Object.entries(e).map(([c,u])=>`${c}:${u};`).join("")}}`},xg=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",prefix:i,unitless:a,ignore:s,preserve:l}=n||{},c={},u={};return Object.entries(e).forEach(([d,f])=>{if(l!=null&&l[d])u[d]=f;else if((typeof f=="string"||typeof f=="number")&&!(s!=null&&s[d])){const p=oa(d,i);c[p]=typeof f=="number"&&!(a!=null&&a[d])?`${f}px`:String(f),u[d]=`var(${p})`}}),[u,Ck(c,t,{scope:n==null?void 0:n.scope,hashCls:r,hashPriority:o})]};function Sk(){return!1}let zl=!1;function Ek(){return zl}const $k=process.env.NODE_ENV==="production"?Sk:Ek;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(e&&typeof e.webpackHotUpdate=="function"){const t=e.webpackHotUpdate;e.webpackHotUpdate=(...n)=>(zl=!0,setTimeout(()=>{zl=!1},0),t(...n))}}const Wi=new Map;function Ou(e,t,n,r,o){const{cache:i}=h.useContext(wi),a=[e,...t],s=Nl(a),l=$k(),c=f=>{i.opUpdate(s,p=>{const[g=0,m]=p||[void 0,void 0];let w=m;process.env.NODE_ENV!=="production"&&m&&l&&(r==null||r(w,l),w=null);const y=w||n(),$=[g,y];return f?f($):$})};h.useMemo(()=>{c()},[s]);let u=i.opGet(s);process.env.NODE_ENV!=="production"&&!u&&(c(),u=i.opGet(s));const d=u[1];return b.useInsertionEffect(()=>(c(([f,p])=>[f+1,p]),Wi.has(s)||(o==null||o(d),Wi.set(s,!0),Promise.resolve().then(()=>{Wi.delete(s)})),()=>{i.opUpdate(s,f=>{const[p=0,g]=f||[];return p-1===0?(r==null||r(g,!1),Wi.delete(s),null):[p-1,g]})}),[s]),d}const kk={},Ik=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Ar=new Map;function Rk(e){Ar.set(e,(Ar.get(e)||0)+1)}function Tk(e,t){typeof document<"u"&&document.querySelectorAll(`style[${Au}="${e}"]`).forEach(r=>{var o;r[er]===t&&((o=r.parentNode)==null||o.removeChild(r))})}const Pk=-1;function Nk(e,t){Ar.set(e,(Ar.get(e)||0)-1);const n=new Set;Ar.forEach((r,o)=>{r<=0&&n.add(o)}),Ar.size-n.size>Pk&&n.forEach(r=>{Tk(r,t),Ar.delete(r)})}const Mk=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},Ak="token";function yg(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=b.useContext(wi),{salt:a="",override:s=kk,formatToken:l,getComputedToken:c,cssVar:u,nonce:d}=n,f=yk(()=>Object.assign({},...t),t),p=Jo(f),g=Jo(s),m=Jo(u);return Ou(Ak,[a,e.id,p,g,m],()=>{const y=c?c(f,s,e):Mk(f,s,e,l),$={...y},x=`${a}_${u.prefix}`,E=si(x),C=`${Ik}-${E}`;$._tokenKey=wk($,x);const[v,T]=xg(y,u.key,{prefix:u.prefix,ignore:u.ignore,unitless:u.unitless,preserve:u.preserve,hashPriority:i,hashCls:u.hashed?C:void 0});return v._hashId=E,Rk(u.key),[v,C,$,T,u.key]},([,,,,y])=>{Nk(y,r)},([,,,y,$])=>{if(!y)return;let x={mark:nr,prepend:"queue",attachTo:o,priority:-999};x=zu(x,d);const E=Dr(y,si(`css-var-${$}`),x);E[er]=r,E.setAttribute(Au,$)})}var zk={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ut="-ms-",ei="-moz-",Je="-webkit-",wg="comm",Du="rule",Lu="decl",Ok="@import",Dk="@namespace",vg="@keyframes",Lk="@layer",Fk=Math.abs,ti=String.fromCharCode,Ol=Object.assign;function _k(e,t){return Mt(e,0)^45?(((t<<2^Mt(e,0))<<2^Mt(e,1))<<2^Mt(e,2))<<2^Mt(e,3):0}function Cg(e){return e.trim()}function Zn(e,t){return(e=t.exec(e))?e[0]:e}function He(e,t,n){return e.replace(t,n)}function js(e,t){return e.indexOf(t)}function Mt(e,t){return e.charCodeAt(t)|0}function _r(e,t,n){return e.slice(t,n)}function Nn(e){return e.length}function Sg(e){return e.length}function Xo(e,t){return t.push(e),e}function jk(e,t){return e.map(t).join("")}function Vf(e,t){return e.filter(function(n){return!Zn(n,t)})}var Ja=1,go=1,Eg=0,Rn=0,Et=0,ko="";function es(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ja,column:go,length:a,return:"",siblings:s}}function pr(e,t){return Ol(es("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function qr(e){for(;e.root;)e=pr(e.root,{children:[e]});Xo(e,e.siblings)}function Bk(){return Et}function Hk(){return Et=Rn>0?Mt(ko,--Rn):0,go--,Et===10&&(go=1,Ja--),Et}function An(){return Et=Rn<Eg?Mt(ko,Rn++):0,go++,Et===10&&(go=1,Ja++),Et}function hr(){return Mt(ko,Rn)}function ia(){return Rn}function ts(e,t){return _r(ko,e,t)}function li(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Vk(e){return Ja=go=1,Eg=Nn(ko=e),Rn=0,[]}function Wk(e){return ko="",e}function Bs(e){return Cg(ts(Rn-1,Dl(e===91?e+2:e===40?e+1:e)))}function qk(e){for(;(Et=hr())&&Et<33;)An();return li(e)>2||li(Et)>3?"":" "}function Xk(e,t){for(;--t&&An()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return ts(e,ia()+(t<6&&hr()==32&&An()==32))}function Dl(e){for(;An();)switch(Et){case e:return Rn;case 34:case 39:e!==34&&e!==39&&Dl(Et);break;case 40:e===41&&Dl(e);break;case 92:An();break}return Rn}function Uk(e,t){for(;An()&&e+Et!==57;)if(e+Et===84&&hr()===47)break;return"/*"+ts(t,Rn-1)+"*"+ti(e===47?e:An())}function Gk(e){for(;!li(hr());)An();return ts(e,Rn)}function Wf(e){return Wk(aa("",null,null,null,[""],e=Vk(e),0,[0],e))}function aa(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,g=0,m=1,w=1,y=1,$=0,x=0,E="",C=o,v=i,T=r,R=E;w;)switch(g=x,x=An()){case 40:g!=108&&Mt(R,d-1)==58?($++,R+="("):R+=Bs(x);break;case 41:$--,R+=")";break;case 34:case 39:case 91:R+=Bs(x);break;case 9:case 10:case 13:case 32:if($>0){R+=ti(x);break}R+=qk(g);break;case 92:R+=Xk(ia()-1,7);continue;case 47:switch(hr()){case 42:case 47:Xo(Kk(Uk(An(),ia()),t,n,l),l),(li(g||1)==5||li(hr()||1)==5)&&Nn(R)&&_r(R,-1,void 0)!==" "&&(R+=" ");break;default:R+="/"}break;case 123*m:s[c++]=Nn(R)*y;case 125*m:case 59:case 0:if($>0&&x){R+=ti(x);break}switch(x){case 0:case 125:w=0;case 59+u:y==-1&&(R=He(R,/\f/g,"")),p>0&&(Nn(R)-d||m===0)&&Xo(p>32?Xf(R+";",r,n,d-1,l):Xf(He(R," ","")+";",r,n,d-2,l),l);break;case 59:R+=";";default:if(Xo(T=qf(R,t,n,c,u,o,s,E,C=[],v=[],d,i),i),x===123)if(u===0)aa(R,t,T,T,C,i,d,s,v);else{switch(f){case 99:if(Mt(R,3)===110)break;case 108:if(Mt(R,2)===97)break;default:u=0;case 100:case 109:case 115:}u?aa(e,T,T,r&&Xo(qf(e,T,T,0,0,o,s,E,o,C=[],d,v),v),o,v,d,s,r?C:v):aa(R,T,T,T,[""],v,0,s,v)}}c=u=p=0,m=y=1,E=R="",d=a;break;case 58:d=1+Nn(R),p=g;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Hk()==125)continue}switch(R+=ti(x),x*m){case 38:y=u>0?1:(R+="\f",-1);break;case 44:if($>0)break;s[c++]=(Nn(R)-1)*y,y=1;break;case 64:hr()===45&&(R+=Bs(An())),f=hr(),u=d=Nn(E=R+=Gk(ia())),x++;break;case 45:g===45&&Nn(R)==2&&(m=0)}}return i}function qf(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,p=o===0?i:[""],g=Sg(p),m=0,w=0,y=0;m<r;++m)for(var $=0,x=_r(e,f+1,f=Fk(w=a[m])),E=e;$<g;++$)(E=Cg(w>0?p[$]+" "+x:He(x,/&\f/g,p[$])))&&(l[y++]=E);return es(e,t,n,o===0?Du:s,l,c,u,d)}function Kk(e,t,n,r){return es(e,t,n,wg,ti(Bk()),_r(e,2,-2),0,r)}function Xf(e,t,n,r,o){return es(e,t,n,Lu,_r(e,0,r),_r(e,r+1,-1),r,o)}function $g(e,t,n){switch(_k(e,t)){case 5103:return Je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Je+e+e;case 4855:return Je+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return ei+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Je+e+ei+e+ut+e+e;case 5936:switch(Mt(e,t+11)){case 114:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Je+e+ut+e+e;case 6165:return Je+e+ut+"flex-"+e+e;case 5187:return Je+e+He(e,/(\w+).+(:[^]+)/,Je+"box-$1$2"+ut+"flex-$1$2")+e;case 5443:return Je+e+ut+"flex-item-"+He(e,/flex-|-self/g,"")+(Zn(e,/flex-|baseline/)?"":ut+"grid-row-"+He(e,/flex-|-self/g,""))+e;case 4675:return Je+e+ut+"flex-line-pack"+He(e,/align-content|flex-|-self/g,"")+e;case 5548:return Je+e+ut+He(e,"shrink","negative")+e;case 5292:return Je+e+ut+He(e,"basis","preferred-size")+e;case 6060:return Je+"box-"+He(e,"-grow","")+Je+e+ut+He(e,"grow","positive")+e;case 4554:return Je+He(e,/([^-])(transform)/g,"$1"+Je+"$2")+e;case 6187:return He(He(He(e,/(zoom-|grab)/,Je+"$1"),/(image-set)/,Je+"$1"),e,"")+e;case 5495:case 3959:return He(e,/(image-set\([^]*)/,Je+"$1$`$1");case 4968:return He(He(e,/(.+:)(flex-)?(.*)/,Je+"box-pack:$3"+ut+"flex-pack:$3"),/space-between/,"justify")+Je+e+e;case 4200:if(!Zn(e,/flex-|baseline/))return ut+"grid-column-align"+_r(e,t)+e;break;case 2592:case 3360:return ut+He(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,Zn(r.props,/grid-\w+-end/)})?~js(e+(n=n[t].value),"span")?e:ut+He(e,"-start","")+e+ut+"grid-row-span:"+(~js(n,"span")?Zn(n,/\d+/):+Zn(n,/\d+/)-+Zn(e,/\d+/))+";":ut+He(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Zn(r.props,/grid-\w+-start/)})?e:ut+He(He(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return He(e,/(.+)-inline(.+)/,Je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nn(e)-1-t>6)switch(Mt(e,t+1)){case 109:if(Mt(e,t+4)!==45)break;case 102:return He(e,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+ei+(Mt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~js(e,"stretch")?$g(He(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return He(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,a,s,l,c){return ut+o+":"+i+c+(a?ut+o+"-span:"+(s?l:+l-+i)+c:"")+e});case 4949:if(Mt(e,t+6)===121)return He(e,":",":"+Je)+e;break;case 6444:switch(Mt(e,Mt(e,14)===45?18:11)){case 120:return He(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Je+(Mt(e,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+ut+"$2box$3")+e;case 100:return He(e,":",":"+ut)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return He(e,"scroll-","scroll-snap-")+e}return e}function ci(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Uf(e,t,n,r){switch(e.type){case Lk:if(e.children.length)break;case Ok:case Dk:case Lu:return e.return=e.return||e.value;case wg:return"";case vg:return e.return=e.value+"{"+ci(e.children,r)+"}";case Du:if(!Nn(e.value=e.props.join(",")))return""}return Nn(n=ci(e.children,r))?e.return=e.value+"{"+n+"}":""}function Yk(e){var t=Sg(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Qk(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Lu:e.return=$g(e.value,e.length,n);return;case vg:return ci([pr(e,{value:He(e.value,"@","@"+Je)})],r);case Du:if(e.length)return jk(n=e.props,function(o){switch(Zn(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":qr(pr(e,{props:[He(o,/:(read-\w+)/,":"+ei+"$1")]})),qr(pr(e,{props:[o]})),Ol(e,{props:Vf(n,r)});break;case"::placeholder":qr(pr(e,{props:[He(o,/:(plac\w+)/,":"+Je+"input-$1")]})),qr(pr(e,{props:[He(o,/:(plac\w+)/,":"+ei+"$1")]})),qr(pr(e,{props:[He(o,/:(plac\w+)/,ut+"input-$1")]})),qr(pr(e,{props:[o]})),Ol(e,{props:Vf(n,r)});break}return""})}}function kg(e,t){const{path:n,parentSelectors:r}=t;tt(!1,`[Ant Design CSS-in-JS] ${n?`Error in ${n}: `:""}${e}${r.length?` Selector: ${r.join(" | ")}`:""}`)}const Zk=(e,t,n)=>{if(e==="content"){const r=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof t!="string"||["normal","none","initial","inherit","unset"].indexOf(t)===-1&&!r.test(t)&&!t.startsWith("var(")&&(t.charAt(0)!==t.charAt(t.length-1)||t.charAt(0)!=='"'&&t.charAt(0)!=="'"))&&kg(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`,n)}},Jk=(e,t,n)=>{e==="animation"&&n.hashId&&t!=="none"&&kg(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`,n)},Gf="data-ant-cssinjs-cache-path",Ig="_FILE_STYLE__";let Lr,Rg=!0;function e2(){var e;if(!Lr&&(Lr={},vn())){const t=document.createElement("div");t.className=Gf,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);let n=getComputedStyle(t).content||"";n=n.replace(/^"/,"").replace(/"$/,""),n.split(";").forEach(o=>{const[i,a]=o.split(":");Lr[i]=a});const r=document.querySelector(`style[${Gf}]`);r&&(Rg=!1,(e=r.parentNode)==null||e.removeChild(r)),document.body.removeChild(t)}}function t2(e){return e2(),!!Lr[e]}function n2(e){const t=Lr[e];let n=null;if(t&&vn())if(Rg)n=Ig;else{const r=document.querySelector(`style[${nr}="${Lr[e]}"]`);r?n=r.innerHTML:delete Lr[e]}return[n,t]}const Tg="_skip_check_",Pg="_multi_value_";function Hs(e,t){return(t?ci(Wf(e),Yk([Qk,Uf])):ci(Wf(e),Uf)).replace(/\{%%%\:[^;];}/g,";")}function r2(e){return typeof e=="object"&&e&&(Tg in e||Pg in e)}function Kf(e,t,n="high"){if(!t)return e;const r=bg({hashCls:t,hashPriority:n});return e.split(",").map(i=>{var c;const a=i.trim().split(/\s+/);let s=a[0]||"";const l=((c=s.match(/^\w+/))==null?void 0:c[0])||"";return s=`${l}${r}${s.slice(l.length)}`,[s,...a.slice(1)].join(" ")}).join(",")}const Ll=(e,t={},{root:n,injectHash:r,parentSelectors:o}={root:!0,parentSelectors:[]})=>{const{hashId:i,layer:a,path:s,hashPriority:l,transformers:c=[],linters:u=[]}=t;let d="",f={};function p(w){const y=w.getName(i);if(!f[y]){const[$]=Ll(w.style,t,{root:!1,parentSelectors:o});f[y]=`@keyframes ${w.getName(i)}${$}`}}function g(w,y=[]){return w.forEach($=>{Array.isArray($)?g($,y):$&&y.push($)}),y}return g(Array.isArray(e)?e:[e]).forEach(w=>{const y=typeof w=="string"&&!n?{}:w;if(typeof y=="string")d+=`${y}
95
+ `;else if(y._keyframe)p(y);else{const $=c.reduce((x,E)=>{var C;return((C=E==null?void 0:E.visit)==null?void 0:C.call(E,x))||x},y);Object.keys($).forEach(x=>{const E=$[x];if(typeof E=="object"&&E&&(x!=="animationName"||!E._keyframe)&&!r2(E)){let C=!1,v=x.trim(),T=!1;(n||r)&&i?v.startsWith("@")?C=!0:v==="&"?v=Kf("",i,l):v=Kf(x,i,l):n&&!i&&(v==="&"||v==="")&&(v="",T=!0);const[R,A]=Ll(E,t,{root:T,injectHash:C,parentSelectors:[...o,v]});f={...f,...A},d+=`${v}${R}`}else{let C=function(T,R){process.env.NODE_ENV!=="production"&&(typeof E!="object"||!(E!=null&&E[Tg]))&&[Zk,Jk,...u].forEach(N=>N(T,R,{path:s,hashId:i,parentSelectors:o}));const A=T.replace(/[A-Z]/g,N=>`-${N.toLowerCase()}`);let k=R;!zk[T]&&typeof k=="number"&&k!==0&&(k=`${k}px`),T==="animationName"&&(R!=null&&R._keyframe)&&(p(R),k=R.getName(i)),d+=`${A}:${k};`};const v=(E==null?void 0:E.value)??E;typeof E=="object"&&(E!=null&&E[Pg])&&Array.isArray(v)?v.forEach(T=>{C(x,T)}):vk(v)&&C(x,v)}})}}),n?a&&(d&&(d=`@layer ${a.name} {${d}}`),a.dependencies&&(f[`@layer ${a.name}`]=a.dependencies.map(w=>`@layer ${w}, ${a.name};`).join(`
96
+ `))):d=`{${d}}`,[d,f]};function Ng(e,t){return si(`${e.join("%")}${t}`)}const o2="style";function Fl(e,t){const{path:n,hashId:r,layer:o,nonce:i,clientOnly:a,order:s=0}=e,{mock:l,hashPriority:c,container:u,transformers:d,linters:f,cache:p,layer:g,autoPrefix:m}=h.useContext(wi),w=[r||""];g&&w.push("layer"),w.push(...n);let y=Al;process.env.NODE_ENV!=="production"&&l!==void 0&&(y=l==="client"),Ou(o2,w,()=>{const $=w.join("|");if(t2($)){const[R,A]=n2($);if(R)return[R,A,{},a,s]}const x=t(),[E,C]=Ll(x,{hashId:r,hashPriority:c,layer:g?o:void 0,path:n.join("-"),transformers:d,linters:f}),v=Hs(E,m||!1),T=Ng(w,v);return[v,T,C,a,s]},($,x)=>{const[,E]=$;x&&Al&&ii(E,{mark:nr,attachTo:u})},$=>{const[x,E,C,,v]=$;if(y&&x!==Ig){let T={mark:nr,prepend:g?!1:"queue",attachTo:u,priority:v};T=zu(T,i);const R=[],A=[];Object.keys(C).forEach(N=>{N.startsWith("@layer")?R.push(N):A.push(N)}),R.forEach(N=>{Dr(Hs(C[N],m||!1),`_layer-${N}`,{...T,prepend:!0})});const k=Dr(x,E,T);k[er]=p.instanceId,process.env.NODE_ENV!=="production"&&k.setAttribute(hk,w.join("|")),A.forEach(N=>{Dr(Hs(C[N],m||!1),`_effect-${N}`,T)})}})}const i2="cssVar",a2=(e,t)=>{const{key:n,prefix:r,unitless:o,ignore:i,token:a,hashId:s,scope:l,nonce:c}=e,{cache:{instanceId:u},container:d,hashPriority:f}=b.useContext(wi),{_tokenKey:p}=a,g=Array.isArray(l)?l.join("@@"):l,m=[...e.path,n,g,p];return Ou(i2,m,()=>{const y=t(),[$,x]=xg(y,n,{prefix:r,unitless:o,ignore:i,scope:l,hashPriority:f,hashCls:s}),E=Ng(m,x);return[$,x,E,n]},([,,y])=>{Al&&ii(y,{mark:nr,attachTo:d})},([,y,$])=>{if(!y)return;let x={mark:nr,prepend:"queue",attachTo:d,priority:-999};x=zu(x,c);const E=Dr(y,$,x);E[er]=u,E.setAttribute(Au,n)})};class et{constructor(t,n){te(this,"name");te(this,"style");te(this,"_keyframe",!0);this.name=t,this.style=n}getName(t=""){return t?`${t}-${this.name}`:this.name}}function Xr(e){return e.notSplit=!0,e}Xr(["borderTop","borderBottom"]),Xr(["borderTop"]),Xr(["borderBottom"]),Xr(["borderLeft","borderRight"]),Xr(["borderLeft"]),Xr(["borderRight"]);const Fu=b.createContext({});function Mg(){}const{resetWarned:s2}=tt;let Yn=null;function l2(){Yn=null,s2()}let Ag=Mg;process.env.NODE_ENV!=="production"&&(Ag=(e,t,n)=>{tt(e,`[antd: ${t}] ${n}`),process.env.NODE_ENV==="test"&&l2()});const _u=Ag,zg=h.createContext({}),c2=process.env.NODE_ENV!=="production"?e=>{const{strict:t}=h.useContext(zg),n=(r,o,i)=>{if(!r)if(t===!1&&o==="deprecated"){const a=Yn;Yn||(Yn={}),Yn[e]=Yn[e]||[],Yn[e].includes(i||"")||Yn[e].push(i||""),a||console.warn("[antd] There exists deprecated usage in your code:",Yn)}else process.env.NODE_ENV!=="production"&&_u(r,e,i)};return n.deprecated=(r,o,i,a="")=>{n(r,"deprecated",`\`${o}\` is deprecated. Please use \`${i}\` instead.${a?` ${a}`:""}`)},n}:()=>{const e=()=>{};return e.deprecated=Mg,e},At=c2,_l=h.createContext(null);function u2({children:e,onBatchResize:t}){const n=h.useRef(0),r=h.useRef([]),o=h.useContext(_l),i=h.useCallback((a,s,l)=>{n.current+=1;const c=n.current;r.current.push({size:a,element:s,data:l}),Promise.resolve().then(()=>{c===n.current&&(t==null||t(r.current),r.current=[])}),o==null||o(a,s,l)},[t,o]);return h.createElement(_l.Provider,{value:i},e)}const tr=new Map;function Og(e){e.forEach(t=>{var r;const{target:n}=t;(r=tr.get(n))==null||r.forEach(o=>o(n))})}let Vs;function Dg(){return Vs||(Vs=new ResizeObserver(Og)),Vs}process.env.NODE_ENV;process.env.NODE_ENV;function d2(e,t){tr.has(e)||(tr.set(e,new Set),Dg().observe(e)),tr.get(e).add(t)}function f2(e,t){tr.has(e)&&(tr.get(e).delete(t),tr.get(e).size||(Dg().unobserve(e),tr.delete(e)))}function Lg(e,t,n,r){const o=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),i=Ge(l=>{const{width:c,height:u}=l.getBoundingClientRect(),{offsetWidth:d,offsetHeight:f}=l,p=Math.floor(c),g=Math.floor(u);if(o.current.width!==p||o.current.height!==g||o.current.offsetWidth!==d||o.current.offsetHeight!==f){const m={width:p,height:g,offsetWidth:d,offsetHeight:f};o.current=m;const w=d===Math.round(c)?c:d,y=f===Math.round(u)?u:f,$={...m,offsetWidth:w,offsetHeight:y};r==null||r($,l),Promise.resolve().then(()=>{n==null||n($,l)})}}),a=typeof t=="function",s=h.useRef(0);h.useEffect(()=>{const l=a?t():t;return l&&e?d2(l,i):e&&a&&(s.current+=1),()=>{l&&f2(l,i)}},[e,a?s.current:t])}function p2(e,t){const{children:n,disabled:r,onResize:o,data:i}=e,a=h.useRef(null),s=h.useContext(_l),l=typeof n=="function",c=l?n(a):n,u=!l&&h.isValidElement(c)&&$o(c),d=u?cr(c):null,f=Hr(d,a),p=()=>$u(a.current);return h.useImperativeHandle(t,()=>p()),Lg(!r,p,o,(g,m)=>{s==null||s(g,m,i)}),u?h.cloneElement(c,{ref:f}):c}const Fg=h.forwardRef(p2);process.env.NODE_ENV!=="production"&&(Fg.displayName="SingleObserver");function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jl.apply(this,arguments)}const m2="rc-observer-key";function h2(e,t){const{children:n}=e,r=typeof n=="function"?[n]:or(n);return process.env.NODE_ENV!=="production"&&(r.length>1?xa(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&xa(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map((o,i)=>{const a=(o==null?void 0:o.key)||`${m2}-${i}`;return h.createElement(Fg,jl({},e,{key:a,ref:i===0?t:void 0}),o)})}const Io=h.forwardRef(h2);process.env.NODE_ENV!=="production"&&(Io.displayName="ResizeObserver");Io.Collection=u2;function Bl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g2(e){if(Array.isArray(e))return Bl(e)}function b2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _g(e,t){if(e){if(typeof e=="string")return Bl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bl(e,t):void 0}}function x2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
97
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jr(e){return g2(e)||b2(e)||_g(e)||x2()}const va="ant",ju="anticon",y2=["outlined","borderless","filled","underlined"],w2=(e,t)=>t||(e?`${va}-${e}`:va),dt=h.createContext({getPrefixCls:w2,iconPrefixCls:ju}),{Consumer:K5}=dt,Yf={};function Kn(e){const t=h.useContext(dt),{getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}=t,a=t[e];return{classNames:Yf,styles:Yf,...a,getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}}function On(e){"@babel/helpers - typeof";return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(e)}function v2(e){if(Array.isArray(e))return e}function C2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function S2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
98
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jg(e,t){return v2(e)||C2(e,t)||_g(e,t)||S2()}function E2(e,t){if(On(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(On(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bg(e){var t=E2(e,"string");return On(t)=="symbol"?t:t+""}function Xn(e,t,n){return(t=Bg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qf(Object(n),!0).forEach(function(r){Xn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ns(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bg(r.key),r)}}function rs(e,t,n){return t&&$2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hl(e,t){return Hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hl(e,t)}function k2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hl(e,t)}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}function Hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hg=function(){return!!e})()}function I2(e,t){if(t&&(On(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sa(e)}function R2(e){var t=Hg();return function(){var n,r=Ca(e);if(t){var o=Ca(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I2(this,n)}}var T2=rs(function e(){ns(this,e)}),Vg="CALC_UNIT",P2=new RegExp(Vg,"g");function Ws(e){return typeof e=="number"?"".concat(e).concat(Vg):e}var N2=function(e){k2(n,e);var t=R2(n);function n(r,o){var i;ns(this,n),i=t.call(this),Xn(sa(i),"result",""),Xn(sa(i),"unitlessCssVar",void 0),Xn(sa(i),"lowPriority",void 0);var a=On(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=Ws(r):a==="string"&&(i.result=r),i}return rs(n,[{key:"add",value:function(o){return o instanceof n?this.result="".concat(this.result," + ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," + ").concat(Ws(o))),this.lowPriority=!0,this}},{key:"sub",value:function(o){return o instanceof n?this.result="".concat(this.result," - ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," - ").concat(Ws(o))),this.lowPriority=!0,this}},{key:"mul",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," * ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," * ").concat(o)),this.lowPriority=!1,this}},{key:"div",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," / ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," / ").concat(o)),this.lowPriority=!1,this}},{key:"getResult",value:function(o){return this.lowPriority||o?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(o){var i=this,a=o||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=!1),this.result=this.result.replace(P2,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(T2),M2=function(t,n){var r=N2;return function(o){return new r(o,n)}},Zf=function(t,n){return"".concat([n,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Jf(e,t,n,r){var o=cn({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=jg(s,2),c=l[0],u=l[1];if(process.env.NODE_ENV!=="production"&&tt(!(o!=null&&o[c]),"Component Token `".concat(String(c),"` of ").concat(String(e)," is deprecated. Please use `").concat(String(u),"` instead.")),o!=null&&o[c]||o!=null&&o[u]){var d;(d=o[u])!==null&&d!==void 0||(o[u]=o==null?void 0:o[c])}})}var a=cn(cn({},n),o);return Object.keys(a).forEach(function(s){a[s]===t[s]&&delete a[s]}),a}var Wg=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",Vl=!0;function yt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!Wg)return Object.assign.apply(Object,[{}].concat(t));Vl=!1;var r={};return t.forEach(function(o){if(On(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),Vl=!0,r}var ep={};function A2(){}var z2=function(t){var n,r=t,o=A2;return Wg&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,s){if(Vl){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;ep[a]={global:Array.from(n),component:cn(cn({},(l=ep[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function tp(e,t,n){if(typeof n=="function"){var r;return n(yt(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function O2(e){return{max:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"max(".concat(r.map(function(i){return ye(i)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"min(".concat(r.map(function(i){return ye(i)}).join(","),")")}}}var D2=1e3*60*10,L2=function(){function e(){ns(this,e),Xn(this,"map",new Map),Xn(this,"objectIDMap",new WeakMap),Xn(this,"nextID",0),Xn(this,"lastAccessBeat",new Map),Xn(this,"accessBeat",0)}return rs(e,[{key:"set",value:function(n,r){this.clear();var o=this.getCompositeKey(n);this.map.set(o,r),this.lastAccessBeat.set(o,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),o=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,o}},{key:"getCompositeKey",value:function(n){var r=this,o=n.map(function(i){return i&&On(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(On(i),"_").concat(i)});return o.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>D2&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),np=new L2;function F2(e,t){return b.useMemo(function(){var n=np.get(t);if(n)return n;var r=e();return np.set(t,r),r},t)}var _2=function(){return{}};function qg(e){var t=e.useCSP,n=t===void 0?_2:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(f,p,g,m){var w=Array.isArray(f)?f[0]:f;function y(R){return"".concat(String(w)).concat(R.slice(0,1).toUpperCase()).concat(R.slice(1))}var $=(m==null?void 0:m.unitless)||{},x=typeof s=="function"?s(f):{},E=cn(cn({},x),{},Xn({},y("zIndexPopup"),!0));Object.keys($).forEach(function(R){E[y(R)]=$[R]});var C=cn(cn({},m),{},{unitless:E,prefixToken:y}),v=u(f,p,g,C),T=c(w,g,C);return function(R){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,k=v(R,A),N=m==null?void 0:m.extraCssVarPrefixCls,z=typeof N=="function"?N({prefixCls:R,rootCls:A}):N,L=T(z!=null&&z.length?[A].concat(jr(z)):A);return[k,L]}}function c(f,p,g){var m=g.unitless,w=g.prefixToken,y=g.ignore;return function($){var x=r(),E=x.cssVar,C=x.realToken,v=n();return a2({path:[f],prefix:E.prefix,key:E.key,unitless:m,ignore:y,token:C,scope:$,nonce:function(){return v.nonce}},function(){var T=tp(f,C,p),R=Jf(f,C,T,{deprecatedTokens:g==null?void 0:g.deprecatedTokens});return T&&Object.keys(T).forEach(function(A){R[w(A)]=R[A],delete R[A]}),R}),E==null?void 0:E.key}}function u(f,p,g){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=Array.isArray(f)?f:[f,f],y=jg(w,1),$=y[0],x=w.join("-"),E=e.layer||{name:"antd"};return function(C){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C,T=r(),R=T.theme,A=T.realToken,k=T.hashId,N=T.token,z=T.cssVar,L=T.zeroRuntime,D=b.useMemo(function(){return L},[]);if(D)return k;var M=o(),O=M.rootPrefixCls,F=M.iconPrefixCls,H=n(),X="css",I=F2(function(){var W=new Set;return Object.keys(m.unitless||{}).forEach(function(j){W.add(oa(j,z.prefix)),W.add(oa(j,Zf($,z.prefix)))}),M2(X,W)},[X,$,z==null?void 0:z.prefix]),Q=O2(),Y=Q.max,P=Q.min,oe={theme:R,token:N,hashId:k,nonce:function(){return H.nonce},clientOnly:m.clientOnly,layer:E,order:m.order||-999};return typeof i=="function"&&Fl(cn(cn({},oe),{},{clientOnly:!1,path:["Shared",O]}),function(){return i(N,{prefix:{rootPrefixCls:O,iconPrefixCls:F},csp:H})}),Fl(cn(cn({},oe),{},{path:[x,C,F]}),function(){if(m.injectStyle===!1)return[];var W=z2(N),j=W.token,ne=W.flush,ee=tp($,A,g),_=".".concat(C),ae=Jf($,A,ee,{deprecatedTokens:m.deprecatedTokens});ee&&On(ee)==="object"&&Object.keys(ee).forEach(function(V){ee[V]="var(".concat(oa(V,Zf($,z.prefix)),")")});var fe=yt(j,{componentCls:_,prefixCls:C,iconCls:".".concat(F),antCls:".".concat(O),calc:I,max:Y,min:P},ee),q=p(fe,{hashId:k,prefixCls:C,rootPrefixCls:O,iconPrefixCls:F});ne($,ae);var ce=typeof a=="function"?a(fe,C,v,m.resetFont):null;return[m.resetStyle===!1?null:ce,q]}),k}}function d(f,p,g){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=u(f,p,g,cn({resetStyle:!1,order:-998},m)),y=function(x){var E=x.prefixCls,C=x.rootCls,v=C===void 0?E:C;return w(E,v),null};return process.env.NODE_ENV!=="production"&&(y.displayName="SubStyle_".concat(String(Array.isArray(f)?f.join("."):f))),y}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const xr=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function la(e){return(e+8)/e}function j2(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.E**(o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:la(n)}))}const B2="6.6.4",Xg={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},ui={...Xg,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
99
99
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
100
- 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,focusOutline:!0,motion:!0},B2={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},Ft=Math.round;function qs(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const rp=(e,t,n)=>n===0?e:e/100;function Fo(e,t){const n=t||255;return e>n?n:e<0?0:e}class Ve{constructor(t){J(this,"isValid",!0);J(this,"r",0);J(this,"g",0);J(this,"b",0);J(this,"a",1);J(this,"_h");J(this,"_hsl_s");J(this,"_hsv_s");J(this,"_l");J(this,"_v");J(this,"_max");J(this,"_min");J(this,"_brightness");function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(r))this.fromHexString(r);else if(o("rgb"))this.fromRgbString(r);else if(o("hsl"))this.fromHslString(r);else if(o("hsv")||o("hsb"))this.fromHsvString(r);else{const i=B2[r.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"))}}else if(t instanceof Ve)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Fo(t.r),this.g=Fo(t.g),this.b=Fo(t.b),this.a=typeof t.a=="number"?Fo(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Ft(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(typeof this._hsv_s>"u"){const t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){const t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{const n=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*n-1))}}return this._hsl_s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=s=>(r[s]-this[s])*o+this[s],a={r:Ft(i("r")),g:Ft(i("g")),b:Ft(i("b")),a:Ft(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>Ft((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Ft(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Ft(this.getHSLSaturation()*100),r=Ft(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=Fo(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:o}){const i=(t%360+360)%360;if(this._h=i,this._hsl_s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const p=Ft(r*255);this.r=p,this.g=p,this.b=p;return}let a=0,s=0,l=0;const c=i/60,u=(1-Math.abs(2*r-1))*n,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(a=u,s=d):c>=1&&c<2?(a=d,s=u):c>=2&&c<3?(s=u,l=d):c>=3&&c<4?(s=d,l=u):c>=4&&c<5?(a=d,l=u):c>=5&&c<6&&(a=u,l=d);const f=r-u/2;this.r=Ft((a+f)*255),this.g=Ft((s+f)*255),this.b=Ft((l+f)*255)}fromHsv({h:t,s:n,v:r,a:o}){const i=(t%360+360)%360;this._h=i,this._hsv_s=n,this._v=r,this.a=typeof o=="number"?o:1;const a=Ft(r*255);if(this.r=a,this.g=a,this.b=a,n<=0)return;const s=i/60,l=Math.floor(s),c=s-l,u=Ft(r*(1-n)*255),d=Ft(r*(1-n*c)*255),f=Ft(r*(1-n*(1-c))*255);switch(l){case 0:this.g=f,this.b=u;break;case 1:this.r=d,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=d;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=d;break}}fromHsvString(t){const n=qs(t,rp);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=qs(t,rp);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=qs(t,(r,o)=>o.includes("%")?Ft(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const qi=2,op=.16,H2=.05,V2=.05,W2=.15,Uh=5,Gh=4,q2=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function ip(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-qi*t:Math.round(e.h)+qi*t:r=n?Math.round(e.h)+qi*t:Math.round(e.h)-qi*t,r<0?r+=360:r>=360&&(r-=360),r}function ap(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-op*t:t===Gh?r=e.s+op:r=e.s+H2*t,r>1&&(r=1),n&&t===Uh&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function sp(e,t,n){let r;return n?r=e.v+V2*t:r=e.v-W2*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Kh(e,t={}){const n=[],r=new Ve(e),o=r.toHsv();for(let i=Uh;i>0;i-=1){const a=new Ve({h:ip(o,i,!0),s:ap(o,i,!0),v:sp(o,i,!0)});n.push(a)}n.push(r);for(let i=1;i<=Gh;i+=1){const a=new Ve({h:ip(o,i),s:ap(o,i),v:sp(o,i)});n.push(a)}return t.theme==="dark"?q2.map(({index:i,amount:a})=>new Ve(t.backgroundColor||"#141414").mix(n[i],a).toHexString()):n.map(i=>i.toHexString())}const Xs={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Wl=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Wl.primary=Wl[5];const ql=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];ql.primary=ql[5];const Xl=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Xl.primary=Xl[5];const Ul=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Ul.primary=Ul[5];const Gl=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Gl.primary=Gl[5];const Kl=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Kl.primary=Kl[5];const Yl=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Yl.primary=Yl[5];const Ql=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Ql.primary=Ql[5];const Zl=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Zl.primary=Zl[5];const Jl=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Jl.primary=Jl[5];const ec=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];ec.primary=ec[5];const tc=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];tc.primary=tc[5];const nc=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];nc.primary=nc[5];const Us={red:Wl,volcano:ql,orange:Xl,gold:Ul,yellow:Gl,lime:Kl,green:Yl,cyan:Ql,blue:Zl,geekblue:Jl,purple:ec,magenta:tc,grey:nc};function X2(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:o,colorError:i,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=e,u=t(s),d=t(r),f=t(o),p=t(i),h=t(a),m=n(l,c),w=e.colorLink||e.colorInfo,y=t(w),$=new Ve(p[1]).mix(new Ve(p[3]),50).toHexString(),x={};return xr.forEach(E=>{const v=e[E];if(v){const C=t(v);x[`${E}Hover`]=C[5],x[`${E}Active`]=C[7]}}),{...m,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:$,colorErrorBgActive:p[3],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:h[1],colorInfoBgHover:h[2],colorInfoBorder:h[3],colorInfoBorderHover:h[4],colorInfoHover:h[4],colorInfo:h[6],colorInfoActive:h[7],colorInfoTextHover:h[8],colorInfoText:h[9],colorInfoTextActive:h[10],colorLinkHover:y[4],colorLink:y[6],colorLinkActive:y[7],...x,colorBgMask:new Ve("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const U2=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};function G2(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return{motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1,...U2(r)}}const K2=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},Y2=e=>{const t=_2(e),n=t.map(u=>u.size),r=t.map(u=>u.lineHeight),o=n[1],i=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function Q2(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const En=(e,t)=>new Ve(e).setA(t).toRgbString(),Ur=(e,t)=>new Ve(e).darken(t).toHexString(),Z2=e=>{const t=Kh(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},J2=(e,t,n)=>{const r=e||"#fff",o=t||"#000";return{colorBgBase:r,colorTextBase:o,colorShadow:n||"#000",colorText:En(o,.88),colorTextSecondary:En(o,.65),colorTextTertiary:En(o,.45),colorTextQuaternary:En(o,.25),colorFill:En(o,.15),colorFillSecondary:En(o,.06),colorFillTertiary:En(o,.04),colorFillQuaternary:En(o,.02),colorBgSolid:En(o,1),colorBgSolidHover:En(o,.75),colorBgSolidActive:En(o,.95),colorBgLayout:Ur(r,4),colorBgContainer:Ur(r,0),colorBgElevated:Ur(r,0),colorBgSpotlight:En(o,.85),colorBgBlur:"transparent",colorBorder:Ur(r,15),colorBorderDisabled:Ur(r,15),colorBorderSecondary:Ur(r,6)}};function Yh(e){Xs.pink=Xs.magenta,Us.pink=Us.magenta;const t=Object.keys(Xh).map(n=>{const r=e[n]===Xs[n]?Us[n]:Kh(e[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n={...n,...r},n),{});return{...e,...t,...X2(e,{generateColorPalettes:Z2,generateNeutralColorPalettes:J2}),...Y2(e.fontSize),...Q2(e),...K2(e),...G2(e)}}const Qh=wa(Yh),Sa={token:ui,override:{override:ui},hashed:!0},Bu=b.createContext(Sa);function Gs(e){return e>=0&&e<=255}function Uo(e,t){const{r:n,g:r,b:o,a:i}=new Ve(e).toRgb();if(i<1)return e;const{r:a,g:s,b:l}=new Ve(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Gs(u)&&Gs(d)&&Gs(f))return new Ve({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ve({r:n,g:r,b:o,a:1}).toRgbString()}function eI(e){const{override:t,...n}=e,r={...t};Object.keys(ui).forEach(w=>{delete r[w]});const o={...n,...r},i=new Ve(o.colorShadow),a=i.a,s=w=>i.clone().setA(a*w).toRgbString(),l=480,c=576,u=768,d=992,f=1200,p=1600,h=1920;if(o.motion===!1){const w="0s";o.motionDurationFast=w,o.motionDurationMid=w,o.motionDurationSlow=w}return{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Uo(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Uo(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Uo(o.colorWarningBg,o.colorBgContainer),colorErrorAffix:o.colorError,colorWarningAffix:o.colorWarning,fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.focusOutline===!1?0:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Uo(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
100
+ 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,focusOutline:!0,motion:!0},H2={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},Ft=Math.round;function qs(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const rp=(e,t,n)=>n===0?e:e/100;function Fo(e,t){const n=t||255;return e>n?n:e<0?0:e}class Ve{constructor(t){te(this,"isValid",!0);te(this,"r",0);te(this,"g",0);te(this,"b",0);te(this,"a",1);te(this,"_h");te(this,"_hsl_s");te(this,"_hsv_s");te(this,"_l");te(this,"_v");te(this,"_max");te(this,"_min");te(this,"_brightness");function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(r))this.fromHexString(r);else if(o("rgb"))this.fromRgbString(r);else if(o("hsl"))this.fromHslString(r);else if(o("hsv")||o("hsb"))this.fromHsvString(r);else{const i=H2[r.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"))}}else if(t instanceof Ve)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Fo(t.r),this.g=Fo(t.g),this.b=Fo(t.b),this.a=typeof t.a=="number"?Fo(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Ft(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(typeof this._hsv_s>"u"){const t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){const t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{const n=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*n-1))}}return this._hsl_s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=s=>(r[s]-this[s])*o+this[s],a={r:Ft(i("r")),g:Ft(i("g")),b:Ft(i("b")),a:Ft(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>Ft((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Ft(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Ft(this.getHSLSaturation()*100),r=Ft(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=Fo(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:o}){const i=(t%360+360)%360;if(this._h=i,this._hsl_s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const p=Ft(r*255);this.r=p,this.g=p,this.b=p;return}let a=0,s=0,l=0;const c=i/60,u=(1-Math.abs(2*r-1))*n,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(a=u,s=d):c>=1&&c<2?(a=d,s=u):c>=2&&c<3?(s=u,l=d):c>=3&&c<4?(s=d,l=u):c>=4&&c<5?(a=d,l=u):c>=5&&c<6&&(a=u,l=d);const f=r-u/2;this.r=Ft((a+f)*255),this.g=Ft((s+f)*255),this.b=Ft((l+f)*255)}fromHsv({h:t,s:n,v:r,a:o}){const i=(t%360+360)%360;this._h=i,this._hsv_s=n,this._v=r,this.a=typeof o=="number"?o:1;const a=Ft(r*255);if(this.r=a,this.g=a,this.b=a,n<=0)return;const s=i/60,l=Math.floor(s),c=s-l,u=Ft(r*(1-n)*255),d=Ft(r*(1-n*c)*255),f=Ft(r*(1-n*(1-c))*255);switch(l){case 0:this.g=f,this.b=u;break;case 1:this.r=d,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=d;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=d;break}}fromHsvString(t){const n=qs(t,rp);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=qs(t,rp);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=qs(t,(r,o)=>o.includes("%")?Ft(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const qi=2,op=.16,V2=.05,W2=.05,q2=.15,Ug=5,Gg=4,X2=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function ip(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-qi*t:Math.round(e.h)+qi*t:r=n?Math.round(e.h)+qi*t:Math.round(e.h)-qi*t,r<0?r+=360:r>=360&&(r-=360),r}function ap(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-op*t:t===Gg?r=e.s+op:r=e.s+V2*t,r>1&&(r=1),n&&t===Ug&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function sp(e,t,n){let r;return n?r=e.v+W2*t:r=e.v-q2*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Kg(e,t={}){const n=[],r=new Ve(e),o=r.toHsv();for(let i=Ug;i>0;i-=1){const a=new Ve({h:ip(o,i,!0),s:ap(o,i,!0),v:sp(o,i,!0)});n.push(a)}n.push(r);for(let i=1;i<=Gg;i+=1){const a=new Ve({h:ip(o,i),s:ap(o,i),v:sp(o,i)});n.push(a)}return t.theme==="dark"?X2.map(({index:i,amount:a})=>new Ve(t.backgroundColor||"#141414").mix(n[i],a).toHexString()):n.map(i=>i.toHexString())}const Xs={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Wl=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Wl.primary=Wl[5];const ql=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];ql.primary=ql[5];const Xl=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Xl.primary=Xl[5];const Ul=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Ul.primary=Ul[5];const Gl=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Gl.primary=Gl[5];const Kl=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Kl.primary=Kl[5];const Yl=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Yl.primary=Yl[5];const Ql=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Ql.primary=Ql[5];const Zl=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Zl.primary=Zl[5];const Jl=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Jl.primary=Jl[5];const ec=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];ec.primary=ec[5];const tc=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];tc.primary=tc[5];const nc=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];nc.primary=nc[5];const Us={red:Wl,volcano:ql,orange:Xl,gold:Ul,yellow:Gl,lime:Kl,green:Yl,cyan:Ql,blue:Zl,geekblue:Jl,purple:ec,magenta:tc,grey:nc};function U2(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:o,colorError:i,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=e,u=t(s),d=t(r),f=t(o),p=t(i),g=t(a),m=n(l,c),w=e.colorLink||e.colorInfo,y=t(w),$=new Ve(p[1]).mix(new Ve(p[3]),50).toHexString(),x={};return xr.forEach(E=>{const C=e[E];if(C){const v=t(C);x[`${E}Hover`]=v[5],x[`${E}Active`]=v[7]}}),{...m,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:$,colorErrorBgActive:p[3],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorLinkHover:y[4],colorLink:y[6],colorLinkActive:y[7],...x,colorBgMask:new Ve("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const G2=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};function K2(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return{motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1,...G2(r)}}const Y2=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},Q2=e=>{const t=j2(e),n=t.map(u=>u.size),r=t.map(u=>u.lineHeight),o=n[1],i=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function Z2(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const En=(e,t)=>new Ve(e).setA(t).toRgbString(),Ur=(e,t)=>new Ve(e).darken(t).toHexString(),J2=e=>{const t=Kg(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},eI=(e,t,n)=>{const r=e||"#fff",o=t||"#000";return{colorBgBase:r,colorTextBase:o,colorShadow:n||"#000",colorText:En(o,.88),colorTextSecondary:En(o,.65),colorTextTertiary:En(o,.45),colorTextQuaternary:En(o,.25),colorFill:En(o,.15),colorFillSecondary:En(o,.06),colorFillTertiary:En(o,.04),colorFillQuaternary:En(o,.02),colorBgSolid:En(o,1),colorBgSolidHover:En(o,.75),colorBgSolidActive:En(o,.95),colorBgLayout:Ur(r,4),colorBgContainer:Ur(r,0),colorBgElevated:Ur(r,0),colorBgSpotlight:En(o,.85),colorBgBlur:"transparent",colorBorder:Ur(r,15),colorBorderDisabled:Ur(r,15),colorBorderSecondary:Ur(r,6)}};function Yg(e){Xs.pink=Xs.magenta,Us.pink=Us.magenta;const t=Object.keys(Xg).map(n=>{const r=e[n]===Xs[n]?Us[n]:Kg(e[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n={...n,...r},n),{});return{...e,...t,...U2(e,{generateColorPalettes:J2,generateNeutralColorPalettes:eI}),...Q2(e.fontSize),...Z2(e),...Y2(e),...K2(e)}}const Qg=wa(Yg),Sa={token:ui,override:{override:ui},hashed:!0},Bu=b.createContext(Sa);function Gs(e){return e>=0&&e<=255}function Uo(e,t){const{r:n,g:r,b:o,a:i}=new Ve(e).toRgb();if(i<1)return e;const{r:a,g:s,b:l}=new Ve(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Gs(u)&&Gs(d)&&Gs(f))return new Ve({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ve({r:n,g:r,b:o,a:1}).toRgbString()}function tI(e){const{override:t,...n}=e,r={...t};Object.keys(ui).forEach(w=>{delete r[w]});const o={...n,...r},i=new Ve(o.colorShadow),a=i.a,s=w=>i.clone().setA(a*w).toRgbString(),l=480,c=576,u=768,d=992,f=1200,p=1600,g=1920;if(o.motion===!1){const w="0s";o.motionDurationFast=w,o.motionDurationMid=w,o.motionDurationSlow=w}return{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Uo(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Uo(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Uo(o.colorWarningBg,o.colorBgContainer),colorErrorAffix:o.colorError,colorWarningAffix:o.colorWarning,fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.focusOutline===!1?0:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Uo(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
101
101
  0 6px 16px 0 ${s(.08)},
102
102
  0 3px 6px -4px ${s(.12)},
103
103
  0 9px 28px 8px ${s(.05)}
@@ -109,7 +109,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
109
109
  0 1px 2px 0 ${s(.05)},
110
110
  0 1px 6px -1px ${s(.03)},
111
111
  0 2px 4px 0 ${s(.03)}
112
- `,screenXS:l,screenXSMin:l,screenXSMax:c-1,screenSM:c,screenSMMin:c,screenSMMax:u-1,screenMD:u,screenMDMin:u,screenMDMax:d-1,screenLG:d,screenLGMin:d,screenLGMax:f-1,screenXL:f,screenXLMin:f,screenXLMax:p-1,screenXXL:p,screenXXLMin:p,screenXXLMax:h-1,screenXXXL:h,screenXXXLMin:h,boxShadowPopoverArrow:`2px 2px 5px ${s(.05)}`,dropShadowPopover:`drop-shadow(0 6px 16px ${s(.08)}) drop-shadow(0 3px 6px ${s(.12)}) drop-shadow(0 9px 28px ${s(.05)})`,boxShadowCard:`
112
+ `,screenXS:l,screenXSMin:l,screenXSMax:c-1,screenSM:c,screenSMMin:c,screenSMMax:u-1,screenMD:u,screenMDMin:u,screenMDMax:d-1,screenLG:d,screenLGMin:d,screenLGMax:f-1,screenXL:f,screenXLMin:f,screenXLMax:p-1,screenXXL:p,screenXXLMin:p,screenXXLMax:g-1,screenXXXL:g,screenXXXLMin:g,boxShadowPopoverArrow:`2px 2px 5px ${s(.05)}`,dropShadowPopover:`drop-shadow(0 6px 16px ${s(.08)}) drop-shadow(0 3px 6px ${s(.12)}) drop-shadow(0 9px 28px ${s(.05)})`,boxShadowCard:`
113
113
  0 1px 2px -2px ${s(.16)},
114
114
  0 3px 6px 0 ${s(.12)},
115
115
  0 5px 12px 4px ${s(.09)}
@@ -129,7 +129,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
129
129
  0 -6px 16px 0 ${s(.08)},
130
130
  0 -3px 6px -4px ${s(.12)},
131
131
  0 -9px 28px 8px ${s(.05)}
132
- `,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px ${s(.08)}`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px ${s(.08)}`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px ${s(.08)}`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px ${s(.08)}`,...r}}const Zh={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},tI={motionBase:!0,motionUnit:!0},nI={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},Jh=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=eI(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=Jh({...a,...u},{override:u},c)),a[s]=d}),a};function Cr(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=b.useContext(Bu),{csp:a,getPrefixCls:s}=b.useContext(dt),l={prefix:(o==null?void 0:o.prefix)??s(),key:(o==null?void 0:o.key)??"css-var-root"},c=`${j2}-${t||""}`,u=n||Qh,[d,f,p]=yh(u,[ui,e],{salt:c,override:r,getComputedToken:Jh,cssVar:{...l,unitless:Zh,ignore:tI,preserve:nI},nonce:a==null?void 0:a.nonce});return[u,p,t?f:"",d,l,!!i]}const eb={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Ro=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Hu=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block",verticalAlign:"inherit"}}),rI=new et("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),rc=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),Vu=(e,t)=>({outline:`${xe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:["outline-offset","outline"].map(n=>`${n} 0s`).join(", ")}),Ea=(e,t)=>({"&:focus-visible":Vu(e)}),oI=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...Ea(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),iI=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...s,...a,[o]:a}}},tb=e=>({[`.${e}`]:{...Hu(),"&::before":{display:"none"},"&[tabindex]":{cursor:"pointer"}},[`.${e} .${e}-icon`]:{display:"block"},[`.${e}-spin`]:{animationName:rI,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),{genStyleHooks:on,genComponentStyleHook:aI,genSubStyleComponent:sI}=qh({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=b.useContext(dt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o,i]=Cr();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=b.useContext(dt);return e??{}},getResetStyles:(e,t)=>{const n=oI(e);return[n,{"&":n},tb((t==null?void 0:t.prefix.iconPrefixCls)??ju)]},getCommonStyle:iI,getCompUnitless:()=>Zh}),ur=(e,t)=>{const n=`--${e.replace(/\./g,"")}-${t}-`;return[i=>`${n}${i}`,(i,a)=>a?`var(${n}${i}, ${a})`:`var(${n}${i})`]};function lI(e,t){return xr.reduce((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],a=e[`${r}6`],s=e[`${r}7`];return{...n,...t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s})}},{})}const cI=(e,t)=>(Cr(),Fl({hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>tb(e))),lp="data-rc-order",cp="data-rc-priority",uI="rc-util-key",oc=new Map;function nb(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function dI(e,t){if(!e||!t)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function rb({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:uI}function Wu(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function fI(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function qu(e){return Array.from((oc.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function ob(e,t={}){if(!nb())return null;const{csp:n,prepend:r,priority:o=0}=t,i=fI(r),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(lp,i),a&&o&&s.setAttribute(cp,`${o}`),n!=null&&n.nonce&&(s.nonce=n.nonce),s.innerHTML=e;const l=Wu(t),{firstChild:c}=l;if(r){if(a){const u=(t.styles||qu(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(lp)))return!1;const f=Number(d.getAttribute(cp)||0);return o>=f});if(u.length)return l.insertBefore(s,u[u.length-1].nextSibling),s}l.insertBefore(s,c)}else l.appendChild(s);return s}function pI(e,t={}){let{styles:n}=t;return n||(n=qu(Wu(t))),n.find(r=>r.getAttribute(rb(t))===e)}function mI(e,t){const n=oc.get(e);if(!n||!dI(document,n)){const r=ob("",t);if(!r)return;const{parentNode:o}=r;oc.set(e,o),e.removeChild(r)}}function gI(e,t,n={}){var l;if(!nb())return null;const r=Wu(n),o=qu(r),i={...n,styles:o};mI(r,i);const a=pI(t,i);if(a)return(l=i.csp)!=null&&l.nonce&&a.nonce!==i.csp.nonce&&(a.nonce=i.csp.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const s=ob(e,i);return s==null||s.setAttribute(rb(i),t),s}function hI(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function bI(e){const t=hI(e);return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t:null}const up={};function xI(e,t){e||up[t]||(process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.error(`Warning: ${t}`),up[t]=!0)}function yI(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function ib(e,t){xI(e,`[@ant-design/icons] ${t}`)}function $a(e){return e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function dp(e={}){return Object.keys(e).reduce((t,n)=>{const r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[yI(n)]=r}return t},{})}function ic(e,t,n){return n?b.createElement(e.tag,{key:t,...dp(e.attrs),...n},(e.children||[]).map((r,o)=>ic(r,`${t}-${e.tag}-${o}`))):b.createElement(e.tag,{key:t,...dp(e.attrs)},(e.children||[]).map((r,o)=>ic(r,`${t}-${e.tag}-${o}`)))}const wI=`
132
+ `,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px ${s(.08)}`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px ${s(.08)}`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px ${s(.08)}`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px ${s(.08)}`,...r}}const Zg={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},nI={motionBase:!0,motionUnit:!0},rI={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},Jg=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=tI(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=Jg({...a,...u},{override:u},c)),a[s]=d}),a};function Cr(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=b.useContext(Bu),{csp:a,getPrefixCls:s}=b.useContext(dt),l={prefix:(o==null?void 0:o.prefix)??s(),key:(o==null?void 0:o.key)??"css-var-root"},c=`${B2}-${t||""}`,u=n||Qg,[d,f,p]=yg(u,[ui,e],{salt:c,override:r,getComputedToken:Jg,cssVar:{...l,unitless:Zg,ignore:nI,preserve:rI},nonce:a==null?void 0:a.nonce});return[u,p,t?f:"",d,l,!!i]}const eb={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Ro=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Hu=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block",verticalAlign:"inherit"}}),oI=new et("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),rc=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),Vu=(e,t)=>({outline:`${ye(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:["outline-offset","outline"].map(n=>`${n} 0s`).join(", ")}),Ea=(e,t)=>({"&:focus-visible":Vu(e)}),iI=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...Ea(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),aI=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...s,...a,[o]:a}}},tb=e=>({[`.${e}`]:{...Hu(),"&::before":{display:"none"},"&[tabindex]":{cursor:"pointer"}},[`.${e} .${e}-icon`]:{display:"block"},[`.${e}-spin`]:{animationName:oI,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),{genStyleHooks:on,genComponentStyleHook:sI,genSubStyleComponent:lI}=qg({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=b.useContext(dt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o,i]=Cr();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=b.useContext(dt);return e??{}},getResetStyles:(e,t)=>{const n=iI(e);return[n,{"&":n},tb((t==null?void 0:t.prefix.iconPrefixCls)??ju)]},getCommonStyle:aI,getCompUnitless:()=>Zg}),ur=(e,t)=>{const n=`--${e.replace(/\./g,"")}-${t}-`;return[i=>`${n}${i}`,(i,a)=>a?`var(${n}${i}, ${a})`:`var(${n}${i})`]};function cI(e,t){return xr.reduce((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],a=e[`${r}6`],s=e[`${r}7`];return{...n,...t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s})}},{})}const uI=(e,t)=>(Cr(),Fl({hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>tb(e))),lp="data-rc-order",cp="data-rc-priority",dI="rc-util-key",oc=new Map;function nb(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fI(e,t){if(!e||!t)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function rb({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:dI}function Wu(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function pI(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function qu(e){return Array.from((oc.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function ob(e,t={}){if(!nb())return null;const{csp:n,prepend:r,priority:o=0}=t,i=pI(r),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(lp,i),a&&o&&s.setAttribute(cp,`${o}`),n!=null&&n.nonce&&(s.nonce=n.nonce),s.innerHTML=e;const l=Wu(t),{firstChild:c}=l;if(r){if(a){const u=(t.styles||qu(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(lp)))return!1;const f=Number(d.getAttribute(cp)||0);return o>=f});if(u.length)return l.insertBefore(s,u[u.length-1].nextSibling),s}l.insertBefore(s,c)}else l.appendChild(s);return s}function mI(e,t={}){let{styles:n}=t;return n||(n=qu(Wu(t))),n.find(r=>r.getAttribute(rb(t))===e)}function hI(e,t){const n=oc.get(e);if(!n||!fI(document,n)){const r=ob("",t);if(!r)return;const{parentNode:o}=r;oc.set(e,o),e.removeChild(r)}}function gI(e,t,n={}){var l;if(!nb())return null;const r=Wu(n),o=qu(r),i={...n,styles:o};hI(r,i);const a=mI(t,i);if(a)return(l=i.csp)!=null&&l.nonce&&a.nonce!==i.csp.nonce&&(a.nonce=i.csp.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const s=ob(e,i);return s==null||s.setAttribute(rb(i),t),s}function bI(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function xI(e){const t=bI(e);return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t:null}const up={};function yI(e,t){e||up[t]||(process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.error(`Warning: ${t}`),up[t]=!0)}function wI(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function ib(e,t){yI(e,`[@ant-design/icons] ${t}`)}function $a(e){return e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function dp(e={}){return Object.keys(e).reduce((t,n)=>{const r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[wI(n)]=r}return t},{})}function ic(e,t,n){return n?b.createElement(e.tag,{key:t,...dp(e.attrs),...n},(e.children||[]).map((r,o)=>ic(r,`${t}-${e.tag}-${o}`))):b.createElement(e.tag,{key:t,...dp(e.attrs)},(e.children||[]).map((r,o)=>ic(r,`${t}-${e.tag}-${o}`)))}const vI=`
133
133
  .anticon {
134
134
  display: inline-flex;
135
135
  align-items: center;
@@ -183,43 +183,43 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
183
183
  transform: rotate(360deg);
184
184
  }
185
185
  }
186
- `,vI=e=>{const{csp:t,prefixCls:n,layer:r,zeroRuntime:o}=b.useContext(Fu);let i=wI;n&&(i=i.replace(/anticon/g,n)),r&&(i=`@layer ${r} {
186
+ `,CI=e=>{const{csp:t,prefixCls:n,layer:r,zeroRuntime:o}=b.useContext(Fu);let i=vI;n&&(i=i.replace(/anticon/g,n)),r&&(i=`@layer ${r} {
187
187
  ${i}
188
- }`),b.useEffect(()=>{if(o)return;const a=e.current,s=bI(a);gI(i,"@ant-design-icons",{prepend:!r,csp:t,attachTo:s})},[])},ab=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:a,...s}=e,l=g.useRef(null);if(vI(l),ib($a(t),`icon should be icon definiton, but got ${typeof t}`),!$a(t))return null;const c=t;return ic(c.icon,`svg-${c.name}`,{className:n,onClick:r,style:o,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...s,ref:l})};ab.displayName="IconReact";function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ac.apply(this,arguments)}const Jt=g.forwardRef((e,t)=>{const{className:n,icon:r,spin:o,rotate:i,tabIndex:a,onClick:s,twoToneColor:l,...c}=e,{prefixCls:u="anticon",rootClassName:d}=g.useContext(Fu);if(ib($a(r),`icon should be icon definiton, but got ${typeof r}`),!$a(r))return null;const f=Z(d,u,{[`${u}-${r.name}`]:!!r.name,[`${u}-spin`]:!!o||r.name==="loading"},n);let p=a;p===void 0&&s&&(p=-1);const h=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0;return g.createElement("span",ac({role:"img","aria-label":r.name},c,{ref:t,tabIndex:p,onClick:s,className:f}),g.createElement(ab,{icon:r,style:h}))});process.env.NODE_ENV!=="production"&&(Jt.displayName="AntdIcon");var CI={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 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function sc(){return sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sc.apply(this,arguments)}const SI=(e,t)=>g.createElement(Jt,sc({},e,{ref:t,icon:CI})),sb=g.forwardRef(SI);process.env.NODE_ENV!=="production"&&(sb.displayName="CloseCircleFilled");var EI={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lc.apply(this,arguments)}const $I=(e,t)=>g.createElement(Jt,lc({},e,{ref:t,icon:EI})),Xu=g.forwardRef($I);process.env.NODE_ENV!=="production"&&(Xu.displayName="CloseOutlined");const os=e=>typeof e=="number"&&!Number.isNaN(e),br=e=>typeof e=="string",rn=e=>e!==null&&typeof e=="object",Qt=e=>typeof e=="function",kI=e=>typeof e!="object"&&!Qt(e)||e===null,lb=e=>rn(e)&&"propertyName"in e&&br(e.propertyName),cc=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{t[r]._default?n[r]||(n[r]={}):n[r]=cc(n[r],t[r])}),n},cb=(e={},...t)=>t.filter(n=>!!n).reduce((n,r)=>(Object.keys(r).forEach(o=>{const i=e[o],a=r[o];if(i)if(rn(a))n[o]=cb(i,n[o],a);else{const{_default:s}=i;s&&(n[o]=n[o]||{},n[o][s]=Z(n[o][s],a))}else n[o]=Z(n[o],a)}),n),{}),II=(e,...t)=>g.useMemo(()=>cb.apply(void 0,[e].concat(t)),[e].concat(t)),RI=(...e)=>e.filter(t=>!!t).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]}}),t),{}),PI=(...e)=>g.useMemo(()=>RI.apply(void 0,e),[].concat(e)),kt=(e,t="root")=>g.useMemo(()=>e?{[t]:e}:void 0,[e,t]),fp=(e,t)=>Qt(e)?e(t):e,Pn=(e,t,n,r)=>{const o=e.map(l=>l?fp(l,n):void 0),i=t.map(l=>l?fp(l,n):void 0),a=II.apply(void 0,[r].concat(jr(o))),s=PI.apply(void 0,jr(i));return g.useMemo(()=>r?[cc(a,r),cc(s,r)]:[a,s],[a,s,r])},Po=e=>`${e}-css-var`,TI=b.createContext(void 0),ub={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},NI=Object.freeze(Object.defineProperty({__proto__:null,default:ub},Symbol.toStringTag,{value:"Module"})),MI={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},db={...MI,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},AI=Object.freeze(Object.defineProperty({__proto__:null,default:db},Symbol.toStringTag,{value:"Module"})),fb={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},pp={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...db},timePickerLocale:{...fb}},mn="${label} is not a valid ${type}",bo={locale:"en",Pagination:ub,DatePicker:pp,TimePicker:fb,Calendar:pp,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:mn,method:mn,array:mn,object:mn,number:mn,date:mn,boolean:mn,integer:mn,float:mn,regexp:mn,email:mn,url:mn,hex:mn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};({...bo.Modal});let ca=[];const mp=()=>ca.reduce((e,t)=>({...e,...t}),bo.Modal);function zI(e){if(e){const t={...e};return ca.push(t),mp(),()=>{ca=ca.filter(n=>n!==t),mp()}}({...bo.Modal})}const Uu=b.createContext(void 0),OI=(e,t)=>{const n=g.useContext(Uu),r=g.useMemo(()=>{const i=bo[e],a=(n==null?void 0:n[e])??{};return{...Qt(i)?i():i,...a||{}}},[e,t,n]),o=g.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?bo.locale:i},[n]);return[r,o]},pb="internalMark",mb=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;if(process.env.NODE_ENV!=="production"){const i=At("LocaleProvider");process.env.NODE_ENV!=="production"&&i(r===pb,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}g.useEffect(()=>zI(t==null?void 0:t.Modal),[t]);const o=g.useMemo(()=>({...t,exist:!0}),[t]);return g.createElement(Uu.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(mb.displayName="LocaleProvider");const gb=g.createContext(null);let DI=!1;function LI(e){return DI}const gp=[];function FI(e,t){const[n]=g.useState(()=>{if(!vn())return null;const u=document.createElement("div");return process.env.NODE_ENV!=="production"&&t&&u.setAttribute("data-debug",t),u}),r=g.useRef(!1),o=g.useContext(gb),[i,a]=g.useState(gp),s=o||(r.current?void 0:u=>{a(d=>[u,...d])});function l(){n.parentElement||document.body.appendChild(n),r.current=!0}function c(){var u;(u=n.parentElement)==null||u.removeChild(n),r.current=!1}return Bt(()=>(e?o?o(l):l():c(),c),[e]),Bt(()=>{i.length&&(i.forEach(u=>u()),a(gp))},[i]),[n,s]}function _I(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const jI=`rc-util-locker-${Date.now()}`;let hp=0;function BI(e){const t=!!e,[n]=g.useState(()=>(hp+=1,`${jI}_${hp}`));Bt(()=>{if(t){const r=I$(document.body).width,o=_I();Dr(`
188
+ }`),b.useEffect(()=>{if(o)return;const a=e.current,s=xI(a);gI(i,"@ant-design-icons",{prepend:!r,csp:t,attachTo:s})},[])},ab=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:a,...s}=e,l=h.useRef(null);if(CI(l),ib($a(t),`icon should be icon definiton, but got ${typeof t}`),!$a(t))return null;const c=t;return ic(c.icon,`svg-${c.name}`,{className:n,onClick:r,style:o,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...s,ref:l})};ab.displayName="IconReact";function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ac.apply(this,arguments)}const Jt=h.forwardRef((e,t)=>{const{className:n,icon:r,spin:o,rotate:i,tabIndex:a,onClick:s,twoToneColor:l,...c}=e,{prefixCls:u="anticon",rootClassName:d}=h.useContext(Fu);if(ib($a(r),`icon should be icon definiton, but got ${typeof r}`),!$a(r))return null;const f=J(d,u,{[`${u}-${r.name}`]:!!r.name,[`${u}-spin`]:!!o||r.name==="loading"},n);let p=a;p===void 0&&s&&(p=-1);const g=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0;return h.createElement("span",ac({role:"img","aria-label":r.name},c,{ref:t,tabIndex:p,onClick:s,className:f}),h.createElement(ab,{icon:r,style:g}))});process.env.NODE_ENV!=="production"&&(Jt.displayName="AntdIcon");var SI={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 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function sc(){return sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sc.apply(this,arguments)}const EI=(e,t)=>h.createElement(Jt,sc({},e,{ref:t,icon:SI})),sb=h.forwardRef(EI);process.env.NODE_ENV!=="production"&&(sb.displayName="CloseCircleFilled");var $I={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lc.apply(this,arguments)}const kI=(e,t)=>h.createElement(Jt,lc({},e,{ref:t,icon:$I})),Xu=h.forwardRef(kI);process.env.NODE_ENV!=="production"&&(Xu.displayName="CloseOutlined");const os=e=>typeof e=="number"&&!Number.isNaN(e),br=e=>typeof e=="string",rn=e=>e!==null&&typeof e=="object",Qt=e=>typeof e=="function",II=e=>typeof e!="object"&&!Qt(e)||e===null,lb=e=>rn(e)&&"propertyName"in e&&br(e.propertyName),cc=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{t[r]._default?n[r]||(n[r]={}):n[r]=cc(n[r],t[r])}),n},cb=(e={},...t)=>t.filter(n=>!!n).reduce((n,r)=>(Object.keys(r).forEach(o=>{const i=e[o],a=r[o];if(i)if(rn(a))n[o]=cb(i,n[o],a);else{const{_default:s}=i;s&&(n[o]=n[o]||{},n[o][s]=J(n[o][s],a))}else n[o]=J(n[o],a)}),n),{}),RI=(e,...t)=>h.useMemo(()=>cb.apply(void 0,[e].concat(t)),[e].concat(t)),TI=(...e)=>e.filter(t=>!!t).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]}}),t),{}),PI=(...e)=>h.useMemo(()=>TI.apply(void 0,e),[].concat(e)),kt=(e,t="root")=>h.useMemo(()=>e?{[t]:e}:void 0,[e,t]),fp=(e,t)=>Qt(e)?e(t):e,Tn=(e,t,n,r)=>{const o=e.map(l=>l?fp(l,n):void 0),i=t.map(l=>l?fp(l,n):void 0),a=RI.apply(void 0,[r].concat(jr(o))),s=PI.apply(void 0,jr(i));return h.useMemo(()=>r?[cc(a,r),cc(s,r)]:[a,s],[a,s,r])},To=e=>`${e}-css-var`,NI=b.createContext(void 0),ub={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},MI=Object.freeze(Object.defineProperty({__proto__:null,default:ub},Symbol.toStringTag,{value:"Module"})),AI={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},db={...AI,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},zI=Object.freeze(Object.defineProperty({__proto__:null,default:db},Symbol.toStringTag,{value:"Module"})),fb={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},pp={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...db},timePickerLocale:{...fb}},mn="${label} is not a valid ${type}",bo={locale:"en",Pagination:ub,DatePicker:pp,TimePicker:fb,Calendar:pp,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:mn,method:mn,array:mn,object:mn,number:mn,date:mn,boolean:mn,integer:mn,float:mn,regexp:mn,email:mn,url:mn,hex:mn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};({...bo.Modal});let ca=[];const mp=()=>ca.reduce((e,t)=>({...e,...t}),bo.Modal);function OI(e){if(e){const t={...e};return ca.push(t),mp(),()=>{ca=ca.filter(n=>n!==t),mp()}}({...bo.Modal})}const Uu=b.createContext(void 0),DI=(e,t)=>{const n=h.useContext(Uu),r=h.useMemo(()=>{const i=bo[e],a=(n==null?void 0:n[e])??{};return{...Qt(i)?i():i,...a||{}}},[e,t,n]),o=h.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?bo.locale:i},[n]);return[r,o]},pb="internalMark",mb=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;if(process.env.NODE_ENV!=="production"){const i=At("LocaleProvider");process.env.NODE_ENV!=="production"&&i(r===pb,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}h.useEffect(()=>OI(t==null?void 0:t.Modal),[t]);const o=h.useMemo(()=>({...t,exist:!0}),[t]);return h.createElement(Uu.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(mb.displayName="LocaleProvider");const hb=h.createContext(null);let LI=!1;function FI(e){return LI}const hp=[];function _I(e,t){const[n]=h.useState(()=>{if(!vn())return null;const u=document.createElement("div");return process.env.NODE_ENV!=="production"&&t&&u.setAttribute("data-debug",t),u}),r=h.useRef(!1),o=h.useContext(hb),[i,a]=h.useState(hp),s=o||(r.current?void 0:u=>{a(d=>[u,...d])});function l(){n.parentElement||document.body.appendChild(n),r.current=!0}function c(){var u;(u=n.parentElement)==null||u.removeChild(n),r.current=!1}return Bt(()=>(e?o?o(l):l():c(),c),[e]),Bt(()=>{i.length&&(i.forEach(u=>u()),a(hp))},[i]),[n,s]}function jI(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const BI=`rc-util-locker-${Date.now()}`;let gp=0;function HI(e){const t=!!e,[n]=h.useState(()=>(gp+=1,`${BI}_${gp}`));Bt(()=>{if(t){const r=R$(document.body).width,o=jI();Dr(`
189
189
  html body {
190
190
  overflow-y: hidden;
191
191
  ${o?`width: calc(100% - ${r}px);`:""}
192
- }`,n)}else ii(n);return()=>{ii(n)}},[t,n])}let hr=[];const HI=200;let Gu=0;process.env.NODE_ENV;const hb=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-Gu<HI)return;const n=hr.length;for(let r=n-1;r>=0;r-=1)hr[r].onEsc({top:r===n-1,event:e})}},bb=()=>{Gu=Date.now()};function VI(){window.addEventListener("keydown",hb),window.addEventListener("compositionend",bb)}function WI(){hr.length===0&&(window.removeEventListener("keydown",hb),window.removeEventListener("compositionend",bb))}function qI(e,t){const n=Ka(),r=Ge(t),o=()=>{hr.find(a=>a.id===n)||hr.push({id:n,onEsc:r})},i=()=>{hr=hr.filter(a=>a.id!==n)};b.useMemo(()=>{e?o():e||i()},[e]),b.useEffect(()=>{if(e)return o(),VI(),()=>{i(),WI()}},[e])}const bp=e=>e===!1?!1:!vn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,is=g.forwardRef((e,t)=>{const{open:n,autoLock:r,getContainer:o,debug:i,autoDestroy:a=!0,children:s,onEsc:l}=e,[c,u]=g.useState(n),d=c||n;process.env.NODE_ENV!=="production"&&tt(vn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),g.useEffect(()=>{(a||n)&&u(n)},[n,a]);const[f,p]=g.useState(()=>bp(o));g.useEffect(()=>{const v=bp(o);p(()=>v??null)});const[h,m]=FI(d&&!f,i),w=f??h;BI(r&&n&&vn()&&(w===h||w===document.body)),qI(n,l);let y=null;s&&$o(s)&&t&&(y=cr(s));const $=Hr(y,t);if(!d||!vn()||f===void 0)return null;const x=w===!1||LI();let E=s;return t&&(E=g.cloneElement(s,{ref:$})),g.createElement(gb.Provider,{value:m},x?E:po.createPortal(E,w))});process.env.NODE_ENV!=="production"&&(is.displayName="Portal");function XI(e){const{prefixCls:t,align:n,arrow:r,arrowPos:o}=e,{className:i,content:a,style:s}=r||{},{x:l=0,y:c=0}=o,u=g.useRef(null);if(!n||!n.points)return null;const d={position:"absolute"};if(n.autoArrow!==!1){const f=n.points[0],p=n.points[1],h=f[0],m=f[1],w=p[0],y=p[1];h===w||!["t","b"].includes(h)?d.top=c:h==="t"?d.top=0:d.bottom=0,m===y||!["l","r"].includes(m)?d.left=l:m==="l"?d.left=0:d.right=0}return g.createElement("div",{ref:u,className:Z(`${t}-arrow`,i),style:{...d,...s}},a)}function uc(){return uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uc.apply(this,arguments)}function UI(e){const{prefixCls:t,open:n,zIndex:r,mask:o,motion:i,mobile:a}=e;return o?g.createElement(vr,uc({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),({className:s})=>g.createElement("div",{style:{zIndex:r},className:Z(`${t}-mask`,a&&`${t}-mobile-mask`,s)})):null}const xb=g.memo(({children:e})=>e,(e,t)=>t.cache);process.env.NODE_ENV!=="production"&&(xb.displayName="PopupContent");function yb(e,t,n,r,o,i,a,s){var u;const l="auto",c=e?{}:{left:"-1000vw",top:"-1000vh",right:l,bottom:l};if(!e&&(t||!n)){const{points:d}=r,f=r.dynamicInset||((u=r._experimental)==null?void 0:u.dynamicInset),p=f&&d[0][1]==="r",h=f&&d[0][0]==="b";p?(c.right=o,c.left=l):(c.left=a,c.right=l),h?(c.bottom=i,c.top=l):(c.top=s,c.bottom=l)}return c}function dc(){return dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dc.apply(this,arguments)}const Ku=g.forwardRef((e,t)=>{const{onEsc:n,popup:r,className:o,prefixCls:i,style:a,target:s,onVisibleChanged:l,open:c,keepDom:u,fresh:d,onClick:f,mask:p,arrow:h,arrowPos:m,align:w,motion:y,maskMotion:$,mobile:x,forceRender:E,getPopupContainer:v,autoDestroy:C,portal:I,children:N,zIndex:A,onMouseEnter:k,onMouseLeave:R,onPointerEnter:O,onPointerDownCapture:z,ready:D,offsetX:M,offsetY:L,offsetR:_,offsetB:V,onAlign:X,onPrepare:P,onResize:Y,stretch:K,targetWidth:T,targetHeight:ne}=e,F=typeof r=="function"?r():r,U=c||u,re=!!x,[j,H,ee]=g.useMemo(()=>x?[x.mask,x.maskMotion,x.motion]:[p,$,y],[x,p,$,y]),oe=(v==null?void 0:v.length)>0,[B,ie]=g.useState(!v||!oe);Bt(()=>{!B&&oe&&s&&ie(!0)},[B,oe,s]);const ae=Ge((q,me)=>{Y==null||Y(q,me),X()}),Se=yb(re,D,c,w,_,V,M,L);if(!B)return null;const ye={};return K&&(K.includes("height")&&ne?ye.height=ne:K.includes("minHeight")&&ne&&(ye.minHeight=ne),K.includes("width")&&T?ye.width=T:K.includes("minWidth")&&T&&(ye.minWidth=T)),c||(ye.pointerEvents="none"),g.createElement(I,{open:E||U,getContainer:v&&(()=>v(s)),autoDestroy:C,onEsc:n},g.createElement(UI,{prefixCls:i,open:c,zIndex:A,mask:j,motion:H,mobile:re}),g.createElement(Io,{onResize:ae,disabled:!c},q=>g.createElement(vr,dc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:`${i}-hidden`},ee,{onAppearPrepare:P,onEnterPrepare:P,visible:c,onVisibleChanged:me=>{var he;(he=y==null?void 0:y.onVisibleChanged)==null||he.call(y,me),l(me)}}),({className:me,style:he},se)=>{const ue=Z(i,me,o,{[`${i}-mobile`]:re});return g.createElement("div",{ref:Gn(q,t,se),className:ue,style:{"--arrow-x":`${m.x||0}px`,"--arrow-y":`${m.y||0}px`,...Se,...ye,...he,boxSizing:"border-box",zIndex:A,...a},onMouseEnter:k,onMouseLeave:R,onPointerEnter:O,onClick:f,onPointerDownCapture:z},h&&g.createElement(XI,{prefixCls:i,arrow:h,arrowPos:m,align:w}),g.createElement(xb,{cache:!c&&!d},F))})),N)});process.env.NODE_ENV!=="production"&&(Ku.displayName="Popup");const ka=g.createContext(null),wb=g.createContext(null);function xp(e){return e?Array.isArray(e)?e:[e]:[]}function GI(e,t,n){return g.useMemo(()=>{const r=xp(t??e),o=xp(n??e),i=new Set(r),a=new Set(o);return i.has("hover")&&!i.has("click")&&i.add("touch"),a.has("hover")&&!a.has("click")&&a.add("touch"),[i,a]},[e,t,n])}function KI(e=[],t=[],n){const r=(o,i)=>o[i]||"";return n?r(e,0)===r(t,0):r(e,0)===r(t,0)&&r(e,1)===r(t,1)}function vb(e,t,n,r){var a;const{points:o}=n,i=Object.keys(e);for(let s=0;s<i.length;s+=1){const l=i[s];if(KI((a=e[l])==null?void 0:a.points,o,r))return`${t}-placement-${l}`}return""}function vi(e){return e.ownerDocument.defaultView}function fc(e){const t=[];let n=e==null?void 0:e.parentElement;const r=["hidden","scroll","clip","auto"];for(;n;){const{overflowX:o,overflowY:i,overflow:a}=vi(n).getComputedStyle(n);[o,i,a].some(s=>r.includes(s))&&t.push(n),n=n.parentElement}return t}function di(e,t=1){return Number.isNaN(e)?t:e}function _o(e){return di(parseFloat(e),0)}function yp(e,t){const n={...e};return(t||[]).forEach(r=>{if(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)return;const{overflow:o,overflowClipMargin:i,borderTopWidth:a,borderBottomWidth:s,borderLeftWidth:l,borderRightWidth:c}=vi(r).getComputedStyle(r),u=r.getBoundingClientRect(),{offsetHeight:d,clientHeight:f,offsetWidth:p,clientWidth:h}=r,m=_o(a),w=_o(s),y=_o(l),$=_o(c),x=di(Math.round(u.width/p*1e3)/1e3),E=di(Math.round(u.height/d*1e3)/1e3),v=(p-h-y-$)*x,C=(d-f-m-w)*E,I=m*E,N=w*E,A=y*x,k=$*x;let R=0,O=0;if(o==="clip"){const _=_o(i);R=_*x,O=_*E}const z=u.x+A-R,D=u.y+I-O,M=z+u.width+2*R-A-k-v,L=D+u.height+2*O-I-N-C;n.left=Math.max(n.left,z),n.top=Math.max(n.top,D),n.right=Math.min(n.right,M),n.bottom=Math.min(n.bottom,L)}),n}function wp(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function vp(e,t){const[n,r]=t||[];return[wp(e.width,n),wp(e.height,r)]}function Cp(e=""){return[e[0],e[1]]}function Gr(e,t){const n=t[0],r=t[1];let o,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?o=e.x:r==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function fr(e,t){const n={t:"b",b:"t",l:"r",r:"l"},r=[...e];return r[t]=n[e[t]]||"c",r}function Sp(e){return e.join("")}function Cb(e,t,n,r,o,i,a,s){const[l,c]=g.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),u=g.useRef(0),d=g.useMemo(()=>!t||s?[]:fc(t),[t]),f=g.useRef({});e||(()=>{f.current={}})();const h=Ge(()=>{var y,$;if(t&&n&&e&&!s){let it=function(Le,Tt,Nt=me){const Vn=_.x+Le,Er=_.y+Tt,zi=Vn+re,xd=Er+U,xs=Math.max(Vn,Nt.left),ys=Math.max(Er,Nt.top),ws=Math.min(zi,Nt.right),Ce=Math.min(xd,Nt.bottom);return Math.max(0,(ws-xs)*(Ce-ys))},Hn=function(){Rt=_.y+Me,Sn=Rt+U,Ht=_.x+ze,an=Ht+re};const x=t,E=x.ownerDocument,v=vi(x),{position:C}=v.getComputedStyle(x),I=x.style.left,N=x.style.top,A=x.style.right,k=x.style.bottom,R=x.style.overflow,O=x.style.overflowX,z=x.style.overflowY,D={...o[r],...i},M=E.createElement("div");(y=x.parentElement)==null||y.appendChild(M),M.style.left=`${x.offsetLeft}px`,M.style.top=`${x.offsetTop}px`,M.style.position=C,M.style.height=`${x.offsetHeight}px`,M.style.width=`${x.offsetWidth}px`,x.style.left="0",x.style.top="0",x.style.right="auto",x.style.bottom="auto",x.style.overflow="hidden";let L;if(Array.isArray(n))L={x:n[0],y:n[1],width:0,height:0};else{const Le=n.getBoundingClientRect();Le.x=Le.x??Le.left,Le.y=Le.y??Le.top,L={x:Le.x,y:Le.y,width:Le.width,height:Le.height}}const _=x.getBoundingClientRect(),{height:V,width:X}=v.getComputedStyle(x);_.x=_.x??_.left,_.y=_.y??_.top;const{clientWidth:P,clientHeight:Y,scrollWidth:K,scrollHeight:T,scrollTop:ne,scrollLeft:F}=E.documentElement,U=_.height,re=_.width,j=L.height,H=L.width,ee={left:0,top:0,right:P,bottom:Y},oe={left:-F,top:-ne,right:K-F,bottom:T-ne};let{htmlRegion:B}=D;const ie="visible",ae="visibleFirst";B!=="scroll"&&B!==ae&&(B=ie);const Se=B===ae,ye=yp(oe,d),q=yp(ee,d),me=B===ie?q:ye,he=Se?q:me;x.style.left="auto",x.style.top="auto",x.style.right="0",x.style.bottom="0";const se=x.getBoundingClientRect();x.style.left=I,x.style.top=N,x.style.right=A,x.style.bottom=k,x.style.overflow=R,x.style.overflowX=O,x.style.overflowY=z,($=x.parentElement)==null||$.removeChild(M);const ue=di(Math.round(re/parseFloat(X)*1e3)/1e3),pe=di(Math.round(U/parseFloat(V)*1e3)/1e3);if(ue===0||pe===0||go(n)&&!ku(n))return;const{offset:Ne,targetOffset:Ee}=D;let[Ie,W]=vp(_,Ne);const[Q,le]=vp(L,Ee);L.x-=Q,L.y-=le;const[be,$e]=D.points||[],ce=Cp($e),te=Cp(be),ve=Gr(L,ce),Re=Gr(_,te),Ue={...D};let Pe=[te,ce],ze=ve.x-Re.x+Ie,Me=ve.y-Re.y+W;const Ye=it(ze,Me),It=it(ze,Me,q),wt=Gr(L,["t","l"]),Ot=Gr(_,["t","l"]),gt=Gr(L,["b","r"]),_t=Gr(_,["b","r"]),jt=D.overflow||{},{adjustX:_e,adjustY:pt,shiftX:Cn,shiftY:jn}=jt,Bn=Le=>typeof Le=="boolean"?Le:Le>=0;let Rt,Sn,Ht,an;Hn();const fn=Bn(pt),pn=te[0]===ce[0];if(fn&&te[0]==="t"&&(Sn>he.bottom||f.current.bt)){let Le=Me;pn?Le-=U-j:Le=wt.y-_t.y-W;const Tt=it(ze,Le),Nt=it(ze,Le,q);Tt>Ye||Tt===Ye&&(!Se||Nt>=It)?(f.current.bt=!0,Me=Le,W=-W,Pe=[fr(Pe[0],0),fr(Pe[1],0)]):f.current.bt=!1}if(fn&&te[0]==="b"&&(Rt<he.top||f.current.tb)){let Le=Me;pn?Le+=U-j:Le=gt.y-Ot.y-W;const Tt=it(ze,Le),Nt=it(ze,Le,q);Tt>Ye||Tt===Ye&&(!Se||Nt>=It)?(f.current.tb=!0,Me=Le,W=-W,Pe=[fr(Pe[0],0),fr(Pe[1],0)]):f.current.tb=!1}const en=Bn(_e),Dt=te[1]===ce[1];if(en&&te[1]==="l"&&(an>he.right||f.current.rl)){let Le=ze;Dt?Le-=re-H:Le=wt.x-_t.x-Ie;const Tt=it(Le,Me),Nt=it(Le,Me,q);Tt>Ye||Tt===Ye&&(!Se||Nt>=It)?(f.current.rl=!0,ze=Le,Ie=-Ie,Pe=[fr(Pe[0],1),fr(Pe[1],1)]):f.current.rl=!1}if(en&&te[1]==="r"&&(Ht<he.left||f.current.lr)){let Le=ze;Dt?Le+=re-H:Le=gt.x-Ot.x-Ie;const Tt=it(Le,Me),Nt=it(Le,Me,q);Tt>Ye||Tt===Ye&&(!Se||Nt>=It)?(f.current.lr=!0,ze=Le,Ie=-Ie,Pe=[fr(Pe[0],1),fr(Pe[1],1)]):f.current.lr=!1}Ue.points=[Sp(Pe[0]),Sp(Pe[1])],Hn();const at=Cn===!0?0:Cn;typeof at=="number"&&(Ht<q.left&&(ze-=Ht-q.left-Ie,L.x+H<q.left+at&&(ze+=L.x-q.left+H-at)),an>q.right&&(ze-=an-q.right-Ie,L.x>q.right-at&&(ze+=L.x-q.right+at)));const Vt=jn===!0?0:jn;typeof Vt=="number"&&(Rt<q.top&&(Me-=Rt-q.top-W,L.y+j<q.top+Vt&&(Me+=L.y-q.top+j-Vt)),Sn>q.bottom&&(Me-=Sn-q.bottom-W,L.y>q.bottom-Vt&&(Me+=L.y-q.bottom+Vt)));const vt=_.x+ze,Oe=vt+re,Qe=_.y+Me,st=Qe+U,Be=L.x,G=Be+H,ge=L.y,de=ge+j,we=Math.max(vt,Be),Te=Math.min(Oe,G),Fe=(we+Te)/2-vt,De=Math.max(Qe,ge),ft=Math.min(st,de),ht=(De+ft)/2-Qe;a==null||a(t,Ue);let Ct=se.right-_.x-(ze+_.width),mt=se.bottom-_.y-(Me+_.height);ue===1&&(ze=Math.floor(ze),Ct=Math.floor(Ct)),pe===1&&(Me=Math.floor(Me),mt=Math.floor(mt));const Lt={ready:!0,offsetX:ze/ue,offsetY:Me/pe,offsetR:Ct/ue,offsetB:mt/pe,arrowX:Fe/ue,arrowY:ht/pe,scaleX:ue,scaleY:pe,align:Ue};c(Lt)}}),m=()=>{u.current+=1;const y=u.current;Promise.resolve().then(()=>{u.current===y&&h()})},w=()=>{c(y=>({...y,ready:!1}))};return Bt(w,[r]),Bt(()=>{e||w()},[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,m]}function Sb(){const e=g.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},n=(r,o)=>{t(),o===0?r():e.current=setTimeout(()=>{r()},o*1e3)};return g.useEffect(()=>()=>{t()},[]),n}function YI(e,t,n,r,o){Bt(()=>{if(e&&t&&n){let d=function(){r(),o()};const i=t,a=n,s=fc(i),l=fc(a),c=vi(a),u=new Set([c,...s,...l]);return u.forEach(f=>{f.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),r(),()=>{u.forEach(f=>{f.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[e,t,n])}function QI(e,t,n,r,o,i,a,s){const l=g.useRef(e);l.current=e;const c=g.useRef(!1);g.useEffect(()=>{var d,f;if(t&&r&&(!o||i)){const p=()=>{c.current=!1},h=y=>{var $,x;l.current&&!a(((x=($=y.composedPath)==null?void 0:$.call(y))==null?void 0:x[0])||y.target)&&!c.current&&s(!1)},m=vi(r);m.addEventListener("pointerdown",p,!0),m.addEventListener("mousedown",h,!0),m.addEventListener("contextmenu",h,!0);const w=Rl(n);if(w&&(w.addEventListener("mousedown",h,!0),w.addEventListener("contextmenu",h,!0)),process.env.NODE_ENV!=="production"&&n){const y=(d=n.getRootNode)==null?void 0:d.call(n),$=(f=r.getRootNode)==null?void 0:f.call(r);tt(y===$,"trigger element and popup element should in same shadow root.")}return()=>{m.removeEventListener("pointerdown",p,!0),m.removeEventListener("mousedown",h,!0),m.removeEventListener("contextmenu",h,!0),w&&(w.removeEventListener("mousedown",h,!0),w.removeEventListener("contextmenu",h,!0))}}},[t,n,r,o,i]);function u(){c.current=!0}return u}function ZI(){const[e,t]=b.useState(null),[n,r]=b.useState(!1),[o,i]=b.useState(!1),a=b.useRef(null),s=Ge(c=>{c===!1?(a.current=null,r(!1)):o&&n?a.current=c:(r(!0),t(c),a.current=null,n||i(!0))}),l=Ge(c=>{c?(i(!1),a.current&&(t(a.current),a.current=null)):(i(!1),a.current=null)});return[s,n,e,l]}function pc(){return pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pc.apply(this,arguments)}const JI=e=>{const{prefixCls:t,isMobile:n,ready:r,open:o,align:i,offsetR:a,offsetB:s,offsetX:l,offsetY:c,arrowPos:u,popupSize:d,motion:f,uniqueContainerClassName:p,uniqueContainerStyle:h}=e,m=`${t}-unique-container`,[w,y]=b.useState(!1),$=yb(n,r,o,i,a,s,l,c),x=b.useRef($);r&&(x.current=$);const E={};return d&&(E.width=d.width,E.height=d.height),b.createElement(vr,pc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${m}-hidden`},f,{visible:o,onVisibleChanged:v=>{y(v)}}),({className:v,style:C})=>{const I=Z(m,v,p,{[`${m}-visible`]:w});return b.createElement("div",{className:I,style:{"--arrow-x":`${(u==null?void 0:u.x)||0}px`,"--arrow-y":`${(u==null?void 0:u.y)||0}px`,...x.current,...E,...C,...h}})})},eR=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=ZI(),a=g.useMemo(()=>!o||!t?o:t(o),[o,t]),[s,l]=g.useState(null),[c,u]=g.useState(null),d=g.useRef(null),f=Ge(V=>{d.current=V,go(V)&&s!==V&&l(V)}),p=g.useRef(null),h=Sb(),m=Ge((V,X)=>{p.current=X,h(()=>{n(V)},V.delay)}),w=V=>{h(()=>{var X;(X=p.current)!=null&&X.call(p)||n(!1)},V)},y=Ge(V=>{i(V)}),[$,x,E,v,C,I,N,,,A,k]=Cb(r,s,a==null?void 0:a.target,a==null?void 0:a.popupPlacement,(a==null?void 0:a.builtinPlacements)||{},a==null?void 0:a.popupAlign,void 0,!1),R=g.useMemo(()=>{var X;if(!a)return"";const V=vb(a.builtinPlacements||{},a.prefixCls||"",A,!1);return Z(V,(X=a.getPopupClassNameFromAlign)==null?void 0:X.call(a,A))},[A,a==null?void 0:a.getPopupClassNameFromAlign,a==null?void 0:a.builtinPlacements,a==null?void 0:a.prefixCls]),O=g.useMemo(()=>({show:m,hide:w}),[]);g.useEffect(()=>{k()},[a==null?void 0:a.target]);const z=Ge(()=>(k(),Promise.resolve())),D=g.useRef({}),M=g.useContext(ka),L=g.useMemo(()=>({registerSubPopup:(V,X)=>{D.current[V]=X,M==null||M.registerSubPopup(V,X)}}),[M]),_=a==null?void 0:a.prefixCls;return g.createElement(wb.Provider,{value:O},e,a&&g.createElement(ka.Provider,{value:L},g.createElement(Ku,{ref:f,portal:is,onEsc:a.onEsc,prefixCls:_,popup:a.popup,className:Z(a.popupClassName,R,`${_}-unique-controlled`),style:a.popupStyle,target:a.target,open:r,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:y,ready:$,offsetX:x,offsetY:E,offsetR:v,offsetB:C,onAlign:k,onPrepare:z,onResize:V=>u({width:V.offsetWidth,height:V.offsetHeight}),arrowPos:{x:I,y:N},align:A,zIndex:a.zIndex,mask:a.mask,arrow:a.arrow,motion:a.popupMotion,maskMotion:a.maskMotion,getPopupContainer:a.getPopupContainer},g.createElement(JI,{prefixCls:_,isMobile:!1,ready:$,open:r,align:A,offsetR:v,offsetB:C,offsetX:x,offsetY:E,arrowPos:{x:I,y:N},popupSize:c,motion:a.popupMotion,uniqueContainerClassName:Z(a.uniqueContainerClassName,R),uniqueContainerStyle:a.uniqueContainerStyle}))))};function tR(e=is){const t=g.forwardRef((n,r)=>{const{prefixCls:o="rc-trigger-popup",children:i,action:a="hover",showAction:s,hideAction:l,disabled:c=!1,popupVisible:u,defaultPopupVisible:d,onOpenChange:f,afterOpenChange:p,onPopupVisibleChange:h,afterPopupVisibleChange:m,mouseEnterDelay:w,mouseLeaveDelay:y=.1,focusDelay:$,blurDelay:x,mask:E,maskClosable:v=!0,getPopupContainer:C,forceRender:I,autoDestroy:N,popup:A,popupClassName:k,uniqueContainerClassName:R,uniqueContainerStyle:O,popupStyle:z,popupPlacement:D,builtinPlacements:M={},popupAlign:L,zIndex:_,stretch:V,getPopupClassNameFromAlign:X,fresh:P,unique:Y,alignPoint:K,onPopupClick:T,onPopupAlign:ne,arrow:F,popupMotion:U,maskMotion:re,mobile:j,...H}=n,ee=N||!1,oe=u===void 0,B=!!j,ie=g.useRef({}),ae=g.useContext(ka),Se=g.useMemo(()=>({registerSubPopup:(Ce,qe)=>{ie.current[Ce]=qe,ae==null||ae.registerSubPopup(Ce,qe)}}),[ae]),ye=g.useContext(wb),q=Ka(),[me,he]=g.useState(null),se=g.useRef(null),ue=Ge(Ce=>{se.current=Ce,go(Ce)&&me!==Ce&&he(Ce),ae==null||ae.registerSubPopup(q,Ce)}),[pe,Ne]=g.useState(null),Ee=g.useRef(null),Ie=Ge(Ce=>{const qe=$u(Ce);go(qe)&&pe!==qe&&(Ne(qe),Ee.current=qe)}),W={},Q=Ge(Ce=>{var Wt,Wr;const qe=pe;return(qe==null?void 0:qe.contains(Ce))||((Wt=Rl(qe))==null?void 0:Wt.host)===Ce||Ce===qe||(me==null?void 0:me.contains(Ce))||((Wr=Rl(me))==null?void 0:Wr.host)===Ce||Ce===me||Object.values(ie.current).some($r=>($r==null?void 0:$r.contains(Ce))||Ce===$r)}),le=F?{...F!==!0?F:{}}:null,[be,$e]=un(d||!1,u),ce=be||!1,te=ce&&!c,ve=g.useMemo(()=>{const Ce=typeof i=="function"?i({open:te}):i;return g.Children.only(Ce)},[i,te]),Re=(ve==null?void 0:ve.props)||{},Ue=Ge(()=>te),Pe=Ge((Ce=0)=>({popup:A,target:pe,delay:Ce,prefixCls:o,popupClassName:k,uniqueContainerClassName:R,uniqueContainerStyle:O,popupStyle:z,popupPlacement:D,builtinPlacements:M,popupAlign:L,zIndex:_,mask:E,maskClosable:v,popupMotion:U,maskMotion:re,arrow:le,getPopupContainer:C,getPopupClassNameFromAlign:X,id:q,onEsc:It}));Bt(()=>{ye&&Y&&pe&&!oe&&!ae&&(te?ye.show(Pe(w),Ue):ye.hide(y))},[te,pe]);const ze=g.useRef(te);ze.current=te;const Me=Ge(Ce=>{po.flushSync(()=>{ce!==Ce&&($e(Ce),f==null||f(Ce),h==null||h(Ce))})}),it=Sb(),Ye=(Ce,qe=0)=>{if(u!==void 0){it(()=>{Me(Ce)},qe);return}if(ye&&Y&&oe&&!ae){Ce?ye.show(Pe(qe),Ue):ye.hide(qe);return}it(()=>{Me(Ce)},qe)};function It({top:Ce}){Ce&&Ye(!1)}const[wt,Ot]=g.useState(!1);Bt(Ce=>{(!Ce||te)&&Ot(!0)},[te]);const[gt,_t]=g.useState(null),[jt,_e]=g.useState(null),pt=Ce=>{_e([Ce.clientX,Ce.clientY])},[Cn,jn,Bn,Rt,Sn,Ht,an,Hn,fn,pn,en]=Cb(te,me,K&&jt!==null?jt:pe,D,M,L,ne,B),[Dt,at]=GI(a,s,l),Vt=Dt.has("click"),vt=at.has("click")||at.has("contextMenu"),Oe=Ge(()=>{wt||en()});YI(te,pe,me,Oe,()=>{ze.current&&K&&vt&&Ye(!1)}),Bt(()=>{Oe()},[jt,D]),Bt(()=>{te&&!(M!=null&&M[D])&&Oe()},[JSON.stringify(L)]);const st=g.useMemo(()=>{const Ce=vb(M,o,pn,K);return Z(Ce,X==null?void 0:X(pn))},[pn,X,M,o,K]);g.useImperativeHandle(r,()=>({nativeElement:Ee.current,popupElement:se.current,forceAlign:Oe}));const[Be,G]=g.useState(0),[ge,de]=g.useState(0),we=()=>{if(V&&pe){const Ce=pe.getBoundingClientRect();G(Ce.width),de(Ce.height)}},Te=()=>{we(),Oe()},ke=Ce=>{Ot(!1),en(),p==null||p(Ce),m==null||m(Ce)},Fe=()=>new Promise(Ce=>{we(),_t(()=>Ce)});Bt(()=>{gt&&(en(),gt(),_t(null))},[gt]);function De(Ce,qe,Wt,Wr,$r){W[Ce]=(yd,...B0)=>{var wd;(!$r||!$r())&&(Wr==null||Wr(yd),Ye(qe,Wt)),(wd=Re[Ce])==null||wd.call(Re,yd,...B0)}}const ft=Dt.has("touch"),Pt=at.has("touch"),ht=g.useRef(!1);(ft||Pt)&&(W.onTouchStart=(...Ce)=>{var qe;ht.current=!0,ze.current&&Pt?Ye(!1):!ze.current&&ft&&Ye(!0),(qe=Re.onTouchStart)==null||qe.call(Re,...Ce)}),(Vt||vt)&&(W.onClick=(Ce,...qe)=>{var Wt;ze.current&&vt?Ye(!1):!ze.current&&Vt&&(pt(Ce),Ye(!0)),(Wt=Re.onClick)==null||Wt.call(Re,Ce,...qe),ht.current=!1});const Ct=QI(te,vt||Pt,pe,me,E,v,Q,Ye),mt=Dt.has("hover"),Lt=at.has("hover");let Le,Tt;const Nt=()=>ht.current;if(mt){const Ce=qe=>{pt(qe)};De("onMouseEnter",!0,w,Ce,Nt),De("onPointerEnter",!0,w,Ce,Nt),Le=qe=>{(te||wt)&&(me!=null&&me.contains(qe.target))&&Ye(!0,w)},K&&(W.onMouseMove=qe=>{var Wt;(Wt=Re.onMouseMove)==null||Wt.call(Re,qe)})}Lt&&(De("onMouseLeave",!1,y,void 0,Nt),De("onPointerLeave",!1,y,void 0,Nt),Tt=()=>{Ye(!1,y)}),Dt.has("focus")&&De("onFocus",!0,$),at.has("focus")&&De("onBlur",!1,x),Dt.has("contextMenu")&&(W.onContextMenu=(Ce,...qe)=>{var Wt;ze.current&&at.has("contextMenu")?Ye(!1):(pt(Ce),Ye(!0)),Ce.preventDefault(),(Wt=Re.onContextMenu)==null||Wt.call(Re,Ce,...qe)});const Vn=g.useRef(!1);Vn.current||(Vn.current=I||te||wt);const Er={...Re,...W},zi={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(Ce=>{H[Ce]&&(zi[Ce]=(...qe)=>{var Wt;(Wt=Er[Ce])==null||Wt.call(Er,...qe),H[Ce](...qe)})});const xs={x:Ht,y:an};Lh(te,pe,Te);const ys=Hr(Ie,cr(ve)),ws=g.cloneElement(ve,{...Er,...zi,ref:ys});return g.createElement(g.Fragment,null,ws,Vn.current&&(!ye||!Y)&&g.createElement(ka.Provider,{value:Se},g.createElement(Ku,{portal:e,ref:ue,prefixCls:o,popup:A,className:Z(k,!B&&st),style:z,target:pe,onMouseEnter:Le,onMouseLeave:Tt,onPointerEnter:Le,zIndex:_,open:te,keepDom:wt,fresh:P,onClick:T,onPointerDownCapture:Ct,mask:E,motion:U,maskMotion:re,onVisibleChanged:ke,onPrepare:Fe,forceRender:I,autoDestroy:ee,getPopupContainer:C,onEsc:It,align:pn,arrow:le,arrowPos:xs,ready:Cn,offsetX:jn,offsetY:Bn,offsetR:Rt,offsetB:Sn,onAlign:Oe,stretch:V,targetWidth:Be/Hn,targetHeight:ge/fn,mobile:j})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const Yu=tR(is);function Eb(e){return e&&b.isValidElement(e)&&e.type===b.Fragment}const nR=(e,t,n)=>b.isValidElement(e)?b.cloneElement(e,Qt(n)?n(e.props||{}):n):t;function Dn(e,t){return nR(e,e,t)}const rR=({children:e})=>{const{getPrefixCls:t}=b.useContext(dt),n=t();return b.isValidElement(e)?b.createElement(vr,{visible:!0,motionName:`${n}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:r,className:o})=>Dn(e,i=>({className:Z(i.className,o),style:{...i.style,...r}}))):e},Xi=[null,null];function oR(e){if(Xi[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:!1}}),Xi[0]=e,Xi[1]=t}return Xi[1]}const $b=({children:e})=>{const t=n=>{const{id:r,builtinPlacements:o,popup:i}=n,a=Qt(i)?i():i,s=oR(o);return{...n,getPopupContainer:null,arrow:!1,popup:b.createElement(rR,{key:r},a),builtinPlacements:s}};return b.createElement(eR,{postTriggerProps:t},e)},yr=g.createContext(!1),iR=({children:e,disabled:t})=>{const n=g.useContext(yr);return g.createElement(yr.Provider,{value:t??n},e)},xo=g.createContext(void 0),aR=({children:e,size:t})=>{const n=g.useContext(xo);return g.createElement(xo.Provider,{value:t||n},e)};function sR(){const e=b.useContext(yr),t=b.useContext(xo);return{componentDisabled:e,componentSize:t}}function lR(e,t,n){var s;const r=At("ConfigProvider"),o=e||{},i=o.inherit===!1||!t?{...Sa,hashed:(t==null?void 0:t.hashed)??Sa.hashed,cssVar:t==null?void 0:t.cssVar,zeroRuntime:t==null?void 0:t.zeroRuntime}:t,a=b.useId();if(process.env.NODE_ENV!=="production"){const l=o.cssVar||i.cssVar,c=!!(rn(o.cssVar)&&((s=o.cssVar)!=null&&s.key)||a);process.env.NODE_ENV!=="production"&&r(!l||c,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return Ya(()=>{var d;if(!e)return t;const l={...i.components};Object.keys(e.components||{}).forEach(f=>{l[f]={...l[f],...e.components[f]}});const c=`css-var-${a.replace(/:/g,"")}`,u={prefix:n==null?void 0:n.prefixCls,...i.cssVar,...o.cssVar,key:((d=o.cssVar)==null?void 0:d.key)||c};return{...i,...o,token:{...i.token,...o.token},components:l,cssVar:u}},[o,i,n==null?void 0:n.prefixCls,a],(l,c)=>l.some((u,d)=>{const f=c[d];return!ai(u,f,!0)}))}const mc=g.createContext(!0);process.env.NODE_ENV!=="production"&&(mc.displayName="MotionCacheContext");function cR(e){const t=g.useContext(mc),{children:n}=e,[,r]=Cr(),{motion:o}=r,i=g.useRef(!1);return i.current||(i.current=t!==o),i.current?g.createElement(mc.Provider,{value:o},g.createElement(q$,{motion:o},n)):n}const kb=g.memo(e=>{const{dropdownMatchSelectWidth:t}=e;return At("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(kb.displayName="PropWarning");const uR=process.env.NODE_ENV!=="production"?kb:()=>null,dR=({iconPrefixCls:e,csp:t})=>(cI(e,t),null);let gc=!1;process.env.NODE_ENV;const fR=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],pR=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e},mR=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,app:s,form:l,locale:c,componentSize:u,direction:d,space:f,splitter:p,virtual:h,dropdownMatchSelectWidth:m,popupMatchSelectWidth:w,popupOverflow:y,legacyLocale:$,parentContext:x,iconPrefixCls:E,theme:v,componentDisabled:C,segmented:I,statistic:N,spin:A,calendar:k,carousel:R,cascader:O,collapse:z,typography:D,checkbox:M,descriptions:L,divider:_,drawer:V,skeleton:X,steps:P,image:Y,layout:K,list:T,listy:ne,mentions:F,modal:U,progress:re,result:j,slider:H,breadcrumb:ee,masonry:oe,menu:B,pagination:ie,input:ae,inputPassword:Se,inputSearch:ye,textArea:q,otp:me,empty:he,badge:se,borderBeam:ue,radio:pe,rate:Ne,ribbon:Ee,switch:Ie,transfer:W,avatar:Q,message:le,tag:be,table:$e,card:ce,cardMeta:te,tabs:ve,timeline:Re,timePicker:Ue,upload:Pe,notification:ze,tree:Me,colorPicker:it,datePicker:Ye,rangePicker:It,flex:wt,wave:Ot,dropdown:gt,warning:_t,tour:jt,tooltip:_e,popover:pt,popconfirm:Cn,qrcode:jn,floatButton:Bn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Hn}=e,fn=g.useMemo(()=>{var de;return rn(c)&&Object.prototype.hasOwnProperty.call(c,"default")&&((de=c.default)!=null&&de.locale)?c.default:c},[c]),pn=g.useCallback((de,we)=>{const{prefixCls:Te}=e;if(we)return we;const ke=Te||x.getPrefixCls("");return de?`${ke}-${de}`:ke},[x.getPrefixCls,e.prefixCls]),en=E||x.iconPrefixCls||ju,Dt=n||x.csp,at=lR(v,x.theme,{prefixCls:pn("")});process.env.NODE_ENV!=="production"&&(gc=gc||!!at);const Vt={csp:Dt,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,app:s,locale:fn||$,direction:d,space:f,splitter:p,virtual:h,popupMatchSelectWidth:w??m,popupOverflow:y,getPrefixCls:pn,iconPrefixCls:en,theme:at,segmented:I,statistic:N,spin:A,calendar:k,carousel:R,cascader:O,collapse:z,typography:D,checkbox:M,descriptions:L,divider:_,drawer:V,skeleton:X,steps:P,image:Y,input:ae,inputPassword:Se,inputSearch:ye,textArea:q,otp:me,layout:K,list:T,listy:ne,mentions:F,modal:U,progress:re,result:j,slider:H,breadcrumb:ee,masonry:oe,menu:B,pagination:ie,empty:he,badge:se,borderBeam:ue,radio:pe,rate:Ne,ribbon:Ee,switch:Ie,transfer:W,avatar:Q,message:le,tag:be,table:$e,card:ce,cardMeta:te,tabs:ve,timeline:Re,timePicker:Ue,upload:Pe,notification:ze,tree:Me,colorPicker:it,datePicker:Ye,rangePicker:It,flex:wt,wave:Ot,dropdown:gt,warning:_t,tour:jt,tooltip:_e,popover:pt,popconfirm:Cn,qrcode:jn,floatButton:Bn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Hn};process.env.NODE_ENV!=="production"&&At("ConfigProvider")(!("autoInsertSpaceInButton"in e),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const vt={...x};Object.keys(Vt).forEach(de=>{Vt[de]!==void 0&&(vt[de]=Vt[de])}),fR.forEach(de=>{const we=e[de];we&&(vt[de]=we)}),typeof r<"u"&&(vt.button={autoInsertSpace:r,...vt.button});const Oe=Ya(()=>vt,vt,(de,we)=>{const Te=Object.keys(de),ke=Object.keys(we);return Te.length!==ke.length||Te.some(Fe=>de[Fe]!==we[Fe])}),{layer:Qe}=g.useContext(wi),st=g.useMemo(()=>({prefixCls:en,csp:Dt,layer:Qe?"antd":void 0,zeroRuntime:!!Qe||(at==null?void 0:at.zeroRuntime)}),[en,Dt,Qe,at==null?void 0:at.zeroRuntime]);let Be=g.createElement(g.Fragment,null,g.createElement(dR,{iconPrefixCls:en,csp:Dt}),g.createElement(uR,{dropdownMatchSelectWidth:m}),t);const G=g.useMemo(()=>{var de,we,Te,ke;return oo(((de=bo.Form)==null?void 0:de.defaultValidateMessages)||{},((Te=(we=Oe.locale)==null?void 0:we.Form)==null?void 0:Te.defaultValidateMessages)||{},((ke=Oe.form)==null?void 0:ke.validateMessages)||{},(l==null?void 0:l.validateMessages)||{})},[Oe,l==null?void 0:l.validateMessages]);Object.keys(G).length>0&&(Be=g.createElement(TI.Provider,{value:G},Be)),fn&&(Be=g.createElement(mb,{locale:fn,_ANT_MARK__:pb},Be)),Be=g.createElement(Fu.Provider,{value:st},Be),u&&(Be=g.createElement(aR,{size:u},Be)),Be=g.createElement(cR,null,Be),_e!=null&&_e.unique&&(Be=g.createElement($b,null,Be));const ge=g.useMemo(()=>{const{algorithm:de,token:we,components:Te,cssVar:ke,...Fe}=at||{},De=de&&(!Array.isArray(de)||de.length>0)?wa(de):Qh,ft={};Object.entries(Te||{}).forEach(([ht,Ct])=>{const mt={...Ct};"algorithm"in mt&&(mt.algorithm===!0?mt.theme=De:(Array.isArray(mt.algorithm)||Qt(mt.algorithm))&&(mt.theme=wa(mt.algorithm)),delete mt.algorithm),ft[ht]=mt});const Pt={...ui,...we};return{...Fe,theme:De,token:Pt,components:ft,override:{override:Pt,...ft},cssVar:ke}},[at]);return v&&(Be=g.createElement(Bu.Provider,{value:ge},Be)),Oe.warning&&(Be=g.createElement(zh.Provider,{value:Oe.warning},Be)),C!==void 0&&(Be=g.createElement(iR,{disabled:C},Be)),g.createElement(dt.Provider,{value:Oe},Be)},Sr=e=>{const t=g.useContext(dt),n=g.useContext(Uu);return g.createElement(mR,{parentContext:t,legacyLocale:n,...e})};Sr.ConfigContext=dt;Sr.SizeContext=xo;Sr.config=pR;Sr.useConfig=sR;Object.defineProperty(Sr,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&_u(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),xo)});process.env.NODE_ENV!=="production"&&(Sr.displayName="ConfigProvider");var gR={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 hc(){return hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hc.apply(this,arguments)}const hR=(e,t)=>g.createElement(Jt,hc({},e,{ref:t,icon:gR})),Ib=g.forwardRef(hR);process.env.NODE_ENV!=="production"&&(Ib.displayName="LoadingOutlined");function Rb(...e){return e.find(t=>t!==void 0)}const Pb=e=>{const{allowClear:t,clearIcon:n,contextAllowClear:r,contextClearIcon:o,defaultAllowClear:i,componentName:a}=e;return process.env.NODE_ENV!=="production"&&At(a).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}"),b.useMemo(()=>t??r??i?{clearIcon:Rb(rn(t)?t==null?void 0:t.clearIcon:n,rn(r)?r==null?void 0:r.clearIcon:o,b.createElement(sb,null)),disabled:(rn(t)?t==null?void 0:t.disabled:void 0)??(rn(r)?r==null?void 0:r.disabled:void 0)}:!1,[t,n,r,o,i])},Ep=e=>e==="horizontal"||e==="vertical",Qu=(e,t,n)=>b.useMemo(()=>{const r=Ep(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=Ep(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),as=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(as.displayName="ZIndexContext");const Jn=100,bR=10,xR=Jn*bR,yR=xR+Jn,Tb={Modal:Jn,Drawer:Jn,Popover:Jn,Popconfirm:Jn,Tooltip:Jn,Tour:Jn,FloatButton:Jn},wR={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},vR=e=>e in Tb,Zu=(e,t)=>{const[,n]=Cr(),r=b.useContext(as),o=vR(e);let i;if(t!==void 0)i=[t,t];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+Tb[e]:a+=wR[e],i=[r===void 0?t:a,a]}if(process.env.NODE_ENV!=="production"){const a=At(e),s=n.zIndexPopupBase+yR,l=i[0]||0;process.env.NODE_ENV!=="production"&&a(t!==void 0||l<=s,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return i},Ks=()=>({height:0,opacity:0}),$p=e=>({height:(e==null?void 0:e.scrollHeight)??0,opacity:e?1:0}),CR=e=>({height:(e==null?void 0:e.offsetHeight)??0}),Ys=(e,t)=>(t==null?void 0:t.deadline)===!0||lb(t)&&t.propertyName==="height",SR=(e=va)=>({motionName:`${e}-motion-collapse`,onAppearStart:Ks,onEnterStart:Ks,onAppearActive:$p,onEnterActive:$p,onLeaveStart:CR,onLeaveActive:Ks,onAppearEnd:Ys,onEnterEnd:Ys,onLeaveEnd:Ys,motionDeadline:500}),ER=(e,t,n)=>n!==void 0?n:`${e}-${t}`,$R=e=>{const{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:o,motionEaseOutCirc:i,antCls:a}=e,[,s]=ur(a,"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(l=>`${l} ${i}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(l=>`${l} ${r} ${o}`).join(",")}}}}},kR=aI("Wave",$R),Nb=`${va}-wave-target`,kp=e=>e?br(e)&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&e!=="transparent"&&e!=="canvastext":!1;function IR(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:o,backgroundColor:i}=n;return t&&kp(n[t])?n[t]:[r,o,i].find(kp)??null}function Qs(e){return Number.isNaN(e)?0:e}const RR=e=>{const{className:t,target:n,component:r,colorSource:o}=e,i=g.useRef(null),{getPrefixCls:a}=g.useContext(dt),s=a(),[l]=ur(s,"wave"),[c,u]=g.useState(null),[d,f]=g.useState([]),[p,h]=g.useState(0),[m,w]=g.useState(0),[y,$]=g.useState(0),[x,E]=g.useState(0),[v,C]=g.useState(!1),I={left:p,top:m,width:y,height:x,borderRadius:d.map(k=>`${k}px`).join(" ")};c&&(I[l("color")]=c);function N(){const k=getComputedStyle(n);u(IR(n,o));const R=k.position==="static",{borderLeftWidth:O,borderTopWidth:z}=k;h(R?n.offsetLeft:Qs(-Number.parseFloat(O))),w(R?n.offsetTop:Qs(-Number.parseFloat(z))),$(n.offsetWidth),E(n.offsetHeight);const{borderTopLeftRadius:D,borderTopRightRadius:M,borderBottomLeftRadius:L,borderBottomRightRadius:_}=k;f([D,M,_,L].map(V=>Qs(Number.parseFloat(V))))}if(g.useEffect(()=>{if(n){const k=xt(()=>{N(),C(!0)});let R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(N),R.observe(n)),()=>{xt.cancel(k),R==null||R.disconnect()}}},[n]),!v)return null;const A=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(Nb));return g.createElement(vr,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(k,R)=>{var O;if(R.deadline||lb(R)&&R.propertyName==="opacity"){const z=(O=i.current)==null?void 0:O.parentElement;W$(z).then(()=>{z==null||z.remove()})}return!1}},({className:k},R)=>g.createElement("div",{ref:Gn(i,R),className:Z(t,k,{"wave-quick":A}),style:I}))},PR=(e,t)=>{var o;const{component:n}=t;if(n==="Checkbox"&&!((o=e.querySelector("input"))!=null&&o.checked))return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e==null||e.insertBefore(r,e==null?void 0:e.firstChild),V$(g.createElement(RR,{...t,target:e}),r)},TR=(e,t,n,r)=>{const{wave:o}=g.useContext(dt),[,i,a]=Cr(),s=Ge(u=>{const d=e.current;if(o!=null&&o.disabled||!d)return;const f=d.querySelector(`.${Nb}`)||d,{showEffect:p}=o||{};(p||PR)(f,{className:t,token:i,component:n,event:u,hashId:a,colorSource:r})}),l=g.useRef(null);return g.useEffect(()=>()=>{xt.cancel(l.current)},[]),u=>{xt.cancel(l.current),l.current=xt(()=>{s(u)})}},Ip={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"},Mb=e=>{const{children:t,disabled:n,component:r,colorSource:o}=e,{getPrefixCls:i,wave:a}=b.useContext(dt),s=b.useRef(null),l=i("wave"),c=kR(l),u=TR(s,Z(l,c),r,o);if(b.useEffect(()=>{const f=s.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||n)return;const p=w=>{!ku(w.target)||!f.getAttribute||f.getAttribute("disabled")||f.disabled||f.className.includes("disabled")&&!f.className.includes("disabled:")||f.getAttribute("aria-disabled")==="true"||f.className.includes("-leave")||u(w)},h=a==null?void 0:a.triggerType,m=h&&h in Ip?Ip[h]:"click";return f.addEventListener(m,p,!0),()=>{f.removeEventListener(m,p,!0)}},[n,a==null?void 0:a.triggerType]),!b.isValidElement(t))return t??null;const d=$o(t)?Gn(cr(t),s):s;return Dn(t,{ref:d})};process.env.NODE_ENV!=="production"&&(Mb.displayName="Wave");const To=e=>{const t=b.useContext(xo);return b.useMemo(()=>e?br(e)?e??t:Qt(e)?e(t):t:t,[e,t])},NR=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},MR=on(["Space","Compact"],NR,()=>({}),{resetStyle:!1}),ss=g.createContext(null),No=(e,t)=>{const n=g.useContext(ss),r=g.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return Z(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:i,[`${e}-compact${s}last-item`]:a,[`${e}-compact${s}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},AR=e=>{const{children:t}=e;return g.createElement(ss.Provider,{value:null},t)},zR=e=>{const{children:t,...n}=e;return g.createElement(ss.Provider,{value:g.useMemo(()=>n,[n])},t)},Ab=g.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=g.useContext(dt),{size:o,direction:i,orientation:a,block:s,prefixCls:l,className:c,rootClassName:u,children:d,vertical:f,...p}=e;process.env.NODE_ENV!=="production"&&At("Space.Compact").deprecated(!i,"direction","orientation");const[h,m]=Qu(a,f,i),w=To(N=>o??N),y=n("space-compact",l),[$]=MR(y),x=Z(y,$,{[`${y}-rtl`]:r==="rtl",[`${y}-block`]:s,[`${y}-vertical`]:m},c,u),E=g.useContext(ss),v=g.useRef(null);g.useImperativeHandle(t,()=>({nativeElement:v.current}));const C=or(d),I=g.useMemo(()=>C.map((N,A)=>{const k=(N==null?void 0:N.key)||`${y}-item-${A}`;return g.createElement(zR,{key:k,compactSize:w,compactDirection:h,isFirstItem:A===0&&(!E||(E==null?void 0:E.isFirstItem)),isLastItem:A===C.length-1&&(!E||(E==null?void 0:E.isLastItem))},N)}),[C,E,h,w,y]);return C.length===0?null:g.createElement("div",{ref:v,className:x,...p},I)}),zb=g.createContext(void 0),OR=e=>{const{getPrefixCls:t,direction:n}=g.useContext(dt),{prefixCls:r,size:o,className:i,...a}=e,s=t("btn-group",r),[,,l]=Cr(),c=g.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]);if(process.env.NODE_ENV!=="production"){const d=At("Button.Group");d.deprecated(!1,"Button.Group","Space.Compact"),process.env.NODE_ENV!=="production"&&d(!o||["large","medium","small"].includes(o),"usage","Invalid prop `size`.")}const u=Z(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return g.createElement(zb.Provider,{value:o},g.createElement("div",{...a,className:u}))},Rp=/^[\u4E00-\u9FA5]{2}$/,bc=Rp.test.bind(Rp);function Ui(e){return e==="text"||e==="link"}function DR(e,t,n,r){if(!yi(e))return;const o=t?" ":"";return!br(e)&&!os(e)&&br(e.type)&&bc(e.props.children)?Dn(e,i=>{const a=Z(i.className,r)||void 0,s={...n,...i.style};return{...i,children:i.children.split("").join(o),className:a,style:s}}):br(e)?b.createElement("span",{className:r,style:n},bc(e)?e.split("").join(o):e):Eb(e)?b.createElement("span",{className:r,style:n},e):Dn(e,i=>({...i,className:Z(i.className,r)||void 0,style:{...i.style,...n}}))}function LR(e,t,n,r){let o=!1;const i=[];return b.Children.forEach(e,a=>{const s=br(a)||os(a);if(o&&s){const l=i.length-1,c=i[l];i[l]=`${c}${a}`}else i.push(a);o=s}),b.Children.map(i,a=>DR(a,t,n,r))}["default","primary","danger"].concat(jr(xr));const Ob=b.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=Z(`${i}-icon`,n);return b.createElement("span",{ref:t,className:a,style:r},o)}),Pp=b.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=Z(`${n}-loading-icon`,r);return b.createElement(Ob,{prefixCls:n,className:a,style:o,ref:t},b.createElement(Ib,{className:i}))}),Zs=()=>({width:0,opacity:0,transform:"scale(0)"}),Js=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),FR=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:a}=e,s=!!n;return r?b.createElement(Pp,{prefixCls:t,className:o,style:i}):b.createElement(vr,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Zs,onAppearActive:Js,onEnterStart:Zs,onEnterActive:Js,onLeaveStart:Js,onLeaveActive:Zs},({className:l,style:c},u)=>{const d={...i,...c};return b.createElement(Pp,{prefixCls:t,className:Z(o,l),style:d,ref:u})})},_R=e=>{const{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:o}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(i=>`${i} ${r} ${o}`).join(", ")} !important`}},[`${n}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(i=>`${i} ${r} ${o}`).join(", ")} !important`}}}},Tp=e=>({animationDuration:e,animationFillMode:"both"}),ls=(e,t,n,r,o=!1)=>{const i=o?"&":"";return{[`
192
+ }`,n)}else ii(n);return()=>{ii(n)}},[t,n])}let gr=[];const VI=200;let Gu=0;process.env.NODE_ENV;const gb=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-Gu<VI)return;const n=gr.length;for(let r=n-1;r>=0;r-=1)gr[r].onEsc({top:r===n-1,event:e})}},bb=()=>{Gu=Date.now()};function WI(){window.addEventListener("keydown",gb),window.addEventListener("compositionend",bb)}function qI(){gr.length===0&&(window.removeEventListener("keydown",gb),window.removeEventListener("compositionend",bb))}function XI(e,t){const n=Ka(),r=Ge(t),o=()=>{gr.find(a=>a.id===n)||gr.push({id:n,onEsc:r})},i=()=>{gr=gr.filter(a=>a.id!==n)};b.useMemo(()=>{e?o():e||i()},[e]),b.useEffect(()=>{if(e)return o(),WI(),()=>{i(),qI()}},[e])}const bp=e=>e===!1?!1:!vn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,is=h.forwardRef((e,t)=>{const{open:n,autoLock:r,getContainer:o,debug:i,autoDestroy:a=!0,children:s,onEsc:l}=e,[c,u]=h.useState(n),d=c||n;process.env.NODE_ENV!=="production"&&tt(vn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),h.useEffect(()=>{(a||n)&&u(n)},[n,a]);const[f,p]=h.useState(()=>bp(o));h.useEffect(()=>{const C=bp(o);p(()=>C??null)});const[g,m]=_I(d&&!f,i),w=f??g;HI(r&&n&&vn()&&(w===g||w===document.body)),XI(n,l);let y=null;s&&$o(s)&&t&&(y=cr(s));const $=Hr(y,t);if(!d||!vn()||f===void 0)return null;const x=w===!1||FI();let E=s;return t&&(E=h.cloneElement(s,{ref:$})),h.createElement(hb.Provider,{value:m},x?E:po.createPortal(E,w))});process.env.NODE_ENV!=="production"&&(is.displayName="Portal");function UI(e){const{prefixCls:t,align:n,arrow:r,arrowPos:o}=e,{className:i,content:a,style:s}=r||{},{x:l=0,y:c=0}=o,u=h.useRef(null);if(!n||!n.points)return null;const d={position:"absolute"};if(n.autoArrow!==!1){const f=n.points[0],p=n.points[1],g=f[0],m=f[1],w=p[0],y=p[1];g===w||!["t","b"].includes(g)?d.top=c:g==="t"?d.top=0:d.bottom=0,m===y||!["l","r"].includes(m)?d.left=l:m==="l"?d.left=0:d.right=0}return h.createElement("div",{ref:u,className:J(`${t}-arrow`,i),style:{...d,...s}},a)}function uc(){return uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uc.apply(this,arguments)}function GI(e){const{prefixCls:t,open:n,zIndex:r,mask:o,motion:i,mobile:a}=e;return o?h.createElement(vr,uc({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),({className:s})=>h.createElement("div",{style:{zIndex:r},className:J(`${t}-mask`,a&&`${t}-mobile-mask`,s)})):null}const xb=h.memo(({children:e})=>e,(e,t)=>t.cache);process.env.NODE_ENV!=="production"&&(xb.displayName="PopupContent");function yb(e,t,n,r,o,i,a,s){var u;const l="auto",c=e?{}:{left:"-1000vw",top:"-1000vh",right:l,bottom:l};if(!e&&(t||!n)){const{points:d}=r,f=r.dynamicInset||((u=r._experimental)==null?void 0:u.dynamicInset),p=f&&d[0][1]==="r",g=f&&d[0][0]==="b";p?(c.right=o,c.left=l):(c.left=a,c.right=l),g?(c.bottom=i,c.top=l):(c.top=s,c.bottom=l)}return c}function dc(){return dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dc.apply(this,arguments)}const Ku=h.forwardRef((e,t)=>{const{onEsc:n,popup:r,className:o,prefixCls:i,style:a,target:s,onVisibleChanged:l,open:c,keepDom:u,fresh:d,onClick:f,mask:p,arrow:g,arrowPos:m,align:w,motion:y,maskMotion:$,mobile:x,forceRender:E,getPopupContainer:C,autoDestroy:v,portal:T,children:R,zIndex:A,onMouseEnter:k,onMouseLeave:N,onPointerEnter:z,onPointerDownCapture:L,ready:D,offsetX:M,offsetY:O,offsetR:F,offsetB:H,onAlign:X,onPrepare:I,onResize:Q,stretch:Y,targetWidth:P,targetHeight:oe}=e,W=typeof r=="function"?r():r,j=c||u,ne=!!x,[ee,_,ae]=h.useMemo(()=>x?[x.mask,x.maskMotion,x.motion]:[p,$,y],[x,p,$,y]),fe=(C==null?void 0:C.length)>0,[q,ce]=h.useState(!C||!fe);Bt(()=>{!q&&fe&&s&&ce(!0)},[q,fe,s]);const V=Ge((G,K)=>{Q==null||Q(G,K),X()}),le=yb(ne,D,c,w,F,H,M,O);if(!q)return null;const se={};return Y&&(Y.includes("height")&&oe?se.height=oe:Y.includes("minHeight")&&oe&&(se.minHeight=oe),Y.includes("width")&&P?se.width=P:Y.includes("minWidth")&&P&&(se.minWidth=P)),c||(se.pointerEvents="none"),h.createElement(T,{open:E||j,getContainer:C&&(()=>C(s)),autoDestroy:v,onEsc:n},h.createElement(GI,{prefixCls:i,open:c,zIndex:A,mask:ee,motion:_,mobile:ne}),h.createElement(Io,{onResize:V,disabled:!c},G=>h.createElement(vr,dc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:`${i}-hidden`},ae,{onAppearPrepare:I,onEnterPrepare:I,visible:c,onVisibleChanged:K=>{var we;(we=y==null?void 0:y.onVisibleChanged)==null||we.call(y,K),l(K)}}),({className:K,style:we},ie)=>{const me=J(i,K,o,{[`${i}-mobile`]:ne});return h.createElement("div",{ref:Gn(G,t,ie),className:me,style:{"--arrow-x":`${m.x||0}px`,"--arrow-y":`${m.y||0}px`,...le,...se,...we,boxSizing:"border-box",zIndex:A,...a},onMouseEnter:k,onMouseLeave:N,onPointerEnter:z,onClick:f,onPointerDownCapture:L},g&&h.createElement(UI,{prefixCls:i,arrow:g,arrowPos:m,align:w}),h.createElement(xb,{cache:!c&&!d},W))})),R)});process.env.NODE_ENV!=="production"&&(Ku.displayName="Popup");const ka=h.createContext(null),wb=h.createContext(null);function xp(e){return e?Array.isArray(e)?e:[e]:[]}function KI(e,t,n){return h.useMemo(()=>{const r=xp(t??e),o=xp(n??e),i=new Set(r),a=new Set(o);return i.has("hover")&&!i.has("click")&&i.add("touch"),a.has("hover")&&!a.has("click")&&a.add("touch"),[i,a]},[e,t,n])}function YI(e=[],t=[],n){const r=(o,i)=>o[i]||"";return n?r(e,0)===r(t,0):r(e,0)===r(t,0)&&r(e,1)===r(t,1)}function vb(e,t,n,r){var a;const{points:o}=n,i=Object.keys(e);for(let s=0;s<i.length;s+=1){const l=i[s];if(YI((a=e[l])==null?void 0:a.points,o,r))return`${t}-placement-${l}`}return""}function vi(e){return e.ownerDocument.defaultView}function fc(e){const t=[];let n=e==null?void 0:e.parentElement;const r=["hidden","scroll","clip","auto"];for(;n;){const{overflowX:o,overflowY:i,overflow:a}=vi(n).getComputedStyle(n);[o,i,a].some(s=>r.includes(s))&&t.push(n),n=n.parentElement}return t}function di(e,t=1){return Number.isNaN(e)?t:e}function _o(e){return di(parseFloat(e),0)}function yp(e,t){const n={...e};return(t||[]).forEach(r=>{if(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)return;const{overflow:o,overflowClipMargin:i,borderTopWidth:a,borderBottomWidth:s,borderLeftWidth:l,borderRightWidth:c}=vi(r).getComputedStyle(r),u=r.getBoundingClientRect(),{offsetHeight:d,clientHeight:f,offsetWidth:p,clientWidth:g}=r,m=_o(a),w=_o(s),y=_o(l),$=_o(c),x=di(Math.round(u.width/p*1e3)/1e3),E=di(Math.round(u.height/d*1e3)/1e3),C=(p-g-y-$)*x,v=(d-f-m-w)*E,T=m*E,R=w*E,A=y*x,k=$*x;let N=0,z=0;if(o==="clip"){const F=_o(i);N=F*x,z=F*E}const L=u.x+A-N,D=u.y+T-z,M=L+u.width+2*N-A-k-C,O=D+u.height+2*z-T-R-v;n.left=Math.max(n.left,L),n.top=Math.max(n.top,D),n.right=Math.min(n.right,M),n.bottom=Math.min(n.bottom,O)}),n}function wp(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function vp(e,t){const[n,r]=t||[];return[wp(e.width,n),wp(e.height,r)]}function Cp(e=""){return[e[0],e[1]]}function Gr(e,t){const n=t[0],r=t[1];let o,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?o=e.x:r==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function fr(e,t){const n={t:"b",b:"t",l:"r",r:"l"},r=[...e];return r[t]=n[e[t]]||"c",r}function Sp(e){return e.join("")}function Cb(e,t,n,r,o,i,a,s){const[l,c]=h.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),u=h.useRef(0),d=h.useMemo(()=>!t||s?[]:fc(t),[t]),f=h.useRef({});e||(()=>{f.current={}})();const g=Ge(()=>{var y,$;if(t&&n&&e&&!s){let it=function(Le,Pt,Nt=K){const Vn=F.x+Le,Er=F.y+Pt,zi=Vn+ne,xd=Er+j,xs=Math.max(Vn,Nt.left),ys=Math.max(Er,Nt.top),ws=Math.min(zi,Nt.right),Se=Math.min(xd,Nt.bottom);return Math.max(0,(ws-xs)*(Se-ys))},Hn=function(){Rt=F.y+Me,Sn=Rt+j,Ht=F.x+ze,an=Ht+ne};const x=t,E=x.ownerDocument,C=vi(x),{position:v}=C.getComputedStyle(x),T=x.style.left,R=x.style.top,A=x.style.right,k=x.style.bottom,N=x.style.overflow,z=x.style.overflowX,L=x.style.overflowY,D={...o[r],...i},M=E.createElement("div");(y=x.parentElement)==null||y.appendChild(M),M.style.left=`${x.offsetLeft}px`,M.style.top=`${x.offsetTop}px`,M.style.position=v,M.style.height=`${x.offsetHeight}px`,M.style.width=`${x.offsetWidth}px`,x.style.left="0",x.style.top="0",x.style.right="auto",x.style.bottom="auto",x.style.overflow="hidden";let O;if(Array.isArray(n))O={x:n[0],y:n[1],width:0,height:0};else{const Le=n.getBoundingClientRect();Le.x=Le.x??Le.left,Le.y=Le.y??Le.top,O={x:Le.x,y:Le.y,width:Le.width,height:Le.height}}const F=x.getBoundingClientRect(),{height:H,width:X}=C.getComputedStyle(x);F.x=F.x??F.left,F.y=F.y??F.top;const{clientWidth:I,clientHeight:Q,scrollWidth:Y,scrollHeight:P,scrollTop:oe,scrollLeft:W}=E.documentElement,j=F.height,ne=F.width,ee=O.height,_=O.width,ae={left:0,top:0,right:I,bottom:Q},fe={left:-W,top:-oe,right:Y-W,bottom:P-oe};let{htmlRegion:q}=D;const ce="visible",V="visibleFirst";q!=="scroll"&&q!==V&&(q=ce);const le=q===V,se=yp(fe,d),G=yp(ae,d),K=q===ce?G:se,we=le?G:K;x.style.left="auto",x.style.top="auto",x.style.right="0",x.style.bottom="0";const ie=x.getBoundingClientRect();x.style.left=T,x.style.top=R,x.style.right=A,x.style.bottom=k,x.style.overflow=N,x.style.overflowX=z,x.style.overflowY=L,($=x.parentElement)==null||$.removeChild(M);const me=di(Math.round(ne/parseFloat(X)*1e3)/1e3),pe=di(Math.round(j/parseFloat(H)*1e3)/1e3);if(me===0||pe===0||ho(n)&&!ku(n))return;const{offset:Ne,targetOffset:Ee}=D;let[Ie,B]=vp(F,Ne);const[Z,ue]=vp(O,Ee);O.x-=Z,O.y-=ue;const[xe,$e]=D.points||[],de=Cp($e),re=Cp(xe),Ce=Gr(O,de),Re=Gr(F,re),Ue={...D};let Te=[re,de],ze=Ce.x-Re.x+Ie,Me=Ce.y-Re.y+B;const Ye=it(ze,Me),It=it(ze,Me,G),wt=Gr(O,["t","l"]),Ot=Gr(F,["t","l"]),ht=Gr(O,["b","r"]),_t=Gr(F,["b","r"]),jt=D.overflow||{},{adjustX:_e,adjustY:pt,shiftX:Cn,shiftY:jn}=jt,Bn=Le=>typeof Le=="boolean"?Le:Le>=0;let Rt,Sn,Ht,an;Hn();const fn=Bn(pt),pn=re[0]===de[0];if(fn&&re[0]==="t"&&(Sn>we.bottom||f.current.bt)){let Le=Me;pn?Le-=j-ee:Le=wt.y-_t.y-B;const Pt=it(ze,Le),Nt=it(ze,Le,G);Pt>Ye||Pt===Ye&&(!le||Nt>=It)?(f.current.bt=!0,Me=Le,B=-B,Te=[fr(Te[0],0),fr(Te[1],0)]):f.current.bt=!1}if(fn&&re[0]==="b"&&(Rt<we.top||f.current.tb)){let Le=Me;pn?Le+=j-ee:Le=ht.y-Ot.y-B;const Pt=it(ze,Le),Nt=it(ze,Le,G);Pt>Ye||Pt===Ye&&(!le||Nt>=It)?(f.current.tb=!0,Me=Le,B=-B,Te=[fr(Te[0],0),fr(Te[1],0)]):f.current.tb=!1}const en=Bn(_e),Dt=re[1]===de[1];if(en&&re[1]==="l"&&(an>we.right||f.current.rl)){let Le=ze;Dt?Le-=ne-_:Le=wt.x-_t.x-Ie;const Pt=it(Le,Me),Nt=it(Le,Me,G);Pt>Ye||Pt===Ye&&(!le||Nt>=It)?(f.current.rl=!0,ze=Le,Ie=-Ie,Te=[fr(Te[0],1),fr(Te[1],1)]):f.current.rl=!1}if(en&&re[1]==="r"&&(Ht<we.left||f.current.lr)){let Le=ze;Dt?Le+=ne-_:Le=ht.x-Ot.x-Ie;const Pt=it(Le,Me),Nt=it(Le,Me,G);Pt>Ye||Pt===Ye&&(!le||Nt>=It)?(f.current.lr=!0,ze=Le,Ie=-Ie,Te=[fr(Te[0],1),fr(Te[1],1)]):f.current.lr=!1}Ue.points=[Sp(Te[0]),Sp(Te[1])],Hn();const at=Cn===!0?0:Cn;typeof at=="number"&&(Ht<G.left&&(ze-=Ht-G.left-Ie,O.x+_<G.left+at&&(ze+=O.x-G.left+_-at)),an>G.right&&(ze-=an-G.right-Ie,O.x>G.right-at&&(ze+=O.x-G.right+at)));const Vt=jn===!0?0:jn;typeof Vt=="number"&&(Rt<G.top&&(Me-=Rt-G.top-B,O.y+ee<G.top+Vt&&(Me+=O.y-G.top+ee-Vt)),Sn>G.bottom&&(Me-=Sn-G.bottom-B,O.y>G.bottom-Vt&&(Me+=O.y-G.bottom+Vt)));const vt=F.x+ze,Oe=vt+ne,Qe=F.y+Me,st=Qe+j,Be=O.x,U=Be+_,be=O.y,he=be+ee,ve=Math.max(vt,Be),Pe=Math.min(Oe,U),Fe=(ve+Pe)/2-vt,De=Math.max(Qe,be),ft=Math.min(st,he),gt=(De+ft)/2-Qe;a==null||a(t,Ue);let Ct=ie.right-F.x-(ze+F.width),mt=ie.bottom-F.y-(Me+F.height);me===1&&(ze=Math.floor(ze),Ct=Math.floor(Ct)),pe===1&&(Me=Math.floor(Me),mt=Math.floor(mt));const Lt={ready:!0,offsetX:ze/me,offsetY:Me/pe,offsetR:Ct/me,offsetB:mt/pe,arrowX:Fe/me,arrowY:gt/pe,scaleX:me,scaleY:pe,align:Ue};c(Lt)}}),m=()=>{u.current+=1;const y=u.current;Promise.resolve().then(()=>{u.current===y&&g()})},w=()=>{c(y=>({...y,ready:!1}))};return Bt(w,[r]),Bt(()=>{e||w()},[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,m]}function Sb(){const e=h.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},n=(r,o)=>{t(),o===0?r():e.current=setTimeout(()=>{r()},o*1e3)};return h.useEffect(()=>()=>{t()},[]),n}function QI(e,t,n,r,o){Bt(()=>{if(e&&t&&n){let d=function(){r(),o()};const i=t,a=n,s=fc(i),l=fc(a),c=vi(a),u=new Set([c,...s,...l]);return u.forEach(f=>{f.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),r(),()=>{u.forEach(f=>{f.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[e,t,n])}function ZI(e,t,n,r,o,i,a,s){const l=h.useRef(e);l.current=e;const c=h.useRef(!1);h.useEffect(()=>{var d,f;if(t&&r&&(!o||i)){const p=()=>{c.current=!1},g=y=>{var $,x;l.current&&!a(((x=($=y.composedPath)==null?void 0:$.call(y))==null?void 0:x[0])||y.target)&&!c.current&&s(!1)},m=vi(r);m.addEventListener("pointerdown",p,!0),m.addEventListener("mousedown",g,!0),m.addEventListener("contextmenu",g,!0);const w=Rl(n);if(w&&(w.addEventListener("mousedown",g,!0),w.addEventListener("contextmenu",g,!0)),process.env.NODE_ENV!=="production"&&n){const y=(d=n.getRootNode)==null?void 0:d.call(n),$=(f=r.getRootNode)==null?void 0:f.call(r);tt(y===$,"trigger element and popup element should in same shadow root.")}return()=>{m.removeEventListener("pointerdown",p,!0),m.removeEventListener("mousedown",g,!0),m.removeEventListener("contextmenu",g,!0),w&&(w.removeEventListener("mousedown",g,!0),w.removeEventListener("contextmenu",g,!0))}}},[t,n,r,o,i]);function u(){c.current=!0}return u}function JI(){const[e,t]=b.useState(null),[n,r]=b.useState(!1),[o,i]=b.useState(!1),a=b.useRef(null),s=Ge(c=>{c===!1?(a.current=null,r(!1)):o&&n?a.current=c:(r(!0),t(c),a.current=null,n||i(!0))}),l=Ge(c=>{c?(i(!1),a.current&&(t(a.current),a.current=null)):(i(!1),a.current=null)});return[s,n,e,l]}function pc(){return pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pc.apply(this,arguments)}const eR=e=>{const{prefixCls:t,isMobile:n,ready:r,open:o,align:i,offsetR:a,offsetB:s,offsetX:l,offsetY:c,arrowPos:u,popupSize:d,motion:f,uniqueContainerClassName:p,uniqueContainerStyle:g}=e,m=`${t}-unique-container`,[w,y]=b.useState(!1),$=yb(n,r,o,i,a,s,l,c),x=b.useRef($);r&&(x.current=$);const E={};return d&&(E.width=d.width,E.height=d.height),b.createElement(vr,pc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${m}-hidden`},f,{visible:o,onVisibleChanged:C=>{y(C)}}),({className:C,style:v})=>{const T=J(m,C,p,{[`${m}-visible`]:w});return b.createElement("div",{className:T,style:{"--arrow-x":`${(u==null?void 0:u.x)||0}px`,"--arrow-y":`${(u==null?void 0:u.y)||0}px`,...x.current,...E,...v,...g}})})},tR=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=JI(),a=h.useMemo(()=>!o||!t?o:t(o),[o,t]),[s,l]=h.useState(null),[c,u]=h.useState(null),d=h.useRef(null),f=Ge(H=>{d.current=H,ho(H)&&s!==H&&l(H)}),p=h.useRef(null),g=Sb(),m=Ge((H,X)=>{p.current=X,g(()=>{n(H)},H.delay)}),w=H=>{g(()=>{var X;(X=p.current)!=null&&X.call(p)||n(!1)},H)},y=Ge(H=>{i(H)}),[$,x,E,C,v,T,R,,,A,k]=Cb(r,s,a==null?void 0:a.target,a==null?void 0:a.popupPlacement,(a==null?void 0:a.builtinPlacements)||{},a==null?void 0:a.popupAlign,void 0,!1),N=h.useMemo(()=>{var X;if(!a)return"";const H=vb(a.builtinPlacements||{},a.prefixCls||"",A,!1);return J(H,(X=a.getPopupClassNameFromAlign)==null?void 0:X.call(a,A))},[A,a==null?void 0:a.getPopupClassNameFromAlign,a==null?void 0:a.builtinPlacements,a==null?void 0:a.prefixCls]),z=h.useMemo(()=>({show:m,hide:w}),[]);h.useEffect(()=>{k()},[a==null?void 0:a.target]);const L=Ge(()=>(k(),Promise.resolve())),D=h.useRef({}),M=h.useContext(ka),O=h.useMemo(()=>({registerSubPopup:(H,X)=>{D.current[H]=X,M==null||M.registerSubPopup(H,X)}}),[M]),F=a==null?void 0:a.prefixCls;return h.createElement(wb.Provider,{value:z},e,a&&h.createElement(ka.Provider,{value:O},h.createElement(Ku,{ref:f,portal:is,onEsc:a.onEsc,prefixCls:F,popup:a.popup,className:J(a.popupClassName,N,`${F}-unique-controlled`),style:a.popupStyle,target:a.target,open:r,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:y,ready:$,offsetX:x,offsetY:E,offsetR:C,offsetB:v,onAlign:k,onPrepare:L,onResize:H=>u({width:H.offsetWidth,height:H.offsetHeight}),arrowPos:{x:T,y:R},align:A,zIndex:a.zIndex,mask:a.mask,arrow:a.arrow,motion:a.popupMotion,maskMotion:a.maskMotion,getPopupContainer:a.getPopupContainer},h.createElement(eR,{prefixCls:F,isMobile:!1,ready:$,open:r,align:A,offsetR:C,offsetB:v,offsetX:x,offsetY:E,arrowPos:{x:T,y:R},popupSize:c,motion:a.popupMotion,uniqueContainerClassName:J(a.uniqueContainerClassName,N),uniqueContainerStyle:a.uniqueContainerStyle}))))};function nR(e=is){const t=h.forwardRef((n,r)=>{const{prefixCls:o="rc-trigger-popup",children:i,action:a="hover",showAction:s,hideAction:l,disabled:c=!1,popupVisible:u,defaultPopupVisible:d,onOpenChange:f,afterOpenChange:p,onPopupVisibleChange:g,afterPopupVisibleChange:m,mouseEnterDelay:w,mouseLeaveDelay:y=.1,focusDelay:$,blurDelay:x,mask:E,maskClosable:C=!0,getPopupContainer:v,forceRender:T,autoDestroy:R,popup:A,popupClassName:k,uniqueContainerClassName:N,uniqueContainerStyle:z,popupStyle:L,popupPlacement:D,builtinPlacements:M={},popupAlign:O,zIndex:F,stretch:H,getPopupClassNameFromAlign:X,fresh:I,unique:Q,alignPoint:Y,onPopupClick:P,onPopupAlign:oe,arrow:W,popupMotion:j,maskMotion:ne,mobile:ee,..._}=n,ae=R||!1,fe=u===void 0,q=!!ee,ce=h.useRef({}),V=h.useContext(ka),le=h.useMemo(()=>({registerSubPopup:(Se,qe)=>{ce.current[Se]=qe,V==null||V.registerSubPopup(Se,qe)}}),[V]),se=h.useContext(wb),G=Ka(),[K,we]=h.useState(null),ie=h.useRef(null),me=Ge(Se=>{ie.current=Se,ho(Se)&&K!==Se&&we(Se),V==null||V.registerSubPopup(G,Se)}),[pe,Ne]=h.useState(null),Ee=h.useRef(null),Ie=Ge(Se=>{const qe=$u(Se);ho(qe)&&pe!==qe&&(Ne(qe),Ee.current=qe)}),B={},Z=Ge(Se=>{var Wt,Wr;const qe=pe;return(qe==null?void 0:qe.contains(Se))||((Wt=Rl(qe))==null?void 0:Wt.host)===Se||Se===qe||(K==null?void 0:K.contains(Se))||((Wr=Rl(K))==null?void 0:Wr.host)===Se||Se===K||Object.values(ce.current).some($r=>($r==null?void 0:$r.contains(Se))||Se===$r)}),ue=W?{...W!==!0?W:{}}:null,[xe,$e]=un(d||!1,u),de=xe||!1,re=de&&!c,Ce=h.useMemo(()=>{const Se=typeof i=="function"?i({open:re}):i;return h.Children.only(Se)},[i,re]),Re=(Ce==null?void 0:Ce.props)||{},Ue=Ge(()=>re),Te=Ge((Se=0)=>({popup:A,target:pe,delay:Se,prefixCls:o,popupClassName:k,uniqueContainerClassName:N,uniqueContainerStyle:z,popupStyle:L,popupPlacement:D,builtinPlacements:M,popupAlign:O,zIndex:F,mask:E,maskClosable:C,popupMotion:j,maskMotion:ne,arrow:ue,getPopupContainer:v,getPopupClassNameFromAlign:X,id:G,onEsc:It}));Bt(()=>{se&&Q&&pe&&!fe&&!V&&(re?se.show(Te(w),Ue):se.hide(y))},[re,pe]);const ze=h.useRef(re);ze.current=re;const Me=Ge(Se=>{po.flushSync(()=>{de!==Se&&($e(Se),f==null||f(Se),g==null||g(Se))})}),it=Sb(),Ye=(Se,qe=0)=>{if(u!==void 0){it(()=>{Me(Se)},qe);return}if(se&&Q&&fe&&!V){Se?se.show(Te(qe),Ue):se.hide(qe);return}it(()=>{Me(Se)},qe)};function It({top:Se}){Se&&Ye(!1)}const[wt,Ot]=h.useState(!1);Bt(Se=>{(!Se||re)&&Ot(!0)},[re]);const[ht,_t]=h.useState(null),[jt,_e]=h.useState(null),pt=Se=>{_e([Se.clientX,Se.clientY])},[Cn,jn,Bn,Rt,Sn,Ht,an,Hn,fn,pn,en]=Cb(re,K,Y&&jt!==null?jt:pe,D,M,O,oe,q),[Dt,at]=KI(a,s,l),Vt=Dt.has("click"),vt=at.has("click")||at.has("contextMenu"),Oe=Ge(()=>{wt||en()});QI(re,pe,K,Oe,()=>{ze.current&&Y&&vt&&Ye(!1)}),Bt(()=>{Oe()},[jt,D]),Bt(()=>{re&&!(M!=null&&M[D])&&Oe()},[JSON.stringify(O)]);const st=h.useMemo(()=>{const Se=vb(M,o,pn,Y);return J(Se,X==null?void 0:X(pn))},[pn,X,M,o,Y]);h.useImperativeHandle(r,()=>({nativeElement:Ee.current,popupElement:ie.current,forceAlign:Oe}));const[Be,U]=h.useState(0),[be,he]=h.useState(0),ve=()=>{if(H&&pe){const Se=pe.getBoundingClientRect();U(Se.width),he(Se.height)}},Pe=()=>{ve(),Oe()},ke=Se=>{Ot(!1),en(),p==null||p(Se),m==null||m(Se)},Fe=()=>new Promise(Se=>{ve(),_t(()=>Se)});Bt(()=>{ht&&(en(),ht(),_t(null))},[ht]);function De(Se,qe,Wt,Wr,$r){B[Se]=(yd,...B0)=>{var wd;(!$r||!$r())&&(Wr==null||Wr(yd),Ye(qe,Wt)),(wd=Re[Se])==null||wd.call(Re,yd,...B0)}}const ft=Dt.has("touch"),Tt=at.has("touch"),gt=h.useRef(!1);(ft||Tt)&&(B.onTouchStart=(...Se)=>{var qe;gt.current=!0,ze.current&&Tt?Ye(!1):!ze.current&&ft&&Ye(!0),(qe=Re.onTouchStart)==null||qe.call(Re,...Se)}),(Vt||vt)&&(B.onClick=(Se,...qe)=>{var Wt;ze.current&&vt?Ye(!1):!ze.current&&Vt&&(pt(Se),Ye(!0)),(Wt=Re.onClick)==null||Wt.call(Re,Se,...qe),gt.current=!1});const Ct=ZI(re,vt||Tt,pe,K,E,C,Z,Ye),mt=Dt.has("hover"),Lt=at.has("hover");let Le,Pt;const Nt=()=>gt.current;if(mt){const Se=qe=>{pt(qe)};De("onMouseEnter",!0,w,Se,Nt),De("onPointerEnter",!0,w,Se,Nt),Le=qe=>{(re||wt)&&(K!=null&&K.contains(qe.target))&&Ye(!0,w)},Y&&(B.onMouseMove=qe=>{var Wt;(Wt=Re.onMouseMove)==null||Wt.call(Re,qe)})}Lt&&(De("onMouseLeave",!1,y,void 0,Nt),De("onPointerLeave",!1,y,void 0,Nt),Pt=()=>{Ye(!1,y)}),Dt.has("focus")&&De("onFocus",!0,$),at.has("focus")&&De("onBlur",!1,x),Dt.has("contextMenu")&&(B.onContextMenu=(Se,...qe)=>{var Wt;ze.current&&at.has("contextMenu")?Ye(!1):(pt(Se),Ye(!0)),Se.preventDefault(),(Wt=Re.onContextMenu)==null||Wt.call(Re,Se,...qe)});const Vn=h.useRef(!1);Vn.current||(Vn.current=T||re||wt);const Er={...Re,...B},zi={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(Se=>{_[Se]&&(zi[Se]=(...qe)=>{var Wt;(Wt=Er[Se])==null||Wt.call(Er,...qe),_[Se](...qe)})});const xs={x:Ht,y:an};Lg(re,pe,Pe);const ys=Hr(Ie,cr(Ce)),ws=h.cloneElement(Ce,{...Er,...zi,ref:ys});return h.createElement(h.Fragment,null,ws,Vn.current&&(!se||!Q)&&h.createElement(ka.Provider,{value:le},h.createElement(Ku,{portal:e,ref:me,prefixCls:o,popup:A,className:J(k,!q&&st),style:L,target:pe,onMouseEnter:Le,onMouseLeave:Pt,onPointerEnter:Le,zIndex:F,open:re,keepDom:wt,fresh:I,onClick:P,onPointerDownCapture:Ct,mask:E,motion:j,maskMotion:ne,onVisibleChanged:ke,onPrepare:Fe,forceRender:T,autoDestroy:ae,getPopupContainer:v,onEsc:It,align:pn,arrow:ue,arrowPos:xs,ready:Cn,offsetX:jn,offsetY:Bn,offsetR:Rt,offsetB:Sn,onAlign:Oe,stretch:H,targetWidth:Be/Hn,targetHeight:be/fn,mobile:ee})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const Yu=nR(is);function Eb(e){return e&&b.isValidElement(e)&&e.type===b.Fragment}const rR=(e,t,n)=>b.isValidElement(e)?b.cloneElement(e,Qt(n)?n(e.props||{}):n):t;function Dn(e,t){return rR(e,e,t)}const oR=({children:e})=>{const{getPrefixCls:t}=b.useContext(dt),n=t();return b.isValidElement(e)?b.createElement(vr,{visible:!0,motionName:`${n}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:r,className:o})=>Dn(e,i=>({className:J(i.className,o),style:{...i.style,...r}}))):e},Xi=[null,null];function iR(e){if(Xi[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:!1}}),Xi[0]=e,Xi[1]=t}return Xi[1]}const $b=({children:e})=>{const t=n=>{const{id:r,builtinPlacements:o,popup:i}=n,a=Qt(i)?i():i,s=iR(o);return{...n,getPopupContainer:null,arrow:!1,popup:b.createElement(oR,{key:r},a),builtinPlacements:s}};return b.createElement(tR,{postTriggerProps:t},e)},yr=h.createContext(!1),aR=({children:e,disabled:t})=>{const n=h.useContext(yr);return h.createElement(yr.Provider,{value:t??n},e)},xo=h.createContext(void 0),sR=({children:e,size:t})=>{const n=h.useContext(xo);return h.createElement(xo.Provider,{value:t||n},e)};function lR(){const e=b.useContext(yr),t=b.useContext(xo);return{componentDisabled:e,componentSize:t}}function cR(e,t,n){var s;const r=At("ConfigProvider"),o=e||{},i=o.inherit===!1||!t?{...Sa,hashed:(t==null?void 0:t.hashed)??Sa.hashed,cssVar:t==null?void 0:t.cssVar,zeroRuntime:t==null?void 0:t.zeroRuntime}:t,a=b.useId();if(process.env.NODE_ENV!=="production"){const l=o.cssVar||i.cssVar,c=!!(rn(o.cssVar)&&((s=o.cssVar)!=null&&s.key)||a);process.env.NODE_ENV!=="production"&&r(!l||c,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return Ya(()=>{var d;if(!e)return t;const l={...i.components};Object.keys(e.components||{}).forEach(f=>{l[f]={...l[f],...e.components[f]}});const c=`css-var-${a.replace(/:/g,"")}`,u={prefix:n==null?void 0:n.prefixCls,...i.cssVar,...o.cssVar,key:((d=o.cssVar)==null?void 0:d.key)||c};return{...i,...o,token:{...i.token,...o.token},components:l,cssVar:u}},[o,i,n==null?void 0:n.prefixCls,a],(l,c)=>l.some((u,d)=>{const f=c[d];return!ai(u,f,!0)}))}const mc=h.createContext(!0);process.env.NODE_ENV!=="production"&&(mc.displayName="MotionCacheContext");function uR(e){const t=h.useContext(mc),{children:n}=e,[,r]=Cr(),{motion:o}=r,i=h.useRef(!1);return i.current||(i.current=t!==o),i.current?h.createElement(mc.Provider,{value:o},h.createElement(X$,{motion:o},n)):n}const kb=h.memo(e=>{const{dropdownMatchSelectWidth:t}=e;return At("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(kb.displayName="PropWarning");const dR=process.env.NODE_ENV!=="production"?kb:()=>null,fR=({iconPrefixCls:e,csp:t})=>(uI(e,t),null);let hc=!1;process.env.NODE_ENV;const pR=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],mR=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e},hR=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,app:s,form:l,locale:c,componentSize:u,direction:d,space:f,splitter:p,virtual:g,dropdownMatchSelectWidth:m,popupMatchSelectWidth:w,popupOverflow:y,legacyLocale:$,parentContext:x,iconPrefixCls:E,theme:C,componentDisabled:v,segmented:T,statistic:R,spin:A,calendar:k,carousel:N,cascader:z,collapse:L,typography:D,checkbox:M,descriptions:O,divider:F,drawer:H,skeleton:X,steps:I,image:Q,layout:Y,list:P,listy:oe,mentions:W,modal:j,progress:ne,result:ee,slider:_,breadcrumb:ae,masonry:fe,menu:q,pagination:ce,input:V,inputPassword:le,inputSearch:se,textArea:G,otp:K,empty:we,badge:ie,borderBeam:me,radio:pe,rate:Ne,ribbon:Ee,switch:Ie,transfer:B,avatar:Z,message:ue,tag:xe,table:$e,card:de,cardMeta:re,tabs:Ce,timeline:Re,timePicker:Ue,upload:Te,notification:ze,tree:Me,colorPicker:it,datePicker:Ye,rangePicker:It,flex:wt,wave:Ot,dropdown:ht,warning:_t,tour:jt,tooltip:_e,popover:pt,popconfirm:Cn,qrcode:jn,floatButton:Bn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Hn}=e,fn=h.useMemo(()=>{var he;return rn(c)&&Object.prototype.hasOwnProperty.call(c,"default")&&((he=c.default)!=null&&he.locale)?c.default:c},[c]),pn=h.useCallback((he,ve)=>{const{prefixCls:Pe}=e;if(ve)return ve;const ke=Pe||x.getPrefixCls("");return he?`${ke}-${he}`:ke},[x.getPrefixCls,e.prefixCls]),en=E||x.iconPrefixCls||ju,Dt=n||x.csp,at=cR(C,x.theme,{prefixCls:pn("")});process.env.NODE_ENV!=="production"&&(hc=hc||!!at);const Vt={csp:Dt,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,app:s,locale:fn||$,direction:d,space:f,splitter:p,virtual:g,popupMatchSelectWidth:w??m,popupOverflow:y,getPrefixCls:pn,iconPrefixCls:en,theme:at,segmented:T,statistic:R,spin:A,calendar:k,carousel:N,cascader:z,collapse:L,typography:D,checkbox:M,descriptions:O,divider:F,drawer:H,skeleton:X,steps:I,image:Q,input:V,inputPassword:le,inputSearch:se,textArea:G,otp:K,layout:Y,list:P,listy:oe,mentions:W,modal:j,progress:ne,result:ee,slider:_,breadcrumb:ae,masonry:fe,menu:q,pagination:ce,empty:we,badge:ie,borderBeam:me,radio:pe,rate:Ne,ribbon:Ee,switch:Ie,transfer:B,avatar:Z,message:ue,tag:xe,table:$e,card:de,cardMeta:re,tabs:Ce,timeline:Re,timePicker:Ue,upload:Te,notification:ze,tree:Me,colorPicker:it,datePicker:Ye,rangePicker:It,flex:wt,wave:Ot,dropdown:ht,warning:_t,tour:jt,tooltip:_e,popover:pt,popconfirm:Cn,qrcode:jn,floatButton:Bn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Hn};process.env.NODE_ENV!=="production"&&At("ConfigProvider")(!("autoInsertSpaceInButton"in e),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const vt={...x};Object.keys(Vt).forEach(he=>{Vt[he]!==void 0&&(vt[he]=Vt[he])}),pR.forEach(he=>{const ve=e[he];ve&&(vt[he]=ve)}),typeof r<"u"&&(vt.button={autoInsertSpace:r,...vt.button});const Oe=Ya(()=>vt,vt,(he,ve)=>{const Pe=Object.keys(he),ke=Object.keys(ve);return Pe.length!==ke.length||Pe.some(Fe=>he[Fe]!==ve[Fe])}),{layer:Qe}=h.useContext(wi),st=h.useMemo(()=>({prefixCls:en,csp:Dt,layer:Qe?"antd":void 0,zeroRuntime:!!Qe||(at==null?void 0:at.zeroRuntime)}),[en,Dt,Qe,at==null?void 0:at.zeroRuntime]);let Be=h.createElement(h.Fragment,null,h.createElement(fR,{iconPrefixCls:en,csp:Dt}),h.createElement(dR,{dropdownMatchSelectWidth:m}),t);const U=h.useMemo(()=>{var he,ve,Pe,ke;return oo(((he=bo.Form)==null?void 0:he.defaultValidateMessages)||{},((Pe=(ve=Oe.locale)==null?void 0:ve.Form)==null?void 0:Pe.defaultValidateMessages)||{},((ke=Oe.form)==null?void 0:ke.validateMessages)||{},(l==null?void 0:l.validateMessages)||{})},[Oe,l==null?void 0:l.validateMessages]);Object.keys(U).length>0&&(Be=h.createElement(NI.Provider,{value:U},Be)),fn&&(Be=h.createElement(mb,{locale:fn,_ANT_MARK__:pb},Be)),Be=h.createElement(Fu.Provider,{value:st},Be),u&&(Be=h.createElement(sR,{size:u},Be)),Be=h.createElement(uR,null,Be),_e!=null&&_e.unique&&(Be=h.createElement($b,null,Be));const be=h.useMemo(()=>{const{algorithm:he,token:ve,components:Pe,cssVar:ke,...Fe}=at||{},De=he&&(!Array.isArray(he)||he.length>0)?wa(he):Qg,ft={};Object.entries(Pe||{}).forEach(([gt,Ct])=>{const mt={...Ct};"algorithm"in mt&&(mt.algorithm===!0?mt.theme=De:(Array.isArray(mt.algorithm)||Qt(mt.algorithm))&&(mt.theme=wa(mt.algorithm)),delete mt.algorithm),ft[gt]=mt});const Tt={...ui,...ve};return{...Fe,theme:De,token:Tt,components:ft,override:{override:Tt,...ft},cssVar:ke}},[at]);return C&&(Be=h.createElement(Bu.Provider,{value:be},Be)),Oe.warning&&(Be=h.createElement(zg.Provider,{value:Oe.warning},Be)),v!==void 0&&(Be=h.createElement(aR,{disabled:v},Be)),h.createElement(dt.Provider,{value:Oe},Be)},Sr=e=>{const t=h.useContext(dt),n=h.useContext(Uu);return h.createElement(hR,{parentContext:t,legacyLocale:n,...e})};Sr.ConfigContext=dt;Sr.SizeContext=xo;Sr.config=mR;Sr.useConfig=lR;Object.defineProperty(Sr,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&_u(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),xo)});process.env.NODE_ENV!=="production"&&(Sr.displayName="ConfigProvider");var gR={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 gc(){return gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gc.apply(this,arguments)}const bR=(e,t)=>h.createElement(Jt,gc({},e,{ref:t,icon:gR})),Ib=h.forwardRef(bR);process.env.NODE_ENV!=="production"&&(Ib.displayName="LoadingOutlined");function Rb(...e){return e.find(t=>t!==void 0)}const Tb=e=>{const{allowClear:t,clearIcon:n,contextAllowClear:r,contextClearIcon:o,defaultAllowClear:i,componentName:a}=e;return process.env.NODE_ENV!=="production"&&At(a).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}"),b.useMemo(()=>t??r??i?{clearIcon:Rb(rn(t)?t==null?void 0:t.clearIcon:n,rn(r)?r==null?void 0:r.clearIcon:o,b.createElement(sb,null)),disabled:(rn(t)?t==null?void 0:t.disabled:void 0)??(rn(r)?r==null?void 0:r.disabled:void 0)}:!1,[t,n,r,o,i])},Ep=e=>e==="horizontal"||e==="vertical",Qu=(e,t,n)=>b.useMemo(()=>{const r=Ep(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=Ep(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),as=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(as.displayName="ZIndexContext");const Jn=100,xR=10,yR=Jn*xR,wR=yR+Jn,Pb={Modal:Jn,Drawer:Jn,Popover:Jn,Popconfirm:Jn,Tooltip:Jn,Tour:Jn,FloatButton:Jn},vR={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},CR=e=>e in Pb,Zu=(e,t)=>{const[,n]=Cr(),r=b.useContext(as),o=CR(e);let i;if(t!==void 0)i=[t,t];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+Pb[e]:a+=vR[e],i=[r===void 0?t:a,a]}if(process.env.NODE_ENV!=="production"){const a=At(e),s=n.zIndexPopupBase+wR,l=i[0]||0;process.env.NODE_ENV!=="production"&&a(t!==void 0||l<=s,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return i},Ks=()=>({height:0,opacity:0}),$p=e=>({height:(e==null?void 0:e.scrollHeight)??0,opacity:e?1:0}),SR=e=>({height:(e==null?void 0:e.offsetHeight)??0}),Ys=(e,t)=>(t==null?void 0:t.deadline)===!0||lb(t)&&t.propertyName==="height",ER=(e=va)=>({motionName:`${e}-motion-collapse`,onAppearStart:Ks,onEnterStart:Ks,onAppearActive:$p,onEnterActive:$p,onLeaveStart:SR,onLeaveActive:Ks,onAppearEnd:Ys,onEnterEnd:Ys,onLeaveEnd:Ys,motionDeadline:500}),$R=(e,t,n)=>n!==void 0?n:`${e}-${t}`,kR=e=>{const{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:o,motionEaseOutCirc:i,antCls:a}=e,[,s]=ur(a,"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(l=>`${l} ${i}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(l=>`${l} ${r} ${o}`).join(",")}}}}},IR=sI("Wave",kR),Nb=`${va}-wave-target`,kp=e=>e?br(e)&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&e!=="transparent"&&e!=="canvastext":!1;function RR(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:o,backgroundColor:i}=n;return t&&kp(n[t])?n[t]:[r,o,i].find(kp)??null}function Qs(e){return Number.isNaN(e)?0:e}const TR=e=>{const{className:t,target:n,component:r,colorSource:o}=e,i=h.useRef(null),{getPrefixCls:a}=h.useContext(dt),s=a(),[l]=ur(s,"wave"),[c,u]=h.useState(null),[d,f]=h.useState([]),[p,g]=h.useState(0),[m,w]=h.useState(0),[y,$]=h.useState(0),[x,E]=h.useState(0),[C,v]=h.useState(!1),T={left:p,top:m,width:y,height:x,borderRadius:d.map(k=>`${k}px`).join(" ")};c&&(T[l("color")]=c);function R(){const k=getComputedStyle(n);u(RR(n,o));const N=k.position==="static",{borderLeftWidth:z,borderTopWidth:L}=k;g(N?n.offsetLeft:Qs(-Number.parseFloat(z))),w(N?n.offsetTop:Qs(-Number.parseFloat(L))),$(n.offsetWidth),E(n.offsetHeight);const{borderTopLeftRadius:D,borderTopRightRadius:M,borderBottomLeftRadius:O,borderBottomRightRadius:F}=k;f([D,M,F,O].map(H=>Qs(Number.parseFloat(H))))}if(h.useEffect(()=>{if(n){const k=xt(()=>{R(),v(!0)});let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(R),N.observe(n)),()=>{xt.cancel(k),N==null||N.disconnect()}}},[n]),!C)return null;const A=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(Nb));return h.createElement(vr,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(k,N)=>{var z;if(N.deadline||lb(N)&&N.propertyName==="opacity"){const L=(z=i.current)==null?void 0:z.parentElement;q$(L).then(()=>{L==null||L.remove()})}return!1}},({className:k},N)=>h.createElement("div",{ref:Gn(i,N),className:J(t,k,{"wave-quick":A}),style:T}))},PR=(e,t)=>{var o;const{component:n}=t;if(n==="Checkbox"&&!((o=e.querySelector("input"))!=null&&o.checked))return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e==null||e.insertBefore(r,e==null?void 0:e.firstChild),W$(h.createElement(TR,{...t,target:e}),r)},NR=(e,t,n,r)=>{const{wave:o}=h.useContext(dt),[,i,a]=Cr(),s=Ge(u=>{const d=e.current;if(o!=null&&o.disabled||!d)return;const f=d.querySelector(`.${Nb}`)||d,{showEffect:p}=o||{};(p||PR)(f,{className:t,token:i,component:n,event:u,hashId:a,colorSource:r})}),l=h.useRef(null);return h.useEffect(()=>()=>{xt.cancel(l.current)},[]),u=>{xt.cancel(l.current),l.current=xt(()=>{s(u)})}},Ip={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"},Mb=e=>{const{children:t,disabled:n,component:r,colorSource:o}=e,{getPrefixCls:i,wave:a}=b.useContext(dt),s=b.useRef(null),l=i("wave"),c=IR(l),u=NR(s,J(l,c),r,o);if(b.useEffect(()=>{const f=s.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||n)return;const p=w=>{!ku(w.target)||!f.getAttribute||f.getAttribute("disabled")||f.disabled||f.className.includes("disabled")&&!f.className.includes("disabled:")||f.getAttribute("aria-disabled")==="true"||f.className.includes("-leave")||u(w)},g=a==null?void 0:a.triggerType,m=g&&g in Ip?Ip[g]:"click";return f.addEventListener(m,p,!0),()=>{f.removeEventListener(m,p,!0)}},[n,a==null?void 0:a.triggerType]),!b.isValidElement(t))return t??null;const d=$o(t)?Gn(cr(t),s):s;return Dn(t,{ref:d})};process.env.NODE_ENV!=="production"&&(Mb.displayName="Wave");const Po=e=>{const t=b.useContext(xo);return b.useMemo(()=>e?br(e)?e??t:Qt(e)?e(t):t:t,[e,t])},MR=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},AR=on(["Space","Compact"],MR,()=>({}),{resetStyle:!1}),ss=h.createContext(null),No=(e,t)=>{const n=h.useContext(ss),r=h.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return J(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:i,[`${e}-compact${s}last-item`]:a,[`${e}-compact${s}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},zR=e=>{const{children:t}=e;return h.createElement(ss.Provider,{value:null},t)},OR=e=>{const{children:t,...n}=e;return h.createElement(ss.Provider,{value:h.useMemo(()=>n,[n])},t)},Ab=h.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=h.useContext(dt),{size:o,direction:i,orientation:a,block:s,prefixCls:l,className:c,rootClassName:u,children:d,vertical:f,...p}=e;process.env.NODE_ENV!=="production"&&At("Space.Compact").deprecated(!i,"direction","orientation");const[g,m]=Qu(a,f,i),w=Po(R=>o??R),y=n("space-compact",l),[$]=AR(y),x=J(y,$,{[`${y}-rtl`]:r==="rtl",[`${y}-block`]:s,[`${y}-vertical`]:m},c,u),E=h.useContext(ss),C=h.useRef(null);h.useImperativeHandle(t,()=>({nativeElement:C.current}));const v=or(d),T=h.useMemo(()=>v.map((R,A)=>{const k=(R==null?void 0:R.key)||`${y}-item-${A}`;return h.createElement(OR,{key:k,compactSize:w,compactDirection:g,isFirstItem:A===0&&(!E||(E==null?void 0:E.isFirstItem)),isLastItem:A===v.length-1&&(!E||(E==null?void 0:E.isLastItem))},R)}),[v,E,g,w,y]);return v.length===0?null:h.createElement("div",{ref:C,className:x,...p},T)}),zb=h.createContext(void 0),DR=e=>{const{getPrefixCls:t,direction:n}=h.useContext(dt),{prefixCls:r,size:o,className:i,...a}=e,s=t("btn-group",r),[,,l]=Cr(),c=h.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]);if(process.env.NODE_ENV!=="production"){const d=At("Button.Group");d.deprecated(!1,"Button.Group","Space.Compact"),process.env.NODE_ENV!=="production"&&d(!o||["large","medium","small"].includes(o),"usage","Invalid prop `size`.")}const u=J(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return h.createElement(zb.Provider,{value:o},h.createElement("div",{...a,className:u}))},Rp=/^[\u4E00-\u9FA5]{2}$/,bc=Rp.test.bind(Rp);function Ui(e){return e==="text"||e==="link"}function LR(e,t,n,r){if(!yi(e))return;const o=t?" ":"";return!br(e)&&!os(e)&&br(e.type)&&bc(e.props.children)?Dn(e,i=>{const a=J(i.className,r)||void 0,s={...n,...i.style};return{...i,children:i.children.split("").join(o),className:a,style:s}}):br(e)?b.createElement("span",{className:r,style:n},bc(e)?e.split("").join(o):e):Eb(e)?b.createElement("span",{className:r,style:n},e):Dn(e,i=>({...i,className:J(i.className,r)||void 0,style:{...i.style,...n}}))}function FR(e,t,n,r){let o=!1;const i=[];return b.Children.forEach(e,a=>{const s=br(a)||os(a);if(o&&s){const l=i.length-1,c=i[l];i[l]=`${c}${a}`}else i.push(a);o=s}),b.Children.map(i,a=>LR(a,t,n,r))}["default","primary","danger"].concat(jr(xr));const Ob=b.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=J(`${i}-icon`,n);return b.createElement("span",{ref:t,className:a,style:r},o)}),Tp=b.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=J(`${n}-loading-icon`,r);return b.createElement(Ob,{prefixCls:n,className:a,style:o,ref:t},b.createElement(Ib,{className:i}))}),Zs=()=>({width:0,opacity:0,transform:"scale(0)"}),Js=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),_R=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:a}=e,s=!!n;return r?b.createElement(Tp,{prefixCls:t,className:o,style:i}):b.createElement(vr,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Zs,onAppearActive:Js,onEnterStart:Zs,onEnterActive:Js,onLeaveStart:Js,onLeaveActive:Zs},({className:l,style:c},u)=>{const d={...i,...c};return b.createElement(Tp,{prefixCls:t,className:J(o,l),style:d,ref:u})})},jR=e=>{const{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:o}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(i=>`${i} ${r} ${o}`).join(", ")} !important`}},[`${n}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(i=>`${i} ${r} ${o}`).join(", ")} !important`}}}},Pp=e=>({animationDuration:e,animationFillMode:"both"}),ls=(e,t,n,r,o=!1)=>{const i=o?"&":"";return{[`
193
193
  ${i}${e}-enter,
194
194
  ${i}${e}-appear
195
- `]:{...Tp(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...Tp(r),animationPlayState:"paused"},[`
195
+ `]:{...Pp(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...Pp(r),animationPlayState:"paused"},[`
196
196
  ${i}${e}-enter${e}-enter-active,
197
197
  ${i}${e}-appear${e}-appear-active
198
- `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},jR=new et("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),BR=new et("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),HR=(e,t=!1)=>{const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return[ls(r,jR,BR,e.motionDurationMid,t),{[`
198
+ `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},BR=new et("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),HR=new et("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),VR=(e,t=!1)=>{const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return[ls(r,BR,HR,e.motionDurationMid,t),{[`
199
199
  ${o}${r}-enter,
200
200
  ${o}${r}-appear
201
- `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},VR=new et("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),WR=new et("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),qR=new et("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),XR=new et("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),UR=new et("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),GR=new et("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),KR=new et("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),YR=new et("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),QR={"move-up":{inKeyframes:KR,outKeyframes:YR},"move-down":{inKeyframes:VR,outKeyframes:WR},"move-left":{inKeyframes:qR,outKeyframes:XR},"move-right":{inKeyframes:UR,outKeyframes:GR}},Np=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=QR[t];return[ls(r,o,i,e.motionDurationMid),{[`
201
+ `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},WR=new et("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),qR=new et("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),XR=new et("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),UR=new et("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),GR=new et("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),KR=new et("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),YR=new et("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),QR=new et("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),ZR={"move-up":{inKeyframes:YR,outKeyframes:QR},"move-down":{inKeyframes:WR,outKeyframes:qR},"move-left":{inKeyframes:XR,outKeyframes:UR},"move-right":{inKeyframes:GR,outKeyframes:KR}},Np=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=ZR[t];return[ls(r,o,i,e.motionDurationMid),{[`
202
202
  ${r}-enter,
203
203
  ${r}-appear
204
- `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Db=new et("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Lb=new et("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Fb=new et("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),_b=new et("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),jb=new et("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Bb=new et("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Hb=new et("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Vb=new et("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ZR={"slide-up":{inKeyframes:Db,outKeyframes:Lb},"slide-down":{inKeyframes:Fb,outKeyframes:_b},"slide-left":{inKeyframes:jb,outKeyframes:Bb},"slide-right":{inKeyframes:Hb,outKeyframes:Vb}},io=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=ZR[t];return[ls(r,o,i,e.motionDurationMid),{[`
204
+ `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Db=new et("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Lb=new et("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Fb=new et("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),_b=new et("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),jb=new et("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Bb=new et("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Hb=new et("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Vb=new et("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),JR={"slide-up":{inKeyframes:Db,outKeyframes:Lb},"slide-down":{inKeyframes:Fb,outKeyframes:_b},"slide-left":{inKeyframes:jb,outKeyframes:Bb},"slide-right":{inKeyframes:Hb,outKeyframes:Vb}},io=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=JR[t];return[ls(r,o,i,e.motionDurationMid),{[`
205
205
  ${r}-enter,
206
206
  ${r}-appear
207
- `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},JR=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),eP=new et("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),tP=new et("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Mp=new et("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Ap=new et("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),nP=new et("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),rP=new et("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),oP=new et("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),iP=new et("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),aP=new et("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),sP=new et("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),lP=new et("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),cP=new et("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),uP={zoom:{inKeyframes:eP,outKeyframes:tP},"zoom-big":{inKeyframes:Mp,outKeyframes:Ap},"zoom-big-fast":{inKeyframes:Mp,outKeyframes:Ap},"zoom-left":{inKeyframes:oP,outKeyframes:iP},"zoom-right":{inKeyframes:aP,outKeyframes:sP},"zoom-up":{inKeyframes:nP,outKeyframes:rP},"zoom-down":{inKeyframes:lP,outKeyframes:cP}},Ju=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=uP[t];return[ls(r,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
207
+ `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},eT=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),tT=new et("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),nT=new et("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Mp=new et("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Ap=new et("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),rT=new et("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),oT=new et("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),iT=new et("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),aT=new et("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),sT=new et("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),lT=new et("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),cT=new et("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),uT=new et("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),dT={zoom:{inKeyframes:tT,outKeyframes:nT},"zoom-big":{inKeyframes:Mp,outKeyframes:Ap},"zoom-big-fast":{inKeyframes:Mp,outKeyframes:Ap},"zoom-left":{inKeyframes:iT,outKeyframes:aT},"zoom-right":{inKeyframes:sT,outKeyframes:lT},"zoom-up":{inKeyframes:rT,outKeyframes:oT},"zoom-down":{inKeyframes:cT,outKeyframes:uT}},Ju=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=dT[t];return[ls(r,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
208
208
  ${r}-enter,
209
209
  ${r}-appear
210
- `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},zp=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),dP=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=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}},zp(`${t}-primary`,o),zp(`${t}-danger`,i)]}},el=e=>Math.round(Number(e||0)),fP=e=>{if(e instanceof Ve)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){const{b:t,...n}=e;return{...n,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};class ir extends Ve{constructor(t){super(fP(t))}toHsbString(){const t=this.toHsb(),n=el(t.s*100),r=el(t.b*100),o=el(t.h),i=t.a,a=`hsb(${o}, ${n}%, ${r}%)`,s=`hsba(${o}, ${n}%, ${r}%, ${i.toFixed(i===0?0:2)})`;return i===1?a:s}toHsb(){const{v:t,...n}=this.toHsv();return{...n,b:t,a:this.a}}}const pP="rc-color-picker",uo=e=>e instanceof ir?e:new ir(e),mP=uo("#1677ff"),Wb=e=>{const{offset:t,targetRef:n,containerRef:r,color:o,type:i}=e,{width:a,height:s}=r.current.getBoundingClientRect(),{width:l,height:c}=n.current.getBoundingClientRect(),u=l/2,d=c/2,f=(t.x+u)/a,p=1-(t.y+d)/s,h=o.toHsb(),m=f,w=(t.x+u)/a*360;if(i)switch(i){case"hue":return uo({...h,h:w<=0?0:w});case"alpha":return uo({...h,a:m<=0?0:m})}return uo({h:h.h,s:f<=0?0:f,b:p>=1?1:p,a:h.a})},qb=(e,t)=>{const n=e.toHsb();switch(t){case"hue":return{x:n.h/360*100,y:50};case"alpha":return{x:e.a*100,y:50};default:return{x:n.s*100,y:(1-n.b)*100}}},gP=({color:e,prefixCls:t,className:n,style:r,innerClassName:o,innerStyle:i,onClick:a})=>{const s=`${t}-color-block`;return b.createElement("div",{className:Z(s,n),style:r,onClick:a},b.createElement("div",{className:Z(`${s}-inner`,o),style:{background:e,...i}}))};function hP(e){const t="touches"in e?e.touches[0]:e,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:t.pageX-n,pageY:t.pageY-r}}function Xb(e){const{targetRef:t,containerRef:n,direction:r,onDragChange:o,onDragChangeComplete:i,calculate:a,color:s,disabledDrag:l}=e,[c,u]=b.useState({x:0,y:0}),d=b.useRef(null),f=b.useRef(null);b.useEffect(()=>{u(a())},[s]),b.useEffect(()=>()=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",f.current),d.current=null,f.current=null},[]);const p=y=>{const{pageX:$,pageY:x}=hP(y),{x:E,y:v,width:C,height:I}=n.current.getBoundingClientRect(),{width:N,height:A}=t.current.getBoundingClientRect(),k=N/2,R=A/2,O=Math.max(0,Math.min($-E,C))-k,z=Math.max(0,Math.min(x-v,I))-R,D={x:O,y:r==="x"?c.y:z};if(N===0&&A===0||N!==A)return!1;o==null||o(D)},h=y=>{y.preventDefault(),p(y)},m=y=>{y.preventDefault(),document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",f.current),d.current=null,f.current=null,i==null||i()};return[c,y=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),!l&&(p(y),document.addEventListener("mousemove",h),document.addEventListener("mouseup",m),document.addEventListener("touchmove",h),document.addEventListener("touchend",m),d.current=h,f.current=m)}]}const Ub=({size:e="default",color:t,prefixCls:n})=>b.createElement("div",{className:Z(`${n}-handler`,{[`${n}-handler-sm`]:e==="small"}),style:{backgroundColor:t}}),Gb=({children:e,style:t,prefixCls:n})=>b.createElement("div",{className:`${n}-palette`,style:{position:"relative",...t}},e),Kb=b.forwardRef((e,t)=>{const{children:n,x:r,y:o}=e;return b.createElement("div",{ref:t,style:{position:"absolute",left:`${r}%`,top:`${o}%`,zIndex:1,transform:"translate(-50%, -50%)"}},n)}),bP=({color:e,onChange:t,prefixCls:n,onChangeComplete:r,disabled:o})=>{const i=b.useRef(),a=b.useRef(),s=b.useRef(e),l=Ge(d=>{const f=Wb({offset:d,targetRef:a,containerRef:i,color:e});s.current=f,t(f)}),[c,u]=Xb({color:e,containerRef:i,targetRef:a,calculate:()=>qb(e),onDragChange:l,onDragChangeComplete:()=>r==null?void 0:r(s.current),disabledDrag:o});return b.createElement("div",{ref:i,className:`${n}-select`,onMouseDown:u,onTouchStart:u},b.createElement(Gb,{prefixCls:n},b.createElement(Kb,{x:c.x,y:c.y,ref:a},b.createElement(Ub,{color:e.toRgbString(),prefixCls:n})),b.createElement("div",{className:`${n}-saturation`,style:{backgroundColor:`hsl(${e.toHsb().h},100%, 50%)`,backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},xP=(e,t)=>{const[n,r]=un(e,t);return[b.useMemo(()=>uo(n),[n]),r]},yP=({colors:e,children:t,direction:n="to right",type:r,prefixCls:o})=>{const i=b.useMemo(()=>e.map((a,s)=>{let l=uo(a);return r==="alpha"&&s===e.length-1&&(l=new ir(l.setA(1))),l.toRgbString()}).join(","),[e,r]);return b.createElement("div",{className:`${o}-gradient`,style:{position:"absolute",inset:0,background:`linear-gradient(${n}, ${i})`}},t)},wP=e=>{const{prefixCls:t,colors:n,disabled:r,onChange:o,onChangeComplete:i,color:a,type:s}=e,l=b.useRef(null),c=b.useRef(null),u=b.useRef(a),d=y=>s==="hue"?y.getHue():y.a*100,f=Ge(y=>{const $=Wb({offset:y,targetRef:c,containerRef:l,color:a,type:s});u.current=$,o(d($))}),[p,h]=Xb({color:a,targetRef:c,containerRef:l,calculate:()=>qb(a,s),onDragChange:f,onDragChangeComplete(){i(d(u.current))},direction:"x",disabledDrag:r}),m=b.useMemo(()=>{if(s==="hue"){const y=a.toHsb();return y.s=1,y.b=1,y.a=1,new ir(y)}return a},[a,s]),w=b.useMemo(()=>n.map(y=>`${y.color} ${y.percent}%`),[n]);return b.createElement("div",{ref:l,className:Z(`${t}-slider`,`${t}-slider-${s}`),onMouseDown:h,onTouchStart:h},b.createElement(Gb,{prefixCls:t},b.createElement(Kb,{x:p.x,y:p.y,ref:c},b.createElement(Ub,{size:"small",color:m.toHexString(),prefixCls:t})),b.createElement(yP,{colors:w,type:s,prefixCls:t})))};function vP(e){return g.useMemo(()=>{const{slider:t}=e||{};return[t||wP]},[e])}function ni(){return ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ni.apply(this,arguments)}const CP=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],SP=b.forwardRef((e,t)=>{const{value:n,defaultValue:r,prefixCls:o=pP,onChange:i,onChangeComplete:a,className:s,style:l,panelRender:c,disabledAlpha:u=!1,disabled:d=!1,components:f}=e,[p]=vP(f),[h,m]=xP(r||mP,n),w=b.useMemo(()=>h.setA(1).toRgbString(),[h]),y=(R,O)=>{n||m(R),i==null||i(R,O)},$=R=>new ir(h.setHue(R)),x=R=>new ir(h.setA(R/100)),E=R=>{y($(R),{type:"hue",value:R})},v=R=>{y(x(R),{type:"alpha",value:R})},C=R=>{a&&a($(R))},I=R=>{a&&a(x(R))},N=Z(`${o}-panel`,s,{[`${o}-panel-disabled`]:d}),A={prefixCls:o,disabled:d,color:h},k=b.createElement(b.Fragment,null,b.createElement(bP,ni({onChange:y},A,{onChangeComplete:a})),b.createElement("div",{className:`${o}-slider-container`},b.createElement("div",{className:Z(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:u})},b.createElement(p,ni({},A,{type:"hue",colors:CP,min:0,max:359,value:h.getHue(),onChange:E,onChangeComplete:C})),!u&&b.createElement(p,ni({},A,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:w}],min:0,max:100,value:h.a*100,onChange:v,onChangeComplete:I}))),b.createElement(gP,{color:h.toRgbString(),prefixCls:o})));return b.createElement("div",{className:N,style:l,ref:t},typeof c=="function"?c(k):k)});process.env.NODE_ENV!=="production"&&(SP.displayName="ColorPicker");const EP=(e,t)=>(e==null?void 0:e.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6))||"",$P=(e,t)=>e?EP(e,t):"";let xc=function(){function e(t){var r;if(ns(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)==null?void 0:r.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:o,percent:i})=>({color:new e(o),percent:i})),this.metaColor=new ir(this.colors[0].color.metaColor)):this.metaColor=new ir(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return rs(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return $P(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(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])}();var kP={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 yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yc.apply(this,arguments)}const IP=(e,t)=>g.createElement(Jt,yc({},e,{ref:t,icon:kP})),Ia=g.forwardRef(IP);process.env.NODE_ENV!=="production"&&(Ia.displayName="RightOutlined");const RP=e=>e instanceof xc?e:new xc(e),PP=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),a=new ir(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},Yb=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return yt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Qb=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??la(t),i=e.contentLineHeightSM??la(n),a=e.contentLineHeightLG??la(r),s=PP(new xc(e.colorBgSolid),"#fff")?"#000":"#fff",l=xr.reduce((d,f)=>({...d,[`${f}ShadowColor`]:`0 ${xe(e.controlOutlineWidth)} 0 ${Uo(e[`${f}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...l,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:o,contentLineHeightSM:i,contentLineHeightLG:a,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*a)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:u}},TP=e=>{const{componentCls:t,antCls:n,lineWidth:r,lineType:o}=e,[i,a]=ur(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")]:o,[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}}}},xr.map(s=>{const l=e[`${s}6`],c=e[`${s}1`],u=e[`${s}Hover`],d=e[`${s}2`],f=e[`${s}3`],p=e[`${s}Active`],h=e[`${s}ShadowColor`];return{[`&${t}-color-${s}`]:{[i("color-base")]:l,[i("color-hover")]:u,[i("color-active")]:p,[i("color-light")]:c,[i("color-light-hover")]:d,[i("color-light-active")]:f,[i("shadow")]:h}}}),{[`&: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}}}]}},NP=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:s,calc:l}=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",...JR(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Hu(),[`${t}-icon`]:{display:"inline-flex",alignItems:"center",[n]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":Ea(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:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineEnd:l(s).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineStart:l(s).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},MP=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),ed=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:r,padding:`${xe(l)} ${xe(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:MP(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},AP=e=>{const t=yt(e,{fontSize:e.contentFontSize});return ed(t,e.componentCls)},zP=e=>{const t=yt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return ed(t,`${e.componentCls}-sm`)},OP=e=>{const t=yt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return ed(t,`${e.componentCls}-lg`)},DP=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},LP=on("Button",e=>{const t=Yb(e);return[NP(t),AP(t),zP(t),OP(t),DP(t),TP(t),dP(t)]},Qb,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function FP(e,t,n,r){const{focusElCls:o,focus:i,borderElCls:a}=n,s=a?"> *":"",l=s?` ${s}`:"",c=f=>f.filter(Boolean).map(p=>`&:${p}${l}`).join(","),u=c(["hover",o?`hover${o}`:null]),d=c([i?"focus":null,"active"]);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[d]:{zIndex:3},[u]:{zIndex:4},...o?{[`&${o}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function _P(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function td(e,t={focus:!0}){const{componentCls:n}=e,{componentCls:r}=t,o=r||n,i=`${o}-compact`;return{[i]:{...FP(e,i,t,o),..._P(o,i,t)}}}function jP(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":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function BP(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 HP(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:{...jP(e,t,e.componentCls),...BP(e.componentCls,t)}}}const VP=e=>{const{antCls:t,componentCls:n,lineWidth:r,calc:o,colorBgContainer:i}=e,a=`${n}-variant-solid:not([disabled])`,s=o(r).mul(-1).equal(),[l,c]=ur(t,"btn"),u=d=>({[`${n}-compact${d?"-vertical":""}-item`]:{[l("compact-connect-border-color")]:c("bg-color-hover"),[`&${a}`]:{transition:"none",[`& + ${a}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},d?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:"none"}}}});return[u(),u(!0),{[`${a}${n}-color-default`]:{[l("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${i})`}}]},WP=sI(["Button","compact"],e=>{const t=Yb(e);return[td(t),HP(t),VP(t)]},Qb);function qP(e){if(rn(e)){let t=e==null?void 0:e.delay;return t=os(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const XP={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},UP=b.forwardRef((e,t)=>{const{_skipSemantic:n,loading:r=!1,prefixCls:o,color:i,variant:a,type:s,danger:l=!1,shape:c,size:u,disabled:d,className:f,rootClassName:p,children:h,icon:m,iconPosition:w,iconPlacement:y,ghost:$=!1,block:x=!1,htmlType:E="button",classNames:v,styles:C,style:I,autoInsertSpace:N,autoFocus:A,...k}=e,R=or(h),O=s||"default",{getPrefixCls:z,direction:D,autoInsertSpace:M,className:L,style:_,classNames:V,styles:X,loadingIcon:P,shape:Y,color:K,variant:T}=Kn("button"),ne=c||Y||"default",[F,U]=b.useMemo(()=>{if(i&&a)return[i,a];if(s||l){const _e=XP[O]||[];return l?["danger",_e[1]]:_e}return a==="solid"?["primary",a]:K&&T?[K,T]:T==="solid"?["primary",T]:["default","outlined"]},[i,a,s,l,K,T,O]),[re,j]=b.useMemo(()=>$&&U==="solid"?[F,"outlined"]:[F,U],[F,U,$]),H=re==="danger",ee=H?"dangerous":re,oe=N??M??!0,B=z("btn",o),[ie,ae]=LP(B),Se=b.useContext(yr),ye=d??Se,q=b.useContext(zb),me=b.useMemo(()=>qP(r),[r]),[he,se]=u$(me.loading),[ue,pe]=b.useState(!1),Ne=b.useRef(null),Ee=Hr(t,Ne),Ie=R.length===1&&!m&&!Ui(j),W=b.useRef(!0);b.useEffect(()=>(W.current=!1,()=>{W.current=!0}),[]),Bt(()=>{me.delay>0?se(!0,{ms:me.delay}):se(me.loading,!0)},[me.delay,me.loading]),b.useEffect(()=>{if(!Ne.current||!oe)return;const _e=Ne.current.textContent||"";Ie&&bc(_e)?ue||pe(!0):ue&&pe(!1)}),b.useEffect(()=>{var _e;A&&((_e=Ne.current)==null||_e.focus())},[]);const Q=b.useCallback(_e=>{var pt;if(he||ye){_e.preventDefault();return}(pt=e.onClick)==null||pt.call(e,("href"in e,_e))},[e.onClick,he,ye]);if(process.env.NODE_ENV!=="production"){const _e=At("Button");process.env.NODE_ENV!=="production"&&_e(!(typeof m=="string"&&m.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${m}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&_e(!($&&Ui(j)),"usage","`link` or `text` button can't be a `ghost` button."),_e.deprecated(!w,"iconPosition","iconPlacement")}const{compactSize:le,compactItemClassnames:be}=No(B,D),$e=To(_e=>u??le??q??_e),ce=he?"loading":m,te=y??w??"start",ve=Yt(k,["navigate"]),Re={...e,type:O,color:re,variant:j,danger:H,shape:ne,size:$e,disabled:ye,loading:he,iconPlacement:te},Ue=kt(_),Pe=kt(I),[ze,Me]=Pn([n?void 0:V,v],[n?void 0:X,Ue,C,Pe],{props:Re}),it=Z(B,ie,ae,{[`${B}-${ne}`]:ne!=="default"&&ne!=="square"&&ne,[`${B}-${O}`]:O,[`${B}-dangerous`]:l,[`${B}-color-${ee}`]:ee,[`${B}-variant-${j}`]:j,[`${B}-lg`]:$e==="large",[`${B}-sm`]:$e==="small",[`${B}-icon-only`]:!h&&h!==0&&!!ce,[`${B}-background-ghost`]:$&&!Ui(j),[`${B}-loading`]:he,[`${B}-two-chinese-chars`]:ue&&oe&&!he,[`${B}-block`]:x,[`${B}-rtl`]:D==="rtl",[`${B}-icon-end`]:te==="end"},be,f,p,L,ze.root),Ye={className:ze.icon,style:Me.icon},It=_e=>b.createElement(Ob,{prefixCls:B,...Ye},_e),wt=b.createElement(FR,{existIcon:!!m,prefixCls:B,loading:he,mount:W.current,...Ye}),Ot=rn(r)&&r.icon||P;let gt;m&&!he?gt=It(m):r&&Ot?gt=It(Ot):gt=wt;const _t=yi(h)?LR(h,Ie&&oe,Me.content,ze.content):null;if(ve.href!==void 0)return b.createElement("a",{...ve,className:Z(it,{[`${B}-disabled`]:ye}),href:ye?void 0:ve.href,style:Me.root,onClick:Q,ref:Ee,tabIndex:ye?-1:0,"aria-disabled":ye},gt,_t);let jt=b.createElement("button",{...k,type:E,className:it,style:Me.root,onClick:Q,disabled:ye,ref:Ee},gt,_t,be&&b.createElement(WP,{prefixCls:B}));return Ui(j)||(jt=b.createElement(Mb,{component:"Button",disabled:he},jt)),jt}),ar=UP;ar.Group=OR;ar.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(ar.displayName="Button");const zr="RC_FORM_INTERNAL_HOOKS",ot=()=>{tt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},yo=g.createContext({getFieldValue:ot,getFieldsValue:ot,getFieldError:ot,getFieldWarning:ot,getFieldsError:ot,isFieldsTouched:ot,isFieldTouched:ot,isFieldValidating:ot,isFieldsValidating:ot,resetFields:ot,setFields:ot,setFieldValue:ot,setFieldsValue:ot,validateFields:ot,submit:ot,getInternalHooks:()=>(ot(),{dispatch:ot,initEntityValue:ot,registerField:ot,useSubscribe:ot,setInitialValues:ot,destroyForm:ot,setCallbacks:ot,registerWatch:ot,getFields:ot,setValidateMessages:ot,setPreserve:ot,getInitialValue:ot})}),Ra=g.createContext(null);function wc(e){return e==null?[]:Array.isArray(e)?e:[e]}function GP(e){return e&&!!e._init}function vc(){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(){const e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}const tl=vc(),KP=/%[sdj%]/g;let Zb=()=>{};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Zb=(e,t)=>{typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&t.every(n=>typeof n=="string")&&console.warn(e,t)});function Cc(e){if(!e||!e.length)return null;const t={};return e.forEach(n=>{const r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function yn(e,...t){let n=0;const r=t.length;return typeof e=="function"?e.apply(null,t):typeof e=="string"?e.replace(KP,i=>{if(i==="%%")return"%";if(n>=r)return i;switch(i){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 i}}):e}function YP(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function zt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||YP(t)&&typeof e=="string"&&!e)}function QP(e,t,n){const r=[];let o=0;const i=e.length;function a(s){r.push(...s||[]),o++,o===i&&n(r)}e.forEach(s=>{t(s,a)})}function Op(e,t,n){let r=0;const o=e.length;function i(a){if(a&&a.length){n(a);return}const s=r;r=r+1,s<o?t(e[s],i):n([])}i([])}function ZP(e){const t=[];return Object.keys(e).forEach(n=>{t.push(...e[n]||[])}),t}class Dp extends Error{constructor(n,r){super("Async Validation Error");J(this,"errors");J(this,"fields");this.errors=n,this.fields=r}}function JP(e,t,n,r,o){if(t.first){const d=new Promise((f,p)=>{const h=w=>(r(w),w.length?p(new Dp(w,Cc(w))):f(o)),m=ZP(e);Op(m,n,h)});return d.catch(f=>f),d}const i=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),s=a.length;let l=0;const c=[],u=new Promise((d,f)=>{const p=h=>{if(c.push.apply(c,h),l++,l===s)return r(c),c.length?f(new Dp(c,Cc(c))):d(o)};a.length||(r(c),d(o)),a.forEach(h=>{const m=e[h];i.indexOf(h)!==-1?Op(m,n,p):QP(m,n,p)})});return u.catch(d=>d),u}function eT(e){return!!(e&&e.message!==void 0)}function tT(e,t){let n=e;for(let r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function Lp(e,t){return n=>{let r;return e.fullFields?r=tT(t,e.fullFields):r=t[n.field||e.fullField],eT(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function Fp(e,t){if(t){for(const n in t)if(t.hasOwnProperty(n)){const r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]={...e[n],...r}:e[n]=r}}return e}const Kr="enum",nT=(e,t,n,r,o)=>{e[Kr]=Array.isArray(e[Kr])?e[Kr]:[],e[Kr].indexOf(t)===-1&&r.push(yn(o.messages[Kr],e.fullField,e[Kr].join(", ")))},rT=(e,t,n,r,o)=>{e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(yn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern=="string"&&(new RegExp(e.pattern).test(t)||r.push(yn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))))},oT=(e,t,n,r,o)=>{const i=typeof e.len=="number",a=typeof e.min=="number",s=typeof e.max=="number",l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let c=t,u=null;const d=typeof t=="number",f=typeof t=="string",p=Array.isArray(t);if(d?u="number":f?u="string":p&&(u="array"),!u)return!1;p&&(c=t.length),f&&(c=t.replace(l,"_").length),i?c!==e.len&&r.push(yn(o.messages[u].len,e.fullField,e.len)):a&&!s&&c<e.min?r.push(yn(o.messages[u].min,e.fullField,e.min)):s&&!a&&c>e.max?r.push(yn(o.messages[u].max,e.fullField,e.max)):a&&s&&(c<e.min||c>e.max)&&r.push(yn(o.messages[u].range,e.fullField,e.min,e.max))},Jb=(e,t,n,r,o,i)=>{e.required&&(!n.hasOwnProperty(e.field)||zt(t,i||e.type))&&r.push(yn(o.messages.required,e.fullField))};let Gi;const iT=()=>{if(Gi)return Gi;const e="[a-fA-F\\d:]",t=v=>v&&v.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}",a=`(?:${[`(?:${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,})?`,s=new RegExp(`(?:^${n}$)|(?:^${a}$)`),l=new RegExp(`^${n}$`),c=new RegExp(`^${a}$`),u=v=>v&&v.exact?s:new RegExp(`(?:${t(v)}${n}${t(v)})|(?:${t(v)}${a}${t(v)})`,"g");u.v4=v=>v&&v.exact?l:new RegExp(`${t(v)}${n}${t(v)}`,"g"),u.v6=v=>v&&v.exact?c:new RegExp(`${t(v)}${a}${t(v)}`,"g");const d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,h=u.v6().source,E=`(?:${d}|www\\.)${f}(?:localhost|${p}|${h}|(?:(?:[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 Gi=new RegExp(`(?:^${E}$)`,"i"),Gi},nl={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},Go={integer(e){return Go.number(e)&&parseInt(e,10)===e},float(e){return Go.number(e)&&!Go.integer(e)},array(e){return Array.isArray(e)},regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number(e){return isNaN(e)?!1:typeof e=="number"},object(e){return typeof e=="object"&&!Go.array(e)},method(e){return typeof e=="function"},email(e){return typeof e=="string"&&e.length<=320&&!!e.match(nl.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(nl.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(iT())},hex(e){return typeof e=="string"&&!!e.match(nl.hex)}},aT=(e,t,n,r,o)=>{if(e.required&&t===void 0){Jb(e,t,n,r,o);return}const i=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],a=e.type;i.indexOf(a)>-1?Go[a](t)||r.push(yn(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(yn(o.messages.types[a],e.fullField,e.type))},sT=(e,t,n,r,o)=>{(/^\s+$/.test(t)||t==="")&&r.push(yn(o.messages.whitespace,e.fullField))},Xe={required:Jb,whitespace:sT,type:aT,range:oT,enum:nT,pattern:rT},lT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o)}n(i)},cT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();Xe.required(e,t,r,i,o,"array"),t!=null&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},uT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe.type(e,t,r,i,o)}n(i)},dT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"date")&&!e.required)return n();if(Xe.required(e,t,r,i,o),!zt(t,"date")){let s;t instanceof Date?s=t:s=new Date(t),Xe.type(e,s,r,i,o),s&&Xe.range(e,s.getTime(),r,i,o)}}n(i)},fT="enum",pT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe[fT](e,t,r,i,o)}n(i)},mT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},gT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},hT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe.type(e,t,r,i,o)}n(i)},bT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===""&&(t=void 0),zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},xT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe.type(e,t,r,i,o)}n(i)},yT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"string")&&!e.required)return n();Xe.required(e,t,r,i,o),zt(t,"string")||Xe.pattern(e,t,r,i,o)}n(i)},wT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),zt(t)||Xe.type(e,t,r,i,o)}n(i)},vT=(e,t,n,r,o)=>{const i=[],a=Array.isArray(t)?"array":typeof t;Xe.required(e,t,r,i,o,a),n(i)},CT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"string")&&!e.required)return n();Xe.required(e,t,r,i,o,"string"),zt(t,"string")||(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o),Xe.pattern(e,t,r,i,o),e.whitespace===!0&&Xe.whitespace(e,t,r,i,o))}n(i)},Ki=(e,t,n,r,o)=>{const i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,i)&&!e.required)return n();Xe.required(e,t,r,a,o,i),zt(t,i)||Xe.type(e,t,r,a,o)}n(a)},jo={string:CT,method:hT,number:bT,boolean:uT,regexp:wT,integer:gT,float:mT,array:cT,object:xT,enum:pT,pattern:yT,date:dT,url:Ki,hex:Ki,email:Ki,tel:Ki,required:vT,any:lT},mr=class mr{constructor(t){J(this,"rules",null);J(this,"_messages",tl);this.define(t)}define(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(n=>{const r=t[n];this.rules[n]=Array.isArray(r)?r:[r]})}messages(t){return t&&(this._messages=Fp(vc(),t)),this._messages}validate(t,n={},r=()=>{}){let o=t,i=n,a=r;if(typeof i=="function"&&(a=i,i={}),!this.rules||Object.keys(this.rules).length===0)return a&&a(null,o),Promise.resolve(o);function s(d){let f=[],p={};function h(m){Array.isArray(m)?f=f.concat(...m):f.push(m)}for(let m=0;m<d.length;m++)h(d[m]);f.length?(p=Cc(f),a(f,p)):a(null,o)}if(i.messages){let d=this.messages();d===tl&&(d=vc()),Fp(d,i.messages),i.messages=d}else i.messages=this.messages();const l={};(i.keys||Object.keys(this.rules)).forEach(d=>{const f=this.rules[d];let p=o[d];f.forEach(h=>{let m=h;typeof m.transform=="function"&&(o===t&&(o={...o}),p=o[d]=m.transform(p),p!=null&&(m.type=m.type||(Array.isArray(p)?"array":typeof p))),typeof m=="function"?m={validator:m}:m={...m},m.validator=this.getValidationMethod(m),m.validator&&(m.field=d,m.fullField=m.fullField||d,m.type=this.getType(m),l[d]=l[d]||[],l[d].push({rule:m,value:p,source:o,field:d}))})});const u={};return JP(l,i,(d,f)=>{var $;const p=d.rule;let h=(p.type==="object"||p.type==="array")&&(typeof p.fields=="object"||typeof p.defaultField=="object");h=h&&(p.required||!p.required&&d.value),p.field=d.field;function m(x,E){return{...E,fullField:`${p.fullField}.${x}`,fullFields:p.fullFields?[...p.fullFields,x]:[x]}}function w(x=[]){let E=Array.isArray(x)?x:[x];!i.suppressWarning&&E.length&&mr.warning("async-validator:",E),E.length&&p.message!==void 0&&p.message!==null&&(E=[].concat(p.message));let v=E.map(Lp(p,o));if(i.first&&v.length)return u[p.field]=1,f(v);if(!h)f(v);else{if(p.required&&!d.value)return p.message!==void 0?v=[].concat(p.message).map(Lp(p,o)):i.error&&(v=[i.error(p,yn(i.messages.required,p.field))]),f(v);let C={};p.defaultField&&Object.keys(d.value).map(A=>{C[A]=p.defaultField}),C={...C,...d.rule.fields};const I={};Object.keys(C).forEach(A=>{const k=C[A],R=Array.isArray(k)?k:[k];I[A]=R.map(m.bind(null,A))});const N=new mr(I);N.messages(i.messages),d.rule.options&&(d.rule.options.messages=i.messages,d.rule.options.error=i.error),N.validate(d.value,d.rule.options||i,A=>{const k=[];v&&v.length&&k.push(...v),A&&A.length&&k.push(...A),f(k.length?k:null)})}}let y;if(p.asyncValidator)y=p.asyncValidator(p,d.value,w,d.source,i);else if(p.validator){try{y=p.validator(p,d.value,w,d.source,i)}catch(x){($=console.error)==null||$.call(console,x),i.suppressValidatorError||setTimeout(()=>{throw x},0),w(x.message)}y===!0?w():y===!1?w(typeof p.message=="function"?p.message(p.fullField||p.field):p.message||`${p.fullField||p.field} fails`):y instanceof Array?w(y):y instanceof Error&&w(y.message)}y&&y.then&&y.then(()=>w(),x=>w(x))},d=>{s(d)},o)}getType(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!jo.hasOwnProperty(t.type))throw new Error(yn("Unknown rule type %s",t.type));return t.type||"string"}getValidationMethod(t){if(typeof t.validator=="function")return t.validator;const n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?jo.required:jo[this.getType(t)]||void 0}};J(mr,"register",function(n,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");jo[n]=r}),J(mr,"warning",Zb),J(mr,"messages",tl),J(mr,"validators",jo);let Sc=mr;const sn="'${name}' is not a valid ${type}",ex={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:sn,method:sn,array:sn,object:sn,number:sn,date:sn,boolean:sn,integer:sn,float:sn,regexp:sn,email:sn,tel:sn,url:sn,hex:sn},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}"}},_p=Sc;function ST(e,t){return e.replace(/\\?\$\{\w+\}/g,n=>{if(n.startsWith("\\"))return n.slice(1);const r=n.slice(2,-1);return t[r]})}const jp="CODE_LOGIC_ERROR";async function Ec(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,_p.warning=()=>{},i.validator){const f=i.validator;i.validator=(...p)=>{try{return f(...p)}catch(h){return console.error(h),Promise.reject(jp)}}}let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const s=new _p({[e]:[i]}),l=oo(ex,r.validateMessages);s.messages(l);let c=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(f){f.errors&&(c=f.errors.map(({message:p},h)=>{const m=p===jp?l.default:p;return g.isValidElement(m)?g.cloneElement(m,{key:`error_${h}`}):m}))}if(!c.length&&a&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((p,h)=>Ec(`${e}.${h}`,p,a,r,o)))).reduce((p,h)=>[...p,...h],[]);const u={...n,name:e,enum:(n.enum||[]).join(", "),...o};return c.map(f=>typeof f=="string"?ST(f,u):f)}function ET(e,t,n,r,o,i){const a=e.join("."),s=n.map((c,u)=>{const d=c.validator,f={...c,ruleIndex:u};return d&&(f.validator=(p,h,m)=>{let w=!1;const $=d(p,h,(...x)=>{Promise.resolve().then(()=>{tt(!w,"Your validator function has already return a promise. `callback` will be ignored."),w||m(...x)})});w=$&&typeof $.then=="function"&&typeof $.catch=="function",tt(w,"`callback` is deprecated. Please return a promise instead."),w&&$.then(()=>{m()}).catch(x=>{m(x||" ")})}),f}).sort(({warningOnly:c,ruleIndex:u},{warningOnly:d,ruleIndex:f})=>!!c==!!d?u-f:c?1:-1);let l;if(o===!0)l=new Promise(async(c,u)=>{for(let d=0;d<s.length;d+=1){const f=s[d],p=await Ec(a,t,f,r,i);if(p.length){u([{errors:p,rule:f}]);return}}c([])});else{const c=s.map(u=>Ec(a,t,u,r,i).then(d=>({errors:d,rule:u})));l=(o?kT(c):$T(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}async function $T(e){return Promise.all(e).then(t=>[].concat(...t))}async function kT(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(o=>{o.errors.length&&n([o]),t+=1,t===e.length&&n([])})})})}function bt(e){return wc(e)}function Bp(e,t){let n={};return t.forEach(r=>{const o=In(e,r);n=xn(n,r,o)}),n}function fo(e,t,n=!1){return e&&e.some(r=>Pa(t,r,n))}function Pa(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((r,o)=>e[o]===r)}function IT(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(i=>{const a=e[i],s=t[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function RT(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function Hp(e,t,n){const{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;const o=e[t],i=t-n;return i>0?[...e.slice(0,n),o,...e.slice(n,t),...e.slice(t+1,r)]:i<0?[...e.slice(0,t),...e.slice(t+1,n+1),o,...e.slice(n+1,r)]:e}const tx=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)};class PT{constructor(t){J(this,"namePathList",[]);J(this,"taskId",0);J(this,"watcherList",new Set);J(this,"form");this.form=t}register(t){return this.watcherList.add(t),()=>{this.watcherList.delete(t)}}notify(t){t.forEach(n=>{this.namePathList.every(r=>!Pa(r,n))&&this.namePathList.push(n)}),this.doBatch()}doBatch(){this.taskId+=1;const t=this.taskId;tx(()=>{if(t===this.taskId&&this.watcherList.size){const n=this.form.getForm(),r=n.getFieldsValue(),o=n.getFieldsValue(!0);this.watcherList.forEach(i=>{i(r,o,this.namePathList)}),this.namePathList=[]}})}}async function TT(){return new Promise(e=>{tx(()=>{xt(()=>{e()})})})}function $c(){return $c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$c.apply(this,arguments)}const Ir=[],Bo=[];function rl(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}class nx extends g.PureComponent{constructor(n){super(n);J(this,"state",{resetCount:0});J(this,"cancelRegisterFunc",null);J(this,"mounted",!1);J(this,"touched",!1);J(this,"dirty",!1);J(this,"validatePromise");J(this,"prevValidating");J(this,"errors",Ir);J(this,"warnings",Bo);J(this,"cancelRegister",()=>{const{preserve:n,isListField:r,name:o}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,n,bt(o)),this.cancelRegisterFunc=null});J(this,"getNamePath",()=>{const{name:n,fieldContext:r}=this.props,{prefixName:o=[]}=r;return n!==void 0?[...o,...n]:[]});J(this,"getRules",()=>{const{rules:n=[],fieldContext:r}=this.props;return n.map(o=>typeof o=="function"?o(r):o)});J(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:n})=>({resetCount:n+1}))});J(this,"metaCache",null);J(this,"triggerMetaEvent",n=>{const{onMetaChange:r}=this.props;if(r){const o={...this.getMeta(),destroy:n};ai(this.metaCache,o)||r(o),this.metaCache=o}else this.metaCache=null});J(this,"onStoreChange",(n,r,o)=>{const{shouldUpdate:i,dependencies:a=[],onReset:s}=this.props,{store:l}=o,c=this.getNamePath(),u=this.getValue(n),d=this.getValue(l),f=r&&fo(r,c);switch(o.type==="valueUpdate"&&o.source==="external"&&!ai(u,d)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=Ir,this.warnings=Bo,this.triggerMetaEvent()),o.type){case"reset":if(!r||f){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=Ir,this.warnings=Bo,this.triggerMetaEvent(),s==null||s(),this.refresh();return}break;case"remove":{if(i&&rl(i,n,l,u,d,o)){this.reRender();return}break}case"setField":{const{data:p}=o;if(f){"touched"in p&&(this.touched=p.touched),"validating"in p&&!("originRCField"in p)&&(this.validatePromise=p.validating?Promise.resolve([]):null),"errors"in p&&(this.errors=p.errors||Ir),"warnings"in p&&(this.warnings=p.warnings||Bo),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in p&&fo(r,c,!0)){this.reRender();return}if(i&&!c.length&&rl(i,n,l,u,d,o)){this.reRender();return}break}case"dependenciesUpdate":{if(a.map(bt).some(h=>fo(o.relatedFields,h))){this.reRender();return}break}default:if(f||(!a.length||c.length||i)&&rl(i,n,l,u,d,o)){this.reRender();return}break}i===!0&&this.reRender()});J(this,"validateRules",n=>{const r=this.getNamePath(),o=this.getValue(),{triggerName:i,validateOnly:a=!1,delayFrame:s}=n||{},l=Promise.resolve().then(async()=>{if(!this.mounted)return[];const{validateFirst:c=!1,messageVariables:u,validateDebounce:d}=this.props;s&&await TT();let f=this.getRules();if(i&&(f=f.filter(h=>h).filter(h=>{const{validateTrigger:m}=h;return m?wc(m).includes(i):!0})),d&&i&&(await new Promise(h=>{setTimeout(h,d)}),this.validatePromise!==l))return[];const p=ET(r,o,f,n,c,u);return p.catch(h=>h).then((h=Ir)=>{var m;if(this.validatePromise===l){this.validatePromise=null;const w=[],y=[];(m=h.forEach)==null||m.call(h,({rule:{warningOnly:$},errors:x=Ir})=>{$?y.push(...x):w.push(...x)}),this.errors=w,this.warnings=y,this.triggerMetaEvent(),this.reRender()}}),p});return a||(this.validatePromise=l,this.dirty=!0,this.errors=Ir,this.warnings=Bo,this.triggerMetaEvent(),this.reRender()),l});J(this,"isFieldValidating",()=>!!this.validatePromise);J(this,"isFieldTouched",()=>this.touched);J(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;const{fieldContext:n}=this.props,{getInitialValue:r}=n.getInternalHooks(zr);return r(this.getNamePath())!==void 0});J(this,"getErrors",()=>this.errors);J(this,"getWarnings",()=>this.warnings);J(this,"isListField",()=>this.props.isListField);J(this,"isList",()=>this.props.isList);J(this,"isPreserve",()=>this.props.preserve);J(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null}));J(this,"getOnlyChild",n=>{if(typeof n=="function"){const o=this.getMeta();return{...this.getOnlyChild(n(this.getControlled(),o,this.props.fieldContext)),isFunction:!0}}const r=or(n);return r.length!==1||!g.isValidElement(r[0])?{child:r,isFunction:!1}:{child:r[0],isFunction:!1}});J(this,"getValue",n=>{const{getFieldsValue:r}=this.props.fieldContext,o=this.getNamePath();return In(n||r(!0),o)});J(this,"getControlled",(n={})=>{const{name:r,trigger:o="onChange",validateTrigger:i,getValueFromEvent:a,normalize:s,valuePropName:l="value",getValueProps:c,fieldContext:u}=this.props,d=i!==void 0?i:u.validateTrigger,f=this.getNamePath(),{getInternalHooks:p,getFieldsValue:h}=u,{dispatch:m}=p(zr),w=this.getValue(),y=c||(C=>({[l]:C})),$=n[o],x=r!==void 0?y(w):{};process.env.NODE_ENV!=="production"&&x&&Object.keys(x).forEach(C=>{tt(typeof x[C]!="function",`It's not recommended to generate dynamic function prop by \`getValueProps\`. Please pass it to child component directly (prop: ${C})`)});const E={...n,...x};return E[o]=(...C)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();const I=this.getValue();let N;a?N=a(...C):N=RT(l,...C),s&&(N=s(N,I,h(!0))),N!==I&&m({type:"updateValue",namePath:f,value:N}),$&&$(...C)},wc(d||[]).forEach(C=>{const I=E[C];E[C]=(...N)=>{I&&I(...N);const{rules:A}=this.props;A&&A.length&&m({type:"validateField",namePath:f,triggerName:C})}}),E});if(n.fieldContext){const{getInternalHooks:r}=n.fieldContext,{initEntityValue:o}=r(zr);o(this)}}componentDidMount(){const{shouldUpdate:n,fieldContext:r}=this.props;if(this.mounted=!0,r){const{getInternalHooks:o}=r,{registerField:i}=o(zr);this.cancelRegisterFunc=i(this)}n===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){const{resetCount:n}=this.state,{children:r}=this.props,{child:o,isFunction:i}=this.getOnlyChild(r);let a;return i?a=o:g.isValidElement(o)?a=g.cloneElement(o,this.getControlled(o.props)):(tt(!o,"`children` of Field is not validate ReactElement."),a=o),g.createElement(g.Fragment,{key:n},a)}}J(nx,"contextType",yo);function rx({name:e,...t}){const n=g.useContext(yo),r=g.useContext(Ra),o=e!==void 0?bt(e):void 0,i=t.isListField??!!r;let a="keep";return i||(a=`_${(o||[]).join("_")}`),process.env.NODE_ENV!=="production"&&t.preserve===!1&&i&&o.length<=1&&tt(!1,"`preserve` should not apply on Form.List fields."),g.createElement(nx,$c({key:a,name:o,isListField:i},t,{fieldContext:n}))}function NT({name:e,initialValue:t,children:n,rules:r,validateTrigger:o,isListField:i}){const a=g.useContext(yo),s=g.useContext(Ra),c=g.useRef({keys:[],id:0}).current,u=g.useMemo(()=>[...bt(a.prefixName)||[],...bt(e)],[a.prefixName,e]),d=g.useMemo(()=>({...a,prefixName:u}),[a,u]),f=g.useMemo(()=>({getKey:h=>{const m=u.length,w=h[m];return[c.keys[w],h.slice(m+1)]}}),[c,u]);if(typeof n!="function")return tt(!1,"Form.List only accepts function as children."),null;const p=(h,m,{source:w})=>w==="internal"?!1:h!==m;return g.createElement(Ra.Provider,{value:f},g.createElement(yo.Provider,{value:d},g.createElement(rx,{name:[],shouldUpdate:p,rules:r,validateTrigger:o,initialValue:t,isList:!0,isListField:i??!!s},({value:h=[],onChange:m},w)=>{const{getFieldValue:y}=a,$=()=>y(u||[])||[],x={add:(v,C)=>{const I=$();C>=0&&C<=I.length?(c.keys=[...c.keys.slice(0,C),c.id,...c.keys.slice(C)],m([...I.slice(0,C),v,...I.slice(C)])):(process.env.NODE_ENV!=="production"&&(C<0||C>I.length)&&tt(!1,"The second parameter of the add function should be a valid positive number."),c.keys=[...c.keys,c.id],m([...I,v])),c.id+=1},remove:v=>{const C=$(),I=new Set(Array.isArray(v)?v:[v]);I.size<=0||(c.keys=c.keys.filter((N,A)=>!I.has(A)),m(C.filter((N,A)=>!I.has(A))))},move(v,C){if(v===C)return;const I=$();v<0||v>=I.length||C<0||C>=I.length||(c.keys=Hp(c.keys,v,C),m(Hp(I,v,C)))}};let E=h||[];return Array.isArray(E)||(E=[],process.env.NODE_ENV!=="production"&&tt(!1,`Current value of '${u.join(" > ")}' is not an array type.`)),n(E.map((v,C)=>{let I=c.keys[C];return I===void 0&&(c.keys[C]=c.id,I=c.keys[C],c.id+=1),{name:C,key:I,isListField:!0}}),x,w)})))}function MT(e){let t=!1,n=e.length;const r=[];return e.length?new Promise((o,i)=>{e.forEach((a,s)=>{a.catch(l=>(t=!0,l)).then(l=>{n-=1,r[s]=l,!(n>0)&&(t&&i(r),o(r))})})}):Promise.resolve([])}const kc="__@field_split__";function Yi(e){return e.map(t=>`${typeof t}:${t}`).join(kc)}class Yr{constructor(){J(this,"kvs",new Map)}set(t,n){this.kvs.set(Yi(t),n)}get(t){return this.kvs.get(Yi(t))}getAsPrefix(t){const n=Yi(t),r=n+kc,o=[],i=this.kvs.get(n);return i!==void 0&&o.push(i),this.kvs.forEach((a,s)=>{s.startsWith(r)&&o.push(a)}),o}update(t,n){const r=this.get(t),o=n(r);o?this.set(t,o):this.delete(t)}delete(t){this.kvs.delete(Yi(t))}map(t){return[...this.kvs.entries()].map(([n,r])=>{const o=n.split(kc);return t({key:o.map(i=>{const[,a,s]=i.match(/^([^:]*):(.*)$/);return a==="number"?Number(s):s}),value:r})})}toJSON(){const t={};return this.map(({key:n,value:r})=>(t[n.join(".")]=r,null)),t}}class AT{constructor(t){J(this,"formHooked",!1);J(this,"forceRootUpdate");J(this,"subscribable",!0);J(this,"store",{});J(this,"fieldEntities",[]);J(this,"initialValues",{});J(this,"callbacks",{});J(this,"validateMessages",null);J(this,"preserve",null);J(this,"lastValidatePromise",null);J(this,"watcherCenter",new PT(this));J(this,"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}));J(this,"getInternalHooks",t=>t===zr?(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}):(tt(!1,"`getInternalHooks` is internal usage. Should not call directly."),null));J(this,"useSubscribe",t=>{this.subscribable=t});J(this,"prevWithoutPreserves",null);J(this,"setInitialValues",(t,n)=>{var r;if(this.initialValues=t||{},n){let o=oo(t,this.store);(r=this.prevWithoutPreserves)==null||r.map(({key:i})=>{o=xn(o,i,In(t,i))}),this.prevWithoutPreserves=null,this.updateStore(o)}});J(this,"destroyForm",t=>{if(t)this.updateStore({});else{const n=new Yr;this.getFieldEntities(!0).forEach(r=>{this.isMergedPreserve(r.isPreserve())||n.set(r.getNamePath(),!0)}),this.prevWithoutPreserves=n}});J(this,"getInitialValue",t=>{const n=In(this.initialValues,t);return t.length?oo(n):n});J(this,"setCallbacks",t=>{this.callbacks=t});J(this,"setValidateMessages",t=>{this.validateMessages=t});J(this,"setPreserve",t=>{this.preserve=t});J(this,"registerWatch",t=>this.watcherCenter.register(t));J(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)});J(this,"timeoutId",null);J(this,"warningUnhooked",()=>{process.env.NODE_ENV!=="production"&&!this.timeoutId&&typeof window<"u"&&(this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.formHooked||tt(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))});J(this,"updateStore",t=>{this.store=t});J(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities);J(this,"getFieldsMap",(t=!1)=>{const n=new Yr;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r)}),n});J(this,"getFieldEntitiesForNamePathList",(t,n=!1)=>{if(!t)return this.getFieldEntities(!0);const r=this.getFieldsMap(!0);return n?t.flatMap(o=>{const i=bt(o),a=r.getAsPrefix(i);return a.length?a:[{INVALIDATE_NAME_PATH:i}]}):t.map(o=>{const i=bt(o);return r.get(i)||{INVALIDATE_NAME_PATH:bt(o)}})});J(this,"getFieldsValue",(t,n)=>{this.warningUnhooked();let r,o;if(t===!0||Array.isArray(t)?(r=t,o=n):t&&typeof t=="object"&&(o=t.filter),r===!0&&!o)return this.store;const i=this.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null,!0),a=[],s=[];i.forEach(c=>{var d;const u=c.INVALIDATE_NAME_PATH||c.getNamePath();if((d=c.isList)!=null&&d.call(c)){s.push(u);return}if(!o)a.push(u);else{const f="getMeta"in c?c.getMeta():null;o(f)&&a.push(u)}});let l=Bp(this.store,a.map(bt));return s.forEach(c=>{In(l,c)||(l=xn(l,c,[]))}),l});J(this,"getFieldValue",t=>{this.warningUnhooked();const n=bt(t);return In(this.store,n)});J(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,o)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:bt(t[o]),errors:[],warnings:[]})));J(this,"getFieldError",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].errors});J(this,"getFieldWarning",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].warnings});J(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();const[n,r]=t;let o,i=!1;t.length===0?o=null:t.length===1?Array.isArray(n)?(o=n.map(bt),i=!1):(o=null,i=n):(o=n.map(bt),i=r);const a=this.getFieldEntities(!0),s=d=>d.isFieldTouched();if(!o)return i?a.every(d=>s(d)||d.isList()):a.some(s);const l=new Yr;o.forEach(d=>{l.set(d,[])}),a.forEach(d=>{const f=d.getNamePath();o.forEach(p=>{p.every((h,m)=>f[m]===h)&&l.update(p,h=>[...h,d])})});const c=d=>d.some(s),u=l.map(({value:d})=>d);return i?u.every(c):u.some(c)});J(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t])));J(this,"isFieldsValidating",t=>{this.warningUnhooked();const n=this.getFieldEntities();if(!t)return n.some(o=>o.isFieldValidating());const r=t.map(bt);return n.some(o=>{const i=o.getNamePath();return fo(r,i)&&o.isFieldValidating()})});J(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t])));J(this,"resetWithFieldInitialValue",(t={})=>{const n=new Yr,r=this.getFieldEntities(!0);r.forEach(a=>{const{initialValue:s}=a.props,l=a.getNamePath();if(s!==void 0){const c=n.get(l)||new Set;c.add({entity:a,value:s}),n.set(l,c)}});const o=a=>{a.forEach(s=>{const{initialValue:l}=s.props;if(l!==void 0){const c=s.getNamePath();if(this.getInitialValue(c)!==void 0)tt(!1,`Form already set 'initialValues' with path '${c.join(".")}'. Field can not overwrite it.`);else{const d=n.get(c);if(d&&d.size>1)tt(!1,`Multiple Field with path '${c.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(d){const f=this.getFieldValue(c);!s.isListField()&&(!t.skipExist||f===void 0)&&this.updateStore(xn(this.store,c,[...d][0].value))}}}})};let i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(a=>{const s=n.get(a);s&&i.push(...[...s].map(l=>l.entity))})):i=r,o(i)});J(this,"resetFields",t=>{this.warningUnhooked();const n=this.store;if(!t){this.updateStore(oo(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const r=t.map(bt);r.forEach(o=>{const i=this.getInitialValue(o);this.updateStore(xn(this.store,o,i))}),this.resetWithFieldInitialValue({namePathList:r}),this.notifyObservers(n,r,{type:"reset"}),this.notifyWatch(r)});J(this,"setFields",t=>{this.warningUnhooked();const n=this.store,r=[];t.forEach(o=>{const{name:i,...a}=o,s=bt(i);r.push(s),"value"in a&&this.updateStore(xn(this.store,s,a.value)),this.notifyObservers(n,[s],{type:"setField",data:o})}),this.notifyWatch(r)});J(this,"getFields",()=>this.getFieldEntities(!0).map(r=>{const o=r.getNamePath(),a={...r.getMeta(),name:o,value:this.getFieldValue(o)};return Object.defineProperty(a,"originRCField",{value:!0}),a}));J(this,"initEntityValue",t=>{const{initialValue:n}=t.props;if(n!==void 0){const r=t.getNamePath();In(this.store,r)===void 0&&this.updateStore(xn(this.store,r,n))}});J(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0);J(this,"registerField",t=>{this.fieldEntities.push(t);const n=t.getNamePath();if(this.notifyWatch([n]),t.props.initialValue!==void 0){const r=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(r,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(r,o,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(a=>a!==t),!this.isMergedPreserve(o)&&(!r||i.length>1)){const a=r?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==a&&this.fieldEntities.every(s=>!Pa(s.getNamePath(),n))){const s=this.store;this.updateStore(xn(s,n,a,!0)),this.notifyObservers(s,[n],{type:"remove"}),this.triggerDependenciesUpdate(s,n)}}this.notifyWatch([n])}});J(this,"dispatch",t=>{switch(t.type){case"updateValue":{const{namePath:n,value:r}=t;this.updateValue(n,r);break}case"validateField":{const{namePath:n,triggerName:r}=t;this.validateFields([n],{triggerName:r});break}}});J(this,"notifyObservers",(t,n,r)=>{if(this.subscribable){const o={...r,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:i})=>{i(t,n,o)})}else this.forceRootUpdate()});J(this,"triggerDependenciesUpdate",(t,n)=>{const r=this.getDependencyChildrenFields(n);return r.length&&this.validateFields(r,{delayFrame:!0}),this.notifyObservers(t,r,{type:"dependenciesUpdate",relatedFields:[n,...r]}),r});J(this,"updateValue",(t,n)=>{const r=bt(t),o=this.store;this.updateStore(xn(this.store,r,n)),this.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),this.notifyWatch([r]);const i=this.triggerDependenciesUpdate(o,r),{onValuesChange:a}=this.callbacks;if(a){const s=Bp(this.store,[r]),l=this.getFieldsValue(),c=xn(l,r,In(s,r));a(s,c)}this.triggerOnFieldsChange([r,...i])});J(this,"setFieldsValue",t=>{this.warningUnhooked();const n=this.store;if(t){const r=oo(this.store,t);this.updateStore(r)}this.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()});J(this,"setFieldValue",(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:!0}])});J(this,"getDependencyChildrenFields",t=>{const n=new Set,r=[],o=new Yr;this.getFieldEntities().forEach(a=>{const{dependencies:s}=a.props;(s||[]).forEach(l=>{const c=bt(l);o.update(c,(u=new Set)=>(u.add(a),u))})});const i=a=>{(o.get(a)||new Set).forEach(l=>{if(!n.has(l)){n.add(l);const c=l.getNamePath();l.isFieldDirty()&&c.length&&(r.push(c),i(c))}})};return i(t),r});J(this,"triggerOnFieldsChange",(t,n)=>{const{onFieldsChange:r}=this.callbacks;if(r){const o=this.getFields();if(n){const a=new Yr;n.forEach(({name:s,errors:l})=>{a.set(s,l)}),o.forEach(s=>{s.errors=a.get(s.name)||s.errors})}const i=o.filter(({name:a})=>fo(t,a));i.length&&r(i,o)}});J(this,"validateFields",(t,n)=>{this.warningUnhooked();let r,o;Array.isArray(t)||typeof t=="string"||typeof n=="string"?(r=t,o=n):o=t;const i=!!r,a=i?r.map(bt):[],s=[...a],l=[],c=String(Date.now()),u=new Set,{recursive:d,dirty:f}=o||{};this.getFieldEntities(!0).forEach(w=>{const y=w.getNamePath();if(i||((!w.isList()||!a.some($=>Pa($,y,!0)))&&s.push(y),a.push(y)),!(!w.props.rules||!w.props.rules.length)&&!(f&&!w.isFieldDirty())&&(u.add(y.join(c)),!i||fo(a,y,d))){const $=w.validateRules({validateMessages:{...ex,...this.validateMessages},...o});l.push($.then(()=>({name:y,errors:[],warnings:[]})).catch(x=>{var C;const E=[],v=[];return(C=x.forEach)==null||C.call(x,({rule:{warningOnly:I},errors:N})=>{I?v.push(...N):E.push(...N)}),E.length?Promise.reject({name:y,errors:E,warnings:v}):{name:y,errors:E,warnings:v}}))}});const p=MT(l);this.lastValidatePromise=p,p.catch(w=>w).then(w=>{const y=w.map(({name:$})=>$);this.notifyObservers(this.store,y,{type:"validateFinish"}),this.triggerOnFieldsChange(y,w)});const h=p.then(()=>this.lastValidatePromise===p?Promise.resolve(this.getFieldsValue(s)):Promise.reject([])).catch(w=>{var x,E;const y=w.filter(v=>v&&v.errors.length),$=(E=(x=y[0])==null?void 0:x.errors)==null?void 0:E[0];return Promise.reject({message:$,values:this.getFieldsValue(a),errorFields:y,outOfDate:this.lastValidatePromise!==p})});h.catch(w=>w);const m=a.filter(w=>u.has(w.join(c)));return this.triggerOnFieldsChange(m),h});J(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{const{onFinish:n}=this.callbacks;if(n)try{n(t)}catch(r){console.error(r)}}).catch(t=>{const{onFinishFailed:n}=this.callbacks;n&&n(t)})});this.forceRootUpdate=t}}function ox(e){const t=g.useRef(null),[,n]=g.useState({});if(!t.current)if(e)t.current=e;else{const r=()=>{n({})},o=new AT(r);t.current=o.getForm()}return[t.current]}const Ic=g.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),zT=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=g.useContext(Ic),i=g.useRef({});return g.createElement(Ic.Provider,{value:{...o,validateMessages:{...o.validateMessages,...e},triggerFormChange:(a,s)=>{t&&t(a,{changedFields:s,forms:i.current}),o.triggerFormChange(a,s)},triggerFormFinish:(a,s)=>{n&&n(a,{values:s,forms:i.current}),o.triggerFormFinish(a,s)},registerForm:(a,s)=>{a&&(i.current={...i.current,[a]:s}),o.registerForm(a,s)},unregisterForm:a=>{const s={...i.current};delete s[a],i.current=s,o.unregisterForm(a)}}},r)};function Rc(){return Rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rc.apply(this,arguments)}const OT=(e,t)=>{const{name:n,initialValues:r,fields:o,form:i,preserve:a,children:s,component:l="form",validateMessages:c,validateTrigger:u="onChange",onValuesChange:d,onFieldsChange:f,onFinish:p,onFinishFailed:h,clearOnDestroy:m,...w}=e,y=g.useRef(null),$=g.useContext(Ic),[x]=ox(i),{useSubscribe:E,setInitialValues:v,setCallbacks:C,setValidateMessages:I,setPreserve:N,destroyForm:A}=x.getInternalHooks(zr);g.useImperativeHandle(t,()=>({...x,nativeElement:y.current})),g.useEffect(()=>($.registerForm(n,x),()=>{$.unregisterForm(n)}),[$,x,n]),I({...$.validateMessages,...c}),C({onValuesChange:d,onFieldsChange:(L,..._)=>{$.triggerFormChange(n,L),f&&f(L,..._)},onFinish:L=>{$.triggerFormFinish(n,L),p&&p(L)},onFinishFailed:h}),N(a);const k=g.useRef(null);v(r,!k.current),k.current||(k.current=!0),g.useEffect(()=>()=>A(m),[]);let R;const O=typeof s=="function";if(O){const L=x.getFieldsValue(!0);R=s(L,x)}else R=s;E(!O);const z=g.useRef(null);g.useEffect(()=>{IT(z.current||[],o||[])||x.setFields(o||[]),z.current=o},[o,x]);const D=g.useMemo(()=>({...x,validateTrigger:u}),[x,u]),M=g.createElement(Ra.Provider,{value:null},g.createElement(yo.Provider,{value:D},R));return l===!1?M:g.createElement(l,Rc({},w,{ref:y,onSubmit:L=>{L.preventDefault(),L.stopPropagation(),x.submit()},onReset:L=>{var _;L.preventDefault(),x.resetFields(),(_=w.onReset)==null||_.call(w,L)}}),M)};function ol(e){try{return JSON.stringify(e)}catch{return Math.random()}}function DT(...e){const[t,n={}]=e,r=GP(n)?{form:n}:n,o=r.form,[i,a]=b.useState(()=>typeof t=="function"?t({}):void 0),s=b.useMemo(()=>ol(i),[i]),l=b.useRef(s);l.current=s;const c=b.useContext(yo),u=o||c,d=u&&u._init;process.env.NODE_ENV!=="production"&&tt(e.length===2?o?d:!0:d,"useWatch requires a form instance since it can not auto detect from context.");const{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:h}=p(zr),m=Ge((y,$)=>{const x=r.preserve?$??f(!0):y??f(),E=typeof t=="function"?t(x):In(x,bt(t));ol(i)!==ol(E)&&a(E)}),w=typeof t=="function"?t:JSON.stringify(t);return b.useEffect(()=>{d&&m()},[d,w]),b.useEffect(()=>d?h(($,x)=>{m($,x)}):void 0,[d]),i}const LT=g.forwardRef(OT),Ci=LT;Ci.FormProvider=zT;Ci.Field=rx;Ci.List=NT;Ci.useForm=ox;Ci.useWatch=DT;const sr=g.createContext({});process.env.NODE_ENV!=="production"&&(sr.displayName="FormItemInputContext");const FT=({children:e,status:t,override:n})=>{const r=g.useContext(sr),o=g.useMemo(()=>{const i={...r};return n&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,n,r]);return g.createElement(sr.Provider,{value:o},e)},_T=g.createContext(void 0),Ta=e=>{const{space:t,form:n,children:r}=e;if(!yi(r))return null;let o=r;return n&&(o=b.createElement(FT,{override:!0,status:!0},o)),t&&(o=b.createElement(AR,null,o)),o};function jT(e){return t=>g.createElement(Sr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},g.createElement(e,{...t}))}const BT=(e,t,n,r,o)=>jT(a=>{const{prefixCls:s,style:l}=a,c=g.useRef(null),[u,d]=g.useState(0),[f,p]=g.useState(0),[h,m]=un(!1,a.open),{getPrefixCls:w}=g.useContext(dt),y=w(r,s);g.useEffect(()=>{if(m(!0),typeof ResizeObserver<"u"){const E=new ResizeObserver(C=>{const I=C[0].target;d(I.offsetHeight+8),p(I.offsetWidth)}),v=setInterval(()=>{var N;const C=o?`.${o(y)}`:`.${y}-dropdown`,I=(N=c.current)==null?void 0:N.querySelector(C);I&&(clearInterval(v),E.observe(I))},10);return()=>{clearInterval(v),E.disconnect()}}},[y]);let $={...a,style:{...l,margin:0},open:h,getPopupContainer:()=>c.current};$={...$,[t]:{overflow:{adjustX:!1,adjustY:!1}}};const x={paddingBottom:u,position:"relative",minWidth:f};return g.createElement("div",{ref:c,style:x},g.createElement(e,{...$}))}),Qr=void 0;function HT(e,t){const{prefixCls:n,invalidate:r,item:o,renderItem:i,responsive:a,responsiveDisabled:s,registerSize:l,itemKey:c,className:u,style:d,children:f,display:p,order:h,component:m="div",...w}=e,y=a&&!p;function $(I){l(c,I)}g.useEffect(()=>()=>{$(null)},[]);const x=i&&o!==Qr?i(o,{index:h}):f;let E;r||(E={opacity:y?0:1,height:y?0:Qr,overflowY:y?"hidden":Qr,order:a?h:Qr,pointerEvents:y?"none":Qr,position:y?"absolute":Qr});const v={};y&&(v["aria-hidden"]=!0);let C=g.createElement(m,$t({className:Z(!r&&n,u),style:{...E,...d}},v,w,{ref:t}),x);return a&&(C=g.createElement(Io,{onResize:({offsetWidth:I})=>{$(I)},disabled:s},C)),C}const ao=g.forwardRef(HT);process.env.NODE_ENV!=="production"&&(ao.displayName="Item");function VT(e){if(typeof MessageChannel>"u")xt(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function WT(){const e=g.useRef(null);return n=>{e.current||(e.current=[],VT(()=>{po.unstable_batchedUpdates(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(n)}}function Zr(e,t){const[n,r]=g.useState(t),o=Ge(i=>{e(()=>{r(i)})});return[n,o]}const Na=b.createContext(null),qT=(e,t)=>{const n=g.useContext(Na);if(!n){const{component:s="div",...l}=e;return g.createElement(s,$t({},l,{ref:t}))}const{className:r,...o}=n,{className:i,...a}=e;return g.createElement(Na.Provider,{value:null},g.createElement(ao,$t({ref:t,className:Z(r,i)},o,a)))},ix=g.forwardRef(qT);process.env.NODE_ENV!=="production"&&(ix.displayName="RawItem");const ax="responsive",sx="invalidate";function XT(e){return`+ ${e.length} ...`}function UT(e,t){const{prefixCls:n="rc-overflow",data:r=[],renderItem:o,renderRawItem:i,itemKey:a,itemWidth:s=10,ssr:l,style:c,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:h,suffix:m,component:w="div",itemComponent:y,onVisibleChange:$,...x}=e,E=l==="full",v=WT(),[C,I]=Zr(v,null),N=C||0,[A,k]=Zr(v,new Map),[R,O]=Zr(v,0),[z,D]=Zr(v,0),[M,L]=Zr(v,0),[_,V]=Zr(v,0),[X,P]=b.useState(null),[Y,K]=b.useState(null),T=g.useMemo(()=>Y===null&&E?Number.MAX_SAFE_INTEGER:Y||0,[Y,C]),[ne,F]=b.useState(!1),U=`${n}-item`,re=Math.max(R,z),j=d===ax,H=r.length&&j,ee=d===sx,oe=H||typeof d=="number"&&r.length>d,B=b.useMemo(()=>{let ce=r;return H?C===null&&E?ce=r:ce=r.slice(0,Math.min(r.length,N/s)):typeof d=="number"&&(ce=r.slice(0,d)),ce},[r,s,C,d,H]),ie=b.useMemo(()=>H?r.slice(T+1):r.slice(B.length),[r,B,H,T]),ae=b.useCallback((ce,te)=>typeof a=="function"?a(ce):(a&&(ce==null?void 0:ce[a]))??te,[a]),Se=b.useCallback(o||(ce=>ce),[o]);function ye(ce,te,ve){Y===ce&&(te===void 0||te===X)||(K(ce),ve||(F(ce<r.length-1),$==null||$(ce)),te!==void 0&&P(te))}function q(ce,te){I(te.clientWidth)}function me(ce,te){k(ve=>{const Re=new Map(ve);return te===null?Re.delete(ce):Re.set(ce,te),Re})}function he(ce,te){D(te),O(z)}function se(ce,te){L(te)}function ue(ce,te){V(te)}function pe(ce){return A.get(ae(B[ce],ce))}Bt(()=>{if(N&&typeof re=="number"&&B){let ce=M+_;const te=B.length,ve=te-1;if(!te){ye(0,null);return}for(let Re=0;Re<te;Re+=1){let Ue=pe(Re);if(E&&(Ue=Ue||0),Ue===void 0){ye(Re-1,void 0,!0);break}if(ce+=Ue,ve===0&&ce<=N||Re===ve-1&&ce+pe(ve)<=N){ye(ve,null);break}else if(ce+re>N){ye(Re-1,ce-Ue-_+z);break}}m&&pe(0)+_>N&&P(null)}},[N,A,z,M,_,ae,B]);const Ne=ne&&!!ie.length;let Ee={};X!==null&&H&&(Ee={position:"absolute",top:0,insetInlineStart:X});const Ie={prefixCls:U,responsive:H,component:y,invalidate:ee},W=i?(ce,te)=>{const ve=ae(ce,te);return g.createElement(Na.Provider,{key:ve,value:{...Ie,order:te,item:ce,itemKey:ve,registerSize:me,display:te<=T}},i(ce,te))}:(ce,te)=>{const ve=ae(ce,te);return g.createElement(ao,$t({},Ie,{order:te,key:ve,item:ce,renderItem:Se,itemKey:ve,registerSize:me,display:te<=T}))},Q={order:Ne?T:Number.MAX_SAFE_INTEGER,className:`${U}-rest`,registerSize:he,display:Ne},le=f||XT,be=p?g.createElement(Na.Provider,{value:{...Ie,...Q}},p(ie)):g.createElement(ao,$t({},Ie,Q),typeof le=="function"?le(ie):le),$e=g.createElement(w,$t({className:Z(!ee&&n,u),style:c,ref:t},x),h&&g.createElement(ao,$t({},Ie,{responsive:j,responsiveDisabled:!H,order:-1,className:`${U}-prefix`,registerSize:se,display:!0}),h),B.map(W),oe?be:null,m&&g.createElement(ao,$t({},Ie,{responsive:j,responsiveDisabled:!H,order:T,className:`${U}-suffix`,registerSize:ue,display:!0,style:Ee}),m));return j?g.createElement(Io,{onResize:q,disabled:!H},$e):$e}const rr=g.forwardRef(UT);rr.Item=ix;rr.RESPONSIVE=ax;rr.INVALIDATE=sx;process.env.NODE_ENV!=="production"&&(rr.displayName="Overflow");const Ma=(e,t,n)=>Z({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),nd=(e,t)=>t||e,wo=(e,t,n,r)=>{const o=g.useContext(dt),{variant:i,[e]:a}=o,s=g.useContext(_T),l=r?o[r]:void 0,c=(a==null?void 0:a.variant)??(l==null?void 0:l.variant),u=typeof t<"u"||n===!1||typeof s<"u"||typeof c<"u"||typeof i<"u";let d;typeof t<"u"?d=t:n===!1?d="borderless":d=s??c??i??"outlined";const f=x2.includes(d);return[d,f,u]};var GT={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 Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pc.apply(this,arguments)}const KT=(e,t)=>g.createElement(Jt,Pc({},e,{ref:t,icon:GT})),lx=g.forwardRef(KT);process.env.NODE_ENV!=="production"&&(lx.displayName="SearchOutlined");const cx=e=>{const{children:t,prefixCls:n,id:r,classNames:o,styles:i,className:a,style:s}=e;return g.createElement("div",{id:r,className:Z(`${n}-container`,o==null?void 0:o.container,a),style:{...i==null?void 0:i.container,...s},role:"tooltip"},typeof t=="function"?t():t)},Jr={shiftX:64,adjustY:1},eo={adjustX:1,shiftY:!0},$n=[0,0],YT={left:{points:["cr","cl"],overflow:eo,offset:[-4,0],targetOffset:$n},right:{points:["cl","cr"],overflow:eo,offset:[4,0],targetOffset:$n},top:{points:["bc","tc"],overflow:Jr,offset:[0,-4],targetOffset:$n},bottom:{points:["tc","bc"],overflow:Jr,offset:[0,4],targetOffset:$n},topLeft:{points:["bl","tl"],overflow:Jr,offset:[0,-4],targetOffset:$n},leftTop:{points:["tr","tl"],overflow:eo,offset:[-4,0],targetOffset:$n},topRight:{points:["br","tr"],overflow:Jr,offset:[0,-4],targetOffset:$n},rightTop:{points:["tl","tr"],overflow:eo,offset:[4,0],targetOffset:$n},bottomRight:{points:["tr","br"],overflow:Jr,offset:[0,4],targetOffset:$n},rightBottom:{points:["bl","br"],overflow:eo,offset:[4,0],targetOffset:$n},bottomLeft:{points:["tl","bl"],overflow:Jr,offset:[0,4],targetOffset:$n},leftBottom:{points:["br","bl"],overflow:eo,offset:[-4,0],targetOffset:$n}};function Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tc.apply(this,arguments)}const QT=g.forwardRef((e,t)=>{const{trigger:n=["hover","focus"],mouseEnterDelay:r=0,mouseLeaveDelay:o=.1,prefixCls:i="rc-tooltip",children:a,onVisibleChange:s,afterVisibleChange:l,motion:c,placement:u="right",align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:h,arrowContent:m,overlay:w,id:y,showArrow:$=!0,classNames:x,styles:E,...v}=e,C=Ka(y),I=b.useRef(null);b.useImperativeHandle(t,()=>I.current);const N={...v};"visible"in e&&(N.popupVisible=e.visible);const A=g.useMemo(()=>{if(!$)return!1;const R=$===!0?{}:$;return{...R,className:Z(R.className,x==null?void 0:x.arrow),style:{...R.style,...E==null?void 0:E.arrow},content:R.content??m}},[$,x==null?void 0:x.arrow,E==null?void 0:E.arrow,m]),k=({open:R})=>{const O=g.Children.only(a),M={"aria-describedby":[O.props["aria-describedby"],w&&R?C:void 0].filter(Boolean).join(" ")||void 0};return g.cloneElement(O,M)};return g.createElement(Yu,Tc({popupClassName:x==null?void 0:x.root,prefixCls:i,popup:g.createElement(cx,{key:"content",prefixCls:i,id:C,classNames:x,styles:E},w),action:n,builtinPlacements:YT,popupPlacement:u,ref:I,popupAlign:d,getPopupContainer:h,onOpenChange:s,afterOpenChange:l,popupMotion:c,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:o,popupStyle:E==null?void 0:E.root,mouseEnterDelay:r,arrow:A,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:E==null?void 0:E.uniqueContainer},N),k)});function ux(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=0,a=o,s=r*1/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,f=u,p=2*o-s,h=l,m=2*o-i,w=a,y=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),$=r*(Math.sqrt(2)-1),x=`polygon(${$}px 100%, 50% ${$}px, ${2*o-$}px 100%, ${$}px 100%)`,E=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${p} ${h} A ${r} ${r} 0 0 0 ${m} ${w} Z')`;return{arrowShadowWidth:y,arrowPath:E,arrowPolygon:x}}const ZT=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e,c={content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${xe(s)} 0`},transform:"translateY(50%) rotate(-135deg)",zIndex:0,background:"transparent"};return n&&(c.boxShadow=n),{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":c}},dx=8;function rd(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?dx:r}}const fx=(e,t,n)=>{const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a,antCls:s}=e,[l]=ur(s,"tooltip"),{arrowDistance:c=0,arrowShadow:u=!0}=n||{};return{[r]:{[`${r}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...ZT(e,t,u?o:!1),"&:before":{background:t}}],[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:c,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[l("arrow-offset-x")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{[l("arrow-offset-x")]:`calc(100% - ${xe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}},[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:c,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[l("arrow-offset-x")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{[l("arrow-offset-x")]:`calc(100% - ${xe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}},[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:c},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:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i},[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:c},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:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}}};function JT(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=rn(r)?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const a={...i,...o};return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Vp={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"]}},eN={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"]}},tN=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function px(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,l={},c=rd({contentRadius:i,limitVerticalRadius:!0});return Object.keys(Vp).forEach(u=>{const f={...r&&eN[u]||Vp[u],offset:[0,0],dynamicInset:!0};switch(l[u]=f,tN.has(u)&&(f.autoArrow=!1),u){case"top":case"topLeft":case"topRight":f.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+o;break}if(r)switch(u){case"topLeft":case"bottomLeft":f.offset[0]=-c.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=c.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-c.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=c.arrowOffsetHorizontal*2-s;break}f.overflow=JT(u,c,t,n),a&&(f.htmlRegion="visibleFirst")}),l}const nN=b.createContext(!1),rN=(e,t)=>{const n=r=>typeof r=="boolean"?{show:r}:r||{};return b.useMemo(()=>{const r=n(e),o=n(t);return{...o,...r,show:r.show??o.show??!0}},[e,t])},Wp="50%",oN=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,dropShadowPopover:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:h}=e,[m,w]=ur(h,"tooltip"),y=t(a).add(p).add(f).equal(),x={minWidth:t(a).mul(2).add(p).equal(),minHeight:l,padding:`${xe(e.calc(u).div(2).equal())} ${xe(d)}`,color:w("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxSizing:"border-box"},E={[m("valid-offset-x")]:w("arrow-offset-x","var(--arrow-x)"),transformOrigin:[w("valid-offset-x",Wp),`var(--arrow-y, ${Wp})`].join(" ")};return[{[n]:{...Ro(e),position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible",filter:c,...E,"&-hidden":{display:"none"},[m("arrow-background-color")]:i,[`${n}-container`]:[x,HR(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:"none",background:"transparent"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:y},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,dx)}},[`${n}-content`]:{position:"relative"},...lI(e,(v,{darkColor:C})=>({[`&${n}-${v}`]:{[`${n}-container`]:{backgroundColor:C},[`${n}-arrow`]:{[m("arrow-background-color")]:C}}})),"&-rtl":{direction:"rtl"}}},fx(e,w("arrow-background-color"),{arrowShadow:!1}),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...x,...E,position:"absolute",zIndex:t(s).sub(1).equal(),filter:c,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},iN=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...rd({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...ux(yt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),mx=(e,t,n=!0)=>on("Tooltip",o=>{const{borderRadius:i,colorTextLightSolid:a,colorBgSpotlight:s,maxWidth:l}=o,c=yt(o,{tooltipMaxWidth:l,tooltipColor:a,tooltipBorderRadius:i,tooltipBg:s});return[oN(c),Ju(o,"zoom-big-fast")]},iN,{resetStyle:!1,injectStyle:n})(e,t),aN=xr.map(e=>`${e}-inverse`);function sN(e,t=!0){return t?[].concat(jr(aN),jr(xr)).includes(e):xr.includes(e)}const gx=(e,t,n)=>{const r=sN(n),[o]=ur(e,"tooltip"),i=Z({[`${t}-${n}`]:n&&r}),a={},s={},l=RP(n).toRgb(),u=(.299*l.r+.587*l.g+.114*l.b)/255<.5?"#FFF":"#000";return n&&!r&&(a.background=n,a[o("overlay-color")]=u,s[o("arrow-background-color")]=n),{className:i,overlayStyle:a,arrowStyle:s}},lN=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a,classNames:s,styles:l}=e,{getPrefixCls:c}=g.useContext(dt),u=c("tooltip",t),d=c(),f=Po(u),[p,h]=mx(u,f),m=gx(d,u,i),w=m.arrowStyle,y=g.useMemo(()=>({container:{...a,...m.overlayStyle}}),[a,m.overlayStyle]),$={...e,placement:r},[x,E]=Pn([s],[y,l],{props:$}),v=Z(f,p,h,u,`${u}-pure`,`${u}-placement-${r}`,n,m.className);return g.createElement("div",{className:v,style:w},g.createElement("div",{className:`${u}-arrow`}),g.createElement(cx,{...e,className:p,prefixCls:u,classNames:x,styles:E},o))},cN=g.forwardRef((e,t)=>{const{prefixCls:n,openClassName:r,getTooltipContainer:o,color:i,children:a,afterOpenChange:s,arrow:l,destroyTooltipOnHide:c,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:h,autoAdjustOverflow:m=!0,motion:w,getPopupContainer:y,placement:$="top",mouseEnterDelay:x,mouseLeaveDelay:E,rootClassName:v,styles:C,classNames:I,onOpenChange:N,overlayInnerStyle:A,overlayStyle:k,overlayClassName:R,...O}=e,[,z]=Cr(),D=e["data-popover-inject"],{getPopupContainer:M,getPrefixCls:L,direction:_,...V}=Kn("tooltip"),{className:X,style:P,classNames:Y,styles:K,arrow:T,trigger:ne,mouseEnterDelay:F,mouseLeaveDelay:U}=D?{}:V,re=x??F??.1,j=E??U??.1,H=rN(l,T),ee=H.show,oe=p||ne||"hover",B=y||M,ie=u??!!c,ae=g.useContext(nN),Se=At("Tooltip"),ye=g.useRef(null),q=()=>{var _e;(_e=ye.current)==null||_e.forceAlign()};g.useImperativeHandle(t,()=>{var _e,pt;return{forceAlign:q,nativeElement:(_e=ye.current)==null?void 0:_e.nativeElement,popupElement:(pt=ye.current)==null?void 0:pt.popupElement}}),process.env.NODE_ENV!=="production"&&([["overlayStyle","styles.root"],["overlayInnerStyle","styles.container"],["overlayClassName","classNames.root"],["destroyTooltipOnHide","destroyOnHidden"]].forEach(([_e,pt])=>{Se.deprecated(!(_e in e),_e,pt)}),process.env.NODE_ENV!=="production"&&Se(!c||typeof c=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."));const[me,he]=un(e.defaultOpen??!1,e.open),se=!d&&!f&&d!==0,ue=_e=>{he(se?!1:_e),!se&&N&&N(_e)},pe=g.useMemo(()=>h||px({arrowPointAtCenter:(H==null?void 0:H.pointAtCenter)??!1,autoAdjustOverflow:m,arrowWidth:ee?z.sizePopupArrow:0,borderRadius:z.borderRadius,offset:z.marginXXS,visibleFirst:!0}),[H,h,z,ee,m]),Ne=g.useMemo(()=>d===0?d:f||d||"",[f,d]),Ee=g.createElement(Ta,{space:!0,form:!0},Qt(Ne)?Ne():Ne),Ie={...e,trigger:oe,builtinPlacements:pe,getPopupContainer:B,destroyOnHidden:ie,mouseEnterDelay:re,mouseLeaveDelay:j},W=kt(P),Q=kt(k),[le,be]=Pn([Y,I],[K,W,C,Q],{props:Ie}),$e=L("tooltip",n),ce=L();let te=me;(!("open"in e)&&se||ae)&&(te=!1);const ve=g.isValidElement(a)&&!Eb(a)?a:g.createElement("span",null,a),Re=ve.props,Ue=!Re.className||typeof Re.className=="string"?Z(Re.className,r||`${$e}-open`):Re.className,Pe=Po($e),[ze,Me]=mx($e,Pe,!D),it=gx(ce,$e,i),Ye=it.arrowStyle,It=Z(Pe,ze,Me),wt=Z(R,{[`${$e}-rtl`]:_==="rtl"},it.className,v,It,X,le.root),[Ot,gt]=Zu("Tooltip",O.zIndex),_t={...be.container,...A,...it.overlayStyle},jt=g.createElement(QT,{unique:!0,...O,zIndex:Ot,showArrow:ee,placement:$,mouseEnterDelay:re,mouseLeaveDelay:j,prefixCls:$e,classNames:{root:wt,container:le.container,arrow:le.arrow,uniqueContainer:Z(It,le.container)},styles:{root:{...Ye,...be.root},container:_t,uniqueContainer:_t,arrow:be.arrow},ref:ye,overlay:Ee,visible:te,onVisibleChange:ue,afterVisibleChange:s,arrowContent:g.createElement("span",{className:`${$e}-arrow-content`}),motion:{motionName:ER(ce,"zoom-big-fast",typeof(w==null?void 0:w.motionName)=="string"?w==null?void 0:w.motionName:void 0),motionDeadline:1e3},trigger:oe,builtinPlacements:pe,getTooltipContainer:B,destroyOnHidden:ie},te&&!O.disabled?Dn(ve,{className:Ue}):ve);return g.createElement(as.Provider,{value:gt},jt)}),Si=cN;process.env.NODE_ENV!=="production"&&(Si.displayName="Tooltip");Si._InternalPanelDoNotUseOrYouWillBeFired=lN;Si.UniqueProvider=$b;var uN={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 Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nc.apply(this,arguments)}const dN=(e,t)=>g.createElement(Jt,Nc({},e,{ref:t,icon:uN})),Aa=g.forwardRef(dN);process.env.NODE_ENV!=="production"&&(Aa.displayName="LeftOutlined");const{ESC:fN,TAB:pN}=Iu;function mN({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:o}){const i=g.useRef(!1),a=()=>{var c,u;e&&((u=(c=t.current)==null?void 0:c.focus)==null||u.call(c),n==null||n(!1))},s=()=>{var c;return(c=o.current)!=null&&c.focus?(o.current.focus(),i.current=!0,!0):!1},l=c=>{switch(c.keyCode){case fN:a();break;case pN:{let u=!1;i.current||(u=s()),u?c.preventDefault():a();break}}};g.useEffect(()=>e?(window.addEventListener("keydown",l),r&&xt(s,3),()=>{window.removeEventListener("keydown",l),i.current=!1}):()=>{i.current=!1},[e])}const gN=b.forwardRef((e,t)=>{const{overlay:n,arrow:r,prefixCls:o}=e,i=b.useMemo(()=>{let s;return typeof n=="function"?s=n():s=n,s},[n]),a=Gn(t,cr(i));return b.createElement(b.Fragment,null,r&&b.createElement("div",{className:`${o}-arrow`}),b.cloneElement(i,{ref:$o(i)?a:void 0}))}),to={adjustX:1,adjustY:1},no=[0,0],hN={topLeft:{points:["bl","tl"],overflow:to,offset:[0,-4],targetOffset:no},top:{points:["bc","tc"],overflow:to,offset:[0,-4],targetOffset:no},topRight:{points:["br","tr"],overflow:to,offset:[0,-4],targetOffset:no},bottomLeft:{points:["tl","bl"],overflow:to,offset:[0,4],targetOffset:no},bottom:{points:["tc","bc"],overflow:to,offset:[0,4],targetOffset:no},bottomRight:{points:["tr","br"],overflow:to,offset:[0,4],targetOffset:no}};function Mc(){return Mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mc.apply(this,arguments)}const bN=b.forwardRef((e,t)=>{var ne;const{arrow:n=!1,prefixCls:r="rc-dropdown",transitionName:o,animation:i,align:a,placement:s="bottomLeft",placements:l=hN,getPopupContainer:c,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:h,trigger:m=["hover"],autoFocus:w,overlay:y,children:$,onVisibleChange:x,disabled:E,...v}=e,[C,I]=b.useState(),N="visible"in e?h:C,A=i?`${r}-${i}`:o,k=b.useRef(null),R=b.useRef(null),O=b.useRef(null);b.useImperativeHandle(t,()=>k.current);const z=F=>{I(F),x==null||x(F)};mN({visible:N,triggerRef:O,onVisibleChange:z,autoFocus:w,overlayRef:R});const D=F=>{const{onOverlayClick:U}=e;I(!1),U&&U(F)},M=()=>b.createElement(gN,{ref:R,overlay:y,prefixCls:r,arrow:n}),L=()=>typeof y=="function"?M:M(),_=()=>{const{minOverlayWidthMatchTrigger:F,alignPoint:U}=e;return"minOverlayWidthMatchTrigger"in e?F:!U},V=()=>{const{openClassName:F}=e;return F!==void 0?F:`${r}-open`},X=$,P=Z((ne=X.props)==null?void 0:ne.className,N&&V()),Y={className:P,ref:Gn(O,cr(X))},K=$o(X)?b.cloneElement(X,Y):b.createElement("span",{className:P,ref:O},b.cloneElement(X,{className:P}));let T=d;return!T&&m.indexOf("contextMenu")!==-1&&(T=["click"]),b.createElement(Yu,Mc({builtinPlacements:l},v,{prefixCls:r,ref:k,popupClassName:Z(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:m,showAction:u,hideAction:T,popupPlacement:s,popupAlign:a,popupMotion:{motionName:A},popupVisible:N,stretch:_()?"minWidth":"",popup:L(),onOpenChange:z,onPopupClick:D,getPopupContainer:c}),K)}),hx=g.createContext(null);function bx(e,t){return`${e}-${t}`}function xx(e){const t=g.useContext(hx);return bx(t,e)}const Ln=g.createContext(null);function xN(e,t){const n={...e};return Object.keys(t).forEach(r=>{const o=t[r];o!==void 0&&(n[r]=o)}),n}function fi({children:e,locked:t,...n}){const r=g.useContext(Ln),o=Ya(()=>xN(r,n),[r,n],(i,a)=>!t&&(i[0]!==a[0]||!ai(i[1],a[1],!0)));return g.createElement(Ln.Provider,{value:o},e)}const yN=[],yx=g.createContext(null);function cs(){return g.useContext(yx)}const wx=g.createContext(yN);function Mo(e){const t=g.useContext(wx);return g.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const vx=g.createContext(null),od=g.createContext({}),{LEFT:Ac,RIGHT:zc,UP:Oc,DOWN:ua,ENTER:da,ESC:Cx,HOME:Ho,END:Vo}=Iu,qp=[Oc,ua,Ac,zc];function wN(e,t,n,r){var p;const o="prev",i="next",a="children",s="parent";if(e==="inline"&&r===da)return{inlineTrigger:!0};const l={[Oc]:o,[ua]:i},c={[Ac]:n?i:o,[zc]:n?o:i,[ua]:a,[da]:a},u={[Oc]:o,[ua]:i,[da]:a,[Cx]:s,[Ac]:n?a:s,[zc]:n?s:a};switch((p={inline:l,horizontal:c,vertical:u,inlineSub:l,horizontalSub:u,verticalSub:u}[`${e}${t?"":"Sub"}`])==null?void 0:p[r]){case o:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case a:return{offset:1,sibling:!1};default:return null}}function vN(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function CN(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function id(e,t){return E$(e,!0).filter(r=>t.has(r))}function Xp(e,t,n,r=1){if(!e)return null;const o=id(e,t),i=o.length;let a=o.findIndex(s=>n===s);return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}const za=(e,t)=>{const n=new Set,r=new Map,o=new Map;return e.forEach(i=>{const a=document.querySelector(`[data-menu-id='${bx(t,i)}']`);a&&(n.add(a),o.set(a,i),r.set(i,a))}),{elements:n,key2element:r,element2key:o}};function SN(e,t,n,r,o,i,a,s,l,c){const u=g.useRef(void 0),d=g.useRef(void 0);d.current=t;const f=()=>{xt.cancel(u.current)};return g.useEffect(()=>()=>{f()},[]),p=>{const{which:h}=p;if([...qp,da,Cx,Ho,Vo].includes(h)){const m=i();let w=za(m,r);const{elements:y,key2element:$,element2key:x}=w,E=$.get(t),v=CN(E,y),C=x.get(v),I=wN(e,a(C,!0).length===1,n,h);if(!I&&h!==Ho&&h!==Vo)return;(qp.includes(h)||[Ho,Vo].includes(h))&&p.preventDefault();const N=A=>{if(A){let k=A;const R=A.querySelector("a");R!=null&&R.getAttribute("href")&&(k=R);const O=x.get(A);s(O),f(),u.current=xt(()=>{d.current===O&&k.focus()})}};if([Ho,Vo].includes(h)||I.sibling||!v){let A;!v||e==="inline"?A=o.current:A=vN(v);let k;const R=id(A,y);h===Ho?k=R[0]:h===Vo?k=R[R.length-1]:k=Xp(A,y,v,I.offset),N(k)}else if(I.inlineTrigger)l(C);else if(I.offset>0)l(C,!0),f(),u.current=xt(()=>{w=za(m,r);const A=v.getAttribute("aria-controls"),k=document.getElementById(A),R=Xp(k,w.elements);N(R)},5);else if(I.offset<0){const A=a(C,!0),k=A[A.length-2],R=$.get(k);l(k,!1),N(R)}}c==null||c(p)}}function EN(e){Promise.resolve().then(e)}const ad="__RC_UTIL_PATH_SPLIT__",Up=e=>e.join(ad),$N=e=>e.split(ad),Dc="rc-menu-more";function kN(){const[,e]=g.useState({}),t=b.useRef(new Map),n=b.useRef(new Map),[r,o]=g.useState([]),i=b.useRef(0),a=b.useRef(!1),s=()=>{a.current||e({})},l=b.useCallback((m,w)=>{process.env.NODE_ENV!=="production"&&tt(!t.current.has(m),`Duplicated key '${m}' used in Menu by path [${w.join(" > ")}]`);const y=Up(w);n.current.set(y,m),t.current.set(m,y),i.current+=1;const $=i.current;EN(()=>{$===i.current&&s()})},[]),c=b.useCallback((m,w)=>{const y=Up(w);n.current.delete(y),t.current.delete(m)},[]),u=b.useCallback(m=>{o(m)},[]),d=b.useCallback((m,w)=>{const y=t.current.get(m)||"",$=$N(y);return w&&r.includes($[0])&&$.unshift(Dc),$},[r]),f=b.useCallback((m,w)=>m.filter(y=>y!==void 0).some(y=>d(y,!0).includes(w)),[d]),p=()=>{const m=[...t.current.keys()];return r.length&&m.push(Dc),m},h=b.useCallback(m=>{const w=`${t.current.get(m)}${ad}`,y=new Set;return[...n.current.keys()].forEach($=>{$.startsWith(w)&&y.add(n.current.get($))}),y},[]);return g.useEffect(()=>()=>{a.current=!0},[]),{registerPath:l,unregisterPath:c,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:h}}function Ko(e){const t=g.useRef(e);t.current=e;const n=g.useCallback((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[]);return e?n:void 0}function Sx(e,t,n,r){const{activeKey:o,onActive:i,onInactive:a}=g.useContext(Ln),s={active:o===e};return t||(s.onMouseEnter=l=>{n==null||n({key:e,domEvent:l}),i(e)},s.onMouseLeave=l=>{r==null||r({key:e,domEvent:l}),a(e)}),s}function Ex(e){const{mode:t,rtl:n,inlineIndent:r}=g.useContext(Ln);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function $x({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e=="function"?r=g.createElement(e,{...t}):typeof e!="boolean"&&(r=e),r||n||null)}function Oa({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(tt(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pi.apply(this,arguments)}class IN extends g.Component{render(){const{title:t,attribute:n,elementRef:r,...o}=this.props,i=Yt(o,["eventKey","popupClassName","popupOffset","onTitleClick"]);return tt(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),g.createElement(rr.Item,pi({},n,{title:typeof t=="string"?t:void 0},i,{ref:r}))}}const RN=g.forwardRef((e,t)=>{const{style:n,className:r,eventKey:o,warnKey:i,disabled:a,itemIcon:s,children:l,itemData:c,role:u,onMouseEnter:d,onMouseLeave:f,onClick:p,onKeyDown:h,onFocus:m,...w}=e,y=xx(o),{prefixCls:$,onItemClick:x,disabled:E,overflowDisabled:v,itemIcon:C,selectedKeys:I,onActive:N}=g.useContext(Ln),{_internalRenderMenuItem:A}=g.useContext(od),k=`${$}-item`,R=g.useRef(null),O=g.useRef(null),z=E||a,D=Hr(t,O),M=Mo(o);process.env.NODE_ENV!=="production"&&i&&tt(!1,"MenuItem should not leave undefined `key`.");const L=re=>{const j=c||{key:o||"",label:l,itemIcon:s,extra:e.extra,title:e.title};return{key:o,keyPath:[...M].reverse(),item:R.current,domEvent:re,itemData:c||j}},_=s||C,{active:V,...X}=Sx(o,z,d,f),P=I.includes(o),Y=Ex(M.length),K=re=>{if(z)return;const j=L(re);p==null||p(Oa(j)),x(j)},T=re=>{if(h==null||h(re),re.which===Iu.ENTER){const j=L(re);p==null||p(Oa(j)),x(j)}},ne=re=>{N(o),m==null||m(re)},F={};e.role==="option"&&(F["aria-selected"]=P);let U=g.createElement(IN,pi({ref:R,elementRef:D,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":v&&y?null:y},Yt(w,["extra"]),X,F,{component:"li","aria-disabled":a,style:{...Y,...n},className:Z(k,{[`${k}-active`]:V,[`${k}-selected`]:P,[`${k}-disabled`]:z},r),onClick:K,onKeyDown:T,onFocus:ne}),l,g.createElement($x,{props:{...e,isSelected:P},icon:_}));return A&&(U=A(U,e,{selected:P})),U});function PN(e,t){const{eventKey:n}=e,r=cs(),o=Mo(n);return g.useEffect(()=>{if(r)return r.registerPath(n,o),()=>{r.unregisterPath(n,o)}},[o]),r?null:g.createElement(RN,pi({},e,{ref:t}))}const us=g.forwardRef(PN);function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lc.apply(this,arguments)}const TN=({className:e,children:t,...n},r)=>{const{prefixCls:o,mode:i,rtl:a}=g.useContext(Ln);return g.createElement("ul",Lc({className:Z(o,a&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":!0,ref:r}),t)},sd=g.forwardRef(TN);process.env.NODE_ENV!=="production"&&(sd.displayName="SubMenuList");function ld(e,t){return or(e).map((n,r)=>{var o;if(g.isValidElement(n)){const{key:i}=n;let a=((o=n.props)==null?void 0:o.eventKey)??i;const s=a==null;s&&(a=`tmp_key-${[...t,r].join("-")}`);const l={key:a,eventKey:a};return process.env.NODE_ENV!=="production"&&s&&(l.warnKey=!0),g.cloneElement(n,l)}return n})}const Xt={adjustX:1,adjustY:1},NN={topLeft:{points:["bl","tl"],overflow:Xt},topRight:{points:["br","tr"],overflow:Xt},bottomLeft:{points:["tl","bl"],overflow:Xt},bottomRight:{points:["tr","br"],overflow:Xt},leftTop:{points:["tr","tl"],overflow:Xt},leftBottom:{points:["br","bl"],overflow:Xt},rightTop:{points:["tl","tr"],overflow:Xt},rightBottom:{points:["bl","br"],overflow:Xt}},MN={topLeft:{points:["bl","tl"],overflow:Xt},topRight:{points:["br","tr"],overflow:Xt},bottomLeft:{points:["tl","bl"],overflow:Xt},bottomRight:{points:["tr","br"],overflow:Xt},rightTop:{points:["tr","tl"],overflow:Xt},rightBottom:{points:["br","bl"],overflow:Xt},leftTop:{points:["tl","tr"],overflow:Xt},leftBottom:{points:["bl","br"],overflow:Xt}};function kx(e,t,n){if(t)return t;if(n)return n[e]||n.other}const AN={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function zN({prefixCls:e,visible:t,children:n,popup:r,popupStyle:o,popupClassName:i,popupOffset:a,disabled:s,mode:l,onVisibleChange:c}){const{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:h,triggerSubMenuAction:m,forceSubMenuRender:w,rootClassName:y,motion:$,defaultMotions:x}=g.useContext(Ln),[E,v]=g.useState(!1),C=d?{...MN,...h}:{...NN,...h},I=AN[l],N=kx(l,$,x),A=g.useRef(N);l!=="inline"&&(A.current=N);const k={...A.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},R=g.useRef(void 0);return g.useEffect(()=>(R.current=xt(()=>{v(t)}),()=>{xt.cancel(R.current)}),[t]),g.createElement(Yu,{prefixCls:e,popupClassName:Z(`${e}-popup`,{[`${e}-rtl`]:d},i,y),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:u,builtinPlacements:C,popupPlacement:I,popupVisible:E,popup:r,popupStyle:o,popupAlign:a&&{offset:a},action:s?[]:[m],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:c,forceRender:w,popupMotion:k,fresh:!0},n)}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fc.apply(this,arguments)}function ON({id:e,open:t,keyPath:n,children:r}){const o="inline",{prefixCls:i,forceSubMenuRender:a,motion:s,defaultMotions:l,mode:c}=g.useContext(Ln),u=g.useRef(!1);u.current=c===o;const[d,f]=g.useState(!u.current),p=u.current?t:!1;g.useEffect(()=>{u.current&&f(!1)},[c]);const h={...kx(o,s,l)};n.length>1&&(h.motionAppear=!1);const m=h.onVisibleChanged;return h.onVisibleChanged=w=>(!u.current&&!w&&f(!0),m==null?void 0:m(w)),d?null:g.createElement(fi,{mode:o,locked:!u.current},g.createElement(vr,Fc({visible:p},h,{forceRender:a,removeOnLeave:!1,leavedClassName:`${i}-hidden`}),({className:w,style:y})=>g.createElement(sd,{id:e,className:w,style:y},r)))}function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mi.apply(this,arguments)}const DN=g.forwardRef((e,t)=>{const{style:n,className:r,styles:o,classNames:i,title:a,itemTitle:s,eventKey:l,warnKey:c,disabled:u,internalPopupClose:d,children:f,itemIcon:p,expandIcon:h,popupClassName:m,popupOffset:w,popupStyle:y,onClick:$,onMouseEnter:x,onMouseLeave:E,onTitleClick:v,onTitleMouseEnter:C,onTitleMouseLeave:I,popupRender:N,...A}=e,k=xx(l),{prefixCls:R,mode:O,openKeys:z,disabled:D,overflowDisabled:M,activeKey:L,selectedKeys:_,itemIcon:V,expandIcon:X,onItemClick:P,onOpenChange:Y,onActive:K,popupRender:T}=g.useContext(Ln),{_internalRenderSubMenuItem:ne}=g.useContext(od),{isSubPathKey:F}=g.useContext(vx),U=Mo(),re=`${R}-submenu`,j=D||u,H=g.useRef(null),ee=g.useRef(null);process.env.NODE_ENV!=="production"&&c&&tt(!1,"SubMenu should not leave undefined `key`.");const oe=p??V,B=h??X,ie=z.includes(l),ae=!M&&ie,Se=F(_,l),{active:ye,...q}=Sx(l,j,C,I),[me,he]=g.useState(!1),se=Pe=>{j||he(Pe)},ue=Pe=>{se(!0),x==null||x({key:l,domEvent:Pe})},pe=Pe=>{se(!1),E==null||E({key:l,domEvent:Pe})},Ne=g.useMemo(()=>ye||(O!=="inline"?me||F([L],l):!1),[O,ye,L,me,l,F]),Ee=Ex(U.length),Ie=Pe=>{j||(v==null||v({key:l,domEvent:Pe}),O==="inline"&&Y(l,!ie))},W=Ko(Pe=>{$==null||$(Oa(Pe)),P(Pe)}),Q=Pe=>{O!=="inline"&&Y(l,Pe)},le=()=>{K(l)},be=k&&`${k}-popup`,$e=g.useMemo(()=>g.createElement($x,{icon:O!=="horizontal"?B:void 0,props:{...e,isOpen:ae,isSubMenu:!0}},g.createElement("i",{className:`${re}-arrow`})),[O,B,e,ae,re]);let ce=g.createElement("div",mi({role:"menuitem",style:Ee,className:`${re}-title`,tabIndex:j?null:-1,ref:H,title:s??(typeof a=="string"?a:null),"data-menu-id":M&&k?null:k,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":be,"aria-disabled":j,onClick:Ie,onFocus:le},q),a,$e);const te=g.useRef(O);O!=="inline"&&U.length>1?te.current="vertical":te.current=O;const ve=te.current,Re=g.useMemo(()=>{const Pe=g.createElement(fi,{classNames:i,styles:o,mode:ve==="horizontal"?"vertical":ve},g.createElement(sd,{id:be,ref:ee},f)),ze=N||T;return ze?ze(Pe,{item:e,keys:U}):Pe},[N,T,U,be,f,e,ve]);if(!M){const Pe=te.current;ce=g.createElement(zN,{mode:Pe,prefixCls:re,visible:!d&&ae&&O!=="inline",popupClassName:m,popupOffset:w,popupStyle:y,popup:Re,disabled:j,onVisibleChange:Q},ce)}let Ue=g.createElement(rr.Item,mi({ref:t,role:"none"},A,{component:"li",style:n,className:Z(re,`${re}-${O}`,r,{[`${re}-open`]:ae,[`${re}-active`]:Ne,[`${re}-selected`]:Se,[`${re}-disabled`]:j}),onMouseEnter:ue,onMouseLeave:pe}),ce,!M&&g.createElement(ON,{id:be,open:ae,keyPath:U},f));return ne&&(Ue=ne(Ue,e,{selected:Se,active:Ne,open:ae,disabled:j})),g.createElement(fi,{classNames:i,styles:o,onItemClick:W,mode:O==="horizontal"?"vertical":O,itemIcon:oe,expandIcon:B},Ue)}),Ei=g.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=Mo(n),i=ld(r,o),a=cs();g.useEffect(()=>{if(a)return a.registerPath(n,o),()=>{a.unregisterPath(n,o)}},[o]);let s;return a?s=i:s=g.createElement(DN,mi({ref:t},e),i),g.createElement(wx.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Ei.displayName="SubMenu");function cd({className:e,style:t}){const{prefixCls:n}=g.useContext(Ln);return cs()?null:g.createElement("li",{role:"separator",className:Z(`${n}-item-divider`,e),style:t})}function Da(){return Da=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Da.apply(this,arguments)}const LN=g.forwardRef((e,t)=>{const{className:n,title:r,eventKey:o,children:i,...a}=e,{prefixCls:s,classNames:l,styles:c}=g.useContext(Ln),u=`${s}-item-group`;return g.createElement("li",Da({ref:t,role:"presentation"},a,{onClick:d=>d.stopPropagation(),className:Z(u,n)}),g.createElement("div",{role:"presentation",className:Z(`${u}-title`,l==null?void 0:l.listTitle),style:c==null?void 0:c.listTitle,title:typeof r=="string"?r:void 0},r),g.createElement("ul",{role:"group",className:Z(`${u}-list`,l==null?void 0:l.list),style:c==null?void 0:c.list},i))}),ds=g.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=Mo(n),i=ld(r,o);return cs()?i:g.createElement(LN,Da({ref:t},Yt(e,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(ds.displayName="MenuItemGroup");function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(this,arguments)}function _c(e,t,n){const{item:r,group:o,submenu:i,divider:a}=t;return(e||[]).map((s,l)=>{if(s&&typeof s=="object"){const{label:c,children:u,key:d,type:f,extra:p,...h}=s,m=d??`tmp-${l}`;if(u||f==="group"){if(f==="group")return g.createElement(o,so({key:m},h,{title:c}),_c(u,t,n));const{title:y,...$}=h;return g.createElement(i,so({key:m},$,{title:c,itemTitle:typeof y=="string"?y:void 0}),_c(u,t,n))}if(f==="divider")return g.createElement(a,so({key:m},h));const w=!!p||p===0;return g.createElement(r,so({key:m},h,{extra:p,itemData:{...s,key:m}}),w?g.createElement(g.Fragment,null,g.createElement("span",{className:`${n}-item-label`},c),g.createElement("span",{className:`${n}-item-extra`},p)):c)}return null}).filter(s=>s)}function Gp(e,t,n,r,o){let i=e;const a={divider:cd,item:us,group:ds,submenu:Ei,...r};return t&&(i=_c(t,a,o)),ld(i,n)}function jc(){return jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jc.apply(this,arguments)}const Rr=[],FN=g.forwardRef((e,t)=>{var vt;const{prefixCls:n="rc-menu",rootClassName:r,style:o,className:i,styles:a,classNames:s,tabIndex:l=0,items:c,children:u,direction:d,id:f,mode:p="vertical",inlineCollapsed:h,disabled:m,disabledOverflow:w,subMenuOpenDelay:y=.1,subMenuCloseDelay:$=.1,forceSubMenuRender:x,defaultOpenKeys:E,openKeys:v,activeKey:C,defaultActiveFirst:I,selectable:N=!0,multiple:A=!1,defaultSelectedKeys:k,selectedKeys:R,onSelect:O,onDeselect:z,inlineIndent:D=24,motion:M,defaultMotions:L,triggerSubMenuAction:_="hover",builtinPlacements:V,itemIcon:X,expandIcon:P,overflowedIndicator:Y="...",overflowedIndicatorPopupClassName:K,getPopupContainer:T,onClick:ne,onOpenChange:F,onKeyDown:U,openAnimation:re,openTransitionName:j,_internalRenderMenuItem:H,_internalRenderSubMenuItem:ee,_internalComponents:oe,popupRender:B,...ie}=e,[ae,Se]=g.useMemo(()=>[Gp(u,c,Rr,oe,n),Gp(u,c,Rr,{},n)],[u,c,oe]),[ye,q]=g.useState(!1),me=g.useRef(null),he=Ka(),se=f??`rc-menu-uuid-${he}`,ue=d==="rtl";process.env.NODE_ENV!=="production"&&tt(!re&&!j,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");const[pe,Ne]=un(E,v),Ee=pe||Rr,Ie=(Oe,Qe=!1)=>{function st(){Ne(Oe),F==null||F(Oe)}Qe?po.flushSync(st):st()},[W,Q]=g.useState(Ee),le=g.useRef(!1),[be,$e]=g.useMemo(()=>(p==="inline"||p==="vertical")&&h?["vertical",h]:[p,!1],[p,h]),ce=be==="inline",[te,ve]=g.useState(be),[Re,Ue]=g.useState($e);g.useEffect(()=>{ve(be),Ue($e),le.current&&(ce?Ne(W):Ie(Rr))},[be,$e]);const[Pe,ze]=g.useState(0),Me=Pe>=ae.length-1||te!=="horizontal"||w;g.useEffect(()=>{ce&&Q(Ee)},[Ee]),g.useEffect(()=>(le.current=!0,()=>{le.current=!1}),[]);const{registerPath:it,unregisterPath:Ye,refreshOverflowKeys:It,isSubPathKey:wt,getKeyPath:Ot,getKeys:gt,getSubPathKeys:_t}=kN(),jt=g.useMemo(()=>({registerPath:it,unregisterPath:Ye}),[it,Ye]),_e=g.useMemo(()=>({isSubPathKey:wt}),[wt]);g.useEffect(()=>{It(Me?Rr:ae.slice(Pe+1).map(Oe=>Oe.key))},[Pe,Me]);const[pt,Cn]=un(C||I&&((vt=ae[0])==null?void 0:vt.key),C),jn=Ko(Oe=>{Cn(Oe)}),Bn=Ko(()=>{Cn(void 0)});b.useImperativeHandle(t,()=>({list:me.current,focus:Oe=>{var Te,ke;const Qe=gt(),{elements:st,key2element:Be,element2key:G}=za(Qe,se),ge=id(me.current,st);let de;pt&&Qe.includes(pt)?de=pt:de=ge[0]?G.get(ge[0]):(Te=ae.find(Fe=>!Fe.props.disabled))==null?void 0:Te.key;const we=Be.get(de);de&&we&&((ke=we==null?void 0:we.focus)==null||ke.call(we,Oe))},findItem:({key:Oe})=>{const Qe=gt(),{key2element:st}=za(Qe,se);return st.get(Oe)||null}}));const[Rt,Sn]=un(k||[],R),Ht=g.useMemo(()=>Array.isArray(Rt)?Rt:Rt==null?Rr:[Rt],[Rt]),an=Oe=>{if(N){const{key:Qe}=Oe,st=Ht.includes(Qe);let Be;A?st?Be=Ht.filter(ge=>ge!==Qe):Be=[...Ht,Qe]:Be=[Qe],Sn(Be);const G={...Oe,selectedKeys:Be};st?z==null||z(G):O==null||O(G)}!A&&Ee.length&&te!=="inline"&&Ie(Rr)},Hn=Ko(Oe=>{ne==null||ne(Oa(Oe)),an(Oe)}),fn=Ko((Oe,Qe)=>{let st=Ee.filter(Be=>Be!==Oe);if(Qe)st.push(Oe);else if(te!=="inline"){const Be=_t(Oe);st=st.filter(G=>!Be.has(G))}ai(Ee,st,!0)||Ie(st,!0)}),en=SN(te,pt,ue,se,me,gt,Ot,Cn,(Oe,Qe)=>{const st=Qe??!Ee.includes(Oe);fn(Oe,st)},U);g.useEffect(()=>{q(!0)},[]);const Dt=g.useMemo(()=>({_internalRenderMenuItem:H,_internalRenderSubMenuItem:ee}),[H,ee]),at=te!=="horizontal"||w?ae:ae.map((Oe,Qe)=>g.createElement(fi,{key:Oe.key,overflowDisabled:Qe>Pe,classNames:s,styles:a},Oe)),Vt=g.createElement(rr,jc({id:f,ref:me,prefixCls:`${n}-overflow`,component:"ul",itemComponent:us,className:Z(n,`${n}-root`,`${n}-${te}`,i,{[`${n}-inline-collapsed`]:Re,[`${n}-rtl`]:ue},r),dir:d,style:o,role:"menu",tabIndex:l,data:at,renderRawItem:Oe=>Oe,renderRawRest:Oe=>{const Qe=Oe.length,st=Qe?ae.slice(-Qe):null;return g.createElement(Ei,{eventKey:Dc,title:Y,disabled:Me,internalPopupClose:Qe===0,popupClassName:K},st)},maxCount:te!=="horizontal"||w?rr.INVALIDATE:rr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:Oe=>{ze(Oe)},onKeyDown:en},ie));return g.createElement(od.Provider,{value:Dt},g.createElement(hx.Provider,{value:se},g.createElement(fi,{prefixCls:n,rootClassName:r,classNames:s,styles:a,mode:te,openKeys:Ee,rtl:ue,disabled:m,motion:ye?M:null,defaultMotions:ye?L:null,activeKey:pt,onActive:jn,onInactive:Bn,selectedKeys:Ht,inlineIndent:D,subMenuOpenDelay:y,subMenuCloseDelay:$,forceSubMenuRender:x,builtinPlacements:V,triggerSubMenuAction:_,getPopupContainer:T,itemIcon:X,expandIcon:P,onItemClick:Hn,onOpenChange:fn,popupRender:B},g.createElement(vx.Provider,{value:_e},Vt),g.createElement("div",{style:{display:"none"},"aria-hidden":!0},g.createElement(yx.Provider,{value:jt},Se)))))}),$i=FN;$i.Item=us;$i.SubMenu=Ei;$i.ItemGroup=ds;$i.Divider=cd;var _N={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 Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bc.apply(this,arguments)}const jN=(e,t)=>g.createElement(Jt,Bc({},e,{ref:t,icon:_N})),Ix=g.forwardRef(jN);process.env.NODE_ENV!=="production"&&(Ix.displayName="BarsOutlined");const BN=g.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),HN=e=>{const{antCls:t,componentCls:n,colorText:r,footerBg:o,headerHeight:i,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,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:i,padding:a,color:s,lineHeight:xe(i),background:d,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:o},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},Rx=e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=e,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:o,footerPadding:`${i}px ${c}px`,footerBg:t,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},Px=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];on("Layout",HN,Rx,{deprecatedTokens:Px});const VN=e=>{const{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:o,antCls:i,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:h,lightTriggerBg:m,bodyBg:w}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${i}-menu${i}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:xe(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:c,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 ${xe(f)} ${xe(f)} 0`,cursor:"pointer",transition:`background-color ${o} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${o}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${xe(f)} 0 0 ${xe(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:h,background:m},[`${t}-zero-width-trigger`]:{color:h,background:m,border:`${xe(e.lineWidth)} ${e.lineType} ${w}`,borderInlineStart:0}}}}},WN=on(["Layout","Sider"],VN,Rx,{deprecatedTokens:Px}),Kp={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1839.98px"},qN=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),ud=g.createContext({}),XN=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),UN=g.forwardRef((e,t)=>{const{prefixCls:n,className:r,trigger:o,children:i,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:h,onCollapse:m,onBreakpoint:w,classNames:y,styles:$,...x}=e,{siderHook:E}=b.useContext(BN),[v,C]=un(a,e.collapsed),[I,N]=b.useState(!1),A=(B,ie)=>{C(B),m==null||m(B,ie)},k={...e,collapsed:v,defaultCollapsed:a,theme:s,style:l,collapsible:c,reverseArrow:u,width:d,collapsedWidth:f,zeroWidthTriggerStyle:p,breakpoint:h,onCollapse:m,onBreakpoint:w},[R,O]=Pn([y],[$],{props:k}),{getPrefixCls:z,direction:D}=b.useContext(dt),M=z("layout-sider",n),[L,_]=WN(M),V=b.useRef(null);V.current=B=>{N(B.matches),w==null||w(B.matches),v!==B.matches&&A(B.matches,"responsive")},b.useEffect(()=>{function B(ae){var Se;return(Se=V.current)==null?void 0:Se.call(V,ae)}let ie;return typeof(window==null?void 0:window.matchMedia)<"u"&&h&&h in Kp&&(ie=window.matchMedia(`screen and (max-width: ${Kp[h]})`),Qt(ie==null?void 0:ie.addEventListener)&&ie.addEventListener("change",B),B(ie)),()=>{Qt(ie==null?void 0:ie.removeEventListener)&&ie.removeEventListener("change",B)}},[h]),b.useEffect(()=>{const B=XN("ant-sider-");return E.addSider(B),()=>E.removeSider(B)},[]);const X=()=>{A(!v,"clickTrigger")},P=Yt(x,["collapsed"]),Y=v?f:d,K=qN(Y)?`${Y}px`:String(Y),T=Number.parseFloat(String(f||0))===0?g.createElement("span",{onClick:X,className:Z(`${M}-zero-width-trigger`,`${M}-zero-width-trigger-${u?"right":"left"}`),style:p},o||g.createElement(Ix,null)):null,ne=D==="rtl"==!u,re={expanded:ne?g.createElement(Ia,null):g.createElement(Aa,null),collapsed:ne?g.createElement(Aa,null):g.createElement(Ia,null)}[v?"collapsed":"expanded"],j=o!==null?T||g.createElement("div",{className:`${M}-trigger`,onClick:X,style:{width:K}},o||re):null,H={...l,flex:`0 0 ${K}`,maxWidth:K,minWidth:K,width:K},ee=Z(M,`${M}-${s}`,{[`${M}-collapsed`]:!!v,[`${M}-has-trigger`]:c&&o!==null&&!T,[`${M}-below`]:!!I,[`${M}-zero-width`]:Number.parseFloat(K)===0},r,R.root,L,_),oe=g.useMemo(()=>({siderCollapsed:v}),[v]);return g.createElement(ud.Provider,{value:oe},g.createElement("aside",{className:ee,...P,style:{...O.root,...H},ref:t},g.createElement("div",{className:Z(`${M}-children`,R.body),style:O.body},i),c||I&&T?j:null))});process.env.NODE_ENV!=="production"&&(UN.displayName="Sider");var GN={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 Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hc.apply(this,arguments)}const KN=(e,t)=>g.createElement(Jt,Hc({},e,{ref:t,icon:GN})),dd=g.forwardRef(KN);process.env.NODE_ENV!=="production"&&(dd.displayName="EllipsisOutlined");const La=b.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),Tx=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=g.useContext(dt),a=i("menu",t),s=Z({[`${a}-item-divider-dashed`]:!!r},n);return g.createElement(cd,{className:s,...o})},Nx=e=>{var k,R;const{className:t,children:n,icon:r,title:o,danger:i,extra:a}=e,{prefixCls:s,firstLevel:l,direction:c,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:h}=g.useContext(La),{siderCollapsed:m}=g.useContext(ud),w=!!(m||f),[y,$]=g.useState(!1);g.useEffect(()=>{$(!1)},[w]);const x=O=>{var M,L;const z=n==null?void 0:n[0],D=g.createElement("span",{className:Z(`${s}-title-content`,l?h==null?void 0:h.itemContent:(M=h==null?void 0:h.subMenu)==null?void 0:M.itemContent,{[`${s}-title-content-with-extra`]:!!a||a===0}),style:l?p==null?void 0:p.itemContent:(L=p==null?void 0:p.subMenu)==null?void 0:L.itemContent},n);return(!r||g.isValidElement(n)&&n.type==="span")&&n&&O&&l&&typeof z=="string"?g.createElement("div",{className:`${s}-inline-collapsed-noicon`},z.charAt(0)):D};let E=o;typeof o>"u"?E=l?n:"":o===!1&&(E="");const v=d===!1?void 0:d,C=v&&v.title!==void 0?v.title:E,I={...v??null,title:C};w?(I.open=(v==null?void 0:v.open)??y,I.onOpenChange=O=>{var z;$(O),(z=v==null?void 0:v.onOpenChange)==null||z.call(v,O)}):(I.title=null,I.open=!1);const N=or(n).length;let A=g.createElement(us,{...Yt(e,["title","icon","danger"]),className:Z(l?h==null?void 0:h.item:(k=h==null?void 0:h.subMenu)==null?void 0:k.item,{[`${s}-item-danger`]:i,[`${s}-item-only-child`]:(r?N+1:N)===1},t),style:{...l?p==null?void 0:p.item:(R=p==null?void 0:p.subMenu)==null?void 0:R.item,...e.style},title:typeof o=="string"?o:void 0,itemData:(e==null?void 0:e.itemData)??{...e,key:e.eventKey}},Dn(r,O=>{var z,D;return{className:Z(`${s}-item-icon`,l?h==null?void 0:h.itemIcon:(z=h==null?void 0:h.subMenu)==null?void 0:z.itemIcon,O.className),style:{...l?p==null?void 0:p.itemIcon:(D=p==null?void 0:p.subMenu)==null?void 0:D.itemIcon,...O.style}}}),x(f));if(!u&&d!==!1){const O=v&&v.placement?v.placement:c==="rtl"?"left":"right",z=`${s}-inline-collapsed-tooltip`,D=L=>({...L,root:Z(z,L==null?void 0:L.root)}),M=Qt(v==null?void 0:v.classNames)?L=>{const _=v.classNames(L);return D(_)}:D(v==null?void 0:v.classNames);A=g.createElement(Si,{...I,placement:O,classNames:M},A)}return A},Fa=g.createContext(null),YN=g.forwardRef((e,t)=>{const{children:n,...r}=e,o=g.useContext(Fa),i=g.useMemo(()=>({...o,...r}),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=Kg(n),s=Hr(t,a?cr(n):null);return g.createElement(Fa.Provider,{value:i},g.createElement(Ta,{space:!0},a?g.cloneElement(n,{ref:s}):n))}),QN=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${xe(i)} ${a} ${o}`,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,
210
+ `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},zp=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),fT=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=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}},zp(`${t}-primary`,o),zp(`${t}-danger`,i)]}},el=e=>Math.round(Number(e||0)),pT=e=>{if(e instanceof Ve)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){const{b:t,...n}=e;return{...n,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};class ir extends Ve{constructor(t){super(pT(t))}toHsbString(){const t=this.toHsb(),n=el(t.s*100),r=el(t.b*100),o=el(t.h),i=t.a,a=`hsb(${o}, ${n}%, ${r}%)`,s=`hsba(${o}, ${n}%, ${r}%, ${i.toFixed(i===0?0:2)})`;return i===1?a:s}toHsb(){const{v:t,...n}=this.toHsv();return{...n,b:t,a:this.a}}}const mT="rc-color-picker",uo=e=>e instanceof ir?e:new ir(e),hT=uo("#1677ff"),Wb=e=>{const{offset:t,targetRef:n,containerRef:r,color:o,type:i}=e,{width:a,height:s}=r.current.getBoundingClientRect(),{width:l,height:c}=n.current.getBoundingClientRect(),u=l/2,d=c/2,f=(t.x+u)/a,p=1-(t.y+d)/s,g=o.toHsb(),m=f,w=(t.x+u)/a*360;if(i)switch(i){case"hue":return uo({...g,h:w<=0?0:w});case"alpha":return uo({...g,a:m<=0?0:m})}return uo({h:g.h,s:f<=0?0:f,b:p>=1?1:p,a:g.a})},qb=(e,t)=>{const n=e.toHsb();switch(t){case"hue":return{x:n.h/360*100,y:50};case"alpha":return{x:e.a*100,y:50};default:return{x:n.s*100,y:(1-n.b)*100}}},gT=({color:e,prefixCls:t,className:n,style:r,innerClassName:o,innerStyle:i,onClick:a})=>{const s=`${t}-color-block`;return b.createElement("div",{className:J(s,n),style:r,onClick:a},b.createElement("div",{className:J(`${s}-inner`,o),style:{background:e,...i}}))};function bT(e){const t="touches"in e?e.touches[0]:e,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:t.pageX-n,pageY:t.pageY-r}}function Xb(e){const{targetRef:t,containerRef:n,direction:r,onDragChange:o,onDragChangeComplete:i,calculate:a,color:s,disabledDrag:l}=e,[c,u]=b.useState({x:0,y:0}),d=b.useRef(null),f=b.useRef(null);b.useEffect(()=>{u(a())},[s]),b.useEffect(()=>()=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",f.current),d.current=null,f.current=null},[]);const p=y=>{const{pageX:$,pageY:x}=bT(y),{x:E,y:C,width:v,height:T}=n.current.getBoundingClientRect(),{width:R,height:A}=t.current.getBoundingClientRect(),k=R/2,N=A/2,z=Math.max(0,Math.min($-E,v))-k,L=Math.max(0,Math.min(x-C,T))-N,D={x:z,y:r==="x"?c.y:L};if(R===0&&A===0||R!==A)return!1;o==null||o(D)},g=y=>{y.preventDefault(),p(y)},m=y=>{y.preventDefault(),document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",f.current),d.current=null,f.current=null,i==null||i()};return[c,y=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),!l&&(p(y),document.addEventListener("mousemove",g),document.addEventListener("mouseup",m),document.addEventListener("touchmove",g),document.addEventListener("touchend",m),d.current=g,f.current=m)}]}const Ub=({size:e="default",color:t,prefixCls:n})=>b.createElement("div",{className:J(`${n}-handler`,{[`${n}-handler-sm`]:e==="small"}),style:{backgroundColor:t}}),Gb=({children:e,style:t,prefixCls:n})=>b.createElement("div",{className:`${n}-palette`,style:{position:"relative",...t}},e),Kb=b.forwardRef((e,t)=>{const{children:n,x:r,y:o}=e;return b.createElement("div",{ref:t,style:{position:"absolute",left:`${r}%`,top:`${o}%`,zIndex:1,transform:"translate(-50%, -50%)"}},n)}),xT=({color:e,onChange:t,prefixCls:n,onChangeComplete:r,disabled:o})=>{const i=b.useRef(),a=b.useRef(),s=b.useRef(e),l=Ge(d=>{const f=Wb({offset:d,targetRef:a,containerRef:i,color:e});s.current=f,t(f)}),[c,u]=Xb({color:e,containerRef:i,targetRef:a,calculate:()=>qb(e),onDragChange:l,onDragChangeComplete:()=>r==null?void 0:r(s.current),disabledDrag:o});return b.createElement("div",{ref:i,className:`${n}-select`,onMouseDown:u,onTouchStart:u},b.createElement(Gb,{prefixCls:n},b.createElement(Kb,{x:c.x,y:c.y,ref:a},b.createElement(Ub,{color:e.toRgbString(),prefixCls:n})),b.createElement("div",{className:`${n}-saturation`,style:{backgroundColor:`hsl(${e.toHsb().h},100%, 50%)`,backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},yT=(e,t)=>{const[n,r]=un(e,t);return[b.useMemo(()=>uo(n),[n]),r]},wT=({colors:e,children:t,direction:n="to right",type:r,prefixCls:o})=>{const i=b.useMemo(()=>e.map((a,s)=>{let l=uo(a);return r==="alpha"&&s===e.length-1&&(l=new ir(l.setA(1))),l.toRgbString()}).join(","),[e,r]);return b.createElement("div",{className:`${o}-gradient`,style:{position:"absolute",inset:0,background:`linear-gradient(${n}, ${i})`}},t)},vT=e=>{const{prefixCls:t,colors:n,disabled:r,onChange:o,onChangeComplete:i,color:a,type:s}=e,l=b.useRef(null),c=b.useRef(null),u=b.useRef(a),d=y=>s==="hue"?y.getHue():y.a*100,f=Ge(y=>{const $=Wb({offset:y,targetRef:c,containerRef:l,color:a,type:s});u.current=$,o(d($))}),[p,g]=Xb({color:a,targetRef:c,containerRef:l,calculate:()=>qb(a,s),onDragChange:f,onDragChangeComplete(){i(d(u.current))},direction:"x",disabledDrag:r}),m=b.useMemo(()=>{if(s==="hue"){const y=a.toHsb();return y.s=1,y.b=1,y.a=1,new ir(y)}return a},[a,s]),w=b.useMemo(()=>n.map(y=>`${y.color} ${y.percent}%`),[n]);return b.createElement("div",{ref:l,className:J(`${t}-slider`,`${t}-slider-${s}`),onMouseDown:g,onTouchStart:g},b.createElement(Gb,{prefixCls:t},b.createElement(Kb,{x:p.x,y:p.y,ref:c},b.createElement(Ub,{size:"small",color:m.toHexString(),prefixCls:t})),b.createElement(wT,{colors:w,type:s,prefixCls:t})))};function CT(e){return h.useMemo(()=>{const{slider:t}=e||{};return[t||vT]},[e])}function ni(){return ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ni.apply(this,arguments)}const ST=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],ET=b.forwardRef((e,t)=>{const{value:n,defaultValue:r,prefixCls:o=mT,onChange:i,onChangeComplete:a,className:s,style:l,panelRender:c,disabledAlpha:u=!1,disabled:d=!1,components:f}=e,[p]=CT(f),[g,m]=yT(r||hT,n),w=b.useMemo(()=>g.setA(1).toRgbString(),[g]),y=(N,z)=>{n||m(N),i==null||i(N,z)},$=N=>new ir(g.setHue(N)),x=N=>new ir(g.setA(N/100)),E=N=>{y($(N),{type:"hue",value:N})},C=N=>{y(x(N),{type:"alpha",value:N})},v=N=>{a&&a($(N))},T=N=>{a&&a(x(N))},R=J(`${o}-panel`,s,{[`${o}-panel-disabled`]:d}),A={prefixCls:o,disabled:d,color:g},k=b.createElement(b.Fragment,null,b.createElement(xT,ni({onChange:y},A,{onChangeComplete:a})),b.createElement("div",{className:`${o}-slider-container`},b.createElement("div",{className:J(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:u})},b.createElement(p,ni({},A,{type:"hue",colors:ST,min:0,max:359,value:g.getHue(),onChange:E,onChangeComplete:v})),!u&&b.createElement(p,ni({},A,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:w}],min:0,max:100,value:g.a*100,onChange:C,onChangeComplete:T}))),b.createElement(gT,{color:g.toRgbString(),prefixCls:o})));return b.createElement("div",{className:R,style:l,ref:t},typeof c=="function"?c(k):k)});process.env.NODE_ENV!=="production"&&(ET.displayName="ColorPicker");const $T=(e,t)=>(e==null?void 0:e.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6))||"",kT=(e,t)=>e?$T(e,t):"";let xc=function(){function e(t){var r;if(ns(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)==null?void 0:r.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:o,percent:i})=>({color:new e(o),percent:i})),this.metaColor=new ir(this.colors[0].color.metaColor)):this.metaColor=new ir(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return rs(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return kT(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(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])}();var IT={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 yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yc.apply(this,arguments)}const RT=(e,t)=>h.createElement(Jt,yc({},e,{ref:t,icon:IT})),Ia=h.forwardRef(RT);process.env.NODE_ENV!=="production"&&(Ia.displayName="RightOutlined");const TT=e=>e instanceof xc?e:new xc(e),PT=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),a=new ir(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},Yb=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return yt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Qb=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??la(t),i=e.contentLineHeightSM??la(n),a=e.contentLineHeightLG??la(r),s=PT(new xc(e.colorBgSolid),"#fff")?"#000":"#fff",l=xr.reduce((d,f)=>({...d,[`${f}ShadowColor`]:`0 ${ye(e.controlOutlineWidth)} 0 ${Uo(e[`${f}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...l,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:o,contentLineHeightSM:i,contentLineHeightLG:a,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*a)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:u}},NT=e=>{const{componentCls:t,antCls:n,lineWidth:r,lineType:o}=e,[i,a]=ur(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")]:o,[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}}}},xr.map(s=>{const l=e[`${s}6`],c=e[`${s}1`],u=e[`${s}Hover`],d=e[`${s}2`],f=e[`${s}3`],p=e[`${s}Active`],g=e[`${s}ShadowColor`];return{[`&${t}-color-${s}`]:{[i("color-base")]:l,[i("color-hover")]:u,[i("color-active")]:p,[i("color-light")]:c,[i("color-light-hover")]:d,[i("color-light-active")]:f,[i("shadow")]:g}}}),{[`&: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}}}]}},MT=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:s,calc:l}=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",...eT(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Hu(),[`${t}-icon`]:{display:"inline-flex",alignItems:"center",[n]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":Ea(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:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineEnd:l(s).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineStart:l(s).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},AT=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),ed=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:r,padding:`${ye(l)} ${ye(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:AT(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},zT=e=>{const t=yt(e,{fontSize:e.contentFontSize});return ed(t,e.componentCls)},OT=e=>{const t=yt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return ed(t,`${e.componentCls}-sm`)},DT=e=>{const t=yt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return ed(t,`${e.componentCls}-lg`)},LT=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},FT=on("Button",e=>{const t=Yb(e);return[MT(t),zT(t),OT(t),DT(t),LT(t),NT(t),fT(t)]},Qb,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function _T(e,t,n,r){const{focusElCls:o,focus:i,borderElCls:a}=n,s=a?"> *":"",l=s?` ${s}`:"",c=f=>f.filter(Boolean).map(p=>`&:${p}${l}`).join(","),u=c(["hover",o?`hover${o}`:null]),d=c([i?"focus":null,"active"]);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[d]:{zIndex:3},[u]:{zIndex:4},...o?{[`&${o}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function jT(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function td(e,t={focus:!0}){const{componentCls:n}=e,{componentCls:r}=t,o=r||n,i=`${o}-compact`;return{[i]:{..._T(e,i,t,o),...jT(o,i,t)}}}function BT(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":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function HT(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 VT(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:{...BT(e,t,e.componentCls),...HT(e.componentCls,t)}}}const WT=e=>{const{antCls:t,componentCls:n,lineWidth:r,calc:o,colorBgContainer:i}=e,a=`${n}-variant-solid:not([disabled])`,s=o(r).mul(-1).equal(),[l,c]=ur(t,"btn"),u=d=>({[`${n}-compact${d?"-vertical":""}-item`]:{[l("compact-connect-border-color")]:c("bg-color-hover"),[`&${a}`]:{transition:"none",[`& + ${a}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},d?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:"none"}}}});return[u(),u(!0),{[`${a}${n}-color-default`]:{[l("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${i})`}}]},qT=lI(["Button","compact"],e=>{const t=Yb(e);return[td(t),VT(t),WT(t)]},Qb);function XT(e){if(rn(e)){let t=e==null?void 0:e.delay;return t=os(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const UT={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},GT=b.forwardRef((e,t)=>{const{_skipSemantic:n,loading:r=!1,prefixCls:o,color:i,variant:a,type:s,danger:l=!1,shape:c,size:u,disabled:d,className:f,rootClassName:p,children:g,icon:m,iconPosition:w,iconPlacement:y,ghost:$=!1,block:x=!1,htmlType:E="button",classNames:C,styles:v,style:T,autoInsertSpace:R,autoFocus:A,...k}=e,N=or(g),z=s||"default",{getPrefixCls:L,direction:D,autoInsertSpace:M,className:O,style:F,classNames:H,styles:X,loadingIcon:I,shape:Q,color:Y,variant:P}=Kn("button"),oe=c||Q||"default",[W,j]=b.useMemo(()=>{if(i&&a)return[i,a];if(s||l){const _e=UT[z]||[];return l?["danger",_e[1]]:_e}return a==="solid"?["primary",a]:Y&&P?[Y,P]:P==="solid"?["primary",P]:["default","outlined"]},[i,a,s,l,Y,P,z]),[ne,ee]=b.useMemo(()=>$&&j==="solid"?[W,"outlined"]:[W,j],[W,j,$]),_=ne==="danger",ae=_?"dangerous":ne,fe=R??M??!0,q=L("btn",o),[ce,V]=FT(q),le=b.useContext(yr),se=d??le,G=b.useContext(zb),K=b.useMemo(()=>XT(r),[r]),[we,ie]=d$(K.loading),[me,pe]=b.useState(!1),Ne=b.useRef(null),Ee=Hr(t,Ne),Ie=N.length===1&&!m&&!Ui(ee),B=b.useRef(!0);b.useEffect(()=>(B.current=!1,()=>{B.current=!0}),[]),Bt(()=>{K.delay>0?ie(!0,{ms:K.delay}):ie(K.loading,!0)},[K.delay,K.loading]),b.useEffect(()=>{if(!Ne.current||!fe)return;const _e=Ne.current.textContent||"";Ie&&bc(_e)?me||pe(!0):me&&pe(!1)}),b.useEffect(()=>{var _e;A&&((_e=Ne.current)==null||_e.focus())},[]);const Z=b.useCallback(_e=>{var pt;if(we||se){_e.preventDefault();return}(pt=e.onClick)==null||pt.call(e,("href"in e,_e))},[e.onClick,we,se]);if(process.env.NODE_ENV!=="production"){const _e=At("Button");process.env.NODE_ENV!=="production"&&_e(!(typeof m=="string"&&m.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${m}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&_e(!($&&Ui(ee)),"usage","`link` or `text` button can't be a `ghost` button."),_e.deprecated(!w,"iconPosition","iconPlacement")}const{compactSize:ue,compactItemClassnames:xe}=No(q,D),$e=Po(_e=>u??ue??G??_e),de=we?"loading":m,re=y??w??"start",Ce=Yt(k,["navigate"]),Re={...e,type:z,color:ne,variant:ee,danger:_,shape:oe,size:$e,disabled:se,loading:we,iconPlacement:re},Ue=kt(F),Te=kt(T),[ze,Me]=Tn([n?void 0:H,C],[n?void 0:X,Ue,v,Te],{props:Re}),it=J(q,ce,V,{[`${q}-${oe}`]:oe!=="default"&&oe!=="square"&&oe,[`${q}-${z}`]:z,[`${q}-dangerous`]:l,[`${q}-color-${ae}`]:ae,[`${q}-variant-${ee}`]:ee,[`${q}-lg`]:$e==="large",[`${q}-sm`]:$e==="small",[`${q}-icon-only`]:!g&&g!==0&&!!de,[`${q}-background-ghost`]:$&&!Ui(ee),[`${q}-loading`]:we,[`${q}-two-chinese-chars`]:me&&fe&&!we,[`${q}-block`]:x,[`${q}-rtl`]:D==="rtl",[`${q}-icon-end`]:re==="end"},xe,f,p,O,ze.root),Ye={className:ze.icon,style:Me.icon},It=_e=>b.createElement(Ob,{prefixCls:q,...Ye},_e),wt=b.createElement(_R,{existIcon:!!m,prefixCls:q,loading:we,mount:B.current,...Ye}),Ot=rn(r)&&r.icon||I;let ht;m&&!we?ht=It(m):r&&Ot?ht=It(Ot):ht=wt;const _t=yi(g)?FR(g,Ie&&fe,Me.content,ze.content):null;if(Ce.href!==void 0)return b.createElement("a",{...Ce,className:J(it,{[`${q}-disabled`]:se}),href:se?void 0:Ce.href,style:Me.root,onClick:Z,ref:Ee,tabIndex:se?-1:0,"aria-disabled":se},ht,_t);let jt=b.createElement("button",{...k,type:E,className:it,style:Me.root,onClick:Z,disabled:se,ref:Ee},ht,_t,xe&&b.createElement(qT,{prefixCls:q}));return Ui(ee)||(jt=b.createElement(Mb,{component:"Button",disabled:we},jt)),jt}),ar=GT;ar.Group=DR;ar.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(ar.displayName="Button");const zr="RC_FORM_INTERNAL_HOOKS",ot=()=>{tt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},yo=h.createContext({getFieldValue:ot,getFieldsValue:ot,getFieldError:ot,getFieldWarning:ot,getFieldsError:ot,isFieldsTouched:ot,isFieldTouched:ot,isFieldValidating:ot,isFieldsValidating:ot,resetFields:ot,setFields:ot,setFieldValue:ot,setFieldsValue:ot,validateFields:ot,submit:ot,getInternalHooks:()=>(ot(),{dispatch:ot,initEntityValue:ot,registerField:ot,useSubscribe:ot,setInitialValues:ot,destroyForm:ot,setCallbacks:ot,registerWatch:ot,getFields:ot,setValidateMessages:ot,setPreserve:ot,getInitialValue:ot})}),Ra=h.createContext(null);function wc(e){return e==null?[]:Array.isArray(e)?e:[e]}function KT(e){return e&&!!e._init}function vc(){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(){const e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}const tl=vc(),YT=/%[sdj%]/g;let Zb=()=>{};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Zb=(e,t)=>{typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&t.every(n=>typeof n=="string")&&console.warn(e,t)});function Cc(e){if(!e||!e.length)return null;const t={};return e.forEach(n=>{const r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function yn(e,...t){let n=0;const r=t.length;return typeof e=="function"?e.apply(null,t):typeof e=="string"?e.replace(YT,i=>{if(i==="%%")return"%";if(n>=r)return i;switch(i){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 i}}):e}function QT(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function zt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||QT(t)&&typeof e=="string"&&!e)}function ZT(e,t,n){const r=[];let o=0;const i=e.length;function a(s){r.push(...s||[]),o++,o===i&&n(r)}e.forEach(s=>{t(s,a)})}function Op(e,t,n){let r=0;const o=e.length;function i(a){if(a&&a.length){n(a);return}const s=r;r=r+1,s<o?t(e[s],i):n([])}i([])}function JT(e){const t=[];return Object.keys(e).forEach(n=>{t.push(...e[n]||[])}),t}class Dp extends Error{constructor(n,r){super("Async Validation Error");te(this,"errors");te(this,"fields");this.errors=n,this.fields=r}}function eP(e,t,n,r,o){if(t.first){const d=new Promise((f,p)=>{const g=w=>(r(w),w.length?p(new Dp(w,Cc(w))):f(o)),m=JT(e);Op(m,n,g)});return d.catch(f=>f),d}const i=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),s=a.length;let l=0;const c=[],u=new Promise((d,f)=>{const p=g=>{if(c.push.apply(c,g),l++,l===s)return r(c),c.length?f(new Dp(c,Cc(c))):d(o)};a.length||(r(c),d(o)),a.forEach(g=>{const m=e[g];i.indexOf(g)!==-1?Op(m,n,p):ZT(m,n,p)})});return u.catch(d=>d),u}function tP(e){return!!(e&&e.message!==void 0)}function nP(e,t){let n=e;for(let r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function Lp(e,t){return n=>{let r;return e.fullFields?r=nP(t,e.fullFields):r=t[n.field||e.fullField],tP(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function Fp(e,t){if(t){for(const n in t)if(t.hasOwnProperty(n)){const r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]={...e[n],...r}:e[n]=r}}return e}const Kr="enum",rP=(e,t,n,r,o)=>{e[Kr]=Array.isArray(e[Kr])?e[Kr]:[],e[Kr].indexOf(t)===-1&&r.push(yn(o.messages[Kr],e.fullField,e[Kr].join(", ")))},oP=(e,t,n,r,o)=>{e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(yn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern=="string"&&(new RegExp(e.pattern).test(t)||r.push(yn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))))},iP=(e,t,n,r,o)=>{const i=typeof e.len=="number",a=typeof e.min=="number",s=typeof e.max=="number",l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let c=t,u=null;const d=typeof t=="number",f=typeof t=="string",p=Array.isArray(t);if(d?u="number":f?u="string":p&&(u="array"),!u)return!1;p&&(c=t.length),f&&(c=t.replace(l,"_").length),i?c!==e.len&&r.push(yn(o.messages[u].len,e.fullField,e.len)):a&&!s&&c<e.min?r.push(yn(o.messages[u].min,e.fullField,e.min)):s&&!a&&c>e.max?r.push(yn(o.messages[u].max,e.fullField,e.max)):a&&s&&(c<e.min||c>e.max)&&r.push(yn(o.messages[u].range,e.fullField,e.min,e.max))},Jb=(e,t,n,r,o,i)=>{e.required&&(!n.hasOwnProperty(e.field)||zt(t,i||e.type))&&r.push(yn(o.messages.required,e.fullField))};let Gi;const aP=()=>{if(Gi)return Gi;const e="[a-fA-F\\d:]",t=C=>C&&C.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}",a=`(?:${[`(?:${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,})?`,s=new RegExp(`(?:^${n}$)|(?:^${a}$)`),l=new RegExp(`^${n}$`),c=new RegExp(`^${a}$`),u=C=>C&&C.exact?s:new RegExp(`(?:${t(C)}${n}${t(C)})|(?:${t(C)}${a}${t(C)})`,"g");u.v4=C=>C&&C.exact?l:new RegExp(`${t(C)}${n}${t(C)}`,"g"),u.v6=C=>C&&C.exact?c:new RegExp(`${t(C)}${a}${t(C)}`,"g");const d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,g=u.v6().source,E=`(?:${d}|www\\.)${f}(?:localhost|${p}|${g}|(?:(?:[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 Gi=new RegExp(`(?:^${E}$)`,"i"),Gi},nl={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},Go={integer(e){return Go.number(e)&&parseInt(e,10)===e},float(e){return Go.number(e)&&!Go.integer(e)},array(e){return Array.isArray(e)},regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number(e){return isNaN(e)?!1:typeof e=="number"},object(e){return typeof e=="object"&&!Go.array(e)},method(e){return typeof e=="function"},email(e){return typeof e=="string"&&e.length<=320&&!!e.match(nl.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(nl.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(aP())},hex(e){return typeof e=="string"&&!!e.match(nl.hex)}},sP=(e,t,n,r,o)=>{if(e.required&&t===void 0){Jb(e,t,n,r,o);return}const i=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],a=e.type;i.indexOf(a)>-1?Go[a](t)||r.push(yn(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(yn(o.messages.types[a],e.fullField,e.type))},lP=(e,t,n,r,o)=>{(/^\s+$/.test(t)||t==="")&&r.push(yn(o.messages.whitespace,e.fullField))},Xe={required:Jb,whitespace:lP,type:sP,range:iP,enum:rP,pattern:oP},cP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o)}n(i)},uP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();Xe.required(e,t,r,i,o,"array"),t!=null&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},dP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe.type(e,t,r,i,o)}n(i)},fP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"date")&&!e.required)return n();if(Xe.required(e,t,r,i,o),!zt(t,"date")){let s;t instanceof Date?s=t:s=new Date(t),Xe.type(e,s,r,i,o),s&&Xe.range(e,s.getTime(),r,i,o)}}n(i)},pP="enum",mP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe[pP](e,t,r,i,o)}n(i)},hP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},gP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},bP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe.type(e,t,r,i,o)}n(i)},xP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===""&&(t=void 0),zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},yP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe.type(e,t,r,i,o)}n(i)},wP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"string")&&!e.required)return n();Xe.required(e,t,r,i,o),zt(t,"string")||Xe.pattern(e,t,r,i,o)}n(i)},vP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),zt(t)||Xe.type(e,t,r,i,o)}n(i)},CP=(e,t,n,r,o)=>{const i=[],a=Array.isArray(t)?"array":typeof t;Xe.required(e,t,r,i,o,a),n(i)},SP=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"string")&&!e.required)return n();Xe.required(e,t,r,i,o,"string"),zt(t,"string")||(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o),Xe.pattern(e,t,r,i,o),e.whitespace===!0&&Xe.whitespace(e,t,r,i,o))}n(i)},Ki=(e,t,n,r,o)=>{const i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,i)&&!e.required)return n();Xe.required(e,t,r,a,o,i),zt(t,i)||Xe.type(e,t,r,a,o)}n(a)},jo={string:SP,method:bP,number:xP,boolean:dP,regexp:vP,integer:gP,float:hP,array:uP,object:yP,enum:mP,pattern:wP,date:fP,url:Ki,hex:Ki,email:Ki,tel:Ki,required:CP,any:cP},mr=class mr{constructor(t){te(this,"rules",null);te(this,"_messages",tl);this.define(t)}define(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(n=>{const r=t[n];this.rules[n]=Array.isArray(r)?r:[r]})}messages(t){return t&&(this._messages=Fp(vc(),t)),this._messages}validate(t,n={},r=()=>{}){let o=t,i=n,a=r;if(typeof i=="function"&&(a=i,i={}),!this.rules||Object.keys(this.rules).length===0)return a&&a(null,o),Promise.resolve(o);function s(d){let f=[],p={};function g(m){Array.isArray(m)?f=f.concat(...m):f.push(m)}for(let m=0;m<d.length;m++)g(d[m]);f.length?(p=Cc(f),a(f,p)):a(null,o)}if(i.messages){let d=this.messages();d===tl&&(d=vc()),Fp(d,i.messages),i.messages=d}else i.messages=this.messages();const l={};(i.keys||Object.keys(this.rules)).forEach(d=>{const f=this.rules[d];let p=o[d];f.forEach(g=>{let m=g;typeof m.transform=="function"&&(o===t&&(o={...o}),p=o[d]=m.transform(p),p!=null&&(m.type=m.type||(Array.isArray(p)?"array":typeof p))),typeof m=="function"?m={validator:m}:m={...m},m.validator=this.getValidationMethod(m),m.validator&&(m.field=d,m.fullField=m.fullField||d,m.type=this.getType(m),l[d]=l[d]||[],l[d].push({rule:m,value:p,source:o,field:d}))})});const u={};return eP(l,i,(d,f)=>{var $;const p=d.rule;let g=(p.type==="object"||p.type==="array")&&(typeof p.fields=="object"||typeof p.defaultField=="object");g=g&&(p.required||!p.required&&d.value),p.field=d.field;function m(x,E){return{...E,fullField:`${p.fullField}.${x}`,fullFields:p.fullFields?[...p.fullFields,x]:[x]}}function w(x=[]){let E=Array.isArray(x)?x:[x];!i.suppressWarning&&E.length&&mr.warning("async-validator:",E),E.length&&p.message!==void 0&&p.message!==null&&(E=[].concat(p.message));let C=E.map(Lp(p,o));if(i.first&&C.length)return u[p.field]=1,f(C);if(!g)f(C);else{if(p.required&&!d.value)return p.message!==void 0?C=[].concat(p.message).map(Lp(p,o)):i.error&&(C=[i.error(p,yn(i.messages.required,p.field))]),f(C);let v={};p.defaultField&&Object.keys(d.value).map(A=>{v[A]=p.defaultField}),v={...v,...d.rule.fields};const T={};Object.keys(v).forEach(A=>{const k=v[A],N=Array.isArray(k)?k:[k];T[A]=N.map(m.bind(null,A))});const R=new mr(T);R.messages(i.messages),d.rule.options&&(d.rule.options.messages=i.messages,d.rule.options.error=i.error),R.validate(d.value,d.rule.options||i,A=>{const k=[];C&&C.length&&k.push(...C),A&&A.length&&k.push(...A),f(k.length?k:null)})}}let y;if(p.asyncValidator)y=p.asyncValidator(p,d.value,w,d.source,i);else if(p.validator){try{y=p.validator(p,d.value,w,d.source,i)}catch(x){($=console.error)==null||$.call(console,x),i.suppressValidatorError||setTimeout(()=>{throw x},0),w(x.message)}y===!0?w():y===!1?w(typeof p.message=="function"?p.message(p.fullField||p.field):p.message||`${p.fullField||p.field} fails`):y instanceof Array?w(y):y instanceof Error&&w(y.message)}y&&y.then&&y.then(()=>w(),x=>w(x))},d=>{s(d)},o)}getType(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!jo.hasOwnProperty(t.type))throw new Error(yn("Unknown rule type %s",t.type));return t.type||"string"}getValidationMethod(t){if(typeof t.validator=="function")return t.validator;const n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?jo.required:jo[this.getType(t)]||void 0}};te(mr,"register",function(n,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");jo[n]=r}),te(mr,"warning",Zb),te(mr,"messages",tl),te(mr,"validators",jo);let Sc=mr;const sn="'${name}' is not a valid ${type}",ex={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:sn,method:sn,array:sn,object:sn,number:sn,date:sn,boolean:sn,integer:sn,float:sn,regexp:sn,email:sn,tel:sn,url:sn,hex:sn},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}"}},_p=Sc;function EP(e,t){return e.replace(/\\?\$\{\w+\}/g,n=>{if(n.startsWith("\\"))return n.slice(1);const r=n.slice(2,-1);return t[r]})}const jp="CODE_LOGIC_ERROR";async function Ec(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,_p.warning=()=>{},i.validator){const f=i.validator;i.validator=(...p)=>{try{return f(...p)}catch(g){return console.error(g),Promise.reject(jp)}}}let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const s=new _p({[e]:[i]}),l=oo(ex,r.validateMessages);s.messages(l);let c=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(f){f.errors&&(c=f.errors.map(({message:p},g)=>{const m=p===jp?l.default:p;return h.isValidElement(m)?h.cloneElement(m,{key:`error_${g}`}):m}))}if(!c.length&&a&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((p,g)=>Ec(`${e}.${g}`,p,a,r,o)))).reduce((p,g)=>[...p,...g],[]);const u={...n,name:e,enum:(n.enum||[]).join(", "),...o};return c.map(f=>typeof f=="string"?EP(f,u):f)}function $P(e,t,n,r,o,i){const a=e.join("."),s=n.map((c,u)=>{const d=c.validator,f={...c,ruleIndex:u};return d&&(f.validator=(p,g,m)=>{let w=!1;const $=d(p,g,(...x)=>{Promise.resolve().then(()=>{tt(!w,"Your validator function has already return a promise. `callback` will be ignored."),w||m(...x)})});w=$&&typeof $.then=="function"&&typeof $.catch=="function",tt(w,"`callback` is deprecated. Please return a promise instead."),w&&$.then(()=>{m()}).catch(x=>{m(x||" ")})}),f}).sort(({warningOnly:c,ruleIndex:u},{warningOnly:d,ruleIndex:f})=>!!c==!!d?u-f:c?1:-1);let l;if(o===!0)l=new Promise(async(c,u)=>{for(let d=0;d<s.length;d+=1){const f=s[d],p=await Ec(a,t,f,r,i);if(p.length){u([{errors:p,rule:f}]);return}}c([])});else{const c=s.map(u=>Ec(a,t,u,r,i).then(d=>({errors:d,rule:u})));l=(o?IP(c):kP(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}async function kP(e){return Promise.all(e).then(t=>[].concat(...t))}async function IP(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(o=>{o.errors.length&&n([o]),t+=1,t===e.length&&n([])})})})}function bt(e){return wc(e)}function Bp(e,t){let n={};return t.forEach(r=>{const o=In(e,r);n=xn(n,r,o)}),n}function fo(e,t,n=!1){return e&&e.some(r=>Ta(t,r,n))}function Ta(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((r,o)=>e[o]===r)}function RP(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(i=>{const a=e[i],s=t[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function TP(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function Hp(e,t,n){const{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;const o=e[t],i=t-n;return i>0?[...e.slice(0,n),o,...e.slice(n,t),...e.slice(t+1,r)]:i<0?[...e.slice(0,t),...e.slice(t+1,n+1),o,...e.slice(n+1,r)]:e}const tx=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)};class PP{constructor(t){te(this,"namePathList",[]);te(this,"taskId",0);te(this,"watcherList",new Set);te(this,"form");this.form=t}register(t){return this.watcherList.add(t),()=>{this.watcherList.delete(t)}}notify(t){t.forEach(n=>{this.namePathList.every(r=>!Ta(r,n))&&this.namePathList.push(n)}),this.doBatch()}doBatch(){this.taskId+=1;const t=this.taskId;tx(()=>{if(t===this.taskId&&this.watcherList.size){const n=this.form.getForm(),r=n.getFieldsValue(),o=n.getFieldsValue(!0);this.watcherList.forEach(i=>{i(r,o,this.namePathList)}),this.namePathList=[]}})}}async function NP(){return new Promise(e=>{tx(()=>{xt(()=>{e()})})})}function $c(){return $c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$c.apply(this,arguments)}const Ir=[],Bo=[];function rl(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}class nx extends h.PureComponent{constructor(n){super(n);te(this,"state",{resetCount:0});te(this,"cancelRegisterFunc",null);te(this,"mounted",!1);te(this,"touched",!1);te(this,"dirty",!1);te(this,"validatePromise");te(this,"prevValidating");te(this,"errors",Ir);te(this,"warnings",Bo);te(this,"cancelRegister",()=>{const{preserve:n,isListField:r,name:o}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,n,bt(o)),this.cancelRegisterFunc=null});te(this,"getNamePath",()=>{const{name:n,fieldContext:r}=this.props,{prefixName:o=[]}=r;return n!==void 0?[...o,...n]:[]});te(this,"getRules",()=>{const{rules:n=[],fieldContext:r}=this.props;return n.map(o=>typeof o=="function"?o(r):o)});te(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:n})=>({resetCount:n+1}))});te(this,"metaCache",null);te(this,"triggerMetaEvent",n=>{const{onMetaChange:r}=this.props;if(r){const o={...this.getMeta(),destroy:n};ai(this.metaCache,o)||r(o),this.metaCache=o}else this.metaCache=null});te(this,"onStoreChange",(n,r,o)=>{const{shouldUpdate:i,dependencies:a=[],onReset:s}=this.props,{store:l}=o,c=this.getNamePath(),u=this.getValue(n),d=this.getValue(l),f=r&&fo(r,c);switch(o.type==="valueUpdate"&&o.source==="external"&&!ai(u,d)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=Ir,this.warnings=Bo,this.triggerMetaEvent()),o.type){case"reset":if(!r||f){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=Ir,this.warnings=Bo,this.triggerMetaEvent(),s==null||s(),this.refresh();return}break;case"remove":{if(i&&rl(i,n,l,u,d,o)){this.reRender();return}break}case"setField":{const{data:p}=o;if(f){"touched"in p&&(this.touched=p.touched),"validating"in p&&!("originRCField"in p)&&(this.validatePromise=p.validating?Promise.resolve([]):null),"errors"in p&&(this.errors=p.errors||Ir),"warnings"in p&&(this.warnings=p.warnings||Bo),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in p&&fo(r,c,!0)){this.reRender();return}if(i&&!c.length&&rl(i,n,l,u,d,o)){this.reRender();return}break}case"dependenciesUpdate":{if(a.map(bt).some(g=>fo(o.relatedFields,g))){this.reRender();return}break}default:if(f||(!a.length||c.length||i)&&rl(i,n,l,u,d,o)){this.reRender();return}break}i===!0&&this.reRender()});te(this,"validateRules",n=>{const r=this.getNamePath(),o=this.getValue(),{triggerName:i,validateOnly:a=!1,delayFrame:s}=n||{},l=Promise.resolve().then(async()=>{if(!this.mounted)return[];const{validateFirst:c=!1,messageVariables:u,validateDebounce:d}=this.props;s&&await NP();let f=this.getRules();if(i&&(f=f.filter(g=>g).filter(g=>{const{validateTrigger:m}=g;return m?wc(m).includes(i):!0})),d&&i&&(await new Promise(g=>{setTimeout(g,d)}),this.validatePromise!==l))return[];const p=$P(r,o,f,n,c,u);return p.catch(g=>g).then((g=Ir)=>{var m;if(this.validatePromise===l){this.validatePromise=null;const w=[],y=[];(m=g.forEach)==null||m.call(g,({rule:{warningOnly:$},errors:x=Ir})=>{$?y.push(...x):w.push(...x)}),this.errors=w,this.warnings=y,this.triggerMetaEvent(),this.reRender()}}),p});return a||(this.validatePromise=l,this.dirty=!0,this.errors=Ir,this.warnings=Bo,this.triggerMetaEvent(),this.reRender()),l});te(this,"isFieldValidating",()=>!!this.validatePromise);te(this,"isFieldTouched",()=>this.touched);te(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;const{fieldContext:n}=this.props,{getInitialValue:r}=n.getInternalHooks(zr);return r(this.getNamePath())!==void 0});te(this,"getErrors",()=>this.errors);te(this,"getWarnings",()=>this.warnings);te(this,"isListField",()=>this.props.isListField);te(this,"isList",()=>this.props.isList);te(this,"isPreserve",()=>this.props.preserve);te(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null}));te(this,"getOnlyChild",n=>{if(typeof n=="function"){const o=this.getMeta();return{...this.getOnlyChild(n(this.getControlled(),o,this.props.fieldContext)),isFunction:!0}}const r=or(n);return r.length!==1||!h.isValidElement(r[0])?{child:r,isFunction:!1}:{child:r[0],isFunction:!1}});te(this,"getValue",n=>{const{getFieldsValue:r}=this.props.fieldContext,o=this.getNamePath();return In(n||r(!0),o)});te(this,"getControlled",(n={})=>{const{name:r,trigger:o="onChange",validateTrigger:i,getValueFromEvent:a,normalize:s,valuePropName:l="value",getValueProps:c,fieldContext:u}=this.props,d=i!==void 0?i:u.validateTrigger,f=this.getNamePath(),{getInternalHooks:p,getFieldsValue:g}=u,{dispatch:m}=p(zr),w=this.getValue(),y=c||(v=>({[l]:v})),$=n[o],x=r!==void 0?y(w):{};process.env.NODE_ENV!=="production"&&x&&Object.keys(x).forEach(v=>{tt(typeof x[v]!="function",`It's not recommended to generate dynamic function prop by \`getValueProps\`. Please pass it to child component directly (prop: ${v})`)});const E={...n,...x};return E[o]=(...v)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();const T=this.getValue();let R;a?R=a(...v):R=TP(l,...v),s&&(R=s(R,T,g(!0))),R!==T&&m({type:"updateValue",namePath:f,value:R}),$&&$(...v)},wc(d||[]).forEach(v=>{const T=E[v];E[v]=(...R)=>{T&&T(...R);const{rules:A}=this.props;A&&A.length&&m({type:"validateField",namePath:f,triggerName:v})}}),E});if(n.fieldContext){const{getInternalHooks:r}=n.fieldContext,{initEntityValue:o}=r(zr);o(this)}}componentDidMount(){const{shouldUpdate:n,fieldContext:r}=this.props;if(this.mounted=!0,r){const{getInternalHooks:o}=r,{registerField:i}=o(zr);this.cancelRegisterFunc=i(this)}n===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){const{resetCount:n}=this.state,{children:r}=this.props,{child:o,isFunction:i}=this.getOnlyChild(r);let a;return i?a=o:h.isValidElement(o)?a=h.cloneElement(o,this.getControlled(o.props)):(tt(!o,"`children` of Field is not validate ReactElement."),a=o),h.createElement(h.Fragment,{key:n},a)}}te(nx,"contextType",yo);function rx({name:e,...t}){const n=h.useContext(yo),r=h.useContext(Ra),o=e!==void 0?bt(e):void 0,i=t.isListField??!!r;let a="keep";return i||(a=`_${(o||[]).join("_")}`),process.env.NODE_ENV!=="production"&&t.preserve===!1&&i&&o.length<=1&&tt(!1,"`preserve` should not apply on Form.List fields."),h.createElement(nx,$c({key:a,name:o,isListField:i},t,{fieldContext:n}))}function MP({name:e,initialValue:t,children:n,rules:r,validateTrigger:o,isListField:i}){const a=h.useContext(yo),s=h.useContext(Ra),c=h.useRef({keys:[],id:0}).current,u=h.useMemo(()=>[...bt(a.prefixName)||[],...bt(e)],[a.prefixName,e]),d=h.useMemo(()=>({...a,prefixName:u}),[a,u]),f=h.useMemo(()=>({getKey:g=>{const m=u.length,w=g[m];return[c.keys[w],g.slice(m+1)]}}),[c,u]);if(typeof n!="function")return tt(!1,"Form.List only accepts function as children."),null;const p=(g,m,{source:w})=>w==="internal"?!1:g!==m;return h.createElement(Ra.Provider,{value:f},h.createElement(yo.Provider,{value:d},h.createElement(rx,{name:[],shouldUpdate:p,rules:r,validateTrigger:o,initialValue:t,isList:!0,isListField:i??!!s},({value:g=[],onChange:m},w)=>{const{getFieldValue:y}=a,$=()=>y(u||[])||[],x={add:(C,v)=>{const T=$();v>=0&&v<=T.length?(c.keys=[...c.keys.slice(0,v),c.id,...c.keys.slice(v)],m([...T.slice(0,v),C,...T.slice(v)])):(process.env.NODE_ENV!=="production"&&(v<0||v>T.length)&&tt(!1,"The second parameter of the add function should be a valid positive number."),c.keys=[...c.keys,c.id],m([...T,C])),c.id+=1},remove:C=>{const v=$(),T=new Set(Array.isArray(C)?C:[C]);T.size<=0||(c.keys=c.keys.filter((R,A)=>!T.has(A)),m(v.filter((R,A)=>!T.has(A))))},move(C,v){if(C===v)return;const T=$();C<0||C>=T.length||v<0||v>=T.length||(c.keys=Hp(c.keys,C,v),m(Hp(T,C,v)))}};let E=g||[];return Array.isArray(E)||(E=[],process.env.NODE_ENV!=="production"&&tt(!1,`Current value of '${u.join(" > ")}' is not an array type.`)),n(E.map((C,v)=>{let T=c.keys[v];return T===void 0&&(c.keys[v]=c.id,T=c.keys[v],c.id+=1),{name:v,key:T,isListField:!0}}),x,w)})))}function AP(e){let t=!1,n=e.length;const r=[];return e.length?new Promise((o,i)=>{e.forEach((a,s)=>{a.catch(l=>(t=!0,l)).then(l=>{n-=1,r[s]=l,!(n>0)&&(t&&i(r),o(r))})})}):Promise.resolve([])}const kc="__@field_split__";function Yi(e){return e.map(t=>`${typeof t}:${t}`).join(kc)}class Yr{constructor(){te(this,"kvs",new Map)}set(t,n){this.kvs.set(Yi(t),n)}get(t){return this.kvs.get(Yi(t))}getAsPrefix(t){const n=Yi(t),r=n+kc,o=[],i=this.kvs.get(n);return i!==void 0&&o.push(i),this.kvs.forEach((a,s)=>{s.startsWith(r)&&o.push(a)}),o}update(t,n){const r=this.get(t),o=n(r);o?this.set(t,o):this.delete(t)}delete(t){this.kvs.delete(Yi(t))}map(t){return[...this.kvs.entries()].map(([n,r])=>{const o=n.split(kc);return t({key:o.map(i=>{const[,a,s]=i.match(/^([^:]*):(.*)$/);return a==="number"?Number(s):s}),value:r})})}toJSON(){const t={};return this.map(({key:n,value:r})=>(t[n.join(".")]=r,null)),t}}class zP{constructor(t){te(this,"formHooked",!1);te(this,"forceRootUpdate");te(this,"subscribable",!0);te(this,"store",{});te(this,"fieldEntities",[]);te(this,"initialValues",{});te(this,"callbacks",{});te(this,"validateMessages",null);te(this,"preserve",null);te(this,"lastValidatePromise",null);te(this,"watcherCenter",new PP(this));te(this,"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}));te(this,"getInternalHooks",t=>t===zr?(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}):(tt(!1,"`getInternalHooks` is internal usage. Should not call directly."),null));te(this,"useSubscribe",t=>{this.subscribable=t});te(this,"prevWithoutPreserves",null);te(this,"setInitialValues",(t,n)=>{var r;if(this.initialValues=t||{},n){let o=oo(t,this.store);(r=this.prevWithoutPreserves)==null||r.map(({key:i})=>{o=xn(o,i,In(t,i))}),this.prevWithoutPreserves=null,this.updateStore(o)}});te(this,"destroyForm",t=>{if(t)this.updateStore({});else{const n=new Yr;this.getFieldEntities(!0).forEach(r=>{this.isMergedPreserve(r.isPreserve())||n.set(r.getNamePath(),!0)}),this.prevWithoutPreserves=n}});te(this,"getInitialValue",t=>{const n=In(this.initialValues,t);return t.length?oo(n):n});te(this,"setCallbacks",t=>{this.callbacks=t});te(this,"setValidateMessages",t=>{this.validateMessages=t});te(this,"setPreserve",t=>{this.preserve=t});te(this,"registerWatch",t=>this.watcherCenter.register(t));te(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)});te(this,"timeoutId",null);te(this,"warningUnhooked",()=>{process.env.NODE_ENV!=="production"&&!this.timeoutId&&typeof window<"u"&&(this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.formHooked||tt(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))});te(this,"updateStore",t=>{this.store=t});te(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities);te(this,"getFieldsMap",(t=!1)=>{const n=new Yr;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r)}),n});te(this,"getFieldEntitiesForNamePathList",(t,n=!1)=>{if(!t)return this.getFieldEntities(!0);const r=this.getFieldsMap(!0);return n?t.flatMap(o=>{const i=bt(o),a=r.getAsPrefix(i);return a.length?a:[{INVALIDATE_NAME_PATH:i}]}):t.map(o=>{const i=bt(o);return r.get(i)||{INVALIDATE_NAME_PATH:bt(o)}})});te(this,"getFieldsValue",(t,n)=>{this.warningUnhooked();let r,o;if(t===!0||Array.isArray(t)?(r=t,o=n):t&&typeof t=="object"&&(o=t.filter),r===!0&&!o)return this.store;const i=this.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null,!0),a=[],s=[];i.forEach(c=>{var d;const u=c.INVALIDATE_NAME_PATH||c.getNamePath();if((d=c.isList)!=null&&d.call(c)){s.push(u);return}if(!o)a.push(u);else{const f="getMeta"in c?c.getMeta():null;o(f)&&a.push(u)}});let l=Bp(this.store,a.map(bt));return s.forEach(c=>{In(l,c)||(l=xn(l,c,[]))}),l});te(this,"getFieldValue",t=>{this.warningUnhooked();const n=bt(t);return In(this.store,n)});te(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,o)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:bt(t[o]),errors:[],warnings:[]})));te(this,"getFieldError",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].errors});te(this,"getFieldWarning",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].warnings});te(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();const[n,r]=t;let o,i=!1;t.length===0?o=null:t.length===1?Array.isArray(n)?(o=n.map(bt),i=!1):(o=null,i=n):(o=n.map(bt),i=r);const a=this.getFieldEntities(!0),s=d=>d.isFieldTouched();if(!o)return i?a.every(d=>s(d)||d.isList()):a.some(s);const l=new Yr;o.forEach(d=>{l.set(d,[])}),a.forEach(d=>{const f=d.getNamePath();o.forEach(p=>{p.every((g,m)=>f[m]===g)&&l.update(p,g=>[...g,d])})});const c=d=>d.some(s),u=l.map(({value:d})=>d);return i?u.every(c):u.some(c)});te(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t])));te(this,"isFieldsValidating",t=>{this.warningUnhooked();const n=this.getFieldEntities();if(!t)return n.some(o=>o.isFieldValidating());const r=t.map(bt);return n.some(o=>{const i=o.getNamePath();return fo(r,i)&&o.isFieldValidating()})});te(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t])));te(this,"resetWithFieldInitialValue",(t={})=>{const n=new Yr,r=this.getFieldEntities(!0);r.forEach(a=>{const{initialValue:s}=a.props,l=a.getNamePath();if(s!==void 0){const c=n.get(l)||new Set;c.add({entity:a,value:s}),n.set(l,c)}});const o=a=>{a.forEach(s=>{const{initialValue:l}=s.props;if(l!==void 0){const c=s.getNamePath();if(this.getInitialValue(c)!==void 0)tt(!1,`Form already set 'initialValues' with path '${c.join(".")}'. Field can not overwrite it.`);else{const d=n.get(c);if(d&&d.size>1)tt(!1,`Multiple Field with path '${c.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(d){const f=this.getFieldValue(c);!s.isListField()&&(!t.skipExist||f===void 0)&&this.updateStore(xn(this.store,c,[...d][0].value))}}}})};let i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(a=>{const s=n.get(a);s&&i.push(...[...s].map(l=>l.entity))})):i=r,o(i)});te(this,"resetFields",t=>{this.warningUnhooked();const n=this.store;if(!t){this.updateStore(oo(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const r=t.map(bt);r.forEach(o=>{const i=this.getInitialValue(o);this.updateStore(xn(this.store,o,i))}),this.resetWithFieldInitialValue({namePathList:r}),this.notifyObservers(n,r,{type:"reset"}),this.notifyWatch(r)});te(this,"setFields",t=>{this.warningUnhooked();const n=this.store,r=[];t.forEach(o=>{const{name:i,...a}=o,s=bt(i);r.push(s),"value"in a&&this.updateStore(xn(this.store,s,a.value)),this.notifyObservers(n,[s],{type:"setField",data:o})}),this.notifyWatch(r)});te(this,"getFields",()=>this.getFieldEntities(!0).map(r=>{const o=r.getNamePath(),a={...r.getMeta(),name:o,value:this.getFieldValue(o)};return Object.defineProperty(a,"originRCField",{value:!0}),a}));te(this,"initEntityValue",t=>{const{initialValue:n}=t.props;if(n!==void 0){const r=t.getNamePath();In(this.store,r)===void 0&&this.updateStore(xn(this.store,r,n))}});te(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0);te(this,"registerField",t=>{this.fieldEntities.push(t);const n=t.getNamePath();if(this.notifyWatch([n]),t.props.initialValue!==void 0){const r=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(r,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(r,o,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(a=>a!==t),!this.isMergedPreserve(o)&&(!r||i.length>1)){const a=r?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==a&&this.fieldEntities.every(s=>!Ta(s.getNamePath(),n))){const s=this.store;this.updateStore(xn(s,n,a,!0)),this.notifyObservers(s,[n],{type:"remove"}),this.triggerDependenciesUpdate(s,n)}}this.notifyWatch([n])}});te(this,"dispatch",t=>{switch(t.type){case"updateValue":{const{namePath:n,value:r}=t;this.updateValue(n,r);break}case"validateField":{const{namePath:n,triggerName:r}=t;this.validateFields([n],{triggerName:r});break}}});te(this,"notifyObservers",(t,n,r)=>{if(this.subscribable){const o={...r,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:i})=>{i(t,n,o)})}else this.forceRootUpdate()});te(this,"triggerDependenciesUpdate",(t,n)=>{const r=this.getDependencyChildrenFields(n);return r.length&&this.validateFields(r,{delayFrame:!0}),this.notifyObservers(t,r,{type:"dependenciesUpdate",relatedFields:[n,...r]}),r});te(this,"updateValue",(t,n)=>{const r=bt(t),o=this.store;this.updateStore(xn(this.store,r,n)),this.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),this.notifyWatch([r]);const i=this.triggerDependenciesUpdate(o,r),{onValuesChange:a}=this.callbacks;if(a){const s=Bp(this.store,[r]),l=this.getFieldsValue(),c=xn(l,r,In(s,r));a(s,c)}this.triggerOnFieldsChange([r,...i])});te(this,"setFieldsValue",t=>{this.warningUnhooked();const n=this.store;if(t){const r=oo(this.store,t);this.updateStore(r)}this.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()});te(this,"setFieldValue",(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:!0}])});te(this,"getDependencyChildrenFields",t=>{const n=new Set,r=[],o=new Yr;this.getFieldEntities().forEach(a=>{const{dependencies:s}=a.props;(s||[]).forEach(l=>{const c=bt(l);o.update(c,(u=new Set)=>(u.add(a),u))})});const i=a=>{(o.get(a)||new Set).forEach(l=>{if(!n.has(l)){n.add(l);const c=l.getNamePath();l.isFieldDirty()&&c.length&&(r.push(c),i(c))}})};return i(t),r});te(this,"triggerOnFieldsChange",(t,n)=>{const{onFieldsChange:r}=this.callbacks;if(r){const o=this.getFields();if(n){const a=new Yr;n.forEach(({name:s,errors:l})=>{a.set(s,l)}),o.forEach(s=>{s.errors=a.get(s.name)||s.errors})}const i=o.filter(({name:a})=>fo(t,a));i.length&&r(i,o)}});te(this,"validateFields",(t,n)=>{this.warningUnhooked();let r,o;Array.isArray(t)||typeof t=="string"||typeof n=="string"?(r=t,o=n):o=t;const i=!!r,a=i?r.map(bt):[],s=[...a],l=[],c=String(Date.now()),u=new Set,{recursive:d,dirty:f}=o||{};this.getFieldEntities(!0).forEach(w=>{const y=w.getNamePath();if(i||((!w.isList()||!a.some($=>Ta($,y,!0)))&&s.push(y),a.push(y)),!(!w.props.rules||!w.props.rules.length)&&!(f&&!w.isFieldDirty())&&(u.add(y.join(c)),!i||fo(a,y,d))){const $=w.validateRules({validateMessages:{...ex,...this.validateMessages},...o});l.push($.then(()=>({name:y,errors:[],warnings:[]})).catch(x=>{var v;const E=[],C=[];return(v=x.forEach)==null||v.call(x,({rule:{warningOnly:T},errors:R})=>{T?C.push(...R):E.push(...R)}),E.length?Promise.reject({name:y,errors:E,warnings:C}):{name:y,errors:E,warnings:C}}))}});const p=AP(l);this.lastValidatePromise=p,p.catch(w=>w).then(w=>{const y=w.map(({name:$})=>$);this.notifyObservers(this.store,y,{type:"validateFinish"}),this.triggerOnFieldsChange(y,w)});const g=p.then(()=>this.lastValidatePromise===p?Promise.resolve(this.getFieldsValue(s)):Promise.reject([])).catch(w=>{var x,E;const y=w.filter(C=>C&&C.errors.length),$=(E=(x=y[0])==null?void 0:x.errors)==null?void 0:E[0];return Promise.reject({message:$,values:this.getFieldsValue(a),errorFields:y,outOfDate:this.lastValidatePromise!==p})});g.catch(w=>w);const m=a.filter(w=>u.has(w.join(c)));return this.triggerOnFieldsChange(m),g});te(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{const{onFinish:n}=this.callbacks;if(n)try{n(t)}catch(r){console.error(r)}}).catch(t=>{const{onFinishFailed:n}=this.callbacks;n&&n(t)})});this.forceRootUpdate=t}}function ox(e){const t=h.useRef(null),[,n]=h.useState({});if(!t.current)if(e)t.current=e;else{const r=()=>{n({})},o=new zP(r);t.current=o.getForm()}return[t.current]}const Ic=h.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),OP=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=h.useContext(Ic),i=h.useRef({});return h.createElement(Ic.Provider,{value:{...o,validateMessages:{...o.validateMessages,...e},triggerFormChange:(a,s)=>{t&&t(a,{changedFields:s,forms:i.current}),o.triggerFormChange(a,s)},triggerFormFinish:(a,s)=>{n&&n(a,{values:s,forms:i.current}),o.triggerFormFinish(a,s)},registerForm:(a,s)=>{a&&(i.current={...i.current,[a]:s}),o.registerForm(a,s)},unregisterForm:a=>{const s={...i.current};delete s[a],i.current=s,o.unregisterForm(a)}}},r)};function Rc(){return Rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rc.apply(this,arguments)}const DP=(e,t)=>{const{name:n,initialValues:r,fields:o,form:i,preserve:a,children:s,component:l="form",validateMessages:c,validateTrigger:u="onChange",onValuesChange:d,onFieldsChange:f,onFinish:p,onFinishFailed:g,clearOnDestroy:m,...w}=e,y=h.useRef(null),$=h.useContext(Ic),[x]=ox(i),{useSubscribe:E,setInitialValues:C,setCallbacks:v,setValidateMessages:T,setPreserve:R,destroyForm:A}=x.getInternalHooks(zr);h.useImperativeHandle(t,()=>({...x,nativeElement:y.current})),h.useEffect(()=>($.registerForm(n,x),()=>{$.unregisterForm(n)}),[$,x,n]),T({...$.validateMessages,...c}),v({onValuesChange:d,onFieldsChange:(O,...F)=>{$.triggerFormChange(n,O),f&&f(O,...F)},onFinish:O=>{$.triggerFormFinish(n,O),p&&p(O)},onFinishFailed:g}),R(a);const k=h.useRef(null);C(r,!k.current),k.current||(k.current=!0),h.useEffect(()=>()=>A(m),[]);let N;const z=typeof s=="function";if(z){const O=x.getFieldsValue(!0);N=s(O,x)}else N=s;E(!z);const L=h.useRef(null);h.useEffect(()=>{RP(L.current||[],o||[])||x.setFields(o||[]),L.current=o},[o,x]);const D=h.useMemo(()=>({...x,validateTrigger:u}),[x,u]),M=h.createElement(Ra.Provider,{value:null},h.createElement(yo.Provider,{value:D},N));return l===!1?M:h.createElement(l,Rc({},w,{ref:y,onSubmit:O=>{O.preventDefault(),O.stopPropagation(),x.submit()},onReset:O=>{var F;O.preventDefault(),x.resetFields(),(F=w.onReset)==null||F.call(w,O)}}),M)};function ol(e){try{return JSON.stringify(e)}catch{return Math.random()}}function LP(...e){const[t,n={}]=e,r=KT(n)?{form:n}:n,o=r.form,[i,a]=b.useState(()=>typeof t=="function"?t({}):void 0),s=b.useMemo(()=>ol(i),[i]),l=b.useRef(s);l.current=s;const c=b.useContext(yo),u=o||c,d=u&&u._init;process.env.NODE_ENV!=="production"&&tt(e.length===2?o?d:!0:d,"useWatch requires a form instance since it can not auto detect from context.");const{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:g}=p(zr),m=Ge((y,$)=>{const x=r.preserve?$??f(!0):y??f(),E=typeof t=="function"?t(x):In(x,bt(t));ol(i)!==ol(E)&&a(E)}),w=typeof t=="function"?t:JSON.stringify(t);return b.useEffect(()=>{d&&m()},[d,w]),b.useEffect(()=>d?g(($,x)=>{m($,x)}):void 0,[d]),i}const FP=h.forwardRef(DP),Ci=FP;Ci.FormProvider=OP;Ci.Field=rx;Ci.List=MP;Ci.useForm=ox;Ci.useWatch=LP;const sr=h.createContext({});process.env.NODE_ENV!=="production"&&(sr.displayName="FormItemInputContext");const _P=({children:e,status:t,override:n})=>{const r=h.useContext(sr),o=h.useMemo(()=>{const i={...r};return n&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,n,r]);return h.createElement(sr.Provider,{value:o},e)},jP=h.createContext(void 0),Pa=e=>{const{space:t,form:n,children:r}=e;if(!yi(r))return null;let o=r;return n&&(o=b.createElement(_P,{override:!0,status:!0},o)),t&&(o=b.createElement(zR,null,o)),o};function BP(e){return t=>h.createElement(Sr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},h.createElement(e,{...t}))}const HP=(e,t,n,r,o)=>BP(a=>{const{prefixCls:s,style:l}=a,c=h.useRef(null),[u,d]=h.useState(0),[f,p]=h.useState(0),[g,m]=un(!1,a.open),{getPrefixCls:w}=h.useContext(dt),y=w(r,s);h.useEffect(()=>{if(m(!0),typeof ResizeObserver<"u"){const E=new ResizeObserver(v=>{const T=v[0].target;d(T.offsetHeight+8),p(T.offsetWidth)}),C=setInterval(()=>{var R;const v=o?`.${o(y)}`:`.${y}-dropdown`,T=(R=c.current)==null?void 0:R.querySelector(v);T&&(clearInterval(C),E.observe(T))},10);return()=>{clearInterval(C),E.disconnect()}}},[y]);let $={...a,style:{...l,margin:0},open:g,getPopupContainer:()=>c.current};$={...$,[t]:{overflow:{adjustX:!1,adjustY:!1}}};const x={paddingBottom:u,position:"relative",minWidth:f};return h.createElement("div",{ref:c,style:x},h.createElement(e,{...$}))}),Qr=void 0;function VP(e,t){const{prefixCls:n,invalidate:r,item:o,renderItem:i,responsive:a,responsiveDisabled:s,registerSize:l,itemKey:c,className:u,style:d,children:f,display:p,order:g,component:m="div",...w}=e,y=a&&!p;function $(T){l(c,T)}h.useEffect(()=>()=>{$(null)},[]);const x=i&&o!==Qr?i(o,{index:g}):f;let E;r||(E={opacity:y?0:1,height:y?0:Qr,overflowY:y?"hidden":Qr,order:a?g:Qr,pointerEvents:y?"none":Qr,position:y?"absolute":Qr});const C={};y&&(C["aria-hidden"]=!0);let v=h.createElement(m,$t({className:J(!r&&n,u),style:{...E,...d}},C,w,{ref:t}),x);return a&&(v=h.createElement(Io,{onResize:({offsetWidth:T})=>{$(T)},disabled:s},v)),v}const ao=h.forwardRef(VP);process.env.NODE_ENV!=="production"&&(ao.displayName="Item");function WP(e){if(typeof MessageChannel>"u")xt(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function qP(){const e=h.useRef(null);return n=>{e.current||(e.current=[],WP(()=>{po.unstable_batchedUpdates(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(n)}}function Zr(e,t){const[n,r]=h.useState(t),o=Ge(i=>{e(()=>{r(i)})});return[n,o]}const Na=b.createContext(null),XP=(e,t)=>{const n=h.useContext(Na);if(!n){const{component:s="div",...l}=e;return h.createElement(s,$t({},l,{ref:t}))}const{className:r,...o}=n,{className:i,...a}=e;return h.createElement(Na.Provider,{value:null},h.createElement(ao,$t({ref:t,className:J(r,i)},o,a)))},ix=h.forwardRef(XP);process.env.NODE_ENV!=="production"&&(ix.displayName="RawItem");const ax="responsive",sx="invalidate";function UP(e){return`+ ${e.length} ...`}function GP(e,t){const{prefixCls:n="rc-overflow",data:r=[],renderItem:o,renderRawItem:i,itemKey:a,itemWidth:s=10,ssr:l,style:c,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:g,suffix:m,component:w="div",itemComponent:y,onVisibleChange:$,...x}=e,E=l==="full",C=qP(),[v,T]=Zr(C,null),R=v||0,[A,k]=Zr(C,new Map),[N,z]=Zr(C,0),[L,D]=Zr(C,0),[M,O]=Zr(C,0),[F,H]=Zr(C,0),[X,I]=b.useState(null),[Q,Y]=b.useState(null),P=h.useMemo(()=>Q===null&&E?Number.MAX_SAFE_INTEGER:Q||0,[Q,v]),[oe,W]=b.useState(!1),j=`${n}-item`,ne=Math.max(N,L),ee=d===ax,_=r.length&&ee,ae=d===sx,fe=_||typeof d=="number"&&r.length>d,q=b.useMemo(()=>{let de=r;return _?v===null&&E?de=r:de=r.slice(0,Math.min(r.length,R/s)):typeof d=="number"&&(de=r.slice(0,d)),de},[r,s,v,d,_]),ce=b.useMemo(()=>_?r.slice(P+1):r.slice(q.length),[r,q,_,P]),V=b.useCallback((de,re)=>typeof a=="function"?a(de):(a&&(de==null?void 0:de[a]))??re,[a]),le=b.useCallback(o||(de=>de),[o]);function se(de,re,Ce){Q===de&&(re===void 0||re===X)||(Y(de),Ce||(W(de<r.length-1),$==null||$(de)),re!==void 0&&I(re))}function G(de,re){T(re.clientWidth)}function K(de,re){k(Ce=>{const Re=new Map(Ce);return re===null?Re.delete(de):Re.set(de,re),Re})}function we(de,re){D(re),z(L)}function ie(de,re){O(re)}function me(de,re){H(re)}function pe(de){return A.get(V(q[de],de))}Bt(()=>{if(R&&typeof ne=="number"&&q){let de=M+F;const re=q.length,Ce=re-1;if(!re){se(0,null);return}for(let Re=0;Re<re;Re+=1){let Ue=pe(Re);if(E&&(Ue=Ue||0),Ue===void 0){se(Re-1,void 0,!0);break}if(de+=Ue,Ce===0&&de<=R||Re===Ce-1&&de+pe(Ce)<=R){se(Ce,null);break}else if(de+ne>R){se(Re-1,de-Ue-F+L);break}}m&&pe(0)+F>R&&I(null)}},[R,A,L,M,F,V,q]);const Ne=oe&&!!ce.length;let Ee={};X!==null&&_&&(Ee={position:"absolute",top:0,insetInlineStart:X});const Ie={prefixCls:j,responsive:_,component:y,invalidate:ae},B=i?(de,re)=>{const Ce=V(de,re);return h.createElement(Na.Provider,{key:Ce,value:{...Ie,order:re,item:de,itemKey:Ce,registerSize:K,display:re<=P}},i(de,re))}:(de,re)=>{const Ce=V(de,re);return h.createElement(ao,$t({},Ie,{order:re,key:Ce,item:de,renderItem:le,itemKey:Ce,registerSize:K,display:re<=P}))},Z={order:Ne?P:Number.MAX_SAFE_INTEGER,className:`${j}-rest`,registerSize:we,display:Ne},ue=f||UP,xe=p?h.createElement(Na.Provider,{value:{...Ie,...Z}},p(ce)):h.createElement(ao,$t({},Ie,Z),typeof ue=="function"?ue(ce):ue),$e=h.createElement(w,$t({className:J(!ae&&n,u),style:c,ref:t},x),g&&h.createElement(ao,$t({},Ie,{responsive:ee,responsiveDisabled:!_,order:-1,className:`${j}-prefix`,registerSize:ie,display:!0}),g),q.map(B),fe?xe:null,m&&h.createElement(ao,$t({},Ie,{responsive:ee,responsiveDisabled:!_,order:P,className:`${j}-suffix`,registerSize:me,display:!0,style:Ee}),m));return ee?h.createElement(Io,{onResize:G,disabled:!_},$e):$e}const rr=h.forwardRef(GP);rr.Item=ix;rr.RESPONSIVE=ax;rr.INVALIDATE=sx;process.env.NODE_ENV!=="production"&&(rr.displayName="Overflow");const Ma=(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}),nd=(e,t)=>t||e,wo=(e,t,n,r)=>{const o=h.useContext(dt),{variant:i,[e]:a}=o,s=h.useContext(jP),l=r?o[r]:void 0,c=(a==null?void 0:a.variant)??(l==null?void 0:l.variant),u=typeof t<"u"||n===!1||typeof s<"u"||typeof c<"u"||typeof i<"u";let d;typeof t<"u"?d=t:n===!1?d="borderless":d=s??c??i??"outlined";const f=y2.includes(d);return[d,f,u]};var KP={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 Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tc.apply(this,arguments)}const YP=(e,t)=>h.createElement(Jt,Tc({},e,{ref:t,icon:KP})),lx=h.forwardRef(YP);process.env.NODE_ENV!=="production"&&(lx.displayName="SearchOutlined");const cx=e=>{const{children:t,prefixCls:n,id:r,classNames:o,styles:i,className:a,style:s}=e;return h.createElement("div",{id:r,className:J(`${n}-container`,o==null?void 0:o.container,a),style:{...i==null?void 0:i.container,...s},role:"tooltip"},typeof t=="function"?t():t)},Jr={shiftX:64,adjustY:1},eo={adjustX:1,shiftY:!0},$n=[0,0],QP={left:{points:["cr","cl"],overflow:eo,offset:[-4,0],targetOffset:$n},right:{points:["cl","cr"],overflow:eo,offset:[4,0],targetOffset:$n},top:{points:["bc","tc"],overflow:Jr,offset:[0,-4],targetOffset:$n},bottom:{points:["tc","bc"],overflow:Jr,offset:[0,4],targetOffset:$n},topLeft:{points:["bl","tl"],overflow:Jr,offset:[0,-4],targetOffset:$n},leftTop:{points:["tr","tl"],overflow:eo,offset:[-4,0],targetOffset:$n},topRight:{points:["br","tr"],overflow:Jr,offset:[0,-4],targetOffset:$n},rightTop:{points:["tl","tr"],overflow:eo,offset:[4,0],targetOffset:$n},bottomRight:{points:["tr","br"],overflow:Jr,offset:[0,4],targetOffset:$n},rightBottom:{points:["bl","br"],overflow:eo,offset:[4,0],targetOffset:$n},bottomLeft:{points:["tl","bl"],overflow:Jr,offset:[0,4],targetOffset:$n},leftBottom:{points:["br","bl"],overflow:eo,offset:[-4,0],targetOffset:$n}};function Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pc.apply(this,arguments)}const ZP=h.forwardRef((e,t)=>{const{trigger:n=["hover","focus"],mouseEnterDelay:r=0,mouseLeaveDelay:o=.1,prefixCls:i="rc-tooltip",children:a,onVisibleChange:s,afterVisibleChange:l,motion:c,placement:u="right",align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:g,arrowContent:m,overlay:w,id:y,showArrow:$=!0,classNames:x,styles:E,...C}=e,v=Ka(y),T=b.useRef(null);b.useImperativeHandle(t,()=>T.current);const R={...C};"visible"in e&&(R.popupVisible=e.visible);const A=h.useMemo(()=>{if(!$)return!1;const N=$===!0?{}:$;return{...N,className:J(N.className,x==null?void 0:x.arrow),style:{...N.style,...E==null?void 0:E.arrow},content:N.content??m}},[$,x==null?void 0:x.arrow,E==null?void 0:E.arrow,m]),k=({open:N})=>{const z=h.Children.only(a),M={"aria-describedby":[z.props["aria-describedby"],w&&N?v:void 0].filter(Boolean).join(" ")||void 0};return h.cloneElement(z,M)};return h.createElement(Yu,Pc({popupClassName:x==null?void 0:x.root,prefixCls:i,popup:h.createElement(cx,{key:"content",prefixCls:i,id:v,classNames:x,styles:E},w),action:n,builtinPlacements:QP,popupPlacement:u,ref:T,popupAlign:d,getPopupContainer:g,onOpenChange:s,afterOpenChange:l,popupMotion:c,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:o,popupStyle:E==null?void 0:E.root,mouseEnterDelay:r,arrow:A,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:E==null?void 0:E.uniqueContainer},R),k)});function ux(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=0,a=o,s=r*1/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,f=u,p=2*o-s,g=l,m=2*o-i,w=a,y=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),$=r*(Math.sqrt(2)-1),x=`polygon(${$}px 100%, 50% ${$}px, ${2*o-$}px 100%, ${$}px 100%)`,E=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${p} ${g} A ${r} ${r} 0 0 0 ${m} ${w} Z')`;return{arrowShadowWidth:y,arrowPath:E,arrowPolygon:x}}const JP=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e,c={content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${ye(s)} 0`},transform:"translateY(50%) rotate(-135deg)",zIndex:0,background:"transparent"};return n&&(c.boxShadow=n),{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":c}},dx=8;function rd(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?dx:r}}const fx=(e,t,n)=>{const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a,antCls:s}=e,[l]=ur(s,"tooltip"),{arrowDistance:c=0,arrowShadow:u=!0}=n||{};return{[r]:{[`${r}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...JP(e,t,u?o:!1),"&:before":{background:t}}],[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:c,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[l("arrow-offset-x")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{[l("arrow-offset-x")]:`calc(100% - ${ye(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}},[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:c,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[l("arrow-offset-x")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{[l("arrow-offset-x")]:`calc(100% - ${ye(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}},[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:c},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:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i},[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:c},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:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}}};function eN(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=rn(r)?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const a={...i,...o};return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Vp={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"]}},tN={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"]}},nN=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function px(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,l={},c=rd({contentRadius:i,limitVerticalRadius:!0});return Object.keys(Vp).forEach(u=>{const f={...r&&tN[u]||Vp[u],offset:[0,0],dynamicInset:!0};switch(l[u]=f,nN.has(u)&&(f.autoArrow=!1),u){case"top":case"topLeft":case"topRight":f.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+o;break}if(r)switch(u){case"topLeft":case"bottomLeft":f.offset[0]=-c.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=c.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-c.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=c.arrowOffsetHorizontal*2-s;break}f.overflow=eN(u,c,t,n),a&&(f.htmlRegion="visibleFirst")}),l}const rN=b.createContext(!1),oN=(e,t)=>{const n=r=>typeof r=="boolean"?{show:r}:r||{};return b.useMemo(()=>{const r=n(e),o=n(t);return{...o,...r,show:r.show??o.show??!0}},[e,t])},Wp="50%",iN=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,dropShadowPopover:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:g}=e,[m,w]=ur(g,"tooltip"),y=t(a).add(p).add(f).equal(),x={minWidth:t(a).mul(2).add(p).equal(),minHeight:l,padding:`${ye(e.calc(u).div(2).equal())} ${ye(d)}`,color:w("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxSizing:"border-box"},E={[m("valid-offset-x")]:w("arrow-offset-x","var(--arrow-x)"),transformOrigin:[w("valid-offset-x",Wp),`var(--arrow-y, ${Wp})`].join(" ")};return[{[n]:{...Ro(e),position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible",filter:c,...E,"&-hidden":{display:"none"},[m("arrow-background-color")]:i,[`${n}-container`]:[x,VR(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:"none",background:"transparent"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:y},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,dx)}},[`${n}-content`]:{position:"relative"},...cI(e,(C,{darkColor:v})=>({[`&${n}-${C}`]:{[`${n}-container`]:{backgroundColor:v},[`${n}-arrow`]:{[m("arrow-background-color")]:v}}})),"&-rtl":{direction:"rtl"}}},fx(e,w("arrow-background-color"),{arrowShadow:!1}),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...x,...E,position:"absolute",zIndex:t(s).sub(1).equal(),filter:c,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},aN=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...rd({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...ux(yt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),mx=(e,t,n=!0)=>on("Tooltip",o=>{const{borderRadius:i,colorTextLightSolid:a,colorBgSpotlight:s,maxWidth:l}=o,c=yt(o,{tooltipMaxWidth:l,tooltipColor:a,tooltipBorderRadius:i,tooltipBg:s});return[iN(c),Ju(o,"zoom-big-fast")]},aN,{resetStyle:!1,injectStyle:n})(e,t),sN=xr.map(e=>`${e}-inverse`);function lN(e,t=!0){return t?[].concat(jr(sN),jr(xr)).includes(e):xr.includes(e)}const hx=(e,t,n)=>{const r=lN(n),[o]=ur(e,"tooltip"),i=J({[`${t}-${n}`]:n&&r}),a={},s={},l=TT(n).toRgb(),u=(.299*l.r+.587*l.g+.114*l.b)/255<.5?"#FFF":"#000";return n&&!r&&(a.background=n,a[o("overlay-color")]=u,s[o("arrow-background-color")]=n),{className:i,overlayStyle:a,arrowStyle:s}},cN=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a,classNames:s,styles:l}=e,{getPrefixCls:c}=h.useContext(dt),u=c("tooltip",t),d=c(),f=To(u),[p,g]=mx(u,f),m=hx(d,u,i),w=m.arrowStyle,y=h.useMemo(()=>({container:{...a,...m.overlayStyle}}),[a,m.overlayStyle]),$={...e,placement:r},[x,E]=Tn([s],[y,l],{props:$}),C=J(f,p,g,u,`${u}-pure`,`${u}-placement-${r}`,n,m.className);return h.createElement("div",{className:C,style:w},h.createElement("div",{className:`${u}-arrow`}),h.createElement(cx,{...e,className:p,prefixCls:u,classNames:x,styles:E},o))},uN=h.forwardRef((e,t)=>{const{prefixCls:n,openClassName:r,getTooltipContainer:o,color:i,children:a,afterOpenChange:s,arrow:l,destroyTooltipOnHide:c,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:g,autoAdjustOverflow:m=!0,motion:w,getPopupContainer:y,placement:$="top",mouseEnterDelay:x,mouseLeaveDelay:E,rootClassName:C,styles:v,classNames:T,onOpenChange:R,overlayInnerStyle:A,overlayStyle:k,overlayClassName:N,...z}=e,[,L]=Cr(),D=e["data-popover-inject"],{getPopupContainer:M,getPrefixCls:O,direction:F,...H}=Kn("tooltip"),{className:X,style:I,classNames:Q,styles:Y,arrow:P,trigger:oe,mouseEnterDelay:W,mouseLeaveDelay:j}=D?{}:H,ne=x??W??.1,ee=E??j??.1,_=oN(l,P),ae=_.show,fe=p||oe||"hover",q=y||M,ce=u??!!c,V=h.useContext(rN),le=At("Tooltip"),se=h.useRef(null),G=()=>{var _e;(_e=se.current)==null||_e.forceAlign()};h.useImperativeHandle(t,()=>{var _e,pt;return{forceAlign:G,nativeElement:(_e=se.current)==null?void 0:_e.nativeElement,popupElement:(pt=se.current)==null?void 0:pt.popupElement}}),process.env.NODE_ENV!=="production"&&([["overlayStyle","styles.root"],["overlayInnerStyle","styles.container"],["overlayClassName","classNames.root"],["destroyTooltipOnHide","destroyOnHidden"]].forEach(([_e,pt])=>{le.deprecated(!(_e in e),_e,pt)}),process.env.NODE_ENV!=="production"&&le(!c||typeof c=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."));const[K,we]=un(e.defaultOpen??!1,e.open),ie=!d&&!f&&d!==0,me=_e=>{we(ie?!1:_e),!ie&&R&&R(_e)},pe=h.useMemo(()=>g||px({arrowPointAtCenter:(_==null?void 0:_.pointAtCenter)??!1,autoAdjustOverflow:m,arrowWidth:ae?L.sizePopupArrow:0,borderRadius:L.borderRadius,offset:L.marginXXS,visibleFirst:!0}),[_,g,L,ae,m]),Ne=h.useMemo(()=>d===0?d:f||d||"",[f,d]),Ee=h.createElement(Pa,{space:!0,form:!0},Qt(Ne)?Ne():Ne),Ie={...e,trigger:fe,builtinPlacements:pe,getPopupContainer:q,destroyOnHidden:ce,mouseEnterDelay:ne,mouseLeaveDelay:ee},B=kt(I),Z=kt(k),[ue,xe]=Tn([Q,T],[Y,B,v,Z],{props:Ie}),$e=O("tooltip",n),de=O();let re=K;(!("open"in e)&&ie||V)&&(re=!1);const Ce=h.isValidElement(a)&&!Eb(a)?a:h.createElement("span",null,a),Re=Ce.props,Ue=!Re.className||typeof Re.className=="string"?J(Re.className,r||`${$e}-open`):Re.className,Te=To($e),[ze,Me]=mx($e,Te,!D),it=hx(de,$e,i),Ye=it.arrowStyle,It=J(Te,ze,Me),wt=J(N,{[`${$e}-rtl`]:F==="rtl"},it.className,C,It,X,ue.root),[Ot,ht]=Zu("Tooltip",z.zIndex),_t={...xe.container,...A,...it.overlayStyle},jt=h.createElement(ZP,{unique:!0,...z,zIndex:Ot,showArrow:ae,placement:$,mouseEnterDelay:ne,mouseLeaveDelay:ee,prefixCls:$e,classNames:{root:wt,container:ue.container,arrow:ue.arrow,uniqueContainer:J(It,ue.container)},styles:{root:{...Ye,...xe.root},container:_t,uniqueContainer:_t,arrow:xe.arrow},ref:se,overlay:Ee,visible:re,onVisibleChange:me,afterVisibleChange:s,arrowContent:h.createElement("span",{className:`${$e}-arrow-content`}),motion:{motionName:$R(de,"zoom-big-fast",typeof(w==null?void 0:w.motionName)=="string"?w==null?void 0:w.motionName:void 0),motionDeadline:1e3},trigger:fe,builtinPlacements:pe,getTooltipContainer:q,destroyOnHidden:ce},re&&!z.disabled?Dn(Ce,{className:Ue}):Ce);return h.createElement(as.Provider,{value:ht},jt)}),Si=uN;process.env.NODE_ENV!=="production"&&(Si.displayName="Tooltip");Si._InternalPanelDoNotUseOrYouWillBeFired=cN;Si.UniqueProvider=$b;var dN={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 Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nc.apply(this,arguments)}const fN=(e,t)=>h.createElement(Jt,Nc({},e,{ref:t,icon:dN})),Aa=h.forwardRef(fN);process.env.NODE_ENV!=="production"&&(Aa.displayName="LeftOutlined");const{ESC:pN,TAB:mN}=Iu;function hN({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:o}){const i=h.useRef(!1),a=()=>{var c,u;e&&((u=(c=t.current)==null?void 0:c.focus)==null||u.call(c),n==null||n(!1))},s=()=>{var c;return(c=o.current)!=null&&c.focus?(o.current.focus(),i.current=!0,!0):!1},l=c=>{switch(c.keyCode){case pN:a();break;case mN:{let u=!1;i.current||(u=s()),u?c.preventDefault():a();break}}};h.useEffect(()=>e?(window.addEventListener("keydown",l),r&&xt(s,3),()=>{window.removeEventListener("keydown",l),i.current=!1}):()=>{i.current=!1},[e])}const gN=b.forwardRef((e,t)=>{const{overlay:n,arrow:r,prefixCls:o}=e,i=b.useMemo(()=>{let s;return typeof n=="function"?s=n():s=n,s},[n]),a=Gn(t,cr(i));return b.createElement(b.Fragment,null,r&&b.createElement("div",{className:`${o}-arrow`}),b.cloneElement(i,{ref:$o(i)?a:void 0}))}),to={adjustX:1,adjustY:1},no=[0,0],bN={topLeft:{points:["bl","tl"],overflow:to,offset:[0,-4],targetOffset:no},top:{points:["bc","tc"],overflow:to,offset:[0,-4],targetOffset:no},topRight:{points:["br","tr"],overflow:to,offset:[0,-4],targetOffset:no},bottomLeft:{points:["tl","bl"],overflow:to,offset:[0,4],targetOffset:no},bottom:{points:["tc","bc"],overflow:to,offset:[0,4],targetOffset:no},bottomRight:{points:["tr","br"],overflow:to,offset:[0,4],targetOffset:no}};function Mc(){return Mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mc.apply(this,arguments)}const xN=b.forwardRef((e,t)=>{var oe;const{arrow:n=!1,prefixCls:r="rc-dropdown",transitionName:o,animation:i,align:a,placement:s="bottomLeft",placements:l=bN,getPopupContainer:c,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:g,trigger:m=["hover"],autoFocus:w,overlay:y,children:$,onVisibleChange:x,disabled:E,...C}=e,[v,T]=b.useState(),R="visible"in e?g:v,A=i?`${r}-${i}`:o,k=b.useRef(null),N=b.useRef(null),z=b.useRef(null);b.useImperativeHandle(t,()=>k.current);const L=W=>{T(W),x==null||x(W)};hN({visible:R,triggerRef:z,onVisibleChange:L,autoFocus:w,overlayRef:N});const D=W=>{const{onOverlayClick:j}=e;T(!1),j&&j(W)},M=()=>b.createElement(gN,{ref:N,overlay:y,prefixCls:r,arrow:n}),O=()=>typeof y=="function"?M:M(),F=()=>{const{minOverlayWidthMatchTrigger:W,alignPoint:j}=e;return"minOverlayWidthMatchTrigger"in e?W:!j},H=()=>{const{openClassName:W}=e;return W!==void 0?W:`${r}-open`},X=$,I=J((oe=X.props)==null?void 0:oe.className,R&&H()),Q={className:I,ref:Gn(z,cr(X))},Y=$o(X)?b.cloneElement(X,Q):b.createElement("span",{className:I,ref:z},b.cloneElement(X,{className:I}));let P=d;return!P&&m.indexOf("contextMenu")!==-1&&(P=["click"]),b.createElement(Yu,Mc({builtinPlacements:l},C,{prefixCls:r,ref:k,popupClassName:J(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:m,showAction:u,hideAction:P,popupPlacement:s,popupAlign:a,popupMotion:{motionName:A},popupVisible:R,stretch:F()?"minWidth":"",popup:O(),onOpenChange:L,onPopupClick:D,getPopupContainer:c}),Y)}),gx=h.createContext(null);function bx(e,t){return`${e}-${t}`}function xx(e){const t=h.useContext(gx);return bx(t,e)}const Ln=h.createContext(null);function yN(e,t){const n={...e};return Object.keys(t).forEach(r=>{const o=t[r];o!==void 0&&(n[r]=o)}),n}function fi({children:e,locked:t,...n}){const r=h.useContext(Ln),o=Ya(()=>yN(r,n),[r,n],(i,a)=>!t&&(i[0]!==a[0]||!ai(i[1],a[1],!0)));return h.createElement(Ln.Provider,{value:o},e)}const wN=[],yx=h.createContext(null);function cs(){return h.useContext(yx)}const wx=h.createContext(wN);function Mo(e){const t=h.useContext(wx);return h.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const vx=h.createContext(null),od=h.createContext({}),{LEFT:Ac,RIGHT:zc,UP:Oc,DOWN:ua,ENTER:da,ESC:Cx,HOME:Ho,END:Vo}=Iu,qp=[Oc,ua,Ac,zc];function vN(e,t,n,r){var p;const o="prev",i="next",a="children",s="parent";if(e==="inline"&&r===da)return{inlineTrigger:!0};const l={[Oc]:o,[ua]:i},c={[Ac]:n?i:o,[zc]:n?o:i,[ua]:a,[da]:a},u={[Oc]:o,[ua]:i,[da]:a,[Cx]:s,[Ac]:n?a:s,[zc]:n?s:a};switch((p={inline:l,horizontal:c,vertical:u,inlineSub:l,horizontalSub:u,verticalSub:u}[`${e}${t?"":"Sub"}`])==null?void 0:p[r]){case o:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case a:return{offset:1,sibling:!1};default:return null}}function CN(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function SN(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function id(e,t){return $$(e,!0).filter(r=>t.has(r))}function Xp(e,t,n,r=1){if(!e)return null;const o=id(e,t),i=o.length;let a=o.findIndex(s=>n===s);return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}const za=(e,t)=>{const n=new Set,r=new Map,o=new Map;return e.forEach(i=>{const a=document.querySelector(`[data-menu-id='${bx(t,i)}']`);a&&(n.add(a),o.set(a,i),r.set(i,a))}),{elements:n,key2element:r,element2key:o}};function EN(e,t,n,r,o,i,a,s,l,c){const u=h.useRef(void 0),d=h.useRef(void 0);d.current=t;const f=()=>{xt.cancel(u.current)};return h.useEffect(()=>()=>{f()},[]),p=>{const{which:g}=p;if([...qp,da,Cx,Ho,Vo].includes(g)){const m=i();let w=za(m,r);const{elements:y,key2element:$,element2key:x}=w,E=$.get(t),C=SN(E,y),v=x.get(C),T=vN(e,a(v,!0).length===1,n,g);if(!T&&g!==Ho&&g!==Vo)return;(qp.includes(g)||[Ho,Vo].includes(g))&&p.preventDefault();const R=A=>{if(A){let k=A;const N=A.querySelector("a");N!=null&&N.getAttribute("href")&&(k=N);const z=x.get(A);s(z),f(),u.current=xt(()=>{d.current===z&&k.focus()})}};if([Ho,Vo].includes(g)||T.sibling||!C){let A;!C||e==="inline"?A=o.current:A=CN(C);let k;const N=id(A,y);g===Ho?k=N[0]:g===Vo?k=N[N.length-1]:k=Xp(A,y,C,T.offset),R(k)}else if(T.inlineTrigger)l(v);else if(T.offset>0)l(v,!0),f(),u.current=xt(()=>{w=za(m,r);const A=C.getAttribute("aria-controls"),k=document.getElementById(A),N=Xp(k,w.elements);R(N)},5);else if(T.offset<0){const A=a(v,!0),k=A[A.length-2],N=$.get(k);l(k,!1),R(N)}}c==null||c(p)}}function $N(e){Promise.resolve().then(e)}const ad="__RC_UTIL_PATH_SPLIT__",Up=e=>e.join(ad),kN=e=>e.split(ad),Dc="rc-menu-more";function IN(){const[,e]=h.useState({}),t=b.useRef(new Map),n=b.useRef(new Map),[r,o]=h.useState([]),i=b.useRef(0),a=b.useRef(!1),s=()=>{a.current||e({})},l=b.useCallback((m,w)=>{process.env.NODE_ENV!=="production"&&tt(!t.current.has(m),`Duplicated key '${m}' used in Menu by path [${w.join(" > ")}]`);const y=Up(w);n.current.set(y,m),t.current.set(m,y),i.current+=1;const $=i.current;$N(()=>{$===i.current&&s()})},[]),c=b.useCallback((m,w)=>{const y=Up(w);n.current.delete(y),t.current.delete(m)},[]),u=b.useCallback(m=>{o(m)},[]),d=b.useCallback((m,w)=>{const y=t.current.get(m)||"",$=kN(y);return w&&r.includes($[0])&&$.unshift(Dc),$},[r]),f=b.useCallback((m,w)=>m.filter(y=>y!==void 0).some(y=>d(y,!0).includes(w)),[d]),p=()=>{const m=[...t.current.keys()];return r.length&&m.push(Dc),m},g=b.useCallback(m=>{const w=`${t.current.get(m)}${ad}`,y=new Set;return[...n.current.keys()].forEach($=>{$.startsWith(w)&&y.add(n.current.get($))}),y},[]);return h.useEffect(()=>()=>{a.current=!0},[]),{registerPath:l,unregisterPath:c,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:g}}function Ko(e){const t=h.useRef(e);t.current=e;const n=h.useCallback((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[]);return e?n:void 0}function Sx(e,t,n,r){const{activeKey:o,onActive:i,onInactive:a}=h.useContext(Ln),s={active:o===e};return t||(s.onMouseEnter=l=>{n==null||n({key:e,domEvent:l}),i(e)},s.onMouseLeave=l=>{r==null||r({key:e,domEvent:l}),a(e)}),s}function Ex(e){const{mode:t,rtl:n,inlineIndent:r}=h.useContext(Ln);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function $x({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e=="function"?r=h.createElement(e,{...t}):typeof e!="boolean"&&(r=e),r||n||null)}function Oa({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(tt(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pi.apply(this,arguments)}class RN extends h.Component{render(){const{title:t,attribute:n,elementRef:r,...o}=this.props,i=Yt(o,["eventKey","popupClassName","popupOffset","onTitleClick"]);return tt(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),h.createElement(rr.Item,pi({},n,{title:typeof t=="string"?t:void 0},i,{ref:r}))}}const TN=h.forwardRef((e,t)=>{const{style:n,className:r,eventKey:o,warnKey:i,disabled:a,itemIcon:s,children:l,itemData:c,role:u,onMouseEnter:d,onMouseLeave:f,onClick:p,onKeyDown:g,onFocus:m,...w}=e,y=xx(o),{prefixCls:$,onItemClick:x,disabled:E,overflowDisabled:C,itemIcon:v,selectedKeys:T,onActive:R}=h.useContext(Ln),{_internalRenderMenuItem:A}=h.useContext(od),k=`${$}-item`,N=h.useRef(null),z=h.useRef(null),L=E||a,D=Hr(t,z),M=Mo(o);process.env.NODE_ENV!=="production"&&i&&tt(!1,"MenuItem should not leave undefined `key`.");const O=ne=>{const ee=c||{key:o||"",label:l,itemIcon:s,extra:e.extra,title:e.title};return{key:o,keyPath:[...M].reverse(),item:N.current,domEvent:ne,itemData:c||ee}},F=s||v,{active:H,...X}=Sx(o,L,d,f),I=T.includes(o),Q=Ex(M.length),Y=ne=>{if(L)return;const ee=O(ne);p==null||p(Oa(ee)),x(ee)},P=ne=>{if(g==null||g(ne),ne.which===Iu.ENTER){const ee=O(ne);p==null||p(Oa(ee)),x(ee)}},oe=ne=>{R(o),m==null||m(ne)},W={};e.role==="option"&&(W["aria-selected"]=I);let j=h.createElement(RN,pi({ref:N,elementRef:D,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":C&&y?null:y},Yt(w,["extra"]),X,W,{component:"li","aria-disabled":a,style:{...Q,...n},className:J(k,{[`${k}-active`]:H,[`${k}-selected`]:I,[`${k}-disabled`]:L},r),onClick:Y,onKeyDown:P,onFocus:oe}),l,h.createElement($x,{props:{...e,isSelected:I},icon:F}));return A&&(j=A(j,e,{selected:I})),j});function PN(e,t){const{eventKey:n}=e,r=cs(),o=Mo(n);return h.useEffect(()=>{if(r)return r.registerPath(n,o),()=>{r.unregisterPath(n,o)}},[o]),r?null:h.createElement(TN,pi({},e,{ref:t}))}const us=h.forwardRef(PN);function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lc.apply(this,arguments)}const NN=({className:e,children:t,...n},r)=>{const{prefixCls:o,mode:i,rtl:a}=h.useContext(Ln);return h.createElement("ul",Lc({className:J(o,a&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":!0,ref:r}),t)},sd=h.forwardRef(NN);process.env.NODE_ENV!=="production"&&(sd.displayName="SubMenuList");function ld(e,t){return or(e).map((n,r)=>{var o;if(h.isValidElement(n)){const{key:i}=n;let a=((o=n.props)==null?void 0:o.eventKey)??i;const s=a==null;s&&(a=`tmp_key-${[...t,r].join("-")}`);const l={key:a,eventKey:a};return process.env.NODE_ENV!=="production"&&s&&(l.warnKey=!0),h.cloneElement(n,l)}return n})}const Xt={adjustX:1,adjustY:1},MN={topLeft:{points:["bl","tl"],overflow:Xt},topRight:{points:["br","tr"],overflow:Xt},bottomLeft:{points:["tl","bl"],overflow:Xt},bottomRight:{points:["tr","br"],overflow:Xt},leftTop:{points:["tr","tl"],overflow:Xt},leftBottom:{points:["br","bl"],overflow:Xt},rightTop:{points:["tl","tr"],overflow:Xt},rightBottom:{points:["bl","br"],overflow:Xt}},AN={topLeft:{points:["bl","tl"],overflow:Xt},topRight:{points:["br","tr"],overflow:Xt},bottomLeft:{points:["tl","bl"],overflow:Xt},bottomRight:{points:["tr","br"],overflow:Xt},rightTop:{points:["tr","tl"],overflow:Xt},rightBottom:{points:["br","bl"],overflow:Xt},leftTop:{points:["tl","tr"],overflow:Xt},leftBottom:{points:["bl","br"],overflow:Xt}};function kx(e,t,n){if(t)return t;if(n)return n[e]||n.other}const zN={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function ON({prefixCls:e,visible:t,children:n,popup:r,popupStyle:o,popupClassName:i,popupOffset:a,disabled:s,mode:l,onVisibleChange:c}){const{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:g,triggerSubMenuAction:m,forceSubMenuRender:w,rootClassName:y,motion:$,defaultMotions:x}=h.useContext(Ln),[E,C]=h.useState(!1),v=d?{...AN,...g}:{...MN,...g},T=zN[l],R=kx(l,$,x),A=h.useRef(R);l!=="inline"&&(A.current=R);const k={...A.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},N=h.useRef(void 0);return h.useEffect(()=>(N.current=xt(()=>{C(t)}),()=>{xt.cancel(N.current)}),[t]),h.createElement(Yu,{prefixCls:e,popupClassName:J(`${e}-popup`,{[`${e}-rtl`]:d},i,y),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:u,builtinPlacements:v,popupPlacement:T,popupVisible:E,popup:r,popupStyle:o,popupAlign:a&&{offset:a},action:s?[]:[m],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:c,forceRender:w,popupMotion:k,fresh:!0},n)}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fc.apply(this,arguments)}function DN({id:e,open:t,keyPath:n,children:r}){const o="inline",{prefixCls:i,forceSubMenuRender:a,motion:s,defaultMotions:l,mode:c}=h.useContext(Ln),u=h.useRef(!1);u.current=c===o;const[d,f]=h.useState(!u.current),p=u.current?t:!1;h.useEffect(()=>{u.current&&f(!1)},[c]);const g={...kx(o,s,l)};n.length>1&&(g.motionAppear=!1);const m=g.onVisibleChanged;return g.onVisibleChanged=w=>(!u.current&&!w&&f(!0),m==null?void 0:m(w)),d?null:h.createElement(fi,{mode:o,locked:!u.current},h.createElement(vr,Fc({visible:p},g,{forceRender:a,removeOnLeave:!1,leavedClassName:`${i}-hidden`}),({className:w,style:y})=>h.createElement(sd,{id:e,className:w,style:y},r)))}function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mi.apply(this,arguments)}const LN=h.forwardRef((e,t)=>{const{style:n,className:r,styles:o,classNames:i,title:a,itemTitle:s,eventKey:l,warnKey:c,disabled:u,internalPopupClose:d,children:f,itemIcon:p,expandIcon:g,popupClassName:m,popupOffset:w,popupStyle:y,onClick:$,onMouseEnter:x,onMouseLeave:E,onTitleClick:C,onTitleMouseEnter:v,onTitleMouseLeave:T,popupRender:R,...A}=e,k=xx(l),{prefixCls:N,mode:z,openKeys:L,disabled:D,overflowDisabled:M,activeKey:O,selectedKeys:F,itemIcon:H,expandIcon:X,onItemClick:I,onOpenChange:Q,onActive:Y,popupRender:P}=h.useContext(Ln),{_internalRenderSubMenuItem:oe}=h.useContext(od),{isSubPathKey:W}=h.useContext(vx),j=Mo(),ne=`${N}-submenu`,ee=D||u,_=h.useRef(null),ae=h.useRef(null);process.env.NODE_ENV!=="production"&&c&&tt(!1,"SubMenu should not leave undefined `key`.");const fe=p??H,q=g??X,ce=L.includes(l),V=!M&&ce,le=W(F,l),{active:se,...G}=Sx(l,ee,v,T),[K,we]=h.useState(!1),ie=Te=>{ee||we(Te)},me=Te=>{ie(!0),x==null||x({key:l,domEvent:Te})},pe=Te=>{ie(!1),E==null||E({key:l,domEvent:Te})},Ne=h.useMemo(()=>se||(z!=="inline"?K||W([O],l):!1),[z,se,O,K,l,W]),Ee=Ex(j.length),Ie=Te=>{ee||(C==null||C({key:l,domEvent:Te}),z==="inline"&&Q(l,!ce))},B=Ko(Te=>{$==null||$(Oa(Te)),I(Te)}),Z=Te=>{z!=="inline"&&Q(l,Te)},ue=()=>{Y(l)},xe=k&&`${k}-popup`,$e=h.useMemo(()=>h.createElement($x,{icon:z!=="horizontal"?q:void 0,props:{...e,isOpen:V,isSubMenu:!0}},h.createElement("i",{className:`${ne}-arrow`})),[z,q,e,V,ne]);let de=h.createElement("div",mi({role:"menuitem",style:Ee,className:`${ne}-title`,tabIndex:ee?null:-1,ref:_,title:s??(typeof a=="string"?a:null),"data-menu-id":M&&k?null:k,"aria-expanded":V,"aria-haspopup":!0,"aria-controls":xe,"aria-disabled":ee,onClick:Ie,onFocus:ue},G),a,$e);const re=h.useRef(z);z!=="inline"&&j.length>1?re.current="vertical":re.current=z;const Ce=re.current,Re=h.useMemo(()=>{const Te=h.createElement(fi,{classNames:i,styles:o,mode:Ce==="horizontal"?"vertical":Ce},h.createElement(sd,{id:xe,ref:ae},f)),ze=R||P;return ze?ze(Te,{item:e,keys:j}):Te},[R,P,j,xe,f,e,Ce]);if(!M){const Te=re.current;de=h.createElement(ON,{mode:Te,prefixCls:ne,visible:!d&&V&&z!=="inline",popupClassName:m,popupOffset:w,popupStyle:y,popup:Re,disabled:ee,onVisibleChange:Z},de)}let Ue=h.createElement(rr.Item,mi({ref:t,role:"none"},A,{component:"li",style:n,className:J(ne,`${ne}-${z}`,r,{[`${ne}-open`]:V,[`${ne}-active`]:Ne,[`${ne}-selected`]:le,[`${ne}-disabled`]:ee}),onMouseEnter:me,onMouseLeave:pe}),de,!M&&h.createElement(DN,{id:xe,open:V,keyPath:j},f));return oe&&(Ue=oe(Ue,e,{selected:le,active:Ne,open:V,disabled:ee})),h.createElement(fi,{classNames:i,styles:o,onItemClick:B,mode:z==="horizontal"?"vertical":z,itemIcon:fe,expandIcon:q},Ue)}),Ei=h.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=Mo(n),i=ld(r,o),a=cs();h.useEffect(()=>{if(a)return a.registerPath(n,o),()=>{a.unregisterPath(n,o)}},[o]);let s;return a?s=i:s=h.createElement(LN,mi({ref:t},e),i),h.createElement(wx.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Ei.displayName="SubMenu");function cd({className:e,style:t}){const{prefixCls:n}=h.useContext(Ln);return cs()?null:h.createElement("li",{role:"separator",className:J(`${n}-item-divider`,e),style:t})}function Da(){return Da=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Da.apply(this,arguments)}const FN=h.forwardRef((e,t)=>{const{className:n,title:r,eventKey:o,children:i,...a}=e,{prefixCls:s,classNames:l,styles:c}=h.useContext(Ln),u=`${s}-item-group`;return h.createElement("li",Da({ref:t,role:"presentation"},a,{onClick:d=>d.stopPropagation(),className:J(u,n)}),h.createElement("div",{role:"presentation",className:J(`${u}-title`,l==null?void 0:l.listTitle),style:c==null?void 0:c.listTitle,title:typeof r=="string"?r:void 0},r),h.createElement("ul",{role:"group",className:J(`${u}-list`,l==null?void 0:l.list),style:c==null?void 0:c.list},i))}),ds=h.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=Mo(n),i=ld(r,o);return cs()?i:h.createElement(FN,Da({ref:t},Yt(e,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(ds.displayName="MenuItemGroup");function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(this,arguments)}function _c(e,t,n){const{item:r,group:o,submenu:i,divider:a}=t;return(e||[]).map((s,l)=>{if(s&&typeof s=="object"){const{label:c,children:u,key:d,type:f,extra:p,...g}=s,m=d??`tmp-${l}`;if(u||f==="group"){if(f==="group")return h.createElement(o,so({key:m},g,{title:c}),_c(u,t,n));const{title:y,...$}=g;return h.createElement(i,so({key:m},$,{title:c,itemTitle:typeof y=="string"?y:void 0}),_c(u,t,n))}if(f==="divider")return h.createElement(a,so({key:m},g));const w=!!p||p===0;return h.createElement(r,so({key:m},g,{extra:p,itemData:{...s,key:m}}),w?h.createElement(h.Fragment,null,h.createElement("span",{className:`${n}-item-label`},c),h.createElement("span",{className:`${n}-item-extra`},p)):c)}return null}).filter(s=>s)}function Gp(e,t,n,r,o){let i=e;const a={divider:cd,item:us,group:ds,submenu:Ei,...r};return t&&(i=_c(t,a,o)),ld(i,n)}function jc(){return jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jc.apply(this,arguments)}const Rr=[],_N=h.forwardRef((e,t)=>{var vt;const{prefixCls:n="rc-menu",rootClassName:r,style:o,className:i,styles:a,classNames:s,tabIndex:l=0,items:c,children:u,direction:d,id:f,mode:p="vertical",inlineCollapsed:g,disabled:m,disabledOverflow:w,subMenuOpenDelay:y=.1,subMenuCloseDelay:$=.1,forceSubMenuRender:x,defaultOpenKeys:E,openKeys:C,activeKey:v,defaultActiveFirst:T,selectable:R=!0,multiple:A=!1,defaultSelectedKeys:k,selectedKeys:N,onSelect:z,onDeselect:L,inlineIndent:D=24,motion:M,defaultMotions:O,triggerSubMenuAction:F="hover",builtinPlacements:H,itemIcon:X,expandIcon:I,overflowedIndicator:Q="...",overflowedIndicatorPopupClassName:Y,getPopupContainer:P,onClick:oe,onOpenChange:W,onKeyDown:j,openAnimation:ne,openTransitionName:ee,_internalRenderMenuItem:_,_internalRenderSubMenuItem:ae,_internalComponents:fe,popupRender:q,...ce}=e,[V,le]=h.useMemo(()=>[Gp(u,c,Rr,fe,n),Gp(u,c,Rr,{},n)],[u,c,fe]),[se,G]=h.useState(!1),K=h.useRef(null),we=Ka(),ie=f??`rc-menu-uuid-${we}`,me=d==="rtl";process.env.NODE_ENV!=="production"&&tt(!ne&&!ee,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");const[pe,Ne]=un(E,C),Ee=pe||Rr,Ie=(Oe,Qe=!1)=>{function st(){Ne(Oe),W==null||W(Oe)}Qe?po.flushSync(st):st()},[B,Z]=h.useState(Ee),ue=h.useRef(!1),[xe,$e]=h.useMemo(()=>(p==="inline"||p==="vertical")&&g?["vertical",g]:[p,!1],[p,g]),de=xe==="inline",[re,Ce]=h.useState(xe),[Re,Ue]=h.useState($e);h.useEffect(()=>{Ce(xe),Ue($e),ue.current&&(de?Ne(B):Ie(Rr))},[xe,$e]);const[Te,ze]=h.useState(0),Me=Te>=V.length-1||re!=="horizontal"||w;h.useEffect(()=>{de&&Z(Ee)},[Ee]),h.useEffect(()=>(ue.current=!0,()=>{ue.current=!1}),[]);const{registerPath:it,unregisterPath:Ye,refreshOverflowKeys:It,isSubPathKey:wt,getKeyPath:Ot,getKeys:ht,getSubPathKeys:_t}=IN(),jt=h.useMemo(()=>({registerPath:it,unregisterPath:Ye}),[it,Ye]),_e=h.useMemo(()=>({isSubPathKey:wt}),[wt]);h.useEffect(()=>{It(Me?Rr:V.slice(Te+1).map(Oe=>Oe.key))},[Te,Me]);const[pt,Cn]=un(v||T&&((vt=V[0])==null?void 0:vt.key),v),jn=Ko(Oe=>{Cn(Oe)}),Bn=Ko(()=>{Cn(void 0)});b.useImperativeHandle(t,()=>({list:K.current,focus:Oe=>{var Pe,ke;const Qe=ht(),{elements:st,key2element:Be,element2key:U}=za(Qe,ie),be=id(K.current,st);let he;pt&&Qe.includes(pt)?he=pt:he=be[0]?U.get(be[0]):(Pe=V.find(Fe=>!Fe.props.disabled))==null?void 0:Pe.key;const ve=Be.get(he);he&&ve&&((ke=ve==null?void 0:ve.focus)==null||ke.call(ve,Oe))},findItem:({key:Oe})=>{const Qe=ht(),{key2element:st}=za(Qe,ie);return st.get(Oe)||null}}));const[Rt,Sn]=un(k||[],N),Ht=h.useMemo(()=>Array.isArray(Rt)?Rt:Rt==null?Rr:[Rt],[Rt]),an=Oe=>{if(R){const{key:Qe}=Oe,st=Ht.includes(Qe);let Be;A?st?Be=Ht.filter(be=>be!==Qe):Be=[...Ht,Qe]:Be=[Qe],Sn(Be);const U={...Oe,selectedKeys:Be};st?L==null||L(U):z==null||z(U)}!A&&Ee.length&&re!=="inline"&&Ie(Rr)},Hn=Ko(Oe=>{oe==null||oe(Oa(Oe)),an(Oe)}),fn=Ko((Oe,Qe)=>{let st=Ee.filter(Be=>Be!==Oe);if(Qe)st.push(Oe);else if(re!=="inline"){const Be=_t(Oe);st=st.filter(U=>!Be.has(U))}ai(Ee,st,!0)||Ie(st,!0)}),en=EN(re,pt,me,ie,K,ht,Ot,Cn,(Oe,Qe)=>{const st=Qe??!Ee.includes(Oe);fn(Oe,st)},j);h.useEffect(()=>{G(!0)},[]);const Dt=h.useMemo(()=>({_internalRenderMenuItem:_,_internalRenderSubMenuItem:ae}),[_,ae]),at=re!=="horizontal"||w?V:V.map((Oe,Qe)=>h.createElement(fi,{key:Oe.key,overflowDisabled:Qe>Te,classNames:s,styles:a},Oe)),Vt=h.createElement(rr,jc({id:f,ref:K,prefixCls:`${n}-overflow`,component:"ul",itemComponent:us,className:J(n,`${n}-root`,`${n}-${re}`,i,{[`${n}-inline-collapsed`]:Re,[`${n}-rtl`]:me},r),dir:d,style:o,role:"menu",tabIndex:l,data:at,renderRawItem:Oe=>Oe,renderRawRest:Oe=>{const Qe=Oe.length,st=Qe?V.slice(-Qe):null;return h.createElement(Ei,{eventKey:Dc,title:Q,disabled:Me,internalPopupClose:Qe===0,popupClassName:Y},st)},maxCount:re!=="horizontal"||w?rr.INVALIDATE:rr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:Oe=>{ze(Oe)},onKeyDown:en},ce));return h.createElement(od.Provider,{value:Dt},h.createElement(gx.Provider,{value:ie},h.createElement(fi,{prefixCls:n,rootClassName:r,classNames:s,styles:a,mode:re,openKeys:Ee,rtl:me,disabled:m,motion:se?M:null,defaultMotions:se?O:null,activeKey:pt,onActive:jn,onInactive:Bn,selectedKeys:Ht,inlineIndent:D,subMenuOpenDelay:y,subMenuCloseDelay:$,forceSubMenuRender:x,builtinPlacements:H,triggerSubMenuAction:F,getPopupContainer:P,itemIcon:X,expandIcon:I,onItemClick:Hn,onOpenChange:fn,popupRender:q},h.createElement(vx.Provider,{value:_e},Vt),h.createElement("div",{style:{display:"none"},"aria-hidden":!0},h.createElement(yx.Provider,{value:jt},le)))))}),$i=_N;$i.Item=us;$i.SubMenu=Ei;$i.ItemGroup=ds;$i.Divider=cd;var jN={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 Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bc.apply(this,arguments)}const BN=(e,t)=>h.createElement(Jt,Bc({},e,{ref:t,icon:jN})),Ix=h.forwardRef(BN);process.env.NODE_ENV!=="production"&&(Ix.displayName="BarsOutlined");const HN=h.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),VN=e=>{const{antCls:t,componentCls:n,colorText:r,footerBg:o,headerHeight:i,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,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:i,padding:a,color:s,lineHeight:ye(i),background:d,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:o},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},Rx=e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=e,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:o,footerPadding:`${i}px ${c}px`,footerBg:t,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},Tx=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];on("Layout",VN,Rx,{deprecatedTokens:Tx});const WN=e=>{const{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:o,antCls:i,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:g,lightTriggerBg:m,bodyBg:w}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${i}-menu${i}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:ye(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:c,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 ${ye(f)} ${ye(f)} 0`,cursor:"pointer",transition:`background-color ${o} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${o}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${ye(f)} 0 0 ${ye(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:g,background:m},[`${t}-zero-width-trigger`]:{color:g,background:m,border:`${ye(e.lineWidth)} ${e.lineType} ${w}`,borderInlineStart:0}}}}},qN=on(["Layout","Sider"],WN,Rx,{deprecatedTokens:Tx}),Kp={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1839.98px"},XN=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),ud=h.createContext({}),UN=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),GN=h.forwardRef((e,t)=>{const{prefixCls:n,className:r,trigger:o,children:i,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:g,onCollapse:m,onBreakpoint:w,classNames:y,styles:$,...x}=e,{siderHook:E}=b.useContext(HN),[C,v]=un(a,e.collapsed),[T,R]=b.useState(!1),A=(q,ce)=>{v(q),m==null||m(q,ce)},k={...e,collapsed:C,defaultCollapsed:a,theme:s,style:l,collapsible:c,reverseArrow:u,width:d,collapsedWidth:f,zeroWidthTriggerStyle:p,breakpoint:g,onCollapse:m,onBreakpoint:w},[N,z]=Tn([y],[$],{props:k}),{getPrefixCls:L,direction:D}=b.useContext(dt),M=L("layout-sider",n),[O,F]=qN(M),H=b.useRef(null);H.current=q=>{R(q.matches),w==null||w(q.matches),C!==q.matches&&A(q.matches,"responsive")},b.useEffect(()=>{function q(V){var le;return(le=H.current)==null?void 0:le.call(H,V)}let ce;return typeof(window==null?void 0:window.matchMedia)<"u"&&g&&g in Kp&&(ce=window.matchMedia(`screen and (max-width: ${Kp[g]})`),Qt(ce==null?void 0:ce.addEventListener)&&ce.addEventListener("change",q),q(ce)),()=>{Qt(ce==null?void 0:ce.removeEventListener)&&ce.removeEventListener("change",q)}},[g]),b.useEffect(()=>{const q=UN("ant-sider-");return E.addSider(q),()=>E.removeSider(q)},[]);const X=()=>{A(!C,"clickTrigger")},I=Yt(x,["collapsed"]),Q=C?f:d,Y=XN(Q)?`${Q}px`:String(Q),P=Number.parseFloat(String(f||0))===0?h.createElement("span",{onClick:X,className:J(`${M}-zero-width-trigger`,`${M}-zero-width-trigger-${u?"right":"left"}`),style:p},o||h.createElement(Ix,null)):null,oe=D==="rtl"==!u,ne={expanded:oe?h.createElement(Ia,null):h.createElement(Aa,null),collapsed:oe?h.createElement(Aa,null):h.createElement(Ia,null)}[C?"collapsed":"expanded"],ee=o!==null?P||h.createElement("div",{className:`${M}-trigger`,onClick:X,style:{width:Y}},o||ne):null,_={...l,flex:`0 0 ${Y}`,maxWidth:Y,minWidth:Y,width:Y},ae=J(M,`${M}-${s}`,{[`${M}-collapsed`]:!!C,[`${M}-has-trigger`]:c&&o!==null&&!P,[`${M}-below`]:!!T,[`${M}-zero-width`]:Number.parseFloat(Y)===0},r,N.root,O,F),fe=h.useMemo(()=>({siderCollapsed:C}),[C]);return h.createElement(ud.Provider,{value:fe},h.createElement("aside",{className:ae,...I,style:{...z.root,..._},ref:t},h.createElement("div",{className:J(`${M}-children`,N.body),style:z.body},i),c||T&&P?ee:null))});process.env.NODE_ENV!=="production"&&(GN.displayName="Sider");var KN={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 Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hc.apply(this,arguments)}const YN=(e,t)=>h.createElement(Jt,Hc({},e,{ref:t,icon:KN})),dd=h.forwardRef(YN);process.env.NODE_ENV!=="production"&&(dd.displayName="EllipsisOutlined");const La=b.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),Px=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=h.useContext(dt),a=i("menu",t),s=J({[`${a}-item-divider-dashed`]:!!r},n);return h.createElement(cd,{className:s,...o})},Nx=e=>{var k,N;const{className:t,children:n,icon:r,title:o,danger:i,extra:a}=e,{prefixCls:s,firstLevel:l,direction:c,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:g}=h.useContext(La),{siderCollapsed:m}=h.useContext(ud),w=!!(m||f),[y,$]=h.useState(!1);h.useEffect(()=>{$(!1)},[w]);const x=z=>{var M,O;const L=n==null?void 0:n[0],D=h.createElement("span",{className:J(`${s}-title-content`,l?g==null?void 0:g.itemContent:(M=g==null?void 0:g.subMenu)==null?void 0:M.itemContent,{[`${s}-title-content-with-extra`]:!!a||a===0}),style:l?p==null?void 0:p.itemContent:(O=p==null?void 0:p.subMenu)==null?void 0:O.itemContent},n);return(!r||h.isValidElement(n)&&n.type==="span")&&n&&z&&l&&typeof L=="string"?h.createElement("div",{className:`${s}-inline-collapsed-noicon`},L.charAt(0)):D};let E=o;typeof o>"u"?E=l?n:"":o===!1&&(E="");const C=d===!1?void 0:d,v=C&&C.title!==void 0?C.title:E,T={...C??null,title:v};w?(T.open=(C==null?void 0:C.open)??y,T.onOpenChange=z=>{var L;$(z),(L=C==null?void 0:C.onOpenChange)==null||L.call(C,z)}):(T.title=null,T.open=!1);const R=or(n).length;let A=h.createElement(us,{...Yt(e,["title","icon","danger"]),className:J(l?g==null?void 0:g.item:(k=g==null?void 0:g.subMenu)==null?void 0:k.item,{[`${s}-item-danger`]:i,[`${s}-item-only-child`]:(r?R+1:R)===1},t),style:{...l?p==null?void 0:p.item:(N=p==null?void 0:p.subMenu)==null?void 0:N.item,...e.style},title:typeof o=="string"?o:void 0,itemData:(e==null?void 0:e.itemData)??{...e,key:e.eventKey}},Dn(r,z=>{var L,D;return{className:J(`${s}-item-icon`,l?g==null?void 0:g.itemIcon:(L=g==null?void 0:g.subMenu)==null?void 0:L.itemIcon,z.className),style:{...l?p==null?void 0:p.itemIcon:(D=p==null?void 0:p.subMenu)==null?void 0:D.itemIcon,...z.style}}}),x(f));if(!u&&d!==!1){const z=C&&C.placement?C.placement:c==="rtl"?"left":"right",L=`${s}-inline-collapsed-tooltip`,D=O=>({...O,root:J(L,O==null?void 0:O.root)}),M=Qt(C==null?void 0:C.classNames)?O=>{const F=C.classNames(O);return D(F)}:D(C==null?void 0:C.classNames);A=h.createElement(Si,{...T,placement:z,classNames:M},A)}return A},Fa=h.createContext(null),QN=h.forwardRef((e,t)=>{const{children:n,...r}=e,o=h.useContext(Fa),i=h.useMemo(()=>({...o,...r}),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=Kh(n),s=Hr(t,a?cr(n):null);return h.createElement(Fa.Provider,{value:i},h.createElement(Pa,{space:!0},a?h.cloneElement(n,{ref:s}):n))}),ZN=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${ye(i)} ${a} ${o}`,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,
211
211
  > ${t}-item-active,
212
- > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(l=>`${l} ${n}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},ZN=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
213
- ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${xe(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${xe(t)})`}}}}),Yp=e=>Vu(e),Qp=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:h,motionEaseOut:m,itemPaddingInline:w,motionDurationMid:y,itemHoverColor:$,lineType:x,colorSplit:E,itemDisabledColor:v,dangerItemColor:C,dangerItemHoverColor:I,dangerItemSelectedColor:N,dangerItemActiveBg:A,dangerItemSelectedBg:k,popupBg:R,itemHoverBg:O,itemActiveBg:z,menuSubMenuBg:D,horizontalItemSelectedColor:M,horizontalItemSelectedBg:L,horizontalItemBorderRadius:_,horizontalItemHoverBg:V}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...Yp(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...Yp(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${v} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:$}},[`${n}-submenu:not(${n}-submenu-selected)`]:{[`> ${n}-submenu-title:hover`]:{color:$}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:z}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:z}}},[`${n}-item-danger`]:{color:C,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:I}},[`&${n}-item:active`]:{background:A}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:N},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:k}},[`&${n}-submenu > ${n}`]:{backgroundColor:D},[`&${n}-popup > ${n}`]:{backgroundColor:R},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:R},[`&${n}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:_,"&::after":{position:"absolute",insetInline:w,bottom:0,pointerEvents:"none",borderBottom:`${xe(u)} solid transparent`,transition:`border-color ${p} ${h}`,content:'""'},"&:hover, &-active, &-open":{background:V,"&::after":{borderBottomWidth:u,borderBottomColor:M}},"&-selected":{color:M,backgroundColor:L,"&:hover":{backgroundColor:L},"&::after":{borderBottomWidth:u,borderBottomColor:M}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${xe(f)} ${x} ${E}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${xe(d)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(X=>`${X} ${y} ${m}`).join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:N}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(X=>`${X} ${y} ${h}`).join(",")}}}}}},Zp=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(i).add(o).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:xe(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${t}-item,
214
- > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:xe(n)},[`${t}-item-group-list ${t}-submenu-title,
215
- ${t}-submenu-title`]:{paddingInlineEnd:u}}},JN=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,padding:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationSlow:d,paddingXS:f,boxShadowSecondary:p,collapsedWidth:h,collapsedIconSize:m}=e,w={height:r,lineHeight:xe(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...Zp(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...Zp(e),boxShadow:p}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${xe(e.calc(a).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 ${d}`,`background-color ${d}`].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`]:w,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:w}},{[`${t}-inline-collapsed`]:{width:h,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{transition:["border-color","background-color"].map(y=>`${y} ${d}`).join(","),[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center",width:"100%"}}},[`> ${t}-item,
212
+ > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(l=>`${l} ${n}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},JN=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
213
+ ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${ye(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ye(t)})`}}}}),Yp=e=>Vu(e),Qp=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:g,motionEaseOut:m,itemPaddingInline:w,motionDurationMid:y,itemHoverColor:$,lineType:x,colorSplit:E,itemDisabledColor:C,dangerItemColor:v,dangerItemHoverColor:T,dangerItemSelectedColor:R,dangerItemActiveBg:A,dangerItemSelectedBg:k,popupBg:N,itemHoverBg:z,itemActiveBg:L,menuSubMenuBg:D,horizontalItemSelectedColor:M,horizontalItemSelectedBg:O,horizontalItemBorderRadius:F,horizontalItemHoverBg:H}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...Yp(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...Yp(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${C} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:$}},[`${n}-submenu:not(${n}-submenu-selected)`]:{[`> ${n}-submenu-title:hover`]:{color:$}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:z},"&:active":{backgroundColor:L}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:z},"&:active":{backgroundColor:L}}},[`${n}-item-danger`]:{color:v,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:T}},[`&${n}-item:active`]:{background:A}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:R},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:k}},[`&${n}-submenu > ${n}`]:{backgroundColor:D},[`&${n}-popup > ${n}`]:{backgroundColor:N},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:N},[`&${n}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:F,"&::after":{position:"absolute",insetInline:w,bottom:0,pointerEvents:"none",borderBottom:`${ye(u)} solid transparent`,transition:`border-color ${p} ${g}`,content:'""'},"&:hover, &-active, &-open":{background:H,"&::after":{borderBottomWidth:u,borderBottomColor:M}},"&-selected":{color:M,backgroundColor:O,"&:hover":{backgroundColor:O},"&::after":{borderBottomWidth:u,borderBottomColor:M}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${ye(f)} ${x} ${E}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ye(d)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(X=>`${X} ${y} ${m}`).join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:R}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(X=>`${X} ${y} ${g}`).join(",")}}}}}},Zp=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(i).add(o).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:ye(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${t}-item,
214
+ > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:ye(n)},[`${t}-item-group-list ${t}-submenu-title,
215
+ ${t}-submenu-title`]:{paddingInlineEnd:u}}},eM=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,padding:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationSlow:d,paddingXS:f,boxShadowSecondary:p,collapsedWidth:g,collapsedIconSize:m}=e,w={height:r,lineHeight:ye(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...Zp(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...Zp(e),boxShadow:p}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${ye(e.calc(a).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 ${d}`,`background-color ${d}`].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`]:w,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:w}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{transition:["border-color","background-color"].map(y=>`${y} ${d}`).join(","),[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center",width:"100%"}}},[`> ${t}-item,
216
216
  > ${t}-item-group > ${t}-item-group-list > ${t}-item,
217
217
  > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
218
- > ${t}-submenu > ${t}-submenu-title`]:{display:"flex",alignItems:"center",justifyContent:"flex-start",insetInlineStart:0,paddingInline:`calc(50% - ${xe(e.calc(m).div(2).equal())} - ${xe(c)})`,textOverflow:"clip",[`
218
+ > ${t}-submenu > ${t}-submenu-title`]:{display:"flex",alignItems:"center",justifyContent:"flex-start",insetInlineStart:0,paddingInline:`calc(50% - ${ye(e.calc(m).div(2).equal())} - ${ye(c)})`,textOverflow:"clip",[`
219
219
  ${t}-submenu-arrow,
220
220
  ${t}-submenu-expand-icon
221
- `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:"hidden"},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:m,lineHeight:xe(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"},[`${t}-item-extra`]:{paddingInlineStart:s},"a, a:hover":{color:o}},[`${t}-item-group-title`]:{...eb,paddingInline:f}}}]},Jp=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=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) ${o}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:{...Hu()},[`&${t}-item-only-child`]:{[`> ${a}, > ${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"}}}},em=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:["transform","opacity"].map(s=>`${s} ${n}`).join(",")},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:["background-color","transform","top","color"].map(s=>`${s} ${n} ${r}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${xe(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${xe(a)})`}}}}},eM=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:h,menuArrowOffset:m,lineType:w,groupTitleLineHeight:y,groupTitleFontSize:$,iconSize:x,iconMarginInlineEnd:E}=e,v=[`> ${t}-typography-ellipsis-single-line`,`> ${n}-item-label > ${t}-typography-ellipsis-single-line`].join(",");return[{"":{[n]:{...rc(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...Ro(e),...rc(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} 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:`${xe(s)} ${xe(l)}`,fontSize:$,lineHeight:y,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:["border-color","background-color"].map(C=>`${C} ${o} ${a}`).join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o}`,`background-color ${o}`,`padding ${i}`].map(C=>`${C} ${a}`).join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(C=>`${C} ${o} ${a}`).join(",")},[`${n}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%",minWidth:0},[`${n}-item-label`]:{flex:"auto",minWidth:0,...eb},[v]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{flex:"none",marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item-icon + ${n}-title-content-with-extra`]:{width:`calc(100% - ${xe(e.calc(x).add(E??0).equal())})`},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:w,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}},...Jp(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${xe(e.calc(r).mul(2).equal())} ${xe(l)}`}}},"&-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,...Jp(e),...em(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}}},"&-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}},...em(e),[`&-inline-collapsed ${n}-submenu-arrow,
222
- &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${xe(m)})`},"&::after":{transform:`rotate(45deg) translateX(${xe(e.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${xe(e.calc(h).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${xe(e.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${xe(m)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},tM=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:o,colorText:i,colorTextDescription:a,colorBgContainer:s,colorFillAlter:l,colorFillContent:c,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:h,lineHeight:m,colorBgElevated:w,marginXXS:y,padding:$,fontSize:x,controlHeightSM:E,fontSizeLG:v,colorTextLightSolid:C,colorErrorHover:I}=e,N=e.activeBarWidth??0,A=e.activeBarBorderWidth??u,k=e.itemMarginInline??e.marginXXS,R=new Ve(C).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:a,groupTitleColor:a,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:c,itemActiveBg:f,colorSubItemBg:l,subMenuItemBg:l,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:N,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:A,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:k,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:h,groupTitleLineHeight:m,collapsedWidth:h*2,popupBg:w,itemMarginBlock:y,itemPaddingInline:$,horizontalLineHeight:`${h*1.15}px`,iconSize:x,iconMarginInlineEnd:E-x,collapsedIconSize:v,groupTitleFontSize:x,darkItemDisabledColor:new Ve(C).setA(.25).toRgbString(),darkItemColor:R,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:C,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:R,darkItemHoverColor:C,darkDangerItemHoverColor:I,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:n,itemWidth:N?`calc(100% + ${A}px)`:`calc(100% - ${k*2}px)`}},nM=(e,t=e,n=!0)=>on("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:p,darkDangerItemSelectedBg:h,darkItemHoverBg:m,darkGroupTitleColor:w,darkItemHoverColor:y,darkItemDisabledColor:$,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:E,darkDangerItemActiveBg:v,popupBg:C,darkPopupBg:I}=o,N=o.calc(s).div(7).mul(5).equal(),A=yt(o,{menuArrowSize:N,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(N).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:C}),k=yt(A,{itemColor:l,itemHoverColor:y,groupTitleColor:w,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:I,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:$,dangerItemColor:c,dangerItemHoverColor:x,dangerItemSelectedColor:E,dangerItemActiveBg:v,dangerItemSelectedBg:h,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[eM(A),QN(A),JN(A),Qp(A,"light"),Qp(k,"dark"),ZN(A),_R(A),io(A,"slide-up"),io(A,"slide-down"),Ju(A,"zoom-big")]},tM,{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),Mx=e=>{var m,w,y,$,x,E;const{popupClassName:t,icon:n,title:r,theme:o}=e,i=g.useContext(La),{prefixCls:a,inlineCollapsed:s,theme:l,classNames:c,styles:u}=i,d=Mo();let f;if(!n)f=s&&!d.length&&r&&typeof r=="string"?g.createElement("div",{className:`${a}-inline-collapsed-noicon`},r.charAt(0)):g.createElement("span",{className:`${a}-title-content`},r);else{const v=g.isValidElement(r)&&r.type==="span";f=g.createElement(g.Fragment,null,Dn(n,C=>({className:Z(C.className,`${a}-item-icon`,c==null?void 0:c.itemIcon),style:{...C.style,...u==null?void 0:u.itemIcon}})),v?r:g.createElement("span",{className:`${a}-title-content`},r))}const p=g.useMemo(()=>({...i,firstLevel:!1}),[i]),[h]=Zu("Menu");return g.createElement(La.Provider,{value:p},g.createElement(Ei,{...Yt(e,["icon"]),title:f,classNames:{list:(m=c==null?void 0:c.subMenu)==null?void 0:m.list,listTitle:(w=c==null?void 0:c.subMenu)==null?void 0:w.itemTitle},styles:{list:(y=u==null?void 0:u.subMenu)==null?void 0:y.list,listTitle:($=u==null?void 0:u.subMenu)==null?void 0:$.itemTitle},popupClassName:Z(a,t,(x=c==null?void 0:c.popup)==null?void 0:x.root,`${a}-${o||l}`),popupStyle:{zIndex:h,...e.popupStyle,...(E=u==null?void 0:u.popup)==null?void 0:E.root}}))};function il(e){return e===null||e===!1}const rM={item:Nx,submenu:Mx,divider:Tx},oM=b.forwardRef((e,t)=>{var B;const n=g.useContext(Fa),r=n||{},{prefixCls:o,className:i,style:a,theme:s="light",expandIcon:l,_internalDisableMenuItemTitleTooltip:c,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:h,selectable:m,onClick:w,overflowedIndicatorPopupClassName:y,classNames:$,styles:x,...E}=e,{menu:v}=g.useContext(dt),{getPrefixCls:C,getPopupContainer:I,direction:N,className:A,style:k,classNames:R,styles:O}=Kn("menu"),z=C(),D=Yt(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const ie=At("Menu");process.env.NODE_ENV!=="production"&&ie(!("inlineCollapsed"in e&&h!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),ie.deprecated("items"in e&&!e.children,"children","items")}(B=r.validator)==null||B.call(r,{mode:h});const M=Ge((...ie)=>{var ae;w==null||w(...ie),(ae=r.onClick)==null||ae.call(r)}),L=r.mode||h,_=m??r.selectable,V=d??f,X={...e,mode:L,inlineCollapsed:V,selectable:_,theme:s},P=kt(k),Y=kt(a),[K,T]=Pn([R,$],[O,P,x,Y],{props:X},{popup:{_default:"root"},subMenu:{_default:"item"}}),ne={horizontal:{motionName:`${z}-slide-up`},inline:SR(z),other:{motionName:`${z}-zoom-big`}},F=C("menu",o||r.prefixCls),U=Po(F),[re,j]=nM(F,U,!n),H=Z(`${F}-${s}`,A,i),ee=g.useMemo(()=>{var ae;if(Qt(l)||il(l))return l||null;if(Qt(r.expandIcon)||il(r.expandIcon))return r.expandIcon||null;if(Qt(v==null?void 0:v.expandIcon)||il(v==null?void 0:v.expandIcon))return(v==null?void 0:v.expandIcon)||null;const ie=l??(r==null?void 0:r.expandIcon)??(v==null?void 0:v.expandIcon);return Dn(ie,{className:Z(`${F}-submenu-expand-icon`,g.isValidElement(ie)?(ae=ie.props)==null?void 0:ae.className:void 0)})},[l,r==null?void 0:r.expandIcon,v==null?void 0:v.expandIcon,F]),oe=g.useMemo(()=>({prefixCls:F,inlineCollapsed:V||!1,direction:N,firstLevel:!0,theme:s,mode:L,disableMenuItemTitleTooltip:c,tooltip:u,classNames:K,styles:T}),[F,V,N,c,s,L,K,T,u]);return g.createElement(Fa.Provider,{value:null},g.createElement(La.Provider,{value:oe},g.createElement($i,{getPopupContainer:I,overflowedIndicator:g.createElement(dd,null),overflowedIndicatorPopupClassName:Z(F,`${F}-${s}`,y),classNames:{list:K.list,listTitle:K.itemTitle},styles:{list:T.list,listTitle:T.itemTitle},mode:L,selectable:_,onClick:M,...D,inlineCollapsed:V,style:T.root,className:H,prefixCls:F,direction:N,defaultMotions:ne,expandIcon:ee,ref:t,rootClassName:Z(p,re,r.rootClassName,j,U,K.root),_internalComponents:rM})))}),Ao=b.forwardRef((e,t)=>{const n=b.useRef(null),r=g.useContext(ud);return b.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{var i;(i=n.current)==null||i.focus(o)}})),g.createElement(oM,{ref:n,...e,...r})});Ao.Item=Nx;Ao.SubMenu=Mx;Ao.Divider=Tx;Ao.ItemGroup=ds;process.env.NODE_ENV!=="production"&&(Ao.displayName="Menu");const iM=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},aM=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:h,colorBgElevated:m,controlHeightLG:w}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:`calc(100vh - ${xe(e.calc(w).mul(2.5).equal())})`,overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,
221
+ `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:"hidden"},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:m,lineHeight:ye(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"},[`${t}-item-extra`]:{paddingInlineStart:s},"a, a:hover":{color:o}},[`${t}-item-group-title`]:{...eb,paddingInline:f}}}]},Jp=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=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) ${o}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:{...Hu()},[`&${t}-item-only-child`]:{[`> ${a}, > ${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"}}}},em=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:["transform","opacity"].map(s=>`${s} ${n}`).join(",")},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:["background-color","transform","top","color"].map(s=>`${s} ${n} ${r}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${ye(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ye(a)})`}}}}},tM=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:g,menuArrowOffset:m,lineType:w,groupTitleLineHeight:y,groupTitleFontSize:$,iconSize:x,iconMarginInlineEnd:E}=e,C=[`> ${t}-typography-ellipsis-single-line`,`> ${n}-item-label > ${t}-typography-ellipsis-single-line`].join(",");return[{"":{[n]:{...rc(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...Ro(e),...rc(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} 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:`${ye(s)} ${ye(l)}`,fontSize:$,lineHeight:y,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:["border-color","background-color"].map(v=>`${v} ${o} ${a}`).join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o}`,`background-color ${o}`,`padding ${i}`].map(v=>`${v} ${a}`).join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(v=>`${v} ${o} ${a}`).join(",")},[`${n}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%",minWidth:0},[`${n}-item-label`]:{flex:"auto",minWidth:0,...eb},[C]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{flex:"none",marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item-icon + ${n}-title-content-with-extra`]:{width:`calc(100% - ${ye(e.calc(x).add(E??0).equal())})`},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:w,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}},...Jp(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${ye(e.calc(r).mul(2).equal())} ${ye(l)}`}}},"&-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,...Jp(e),...em(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}}},"&-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}},...em(e),[`&-inline-collapsed ${n}-submenu-arrow,
222
+ &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ye(m)})`},"&::after":{transform:`rotate(45deg) translateX(${ye(e.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${ye(e.calc(g).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ye(e.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ye(m)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},nM=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:o,colorText:i,colorTextDescription:a,colorBgContainer:s,colorFillAlter:l,colorFillContent:c,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:g,lineHeight:m,colorBgElevated:w,marginXXS:y,padding:$,fontSize:x,controlHeightSM:E,fontSizeLG:C,colorTextLightSolid:v,colorErrorHover:T}=e,R=e.activeBarWidth??0,A=e.activeBarBorderWidth??u,k=e.itemMarginInline??e.marginXXS,N=new Ve(v).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:a,groupTitleColor:a,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:c,itemActiveBg:f,colorSubItemBg:l,subMenuItemBg:l,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:R,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:A,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:k,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:g,groupTitleLineHeight:m,collapsedWidth:g*2,popupBg:w,itemMarginBlock:y,itemPaddingInline:$,horizontalLineHeight:`${g*1.15}px`,iconSize:x,iconMarginInlineEnd:E-x,collapsedIconSize:C,groupTitleFontSize:x,darkItemDisabledColor:new Ve(v).setA(.25).toRgbString(),darkItemColor:N,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:v,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:N,darkItemHoverColor:v,darkDangerItemHoverColor:T,darkDangerItemSelectedColor:v,darkDangerItemActiveBg:n,itemWidth:R?`calc(100% + ${A}px)`:`calc(100% - ${k*2}px)`}},rM=(e,t=e,n=!0)=>on("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:p,darkDangerItemSelectedBg:g,darkItemHoverBg:m,darkGroupTitleColor:w,darkItemHoverColor:y,darkItemDisabledColor:$,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:E,darkDangerItemActiveBg:C,popupBg:v,darkPopupBg:T}=o,R=o.calc(s).div(7).mul(5).equal(),A=yt(o,{menuArrowSize:R,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(R).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:v}),k=yt(A,{itemColor:l,itemHoverColor:y,groupTitleColor:w,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:T,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:$,dangerItemColor:c,dangerItemHoverColor:x,dangerItemSelectedColor:E,dangerItemActiveBg:C,dangerItemSelectedBg:g,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[tM(A),ZN(A),eM(A),Qp(A,"light"),Qp(k,"dark"),JN(A),jR(A),io(A,"slide-up"),io(A,"slide-down"),Ju(A,"zoom-big")]},nM,{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),Mx=e=>{var m,w,y,$,x,E;const{popupClassName:t,icon:n,title:r,theme:o}=e,i=h.useContext(La),{prefixCls:a,inlineCollapsed:s,theme:l,classNames:c,styles:u}=i,d=Mo();let f;if(!n)f=s&&!d.length&&r&&typeof r=="string"?h.createElement("div",{className:`${a}-inline-collapsed-noicon`},r.charAt(0)):h.createElement("span",{className:`${a}-title-content`},r);else{const C=h.isValidElement(r)&&r.type==="span";f=h.createElement(h.Fragment,null,Dn(n,v=>({className:J(v.className,`${a}-item-icon`,c==null?void 0:c.itemIcon),style:{...v.style,...u==null?void 0:u.itemIcon}})),C?r:h.createElement("span",{className:`${a}-title-content`},r))}const p=h.useMemo(()=>({...i,firstLevel:!1}),[i]),[g]=Zu("Menu");return h.createElement(La.Provider,{value:p},h.createElement(Ei,{...Yt(e,["icon"]),title:f,classNames:{list:(m=c==null?void 0:c.subMenu)==null?void 0:m.list,listTitle:(w=c==null?void 0:c.subMenu)==null?void 0:w.itemTitle},styles:{list:(y=u==null?void 0:u.subMenu)==null?void 0:y.list,listTitle:($=u==null?void 0:u.subMenu)==null?void 0:$.itemTitle},popupClassName:J(a,t,(x=c==null?void 0:c.popup)==null?void 0:x.root,`${a}-${o||l}`),popupStyle:{zIndex:g,...e.popupStyle,...(E=u==null?void 0:u.popup)==null?void 0:E.root}}))};function il(e){return e===null||e===!1}const oM={item:Nx,submenu:Mx,divider:Px},iM=b.forwardRef((e,t)=>{var q;const n=h.useContext(Fa),r=n||{},{prefixCls:o,className:i,style:a,theme:s="light",expandIcon:l,_internalDisableMenuItemTitleTooltip:c,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:g,selectable:m,onClick:w,overflowedIndicatorPopupClassName:y,classNames:$,styles:x,...E}=e,{menu:C}=h.useContext(dt),{getPrefixCls:v,getPopupContainer:T,direction:R,className:A,style:k,classNames:N,styles:z}=Kn("menu"),L=v(),D=Yt(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const ce=At("Menu");process.env.NODE_ENV!=="production"&&ce(!("inlineCollapsed"in e&&g!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),ce.deprecated("items"in e&&!e.children,"children","items")}(q=r.validator)==null||q.call(r,{mode:g});const M=Ge((...ce)=>{var V;w==null||w(...ce),(V=r.onClick)==null||V.call(r)}),O=r.mode||g,F=m??r.selectable,H=d??f,X={...e,mode:O,inlineCollapsed:H,selectable:F,theme:s},I=kt(k),Q=kt(a),[Y,P]=Tn([N,$],[z,I,x,Q],{props:X},{popup:{_default:"root"},subMenu:{_default:"item"}}),oe={horizontal:{motionName:`${L}-slide-up`},inline:ER(L),other:{motionName:`${L}-zoom-big`}},W=v("menu",o||r.prefixCls),j=To(W),[ne,ee]=rM(W,j,!n),_=J(`${W}-${s}`,A,i),ae=h.useMemo(()=>{var V;if(Qt(l)||il(l))return l||null;if(Qt(r.expandIcon)||il(r.expandIcon))return r.expandIcon||null;if(Qt(C==null?void 0:C.expandIcon)||il(C==null?void 0:C.expandIcon))return(C==null?void 0:C.expandIcon)||null;const ce=l??(r==null?void 0:r.expandIcon)??(C==null?void 0:C.expandIcon);return Dn(ce,{className:J(`${W}-submenu-expand-icon`,h.isValidElement(ce)?(V=ce.props)==null?void 0:V.className:void 0)})},[l,r==null?void 0:r.expandIcon,C==null?void 0:C.expandIcon,W]),fe=h.useMemo(()=>({prefixCls:W,inlineCollapsed:H||!1,direction:R,firstLevel:!0,theme:s,mode:O,disableMenuItemTitleTooltip:c,tooltip:u,classNames:Y,styles:P}),[W,H,R,c,s,O,Y,P,u]);return h.createElement(Fa.Provider,{value:null},h.createElement(La.Provider,{value:fe},h.createElement($i,{getPopupContainer:T,overflowedIndicator:h.createElement(dd,null),overflowedIndicatorPopupClassName:J(W,`${W}-${s}`,y),classNames:{list:Y.list,listTitle:Y.itemTitle},styles:{list:P.list,listTitle:P.itemTitle},mode:O,selectable:F,onClick:M,...D,inlineCollapsed:H,style:P.root,className:_,prefixCls:W,direction:R,defaultMotions:oe,expandIcon:ae,ref:t,rootClassName:J(p,ne,r.rootClassName,ee,j,Y.root),_internalComponents:oM})))}),Ao=b.forwardRef((e,t)=>{const n=b.useRef(null),r=h.useContext(ud);return b.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{var i;(i=n.current)==null||i.focus(o)}})),h.createElement(iM,{ref:n,...e,...r})});Ao.Item=Nx;Ao.SubMenu=Mx;Ao.Divider=Px;Ao.ItemGroup=ds;process.env.NODE_ENV!=="production"&&(Ao.displayName="Menu");const aM=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},sM=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:g,colorBgElevated:m,controlHeightLG:w}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:`calc(100vh - ${ye(e.calc(w).mul(2.5).equal())})`,overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,
223
223
  &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,
224
224
  &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,
225
225
  &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,
@@ -247,7 +247,7 @@ html body {
247
247
  &${a}-slide-right-leave${a}-slide-right-leave-active${t}-placement-rightTop,
248
248
  &${a}-slide-right-leave${a}-slide-right-leave-active${t}-placement-rightBottom`]:{animationName:Bb},[`&${a}-slide-left-leave${a}-slide-left-leave-active${t}-placement-left,
249
249
  &${a}-slide-left-leave${a}-slide-left-leave-active${t}-placement-leftTop,
250
- &${a}-slide-left-leave${a}-slide-left-leave-active${t}-placement-leftBottom`]:{animationName:Vb}}},fx(e,m),{[`${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`]:{...Ro(e),[n]:{padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Ea(e),"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${xe(c)} ${xe(h)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${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, > ${n}-item-label > a`]:{color:"inherit",transition:`all ${l}`,"&: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:`${xe(c)} ${xe(h)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Ea(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${xe(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 ${xe(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(h).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:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[io(e,"slide-up"),io(e,"slide-down"),io(e,"slide-left"),io(e,"slide-right"),Np(e,"move-up"),Np(e,"move-down"),Ju(e,"zoom-big")]]},sM=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...rd({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...ux(e)}),lM=on("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=yt(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[aM(i),iM(i)]},sM,{resetStyle:!1}),ki=g.forwardRef((e,t)=>{const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:p,open:h,onOpenChange:m,mouseEnterDelay:w=.15,mouseLeaveDelay:y=.1,autoAdjustOverflow:$=!0,placement:x="",transitionName:E,classNames:v,styles:C,destroyPopupOnHide:I,destroyOnHidden:N}=e,{getPrefixCls:A,direction:k,getPopupContainer:R,className:O,style:z,classNames:D,styles:M}=Kn("dropdown"),L={...e,mouseEnterDelay:w,mouseLeaveDelay:y,autoAdjustOverflow:$},_=kt(z),V=kt(p),[X,P]=Pn([D,v],[M,_,C,V],{props:L}),Y={...P.root},K=c||l,T=At("Dropdown");process.env.NODE_ENV!=="production"&&(Object.entries({dropdownRender:"popupRender",destroyPopupOnHide:"destroyOnHidden",overlayClassName:"classNames.root",overlayStyle:"styles.root"}).forEach(([Q,le])=>{T.deprecated(!(Q in e),Q,le)}),x.includes("Center")&&T.deprecated(!x.includes("Center"),`placement: ${x}`,`placement: ${x.slice(0,x.indexOf("Center"))}`));const ne=g.useMemo(()=>{const W=A();return E!==void 0?E:x.startsWith("top")?`${W}-slide-down`:x.startsWith("left")?`${W}-slide-right`:x.startsWith("right")?`${W}-slide-left`:`${W}-slide-up`},[A,x,E]),F=g.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:k==="rtl"?"bottomRight":"bottomLeft",[x,k]),U=A("dropdown",o),re=Po(U),[j,H]=lM(U,re),[,ee]=Cr(),oe=g.Children.only(kI(i)?g.createElement("span",null,i):i),B=Hr(t,cr(oe)),ie=Dn(oe,{className:Z(`${U}-trigger`,{[`${U}-rtl`]:k==="rtl"},oe.props.className),disabled:oe.props.disabled??s,ref:B}),ae=s?[]:a,Se=!!(ae!=null&&ae.includes("contextMenu")),[ye,q]=un(!1,h),me=Ge(W=>{m==null||m(W,{source:"trigger"}),q(W)}),he=Z(d,f,j,H,re,O,X.root,{[`${U}-rtl`]:k==="rtl"}),se=px({arrowPointAtCenter:rn(r)&&r.pointAtCenter,autoAdjustOverflow:$,offset:ee.marginXXS,arrowWidth:r?ee.sizePopupArrow:0,borderRadius:ee.borderRadius}),ue=Ge(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),q(!1))}),pe=()=>{const W=Yt(X,["root"]),Q=Yt(P,["root"]);let le;return n!=null&&n.items&&(le=g.createElement(Ao,{...n,classNames:{...W,subMenu:{...W}},styles:{...Q,subMenu:{...Q}}})),K&&(le=K(le)),br(le)?le=g.createElement("span",null,le):g.isValidElement(le)||(le=g.createElement(g.Fragment,null,le)),g.createElement(YN,{prefixCls:`${U}-menu`,rootClassName:Z(H,re),expandIcon:g.createElement("span",{className:`${U}-menu-submenu-arrow`},k==="rtl"?g.createElement(Aa,{className:`${U}-menu-submenu-arrow-icon`}):g.createElement(Ia,{className:`${U}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ue,validator:({mode:be})=>{process.env.NODE_ENV!=="production"&&T(!be||be==="vertical","usage",`mode="${be}" is not supported for Dropdown's Menu.`)}},le)},[Ne,Ee]=Zu("Dropdown",Y.zIndex);let Ie=g.createElement(bN,{alignPoint:Se,...Yt(e,["rootClassName","onOpenChange"]),mouseEnterDelay:w,mouseLeaveDelay:y,visible:ye,builtinPlacements:se,arrow:!!r,overlayClassName:he,prefixCls:U,getPopupContainer:u||R,transitionName:ne,trigger:ae,overlay:pe,placement:F,onVisibleChange:me,overlayStyle:{...Y,zIndex:Ne},autoDestroy:N??I},ie);return Ne&&(Ie=g.createElement(as.Provider,{value:Ee},Ie)),Ie}),cM=BT(ki,"align",void 0,"dropdown",e=>e),uM=e=>g.createElement(cM,{...e},g.createElement("span",null));ki._InternalPanelDoNotUseOrYouWillBeFired=uM;process.env.NODE_ENV!=="production"&&(ki.displayName="Dropdown");function Ii(e){return yt(e,{inputAffixPadding:e.paddingXXS})}const Ri=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,lineWidthFocus:i,controlHeightSM:a,controlHeightLG:s,fontSizeLG:l,lineHeightLG:c,paddingSM:u,controlPaddingHorizontalSM:d,controlPaddingHorizontal:f,colorFillAlter:p,colorPrimaryHover:h,colorPrimary:m,controlOutlineWidth:w,controlOutline:y,colorErrorOutline:$,colorWarningOutline:x,colorBgContainer:E,inputFontSize:v,inputFontSizeLG:C,inputFontSizeSM:I}=e,N=v||n,A=I||N,k=C||l,R=Math.round((t-N*r)/2*10)/10-o,O=Math.round((a-A*r)/2*10)/10-o,z=Math.ceil((s-k*c)/2*10)/10-o;return{lineWidthFocus:i===0?0:o,paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(O,0),paddingBlockLG:Math.max(z,0),paddingInline:u-o,paddingInlineSM:d-o,paddingInlineLG:f-o,addonBg:p,activeBorderColor:m,hoverBorderColor:h,activeShadow:`0 0 0 ${w}px ${y}`,errorActiveShadow:`0 0 0 ${w}px ${$}`,warningActiveShadow:`0 0 0 ${w}px ${x}`,hoverBg:E,activeBg:E,inputFontSize:N,inputFontSizeLG:k,inputFontSizeSM:A}},dM=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),fd=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])":{...dM(yt(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),Ax=(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}}),tm=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Ax(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),fM=(e,t)=>({"&-outlined":{...Ax(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...fd(e)},...tm(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...tm(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),nm=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),pM=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...nm(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...nm(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...fd(e)}}}}),zx="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",Ox=(e,t)=>({outline:`${xe(e.lineWidthFocus)} ${e.lineType} ${t}`,outlineOffset:xe(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(n=>`${n} 0s`).join(", ")}),rm=(e,t)=>({"&, & input, & textarea":{color:t.color},[zx]:Ox(e,t.color),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),mM=(e,t)=>{const{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"},[zx]:Ox(e,e.activeBorderColor),[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:rm(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${n}-status-warning`]:rm(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},Dx=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(t==null?void 0:t.inputColor)??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),om=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Dx(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),gM=(e,t)=>({"&-filled":{...Dx(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...fd(e)},...om(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...om(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),im=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),hM=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...im(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...im(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:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),Lx=(e,t)=>({background:e.colorBgContainer,borderWidth:`${xe(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}}),am=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Lx(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`}}),bM=(e,t)=>({"&-underlined":{...Lx(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"},...am(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...am(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),xM=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Fx=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${xe(t)} ${xe(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},_x=e=>({padding:`${xe(e.paddingBlockSM)} ${xe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),jx=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${xe(e.paddingBlock)} ${xe(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...xM(e.colorTextPlaceholder),"&-lg":{...Fx(e),...t.largeStyle},"&-sm":{..._x(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),yM=e=>{const{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`]:{...Fx(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{..._x(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 ${xe(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${xe(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${xe(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${xe(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${n}-cascader-picker`]:{margin:`-9px ${xe(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",...rc(),[`${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},[`
250
+ &${a}-slide-left-leave${a}-slide-left-leave-active${t}-placement-leftBottom`]:{animationName:Vb}}},fx(e,m),{[`${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`]:{...Ro(e),[n]:{padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Ea(e),"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${ye(c)} ${ye(g)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${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, > ${n}-item-label > a`]:{color:"inherit",transition:`all ${l}`,"&: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:`${ye(c)} ${ye(g)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Ea(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ye(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 ${ye(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(g).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:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[io(e,"slide-up"),io(e,"slide-down"),io(e,"slide-left"),io(e,"slide-right"),Np(e,"move-up"),Np(e,"move-down"),Ju(e,"zoom-big")]]},lM=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...rd({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...ux(e)}),cM=on("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=yt(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[sM(i),aM(i)]},lM,{resetStyle:!1}),ki=h.forwardRef((e,t)=>{const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:p,open:g,onOpenChange:m,mouseEnterDelay:w=.15,mouseLeaveDelay:y=.1,autoAdjustOverflow:$=!0,placement:x="",transitionName:E,classNames:C,styles:v,destroyPopupOnHide:T,destroyOnHidden:R}=e,{getPrefixCls:A,direction:k,getPopupContainer:N,className:z,style:L,classNames:D,styles:M}=Kn("dropdown"),O={...e,mouseEnterDelay:w,mouseLeaveDelay:y,autoAdjustOverflow:$},F=kt(L),H=kt(p),[X,I]=Tn([D,C],[M,F,v,H],{props:O}),Q={...I.root},Y=c||l,P=At("Dropdown");process.env.NODE_ENV!=="production"&&(Object.entries({dropdownRender:"popupRender",destroyPopupOnHide:"destroyOnHidden",overlayClassName:"classNames.root",overlayStyle:"styles.root"}).forEach(([Z,ue])=>{P.deprecated(!(Z in e),Z,ue)}),x.includes("Center")&&P.deprecated(!x.includes("Center"),`placement: ${x}`,`placement: ${x.slice(0,x.indexOf("Center"))}`));const oe=h.useMemo(()=>{const B=A();return E!==void 0?E:x.startsWith("top")?`${B}-slide-down`:x.startsWith("left")?`${B}-slide-right`:x.startsWith("right")?`${B}-slide-left`:`${B}-slide-up`},[A,x,E]),W=h.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:k==="rtl"?"bottomRight":"bottomLeft",[x,k]),j=A("dropdown",o),ne=To(j),[ee,_]=cM(j,ne),[,ae]=Cr(),fe=h.Children.only(II(i)?h.createElement("span",null,i):i),q=Hr(t,cr(fe)),ce=Dn(fe,{className:J(`${j}-trigger`,{[`${j}-rtl`]:k==="rtl"},fe.props.className),disabled:fe.props.disabled??s,ref:q}),V=s?[]:a,le=!!(V!=null&&V.includes("contextMenu")),[se,G]=un(!1,g),K=Ge(B=>{m==null||m(B,{source:"trigger"}),G(B)}),we=J(d,f,ee,_,ne,z,X.root,{[`${j}-rtl`]:k==="rtl"}),ie=px({arrowPointAtCenter:rn(r)&&r.pointAtCenter,autoAdjustOverflow:$,offset:ae.marginXXS,arrowWidth:r?ae.sizePopupArrow:0,borderRadius:ae.borderRadius}),me=Ge(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),G(!1))}),pe=()=>{const B=Yt(X,["root"]),Z=Yt(I,["root"]);let ue;return n!=null&&n.items&&(ue=h.createElement(Ao,{...n,classNames:{...B,subMenu:{...B}},styles:{...Z,subMenu:{...Z}}})),Y&&(ue=Y(ue)),br(ue)?ue=h.createElement("span",null,ue):h.isValidElement(ue)||(ue=h.createElement(h.Fragment,null,ue)),h.createElement(QN,{prefixCls:`${j}-menu`,rootClassName:J(_,ne),expandIcon:h.createElement("span",{className:`${j}-menu-submenu-arrow`},k==="rtl"?h.createElement(Aa,{className:`${j}-menu-submenu-arrow-icon`}):h.createElement(Ia,{className:`${j}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:me,validator:({mode:xe})=>{process.env.NODE_ENV!=="production"&&P(!xe||xe==="vertical","usage",`mode="${xe}" is not supported for Dropdown's Menu.`)}},ue)},[Ne,Ee]=Zu("Dropdown",Q.zIndex);let Ie=h.createElement(xN,{alignPoint:le,...Yt(e,["rootClassName","onOpenChange"]),mouseEnterDelay:w,mouseLeaveDelay:y,visible:se,builtinPlacements:ie,arrow:!!r,overlayClassName:we,prefixCls:j,getPopupContainer:u||N,transitionName:oe,trigger:V,overlay:pe,placement:W,onVisibleChange:K,overlayStyle:{...Q,zIndex:Ne},autoDestroy:R??T},ce);return Ne&&(Ie=h.createElement(as.Provider,{value:Ee},Ie)),Ie}),uM=HP(ki,"align",void 0,"dropdown",e=>e),dM=e=>h.createElement(uM,{...e},h.createElement("span",null));ki._InternalPanelDoNotUseOrYouWillBeFired=dM;process.env.NODE_ENV!=="production"&&(ki.displayName="Dropdown");function Ii(e){return yt(e,{inputAffixPadding:e.paddingXXS})}const Ri=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,lineWidthFocus:i,controlHeightSM:a,controlHeightLG:s,fontSizeLG:l,lineHeightLG:c,paddingSM:u,controlPaddingHorizontalSM:d,controlPaddingHorizontal:f,colorFillAlter:p,colorPrimaryHover:g,colorPrimary:m,controlOutlineWidth:w,controlOutline:y,colorErrorOutline:$,colorWarningOutline:x,colorBgContainer:E,inputFontSize:C,inputFontSizeLG:v,inputFontSizeSM:T}=e,R=C||n,A=T||R,k=v||l,N=Math.round((t-R*r)/2*10)/10-o,z=Math.round((a-A*r)/2*10)/10-o,L=Math.ceil((s-k*c)/2*10)/10-o;return{lineWidthFocus:i===0?0:o,paddingBlock:Math.max(N,0),paddingBlockSM:Math.max(z,0),paddingBlockLG:Math.max(L,0),paddingInline:u-o,paddingInlineSM:d-o,paddingInlineLG:f-o,addonBg:p,activeBorderColor:m,hoverBorderColor:g,activeShadow:`0 0 0 ${w}px ${y}`,errorActiveShadow:`0 0 0 ${w}px ${$}`,warningActiveShadow:`0 0 0 ${w}px ${x}`,hoverBg:E,activeBg:E,inputFontSize:R,inputFontSizeLG:k,inputFontSizeSM:A}},fM=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),fd=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])":{...fM(yt(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),Ax=(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}}),tm=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Ax(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),pM=(e,t)=>({"&-outlined":{...Ax(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...fd(e)},...tm(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...tm(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),nm=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),mM=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ye(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...nm(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...nm(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...fd(e)}}}}),zx="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",Ox=(e,t)=>({outline:`${ye(e.lineWidthFocus)} ${e.lineType} ${t}`,outlineOffset:ye(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(n=>`${n} 0s`).join(", ")}),rm=(e,t)=>({"&, & input, & textarea":{color:t.color},[zx]:Ox(e,t.color),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),hM=(e,t)=>{const{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"},[zx]:Ox(e,e.activeBorderColor),[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:rm(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${n}-status-warning`]:rm(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},Dx=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(t==null?void 0:t.inputColor)??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),om=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Dx(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),gM=(e,t)=>({"&-filled":{...Dx(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...fd(e)},...om(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...om(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),im=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),bM=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...im(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...im(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:`${ye(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ye(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ye(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ye(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ye(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ye(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),Lx=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ye(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}}),am=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Lx(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`}}),xM=(e,t)=>({"&-underlined":{...Lx(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"},...am(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...am(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),yM=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Fx=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${ye(t)} ${ye(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},_x=e=>({padding:`${ye(e.paddingBlockSM)} ${ye(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),jx=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ye(e.paddingBlock)} ${ye(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...yM(e.colorTextPlaceholder),"&-lg":{...Fx(e),...t.largeStyle},"&-sm":{..._x(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),wM=e=>{const{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`]:{...Fx(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{..._x(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 ${ye(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${ye(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ye(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${ye(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${n}-cascader-picker`]:{margin:`-9px ${ye(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",...rc(),[`${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},[`
251
251
  & > ${t}-affix-wrapper,
252
252
  & > ${t}-number-affix-wrapper,
253
253
  & > ${n}-picker-range
@@ -260,7 +260,7 @@ html body {
260
260
  & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
261
261
  & > ${n}-select:last-child,
262
262
  & > ${n}-cascader-picker:last-child ${t},
263
- & > ${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`]:{}}}}},wM=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Ro(e),...jx(e),...fM(e),...gM(e),...mM(e),...bM(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"}}}},vM=e=>{const{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,...Vu(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${xe(e.inputAffixPadding)}`}}}},CM=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a}=e,s=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[s]:{...jx(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},"&-password-icon":{display:"inline-flex",color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}},...vM(e)},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},SM=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Ro(e),...yM(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}},...pM(e),...hM(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}}}}}},EM=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Bx=on(["Input","Shared"],e=>{const t=yt(e,Ii(e));return[wM(t),CM(t)]},Ri,{resetFont:!1}),Hx=on(["Input","Component"],e=>{const t=yt(e,Ii(e));return[SM(t),EM(t),td(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Ri,{resetFont:!1}),$M=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:o,paddingXS:i,fontSizeLG:a,fontSizeSM:s,borderRadiusLG:l,borderRadiusSM:c,colorBgContainerDisabled:u,lineWidth:d,lineType:f,antCls:p}=e,[h,m]=ur(p,"space-addon");return{[t]:[{...Ro(e),display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:r,margin:0,borderWidth:d,borderStyle:f,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:a,borderRadius:l},"&-small":{paddingInline:i,borderRadius:c,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}},{[h("addon-border-color")]:o,[h("addon-background")]:u,[h("addon-border-color-outlined")]:o,[h("addon-background-filled")]:u,borderColor:m("addon-border-color"),background:m("addon-background"),"&-variant-outlined":{[h("addon-border-color")]:m("addon-border-color-outlined")},"&-variant-filled":{[h("addon-border-color")]:"transparent",[h("addon-background")]:m("addon-background-filled"),[`&${t}-disabled`]:{[h("addon-border-color")]:o,[h("addon-background")]:u}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[h("addon-border-color-outlined")]:e.colorError,[h("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[h("addon-border-color-outlined")]:e.colorWarning,[h("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},kM=on("Addon",e=>[$M(e),td(e,{focus:!1})]),IM=b.forwardRef((e,t)=>{const{className:n,children:r,style:o,prefixCls:i,variant:a="outlined",disabled:s,status:l,...c}=e,{getPrefixCls:u,direction:d}=b.useContext(dt),f=u("space-addon",i),[p,h]=kM(f),{compactItemClassnames:m,compactSize:w}=No(f,d),y=Ma(f,l),$=Z(f,p,m,h,`${f}-variant-${a}`,y,{[`${f}-${w}`]:w,[`${f}-disabled`]:s},n);return b.createElement("div",{ref:t,className:$,style:o,...c},r)});function RM(e){return!!(e.addonBefore||e.addonAfter)}function PM(e){return!!(e.prefix||e.suffix||e.allowClear)}function sm(e,t,n){const r=t.cloneNode(!0),o=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=(...i)=>{t.setSelectionRange(...i)},o}function _a(e,t,n,r){if(!n)return;let o=t;if(t.type==="click"){o=sm(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=sm(t,e,r),n(o);return}n(o)}function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vc.apply(this,arguments)}const Vx=b.forwardRef((e,t)=>{var X,P,Y;const{inputElement:n,children:r,prefixCls:o,prefix:i,suffix:a,addonBefore:s,addonAfter:l,className:c,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:h,allowClear:m,value:w,handleReset:y,hidden:$,classes:x,classNames:E,dataAttrs:v,styles:C,components:I,onClear:N}=e,A=r??n,k=(I==null?void 0:I.affixWrapper)||"span",R=(I==null?void 0:I.groupWrapper)||"span",O=(I==null?void 0:I.wrapper)||"span",z=(I==null?void 0:I.groupAddon)||"span",D=b.useRef(null),M=K=>{var T;(T=D.current)!=null&&T.contains(K.target)&&(h==null||h())},L=PM(e);let _=b.cloneElement(A,{value:w,className:Z((X=A.props)==null?void 0:X.className,!L&&(E==null?void 0:E.variant))||null});const V=b.useRef(null);if(b.useImperativeHandle(t,()=>({nativeElement:V.current||D.current})),L){let K=null;if(m){const U=!d&&!f&&w&&!(typeof m=="object"&&m.disabled),re=`${o}-clear-icon`,j=typeof m=="object"&&(m!=null&&m.clearIcon)?m.clearIcon:"✖";K=b.createElement("button",{type:"button",onClick:H=>{y==null||y(H),N==null||N()},onMouseDown:H=>H.preventDefault(),className:Z(re,{[`${re}-hidden`]:!U,[`${re}-has-suffix`]:!!a},E==null?void 0:E.clear),style:C==null?void 0:C.clear},j)}const T=`${o}-affix-wrapper`,ne=Z(T,{[`${o}-disabled`]:d,[`${T}-disabled`]:d,[`${T}-focused`]:p,[`${T}-readonly`]:f,[`${T}-input-with-clear-btn`]:a&&m&&w},x==null?void 0:x.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),F=(a||m)&&b.createElement("span",{className:Z(`${o}-suffix`,E==null?void 0:E.suffix),style:C==null?void 0:C.suffix},K,a);_=b.createElement(k,Vc({className:ne,style:C==null?void 0:C.affixWrapper,onClick:M},v==null?void 0:v.affixWrapper,{ref:D}),i&&b.createElement("span",{className:Z(`${o}-prefix`,E==null?void 0:E.prefix),style:C==null?void 0:C.prefix},i),_,F)}if(RM(e)){const K=`${o}-group`,T=`${K}-addon`,ne=`${K}-wrapper`,F=Z(`${o}-wrapper`,K,x==null?void 0:x.wrapper,E==null?void 0:E.wrapper),U=Z(ne,{[`${ne}-disabled`]:d},x==null?void 0:x.group,E==null?void 0:E.groupWrapper);_=b.createElement(R,{className:U,ref:V},b.createElement(O,{className:F},s&&b.createElement(z,{className:T},s),_,l&&b.createElement(z,{className:T},l)))}return b.cloneElement(_,{className:Z((P=_.props)==null?void 0:P.className,c)||null,style:{...(Y=_.props)==null?void 0:Y.style,...u},hidden:$})});function Wx(e,t){return g.useMemo(()=>{let n={};t&&(n.show=typeof t=="object"&&t.formatter?t.formatter:!!t),n={...n,...e};const{show:r,...o}=n;return{...o,show:!!r,showFormatter:typeof r=="function"?r:void 0,strategy:o.strategy||(i=>i.length)}},[e,t])}function qx({countConfig:e,value:t,maxLength:n}){return g.useMemo(()=>{const r=e.max??n,o=e.strategy(t),i=!!r&&o>r,a=Number(r)>0,s=e.show?e.showFormatter?e.showFormatter({value:t,count:o,maxLength:r}):`${o}${a?` / ${r}`:""}`:void 0;return{mergedMax:r,isOutOfRange:i,dataCount:s}},[e,n,t])}function Xx({countConfig:e,getTarget:t}){const[n,r]=g.useState(null),o=g.useRef(t);return g.useEffect(()=>{o.current=t},[t]),g.useEffect(()=>{var a;n&&((a=o.current())==null||a.setSelectionRange(...n),r(null))},[n]),g.useCallback((a,s)=>{var c,u;let l=a;return!s&&e.exceedFormatter&&e.max&&e.strategy(a)>e.max&&(l=e.exceedFormatter(a,{max:e.max}),a!==l&&r([((c=o.current())==null?void 0:c.selectionStart)||0,((u=o.current())==null?void 0:u.selectionEnd)||0])),l},[e])}function Ux(e,t){const[n,r]=un(e,t),o=n==null?"":String(n);return{value:n,setValue:r,formatValue:o}}function ja(){return ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ja.apply(this,arguments)}const TM=b.forwardRef((e,t)=>{const{autoComplete:n,onChange:r,onFocus:o,onBlur:i,onPressEnter:a,onKeyDown:s,onKeyUp:l,prefixCls:c="rc-input",disabled:u,htmlSize:d,className:f,maxLength:p,suffix:h,showCount:m,count:w,type:y="text",classes:$,classNames:x,styles:E,onCompositionStart:v,onCompositionEnd:C,...I}=e,[N,A]=b.useState(!1),k=b.useRef(!1),R=b.useRef(!1),O=b.useRef(null),z=b.useRef(null),D=B=>{O.current&&Jg(O.current,B)},{setValue:M,formatValue:L}=Ux(e.defaultValue,e.value),_=Wx(w,m),{isOutOfRange:V,dataCount:X}=qx({countConfig:_,value:L,maxLength:p}),P=Xx({countConfig:_,getTarget:()=>O.current});b.useImperativeHandle(t,()=>{var B;return{focus:D,blur:()=>{var ie;(ie=O.current)==null||ie.blur()},setSelectionRange:(ie,ae,Se)=>{var ye;(ye=O.current)==null||ye.setSelectionRange(ie,ae,Se)},select:()=>{var ie;(ie=O.current)==null||ie.select()},input:O.current,nativeElement:((B=z.current)==null?void 0:B.nativeElement)||O.current}}),b.useEffect(()=>{R.current&&(R.current=!1),A(B=>B&&u?!1:B)},[u]);const Y=(B,ie,ae)=>{const Se=P(ie,k.current);ae.source==="compositionEnd"&&ie===Se||(M(Se),O.current&&_a(O.current,B,r,Se))},K=B=>{Y(B,B.target.value,{source:"change"})},T=B=>{k.current=!1,Y(B,B.currentTarget.value,{source:"compositionEnd"}),C==null||C(B)},ne=B=>{a&&B.key==="Enter"&&!R.current&&!B.nativeEvent.isComposing&&(R.current=!0,a(B)),s==null||s(B)},F=B=>{B.key==="Enter"&&(R.current=!1),l==null||l(B)},U=B=>{A(!0),o==null||o(B)},re=B=>{R.current&&(R.current=!1),A(!1),i==null||i(B)},j=B=>{M(""),D(),O.current&&_a(O.current,B,r)},H=V&&`${c}-out-of-range`,ee=()=>{const B=Yt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return b.createElement("input",ja({autoComplete:n},B,{onChange:K,onFocus:U,onBlur:re,onKeyDown:ne,onKeyUp:F,className:Z(c,{[`${c}-disabled`]:u},x==null?void 0:x.input),style:E==null?void 0:E.input,ref:O,size:d,type:y,onCompositionStart:ie=>{k.current=!0,v==null||v(ie)},onCompositionEnd:T}))},oe=()=>h||_.show?b.createElement(b.Fragment,null,_.show&&b.createElement("span",{className:Z(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!h},x==null?void 0:x.count),style:{...E==null?void 0:E.count}},X),h):null;return b.createElement(Vx,ja({},I,{prefixCls:c,className:Z(f,H),handleReset:j,value:L,focused:N,triggerFocus:D,suffix:oe(),disabled:u,classes:$,classNames:x,styles:E,ref:z}),ee())}),NM=`
263
+ & > ${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`]:{}}}}},vM=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Ro(e),...jx(e),...pM(e),...gM(e),...hM(e),...xM(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"}}}},CM=e=>{const{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,...Vu(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${ye(e.inputAffixPadding)}`}}}},SM=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a}=e,s=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[s]:{...jx(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},"&-password-icon":{display:"inline-flex",color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}},...CM(e)},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},EM=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Ro(e),...wM(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}},...mM(e),...bM(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}}}}}},$M=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Bx=on(["Input","Shared"],e=>{const t=yt(e,Ii(e));return[vM(t),SM(t)]},Ri,{resetFont:!1}),Hx=on(["Input","Component"],e=>{const t=yt(e,Ii(e));return[EM(t),$M(t),td(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Ri,{resetFont:!1}),kM=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:o,paddingXS:i,fontSizeLG:a,fontSizeSM:s,borderRadiusLG:l,borderRadiusSM:c,colorBgContainerDisabled:u,lineWidth:d,lineType:f,antCls:p}=e,[g,m]=ur(p,"space-addon");return{[t]:[{...Ro(e),display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:r,margin:0,borderWidth:d,borderStyle:f,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:a,borderRadius:l},"&-small":{paddingInline:i,borderRadius:c,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}},{[g("addon-border-color")]:o,[g("addon-background")]:u,[g("addon-border-color-outlined")]:o,[g("addon-background-filled")]:u,borderColor:m("addon-border-color"),background:m("addon-background"),"&-variant-outlined":{[g("addon-border-color")]:m("addon-border-color-outlined")},"&-variant-filled":{[g("addon-border-color")]:"transparent",[g("addon-background")]:m("addon-background-filled"),[`&${t}-disabled`]:{[g("addon-border-color")]:o,[g("addon-background")]:u}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[g("addon-border-color-outlined")]:e.colorError,[g("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[g("addon-border-color-outlined")]:e.colorWarning,[g("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},IM=on("Addon",e=>[kM(e),td(e,{focus:!1})]),RM=b.forwardRef((e,t)=>{const{className:n,children:r,style:o,prefixCls:i,variant:a="outlined",disabled:s,status:l,...c}=e,{getPrefixCls:u,direction:d}=b.useContext(dt),f=u("space-addon",i),[p,g]=IM(f),{compactItemClassnames:m,compactSize:w}=No(f,d),y=Ma(f,l),$=J(f,p,m,g,`${f}-variant-${a}`,y,{[`${f}-${w}`]:w,[`${f}-disabled`]:s},n);return b.createElement("div",{ref:t,className:$,style:o,...c},r)});function TM(e){return!!(e.addonBefore||e.addonAfter)}function PM(e){return!!(e.prefix||e.suffix||e.allowClear)}function sm(e,t,n){const r=t.cloneNode(!0),o=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=(...i)=>{t.setSelectionRange(...i)},o}function _a(e,t,n,r){if(!n)return;let o=t;if(t.type==="click"){o=sm(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=sm(t,e,r),n(o);return}n(o)}function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vc.apply(this,arguments)}const Vx=b.forwardRef((e,t)=>{var X,I,Q;const{inputElement:n,children:r,prefixCls:o,prefix:i,suffix:a,addonBefore:s,addonAfter:l,className:c,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:g,allowClear:m,value:w,handleReset:y,hidden:$,classes:x,classNames:E,dataAttrs:C,styles:v,components:T,onClear:R}=e,A=r??n,k=(T==null?void 0:T.affixWrapper)||"span",N=(T==null?void 0:T.groupWrapper)||"span",z=(T==null?void 0:T.wrapper)||"span",L=(T==null?void 0:T.groupAddon)||"span",D=b.useRef(null),M=Y=>{var P;(P=D.current)!=null&&P.contains(Y.target)&&(g==null||g())},O=PM(e);let F=b.cloneElement(A,{value:w,className:J((X=A.props)==null?void 0:X.className,!O&&(E==null?void 0:E.variant))||null});const H=b.useRef(null);if(b.useImperativeHandle(t,()=>({nativeElement:H.current||D.current})),O){let Y=null;if(m){const j=!d&&!f&&w&&!(typeof m=="object"&&m.disabled),ne=`${o}-clear-icon`,ee=typeof m=="object"&&(m!=null&&m.clearIcon)?m.clearIcon:"✖";Y=b.createElement("button",{type:"button",onClick:_=>{y==null||y(_),R==null||R()},onMouseDown:_=>_.preventDefault(),className:J(ne,{[`${ne}-hidden`]:!j,[`${ne}-has-suffix`]:!!a},E==null?void 0:E.clear),style:v==null?void 0:v.clear},ee)}const P=`${o}-affix-wrapper`,oe=J(P,{[`${o}-disabled`]:d,[`${P}-disabled`]:d,[`${P}-focused`]:p,[`${P}-readonly`]:f,[`${P}-input-with-clear-btn`]:a&&m&&w},x==null?void 0:x.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),W=(a||m)&&b.createElement("span",{className:J(`${o}-suffix`,E==null?void 0:E.suffix),style:v==null?void 0:v.suffix},Y,a);F=b.createElement(k,Vc({className:oe,style:v==null?void 0:v.affixWrapper,onClick:M},C==null?void 0:C.affixWrapper,{ref:D}),i&&b.createElement("span",{className:J(`${o}-prefix`,E==null?void 0:E.prefix),style:v==null?void 0:v.prefix},i),F,W)}if(TM(e)){const Y=`${o}-group`,P=`${Y}-addon`,oe=`${Y}-wrapper`,W=J(`${o}-wrapper`,Y,x==null?void 0:x.wrapper,E==null?void 0:E.wrapper),j=J(oe,{[`${oe}-disabled`]:d},x==null?void 0:x.group,E==null?void 0:E.groupWrapper);F=b.createElement(N,{className:j,ref:H},b.createElement(z,{className:W},s&&b.createElement(L,{className:P},s),F,l&&b.createElement(L,{className:P},l)))}return b.cloneElement(F,{className:J((I=F.props)==null?void 0:I.className,c)||null,style:{...(Q=F.props)==null?void 0:Q.style,...u},hidden:$})});function Wx(e,t){return h.useMemo(()=>{let n={};t&&(n.show=typeof t=="object"&&t.formatter?t.formatter:!!t),n={...n,...e};const{show:r,...o}=n;return{...o,show:!!r,showFormatter:typeof r=="function"?r:void 0,strategy:o.strategy||(i=>i.length)}},[e,t])}function qx({countConfig:e,value:t,maxLength:n}){return h.useMemo(()=>{const r=e.max??n,o=e.strategy(t),i=!!r&&o>r,a=Number(r)>0,s=e.show?e.showFormatter?e.showFormatter({value:t,count:o,maxLength:r}):`${o}${a?` / ${r}`:""}`:void 0;return{mergedMax:r,isOutOfRange:i,dataCount:s}},[e,n,t])}function Xx({countConfig:e,getTarget:t}){const[n,r]=h.useState(null),o=h.useRef(t);return h.useEffect(()=>{o.current=t},[t]),h.useEffect(()=>{var a;n&&((a=o.current())==null||a.setSelectionRange(...n),r(null))},[n]),h.useCallback((a,s)=>{var c,u;let l=a;return!s&&e.exceedFormatter&&e.max&&e.strategy(a)>e.max&&(l=e.exceedFormatter(a,{max:e.max}),a!==l&&r([((c=o.current())==null?void 0:c.selectionStart)||0,((u=o.current())==null?void 0:u.selectionEnd)||0])),l},[e])}function Ux(e,t){const[n,r]=un(e,t),o=n==null?"":String(n);return{value:n,setValue:r,formatValue:o}}function ja(){return ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ja.apply(this,arguments)}const NM=b.forwardRef((e,t)=>{const{autoComplete:n,onChange:r,onFocus:o,onBlur:i,onPressEnter:a,onKeyDown:s,onKeyUp:l,prefixCls:c="rc-input",disabled:u,htmlSize:d,className:f,maxLength:p,suffix:g,showCount:m,count:w,type:y="text",classes:$,classNames:x,styles:E,onCompositionStart:C,onCompositionEnd:v,...T}=e,[R,A]=b.useState(!1),k=b.useRef(!1),N=b.useRef(!1),z=b.useRef(null),L=b.useRef(null),D=q=>{z.current&&Jh(z.current,q)},{setValue:M,formatValue:O}=Ux(e.defaultValue,e.value),F=Wx(w,m),{isOutOfRange:H,dataCount:X}=qx({countConfig:F,value:O,maxLength:p}),I=Xx({countConfig:F,getTarget:()=>z.current});b.useImperativeHandle(t,()=>{var q;return{focus:D,blur:()=>{var ce;(ce=z.current)==null||ce.blur()},setSelectionRange:(ce,V,le)=>{var se;(se=z.current)==null||se.setSelectionRange(ce,V,le)},select:()=>{var ce;(ce=z.current)==null||ce.select()},input:z.current,nativeElement:((q=L.current)==null?void 0:q.nativeElement)||z.current}}),b.useEffect(()=>{N.current&&(N.current=!1),A(q=>q&&u?!1:q)},[u]);const Q=(q,ce,V)=>{const le=I(ce,k.current);V.source==="compositionEnd"&&ce===le||(M(le),z.current&&_a(z.current,q,r,le))},Y=q=>{Q(q,q.target.value,{source:"change"})},P=q=>{k.current=!1,Q(q,q.currentTarget.value,{source:"compositionEnd"}),v==null||v(q)},oe=q=>{a&&q.key==="Enter"&&!N.current&&!q.nativeEvent.isComposing&&(N.current=!0,a(q)),s==null||s(q)},W=q=>{q.key==="Enter"&&(N.current=!1),l==null||l(q)},j=q=>{A(!0),o==null||o(q)},ne=q=>{N.current&&(N.current=!1),A(!1),i==null||i(q)},ee=q=>{M(""),D(),z.current&&_a(z.current,q,r)},_=H&&`${c}-out-of-range`,ae=()=>{const q=Yt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return b.createElement("input",ja({autoComplete:n},q,{onChange:Y,onFocus:j,onBlur:ne,onKeyDown:oe,onKeyUp:W,className:J(c,{[`${c}-disabled`]:u},x==null?void 0:x.input),style:E==null?void 0:E.input,ref:z,size:d,type:y,onCompositionStart:ce=>{k.current=!0,C==null||C(ce)},onCompositionEnd:P}))},fe=()=>g||F.show?b.createElement(b.Fragment,null,F.show&&b.createElement("span",{className:J(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!g},x==null?void 0:x.count),style:{...E==null?void 0:E.count}},X),g):null;return b.createElement(Vx,ja({},T,{prefixCls:c,className:J(f,_),handleReset:ee,value:O,focused:R,triggerFocus:D,suffix:fe(),disabled:u,classes:$,classNames:x,styles:E,ref:L}),ae())}),MM=`
264
264
  min-height:0 !important;
265
265
  max-height:none !important;
266
266
  height:0 !important;
@@ -271,12 +271,12 @@ html body {
271
271
  top:0 !important;
272
272
  right:0 !important;
273
273
  pointer-events: none !important;
274
- `,MM=["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"],al={};let gn;function AM(e,t=!1){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&al[n])return al[n];const r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),l={sizingStyle:MM.map(c=>`${c}:${r.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(al[n]=l),l}function zM(e,t=!1,n=null,r=null){gn||(gn=document.createElement("textarea"),gn.setAttribute("tab-index","-1"),gn.setAttribute("aria-hidden","true"),gn.setAttribute("name","hiddenTextarea"),document.body.appendChild(gn)),e.getAttribute("wrap")?gn.setAttribute("wrap",e.getAttribute("wrap")):gn.removeAttribute("wrap");const{paddingSize:o,borderSize:i,boxSizing:a,sizingStyle:s}=AM(e,t);gn.setAttribute("style",`${s};${NM}`),gn.value=e.value||e.placeholder||"";let l,c,u,d=gn.scrollHeight;if(a==="border-box"?d+=i:a==="content-box"&&(d-=o),n!==null||r!==null){gn.value=" ";const p=gn.scrollHeight-o;n!==null&&(l=p*n,a==="border-box"&&(l=l+o+i),d=Math.max(l,d)),r!==null&&(c=p*r,a==="border-box"&&(c=c+o+i),u=d>c?void 0:"hidden",d=Math.min(c,d))}const f={height:d,overflowY:u,resize:"none"};return l&&(f.minHeight=l),c&&(f.maxHeight=c),f}function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wc.apply(this,arguments)}const sl=0,ll=1,cl=2,OM=g.forwardRef((e,t)=>{const{prefixCls:n,defaultValue:r,value:o,autoSize:i,onResize:a,className:s,style:l,disabled:c,onChange:u,onInternalAutoSize:d,...f}=e,[p,h]=un(r,o),m=p??"",w=M=>{h(M.target.value),u==null||u(M)},y=g.useRef(null);g.useImperativeHandle(t,()=>({textArea:y.current}));const[$,x]=g.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),E=!!i,[v,C]=g.useState(cl),[I,N]=g.useState(),A=()=>{C(sl),process.env.NODE_ENV==="test"&&(d==null||d())};Bt(()=>{E&&A()},[o,$,x,E]),Bt(()=>{if(v===sl)C(ll);else if(v===ll){const M=zM(y.current,!1,$,x);C(cl),N(M)}},[v]);const k=g.useRef(void 0),R=()=>{k.current!==void 0&&xt.cancel(k.current)},O=M=>{v===cl&&(a==null||a(M),i&&(R(),k.current=xt(()=>{A()})))};g.useEffect(()=>R,[]);const D={...l,...E?I:null};return(v===sl||v===ll)&&(D.overflowY="hidden",D.overflowX="hidden"),g.createElement(Io,{onResize:O,disabled:!(i||a)},g.createElement("textarea",Wc({},f,{ref:y,style:D,className:Z(n,s,{[`${n}-disabled`]:c}),disabled:c,value:m,onChange:w})))});function qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}const DM=b.forwardRef(({defaultValue:e,value:t,onFocus:n,onBlur:r,onChange:o,allowClear:i,maxLength:a,onCompositionStart:s,onCompositionEnd:l,suffix:c,prefixCls:u="rc-textarea",showCount:d,count:f,className:p,style:h,disabled:m,hidden:w,classNames:y,styles:$,onResize:x,onClear:E,onPressEnter:v,readOnly:C,autoSize:I,onKeyDown:N,...A},k)=>{const[R,O]=b.useState(!1),z=b.useRef(!1),[D,M]=b.useState(null),L=b.useRef(null),_=b.useRef(null),V=()=>{var q;return((q=_.current)==null?void 0:q.textArea)||null},{setValue:X,formatValue:P}=Ux(e,t),Y=Wx(f,d),{isOutOfRange:K,dataCount:T}=qx({countConfig:Y,value:P,maxLength:a}),ne=Xx({countConfig:Y,getTarget:()=>{var q;return((q=_.current)==null?void 0:q.textArea)||null}}),F=()=>{var q;(q=V())==null||q.focus()};b.useImperativeHandle(k,()=>{var q;return{resizableTextArea:_.current,focus:F,blur:()=>{var me;(me=V())==null||me.blur()},nativeElement:((q=L.current)==null?void 0:q.nativeElement)||V()}}),b.useEffect(()=>{O(q=>!m&&q)},[m]);const U=(q,me)=>{const he=ne(me,z.current);X(he),_a(q.currentTarget,q,o,he)},re=q=>{z.current=!0,s==null||s(q)},j=q=>{z.current=!1,U(q,q.currentTarget.value),l==null||l(q)},H=q=>{U(q,q.target.value)},ee=q=>{q.key==="Enter"&&v&&!q.nativeEvent.isComposing&&v(q),N==null||N(q)},oe=q=>{O(!0),n==null||n(q)},B=q=>{O(!1),r==null||r(q)},ie=q=>{X(""),F();const me=V();me&&_a(me,q,o)};let ae=c;Y.show&&(ae=b.createElement(b.Fragment,null,ae,b.createElement("span",{className:Z(`${u}-data-count`,y==null?void 0:y.count),style:$==null?void 0:$.count},T)));const Se=q=>{var me;x==null||x(q),(me=V())!=null&&me.style.height&&M(!0)},ye=!I&&!d&&!i;return b.createElement(Vx,{ref:L,value:P,allowClear:i,handleReset:ie,suffix:ae,prefixCls:u,classNames:{...y,affixWrapper:Z(y==null?void 0:y.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:i})},disabled:m,focused:R,className:Z(p,K&&`${u}-out-of-range`),style:{...h,...D&&!ye?{height:"auto"}:{}},dataAttrs:typeof T=="string"?{affixWrapper:{"data-count":T}}:void 0,styles:$,hidden:w,readOnly:C,onClear:E},b.createElement(OM,qc({},A,{autoSize:I,maxLength:a,onKeyDown:ee,onChange:H,onFocus:oe,onBlur:B,onCompositionStart:re,onCompositionEnd:j,className:Z(y==null?void 0:y.textarea),style:{resize:h==null?void 0:h.resize,...$==null?void 0:$.textarea},disabled:m,prefixCls:u,onResize:Se,ref:_,readOnly:C})))});function Gx(e,t){const n=b.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,s;(o=e.current)!=null&&o.input&&((i=e.current)==null?void 0:i.input.getAttribute("type"))==="password"&&((a=e.current)!=null&&a.input.hasAttribute("value"))&&((s=e.current)==null||s.input.removeAttribute("value"))}))};return b.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[t]),r}function LM(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}const Pi=b.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:o,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:h,styles:m,rootClassName:w,onChange:y,classNames:$,variant:x,...E}=e;if(process.env.NODE_ENV!=="production"){const{deprecated:pe}=At("Input");[["bordered","variant"],["addonAfter","Space.Compact"],["addonBefore","Space.Compact"]].forEach(([Ne,Ee])=>{pe(!(Ne in e),Ne,Ee)})}const{getPrefixCls:v,direction:C,allowClear:I,autoComplete:N,className:A,style:k,classNames:R,styles:O}=Kn("input"),z=v("input",n),D=b.useRef(null),M=Po(z),[L,_]=Bx(z,w);Hx(z,M);const{compactSize:V,compactItemClassnames:X}=No(z,C),P=To(pe=>i??V??pe),Y=b.useContext(yr),K=a??Y,T={...e,size:P,disabled:K},ne=kt(k),F=kt(h),[U,re]=Pn([R,$],[O,ne,m,F],{props:T}),{status:j,hasFeedback:H,feedbackIcon:ee}=b.useContext(sr),oe=nd(j,o),B=LM(e)||!!H,ie=b.useRef(B);if(process.env.NODE_ENV!=="production"){const pe=At("Input");b.useEffect(()=>{var Ne;B&&!ie.current&&process.env.NODE_ENV!=="production"&&pe(document.activeElement===((Ne=D.current)==null?void 0:Ne.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ie.current=B},[B])}const ae=Gx(D,!0),Se=pe=>{ae(),s==null||s(pe)},ye=pe=>{ae(),l==null||l(pe)},q=pe=>{ae(),y==null||y(pe)},me=(H||c)&&b.createElement(b.Fragment,null,c,H&&ee),he=Pb({allowClear:u,contextAllowClear:I,componentName:"Input"}),[se,ue]=wo("input",x,r);return b.createElement(TM,{ref:Gn(t,D),prefixCls:z,autoComplete:N,...E,disabled:K,onBlur:Se,onFocus:ye,style:re.root,styles:re,suffix:me,allowClear:he,className:Z(p,w,_,M,X,A,U.root),onChange:q,addonBefore:f&&b.createElement(Ta,{form:!0,space:!0},f),addonAfter:d&&b.createElement(Ta,{form:!0,space:!0},d),classNames:{...U,input:Z({[`${z}-sm`]:P==="small",[`${z}-lg`]:P==="large",[`${z}-rtl`]:C==="rtl"},U.input,L),variant:Z({[`${z}-${se}`]:ue},Ma(z,oe)),affixWrapper:Z({[`${z}-affix-wrapper-sm`]:P==="small",[`${z}-affix-wrapper-lg`]:P==="large",[`${z}-affix-wrapper-rtl`]:C==="rtl"},L),wrapper:Z({[`${z}-group-rtl`]:C==="rtl"},L),groupWrapper:Z({[`${z}-group-wrapper-sm`]:P==="small",[`${z}-group-wrapper-lg`]:P==="large",[`${z}-group-wrapper-rtl`]:C==="rtl",[`${z}-group-wrapper-${se}`]:ue},Ma(`${z}-group-wrapper`,oe,H),L)}})});process.env.NODE_ENV!=="production"&&(Pi.displayName="Input");function Ba(e){return["small","middle","medium","large"].includes(e)}function lm(e){return e?os(e):!1}const Kx=b.createContext({latestIndex:0}),FM=Kx.Provider,_M=e=>{const{className:t,prefix:n,index:r,children:o,separator:i,style:a,classNames:s,styles:l}=e,{latestIndex:c}=g.useContext(Kx);return yi(o)?g.createElement(g.Fragment,null,g.createElement("div",{className:t,style:a},o),r<c&&i&&g.createElement("span",{className:Z(`${n}-item-separator`,s==null?void 0:s.separator),style:l==null?void 0:l.separator},i)):null},jM=e=>{const{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"}}}},BM=e=>{const{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}}}},HM=on("Space",e=>{const t=yt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[jM(t),BM(t)]},()=>({}),{resetStyle:!1}),VM=g.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:o,className:i,style:a,classNames:s,styles:l}=Kn("space"),{size:c=o??"small",align:u,className:d,rootClassName:f,children:p,direction:h,orientation:m,prefixCls:w,split:y,separator:$,style:x,vertical:E,wrap:v=!1,classNames:C,styles:I,...N}=e,[A,k]=Array.isArray(c)?c:[c,c],R=Ba(k),O=Ba(A),z=lm(k),D=lm(A),M=or(p,{keepEmpty:!0}),[L,_]=Qu(m,E,h),V=u===void 0&&!_?"center":u,X=$??y,P=n("space",w),[Y,K]=HM(P),T={...e,size:c,orientation:L,align:V},ne=kt(a),F=kt(x),[U,re]=Pn([s,C],[l,ne,I,F],{props:T}),j=Z(P,i,Y,`${P}-${L}`,{[`${P}-rtl`]:r==="rtl",[`${P}-align-${V}`]:V,[`${P}-gap-row-${k}`]:R,[`${P}-gap-col-${A}`]:O},d,f,K,U.root),H=Z(`${P}-item`,U.item),ee=M.map((ie,ae)=>{const Se=(ie==null?void 0:ie.key)||`${H}-${ae}`;return g.createElement(_M,{prefix:P,classNames:U,styles:re,className:H,key:Se,index:ae,separator:X,style:re.item},ie)});if(process.env.NODE_ENV!=="production"){const ie=At("Space");[["direction","orientation"],["split","separator"]].forEach(([ae,Se])=>{ie.deprecated(!(ae in e),ae,Se)})}const oe=g.useMemo(()=>({latestIndex:M.reduce((ae,Se,ye)=>yi(Se)?ye:ae,0)}),[M]);if(M.length===0)return null;const B={};return v&&(B.flexWrap="wrap"),!O&&D&&(B.columnGap=A),!R&&z&&(B.rowGap=k),g.createElement("div",{ref:t,className:j,style:{...B,...re.root},...N},g.createElement(FM,{value:oe},ee))}),Ti=VM;Ti.Compact=Ab;Ti.Addon=IM;process.env.NODE_ENV!=="production"&&(Ti.displayName="Space");const Yx=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=g.useContext(dt),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:p,arrow:h,autoFocus:m,trigger:w,align:y,open:$,onOpenChange:x,placement:E,getPopupContainer:v,href:C,icon:I=g.createElement(dd,null),title:N,buttonsRender:A=ee=>ee,mouseEnterDelay:k,mouseLeaveDelay:R,overlayClassName:O,overlayStyle:z,destroyOnHidden:D,destroyPopupOnHide:M,dropdownRender:L,popupRender:_,...V}=e,X=n("dropdown",o),P=`${X}-button`,K={menu:p,arrow:h,autoFocus:m,align:y,disabled:s,trigger:s?[]:w,onOpenChange:x,getPopupContainer:v||t,mouseEnterDelay:k,mouseLeaveDelay:R,classNames:{root:O},styles:{root:z},destroyOnHidden:D,popupRender:_||L},{compactSize:T,compactItemClassnames:ne}=No(X,r),F=Z(P,ne,f);"destroyPopupOnHide"in e&&(K.destroyPopupOnHide=M),"open"in e&&(K.open=$),"placement"in e?K.placement=E:K.placement=r==="rtl"?"bottomLeft":"bottomRight",process.env.NODE_ENV!=="production"&&At("Dropdown.Button").deprecated(!1,"Dropdown.Button","Space.Compact + Dropdown + Button");const U=g.createElement(ar,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:C,title:N},d),re=g.createElement(ar,{type:i,danger:a,icon:I}),[j,H]=A([U,re]);return g.createElement(Ti.Compact,{className:F,size:T,block:!0,...V},j,g.createElement(ki,{...K},H))};Yx.__ANT_BUTTON=!0;const Qx=ki;Qx.Button=Yx;const Zx=["wrap","nowrap","wrap-reverse"],Jx=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],e0=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],WM=(e,t)=>{const n=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${n}`]:n&&Zx.includes(n)}},qM=(e,t)=>{const n={};return e0.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},XM=(e,t)=>{const n={};return Jx.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n},UM=(e,t)=>Z({...WM(e,t),...qM(e,t),...XM(e,t)}),GM=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},KM=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},YM=e=>{const{componentCls:t}=e,n={};return Zx.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r}}),n},QM=e=>{const{componentCls:t}=e,n={};return e0.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r}}),n},ZM=e=>{const{componentCls:t}=e,n={};return Jx.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r}}),n},JM=()=>({}),eA=on("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=yt(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[GM(o),KM(o),YM(o),QM(o),ZM(o)]},JM,{resetStyle:!1}),t0=b.forwardRef((e,t)=>{const{prefixCls:n,rootClassName:r,className:o,style:i,flex:a,gap:s,vertical:l,orientation:c,component:u="div",children:d,...f}=e,{flex:p,direction:h,getPrefixCls:m}=b.useContext(dt),w=m("flex",n),[y,$]=eA(w),[,x]=Qu(c,l??(p==null?void 0:p.vertical)),E=Z(o,r,p==null?void 0:p.className,w,y,$,UM(w,{...e,vertical:x}),{[`${w}-rtl`]:h==="rtl",[`${w}-gap-${s}`]:Ba(s),[`${w}-vertical`]:x}),v={...p==null?void 0:p.style,...i};return Tl(a)&&(v.flex=a),Tl(s)&&!Ba(s)&&(v.gap=s),b.createElement(u,{ref:t,className:E,style:v,...Yt(f,["justify","wrap","align"])},d)});process.env.NODE_ENV!=="production"&&(t0.displayName="Flex");const tA=e=>{const{getPrefixCls:t,direction:n}=b.useContext(dt),{prefixCls:r,className:o}=e,i=t("input-group",r),a=t("input"),[s,l]=Hx(a),c=Z(i,l,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},s,o),u=b.useContext(sr),d=b.useMemo(()=>({...u,isFormItemInput:!1}),[u]);return process.env.NODE_ENV!=="production"&&At("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),g.createElement(sr.Provider,{value:d},g.createElement(Ti.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},nA=e=>{const{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}}}},rA=on(["Input","OTP"],e=>{const t=yt(e,Ii(e));return nA(t)},Ri),oA="•",iA=g.forwardRef((e,t)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:a,mask:s,onFocus:l,type:c,...u}=e,{getPrefixCls:d}=g.useContext(dt),f=d("otp"),p=typeof s=="string"?s:oA,h=g.useRef(null);g.useImperativeHandle(t,()=>h.current);const m=x=>{o(a,x.target.value)},w=()=>{xt(()=>{var E;const x=(E=h.current)==null?void 0:E.input;document.activeElement===x&&x&&x.select()})},y=x=>{l==null||l(x),w()},$=x=>{const{key:E,ctrlKey:v,metaKey:C}=x;E==="ArrowLeft"?i(a-1):E==="ArrowRight"?i(a+1):E==="z"&&(v||C)?x.preventDefault():E==="Backspace"&&!r&&i(a-1),w()};return g.createElement("span",{className:`${f}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&g.createElement("span",{className:`${f}-mask-icon`,"aria-hidden":"true"},p),g.createElement(Pi,{"aria-label":`OTP Input ${a+1}`,...u,type:c??(s?"password":"text"),ref:h,value:r,onInput:m,onFocus:y,onKeyDown:$,onMouseDown:w,onMouseUp:w,className:Z(n,{[`${f}-mask-input`]:s})}))});function Qi(e){return(e||"").split("")}const aA=e=>{const{index:t,prefixCls:n,separator:r,className:o,style:i}=e,a=Qt(r)?r(t):r;return a?g.createElement("span",{className:Z(`${n}-separator`,o),style:i},a):null},sA=g.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:p,mask:h,type:m,autoComplete:w,onInput:y,onFocus:$,inputMode:x,classNames:E,styles:v,className:C,style:I,...N}=e;if(process.env.NODE_ENV!=="production"){const se=At("Input.OTP");process.env.NODE_ENV!=="production"&&se(!(typeof h=="string"&&h.length>1),"usage","`mask` prop should be a single character.")}const{classNames:A,styles:k,getPrefixCls:R,direction:O,style:z,className:D}=Kn("otp"),M=R("otp",n),[L]=wo("otp",u,void 0,"input"),_={...e,length:r,variant:L},V=kt(z),X=kt(I),[P,Y]=Pn([A,E],[k,V,v,X],{props:_}),K=nh(N,{aria:!0,data:!0,attr:!0}),[T,ne]=rA(M),F=To(se=>o??se),U=g.useContext(sr),re=nd(U.status,f),j=g.useMemo(()=>({...U,status:re,hasFeedback:!1,feedbackIcon:null}),[U,re]),H=g.useRef(null),ee=g.useRef({});g.useImperativeHandle(t,()=>({focus:()=>{var se;(se=ee.current[0])==null||se.focus()},blur:()=>{var se;for(let ue=0;ue<r;ue+=1)(se=ee.current[ue])==null||se.blur()},nativeElement:H.current}));const oe=se=>l?l(se):se,[B,ie]=g.useState(()=>Qi(oe(i||"")));g.useEffect(()=>{a!==void 0&&ie(Qi(a))},[a]);const ae=Ge(se=>{ie(se),y&&y(se),s&&se.length===r&&se.every(ue=>ue)&&se.some((ue,pe)=>B[pe]!==ue)&&s(se.join(""))}),Se=Ge((se,ue)=>{let pe=jr(B);for(let Ee=0;Ee<se;Ee+=1)pe[Ee]||(pe[Ee]="");ue.length<=1?pe[se]=ue:pe=pe.slice(0,se).concat(Qi(ue)),pe=pe.slice(0,r);for(let Ee=pe.length-1;Ee>=0&&!pe[Ee];Ee-=1)pe.pop();const Ne=oe(pe.map(Ee=>Ee||" ").join(""));return pe=Qi(Ne).map((Ee,Ie)=>Ee===" "&&!pe[Ie]?pe[Ie]:Ee),pe}),ye=(se,ue)=>{var Ee;const pe=Se(se,ue),Ne=Math.min(se+ue.length,r-1);Ne!==se&&pe[se]!==void 0&&((Ee=ee.current[Ne])==null||Ee.focus()),ae(pe)},q=se=>{var ue;(ue=ee.current[se])==null||ue.focus()},me=(se,ue)=>{var pe,Ne,Ee;for(let Ie=0;Ie<ue;Ie+=1)if(!((Ne=(pe=ee.current[Ie])==null?void 0:pe.input)!=null&&Ne.value)){(Ee=ee.current[Ie])==null||Ee.focus();break}$==null||$(se)},he={variant:L,disabled:d,status:re,mask:h,type:m,inputMode:x,autoComplete:w};return g.createElement("div",{...K,ref:H,className:Z(C,M,{[`${M}-sm`]:F==="small",[`${M}-lg`]:F==="large",[`${M}-rtl`]:O==="rtl"},ne,T,D,P.root),style:Y.root,role:"group"},g.createElement(sr.Provider,{value:j},Array.from({length:r}).map((se,ue)=>{const pe=`otp-${ue}`,Ne=B[ue]||"";return g.createElement(g.Fragment,{key:pe},g.createElement(iA,{ref:Ee=>{ee.current[ue]=Ee},index:ue,size:F,htmlSize:1,className:Z(P.input,`${M}-input`),style:Y.input,onChange:ye,value:Ne,onActiveChange:q,autoFocus:ue===0&&p,onFocus:Ee=>me(Ee,ue),...he}),ue<r-1&&g.createElement(aA,{separator:c,index:ue,prefixCls:M,className:Z(P.separator),style:Y.separator}))})))});var lA={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 Xc(){return Xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xc.apply(this,arguments)}const cA=(e,t)=>g.createElement(Jt,Xc({},e,{ref:t,icon:lA})),n0=g.forwardRef(cA);process.env.NODE_ENV!=="production"&&(n0.displayName="EyeInvisibleOutlined");var uA={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 Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uc.apply(this,arguments)}const dA=(e,t)=>g.createElement(Jt,Uc({},e,{ref:t,icon:uA})),r0=g.forwardRef(dA);process.env.NODE_ENV!=="production"&&(r0.displayName="EyeOutlined");const fA=e=>e?g.createElement(r0,null):g.createElement(n0,null),pA={click:"onClick",hover:"onMouseOver"},o0=g.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i,prefixCls:a,inputPrefixCls:s,suffix:l,className:c,style:u,classNames:d,styles:f,variant:p,...h}=e,{getPrefixCls:m,className:w,style:y,classNames:$,styles:x,iconRender:E}=Kn("inputPassword"),[v]=wo("inputPassword",p,e.bordered,"input"),[C]=OI("global"),I=g.useContext(yr),N=n??I,A={...e,disabled:N,variant:v},k=kt(y),R=kt(u),[O,z]=Pn([$,d],[x,k,f,R],{props:A}),D=rn(o)&&o.visible!==void 0,[M,L]=b.useState(()=>D?o.visible:!1),_=b.useRef(null);g.useEffect(()=>{D&&L(o.visible)},[D,o]);const V=Gx(_),X=()=>{var re;if(N)return;M&&V();const U=!M;D||L(U),rn(o)&&((re=o.onVisibleChange)==null||re.call(o,U))},P=U=>{const re=pA[r]||"",H=(i||E||fA)(M),ee=rn(o)?o.tabIndex:void 0;return g.createElement("span",{key:"passwordIcon",role:"button",tabIndex:N?-1:ee??0,className:`${U}-icon`,"aria-disabled":N,"aria-pressed":M,"aria-label":M?C.hide:C.show,onMouseDown:oe=>{oe.preventDefault()},onMouseUp:oe=>{oe.preventDefault()},onKeyDown:oe=>{(oe.key==="Enter"||oe.key===" ")&&(oe.preventDefault(),oe.repeat||X())},[re]:X},H)},Y=m("input",s),K=m("input-password",a),T=o&&P(K),ne=Z(K,w,c,{[`${K}-${e.size}`]:!!e.size}),F={...h,type:M?"text":"password",prefixCls:Y,suffix:g.createElement(g.Fragment,null,T,l),disabled:N,className:ne,classNames:O,styles:z,variant:v};return g.createElement(Pi,{ref:Gn(t,_),...F})});process.env.NODE_ENV!=="production"&&(o0.displayName="Input.Password");const mA=e=>{const{componentCls:t,antCls:n,calc:r,max:o}=e,i=`${t}-btn`,[a,s]=ur(n,"input-search"),l=e.inputFontSizeSM??e.fontSize,c=o(e.controlHeightSM,r(l).mul(e.lineHeight).add(r(e.paddingBlockSM).mul(2)).add(r(e.lineWidth).mul(2)).equal());return{[t]:{[a("btn-height")]:xe(e.controlHeight),width:"100%",[i]:{height:s("btn-height"),"&:focus-visible":{zIndex:5},[`&${n}-btn-icon-only`]:{width:s("btn-height")},"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}},[`&${t}-large`]:{[a("btn-height")]:xe(e.controlHeightLG)},[`&${t}-small`]:{[a("btn-height")]:xe(e.controlHeightSM)},[`&${t}-small ${i}`]:{minHeight:c,[`&${e.antCls}-btn-icon-only`]:{minWidth:c}}}}},gA=on(["Input","Search"],e=>{const t=yt(e,Ii(e));return mA(t)},Ri),i0=g.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,style:a,enterButton:s=!1,searchIcon:l,addonAfter:c,loading:u,disabled:d,onSearch:f,onChange:p,onCompositionStart:h,onCompositionEnd:m,variant:w,onPressEnter:y,classNames:$,styles:x,hidden:E,...v}=e,{direction:C,getPrefixCls:I,className:N,style:A,classNames:k,styles:R,searchIcon:O}=Kn("inputSearch"),z=g.useContext(yr),D=d??z,[M,,L]=wo("inputSearch",w,e.bordered),_=L?M:void 0,[V]=wo("inputSearch",w,e.bordered,"input"),X={...e,enterButton:s,variant:_},P=kt(A),Y=kt(a),[K,T]=Pn([k,$],[R,P,x,Y],{props:X},{button:{_default:"root"}}),ne=g.useRef(!1),F=I("input-search",n),U=I("input",r),[re,j]=gA(F),{compactSize:H}=No(F,C),ee=To(Q=>i??H??Q),oe=g.useRef(null),B=Q=>{Q!=null&&Q.target&&Q.type==="click"&&f&&f(Q.target.value,Q,{source:"clear"}),p==null||p(Q)},ie=Q=>{var le;document.activeElement===((le=oe.current)==null?void 0:le.input)&&Q.preventDefault()},ae=Q=>{var le,be;f&&f((be=(le=oe.current)==null?void 0:le.input)==null?void 0:be.value,Q,{source:"input"})},Se=Q=>{ne.current||u||(y==null||y(Q),ae(Q))},ye=typeof s=="boolean"?Rb(l,O,g.createElement(lx,null)):null,q=`${F}-btn`,me=Z(q,{[`${q}-${_}`]:_});let he;const se=s||{},ue=se.type&&se.type.__ANT_BUTTON===!0;if(ue||se.type==="button"){const Q=se.props;he=Dn(se,{disabled:D||Q.disabled||!ue&&u,onMouseDown:le=>{var be;(be=Q.onMouseDown)==null||be.call(Q,le),ie(le)},onClick:le=>{var be,$e;($e=(be=se==null?void 0:se.props)==null?void 0:be.onClick)==null||$e.call(be,le),ae(le)},key:"enterButton",...ue?{className:Z(me,Q.className),loading:u||Q.loading,size:ee}:{}})}else he=g.createElement(ar,{classNames:K.button,styles:T.button,className:me,color:s?"primary":"default",size:ee,disabled:d,key:"enterButton",onMouseDown:ie,onClick:ae,loading:u,icon:ye,variant:_==="borderless"||_==="filled"||_==="underlined"?"text":s?"solid":void 0},s);c&&(he=[he,Dn(c,{key:"addonAfter"})]);const pe=Z(F,j,{[`${F}-rtl`]:C==="rtl",[`${F}-${ee}`]:!!ee,[`${F}-with-button`]:!!s},o,N,re,K.root),Ne=Q=>{ne.current=!0,h==null||h(Q)},Ee=Q=>{ne.current=!1,m==null||m(Q)},Ie=nh(v,{data:!0}),W=Yt({...v,classNames:Yt(K,["button","root"]),styles:Yt(T,["button","root"]),prefixCls:U,type:"search",size:ee,variant:V,onPressEnter:Se,onCompositionStart:Ne,onCompositionEnd:Ee,onChange:B,disabled:d},Object.keys(Ie));return g.createElement(Ab,{className:pe,style:T.root,...Ie,hidden:E},g.createElement(Pi,{ref:Gn(oe,t),...W}),he)});process.env.NODE_ENV!=="production"&&(i0.displayName="Search");const hA=e=>{const{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","@media (hover: none) and (pointer: coarse)":{resize:"none"},[`&${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"}},[`
274
+ `,AM=["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"],al={};let hn;function zM(e,t=!1){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&al[n])return al[n];const r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),l={sizingStyle:AM.map(c=>`${c}:${r.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(al[n]=l),l}function OM(e,t=!1,n=null,r=null){hn||(hn=document.createElement("textarea"),hn.setAttribute("tab-index","-1"),hn.setAttribute("aria-hidden","true"),hn.setAttribute("name","hiddenTextarea"),document.body.appendChild(hn)),e.getAttribute("wrap")?hn.setAttribute("wrap",e.getAttribute("wrap")):hn.removeAttribute("wrap");const{paddingSize:o,borderSize:i,boxSizing:a,sizingStyle:s}=zM(e,t);hn.setAttribute("style",`${s};${MM}`),hn.value=e.value||e.placeholder||"";let l,c,u,d=hn.scrollHeight;if(a==="border-box"?d+=i:a==="content-box"&&(d-=o),n!==null||r!==null){hn.value=" ";const p=hn.scrollHeight-o;n!==null&&(l=p*n,a==="border-box"&&(l=l+o+i),d=Math.max(l,d)),r!==null&&(c=p*r,a==="border-box"&&(c=c+o+i),u=d>c?void 0:"hidden",d=Math.min(c,d))}const f={height:d,overflowY:u,resize:"none"};return l&&(f.minHeight=l),c&&(f.maxHeight=c),f}function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wc.apply(this,arguments)}const sl=0,ll=1,cl=2,DM=h.forwardRef((e,t)=>{const{prefixCls:n,defaultValue:r,value:o,autoSize:i,onResize:a,className:s,style:l,disabled:c,onChange:u,onInternalAutoSize:d,...f}=e,[p,g]=un(r,o),m=p??"",w=M=>{g(M.target.value),u==null||u(M)},y=h.useRef(null);h.useImperativeHandle(t,()=>({textArea:y.current}));const[$,x]=h.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),E=!!i,[C,v]=h.useState(cl),[T,R]=h.useState(),A=()=>{v(sl),process.env.NODE_ENV==="test"&&(d==null||d())};Bt(()=>{E&&A()},[o,$,x,E]),Bt(()=>{if(C===sl)v(ll);else if(C===ll){const M=OM(y.current,!1,$,x);v(cl),R(M)}},[C]);const k=h.useRef(void 0),N=()=>{k.current!==void 0&&xt.cancel(k.current)},z=M=>{C===cl&&(a==null||a(M),i&&(N(),k.current=xt(()=>{A()})))};h.useEffect(()=>N,[]);const D={...l,...E?T:null};return(C===sl||C===ll)&&(D.overflowY="hidden",D.overflowX="hidden"),h.createElement(Io,{onResize:z,disabled:!(i||a)},h.createElement("textarea",Wc({},f,{ref:y,style:D,className:J(n,s,{[`${n}-disabled`]:c}),disabled:c,value:m,onChange:w})))});function qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}const LM=b.forwardRef(({defaultValue:e,value:t,onFocus:n,onBlur:r,onChange:o,allowClear:i,maxLength:a,onCompositionStart:s,onCompositionEnd:l,suffix:c,prefixCls:u="rc-textarea",showCount:d,count:f,className:p,style:g,disabled:m,hidden:w,classNames:y,styles:$,onResize:x,onClear:E,onPressEnter:C,readOnly:v,autoSize:T,onKeyDown:R,...A},k)=>{const[N,z]=b.useState(!1),L=b.useRef(!1),[D,M]=b.useState(null),O=b.useRef(null),F=b.useRef(null),H=()=>{var G;return((G=F.current)==null?void 0:G.textArea)||null},{setValue:X,formatValue:I}=Ux(e,t),Q=Wx(f,d),{isOutOfRange:Y,dataCount:P}=qx({countConfig:Q,value:I,maxLength:a}),oe=Xx({countConfig:Q,getTarget:()=>{var G;return((G=F.current)==null?void 0:G.textArea)||null}}),W=()=>{var G;(G=H())==null||G.focus()};b.useImperativeHandle(k,()=>{var G;return{resizableTextArea:F.current,focus:W,blur:()=>{var K;(K=H())==null||K.blur()},nativeElement:((G=O.current)==null?void 0:G.nativeElement)||H()}}),b.useEffect(()=>{z(G=>!m&&G)},[m]);const j=(G,K)=>{const we=oe(K,L.current);X(we),_a(G.currentTarget,G,o,we)},ne=G=>{L.current=!0,s==null||s(G)},ee=G=>{L.current=!1,j(G,G.currentTarget.value),l==null||l(G)},_=G=>{j(G,G.target.value)},ae=G=>{G.key==="Enter"&&C&&!G.nativeEvent.isComposing&&C(G),R==null||R(G)},fe=G=>{z(!0),n==null||n(G)},q=G=>{z(!1),r==null||r(G)},ce=G=>{X(""),W();const K=H();K&&_a(K,G,o)};let V=c;Q.show&&(V=b.createElement(b.Fragment,null,V,b.createElement("span",{className:J(`${u}-data-count`,y==null?void 0:y.count),style:$==null?void 0:$.count},P)));const le=G=>{var K;x==null||x(G),(K=H())!=null&&K.style.height&&M(!0)},se=!T&&!d&&!i;return b.createElement(Vx,{ref:O,value:I,allowClear:i,handleReset:ce,suffix:V,prefixCls:u,classNames:{...y,affixWrapper:J(y==null?void 0:y.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:i})},disabled:m,focused:N,className:J(p,Y&&`${u}-out-of-range`),style:{...g,...D&&!se?{height:"auto"}:{}},dataAttrs:typeof P=="string"?{affixWrapper:{"data-count":P}}:void 0,styles:$,hidden:w,readOnly:v,onClear:E},b.createElement(DM,qc({},A,{autoSize:T,maxLength:a,onKeyDown:ae,onChange:_,onFocus:fe,onBlur:q,onCompositionStart:ne,onCompositionEnd:ee,className:J(y==null?void 0:y.textarea),style:{resize:g==null?void 0:g.resize,...$==null?void 0:$.textarea},disabled:m,prefixCls:u,onResize:le,ref:F,readOnly:v})))});function Gx(e,t){const n=b.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,s;(o=e.current)!=null&&o.input&&((i=e.current)==null?void 0:i.input.getAttribute("type"))==="password"&&((a=e.current)!=null&&a.input.hasAttribute("value"))&&((s=e.current)==null||s.input.removeAttribute("value"))}))};return b.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[t]),r}function FM(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}const Ti=b.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:o,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:g,styles:m,rootClassName:w,onChange:y,classNames:$,variant:x,...E}=e;if(process.env.NODE_ENV!=="production"){const{deprecated:pe}=At("Input");[["bordered","variant"],["addonAfter","Space.Compact"],["addonBefore","Space.Compact"]].forEach(([Ne,Ee])=>{pe(!(Ne in e),Ne,Ee)})}const{getPrefixCls:C,direction:v,allowClear:T,autoComplete:R,className:A,style:k,classNames:N,styles:z}=Kn("input"),L=C("input",n),D=b.useRef(null),M=To(L),[O,F]=Bx(L,w);Hx(L,M);const{compactSize:H,compactItemClassnames:X}=No(L,v),I=Po(pe=>i??H??pe),Q=b.useContext(yr),Y=a??Q,P={...e,size:I,disabled:Y},oe=kt(k),W=kt(g),[j,ne]=Tn([N,$],[z,oe,m,W],{props:P}),{status:ee,hasFeedback:_,feedbackIcon:ae}=b.useContext(sr),fe=nd(ee,o),q=FM(e)||!!_,ce=b.useRef(q);if(process.env.NODE_ENV!=="production"){const pe=At("Input");b.useEffect(()=>{var Ne;q&&!ce.current&&process.env.NODE_ENV!=="production"&&pe(document.activeElement===((Ne=D.current)==null?void 0:Ne.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ce.current=q},[q])}const V=Gx(D,!0),le=pe=>{V(),s==null||s(pe)},se=pe=>{V(),l==null||l(pe)},G=pe=>{V(),y==null||y(pe)},K=(_||c)&&b.createElement(b.Fragment,null,c,_&&ae),we=Tb({allowClear:u,contextAllowClear:T,componentName:"Input"}),[ie,me]=wo("input",x,r);return b.createElement(NM,{ref:Gn(t,D),prefixCls:L,autoComplete:R,...E,disabled:Y,onBlur:le,onFocus:se,style:ne.root,styles:ne,suffix:K,allowClear:we,className:J(p,w,F,M,X,A,j.root),onChange:G,addonBefore:f&&b.createElement(Pa,{form:!0,space:!0},f),addonAfter:d&&b.createElement(Pa,{form:!0,space:!0},d),classNames:{...j,input:J({[`${L}-sm`]:I==="small",[`${L}-lg`]:I==="large",[`${L}-rtl`]:v==="rtl"},j.input,O),variant:J({[`${L}-${ie}`]:me},Ma(L,fe)),affixWrapper:J({[`${L}-affix-wrapper-sm`]:I==="small",[`${L}-affix-wrapper-lg`]:I==="large",[`${L}-affix-wrapper-rtl`]:v==="rtl"},O),wrapper:J({[`${L}-group-rtl`]:v==="rtl"},O),groupWrapper:J({[`${L}-group-wrapper-sm`]:I==="small",[`${L}-group-wrapper-lg`]:I==="large",[`${L}-group-wrapper-rtl`]:v==="rtl",[`${L}-group-wrapper-${ie}`]:me},Ma(`${L}-group-wrapper`,fe,_),O)}})});process.env.NODE_ENV!=="production"&&(Ti.displayName="Input");function Ba(e){return["small","middle","medium","large"].includes(e)}function lm(e){return e?os(e):!1}const Kx=b.createContext({latestIndex:0}),_M=Kx.Provider,jM=e=>{const{className:t,prefix:n,index:r,children:o,separator:i,style:a,classNames:s,styles:l}=e,{latestIndex:c}=h.useContext(Kx);return yi(o)?h.createElement(h.Fragment,null,h.createElement("div",{className:t,style:a},o),r<c&&i&&h.createElement("span",{className:J(`${n}-item-separator`,s==null?void 0:s.separator),style:l==null?void 0:l.separator},i)):null},BM=e=>{const{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"}}}},HM=e=>{const{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}}}},VM=on("Space",e=>{const t=yt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[BM(t),HM(t)]},()=>({}),{resetStyle:!1}),WM=h.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:o,className:i,style:a,classNames:s,styles:l}=Kn("space"),{size:c=o??"small",align:u,className:d,rootClassName:f,children:p,direction:g,orientation:m,prefixCls:w,split:y,separator:$,style:x,vertical:E,wrap:C=!1,classNames:v,styles:T,...R}=e,[A,k]=Array.isArray(c)?c:[c,c],N=Ba(k),z=Ba(A),L=lm(k),D=lm(A),M=or(p,{keepEmpty:!0}),[O,F]=Qu(m,E,g),H=u===void 0&&!F?"center":u,X=$??y,I=n("space",w),[Q,Y]=VM(I),P={...e,size:c,orientation:O,align:H},oe=kt(a),W=kt(x),[j,ne]=Tn([s,v],[l,oe,T,W],{props:P}),ee=J(I,i,Q,`${I}-${O}`,{[`${I}-rtl`]:r==="rtl",[`${I}-align-${H}`]:H,[`${I}-gap-row-${k}`]:N,[`${I}-gap-col-${A}`]:z},d,f,Y,j.root),_=J(`${I}-item`,j.item),ae=M.map((ce,V)=>{const le=(ce==null?void 0:ce.key)||`${_}-${V}`;return h.createElement(jM,{prefix:I,classNames:j,styles:ne,className:_,key:le,index:V,separator:X,style:ne.item},ce)});if(process.env.NODE_ENV!=="production"){const ce=At("Space");[["direction","orientation"],["split","separator"]].forEach(([V,le])=>{ce.deprecated(!(V in e),V,le)})}const fe=h.useMemo(()=>({latestIndex:M.reduce((V,le,se)=>yi(le)?se:V,0)}),[M]);if(M.length===0)return null;const q={};return C&&(q.flexWrap="wrap"),!z&&D&&(q.columnGap=A),!N&&L&&(q.rowGap=k),h.createElement("div",{ref:t,className:ee,style:{...q,...ne.root},...R},h.createElement(_M,{value:fe},ae))}),Pi=WM;Pi.Compact=Ab;Pi.Addon=RM;process.env.NODE_ENV!=="production"&&(Pi.displayName="Space");const Yx=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=h.useContext(dt),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:p,arrow:g,autoFocus:m,trigger:w,align:y,open:$,onOpenChange:x,placement:E,getPopupContainer:C,href:v,icon:T=h.createElement(dd,null),title:R,buttonsRender:A=ae=>ae,mouseEnterDelay:k,mouseLeaveDelay:N,overlayClassName:z,overlayStyle:L,destroyOnHidden:D,destroyPopupOnHide:M,dropdownRender:O,popupRender:F,...H}=e,X=n("dropdown",o),I=`${X}-button`,Y={menu:p,arrow:g,autoFocus:m,align:y,disabled:s,trigger:s?[]:w,onOpenChange:x,getPopupContainer:C||t,mouseEnterDelay:k,mouseLeaveDelay:N,classNames:{root:z},styles:{root:L},destroyOnHidden:D,popupRender:F||O},{compactSize:P,compactItemClassnames:oe}=No(X,r),W=J(I,oe,f);"destroyPopupOnHide"in e&&(Y.destroyPopupOnHide=M),"open"in e&&(Y.open=$),"placement"in e?Y.placement=E:Y.placement=r==="rtl"?"bottomLeft":"bottomRight",process.env.NODE_ENV!=="production"&&At("Dropdown.Button").deprecated(!1,"Dropdown.Button","Space.Compact + Dropdown + Button");const j=h.createElement(ar,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:v,title:R},d),ne=h.createElement(ar,{type:i,danger:a,icon:T}),[ee,_]=A([j,ne]);return h.createElement(Pi.Compact,{className:W,size:P,block:!0,...H},ee,h.createElement(ki,{...Y},_))};Yx.__ANT_BUTTON=!0;const Qx=ki;Qx.Button=Yx;const Zx=["wrap","nowrap","wrap-reverse"],Jx=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],e0=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],qM=(e,t)=>{const n=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${n}`]:n&&Zx.includes(n)}},XM=(e,t)=>{const n={};return e0.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},UM=(e,t)=>{const n={};return Jx.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n},GM=(e,t)=>J({...qM(e,t),...XM(e,t),...UM(e,t)}),KM=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},YM=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},QM=e=>{const{componentCls:t}=e,n={};return Zx.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r}}),n},ZM=e=>{const{componentCls:t}=e,n={};return e0.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r}}),n},JM=e=>{const{componentCls:t}=e,n={};return Jx.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r}}),n},eA=()=>({}),tA=on("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=yt(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[KM(o),YM(o),QM(o),ZM(o),JM(o)]},eA,{resetStyle:!1}),t0=b.forwardRef((e,t)=>{const{prefixCls:n,rootClassName:r,className:o,style:i,flex:a,gap:s,vertical:l,orientation:c,component:u="div",children:d,...f}=e,{flex:p,direction:g,getPrefixCls:m}=b.useContext(dt),w=m("flex",n),[y,$]=tA(w),[,x]=Qu(c,l??(p==null?void 0:p.vertical)),E=J(o,r,p==null?void 0:p.className,w,y,$,GM(w,{...e,vertical:x}),{[`${w}-rtl`]:g==="rtl",[`${w}-gap-${s}`]:Ba(s),[`${w}-vertical`]:x}),C={...p==null?void 0:p.style,...i};return Pl(a)&&(C.flex=a),Pl(s)&&!Ba(s)&&(C.gap=s),b.createElement(u,{ref:t,className:E,style:C,...Yt(f,["justify","wrap","align"])},d)});process.env.NODE_ENV!=="production"&&(t0.displayName="Flex");const nA=e=>{const{getPrefixCls:t,direction:n}=b.useContext(dt),{prefixCls:r,className:o}=e,i=t("input-group",r),a=t("input"),[s,l]=Hx(a),c=J(i,l,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},s,o),u=b.useContext(sr),d=b.useMemo(()=>({...u,isFormItemInput:!1}),[u]);return process.env.NODE_ENV!=="production"&&At("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),h.createElement(sr.Provider,{value:d},h.createElement(Pi.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},rA=e=>{const{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}}}},oA=on(["Input","OTP"],e=>{const t=yt(e,Ii(e));return rA(t)},Ri),iA="•",aA=h.forwardRef((e,t)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:a,mask:s,onFocus:l,type:c,...u}=e,{getPrefixCls:d}=h.useContext(dt),f=d("otp"),p=typeof s=="string"?s:iA,g=h.useRef(null);h.useImperativeHandle(t,()=>g.current);const m=x=>{o(a,x.target.value)},w=()=>{xt(()=>{var E;const x=(E=g.current)==null?void 0:E.input;document.activeElement===x&&x&&x.select()})},y=x=>{l==null||l(x),w()},$=x=>{const{key:E,ctrlKey:C,metaKey:v}=x;E==="ArrowLeft"?i(a-1):E==="ArrowRight"?i(a+1):E==="z"&&(C||v)?x.preventDefault():E==="Backspace"&&!r&&i(a-1),w()};return h.createElement("span",{className:`${f}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&h.createElement("span",{className:`${f}-mask-icon`,"aria-hidden":"true"},p),h.createElement(Ti,{"aria-label":`OTP Input ${a+1}`,...u,type:c??(s?"password":"text"),ref:g,value:r,onInput:m,onFocus:y,onKeyDown:$,onMouseDown:w,onMouseUp:w,className:J(n,{[`${f}-mask-input`]:s})}))});function Qi(e){return(e||"").split("")}const sA=e=>{const{index:t,prefixCls:n,separator:r,className:o,style:i}=e,a=Qt(r)?r(t):r;return a?h.createElement("span",{className:J(`${n}-separator`,o),style:i},a):null},lA=h.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:p,mask:g,type:m,autoComplete:w,onInput:y,onFocus:$,inputMode:x,classNames:E,styles:C,className:v,style:T,...R}=e;if(process.env.NODE_ENV!=="production"){const ie=At("Input.OTP");process.env.NODE_ENV!=="production"&&ie(!(typeof g=="string"&&g.length>1),"usage","`mask` prop should be a single character.")}const{classNames:A,styles:k,getPrefixCls:N,direction:z,style:L,className:D}=Kn("otp"),M=N("otp",n),[O]=wo("otp",u,void 0,"input"),F={...e,length:r,variant:O},H=kt(L),X=kt(T),[I,Q]=Tn([A,E],[k,H,C,X],{props:F}),Y=ng(R,{aria:!0,data:!0,attr:!0}),[P,oe]=oA(M),W=Po(ie=>o??ie),j=h.useContext(sr),ne=nd(j.status,f),ee=h.useMemo(()=>({...j,status:ne,hasFeedback:!1,feedbackIcon:null}),[j,ne]),_=h.useRef(null),ae=h.useRef({});h.useImperativeHandle(t,()=>({focus:()=>{var ie;(ie=ae.current[0])==null||ie.focus()},blur:()=>{var ie;for(let me=0;me<r;me+=1)(ie=ae.current[me])==null||ie.blur()},nativeElement:_.current}));const fe=ie=>l?l(ie):ie,[q,ce]=h.useState(()=>Qi(fe(i||"")));h.useEffect(()=>{a!==void 0&&ce(Qi(a))},[a]);const V=Ge(ie=>{ce(ie),y&&y(ie),s&&ie.length===r&&ie.every(me=>me)&&ie.some((me,pe)=>q[pe]!==me)&&s(ie.join(""))}),le=Ge((ie,me)=>{let pe=jr(q);for(let Ee=0;Ee<ie;Ee+=1)pe[Ee]||(pe[Ee]="");me.length<=1?pe[ie]=me:pe=pe.slice(0,ie).concat(Qi(me)),pe=pe.slice(0,r);for(let Ee=pe.length-1;Ee>=0&&!pe[Ee];Ee-=1)pe.pop();const Ne=fe(pe.map(Ee=>Ee||" ").join(""));return pe=Qi(Ne).map((Ee,Ie)=>Ee===" "&&!pe[Ie]?pe[Ie]:Ee),pe}),se=(ie,me)=>{var Ee;const pe=le(ie,me),Ne=Math.min(ie+me.length,r-1);Ne!==ie&&pe[ie]!==void 0&&((Ee=ae.current[Ne])==null||Ee.focus()),V(pe)},G=ie=>{var me;(me=ae.current[ie])==null||me.focus()},K=(ie,me)=>{var pe,Ne,Ee;for(let Ie=0;Ie<me;Ie+=1)if(!((Ne=(pe=ae.current[Ie])==null?void 0:pe.input)!=null&&Ne.value)){(Ee=ae.current[Ie])==null||Ee.focus();break}$==null||$(ie)},we={variant:O,disabled:d,status:ne,mask:g,type:m,inputMode:x,autoComplete:w};return h.createElement("div",{...Y,ref:_,className:J(v,M,{[`${M}-sm`]:W==="small",[`${M}-lg`]:W==="large",[`${M}-rtl`]:z==="rtl"},oe,P,D,I.root),style:Q.root,role:"group"},h.createElement(sr.Provider,{value:ee},Array.from({length:r}).map((ie,me)=>{const pe=`otp-${me}`,Ne=q[me]||"";return h.createElement(h.Fragment,{key:pe},h.createElement(aA,{ref:Ee=>{ae.current[me]=Ee},index:me,size:W,htmlSize:1,className:J(I.input,`${M}-input`),style:Q.input,onChange:se,value:Ne,onActiveChange:G,autoFocus:me===0&&p,onFocus:Ee=>K(Ee,me),...we}),me<r-1&&h.createElement(sA,{separator:c,index:me,prefixCls:M,className:J(I.separator),style:Q.separator}))})))});var cA={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 Xc(){return Xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xc.apply(this,arguments)}const uA=(e,t)=>h.createElement(Jt,Xc({},e,{ref:t,icon:cA})),n0=h.forwardRef(uA);process.env.NODE_ENV!=="production"&&(n0.displayName="EyeInvisibleOutlined");var dA={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 Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uc.apply(this,arguments)}const fA=(e,t)=>h.createElement(Jt,Uc({},e,{ref:t,icon:dA})),r0=h.forwardRef(fA);process.env.NODE_ENV!=="production"&&(r0.displayName="EyeOutlined");const pA=e=>e?h.createElement(r0,null):h.createElement(n0,null),mA={click:"onClick",hover:"onMouseOver"},o0=h.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i,prefixCls:a,inputPrefixCls:s,suffix:l,className:c,style:u,classNames:d,styles:f,variant:p,...g}=e,{getPrefixCls:m,className:w,style:y,classNames:$,styles:x,iconRender:E}=Kn("inputPassword"),[C]=wo("inputPassword",p,e.bordered,"input"),[v]=DI("global"),T=h.useContext(yr),R=n??T,A={...e,disabled:R,variant:C},k=kt(y),N=kt(u),[z,L]=Tn([$,d],[x,k,f,N],{props:A}),D=rn(o)&&o.visible!==void 0,[M,O]=b.useState(()=>D?o.visible:!1),F=b.useRef(null);h.useEffect(()=>{D&&O(o.visible)},[D,o]);const H=Gx(F),X=()=>{var ne;if(R)return;M&&H();const j=!M;D||O(j),rn(o)&&((ne=o.onVisibleChange)==null||ne.call(o,j))},I=j=>{const ne=mA[r]||"",_=(i||E||pA)(M),ae=rn(o)?o.tabIndex:void 0;return h.createElement("span",{key:"passwordIcon",role:"button",tabIndex:R?-1:ae??0,className:`${j}-icon`,"aria-disabled":R,"aria-pressed":M,"aria-label":M?v.hide:v.show,onMouseDown:fe=>{fe.preventDefault()},onMouseUp:fe=>{fe.preventDefault()},onKeyDown:fe=>{(fe.key==="Enter"||fe.key===" ")&&(fe.preventDefault(),fe.repeat||X())},[ne]:X},_)},Q=m("input",s),Y=m("input-password",a),P=o&&I(Y),oe=J(Y,w,c,{[`${Y}-${e.size}`]:!!e.size}),W={...g,type:M?"text":"password",prefixCls:Q,suffix:h.createElement(h.Fragment,null,P,l),disabled:R,className:oe,classNames:z,styles:L,variant:C};return h.createElement(Ti,{ref:Gn(t,F),...W})});process.env.NODE_ENV!=="production"&&(o0.displayName="Input.Password");const hA=e=>{const{componentCls:t,antCls:n,calc:r,max:o}=e,i=`${t}-btn`,[a,s]=ur(n,"input-search"),l=e.inputFontSizeSM??e.fontSize,c=o(e.controlHeightSM,r(l).mul(e.lineHeight).add(r(e.paddingBlockSM).mul(2)).add(r(e.lineWidth).mul(2)).equal());return{[t]:{[a("btn-height")]:ye(e.controlHeight),width:"100%",[i]:{height:s("btn-height"),"&:focus-visible":{zIndex:5},[`&${n}-btn-icon-only`]:{width:s("btn-height")},"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}},[`&${t}-large`]:{[a("btn-height")]:ye(e.controlHeightLG)},[`&${t}-small`]:{[a("btn-height")]:ye(e.controlHeightSM)},[`&${t}-small ${i}`]:{minHeight:c,[`&${e.antCls}-btn-icon-only`]:{minWidth:c}}}}},gA=on(["Input","Search"],e=>{const t=yt(e,Ii(e));return hA(t)},Ri),i0=h.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,style:a,enterButton:s=!1,searchIcon:l,addonAfter:c,loading:u,disabled:d,onSearch:f,onChange:p,onCompositionStart:g,onCompositionEnd:m,variant:w,onPressEnter:y,classNames:$,styles:x,hidden:E,...C}=e,{direction:v,getPrefixCls:T,className:R,style:A,classNames:k,styles:N,searchIcon:z}=Kn("inputSearch"),L=h.useContext(yr),D=d??L,[M,,O]=wo("inputSearch",w,e.bordered),F=O?M:void 0,[H]=wo("inputSearch",w,e.bordered,"input"),X={...e,enterButton:s,variant:F},I=kt(A),Q=kt(a),[Y,P]=Tn([k,$],[N,I,x,Q],{props:X},{button:{_default:"root"}}),oe=h.useRef(!1),W=T("input-search",n),j=T("input",r),[ne,ee]=gA(W),{compactSize:_}=No(W,v),ae=Po(Z=>i??_??Z),fe=h.useRef(null),q=Z=>{Z!=null&&Z.target&&Z.type==="click"&&f&&f(Z.target.value,Z,{source:"clear"}),p==null||p(Z)},ce=Z=>{var ue;document.activeElement===((ue=fe.current)==null?void 0:ue.input)&&Z.preventDefault()},V=Z=>{var ue,xe;f&&f((xe=(ue=fe.current)==null?void 0:ue.input)==null?void 0:xe.value,Z,{source:"input"})},le=Z=>{oe.current||u||(y==null||y(Z),V(Z))},se=typeof s=="boolean"?Rb(l,z,h.createElement(lx,null)):null,G=`${W}-btn`,K=J(G,{[`${G}-${F}`]:F});let we;const ie=s||{},me=ie.type&&ie.type.__ANT_BUTTON===!0;if(me||ie.type==="button"){const Z=ie.props;we=Dn(ie,{disabled:D||Z.disabled||!me&&u,onMouseDown:ue=>{var xe;(xe=Z.onMouseDown)==null||xe.call(Z,ue),ce(ue)},onClick:ue=>{var xe,$e;($e=(xe=ie==null?void 0:ie.props)==null?void 0:xe.onClick)==null||$e.call(xe,ue),V(ue)},key:"enterButton",...me?{className:J(K,Z.className),loading:u||Z.loading,size:ae}:{}})}else we=h.createElement(ar,{classNames:Y.button,styles:P.button,className:K,color:s?"primary":"default",size:ae,disabled:d,key:"enterButton",onMouseDown:ce,onClick:V,loading:u,icon:se,variant:F==="borderless"||F==="filled"||F==="underlined"?"text":s?"solid":void 0},s);c&&(we=[we,Dn(c,{key:"addonAfter"})]);const pe=J(W,ee,{[`${W}-rtl`]:v==="rtl",[`${W}-${ae}`]:!!ae,[`${W}-with-button`]:!!s},o,R,ne,Y.root),Ne=Z=>{oe.current=!0,g==null||g(Z)},Ee=Z=>{oe.current=!1,m==null||m(Z)},Ie=ng(C,{data:!0}),B=Yt({...C,classNames:Yt(Y,["button","root"]),styles:Yt(P,["button","root"]),prefixCls:j,type:"search",size:ae,variant:H,onPressEnter:le,onCompositionStart:Ne,onCompositionEnd:Ee,onChange:q,disabled:d},Object.keys(Ie));return h.createElement(Ab,{className:pe,style:P.root,...Ie,hidden:E},h.createElement(Ti,{ref:Gn(fe,t),...B}),we)});process.env.NODE_ENV!=="production"&&(i0.displayName="Search");const bA=e=>{const{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","@media (hover: none) and (pointer: coarse)":{resize:"none"},[`&${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"}},[`
275
275
  &-allow-clear > ${t},
276
276
  &-affix-wrapper${r}-has-feedback ${t}
277
- `]:{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}}}}}},bA=on(["Input","TextArea"],e=>{const t=yt(e,Ii(e));return hA(t)},Ri,{resetFont:!1}),xA=b.forwardRef((e,t)=>{var q;const{prefixCls:n,bordered:r=!0,size:o,disabled:i,status:a,allowClear:s,classNames:l,rootClassName:c,className:u,style:d,styles:f,variant:p,showCount:h,onMouseDown:m,onResize:w,...y}=e;if(process.env.NODE_ENV!=="production"){const{deprecated:me}=At("TextArea");me(!("bordered"in e),"bordered","variant")}const{getPrefixCls:$,direction:x,allowClear:E,autoComplete:v,className:C,style:I,classNames:N,styles:A}=Kn("textArea"),k=g.useContext(yr),R=i??k,{status:O,hasFeedback:z,feedbackIcon:D}=g.useContext(sr),M=nd(O,a),L=kt(I),_=kt(d),[V,X]=Pn([N,l],[A,L,f,_],{props:e}),P=g.useRef(null);g.useImperativeHandle(t,()=>{var me,he;return{resizableTextArea:(me=P.current)==null?void 0:me.resizableTextArea,focus:se=>{var ue,pe;Jg((pe=(ue=P.current)==null?void 0:ue.resizableTextArea)==null?void 0:pe.textArea,se)},blur:()=>{var se;return(se=P.current)==null?void 0:se.blur()},nativeElement:((he=P.current)==null?void 0:he.nativeElement)||null}});const Y=$("input",n),K=Po(Y),[T,ne]=Bx(Y,c);bA(Y,K);const{compactSize:F,compactItemClassnames:U}=No(Y,x),re=To(me=>o??F??me),[j,H]=wo("textArea",p,r),ee=Pb({allowClear:s,contextAllowClear:E,componentName:"TextArea"}),[oe,B]=g.useState(!1),[ie,ae]=g.useState(!1),Se=me=>{B(!0),m==null||m(me);const he=()=>{B(!1),document.removeEventListener("mouseup",he)};document.addEventListener("mouseup",he)},ye=me=>{var he,se;if(w==null||w(me),oe&&Qt(getComputedStyle)){const ue=(se=(he=P.current)==null?void 0:he.nativeElement)==null?void 0:se.querySelector("textarea");ue&&getComputedStyle(ue).resize==="both"&&ae(!0)}};return g.createElement(DM,{autoComplete:v,...y,style:X.root,styles:X,disabled:R,allowClear:ee,className:Z(ne,K,u,c,U,C,V.root,{[`${Y}-textarea-affix-wrapper-resize-dirty`]:ie}),classNames:{...V,textarea:Z({[`${Y}-sm`]:re==="small",[`${Y}-lg`]:re==="large"},T,V.textarea,oe&&`${Y}-mouse-active`),variant:Z({[`${Y}-${j}`]:H},Ma(Y,M)),affixWrapper:Z(`${Y}-textarea-affix-wrapper`,{[`${Y}-affix-wrapper-rtl`]:x==="rtl",[`${Y}-affix-wrapper-sm`]:re==="small",[`${Y}-affix-wrapper-lg`]:re==="large",[`${Y}-textarea-show-count`]:h||((q=e.count)==null?void 0:q.show)},T)},prefixCls:Y,suffix:z&&g.createElement("span",{className:`${Y}-textarea-suffix`},D),showCount:h,ref:P,onResize:ye,onMouseDown:Se})}),Vr=Pi;Vr.Group=tA;Vr.Search=i0;Vr.TextArea=xA;Vr.Password=o0;Vr.OTP=sA;var yA={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 Gc(){return Gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gc.apply(this,arguments)}const wA=(e,t)=>g.createElement(Jt,Gc({},e,{ref:t,icon:yA})),a0=g.forwardRef(wA);process.env.NODE_ENV!=="production"&&(a0.displayName="CaretDownFilled");const Kc={defaultSeed:Sa.token,defaultAlgorithm:Yh,_internalContext:Bu};var _n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.call=md;var s0=_n.default=void 0;_n.note=u0;_n.noteOnce=f0;_n.preMessage=void 0;var vA=_n.resetWarned=d0;_n.warning=c0;_n.warningOnce=Ni;let Yc={};const pd=[],l0=e=>{pd.push(e)};_n.preMessage=l0;function c0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=pd.reduce((r,o)=>o(r??"","warning"),t);n&&console.error(`Warning: ${n}`)}}function u0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=pd.reduce((r,o)=>o(r??"","note"),t);n&&console.warn(`Note: ${n}`)}}function d0(){Yc={}}function md(e,t,n){!t&&!Yc[n]&&(e(!1,n),Yc[n]=!0)}function Ni(e,t){md(c0,e,t)}function f0(e,t){md(u0,e,t)}Ni.preMessage=l0;Ni.resetWarned=d0;Ni.noteOnce=f0;s0=_n.default=Ni;function p0(){}let Qn=null;function CA(){Qn=null,vA()}let tn=p0;process.env.NODE_ENV!=="production"&&(tn=(e,t,n)=>{s0(e,`[antdx: ${t}] ${n}`),process.env.NODE_ENV==="test"&&CA()});const SA=g.createContext({});process.env.NODE_ENV;const EA=b.createContext(void 0);var fs={},m0={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(m0);var gd=m0.exports;const $A=zn.getAugmentedNamespace(NI);var ps={},Mi={};const kA=zn.getAugmentedNamespace(AI);var Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.default=void 0;const IA={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};Ai.default=IA;var g0=gd.default;Object.defineProperty(Mi,"__esModule",{value:!0});Mi.default=void 0;var RA=g0(kA),PA=g0(Ai);const TA={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...RA.default},timePickerLocale:{...PA.default}};Mi.default=TA;var NA=gd.default;Object.defineProperty(ps,"__esModule",{value:!0});ps.default=void 0;var MA=NA(Mi);ps.default=MA.default;var ms=gd.default;Object.defineProperty(fs,"__esModule",{value:!0});fs.default=void 0;var AA=ms($A),zA=ms(ps),OA=ms(Mi),DA=ms(Ai);const hn="${label} is not a valid ${type}",LA={locale:"en",Pagination:AA.default,DatePicker:OA.default,TimePicker:DA.default,Calendar:zA.default,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:hn,method:hn,array:hn,object:hn,number:hn,date:hn,boolean:hn,integer:hn,float:hn,regexp:hn,email:hn,url:hn,hex:hn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};fs.default=LA;var FA=fs;const ul=zn.getDefaultExportFromCjs(FA),lo={locale:"en",Conversations:{create:"New chat"},Sender:{stopLoading:"Stop loading",speechRecording:"Speech recording"},Actions:{feedbackLike:"Like",feedbackDislike:"Dislike",audio:"Play audio",audioRunning:"Audio playing",audioError:"Playback error",audioLoading:"Loading audio"},Bubble:{editableOk:"OK",editableCancel:"Cancel"},Mermaid:{zoomIn:"Zoom in",zoomOut:"Zoom out",zoomReset:"Reset",download:"Download",code:"Code",image:"Image"},Folder:{selectFile:"Please select a file",loadError:"Failed to load file",noService:"File content service not configured",loadFailed:"Failed to load file"}},h0=(e,t)=>{const n=g.useContext(EA),r=g.useMemo(()=>{const i=t||(lo==null?void 0:lo[e])||(ul==null?void 0:ul[e]),a=(n==null?void 0:n[e])??{};return{...typeof i=="function"?i():i,...a||{}}},[e,t,n]),o=g.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?lo.locale:i},[n]);return[r,o]};function vo(){const{getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r,theme:o}=b.useContext(Sr.ConfigContext);return{theme:o,getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r}}process.env.NODE_ENV;var _A={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 Qc(){return Qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qc.apply(this,arguments)}const jA=(e,t)=>g.createElement(Jt,Qc({},e,{ref:t,icon:_A})),b0=g.forwardRef(jA);process.env.NODE_ENV!=="production"&&(b0.displayName="ArrowUpOutlined");var BA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z"}},{tag:"path",attrs:{d:"M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z"}}]},name:"audio-muted",theme:"outlined"};function Zc(){return Zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zc.apply(this,arguments)}const HA=(e,t)=>g.createElement(Jt,Zc({},e,{ref:t,icon:BA})),x0=g.forwardRef(HA);process.env.NODE_ENV!=="production"&&(x0.displayName="AudioMutedOutlined");var VA={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 Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jc.apply(this,arguments)}const WA=(e,t)=>g.createElement(Jt,Jc({},e,{ref:t,icon:VA})),y0=g.forwardRef(WA);process.env.NODE_ENV!=="production"&&(y0.displayName="AudioOutlined");var qA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eu.apply(this,arguments)}const XA=(e,t)=>g.createElement(Jt,eu({},e,{ref:t,icon:qA})),w0=g.forwardRef(XA);process.env.NODE_ENV!=="production"&&(w0.displayName="ClearOutlined");const Wo=1e3,qo=4,fa=140,cm=fa/2,Zi=250,um=500,Ji=.8;function UA({className:e}){const[t]=h0("Sender",lo.Sender);return b.createElement("svg",{color:"currentColor",viewBox:`0 0 ${Wo} ${Wo}`,xmlns:"http://www.w3.org/2000/svg",className:e},b.createElement("title",null,t.speechRecording),Array.from({length:qo}).map((n,r)=>{const o=(Wo-fa*qo)/(qo-1),i=r*(o+fa),a=Wo/2-Zi/2,s=Wo/2-um/2;return b.createElement("rect",{fill:"currentColor",rx:cm,ry:cm,height:Zi,width:fa,x:i,y:a,key:r},b.createElement("animate",{attributeName:"height",values:`${Zi}; ${um}; ${Zi}`,keyTimes:"0; 0.5; 1",dur:`${Ji}s`,begin:`${Ji/qo*r}s`,repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"y",values:`${a}; ${s}; ${a}`,keyTimes:"0; 0.5; 1",dur:`${Ji}s`,begin:`${Ji/qo*r}s`,repeatCount:"indefinite"}))}))}const GA="2.9.0",KA={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},YA={...KA,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
277
+ `]:{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}}}}}},xA=on(["Input","TextArea"],e=>{const t=yt(e,Ii(e));return bA(t)},Ri,{resetFont:!1}),yA=b.forwardRef((e,t)=>{var G;const{prefixCls:n,bordered:r=!0,size:o,disabled:i,status:a,allowClear:s,classNames:l,rootClassName:c,className:u,style:d,styles:f,variant:p,showCount:g,onMouseDown:m,onResize:w,...y}=e;if(process.env.NODE_ENV!=="production"){const{deprecated:K}=At("TextArea");K(!("bordered"in e),"bordered","variant")}const{getPrefixCls:$,direction:x,allowClear:E,autoComplete:C,className:v,style:T,classNames:R,styles:A}=Kn("textArea"),k=h.useContext(yr),N=i??k,{status:z,hasFeedback:L,feedbackIcon:D}=h.useContext(sr),M=nd(z,a),O=kt(T),F=kt(d),[H,X]=Tn([R,l],[A,O,f,F],{props:e}),I=h.useRef(null);h.useImperativeHandle(t,()=>{var K,we;return{resizableTextArea:(K=I.current)==null?void 0:K.resizableTextArea,focus:ie=>{var me,pe;Jh((pe=(me=I.current)==null?void 0:me.resizableTextArea)==null?void 0:pe.textArea,ie)},blur:()=>{var ie;return(ie=I.current)==null?void 0:ie.blur()},nativeElement:((we=I.current)==null?void 0:we.nativeElement)||null}});const Q=$("input",n),Y=To(Q),[P,oe]=Bx(Q,c);xA(Q,Y);const{compactSize:W,compactItemClassnames:j}=No(Q,x),ne=Po(K=>o??W??K),[ee,_]=wo("textArea",p,r),ae=Tb({allowClear:s,contextAllowClear:E,componentName:"TextArea"}),[fe,q]=h.useState(!1),[ce,V]=h.useState(!1),le=K=>{q(!0),m==null||m(K);const we=()=>{q(!1),document.removeEventListener("mouseup",we)};document.addEventListener("mouseup",we)},se=K=>{var we,ie;if(w==null||w(K),fe&&Qt(getComputedStyle)){const me=(ie=(we=I.current)==null?void 0:we.nativeElement)==null?void 0:ie.querySelector("textarea");me&&getComputedStyle(me).resize==="both"&&V(!0)}};return h.createElement(LM,{autoComplete:C,...y,style:X.root,styles:X,disabled:N,allowClear:ae,className:J(oe,Y,u,c,j,v,H.root,{[`${Q}-textarea-affix-wrapper-resize-dirty`]:ce}),classNames:{...H,textarea:J({[`${Q}-sm`]:ne==="small",[`${Q}-lg`]:ne==="large"},P,H.textarea,fe&&`${Q}-mouse-active`),variant:J({[`${Q}-${ee}`]:_},Ma(Q,M)),affixWrapper:J(`${Q}-textarea-affix-wrapper`,{[`${Q}-affix-wrapper-rtl`]:x==="rtl",[`${Q}-affix-wrapper-sm`]:ne==="small",[`${Q}-affix-wrapper-lg`]:ne==="large",[`${Q}-textarea-show-count`]:g||((G=e.count)==null?void 0:G.show)},P)},prefixCls:Q,suffix:L&&h.createElement("span",{className:`${Q}-textarea-suffix`},D),showCount:g,ref:I,onResize:se,onMouseDown:le})}),Vr=Ti;Vr.Group=nA;Vr.Search=i0;Vr.TextArea=yA;Vr.Password=o0;Vr.OTP=lA;var wA={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 Gc(){return Gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gc.apply(this,arguments)}const vA=(e,t)=>h.createElement(Jt,Gc({},e,{ref:t,icon:wA})),a0=h.forwardRef(vA);process.env.NODE_ENV!=="production"&&(a0.displayName="CaretDownFilled");const Kc={defaultSeed:Sa.token,defaultAlgorithm:Yg,_internalContext:Bu};var _n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.call=md;var s0=_n.default=void 0;_n.note=u0;_n.noteOnce=f0;_n.preMessage=void 0;var CA=_n.resetWarned=d0;_n.warning=c0;_n.warningOnce=Ni;let Yc={};const pd=[],l0=e=>{pd.push(e)};_n.preMessage=l0;function c0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=pd.reduce((r,o)=>o(r??"","warning"),t);n&&console.error(`Warning: ${n}`)}}function u0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=pd.reduce((r,o)=>o(r??"","note"),t);n&&console.warn(`Note: ${n}`)}}function d0(){Yc={}}function md(e,t,n){!t&&!Yc[n]&&(e(!1,n),Yc[n]=!0)}function Ni(e,t){md(c0,e,t)}function f0(e,t){md(u0,e,t)}Ni.preMessage=l0;Ni.resetWarned=d0;Ni.noteOnce=f0;s0=_n.default=Ni;function p0(){}let Qn=null;function SA(){Qn=null,CA()}let tn=p0;process.env.NODE_ENV!=="production"&&(tn=(e,t,n)=>{s0(e,`[antdx: ${t}] ${n}`),process.env.NODE_ENV==="test"&&SA()});const EA=h.createContext({});process.env.NODE_ENV;const $A=b.createContext(void 0);var fs={},m0={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(m0);var hd=m0.exports;const kA=zn.getAugmentedNamespace(MI);var ps={},Mi={};const IA=zn.getAugmentedNamespace(zI);var Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.default=void 0;const RA={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};Ai.default=RA;var h0=hd.default;Object.defineProperty(Mi,"__esModule",{value:!0});Mi.default=void 0;var TA=h0(IA),PA=h0(Ai);const NA={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...TA.default},timePickerLocale:{...PA.default}};Mi.default=NA;var MA=hd.default;Object.defineProperty(ps,"__esModule",{value:!0});ps.default=void 0;var AA=MA(Mi);ps.default=AA.default;var ms=hd.default;Object.defineProperty(fs,"__esModule",{value:!0});fs.default=void 0;var zA=ms(kA),OA=ms(ps),DA=ms(Mi),LA=ms(Ai);const gn="${label} is not a valid ${type}",FA={locale:"en",Pagination:zA.default,DatePicker:DA.default,TimePicker:LA.default,Calendar:OA.default,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:gn,method:gn,array:gn,object:gn,number:gn,date:gn,boolean:gn,integer:gn,float:gn,regexp:gn,email:gn,url:gn,hex:gn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};fs.default=FA;var _A=fs;const ul=zn.getDefaultExportFromCjs(_A),lo={locale:"en",Conversations:{create:"New chat"},Sender:{stopLoading:"Stop loading",speechRecording:"Speech recording"},Actions:{feedbackLike:"Like",feedbackDislike:"Dislike",audio:"Play audio",audioRunning:"Audio playing",audioError:"Playback error",audioLoading:"Loading audio"},Bubble:{editableOk:"OK",editableCancel:"Cancel"},Mermaid:{zoomIn:"Zoom in",zoomOut:"Zoom out",zoomReset:"Reset",download:"Download",code:"Code",image:"Image"},Folder:{selectFile:"Please select a file",loadError:"Failed to load file",noService:"File content service not configured",loadFailed:"Failed to load file"}},g0=(e,t)=>{const n=h.useContext($A),r=h.useMemo(()=>{const i=t||(lo==null?void 0:lo[e])||(ul==null?void 0:ul[e]),a=(n==null?void 0:n[e])??{};return{...typeof i=="function"?i():i,...a||{}}},[e,t,n]),o=h.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?lo.locale:i},[n]);return[r,o]};function vo(){const{getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r,theme:o}=b.useContext(Sr.ConfigContext);return{theme:o,getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r}}process.env.NODE_ENV;var jA={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 Qc(){return Qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qc.apply(this,arguments)}const BA=(e,t)=>h.createElement(Jt,Qc({},e,{ref:t,icon:jA})),b0=h.forwardRef(BA);process.env.NODE_ENV!=="production"&&(b0.displayName="ArrowUpOutlined");var HA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z"}},{tag:"path",attrs:{d:"M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z"}}]},name:"audio-muted",theme:"outlined"};function Zc(){return Zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zc.apply(this,arguments)}const VA=(e,t)=>h.createElement(Jt,Zc({},e,{ref:t,icon:HA})),x0=h.forwardRef(VA);process.env.NODE_ENV!=="production"&&(x0.displayName="AudioMutedOutlined");var WA={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 Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jc.apply(this,arguments)}const qA=(e,t)=>h.createElement(Jt,Jc({},e,{ref:t,icon:WA})),y0=h.forwardRef(qA);process.env.NODE_ENV!=="production"&&(y0.displayName="AudioOutlined");var XA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eu.apply(this,arguments)}const UA=(e,t)=>h.createElement(Jt,eu({},e,{ref:t,icon:XA})),w0=h.forwardRef(UA);process.env.NODE_ENV!=="production"&&(w0.displayName="ClearOutlined");const Wo=1e3,qo=4,fa=140,cm=fa/2,Zi=250,um=500,Ji=.8;function GA({className:e}){const[t]=g0("Sender",lo.Sender);return b.createElement("svg",{color:"currentColor",viewBox:`0 0 ${Wo} ${Wo}`,xmlns:"http://www.w3.org/2000/svg",className:e},b.createElement("title",null,t.speechRecording),Array.from({length:qo}).map((n,r)=>{const o=(Wo-fa*qo)/(qo-1),i=r*(o+fa),a=Wo/2-Zi/2,s=Wo/2-um/2;return b.createElement("rect",{fill:"currentColor",rx:cm,ry:cm,height:Zi,width:fa,x:i,y:a,key:r},b.createElement("animate",{attributeName:"height",values:`${Zi}; ${um}; ${Zi}`,keyTimes:"0; 0.5; 1",dur:`${Ji}s`,begin:`${Ji/qo*r}s`,repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"y",values:`${a}; ${s}; ${a}`,keyTimes:"0; 0.5; 1",dur:`${Ji}s`,begin:`${Ji/qo*r}s`,repeatCount:"indefinite"}))}))}const KA="2.9.0",YA={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},QA={...YA,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
278
278
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
279
- 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0};function dl(e){return e>=0&&e<=255}function ea(e,t){const{r:n,g:r,b:o,a:i}=new Ve(e).toRgb();if(i<1)return e;const{r:a,g:s,b:l}=new Ve(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(dl(u)&&dl(d)&&dl(f))return new Ve({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ve({r:n,g:r,b:o,a:1}).toRgbString()}function QA(e){const{override:t,...n}=e,r={...t};Object.keys(YA).forEach(f=>{delete r[f]});const o={...n,...r},i=480,a=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:ea(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:ea(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:ea(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:ea(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
279
+ 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0};function dl(e){return e>=0&&e<=255}function ea(e,t){const{r:n,g:r,b:o,a:i}=new Ve(e).toRgb();if(i<1)return e;const{r:a,g:s,b:l}=new Ve(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(dl(u)&&dl(d)&&dl(f))return new Ve({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ve({r:n,g:r,b:o,a:1}).toRgbString()}function ZA(e){const{override:t,...n}=e,r={...t};Object.keys(QA).forEach(f=>{delete r[f]});const o={...n,...r},i=480,a=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:ea(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:ea(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:ea(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:ea(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
280
280
  0 6px 16px 0 rgba(0, 0, 0, 0.08),
281
281
  0 3px 6px -4px rgba(0, 0, 0, 0.12),
282
282
  0 9px 28px 8px rgba(0, 0, 0, 0.05)
@@ -308,8 +308,8 @@ html body {
308
308
  0 -6px 16px 0 rgba(0, 0, 0, 0.08),
309
309
  0 -3px 6px -4px rgba(0, 0, 0, 0.12),
310
310
  0 -9px 28px 8px rgba(0, 0, 0, 0.05)
311
- `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...r}}const ZA={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},JA={motionBase:!0,motionUnit:!0},e5=wa(Kc.defaultAlgorithm),t5={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},v0=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=QA(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=v0({...a,...u},{override:u},c)),a[s]=d}),a};function C0(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=b.useContext(Kc._internalContext),a={prefix:(o==null?void 0:o.prefix)??"ant",key:(o==null?void 0:o.key)??"css-var-root"},s=n||e5,[l,c,u]=yh(s,[Kc.defaultSeed,e],{salt:`${GA}-${t||""}`,override:r,getComputedToken:v0,cssVar:{...a,unitless:ZA,ignore:JA,preserve:t5}});return[s,u,t?c:"",l,a,!!i]}function n5(){const[e,t,n]=C0();return{theme:e,token:t,hashId:n}}const{genStyleHooks:r5}=qh({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=vo();return{iconPrefixCls:t,rootPrefixCls:e()}},useToken:()=>{const[e,t,n,r,o,i]=C0();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=vo();return e??{}},layer:{name:"antdx"}}),gs=b.createContext(null),hs=b.forwardRef((e,t)=>{const{className:n,action:r,onClick:o,...i}=e,a=b.useContext(gs),{prefixCls:s,disabled:l,setSubmitDisabled:c}=a,u=i.disabled??l??a[`${r}Disabled`];return b.useEffect(()=>{r==="onSend"&&(c==null||c(u))},[u,r,c]),b.createElement(ar,$t({type:"text"},i,{ref:t,onClick:d=>{var f;u||((f=a[r])==null||f.call(a),o==null||o(d))},disabled:u,className:Z(s,n,{[`${s}-disabled`]:u})}))});function o5(e,t){return g.createElement(hs,$t({icon:g.createElement(w0,null)},e,{action:"onClear",ref:t}))}const i5=g.forwardRef(o5),a5=b.memo(e=>{const{className:t}=e,[n]=h0("Sender",lo.Sender);return b.createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:t},b.createElement("title",null,n.stopLoading),b.createElement("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"}),b.createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",opacity:"0.45"}),b.createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",strokeDasharray:"600 9999999"},b.createElement("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"})))}),S0=g.forwardRef((e,t)=>{const{prefixCls:n}=g.useContext(gs),{className:r}=e;return g.createElement(hs,$t({icon:g.createElement(a5,{className:`${n}-loading-icon`}),color:"primary",variant:"text",shape:"circle"},e,{className:Z(r,`${n}-loading-button`),action:"onCancel",ref:t}))});function s5(e,t){return g.createElement(hs,$t({icon:g.createElement(b0,null),type:"primary",shape:"circle"},e,{action:"onSend",ref:t}))}const E0=g.forwardRef(s5),bs=b.createContext({}),l5=e=>{const t=b.useCallback(()=>typeof window>"u"?null:window.getSelection(),[]),n=(x,E)=>{if(!x||!E)return E;let v=x,C=null;for(v.nodeType===Node.TEXT_NODE&&(v=v.parentElement);v&&v!==E;)v instanceof HTMLElement&&v.tagName==="SPAN"&&(C=v),v=v.parentElement;return C||E},r=b.useCallback(()=>{const x=t();if(!x)return{range:null,selection:x};try{return{range:x.getRangeAt(0)||document.createRange(),selection:x}}catch{return{range:document.createRange(),selection:x}}},[t]),o=b.useCallback((x,E)=>{if(!(!x||!E))try{E.removeAllRanges(),E.addRange(x)}catch(v){tn(!1,"Sender",`Failed to set range: ${v}`)}},[]),i=b.useCallback(()=>{const x=t();if(x)try{x.removeAllRanges()}catch(E){tn(!1,"Sender",`Failed to remove all ranges: ${E}`)}},[t]),a=b.useCallback((x,E=!1)=>{if(!(!x||typeof x.focus!="function"))try{x.focus({preventScroll:E})}catch(v){tn(!1,"Sender",`Failed to focus element: ${v}`)}},[]),s=b.useCallback((x,E)=>{if(!x)return;a(x,E);const{range:v,selection:C}=r();if(v&&C)try{v.selectNodeContents(x),v.collapse(!1),o(v,C)}catch(I){tn(!1,"Sender",`Failed to set end cursor: ${I}`)}},[a,r,o]),l=b.useCallback((x,E)=>{if(!x)return;a(x,E);const{range:v,selection:C}=r();if(v&&C)try{v.selectNodeContents(x),v.collapse(!0),o(v,C)}catch(I){tn(!1,"Sender",`Failed to set start cursor: ${I}`)}},[a,r,o]),c=b.useCallback((x,E,v)=>{if(!x)return;a(x,v);const{range:C,selection:I}=r();if(C&&I)try{C.selectNodeContents(x),E&&C.setStart(x,1),o(C,I)}catch(N){tn(!1,"Sender",`Failed to select all content: ${N}`)}},[a,r,o]),u=b.useCallback((x,E,v,C)=>{if(!x||typeof v!="number"||v<0||!E)return{range:null,selection:null};a(E,C);const{range:I,selection:N}=r();if(I&&N)try{const A=Math.min(v,x.childNodes.length);I.setStart(x,A),I.setEnd(x,A),I.collapse(!1),o(I,N)}catch(A){tn(!1,"Sender",`Failed to set cursor position:: ${A}`)}return{range:I,selection:N}},[a,r,o]),d=b.useCallback((x,E,v=!1)=>{if(!e||!(x!=null&&x.current))return;const{getSlotDom:C,slotConfigMap:I}=e,N=R=>{var M;const O=C(R);if(!O)return null;const z=I.get(R);if(!z)return null;if(z.type==="input")return O.querySelector("input");const D=((M=O==null?void 0:O.getAttribute)==null?void 0:M.call(O,"data-node-type"))||"";return z.type==="content"&&D!=="nbsp"?O:null},k=(R=>{var z;const O=x.current;if(!O)return null;if(R)return N(R);for(const D of Array.from(O.childNodes)){const M=(z=D==null?void 0:D.getAttribute)==null?void 0:z.call(D,"data-slot-key");if(M){const L=N(M);if(L)return L}}return null})(E);k&&(k.nodeName==="INPUT"?k.focus({preventScroll:v}):u(k,x.current,0,v))},[e,u]),f=b.useCallback((x,E,v,C,I)=>{!v||!C||(a(E,I),v==null||v.setStartAfter(x),v.collapse(!1),C.removeAllRanges(),C.addRange(v))},[a]),p=b.useCallback(x=>{var v;if(!x)return{value:"",startContainer:null,startOffset:0};const E=t();if(!E||E.rangeCount===0)return{value:"",startContainer:null,startOffset:0};try{let C=E.getRangeAt(0),I=C.cloneRange();if(!x.contains(C.startContainer))return{value:"",startContainer:null,startOffset:0};if(C.endContainer===x&&((v=C.endContainer.lastChild)==null?void 0:v.nodeType)===Node.TEXT_NODE){const A=C.endContainer.lastChild;C=document.createRange(),C.setStart(A,A.length),C.setEnd(A,A.length)}return I=C.cloneRange(),I.selectNodeContents(x),I.setEnd(C.startContainer,C.startOffset),{value:I.toString().replace(/\u200B/g,""),startContainer:C.startContainer,startOffset:C.startOffset}}catch(C){return tn(!1,"Sender",`Failed to get text before cursor: ${C}`),{value:"",startContainer:null,startOffset:0}}},[t]),h=b.useCallback((x,E,v)=>{if(x==="start"||x==="end")return{type:x,selection:t()};let C=null,I=null;if(v!=null&&v.current)C=v.current,I=t();else{const z=r();C=z.range,I=z.selection}if(!C||!I)return{type:"end",selection:I};const N=E==null?void 0:E.current;if(!N)return{type:"end",selection:I};const A=N.contains(C.endContainer),k=N.contains(C.startContainer);if(!A)return s(N,!0),{type:"end",selection:I};if(!k)return l(N,!0),{type:"start",selection:I};const R=n(C.endContainer,N),O=n(C.startContainer,N);if(R===O&&O!==N&&(e!=null&&e.getNodeInfo)){const{slotKey:z,slotConfig:D,skillKey:M}=e.getNodeInfo(R)||{};if(z)return{type:"slot",slotKey:D==null?void 0:D.key,slotType:D==null?void 0:D.type,range:C,selection:I};if(M)return{type:"start",selection:I}}return{type:"box",range:C,selection:I}},[e,r,t,s,l,n]),m=b.useCallback(x=>{const E=x.childNodes[x.childNodes.length-1],v=(E==null?void 0:E.nodeType)===Node.TEXT_NODE&&E.textContent===`
312
- `?x.childNodes.length-1:x.childNodes.length;return u(x,x,v).range||document.createRange()},[u]),w=b.useCallback(x=>{var C;const E=(C=e==null?void 0:e.getEditorValue)!=null&&C.call(e).skill?1:0;return u(x,x,E).range||document.createRange()},[u,e]),y=b.useCallback(x=>x.replace(/\u200B/g,"").replace(/\n/g,"").replace(/^\n+|\n+$/g,""),[]),$=b.useCallback(async()=>{try{const x=t();if(!x)return!1;const E=x.toString();if(!E)return!1;const v=y(E);return await navigator.clipboard.writeText(v),!0}catch(x){return tn(!1,"Sender",`Failed to copy selection: ${x}`),!1}},[t,y]);return{setEndCursor:s,setStartCursor:l,setAllSelectCursor:c,setCursorPosition:u,setAfterNodeFocus:f,setSlotFocus:d,getTextBeforeCursor:p,getSelection:t,removeAllRanges:i,getRange:r,getInsertPosition:h,getEndRange:m,getStartRange:w,copySelectionString:$,getCleanedText:y}},dm=4.35,c5=(e,t,n)=>{const{token:r}=n5(),o=n.current?window.getComputedStyle(n.current):{},i=parseFloat(`${e.lineHeight||r.lineHeight}`),a=parseFloat(`${(o==null?void 0:o.fontSize)||e.fontSize||r.fontSize}`),s=o!=null&&o.lineHeight?parseFloat(`${o==null?void 0:o.lineHeight}`):i*a;return t===!1||!t?{}:t===!0?{height:"auto"}:{minHeight:t.minRows?(s+dm)*t.minRows:"auto",maxHeight:t.maxRows?(s+dm)*t.maxRows:"auto",overflowY:"auto"}},u5=e=>{const{prefixCls:t,placeholder:n,slotDomMap:r,slotConfigMap:o}=e,i=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","false"),p.dataset.skillKey=f,p.dataset.placeholder=n||"",p.className=`${t}-skill`,p},[t,n]),a=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","true"),p.dataset.slotKey=f.key,p.className=Z(`${t}-slot`,`${t}-slot-content`),p},[t]),s=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","false"),p.dataset.slotKey=f,p.className=`${t}-slot`,p},[t]),l=b.useCallback((f,p)=>{const h=document.createElement("span");return h.setAttribute("contenteditable","false"),h.dataset.slotKey=f,h.dataset.nodeType="nbsp",h.className=Z(`${t}-slot-${p}`,`${t}-slot-no-width`),h.textContent=" ",h},[t]),c=(f,p)=>{r.current.set(f,p)},u=f=>r.current.get(f);return{buildSkillSpan:i,buildEditSlotSpan:a,buildSlotSpan:s,buildSpaceSpan:l,saveSlotDom:c,getSlotDom:u,getSlotLastDom:(f,p)=>{var m;return(p??((m=o.get(f))==null?void 0:m.type))==="content"?u(`${f}_after`):u(f)}}},d5=new Set(["input","select","custom","content"]),fm=e=>(e==null?void 0:e.reduce((t,n)=>{const{key:r,type:o}=n;if(!r)return t;const i=n.props||{},a=d5.has(o)?i.defaultValue:i.value??i.label;return t[r]=a??"",t},{}))??{},f5=(e,t)=>{e==null||e.forEach(n=>{n.key&&t.set(n.key,n)})},p5=(e,t)=>{if(!(e!=null&&e.dataset))return null;const{dataset:n}=e;return{slotKey:n.slotKey,placeholder:n.placeholder,nodeType:n.nodeType,skillKey:n.skillKey,slotConfig:n.slotKey?t.get(n.slotKey):void 0,targetNode:e}},m5=e=>{const[t,n]=b.useState({}),r=b.useRef(t),o=b.useRef(new Map),i=b.useRef(new Set);b.useEffect(()=>{if(!e)return;o.current.forEach((f,p)=>{i.current.has(p)||o.current.delete(p)}),f5(e,o.current);const d=fm(e);i.current.forEach(f=>{f in r.current&&(d[f]=r.current[f])}),n(d),r.current=d},[e]);const a=b.useCallback(d=>{const f=typeof d=="function"?d(r.current):d;n(f),r.current=f},[]),s=b.useCallback(d=>{const f=fm(d);d.forEach(p=>{p.key&&(o.current.set(p.key,p),i.current.add(p.key))}),n(p=>({...p,...f})),r.current={...r.current,...f}},[]),l=b.useCallback(()=>{o.current.clear(),i.current.clear(),n({}),r.current={}},[]),c=b.useCallback(d=>p5(d,o.current),[]),u=d=>{var E;const f=d.nodeType;if(f===Node.TEXT_NODE)return d.textContent||"";if(f!==Node.ELEMENT_NODE)return"";const p=d,h=c(p);if(!h)return p.innerText||"";const{slotKey:m,skillKey:w,nodeType:y,slotConfig:$}=h;if(w)return"";const x=p.innerText||"";if(m){if(y==="nbsp")return" ";if(!$)return x;const v=$.type==="content"?x:r.current[m]??"";return((E=$.formatResult)==null?void 0:E.call($,v))??v}return x};return[o.current,{getSlotValues:()=>r.current,setSlotValues:a,mergeSlotConfig:s,getNodeInfo:c,getNodeTextValue:u,clear:l}]},$0=({removeSkill:e,prefixCls:t,toolTip:n,closable:r,title:o,value:i})=>{const a=`${t}-skill`,s=b.useMemo(()=>{if(!r)return[null];const u=typeof r=="boolean"?{}:r,d=h=>{var m;u.disabled||(h.stopPropagation(),e(),(m=u.onClose)==null||m.call(u,h))},f=u.closeIcon||b.createElement(Xu,{className:`${a}-close-icon`});return b.createElement("div",{className:Z(`${a}-close`,{[`${a}-close-disabled`]:u.disabled}),onClick:d,role:"button","aria-label":"Close skill",tabIndex:0},f)},[r,e]),l=o||i,c=n?b.createElement(Si,n,l):l;return b.createElement("div",{className:`${a}-wrapper`,contentEditable:!1},b.createElement("div",{className:`${a}-tag`,contentEditable:!1,role:"button",tabIndex:0},b.createElement("span",{className:`${a}-tag-text`},c),s),b.createElement("div",{className:`${a}-holder`}))};$0.displayName="Skill";const k0=b.forwardRef((e,t)=>{var Be;const{onChange:n,onKeyUp:r,onKeyDown:o,onPaste:i,onPasteFile:a,disabled:s,readOnly:l,submitType:c="enter",prefixCls:u,styles:d={},classNames:f={},autoSize:p,triggerSend:h,placeholder:m,onFocus:w,onBlur:y,slotConfig:$,skill:x,...E}=b.useContext(bs),{direction:v,getPrefixCls:C}=vo(),I=`${C("sender",u)}`,N=Mu("sender"),A=`${I}-input`,k=b.useRef(null),R=b.useRef(new Map),O=b.useRef(!1),z=b.useRef(!1),D=b.useRef(null),M=b.useRef(null),L=b.useRef(null),_={...(Be=N.styles)==null?void 0:Be.input,...d.input},V=c5(_,p,k),P={...Za(E,{attr:!0,aria:!0,data:!0}),ref:k},[Y,{getSlotValues:K,setSlotValues:T,getNodeInfo:ne,mergeSlotConfig:F,getNodeTextValue:U,clear:re}]=m5($),[j,H]=b.useState(new Map),[ee,oe]=b.useState(null),{setEndCursor:B,setStartCursor:ie,setAllSelectCursor:ae,setCursorPosition:Se,setSlotFocus:ye,setAfterNodeFocus:q,getTextBeforeCursor:me,removeAllRanges:he,getRange:se,getInsertPosition:ue,getEndRange:pe,getStartRange:Ne,getSelection:Ee,copySelectionString:Ie,getCleanedText:W}=l5({prefixCls:I,getSlotDom:G=>R.current.get(G),slotConfigMap:Y,getNodeInfo:ne,getEditorValue:()=>Me()}),{buildSkillSpan:Q,buildEditSlotSpan:le,buildSlotSpan:be,buildSpaceSpan:$e,getSlotDom:ce,saveSlotDom:te,getSlotLastDom:ve}=u5({prefixCls:I,placeholder:m,slotDomMap:R,slotConfigMap:Y}),Re=G=>{const ge=Me();M.current&&(!(ge!=null&&ge.value)&&ge.slotConfig.length===0&&m?(M.current.setAttribute("contenteditable","true"),M.current.classList.add(`${I}-skill-empty`)):(M.current.setAttribute("contenteditable","false"),M.current.classList.remove(`${I}-skill-empty`))),n==null||n(ge.value,G,ge.slotConfig,ge.skill)},Ue=(G,ge,de)=>{const we=ce(G),Te=Y.get(G);if(T(ke=>({...ke,[G]:ge})),we&&Te){const ke=Pe(Te,we);H(Fe=>{const De=new Map(Fe);return De.set(G,ke),De}),Re(de)}},Pe=(G,ge)=>{if(!G.key)return null;const de=K()[G.key],we=()=>{var Te,ke,Fe,De,ft,Pt,ht,Ct,mt;switch(G.type){case"content":return ge.innerHTML=de||"",ge.setAttribute("data-placeholder",((Te=G.props)==null?void 0:Te.placeholder)||""),null;case"input":return b.createElement(Vr,{readOnly:l,className:`${I}-slot-input`,placeholder:((ke=G.props)==null?void 0:ke.placeholder)||"","data-slot-input":G.key,size:"small",variant:"borderless",value:de||"",tabIndex:0,onKeyDown:Rt,onChange:Lt=>{Ue(G.key,Lt.target.value,Lt)},spellCheck:!1});case"select":return b.createElement(Qx,{disabled:l,menu:{items:(De=(Fe=G.props)==null?void 0:Fe.options)==null?void 0:De.map(Lt=>({label:Lt,key:Lt})),defaultSelectedKeys:(ft=G.props)!=null&&ft.defaultValue?[G.props.defaultValue]:[],selectable:!0,onSelect:({key:Lt,domEvent:Le})=>{Ue(G.key,Lt,Le)}},trigger:["click"]},b.createElement("span",{className:Z(`${I}-slot-select`,{placeholder:!de,[`${I}-slot-select-selector-value`]:de})},b.createElement("span",{"data-placeholder":(Pt=G.props)==null?void 0:Pt.placeholder,className:`${I}-slot-select-value`},de||""),b.createElement("span",{className:`${I}-slot-select-arrow`},b.createElement(a0,null))));case"tag":return b.createElement("span",{className:`${I}-slot-tag`},((ht=G.props)==null?void 0:ht.label)||((Ct=G.props)==null?void 0:Ct.value)||"");case"custom":return(mt=G.customRender)==null?void 0:mt.call(G,de,Lt=>{Ue(G.key,Lt)},{disabled:s,readOnly:l},G);default:return null}};return po.createPortal(we(),ge)},ze=G=>G.reduce((ge,de)=>{if(de.type==="text")return ge.push(document.createTextNode(de.value||"")),ge;const we=de.key;if(tn(!!we,"Sender",`Slot key is missing: ${we}`),we){let Te,ke;if(de.type==="content"){ke=le(de);const Fe=$e(we,"before"),De=$e(we,"after");Te=[Fe,ke,De],te(`${we}_before`,Fe),te(we,ke),te(`${we}_after`,De)}else ke=be(we),Te=[ke],te(we,ke);if(ke){const Fe=Pe(de,ke);Fe&&(H(De=>{const ft=new Map(De);return ft.set(we,Fe),ft}),ge.push(...Te))}}return ge},[]),Me=()=>{const G=k.current,ge={value:"",slotConfig:[],skill:void 0};if(!G)return ge;const de=G.childNodes;if(de.length===0)return G.innerHTML="",M.current=null,ge;const we=!!x,Te=new Array(de.length),ke=[];let Fe,De=0;for(let Pt=0;Pt<de.length;Pt++){const ht=de[Pt],Ct=U(ht);if(Te[De++]=Ct,ht.nodeType===Node.TEXT_NODE)Ct&&ke.push({type:"text",value:Ct});else if(ht.nodeType===Node.ELEMENT_NODE){const Lt=ne(ht);if(Lt){const{skillKey:Le,slotKey:Tt,nodeType:Nt}=Lt;if(Le&&we&&(Fe=x),Tt&&Nt!=="nbsp"){const Vn=Y.get(Tt);Vn&&ke.push({...Vn,value:Ct})}}}}const ft=Te.slice(0,De).join("");return Fe||(M.current=null),{value:ft,slotConfig:ke,skill:Fe}},it=()=>{var ge;const G=k.current;G&&(G.innerHTML="",M.current=null,L.current=null,D.current=null,he(),(ge=R==null?void 0:R.current)==null||ge.clear())},Ye=G=>{G.forEach(ge=>{var de;(de=k.current)==null||de.appendChild(ge)})},It=(G,ge)=>{const de=k.current;de&&(de.querySelectorAll(`[data-slot-key="${G}"]`).forEach(we=>{we.remove()}),R.current.delete(G),T(we=>{const{[G]:Te,...ke}=we;return ke}),H(we=>{const Te=new Map(we);return Te.delete(G),Te}),Re(ge))},wt=()=>{if(x&&L.current!==x){Ot(!1),L.current=x;const G=Q(x.value),ge=po.createPortal(b.createElement($0,$t({removeSkill:Ot},x,{prefixCls:I})),G);oe(ge);const de=document.createRange(),we=k.current;if(!we)return;de.setStart(we,0),de.insertNode(G),M.current=G,Re()}},Ot=(G=!0)=>{var de;!k.current||!M.current||((de=M.current)==null||de.remove(),M.current=null,L.current=null,G&&Re())},gt=G=>{c!=="enter"||!G||G.querySelectorAll("br").forEach(ge=>{ge.remove()})},_t=()=>{$&&$.length>0&&k.current&&(it(),Ye(ze($)))},jt=G=>{const ge=o==null?void 0:o(G);return z.current||O.current||ge===!1},_e=(G,ge)=>{var Fe,De,ft;if(!k.current)return!1;const{range:de,selection:we}=se();if(!we||we.rangeCount===0)return!1;const{focusOffset:Te,anchorNode:ke}=we;if(!ke||!k.current.contains(ke))return!1;if(ke.nodeType===Node.TEXT_NODE&&de){const Pt=ke.parentNode,ht=ne(Pt),Ct=de.toString(),mt=((Fe=ke.textContent)==null?void 0:Fe.length)===Ct.length,Lt=((De=ke.textContent)==null?void 0:De.length)===1&&Te===1;if(((ft=ht==null?void 0:ht.slotConfig)==null?void 0:ft.type)==="content"&&(mt||Lt))return G.preventDefault(),ge==="cut"&&Ie(),ke.parentNode.innerHTML="",!0}if(ge==="backspace"&&Te===0){const Pt=ke.previousSibling;if(Pt){const ht=ne(Pt);if(ht){const{slotKey:Ct,skillKey:mt}=ht;if(Ct)return G.preventDefault(),It(Ct,G),!0;if(mt)return G.preventDefault(),Ot(),!0}}}return!1},pt=G=>{const{key:ge,shiftKey:de,ctrlKey:we,altKey:Te,metaKey:ke}=G;if(ge!=="Enter")return!1;const Fe=we||Te||ke;return c==="enter"&&!de&&!Fe||c==="shiftEnter"&&de&&!Fe},Cn=()=>{if(!M.current||!k.current||M.current.getAttribute("contenteditable")==="false")return;const G=Ee();!(G!=null&&G.anchorNode)||!M.current.contains(G.anchorNode)||!k.current.contains(G.anchorNode)||(M.current.setAttribute("contenteditable","false"),M.current.classList.remove(`${I}-skill-empty`),Qe({cursor:"end"}))},jn=()=>{O.current=!0},Bn=()=>{O.current=!1,z.current=!1},Rt=G=>{if(!jt(G)&&!(G.key==="Backspace"&&_e(G,"backspace"))){if(pt(G)){G.preventDefault(),z.current=!0,h==null||h();return}if((G.key==="a"||G.key==="A")&&(G.ctrlKey||G.metaKey)&&!G.shiftKey&&!G.altKey){ae(k.current,M.current),G.preventDefault();return}Cn()}},Sn=G=>{w==null||w(G)},Ht=G=>{z.current&&(z.current=!1);const{range:ge}=se();D.current=ge;const de=setTimeout(()=>{D.current=null,clearTimeout(de)},200);y==null||y(G)},an=G=>{gt(k==null?void 0:k.current),Re(G)},Hn=G=>{_e(G,"cut")},fn=G=>{var we,Te;G.preventDefault();const ge=(we=G.clipboardData)==null?void 0:we.files,de=(Te=G.clipboardData)==null?void 0:Te.getData("text/plain");if(!de&&(ge!=null&&ge.length)&&a){a(ge);return}if(de){let ke=!1;const Fe=W(de);try{ke=document.execCommand("insertText",!1,Fe)}catch(De){tn(!1,"Sender",`insertText command failed: ${De}`)}ke||Dt([{type:"text",value:Fe}])}i==null||i(G)},pn=G=>{G.key==="Enter"&&(z.current=!1),r==null||r(G)},en=()=>{const G=k.current,ge=Ee();G&&(ge==null?void 0:ge.focusNode)===G&&ge.focusOffset===0&&Me().skill&&Se(G,k.current,1)},Dt=(G,ge,de,we)=>{const Te=k.current;if(Te)try{F(G);const ke=ze(G);if(ke.length===0)return;const Fe=at(ge,Te);if(!Fe.range||!Fe.selection)return;const{range:De,selection:ft}=Fe;de!=null&&de.length&&Vt(De,de,Te),De.deleteContents(),vt(ke,De,Fe),Oe(ke,De,ft,we)}catch(ke){tn(!1,"Sender",`Insert operation failed: ${ke}`)}},at=(G,ge)=>{const{type:de,slotKey:we,slotType:Te,range:ke,selection:Fe}=ue(G,k,D);if(!Fe)return{range:null,selection:null,type:de};let De=null;switch(de){case"end":De=pe(ge);break;case"start":De=Ne(ge);break;case"slot":De=se().range;break;case"box":De=ke||null,De&&M.current&&De.collapsed&&De.startOffset===0&&De.setStartAfter(M.current);break}return{range:De,selection:Fe,type:de,slotKey:we,slotType:Te}},Vt=(G,ge,de)=>{const{value:we,startContainer:Te,startOffset:ke}=me(de);we.length>=ge.length&&we.endsWith(ge)&&Te&&ke>=0&&(G.setStart(Te,ke-ge.length),G.setEnd(Te,ke),G.deleteContents())},vt=(G,ge,de)=>{const{type:we,slotKey:Te,slotType:ke}=de;let Fe=!0;G.forEach(De=>{if(Fe&&we==="slot"&&(ke!=="content"||De.nodeType!==Node.TEXT_NODE)&&Te){Fe=!1;const ft=ve(Te);ft&&ge.setStartAfter(ft)}ge.insertNode(De),ge.setStartAfter(De)})},Oe=(G,ge,de,we)=>{const Te=G[G.length-1];q(Te,k.current,ge,de,we),setTimeout(()=>{an(null)},0)},Qe=G=>{const ge={preventScroll:(G==null?void 0:G.preventScroll)??!1,cursor:(G==null?void 0:G.cursor)??"end",key:G==null?void 0:G.key};switch(ge.cursor){case"slot":ye(k,G==null?void 0:G.key,ge.preventScroll);break;case"start":ie(k.current,ge.preventScroll);break;case"all":ae(k.current,M.current,ge.preventScroll);break;case"end":B(k.current,ge.preventScroll);break}},st=()=>{var ge;const G=k.current;G&&(G.innerHTML="",L.current=null,M.current=null,re(),wt(),D.current=null,(ge=R==null?void 0:R.current)==null||ge.clear(),an(null))};return b.useEffect(()=>{_t(),x?wt():Re()},[$]),b.useEffect(()=>{wt()},[x]),b.useImperativeHandle(t,()=>({nativeElement:k.current,focus:Qe,blur:()=>{var G;return(G=k.current)==null?void 0:G.blur()},insert:Dt,clear:st,getValue:Me})),b.createElement(b.Fragment,null,b.createElement("div",$t({},P,{role:"textbox",tabIndex:0,style:{..._,...V},className:Z(A,`${A}-slot`,N.classNames.input,f.input,{[`${I}-rtl`]:v==="rtl"}),"data-placeholder":m,contentEditable:!l,suppressContentEditableWarning:!0,spellCheck:!1,onCut:Hn,onKeyDown:Rt,onKeyUp:pn,onPaste:fn,onCompositionStart:jn,onCompositionEnd:Bn,onFocus:Sn,onBlur:Ht,onSelect:en,onInput:an},E)),b.createElement("div",{style:{display:"none"},id:`${I}-slot-placeholders`},Array.from(j.values()),ee))});process.env.NODE_ENV!=="production"&&(k0.displayName="SlotTextArea");const I0=g.forwardRef((e,t)=>{const{speechRecording:n,disabled:r,onSpeechDisabled:o,prefixCls:i}=g.useContext(gs),a=e.disabled??r??o;let s=null;return n?s=g.createElement(UA,{className:`${i}-recording-icon`}):a?s=g.createElement(x0,null):s=g.createElement(y0,null),g.createElement(hs,$t({icon:s,variant:"text",color:"primary"},e,{action:"onSpeech",ref:t}))});var R0={};Object.defineProperty(R0,"__esModule",{value:!0});var g5=R0.default=h5;function h5(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function b5(e,t,n){return g5(e,t)||n}const P0=b.forwardRef((e,t)=>{const{value:n,onChange:r,onKeyUp:o,onKeyDown:i,onPaste:a,onPasteFile:s,disabled:l,readOnly:c,submitType:u="enter",prefixCls:d,styles:f={},classNames:p={},autoSize:h,components:m,triggerSend:w,placeholder:y,onFocus:$,onBlur:x,...E}=b.useContext(bs),v=b.useRef(null),C=(V,X="cursor")=>{var ne,F;const P=(F=(ne=v.current)==null?void 0:ne.resizableTextArea)==null?void 0:F.textArea,Y=P.value;let K=Y.length,T=Y.length;X==="cursor"&&(K=P==null?void 0:P.selectionStart,T=P==null?void 0:P.selectionEnd),X==="start"&&(K=0,T=0),P.value=Y.substring(0,K)+V+Y.substring(T,Y.length),P.selectionStart=K+V.length,P.selectionEnd=K+V.length,P.focus(),r==null||r(P.value)},I=()=>{r==null||r("")},N=()=>({value:n||"",slotConfig:[]});b.useImperativeHandle(t,()=>{var V,X,P,Y;return{nativeElement:(X=(V=v.current)==null?void 0:V.resizableTextArea)==null?void 0:X.textArea,focus:(P=v.current)==null?void 0:P.focus,blur:(Y=v.current)==null?void 0:Y.blur,insert:C,clear:I,getValue:N}});const A=b.useRef(!1),k=()=>{A.current=!0},R=()=>{A.current=!1},O=V=>{const X=i==null?void 0:i(V),{key:P,shiftKey:Y,ctrlKey:K,altKey:T,metaKey:ne}=V;if(!(A.current||P!=="Enter"||X===!1)&&P==="Enter"){const F=K||T||ne;if(u==="enter"&&!Y&&!F||u==="shiftEnter"&&Y&&!F){V.preventDefault(),w==null||w();return}}},z=V=>{var Y,K;const X=(Y=V.clipboardData)==null?void 0:Y.files;!((K=V.clipboardData)==null?void 0:K.getData("text/plain"))&&(X!=null&&X.length)&&s&&(s(X),V.preventDefault()),a==null||a(V)},D=b5(m,["input"],Vr.TextArea),L={...Za(E,{attr:!0,aria:!0,data:!0}),ref:v},_=V=>{r==null||r(V.target.value,V)};return b.createElement(D,$t({},L,{disabled:l,style:f.input,className:Z(`${d}-input`,p.input),autoSize:h,value:n,onChange:_,onKeyUp:o,onCompositionStart:k,onCompositionEnd:R,onKeyDown:O,onPaste:z,variant:"borderless",readOnly:c,placeholder:y,onFocus:$,onBlur:x}))});process.env.NODE_ENV!=="production"&&(P0.displayName="TextArea");function x5(e,t){const n=Ge(e),[r,o,i]=b.useMemo(()=>typeof t=="object"?[t.recording,t.onRecordingChange,typeof t.recording=="boolean"]:[void 0,void 0,!1],[t]),[a,s]=b.useState(null);b.useEffect(()=>{if(!i&&"permissions"in navigator){let w=null;return navigator.permissions.query({name:"microphone"}).then(y=>{s(y.state),y.onchange=function(){s(this.state)},w=y}).catch(y=>{const $=y instanceof Error?y.message:String(y);tn(!1,"Sender",`Browser does not support querying microphone permission. ${$}`)}),()=>{w&&(w.onchange=null)}}},[i]);let l;!l&&typeof window<"u"&&(l=window.SpeechRecognition||window.webkitSpeechRecognition);const c=!!(i||l&&a!=="denied"),u=b.useRef(null),[d,f]=un(!1,r),p=b.useRef(!1),h=()=>{if(c&&!u.current){const w=new l;w.onstart=()=>{f(!0)},w.onend=()=>{f(!1)},w.onresult=y=>{var $,x,E;if(!p.current){const v=(E=(x=($=y.results)==null?void 0:$[0])==null?void 0:x[0])==null?void 0:E.transcript;n(v)}p.current=!1},u.current=w}},m=Ge(w=>{w&&!d||(p.current=w,i?o==null||o(!d):(h(),u.current&&(d?(u.current.stop(),o==null||o(!1)):(u.current.start(),o==null||o(!0)))))});return b.useEffect(()=>()=>{const w=u.current;if(w){w.onstart=null,w.onend=null,w.onresult=null;try{w.stop()}catch{}u.current=null}},[]),[c,m,d]}const T0=g.createContext({}),pm=()=>({height:0}),mm=e=>({height:e.scrollHeight});function y5(e){const{title:t,onOpenChange:n,open:r,children:o,className:i,style:a,classNames:s={},styles:l={},prefixCls:c,closable:u,forceRender:d}=e,{prefixCls:f}=g.useContext(T0),{direction:p,getPrefixCls:h}=vo(),m=h("sender",c||f),w=`${m}-header`,y=()=>{n==null||n(!r)};return g.createElement(vr,{motionEnter:!0,motionLeave:!0,motionName:`${w}-motion`,leavedClassName:`${w}-motion-hidden`,onEnterStart:pm,onEnterActive:mm,onLeaveStart:mm,onLeaveActive:pm,visible:r,forceRender:d},({className:$,style:x})=>g.createElement("div",{className:Z(m,w,$,i,{[`${w}-rtl`]:p==="rtl"}),style:{...x,...a}},(u!==!1||t)&&g.createElement("div",{className:Z(`${w}-header`,s.header),style:{...l.header}},g.createElement("div",{className:`${w}-title`},t),u!==!1&&g.createElement("div",{className:`${w}-close`},g.createElement(ar,{type:"text",icon:g.createElement(Xu,null),size:"small",onClick:y}))),o&&g.createElement("div",{className:Z(`${w}-content`,s.content),style:{...l.content}},o)))}const w5=e=>{const{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[`&${r}-rtl`]:{direction:"rtl"},[`${r}`]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorderInput,[`${r}-header`]:{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",borderRadius:{_skip_check_:!0,value:n(e.borderRadius).mul(2).equal()},borderEndStartRadius:0,borderEndEndRadius:0,[`${r}-title`]:{flex:"auto"}},[`${r}-content`]:{padding:e.padding}},[`${r}-motion`]:{transition:["height","border"].map(o=>`${o} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}},v5=e=>{const{componentCls:t,antCls:n,calc:r}=e,o=`${t}-slot`,i=`${n}-input`,a=`${i}-borderless`,s=`${n}-dropdown-trigger`,l=`${t}-slot-input`,c=`${t}-slot-select`,u=`${t}-slot-tag`,d=`${t}-slot-content`,f=`${t}-skill`;return{[t]:{[`${t}-input-slot`]:{outline:"none",cursor:"text",whiteSpace:"pre-wrap",width:"100%",caretColor:e.colorPrimary,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:"attr(data-placeholder)",color:e.colorTextPlaceholder}},[`${o}:not(${d})`]:{display:"inline-block",verticalAlign:"middle",alignItems:"center",marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:"break-all",marginInline:e.marginXXS},[`${i}${l}`]:{height:"100%",background:e.colorBgSlot,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,fontSize:"inherit",lineHeight:"inherit",position:"relative",[`&${a}`]:{"&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)":{outline:"none"}},"&::placeholder":{color:e.colorTextSlotPlaceholder,fontSize:"inherit",lineHeight:"inherit"},[o]:{display:"inline-flex",margin:`0 ${xe(e.marginXXS)}`,verticalAlign:"bottom",alignItems:"center",marginBlock:xe(r(e.marginXXS).div(2).equal()),minHeight:e.controlHeightSM,wordBreak:"break-all"}},[c]:{fontSize:e.fontSize,lineHeight:e.lineHeight,paddingInline:e.paddingXXS,transition:`border-color ${e.motionDurationMid}`,position:"relative",display:"inline-flex",alignItems:"center",cursor:"pointer",background:e.colorBgSlot,height:"100%",boxSizing:"border-box",borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`${c}`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,padding:`0 ${xe(e.paddingXXS)}`,transition:`border-color ${e.motionDurationMid}`,position:"relative",display:"inline",cursor:"pointer",background:e.colorBgSlot,alignItems:"center",justifyContent:"center",borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`&${s}-open`]:{borderColor:e.colorBorderSlotHover}},[`${c}-value`]:{flex:1,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:"attr(data-placeholder)"}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"inline-flex",alignItems:"center",justifyContent:"center"},[`${u}`]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${xe(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"relative",cursor:"default"}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"inline-flex",alignItems:"center",justifyContent:"center"},[u]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${xe(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,height:"100%",boxSizing:"border-box",position:"relative",cursor:"default"},[d]:{height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),caretColor:e.colorPrimary,background:e.colorBgSlot,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,boxSizing:"border-box",verticalAlign:"middle",fontSize:e.fontSize,marginBlock:1,lineHeight:e.lineHeight,display:"inline-block",position:"relative",cursor:"text","&:empty":{width:"fit-content","&::after":{display:"inline-block",height:"inherit",content:"attr(data-placeholder)",color:e.colorTextSlotPlaceholder}}},[`${o}-no-width`]:{userSelect:"none",width:"3px",display:"inline-block",lineHeight:"inherit"},[f]:{display:"inline-block",verticalAlign:"baseline",alignItems:"center",marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:"break-all",paddingInlineEnd:0,paddingInlineStart:0,marginInlineEnd:0,marginInlineStart:-1,[`&${f}-empty`]:{"&::after":{display:"inline-block",pointerEvents:"none",height:"inherit",content:"attr(data-placeholder)",color:e.colorTextPlaceholder}}},[`${f}-wrapper`]:{height:"100%",display:"inline-flex"},[`${f}-tag`]:{paddingInline:e.paddingXS,height:"100%",backgroundColor:e.colorBgSkill,borderRadius:e.borderRadius,color:e.colorPrimary,alignItems:"center",fontWeight:500,display:"inline-flex",cursor:"pointer",gap:e.marginXXS,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorBgSkillHover,[`${f}-tag-close:not(${f}-tag-close-disabled)`]:{color:e.colorPrimaryHover}},"&-close":{fontSize:e.fontSizeSM,display:"inline-flex",transition:`color ${e.motionDurationMid}`,color:e.colorPrimary},"&-close-disabled":{cursor:"not-allowed",color:e.colorTextDisabled}},[`${f}-holder`]:{width:e.marginXS,height:"100%"}}}},C5=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-switch`;return{[t]:{[`&${r}-rtl`]:{direction:"rtl"},[`&${r}`]:{display:"inline-block",[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchUncheckedHoverBg,borderColor:e.colorBorder,color:e.colorText},[`&${r}-checked`]:{[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchCheckedHoverBg,borderColor:e.colorPrimary,color:e.colorPrimaryText},[`${r}-content`]:{background:e.switchCheckedBg}}}}}},S5=e=>{const{antCls:t,componentCls:n,paddingSM:r,paddingXS:o,paddingXXS:i,lineWidth:a,calc:s}=e;return{[n]:{[`&${n}-main`]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorderInput,borderWidth:a,borderStyle:"solid"},[`&${n}-disabled`]:{background:e.colorBgContainerDisabled,borderColor:"transparent"},[`&${n}-rtl`]:{direction:"rtl"},[`${n}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:r,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${n}-prefix`]:{flex:"none"},[`${n}-input`]:{paddingInline:0,borderRadius:0,flex:"auto",alignSelf:"center",caretColor:e.colorPrimary,fontSize:e.fontSize,[`&${t}-input-borderless`]:{"&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)":{outline:"none"}}},[`${n}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${n}-actions-btn`]:{[`&-disabled:where(${t}-btn-variant-text)`]:{color:e.colorTextActionsDisabled,borderColor:"transparent"},[`&-disabled:not(${t}-btn-variant-text)`]:{background:e.colorBgActionsDisabled,color:e.colorTextLightSolid,borderColor:"transparent"},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}},[`${n}-footer`]:{paddingInlineStart:r,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:i,boxSizing:"border-box"}}}},E5=e=>{const{colorPrimary:t,colorFillTertiary:n}=e,r=new Ve(t).setA(.06).toRgbString(),o=new Ve(t).setA(.08).toRgbString(),i=new Ve(t).setA(.15).toRgbString(),a=t,s=new Ve(t).setA(.25).toRgbString(),l=new Ve(t).setA(.1).toRgbString(),c=r,u=new Ve(t).setA(.08).toRgbString(),d=new Ve(n).setA(.04).toRgbString(),f=new Ve(t).setA(.1).toRgbString(),p=new Ve(n).setA(.1).toRgbString(),h=`0 4px 12px 0 ${new Ve(t).setA(.1).toRgbString()}`,m=new Ve(t).setA(.45).toRgbString();return{colorBgSlot:r,colorBgSkill:o,colorBgSkillHover:i,colorTextSlot:a,colorTextSlotPlaceholder:s,colorBorderSlotHover:l,colorBorderSlot:c,switchCheckedBg:u,switchCheckedHoverBg:f,switchUncheckedHoverBg:d,colorBorderInput:p,boxShadowInput:h,colorBgActionsDisabled:m,colorTextActionsDisabled:m}},N0=r5("Sender",e=>{const{paddingXS:t,calc:n}=e,r=yt(e,{SenderContentMaxWidth:`calc(100% - ${xe(n(t).add(32).equal())})`});return[S5(r),w5(r),C5(r),v5(r)]},E5),ta={SendButton:E0,ClearButton:i5,LoadingButton:S0,SpeechButton:I0},$5=b.forwardRef((e,t)=>{const{prefixCls:n,styles:r={},classNames:o={},className:i,rootClassName:a,style:s,defaultValue:l,value:c,slotConfig:u,readOnly:d,submitType:f="enter",onSubmit:p,loading:h,components:m,onCancel:w,onChange:y,suffix:$,onKeyUp:x,onKeyDown:E,disabled:v,allowSpeech:C,prefix:I,footer:N,header:A,onPaste:k,onPasteFile:R,autoSize:O={maxRows:8},placeholder:z,onFocus:D,onBlur:M,skill:L,..._}=e,V=Za(_,{attr:!0,aria:!0,data:!0}),X=b.useId(),P=Array.isArray(u)||(L==null?void 0:L.value),{direction:Y,getPrefixCls:K}=vo(),T=K("sender",n),ne=b.useRef(null),F=b.useRef(null);gh(t,()=>{var ce;return{nativeElement:ne.current,inputElement:(ce=F.current)==null?void 0:ce.nativeElement,focus:te=>{var ve;return(ve=F.current)==null?void 0:ve.focus(te)},blur:()=>{var te;return(te=F.current)==null?void 0:te.blur()},insert:(...te)=>{var ve,Re;return(Re=(ve=F.current)==null?void 0:ve.insert)==null?void 0:Re.call(ve,...te)},clear:()=>{var te;return(te=F.current)==null?void 0:te.clear()},getValue:()=>{var te;return((te=F.current)==null?void 0:te.getValue())??{value:"",slotConfig:[],skill:void 0}}}});const U=Mu("sender"),re=`${T}-input`,[j,H]=N0(T),ee=Z(T,U.className,i,a,U.classNames.root,o.root,j,H,`${T}-main`,{[`${T}-rtl`]:Y==="rtl",[`${T}-disabled`]:v}),oe=`${T}-actions-btn`,B=`${T}-actions-list`,[ie,ae]=un(l||"",c),Se=(ce,te,ve,Re)=>{ae(ce),y==null||y(ce,te,ve??[],Re)},[ye,q,me]=x5(ce=>{var te,ve;P?(ve=(te=F.current)==null?void 0:te.insert)==null||ve.call(te,[{type:"text",value:ce}]):Se(`${ie} ${ce}`)},C),he=()=>{if(F!=null&&F.current&&p&&!h&&!W){const ce=F.current.getValue();p(ce.value,ce.slotConfig,ce.skill)}},se=()=>{var ce,te;Se(""),P&&((te=(ce=F.current)==null?void 0:ce.clear)==null||te.call(ce))},ue=b.createElement(t0,{className:`${B}-presets`},C&&b.createElement(I0,null),h?b.createElement(S0,null):b.createElement(E0,null));let pe=ue;typeof $=="function"?pe=$(ue,{components:ta}):($||$===!1)&&(pe=$);const Ne=typeof I=="function"?I(ue,{components:ta}):I||null,Ee=typeof A=="function"?A(ue,{components:ta}):A||null,Ie=typeof N=="function"?N(ue,{components:ta}):N||null,[W,Q]=b.useState(!ie),le={prefixCls:oe,onSend:he,onSendDisabled:!ie,onClear:se,onClearDisabled:!ie,onCancel:w,onCancelDisabled:!h,onSpeech:()=>q(!1),onSpeechDisabled:!ye,speechRecording:me,disabled:v,setSubmitDisabled:Q},be=b.useMemo(()=>({value:ie,onChange:Se,slotConfig:u,onKeyUp:x,onKeyDown:E,onPaste:k,onPasteFile:R,disabled:v,readOnly:d,submitType:f,prefixCls:T,styles:r,classNames:o,autoSize:O,components:m,triggerSend:he,placeholder:z,onFocus:D,onBlur:M,skill:L,..._}),[ie,Se,u,x,E,k,R,v,d,f,T,r,o,O,m,he,z,D,M,L,_]),$e=ce=>{var te,ve,Re;!P&&ce.target!==((te=ne.current)==null?void 0:te.querySelector(`.${re}`))&&ce.preventDefault(),ce.target===((ve=ne.current)==null?void 0:ve.querySelector(`.${re}`))&&((Re=F.current)==null||Re.focus())};return b.createElement("div",$t({key:X,ref:ne,className:ee,style:{...U.style,...s,...U.styles.root,...r.root}},V),b.createElement(bs.Provider,{value:be},b.createElement(gs.Provider,{value:le},Ee&&b.createElement(T0.Provider,{value:{prefixCls:T}},Ee),b.createElement("div",{className:Z(`${T}-content`,o.content),style:r.content,onMouseDown:$e},Ne&&b.createElement("div",{className:Z(`${T}-prefix`,U.classNames.prefix,o.prefix),style:{...U.styles.prefix,...r.prefix}},Ne),P?b.createElement(k0,{ref:F}):b.createElement(P0,{ref:F}),pe&&b.createElement("div",{className:Z(B,U.classNames.suffix,o.suffix),style:{...U.styles.suffix,...r.suffix}},pe)),Ie&&b.createElement("div",{className:Z(`${T}-footer`,U.classNames.footer,o.footer),style:{...U.styles.footer,...r.footer}},Ie))))}),M0=$5;process.env.NODE_ENV!=="production"&&(M0.displayName="Sender");const k5=g.forwardRef((e,t)=>{const{children:n,className:r,classNames:o={},styles:i={},icon:a,style:s,onChange:l,rootClassName:c,loading:u,defaultValue:d,value:f,checkedChildren:p,unCheckedChildren:h,disabled:m,prefixCls:w,...y}=e,{styles:$={},classNames:x={},prefixCls:E}=g.useContext(bs),v=Za(y,{attr:!0,aria:!0,data:!0}),C=g.useId(),{direction:I,getPrefixCls:N}=vo(),A=N("sender",w||E),k=`${A}-switch`,[R,O]=N0(A),z=g.useRef(null);gh(t,()=>({nativeElement:z.current}));const[D,M]=un(d,f),L=Mu("sender"),_=Z(A,k,r,c,L.classNames.switch,x.switch,o.root,R,O,{[`${k}-checked`]:D,[`${k}-rtl`]:I==="rtl"});return g.createElement("div",$t({ref:z,className:_,key:C,style:{...s,...L.styles.switch,...$.switch,...i.root}},v),g.createElement(ar,{disabled:m,loading:u,className:Z(`${k}-content`,o.content),style:i.content,styles:{icon:i.icon,content:i.title},classNames:{icon:o.icon,content:o.title},variant:"outlined",color:D?"primary":"default",icon:a,onClick:()=>{const V=!D;M(V),l==null||l(V)}},D?p:h,n))}),hd=M0;hd.Header=y5;hd.Switch=k5;function A0({size:e=12}){return S.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:S.jsx("path",{d:"M12 2.5l1.8 5.2a3 3 0 0 0 1.9 1.9l5.2 1.8-5.2 1.8a3 3 0 0 0-1.9 1.9L12 20.3l-1.8-5.2a3 3 0 0 0-1.9-1.9L3.1 11.4l5.2-1.8a3 3 0 0 0 1.9-1.9z"})})}function I5({items:e,activeIndex:t,onSelect:n}){const r=b.useRef(null);return b.useEffect(()=>{var i;const o=(i=r.current)==null?void 0:i.children[t];o==null||o.scrollIntoView({block:"nearest"})},[t]),S.jsxs("div",{className:"sa-slash-menu",children:[S.jsxs("div",{className:"sa-slash-menu-header",children:["技能 (",e.length,")"]}),S.jsx("div",{className:"sa-slash-menu-body",ref:r,children:e.length===0?S.jsx("div",{className:"sa-slash-menu-empty",children:"没有匹配的技能"}):e.map((o,i)=>{const a=o.displayName||o.name,s=o.owner==="member"&&o.memberName?o.memberName:null,l=!o.selectable;return S.jsxs("div",{className:"sa-slash-menu-item"+(i===t?" sa-slash-menu-item--active":"")+(l?" sa-slash-menu-item--disabled":""),"aria-disabled":l||void 0,title:l?o.disabledReason??void 0:void 0,onMouseDown:c=>{c.preventDefault(),!l&&n(o)},children:[S.jsx("span",{className:"sa-slash-menu-item-icon",children:S.jsx(A0,{size:13})}),S.jsx("span",{className:"sa-slash-menu-item-name",children:a}),s&&S.jsx("span",{className:"sa-slash-menu-item-owner",children:s}),l&&o.disabledReason?S.jsx("span",{className:"sa-slash-menu-item-desc",children:o.disabledReason}):o.description&&S.jsx("span",{className:"sa-slash-menu-item-desc",children:o.description})]},o.code)})})]})}function R5({sdk:e,input:t,onSelect:n}){const[r,o]=b.useState([]),[i,a]=b.useState(!1),[s,l]=b.useState(0),c=b.useRef(!1);b.useEffect(()=>{c.current||(c.current=!0,e.listSkills().then(o).catch(()=>o([])))},[e]);const u=/^\/\S*$/.test(t);b.useEffect(()=>{a(u)},[u]);const d=t.startsWith("/")?t.slice(1).toLowerCase():"",f=b.useMemo(()=>r.filter(v=>!d||v.code.toLowerCase().includes(d)||v.name.toLowerCase().includes(d)||v.displayName&&v.displayName.toLowerCase().includes(d)),[r,d]),p=b.useMemo(()=>f.reduce((v,C,I)=>C.selectable?[...v,I]:v,[]),[f]);b.useEffect(()=>{u&&l(p[0]??0)},[t,u,p]);const h=b.useRef(i),m=b.useRef(f),w=b.useRef(p),y=b.useRef(s),$=b.useRef(n);h.current=i,m.current=f,w.current=p,y.current=s,$.current=n;const x=b.useCallback(v=>{if(!h.current)return!1;const C=w.current;if(C.length===0)return!1;const I=N=>{const A=C.indexOf(y.current),k=A===-1?C[0]:C[(A+N+C.length)%C.length];l(k)};switch(v.key){case"ArrowDown":return v.preventDefault(),I(1),!0;case"ArrowUp":return v.preventDefault(),I(-1),!0;case"Enter":case"Tab":{const N=m.current[y.current];return!N||!N.selectable?!1:(v.preventDefault(),$.current(N),a(!1),!0)}case"Escape":return v.preventDefault(),a(!1),!0;default:return!1}},[]),E=b.useCallback(()=>a(!1),[]);return{isOpen:i,items:f,activeIndex:s,handleKeyDown:x,close:E}}const P5=10,T5="sa-sender",N5=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);function M5({size:e=16}){return S.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}function bd(){const{status:e,sendMessage:t,stop:n,sdk:r,attachmentUploader:o,nosUpload:i,activeConversationId:a}=Fn(),[s,l]=b.useState(""),[c,u]=b.useState(null),[d,f]=b.useState([]),p=b.useRef(null),h=b.useRef(null);b.useEffect(()=>{var L,_;if(!a||e!=="ready")return;const M=zn.popPendingChat();M&&M.sessionId===a&&M.message.trim()&&(l(M.message),(L=p.current)==null||L.insert(M.message,"end"),(_=p.current)==null||_.focus())},[a,e]);const m=!!o||!!i,w=e==="streaming"||e==="submitted",y=d.filter(M=>M.attachment),$=d.some(M=>!M.attachment&&M.status==="uploading"),x=!!s.trim()||!!c||d.length>0||w,E=!w&&!$&&(s.trim().length>0||!!c||y.length>0),v=b.useMemo(()=>c?{title:S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"sa-skill-inline-icon",children:S.jsx(A0,{})}),c.displayName||c.name]}),value:c.code,closable:!0,...c.owner==="member"&&c.memberName?{toolTip:{title:`${c.displayName||c.name}(成员 ${c.memberName} 的技能)`}}:{}}:void 0,[c]),C=b.useCallback((M,L,_,V)=>{l(M),V||u(X=>X&&null)},[]),I=b.useCallback(M=>{u(M),setTimeout(()=>{var L;return(L=p.current)==null?void 0:L.focus()},0)},[]),N=R5({sdk:r,input:s,onSelect:I}),A=b.useCallback(M=>{const L=Array.from(M.target.files??[]);if(M.target.value="",!m||L.length===0)return;const _=P5-d.length,V=L.slice(0,Math.max(0,_));if(V.length===0)return;const X=V.map(P=>({key:`${P.name}_${P.size}_${Date.now()}_${Math.random().toString(36).slice(2,6)}`,file:P,status:"uploading"}));f(P=>[...P,...X]);for(const{key:P,file:Y}of X)(o||zn.createNosUploader({baseURL:i.baseURL,headers:i.headers,trunkSize:i.trunkSize,onProgress:T=>f(ne=>ne.map(F=>F.key===P?{...F,percent:T}:F))}))(Y).then(T=>{f(ne=>ne.map(F=>F.key===P?{...F,attachment:{...T,filename:T.filename||Y.name,size:T.size??Y.size,mime:T.mime??Y.type}}:F))}).catch(T=>{f(ne=>ne.map(F=>F.key===P?{...F,status:"error",errorMsg:T instanceof Error?T.message:String(T)}:F))})},[o,i,d]),k=b.useCallback(M=>{f(L=>L.filter(_=>_.key!==M))},[]),R=b.useCallback(()=>{var X;if(!E)return;const M=s.trim(),L=y.map(P=>P.attachment),_=c?`/${c.code}${M?` ${M}`:""}`:M,V=c?`${c.displayName||c.name}${M?` ${M}`:""}`:void 0;t(_,L.length>0?L:void 0,V),(X=p.current)==null||X.clear(),l(""),u(null),f([])},[E,s,c,y,t]),O=b.useCallback(M=>{if(N.handleKeyDown(M))return!1;if(M.key==="Enter")return(M.metaKey||M.ctrlKey)&&(M.preventDefault(),R()),!1},[R,N.handleKeyDown]),z=b.useCallback(()=>{var M;w||(M=p.current)==null||M.focus()},[w]),D=S.jsxs("div",{className:"flex items-center justify-end gap-2",children:[m&&!w&&S.jsx("button",{type:"button",className:"sa-attach-btn mr-auto","aria-label":"添加附件",title:"添加附件",onClick:()=>{var M;return(M=h.current)==null?void 0:M.click()},children:S.jsx(M5,{size:15})}),S.jsx("input",{ref:h,type:"file",multiple:!0,className:"hidden",onChange:A,"aria-label":"选择附件"}),!w&&S.jsxs("span",{className:"sa-send-hint","aria-hidden":"true",children:[S.jsx("kbd",{className:"sa-send-kbd",children:N5?"⌘":"Ctrl"}),S.jsx("span",{children:"+"}),S.jsx("kbd",{className:"sa-send-kbd",children:"Enter"}),S.jsx("span",{children:"发送"})]}),w?S.jsx("button",{type:"button",className:"sa-send-btn sa-send-btn-active","aria-label":"停止生成",title:"停止生成",onClick:n,children:S.jsx("span",{className:"sa-stop-icon"})}):S.jsx("button",{type:"button",className:`sa-send-btn ${E?"sa-send-btn-active":""}`,"aria-label":"发送",title:"发送",onClick:R,disabled:!E,children:S.jsx("img",{src:Gt.sendSolid,alt:"发送",width:14,height:14,draggable:!1})})]});return S.jsxs("div",{className:"relative z-[2] shrink-0 px-[15px] pb-2.5",children:[N.isOpen&&S.jsx(I5,{items:N.items,activeIndex:N.activeIndex,onSelect:I}),d.length>0&&S.jsx("div",{className:"sa-attachment-tray mb-1.5",onClick:M=>M.stopPropagation(),children:d.map(M=>S.jsxs("span",{className:`sa-attachment-tray-chip ${M.status==="error"?"sa-attachment-tray-chip-error":""}`,title:M.status==="error"?`上传失败:${M.errorMsg??""}`:M.file.name,children:[S.jsx(Ze,{name:"file-text",size:13,color:M.status==="error"?"#ef4444":"#6366f1"}),S.jsx("span",{className:"sa-attachment-tray-chip-name",children:M.file.name}),S.jsx("span",{className:"sa-attachment-tray-chip-size",children:M.attachment?jg(M.file.size):M.status==="error"?"失败":M.percent!=null?`${Math.min(99,Math.round(M.percent))}%`:"上传中…"}),S.jsx("button",{type:"button",className:"sa-attachment-tray-chip-remove","aria-label":`移除附件 ${M.file.name}`,onClick:()=>k(M.key),children:"✕"})]},M.key))}),S.jsx("div",{className:"sa-composer-shell",onClick:z,children:S.jsx(b.Fragment,{children:S.jsx(hd,{ref:p,prefixCls:T5,rootClassName:`sa-input-form ${x?"sa-input-form-active":""} ${w?"sa-input-form-streaming":""}`,skill:v,onChange:C,onKeyDown:O,disabled:w,autoSize:{minRows:1,maxRows:5},placeholder:w?"回答生成中,请稍候…":c?"补充你的需求…":"发消息或创建任务... /使用技能",suffix:D})})}),S.jsx("div",{className:"mt-3 text-center text-[11px] leading-none text-[#B8B8B8]",children:"所有内容均由AI生成仅供参考"})]})}const A5=.3,z5=.7,O5=.5;function D5({artifact:e}){const[t,n]=b.useState(null),[r,o]=b.useState(null),[i,a]=b.useState(!0),[s,l]=b.useState(null);return b.useEffect(()=>{let c=!1;a(!0),l(null),n(null),o(null);async function u(){try{if(e.type==="pdf"){c||a(!1);return}if(e.type==="md"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.text();c||(o(f),a(!1));return}if(e.type==="html"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.text(),p=(await Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs"))).default;c||(n(p.sanitize(f,{FORCE_BODY:!0,ADD_ATTR:["target"]})),a(!1));return}if(e.type==="docx"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.arrayBuffer(),h=await(await Promise.resolve().then(()=>require("./mammoth.browser-DrqsE041.cjs")).then(w=>w.mammoth_browser)).convertToHtml({arrayBuffer:f}),m=(await Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs"))).default;c||(n(m.sanitize(h.value,{FORCE_BODY:!0,ADD_ATTR:["target"]})),a(!1));return}c||(a(!1),l(`不支持预览「${e.type}」类型`))}catch(d){c||(a(!1),l(d instanceof Error?d.message:"加载失败"))}}return u(),()=>{c=!0}},[e]),i?S.jsx("div",{className:"sa-drawer-preview-loading",children:"加载中"}):s?S.jsxs("div",{className:"sa-drawer-preview-error",children:[s,S.jsx("button",{className:"sa-drawer-btn-sm",onClick:()=>void pa(e),children:"下载查看"})]}):e.type==="pdf"?S.jsx("iframe",{src:e.url,title:e.filename,className:"sa-drawer-preview-iframe",sandbox:"allow-scripts"}):r!==null?S.jsx("div",{className:"sa-drawer-preview-html-scroll",children:S.jsx("div",{className:"sa-drawer-preview-html sa-text-part",children:S.jsx(bu,{remarkPlugins:[vu],children:r})})}):t!==null?S.jsx("div",{className:"sa-drawer-preview-html-scroll",children:S.jsx("div",{className:"sa-drawer-preview-html sa-text-part",dangerouslySetInnerHTML:{__html:t}})}):null}function L5({artifacts:e,initialArtifact:t,onClose:n}){const{previewLayoutMode:r,containerWidth:o,isDrawerFullscreen:i,setDrawerFullscreen:a}=Fn(),[s,l]=b.useState(t?{mode:"preview",artifact:t}:{mode:"list"}),[c,u]=b.useState(!1),d=b.useRef(null),[f,p]=b.useState(O5),h=b.useRef(null),m=i,w=!m&&r==="split",y=Math.round(o*f);b.useEffect(()=>{t&&(d.current&&(clearTimeout(d.current),d.current=null,u(!1)),l({mode:"preview",artifact:t}))},[t]);const $=b.useCallback(()=>{u(!0),d.current=setTimeout(()=>{d.current=null,n()},240)},[n]);b.useEffect(()=>()=>{var A;d.current&&clearTimeout(d.current),(A=h.current)==null||A.call(h)},[]);const x=b.useCallback(A=>{l({mode:"preview",artifact:A})},[]),E=b.useCallback(()=>{l({mode:"list"})},[]),v=b.useCallback(()=>a(!1),[a]);b.useEffect(()=>{const A=k=>{k.key==="Escape"&&(m?v():$())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[m,v,$]);const C=b.useCallback(A=>{if(!w)return;A.preventDefault();const k=A.clientX,R=y,O=D=>{const M=k-D.clientX,L=Math.max(o*A5,Math.min(o*z5,R+M));p(L/o)},z=()=>{document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",z),document.body.style.cursor="",document.body.style.userSelect="",h.current=null};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",O),document.addEventListener("mouseup",z),h.current=z},[w,y,o]),I=["sa-artifact-drawer",c?"sa-drawer-closing":"",m?"sa-drawer-fullscreen":"",!m&&r==="cover"?"sa-drawer-cover":""].filter(Boolean).join(" "),N=w?{width:y}:void 0;return o===0?null:S.jsxs("div",{className:I,style:N,onClick:m?A=>{A.target===A.currentTarget&&v()}:void 0,children:[S.jsx("div",{className:`sa-drawer-resize-handle ${w?"":"sa-drawer-handle-hidden"}`,onMouseDown:C}),S.jsxs("div",{className:"sa-drawer-shell",children:[S.jsxs("div",{className:"sa-artifact-drawer-header",children:[s.mode==="preview"?S.jsx("button",{className:"sa-drawer-btn",onClick:E,title:"返回列表","aria-label":"返回列表",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M15 18l-6-6 6-6"})})}):S.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{flexShrink:0},children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),S.jsx("span",{className:"sa-artifact-drawer-title",children:s.mode==="preview"?s.artifact.filename:"会话产物"}),S.jsx("div",{style:{flex:1}}),m&&S.jsx("button",{className:"sa-drawer-btn",onClick:v,title:"退出全屏","aria-label":"退出全屏",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 21h3a2 2 0 0 0 2-2v-3M16 21v-3a2 2 0 0 1 2-2h3"})})}),s.mode==="preview"&&S.jsxs(S.Fragment,{children:[S.jsx("button",{className:"sa-drawer-btn",onClick:()=>void pa(s.artifact),title:"下载","aria-label":"下载",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})}),!m&&S.jsx("button",{className:"sa-drawer-btn",onClick:()=>a(!0),title:"全屏","aria-label":"全屏",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})})]}),S.jsx("button",{className:"sa-drawer-btn",onClick:$,title:"关闭","aria-label":"关闭",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),S.jsx("div",{className:"sa-artifact-drawer-body",children:s.mode==="list"?e.length===0?S.jsx("div",{className:"sa-drawer-empty",children:"暂无产物"}):S.jsx("ul",{className:"sa-drawer-file-list",role:"list",children:e.map((A,k)=>S.jsxs("li",{className:"sa-drawer-file-card",onClick:()=>x(A),onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),x(A))},tabIndex:0,role:"button","aria-label":`预览 ${A.filename}`,children:[S.jsx("div",{className:"sa-drawer-file-icon",children:S.jsx("span",{className:"sa-artifact-chip-type",children:vm(A.type)})}),S.jsxs("div",{className:"sa-drawer-file-info",children:[S.jsx("span",{className:"sa-drawer-file-name",children:A.filename}),S.jsx("span",{className:"sa-drawer-file-size",children:wm(A.size)})]}),S.jsx("button",{className:"sa-drawer-btn",title:"下载","aria-label":`下载 ${A.filename}`,onClick:R=>{R.stopPropagation(),pa(A)},children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})})]},A.id||`artifact-${k}`))}):S.jsx("div",{className:"sa-drawer-view-enter",children:S.jsx(D5,{artifact:s.artifact})})})]})]})}function z0({page:e,onBack:t,centered:n}){b.useEffect(()=>{const o=i=>{i.key==="Escape"&&t()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[t]);const r=b.isValidElement(e.component)?b.cloneElement(e.component,{close:t}):b.createElement(e.component,{close:t});return S.jsx("div",{className:`sa-page-overlay ${n?"sa-page-overlay-centered":""}`,children:S.jsx("div",{className:"sa-page-overlay-body",children:r})})}const F5="mx-auto w-full max-w-[800px]";function O0({contentClassName:e,centered:t,composerClassName:n,thread:r,composer:o,artifactPreview:i}){const{activePanel:a,closePanel:s,messagesLoading:l,isArtifactDrawerOpen:c,allArtifacts:u,activePreviewArtifact:d,toggleArtifactDrawer:f,registerContentEl:p}=Fn();if(a)return S.jsx(z0,{page:a,onBack:s,centered:t});const h=t?F5:"";return S.jsxs(S.Fragment,{children:[S.jsxs("div",{ref:p,className:`relative ${e} ${h}`,children:[l?S.jsxs("div",{className:"sa-messages-loading",children:[S.jsx("span",{className:"sa-loading-spinner"}),"加载对话..."]}):r,i&&c&&S.jsx(L5,{artifacts:u,initialArtifact:d,onClose:f})]}),n?S.jsx("div",{className:`${n} ${h}`,children:o}):o]})}function _5({isOpen:e,onClose:t,title:n,slots:r,welcomeMessage:o,suggestedPrompts:i,avatar:a,artifactPreview:s,capabilities:l,quickLinks:c,logo:u,defaultWidth:d,defaultHeight:f,showTimestamp:p,collapse:h}){const{status:m,sendMessage:w,stop:y,toggleThreadList:$,setThreadListOpen:x,isThreadListOpen:E,toggleArtifactDrawer:v,isArtifactDrawerOpen:C,previewLayoutMode:I,isDrawerFullscreen:N,allArtifacts:A,activePanel:k,closePanel:R,messages:O,messagesLoading:z,conversations:D,activeConversationId:M,switchConversation:L,newConversation:_,deleteConversation:V,renameConversation:X,hasMore:P,loadMoreConversations:Y}=Fn(),{width:K,position:T,hasCustomPosition:ne,isMaximized:F,totalWidth:U,windowHeight:re,startWindowDrag:j,startResize:H,toggleMaximize:ee,reset:oe,setLockedHeight:B}=Y0({defaultWidth:d??Ut.DEFAULT_WIDTH,defaultHeight:f??Ut.DEFAULT_HEIGHT,sidebarWidth:0}),ie=b.useRef(null),ae=b.useRef(null),Se=!z&&O.length===0,ye=!z&&O.length>0,q=!!k;b.useEffect(()=>{e||(oe(),R())},[e,oe,R]),b.useEffect(()=>{x(F?ie.current??!0:ae.current??!1)},[F,x]),b.useEffect(()=>{ye||B(null)},[ye,B]);const me=Q0({enabled:e&&ye&&!F&&!q&&!(C&&I==="cover"),contentSelector:".sa-panel-content",defaultHeight:f??Ut.DEFAULT_HEIGHT,onHeightChange:B});if(!e)return null;const he=r.Header,se=r.Composer,ue=r.ThreadList,pe=()=>{const ve=!E;$(),F?ie.current=ve:ae.current=ve},Ne=200,Ee=E&&!F,Ie="var(--sa-radius, 16px)",W=Ee?`0px ${Ie} ${Ie} 0px`:`${Ie} ${Ie} ${Ie} ${Ie}`,Q=ne?T.x:window.innerWidth-U-20,le=Math.min(Ne,Math.max(0,Q-1)),be=ne?{width:`${U}px`,height:`${re}px`,left:`${T.x}px`,top:`${T.y}px`}:{width:`${U}px`,height:`${re}px`,right:"20px",bottom:"20px"},$e={title:n,onClose:t,onToggleThreadList:pe,isMaximized:F,onToggleMaximize:ee,showHome:ye||q,onHome:q?R:_,panelTitle:q?k==null?void 0:k.title:void 0,artifactCount:q||!s?0:A.length,onToggleArtifactDrawer:q||!s?void 0:v},ce={conversations:D,activeSessionId:M,onSwitch:L,onNew:_,onDelete:V,onRename:X,hasMore:P,onLoadMore:Y},te=S.jsxs("div",{className:`relative z-20 flex min-w-0 flex-col bg-white ${F?"flex-1":"h-full shrink-0"}`,style:F?void 0:{width:`${K}px`,borderRadius:W,overflow:"hidden"},children:[Se&&!q&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"sa-home-gradient pointer-events-none absolute inset-x-0 top-0 z-0 h-[238px] opacity-10"}),S.jsx("div",{className:"sa-home-gradient-fade pointer-events-none absolute inset-x-0 top-0 z-[1] h-[238px]"})]}),S.jsx("div",{className:`relative z-20 ${Se||F?"":"bg-white"} ${F?"cursor-default":"cursor-grab active:cursor-grabbing"}`,onMouseDown:F?void 0:j,children:he?S.jsx(he,{...$e}):S.jsx($m,{...$e})}),S.jsx(O0,{contentClassName:`sa-panel-content relative ${N?"z-[30]":"z-[2]"} ${Se?"sa-home-view":""}`,centered:F,composerClassName:"shrink-0",artifactPreview:s,thread:S.jsx(Cu,{slots:r,welcomeMessage:o,suggestedPrompts:i,avatar:a,artifactPreview:s,capabilities:l,quickLinks:c,logo:u,showTimestamp:p,collapse:h}),composer:se?S.jsx(se,{status:m,onSend:w,onStop:y}):S.jsx(bd,{})})]});return F?S.jsx("div",{className:"fixed inset-0 z-[var(--sa-z-index,9999)] flex animate-sa-fade-in flex-col justify-end bg-black/30",children:S.jsxs("div",{className:"flex h-[calc(100%_-_48px)] w-full animate-sa-slide-up-full flex-row overflow-hidden bg-[#F5F5F5] shadow-[0_-12px_48px_rgba(0,0,0,0.25)]",style:{borderRadius:"var(--sa-radius, 16px) var(--sa-radius, 16px) 0px 0px"},children:[E&&(ue?S.jsx(ue,{...ce}):S.jsx(pl,{width:220})),te]})}):S.jsxs("div",{ref:me,className:"fixed z-[var(--sa-z-index,9999)] flex animate-sa-window-in flex-row overflow-visible border border-[#DADADA] bg-white shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{...be,borderRadius:W},children:[S.jsx("div",{className:"sa-resize-handle absolute bottom-0 left-[-3px] top-0 z-20 w-[6px] cursor-col-resize",onMouseDown:ve=>H(ve)}),Ee&&(ue?S.jsx("div",{className:"absolute -top-px -bottom-px -left-px z-10 overflow-hidden border border-r-0 border-[#DADADA] bg-[#FAFAFA] shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{width:le,transform:`translateX(-${le}px)`,borderRadius:`${Ie} 0px 0px ${Ie}`},children:S.jsx(ue,{...ce})}):S.jsx("div",{className:"absolute -top-px -bottom-px -left-px z-10 overflow-hidden border border-r-0 border-[#DADADA] bg-[#FAFAFA] shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{width:le,transform:`translateX(-${le}px)`,borderRadius:`${Ie} 0px 0px ${Ie}`},children:S.jsx(pl,{width:Ne})})),te]})}const gm=()=>{};function j5({conversations:e,activeSessionId:t,onSwitch:n,onNew:r,onDelete:o,onRename:i,isCollapsed:a,onToggleCollapse:s,hasMore:l,onLoadMore:c,conversationsLoading:u}){const[d,f]=b.useState(null),[p,h]=b.useState(null),[m,w]=b.useState(""),[y,$]=b.useState(null),x=b.useRef(null);b.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const E=b.useCallback((k,R)=>{R.stopPropagation(),d===k?(o(k),f(null)):(f(k),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>f(null),3e3))},[d,o]),v=b.useCallback((k,R,O)=>{O.stopPropagation(),h(k),w(R??"")},[]),C=b.useCallback(k=>{m.trim()&&i(k,m.trim()),h(null)},[m,i]),I=b.useRef(null),N=b.useCallback(()=>{const k=I.current;!k||!l||!c||k.scrollHeight-k.scrollTop-k.clientHeight<50&&c()},[l,c]),A=b.useMemo(()=>km(e),[e]);return a?S.jsxs("div",{className:"flex w-12 shrink-0 flex-col items-center gap-1 border-r border-[#ECECEC] bg-[#FAFAFA] py-3",children:[S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"展开",onClick:s,children:S.jsx(Ze,{name:"panel-left",size:18})}),S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"新建对话",onClick:()=>{r(),s()},children:S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18})})]}):S.jsxs("div",{className:"relative flex w-[220px] shrink-0 flex-col border-r border-[#ECECEC] bg-[#FAFAFA] p-3",children:[S.jsxs("div",{className:"mb-4 flex shrink-0 items-center gap-1.5",children:[S.jsxs("button",{type:"button",className:"sa-new-chat flex h-8 flex-1 items-center justify-center gap-2 rounded-md text-[14px] font-medium transition-colors",onClick:r,children:[S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18}),S.jsx("span",{className:"sa-new-chat-text whitespace-nowrap",children:"新建对话"})]}),S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"收起侧边栏",onClick:s,children:S.jsx(Ze,{name:"panel-left-close",size:16})})]}),S.jsxs("div",{ref:I,className:"flex-1 overflow-y-auto",onScroll:N,children:[u&&e.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"加载中..."}),!u&&e.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"暂无记录"}),A.map(k=>S.jsxs("div",{className:"mb-1",children:[S.jsx("div",{className:"px-1 pb-1 pt-2 text-[11px] text-[#A0A0A0]",children:k.label}),k.items.map(R=>{const O=R.sessionId===t,z=d===R.sessionId;return S.jsx("div",{className:`group relative mb-0.5 flex h-8 w-full cursor-pointer items-center gap-1 rounded-md px-0.5 text-[13px] transition-colors ${O?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{p!==R.sessionId&&n(R.sessionId)},onMouseEnter:D=>{if(p===R.sessionId)return;const M=D.currentTarget.getBoundingClientRect();$({text:R.title||"新会话",x:M.right+8,y:M.top+M.height/2})},onMouseLeave:()=>$(null),children:p===R.sessionId?S.jsx("input",{className:"w-full rounded border border-[var(--sa-primary)] bg-white px-1.5 py-0.5 text-[12px] outline-none",value:m,onChange:D=>w(D.target.value),onBlur:()=>C(R.sessionId),onKeyDown:D=>{D.key==="Enter"&&C(R.sessionId),D.key==="Escape"&&h(null)},onClick:D=>D.stopPropagation(),autoFocus:!0}):S.jsxs(S.Fragment,{children:[S.jsx("img",{src:Gt.message,alt:"",width:16,height:16,className:"shrink-0 opacity-60"}),S.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-[#333]",children:R.title||"新会话"}),S.jsxs("span",{className:"hidden shrink-0 items-center gap-0.5 group-hover:flex",children:[S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[var(--sa-primary)]",onClick:D=>v(R.sessionId,R.title,D),title:"重命名",children:S.jsx(Ze,{name:"pen",size:12})}),S.jsx("button",{type:"button",className:`flex h-5 w-5 items-center justify-center rounded ${z?"bg-[#fee2e2] text-[#ef4444]":"text-[#999] hover:bg-white/70 hover:text-[#ef4444]"}`,onClick:D=>E(R.sessionId,D),title:z?"确认删除":"删除",children:S.jsx(Ze,{name:z?"x":"trash2",size:12})})]})]})},R.sessionId)})]},k.label)),l&&S.jsx("div",{className:"px-0.5 py-2 text-center text-[11px] text-[#C0C0C0]",children:"向下滚动加载更多"})]}),y&&S.jsx("div",{className:"pointer-events-none fixed z-[10001] whitespace-nowrap rounded border border-[#E8E8E8] bg-white px-2.5 py-1.5 text-[12px] leading-[1.4] text-[#333] shadow-[0_2px_8px_rgba(0,0,0,0.12)]",style:{left:y.x,top:y.y,transform:"translateY(-50%)"},children:y.text})]})}function D0({title:e,slots:t,welcomeMessage:n,suggestedPrompts:r,capabilities:o,quickLinks:i,logo:a,sidebarDefaultOpen:s=!0,onClose:l,avatar:c,artifactPreview:u,showTimestamp:d,collapse:f}){const{status:p,sendMessage:h,stop:m,conversations:w,activeConversationId:y,switchConversation:$,newConversation:x,deleteConversation:E,renameConversation:v,toggleArtifactDrawer:C,allArtifacts:I,activePanel:N,closePanel:A,hasMore:k,loadMoreConversations:R,conversationsLoading:O}=Fn(),[z,D]=b.useState(s),M=b.useCallback(()=>D(P=>!P),[]),L=!!N;b.useEffect(()=>()=>A(),[A]);const _=t.ThreadList,V=t.Composer,X=t.Header;return S.jsxs("div",{className:"sa-fullpage",children:[_?S.jsx("div",{className:`sa-fp-sidebar-wrapper ${z?"":"sa-fp-sidebar-wrapper-collapsed"}`,children:S.jsx(_,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:v,hasMore:k,onLoadMore:R})}):S.jsx(j5,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:v,isCollapsed:!z,onToggleCollapse:M,hasMore:k,onLoadMore:R,conversationsLoading:O}),S.jsxs("div",{className:"sa-fp-main",children:[X?S.jsx(X,{title:L?(N==null?void 0:N.title)??e:e,panelTitle:L?N==null?void 0:N.title:void 0,onClose:l??gm,onToggleThreadList:M,showHome:L,onHome:L?A:gm,artifactCount:L||!u?0:I.length,onToggleArtifactDrawer:L||!u?void 0:C}):S.jsxs("div",{className:"sa-fp-header",children:[S.jsx("div",{className:"sa-fp-header-title",children:L?(N==null?void 0:N.title)??e:e}),S.jsxs("div",{className:"sa-fp-header-actions",children:[L&&S.jsx("button",{className:"sa-fp-header-btn",onClick:A,title:"返回聊天","aria-label":"返回聊天",children:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),S.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})}),!L&&u&&I.length>0&&S.jsxs("button",{className:"sa-fp-header-btn sa-header-btn-artifact",onClick:C,title:"会话产物",children:[S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),S.jsx("span",{children:"产物"})]})]})]}),S.jsx(O0,{contentClassName:"sa-fp-content-row",artifactPreview:u,thread:S.jsx(Cu,{slots:t,welcomeMessage:n,suggestedPrompts:r,capabilities:o,quickLinks:i,logo:a,avatar:c,artifactPreview:u,showTimestamp:d,collapse:f}),composer:V?S.jsx(V,{status:p,onSend:h,onStop:m}):S.jsx(bd,{})})]})]})}function L0(e){const{sdk:t,mode:n="floating",slots:r={},hooks:o={},welcomeMessage:i,suggestedPrompts:a,title:s="AI Assistant",initialOpen:l=!1,onOpenChange:c,sidebarDefaultOpen:u,avatar:d,artifactPreview:f,capabilities:p,quickLinks:h,logo:m,triggerLogo:w,theme:y,showTimestamp:$,attachmentUploader:x,nosUpload:E,collapse:v}=e,[C,I]=b.useState(l);b.useEffect(()=>{I(l)},[l]);const N=b.useCallback(()=>{var O,z;const R=!C;I(R),c==null||c(R),R?(O=o.onOpen)==null||O.call(o):(z=o.onClose)==null||z.call(o)},[C,o,c]),A=b.useCallback(()=>{var R;I(!1),c==null||c(!1),(R=o.onClose)==null||R.call(o)},[o,c]),k=r.Trigger??Em;return n==="fullpage"?C?S.jsx(fl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,mode:n,children:S.jsx(D0,{title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,capabilities:p,quickLinks:h,logo:m,sidebarDefaultOpen:u,onClose:A,avatar:d,artifactPreview:f,showTimestamp:$,collapse:v})}):null:S.jsxs(fl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,mode:n,children:[S.jsx(k,{isOpen:C,onClick:N,triggerLogo:w}),S.jsx(_5,{isOpen:C,onClose:A,title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,avatar:d,artifactPreview:f,capabilities:p,quickLinks:h,logo:m,defaultWidth:y==null?void 0:y.panelWidth,defaultHeight:y==null?void 0:y.panelHeight,showTimestamp:$,collapse:v})]})}const F0=`
311
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...r}}const JA={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},e5={motionBase:!0,motionUnit:!0},t5=wa(Kc.defaultAlgorithm),n5={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},v0=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=ZA(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=v0({...a,...u},{override:u},c)),a[s]=d}),a};function C0(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=b.useContext(Kc._internalContext),a={prefix:(o==null?void 0:o.prefix)??"ant",key:(o==null?void 0:o.key)??"css-var-root"},s=n||t5,[l,c,u]=yg(s,[Kc.defaultSeed,e],{salt:`${KA}-${t||""}`,override:r,getComputedToken:v0,cssVar:{...a,unitless:JA,ignore:e5,preserve:n5}});return[s,u,t?c:"",l,a,!!i]}function r5(){const[e,t,n]=C0();return{theme:e,token:t,hashId:n}}const{genStyleHooks:o5}=qg({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=vo();return{iconPrefixCls:t,rootPrefixCls:e()}},useToken:()=>{const[e,t,n,r,o,i]=C0();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=vo();return e??{}},layer:{name:"antdx"}}),hs=b.createContext(null),gs=b.forwardRef((e,t)=>{const{className:n,action:r,onClick:o,...i}=e,a=b.useContext(hs),{prefixCls:s,disabled:l,setSubmitDisabled:c}=a,u=i.disabled??l??a[`${r}Disabled`];return b.useEffect(()=>{r==="onSend"&&(c==null||c(u))},[u,r,c]),b.createElement(ar,$t({type:"text"},i,{ref:t,onClick:d=>{var f;u||((f=a[r])==null||f.call(a),o==null||o(d))},disabled:u,className:J(s,n,{[`${s}-disabled`]:u})}))});function i5(e,t){return h.createElement(gs,$t({icon:h.createElement(w0,null)},e,{action:"onClear",ref:t}))}const a5=h.forwardRef(i5),s5=b.memo(e=>{const{className:t}=e,[n]=g0("Sender",lo.Sender);return b.createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:t},b.createElement("title",null,n.stopLoading),b.createElement("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"}),b.createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",opacity:"0.45"}),b.createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",strokeDasharray:"600 9999999"},b.createElement("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"})))}),S0=h.forwardRef((e,t)=>{const{prefixCls:n}=h.useContext(hs),{className:r}=e;return h.createElement(gs,$t({icon:h.createElement(s5,{className:`${n}-loading-icon`}),color:"primary",variant:"text",shape:"circle"},e,{className:J(r,`${n}-loading-button`),action:"onCancel",ref:t}))});function l5(e,t){return h.createElement(gs,$t({icon:h.createElement(b0,null),type:"primary",shape:"circle"},e,{action:"onSend",ref:t}))}const E0=h.forwardRef(l5),bs=b.createContext({}),c5=e=>{const t=b.useCallback(()=>typeof window>"u"?null:window.getSelection(),[]),n=(x,E)=>{if(!x||!E)return E;let C=x,v=null;for(C.nodeType===Node.TEXT_NODE&&(C=C.parentElement);C&&C!==E;)C instanceof HTMLElement&&C.tagName==="SPAN"&&(v=C),C=C.parentElement;return v||E},r=b.useCallback(()=>{const x=t();if(!x)return{range:null,selection:x};try{return{range:x.getRangeAt(0)||document.createRange(),selection:x}}catch{return{range:document.createRange(),selection:x}}},[t]),o=b.useCallback((x,E)=>{if(!(!x||!E))try{E.removeAllRanges(),E.addRange(x)}catch(C){tn(!1,"Sender",`Failed to set range: ${C}`)}},[]),i=b.useCallback(()=>{const x=t();if(x)try{x.removeAllRanges()}catch(E){tn(!1,"Sender",`Failed to remove all ranges: ${E}`)}},[t]),a=b.useCallback((x,E=!1)=>{if(!(!x||typeof x.focus!="function"))try{x.focus({preventScroll:E})}catch(C){tn(!1,"Sender",`Failed to focus element: ${C}`)}},[]),s=b.useCallback((x,E)=>{if(!x)return;a(x,E);const{range:C,selection:v}=r();if(C&&v)try{C.selectNodeContents(x),C.collapse(!1),o(C,v)}catch(T){tn(!1,"Sender",`Failed to set end cursor: ${T}`)}},[a,r,o]),l=b.useCallback((x,E)=>{if(!x)return;a(x,E);const{range:C,selection:v}=r();if(C&&v)try{C.selectNodeContents(x),C.collapse(!0),o(C,v)}catch(T){tn(!1,"Sender",`Failed to set start cursor: ${T}`)}},[a,r,o]),c=b.useCallback((x,E,C)=>{if(!x)return;a(x,C);const{range:v,selection:T}=r();if(v&&T)try{v.selectNodeContents(x),E&&v.setStart(x,1),o(v,T)}catch(R){tn(!1,"Sender",`Failed to select all content: ${R}`)}},[a,r,o]),u=b.useCallback((x,E,C,v)=>{if(!x||typeof C!="number"||C<0||!E)return{range:null,selection:null};a(E,v);const{range:T,selection:R}=r();if(T&&R)try{const A=Math.min(C,x.childNodes.length);T.setStart(x,A),T.setEnd(x,A),T.collapse(!1),o(T,R)}catch(A){tn(!1,"Sender",`Failed to set cursor position:: ${A}`)}return{range:T,selection:R}},[a,r,o]),d=b.useCallback((x,E,C=!1)=>{if(!e||!(x!=null&&x.current))return;const{getSlotDom:v,slotConfigMap:T}=e,R=N=>{var M;const z=v(N);if(!z)return null;const L=T.get(N);if(!L)return null;if(L.type==="input")return z.querySelector("input");const D=((M=z==null?void 0:z.getAttribute)==null?void 0:M.call(z,"data-node-type"))||"";return L.type==="content"&&D!=="nbsp"?z:null},k=(N=>{var L;const z=x.current;if(!z)return null;if(N)return R(N);for(const D of Array.from(z.childNodes)){const M=(L=D==null?void 0:D.getAttribute)==null?void 0:L.call(D,"data-slot-key");if(M){const O=R(M);if(O)return O}}return null})(E);k&&(k.nodeName==="INPUT"?k.focus({preventScroll:C}):u(k,x.current,0,C))},[e,u]),f=b.useCallback((x,E,C,v,T)=>{!C||!v||(a(E,T),C==null||C.setStartAfter(x),C.collapse(!1),v.removeAllRanges(),v.addRange(C))},[a]),p=b.useCallback(x=>{var C;if(!x)return{value:"",startContainer:null,startOffset:0};const E=t();if(!E||E.rangeCount===0)return{value:"",startContainer:null,startOffset:0};try{let v=E.getRangeAt(0),T=v.cloneRange();if(!x.contains(v.startContainer))return{value:"",startContainer:null,startOffset:0};if(v.endContainer===x&&((C=v.endContainer.lastChild)==null?void 0:C.nodeType)===Node.TEXT_NODE){const A=v.endContainer.lastChild;v=document.createRange(),v.setStart(A,A.length),v.setEnd(A,A.length)}return T=v.cloneRange(),T.selectNodeContents(x),T.setEnd(v.startContainer,v.startOffset),{value:T.toString().replace(/\u200B/g,""),startContainer:v.startContainer,startOffset:v.startOffset}}catch(v){return tn(!1,"Sender",`Failed to get text before cursor: ${v}`),{value:"",startContainer:null,startOffset:0}}},[t]),g=b.useCallback((x,E,C)=>{if(x==="start"||x==="end")return{type:x,selection:t()};let v=null,T=null;if(C!=null&&C.current)v=C.current,T=t();else{const L=r();v=L.range,T=L.selection}if(!v||!T)return{type:"end",selection:T};const R=E==null?void 0:E.current;if(!R)return{type:"end",selection:T};const A=R.contains(v.endContainer),k=R.contains(v.startContainer);if(!A)return s(R,!0),{type:"end",selection:T};if(!k)return l(R,!0),{type:"start",selection:T};const N=n(v.endContainer,R),z=n(v.startContainer,R);if(N===z&&z!==R&&(e!=null&&e.getNodeInfo)){const{slotKey:L,slotConfig:D,skillKey:M}=e.getNodeInfo(N)||{};if(L)return{type:"slot",slotKey:D==null?void 0:D.key,slotType:D==null?void 0:D.type,range:v,selection:T};if(M)return{type:"start",selection:T}}return{type:"box",range:v,selection:T}},[e,r,t,s,l,n]),m=b.useCallback(x=>{const E=x.childNodes[x.childNodes.length-1],C=(E==null?void 0:E.nodeType)===Node.TEXT_NODE&&E.textContent===`
312
+ `?x.childNodes.length-1:x.childNodes.length;return u(x,x,C).range||document.createRange()},[u]),w=b.useCallback(x=>{var v;const E=(v=e==null?void 0:e.getEditorValue)!=null&&v.call(e).skill?1:0;return u(x,x,E).range||document.createRange()},[u,e]),y=b.useCallback(x=>x.replace(/\u200B/g,"").replace(/\n/g,"").replace(/^\n+|\n+$/g,""),[]),$=b.useCallback(async()=>{try{const x=t();if(!x)return!1;const E=x.toString();if(!E)return!1;const C=y(E);return await navigator.clipboard.writeText(C),!0}catch(x){return tn(!1,"Sender",`Failed to copy selection: ${x}`),!1}},[t,y]);return{setEndCursor:s,setStartCursor:l,setAllSelectCursor:c,setCursorPosition:u,setAfterNodeFocus:f,setSlotFocus:d,getTextBeforeCursor:p,getSelection:t,removeAllRanges:i,getRange:r,getInsertPosition:g,getEndRange:m,getStartRange:w,copySelectionString:$,getCleanedText:y}},dm=4.35,u5=(e,t,n)=>{const{token:r}=r5(),o=n.current?window.getComputedStyle(n.current):{},i=parseFloat(`${e.lineHeight||r.lineHeight}`),a=parseFloat(`${(o==null?void 0:o.fontSize)||e.fontSize||r.fontSize}`),s=o!=null&&o.lineHeight?parseFloat(`${o==null?void 0:o.lineHeight}`):i*a;return t===!1||!t?{}:t===!0?{height:"auto"}:{minHeight:t.minRows?(s+dm)*t.minRows:"auto",maxHeight:t.maxRows?(s+dm)*t.maxRows:"auto",overflowY:"auto"}},d5=e=>{const{prefixCls:t,placeholder:n,slotDomMap:r,slotConfigMap:o}=e,i=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","false"),p.dataset.skillKey=f,p.dataset.placeholder=n||"",p.className=`${t}-skill`,p},[t,n]),a=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","true"),p.dataset.slotKey=f.key,p.className=J(`${t}-slot`,`${t}-slot-content`),p},[t]),s=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","false"),p.dataset.slotKey=f,p.className=`${t}-slot`,p},[t]),l=b.useCallback((f,p)=>{const g=document.createElement("span");return g.setAttribute("contenteditable","false"),g.dataset.slotKey=f,g.dataset.nodeType="nbsp",g.className=J(`${t}-slot-${p}`,`${t}-slot-no-width`),g.textContent=" ",g},[t]),c=(f,p)=>{r.current.set(f,p)},u=f=>r.current.get(f);return{buildSkillSpan:i,buildEditSlotSpan:a,buildSlotSpan:s,buildSpaceSpan:l,saveSlotDom:c,getSlotDom:u,getSlotLastDom:(f,p)=>{var m;return(p??((m=o.get(f))==null?void 0:m.type))==="content"?u(`${f}_after`):u(f)}}},f5=new Set(["input","select","custom","content"]),fm=e=>(e==null?void 0:e.reduce((t,n)=>{const{key:r,type:o}=n;if(!r)return t;const i=n.props||{},a=f5.has(o)?i.defaultValue:i.value??i.label;return t[r]=a??"",t},{}))??{},p5=(e,t)=>{e==null||e.forEach(n=>{n.key&&t.set(n.key,n)})},m5=(e,t)=>{if(!(e!=null&&e.dataset))return null;const{dataset:n}=e;return{slotKey:n.slotKey,placeholder:n.placeholder,nodeType:n.nodeType,skillKey:n.skillKey,slotConfig:n.slotKey?t.get(n.slotKey):void 0,targetNode:e}},h5=e=>{const[t,n]=b.useState({}),r=b.useRef(t),o=b.useRef(new Map),i=b.useRef(new Set);b.useEffect(()=>{if(!e)return;o.current.forEach((f,p)=>{i.current.has(p)||o.current.delete(p)}),p5(e,o.current);const d=fm(e);i.current.forEach(f=>{f in r.current&&(d[f]=r.current[f])}),n(d),r.current=d},[e]);const a=b.useCallback(d=>{const f=typeof d=="function"?d(r.current):d;n(f),r.current=f},[]),s=b.useCallback(d=>{const f=fm(d);d.forEach(p=>{p.key&&(o.current.set(p.key,p),i.current.add(p.key))}),n(p=>({...p,...f})),r.current={...r.current,...f}},[]),l=b.useCallback(()=>{o.current.clear(),i.current.clear(),n({}),r.current={}},[]),c=b.useCallback(d=>m5(d,o.current),[]),u=d=>{var E;const f=d.nodeType;if(f===Node.TEXT_NODE)return d.textContent||"";if(f!==Node.ELEMENT_NODE)return"";const p=d,g=c(p);if(!g)return p.innerText||"";const{slotKey:m,skillKey:w,nodeType:y,slotConfig:$}=g;if(w)return"";const x=p.innerText||"";if(m){if(y==="nbsp")return" ";if(!$)return x;const C=$.type==="content"?x:r.current[m]??"";return((E=$.formatResult)==null?void 0:E.call($,C))??C}return x};return[o.current,{getSlotValues:()=>r.current,setSlotValues:a,mergeSlotConfig:s,getNodeInfo:c,getNodeTextValue:u,clear:l}]},$0=({removeSkill:e,prefixCls:t,toolTip:n,closable:r,title:o,value:i})=>{const a=`${t}-skill`,s=b.useMemo(()=>{if(!r)return[null];const u=typeof r=="boolean"?{}:r,d=g=>{var m;u.disabled||(g.stopPropagation(),e(),(m=u.onClose)==null||m.call(u,g))},f=u.closeIcon||b.createElement(Xu,{className:`${a}-close-icon`});return b.createElement("div",{className:J(`${a}-close`,{[`${a}-close-disabled`]:u.disabled}),onClick:d,role:"button","aria-label":"Close skill",tabIndex:0},f)},[r,e]),l=o||i,c=n?b.createElement(Si,n,l):l;return b.createElement("div",{className:`${a}-wrapper`,contentEditable:!1},b.createElement("div",{className:`${a}-tag`,contentEditable:!1,role:"button",tabIndex:0},b.createElement("span",{className:`${a}-tag-text`},c),s),b.createElement("div",{className:`${a}-holder`}))};$0.displayName="Skill";const k0=b.forwardRef((e,t)=>{var Be;const{onChange:n,onKeyUp:r,onKeyDown:o,onPaste:i,onPasteFile:a,disabled:s,readOnly:l,submitType:c="enter",prefixCls:u,styles:d={},classNames:f={},autoSize:p,triggerSend:g,placeholder:m,onFocus:w,onBlur:y,slotConfig:$,skill:x,...E}=b.useContext(bs),{direction:C,getPrefixCls:v}=vo(),T=`${v("sender",u)}`,R=Mu("sender"),A=`${T}-input`,k=b.useRef(null),N=b.useRef(new Map),z=b.useRef(!1),L=b.useRef(!1),D=b.useRef(null),M=b.useRef(null),O=b.useRef(null),F={...(Be=R.styles)==null?void 0:Be.input,...d.input},H=u5(F,p,k),I={...Za(E,{attr:!0,aria:!0,data:!0}),ref:k},[Q,{getSlotValues:Y,setSlotValues:P,getNodeInfo:oe,mergeSlotConfig:W,getNodeTextValue:j,clear:ne}]=h5($),[ee,_]=b.useState(new Map),[ae,fe]=b.useState(null),{setEndCursor:q,setStartCursor:ce,setAllSelectCursor:V,setCursorPosition:le,setSlotFocus:se,setAfterNodeFocus:G,getTextBeforeCursor:K,removeAllRanges:we,getRange:ie,getInsertPosition:me,getEndRange:pe,getStartRange:Ne,getSelection:Ee,copySelectionString:Ie,getCleanedText:B}=c5({prefixCls:T,getSlotDom:U=>N.current.get(U),slotConfigMap:Q,getNodeInfo:oe,getEditorValue:()=>Me()}),{buildSkillSpan:Z,buildEditSlotSpan:ue,buildSlotSpan:xe,buildSpaceSpan:$e,getSlotDom:de,saveSlotDom:re,getSlotLastDom:Ce}=d5({prefixCls:T,placeholder:m,slotDomMap:N,slotConfigMap:Q}),Re=U=>{const be=Me();M.current&&(!(be!=null&&be.value)&&be.slotConfig.length===0&&m?(M.current.setAttribute("contenteditable","true"),M.current.classList.add(`${T}-skill-empty`)):(M.current.setAttribute("contenteditable","false"),M.current.classList.remove(`${T}-skill-empty`))),n==null||n(be.value,U,be.slotConfig,be.skill)},Ue=(U,be,he)=>{const ve=de(U),Pe=Q.get(U);if(P(ke=>({...ke,[U]:be})),ve&&Pe){const ke=Te(Pe,ve);_(Fe=>{const De=new Map(Fe);return De.set(U,ke),De}),Re(he)}},Te=(U,be)=>{if(!U.key)return null;const he=Y()[U.key],ve=()=>{var Pe,ke,Fe,De,ft,Tt,gt,Ct,mt;switch(U.type){case"content":return be.innerHTML=he||"",be.setAttribute("data-placeholder",((Pe=U.props)==null?void 0:Pe.placeholder)||""),null;case"input":return b.createElement(Vr,{readOnly:l,className:`${T}-slot-input`,placeholder:((ke=U.props)==null?void 0:ke.placeholder)||"","data-slot-input":U.key,size:"small",variant:"borderless",value:he||"",tabIndex:0,onKeyDown:Rt,onChange:Lt=>{Ue(U.key,Lt.target.value,Lt)},spellCheck:!1});case"select":return b.createElement(Qx,{disabled:l,menu:{items:(De=(Fe=U.props)==null?void 0:Fe.options)==null?void 0:De.map(Lt=>({label:Lt,key:Lt})),defaultSelectedKeys:(ft=U.props)!=null&&ft.defaultValue?[U.props.defaultValue]:[],selectable:!0,onSelect:({key:Lt,domEvent:Le})=>{Ue(U.key,Lt,Le)}},trigger:["click"]},b.createElement("span",{className:J(`${T}-slot-select`,{placeholder:!he,[`${T}-slot-select-selector-value`]:he})},b.createElement("span",{"data-placeholder":(Tt=U.props)==null?void 0:Tt.placeholder,className:`${T}-slot-select-value`},he||""),b.createElement("span",{className:`${T}-slot-select-arrow`},b.createElement(a0,null))));case"tag":return b.createElement("span",{className:`${T}-slot-tag`},((gt=U.props)==null?void 0:gt.label)||((Ct=U.props)==null?void 0:Ct.value)||"");case"custom":return(mt=U.customRender)==null?void 0:mt.call(U,he,Lt=>{Ue(U.key,Lt)},{disabled:s,readOnly:l},U);default:return null}};return po.createPortal(ve(),be)},ze=U=>U.reduce((be,he)=>{if(he.type==="text")return be.push(document.createTextNode(he.value||"")),be;const ve=he.key;if(tn(!!ve,"Sender",`Slot key is missing: ${ve}`),ve){let Pe,ke;if(he.type==="content"){ke=ue(he);const Fe=$e(ve,"before"),De=$e(ve,"after");Pe=[Fe,ke,De],re(`${ve}_before`,Fe),re(ve,ke),re(`${ve}_after`,De)}else ke=xe(ve),Pe=[ke],re(ve,ke);if(ke){const Fe=Te(he,ke);Fe&&(_(De=>{const ft=new Map(De);return ft.set(ve,Fe),ft}),be.push(...Pe))}}return be},[]),Me=()=>{const U=k.current,be={value:"",slotConfig:[],skill:void 0};if(!U)return be;const he=U.childNodes;if(he.length===0)return U.innerHTML="",M.current=null,be;const ve=!!x,Pe=new Array(he.length),ke=[];let Fe,De=0;for(let Tt=0;Tt<he.length;Tt++){const gt=he[Tt],Ct=j(gt);if(Pe[De++]=Ct,gt.nodeType===Node.TEXT_NODE)Ct&&ke.push({type:"text",value:Ct});else if(gt.nodeType===Node.ELEMENT_NODE){const Lt=oe(gt);if(Lt){const{skillKey:Le,slotKey:Pt,nodeType:Nt}=Lt;if(Le&&ve&&(Fe=x),Pt&&Nt!=="nbsp"){const Vn=Q.get(Pt);Vn&&ke.push({...Vn,value:Ct})}}}}const ft=Pe.slice(0,De).join("");return Fe||(M.current=null),{value:ft,slotConfig:ke,skill:Fe}},it=()=>{var be;const U=k.current;U&&(U.innerHTML="",M.current=null,O.current=null,D.current=null,we(),(be=N==null?void 0:N.current)==null||be.clear())},Ye=U=>{U.forEach(be=>{var he;(he=k.current)==null||he.appendChild(be)})},It=(U,be)=>{const he=k.current;he&&(he.querySelectorAll(`[data-slot-key="${U}"]`).forEach(ve=>{ve.remove()}),N.current.delete(U),P(ve=>{const{[U]:Pe,...ke}=ve;return ke}),_(ve=>{const Pe=new Map(ve);return Pe.delete(U),Pe}),Re(be))},wt=()=>{if(x&&O.current!==x){Ot(!1),O.current=x;const U=Z(x.value),be=po.createPortal(b.createElement($0,$t({removeSkill:Ot},x,{prefixCls:T})),U);fe(be);const he=document.createRange(),ve=k.current;if(!ve)return;he.setStart(ve,0),he.insertNode(U),M.current=U,Re()}},Ot=(U=!0)=>{var he;!k.current||!M.current||((he=M.current)==null||he.remove(),M.current=null,O.current=null,U&&Re())},ht=U=>{c!=="enter"||!U||U.querySelectorAll("br").forEach(be=>{be.remove()})},_t=()=>{$&&$.length>0&&k.current&&(it(),Ye(ze($)))},jt=U=>{const be=o==null?void 0:o(U);return L.current||z.current||be===!1},_e=(U,be)=>{var Fe,De,ft;if(!k.current)return!1;const{range:he,selection:ve}=ie();if(!ve||ve.rangeCount===0)return!1;const{focusOffset:Pe,anchorNode:ke}=ve;if(!ke||!k.current.contains(ke))return!1;if(ke.nodeType===Node.TEXT_NODE&&he){const Tt=ke.parentNode,gt=oe(Tt),Ct=he.toString(),mt=((Fe=ke.textContent)==null?void 0:Fe.length)===Ct.length,Lt=((De=ke.textContent)==null?void 0:De.length)===1&&Pe===1;if(((ft=gt==null?void 0:gt.slotConfig)==null?void 0:ft.type)==="content"&&(mt||Lt))return U.preventDefault(),be==="cut"&&Ie(),ke.parentNode.innerHTML="",!0}if(be==="backspace"&&Pe===0){const Tt=ke.previousSibling;if(Tt){const gt=oe(Tt);if(gt){const{slotKey:Ct,skillKey:mt}=gt;if(Ct)return U.preventDefault(),It(Ct,U),!0;if(mt)return U.preventDefault(),Ot(),!0}}}return!1},pt=U=>{const{key:be,shiftKey:he,ctrlKey:ve,altKey:Pe,metaKey:ke}=U;if(be!=="Enter")return!1;const Fe=ve||Pe||ke;return c==="enter"&&!he&&!Fe||c==="shiftEnter"&&he&&!Fe},Cn=()=>{if(!M.current||!k.current||M.current.getAttribute("contenteditable")==="false")return;const U=Ee();!(U!=null&&U.anchorNode)||!M.current.contains(U.anchorNode)||!k.current.contains(U.anchorNode)||(M.current.setAttribute("contenteditable","false"),M.current.classList.remove(`${T}-skill-empty`),Qe({cursor:"end"}))},jn=()=>{z.current=!0},Bn=()=>{z.current=!1,L.current=!1},Rt=U=>{if(!jt(U)&&!(U.key==="Backspace"&&_e(U,"backspace"))){if(pt(U)){U.preventDefault(),L.current=!0,g==null||g();return}if((U.key==="a"||U.key==="A")&&(U.ctrlKey||U.metaKey)&&!U.shiftKey&&!U.altKey){V(k.current,M.current),U.preventDefault();return}Cn()}},Sn=U=>{w==null||w(U)},Ht=U=>{L.current&&(L.current=!1);const{range:be}=ie();D.current=be;const he=setTimeout(()=>{D.current=null,clearTimeout(he)},200);y==null||y(U)},an=U=>{ht(k==null?void 0:k.current),Re(U)},Hn=U=>{_e(U,"cut")},fn=U=>{var ve,Pe;U.preventDefault();const be=(ve=U.clipboardData)==null?void 0:ve.files,he=(Pe=U.clipboardData)==null?void 0:Pe.getData("text/plain");if(!he&&(be!=null&&be.length)&&a){a(be);return}if(he){let ke=!1;const Fe=B(he);try{ke=document.execCommand("insertText",!1,Fe)}catch(De){tn(!1,"Sender",`insertText command failed: ${De}`)}ke||Dt([{type:"text",value:Fe}])}i==null||i(U)},pn=U=>{U.key==="Enter"&&(L.current=!1),r==null||r(U)},en=()=>{const U=k.current,be=Ee();U&&(be==null?void 0:be.focusNode)===U&&be.focusOffset===0&&Me().skill&&le(U,k.current,1)},Dt=(U,be,he,ve)=>{const Pe=k.current;if(Pe)try{W(U);const ke=ze(U);if(ke.length===0)return;const Fe=at(be,Pe);if(!Fe.range||!Fe.selection)return;const{range:De,selection:ft}=Fe;he!=null&&he.length&&Vt(De,he,Pe),De.deleteContents(),vt(ke,De,Fe),Oe(ke,De,ft,ve)}catch(ke){tn(!1,"Sender",`Insert operation failed: ${ke}`)}},at=(U,be)=>{const{type:he,slotKey:ve,slotType:Pe,range:ke,selection:Fe}=me(U,k,D);if(!Fe)return{range:null,selection:null,type:he};let De=null;switch(he){case"end":De=pe(be);break;case"start":De=Ne(be);break;case"slot":De=ie().range;break;case"box":De=ke||null,De&&M.current&&De.collapsed&&De.startOffset===0&&De.setStartAfter(M.current);break}return{range:De,selection:Fe,type:he,slotKey:ve,slotType:Pe}},Vt=(U,be,he)=>{const{value:ve,startContainer:Pe,startOffset:ke}=K(he);ve.length>=be.length&&ve.endsWith(be)&&Pe&&ke>=0&&(U.setStart(Pe,ke-be.length),U.setEnd(Pe,ke),U.deleteContents())},vt=(U,be,he)=>{const{type:ve,slotKey:Pe,slotType:ke}=he;let Fe=!0;U.forEach(De=>{if(Fe&&ve==="slot"&&(ke!=="content"||De.nodeType!==Node.TEXT_NODE)&&Pe){Fe=!1;const ft=Ce(Pe);ft&&be.setStartAfter(ft)}be.insertNode(De),be.setStartAfter(De)})},Oe=(U,be,he,ve)=>{const Pe=U[U.length-1];G(Pe,k.current,be,he,ve),setTimeout(()=>{an(null)},0)},Qe=U=>{const be={preventScroll:(U==null?void 0:U.preventScroll)??!1,cursor:(U==null?void 0:U.cursor)??"end",key:U==null?void 0:U.key};switch(be.cursor){case"slot":se(k,U==null?void 0:U.key,be.preventScroll);break;case"start":ce(k.current,be.preventScroll);break;case"all":V(k.current,M.current,be.preventScroll);break;case"end":q(k.current,be.preventScroll);break}},st=()=>{var be;const U=k.current;U&&(U.innerHTML="",O.current=null,M.current=null,ne(),wt(),D.current=null,(be=N==null?void 0:N.current)==null||be.clear(),an(null))};return b.useEffect(()=>{_t(),x?wt():Re()},[$]),b.useEffect(()=>{wt()},[x]),b.useImperativeHandle(t,()=>({nativeElement:k.current,focus:Qe,blur:()=>{var U;return(U=k.current)==null?void 0:U.blur()},insert:Dt,clear:st,getValue:Me})),b.createElement(b.Fragment,null,b.createElement("div",$t({},I,{role:"textbox",tabIndex:0,style:{...F,...H},className:J(A,`${A}-slot`,R.classNames.input,f.input,{[`${T}-rtl`]:C==="rtl"}),"data-placeholder":m,contentEditable:!l,suppressContentEditableWarning:!0,spellCheck:!1,onCut:Hn,onKeyDown:Rt,onKeyUp:pn,onPaste:fn,onCompositionStart:jn,onCompositionEnd:Bn,onFocus:Sn,onBlur:Ht,onSelect:en,onInput:an},E)),b.createElement("div",{style:{display:"none"},id:`${T}-slot-placeholders`},Array.from(ee.values()),ae))});process.env.NODE_ENV!=="production"&&(k0.displayName="SlotTextArea");const I0=h.forwardRef((e,t)=>{const{speechRecording:n,disabled:r,onSpeechDisabled:o,prefixCls:i}=h.useContext(hs),a=e.disabled??r??o;let s=null;return n?s=h.createElement(GA,{className:`${i}-recording-icon`}):a?s=h.createElement(x0,null):s=h.createElement(y0,null),h.createElement(gs,$t({icon:s,variant:"text",color:"primary"},e,{action:"onSpeech",ref:t}))});var R0={};Object.defineProperty(R0,"__esModule",{value:!0});var g5=R0.default=b5;function b5(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function x5(e,t,n){return g5(e,t)||n}const T0=b.forwardRef((e,t)=>{const{value:n,onChange:r,onKeyUp:o,onKeyDown:i,onPaste:a,onPasteFile:s,disabled:l,readOnly:c,submitType:u="enter",prefixCls:d,styles:f={},classNames:p={},autoSize:g,components:m,triggerSend:w,placeholder:y,onFocus:$,onBlur:x,...E}=b.useContext(bs),C=b.useRef(null),v=(H,X="cursor")=>{var oe,W;const I=(W=(oe=C.current)==null?void 0:oe.resizableTextArea)==null?void 0:W.textArea,Q=I.value;let Y=Q.length,P=Q.length;X==="cursor"&&(Y=I==null?void 0:I.selectionStart,P=I==null?void 0:I.selectionEnd),X==="start"&&(Y=0,P=0),I.value=Q.substring(0,Y)+H+Q.substring(P,Q.length),I.selectionStart=Y+H.length,I.selectionEnd=Y+H.length,I.focus(),r==null||r(I.value)},T=()=>{r==null||r("")},R=()=>({value:n||"",slotConfig:[]});b.useImperativeHandle(t,()=>{var H,X,I,Q;return{nativeElement:(X=(H=C.current)==null?void 0:H.resizableTextArea)==null?void 0:X.textArea,focus:(I=C.current)==null?void 0:I.focus,blur:(Q=C.current)==null?void 0:Q.blur,insert:v,clear:T,getValue:R}});const A=b.useRef(!1),k=()=>{A.current=!0},N=()=>{A.current=!1},z=H=>{const X=i==null?void 0:i(H),{key:I,shiftKey:Q,ctrlKey:Y,altKey:P,metaKey:oe}=H;if(!(A.current||I!=="Enter"||X===!1)&&I==="Enter"){const W=Y||P||oe;if(u==="enter"&&!Q&&!W||u==="shiftEnter"&&Q&&!W){H.preventDefault(),w==null||w();return}}},L=H=>{var Q,Y;const X=(Q=H.clipboardData)==null?void 0:Q.files;!((Y=H.clipboardData)==null?void 0:Y.getData("text/plain"))&&(X!=null&&X.length)&&s&&(s(X),H.preventDefault()),a==null||a(H)},D=x5(m,["input"],Vr.TextArea),O={...Za(E,{attr:!0,aria:!0,data:!0}),ref:C},F=H=>{r==null||r(H.target.value,H)};return b.createElement(D,$t({},O,{disabled:l,style:f.input,className:J(`${d}-input`,p.input),autoSize:g,value:n,onChange:F,onKeyUp:o,onCompositionStart:k,onCompositionEnd:N,onKeyDown:z,onPaste:L,variant:"borderless",readOnly:c,placeholder:y,onFocus:$,onBlur:x}))});process.env.NODE_ENV!=="production"&&(T0.displayName="TextArea");function y5(e,t){const n=Ge(e),[r,o,i]=b.useMemo(()=>typeof t=="object"?[t.recording,t.onRecordingChange,typeof t.recording=="boolean"]:[void 0,void 0,!1],[t]),[a,s]=b.useState(null);b.useEffect(()=>{if(!i&&"permissions"in navigator){let w=null;return navigator.permissions.query({name:"microphone"}).then(y=>{s(y.state),y.onchange=function(){s(this.state)},w=y}).catch(y=>{const $=y instanceof Error?y.message:String(y);tn(!1,"Sender",`Browser does not support querying microphone permission. ${$}`)}),()=>{w&&(w.onchange=null)}}},[i]);let l;!l&&typeof window<"u"&&(l=window.SpeechRecognition||window.webkitSpeechRecognition);const c=!!(i||l&&a!=="denied"),u=b.useRef(null),[d,f]=un(!1,r),p=b.useRef(!1),g=()=>{if(c&&!u.current){const w=new l;w.onstart=()=>{f(!0)},w.onend=()=>{f(!1)},w.onresult=y=>{var $,x,E;if(!p.current){const C=(E=(x=($=y.results)==null?void 0:$[0])==null?void 0:x[0])==null?void 0:E.transcript;n(C)}p.current=!1},u.current=w}},m=Ge(w=>{w&&!d||(p.current=w,i?o==null||o(!d):(g(),u.current&&(d?(u.current.stop(),o==null||o(!1)):(u.current.start(),o==null||o(!0)))))});return b.useEffect(()=>()=>{const w=u.current;if(w){w.onstart=null,w.onend=null,w.onresult=null;try{w.stop()}catch{}u.current=null}},[]),[c,m,d]}const P0=h.createContext({}),pm=()=>({height:0}),mm=e=>({height:e.scrollHeight});function w5(e){const{title:t,onOpenChange:n,open:r,children:o,className:i,style:a,classNames:s={},styles:l={},prefixCls:c,closable:u,forceRender:d}=e,{prefixCls:f}=h.useContext(P0),{direction:p,getPrefixCls:g}=vo(),m=g("sender",c||f),w=`${m}-header`,y=()=>{n==null||n(!r)};return h.createElement(vr,{motionEnter:!0,motionLeave:!0,motionName:`${w}-motion`,leavedClassName:`${w}-motion-hidden`,onEnterStart:pm,onEnterActive:mm,onLeaveStart:mm,onLeaveActive:pm,visible:r,forceRender:d},({className:$,style:x})=>h.createElement("div",{className:J(m,w,$,i,{[`${w}-rtl`]:p==="rtl"}),style:{...x,...a}},(u!==!1||t)&&h.createElement("div",{className:J(`${w}-header`,s.header),style:{...l.header}},h.createElement("div",{className:`${w}-title`},t),u!==!1&&h.createElement("div",{className:`${w}-close`},h.createElement(ar,{type:"text",icon:h.createElement(Xu,null),size:"small",onClick:y}))),o&&h.createElement("div",{className:J(`${w}-content`,s.content),style:{...l.content}},o)))}const v5=e=>{const{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[`&${r}-rtl`]:{direction:"rtl"},[`${r}`]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorderInput,[`${r}-header`]:{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",borderRadius:{_skip_check_:!0,value:n(e.borderRadius).mul(2).equal()},borderEndStartRadius:0,borderEndEndRadius:0,[`${r}-title`]:{flex:"auto"}},[`${r}-content`]:{padding:e.padding}},[`${r}-motion`]:{transition:["height","border"].map(o=>`${o} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}},C5=e=>{const{componentCls:t,antCls:n,calc:r}=e,o=`${t}-slot`,i=`${n}-input`,a=`${i}-borderless`,s=`${n}-dropdown-trigger`,l=`${t}-slot-input`,c=`${t}-slot-select`,u=`${t}-slot-tag`,d=`${t}-slot-content`,f=`${t}-skill`;return{[t]:{[`${t}-input-slot`]:{outline:"none",cursor:"text",whiteSpace:"pre-wrap",width:"100%",caretColor:e.colorPrimary,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:"attr(data-placeholder)",color:e.colorTextPlaceholder}},[`${o}:not(${d})`]:{display:"inline-block",verticalAlign:"middle",alignItems:"center",marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:"break-all",marginInline:e.marginXXS},[`${i}${l}`]:{height:"100%",background:e.colorBgSlot,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,fontSize:"inherit",lineHeight:"inherit",position:"relative",[`&${a}`]:{"&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)":{outline:"none"}},"&::placeholder":{color:e.colorTextSlotPlaceholder,fontSize:"inherit",lineHeight:"inherit"},[o]:{display:"inline-flex",margin:`0 ${ye(e.marginXXS)}`,verticalAlign:"bottom",alignItems:"center",marginBlock:ye(r(e.marginXXS).div(2).equal()),minHeight:e.controlHeightSM,wordBreak:"break-all"}},[c]:{fontSize:e.fontSize,lineHeight:e.lineHeight,paddingInline:e.paddingXXS,transition:`border-color ${e.motionDurationMid}`,position:"relative",display:"inline-flex",alignItems:"center",cursor:"pointer",background:e.colorBgSlot,height:"100%",boxSizing:"border-box",borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`${c}`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,padding:`0 ${ye(e.paddingXXS)}`,transition:`border-color ${e.motionDurationMid}`,position:"relative",display:"inline",cursor:"pointer",background:e.colorBgSlot,alignItems:"center",justifyContent:"center",borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`&${s}-open`]:{borderColor:e.colorBorderSlotHover}},[`${c}-value`]:{flex:1,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:"attr(data-placeholder)"}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"inline-flex",alignItems:"center",justifyContent:"center"},[`${u}`]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${ye(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"relative",cursor:"default"}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"inline-flex",alignItems:"center",justifyContent:"center"},[u]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${ye(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,height:"100%",boxSizing:"border-box",position:"relative",cursor:"default"},[d]:{height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),caretColor:e.colorPrimary,background:e.colorBgSlot,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,boxSizing:"border-box",verticalAlign:"middle",fontSize:e.fontSize,marginBlock:1,lineHeight:e.lineHeight,display:"inline-block",position:"relative",cursor:"text","&:empty":{width:"fit-content","&::after":{display:"inline-block",height:"inherit",content:"attr(data-placeholder)",color:e.colorTextSlotPlaceholder}}},[`${o}-no-width`]:{userSelect:"none",width:"3px",display:"inline-block",lineHeight:"inherit"},[f]:{display:"inline-block",verticalAlign:"baseline",alignItems:"center",marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:"break-all",paddingInlineEnd:0,paddingInlineStart:0,marginInlineEnd:0,marginInlineStart:-1,[`&${f}-empty`]:{"&::after":{display:"inline-block",pointerEvents:"none",height:"inherit",content:"attr(data-placeholder)",color:e.colorTextPlaceholder}}},[`${f}-wrapper`]:{height:"100%",display:"inline-flex"},[`${f}-tag`]:{paddingInline:e.paddingXS,height:"100%",backgroundColor:e.colorBgSkill,borderRadius:e.borderRadius,color:e.colorPrimary,alignItems:"center",fontWeight:500,display:"inline-flex",cursor:"pointer",gap:e.marginXXS,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorBgSkillHover,[`${f}-tag-close:not(${f}-tag-close-disabled)`]:{color:e.colorPrimaryHover}},"&-close":{fontSize:e.fontSizeSM,display:"inline-flex",transition:`color ${e.motionDurationMid}`,color:e.colorPrimary},"&-close-disabled":{cursor:"not-allowed",color:e.colorTextDisabled}},[`${f}-holder`]:{width:e.marginXS,height:"100%"}}}},S5=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-switch`;return{[t]:{[`&${r}-rtl`]:{direction:"rtl"},[`&${r}`]:{display:"inline-block",[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchUncheckedHoverBg,borderColor:e.colorBorder,color:e.colorText},[`&${r}-checked`]:{[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchCheckedHoverBg,borderColor:e.colorPrimary,color:e.colorPrimaryText},[`${r}-content`]:{background:e.switchCheckedBg}}}}}},E5=e=>{const{antCls:t,componentCls:n,paddingSM:r,paddingXS:o,paddingXXS:i,lineWidth:a,calc:s}=e;return{[n]:{[`&${n}-main`]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorderInput,borderWidth:a,borderStyle:"solid"},[`&${n}-disabled`]:{background:e.colorBgContainerDisabled,borderColor:"transparent"},[`&${n}-rtl`]:{direction:"rtl"},[`${n}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:r,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${n}-prefix`]:{flex:"none"},[`${n}-input`]:{paddingInline:0,borderRadius:0,flex:"auto",alignSelf:"center",caretColor:e.colorPrimary,fontSize:e.fontSize,[`&${t}-input-borderless`]:{"&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)":{outline:"none"}}},[`${n}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${n}-actions-btn`]:{[`&-disabled:where(${t}-btn-variant-text)`]:{color:e.colorTextActionsDisabled,borderColor:"transparent"},[`&-disabled:not(${t}-btn-variant-text)`]:{background:e.colorBgActionsDisabled,color:e.colorTextLightSolid,borderColor:"transparent"},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}},[`${n}-footer`]:{paddingInlineStart:r,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:i,boxSizing:"border-box"}}}},$5=e=>{const{colorPrimary:t,colorFillTertiary:n}=e,r=new Ve(t).setA(.06).toRgbString(),o=new Ve(t).setA(.08).toRgbString(),i=new Ve(t).setA(.15).toRgbString(),a=t,s=new Ve(t).setA(.25).toRgbString(),l=new Ve(t).setA(.1).toRgbString(),c=r,u=new Ve(t).setA(.08).toRgbString(),d=new Ve(n).setA(.04).toRgbString(),f=new Ve(t).setA(.1).toRgbString(),p=new Ve(n).setA(.1).toRgbString(),g=`0 4px 12px 0 ${new Ve(t).setA(.1).toRgbString()}`,m=new Ve(t).setA(.45).toRgbString();return{colorBgSlot:r,colorBgSkill:o,colorBgSkillHover:i,colorTextSlot:a,colorTextSlotPlaceholder:s,colorBorderSlotHover:l,colorBorderSlot:c,switchCheckedBg:u,switchCheckedHoverBg:f,switchUncheckedHoverBg:d,colorBorderInput:p,boxShadowInput:g,colorBgActionsDisabled:m,colorTextActionsDisabled:m}},N0=o5("Sender",e=>{const{paddingXS:t,calc:n}=e,r=yt(e,{SenderContentMaxWidth:`calc(100% - ${ye(n(t).add(32).equal())})`});return[E5(r),v5(r),S5(r),C5(r)]},$5),ta={SendButton:E0,ClearButton:a5,LoadingButton:S0,SpeechButton:I0},k5=b.forwardRef((e,t)=>{const{prefixCls:n,styles:r={},classNames:o={},className:i,rootClassName:a,style:s,defaultValue:l,value:c,slotConfig:u,readOnly:d,submitType:f="enter",onSubmit:p,loading:g,components:m,onCancel:w,onChange:y,suffix:$,onKeyUp:x,onKeyDown:E,disabled:C,allowSpeech:v,prefix:T,footer:R,header:A,onPaste:k,onPasteFile:N,autoSize:z={maxRows:8},placeholder:L,onFocus:D,onBlur:M,skill:O,...F}=e,H=Za(F,{attr:!0,aria:!0,data:!0}),X=b.useId(),I=Array.isArray(u)||(O==null?void 0:O.value),{direction:Q,getPrefixCls:Y}=vo(),P=Y("sender",n),oe=b.useRef(null),W=b.useRef(null);hg(t,()=>{var de;return{nativeElement:oe.current,inputElement:(de=W.current)==null?void 0:de.nativeElement,focus:re=>{var Ce;return(Ce=W.current)==null?void 0:Ce.focus(re)},blur:()=>{var re;return(re=W.current)==null?void 0:re.blur()},insert:(...re)=>{var Ce,Re;return(Re=(Ce=W.current)==null?void 0:Ce.insert)==null?void 0:Re.call(Ce,...re)},clear:()=>{var re;return(re=W.current)==null?void 0:re.clear()},getValue:()=>{var re;return((re=W.current)==null?void 0:re.getValue())??{value:"",slotConfig:[],skill:void 0}}}});const j=Mu("sender"),ne=`${P}-input`,[ee,_]=N0(P),ae=J(P,j.className,i,a,j.classNames.root,o.root,ee,_,`${P}-main`,{[`${P}-rtl`]:Q==="rtl",[`${P}-disabled`]:C}),fe=`${P}-actions-btn`,q=`${P}-actions-list`,[ce,V]=un(l||"",c),le=(de,re,Ce,Re)=>{V(de),y==null||y(de,re,Ce??[],Re)},[se,G,K]=y5(de=>{var re,Ce;I?(Ce=(re=W.current)==null?void 0:re.insert)==null||Ce.call(re,[{type:"text",value:de}]):le(`${ce} ${de}`)},v),we=()=>{if(W!=null&&W.current&&p&&!g&&!B){const de=W.current.getValue();p(de.value,de.slotConfig,de.skill)}},ie=()=>{var de,re;le(""),I&&((re=(de=W.current)==null?void 0:de.clear)==null||re.call(de))},me=b.createElement(t0,{className:`${q}-presets`},v&&b.createElement(I0,null),g?b.createElement(S0,null):b.createElement(E0,null));let pe=me;typeof $=="function"?pe=$(me,{components:ta}):($||$===!1)&&(pe=$);const Ne=typeof T=="function"?T(me,{components:ta}):T||null,Ee=typeof A=="function"?A(me,{components:ta}):A||null,Ie=typeof R=="function"?R(me,{components:ta}):R||null,[B,Z]=b.useState(!ce),ue={prefixCls:fe,onSend:we,onSendDisabled:!ce,onClear:ie,onClearDisabled:!ce,onCancel:w,onCancelDisabled:!g,onSpeech:()=>G(!1),onSpeechDisabled:!se,speechRecording:K,disabled:C,setSubmitDisabled:Z},xe=b.useMemo(()=>({value:ce,onChange:le,slotConfig:u,onKeyUp:x,onKeyDown:E,onPaste:k,onPasteFile:N,disabled:C,readOnly:d,submitType:f,prefixCls:P,styles:r,classNames:o,autoSize:z,components:m,triggerSend:we,placeholder:L,onFocus:D,onBlur:M,skill:O,...F}),[ce,le,u,x,E,k,N,C,d,f,P,r,o,z,m,we,L,D,M,O,F]),$e=de=>{var re,Ce,Re;!I&&de.target!==((re=oe.current)==null?void 0:re.querySelector(`.${ne}`))&&de.preventDefault(),de.target===((Ce=oe.current)==null?void 0:Ce.querySelector(`.${ne}`))&&((Re=W.current)==null||Re.focus())};return b.createElement("div",$t({key:X,ref:oe,className:ae,style:{...j.style,...s,...j.styles.root,...r.root}},H),b.createElement(bs.Provider,{value:xe},b.createElement(hs.Provider,{value:ue},Ee&&b.createElement(P0.Provider,{value:{prefixCls:P}},Ee),b.createElement("div",{className:J(`${P}-content`,o.content),style:r.content,onMouseDown:$e},Ne&&b.createElement("div",{className:J(`${P}-prefix`,j.classNames.prefix,o.prefix),style:{...j.styles.prefix,...r.prefix}},Ne),I?b.createElement(k0,{ref:W}):b.createElement(T0,{ref:W}),pe&&b.createElement("div",{className:J(q,j.classNames.suffix,o.suffix),style:{...j.styles.suffix,...r.suffix}},pe)),Ie&&b.createElement("div",{className:J(`${P}-footer`,j.classNames.footer,o.footer),style:{...j.styles.footer,...r.footer}},Ie))))}),M0=k5;process.env.NODE_ENV!=="production"&&(M0.displayName="Sender");const I5=h.forwardRef((e,t)=>{const{children:n,className:r,classNames:o={},styles:i={},icon:a,style:s,onChange:l,rootClassName:c,loading:u,defaultValue:d,value:f,checkedChildren:p,unCheckedChildren:g,disabled:m,prefixCls:w,...y}=e,{styles:$={},classNames:x={},prefixCls:E}=h.useContext(bs),C=Za(y,{attr:!0,aria:!0,data:!0}),v=h.useId(),{direction:T,getPrefixCls:R}=vo(),A=R("sender",w||E),k=`${A}-switch`,[N,z]=N0(A),L=h.useRef(null);hg(t,()=>({nativeElement:L.current}));const[D,M]=un(d,f),O=Mu("sender"),F=J(A,k,r,c,O.classNames.switch,x.switch,o.root,N,z,{[`${k}-checked`]:D,[`${k}-rtl`]:T==="rtl"});return h.createElement("div",$t({ref:L,className:F,key:v,style:{...s,...O.styles.switch,...$.switch,...i.root}},C),h.createElement(ar,{disabled:m,loading:u,className:J(`${k}-content`,o.content),style:i.content,styles:{icon:i.icon,content:i.title},classNames:{icon:o.icon,content:o.title},variant:"outlined",color:D?"primary":"default",icon:a,onClick:()=>{const H=!D;M(H),l==null||l(H)}},D?p:g,n))}),gd=M0;gd.Header=w5;gd.Switch=I5;function A0({size:e=12}){return S.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:S.jsx("path",{d:"M12 2.5l1.8 5.2a3 3 0 0 0 1.9 1.9l5.2 1.8-5.2 1.8a3 3 0 0 0-1.9 1.9L12 20.3l-1.8-5.2a3 3 0 0 0-1.9-1.9L3.1 11.4l5.2-1.8a3 3 0 0 0 1.9-1.9z"})})}function R5({items:e,activeIndex:t,onSelect:n}){const r=b.useRef(null);return b.useEffect(()=>{var i;const o=(i=r.current)==null?void 0:i.children[t];o==null||o.scrollIntoView({block:"nearest"})},[t]),S.jsxs("div",{className:"sa-slash-menu",children:[S.jsxs("div",{className:"sa-slash-menu-header",children:["技能 (",e.length,")"]}),S.jsx("div",{className:"sa-slash-menu-body",ref:r,children:e.length===0?S.jsx("div",{className:"sa-slash-menu-empty",children:"没有匹配的技能"}):e.map((o,i)=>{const a=o.displayName||o.name,s=o.owner==="member"&&o.memberName?o.memberName:null,l=!o.selectable;return S.jsxs("div",{className:"sa-slash-menu-item"+(i===t?" sa-slash-menu-item--active":"")+(l?" sa-slash-menu-item--disabled":""),"aria-disabled":l||void 0,title:l?o.disabledReason??void 0:void 0,onMouseDown:c=>{c.preventDefault(),!l&&n(o)},children:[S.jsx("span",{className:"sa-slash-menu-item-icon",children:S.jsx(A0,{size:13})}),S.jsx("span",{className:"sa-slash-menu-item-name",children:a}),s&&S.jsx("span",{className:"sa-slash-menu-item-owner",children:s}),l&&o.disabledReason?S.jsx("span",{className:"sa-slash-menu-item-desc",children:o.disabledReason}):o.description&&S.jsx("span",{className:"sa-slash-menu-item-desc",children:o.description})]},o.code)})})]})}function T5({sdk:e,input:t,onSelect:n}){const[r,o]=b.useState([]),[i,a]=b.useState(!1),[s,l]=b.useState(0),c=b.useRef(!1);b.useEffect(()=>{c.current||(c.current=!0,e.listSkills().then(o).catch(()=>o([])))},[e]);const u=/^\/\S*$/.test(t);b.useEffect(()=>{a(u)},[u]);const d=t.startsWith("/")?t.slice(1).toLowerCase():"",f=b.useMemo(()=>r.filter(C=>!d||C.code.toLowerCase().includes(d)||C.name.toLowerCase().includes(d)||C.displayName&&C.displayName.toLowerCase().includes(d)),[r,d]),p=b.useMemo(()=>f.reduce((C,v,T)=>v.selectable?[...C,T]:C,[]),[f]);b.useEffect(()=>{u&&l(p[0]??0)},[t,u,p]);const g=b.useRef(i),m=b.useRef(f),w=b.useRef(p),y=b.useRef(s),$=b.useRef(n);g.current=i,m.current=f,w.current=p,y.current=s,$.current=n;const x=b.useCallback(C=>{if(!g.current)return!1;const v=w.current;if(v.length===0)return!1;const T=R=>{const A=v.indexOf(y.current),k=A===-1?v[0]:v[(A+R+v.length)%v.length];l(k)};switch(C.key){case"ArrowDown":return C.preventDefault(),T(1),!0;case"ArrowUp":return C.preventDefault(),T(-1),!0;case"Enter":case"Tab":{const R=m.current[y.current];return!R||!R.selectable?!1:(C.preventDefault(),$.current(R),a(!1),!0)}case"Escape":return C.preventDefault(),a(!1),!0;default:return!1}},[]),E=b.useCallback(()=>a(!1),[]);return{isOpen:i,items:f,activeIndex:s,handleKeyDown:x,close:E}}const P5=10,N5="sa-sender",M5=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);function A5({size:e=16}){return S.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}function bd(){const{status:e,sendMessage:t,stop:n,sdk:r,attachmentUploader:o,nosUpload:i,activeConversationId:a}=Fn(),[s,l]=b.useState(""),[c,u]=b.useState(null),[d,f]=b.useState([]),p=b.useRef(null),g=b.useRef(null);b.useEffect(()=>{var O,F;if(!a||e!=="ready")return;const M=zn.popPendingChat();M&&M.sessionId===a&&M.message.trim()&&(l(M.message),(O=p.current)==null||O.insert(M.message,"end"),(F=p.current)==null||F.focus())},[a,e]);const m=!!o||!!i,w=e==="streaming"||e==="submitted",y=d.filter(M=>M.attachment),$=d.some(M=>!M.attachment&&M.status==="uploading"),x=!!s.trim()||!!c||d.length>0||w,E=!w&&!$&&(s.trim().length>0||!!c||y.length>0),C=b.useMemo(()=>c?{title:S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"sa-skill-inline-icon",children:S.jsx(A0,{})}),c.displayName||c.name]}),value:c.code,closable:!0,...c.owner==="member"&&c.memberName?{toolTip:{title:`${c.displayName||c.name}(成员 ${c.memberName} 的技能)`}}:{}}:void 0,[c]),v=b.useCallback((M,O,F,H)=>{l(M),H||u(X=>X&&null)},[]),T=b.useCallback(M=>{u(M),setTimeout(()=>{var O;return(O=p.current)==null?void 0:O.focus()},0)},[]),R=T5({sdk:r,input:s,onSelect:T}),A=b.useCallback(M=>{const O=Array.from(M.target.files??[]);if(M.target.value="",!m||O.length===0)return;const F=P5-d.length,H=O.slice(0,Math.max(0,F));if(H.length===0)return;const X=H.map(I=>({key:`${I.name}_${I.size}_${Date.now()}_${Math.random().toString(36).slice(2,6)}`,file:I,status:"uploading"}));f(I=>[...I,...X]);for(const{key:I,file:Q}of X)(o||zn.createNosUploader({baseURL:i.baseURL,headers:i.headers,trunkSize:i.trunkSize,onProgress:P=>f(oe=>oe.map(W=>W.key===I?{...W,percent:P}:W))}))(Q).then(P=>{f(oe=>oe.map(W=>W.key===I?{...W,attachment:{...P,filename:P.filename||Q.name,size:P.size??Q.size,mime:P.mime??Q.type}}:W))}).catch(P=>{f(oe=>oe.map(W=>W.key===I?{...W,status:"error",errorMsg:P instanceof Error?P.message:String(P)}:W))})},[o,i,d]),k=b.useCallback(M=>{f(O=>O.filter(F=>F.key!==M))},[]),N=b.useCallback(()=>{var X;if(!E)return;const M=s.trim(),O=y.map(I=>I.attachment),F=c?`/${c.code}${M?` ${M}`:""}`:M,H=c?`${c.displayName||c.name}${M?` ${M}`:""}`:void 0;t(F,O.length>0?O:void 0,H),(X=p.current)==null||X.clear(),l(""),u(null),f([])},[E,s,c,y,t]),z=b.useCallback(M=>{if(R.handleKeyDown(M))return!1;if(M.key==="Enter")return(M.metaKey||M.ctrlKey)&&(M.preventDefault(),N()),!1},[N,R.handleKeyDown]),L=b.useCallback(()=>{var M;w||(M=p.current)==null||M.focus()},[w]),D=S.jsxs("div",{className:"flex items-center justify-end gap-2",children:[m&&!w&&S.jsx("button",{type:"button",className:"sa-attach-btn mr-auto","aria-label":"添加附件",title:"添加附件",onClick:()=>{var M;return(M=g.current)==null?void 0:M.click()},children:S.jsx(A5,{size:15})}),S.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:A,"aria-label":"选择附件"}),!w&&S.jsxs("span",{className:"sa-send-hint","aria-hidden":"true",children:[S.jsx("kbd",{className:"sa-send-kbd",children:M5?"⌘":"Ctrl"}),S.jsx("span",{children:"+"}),S.jsx("kbd",{className:"sa-send-kbd",children:"Enter"}),S.jsx("span",{children:"发送"})]}),w?S.jsx("button",{type:"button",className:"sa-send-btn sa-send-btn-active","aria-label":"停止生成",title:"停止生成",onClick:n,children:S.jsx("span",{className:"sa-stop-icon"})}):S.jsx("button",{type:"button",className:`sa-send-btn ${E?"sa-send-btn-active":""}`,"aria-label":"发送",title:"发送",onClick:N,disabled:!E,children:S.jsx("img",{src:Gt.sendSolid,alt:"发送",width:14,height:14,draggable:!1})})]});return S.jsxs("div",{className:"relative z-[2] shrink-0 px-[15px] pb-2.5",children:[R.isOpen&&S.jsx(R5,{items:R.items,activeIndex:R.activeIndex,onSelect:T}),d.length>0&&S.jsx("div",{className:"sa-attachment-tray mb-1.5",onClick:M=>M.stopPropagation(),children:d.map(M=>S.jsxs("span",{className:`sa-attachment-tray-chip ${M.status==="error"?"sa-attachment-tray-chip-error":""}`,title:M.status==="error"?`上传失败:${M.errorMsg??""}`:M.file.name,children:[S.jsx(Ze,{name:"file-text",size:13,color:M.status==="error"?"#ef4444":"#6366f1"}),S.jsx("span",{className:"sa-attachment-tray-chip-name",children:M.file.name}),S.jsx("span",{className:"sa-attachment-tray-chip-size",children:M.attachment?jh(M.file.size):M.status==="error"?"失败":M.percent!=null?`${Math.min(99,Math.round(M.percent))}%`:"上传中…"}),S.jsx("button",{type:"button",className:"sa-attachment-tray-chip-remove","aria-label":`移除附件 ${M.file.name}`,onClick:()=>k(M.key),children:"✕"})]},M.key))}),S.jsx("div",{className:"sa-composer-shell",onClick:L,children:S.jsx(b.Fragment,{children:S.jsx(gd,{ref:p,prefixCls:N5,rootClassName:`sa-input-form ${x?"sa-input-form-active":""} ${w?"sa-input-form-streaming":""}`,skill:C,onChange:v,onKeyDown:z,disabled:w,autoSize:{minRows:1,maxRows:5},placeholder:w?"回答生成中,请稍候…":c?"补充你的需求…":"发消息或创建任务... /使用技能",suffix:D})})}),S.jsx("div",{className:"mt-3 text-center text-[11px] leading-none text-[#B8B8B8]",children:"所有内容均由AI生成仅供参考"})]})}const z5=.3,O5=.7,D5=.5;function L5({artifact:e}){const[t,n]=b.useState(null),[r,o]=b.useState(null),[i,a]=b.useState(!0),[s,l]=b.useState(null);return b.useEffect(()=>{let c=!1;a(!0),l(null),n(null),o(null);async function u(){try{if(e.type==="pdf"){c||a(!1);return}if(e.type==="md"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.text();c||(o(f),a(!1));return}if(e.type==="html"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.text(),p=(await Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs"))).default;c||(n(p.sanitize(f,{FORCE_BODY:!0,ADD_ATTR:["target"]})),a(!1));return}if(e.type==="docx"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.arrayBuffer(),g=await(await Promise.resolve().then(()=>require("./mammoth.browser-DrqsE041.cjs")).then(w=>w.mammoth_browser)).convertToHtml({arrayBuffer:f}),m=(await Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs"))).default;c||(n(m.sanitize(g.value,{FORCE_BODY:!0,ADD_ATTR:["target"]})),a(!1));return}c||(a(!1),l(`不支持预览「${e.type}」类型`))}catch(d){c||(a(!1),l(d instanceof Error?d.message:"加载失败"))}}return u(),()=>{c=!0}},[e]),i?S.jsx("div",{className:"sa-drawer-preview-loading",children:"加载中"}):s?S.jsxs("div",{className:"sa-drawer-preview-error",children:[s,S.jsx("button",{className:"sa-drawer-btn-sm",onClick:()=>void pa(e),children:"下载查看"})]}):e.type==="pdf"?S.jsx("iframe",{src:e.url,title:e.filename,className:"sa-drawer-preview-iframe",sandbox:"allow-scripts"}):r!==null?S.jsx("div",{className:"sa-drawer-preview-html-scroll",children:S.jsx("div",{className:"sa-drawer-preview-html sa-text-part",children:S.jsx(bu,{remarkPlugins:[vu],children:r})})}):t!==null?S.jsx("div",{className:"sa-drawer-preview-html-scroll",children:S.jsx("div",{className:"sa-drawer-preview-html sa-text-part",dangerouslySetInnerHTML:{__html:t}})}):null}function F5({artifacts:e,initialArtifact:t,onClose:n}){const{previewLayoutMode:r,containerWidth:o,isDrawerFullscreen:i,setDrawerFullscreen:a}=Fn(),[s,l]=b.useState(t?{mode:"preview",artifact:t}:{mode:"list"}),[c,u]=b.useState(!1),d=b.useRef(null),[f,p]=b.useState(D5),g=b.useRef(null),m=i,w=!m&&r==="split",y=Math.round(o*f);b.useEffect(()=>{t&&(d.current&&(clearTimeout(d.current),d.current=null,u(!1)),l({mode:"preview",artifact:t}))},[t]);const $=b.useCallback(()=>{u(!0),d.current=setTimeout(()=>{d.current=null,n()},240)},[n]);b.useEffect(()=>()=>{var A;d.current&&clearTimeout(d.current),(A=g.current)==null||A.call(g)},[]);const x=b.useCallback(A=>{l({mode:"preview",artifact:A})},[]),E=b.useCallback(()=>{l({mode:"list"})},[]),C=b.useCallback(()=>a(!1),[a]);b.useEffect(()=>{const A=k=>{k.key==="Escape"&&(m?C():$())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[m,C,$]);const v=b.useCallback(A=>{if(!w)return;A.preventDefault();const k=A.clientX,N=y,z=D=>{const M=k-D.clientX,O=Math.max(o*z5,Math.min(o*O5,N+M));p(O/o)},L=()=>{document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",L),document.body.style.cursor="",document.body.style.userSelect="",g.current=null};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",z),document.addEventListener("mouseup",L),g.current=L},[w,y,o]),T=["sa-artifact-drawer",c?"sa-drawer-closing":"",m?"sa-drawer-fullscreen":"",!m&&r==="cover"?"sa-drawer-cover":""].filter(Boolean).join(" "),R=w?{width:y}:void 0;return o===0?null:S.jsxs("div",{className:T,style:R,onClick:m?A=>{A.target===A.currentTarget&&C()}:void 0,children:[S.jsx("div",{className:`sa-drawer-resize-handle ${w?"":"sa-drawer-handle-hidden"}`,onMouseDown:v}),S.jsxs("div",{className:"sa-drawer-shell",children:[S.jsxs("div",{className:"sa-artifact-drawer-header",children:[s.mode==="preview"?S.jsx("button",{className:"sa-drawer-btn",onClick:E,title:"返回列表","aria-label":"返回列表",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M15 18l-6-6 6-6"})})}):S.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{flexShrink:0},children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),S.jsx("span",{className:"sa-artifact-drawer-title",children:s.mode==="preview"?s.artifact.filename:"会话产物"}),S.jsx("div",{style:{flex:1}}),m&&S.jsx("button",{className:"sa-drawer-btn",onClick:C,title:"退出全屏","aria-label":"退出全屏",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 21h3a2 2 0 0 0 2-2v-3M16 21v-3a2 2 0 0 1 2-2h3"})})}),s.mode==="preview"&&S.jsxs(S.Fragment,{children:[S.jsx("button",{className:"sa-drawer-btn",onClick:()=>void pa(s.artifact),title:"下载","aria-label":"下载",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})}),!m&&S.jsx("button",{className:"sa-drawer-btn",onClick:()=>a(!0),title:"全屏","aria-label":"全屏",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})})]}),S.jsx("button",{className:"sa-drawer-btn",onClick:$,title:"关闭","aria-label":"关闭",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),S.jsx("div",{className:"sa-artifact-drawer-body",children:s.mode==="list"?e.length===0?S.jsx("div",{className:"sa-drawer-empty",children:"暂无产物"}):S.jsx("ul",{className:"sa-drawer-file-list",role:"list",children:e.map((A,k)=>S.jsxs("li",{className:"sa-drawer-file-card",onClick:()=>x(A),onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),x(A))},tabIndex:0,role:"button","aria-label":`预览 ${A.filename}`,children:[S.jsx("div",{className:"sa-drawer-file-icon",children:S.jsx("span",{className:"sa-artifact-chip-type",children:vm(A.type)})}),S.jsxs("div",{className:"sa-drawer-file-info",children:[S.jsx("span",{className:"sa-drawer-file-name",children:A.filename}),S.jsx("span",{className:"sa-drawer-file-size",children:wm(A.size)})]}),S.jsx("button",{className:"sa-drawer-btn",title:"下载","aria-label":`下载 ${A.filename}`,onClick:N=>{N.stopPropagation(),pa(A)},children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})})]},A.id||`artifact-${k}`))}):S.jsx("div",{className:"sa-drawer-view-enter",children:S.jsx(L5,{artifact:s.artifact})})})]})]})}function z0({page:e,onBack:t,centered:n}){b.useEffect(()=>{const o=i=>{i.key==="Escape"&&t()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[t]);const r=b.isValidElement(e.component)?b.cloneElement(e.component,{close:t}):b.createElement(e.component,{close:t});return S.jsx("div",{className:`sa-page-overlay ${n?"sa-page-overlay-centered":""}`,children:S.jsx("div",{className:"sa-page-overlay-body",children:r})})}const _5="mx-auto w-full max-w-[800px]";function O0({contentClassName:e,centered:t,composerClassName:n,thread:r,composer:o,artifactPreview:i}){const{activePanel:a,closePanel:s,messagesLoading:l,isArtifactDrawerOpen:c,allArtifacts:u,activePreviewArtifact:d,toggleArtifactDrawer:f,registerContentEl:p}=Fn();if(a)return S.jsx(z0,{page:a,onBack:s,centered:t});const g=t?_5:"";return S.jsxs(S.Fragment,{children:[S.jsxs("div",{ref:p,className:`relative ${e} ${g}`,children:[l?S.jsxs("div",{className:"sa-messages-loading",children:[S.jsx("span",{className:"sa-loading-spinner"}),"加载对话..."]}):r,i&&c&&S.jsx(F5,{artifacts:u,initialArtifact:d,onClose:f})]}),n?S.jsx("div",{className:`${n} ${g}`,children:o}):o]})}function j5({isOpen:e,onClose:t,title:n,slots:r,welcomeMessage:o,suggestedPrompts:i,avatar:a,artifactPreview:s,capabilities:l,quickLinks:c,logo:u,defaultWidth:d,defaultHeight:f,showTimestamp:p,collapse:g}){const{status:m,sendMessage:w,stop:y,toggleThreadList:$,setThreadListOpen:x,isThreadListOpen:E,toggleArtifactDrawer:C,isArtifactDrawerOpen:v,previewLayoutMode:T,isDrawerFullscreen:R,allArtifacts:A,activePanel:k,closePanel:N,messages:z,messagesLoading:L,conversations:D,activeConversationId:M,switchConversation:O,newConversation:F,deleteConversation:H,renameConversation:X,hasMore:I,loadMoreConversations:Q}=Fn(),{width:Y,position:P,hasCustomPosition:oe,isMaximized:W,totalWidth:j,windowHeight:ne,startWindowDrag:ee,startResize:_,toggleMaximize:ae,reset:fe,setLockedHeight:q}=Y0({defaultWidth:d??Ut.DEFAULT_WIDTH,defaultHeight:f??Ut.DEFAULT_HEIGHT,sidebarWidth:0}),ce=b.useRef(null),V=b.useRef(null),le=!L&&z.length===0,se=!L&&z.length>0,G=!!k;b.useEffect(()=>{e||(fe(),N())},[e,fe,N]),b.useEffect(()=>{x(W?ce.current??!0:V.current??!1)},[W,x]),b.useEffect(()=>{se||q(null)},[se,q]);const K=Q0({enabled:e&&se&&!W&&!G&&!(v&&T==="cover"),contentSelector:".sa-panel-content",defaultHeight:f??Ut.DEFAULT_HEIGHT,onHeightChange:q});if(!e)return null;const we=r.Header,ie=r.Composer,me=r.ThreadList,pe=()=>{const Ce=!E;$(),W?ce.current=Ce:V.current=Ce},Ne=200,Ee=E&&!W,Ie="var(--sa-radius, 16px)",B=Ee?`0px ${Ie} ${Ie} 0px`:`${Ie} ${Ie} ${Ie} ${Ie}`,Z=oe?P.x:window.innerWidth-j-20,ue=Math.min(Ne,Math.max(0,Z-1)),xe=oe?{width:`${j}px`,height:`${ne}px`,left:`${P.x}px`,top:`${P.y}px`}:{width:`${j}px`,height:`${ne}px`,right:"20px",bottom:"20px"},$e={title:n,onClose:t,onToggleThreadList:pe,isMaximized:W,onToggleMaximize:ae,showHome:se||G,onHome:G?N:F,panelTitle:G?k==null?void 0:k.title:void 0,artifactCount:G||!s?0:A.length,onToggleArtifactDrawer:G||!s?void 0:C},de={conversations:D,activeSessionId:M,onSwitch:O,onNew:F,onDelete:H,onRename:X,hasMore:I,onLoadMore:Q},re=S.jsxs("div",{className:`relative z-20 flex min-w-0 flex-col bg-white ${W?"flex-1":"h-full shrink-0"}`,style:W?void 0:{width:`${Y}px`,borderRadius:B,overflow:"hidden"},children:[le&&!G&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"sa-home-gradient pointer-events-none absolute inset-x-0 top-0 z-0 h-[238px] opacity-10"}),S.jsx("div",{className:"sa-home-gradient-fade pointer-events-none absolute inset-x-0 top-0 z-[1] h-[238px]"})]}),S.jsx("div",{className:`relative z-20 ${le||W?"":"bg-white"} ${W?"cursor-default":"cursor-grab active:cursor-grabbing"}`,onMouseDown:W?void 0:ee,children:we?S.jsx(we,{...$e}):S.jsx($m,{...$e})}),S.jsx(O0,{contentClassName:`sa-panel-content relative ${R?"z-[30]":"z-[2]"} ${le?"sa-home-view":""}`,centered:W,composerClassName:"shrink-0",artifactPreview:s,thread:S.jsx(Cu,{slots:r,welcomeMessage:o,suggestedPrompts:i,avatar:a,artifactPreview:s,capabilities:l,quickLinks:c,logo:u,showTimestamp:p,collapse:g}),composer:ie?S.jsx(ie,{status:m,onSend:w,onStop:y}):S.jsx(bd,{})})]});return W?S.jsx("div",{className:"fixed inset-0 z-[var(--sa-z-index,9999)] flex animate-sa-fade-in flex-col justify-end bg-black/30",children:S.jsxs("div",{className:"flex h-[calc(100%_-_48px)] w-full animate-sa-slide-up-full flex-row overflow-hidden bg-[#F5F5F5] shadow-[0_-12px_48px_rgba(0,0,0,0.25)]",style:{borderRadius:"var(--sa-radius, 16px) var(--sa-radius, 16px) 0px 0px"},children:[E&&(me?S.jsx(me,{...de}):S.jsx(pl,{width:220})),re]})}):S.jsxs("div",{ref:K,className:"fixed z-[var(--sa-z-index,9999)] flex animate-sa-window-in flex-row overflow-visible border border-[#DADADA] bg-white shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{...xe,borderRadius:B},children:[S.jsx("div",{className:"sa-resize-handle absolute bottom-0 left-[-3px] top-0 z-20 w-[6px] cursor-col-resize",onMouseDown:Ce=>_(Ce)}),Ee&&(me?S.jsx("div",{className:"absolute -top-px -bottom-px -left-px z-10 overflow-hidden border border-r-0 border-[#DADADA] bg-[#FAFAFA] shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{width:ue,transform:`translateX(-${ue}px)`,borderRadius:`${Ie} 0px 0px ${Ie}`},children:S.jsx(me,{...de})}):S.jsx("div",{className:"absolute -top-px -bottom-px -left-px z-10 overflow-hidden border border-r-0 border-[#DADADA] bg-[#FAFAFA] shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{width:ue,transform:`translateX(-${ue}px)`,borderRadius:`${Ie} 0px 0px ${Ie}`},children:S.jsx(pl,{width:Ne})})),re]})}const hm=()=>{};function B5({conversations:e,activeSessionId:t,onSwitch:n,onNew:r,onDelete:o,onRename:i,isCollapsed:a,onToggleCollapse:s,hasMore:l,onLoadMore:c,conversationsLoading:u}){const[d,f]=b.useState(null),[p,g]=b.useState(null),[m,w]=b.useState(""),[y,$]=b.useState(null),x=b.useRef(null);b.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const E=b.useCallback((k,N)=>{N.stopPropagation(),d===k?(o(k),f(null)):(f(k),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>f(null),3e3))},[d,o]),C=b.useCallback((k,N,z)=>{z.stopPropagation(),g(k),w(N??"")},[]),v=b.useCallback(k=>{m.trim()&&i(k,m.trim()),g(null)},[m,i]),T=b.useRef(null),R=b.useCallback(()=>{const k=T.current;!k||!l||!c||k.scrollHeight-k.scrollTop-k.clientHeight<50&&c()},[l,c]),A=b.useMemo(()=>km(e),[e]);return a?S.jsxs("div",{className:"flex w-12 shrink-0 flex-col items-center gap-1 border-r border-[#ECECEC] bg-[#FAFAFA] py-3",children:[S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"展开",onClick:s,children:S.jsx(Ze,{name:"panel-left",size:18})}),S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"新建对话",onClick:()=>{r(),s()},children:S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18})})]}):S.jsxs("div",{className:"relative flex w-[220px] shrink-0 flex-col border-r border-[#ECECEC] bg-[#FAFAFA] p-3",children:[S.jsxs("div",{className:"mb-4 flex shrink-0 items-center gap-1.5",children:[S.jsxs("button",{type:"button",className:"sa-new-chat flex h-8 flex-1 items-center justify-center gap-2 rounded-md text-[14px] font-medium transition-colors",onClick:r,children:[S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18}),S.jsx("span",{className:"sa-new-chat-text whitespace-nowrap",children:"新建对话"})]}),S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"收起侧边栏",onClick:s,children:S.jsx(Ze,{name:"panel-left-close",size:16})})]}),S.jsxs("div",{ref:T,className:"flex-1 overflow-y-auto",onScroll:R,children:[u&&e.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"加载中..."}),!u&&e.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"暂无记录"}),A.map(k=>S.jsxs("div",{className:"mb-1",children:[S.jsx("div",{className:"px-1 pb-1 pt-2 text-[11px] text-[#A0A0A0]",children:k.label}),k.items.map(N=>{const z=N.sessionId===t,L=d===N.sessionId;return S.jsx("div",{className:`group relative mb-0.5 flex h-8 w-full cursor-pointer items-center gap-1 rounded-md px-0.5 text-[13px] transition-colors ${z?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{p!==N.sessionId&&n(N.sessionId)},onMouseEnter:D=>{if(p===N.sessionId)return;const M=D.currentTarget.getBoundingClientRect();$({text:N.title||"新会话",x:M.right+8,y:M.top+M.height/2})},onMouseLeave:()=>$(null),children:p===N.sessionId?S.jsx("input",{className:"w-full rounded border border-[var(--sa-primary)] bg-white px-1.5 py-0.5 text-[12px] outline-none",value:m,onChange:D=>w(D.target.value),onBlur:()=>v(N.sessionId),onKeyDown:D=>{D.key==="Enter"&&v(N.sessionId),D.key==="Escape"&&g(null)},onClick:D=>D.stopPropagation(),autoFocus:!0}):S.jsxs(S.Fragment,{children:[S.jsx("img",{src:Gt.message,alt:"",width:16,height:16,className:"shrink-0 opacity-60"}),S.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-[#333]",children:N.title||"新会话"}),S.jsxs("span",{className:"hidden shrink-0 items-center gap-0.5 group-hover:flex",children:[S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[var(--sa-primary)]",onClick:D=>C(N.sessionId,N.title,D),title:"重命名",children:S.jsx(Ze,{name:"pen",size:12})}),S.jsx("button",{type:"button",className:`flex h-5 w-5 items-center justify-center rounded ${L?"bg-[#fee2e2] text-[#ef4444]":"text-[#999] hover:bg-white/70 hover:text-[#ef4444]"}`,onClick:D=>E(N.sessionId,D),title:L?"确认删除":"删除",children:S.jsx(Ze,{name:L?"x":"trash2",size:12})})]})]})},N.sessionId)})]},k.label)),l&&S.jsx("div",{className:"px-0.5 py-2 text-center text-[11px] text-[#C0C0C0]",children:"向下滚动加载更多"})]}),y&&S.jsx("div",{className:"pointer-events-none fixed z-[10001] whitespace-nowrap rounded border border-[#E8E8E8] bg-white px-2.5 py-1.5 text-[12px] leading-[1.4] text-[#333] shadow-[0_2px_8px_rgba(0,0,0,0.12)]",style:{left:y.x,top:y.y,transform:"translateY(-50%)"},children:y.text})]})}function D0({title:e,slots:t,welcomeMessage:n,suggestedPrompts:r,capabilities:o,quickLinks:i,logo:a,sidebarDefaultOpen:s=!0,onClose:l,avatar:c,artifactPreview:u,showTimestamp:d,collapse:f}){const{status:p,sendMessage:g,stop:m,conversations:w,activeConversationId:y,switchConversation:$,newConversation:x,deleteConversation:E,renameConversation:C,toggleArtifactDrawer:v,allArtifacts:T,activePanel:R,closePanel:A,hasMore:k,loadMoreConversations:N,conversationsLoading:z}=Fn(),[L,D]=b.useState(s),M=b.useCallback(()=>D(I=>!I),[]),O=!!R;b.useEffect(()=>()=>A(),[A]);const F=t.ThreadList,H=t.Composer,X=t.Header;return S.jsxs("div",{className:"sa-fullpage",children:[F?S.jsx("div",{className:`sa-fp-sidebar-wrapper ${L?"":"sa-fp-sidebar-wrapper-collapsed"}`,children:S.jsx(F,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:C,hasMore:k,onLoadMore:N})}):S.jsx(B5,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:C,isCollapsed:!L,onToggleCollapse:M,hasMore:k,onLoadMore:N,conversationsLoading:z}),S.jsxs("div",{className:"sa-fp-main",children:[X?S.jsx(X,{title:O?(R==null?void 0:R.title)??e:e,panelTitle:O?R==null?void 0:R.title:void 0,onClose:l??hm,onToggleThreadList:M,showHome:O,onHome:O?A:hm,artifactCount:O||!u?0:T.length,onToggleArtifactDrawer:O||!u?void 0:v}):S.jsxs("div",{className:"sa-fp-header",children:[S.jsx("div",{className:"sa-fp-header-title",children:O?(R==null?void 0:R.title)??e:e}),S.jsxs("div",{className:"sa-fp-header-actions",children:[O&&S.jsx("button",{className:"sa-fp-header-btn",onClick:A,title:"返回聊天","aria-label":"返回聊天",children:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),S.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})}),!O&&u&&T.length>0&&S.jsxs("button",{className:"sa-fp-header-btn sa-header-btn-artifact",onClick:v,title:"会话产物",children:[S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),S.jsx("span",{children:"产物"})]})]})]}),S.jsx(O0,{contentClassName:"sa-fp-content-row",artifactPreview:u,thread:S.jsx(Cu,{slots:t,welcomeMessage:n,suggestedPrompts:r,capabilities:o,quickLinks:i,logo:a,avatar:c,artifactPreview:u,showTimestamp:d,collapse:f}),composer:H?S.jsx(H,{status:p,onSend:g,onStop:m}):S.jsx(bd,{})})]})]})}function L0(e){const{sdk:t,mode:n="floating",slots:r={},hooks:o={},welcomeMessage:i,suggestedPrompts:a,title:s="AI Assistant",initialOpen:l=!1,onOpenChange:c,sidebarDefaultOpen:u,avatar:d,artifactPreview:f,capabilities:p,quickLinks:g,logo:m,triggerLogo:w,theme:y,showTimestamp:$,attachmentUploader:x,nosUpload:E,collapse:C,toolCallDisplay:v}=e,[T,R]=b.useState(l);b.useEffect(()=>{R(l)},[l]);const A=b.useCallback(()=>{var L,D;const z=!T;R(z),c==null||c(z),z?(L=o.onOpen)==null||L.call(o):(D=o.onClose)==null||D.call(o)},[T,o,c]),k=b.useCallback(()=>{var z;R(!1),c==null||c(!1),(z=o.onClose)==null||z.call(o)},[o,c]),N=r.Trigger??Em;return n==="fullpage"?T?S.jsx(fl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,mode:n,toolCallDisplay:v,children:S.jsx(D0,{title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,capabilities:p,quickLinks:g,logo:m,sidebarDefaultOpen:u,onClose:k,avatar:d,artifactPreview:f,showTimestamp:$,collapse:C})}):null:S.jsxs(fl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,mode:n,toolCallDisplay:v,children:[S.jsx(N,{isOpen:T,onClick:A,triggerLogo:w}),S.jsx(j5,{isOpen:T,onClose:k,title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,avatar:d,artifactPreview:f,capabilities:p,quickLinks:g,logo:m,defaultWidth:y==null?void 0:y.panelWidth,defaultHeight:y==null?void 0:y.panelHeight,showTimestamp:$,collapse:C})]})}const F0=`
313
313
  [data-super-agent-widget] {
314
314
  --sa-primary-dark: color-mix(in srgb, var(--sa-primary) 82%, #000);
315
315
  --sa-primary-light: color-mix(in srgb, var(--sa-primary) 10%, #fff);
@@ -690,100 +690,95 @@ html body {
690
690
 
691
691
  /* ── Thinking part ───────────────────────────────────────── */
692
692
 
693
- .sa-thinking-part {
694
- margin: 6px 0;
695
- padding: 8px 12px;
696
- border-left: 3px solid var(--sa-primary);
697
- border-radius: 8px;
698
- background: var(--sa-primary-light);
699
- cursor: pointer;
700
- font-size: 13px;
693
+ /* (旧 .sa-thinking-part 系列已由 ThoughtChain 式 .sa-chain-node 取代,
694
+ 见上方"ThoughtChain 式步骤节点"块) */
695
+ /* ── ThoughtChain 式步骤节点(思维链/工具调用共用)────────────
696
+ 竖向链:左轨(图标+连线)+ 右主体(标题行+可折叠内容)。
697
+ loading 态图标换 spinner;连线贯穿节点(sa-chain-node 上下贯穿,
698
+ .sa-chain-block 内连续节点自然连成一条链)。 */
699
+ .sa-chain-node {
700
+ display: flex;
701
+ gap: 0;
702
+ margin: 0;
701
703
  }
702
-
703
- .sa-thinking-header {
704
+ .sa-chain-rail {
704
705
  display: flex;
706
+ flex-direction: column;
705
707
  align-items: center;
706
- gap: 6px;
707
- color: var(--sa-primary-dark);
708
- font-weight: 500;
709
- user-select: none;
708
+ width: 24px;
709
+ flex-shrink: 0;
710
710
  }
711
-
712
- .sa-thinking-icon {
713
- font-size: 14px;
714
- line-height: 1;
711
+ .sa-chain-icon {
712
+ width: 20px;
713
+ height: 20px;
714
+ border-radius: 50%;
715
+ display: flex;
716
+ align-items: center;
717
+ justify-content: center;
718
+ background: var(--sa-primary-light);
719
+ color: var(--sa-primary);
720
+ flex-shrink: 0;
715
721
  }
716
-
717
- .sa-thinking-label {
722
+ .sa-chain-done .sa-chain-icon { color: var(--sa-primary); }
723
+ .sa-chain-line {
724
+ width: 1.5px;
718
725
  flex: 1;
726
+ min-height: 6px;
727
+ background: var(--sa-border);
728
+ margin-top: 2px;
729
+ margin-bottom: 2px;
730
+ }
731
+ /* 最后一个节点不画尾巴线(:last-child 由容器级 CSS 处理,见 .sa-chain-block) */
732
+ .sa-chain-spinner {
733
+ width: 12px;
734
+ height: 12px;
735
+ border: 2px solid var(--sa-primary-light);
736
+ border-top-color: var(--sa-primary);
737
+ border-radius: 50%;
738
+ animation: sa-spinner 0.7s linear infinite;
719
739
  }
720
-
721
- /* DeepSeek 式收起条耗时后缀(已深度思考 · 用时 3.2s) */
722
- .sa-thinking-duration {
723
- color: #9ca3af;
724
- font-weight: 400;
725
- }
726
-
727
- .sa-thinking-arrow {
728
- font-size: 12px;
729
- transition: transform 0.2s ease;
730
- }
731
-
732
- .sa-thinking-arrow.expanded {
733
- transform: rotate(90deg);
734
- }
735
-
736
- .sa-thinking-content {
737
- margin-top: 8px;
738
- color: #4b5563;
739
- white-space: pre-wrap;
740
- line-height: 1.55;
741
- }
742
-
743
- /* ── Tool call / result ──────────────────────────────────── */
744
-
745
- .sa-tool-call-part {
746
- margin: 6px 0;
747
- border: 1px solid var(--sa-border);
748
- border-radius: 10px;
749
- overflow: hidden;
750
- background: #ffffff;
740
+ .sa-chain-main {
741
+ flex: 1;
742
+ min-width: 0;
743
+ padding: 0 0 12px 8px;
751
744
  }
752
-
753
- .sa-tool-call-header {
745
+ .sa-chain-header {
754
746
  display: flex;
755
747
  align-items: center;
756
- gap: 8px;
757
- padding: 8px 12px;
748
+ gap: 6px;
749
+ min-height: 20px;
758
750
  cursor: pointer;
759
751
  font-size: 13px;
752
+ color: var(--sa-text);
760
753
  user-select: none;
761
754
  }
762
-
763
- .sa-tool-call-header:hover {
764
- background: var(--sa-surface);
765
- }
766
-
767
- .sa-tool-icon {
768
- font-size: 14px;
769
- line-height: 1;
755
+ .sa-chain-title { flex: 1; color:#999; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
756
+ .sa-chain-loading .sa-chain-title { color: var(--sa-primary); }
757
+ .sa-chain-duration { color: var(--sa-text-light); font-weight: 400; }
758
+ .sa-chain-arrow { color: var(--sa-text-light); transition: transform 0.2s ease; }
759
+ .sa-chain-arrow.expanded { transform: rotate(90deg); }
760
+ .sa-chain-content {
761
+ margin-top: 4px;
762
+ padding: 0 0 0 10px;
763
+ border-left: 1px solid #f5f5f5;
764
+ color: var(--sa-text-muted);
765
+ white-space: pre-wrap;
766
+ line-height: 1.55;
767
+ font-size: 12.5px;
768
+ animation: sa-fade-in 0.2s ease both;
770
769
  }
770
+ /* 链尾:块内最后一个节点去掉尾巴线与底部空隙 */
771
+ .sa-chain-block .sa-chain-node:last-child .sa-chain-line { display: none; }
772
+ .sa-chain-block .sa-chain-node:last-child .sa-chain-main { padding-bottom: 0; }
771
773
 
772
- .sa-tool-name {
773
- flex: 1;
774
- color: #374151;
775
- font-weight: 500;
776
- overflow: hidden;
777
- white-space: nowrap;
778
- text-overflow: ellipsis;
779
- }
774
+ /* ── Tool call / result ──────────────────────────────────── */
775
+ /* 工具调用/结果均已链化(.sa-chain-node 基类),此处仅保留展开内容样式 */
780
776
 
781
777
  .sa-tool-args {
782
- margin: 0;
783
- padding: 10px 12px;
784
- border-top: 1px solid var(--sa-border);
785
- background: var(--sa-surface);
786
- color: #374151;
778
+ margin: 4px 0 0;
779
+ padding: 0 0 0 10px;
780
+ border-left: 1px solid #f5f5f5;
781
+ color: var(--sa-text-muted);
787
782
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
788
783
  font-size: 12px;
789
784
  line-height: 1.5;
@@ -791,58 +786,48 @@ html body {
791
786
  overflow-x: auto;
792
787
  }
793
788
 
794
- .sa-tool-result-part {
795
- margin: 6px 0;
796
- border: 1px solid var(--sa-border);
797
- border-radius: 10px;
798
- overflow: hidden;
799
- background: #ffffff;
789
+ .sa-chain-icon-success {
790
+ background: #ecfdf5;
791
+ color: #10b981;
800
792
  }
801
793
 
802
- .sa-tool-result-header {
803
- display: flex;
804
- align-items: center;
805
- gap: 8px;
806
- padding: 8px 12px;
807
- border-bottom: 1px solid var(--sa-border);
808
- background: var(--sa-surface);
809
- color: #374151;
810
- font-size: 13px;
794
+ .sa-tool-result-name {
811
795
  font-weight: 500;
812
- cursor: pointer;
813
- user-select: none;
814
- }
815
-
816
- .sa-tool-result-header:hover {
817
- background: #f0f0f1;
796
+ flex-shrink: 0;
797
+ max-width: 40%;
798
+ overflow: hidden;
799
+ text-overflow: ellipsis;
800
+ white-space: nowrap;
818
801
  }
819
802
 
820
- .sa-tool-result-label {
821
- flex: 1;
803
+ /* 摘要(灰色轻量,跟在工具名后):DeepSeek"已搜索 5 个网页"式一行状态 */
804
+ .sa-tool-result-summary {
805
+ color: var(--sa-text-light);
806
+ font-weight: 400;
822
807
  overflow: hidden;
823
- white-space: nowrap;
824
808
  text-overflow: ellipsis;
809
+ white-space: nowrap;
810
+ min-width: 0;
825
811
  }
826
812
 
827
813
  .sa-tool-result-content {
828
814
  max-height: 256px;
829
815
  overflow: auto;
830
- margin: 8px 0 0;
831
- padding: 10px 12px;
832
- color: #4b5563;
833
- font-size: 13px;
816
+ margin: 4px 0 0;
817
+ padding: 0 0 0 10px;
818
+ border-left: 1px solid #f5f5f5;
819
+ color: var(--sa-text-muted);
820
+ font-size: 12.5px;
834
821
  line-height: 1.55;
835
822
  white-space: pre-wrap;
836
823
  word-break: break-word;
837
824
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
838
- background: #f9fafb;
839
- border-radius: 8px;
840
825
  }
841
826
 
842
827
  .sa-tool-result-actions {
843
828
  display: flex;
844
829
  gap: 8px;
845
- margin: 4px 0;
830
+ margin: 4px 0 0;
846
831
  }
847
832
 
848
833
  /* ── Error part ──────────────────────────────────────────── */
@@ -1487,9 +1472,9 @@ html body {
1487
1472
  .sa-artifact-file-download:active { transform: scale(0.9); }
1488
1473
 
1489
1474
  /* ── Inline HTML rendering (render_mode=html) ── */
1490
- /* HTML 工具结果:外层滚动容器 + 内层内容层(与 Playground 一致,无 iframe) */
1491
- .sa-tool-result-html-scroll { margin-top: 8px; max-height: 60vh; overflow: auto; border: 1px solid var(--sa-border); border-radius: 8px; }
1492
- .sa-tool-result-html { padding: 12px; background: #fff; min-width: 100%; }
1475
+ /* HTML 工具结果:无框无底色(轻量,与链节点一致);仅极淡圆角底区分正文 */
1476
+ .sa-tool-result-html-scroll { margin-top: 4px; max-height: 60vh; overflow: auto; }
1477
+ .sa-tool-result-html { padding: 4px; background: var(--sa-surface); border-radius: 6px; min-width: 100%; }
1493
1478
 
1494
1479
  /* ── Header artifact button ── */
1495
1480
  /* 轻量柔和:浅 primary tint 底 + primary 文字/图标,无实心块与投影 */
@@ -1665,5 +1650,5 @@ html body {
1665
1650
  from { opacity: 0; transform: translateY(10px); }
1666
1651
  to { opacity: 1; transform: translateY(0); }
1667
1652
  }
1668
- `,B5='[data-super-agent-widget] .pointer-events-none{pointer-events:none}[data-super-agent-widget] .visible{visibility:visible}[data-super-agent-widget] .collapse{visibility:collapse}[data-super-agent-widget] .fixed{position:fixed}[data-super-agent-widget] .absolute{position:absolute}[data-super-agent-widget] .relative{position:relative}[data-super-agent-widget] .inset-0{top:0;right:0;bottom:0;left:0}[data-super-agent-widget] .inset-x-0{left:0;right:0}[data-super-agent-widget] .-bottom-px{bottom:-1px}[data-super-agent-widget] .-left-px{left:-1px}[data-super-agent-widget] .-right-2{right:-.5rem}[data-super-agent-widget] .-top-1\\.5{top:-.375rem}[data-super-agent-widget] .-top-px{top:-1px}[data-super-agent-widget] .bottom-0{bottom:0}[data-super-agent-widget] .left-\\[-3px\\]{left:-3px}[data-super-agent-widget] .top-0{top:0}[data-super-agent-widget] .z-0{z-index:0}[data-super-agent-widget] .z-10{z-index:10}[data-super-agent-widget] .z-20{z-index:20}[data-super-agent-widget] .z-\\[10000\\]{z-index:10000}[data-super-agent-widget] .z-\\[10001\\]{z-index:10001}[data-super-agent-widget] .z-\\[1\\]{z-index:1}[data-super-agent-widget] .z-\\[2\\]{z-index:2}[data-super-agent-widget] .z-\\[30\\]{z-index:30}[data-super-agent-widget] .z-\\[5\\]{z-index:5}[data-super-agent-widget] .z-\\[var\\(--sa-z-index\\,9999\\)\\]{z-index:var(--sa-z-index,9999)}[data-super-agent-widget] .m-0{margin:0}[data-super-agent-widget] .mx-auto{margin-left:auto;margin-right:auto}[data-super-agent-widget] .mb-0\\.5{margin-bottom:.125rem}[data-super-agent-widget] .mb-1{margin-bottom:.25rem}[data-super-agent-widget] .mb-1\\.5{margin-bottom:.375rem}[data-super-agent-widget] .mb-3{margin-bottom:.75rem}[data-super-agent-widget] .mb-4{margin-bottom:1rem}[data-super-agent-widget] .ml-auto{margin-left:auto}[data-super-agent-widget] .mr-auto{margin-right:auto}[data-super-agent-widget] .mt-3{margin-top:.75rem}[data-super-agent-widget] .block{display:block}[data-super-agent-widget] .inline{display:inline}[data-super-agent-widget] .flex{display:flex}[data-super-agent-widget] .inline-flex{display:inline-flex}[data-super-agent-widget] .table{display:table}[data-super-agent-widget] .hidden{display:none}[data-super-agent-widget] .h-5{height:1.25rem}[data-super-agent-widget] .h-7{height:1.75rem}[data-super-agent-widget] .h-8{height:2rem}[data-super-agent-widget] .h-9{height:2.25rem}[data-super-agent-widget] .h-\\[13px\\]{height:13px}[data-super-agent-widget] .h-\\[18px\\]{height:18px}[data-super-agent-widget] .h-\\[238px\\]{height:238px}[data-super-agent-widget] .h-\\[calc\\(100\\%_-_48px\\)\\]{height:calc(100% - 48px)}[data-super-agent-widget] .h-full{height:100%}[data-super-agent-widget] .w-12{width:3rem}[data-super-agent-widget] .w-5{width:1.25rem}[data-super-agent-widget] .w-7{width:1.75rem}[data-super-agent-widget] .w-\\[18px\\]{width:18px}[data-super-agent-widget] .w-\\[220px\\]{width:220px}[data-super-agent-widget] .w-\\[6px\\]{width:6px}[data-super-agent-widget] .w-full{width:100%}[data-super-agent-widget] .w-px{width:1px}[data-super-agent-widget] .min-w-0{min-width:0px}[data-super-agent-widget] .min-w-\\[14px\\]{min-width:14px}[data-super-agent-widget] .max-w-16{max-width:4rem}[data-super-agent-widget] .max-w-\\[50\\%\\]{max-width:50%}[data-super-agent-widget] .max-w-\\[800px\\]{max-width:800px}[data-super-agent-widget] .max-w-full{max-width:100%}[data-super-agent-widget] .flex-1{flex:1 1 0%}[data-super-agent-widget] .flex-shrink{flex-shrink:1}[data-super-agent-widget] .shrink-0{flex-shrink:0}[data-super-agent-widget] .border-collapse{border-collapse:collapse}[data-super-agent-widget] .scale-50{--tw-scale-x: .5;--tw-scale-y: .5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .cursor-col-resize{cursor:col-resize}[data-super-agent-widget] .cursor-default{cursor:default}[data-super-agent-widget] .cursor-grab{cursor:grab}[data-super-agent-widget] .cursor-pointer{cursor:pointer}[data-super-agent-widget] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-super-agent-widget] .resize{resize:both}[data-super-agent-widget] .flex-row{flex-direction:row}[data-super-agent-widget] .flex-col{flex-direction:column}[data-super-agent-widget] .flex-wrap{flex-wrap:wrap}[data-super-agent-widget] .items-start{align-items:flex-start}[data-super-agent-widget] .items-center{align-items:center}[data-super-agent-widget] .justify-end{justify-content:flex-end}[data-super-agent-widget] .justify-center{justify-content:center}[data-super-agent-widget] .gap-0\\.5{gap:.125rem}[data-super-agent-widget] .gap-1{gap:.25rem}[data-super-agent-widget] .gap-1\\.5{gap:.375rem}[data-super-agent-widget] .gap-2{gap:.5rem}[data-super-agent-widget] .gap-2\\.5{gap:.625rem}[data-super-agent-widget] .gap-3{gap:.75rem}[data-super-agent-widget] .gap-4{gap:1rem}[data-super-agent-widget] .gap-8{gap:2rem}[data-super-agent-widget] .gap-\\[22px\\]{gap:22px}[data-super-agent-widget] .gap-\\[7px\\]{gap:7px}[data-super-agent-widget] .overflow-hidden{overflow:hidden}[data-super-agent-widget] .overflow-visible{overflow:visible}[data-super-agent-widget] .overflow-y-auto{overflow-y:auto}[data-super-agent-widget] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-super-agent-widget] .text-ellipsis{text-overflow:ellipsis}[data-super-agent-widget] .whitespace-nowrap{white-space:nowrap}[data-super-agent-widget] .rounded{border-radius:.25rem}[data-super-agent-widget] .rounded-full{border-radius:9999px}[data-super-agent-widget] .rounded-md{border-radius:.375rem}[data-super-agent-widget] .border{border-width:1px}[data-super-agent-widget] .border-r{border-right-width:1px}[data-super-agent-widget] .border-r-0{border-right-width:0px}[data-super-agent-widget] .border-none{border-style:none}[data-super-agent-widget] .border-\\[\\#DADADA\\]{--tw-border-opacity: 1;border-color:rgb(218 218 218 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[\\#E8E8E8\\]{--tw-border-opacity: 1;border-color:rgb(232 232 232 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[\\#ECECEC\\]{--tw-border-opacity: 1;border-color:rgb(236 236 236 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[var\\(--sa-primary\\)\\]{border-color:var(--sa-primary)}[data-super-agent-widget] .bg-\\[\\#DCDCDC\\]{--tw-bg-opacity: 1;background-color:rgb(220 220 220 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#E8F1FE\\]{--tw-bg-opacity: 1;background-color:rgb(232 241 254 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#F5F5F5\\]{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#FAFAFA\\]{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#fee2e2\\]{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[var\\(--sa-primary\\)\\]{background-color:var(--sa-primary)}[data-super-agent-widget] .bg-black\\/30{background-color:#0000004d}[data-super-agent-widget] .bg-transparent{background-color:transparent}[data-super-agent-widget] .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .object-contain{-o-object-fit:contain;object-fit:contain}[data-super-agent-widget] .p-0{padding:0}[data-super-agent-widget] .p-3{padding:.75rem}[data-super-agent-widget] .px-0\\.5{padding-left:.125rem;padding-right:.125rem}[data-super-agent-widget] .px-1{padding-left:.25rem;padding-right:.25rem}[data-super-agent-widget] .px-1\\.5{padding-left:.375rem;padding-right:.375rem}[data-super-agent-widget] .px-2\\.5{padding-left:.625rem;padding-right:.625rem}[data-super-agent-widget] .px-3{padding-left:.75rem;padding-right:.75rem}[data-super-agent-widget] .px-\\[15px\\]{padding-left:15px;padding-right:15px}[data-super-agent-widget] .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}[data-super-agent-widget] .py-1{padding-top:.25rem;padding-bottom:.25rem}[data-super-agent-widget] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-super-agent-widget] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-super-agent-widget] .py-3{padding-top:.75rem;padding-bottom:.75rem}[data-super-agent-widget] .pb-1{padding-bottom:.25rem}[data-super-agent-widget] .pb-2\\.5{padding-bottom:.625rem}[data-super-agent-widget] .pt-2{padding-top:.5rem}[data-super-agent-widget] .text-left{text-align:left}[data-super-agent-widget] .text-center{text-align:center}[data-super-agent-widget] .text-\\[11px\\]{font-size:11px}[data-super-agent-widget] .text-\\[12px\\]{font-size:12px}[data-super-agent-widget] .text-\\[13px\\]{font-size:13px}[data-super-agent-widget] .text-\\[14px\\]{font-size:14px}[data-super-agent-widget] .text-\\[15px\\]{font-size:15px}[data-super-agent-widget] .text-\\[18px\\]{font-size:18px}[data-super-agent-widget] .text-\\[9px\\]{font-size:9px}[data-super-agent-widget] .font-bold{font-weight:700}[data-super-agent-widget] .font-medium{font-weight:500}[data-super-agent-widget] .font-semibold{font-weight:600}[data-super-agent-widget] .italic{font-style:italic}[data-super-agent-widget] .leading-\\[1\\.3\\]{line-height:1.3}[data-super-agent-widget] .leading-\\[1\\.4\\]{line-height:1.4}[data-super-agent-widget] .leading-\\[14px\\]{line-height:14px}[data-super-agent-widget] .leading-none{line-height:1}[data-super-agent-widget] .text-\\[\\#18181b\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#666\\]{--tw-text-opacity: 1;color:rgb(102 102 102 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#999\\]{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#9A9A9A\\]{--tw-text-opacity: 1;color:rgb(154 154 154 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#A0A0A0\\]{--tw-text-opacity: 1;color:rgb(160 160 160 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#B8B8B8\\]{--tw-text-opacity: 1;color:rgb(184 184 184 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#C0C0C0\\]{--tw-text-opacity: 1;color:rgb(192 192 192 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#ef4444\\]{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .underline{text-decoration-line:underline}[data-super-agent-widget] .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[data-super-agent-widget] .opacity-0{opacity:0}[data-super-agent-widget] .opacity-10{opacity:.1}[data-super-agent-widget] .opacity-100{opacity:1}[data-super-agent-widget] .opacity-60{opacity:.6}[data-super-agent-widget] .opacity-70{opacity:.7}[data-super-agent-widget] .shadow-\\[0_-12px_48px_rgba\\(0\\,0\\,0\\,0\\.25\\)\\]{--tw-shadow: 0 -12px 48px rgba(0,0,0,.25);--tw-shadow-colored: 0 -12px 48px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .shadow-\\[0_12px_36px_rgba\\(0\\,0\\,0\\,0\\.18\\)\\]{--tw-shadow: 0 12px 36px rgba(0,0,0,.18);--tw-shadow-colored: 0 12px 36px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.12\\)\\]{--tw-shadow: 0 2px 8px rgba(0,0,0,.12);--tw-shadow-colored: 0 2px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-super-agent-widget] .outline{outline-style:solid}[data-super-agent-widget] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-super-agent-widget] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-super-agent-widget] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .duration-200{transition-duration:.2s}[data-super-agent-widget] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-super-agent-widget] .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes sa-window-in{0%{opacity:0;transform:translateY(20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes sa-slide-up-full{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes sa-home-fade-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes sa-chip-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes sa-logo-float{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}@keyframes sa-title-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}@keyframes sa-history-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}[data-super-agent-widget] .animate-sa-window-in{animation:sa-window-in .3s cubic-bezier(.16,1,.3,1)}[data-super-agent-widget] .animate-sa-slide-up-full{animation:sa-slide-up-full .3s cubic-bezier(.16,1,.3,1)}[data-super-agent-widget] .animate-sa-fade-in{animation:sa-fade-in .2s ease}[data-super-agent-widget] .animate-sa-home-fade-in{animation:sa-home-fade-in .4s ease forwards}[data-super-agent-widget] .animate-sa-chip-in{animation:sa-chip-in .4s cubic-bezier(.22,1,.36,1) forwards}[data-super-agent-widget] .animate-sa-logo-float{animation:sa-logo-float 3s ease-in-out infinite}[data-super-agent-widget] .animate-sa-title-shimmer{animation:sa-title-shimmer 2.5s ease forwards}[data-super-agent-widget] .animate-sa-history-in{animation:sa-history-in .2s ease}[data-super-agent-widget] .sa-tip{position:relative}[data-super-agent-widget] .sa-tip:before,[data-super-agent-widget] .sa-tip:after{position:absolute;top:100%;left:50%;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:100}[data-super-agent-widget] .sa-tip:before{content:attr(data-tooltip);transform:translate(-50%);margin-top:6px;padding:4px 8px;background:#fff;color:#333;font-size:12px;line-height:1.4;white-space:nowrap;border-radius:4px;box-shadow:0 2px 8px #0000001f;border:1px solid #e8e8e8}[data-super-agent-widget] .sa-tip:after{content:"";transform:translate(-50%);margin-top:2px;border:4px solid transparent;border-bottom-color:#fff;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.06))}[data-super-agent-widget] .sa-tip:hover:before,[data-super-agent-widget] .sa-tip:hover:after{opacity:1}[data-super-agent-widget] .sa-chip{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(#e0e0e0,#e0e0e0) border-box;border:1px solid transparent}[data-super-agent-widget] .sa-chip:hover{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7) border-box}[data-super-agent-widget] .sa-chip:hover .sa-chip-text{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-shimmer-text{background:linear-gradient(90deg,#333,#333 35%,#00d4ff 40%,#1881f0,#2b52ee,#d116ea,#ff2e7e 56%,#333 61%,#333);background-size:300% 100%;background-position:100% 0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-new-chat{background:linear-gradient(258deg,#ff2e7e1a -4%,#d116ea1a 16%,#2b52ee1a 53%,#1881f01a 81%,#00d4ff1a 106%)}[data-super-agent-widget] .sa-new-chat:hover{background:linear-gradient(258deg,#ff2e7e29 -4%,#d116ea29 16%,#2b52ee29 53%,#1881f029 81%,#00d4ff29 106%)}[data-super-agent-widget] .sa-new-chat .sa-new-chat-text{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-home-gradient{background:linear-gradient(239deg,#ff2e7e -3%,#d116ea 17%,#2b52ee 54%,#1881f0 82%,#00d4ff 107%)}[data-super-agent-widget] .sa-home-gradient-fade{background:linear-gradient(180deg,#fff0,#fff)}[data-super-agent-widget] .sa-home-view .sa-thread{background:transparent}[data-super-agent-widget] .sa-resize-handle:hover{background:color-mix(in srgb,var(--sa-primary) 30%,transparent)}[data-super-agent-widget] .sa-sender.sa-input-form{display:flex;flex-direction:column;gap:4px;width:100%;min-height:70px;padding:8px;border:1px solid transparent;border-radius:5px;box-shadow:none;background-color:#fff;background-image:linear-gradient(#fff,#fff),linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);background-origin:border-box;background-clip:padding-box,border-box;transition:background .15s ease}[data-super-agent-widget] .sa-sender.sa-input-form-active,[data-super-agent-widget] .sa-sender.sa-input-form:focus-within{background-image:linear-gradient(#fff,#fff),linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7)}[data-super-agent-widget] .sa-sender.sa-input-form-streaming,[data-super-agent-widget] .sa-sender.sa-input-form-streaming:focus-within{background-image:linear-gradient(#f5f5f7,#f5f5f7),linear-gradient(#e5e7eb,#e5e7eb);cursor:not-allowed}[data-super-agent-widget] .sa-sender-content{display:flex;flex-direction:column;gap:4px;width:100%;padding:0;background:transparent}[data-super-agent-widget] .sa-sender-actions-list{position:static;display:block;width:100%;padding:0;margin:0}[data-super-agent-widget] .sa-sender-input{width:100%;min-height:34px!important;max-height:90px!important;overflow-y:auto!important;padding:0;border:none;border-radius:0;background:transparent;box-shadow:none;resize:none;font-size:14px;line-height:1.5;color:#333;outline:none}[data-super-agent-widget] .sa-sender-input::-moz-placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input::placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input:disabled,[data-super-agent-widget] .sa-sender-input:disabled:hover{background:transparent;border:none;box-shadow:none;color:#333;cursor:not-allowed}[data-super-agent-widget] .sa-sender-input:disabled::-moz-placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input:disabled::placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-send-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;border-radius:9999px;background:linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);cursor:pointer;flex-shrink:0;transition:background .15s ease,opacity .15s ease}[data-super-agent-widget] .sa-send-btn-active,[data-super-agent-widget] .sa-sender.sa-input-form:focus-within .sa-send-btn{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7)}[data-super-agent-widget] .sa-send-btn:hover{opacity:.9}[data-super-agent-widget] .sa-send-btn:active{opacity:.7}[data-super-agent-widget] .sa-send-btn img{display:block;width:14px;height:14px;filter:brightness(0) invert(1)}[data-super-agent-widget] .sa-stop-icon{display:block;width:8px;height:8px;border-radius:2px;background:#fff}[data-super-agent-widget] .sa-send-hint{display:flex;align-items:center;gap:3px;flex-shrink:0;font-size:11px;line-height:1;color:#9ca3af;-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-super-agent-widget] .sa-send-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;border:1px solid #e5e7eb;border-radius:4px;background:#f5f5f7;font-family:inherit;font-size:11px;line-height:1;color:#6b7280}[data-super-agent-widget] .sa-attach-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;border-radius:9999px;background:linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);color:#fff;cursor:pointer;flex-shrink:0;transition:background .15s ease,opacity .15s ease}[data-super-agent-widget] .sa-attach-btn:hover{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);opacity:.9}[data-super-agent-widget] .sa-attach-btn:active{opacity:.7}[data-super-agent-widget] .sa-attachment-tray{display:flex;flex-wrap:wrap;gap:6px;padding:2px 0}[data-super-agent-widget] .sa-attachment-tray-chip{display:inline-flex;align-items:center;gap:4px;max-width:220px;padding:4px 8px;border:1px solid rgba(40,92,255,.25);border-radius:6px;background:#285cff0d;font-size:12px;line-height:1;color:#333}[data-super-agent-widget] .sa-attachment-tray-chip-error{border-color:#ef444459;background:#ef44440f}[data-super-agent-widget] .sa-attachment-tray-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}[data-super-agent-widget] .sa-attachment-tray-chip-size{color:#b8b8b8;flex-shrink:0}[data-super-agent-widget] .sa-attachment-tray-chip-remove{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border:none;border-radius:9999px;background:transparent;color:#b8b8b8;font-size:10px;line-height:1;cursor:pointer;flex-shrink:0;padding:0}[data-super-agent-widget] .sa-attachment-tray-chip-remove:hover{background:#00000014;color:#666}[data-super-agent-widget] .sa-sender-skill-tag{position:relative;top:1px;height:21px;padding:0 7px 0 5px;border-radius:5px;background:#f2f3f5;font-size:12px;line-height:1;color:#333;gap:0;-moz-user-select:none;user-select:none;-webkit-user-select:none;max-width:180px}[data-super-agent-widget] .sa-sender-skill-tag:hover,[data-super-agent-widget] .sa-sender-skill-tag:focus-within{background:#f2f3f5;color:#333}[data-super-agent-widget] .sa-sender-skill-tag-text{display:inline-flex;align-items:center;gap:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-super-agent-widget] .sa-skill-inline-icon,[data-super-agent-widget] .sa-sender-skill-close{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin:0;padding:0;color:#8a8f99}[data-super-agent-widget] .sa-sender-skill-close{position:absolute;left:5px;top:50%;transform:translateY(-50%)}[data-super-agent-widget] .sa-sender-skill-close:hover{color:#333}[data-super-agent-widget] .sa-sender-skill-close-icon{font-size:12px}[data-super-agent-widget] .sa-skill-inline-icon{visibility:hidden}@media (hover: hover){[data-super-agent-widget] .sa-skill-inline-icon{visibility:visible}[data-super-agent-widget] .sa-sender-skill-close{display:none}[data-super-agent-widget] .sa-sender-skill-tag:hover .sa-skill-inline-icon,[data-super-agent-widget] .sa-sender-skill-tag:focus-within .sa-skill-inline-icon{visibility:hidden}[data-super-agent-widget] .sa-sender-skill-tag:hover .sa-sender-skill-close,[data-super-agent-widget] .sa-sender-skill-tag:focus-within .sa-sender-skill-close{display:inline-flex}}[data-super-agent-widget] .sa-sender-skill-empty:after,[data-super-agent-widget] .sa-sender-input-slot:empty:before{color:#b8b8b8}[data-super-agent-widget] .sa-sender-content>div:not([class]):empty{display:none}[data-super-agent-widget] .sa-sender.sa-sender-main .sa-sender-input-slot{line-height:21px;caret-color:#285cff}[data-super-agent-widget] .sa-attachment-chip{display:inline-flex;align-items:center;gap:4px;max-width:240px;margin:2px 0;padding:5px 10px;border-radius:8px;background:#ffffff59;font-size:12px;line-height:1;color:inherit}[data-super-agent-widget] .sa-attachment-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}[data-super-agent-widget] .sa-attachment-chip-size{color:#00000073;flex-shrink:0}[data-super-agent-widget] .hover\\:scale-\\[1\\.08\\]:hover{--tw-scale-x: 1.08;--tw-scale-y: 1.08;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .hover\\:bg-\\[\\#E8F1FE\\]:hover{--tw-bg-opacity: 1;background-color:rgb(232 241 254 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-\\[\\#F5F5F5\\]:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-white\\/70:hover{background-color:#ffffffb3}[data-super-agent-widget] .hover\\:text-\\[\\#1881F0\\]:hover{--tw-text-opacity: 1;color:rgb(24 129 240 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .hover\\:text-\\[\\#ef4444\\]:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .hover\\:text-\\[var\\(--sa-primary\\)\\]:hover{color:var(--sa-primary)}[data-super-agent-widget] .active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .active\\:cursor-grabbing:active{cursor:grabbing}[data-super-agent-widget] .active\\:bg-\\[\\#F5F5F5\\]:active{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] :is(.group:hover .group-hover\\:flex){display:flex}',_0={primaryColor:"#6366f1",backgroundColor:"#ffffff",fontFamily:"system-ui, -apple-system, sans-serif",borderRadius:16,panelWidth:400,panelHeight:648,zIndex:9999};function H5(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16),i=1-t;return`#${Math.round(n*i).toString(16).padStart(2,"0")}${Math.round(r*i).toString(16).padStart(2,"0")}${Math.round(o*i).toString(16).padStart(2,"0")}`}function V5(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return`#${Math.round(n+(255-n)*t).toString(16).padStart(2,"0")}${Math.round(r+(255-r)*t).toString(16).padStart(2,"0")}${Math.round(o+(255-o)*t).toString(16).padStart(2,"0")}`}function j0(e){const t={..._0,...e},n=t.primaryColor,r=t.backgroundColor;return[`--sa-primary: ${n}`,`--sa-bg: ${r}`,`--sa-font: ${t.fontFamily}`,`--sa-radius: ${t.borderRadius}px`,`--sa-panel-width: ${t.panelWidth}px`,`--sa-panel-height: ${t.panelHeight}px`,`--sa-z-index: ${t.zIndex}`,`--sa-primary-dark: ${H5(n,.15)}`,`--sa-primary-light: ${V5(n,.9)}`,`--sa-surface: ${r}`,"--sa-border: #e5e7eb","--sa-hover: #f4f4f5","--sa-text: #374151","--sa-text-muted: #9ca3af","--sa-text-light: #6b7280"].join("; ")}function W5(e){return typeof e=="string"?e:e.id?`#${e.id}`:""}function q5(e,t){const n=typeof e=="string"?document.querySelector(e):e;if(!n)throw new Error(`Target element not found: ${e}`);const r=document.createElement("div");r.setAttribute("data-super-agent-widget","");const o=j0(t.theme??{});if(r.setAttribute("style",`${o}; height: 100%;`),n.appendChild(r),!document.getElementById("sa-widget-styles")){const c=document.createElement("style");c.id="sa-widget-styles",c.textContent=`${F0}
1669
- ${B5}`,document.head.appendChild(c)}let i=hm.createRoot(r);const a=W5(e);let s=Oi(a);const l=c=>{i&&i.render(b.createElement(L0,{...t,initialOpen:c??s,onOpenChange:u=>{s=u,Oi(a,u)}}))};return l(s),{open(){s=!0,Oi(a,!0),l(!0)},close(){s=!1,Oi(a,!1),l(!1)},destroy(){i&&(i.unmount(),i=null),r.remove()}}}exports.ASSETS=Gt;exports.ActionBar=Hg;exports.ChatProvider=fl;exports.ChatWidget=L0;exports.Composer=bd;exports.ErrorPart=_g;exports.FullpageLayout=D0;exports.Header=$m;exports.Icon=Ze;exports.InterruptCard=Bg;exports.Message=Vg;exports.PageOverlay=z0;exports.TextPart=zg;exports.ThinkingPart=Dg;exports.Thread=Cu;exports.ThreadList=pl;exports.ToolCallPart=Lg;exports.ToolResultPart=Fg;exports.Trigger=Em;exports.WelcomeScreen=Wg;exports.defaultTheme=_0;exports.ensureIconFont=Og;exports.mount=q5;exports.themeToCSSVars=j0;exports.useAutoScroll=Im;exports.useChat=bm;exports.useChatContext=Fn;exports.useConversations=ym;exports.widgetStyles=F0;
1653
+ `,H5='[data-super-agent-widget] .pointer-events-none{pointer-events:none}[data-super-agent-widget] .visible{visibility:visible}[data-super-agent-widget] .collapse{visibility:collapse}[data-super-agent-widget] .fixed{position:fixed}[data-super-agent-widget] .absolute{position:absolute}[data-super-agent-widget] .relative{position:relative}[data-super-agent-widget] .inset-0{top:0;right:0;bottom:0;left:0}[data-super-agent-widget] .inset-x-0{left:0;right:0}[data-super-agent-widget] .-bottom-px{bottom:-1px}[data-super-agent-widget] .-left-px{left:-1px}[data-super-agent-widget] .-right-2{right:-.5rem}[data-super-agent-widget] .-top-1\\.5{top:-.375rem}[data-super-agent-widget] .-top-px{top:-1px}[data-super-agent-widget] .bottom-0{bottom:0}[data-super-agent-widget] .left-\\[-3px\\]{left:-3px}[data-super-agent-widget] .top-0{top:0}[data-super-agent-widget] .z-0{z-index:0}[data-super-agent-widget] .z-10{z-index:10}[data-super-agent-widget] .z-20{z-index:20}[data-super-agent-widget] .z-\\[10000\\]{z-index:10000}[data-super-agent-widget] .z-\\[10001\\]{z-index:10001}[data-super-agent-widget] .z-\\[1\\]{z-index:1}[data-super-agent-widget] .z-\\[2\\]{z-index:2}[data-super-agent-widget] .z-\\[30\\]{z-index:30}[data-super-agent-widget] .z-\\[5\\]{z-index:5}[data-super-agent-widget] .z-\\[var\\(--sa-z-index\\,9999\\)\\]{z-index:var(--sa-z-index,9999)}[data-super-agent-widget] .m-0{margin:0}[data-super-agent-widget] .mx-auto{margin-left:auto;margin-right:auto}[data-super-agent-widget] .mb-0\\.5{margin-bottom:.125rem}[data-super-agent-widget] .mb-1{margin-bottom:.25rem}[data-super-agent-widget] .mb-1\\.5{margin-bottom:.375rem}[data-super-agent-widget] .mb-3{margin-bottom:.75rem}[data-super-agent-widget] .mb-4{margin-bottom:1rem}[data-super-agent-widget] .ml-auto{margin-left:auto}[data-super-agent-widget] .mr-auto{margin-right:auto}[data-super-agent-widget] .mt-3{margin-top:.75rem}[data-super-agent-widget] .block{display:block}[data-super-agent-widget] .inline{display:inline}[data-super-agent-widget] .flex{display:flex}[data-super-agent-widget] .inline-flex{display:inline-flex}[data-super-agent-widget] .table{display:table}[data-super-agent-widget] .\\!hidden{display:none!important}[data-super-agent-widget] .hidden{display:none}[data-super-agent-widget] .h-5{height:1.25rem}[data-super-agent-widget] .h-7{height:1.75rem}[data-super-agent-widget] .h-8{height:2rem}[data-super-agent-widget] .h-9{height:2.25rem}[data-super-agent-widget] .h-\\[13px\\]{height:13px}[data-super-agent-widget] .h-\\[18px\\]{height:18px}[data-super-agent-widget] .h-\\[238px\\]{height:238px}[data-super-agent-widget] .h-\\[calc\\(100\\%_-_48px\\)\\]{height:calc(100% - 48px)}[data-super-agent-widget] .h-full{height:100%}[data-super-agent-widget] .w-12{width:3rem}[data-super-agent-widget] .w-5{width:1.25rem}[data-super-agent-widget] .w-7{width:1.75rem}[data-super-agent-widget] .w-\\[18px\\]{width:18px}[data-super-agent-widget] .w-\\[220px\\]{width:220px}[data-super-agent-widget] .w-\\[6px\\]{width:6px}[data-super-agent-widget] .w-full{width:100%}[data-super-agent-widget] .w-px{width:1px}[data-super-agent-widget] .min-w-0{min-width:0px}[data-super-agent-widget] .min-w-\\[14px\\]{min-width:14px}[data-super-agent-widget] .max-w-16{max-width:4rem}[data-super-agent-widget] .max-w-\\[50\\%\\]{max-width:50%}[data-super-agent-widget] .max-w-\\[800px\\]{max-width:800px}[data-super-agent-widget] .max-w-full{max-width:100%}[data-super-agent-widget] .flex-1{flex:1 1 0%}[data-super-agent-widget] .flex-shrink{flex-shrink:1}[data-super-agent-widget] .shrink-0{flex-shrink:0}[data-super-agent-widget] .border-collapse{border-collapse:collapse}[data-super-agent-widget] .scale-50{--tw-scale-x: .5;--tw-scale-y: .5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .cursor-col-resize{cursor:col-resize}[data-super-agent-widget] .cursor-default{cursor:default}[data-super-agent-widget] .cursor-grab{cursor:grab}[data-super-agent-widget] .cursor-pointer{cursor:pointer}[data-super-agent-widget] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-super-agent-widget] .resize{resize:both}[data-super-agent-widget] .flex-row{flex-direction:row}[data-super-agent-widget] .flex-col{flex-direction:column}[data-super-agent-widget] .flex-wrap{flex-wrap:wrap}[data-super-agent-widget] .items-start{align-items:flex-start}[data-super-agent-widget] .items-center{align-items:center}[data-super-agent-widget] .justify-end{justify-content:flex-end}[data-super-agent-widget] .justify-center{justify-content:center}[data-super-agent-widget] .gap-0\\.5{gap:.125rem}[data-super-agent-widget] .gap-1{gap:.25rem}[data-super-agent-widget] .gap-1\\.5{gap:.375rem}[data-super-agent-widget] .gap-2{gap:.5rem}[data-super-agent-widget] .gap-2\\.5{gap:.625rem}[data-super-agent-widget] .gap-3{gap:.75rem}[data-super-agent-widget] .gap-4{gap:1rem}[data-super-agent-widget] .gap-8{gap:2rem}[data-super-agent-widget] .gap-\\[22px\\]{gap:22px}[data-super-agent-widget] .gap-\\[7px\\]{gap:7px}[data-super-agent-widget] .overflow-hidden{overflow:hidden}[data-super-agent-widget] .overflow-visible{overflow:visible}[data-super-agent-widget] .overflow-y-auto{overflow-y:auto}[data-super-agent-widget] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-super-agent-widget] .text-ellipsis{text-overflow:ellipsis}[data-super-agent-widget] .whitespace-nowrap{white-space:nowrap}[data-super-agent-widget] .rounded{border-radius:.25rem}[data-super-agent-widget] .rounded-full{border-radius:9999px}[data-super-agent-widget] .rounded-md{border-radius:.375rem}[data-super-agent-widget] .border{border-width:1px}[data-super-agent-widget] .border-r{border-right-width:1px}[data-super-agent-widget] .border-r-0{border-right-width:0px}[data-super-agent-widget] .border-none{border-style:none}[data-super-agent-widget] .border-\\[\\#DADADA\\]{--tw-border-opacity: 1;border-color:rgb(218 218 218 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[\\#E8E8E8\\]{--tw-border-opacity: 1;border-color:rgb(232 232 232 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[\\#ECECEC\\]{--tw-border-opacity: 1;border-color:rgb(236 236 236 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[var\\(--sa-primary\\)\\]{border-color:var(--sa-primary)}[data-super-agent-widget] .bg-\\[\\#DCDCDC\\]{--tw-bg-opacity: 1;background-color:rgb(220 220 220 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#E8F1FE\\]{--tw-bg-opacity: 1;background-color:rgb(232 241 254 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#F5F5F5\\]{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#FAFAFA\\]{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#fee2e2\\]{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[var\\(--sa-primary\\)\\]{background-color:var(--sa-primary)}[data-super-agent-widget] .bg-black\\/30{background-color:#0000004d}[data-super-agent-widget] .bg-transparent{background-color:transparent}[data-super-agent-widget] .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .object-contain{-o-object-fit:contain;object-fit:contain}[data-super-agent-widget] .p-0{padding:0}[data-super-agent-widget] .p-3{padding:.75rem}[data-super-agent-widget] .px-0\\.5{padding-left:.125rem;padding-right:.125rem}[data-super-agent-widget] .px-1{padding-left:.25rem;padding-right:.25rem}[data-super-agent-widget] .px-1\\.5{padding-left:.375rem;padding-right:.375rem}[data-super-agent-widget] .px-2\\.5{padding-left:.625rem;padding-right:.625rem}[data-super-agent-widget] .px-3{padding-left:.75rem;padding-right:.75rem}[data-super-agent-widget] .px-\\[15px\\]{padding-left:15px;padding-right:15px}[data-super-agent-widget] .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}[data-super-agent-widget] .py-1{padding-top:.25rem;padding-bottom:.25rem}[data-super-agent-widget] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-super-agent-widget] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-super-agent-widget] .py-3{padding-top:.75rem;padding-bottom:.75rem}[data-super-agent-widget] .pb-1{padding-bottom:.25rem}[data-super-agent-widget] .pb-2\\.5{padding-bottom:.625rem}[data-super-agent-widget] .pt-2{padding-top:.5rem}[data-super-agent-widget] .text-left{text-align:left}[data-super-agent-widget] .text-center{text-align:center}[data-super-agent-widget] .text-\\[11px\\]{font-size:11px}[data-super-agent-widget] .text-\\[12px\\]{font-size:12px}[data-super-agent-widget] .text-\\[13px\\]{font-size:13px}[data-super-agent-widget] .text-\\[14px\\]{font-size:14px}[data-super-agent-widget] .text-\\[15px\\]{font-size:15px}[data-super-agent-widget] .text-\\[18px\\]{font-size:18px}[data-super-agent-widget] .text-\\[9px\\]{font-size:9px}[data-super-agent-widget] .font-bold{font-weight:700}[data-super-agent-widget] .font-medium{font-weight:500}[data-super-agent-widget] .font-semibold{font-weight:600}[data-super-agent-widget] .italic{font-style:italic}[data-super-agent-widget] .leading-\\[1\\.3\\]{line-height:1.3}[data-super-agent-widget] .leading-\\[1\\.4\\]{line-height:1.4}[data-super-agent-widget] .leading-\\[14px\\]{line-height:14px}[data-super-agent-widget] .leading-none{line-height:1}[data-super-agent-widget] .text-\\[\\#18181b\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#666\\]{--tw-text-opacity: 1;color:rgb(102 102 102 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#999\\]{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#9A9A9A\\]{--tw-text-opacity: 1;color:rgb(154 154 154 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#A0A0A0\\]{--tw-text-opacity: 1;color:rgb(160 160 160 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#B8B8B8\\]{--tw-text-opacity: 1;color:rgb(184 184 184 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#C0C0C0\\]{--tw-text-opacity: 1;color:rgb(192 192 192 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#ef4444\\]{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .underline{text-decoration-line:underline}[data-super-agent-widget] .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[data-super-agent-widget] .opacity-0{opacity:0}[data-super-agent-widget] .opacity-10{opacity:.1}[data-super-agent-widget] .opacity-100{opacity:1}[data-super-agent-widget] .opacity-60{opacity:.6}[data-super-agent-widget] .opacity-70{opacity:.7}[data-super-agent-widget] .shadow-\\[0_-12px_48px_rgba\\(0\\,0\\,0\\,0\\.25\\)\\]{--tw-shadow: 0 -12px 48px rgba(0,0,0,.25);--tw-shadow-colored: 0 -12px 48px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .shadow-\\[0_12px_36px_rgba\\(0\\,0\\,0\\,0\\.18\\)\\]{--tw-shadow: 0 12px 36px rgba(0,0,0,.18);--tw-shadow-colored: 0 12px 36px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.12\\)\\]{--tw-shadow: 0 2px 8px rgba(0,0,0,.12);--tw-shadow-colored: 0 2px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-super-agent-widget] .outline{outline-style:solid}[data-super-agent-widget] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-super-agent-widget] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-super-agent-widget] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .duration-200{transition-duration:.2s}[data-super-agent-widget] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-super-agent-widget] .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes sa-window-in{0%{opacity:0;transform:translateY(20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes sa-slide-up-full{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes sa-home-fade-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes sa-chip-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes sa-logo-float{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}@keyframes sa-title-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}@keyframes sa-history-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}[data-super-agent-widget] .animate-sa-window-in{animation:sa-window-in .3s cubic-bezier(.16,1,.3,1)}[data-super-agent-widget] .animate-sa-slide-up-full{animation:sa-slide-up-full .3s cubic-bezier(.16,1,.3,1)}[data-super-agent-widget] .animate-sa-fade-in{animation:sa-fade-in .2s ease}[data-super-agent-widget] .animate-sa-home-fade-in{animation:sa-home-fade-in .4s ease forwards}[data-super-agent-widget] .animate-sa-chip-in{animation:sa-chip-in .4s cubic-bezier(.22,1,.36,1) forwards}[data-super-agent-widget] .animate-sa-logo-float{animation:sa-logo-float 3s ease-in-out infinite}[data-super-agent-widget] .animate-sa-title-shimmer{animation:sa-title-shimmer 2.5s ease forwards}[data-super-agent-widget] .animate-sa-history-in{animation:sa-history-in .2s ease}[data-super-agent-widget] .sa-tip{position:relative}[data-super-agent-widget] .sa-tip:before,[data-super-agent-widget] .sa-tip:after{position:absolute;top:100%;left:50%;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:100}[data-super-agent-widget] .sa-tip:before{content:attr(data-tooltip);transform:translate(-50%);margin-top:6px;padding:4px 8px;background:#fff;color:#333;font-size:12px;line-height:1.4;white-space:nowrap;border-radius:4px;box-shadow:0 2px 8px #0000001f;border:1px solid #e8e8e8}[data-super-agent-widget] .sa-tip:after{content:"";transform:translate(-50%);margin-top:2px;border:4px solid transparent;border-bottom-color:#fff;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.06))}[data-super-agent-widget] .sa-tip:hover:before,[data-super-agent-widget] .sa-tip:hover:after{opacity:1}[data-super-agent-widget] .sa-chip{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(#e0e0e0,#e0e0e0) border-box;border:1px solid transparent}[data-super-agent-widget] .sa-chip:hover{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7) border-box}[data-super-agent-widget] .sa-chip:hover .sa-chip-text{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-shimmer-text{background:linear-gradient(90deg,#333,#333 35%,#00d4ff 40%,#1881f0,#2b52ee,#d116ea,#ff2e7e 56%,#333 61%,#333);background-size:300% 100%;background-position:100% 0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-new-chat{background:linear-gradient(258deg,#ff2e7e1a -4%,#d116ea1a 16%,#2b52ee1a 53%,#1881f01a 81%,#00d4ff1a 106%)}[data-super-agent-widget] .sa-new-chat:hover{background:linear-gradient(258deg,#ff2e7e29 -4%,#d116ea29 16%,#2b52ee29 53%,#1881f029 81%,#00d4ff29 106%)}[data-super-agent-widget] .sa-new-chat .sa-new-chat-text{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-home-gradient{background:linear-gradient(239deg,#ff2e7e -3%,#d116ea 17%,#2b52ee 54%,#1881f0 82%,#00d4ff 107%)}[data-super-agent-widget] .sa-home-gradient-fade{background:linear-gradient(180deg,#fff0,#fff)}[data-super-agent-widget] .sa-home-view .sa-thread{background:transparent}[data-super-agent-widget] .sa-resize-handle:hover{background:color-mix(in srgb,var(--sa-primary) 30%,transparent)}[data-super-agent-widget] .sa-sender.sa-input-form{display:flex;flex-direction:column;gap:4px;width:100%;min-height:70px;padding:8px;border:1px solid transparent;border-radius:5px;box-shadow:none;background-color:#fff;background-image:linear-gradient(#fff,#fff),linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);background-origin:border-box;background-clip:padding-box,border-box;transition:background .15s ease}[data-super-agent-widget] .sa-sender.sa-input-form-active,[data-super-agent-widget] .sa-sender.sa-input-form:focus-within{background-image:linear-gradient(#fff,#fff),linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7)}[data-super-agent-widget] .sa-sender.sa-input-form-streaming,[data-super-agent-widget] .sa-sender.sa-input-form-streaming:focus-within{background-image:linear-gradient(#f5f5f7,#f5f5f7),linear-gradient(#e5e7eb,#e5e7eb);cursor:not-allowed}[data-super-agent-widget] .sa-sender-content{display:flex;flex-direction:column;gap:4px;width:100%;padding:0;background:transparent}[data-super-agent-widget] .sa-sender-actions-list{position:static;display:block;width:100%;padding:0;margin:0}[data-super-agent-widget] .sa-sender-input{width:100%;min-height:34px!important;max-height:90px!important;overflow-y:auto!important;padding:0;border:none;border-radius:0;background:transparent;box-shadow:none;resize:none;font-size:14px;line-height:1.5;color:#333;outline:none}[data-super-agent-widget] .sa-sender-input::-moz-placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input::placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input:disabled,[data-super-agent-widget] .sa-sender-input:disabled:hover{background:transparent;border:none;box-shadow:none;color:#333;cursor:not-allowed}[data-super-agent-widget] .sa-sender-input:disabled::-moz-placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input:disabled::placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-send-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;border-radius:9999px;background:linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);cursor:pointer;flex-shrink:0;transition:background .15s ease,opacity .15s ease}[data-super-agent-widget] .sa-send-btn-active,[data-super-agent-widget] .sa-sender.sa-input-form:focus-within .sa-send-btn{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7)}[data-super-agent-widget] .sa-send-btn:hover{opacity:.9}[data-super-agent-widget] .sa-send-btn:active{opacity:.7}[data-super-agent-widget] .sa-send-btn img{display:block;width:14px;height:14px;filter:brightness(0) invert(1)}[data-super-agent-widget] .sa-stop-icon{display:block;width:8px;height:8px;border-radius:2px;background:#fff}[data-super-agent-widget] .sa-send-hint{display:flex;align-items:center;gap:3px;flex-shrink:0;font-size:11px;line-height:1;color:#9ca3af;-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-super-agent-widget] .sa-send-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;border:1px solid #e5e7eb;border-radius:4px;background:#f5f5f7;font-family:inherit;font-size:11px;line-height:1;color:#6b7280}[data-super-agent-widget] .sa-attach-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;border-radius:9999px;background:linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);color:#fff;cursor:pointer;flex-shrink:0;transition:background .15s ease,opacity .15s ease}[data-super-agent-widget] .sa-attach-btn:hover{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);opacity:.9}[data-super-agent-widget] .sa-attach-btn:active{opacity:.7}[data-super-agent-widget] .sa-attachment-tray{display:flex;flex-wrap:wrap;gap:6px;padding:2px 0}[data-super-agent-widget] .sa-attachment-tray-chip{display:inline-flex;align-items:center;gap:4px;max-width:220px;padding:4px 8px;border:1px solid rgba(40,92,255,.25);border-radius:6px;background:#285cff0d;font-size:12px;line-height:1;color:#333}[data-super-agent-widget] .sa-attachment-tray-chip-error{border-color:#ef444459;background:#ef44440f}[data-super-agent-widget] .sa-attachment-tray-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}[data-super-agent-widget] .sa-attachment-tray-chip-size{color:#b8b8b8;flex-shrink:0}[data-super-agent-widget] .sa-attachment-tray-chip-remove{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border:none;border-radius:9999px;background:transparent;color:#b8b8b8;font-size:10px;line-height:1;cursor:pointer;flex-shrink:0;padding:0}[data-super-agent-widget] .sa-attachment-tray-chip-remove:hover{background:#00000014;color:#666}[data-super-agent-widget] .sa-sender-skill-tag{position:relative;top:1px;height:21px;padding:0 7px 0 5px;border-radius:5px;background:#f2f3f5;font-size:12px;line-height:1;color:#333;gap:0;-moz-user-select:none;user-select:none;-webkit-user-select:none;max-width:180px}[data-super-agent-widget] .sa-sender-skill-tag:hover,[data-super-agent-widget] .sa-sender-skill-tag:focus-within{background:#f2f3f5;color:#333}[data-super-agent-widget] .sa-sender-skill-tag-text{display:inline-flex;align-items:center;gap:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-super-agent-widget] .sa-skill-inline-icon,[data-super-agent-widget] .sa-sender-skill-close{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin:0;padding:0;color:#8a8f99}[data-super-agent-widget] .sa-sender-skill-close{position:absolute;left:5px;top:50%;transform:translateY(-50%)}[data-super-agent-widget] .sa-sender-skill-close:hover{color:#333}[data-super-agent-widget] .sa-sender-skill-close-icon{font-size:12px}[data-super-agent-widget] .sa-skill-inline-icon{visibility:hidden}@media (hover: hover){[data-super-agent-widget] .sa-skill-inline-icon{visibility:visible}[data-super-agent-widget] .sa-sender-skill-close{display:none}[data-super-agent-widget] .sa-sender-skill-tag:hover .sa-skill-inline-icon,[data-super-agent-widget] .sa-sender-skill-tag:focus-within .sa-skill-inline-icon{visibility:hidden}[data-super-agent-widget] .sa-sender-skill-tag:hover .sa-sender-skill-close,[data-super-agent-widget] .sa-sender-skill-tag:focus-within .sa-sender-skill-close{display:inline-flex}}[data-super-agent-widget] .sa-sender-skill-empty:after,[data-super-agent-widget] .sa-sender-input-slot:empty:before{color:#b8b8b8}[data-super-agent-widget] .sa-sender-content>div:not([class]):empty{display:none}[data-super-agent-widget] .sa-sender.sa-sender-main .sa-sender-input-slot{line-height:21px;caret-color:#285cff}[data-super-agent-widget] .sa-attachment-chip{display:inline-flex;align-items:center;gap:4px;max-width:240px;margin:2px 0;padding:5px 10px;border-radius:8px;background:#ffffff59;font-size:12px;line-height:1;color:inherit}[data-super-agent-widget] .sa-attachment-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}[data-super-agent-widget] .sa-attachment-chip-size{color:#00000073;flex-shrink:0}[data-super-agent-widget] .hover\\:scale-\\[1\\.08\\]:hover{--tw-scale-x: 1.08;--tw-scale-y: 1.08;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .hover\\:bg-\\[\\#E8F1FE\\]:hover{--tw-bg-opacity: 1;background-color:rgb(232 241 254 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-\\[\\#F5F5F5\\]:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-white\\/70:hover{background-color:#ffffffb3}[data-super-agent-widget] .hover\\:text-\\[\\#1881F0\\]:hover{--tw-text-opacity: 1;color:rgb(24 129 240 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .hover\\:text-\\[\\#ef4444\\]:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .hover\\:text-\\[var\\(--sa-primary\\)\\]:hover{color:var(--sa-primary)}[data-super-agent-widget] .active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .active\\:cursor-grabbing:active{cursor:grabbing}[data-super-agent-widget] .active\\:bg-\\[\\#F5F5F5\\]:active{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] :is(.group:hover .group-hover\\:flex){display:flex}',_0={primaryColor:"#6366f1",backgroundColor:"#ffffff",fontFamily:"system-ui, -apple-system, sans-serif",borderRadius:16,panelWidth:400,panelHeight:648,zIndex:9999};function V5(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16),i=1-t;return`#${Math.round(n*i).toString(16).padStart(2,"0")}${Math.round(r*i).toString(16).padStart(2,"0")}${Math.round(o*i).toString(16).padStart(2,"0")}`}function W5(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return`#${Math.round(n+(255-n)*t).toString(16).padStart(2,"0")}${Math.round(r+(255-r)*t).toString(16).padStart(2,"0")}${Math.round(o+(255-o)*t).toString(16).padStart(2,"0")}`}function j0(e){const t={..._0,...e},n=t.primaryColor,r=t.backgroundColor;return[`--sa-primary: ${n}`,`--sa-bg: ${r}`,`--sa-font: ${t.fontFamily}`,`--sa-radius: ${t.borderRadius}px`,`--sa-panel-width: ${t.panelWidth}px`,`--sa-panel-height: ${t.panelHeight}px`,`--sa-z-index: ${t.zIndex}`,`--sa-primary-dark: ${V5(n,.15)}`,`--sa-primary-light: ${W5(n,.9)}`,`--sa-surface: ${r}`,"--sa-border: #e5e7eb","--sa-hover: #f4f4f5","--sa-text: #374151","--sa-text-muted: #9ca3af","--sa-text-light: #6b7280"].join("; ")}function q5(e){return typeof e=="string"?e:e.id?`#${e.id}`:""}function X5(e,t){const n=typeof e=="string"?document.querySelector(e):e;if(!n)throw new Error(`Target element not found: ${e}`);const r=document.createElement("div");r.setAttribute("data-super-agent-widget","");const o=j0(t.theme??{});if(r.setAttribute("style",`${o}; height: 100%;`),n.appendChild(r),!document.getElementById("sa-widget-styles")){const c=document.createElement("style");c.id="sa-widget-styles",c.textContent=`${F0}
1654
+ ${H5}`,document.head.appendChild(c)}let i=gm.createRoot(r);const a=q5(e);let s=Oi(a);const l=c=>{i&&i.render(b.createElement(L0,{...t,initialOpen:c??s,onOpenChange:u=>{s=u,Oi(a,u)}}))};return l(s),{open(){s=!0,Oi(a,!0),l(!0)},close(){s=!1,Oi(a,!1),l(!1)},destroy(){i&&(i.unmount(),i=null),r.remove()}}}exports.ASSETS=Gt;exports.ActionBar=Hh;exports.ChatProvider=fl;exports.ChatWidget=L0;exports.Composer=bd;exports.ErrorPart=_h;exports.FullpageLayout=D0;exports.Header=$m;exports.Icon=Ze;exports.InterruptCard=Bh;exports.Message=Vh;exports.PageOverlay=z0;exports.TextPart=zh;exports.ThinkingPart=Dh;exports.Thread=Cu;exports.ThreadList=pl;exports.ToolCallPart=Lh;exports.ToolResultPart=Fh;exports.Trigger=Em;exports.WelcomeScreen=Wh;exports.defaultTheme=_0;exports.ensureIconFont=Oh;exports.mount=X5;exports.themeToCSSVars=j0;exports.useAutoScroll=Im;exports.useChat=bm;exports.useChatContext=Fn;exports.useConversations=ym;exports.widgetStyles=F0;