@michengai/dsh-automation 0.1.66 → 1.0.1

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/lib/client.js CHANGED
@@ -1,265 +1,12 @@
1
1
  window.__ModuleLoader__.load({ id: "@michengai/dsh-automation", factory: (require) => {
2
2
  var module = { exports: {} }; var exports = module.exports;
3
- "use strict";var tA=Object.create;var cu=Object.defineProperty;var oA=Object.getOwnPropertyDescriptor;var nA=Object.getOwnPropertyNames;var rA=Object.getPrototypeOf,iA=Object.prototype.hasOwnProperty;var ih=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sA=(e,t)=>{for(var o in t)cu(e,o,{get:t[o],enumerable:!0})},oC=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of nA(t))!iA.call(e,r)&&r!==o&&cu(e,r,{get:()=>t[r],enumerable:!(n=oA(t,r))||n.enumerable});return e};var M=(e,t,o)=>(o=e!=null?tA(rA(e)):{},oC(t||!e||!e.__esModule?cu(o,"default",{value:e,enumerable:!0}):o,e)),aA=e=>oC(cu({},"__esModule",{value:!0}),e);var ow=ih(Bt=>{"use strict";var Oh=Symbol.for("react.transitional.element"),Ah=Symbol.for("react.portal"),Tu=Symbol.for("react.fragment"),Mu=Symbol.for("react.strict_mode"),ku=Symbol.for("react.profiler"),Ou=Symbol.for("react.consumer"),Au=Symbol.for("react.context"),Lu=Symbol.for("react.forward_ref"),Du=Symbol.for("react.suspense"),_u=Symbol.for("react.suspense_list"),Fu=Symbol.for("react.memo"),zu=Symbol.for("react.lazy"),tw=Symbol.for("react.view_transition"),zA=Symbol.for("react.client.reference");function dr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Oh:switch(e=e.type,e){case Tu:case ku:case Mu:case Du:case _u:case tw:return e;default:switch(e=e&&e.$$typeof,e){case Au:case Lu:case zu:case Fu:return e;case Ou:return e;default:return t}}case Ah:return t}}}Bt.ContextConsumer=Ou;Bt.ContextProvider=Au;Bt.Element=Oh;Bt.ForwardRef=Lu;Bt.Fragment=Tu;Bt.Lazy=zu;Bt.Memo=Fu;Bt.Portal=Ah;Bt.Profiler=ku;Bt.StrictMode=Mu;Bt.Suspense=Du;Bt.SuspenseList=_u;Bt.isContextConsumer=function(e){return dr(e)===Ou};Bt.isContextProvider=function(e){return dr(e)===Au};Bt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Oh};Bt.isForwardRef=function(e){return dr(e)===Lu};Bt.isFragment=function(e){return dr(e)===Tu};Bt.isLazy=function(e){return dr(e)===zu};Bt.isMemo=function(e){return dr(e)===Fu};Bt.isPortal=function(e){return dr(e)===Ah};Bt.isProfiler=function(e){return dr(e)===ku};Bt.isStrictMode=function(e){return dr(e)===Mu};Bt.isSuspense=function(e){return dr(e)===Du};Bt.isSuspenseList=function(e){return dr(e)===_u};Bt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Tu||e===ku||e===Mu||e===Du||e===_u||e===tw||typeof e=="object"&&e!==null&&(e.$$typeof===zu||e.$$typeof===Fu||e.$$typeof===Au||e.$$typeof===Ou||e.$$typeof===Lu||e.$$typeof===zA||e.getModuleId!==void 0)};Bt.typeOf=dr});var rw=ih((NV,nw)=>{"use strict";nw.exports=ow()});var yw=ih((QV,Wu)=>{"use strict";Wu.exports=qh;Wu.exports.isMobile=qh;Wu.exports.default=qh;var o2=/(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,n2=/CrOS/,r2=/android|ipad|playbook|silk/i;function qh(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 o=o2.test(t)&&!n2.test(t)||!!e.tablet&&r2.test(t);return!o&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(o=!0),o}});var ZH={};sA(ZH,{apply:()=>GH,inject:()=>HH,name:()=>BH});module.exports=aA(ZH);var Fa=require("react");var yo=require("react");var Bs=require("react"),lA=M(require("@deepseek-ai/dsh-client-ui-primitives"),1);function du(e,t){return function(n){return e(n)??t(n)}}function No(e,...t){for(let o of t){let n=e[o];if(typeof n=="function")return n}return function(){return null}}var Po=lA;function cA(){return(0,Bs.createElement)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none","aria-hidden":!0},(0,Bs.createElement)("path",{d:"M3 3h4v3H3V3Zm6 1h4M3 10h4v3H3v-3Zm6 1.5h4M7 4.5h2M7 11.5h2",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round"}))}function dA(){return(0,Bs.createElement)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none","aria-hidden":!0},(0,Bs.createElement)("path",{d:"M3 4h10M3 8h10M3 12h10",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round"}))}function uA(){return(0,Bs.createElement)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none","aria-hidden":!0},(0,Bs.createElement)("path",{d:"M3 6.5h10v6H3v-6Zm1.2-2.5h7.6L13 6.5H3L4.2 4Zm2.3 5.2 1.3 1.3 2.6-2.6",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round"}))}var sh=No(Po,"IconEllipsisOutlineRegular","IconEllipsisOutline16"),nC=No(Po,"IconSettingsOutlineRegular","IconSettingsOutline16"),za=No(Po,"IconArchiveOutlineRegular","IconArchiveOutline20"),rC=No(Po,"IconBranchOutlineRegular","IconBranchOutline16"),iC=No(Po,"IconEditOutlineRegular","IconEditOutline16"),sC=No(Po,"IconTrashOutlineRegular","IconTrashOutline16"),t3=No(Po,"IconCheckOutlineRegular","IconCheckOutline16"),o3=No(Po,"IconChevronDownOutlineRegular","IconChevronDownOutline14"),aC=No(Po,"IconListPenOutlineRegular","IconListPenOutline16"),lC=No(Po,"IconSearchOutlineRegular","IconSearchOutline16"),cC=No(Po,"IconCloseFillRegular","IconCloseOutline16"),dC=No(Po,"IconSlidersTwoOutlineRegular","IconSlidersOutline16"),uC=No(Po,"IconFolderCloseRegular","IconFolderOutline16"),mC=du(No(Po,"IconWorkspaceTreeOutlineRegular"),cA),pC=du(No(Po,"IconFlatListOutlineRegular"),dA),n3=No(Po,"IconChevronsUpDownOutlineRegular"),fC=No(Po,"IconClockOutlineRegular","IconClockOutline16"),gC=du(No(Po,"IconArchiveCheckOutlineRegular"),uA);function hC(){return typeof Po.IconEllipsisOutlineRegular=="function"}function yC(e,t){return t(`run.trigger.${e}`)}var nn=class extends Error{constructor(o){super(o);this.key=o}},mA=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function pu(e){return`/${mA.test(e.name)?e.name:e.id}`}function pA(e,t,o){let n=t.startsWith("/")?t:`/${t}`,r=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`(^|\\s)${r}(?=\\s|$)`).test(e))return{text:e,caret:Math.min(Math.max(o,0),e.length)};let i=Math.min(Math.max(o,0),e.length),s=e.slice(0,i),a=e.slice(i),l=`${s.length>0&&!/\s$/.test(s)?" ":""}${n} `;return{text:s+l+a,caret:s.length+l.length}}function ah(e,t){let o=Math.min(Math.max(t,0),e.length),n=/(?:^|\s)\/([^\s/]*)$/.exec(e.slice(0,o));if(n===null)return;let r=n[1]??"";return{start:o-r.length-1,query:r}}function bC(e,t){let o=t.trim().toLowerCase();return o===""?[...e]:e.filter(n=>n.id.toLowerCase().includes(o)||n.name.toLowerCase().includes(o))}function xC(e,t,o){let n=ah(e,t),r=o.startsWith("/")?o:`/${o}`;return n===void 0?pA(e,r,t):{text:`${e.slice(0,n.start)}${r} ${e.slice(t)}`,caret:n.start+r.length+1}}function vC(e,t){let o=new Set(t.map(s=>pu(s).slice(1))),n=[],r=/(^|\s)(\/[a-z0-9]+(?:-[a-z0-9]+)*)(?=\s|$)/gi,i=0;for(let s of e.matchAll(r)){let a=s[1]??"",c=s[2]??"",l=(s.index??0)+a.length;o.has(c.slice(1))&&(l>i&&n.push({kind:"text",text:e.slice(i,l)}),n.push({kind:"skill",text:c}),i=l+c.length)}return(i<e.length||n.length===0)&&n.push({kind:"text",text:e.slice(i)}),n}function SC(e=new Date){let t=new Date(e.getTime()+36e5);t.setMinutes(0,0,0);let o=t.getTimezoneOffset()*6e4;return new Date(t.getTime()-o).toISOString().slice(0,16)}function lh(e=new Date,t=[],o,n=""){return{name:"",prompt:"",scheduleKind:"daily",onceAt:SC(e),everyMinutes:"60",maxConcurrentRuns:"1",intervalAnchor:"",time:"09:00",weekdays:[1,2,3,4,5],hourlyMinute:"00",monthDay:"1",customDays:"2",timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone||"Asia/Shanghai",permission:n,workspaceId:t[0]?.id??"",modelKey:o==null?"default":`${o.provider}::${o.model}`,reasoningEffort:o?.reasoning?.defaultEffort??"none",skills:[]}}function CC(e,t,o,n=new Date,r={}){let i=Number(e.maxConcurrentRuns);if(!Number.isSafeInteger(i)||i<1)throw new nn("form.error.maxConcurrentRuns");let s=e.name.trim(),a=e.prompt.trim();if(s==="")throw new nn("form.error.name");if(a==="")throw new nn("form.error.prompt");let c=t.find(u=>u.id===e.workspaceId);if(c===void 0)throw new nn("form.error.workspace");let l;switch(e.scheduleKind){case"once":{let u=new Date(e.onceAt);if(!Number.isFinite(u.getTime())||r.allowPastOnce!==!0&&u.getTime()<=n.getTime())throw new nn("form.error.once");l={kind:"once",at:u.toISOString(),timeZone:e.timeZone};break}case"interval":{let u=Number(e.everyMinutes);if(!Number.isInteger(u)||u<1||u>43200)throw new nn("form.error.interval");l={kind:"interval",everyMinutes:u,anchor:e.intervalAnchor.trim()||n.toISOString(),timeZone:e.timeZone};break}case"daily":l={kind:"daily",time:e.time,timeZone:e.timeZone};break;case"weekly":if(e.weekdays.length===0)throw new nn("form.error.weekdays");l={kind:"weekly",time:e.time,weekdays:[...e.weekdays].sort((u,m)=>u-m),timeZone:e.timeZone};break;case"hourly":{let u=Number(e.hourlyMinute);if(!Number.isInteger(u)||u<0||u>59)throw new nn("form.error.interval");l={kind:"hourly",minute:u,timeZone:e.timeZone};break}case"monthly":{let u=Number(e.monthDay);if(!Number.isInteger(u)||u<1||u>31)throw new nn("form.error.interval");l={kind:"monthly",day:u,time:e.time,timeZone:e.timeZone};break}case"custom":{let u=Number(e.customDays);if(!Number.isInteger(u)||u<1)throw new nn("form.error.interval");l={kind:"custom",everyDays:u,time:e.time,timeZone:e.timeZone};break}}let d=o.find(u=>`${u.provider}::${u.model}`===e.modelKey);return{name:s,prompt:a,schedule:l,timeZone:e.timeZone,permission:e.permission,maxConcurrentRuns:i,workspaceId:c.id,cwd:c.path,...d===void 0?{provider:null,model:null}:{provider:d.provider,model:d.model},reasoningEffort:e.reasoningEffort==="none"?null:e.reasoningEffort}}function wC(e,t,o){let n=Date.parse(e);if(!Number.isFinite(n))return e;let r=Math.round((n-t.getTime())/6e4),i=Math.abs(r);if(i<1)return o("time.now");let s=r>0;if(i<60)return o(s?"time.inMinute":"time.minuteAgo",{count:i});let a=Math.round(i/60);if(a<24)return o(s?"time.inHour":"time.hourAgo",{count:a});let c=Math.round(a/24);return o(s?"time.inDay":"time.dayAgo",{count:c})}function fu(e,t){switch(e.kind){case"once":return t("schedule.onceAt",{time:new Date(e.at).toLocaleString()});case"interval":return t("schedule.everyMinutes",{count:e.everyMinutes});case"daily":return t("schedule.dailyAt",{time:e.time});case"weekly":{let o=e.weekdays.map(n=>t(`day.${n}`)).join("\u3001");return t("schedule.weeklyAt",{days:o,time:e.time})}case"hourly":return t("schedule.hourlyAt",{minute:String(e.minute).padStart(2,"0")});case"monthly":return t("schedule.monthlyAt",{day:e.day,time:e.time});case"custom":return t("schedule.customAt",{count:e.everyDays,time:e.time})}}function gu(e,t,o){let n=Date.parse(e)-t.getTime();if(!Number.isFinite(n)||n<=0)return o("time.now");let r=Math.max(1,Math.ceil(n/6e4));if(r<60)return o("time.withinMinute",{count:r});let i=Math.ceil(r/60);return i<24?o("time.withinHour",{count:i}):o("time.withinDay",{count:Math.ceil(i/24)})}function RC(e,t){if(e===void 0||t===void 0)return;let o=(Date.parse(t)-Date.parse(e))/1e3;if(!(!Number.isFinite(o)||o<0))return`${o.toFixed(1)}s`}function EC(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}var $C=["succeeded","failed","interrupted","running","queued","skipped","cancelled"];function uu(e){let t=Date.parse(e);return Number.isFinite(t)?t:0}function hu(e,t,o){let n=o==="asc"?1:-1;return e.slice().sort((r,i)=>{if(t==="planned"){let a=r.nextRunAt,c=i.nextRunAt;if(a===void 0||c===void 0)return a===void 0&&c===void 0?r.name.localeCompare(i.name)||r.id.localeCompare(i.id):a===void 0?1:-1;let l=uu(a)-uu(c);return l!==0?l*n:r.name.localeCompare(i.name)||r.id.localeCompare(i.id)}let s=uu(r.createdAt)-uu(i.createdAt);return s!==0?s*n:r.id.localeCompare(i.id)})}var yu="dsh-automation.sort-default.settings",bu="dsh-automation.sort-default.overview";function Ki(e,t){if(e!==void 0)try{let o=e.getItem(t);if(o===null)return;let n=JSON.parse(o);return n.key!=="created"&&n.key!=="planned"||n.direction!=="asc"&&n.direction!=="desc"?void 0:{key:n.key,direction:n.direction}}catch{return}}function IC(e,t,o,n){e.setItem(t,JSON.stringify({key:o,direction:n}))}function NC(e,t,o,n){let r=new Map;for(let i of e){let s=new Date(i.finishedAt??i.startedAt??i.scheduledFor);if(Number.isNaN(s.getTime()))continue;let a;if(t==="month")a=`${s.getFullYear()}-${String(s.getMonth()+1).padStart(2,"0")}`;else if(t==="week"){let l=fA(s);a=mu(l)}else a=mu(s);let c=r.get(a)??[];c.push(i),r.set(a,c)}return[...r.entries()].map(([i,s])=>({key:i,label:s[0]===void 0?i:t==="month"?n("history.month",{month:i.replace("-","/")}):t==="week"?n("history.week",{date:i.slice(5).replace("-","/")}):i===mu(o)?n("history.today"):i===mu(new Date(o.getTime()-864e5))?n("history.yesterday"):n("history.date",{date:i.slice(5).replace("-","/")}),items:s}))}function mu(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function fA(e){let t=new Date(e),o=t.getDay(),n=o===0?6:o-1;return t.setHours(0,0,0,0),t.setDate(t.getDate()-n),t}function PC(e,t=[],o,n=e.permission){let r=lh(new Date,t,o,n),i=e.schedule,s=e.provider&&e.model?`${e.provider}::${e.model}`:"default",a={...r,name:e.name,prompt:e.prompt,permission:e.permission,maxConcurrentRuns:String(e.maxConcurrentRuns??1),workspaceId:e.workspaceId??r.workspaceId,modelKey:s,reasoningEffort:e.reasoningEffort??"none",timeZone:e.timeZone||i.timeZone||r.timeZone};switch(i.kind){case"once":return{...a,scheduleKind:"once",onceAt:gA(i.at)};case"interval":return{...a,scheduleKind:"interval",everyMinutes:String(i.everyMinutes),intervalAnchor:i.anchor??""};case"hourly":return{...a,scheduleKind:"hourly",hourlyMinute:String(i.minute).padStart(2,"0")};case"daily":return{...a,scheduleKind:"daily",time:i.time};case"weekly":return{...a,scheduleKind:"weekly",time:i.time,weekdays:[...i.weekdays]};case"monthly":return{...a,scheduleKind:"monthly",time:i.time,monthDay:String(i.day)};case"custom":return{...a,scheduleKind:"custom",time:i.time,customDays:String(i.everyDays)}}}function gA(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return SC();let o=t.getTimezoneOffset()*6e4;return new Date(t.getTime()-o).toISOString().slice(0,16)}var hA={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"},TC=new Map;function yA(e){let t=TC.get(e);if(t!==void 0)return t;let o=new Intl.DateTimeFormat("en-CA",{...hA,timeZone:e});return TC.set(e,o),o}function fc(e,t){let o=new Date(e);if(Number.isNaN(o.getTime()))return e;if(t===void 0){let n=`${o.getFullYear()}-${String(o.getMonth()+1).padStart(2,"0")}-${String(o.getDate()).padStart(2,"0")}`,r=`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}`;return`${n} ${r}`}try{let n=yA(t).formatToParts(o),r=d=>n.find(u=>u.type===d)?.value,[i,s,a,c,l]=["year","month","day","hour","minute"].map(d=>r(d));return[i,s,a,c,l].some(d=>d===void 0)?e:`${i}-${s}-${a} ${c}:${l}`}catch{return e}}var Ha="dsh-automation-session-",dh="dsh-automation.sidebar-tab";function xu(e,t){let o=new Map,n=new Map;for(let s of e)o.set(s.id,s.name),s.timeZone!==void 0&&n.set(s.id,s.timeZone);for(let s of t){let a=(s.automationName||"").trim();a!==""&&a!==s.automationId&&!o.has(s.automationId)&&o.set(s.automationId,a)}let r=[],i=new Set;for(let s of e)i.has(s.id)||(r.push(s.id),i.add(s.id));for(let s of t)s.sessionId===void 0||s.sessionId===""||i.has(s.automationId)||(r.push(s.automationId),i.add(s.automationId));return r.map(s=>{let a=o.get(s)??s;return{id:s,name:a,sessions:t.filter(c=>c.automationId===s&&c.sessionId!==void 0&&c.sessionId!=="").slice().sort((c,l)=>Date.parse(l.startedAt??l.scheduledFor)-Date.parse(c.startedAt??c.scheduledFor)).map(c=>({id:c.sessionId,running:c.status==="running"||c.status==="queued",label:fc(c.startedAt??c.scheduledFor,n.get(s))+" - "+a}))}}).filter(s=>s.sessions.length>0)}function vu(e){return e==="active"?"pause":"resume"}function _C(e){return e.map(t=>({id:t.id,name:t.name,status:t.status,...t.nextRunAt===void 0?{}:{nextRunAt:t.nextRunAt}}))}function FC(e,t,o){if(e===void 0||e==="")return!1;let n=t.has(e);return o==="only"?n:o==="show"?!0:!n}function Su(e,t){return e==null||e===""||!e.startsWith(Ha)?!1:!(t??[]).some(o=>o.sessionId===e)}function zC(e){let t=new Set;for(let o of e??[]){let n=o.sessionId;typeof n=="string"&&n!==""&&t.add(n)}return t}var bA=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}/;function uh(e,t,o=new Set){if(e.startsWith(Ha)||o.has(e))return!0;let n=String(t?.title??t?.displayTitle??"");return bA.test(n)}function MC(e,t=new Set){if(e===void 0||e.blank===!0||e.origin==="im"||e.origin==="subagent")return!1;let o=e.id??"";return!(o.startsWith("im:")||uh(o,e,t))}function BC(e,t,o,n=new Set){let r=e.byId??{},i=new Set(t?.archivedSessionIds??[]),s=new Set,a=[];for(let l of t?.items??[]){let d=(l.sessionIds??[]).map(u=>r[u]).filter(u=>u!==void 0&&u.id!==void 0&&MC(u,n)&&!i.has(u.id));for(let u of d)u.id!==void 0&&s.add(u.id);d.length>0&&a.push({id:l.workspaceId??l.id??l.path??l.title??"workspace",label:l.title||l.path||o,sessions:d})}let c=(e.ids??[]).map(l=>r[l]).filter(l=>l!==void 0&&l.id!==void 0&&!s.has(l.id)&&MC(l,n)&&!i.has(l.id));return c.length>0&&a.push({id:"",label:o,sessions:c}),a}function HC(e){return e==="channels"||e==="schedule"||e==="tasks"?e:"tasks"}function VC(e,t){let o=e??"",n=t??"";return n!==""&&o!==n}function WC(e){let t=["tasks"];for(let o of e.extraTabIds)o===""||o==="tasks"||o==="schedule"||t.includes(o)||t.push(o);return e.channelsReady&&!t.includes("channels")&&t.push("channels"),t.push("schedule"),t}function jC(e){return e.extraTabIds.includes(e.tab)?e.tab:e.tab==="channels"&&!e.channelsReady?"tasks":e.tab}function UC(e,t){if(!(e==null||e===""))return(t!==void 0?t.has(e):e.startsWith(Ha))?"schedule":e.startsWith("im:")?"channels":"tasks"}function xA(e){return/dsh-codex-ui|michengai-codex-ui|michengai\.codexUi|codex-ui/i.test(String(e??""))}function vA(e){let t=e;return String(t?.options?.locale??t?.options?.id??t?.options?.name??t?.options?.registrant??t?.component?.displayName??t?.component?.name??t?.id??t?.name??"")}function KC(e){return(e??[]).some(t=>xA(vA(t)))}var kC=new WeakMap,OC=new WeakMap;function qC(e){return e.size===0?"":[...e].sort().join("\0")}function GC(e,t=new Set){let o=e??{ids:[],byId:{},current:null},n=qC(t);if(typeof o=="object"&&o!==null){let a=kC.get(o);if(a!==void 0&&a.key===n)return a.result}let r=(o.ids??[]).filter(a=>{let c=String(a);return!c.startsWith("im:")&&!uh(c,o.byId?.[c],t)}),s=r.length===(o.ids??[]).length?o:{...o,ids:r,byId:Object.fromEntries(r.map(a=>[a,o.byId?.[a]]).filter(a=>a[1]!==void 0))};return typeof o=="object"&&o!==null&&kC.set(o,{key:n,result:s}),s}function gc(e){let t=e?.current;if(typeof t=="string"&&t!=="")return t;let o=e?.byId??{};for(let[n,r]of Object.entries(o))if((r?.retainedBy?.mainView??0)>0){let i=r.id?.trim();return i!==void 0&&i!==""?i:n}return null}function SA(e){if(e===null||typeof e!="object")return;let t=e.openSession;if(typeof t=="function")return{openSession:o=>{t.call(e,o)}}}function CA(e,t){let o=e.reflect?.get;if(typeof o=="function")try{return o.call(e.reflect,t)}catch{}if(typeof e.get=="function")try{return e.get(t)}catch{}}function XC(e){let t=SA(CA(e,"uiWorkspace"));return{...t===void 0?{}:{uiWorkspace:t},...e.sessions===void 0?{}:{sessions:e.sessions}}}function YC(e){return typeof e.uiWorkspace?.openSession=="function"||typeof e.sessions?.open=="function"}function ZC(e,t){if(typeof e.uiWorkspace?.openSession=="function"){e.uiWorkspace.openSession(t);return}if(typeof e.sessions?.open=="function"){e.sessions.open(t);return}throw new Error("no client session opener")}function AC(e,t,o){if(e==="")return!1;let n=e.startsWith(Ha)||e.startsWith("im:")?[t,o]:[o,t];for(let r of n)if(typeof r=="function")try{return r(e),!0}catch{}return!1}async function QC(e){let t=e.id.trim();return t===""?!1:(await e.adopt?.(t).catch(()=>{}),!(e.listed?.(t)===!0)&&e.refresh!==void 0&&await e.refresh().catch(()=>{}),AC(t,e.openRuntime,e.openHost)?!0:(e.refresh!==void 0&&await e.refresh().catch(()=>{}),AC(t,e.openRuntime,e.openHost)))}function wA(e,t=new Set){return e.startsWith("im:")||uh(e,void 0,t)}function JC(e,t=new Set){let o=e??{items:[],archivedSessionIds:[]},n=qC(t);if(typeof o=="object"&&o!==null){let a=OC.get(o);if(a!==void 0&&a.key===n)return a.result}let r=!1,i=(o.items??[]).map(a=>{let c=(a.sessionIds??[]).filter(l=>!wA(String(l),t));return c.length!==(a.sessionIds??[]).length?(r=!0,{...a,sessionIds:c}):a}),s=r?{...o,items:i}:o;return typeof o=="object"&&o!==null&&OC.set(o,{key:n,result:s}),s}function e0(e){return e==null||typeof e!="function"&&typeof e!="object"?{}:e}function RA(e){return e0(e).__dshAutomationWrapped===!0}function t0(e){let t=new Set,o=e;for(;o!=null&&!t.has(o);){t.add(o);let n=e0(o),r=n.__dshAutomationOriginal??n.__imConnectOriginal;if(r!==void 0&&r!==o){o=r;continue}return n.__dshAutomationWrapped===!0||n.__imConnectWrapped===!0?void 0:o}}function EA(e){let t=e,o=String(t?.options?.id??""),n=String(t?.component?.displayName??t?.component?.name??"");return o==="dsh-automation-native-switcher"||o==="dsh-automation-wrap-bump"||n==="AutomationNativeWorkspaceShell"||n==="AutomationWrapBump"||RA(t?.component)}function o0(e){for(let t of e)if(t?.component!==void 0&&!EA(t))return t}function Ba(e){return e.replace(/\\/g,"/").replace(/\/+$/,"")}function LC(e,t){let o=Ba(e),n,r=-1;for(let i of t){let s=Ba(i);s.length>r&&o!==s&&o.startsWith(`${s}/`)&&(n=i,r=s.length)}return n}function n0(e,t,o){let n=new Map;for(let h of t)for(let b of h.sessionIds??[])n.set(b,h);let r=new Map,i=[];for(let h of e){let b=h.id===void 0?void 0:n.get(h.id),x=b?.workspaceId??b?.id??b?.path;if(b===void 0||x===void 0||x===""){i.push(h);continue}let y=r.get(x)??[];y.push(h),r.set(x,y)}let s=new Map;for(let h of t)h.path!==void 0&&h.path!==""&&s.set(Ba(h.path),h);let a=new Map;for(let h of t){let b=h.workspaceId??h.id??h.path;if(b===void 0||b===""||!r.has(b))continue;a.set(b,h);let x=h.path,y=new Set;for(;x!==void 0&&x!==""&&!y.has(x);){y.add(x);let S=LC(x,[...s.keys()]);if(S===void 0)break;let v=s.get(Ba(S)),C=v?.workspaceId??v?.id??v?.path;if(v===void 0||C===void 0||C==="")break;a.set(C,v),x=v.path}}let c=[...a.values()],l=c.map(h=>h.path).filter(h=>h!==void 0&&h!==""),d=h=>h.workspaceId??h.id??h.path??"",u=new Map,m=[];for(let h of c){let b=h.path===void 0?void 0:LC(h.path,l),x=b===void 0?void 0:c.find(S=>S.path!==void 0&&Ba(S.path)===Ba(b)),y=x===void 0?void 0:d(x);if(x===void 0||y===void 0||y==="")m.push(h);else{let S=u.get(y)??[];S.push(h),u.set(y,S)}}let p=(h,b)=>(h.title||h.path||"").localeCompare(b.title||b.path||""),g=[],f=(h,b)=>{let x=d(h),y=r.get(x)??[];g.push({id:x,name:h.title||h.path||o,depth:b,keep:y.length===0,sessions:y});for(let S of(u.get(x)??[]).sort(p))f(S,b+1)};for(let h of m.sort(p))f(h,0);return i.length>0&&g.push({id:"",name:o,depth:0,sessions:i}),g}function r0(e,t,o,n="workspace"){let r=t.trim().toLocaleLowerCase(),i=e.map(s=>{if(r===""||s.name.toLocaleLowerCase().includes(r))return s;let a=s.sessions.filter(c=>`${c.title??""} ${c.label??""}`.toLocaleLowerCase().includes(r));return{...s,sessions:a}}).filter(s=>s.sessions.length>0||r===""&&s.keep===!0||r!==""&&s.name.toLocaleLowerCase().includes(r));if(n==="list"){let s=i.flatMap(a=>[...a.sessions]);return o==="time"&&s.sort((a,c)=>ch(c)-ch(a)),s.length===0?[]:[{...i[0],name:"",sessions:s}]}return n==="workspace-tree"||o==="manual"?i:[...i].sort((s,a)=>DC(a)-DC(s))}function ch(e){let t=Date.parse(e.updatedAt??"");return Number.isFinite(t)?t:0}function DC(e){let t=0;for(let o of e.sessions){let n=ch(o);n>t&&(t=n)}return t}var ut=require("react/jsx-runtime");function Hs({children:e,...t}){return(0,ut.jsx)("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:e})}function hc(e){return(0,ut.jsx)(Hs,{...e,children:(0,ut.jsx)("path",{d:"M12 5v14M5 12h14"})})}function s0(e){return(0,ut.jsxs)(Hs,{...e,children:[(0,ut.jsx)("path",{d:"M19 7v5h-5"}),(0,ut.jsx)("path",{d:"M18.1 15.5A7.5 7.5 0 1 1 19 12"})]})}function a0(e){return(0,ut.jsxs)(Hs,{...e,children:[(0,ut.jsx)("rect",{x:"4",y:"5.5",width:"16",height:"14",rx:"2"}),(0,ut.jsx)("path",{d:"M8 3.8v3.4M16 3.8v3.4M4 9.5h16"})]})}function l0(e){return(0,ut.jsxs)(Hs,{...e,children:[(0,ut.jsx)("circle",{cx:"6",cy:"12",r:"1.2",fill:"currentColor"}),(0,ut.jsx)("circle",{cx:"12",cy:"12",r:"1.2",fill:"currentColor"}),(0,ut.jsx)("circle",{cx:"18",cy:"12",r:"1.2",fill:"currentColor"})]})}function c0(e){return(0,ut.jsxs)(Hs,{...e,children:[(0,ut.jsx)("circle",{cx:"12",cy:"12",r:"8.25"}),(0,ut.jsx)("path",{d:"M12 10.4V16"}),(0,ut.jsx)("path",{d:"M12 7.6h.01"})]})}function yc(e){return(0,ut.jsxs)(Hs,{...e,children:[(0,ut.jsx)("circle",{cx:"12",cy:"12",r:"8.25"}),(0,ut.jsx)("path",{d:"M12 7.6v4.6l3 1.8"})]})}function d0(e){return(0,ut.jsx)(Hs,{...e,children:(0,ut.jsx)("path",{d:"M5.5 6.5h13v9.2H9.2L5.5 18.8V6.5Z"})})}function u0(e){return(0,ut.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":"true",focusable:"false",...e,children:(0,ut.jsx)("path",{fill:"currentColor",d:"M8 0a8 8 0 0 0-2.53 15.59c.4.074.547-.173.547-.385 0-.19-.007-.693-.01-1.36-2.226.484-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.726-.496.055-.486.055-.486.803.056 1.225.824 1.225.824.714 1.223 1.872.87 2.328.665.072-.517.28-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.956 0-.874.31-1.588.823-2.148-.083-.202-.357-1.017.078-2.12 0 0 .672-.215 2.2.82A7.65 7.65 0 0 1 8 4.8c.68.003 1.365.092 2.004.27 1.527-1.035 2.197-.82 2.197-.82.437 1.103.162 1.918.08 2.12.513.56.822 1.274.822 2.148 0 3.076-1.872 3.752-3.654 3.95.288.248.544.735.544 1.482 0 1.07-.01 1.932-.01 2.195 0 .214.144.463.55.384A8.001 8.001 0 0 0 8 0Z"})})}function mh({children:e,width:t=16,height:o=16}){return(0,ut.jsx)("svg",{viewBox:"0 0 16 16",width:t,height:o,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e})}function m0(e){return(0,ut.jsx)(mh,{...e,children:(0,ut.jsx)("path",{fill:"currentColor",d:"M2 6.2h12v7.2H2V6.2Zm1.2 1.2v4.8h9.6V7.4H3.2ZM6.1 9.2h3.8v1.2H6.1V9.2ZM3.4 2.2h9.2L14 4.6H2L3.4 2.2Z"})})}function p0(e){return(0,ut.jsx)(mh,{...e,children:(0,ut.jsx)("path",{fill:"currentColor",transform:"translate(1.5 2.429)",d:"M5.05582 0.518756L4.50669 0.86654L5.05582 0.518756ZM13 9.4837L13.65 9.4837L13.65 3.53962L13 3.53962L12.35 3.53962L12.35 9.4837L13 9.4837ZM11.3264 1.86603L11.3264 1.21603L6.52313 1.21603L6.52313 1.86603L6.52313 2.51603L11.3264 2.51603L11.3264 1.86603ZM5.58054 1.34727L6.12968 0.999489L5.60495 0.170972L5.05582 0.518756L4.50669 0.86654L5.03141 1.69506L5.58054 1.34727ZM4.11323 1.23058e-13L4.11323 -0.65L1.67359 -0.65L1.67359 5.00699e-14L1.67359 0.65L4.11323 0.65L4.11323 1.23058e-13ZM0 1.67359L-0.65 1.67359L-0.65 9.4837L0 9.4837L0.65 9.4837L0.65 1.67359L0 1.67359ZM11.3264 11.1573L11.3264 10.5073L1.67359 10.5073L1.67359 11.1573L1.67359 11.8073L11.3264 11.8073L11.3264 11.1573ZM0 9.4837L-0.65 9.4837C-0.65 10.767 0.390308 11.8073 1.67359 11.8073L1.67359 11.1573L1.67359 10.5073C1.10828 10.5073 0.65 10.049 0.65 9.4837L0 9.4837ZM1.67359 5.00699e-14L1.67359 -0.65C0.390307 -0.65 -0.65 0.390309 -0.65 1.67359L0 1.67359L0.65 1.67359C0.65 1.10828 1.10828 0.65 1.67359 0.65L1.67359 5.00699e-14ZM5.05582 0.518756L5.60495 0.170972C5.28121 -0.340193 4.71829 -0.65 4.11323 -0.65L4.11323 1.23058e-13L4.11323 0.65C4.27282 0.65 4.4213 0.731715 4.50669 0.86654L5.05582 0.518756ZM6.52313 1.86603L6.52313 1.21603C6.36354 1.21603 6.21507 1.13431 6.12968 0.999489L5.58054 1.34727L5.03141 1.69506C5.35515 2.20622 5.91808 2.51603 6.52313 2.51603L6.52313 1.86603ZM13 3.53962L13.65 3.53962C13.65 2.25634 12.6097 1.21603 11.3264 1.21603L11.3264 1.86603L11.3264 2.51603C11.8917 2.51603 12.35 2.97431 12.35 3.53962L13 3.53962ZM13 9.4837L12.35 9.4837C12.35 10.049 11.8917 10.5073 11.3264 10.5073L11.3264 11.1573L11.3264 11.8073C12.6097 11.8073 13.65 10.767 13.65 9.4837L13 9.4837Z"})})}function f0(e){return(0,ut.jsxs)(mh,{...e,children:[(0,ut.jsx)("path",{fill:"currentColor",d:"M5.19629 1.57104C5.81144 1.5711 6.38623 1.8786 6.72754 2.39038L7.19922 3.09839C7.28454 3.22635 7.42824 3.30344 7.58203 3.30347H12.1699C13.5039 3.30348 14.5859 4.38548 14.5859 5.71948V6.62671C15.2694 7.02689 15.6605 7.85012 15.4385 8.68726L14.3848 12.658C14.1037 13.7164 13.1449 14.4527 12.0498 14.4529H2.91699C1.51651 14.4529 0.451662 13.2814 0.501954 11.9519V3.98706C0.501954 2.65305 1.58396 1.57104 2.91797 1.57104H5.19629ZM3.7793 7.75562C3.30994 7.75562 2.89883 8.07153 2.77832 8.52515L1.91602 11.7722C1.74167 12.4291 2.23734 13.073 2.91699 13.073H12.0498C12.5191 13.0728 12.9304 12.757 13.0508 12.3035L14.1045 8.33374C14.1819 8.04202 13.9619 7.756 13.6602 7.75562H3.7793ZM2.91797 2.9519C2.34625 2.9519 1.88281 3.41534 1.88281 3.98706V7.2937C2.33068 6.7269 3.02249 6.37476 3.7793 6.37476H13.2051V5.71948C13.2051 5.14777 12.7416 4.68434 12.1699 4.68433H7.58203C6.96675 4.6843 6.39209 4.37595 6.05078 3.86401L5.5791 3.15601C5.49379 3.02821 5.34995 2.95196 5.19629 2.9519H2.91797Z"}),(0,ut.jsx)("path",{fill:"currentColor",opacity:"0.2",d:"M13.6602 7.75525C13.9618 7.7556 14.1815 8.04179 14.1045 8.33337L13.0508 12.3031C12.9304 12.7567 12.5191 13.0725 12.0498 13.0726H2.91701C2.23744 13.0725 1.7417 12.4287 1.91603 11.7719L2.77834 8.52478C2.89898 8.07146 3.31018 7.75532 3.77931 7.75525H13.6602ZM5.1963 2.95154C5.34985 2.95159 5.49377 3.02803 5.57912 3.15564L6.0508 3.86365C6.39205 4.37553 6.96685 4.68385 7.58205 4.68396H12.1699C12.7416 4.68396 13.2049 5.14754 13.2051 5.71912V6.37439H3.77931C3.02267 6.37444 2.33067 6.72671 1.88283 7.29333V3.98669C1.88299 3.4152 2.34649 2.95168 2.91798 2.95154H5.1963Z"})]})}function g0(e){return(0,ut.jsx)("svg",{viewBox:"0 0 14 14",width:e.width||14,height:e.height||14,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...e,children:(0,ut.jsx)("path",{fill:"currentColor",d:"M4.25 2.828v8.344c0 .49.592.735.939.389l4.172-4.172a.55.55 0 0 0 0-.778L5.189 2.439c-.347-.347-.939-.101-.939.389Z"})})}var i0=[[0,0],[4,0],[8,0],[8,4],[8,8],[4,8],[0,8],[0,4]];function Cu(){return(0,ut.jsx)("svg",{className:"dsh-st-run-dot",width:10,height:10,viewBox:"0 0 10 10",shapeRendering:"crispEdges","aria-hidden":"true",children:i0.map(([e,t],o)=>(0,ut.jsx)("rect",{className:"dsh-st-run-dot-cell",x:e,y:t,width:"2",height:"2",style:{animationDelay:`${(o-i0.length)*125}ms`}},`${e}-${t}`))})}var h0={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"};var Fo=Math.round;function ph(e,t){let o=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=o.map(r=>parseFloat(r));for(let r=0;r<3;r+=1)n[r]=t(n[r]||0,o[r]||"",r);return o[3]?n[3]=o[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}var y0=(e,t,o)=>o===0?e:e/100;function bc(e,t){let o=t||255;return e>o?o:e<0?0:e}var pt=class e{isValid=!0;r=0;g=0;b=0;a=1;_h;_hsl_s;_hsv_s;_l;_v;_max;_min;_brightness;constructor(t){function o(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let r=function(i){return n.startsWith(i)},n=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(n))this.fromHexString(n);else if(r("rgb"))this.fromRgbString(n);else if(r("hsl"))this.fromHslString(n);else if(r("hsv")||r("hsb"))this.fromHsvString(n);else{let i=h0[n.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"))}}else if(t instanceof e)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(o("rgb"))this.r=bc(t.r),this.g=bc(t.g),this.b=bc(t.b),this.a=typeof t.a=="number"?bc(t.a,1):1;else if(o("hsl"))this.fromHsl(t);else if(o("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){let o=this.toHsv();return o.h=t,this._c(o)}getLuminance(){function t(i){let s=i/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}let o=t(this.r),n=t(this.g),r=t(this.b);return .2126*o+.7152*n+.0722*r}getHue(){if(typeof this._h>"u"){let t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Fo(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"){let 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"){let t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{let o=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*o-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){let o=this.getHue(),n=this.getSaturation(),r=this.getLightness()-t/100;return r<0&&(r=0),this._c({h:o,s:n,l:r,a:this.a})}lighten(t=10){let o=this.getHue(),n=this.getSaturation(),r=this.getLightness()+t/100;return r>1&&(r=1),this._c({h:o,s:n,l:r,a:this.a})}mix(t,o=50){let n=this._c(t),r=o/100,i=a=>(n[a]-this[a])*r+this[a],s={r:Fo(i("r")),g:Fo(i("g")),b:Fo(i("b")),a:Fo(i("a")*100)/100};return this._c(s)}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){let o=this._c(t),n=this.a+o.a*(1-this.a),r=i=>Fo((this[i]*this.a+o[i]*o.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}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="#",o=(this.r||0).toString(16);t+=o.length===2?o:"0"+o;let n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;let r=(this.b||0).toString(16);if(t+=r.length===2?r:"0"+r,typeof this.a=="number"&&this.a>=0&&this.a<1){let i=Fo(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(){let t=this.getHue(),o=Fo(this.getHSLSaturation()*100),n=Fo(this.getLightness()*100);return this.a!==1?`hsla(${t},${o}%,${n}%,${this.a})`:`hsl(${t},${o}%,${n}%)`}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,o,n){let r=this.clone();return r[t]=bc(o,n),r}_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){let o=t.replace("#","");function n(r,i){return parseInt(o[r]+o[i||r],16)}o.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=o[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=o[6]?n(6,7)/255:1)}fromHsl({h:t,s:o,l:n,a:r}){let i=(t%360+360)%360;if(this._h=i,this._hsl_s=o,this._l=n,this.a=typeof r=="number"?r:1,o<=0){let p=Fo(n*255);this.r=p,this.g=p,this.b=p;return}let s=0,a=0,c=0,l=i/60,d=(1-Math.abs(2*n-1))*o,u=d*(1-Math.abs(l%2-1));l>=0&&l<1?(s=d,a=u):l>=1&&l<2?(s=u,a=d):l>=2&&l<3?(a=d,c=u):l>=3&&l<4?(a=u,c=d):l>=4&&l<5?(s=u,c=d):l>=5&&l<6&&(s=d,c=u);let m=n-d/2;this.r=Fo((s+m)*255),this.g=Fo((a+m)*255),this.b=Fo((c+m)*255)}fromHsv({h:t,s:o,v:n,a:r}){let i=(t%360+360)%360;this._h=i,this._hsv_s=o,this._v=n,this.a=typeof r=="number"?r:1;let s=Fo(n*255);if(this.r=s,this.g=s,this.b=s,o<=0)return;let a=i/60,c=Math.floor(a),l=a-c,d=Fo(n*(1-o)*255),u=Fo(n*(1-o*l)*255),m=Fo(n*(1-o*(1-l))*255);switch(c){case 0:this.g=m,this.b=d;break;case 1:this.r=u,this.b=d;break;case 2:this.r=d,this.b=m;break;case 3:this.r=d,this.g=u;break;case 4:this.r=m,this.g=d;break;case 5:default:this.g=d,this.b=u;break}}fromHsvString(t){let o=ph(t,y0);this.fromHsv({h:o[0],s:o[1],v:o[2],a:o[3]})}fromHslString(t){let o=ph(t,y0);this.fromHsl({h:o[0],s:o[1],l:o[2],a:o[3]})}fromRgbString(t){let o=ph(t,(n,r)=>r.includes("%")?Fo(n/100*255):n);this.r=o[0],this.g=o[1],this.b=o[2],this.a=o[3]}};var wu=2,b0=.16,$A=.05,IA=.05,NA=.15,C0=5,w0=4,PA=[{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 x0(e,t,o){let n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=o?Math.round(e.h)-wu*t:Math.round(e.h)+wu*t:n=o?Math.round(e.h)+wu*t:Math.round(e.h)-wu*t,n<0?n+=360:n>=360&&(n-=360),n}function v0(e,t,o){if(e.h===0&&e.s===0)return e.s;let n;return o?n=e.s-b0*t:t===w0?n=e.s+b0:n=e.s+$A*t,n>1&&(n=1),o&&t===C0&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function S0(e,t,o){let n;return o?n=e.v+IA*t:n=e.v-NA*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Gr(e,t={}){let o=[],n=new pt(e),r=n.toHsv();for(let i=C0;i>0;i-=1){let s=new pt({h:x0(r,i,!0),s:v0(r,i,!0),v:S0(r,i,!0)});o.push(s)}o.push(n);for(let i=1;i<=w0;i+=1){let s=new pt({h:x0(r,i),s:v0(r,i),v:S0(r,i)});o.push(s)}return t.theme==="dark"?PA.map(({index:i,amount:s})=>new pt(t.backgroundColor||"#141414").mix(o[i],s).toHexString()):o.map(i=>i.toHexString())}var xi={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"},fh=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];fh.primary=fh[5];var gh=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];gh.primary=gh[5];var hh=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];hh.primary=hh[5];var yh=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];yh.primary=yh[5];var bh=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];bh.primary=bh[5];var xh=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];xh.primary=xh[5];var vh=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];vh.primary=vh[5];var Sh=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Sh.primary=Sh[5];var Ch=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ch.primary=Ch[5];var wh=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];wh.primary=wh[5];var Rh=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Rh.primary=Rh[5];var Eh=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Eh.primary=Eh[5];var $h=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];$h.primary=$h[5];var Ru={red:fh,volcano:gh,orange:hh,gold:yh,yellow:bh,lime:xh,green:vh,cyan:Sh,blue:Ch,geekblue:wh,purple:Rh,magenta:Eh,grey:$h},R0=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];R0.primary=R0[5];var E0=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];E0.primary=E0[5];var $0=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];$0.primary=$0[5];var I0=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];I0.primary=I0[5];var N0=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];N0.primary=N0[5];var P0=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];P0.primary=P0[5];var T0=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];T0.primary=T0[5];var M0=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];M0.primary=M0[5];var k0=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];k0.primary=k0[5];var O0=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];O0.primary=O0[5];var A0=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];A0.primary=A0[5];var L0=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];L0.primary=L0[5];var D0=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];D0.primary=D0[5];var jo=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var xc={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"},TA={...xc,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
4
- 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
5
- '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},vi=TA;function vc(e,{generateColorPalettes:t,generateNeutralColorPalettes:o}){let{colorSuccess:n,colorWarning:r,colorError:i,colorInfo:s,colorPrimary:a,colorBgBase:c,colorTextBase:l}=e,d=t(a),u=t(n),m=t(r),p=t(i),g=t(s),f=o(c,l),h=e.colorLink||e.colorInfo,b=t(h),x=new pt(p[1]).mix(new pt(p[3]),50).toHexString(),y={};return jo.forEach(S=>{let v=e[S];if(v){let C=t(v);y[`${S}Hover`]=C[5],y[`${S}Active`]=C[7]}}),{...f,colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:u[1],colorSuccessBgHover:u[2],colorSuccessBorder:u[3],colorSuccessBorderHover:u[4],colorSuccessHover:u[4],colorSuccess:u[6],colorSuccessActive:u[7],colorSuccessTextHover:u[8],colorSuccessText:u[9],colorSuccessTextActive:u[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:x,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:m[1],colorWarningBgHover:m[2],colorWarningBorder:m[3],colorWarningBorderHover:m[4],colorWarningHover:m[4],colorWarning:m[6],colorWarningActive:m[7],colorWarningTextHover:m[8],colorWarningText:m[9],colorWarningTextActive:m[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:b[4],colorLink:b[6],colorLinkActive:b[7],...y,colorBgMask:new pt("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}var MA=e=>{let t=e,o=e,n=e,r=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?o=4:e<8&&e>=7?o=5:e<14&&e>=8?o=6:e<16&&e>=14?o=7:e>=16&&(o=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?r=4:e>=8&&(r=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:o,borderRadiusLG:t,borderRadiusOuter:r}},_0=MA;function Ih(e){let{motionUnit:t,motionBase:o,borderRadius:n,lineWidth:r}=e;return{motionDurationFast:`${(o+t).toFixed(1)}s`,motionDurationMid:`${(o+t*2).toFixed(1)}s`,motionDurationSlow:`${(o+t*3).toFixed(1)}s`,lineWidthBold:r+1,..._0(n)}}var kA=e=>{let{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},F0=kA;function Va(e){return(e+8)/e}function Nh(e){let t=Array.from({length:10}).map((o,n)=>{let r=n-1,i=e*Math.E**(r/5),s=n>1?Math.floor(i):Math.ceil(i);return Math.floor(s/2)*2});return t[1]=e,t.map(o=>({size:o,lineHeight:Va(o)}))}var OA=e=>{let t=Nh(e),o=t.map(d=>d.size),n=t.map(d=>d.lineHeight),r=o[1],i=o[0],s=o[2],a=n[1],c=n[0],l=n[2];return{fontSizeSM:i,fontSize:r,fontSizeLG:s,fontSizeXL:o[3],fontSizeHeading1:o[6],fontSizeHeading2:o[5],fontSizeHeading3:o[4],fontSizeHeading4:o[3],fontSizeHeading5:o[2],lineHeight:a,lineHeightLG:l,lineHeightSM:c,fontHeight:Math.round(a*r),fontHeightLG:Math.round(l*s),fontHeightSM:Math.round(c*i),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},z0=OA;function Ph(e){let{sizeUnit:t,sizeStep:o}=e;return{sizeXXL:t*(o+8),sizeXL:t*(o+4),sizeLG:t*(o+2),sizeMD:t*(o+1),sizeMS:t*o,size:t*o,sizeSM:t*(o-1),sizeXS:t*(o-2),sizeXXS:t*(o-3)}}var Un=(e,t)=>new pt(e).setA(t).toRgbString(),Vs=(e,t)=>new pt(e).darken(t).toHexString();var B0=e=>{let t=Gr(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]}},H0=(e,t,o)=>{let n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorShadow:o||"#000",colorText:Un(r,.88),colorTextSecondary:Un(r,.65),colorTextTertiary:Un(r,.45),colorTextQuaternary:Un(r,.25),colorFill:Un(r,.15),colorFillSecondary:Un(r,.06),colorFillTertiary:Un(r,.04),colorFillQuaternary:Un(r,.02),colorBgSolid:Un(r,1),colorBgSolidHover:Un(r,.75),colorBgSolidActive:Un(r,.95),colorBgLayout:Vs(n,4),colorBgContainer:Vs(n,0),colorBgElevated:Vs(n,0),colorBgSpotlight:Un(r,.85),colorBgBlur:"transparent",colorBorder:Vs(n,15),colorBorderDisabled:Vs(n,15),colorBorderSecondary:Vs(n,6)}};function Ws(e){xi.pink=xi.magenta,Ru.pink=Ru.magenta;let t=Object.keys(xc).map(o=>{let n=e[o]===xi[o]?Ru[o]:Gr(e[o]);return Array.from({length:10},()=>1).reduce((r,i,s)=>(r[`${o}-${s+1}`]=n[s],r[`${o}${s+1}`]=n[s],r),{})}).reduce((o,n)=>(o={...o,...n},o),{});return{...e,...t,...vc(e,{generateColorPalettes:B0,generateNeutralColorPalettes:H0}),...z0(e.fontSize),...Ph(e),...F0(e),...Ih(e)}}var Kn=(e,t)=>new pt(e).setA(t).toRgbString(),qi=(e,t)=>new pt(e).lighten(t).toHexString();var Th=e=>{let t=Gr(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},V0=(e,t,o)=>{let n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorShadow:o||"rgba(255, 255, 255, 0.2)",colorText:Kn(r,.85),colorTextSecondary:Kn(r,.65),colorTextTertiary:Kn(r,.45),colorTextQuaternary:Kn(r,.25),colorFill:Kn(r,.18),colorFillSecondary:Kn(r,.12),colorFillTertiary:Kn(r,.08),colorFillQuaternary:Kn(r,.04),colorBgSolid:Kn(r,.95),colorBgSolidHover:Kn(r,1),colorBgSolidActive:Kn(r,.9),colorBgElevated:qi(n,12),colorBgContainer:qi(n,8),colorBgLayout:qi(n,0),colorBgSpotlight:qi(n,26),colorBgBlur:Kn(r,.04),colorBorder:qi(n,26),colorBorderDisabled:qi(n,26),colorBorderSecondary:qi(n,19)}};var AA=(e,t)=>{let o=Object.keys(xc).map(s=>{let a=Gr(e[s],{theme:"dark"});return Array.from({length:10},()=>1).reduce((c,l,d)=>(c[`${s}-${d+1}`]=a[d],c[`${s}${d+1}`]=a[d],c),{})}).reduce((s,a)=>(s={...s,...a},s),{}),n=t??Ws(e),r=vc(e,{generateColorPalettes:Th,generateNeutralColorPalettes:V0}),i=jo.reduce((s,a)=>{let c=e[a];if(c){let l=Th(c);s[`${a}Hover`]=l[7],s[`${a}Active`]=l[5]}return s},{});return{...n,...o,...r,...i,colorPrimaryBg:r.colorPrimaryBorder,colorPrimaryBgHover:r.colorPrimaryBorderHover}},W0=AA;var Jt=M(require("react"));var Eu=M(require("react")),LA=e=>{let t=Eu.useRef(e);return t.current=e,Eu.useCallback((...n)=>t.current?.(...n),[])},Ne=LA;var Wa=M(require("react"));function Ut(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var j0=Ut()?Wa.useLayoutEffect:Wa.useEffect,U0=(e,t)=>{let o=Wa.useRef(!0);j0(()=>e(o.current),t),j0(()=>(o.current=!1,()=>{o.current=!0}),[])},$u=(e,t)=>{U0(o=>{if(!o)return e()},t)},rt=U0;var ja=M(require("react")),DA=e=>{let t=ja.useRef(!1),[o,n]=ja.useState(e);ja.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function r(i,s){s&&t.current||n(i)}return[o,r]},Ua=DA;var K0=require("react");function it(e,t){let[o,n]=(0,K0.useState)(e),r=t!==void 0?t:o;return rt(i=>{i||n(t)},[t]),[r,n]}var Iu=M(require("react"));var G0=e=>+setTimeout(e,16),X0=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(G0=e=>window.requestAnimationFrame(e),X0=e=>window.cancelAnimationFrame(e));var q0=0,Mh=new Map;function Y0(e){Mh.delete(e)}var Z0=(e,t=1)=>{q0+=1;let o=q0;function n(r){if(r===0)Y0(o),e();else{let i=G0(()=>{n(r-1)});Mh.set(o,i)}}return n(t),o};Z0.cancel=e=>{let t=Mh.get(e);return Y0(e),X0(t)};var Ve=Z0;function Nu(e){let[t,o]=Iu.useState(e),n=Iu.useRef(null),r=Ne(()=>{if(n.current){let[s,a]=n.current;s?Ve.cancel(a):clearTimeout(a),n.current=null}}),i=Ne((s,a)=>{let c=a||{frame:1};r(),c===!0?o(s):"ms"in c?n.current=[!1,setTimeout(()=>o(s),c.ms)]:n.current=[!0,Ve(()=>o(s),c.frame)]});return[t,i]}var Sc=M(require("react"));function _A(){return{...Sc}.useId}var Q0=0;var J0=_A(),Co=J0?function(t){let o=J0();return t||o}:function(t){let[o,n]=Sc.useState("ssr-id");return Sc.useEffect(()=>{let r=Q0;Q0+=1,n(`rc_unique_${r}`)},[]),t||o};var ew=M(require("react"));function qn(e,t,o){let n=ew.useRef({});return(!("value"in n.current)||o(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var Pu=M(require("react"));function FA(e){let[,t]=Pu.useReducer(i=>i+1,0),o=Pu.useRef(e),n=Ne(()=>o.current),r=Ne(i=>{o.current=typeof i=="function"?i(o.current):i,t()});return[n,r]}var kh=FA;var Bu=require("react"),wc=M(rw());var BA=Symbol.for("react.element"),HA=Symbol.for("react.transitional.element"),VA=Symbol.for("react.fragment");function Cc(e){return e&&typeof e=="object"&&(e.$$typeof===BA||e.$$typeof===HA)&&e.type===VA}var WA=Number(Bu.version.split(".")[0]),iw=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},Mt=(...e)=>{let t=e.filter(Boolean);return t.length<=1?t[0]:o=>{e.forEach(n=>{iw(n,o)})}},bo=(...e)=>qn(()=>Mt(...e),e,(t,o)=>t.length!==o.length||t.every((n,r)=>n!==o[r])),ur=e=>{if(!e)return!1;if(Lh(e)&&WA>=19)return!0;let t=(0,wc.isMemo)(e)?e.type.type:e.type;return!(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==wc.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==wc.ForwardRef)};function Lh(e){return(0,Bu.isValidElement)(e)&&!Cc(e)}var Rc=e=>Lh(e)&&ur(e),To=e=>{if(e&&Lh(e)){let t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function js(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let o=t;for(;o;){if(o===e)return!0;o=o.parentNode}return!1}var sw="data-rc-order",aw="data-rc-priority",jA="rc-util-key",Dh=new Map;function lw({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:jA}function Hu(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function UA(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function _h(e){return Array.from((Dh.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function Fh(e,t={}){if(!Ut())return null;let{csp:o,prepend:n,priority:r=0}=t,i=UA(n),s=i==="prependQueue",a=document.createElement("style");a.setAttribute(sw,i),s&&r&&a.setAttribute(aw,`${r}`),o?.nonce&&(a.nonce=o?.nonce),a.innerHTML=e;let c=Hu(t),{firstChild:l}=c;if(n){if(s){let d=(t.styles||_h(c)).filter(u=>{if(!["prepend","prependQueue"].includes(u.getAttribute(sw)))return!1;let m=Number(u.getAttribute(aw)||0);return r>=m});if(d.length)return c.insertBefore(a,d[d.length-1].nextSibling),a}c.insertBefore(a,l)}else c.appendChild(a);return a}function cw(e,t={}){let{styles:o}=t;return o||=_h(Hu(t)),o.find(n=>n.getAttribute(lw(t))===e)}function Mr(e,t={}){let o=cw(e,t);o&&Hu(t).removeChild(o)}function KA(e,t){let o=Dh.get(e);if(!o||!js(document,o)){let n=Fh("",t),{parentNode:r}=n;Dh.set(e,r),e.removeChild(n)}}function Nn(e,t,o={}){let n=Hu(o),r=_h(n),i={...o,styles:r};KA(n,i);let s=cw(t,i);if(s)return i.csp?.nonce&&s.nonce!==i.csp?.nonce&&(s.nonce=i.csp?.nonce),s.innerHTML!==e&&(s.innerHTML=e),s;let a=Fh(e,i);return a.setAttribute(lw(i),t),a}function Xr(e){return e instanceof HTMLElement||e instanceof SVGElement}function Gn(e){return e&&typeof e=="object"&&Xr(e.nativeElement)?e.nativeElement:Xr(e)?e:null}var Xi=require("react");var Us=e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){let{width:t,height:o}=e.getBBox();if(t||o)return!0}if(e.getBoundingClientRect){let{width:t,height:o}=e.getBoundingClientRect();if(t||o)return!0}}return!1};function dw(e,t=!1){if(Us(e)){let o=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(o)||e.isContentEditable||o==="a"&&!!e.getAttribute("href"),r=e.getAttribute("tabindex"),i=Number(r),s=null;return r&&!Number.isNaN(i)?s=i:n&&s===null&&(s=0),n&&e.disabled&&(s=null),s!==null&&(s>=0||t&&s<0)}return!1}function Ec(e,t=!1){let o=[...e.querySelectorAll("*")].filter(n=>dw(n,t));return dw(e,t)&&o.unshift(e),o}function qa(e,t){if(!e)return;e.focus(t);let{cursor:o}=t||{};if(o&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){let n=e.value.length;switch(o){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}var Ka=null,Gi=[],Bh=new Map,Hh=new Map;function Vh(){return Gi[Gi.length-1]}function qA(e){let t=Vh();if(e&&t){let o;for(let[r,i]of Bh.entries())if(i===t){o=r;break}let n=Hh.get(o);return!!n&&(n===e||n.contains(e))}return!1}function GA(e){let{activeElement:t}=document;return e===t||e.contains(t)}function zh(){let e=Vh(),{activeElement:t}=document;if(!qA(t))if(e&&!GA(e)){let o=Ec(e);(o.includes(Ka)?Ka:o[0])?.focus({preventScroll:!0})}else Ka=t}function uw(e){if(e.key==="Tab"){let{activeElement:t}=document,o=Vh(),n=Ec(o),r=n[n.length-1];e.shiftKey&&t===n[0]?Ka=r:!e.shiftKey&&t===r&&(Ka=n[0])}}function mw(e,t){return e&&(Bh.set(t,e),Gi=Gi.filter(o=>o!==e),Gi.push(e),window.addEventListener("focusin",zh),window.addEventListener("keydown",uw,!0),zh()),()=>{Ka=null,Gi=Gi.filter(o=>o!==e),Bh.delete(t),Hh.delete(t),Gi.length===0&&(window.removeEventListener("focusin",zh),window.removeEventListener("keydown",uw,!0))}}function XA(e,t){let o=(0,Xi.useRef)(0),[n,r]=(0,Xi.useState)(0);(0,Xi.useEffect)(()=>{o.current=0},t),(0,Xi.useEffect)(()=>{let[i,s]=e(o.current);return s||(o.current+=1,r(a=>a+1)),i},[...t,n])}function Wh(e,t){let o=Co(),n=(0,Xi.useRef)(t);return n.current=t,XA(s=>{if(!e)return[void 0,!0];let a=n.current();return a?[mw(a,o),!0]:[void 0,s>=1]},[o,e]),[s=>{s&&Hh.set(o,s)}]}function pw(e){return e?.getRootNode?.()}function YA(e){return pw(e)instanceof ShadowRoot}function Ga(e){return YA(e)?pw(e):null}var Ue={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(t){let{keyCode:o}=t;if(t.altKey&&!t.ctrlKey||t.metaKey||o>=Ue.F1&&o<=Ue.F12)return!1;switch(o){case Ue.ALT:case Ue.CAPS_LOCK:case Ue.CONTEXT_MENU:case Ue.CTRL:case Ue.DOWN:case Ue.END:case Ue.ESC:case Ue.HOME:case Ue.INSERT:case Ue.LEFT:case Ue.MAC_FF_META:case Ue.META:case Ue.NUMLOCK:case Ue.NUM_CENTER:case Ue.PAGE_DOWN:case Ue.PAGE_UP:case Ue.PAUSE:case Ue.PRINT_SCREEN:case Ue.RIGHT:case Ue.SHIFT:case Ue.UP:case Ue.WIN_KEY:case Ue.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=Ue.ZERO&&t<=Ue.NINE||t>=Ue.NUM_ZERO&&t<=Ue.NUM_MULTIPLY||t>=Ue.A&&t<=Ue.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case Ue.SPACE:case Ue.QUESTION_MARK:case Ue.NUM_PLUS:case Ue.NUM_MINUS:case Ue.NUM_PERIOD:case Ue.NUM_DIVISION:case Ue.SEMICOLON:case Ue.DASH:case Ue.EQUALS:case Ue.COMMA:case Ue.PERIOD:case Ue.SLASH:case Ue.APOSTROPHE:case Ue.SINGLE_QUOTE:case Ue.OPEN_SQUARE_BRACKET:case Ue.BACKSLASH:case Ue.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},isEditableTarget:function(t){let o=t.target;if(!(o instanceof HTMLElement))return!1;let n=o.tagName;return!!(n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||o.isContentEditable)}},ke=Ue;function ZA(e){let t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,o=document.createElement("div");o.id=t;let n=o.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";let r,i;if(e){let c=getComputedStyle(e);n.scrollbarColor=c.scrollbarColor,n.scrollbarWidth=c.scrollbarWidth;let l=getComputedStyle(e,"::-webkit-scrollbar"),d=parseInt(l.width,10),u=parseInt(l.height,10);try{let m=d?`width: ${l.width};`:"",p=u?`height: ${l.height};`:"";Nn(`
6
- #${t}::-webkit-scrollbar {
7
- ${m}
8
- ${p}
9
- }`,t)}catch(m){console.error(m),r=d,i=u}}document.body.appendChild(o);let s=e&&r&&!Number.isNaN(r)?r:o.offsetWidth-o.clientWidth,a=e&&i&&!Number.isNaN(i)?i:o.offsetHeight-o.clientHeight;return document.body.removeChild(o),Mr(t),{width:s,height:a}}function jh(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:ZA(e)}var Uh={},QA=[],JA=e=>{QA.push(e)};function fw(e,t){}function e2(e,t){}function gw(){Uh={}}function hw(e,t,o){!t&&!Uh[o]&&(e(!1,o),Uh[o]=!0)}function Vu(e,t){hw(fw,e,t)}function Kh(e,t){hw(e2,e,t)}Vu.preMessage=JA;Vu.resetWarned=gw;Vu.noteOnce=Kh;var Kt=Vu;function t2(e,t,o=!1){let n=new Set;function r(i,s,a=1){let c=n.has(i);if(Kt(!c,"Warning: There may be circular references"),c)return!1;if(i===s)return!0;if(o&&a>1)return!1;n.add(i);let l=a+1;if(Array.isArray(i)){if(!Array.isArray(s)||i.length!==s.length)return!1;for(let d=0;d<i.length;d++)if(!r(i[d],s[d],l))return!1;return!0}if(i&&s&&typeof i=="object"&&typeof s=="object"){let d=Object.keys(i);return d.length!==Object.keys(s).length?!1:d.every(u=>r(i[u],s[u],l))}return!1}return r(e,t)}var kr=t2;function Pn(e){return e!=null}function lo(e){return Pn(e)&&e!==!1&&e!==""}var bw=M(yw()),Gh,i2=()=>(typeof Gh>"u"&&(Gh=(0,bw.default)()),Gh),Xh=i2;function Ke(e,t){let o=Object.assign({},e);return Array.isArray(t)&&t.forEach(n=>{delete o[n]}),o}var s2=`accept acceptCharset accessKey action allowFullScreen allowTransparency
10
- alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
11
- charSet checked classID className colSpan cols content contentEditable contextMenu
12
- controls coords crossOrigin data dateTime default defer dir disabled download draggable
13
- encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
14
- headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
15
- is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
16
- mediaGroup method min minLength multiple muted name noValidate nonce open
17
- optimum pattern placeholder poster preload radioGroup readOnly rel required
18
- reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
19
- shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
20
- summary tabIndex target title type useMap value width wmode wrap`,a2=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
21
- onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
22
- onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
23
- onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
24
- onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
25
- onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
26
- onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad
27
- onPointerDown onPointerMove onPointerUp onPointerCancel onPointerEnter onPointerLeave onPointerOver onPointerOut onGotPointerCapture onLostPointerCapture
28
- onAnimationStart onAnimationEnd onAnimationIteration
29
- onTransitionEnd onTransitionRun onTransitionStart onTransitionCancel
30
- onBeforeInput onReset onInvalid
31
- onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,l2=`${s2} ${a2}`.split(/[\s\n]+/),c2="aria-",d2="data-";function xw(e,t){return e.indexOf(t)===0}function Mo(e,t=!1){let o;t===!1?o={aria:!0,data:!0,attr:!0}:t===!0?o={aria:!0}:o={...t};let n={};return Object.keys(e).forEach(r=>{(o.aria&&(r==="role"||xw(r,c2))||o.data&&xw(r,d2)||o.attr&&l2.includes(r))&&(n[r]=e[r])}),n}var vw=M(require("react"));function co(e,t={}){let o=[];return vw.default.Children.forEach(e,n=>{n==null&&!t.keepEmpty||(Array.isArray(n)?o=o.concat(co(n)):Cc(n)&&n.props?o=o.concat(co(n.props.children,t)):o.push(n))}),o}function u2(...e){let t={};for(let o of e)if(o)for(let n of Object.keys(o))o[n]!==void 0&&(t[n]=o[n]);return t}var ju=u2;function ko(e,t){let o=e;for(let n=0;n<t.length;n+=1){if(o==null)return;o=o[t[n]]}return o}function Cw(e,t,o,n){if(!t.length)return o;let[r,...i]=t,s;return!e&&typeof r=="number"?s=[]:Array.isArray(e)?s=[...e]:s={...e},n&&o===void 0&&i.length===1?delete s[r][i[0]]:s[r]=Cw(s[r],i,o,n),s}function Uo(e,t,o,n=!1){return t.length&&n&&o===void 0&&!ko(e,t.slice(0,-1))?e:Cw(e,t,o,n)}function m2(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Sw(e){return Array.isArray(e)?[]:{}}var p2=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function ww(e,t={}){let{prepareArray:o}=t,n=o||(()=>[]),r=Sw(e[0]);return e.forEach(i=>{function s(a,c){let l=new Set(c),d=ko(i,a),u=Array.isArray(d);if(u||m2(d)){if(!l.has(d)){l.add(d);let m=ko(r,a);u?r=Uo(r,a,n(m,d)):(!m||typeof m!="object")&&(r=Uo(r,a,Sw(d))),p2(d).forEach(p=>{Object.getOwnPropertyDescriptor(d,p).enumerable&&s([...a,p],l)})}}else r=Uo(r,a,d)}s([])}),r}function Yr(...e){return ww(e)}var Rw=require("react-dom/client"),Uu="__rc_react_root__";function $c(e,t){let o=t[Uu]||(0,Rw.createRoot)(t);o.render(e),t[Uu]=o}async function Ic(e){return Promise.resolve().then(()=>{e[Uu]?.unmount(),delete e[Uu]})}var Ku=require("react"),f2=M(require("react-dom"));function Ew(e){var t,o,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=Ew(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}function $(){for(var e,t,o=0,n="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=Ew(e))&&(n&&(n+=" "),n+=t);return n}function Nc(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function $w(e){if(Array.isArray(e))return Nc(e)}function Iw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qu(e,t){if(e){if(typeof e=="string")return Nc(e,t);var o={}.toString.call(e).slice(8,-1);return o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set"?Array.from(e):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Nc(e,t):void 0}}function Nw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
32
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zt(e){return $w(e)||Iw(e)||qu(e)||Nw()}var Pc=M(require("react"));var Ko=e=>typeof e=="number"&&!Number.isNaN(e),Tn=e=>typeof e=="string",st=e=>e!==null&&typeof e=="object",ct=e=>typeof e=="function",Gu=e=>Pn(e)&&ct(e.then),Pw=e=>typeof e!="object"&&!ct(e)||e===null,Xu=e=>st(e)&&"propertyName"in e&&Tn(e.propertyName);var Yu=(e,t)=>{let o={...e};return Object.keys(t).forEach(n=>{t[n]._default?o[n]||(o[n]={}):o[n]=Yu(o[n],t[n])}),o};var Mw=(e={},...t)=>t.filter(o=>!!o).reduce((o,n)=>(Object.keys(n).forEach(r=>{let i=e[r],s=n[r];if(i)if(st(s))o[r]=Mw(i,o[r],s);else{let{_default:a}=i;a&&(o[r]=o[r]||{},o[r][a]=$(o[r][a],s))}else o[r]=$(o[r],s)}),o),{}),h2=(e,...t)=>Pc.useMemo(()=>Mw.apply(void 0,[e].concat(t)),[e].concat(t)),y2=(...e)=>e.filter(t=>!!t).reduce((t,o={})=>(Object.keys(o).forEach(n=>{t[n]={...t[n],...o[n]}}),t),{}),b2=(...e)=>Pc.useMemo(()=>y2.apply(void 0,e),[].concat(e)),_e=(e,t="root")=>Pc.useMemo(()=>e?{[t]:e}:void 0,[e,t]),Tw=(e,t)=>ct(e)?e(t):e,Je=(e,t,o,n)=>{let r=e.map(c=>c?Tw(c,o):void 0),i=t.map(c=>c?Tw(c,o):void 0),s=h2.apply(void 0,[n].concat(Zt(r))),a=b2.apply(void 0,Zt(i));return Pc.useMemo(()=>n?[Yu(s,n),Yu(a,n)]:[s,a],[s,a,n])};var Yh=M(require("react"));function x2(){}var{resetWarned:RW}=Kt;var kw=Yh.createContext({}),v2=()=>{let e=()=>{};return e.deprecated=x2,e},Xa=v2;var ua=M(require("react"));var Dt=M(require("react"));function S2(e){for(var t=0,o,n=0,r=e.length;r>=4;++n,r-=4)o=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,t=(o&65535)*1540483477+((o>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&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)}var Yi=S2;var Ww=require("react");var Qu=M(require("react"));var C2="%";function Zu(e){return e.join(C2)}var Ow=0,Zh=class{instanceId;constructor(t){this.instanceId=t}cache=new Map;updateTimes=new Map;extracted=new Set;get(t){return this.opGet(Zu(t))}opGet(t){return this.cache.get(t)||null}update(t,o){return this.opUpdate(Zu(t),o)}opUpdate(t,o){let n=this.cache.get(t),r=o(n);r===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,r),this.updateTimes.set(t,Ow),Ow+=1)}},Aw=Zh;var Ks="data-token-hash",bn="data-css-hash";var Zr="__cssinjs_instance__";function Lw(){let e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){let t=document.body.querySelectorAll(`style[${bn}]`)||[],{firstChild:o}=document.head;Array.from(t).forEach(r=>{r[Zr]||=e,r[Zr]===e&&document.head.insertBefore(r,o)});let n={};Array.from(document.querySelectorAll(`style[${bn}]`)).forEach(r=>{let i=r.getAttribute(bn);n[i]?r[Zr]===e&&r.parentNode?.removeChild(r):n[i]=!0})}return new Aw(e)}var w2=Qu.createContext({hashPriority:"low",cache:Lw(),defaultCache:!0,autoPrefix:!1});var Or=w2;var E2="CALC_UNIT",_W=new RegExp(E2,"g");function $2(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}var Ya=class e{static MAX_CACHE_SIZE=20;static MAX_CACHE_OFFSET=5;cache;keys;cacheCallTimes;constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t,o=!1){let n={map:this.cache};return t.forEach(r=>{n?n=n?.map?.get(r):n=void 0}),n?.value&&o&&(n.value[1]=this.cacheCallTimes++),n?.value}get(t){return this.internalGet(t,!0)?.[0]}has(t){return!!this.internalGet(t)}set(t,o){if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){let[r]=this.keys.reduce((i,s)=>{let[,a]=i;return this.internalGet(s)[1]<a?[s,this.internalGet(s)[1]]:i},[this.keys[0],this.cacheCallTimes]);this.delete(r)}this.keys.push(t)}let n=this.cache;t.forEach((r,i)=>{if(i===t.length-1)n.set(r,{value:[o,this.cacheCallTimes++]});else{let s=n.get(r);s?s.map||(s.map=new Map):n.set(r,{map:new Map}),n=n.get(r).map}})}deleteByPath(t,o){let n=t.get(o[0]);if(o.length===1)return n.map?t.set(o[0],{map:n.map}):t.delete(o[0]),n.value?.[0];let r=this.deleteByPath(n.map,o.slice(1));return(!n.map||n.map.size===0)&&!n.value&&t.delete(o[0]),r}delete(t){if(this.has(t))return this.keys=this.keys.filter(o=>!$2(o,t)),this.deleteByPath(this.cache,t)}};var Dw=0,Si=class{derivatives;id;constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=Dw,t.length===0&&(t.length>0,void 0),Dw+=1}getDerivativeToken(t){return this.derivatives.reduce((o,n)=>n(t,o),void 0)}};var Qh=new Ya;function Zi(e){let t=Array.isArray(e)?e:[e];return Qh.has(t)||Qh.set(t,new Si(t)),Qh.get(t)}var N2=new WeakMap,Jh={};function Fw(e,t){let o=N2;for(let n=0;n<t.length;n+=1){let r=t[n];o.has(r)||o.set(r,new WeakMap),o=o.get(r)}return o.has(Jh)||o.set(Jh,e()),o.get(Jh)}var _w=new WeakMap;function Za(e){let t=_w.get(e)||"";return t||(Object.keys(e).forEach(o=>{let n=e[o];t+=o,n instanceof Si?t+=n.id:n&&typeof n=="object"?t+=Za(n):t+=n}),t=Yi(t),_w.set(e,t)),t}function zw(e,t){return Yi(`${t}_${Za(e)}`)}var l9=`random-${Date.now()}-${Math.random()}`.replace(/\./g,"");var Tc=Ut();function Y(e){return typeof e=="number"?`${e}px`:e}function Qi(e,t,o,n={},r=!1){if(r)return e;let i={...n,[Ks]:t,[bn]:o};return`<style ${Object.keys(i).map(a=>{let c=i[a];return c?`${a}="${c}"`:null}).filter(a=>a).join(" ")}>${e}</style>`}function Ju(e){let{hashCls:t,hashPriority:o="low"}=e||{};if(!t)return"";let n=`.${t}`;return o==="low"?`:where(${n})`:n}var Bw=e=>e!=null;function Qa(e,t){let o=typeof t=="function"?t():t;return o?{...e,csp:{...e.csp,nonce:o}}:e}var Ja=(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(),P2=(e,t,o)=>{let{hashCls:n,hashPriority:r="low",scope:i}=o||{};if(!Object.keys(e).length)return"";let s=`${Ju({hashCls:n,hashPriority:r})}.${t}`,a=[i].flat().filter(Boolean);return`${a.length?a.map(l=>`${s}.${l}`).join(", "):s}{${Object.entries(e).map(([l,d])=>`${l}:${d};`).join("")}}`},em=(e,t,o)=>{let{hashCls:n,hashPriority:r="low",prefix:i,unitless:s,ignore:a,preserve:c}=o||{},l={},d={};return Object.entries(e).forEach(([u,m])=>{if(c?.[u])d[u]=m;else if((typeof m=="string"||typeof m=="number")&&!a?.[u]){let p=Ja(u,i);l[p]=typeof m=="number"&&!s?.[u]?`${m}px`:String(m),d[u]=`var(${p})`}}),[d,P2(l,t,{scope:o?.scope,hashCls:n,hashPriority:r})]};var om=M(require("react")),Vw=require("react");function T2(){return!1}var Hw=T2;var tm=new Map;function qs(e,t,o,n,r){let{cache:i}=om.useContext(Or),s=[e,...t],a=Zu(s),c=Hw(),l=m=>{i.opUpdate(a,p=>{let[g=0,f]=p||[void 0,void 0],b=f||o(),x=[g,b];return m?m(x):x})};om.useMemo(()=>{l()},[a]);let u=i.opGet(a)[1];return(0,Vw.useInsertionEffect)(()=>(l(([m,p])=>[m+1,p]),tm.has(a)||(r?.(u),tm.set(a,!0),Promise.resolve().then(()=>{tm.delete(a)})),()=>{i.opUpdate(a,m=>{let[p=0,g]=m||[];return p-1===0?(n?.(g,!1),tm.delete(a),null):[p-1,g]})}),[a]),u}var M2={},k2="css",Gs=new Map;function O2(e){Gs.set(e,(Gs.get(e)||0)+1)}function A2(e,t){typeof document<"u"&&document.querySelectorAll(`style[${Ks}="${e}"]`).forEach(n=>{n[Zr]===t&&n.parentNode?.removeChild(n)})}var L2=-1;function D2(e,t){Gs.set(e,(Gs.get(e)||0)-1);let o=new Set;Gs.forEach((n,r)=>{n<=0&&o.add(r)}),Gs.size-o.size>L2&&o.forEach(n=>{A2(n,t),Gs.delete(n)})}var jw=(e,t,o,n)=>{let i={...o.getDerivativeToken(e),...t};return n&&(i=n(i)),i},ey="token";function nm(e,t,o){let{cache:{instanceId:n},container:r,hashPriority:i}=(0,Ww.useContext)(Or),{salt:s="",override:a=M2,formatToken:c,getComputedToken:l,cssVar:d,nonce:u}=o,m=Fw(()=>Object.assign({},...t),t),p=Za(m),g=Za(a),f=Za(d);return qs(ey,[s,e.id,p,g,f],()=>{let b=l?l(m,a,e):jw(m,a,e,c),x={...b},y=`${s}_${d.prefix}`,S=Yi(y),v=`${k2}-${S}`;x._tokenKey=zw(x,y);let[C,w]=em(b,d.key,{prefix:d.prefix,ignore:d.ignore,unitless:d.unitless,preserve:d.preserve,hashPriority:i,hashCls:d.hashed?v:void 0});return C._hashId=S,O2(d.key),[C,v,x,w,d.key]},([,,,,b])=>{D2(b,n)},([,,,b,x])=>{if(!b)return;let y={mark:bn,prepend:"queue",attachTo:r,priority:-999};y=Qa(y,u);let S=Nn(b,Yi(`css-var-${x}`),y);S[Zr]=n,S.setAttribute(Ks,x)})}var Uw=(e,t,o)=>{let[,,n,r,i]=e,{plain:s}=o||{};if(!r)return null;let a=n._tokenKey,c=-999,l={"data-rc-order":"prependQueue","data-rc-priority":`${c}`},d=Qi(r,i,a,l,s);return[c,a,d]};var bR=require("react");var gR=M(require("react"));var _2={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},ty=_2;var Ht="-ms-",Xs="-moz-",St="-webkit-",rm="comm",el="rule",tl="decl";var Kw="@import";var qw="@namespace",im="@keyframes";var Gw="@layer";var Xw=Math.abs,Ys=String.fromCharCode,Mc=Object.assign;function Yw(e,t){return uo(e,0)^45?(((t<<2^uo(e,0))<<2^uo(e,1))<<2^uo(e,2))<<2^uo(e,3):0}function sm(e){return e.trim()}function Ar(e,t){return(e=t.exec(e))?e[0]:e}function et(e,t,o){return e.replace(t,o)}function am(e,t){return e.indexOf(t)}function uo(e,t){return e.charCodeAt(t)|0}function Lr(e,t,o){return e.slice(t,o)}function rn(e){return e.length}function lm(e){return e.length}function Zs(e,t){return t.push(e),e}function Zw(e,t){return e.map(t).join("")}function oy(e,t){return e.filter(function(o){return!Ar(o,t)})}var cm=1,ol=1,Qw=0,mr=0,wo=0,rl="";function kc(e,t,o,n,r,i,s,a){return{value:e,root:t,parent:o,type:n,props:r,children:i,line:cm,column:ol,length:s,return:"",siblings:a}}function Ci(e,t){return Mc(kc("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Qs(e){for(;e.root;)e=Ci(e.root,{children:[e]});Zs(e,e.siblings)}function Jw(){return wo}function eR(){return wo=mr>0?uo(rl,--mr):0,ol--,wo===10&&(ol=1,cm--),wo}function pr(){return wo=mr<Qw?uo(rl,mr++):0,ol++,wo===10&&(ol=1,cm++),wo}function wi(){return uo(rl,mr)}function Oc(){return mr}function dm(e,t){return Lr(rl,e,t)}function nl(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 tR(e){return cm=ol=1,Qw=rn(rl=e),mr=0,[]}function oR(e){return rl="",e}function um(e){return sm(dm(mr-1,ny(e===91?e+2:e===40?e+1:e)))}function nR(e){for(;(wo=wi())&&wo<33;)pr();return nl(e)>2||nl(wo)>3?"":" "}function rR(e,t){for(;--t&&pr()&&!(wo<48||wo>102||wo>57&&wo<65||wo>70&&wo<97););return dm(e,Oc()+(t<6&&wi()==32&&pr()==32))}function ny(e){for(;pr();)switch(wo){case e:return mr;case 34:case 39:e!==34&&e!==39&&ny(wo);break;case 40:e===41&&ny(e);break;case 92:pr();break}return mr}function iR(e,t){for(;pr()&&e+wo!==57;)if(e+wo===84&&wi()===47)break;return"/*"+dm(t,mr-1)+"*"+Ys(e===47?e:pr())}function sR(e){for(;!nl(wi());)pr();return dm(e,mr)}function ry(e){return oR(mm("",null,null,null,[""],e=tR(e),0,[0],e))}function mm(e,t,o,n,r,i,s,a,c){for(var l=0,d=0,u=s,m=0,p=0,g=0,f=1,h=1,b=1,x=0,y=0,S="",v=r,C=i,w=n,R=S;h;)switch(g=y,y=pr()){case 40:g!=108&&uo(R,u-1)==58?(x++,R+="("):R+=um(y);break;case 41:x--,R+=")";break;case 34:case 39:case 91:R+=um(y);break;case 9:case 10:case 13:case 32:if(x>0){R+=Ys(y);break}R+=nR(g);break;case 92:R+=rR(Oc()-1,7);continue;case 47:switch(wi()){case 42:case 47:Zs(F2(iR(pr(),Oc()),t,o,c),c),(nl(g||1)==5||nl(wi()||1)==5)&&rn(R)&&Lr(R,-1,void 0)!==" "&&(R+=" ");break;default:R+="/"}break;case 123*f:a[l++]=rn(R)*b;case 125*f:case 59:case 0:if(x>0&&y){R+=Ys(y);break}switch(y){case 0:case 125:h=0;case 59+d:b==-1&&(R=et(R,/\f/g,"")),p>0&&(rn(R)-u||f===0)&&Zs(p>32?lR(R+";",n,o,u-1,c):lR(et(R," ","")+";",n,o,u-2,c),c);break;case 59:R+=";";default:if(Zs(w=aR(R,t,o,l,d,r,a,S,v=[],C=[],u,i),i),y===123)if(d===0)mm(R,t,w,w,v,i,u,a,C);else{switch(m){case 99:if(uo(R,3)===110)break;case 108:if(uo(R,2)===97)break;default:d=0;case 100:case 109:case 115:}d?mm(e,w,w,n&&Zs(aR(e,w,w,0,0,r,a,S,r,v=[],u,C),C),r,C,u,a,n?v:C):mm(R,w,w,w,[""],C,0,a,C)}}l=d=p=0,f=b=1,S=R="",u=s;break;case 58:u=1+rn(R),p=g;default:if(f<1){if(y==123)--f;else if(y==125&&f++==0&&eR()==125)continue}switch(R+=Ys(y),y*f){case 38:b=d>0?1:(R+="\f",-1);break;case 44:if(x>0)break;a[l++]=(rn(R)-1)*b,b=1;break;case 64:wi()===45&&(R+=um(pr())),m=wi(),d=u=rn(S=R+=sR(Oc())),y++;break;case 45:g===45&&rn(R)==2&&(f=0)}}return i}function aR(e,t,o,n,r,i,s,a,c,l,d,u){for(var m=r-1,p=r===0?i:[""],g=lm(p),f=0,h=0,b=0;f<n;++f)for(var x=0,y=Lr(e,m+1,m=Xw(h=s[f])),S=e;x<g;++x)(S=sm(h>0?p[x]+" "+y:et(y,/&\f/g,p[x])))&&(c[b++]=S);return kc(e,t,o,r===0?el:a,c,l,d,u)}function F2(e,t,o,n){return kc(e,t,o,rm,Ys(Jw()),Lr(e,2,-2),0,n)}function lR(e,t,o,n,r){return kc(e,t,o,tl,Lr(e,0,n),Lr(e,n+1,-1),n,r)}function iy(e,t,o){switch(Yw(e,t)){case 5103:return St+"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 St+e+e;case 4855:return St+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Xs+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return St+e+Xs+e+Ht+e+e;case 5936:switch(uo(e,t+11)){case 114:return St+e+Ht+et(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return St+e+Ht+et(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return St+e+Ht+et(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return St+e+Ht+e+e;case 6165:return St+e+Ht+"flex-"+e+e;case 5187:return St+e+et(e,/(\w+).+(:[^]+)/,St+"box-$1$2"+Ht+"flex-$1$2")+e;case 5443:return St+e+Ht+"flex-item-"+et(e,/flex-|-self/g,"")+(Ar(e,/flex-|baseline/)?"":Ht+"grid-row-"+et(e,/flex-|-self/g,""))+e;case 4675:return St+e+Ht+"flex-line-pack"+et(e,/align-content|flex-|-self/g,"")+e;case 5548:return St+e+Ht+et(e,"shrink","negative")+e;case 5292:return St+e+Ht+et(e,"basis","preferred-size")+e;case 6060:return St+"box-"+et(e,"-grow","")+St+e+Ht+et(e,"grow","positive")+e;case 4554:return St+et(e,/([^-])(transform)/g,"$1"+St+"$2")+e;case 6187:return et(et(et(e,/(zoom-|grab)/,St+"$1"),/(image-set)/,St+"$1"),e,"")+e;case 5495:case 3959:return et(e,/(image-set\([^]*)/,St+"$1$`$1");case 4968:return et(et(e,/(.+:)(flex-)?(.*)/,St+"box-pack:$3"+Ht+"flex-pack:$3"),/space-between/,"justify")+St+e+e;case 4200:if(!Ar(e,/flex-|baseline/))return Ht+"grid-column-align"+Lr(e,t)+e;break;case 2592:case 3360:return Ht+et(e,"template-","")+e;case 4384:case 3616:return o&&o.some(function(n,r){return t=r,Ar(n.props,/grid-\w+-end/)})?~am(e+(o=o[t].value),"span")?e:Ht+et(e,"-start","")+e+Ht+"grid-row-span:"+(~am(o,"span")?Ar(o,/\d+/):+Ar(o,/\d+/)-+Ar(e,/\d+/))+";":Ht+et(e,"-start","")+e;case 4896:case 4128:return o&&o.some(function(n){return Ar(n.props,/grid-\w+-start/)})?e:Ht+et(et(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return et(e,/(.+)-inline(.+)/,St+"$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(rn(e)-1-t>6)switch(uo(e,t+1)){case 109:if(uo(e,t+4)!==45)break;case 102:return et(e,/(.+:)(.+)-([^]+)/,"$1"+St+"$2-$3$1"+Xs+(uo(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~am(e,"stretch")?iy(et(e,"stretch","fill-available"),t,o)+e:e}break;case 5152:case 5920:return et(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,r,i,s,a,c,l){return Ht+r+":"+i+l+(s?Ht+r+"-span:"+(a?c:+c-+i)+l:"")+e});case 4949:if(uo(e,t+6)===121)return et(e,":",":"+St)+e;break;case 6444:switch(uo(e,uo(e,14)===45?18:11)){case 120:return et(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+St+(uo(e,14)===45?"inline-":"")+"box$3$1"+St+"$2$3$1"+Ht+"$2box$3")+e;case 100:return et(e,":",":"+Ht)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return et(e,"scroll-","scroll-snap-")+e}return e}function Js(e,t){for(var o="",n=0;n<e.length;n++)o+=t(e[n],n,e,t)||"";return o}function sy(e,t,o,n){switch(e.type){case Gw:if(e.children.length)break;case Kw:case qw:case tl:return e.return=e.return||e.value;case rm:return"";case im:return e.return=e.value+"{"+Js(e.children,n)+"}";case el:if(!rn(e.value=e.props.join(",")))return""}return rn(o=Js(e.children,n))?e.return=e.value+"{"+o+"}":""}function cR(e){var t=lm(e);return function(o,n,r,i){for(var s="",a=0;a<t;a++)s+=e[a](o,n,r,i)||"";return s}}function dR(e,t,o,n){if(e.length>-1&&!e.return)switch(e.type){case tl:e.return=iy(e.value,e.length,o);return;case im:return Js([Ci(e,{value:et(e.value,"@","@"+St)})],n);case el:if(e.length)return Zw(o=e.props,function(r){switch(Ar(r,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Qs(Ci(e,{props:[et(r,/:(read-\w+)/,":"+Xs+"$1")]})),Qs(Ci(e,{props:[r]})),Mc(e,{props:oy(o,n)});break;case"::placeholder":Qs(Ci(e,{props:[et(r,/:(plac\w+)/,":"+St+"input-$1")]})),Qs(Ci(e,{props:[et(r,/:(plac\w+)/,":"+Xs+"$1")]})),Qs(Ci(e,{props:[et(r,/:(plac\w+)/,Ht+"input-$1")]})),Qs(Ci(e,{props:[r]})),Mc(e,{props:oy(o,n)});break}return""})}}var ay="data-ant-cssinjs-cache-path",ly="_FILE_STYLE__";var ea,uR=!0;function W2(){if(!ea&&(ea={},Ut())){let e=document.createElement("div");e.className=ay,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(n=>{let[r,i]=n.split(":");ea[r]=i});let o=document.querySelector(`style[${ay}]`);o&&(uR=!1,o.parentNode?.removeChild(o)),document.body.removeChild(e)}}function mR(e){return W2(),!!ea[e]}function pR(e){let t=ea[e],o=null;if(t&&Ut())if(uR)o=ly;else{let n=document.querySelector(`style[${bn}="${ea[e]}"]`);n?o=n.innerHTML:delete ea[e]}return[o,t]}var j2="_skip_check_",hR="_multi_value_";function pm(e,t){return(t?Js(ry(e),cR([dR,sy])):Js(ry(e),sy)).replace(/\{%%%\:[^;];}/g,";")}function U2(e){return typeof e=="object"&&e&&(j2 in e||hR in e)}function fR(e,t,o="high"){if(!t)return e;let n=Ju({hashCls:t,hashPriority:o});return e.split(",").map(i=>{let s=i.trim().split(/\s+/),a=s[0]||"",c=a.match(/^\w+/)?.[0]||"";return a=`${c}${n}${a.slice(c.length)}`,[a,...s.slice(1)].join(" ")}).join(",")}var cy=(e,t={},{root:o,injectHash:n,parentSelectors:r}={root:!0,parentSelectors:[]})=>{let{hashId:i,layer:s,path:a,hashPriority:c,transformers:l=[],linters:d=[]}=t,u="",m={};function p(h){let b=h.getName(i);if(!m[b]){let[x]=cy(h.style,t,{root:!1,parentSelectors:r});m[b]=`@keyframes ${h.getName(i)}${x}`}}function g(h,b=[]){return h.forEach(x=>{Array.isArray(x)?g(x,b):x&&b.push(x)}),b}return g(Array.isArray(e)?e:[e]).forEach(h=>{let b=typeof h=="string"&&!o?{}:h;if(typeof b=="string")u+=`${b}
33
- `;else if(b._keyframe)p(b);else{let x=l.reduce((y,S)=>S?.visit?.(y)||y,b);Object.keys(x).forEach(y=>{let S=x[y];if(typeof S=="object"&&S&&(y!=="animationName"||!S._keyframe)&&!U2(S)){let v=!1,C=y.trim(),w=!1;(o||n)&&i?C.startsWith("@")?v=!0:C==="&"?C=fR("",i,c):C=fR(y,i,c):o&&!i&&(C==="&"||C==="")&&(C="",w=!0);let[R,T]=cy(S,t,{root:w,injectHash:v,parentSelectors:[...r,C]});m={...m,...T},u+=`${C}${R}`}else{let v=function(w,R){let T=w.replace(/[A-Z]/g,I=>`-${I.toLowerCase()}`),N=R;!ty[w]&&typeof N=="number"&&N!==0&&(N=`${N}px`),w==="animationName"&&R?._keyframe&&(p(R),N=R.getName(i)),u+=`${T}:${N};`},C=S?.value??S;typeof S=="object"&&S?.[hR]&&Array.isArray(C)?C.forEach(w=>{v(y,w)}):Bw(C)&&v(y,C)}})}}),o?s&&(u&&(u=`@layer ${s.name} {${u}}`),s.dependencies&&(m[`@layer ${s.name}`]=s.dependencies.map(h=>`@layer ${h}, ${s.name};`).join(`
34
- `))):u=`{${u}}`,[u,m]};function dy(e,t){return Yi(`${e.join("%")}${t}`)}var uy="style";function Ji(e,t){let{path:o,hashId:n,layer:r,nonce:i,clientOnly:s,order:a=0}=e,{mock:c,hashPriority:l,container:d,transformers:u,linters:m,cache:p,layer:g,autoPrefix:f}=gR.useContext(Or),h=[n||""];g&&h.push("layer"),h.push(...o);let b=Tc;qs(uy,h,()=>{let x=h.join("|");if(mR(x)){let[R,T]=pR(x);if(R)return[R,T,{},s,a]}let y=t(),[S,v]=cy(y,{hashId:n,hashPriority:l,layer:g?r:void 0,path:o.join("-"),transformers:u,linters:m}),C=pm(S,f||!1),w=dy(h,C);return[C,w,v,s,a]},(x,y)=>{let[,S]=x;y&&Tc&&Mr(S,{mark:bn,attachTo:d})},x=>{let[y,S,v,,C]=x;if(b&&y!==ly){let w={mark:bn,prepend:g?!1:"queue",attachTo:d,priority:C};w=Qa(w,i);let R=[],T=[];Object.keys(v).forEach(I=>{I.startsWith("@layer")?R.push(I):T.push(I)}),R.forEach(I=>{Nn(pm(v[I],f||!1),`_layer-${I}`,{...w,prepend:!0})});let N=Nn(y,S,w);N[Zr]=p.instanceId,T.forEach(I=>{Nn(pm(v[I],f||!1),`_effect-${I}`,w)})}})}var yR=(e,t,o)=>{let[n,r,i,s,a]=e,{plain:c,autoPrefix:l}=o||{};if(s)return null;let d=n,u={"data-rc-order":"prependQueue","data-rc-priority":`${a}`};return d=Qi(n,void 0,r,u,c),i&&Object.keys(i).forEach(m=>{if(!t[m]){t[m]=!0;let p=pm(i[m],l||!1),g=Qi(p,void 0,`_effect-${m}`,u,c);m.startsWith("@layer")?d=g+d:d+=g}}),[a,r,d]};var my="cssVar",K2=(e,t)=>{let{key:o,prefix:n,unitless:r,ignore:i,token:s,hashId:a,scope:c,nonce:l}=e,{cache:{instanceId:d},container:u,hashPriority:m}=(0,bR.useContext)(Or),{_tokenKey:p}=s,g=Array.isArray(c)?c.join("@@"):c,f=[...e.path,o,g,p];return qs(my,f,()=>{let b=t(),[x,y]=em(b,o,{prefix:n,unitless:r,ignore:i,scope:c,hashPriority:m,hashCls:a}),S=dy(f,y);return[x,y,S,o]},([,,b])=>{Tc&&Mr(b,{mark:bn,attachTo:u})},([,b,x])=>{if(!b)return;let y={mark:bn,prepend:"queue",attachTo:u,priority:-999};y=Qa(y,l);let S=Nn(b,x,y);S[Zr]=d,S.setAttribute(Ks,o)})},xR=(e,t,o)=>{let[,n,r,i]=e,{plain:s}=o||{};if(!n)return null;let a=-999,c={"data-rc-order":"prependQueue","data-rc-priority":`${a}`},l=Qi(n,i,r,c,s);return[a,r,l]},py=K2;var j7={[uy]:yR,[ey]:Uw,[my]:xR};var fy=class{name;style;constructor(t,o){this.name=t,this.style=o}getName(t=""){return t?`${t}-${this.name}`:this.name}_keyframe=!0},ot=fy;function il(e){return e.notSplit=!0,e}var q7={inset:["top","right","bottom","left"],insetBlock:["top","bottom"],insetBlockStart:["top"],insetBlockEnd:["bottom"],insetInline:["left","right"],insetInlineStart:["left"],insetInlineEnd:["right"],marginBlock:["marginTop","marginBottom"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],marginInline:["marginLeft","marginRight"],marginInlineStart:["marginLeft"],marginInlineEnd:["marginRight"],paddingBlock:["paddingTop","paddingBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"],paddingInline:["paddingLeft","paddingRight"],paddingInlineStart:["paddingLeft"],paddingInlineEnd:["paddingRight"],borderBlock:il(["borderTop","borderBottom"]),borderBlockStart:il(["borderTop"]),borderBlockEnd:il(["borderBottom"]),borderInline:il(["borderLeft","borderRight"]),borderInlineStart:il(["borderLeft"]),borderInlineEnd:il(["borderRight"]),borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndWidth:["borderBottomWidth"],borderInlineWidth:["borderLeftWidth","borderRightWidth"],borderInlineStartWidth:["borderLeftWidth"],borderInlineEndWidth:["borderRightWidth"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderBlockStartStyle:["borderTopStyle"],borderBlockEndStyle:["borderBottomStyle"],borderInlineStyle:["borderLeftStyle","borderRightStyle"],borderInlineStartStyle:["borderLeftStyle"],borderInlineEndStyle:["borderRightStyle"],borderBlockColor:["borderTopColor","borderBottomColor"],borderBlockStartColor:["borderTopColor"],borderBlockEndColor:["borderBottomColor"],borderInlineColor:["borderLeftColor","borderRightColor"],borderInlineStartColor:["borderLeftColor"],borderInlineEndColor:["borderRightColor"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"]};var vR=require("react"),q2=(0,vR.createContext)({}),sl=q2;var SR=require("react"),CR=(0,SR.createContext)(void 0);var ll=M(require("react"));var G2={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"},wR=G2;var RR={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};var X2={...RR,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"},ER=X2;var Y2={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},fm=Y2;var Z2={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"],...ER},timePickerLocale:{...fm}},gm=Z2;var $R=gm;var Xn="${label} is not a valid ${type}",Q2={locale:"en",Pagination:wR,DatePicker:gm,TimePicker:fm,Calendar:$R,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:Xn,method:Xn,array:Xn,object:Xn,number:Xn,date:Xn,boolean:Xn,integer:Xn,float:Xn,regexp:Xn,email:Xn,url:Xn,hex:Xn},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"}},Yn=Q2;var hm={...Yn.Modal},ym=[],IR=()=>ym.reduce((e,t)=>({...e,...t}),Yn.Modal);function NR(e){if(e){let t={...e};return ym.push(t),hm=IR(),()=>{ym=ym.filter(o=>o!==t),hm=IR()}}hm={...Yn.Modal}}function bm(){return hm}var PR=require("react"),J2=(0,PR.createContext)(void 0),al=J2;var Lc=M(require("react"));var eL=(e,t)=>{let o=Lc.useContext(al),n=Lc.useMemo(()=>{let i=t||Yn[e],s=o?.[e]??{};return{...ct(i)?i():i,...s||{}}},[e,t,o]),r=Lc.useMemo(()=>{let i=o?.locale;return o?.exist&&!i?Yn.locale:i},[o]);return[n,r]},qo=eL;var TR="internalMark",tL=e=>{let{locale:t={},children:o,_ANT_MARK__:n}=e;ll.useEffect(()=>NR(t?.Modal),[t]);let r=ll.useMemo(()=>({...t,exist:!0}),[t]);return ll.createElement(al.Provider,{value:r},o)},MR=tL;var kR=M(require("react"));var oL=Zi(Ws),Dc=oL;var _c={token:vi,override:{override:vi},hashed:!0},Fc=kR.default.createContext(_c);var Uy=M(require("react"));var fr=M(require("react")),WR=require("react-dom");var OR=M(require("react")),nL=OR.createContext(null),xm=nL;var AR=!1;function gy(e){return typeof e=="boolean"&&(AR=e),AR}var ta=M(require("react"));var LR=[];function hy(e,t){let[o]=ta.useState(()=>Ut()?document.createElement("div"):null),n=ta.useRef(!1),r=ta.useContext(xm),[i,s]=ta.useState(LR),a=r||(n.current?void 0:d=>{s(u=>[d,...u])});function c(){o.parentElement||document.body.appendChild(o),n.current=!0}function l(){o.parentElement?.removeChild(o),n.current=!1}return rt(()=>(e?r?r(c):c():l(),l),[e]),rt(()=>{i.length&&(i.forEach(d=>d()),s(LR))},[i]),[o,a]}var FR=M(require("react"));function DR(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var rL=`rc-util-locker-${Date.now()}`,_R=0;function yy(e){let t=!!e,[o]=FR.useState(()=>(_R+=1,`${rL}_${_R}`));rt(()=>{if(t){let n=jh(document.body).width,r=DR();Nn(`
35
- html body {
36
- overflow-y: hidden;
37
- ${r?`width: calc(100% - ${n}px);`:""}
38
- }`,o)}else Mr(o);return()=>{Mr(o)}},[t,o])}var vm=require("react"),oa=[],iL=200,zR=0;var BR=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-zR<iL)return;let o=oa.length;for(let n=o-1;n>=0;n-=1)oa[n].onEsc({top:n===o-1,event:e})}},HR=()=>{zR=Date.now()};function sL(){window.addEventListener("keydown",BR),window.addEventListener("compositionend",HR)}function aL(){oa.length===0&&(window.removeEventListener("keydown",BR),window.removeEventListener("compositionend",HR))}function by(e,t){let o=Co(),n=Ne(t),r=()=>{oa.find(s=>s.id===o)||oa.push({id:o,onEsc:n})},i=()=>{oa=oa.filter(s=>s.id!==o)};(0,vm.useMemo)(()=>{e?r():e||i()},[e]),(0,vm.useEffect)(()=>{if(e)return r(),sL(),()=>{i(),aL()}},[e])}var VR=e=>e===!1?!1:!Ut()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,lL=fr.forwardRef((e,t)=>{let{open:o,autoLock:n,getContainer:r,debug:i,autoDestroy:s=!0,children:a,onEsc:c}=e,[l,d]=fr.useState(o),u=l||o;fr.useEffect(()=>{(s||o)&&d(o)},[o,s]);let[m,p]=fr.useState(()=>VR(r));fr.useEffect(()=>{let v=VR(r);p(()=>v??null)});let[g,f]=hy(u&&!m,i),h=m??g;yy(n&&o&&Ut()&&(h===g||h===document.body)),by(o,c);let b=null;a&&ur(a)&&t&&(b=To(a));let x=bo(b,t);if(!u||!Ut()||m===void 0)return null;let y=h===!1||gy(),S=a;return t&&(S=fr.cloneElement(a,{ref:x})),fr.createElement(xm.Provider,{value:f},y?S:(0,WR.createPortal)(S,h))}),jR=lL;var na=jR;var Cm=M(require("react"));var gr=M(require("react"));var Dr=M(require("react")),Sm=Dr.createContext(null);function UR({children:e,onBatchResize:t}){let o=Dr.useRef(0),n=Dr.useRef([]),r=Dr.useContext(Sm),i=Dr.useCallback((s,a,c)=>{o.current+=1;let l=o.current;n.current.push({size:s,element:a,data:c}),Promise.resolve().then(()=>{l===o.current&&(t?.(n.current),n.current=[])}),r?.(s,a,c)},[t,r]);return Dr.createElement(Sm.Provider,{value:i},e)}var zc=M(require("react"));var es=new Map;function cL(e){e.forEach(t=>{let{target:o}=t;es.get(o)?.forEach(n=>n(o))})}var xy;function KR(){return xy||(xy=new ResizeObserver(cL)),xy}function qR(e,t){es.has(e)||(es.set(e,new Set),KR().observe(e)),es.get(e).add(t)}function GR(e,t){es.has(e)&&(es.get(e).delete(t),es.get(e).size||(KR().unobserve(e),es.delete(e)))}function cl(e,t,o,n){let r=zc.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),i=Ne(c=>{let{width:l,height:d}=c.getBoundingClientRect(),{offsetWidth:u,offsetHeight:m}=c,p=Math.floor(l),g=Math.floor(d);if(r.current.width!==p||r.current.height!==g||r.current.offsetWidth!==u||r.current.offsetHeight!==m){let f={width:p,height:g,offsetWidth:u,offsetHeight:m};r.current=f;let h=u===Math.round(l)?l:u,b=m===Math.round(d)?d:m,x={...f,offsetWidth:h,offsetHeight:b};n?.(x,c),Promise.resolve().then(()=>{o?.(x,c)})}}),s=typeof t=="function",a=zc.useRef(0);zc.useEffect(()=>{let c=s?t():t;return c&&e?qR(c,i):e&&s&&(a.current+=1),()=>{c&&GR(c,i)}},[e,s?a.current:t])}function dL(e,t){let{children:o,disabled:n,onResize:r,data:i}=e,s=gr.useRef(null),a=gr.useContext(Sm),c=typeof o=="function",l=c?o(s):o,d=!c&&gr.isValidElement(l)&&ur(l),u=d?To(l):null,m=bo(u,s),p=()=>Gn(s.current);return gr.useImperativeHandle(t,()=>p()),cl(!n,p,r,(g,f)=>{a?.(g,f,i)}),d?gr.cloneElement(l,{ref:m}):l}var uL=gr.forwardRef(dL),XR=uL;function vy(){return vy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},vy.apply(this,arguments)}var mL="rc-observer-key";function pL(e,t){let{children:o}=e;return(typeof o=="function"?[o]:co(o)).map((r,i)=>{let s=r?.key||`${mL}-${i}`;return Cm.createElement(XR,vy({},e,{key:s,ref:i===0?t:void 0}),r)})}var YR=Cm.forwardRef(pL);YR.Collection=UR;var sn=YR;var ft=M(require("react"));var kn=M(require("react")),cE=require("react");var dl=M(require("react")),Sy=dl.createContext({}),fL=e=>{let{children:t,...o}=e,n=dl.useMemo(()=>({motion:o.motion}),[o.motion]);return dl.createElement(Sy.Provider,{value:n},t)},Cy=fL;var ra=M(require("react")),Ei=require("react");var hr="none",Bc="appear",Hc="enter",Vc="leave",wy="none",Mn="prepare",Qr="start",Ri="active",wm="end",Rm="prepared";var oE=M(require("react")),nE=require("react");function ZR(e,t){let o={};return o[e.toLowerCase()]=t.toLowerCase(),o[`Webkit${e}`]=`webkit${t}`,o[`Moz${e}`]=`moz${t}`,o[`ms${e}`]=`MS${t}`,o[`O${e}`]=`o${t.toLowerCase()}`,o}function gL(e,t){let o={animationend:ZR("Animation","AnimationEnd"),transitionend:ZR("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete o.animationend.animation,"TransitionEvent"in t||delete o.transitionend.transition),o}var hL=gL(Ut(),typeof window<"u"?window:{}),QR={};Ut()&&({style:QR}=document.createElement("div"));var Em={};function JR(e){if(Em[e])return Em[e];let t=hL[e];if(t){let o=Object.keys(t),n=o.length;for(let r=0;r<n;r+=1){let i=o[r];if(Object.prototype.hasOwnProperty.call(t,i)&&i in QR)return Em[e]=t[i],Em[e]}}return""}var eE=JR("animationend"),tE=JR("transitionend"),$m=!!(eE&&tE),Ry=eE||"animationend",Ey=tE||"transitionend";function $y(e,t){if(!e)return null;if(typeof e=="object"){let o=t.replace(/-\w/g,n=>n[1].toUpperCase());return e[o]}return`${e}-${t}`}var rE=e=>{let t=(0,nE.useRef)();function o(r){r&&(r.removeEventListener(Ey,e),r.removeEventListener(Ry,e))}function n(r){t.current&&t.current!==r&&o(t.current),r&&r!==t.current&&(r.addEventListener(Ey,e),r.addEventListener(Ry,e),t.current=r)}return oE.useEffect(()=>()=>{o(t.current),t.current=null},[]),[n,o]};var Im=require("react"),yL=Ut()?Im.useLayoutEffect:Im.useEffect,Nm=yL;var sE=M(require("react"));var Pm=M(require("react")),iE=()=>{let e=Pm.useRef(null);function t(){Ve.cancel(e.current)}function o(n,r=2){t();let i=Ve(()=>{r<=1?n({isCanceled:()=>i!==e.current}):o(n,r-1)});e.current=i}return Pm.useEffect(()=>()=>{t()},[]),[o,t]};var bL=[Mn,Qr,Ri,wm],xL=[Mn,Rm],Iy=!1,aE=!0;function Tm(e){return e===Ri||e===wm}var lE=(e,t,o)=>{let[n,r]=Ua(wy),[i,s]=iE();function a(){r(Mn,!0)}let c=t?xL:bL;return Nm(()=>{if(n!==wy&&n!==wm){let l=c.indexOf(n),d=c[l+1],u=o(n);u===Iy?r(d,!0):d&&i(m=>{function p(){m.isCanceled()||r(d,!0)}u===!0?p():Promise.resolve(u).then(p)})}},[e,n]),sE.useEffect(()=>()=>{s()},[]),[a,n]};function Ny(e,t,o,{motionEnter:n=!0,motionAppear:r=!0,motionLeave:i=!0,motionDeadline:s,motionLeaveImmediately:a,onAppearPrepare:c,onEnterPrepare:l,onLeavePrepare:d,onAppearStart:u,onEnterStart:m,onLeaveStart:p,onAppearActive:g,onEnterActive:f,onLeaveActive:h,onAppearEnd:b,onEnterEnd:x,onLeaveEnd:y,onVisibleChanged:S}){let[v,C]=ra.useState(),[w,R]=kh(hr),[T,N]=ra.useState([null,null]),I=w(),E=(0,Ei.useRef)(!1),k=(0,Ei.useRef)(null);function F(){return o()}let A=(0,Ei.useRef)(!1);function z(){R(hr),N([null,null])}let D=Ne(Q=>{let X=w();if(X===hr)return;let U=F();if(Q&&!Q.deadline&&Q.target!==U)return;let J=A.current,P;X===Bc&&J?P=b?.(U,Q):X===Hc&&J?P=x?.(U,Q):X===Vc&&J&&(P=y?.(U,Q)),J&&P!==!1&&z()}),[_]=rE(D),V=Q=>{switch(Q){case Bc:return{[Mn]:c,[Qr]:u,[Ri]:g};case Hc:return{[Mn]:l,[Qr]:m,[Ri]:f};case Vc:return{[Mn]:d,[Qr]:p,[Ri]:h};default:return{}}},L=ra.useMemo(()=>V(I),[I]),[G,H]=lE(I,!e,Q=>{if(Q===Mn){let X=L[Mn];return X?X(F()):Iy}return Q in L&&N([L[Q]?.(F(),null)||null,Q]),Q===Ri&&I!==hr&&(_(F()),s>0&&(clearTimeout(k.current),k.current=setTimeout(()=>{D({deadline:!0})},s))),Q===Rm&&z(),aE}),W=Tm(H);A.current=W;let Z=(0,Ei.useRef)(null);Nm(()=>{if(E.current&&Z.current===t)return;C(t);let Q=E.current;E.current=!0;let X;!Q&&t&&r&&(X=Bc),Q&&t&&n&&(X=Hc),(Q&&!t&&i||!Q&&a&&!t&&i)&&(X=Vc);let U=V(X);X&&(e||U[Mn])?(R(X),G()):R(hr),Z.current=t},[t]),(0,Ei.useEffect)(()=>{(I===Bc&&!r||I===Hc&&!n||I===Vc&&!i)&&R(hr)},[r,n,i]),(0,Ei.useEffect)(()=>()=>{E.current=!1,clearTimeout(k.current)},[]);let B=ra.useRef(!1);(0,Ei.useEffect)(()=>{v&&(B.current=!0),v!==void 0&&I===hr&&((B.current||v)&&S?.(v),B.current=!0)},[v,I]);let K=T[0];L[Mn]&&H===Qr&&(K={transition:"none",...K});let j=T[1];return[w,H,K,v??t,!E.current&&I===hr&&e&&r?"NONE":H===Qr||H===Ri?j===H:!0]}function Py(e){return e?.length<2}function dE(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function o(r,i){return!!(r.motionName&&t&&i!==!1)}let n=kn.forwardRef((r,i)=>{let{visible:s=!0,removeOnLeave:a=!0,forceRender:c,children:l,motionName:d,leavedClassName:u,eventProps:m}=r,{motion:p}=kn.useContext(Sy),g=o(r,p),f=(0,cE.useRef)();function h(){return Gn(f.current)}let[b,x,y,S,v]=Ny(g,s,h,r),C=b(),w=kn.useRef(S);S&&(w.current=!0);let R=kn.useMemo(()=>{let I={};return Object.defineProperties(I,{nativeElement:{enumerable:!0,get:h},inMotion:{enumerable:!0,get:()=>()=>b()!==hr},enableMotion:{enumerable:!0,get:()=>()=>g}}),I},[]);kn.useImperativeHandle(i,()=>R,[]);let T=kn.useRef(0);v&&(T.current+=1);let N=kn.useMemo(()=>{if(v==="NONE")return null;let I,E={...m,visible:s};if(!l)I=null;else if(C===hr)S?I=l({...E},f):!a&&w.current&&u?I=l({...E,className:u},f):c||!a&&!u?I=l({...E,style:{display:"none"}},f):I=null;else{let k;x===Mn?k="prepare":Tm(x)?k="active":x===Qr&&(k="start");let F=$y(d,`${C}-${k}`);I=l({...E,className:$($y(d,C),{[F]:F&&k,[d]:typeof d=="string"}),style:y},f)}return I},[T.current]);if(Py(l)&&Rc(N)){let I=To(N);if(I!==f)return kn.cloneElement(N,{ref:Mt(I,f)})}return N});return n.displayName="CSSMotion",n}var Mm=dE($m);var ia=M(require("react"));var km="add",Om="keep",Am="remove",Dm="removed";function vL(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function Lm(e=[]){return e.map(vL)}function uE(e=[],t=[]){let o=[],n=0,r=t.length,i=Lm(e),s=Lm(t);i.forEach(l=>{let d=!1;for(let u=n;u<r;u+=1){let m=s[u];if(m.key===l.key){n<u&&(o=o.concat(s.slice(n,u).map(p=>({...p,status:km}))),n=u),o.push({...m,status:Om}),n+=1,d=!0;break}}d||o.push({...l,status:Am})}),n<r&&(o=o.concat(s.slice(n).map(l=>({...l,status:km}))));let a={};return o.forEach(({key:l})=>{a[l]=(a[l]||0)+1}),Object.keys(a).filter(l=>a[l]>1).forEach(l=>{o=o.filter(({key:d,status:u})=>d!==l||u!==Am),o.forEach(d=>{d.key===l&&(d.status=Om)})}),o}function Ty(){return Ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Ty.apply(this,arguments)}var SL=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function CL(e,t=Mm){class o extends ia.Component{static defaultProps={component:"div"};state={keyEntities:[]};static getDerivedStateFromProps({keys:r},{keyEntities:i}){let s=Lm(r);return{keyEntities:uE(i,s).filter(c=>{let l=i.find(({key:d})=>c.key===d);return!(l&&l.status===Dm&&c.status===Am)})}}removeKey=r=>{this.setState(i=>({keyEntities:i.keyEntities.map(a=>a.key!==r?a:{...a,status:Dm})}),()=>{let{keyEntities:i}=this.state;i.filter(({status:a})=>a!==Dm).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved()})};render(){let{keyEntities:r}=this.state,{component:i,children:s,onVisibleChanged:a,onAllRemoved:c,...l}=this.props,d=i||ia.Fragment,u={};return SL.forEach(m=>{u[m]=l[m],delete l[m]}),delete l.keys,ia.createElement(d,l,r.map(({status:m,...p},g)=>{let f=m===km||m===Om;return ia.createElement(t,Ty({},u,{key:p.key,visible:f,eventProps:p,onVisibleChanged:h=>{a?.(h,{key:p.key}),h||this.removeKey(p.key)}}),Py(s)?h=>s({...h,index:g}):(h,b)=>s({...h,index:g},b))}))}}return o}var wL=CL($m);var fo=Mm;var On=M(require("react"));var _m=M(require("react"));function My(e){let{prefixCls:t,align:o,arrow:n,arrowPos:r}=e,{className:i,content:s,style:a}=n||{},{x:c=0,y:l=0}=r,d=_m.useRef(null);if(!o||!o.points)return null;let u={position:"absolute"};if(o.autoArrow!==!1){let m=o.points[0],p=o.points[1],g=m[0],f=m[1],h=p[0],b=p[1];g===h||!["t","b"].includes(g)?u.top=l:g==="t"?u.top=0:u.bottom=0,f===b||!["l","r"].includes(f)?u.left=c:f==="l"?u.left=0:u.right=0}return _m.createElement("div",{ref:d,className:$(`${t}-arrow`,i),style:{...u,...a}},s)}var Oy=M(require("react"));function ky(){return ky=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},ky.apply(this,arguments)}function Ay(e){let{prefixCls:t,open:o,zIndex:n,mask:r,motion:i,mobile:s}=e;return r?Oy.createElement(fo,ky({},i,{motionAppear:!0,visible:o,removeOnLeave:!0}),({className:a})=>Oy.createElement("div",{style:{zIndex:n},className:$(`${t}-mask`,s&&`${t}-mobile-mask`,a)})):null}var mE=M(require("react")),RL=mE.memo(({children:e})=>e,(e,t)=>t.cache),pE=RL;function Wc(e,t,o,n,r,i,s,a){let c="auto",l=e?{}:{left:"-1000vw",top:"-1000vh",right:c,bottom:c};if(!e&&(t||!o)){let{points:d}=n,u=n.dynamicInset||n._experimental?.dynamicInset,m=u&&d[0][1]==="r",p=u&&d[0][0]==="b";m?(l.right=r,l.left=c):(l.left=s,l.right=c),p?(l.bottom=i,l.top=c):(l.top=a,l.bottom=c)}return l}function Ly(){return Ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Ly.apply(this,arguments)}var EL=On.forwardRef((e,t)=>{let{onEsc:o,popup:n,className:r,prefixCls:i,style:s,target:a,onVisibleChanged:c,open:l,keepDom:d,fresh:u,onClick:m,mask:p,arrow:g,arrowPos:f,align:h,motion:b,maskMotion:x,mobile:y,forceRender:S,getPopupContainer:v,autoDestroy:C,portal:w,children:R,zIndex:T,onMouseEnter:N,onMouseLeave:I,onPointerEnter:E,onPointerDownCapture:k,ready:F,offsetX:A,offsetY:z,offsetR:D,offsetB:_,onAlign:V,onPrepare:L,onResize:G,stretch:H,targetWidth:W,targetHeight:Z}=e,B=typeof n=="function"?n():n,K=l||d,j=!!y,[Q,X,U]=On.useMemo(()=>y?[y.mask,y.maskMotion,y.motion]:[p,x,b],[y,p,x,b]),J=v?.length>0,[P,O]=On.useState(!v||!J);rt(()=>{!P&&J&&a&&O(!0)},[P,J,a]);let q=Ne((re,ie)=>{G?.(re,ie),V()}),ee=Wc(j,F,l,h,D,_,A,z);if(!P)return null;let le={};return H&&(H.includes("height")&&Z?le.height=Z:H.includes("minHeight")&&Z&&(le.minHeight=Z),H.includes("width")&&W?le.width=W:H.includes("minWidth")&&W&&(le.minWidth=W)),l||(le.pointerEvents="none"),On.createElement(w,{open:S||K,getContainer:v&&(()=>v(a)),autoDestroy:C,onEsc:o},On.createElement(Ay,{prefixCls:i,open:l,zIndex:T,mask:Q,motion:X,mobile:j}),On.createElement(sn,{onResize:q,disabled:!l},re=>On.createElement(fo,Ly({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:S,leavedClassName:`${i}-hidden`},U,{onAppearPrepare:L,onEnterPrepare:L,visible:l,onVisibleChanged:ie=>{b?.onVisibleChanged?.(ie),c(ie)}}),({className:ie,style:Ce},de)=>{let $e=$(i,ie,r,{[`${i}-mobile`]:j});return On.createElement("div",{ref:Mt(re,t,de),className:$e,style:{"--arrow-x":`${f.x||0}px`,"--arrow-y":`${f.y||0}px`,...ee,...le,...Ce,boxSizing:"border-box",zIndex:T,...s},onMouseEnter:N,onMouseLeave:I,onPointerEnter:E,onClick:m,onPointerDownCapture:k},g&&On.createElement(My,{prefixCls:i,arrow:g,arrowPos:f,align:h}),On.createElement(pE,{cache:!l&&!u},B))})),R)}),Fm=EL;var Dy=M(require("react")),$L=Dy.createContext(null),ul=$L,zm=Dy.createContext(null);var gE=M(require("react"));function fE(e){return e?Array.isArray(e)?e:[e]:[]}function _y(e,t,o){return gE.useMemo(()=>{let n=fE(t??e),r=fE(o??e),i=new Set(n),s=new Set(r);return i.has("hover")&&!i.has("click")&&i.add("touch"),s.has("hover")&&!s.has("click")&&s.add("touch"),[i,s]},[e,t,o])}var sa=M(require("react"));function IL(e=[],t=[],o){let n=(r,i)=>r[i]||"";return o?n(e,0)===n(t,0):n(e,0)===n(t,0)&&n(e,1)===n(t,1)}function Bm(e,t,o,n){let{points:r}=o,i=Object.keys(e);for(let s=0;s<i.length;s+=1){let a=i[s];if(IL(e[a]?.points,r,n))return`${t}-placement-${a}`}return""}function ts(e){return e.ownerDocument.defaultView}function Uc(e){let t=[],o=e?.parentElement,n=["hidden","scroll","clip","auto"];for(;o;){let{overflowX:r,overflowY:i,overflow:s}=ts(o).getComputedStyle(o);[r,i,s].some(a=>n.includes(a))&&t.push(o),o=o.parentElement}return t}function ml(e,t=1){return Number.isNaN(e)?t:e}function jc(e){return ml(parseFloat(e),0)}function Fy(e,t){let o={...e};return(t||[]).forEach(n=>{if(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)return;let{overflow:r,overflowClipMargin:i,borderTopWidth:s,borderBottomWidth:a,borderLeftWidth:c,borderRightWidth:l}=ts(n).getComputedStyle(n),d=n.getBoundingClientRect(),{offsetHeight:u,clientHeight:m,offsetWidth:p,clientWidth:g}=n,f=jc(s),h=jc(a),b=jc(c),x=jc(l),y=ml(Math.round(d.width/p*1e3)/1e3),S=ml(Math.round(d.height/u*1e3)/1e3),v=(p-g-b-x)*y,C=(u-m-f-h)*S,w=f*S,R=h*S,T=b*y,N=x*y,I=0,E=0;if(r==="clip"){let D=jc(i);I=D*y,E=D*S}let k=d.x+T-I,F=d.y+w-E,A=k+d.width+2*I-T-N-v,z=F+d.height+2*E-w-R-C;o.left=Math.max(o.left,k),o.top=Math.max(o.top,F),o.right=Math.min(o.right,A),o.bottom=Math.min(o.bottom,z)}),o}function hE(e,t=0){let o=`${t}`,n=o.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(o)}function yE(e,t){let[o,n]=t||[];return[hE(e.width,o),hE(e.height,n)]}function bE(e=""){return[e[0],e[1]]}function pl(e,t){let o=t[0],n=t[1],r,i;return o==="t"?i=e.y:o==="b"?i=e.y+e.height:i=e.y+e.height/2,n==="l"?r=e.x:n==="r"?r=e.x+e.width:r=e.x+e.width/2,{x:r,y:i}}function os(e,t){let o={t:"b",b:"t",l:"r",r:"l"},n=[...e];return n[t]=o[e[t]]||"c",n}function xE(e){return e.join("")}function Kc(e,t,o,n,r,i,s,a){let[c,l]=sa.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:r[n]||{}}),d=sa.useRef(0),u=sa.useMemo(()=>!t||a?[]:Uc(t),[t]),m=sa.useRef({});e||(()=>{m.current={}})();let g=Ne(()=>{if(t&&o&&e&&!a){let qe=function(He,yn,on=le){let pc=A.x+He,zs=A.y+yn,iu=pc+B,su=zs+Z,au=Math.max(pc,on.left),JS=Math.max(zs,on.top),nh=Math.min(iu,on.right),rh=Math.min(su,on.bottom);return Math.max(0,(nh-au)*(rh-JS))},ye=function(){oe=A.y+Te,me=oe+Z,te=A.x+Ie,ge=te+B},b=t,x=b.ownerDocument,y=ts(b),{position:S}=y.getComputedStyle(b),v=b.style.left,C=b.style.top,w=b.style.right,R=b.style.bottom,T=b.style.overflow,N=b.style.overflowX,I=b.style.overflowY,E={...r[n],...i},k=x.createElement("div");b.parentElement?.appendChild(k),k.style.left=`${b.offsetLeft}px`,k.style.top=`${b.offsetTop}px`,k.style.position=S,k.style.height=`${b.offsetHeight}px`,k.style.width=`${b.offsetWidth}px`,b.style.left="0",b.style.top="0",b.style.right="auto",b.style.bottom="auto",b.style.overflow="hidden";let F;if(Array.isArray(o))F={x:o[0],y:o[1],width:0,height:0};else{let He=o.getBoundingClientRect();He.x=He.x??He.left,He.y=He.y??He.top,F={x:He.x,y:He.y,width:He.width,height:He.height}}let A=b.getBoundingClientRect(),{height:z,width:D}=y.getComputedStyle(b);A.x=A.x??A.left,A.y=A.y??A.top;let{clientWidth:_,clientHeight:V,scrollWidth:L,scrollHeight:G,scrollTop:H,scrollLeft:W}=x.documentElement,Z=A.height,B=A.width,K=F.height,j=F.width,Q={left:0,top:0,right:_,bottom:V},X={left:-W,top:-H,right:L-W,bottom:G-H},{htmlRegion:U}=E,J="visible",P="visibleFirst";U!=="scroll"&&U!==P&&(U=J);let O=U===P,q=Fy(X,u),ee=Fy(Q,u),le=U===J?ee:q,re=O?ee:le;b.style.left="auto",b.style.top="auto",b.style.right="0",b.style.bottom="0";let ie=b.getBoundingClientRect();b.style.left=v,b.style.top=C,b.style.right=w,b.style.bottom=R,b.style.overflow=T,b.style.overflowX=N,b.style.overflowY=I,b.parentElement?.removeChild(k);let Ce=ml(Math.round(B/parseFloat(D)*1e3)/1e3),de=ml(Math.round(Z/parseFloat(z)*1e3)/1e3);if(Ce===0||de===0||Xr(o)&&!Us(o))return;let{offset:$e,targetOffset:ae}=E,[Pe,he]=yE(A,$e),[ne,fe]=yE(F,ae);F.x-=ne,F.y-=fe;let[ce,Re]=E.points||[],De=bE(Re),we=bE(ce),pe=pl(F,De),ue=pl(A,we),se={...E},Se=[we,De],Ie=pe.x-ue.x+Pe,Te=pe.y-ue.y+he,Ge=qe(Ie,Te),mt=qe(Ie,Te,ee),Ze=pl(F,["t","l"]),$t=pl(A,["t","l"]),wt=pl(F,["b","r"]),gt=pl(A,["b","r"]),ht=E.overflow||{},{adjustX:yt,adjustY:Rt,shiftX:Fe,shiftY:xt}=ht,be=He=>typeof He=="boolean"?He:He>=0,oe,me,te,ge;ye();let Le=be(Rt),Qe=we[0]===De[0];if(Le&&we[0]==="t"&&(me>re.bottom||m.current.bt)){let He=Te;Qe?He-=Z-K:He=Ze.y-gt.y-he;let yn=qe(Ie,He),on=qe(Ie,He,ee);yn>Ge||yn===Ge&&(!O||on>=mt)?(m.current.bt=!0,Te=He,he=-he,Se=[os(Se[0],0),os(Se[1],0)]):m.current.bt=!1}if(Le&&we[0]==="b"&&(oe<re.top||m.current.tb)){let He=Te;Qe?He+=Z-K:He=wt.y-$t.y-he;let yn=qe(Ie,He),on=qe(Ie,He,ee);yn>Ge||yn===Ge&&(!O||on>=mt)?(m.current.tb=!0,Te=He,he=-he,Se=[os(Se[0],0),os(Se[1],0)]):m.current.tb=!1}let Ot=be(yt),Wt=we[1]===De[1];if(Ot&&we[1]==="l"&&(ge>re.right||m.current.rl)){let He=Ie;Wt?He-=B-j:He=Ze.x-gt.x-Pe;let yn=qe(He,Te),on=qe(He,Te,ee);yn>Ge||yn===Ge&&(!O||on>=mt)?(m.current.rl=!0,Ie=He,Pe=-Pe,Se=[os(Se[0],1),os(Se[1],1)]):m.current.rl=!1}if(Ot&&we[1]==="r"&&(te<re.left||m.current.lr)){let He=Ie;Wt?He+=B-j:He=wt.x-$t.x-Pe;let yn=qe(He,Te),on=qe(He,Te,ee);yn>Ge||yn===Ge&&(!O||on>=mt)?(m.current.lr=!0,Ie=He,Pe=-Pe,Se=[os(Se[0],1),os(Se[1],1)]):m.current.lr=!1}se.points=[xE(Se[0]),xE(Se[1])],ye();let Pt=Fe===!0?0:Fe;typeof Pt=="number"&&(te<ee.left&&(Ie-=te-ee.left-Pe,F.x+j<ee.left+Pt&&(Ie+=F.x-ee.left+j-Pt)),ge>ee.right&&(Ie-=ge-ee.right-Pe,F.x>ee.right-Pt&&(Ie+=F.x-ee.right+Pt)));let to=xt===!0?0:xt;typeof to=="number"&&(oe<ee.top&&(Te-=oe-ee.top-he,F.y+K<ee.top+to&&(Te+=F.y-ee.top+K-to)),me>ee.bottom&&(Te-=me-ee.bottom-he,F.y>ee.bottom-to&&(Te+=F.y-ee.bottom+to)));let ao=A.x+Ie,In=ao+B,Be=A.y+Te,tt=Be+Z,dt=F.x,Ae=dt+j,je=F.y,Tt=je+K,po=Math.max(ao,dt),vt=Math.min(In,Ae),_o=(po+vt)/2-ao,hn=Math.max(Be,je),Tr=Math.min(tt,Tt),Ui=(hn+Tr)/2-Be;s?.(t,se);let qr=ie.right-A.x-(Ie+A.width),bi=ie.bottom-A.y-(Te+A.height);Ce===1&&(Ie=Math.floor(Ie),qr=Math.floor(qr)),de===1&&(Te=Math.floor(Te),bi=Math.floor(bi));let mc={ready:!0,offsetX:Ie/Ce,offsetY:Te/de,offsetR:qr/Ce,offsetB:bi/de,arrowX:_o/Ce,arrowY:Ui/de,scaleX:Ce,scaleY:de,align:se};l(mc)}}),f=()=>{d.current+=1;let b=d.current;Promise.resolve().then(()=>{d.current===b&&g()})},h=()=>{l(b=>({...b,ready:!1}))};return rt(h,[n]),rt(()=>{e||h()},[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,f]}var Hm=M(require("react"));function qc(){let e=Hm.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},o=(n,r)=>{t(),r===0?n():e.current=setTimeout(()=>{n()},r*1e3)};return Hm.useEffect(()=>()=>{t()},[]),o}function zy(e,t,o,n,r){rt(()=>{if(e&&t&&o){let u=function(){n(),r()},i=t,s=o,a=Uc(i),c=Uc(s),l=ts(s),d=new Set([l,...a,...c]);return d.forEach(m=>{m.addEventListener("scroll",u,{passive:!0})}),l.addEventListener("resize",u,{passive:!0}),n(),()=>{d.forEach(m=>{m.removeEventListener("scroll",u),l.removeEventListener("resize",u)})}}},[e,t,o])}var Gc=M(require("react"));function By(e,t,o,n,r,i,s,a){let c=Gc.useRef(e);c.current=e;let l=Gc.useRef(!1);Gc.useEffect(()=>{if(t&&n&&(!r||i)){let u=()=>{l.current=!1},m=f=>{c.current&&!s(f.composedPath?.()?.[0]||f.target)&&!l.current&&a(!1)},p=ts(n);p.addEventListener("pointerdown",u,!0),p.addEventListener("mousedown",m,!0),p.addEventListener("contextmenu",m,!0);let g=Ga(o);return g&&(g.addEventListener("mousedown",m,!0),g.addEventListener("contextmenu",m,!0)),()=>{p.removeEventListener("pointerdown",u,!0),p.removeEventListener("mousedown",m,!0),p.removeEventListener("contextmenu",m,!0),g&&(g.removeEventListener("mousedown",m,!0),g.removeEventListener("contextmenu",m,!0))}}},[t,o,n,r,i]);function d(){l.current=!0}return d}var xo=M(require("react"));var Xc=M(require("react"));function Hy(){let[e,t]=Xc.default.useState(null),[o,n]=Xc.default.useState(!1),[r,i]=Xc.default.useState(!1),s=Xc.default.useRef(null),a=Ne(l=>{l===!1?(s.current=null,n(!1)):r&&o?s.current=l:(n(!0),t(l),s.current=null,o||i(!0))}),c=Ne(l=>{l?(i(!1),s.current&&(t(s.current),s.current=null)):(i(!1),s.current=null)});return[a,o,e,c]}var Yc=M(require("react"));function Vy(){return Vy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Vy.apply(this,arguments)}var NL=e=>{let{prefixCls:t,isMobile:o,ready:n,open:r,align:i,offsetR:s,offsetB:a,offsetX:c,offsetY:l,arrowPos:d,popupSize:u,motion:m,uniqueContainerClassName:p,uniqueContainerStyle:g}=e,f=`${t}-unique-container`,[h,b]=Yc.default.useState(!1),x=Wc(o,n,r,i,s,a,c,l),y=Yc.default.useRef(x);n&&(y.current=x);let S={};return u&&(S.width=u.width,S.height=u.height),Yc.default.createElement(fo,Vy({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${f}-hidden`},m,{visible:r,onVisibleChanged:v=>{b(v)}}),({className:v,style:C})=>{let w=$(f,v,p,{[`${f}-visible`]:h});return Yc.default.createElement("div",{className:w,style:{"--arrow-x":`${d?.x||0}px`,"--arrow-y":`${d?.y||0}px`,...y.current,...S,...C,...g}})})},vE=NL;var PL=({children:e,postTriggerProps:t})=>{let[o,n,r,i]=Hy(),s=xo.useMemo(()=>!r||!t?r:t(r),[r,t]),[a,c]=xo.useState(null),[l,d]=xo.useState(null),u=xo.useRef(null),m=Ne(_=>{u.current=_,Xr(_)&&a!==_&&c(_)}),p=xo.useRef(null),g=qc(),f=Ne((_,V)=>{p.current=V,g(()=>{o(_)},_.delay)}),h=_=>{g(()=>{p.current?.()||o(!1)},_)},b=Ne(_=>{i(_)}),[x,y,S,v,C,w,R,,,T,N]=Kc(n,a,s?.target,s?.popupPlacement,s?.builtinPlacements||{},s?.popupAlign,void 0,!1),I=xo.useMemo(()=>{if(!s)return"";let _=Bm(s.builtinPlacements||{},s.prefixCls||"",T,!1);return $(_,s.getPopupClassNameFromAlign?.(T))},[T,s?.getPopupClassNameFromAlign,s?.builtinPlacements,s?.prefixCls]),E=xo.useMemo(()=>({show:f,hide:h}),[]);xo.useEffect(()=>{N()},[s?.target]);let k=Ne(()=>(N(),Promise.resolve())),F=xo.useRef({}),A=xo.useContext(ul),z=xo.useMemo(()=>({registerSubPopup:(_,V)=>{F.current[_]=V,A?.registerSubPopup(_,V)}}),[A]),D=s?.prefixCls;return xo.createElement(zm.Provider,{value:E},e,s&&xo.createElement(ul.Provider,{value:z},xo.createElement(Fm,{ref:m,portal:na,onEsc:s.onEsc,prefixCls:D,popup:s.popup,className:$(s.popupClassName,I,`${D}-unique-controlled`),style:s.popupStyle,target:s.target,open:n,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:b,ready:x,offsetX:y,offsetY:S,offsetR:v,offsetB:C,onAlign:N,onPrepare:k,onResize:_=>d({width:_.offsetWidth,height:_.offsetHeight}),arrowPos:{x:w,y:R},align:T,zIndex:s.zIndex,mask:s.mask,arrow:s.arrow,motion:s.popupMotion,maskMotion:s.maskMotion,getPopupContainer:s.getPopupContainer},xo.createElement(vE,{prefixCls:D,isMobile:!1,ready:x,open:n,align:T,offsetR:v,offsetB:C,offsetX:y,offsetY:S,arrowPos:{x:w,y:R},popupSize:l,motion:s.popupMotion,uniqueContainerClassName:$(s.uniqueContainerClassName,I),uniqueContainerStyle:s.uniqueContainerStyle}))))},Wy=PL;var SE=require("react-dom");function TL(e=na){return ft.forwardRef((o,n)=>{let{prefixCls:r="rc-trigger-popup",children:i,action:s="hover",showAction:a,hideAction:c,disabled:l=!1,popupVisible:d,defaultPopupVisible:u,onOpenChange:m,afterOpenChange:p,onPopupVisibleChange:g,afterPopupVisibleChange:f,mouseEnterDelay:h,mouseLeaveDelay:b=.1,focusDelay:x,blurDelay:y,mask:S,maskClosable:v=!0,getPopupContainer:C,forceRender:w,autoDestroy:R,popup:T,popupClassName:N,uniqueContainerClassName:I,uniqueContainerStyle:E,popupStyle:k,popupPlacement:F,builtinPlacements:A={},popupAlign:z,zIndex:D,stretch:_,getPopupClassNameFromAlign:V,fresh:L,unique:G,alignPoint:H,onPopupClick:W,onPopupAlign:Z,arrow:B,popupMotion:K,maskMotion:j,mobile:Q,...X}=o,U=R||!1,J=d===void 0,P=!!Q,O=ft.useRef({}),q=ft.useContext(ul),ee=ft.useMemo(()=>({registerSubPopup:(Me,It)=>{O.current[Me]=It,q?.registerSubPopup(Me,It)}}),[q]),le=ft.useContext(zm),re=Co(),[ie,Ce]=ft.useState(null),de=ft.useRef(null),$e=Ne(Me=>{de.current=Me,Xr(Me)&&ie!==Me&&Ce(Me),q?.registerSubPopup(re,Me)}),[ae,Pe]=ft.useState(null),he=ft.useRef(null),ne=Ne(Me=>{let It=Gn(Me);Xr(It)&&ae!==It&&(Pe(It),he.current=It)}),fe={},ce=Ne(Me=>{let It=ae;return It?.contains(Me)||Ga(It)?.host===Me||Me===It||ie?.contains(Me)||Ga(ie)?.host===Me||Me===ie||Object.values(O.current).some(lu=>lu?.contains(Me)||Me===lu)}),Re=B?{...B!==!0?B:{}}:null,[De,we]=it(u||!1,d),pe=De||!1,ue=pe&&!l,se=ft.useMemo(()=>{let Me=typeof i=="function"?i({open:ue}):i;return ft.Children.only(Me)},[i,ue]),Se=se?.props||{},Ie=Ne(()=>ue),Te=Ne((Me=0)=>({popup:T,target:ae,delay:Me,prefixCls:r,popupClassName:N,uniqueContainerClassName:I,uniqueContainerStyle:E,popupStyle:k,popupPlacement:F,builtinPlacements:A,popupAlign:z,zIndex:D,mask:S,maskClosable:v,popupMotion:K,maskMotion:j,arrow:Re,getPopupContainer:C,getPopupClassNameFromAlign:V,id:re,onEsc:$t}));rt(()=>{le&&G&&ae&&!J&&!q&&(ue?le.show(Te(h),Ie):le.hide(b))},[ue,ae]);let qe=ft.useRef(ue);qe.current=ue;let Ge=Ne(Me=>{(0,SE.flushSync)(()=>{pe!==Me&&(we(Me),m?.(Me),g?.(Me))})}),mt=qc(),Ze=(Me,It=0)=>{if(d!==void 0){mt(()=>{Ge(Me)},It);return}if(le&&G&&J&&!q){Me?le.show(Te(It),Ie):le.hide(It);return}mt(()=>{Ge(Me)},It)};function $t({top:Me}){Me&&Ze(!1)}let[wt,gt]=ft.useState(!1);rt(Me=>{(!Me||ue)&&gt(!0)},[ue]);let[ht,yt]=ft.useState(null),[Rt,Fe]=ft.useState(null),xt=Me=>{Fe([Me.clientX,Me.clientY])},[be,oe,me,te,ge,ye,Le,Qe,Ot,Wt,Pt]=Kc(ue,ie,H&&Rt!==null?Rt:ae,F,A,z,Z,P),[to,ao]=_y(s,a,c),In=to.has("click"),Be=ao.has("click")||ao.has("contextMenu"),tt=Ne(()=>{wt||Pt()});zy(ue,ae,ie,tt,()=>{qe.current&&H&&Be&&Ze(!1)}),rt(()=>{tt()},[Rt,F]),rt(()=>{ue&&!A?.[F]&&tt()},[JSON.stringify(z)]);let Ae=ft.useMemo(()=>{let Me=Bm(A,r,Wt,H);return $(Me,V?.(Wt))},[Wt,V,A,r,H]);ft.useImperativeHandle(n,()=>({nativeElement:he.current,popupElement:de.current,forceAlign:tt}));let[je,Tt]=ft.useState(0),[po,vt]=ft.useState(0),jt=()=>{if(_&&ae){let Me=ae.getBoundingClientRect();Tt(Me.width),vt(Me.height)}},_o=()=>{jt(),tt()},hn=Me=>{gt(!1),Pt(),p?.(Me),f?.(Me)},Tr=()=>new Promise(Me=>{jt(),yt(()=>Me)});rt(()=>{ht&&(Pt(),ht(),yt(null))},[ht]);function Kr(Me,It,lu,JO,eC){fe[Me]=(tC,...eA)=>{(!eC||!eC())&&(JO?.(tC),Ze(It,lu)),Se[Me]?.(tC,...eA)}}let Ui=to.has("touch"),qr=ao.has("touch"),bi=ft.useRef(!1);(Ui||qr)&&(fe.onTouchStart=(...Me)=>{bi.current=!0,qe.current&&qr?Ze(!1):!qe.current&&Ui&&Ze(!0),Se.onTouchStart?.(...Me)}),(In||Be)&&(fe.onClick=(Me,...It)=>{qe.current&&Be?Ze(!1):!qe.current&&In&&(xt(Me),Ze(!0)),Se.onClick?.(Me,...It),bi.current=!1});let mc=By(ue,Be||qr,ae,ie,S,v,ce,Ze),He=to.has("hover"),yn=ao.has("hover"),on,pc,zs=()=>bi.current;if(He){let Me=It=>{xt(It)};Kr("onMouseEnter",!0,h,Me,zs),Kr("onPointerEnter",!0,h,Me,zs),on=It=>{(ue||wt)&&ie?.contains(It.target)&&Ze(!0,h)},H&&(fe.onMouseMove=It=>{Se.onMouseMove?.(It)})}yn&&(Kr("onMouseLeave",!1,b,void 0,zs),Kr("onPointerLeave",!1,b,void 0,zs),pc=()=>{Ze(!1,b)}),to.has("focus")&&Kr("onFocus",!0,x),ao.has("focus")&&Kr("onBlur",!1,y),to.has("contextMenu")&&(fe.onContextMenu=(Me,...It)=>{qe.current&&ao.has("contextMenu")?Ze(!1):(xt(Me),Ze(!0)),Me.preventDefault(),Se.onContextMenu?.(Me,...It)});let iu=ft.useRef(!1);iu.current||=w||ue||wt;let su={...Se,...fe},au={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(Me=>{X[Me]&&(au[Me]=(...It)=>{su[Me]?.(...It),X[Me](...It)})});let nh={x:ye,y:Le};cl(ue,ae,_o);let rh=bo(ne,To(se)),QO=ft.cloneElement(se,{...su,...au,ref:rh});return ft.createElement(ft.Fragment,null,QO,iu.current&&(!le||!G)&&ft.createElement(ul.Provider,{value:ee},ft.createElement(Fm,{portal:e,ref:$e,prefixCls:r,popup:T,className:$(N,!P&&Ae),style:k,target:ae,onMouseEnter:on,onMouseLeave:pc,onPointerEnter:on,zIndex:D,open:ue,keepDom:wt,fresh:L,onClick:W,onPointerDownCapture:mc,mask:S,motion:K,maskMotion:j,onVisibleChanged:hn,onPrepare:Tr,forceRender:w,autoDestroy:U,getPopupContainer:C,onEsc:$t,align:Wt,arrow:Re,arrowPos:nh,ready:be,offsetX:oe,offsetY:me,offsetR:te,offsetB:ge,onAlign:tt,stretch:_,targetWidth:je/Qe,targetHeight:po/Ot,mobile:Q})))})}var ns=TL(na);var jm=M(require("react"));var Zc=M(require("react"));function Vm(e){return e&&Zc.default.isValidElement(e)&&e.type===Zc.default.Fragment}var ML=(e,t,o)=>Zc.default.isValidElement(e)?Zc.default.cloneElement(e,ct(o)?o(e.props||{}):o):t;function Ro(e,t){return ML(e,e,t)}var Wm=M(require("react")),rs="ant",fl="anticon",jy=["outlined","borderless","filled","underlined"],kL=(e,t)=>t||(e?`${rs}-${e}`:rs),Oe=Wm.createContext({getPrefixCls:kL,iconPrefixCls:fl}),{Consumer:OL}=Oe,CE={};function Xe(e){let t=Wm.useContext(Oe),{getPrefixCls:o,direction:n,getPopupContainer:r,renderEmpty:i}=t,s=t[e];return{classNames:CE,styles:CE,...s,getPrefixCls:o,direction:n,getPopupContainer:r,renderEmpty:i}}var AL=({children:e})=>{let{getPrefixCls:t}=jm.default.useContext(Oe),o=t();return jm.default.isValidElement(e)?jm.default.createElement(fo,{visible:!0,motionName:`${o}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:n,className:r})=>Ro(e,i=>({className:$(i.className,r),style:{...i.style,...n}}))):e},wE=AL;var Um=[null,null];function LL(e){if(Um[0]!==e){let t={};Object.keys(e).forEach(o=>{t[o]={...e[o],dynamicInset:!1}}),Um[0]=e,Um[1]=t}return Um[1]}var DL=({children:e})=>{let t=o=>{let{id:n,builtinPlacements:r,popup:i}=o,s=ct(i)?i():i,a=LL(r);return{...o,getPopupContainer:null,arrow:!1,popup:Uy.default.createElement(wE,{key:n},s),builtinPlacements:a}};return Uy.default.createElement(Wy,{postTriggerProps:t},e)},Km=DL;var gl=M(require("react")),Ky=gl.createContext(!1),qm=({children:e,disabled:t})=>{let o=gl.useContext(Ky);return gl.createElement(Ky.Provider,{value:t??o},e)},zo=Ky;var Gy=require("react");var hl=M(require("react")),qy=hl.createContext(void 0),RE=({children:e,size:t})=>{let o=hl.useContext(qy);return hl.createElement(qy.Provider,{value:t||o},e)},aa=qy;function _L(){let e=(0,Gy.useContext)(zo),t=(0,Gy.useContext)(aa);return{componentDisabled:e,componentSize:t}}var EE=_L;var GE=require("react");function Bo(e){"@babel/helpers - typeof";return Bo=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},Bo(e)}function $E(e){if(Array.isArray(e))return e}function IE(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var n,r,i,s,a=[],c=!0,l=!1;try{if(i=(o=o.call(e)).next,t===0){if(Object(o)!==o)return;c=!1}else for(;!(c=(n=i.call(o)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(d){l=!0,r=d}finally{try{if(!c&&o.return!=null&&(s=o.return(),Object(s)!==s))return}finally{if(l)throw r}}return a}}function NE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
39
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gm(e,t){return $E(e)||IE(e,t)||qu(e,t)||NE()}function PE(e,t){if(Bo(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(Bo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xm(e){var t=PE(e,"string");return Bo(t)=="symbol"?t:t+""}function an(e,t,o){return(t=Xm(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function TE(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),o.push.apply(o,n)}return o}function Go(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?TE(Object(o),!0).forEach(function(n){an(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):TE(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var VE=require("react");function Jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ME(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xm(n.key),n)}}function ei(e,t,o){return t&&ME(e.prototype,t),o&&ME(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function is(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ym(e,t){return Ym=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,n){return o.__proto__=n,o},Ym(e,t)}function Zm(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&&Ym(e,t)}function Qc(e){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qc(e)}function Xy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xy=function(){return!!e})()}function kE(e,t){if(t&&(Bo(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return is(e)}function Qm(e){var t=Xy();return function(){var o,n=Qc(e);if(t){var r=Qc(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return kE(this,o)}}var FL=ei(function e(){Jr(this,e)}),Jm=FL;var OE="CALC_UNIT",zL=new RegExp(OE,"g");function Yy(e){return typeof e=="number"?"".concat(e).concat(OE):e}var AE=function(e){Zm(o,e);var t=Qm(o);function o(n,r){var i;Jr(this,o),i=t.call(this),an(is(i),"result",""),an(is(i),"unitlessCssVar",void 0),an(is(i),"lowPriority",void 0);var s=Bo(n);return i.unitlessCssVar=r,n instanceof o?i.result="(".concat(n.result,")"):s==="number"?i.result=Yy(n):s==="string"&&(i.result=n),i}return ei(o,[{key:"add",value:function(r){return r instanceof o?this.result="".concat(this.result," + ").concat(r.getResult()):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," + ").concat(Yy(r))),this.lowPriority=!0,this}},{key:"sub",value:function(r){return r instanceof o?this.result="".concat(this.result," - ").concat(r.getResult()):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," - ").concat(Yy(r))),this.lowPriority=!0,this}},{key:"mul",value:function(r){return this.lowPriority&&(this.result="(".concat(this.result,")")),r instanceof o?this.result="".concat(this.result," * ").concat(r.getResult(!0)):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," * ").concat(r)),this.lowPriority=!1,this}},{key:"div",value:function(r){return this.lowPriority&&(this.result="(".concat(this.result,")")),r instanceof o?this.result="".concat(this.result," / ").concat(r.getResult(!0)):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," / ").concat(r)),this.lowPriority=!1,this}},{key:"getResult",value:function(r){return this.lowPriority||r?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(r){var i=this,s=r||{},a=s.unit,c=!0;return typeof a=="boolean"?c=a:Array.from(this.unitlessCssVar).some(function(l){return i.result.includes(l)})&&(c=!1),this.result=this.result.replace(zL,c?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),o}(Jm);var BL=function(e){Zm(o,e);var t=Qm(o);function o(n){var r;return Jr(this,o),r=t.call(this),an(is(r),"result",0),n instanceof o?r.result=n.result:typeof n=="number"&&(r.result=n),r}return ei(o,[{key:"add",value:function(r){return r instanceof o?this.result+=r.result:typeof r=="number"&&(this.result+=r),this}},{key:"sub",value:function(r){return r instanceof o?this.result-=r.result:typeof r=="number"&&(this.result-=r),this}},{key:"mul",value:function(r){return r instanceof o?this.result*=r.result:typeof r=="number"&&(this.result*=r),this}},{key:"div",value:function(r){return r instanceof o?this.result/=r.result:typeof r=="number"&&(this.result/=r),this}},{key:"equal",value:function(){return this.result}}]),o}(Jm),LE=BL;var HL=function(t,o){var n=t==="css"?AE:LE;return function(r){return new n(r,o)}},ep=HL;var VL=function(t,o){return"".concat([o,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))},Zy=VL;function WL(e,t,o,n){var r=Go({},t[e]);if(n!=null&&n.deprecatedTokens){var i=n.deprecatedTokens;i.forEach(function(a){var c=Gm(a,2),l=c[0],d=c[1];if(r!=null&&r[l]||r!=null&&r[d]){var u;(u=r[d])!==null&&u!==void 0||(r[d]=r?.[l])}})}var s=Go(Go({},o),r);return Object.keys(s).forEach(function(a){s[a]===t[a]&&delete s[a]}),s}var Qy=WL;var DE=typeof CSSINJS_STATISTIC<"u",Jy=!0;function ze(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];if(!DE)return Object.assign.apply(Object,[{}].concat(t));Jy=!1;var n={};return t.forEach(function(r){if(Bo(r)==="object"){var i=Object.keys(r);i.forEach(function(s){Object.defineProperty(n,s,{configurable:!0,enumerable:!0,get:function(){return r[s]}})})}}),Jy=!0,n}var tp={};function jL(){}var UL=function(t){var o,n=t,r=jL;return DE&&typeof Proxy<"u"&&(o=new Set,n=new Proxy(t,{get:function(s,a){if(Jy){var c;(c=o)===null||c===void 0||c.add(a)}return s[a]}}),r=function(s,a){var c;tp[s]={global:Array.from(o),component:Go(Go({},(c=tp[s])===null||c===void 0?void 0:c.component),a)}}),{token:n,keys:o,flush:r}},op=UL;function KL(e,t,o){if(typeof o=="function"){var n;return o(ze(t,(n=t[e])!==null&&n!==void 0?n:{}))}return o??{}}var eb=KL;function qL(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return"max(".concat(n.map(function(i){return Y(i)}).join(","),")")},min:function(){for(var o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return"min(".concat(n.map(function(i){return Y(i)}).join(","),")")}}}var _E=qL;var zE=M(require("react")),GL=1e3*60*10,XL=function(){function e(){Jr(this,e),an(this,"map",new Map),an(this,"objectIDMap",new WeakMap),an(this,"nextID",0),an(this,"lastAccessBeat",new Map),an(this,"accessBeat",0)}return ei(e,[{key:"set",value:function(o,n){this.clear();var r=this.getCompositeKey(o);this.map.set(r,n),this.lastAccessBeat.set(r,Date.now())}},{key:"get",value:function(o){var n=this.getCompositeKey(o),r=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,r}},{key:"getCompositeKey",value:function(o){var n=this,r=o.map(function(i){return i&&Bo(i)==="object"?"obj_".concat(n.getObjectID(i)):"".concat(Bo(i),"_").concat(i)});return r.join("|")}},{key:"getObjectID",value:function(o){if(this.objectIDMap.has(o))return this.objectIDMap.get(o);var n=this.nextID;return this.objectIDMap.set(o,n),this.nextID+=1,n}},{key:"clear",value:function(){var o=this;if(this.accessBeat>1e4){var n=Date.now();this.lastAccessBeat.forEach(function(r,i){n-r>GL&&(o.map.delete(i),o.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),FE=new XL;function YL(e,t){return zE.default.useMemo(function(){var o=FE.get(t);if(o)return o;var n=e();return FE.set(t,n),n},t)}var BE=YL;var ZL=function(){return{}},HE=ZL;function QL(e){var t=e.useCSP,o=t===void 0?HE:t,n=e.useToken,r=e.usePrefix,i=e.getResetStyles,s=e.getCommonStyle,a=e.getCompUnitless;function c(m,p,g,f){var h=Array.isArray(m)?m[0]:m;function b(R){return"".concat(String(h)).concat(R.slice(0,1).toUpperCase()).concat(R.slice(1))}var x=f?.unitless||{},y=typeof a=="function"?a(m):{},S=Go(Go({},y),{},an({},b("zIndexPopup"),!0));Object.keys(x).forEach(function(R){S[b(R)]=x[R]});var v=Go(Go({},f),{},{unitless:S,prefixToken:b}),C=d(m,p,g,v),w=l(h,g,v);return function(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,N=C(R,T),I=f?.extraCssVarPrefixCls,E=typeof I=="function"?I({prefixCls:R,rootCls:T}):I,k=w(E!=null&&E.length?[T].concat(Zt(E)):T);return[N,k]}}function l(m,p,g){var f=g.unitless,h=g.prefixToken,b=g.ignore;return function(x){var y=n(),S=y.cssVar,v=y.realToken,C=o();return py({path:[m],prefix:S.prefix,key:S.key,unitless:f,ignore:b,token:v,scope:x,nonce:function(){return C.nonce}},function(){var w=eb(m,v,p),R=Qy(m,v,w,{deprecatedTokens:g?.deprecatedTokens});return w&&Object.keys(w).forEach(function(T){R[h(T)]=R[T],delete R[T]}),R}),S?.key}}function d(m,p,g){var f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},h=Array.isArray(m)?m:[m,m],b=Gm(h,1),x=b[0],y=h.join("-"),S=e.layer||{name:"antd"};return function(v){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v,w=n(),R=w.theme,T=w.realToken,N=w.hashId,I=w.token,E=w.cssVar,k=w.zeroRuntime,F=(0,VE.useMemo)(function(){return k},[]);if(F)return N;var A=r(),z=A.rootPrefixCls,D=A.iconPrefixCls,_=o(),V="css",L=BE(function(){var B=new Set;return Object.keys(f.unitless||{}).forEach(function(K){B.add(Ja(K,E.prefix)),B.add(Ja(K,Zy(x,E.prefix)))}),ep(V,B)},[V,x,E?.prefix]),G=_E(V),H=G.max,W=G.min,Z={theme:R,token:I,hashId:N,nonce:function(){return _.nonce},clientOnly:f.clientOnly,layer:S,order:f.order||-999};return typeof i=="function"&&Ji(Go(Go({},Z),{},{clientOnly:!1,path:["Shared",z]}),function(){return i(I,{prefix:{rootPrefixCls:z,iconPrefixCls:D},csp:_})}),Ji(Go(Go({},Z),{},{path:[y,v,D]}),function(){if(f.injectStyle===!1)return[];var B=op(I),K=B.token,j=B.flush,Q=eb(x,T,g),X=".".concat(v),U=Qy(x,T,Q,{deprecatedTokens:f.deprecatedTokens});Q&&Bo(Q)==="object"&&Object.keys(Q).forEach(function(q){Q[q]="var(".concat(Ja(q,Zy(x,E.prefix)),")")});var J=ze(K,{componentCls:X,prefixCls:v,iconCls:".".concat(D),antCls:".".concat(z),calc:L,max:H,min:W},Q),P=p(J,{hashId:N,prefixCls:v,rootPrefixCls:z,iconPrefixCls:D});j(x,U);var O=typeof s=="function"?s(J,v,C,f.resetFont):null;return[f.resetStyle===!1?null:O,P]}),N}}function u(m,p,g){var f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},h=d(m,p,g,Go({resetStyle:!1,order:-998},f)),b=function(y){var S=y.prefixCls,v=y.rootCls,C=v===void 0?S:v;return h(S,C),null};return b}return{genStyleHooks:c,genSubStyleComponent:u,genComponentStyleHook:d}}var tb=QL;var rb=M(require("react"));var WE="6.6.5";var jE=WE;function ob(e){return e>=0&&e<=255}function JL(e,t){let{r:o,g:n,b:r,a:i}=new pt(e).toRgb();if(i<1)return e;let{r:s,g:a,b:c}=new pt(t).toRgb();for(let l=.01;l<=1;l+=.01){let d=Math.round((o-s*(1-l))/l),u=Math.round((n-a*(1-l))/l),m=Math.round((r-c*(1-l))/l);if(ob(d)&&ob(u)&&ob(m))return new pt({r:d,g:u,b:m,a:Math.round(l*100)/100}).toRgbString()}return new pt({r:o,g:n,b:r,a:1}).toRgbString()}var la=JL;function nb(e){let{override:t,...o}=e,n={...t};Object.keys(vi).forEach(h=>{delete n[h]});let r={...o,...n},i=new pt(r.colorShadow),s=i.a,a=h=>i.clone().setA(s*h).toRgbString(),c=480,l=576,d=768,u=992,m=1200,p=1600,g=1920;if(r.motion===!1){let h="0s";r.motionDurationFast=h,r.motionDurationMid=h,r.motionDurationSlow=h}return{...r,colorFillContent:r.colorFillSecondary,colorFillContentHover:r.colorFill,colorFillAlter:r.colorFillQuaternary,colorBgContainerDisabled:r.colorFillTertiary,colorBorderBg:r.colorBgContainer,colorSplit:la(r.colorBorderSecondary,r.colorBgContainer),colorTextPlaceholder:r.colorTextQuaternary,colorTextDisabled:r.colorTextQuaternary,colorTextHeading:r.colorText,colorTextLabel:r.colorTextSecondary,colorTextDescription:r.colorTextTertiary,colorTextLightSolid:r.colorWhite,colorHighlight:r.colorError,colorBgTextHover:r.colorFillSecondary,colorBgTextActive:r.colorFill,colorIcon:r.colorTextTertiary,colorIconHover:r.colorText,colorErrorOutline:la(r.colorErrorBg,r.colorBgContainer),colorWarningOutline:la(r.colorWarningBg,r.colorBgContainer),colorErrorAffix:r.colorError,colorWarningAffix:r.colorWarning,fontHeight:Math.round(r.fontSize*r.lineHeight),fontHeightSM:Math.round(r.fontSizeSM*r.lineHeightSM),fontHeightLG:Math.round(r.fontSizeLG*r.lineHeightLG),fontSizeIcon:r.fontSizeSM,lineWidthFocus:r.focusOutline===!1?0:r.lineWidth*3,lineWidth:r.lineWidth,controlOutlineWidth:r.lineWidth*2,controlInteractiveSize:r.controlHeight/2,controlItemBgHover:r.colorFillTertiary,controlItemBgActive:r.colorPrimaryBg,controlItemBgActiveHover:r.colorPrimaryBgHover,controlItemBgActiveDisabled:r.colorFill,controlTmpOutline:r.colorFillQuaternary,controlOutline:la(r.colorPrimaryBg,r.colorBgContainer),lineType:r.lineType,borderRadius:r.borderRadius,borderRadiusXS:r.borderRadiusXS,borderRadiusSM:r.borderRadiusSM,borderRadiusLG:r.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:r.sizeXXS,paddingXS:r.sizeXS,paddingSM:r.sizeSM,padding:r.size,paddingMD:r.sizeMD,paddingLG:r.sizeLG,paddingXL:r.sizeXL,paddingContentHorizontalLG:r.sizeLG,paddingContentVerticalLG:r.sizeMS,paddingContentHorizontal:r.sizeMS,paddingContentVertical:r.sizeSM,paddingContentHorizontalSM:r.size,paddingContentVerticalSM:r.sizeXS,marginXXS:r.sizeXXS,marginXS:r.sizeXS,marginSM:r.sizeSM,margin:r.size,marginMD:r.sizeMD,marginLG:r.sizeLG,marginXL:r.sizeXL,marginXXL:r.sizeXXL,boxShadow:`
40
- 0 6px 16px 0 ${a(.08)},
41
- 0 3px 6px -4px ${a(.12)},
42
- 0 9px 28px 8px ${a(.05)}
43
- `,boxShadowSecondary:`
44
- 0 6px 16px 0 ${a(.08)},
45
- 0 3px 6px -4px ${a(.12)},
46
- 0 9px 28px 8px ${a(.05)}
47
- `,boxShadowTertiary:`
48
- 0 1px 2px 0 ${a(.05)},
49
- 0 1px 6px -1px ${a(.03)},
50
- 0 2px 4px 0 ${a(.03)}
51
- `,screenXS:c,screenXSMin:c,screenXSMax:l-1,screenSM:l,screenSMMin:l,screenSMMax:d-1,screenMD:d,screenMDMin:d,screenMDMax:u-1,screenLG:u,screenLGMin:u,screenLGMax:m-1,screenXL:m,screenXLMin:m,screenXLMax:p-1,screenXXL:p,screenXXLMin:p,screenXXLMax:g-1,screenXXXL:g,screenXXXLMin:g,boxShadowPopoverArrow:`2px 2px 5px ${a(.05)}`,dropShadowPopover:`drop-shadow(0 6px 16px ${a(.08)}) drop-shadow(0 3px 6px ${a(.12)}) drop-shadow(0 9px 28px ${a(.05)})`,boxShadowCard:`
52
- 0 1px 2px -2px ${a(.16)},
53
- 0 3px 6px 0 ${a(.12)},
54
- 0 5px 12px 4px ${a(.09)}
55
- `,boxShadowDrawerRight:`
56
- -6px 0 16px 0 ${a(.08)},
57
- -3px 0 6px -4px ${a(.12)},
58
- -9px 0 28px 8px ${a(.05)}
59
- `,boxShadowDrawerLeft:`
60
- 6px 0 16px 0 ${a(.08)},
61
- 3px 0 6px -4px ${a(.12)},
62
- 9px 0 28px 8px ${a(.05)}
63
- `,boxShadowDrawerUp:`
64
- 0 6px 16px 0 ${a(.08)},
65
- 0 3px 6px -4px ${a(.12)},
66
- 0 9px 28px 8px ${a(.05)}
67
- `,boxShadowDrawerDown:`
68
- 0 -6px 16px 0 ${a(.08)},
69
- 0 -3px 6px -4px ${a(.12)},
70
- 0 -9px 28px 8px ${a(.05)}
71
- `,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px ${a(.08)}`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px ${a(.08)}`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px ${a(.08)}`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px ${a(.08)}`,...n}}var ib={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},eD={motionBase:!0,motionUnit:!0},tD={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},UE=(e,t,o)=>{let n=o.getDerivativeToken(e),{override:r,...i}=t,s={...n,override:r};return s=nb(s),i&&Object.entries(i).forEach(([a,c])=>{let{theme:l,...d}=c,u=d;l&&(u=UE({...s,...d},{override:d},l)),s[a]=u}),s};function qt(){let{token:e,hashed:t,theme:o,override:n,cssVar:r,zeroRuntime:i}=rb.default.useContext(Fc),{csp:s,getPrefixCls:a}=rb.default.useContext(Oe),c={prefix:r?.prefix??a(),key:r?.key??"css-var-root"},l=`${jE}-${t||""}`,d=o||Dc,[u,m,p]=nm(d,[vi,e],{salt:l,override:n,getComputedToken:UE,cssVar:{...c,unitless:ib,ignore:eD,preserve:tD},nonce:s?.nonce});return[d,p,t?m:"",u,c,!!i]}var sb=require("react");var Xo={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Et=(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}),ca=()=>({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"}}),oD=new ot("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),da=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),An=(e,t)=>({outline:`${Y(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(o=>`${o} 0s`).join(", ")}),ln=(e,t)=>({"&:focus-visible":An(e,t)}),KE=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},...ln(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),qE=(e,t,o,n)=>{let r=`[class^="${t}"], [class*=" ${t}"]`,i=o?`.${o}`:r,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},a={};return n!==!1&&(a={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...a,...s,[r]:s}}},np=e=>({[`.${e}`]:{...ca(),"&::before":{display:"none"},"&[tabindex]":{cursor:"pointer"}},[`.${e} .${e}-icon`]:{display:"block"},[`.${e}-spin`]:{animationName:oD,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}});var{genStyleHooks:Ye,genComponentStyleHook:ab,genSubStyleComponent:Jc}=tb({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,sb.useContext)(Oe);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,o,n,r,i]=qt();return{theme:e,realToken:t,hashId:o,token:n,cssVar:r,zeroRuntime:i}},useCSP:()=>{let{csp:e}=(0,sb.useContext)(Oe);return e??{}},getResetStyles:(e,t)=>{let o=KE(e);return[o,{"&":o},np(t?.prefix.iconPrefixCls??fl)]},getCommonStyle:qE,getCompUnitless:()=>ib}),Gt=(e,t)=>{let o=`--${e.replace(/\./g,"")}-${t}-`;return[i=>`${o}${i}`,(i,s)=>s?`var(${o}${i}, ${s})`:`var(${o}${i})`]};function rp(e,t){return jo.reduce((o,n)=>{let r=e[`${n}1`],i=e[`${n}3`],s=e[`${n}6`],a=e[`${n}7`];return{...o,...t(n,{lightColor:r,lightBorderColor:i,darkColor:s,textColor:a})}},{})}var nD=(e,t)=>{let[o,n]=qt();return Ji({theme:o,token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>np(e))},ip=nD;function lb(e,t,o){let n=Xa("ConfigProvider"),r=e||{},i=r.inherit===!1||!t?{..._c,hashed:t?.hashed??_c.hashed,cssVar:t?.cssVar,zeroRuntime:t?.zeroRuntime}:t,s=(0,GE.useId)();return qn(()=>{if(!e)return t;let a={...i.components};Object.keys(e.components||{}).forEach(d=>{a[d]={...a[d],...e.components[d]}});let c=`css-var-${s.replace(/:/g,"")}`,l={prefix:o?.prefixCls,...i.cssVar,...r.cssVar,key:r.cssVar?.key||c};return{...i,...r,token:{...i.token,...r.token},components:a,cssVar:l}},[r,i,o?.prefixCls,s],(a,c)=>a.some((l,d)=>{let u=c[d];return!kr(l,u,!0)}))}var $i=M(require("react"));var XE=$i.createContext(!0);function cb(e){let t=$i.useContext(XE),{children:o}=e,[,n]=qt(),{motion:r}=n,i=$i.useRef(!1);return i.current||(i.current=t!==r),i.current?$i.createElement(XE.Provider,{value:r},$i.createElement(Cy,{motion:r},o)):o}var rD=M(require("react"));var YE=()=>null;var iD=({iconPrefixCls:e,csp:t})=>(ip(e,t),null);var sD=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],sp,ZE,QE,JE;function db(){return sp||rs}function aD(){return ZE||fl}var lD=e=>{let{prefixCls:t,iconPrefixCls:o,theme:n,holderRender:r}=e;t!==void 0&&(sp=t),o!==void 0&&(ZE=o),"holderRender"in e&&(JE=r),n&&(QE=n)},e1=()=>({getPrefixCls:(e,t)=>t||(e?`${db()}-${e}`:db()),getIconPrefixCls:aD,getRootPrefixCls:()=>sp||db(),getTheme:()=>QE,holderRender:JE}),cD=e=>{let{children:t,csp:o,autoInsertSpaceInButton:n,alert:r,affix:i,anchor:s,app:a,form:c,locale:l,componentSize:d,direction:u,space:m,splitter:p,virtual:g,dropdownMatchSelectWidth:f,popupMatchSelectWidth:h,popupOverflow:b,legacyLocale:x,parentContext:y,iconPrefixCls:S,theme:v,componentDisabled:C,segmented:w,statistic:R,spin:T,calendar:N,carousel:I,cascader:E,collapse:k,typography:F,checkbox:A,descriptions:z,divider:D,drawer:_,skeleton:V,steps:L,image:G,layout:H,list:W,listy:Z,mentions:B,modal:K,progress:j,result:Q,slider:X,breadcrumb:U,masonry:J,menu:P,pagination:O,input:q,inputPassword:ee,inputSearch:le,textArea:re,otp:ie,empty:Ce,badge:de,borderBeam:$e,radio:ae,rate:Pe,ribbon:he,switch:ne,transfer:fe,avatar:ce,message:Re,tag:De,table:we,card:pe,cardMeta:ue,tabs:se,timeline:Se,timePicker:Ie,upload:Te,notification:qe,tree:Ge,colorPicker:mt,datePicker:Ze,rangePicker:$t,flex:wt,wave:gt,dropdown:ht,warning:yt,tour:Rt,tooltip:Fe,popover:xt,popconfirm:be,qrcode:oe,floatButton:me,floatButtonGroup:te,variant:ge,inputNumber:ye,treeSelect:Le,watermark:Qe}=e,Ot=Dt.useMemo(()=>st(l)&&Object.prototype.hasOwnProperty.call(l,"default")&&l.default?.locale?l.default:l,[l]),Wt=Dt.useCallback((vt,jt)=>{let{prefixCls:_o}=e;if(jt)return jt;let hn=_o||y.getPrefixCls("");return vt?`${hn}-${vt}`:hn},[y.getPrefixCls,e.prefixCls]),Pt=S||y.iconPrefixCls||fl,to=o||y.csp,ao=lb(v,y.theme,{prefixCls:Wt("")}),In={csp:to,autoInsertSpaceInButton:n,alert:r,affix:i,anchor:s,app:a,locale:Ot||x,direction:u,space:m,splitter:p,virtual:g,popupMatchSelectWidth:h??f,popupOverflow:b,getPrefixCls:Wt,iconPrefixCls:Pt,theme:ao,segmented:w,statistic:R,spin:T,calendar:N,carousel:I,cascader:E,collapse:k,typography:F,checkbox:A,descriptions:z,divider:D,drawer:_,skeleton:V,steps:L,image:G,input:q,inputPassword:ee,inputSearch:le,textArea:re,otp:ie,layout:H,list:W,listy:Z,mentions:B,modal:K,progress:j,result:Q,slider:X,breadcrumb:U,masonry:J,menu:P,pagination:O,empty:Ce,badge:de,borderBeam:$e,radio:ae,rate:Pe,ribbon:he,switch:ne,transfer:fe,avatar:ce,message:Re,tag:De,table:we,card:pe,cardMeta:ue,tabs:se,timeline:Se,timePicker:Ie,upload:Te,notification:qe,tree:Ge,colorPicker:mt,datePicker:Ze,rangePicker:$t,flex:wt,wave:gt,dropdown:ht,warning:yt,tour:Rt,tooltip:Fe,popover:xt,popconfirm:be,qrcode:oe,floatButton:me,floatButtonGroup:te,variant:ge,inputNumber:ye,treeSelect:Le,watermark:Qe},Be={...y};Object.keys(In).forEach(vt=>{In[vt]!==void 0&&(Be[vt]=In[vt])}),sD.forEach(vt=>{let jt=e[vt];jt&&(Be[vt]=jt)}),typeof n<"u"&&(Be.button={autoInsertSpace:n,...Be.button});let tt=qn(()=>Be,Be,(vt,jt)=>{let _o=Object.keys(vt),hn=Object.keys(jt);return _o.length!==hn.length||_o.some(Tr=>vt[Tr]!==jt[Tr])}),{layer:dt}=Dt.useContext(Or),Ae=Dt.useMemo(()=>({prefixCls:Pt,csp:to,layer:dt?"antd":void 0,zeroRuntime:!!dt||ao?.zeroRuntime}),[Pt,to,dt,ao?.zeroRuntime]),je=Dt.createElement(Dt.Fragment,null,Dt.createElement(iD,{iconPrefixCls:Pt,csp:to}),Dt.createElement(YE,{dropdownMatchSelectWidth:f}),t),Tt=Dt.useMemo(()=>Yr(Yn.Form?.defaultValidateMessages||{},tt.locale?.Form?.defaultValidateMessages||{},tt.form?.validateMessages||{},c?.validateMessages||{}),[tt,c?.validateMessages]);Object.keys(Tt).length>0&&(je=Dt.createElement(CR.Provider,{value:Tt},je)),Ot&&(je=Dt.createElement(MR,{locale:Ot,_ANT_MARK__:TR},je)),(Pt||to)&&(je=Dt.createElement(sl.Provider,{value:Ae},je)),d&&(je=Dt.createElement(RE,{size:d},je)),je=Dt.createElement(cb,null,je),Fe?.unique&&(je=Dt.createElement(Km,null,je));let po=Dt.useMemo(()=>{let{algorithm:vt,token:jt,components:_o,cssVar:hn,...Tr}=ao||{},Kr=vt&&(!Array.isArray(vt)||vt.length>0)?Zi(vt):Dc,Ui={};Object.entries(_o||{}).forEach(([bi,mc])=>{let He={...mc};"algorithm"in He&&(He.algorithm===!0?He.theme=Kr:(Array.isArray(He.algorithm)||ct(He.algorithm))&&(He.theme=Zi(He.algorithm)),delete He.algorithm),Ui[bi]=He});let qr={...vi,...jt};return{...Tr,theme:Kr,token:qr,components:Ui,override:{override:qr,...Ui},cssVar:hn}},[ao]);return v&&(je=Dt.createElement(Fc.Provider,{value:po},je)),tt.warning&&(je=Dt.createElement(kw.Provider,{value:tt.warning},je)),C!==void 0&&(je=Dt.createElement(qm,{disabled:C},je)),Dt.createElement(Oe.Provider,{value:tt},je)},yl=e=>{let t=Dt.useContext(Oe),o=Dt.useContext(al);return Dt.createElement(cD,{parentContext:t,legacyLocale:o,...e})};yl.ConfigContext=Oe;yl.SizeContext=aa;yl.config=lD;yl.useConfig=EE;Object.defineProperty(yl,"SizeContext",{get:()=>aa});var ss=yl;var dD=e=>{let{componentCls:t,colorPrimary:o,motionDurationSlow:n,motionEaseInOut:r,motionEaseOutCirc:i,antCls:s}=e,[,a]=Gt(s,"wave");return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:a("color",o),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(c=>`${c} ${i}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(c=>`${c} ${n} ${r}`).join(",")}}}}},t1=ab("Wave",dD);var xl=M(require("react"));var bl=`${rs}-wave-target`;var Ho=M(require("react"));var o1=e=>e?Tn(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 n1(e,t=null){let o=getComputedStyle(e),{borderTopColor:n,borderColor:r,backgroundColor:i}=o;return t&&o1(o[t])?o[t]:[n,r,i].find(o1)??null}function ub(e){return Number.isNaN(e)?0:e}var uD=e=>{let{className:t,target:o,component:n,colorSource:r}=e,i=Ho.useRef(null),{getPrefixCls:s}=Ho.useContext(Oe),a=s(),[c]=Gt(a,"wave"),[l,d]=Ho.useState(null),[u,m]=Ho.useState([]),[p,g]=Ho.useState(0),[f,h]=Ho.useState(0),[b,x]=Ho.useState(0),[y,S]=Ho.useState(0),[v,C]=Ho.useState(!1),w={left:p,top:f,width:b,height:y,borderRadius:u.map(N=>`${N}px`).join(" ")};l&&(w[c("color")]=l);function R(){let N=getComputedStyle(o);d(n1(o,r));let I=N.position==="static",{borderLeftWidth:E,borderTopWidth:k}=N;g(I?o.offsetLeft:ub(-Number.parseFloat(E))),h(I?o.offsetTop:ub(-Number.parseFloat(k))),x(o.offsetWidth),S(o.offsetHeight);let{borderTopLeftRadius:F,borderTopRightRadius:A,borderBottomLeftRadius:z,borderBottomRightRadius:D}=N;m([F,A,D,z].map(_=>ub(Number.parseFloat(_))))}if(Ho.useEffect(()=>{if(o){let N=Ve(()=>{R(),C(!0)}),I;return typeof ResizeObserver<"u"&&(I=new ResizeObserver(R),I.observe(o)),()=>{Ve.cancel(N),I?.disconnect()}}},[o]),!v)return null;let T=(n==="Checkbox"||n==="Radio")&&o?.classList.contains(bl);return Ho.createElement(fo,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(N,I)=>{if(I.deadline||Xu(I)&&I.propertyName==="opacity"){let E=i.current?.parentElement;Ic(E).then(()=>{E?.remove()})}return!1}},({className:N},I)=>Ho.createElement("div",{ref:Mt(i,I),className:$(t,N,{"wave-quick":T}),style:w}))},mD=(e,t)=>{let{component:o}=t;if(o==="Checkbox"&&!e.querySelector("input")?.checked)return;let n=document.createElement("div");n.style.position="absolute",n.style.left="0px",n.style.top="0px",e?.insertBefore(n,e?.firstChild),$c(Ho.createElement(uD,{...t,target:e}),n)},r1=mD;var pD=(e,t,o,n)=>{let{wave:r}=xl.useContext(Oe),[,i,s]=qt(),a=Ne(d=>{let u=e.current;if(r?.disabled||!u)return;let m=u.querySelector(`.${bl}`)||u,{showEffect:p}=r||{};(p||r1)(m,{className:t,token:i,component:o,event:d,hashId:s,colorSource:n})}),c=xl.useRef(null);return xl.useEffect(()=>()=>{Ve.cancel(c.current)},[]),d=>{Ve.cancel(c.current),c.current=Ve(()=>{a(d)})}},i1=pD;var s1={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"},fD=e=>{let{children:t,disabled:o,component:n,colorSource:r}=e,{getPrefixCls:i,wave:s}=(0,ua.useContext)(Oe),a=(0,ua.useRef)(null),c=i("wave"),l=t1(c),d=i1(a,$(c,l),n,r);if(ua.default.useEffect(()=>{let m=a.current;if(!m||m.nodeType!==window.Node.ELEMENT_NODE||o)return;let p=h=>{!Us(h.target)||!m.getAttribute||m.getAttribute("disabled")||m.disabled||m.className.includes("disabled")&&!m.className.includes("disabled:")||m.getAttribute("aria-disabled")==="true"||m.className.includes("-leave")||d(h)},g=s?.triggerType,f=g&&g in s1?s1[g]:"click";return m.addEventListener(f,p,!0),()=>{m.removeEventListener(f,p,!0)}},[o,s?.triggerType]),!ua.default.isValidElement(t))return t??null;let u=ur(t)?Mt(To(t),a):a;return Ro(t,{ref:u})},vl=fD;var mb=M(require("react"));var gD=e=>{let t=mb.default.useContext(aa);return mb.default.useMemo(()=>e?Tn(e)?e??t:ct(e)?e(t):t:t,[e,t])},Xt=gD;var vo=M(require("react"));var dp=M(require("react"));var cp=M(require("react"));var hD={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"},a1=hD;var pa=M(require("react"));var x1=M(require("react"));var ma=M(require("react"));var l1="data-rc-order",c1="data-rc-priority",yD="rc-util-key",pb=new Map;function u1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function bD(e,t){if(!e||!t)return!1;if(e.contains)return e.contains(t);let o=t;for(;o;){if(o===e)return!0;o=o.parentNode}return!1}function m1({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:yD}function fb(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function xD(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function gb(e){return Array.from((pb.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function p1(e,t={}){if(!u1())return null;let{csp:o,prepend:n,priority:r=0}=t,i=xD(n),s=i==="prependQueue",a=document.createElement("style");a.setAttribute(l1,i),s&&r&&a.setAttribute(c1,`${r}`),o?.nonce&&(a.nonce=o.nonce),a.innerHTML=e;let c=fb(t),{firstChild:l}=c;if(n){if(s){let d=(t.styles||gb(c)).filter(u=>{if(!["prepend","prependQueue"].includes(u.getAttribute(l1)))return!1;let m=Number(u.getAttribute(c1)||0);return r>=m});if(d.length)return c.insertBefore(a,d[d.length-1].nextSibling),a}c.insertBefore(a,l)}else c.appendChild(a);return a}function vD(e,t={}){let{styles:o}=t;return o||=gb(fb(t)),o.find(n=>n.getAttribute(m1(t))===e)}function SD(e,t){let o=pb.get(e);if(!o||!bD(document,o)){let n=p1("",t);if(!n)return;let{parentNode:r}=n;pb.set(e,r),e.removeChild(n)}}function f1(e,t,o={}){if(!u1())return null;let n=fb(o),r=gb(n),i={...o,styles:r};SD(n,i);let s=vD(t,i);if(s)return i.csp?.nonce&&s.nonce!==i.csp.nonce&&(s.nonce=i.csp.nonce),s.innerHTML!==e&&(s.innerHTML=e),s;let a=p1(e,i);return a?.setAttribute(m1(i),t),a}function CD(e){return e?.getRootNode?.()}function g1(e){let t=CD(e);return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t:null}var d1={};function h1(e,t){e||d1[t]||(d1[t]=!0)}function wD(e){return e.replace(/-(.)/g,(t,o)=>o.toUpperCase())}function lp(e,t){h1(e,`[@ant-design/icons] ${t}`)}function Sl(e){return e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function y1(e={}){return Object.keys(e).reduce((t,o)=>{let n=e[o];switch(o){case"class":t.className=n,delete t.class;break;default:delete t[o],t[wD(o)]=n}return t},{})}function ap(e,t,o){return o?ma.default.createElement(e.tag,{key:t,...y1(e.attrs),...o},(e.children||[]).map((n,r)=>ap(n,`${t}-${e.tag}-${r}`))):ma.default.createElement(e.tag,{key:t,...y1(e.attrs)},(e.children||[]).map((n,r)=>ap(n,`${t}-${e.tag}-${r}`)))}var RD=`
72
- .anticon {
73
- display: inline-flex;
74
- align-items: center;
75
- color: inherit;
76
- font-style: normal;
77
- line-height: 0;
78
- text-align: center;
79
- text-transform: none;
80
- vertical-align: -0.125em;
81
- text-rendering: optimizeLegibility;
82
- -webkit-font-smoothing: antialiased;
83
- -moz-osx-font-smoothing: grayscale;
84
- }
85
-
86
- .anticon > * {
87
- line-height: 1;
88
- }
89
-
90
- .anticon svg {
91
- display: inline-block;
92
- vertical-align: inherit;
93
- }
94
-
95
- .anticon::before {
96
- display: none;
97
- }
98
-
99
- .anticon .anticon-icon {
100
- display: block;
101
- }
102
-
103
- .anticon[tabindex] {
104
- cursor: pointer;
105
- }
106
-
107
- .anticon-spin {
108
- -webkit-animation: loadingCircle 1s infinite linear;
109
- animation: loadingCircle 1s infinite linear;
110
- }
111
-
112
- @-webkit-keyframes loadingCircle {
113
- 100% {
114
- -webkit-transform: rotate(360deg);
115
- transform: rotate(360deg);
116
- }
117
- }
118
-
119
- @keyframes loadingCircle {
120
- 100% {
121
- -webkit-transform: rotate(360deg);
122
- transform: rotate(360deg);
123
- }
124
- }
125
- `,b1=e=>{let{csp:t,prefixCls:o,layer:n,zeroRuntime:r}=(0,ma.useContext)(sl),i=RD;o&&(i=i.replace(/anticon/g,o)),n&&(i=`@layer ${n} {
126
- ${i}
127
- }`),(0,ma.useEffect)(()=>{if(r)return;let s=e.current,a=g1(s);f1(i,"@ant-design-icons",{prepend:!n,csp:t,attachTo:a})},[])};var v1=e=>{let{icon:t,className:o,onClick:n,style:r,primaryColor:i,secondaryColor:s,...a}=e,c=x1.useRef(null);if(b1(c),lp(Sl(t),`icon should be icon definiton, but got ${typeof t}`),!Sl(t))return null;let l=t;return ap(l.icon,`svg-${l.name}`,{className:o,onClick:n,style:r,"data-icon":l.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...a,ref:c})};v1.displayName="IconReact";var S1=v1;function hb(){return hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},hb.apply(this,arguments)}var ED=pa.forwardRef((e,t)=>{let{className:o,icon:n,spin:r,rotate:i,tabIndex:s,onClick:a,twoToneColor:c,...l}=e,{prefixCls:d="anticon",rootClassName:u}=pa.useContext(sl);if(lp(Sl(n),`icon should be icon definiton, but got ${typeof n}`),!Sl(n))return null;let m=$(u,d,{[`${d}-${n.name}`]:!!n.name,[`${d}-spin`]:!!r||n.name==="loading"},o),p=s;p===void 0&&a&&(p=-1);let g=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0;return pa.createElement("span",hb({role:"img","aria-label":n.name},l,{ref:t,tabIndex:p,onClick:a,className:m}),pa.createElement(S1,{icon:n,style:g}))}),kt=ED;function yb(){return yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},yb.apply(this,arguments)}var $D=(e,t)=>cp.createElement(kt,yb({},e,{ref:t,icon:a1})),ID=cp.forwardRef($D),as=ID;function Qt(...e){return e.find(t=>t!==void 0)}var up=e=>{let{allowClear:t,clearIcon:o,contextAllowClear:n,contextClearIcon:r,defaultAllowClear:i,componentName:s}=e;return(0,dp.useMemo)(()=>t??n??i?{clearIcon:Qt(st(t)?t?.clearIcon:o,st(n)?n?.clearIcon:r,dp.default.createElement(as,null)),disabled:(st(t)?t?.disabled:void 0)??(st(n)?n?.disabled:void 0)}:!1,[t,o,n,r,i])};var fa=M(require("react"));var mp=M(require("react"));var ND={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"},C1=ND;function bb(){return bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},bb.apply(this,arguments)}var PD=(e,t)=>mp.createElement(kt,bb({},e,{ref:t,icon:C1})),TD=mp.forwardRef(PD),Zn=TD;var xb=e=>{if(!e)return;let{closable:t,closeIcon:o}=e;return{closable:t,closeIcon:o}},R1={},w1=(e,t)=>{if(!e&&(e===!1||t===!1||t===null))return!1;if(!Pn(e)&&!Pn(t))return null;let o={closeIcon:typeof t!="boolean"&&Pn(t)?t:void 0};return st(e)&&(o={...o,...e}),o},MD=(e,t,o)=>e===!1?!1:e?ju(o,t,e):t===!1?!1:t?ju(o,t):o.closable?o:!1,kD=(e,t,o)=>{let{closeIconRender:n}=t,{closeIcon:r,...i}=e,s=r,a=Mo(i,!0);return Pn(s)&&(n&&(s=n(s)),s=fa.default.isValidElement(s)?fa.default.cloneElement(s,{"aria-label":o,...s.props,...a}):fa.default.createElement("span",{"aria-label":o,...a},s)),[s,{"aria-label":o,...a}]},OD=(e,t,o=R1,n="Close")=>{let r=w1(e?.closable,e?.closeIcon),i=w1(t?.closable,t?.closeIcon),s={closeIcon:fa.default.createElement(Zn,null),...o},a=MD(r,i,s),c=typeof a!="boolean"?!!a?.disabled:!1;if(a===!1)return[!1,null,c,{}];let[l,d]=kD(a,s,n);return[!0,l,c,d]},E1=(e,t,o=R1)=>{let[n]=qo("global",Yn.global);return fa.default.useMemo(()=>OD(e,t,{closeIcon:fa.default.createElement(Zn,null),...o},n.close),[e,t,o,n.close])};var $1=require("react");var pp=(e,t)=>{let o={};return st(e)&&(o={...e}),typeof e=="boolean"&&(o={enabled:e}),o.closable===void 0&&t!==void 0&&(o.closable=t),o},I1=(e,t,o,n)=>(0,$1.useMemo)(()=>{let r=pp(e,n),i=pp(t),s={blur:!1,...i,...r,closable:r.closable??n??i.closable??!0},a=s.blur?`${o}-mask-blur`:void 0;return[s.enabled!==!1,{mask:a},!!s.closable]},[e,t,o,n]);var P1=require("react"),N1=e=>e==="horizontal"||e==="vertical",Cl=(e,t,o)=>(0,P1.useMemo)(()=>{let n=N1(e),r;return n?r=e:typeof t=="boolean"?r=t?"vertical":"horizontal":r=N1(o)?o:"horizontal",[r,r==="vertical"]},[o,e,t]);var fp=M(require("react")),T1=()=>{let[e,t]=fp.useState([]),o=fp.useCallback(n=>(t(r=>[].concat(Zt(r),[n])),()=>{t(r=>r.filter(i=>i!==n))}),[]);return[e,o]};var k1=M(require("react"));var M1=M(require("react")),AD=M1.default.createContext(void 0),ls=AD;var Ii=100,LD=10,vb=Ii*LD,yQ=vb+Ii,O1={Modal:Ii,Drawer:Ii,Popover:Ii,Popconfirm:Ii,Tooltip:Ii,Tour:Ii,FloatButton:Ii},DD={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},_D=e=>e in O1,ti=(e,t)=>{let[,o]=qt(),n=k1.default.useContext(ls),r=_D(e),i;if(t!==void 0)i=[t,t];else{let s=n??0;r?s+=(n?0:o.zIndexPopupBase)+O1[e]:s+=DD[e],i=[n===void 0?t:s,s]}return i};var FD=e=>{let{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},A1=Ye(["Space","Compact"],FD,()=>({}),{resetStyle:!1});var gp=vo.createContext(null),Ln=(e,t)=>{let o=vo.useContext(gp),n=vo.useMemo(()=>{if(!o)return"";let{compactDirection:r,isFirstItem:i,isLastItem:s}=o,a=r==="vertical"?"-vertical-":"-";return $(`${e}-compact${a}item`,{[`${e}-compact${a}first-item`]:i,[`${e}-compact${a}last-item`]:s,[`${e}-compact${a}item-rtl`]:t==="rtl"})},[e,t,o]);return{compactSize:o?.compactSize,compactDirection:o?.compactDirection,compactItemClassnames:n}},L1=e=>{let{children:t}=e;return vo.createElement(gp.Provider,{value:null},t)},zD=e=>{let{children:t,...o}=e;return vo.createElement(gp.Provider,{value:vo.useMemo(()=>o,[o])},t)},BD=vo.forwardRef((e,t)=>{let{getPrefixCls:o,direction:n}=vo.useContext(Oe),{size:r,direction:i,orientation:s,block:a,prefixCls:c,className:l,rootClassName:d,children:u,vertical:m,...p}=e,[g,f]=Cl(s,m,i),h=Xt(R=>r??R),b=o("space-compact",c),[x]=A1(b),y=$(b,x,{[`${b}-rtl`]:n==="rtl",[`${b}-block`]:a,[`${b}-vertical`]:f},l,d),S=vo.useContext(gp),v=vo.useRef(null);vo.useImperativeHandle(t,()=>({nativeElement:v.current}));let C=co(u),w=vo.useMemo(()=>C.map((R,T)=>{let N=R?.key||`${b}-item-${T}`;return vo.createElement(zD,{key:N,compactSize:h,compactDirection:g,isFirstItem:T===0&&(!S||S?.isFirstItem),isLastItem:T===C.length-1&&(!S||S?.isLastItem)},R)}),[C,S,g,h,b]);return C.length===0?null:vo.createElement("div",{ref:v,className:y,...p},w)}),hp=BD;var Ni=M(require("react"));var Sb=Ni.createContext(void 0),HD=e=>{let{getPrefixCls:t,direction:o}=Ni.useContext(Oe),{prefixCls:n,size:r,className:i,...s}=e,a=t("btn-group",n),[,,c]=qt(),l=Ni.useMemo(()=>{switch(r){case"large":return"lg";case"small":return"sm";default:return""}},[r]),d=$(a,{[`${a}-${l}`]:l,[`${a}-rtl`]:o==="rtl"},i,c);return Ni.createElement(Sb.Provider,{value:r},Ni.createElement("div",{...s,className:d}))},D1=HD;var ed=M(require("react"));var _1=/^[\u4E00-\u9FA5]{2}$/,yp=_1.test.bind(_1);function bp(e){return e==="danger"?{danger:!0}:{type:e}}function xp(e){return e==="text"||e==="link"}function VD(e,t,o,n){if(!lo(e))return;let r=t?" ":"";return!Tn(e)&&!Ko(e)&&Tn(e.type)&&yp(e.props.children)?Ro(e,i=>{let s=$(i.className,n)||void 0,a={...o,...i.style};return{...i,children:i.children.split("").join(r),className:s,style:a}}):Tn(e)?ed.default.createElement("span",{className:n,style:o},yp(e)?e.split("").join(r):e):Vm(e)?ed.default.createElement("span",{className:n,style:o},e):Ro(e,i=>({...i,className:$(i.className,n)||void 0,style:{...i.style,...o}}))}function F1(e,t,o,n){let r=!1,i=[];return ed.default.Children.forEach(e,s=>{let a=Tn(s)||Ko(s);if(r&&a){let c=i.length-1,l=i[c];i[c]=`${l}${s}`}else i.push(s);r=a}),ed.default.Children.map(i,s=>VD(s,t,o,n))}var FQ=["default","primary","danger"].concat(Zt(jo));var cs=M(require("react"));var vp=M(require("react"));var WD={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"},z1=WD;function Cb(){return Cb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Cb.apply(this,arguments)}var jD=(e,t)=>vp.createElement(kt,Cb({},e,{ref:t,icon:z1})),UD=vp.forwardRef(jD),wl=UD;var Sp=M(require("react"));var KD=(0,Sp.forwardRef)((e,t)=>{let{className:o,style:n,children:r,prefixCls:i}=e,s=$(`${i}-icon`,o);return Sp.default.createElement("span",{ref:t,className:s,style:n},r)}),Cp=KD;var B1=(0,cs.forwardRef)((e,t)=>{let{prefixCls:o,className:n,style:r,iconClassName:i}=e,s=$(`${o}-loading-icon`,n);return cs.default.createElement(Cp,{prefixCls:o,className:s,style:r,ref:t},cs.default.createElement(wl,{className:i}))}),wb=()=>({width:0,opacity:0,transform:"scale(0)"}),Rb=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),qD=e=>{let{prefixCls:t,loading:o,existIcon:n,className:r,style:i,mount:s}=e,a=!!o;return n?cs.default.createElement(B1,{prefixCls:t,className:r,style:i}):cs.default.createElement(fo,{visible:a,motionName:`${t}-loading-icon-motion`,motionAppear:!s,motionEnter:!s,motionLeave:!s,removeOnLeave:!0,onAppearStart:wb,onAppearActive:Rb,onEnterStart:wb,onEnterActive:Rb,onLeaveStart:Rb,onLeaveActive:wb},({className:c,style:l},d)=>{let u={...i,...l};return cs.default.createElement(B1,{prefixCls:t,className:$(r,c),style:u,ref:d})})},H1=qD;var GD=e=>{let{componentCls:t,antCls:o,motionDurationMid:n,motionEaseInOut:r}=e;return{[t]:{[`${o}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(i=>`${i} ${n} ${r}`).join(", ")} !important`}},[`${o}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(i=>`${i} ${n} ${r}`).join(", ")} !important`}}}},Eb=GD;var V1=e=>({animationDuration:e,animationFillMode:"both"}),ds=(e,t,o,n,r=!1)=>{let i=r?"&":"";return{[`
128
- ${i}${e}-enter,
129
- ${i}${e}-appear
130
- `]:{...V1(n),animationPlayState:"paused"},[`${i}${e}-leave`]:{...V1(n),animationPlayState:"paused"},[`
131
- ${i}${e}-enter${e}-enter-active,
132
- ${i}${e}-appear${e}-appear-active
133
- `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:o,animationPlayState:"running",pointerEvents:"none"}}};var W1=new ot("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),j1=new ot("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),td=(e,t=!1)=>{let{antCls:o}=e,n=`${o}-fade`,r=t?"&":"";return[ds(n,W1,j1,e.motionDurationMid,t),{[`
134
- ${r}${n}-enter,
135
- ${r}${n}-appear
136
- `]:{opacity:0,animationTimingFunction:"linear"},[`${r}${n}-leave`]:{animationTimingFunction:"linear"}}]};var U1=new ot("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),K1=new ot("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),q1=new ot("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),G1=new ot("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),X1=new ot("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Y1=new ot("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Z1=new ot("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Q1=new ot("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),XD={"move-up":{inKeyframes:Z1,outKeyframes:Q1},"move-down":{inKeyframes:U1,outKeyframes:K1},"move-left":{inKeyframes:q1,outKeyframes:G1},"move-right":{inKeyframes:X1,outKeyframes:Y1}},ga=(e,t)=>{let{antCls:o}=e,n=`${o}-${t}`,{inKeyframes:r,outKeyframes:i}=XD[t];return[ds(n,r,i,e.motionDurationMid),{[`
137
- ${n}-enter,
138
- ${n}-appear
139
- `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var us=new ot("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ms=new ot("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ps=new ot("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),fs=new ot("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),wp=new ot("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Rp=new ot("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Ep=new ot("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),$p=new ot("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),YD={"slide-up":{inKeyframes:us,outKeyframes:ms},"slide-down":{inKeyframes:ps,outKeyframes:fs},"slide-left":{inKeyframes:wp,outKeyframes:Rp},"slide-right":{inKeyframes:Ep,outKeyframes:$p}},xn=(e,t)=>{let{antCls:o}=e,n=`${o}-${t}`,{inKeyframes:r,outKeyframes:i}=YD[t];return[ds(n,r,i,e.motionDurationMid),{[`
140
- ${n}-enter,
141
- ${n}-appear
142
- `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]};var oi=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),Rl=()=>({"@media (prefers-reduced-motion: reduce)":{transition:"none",animation:"none"}});var J1=new ot("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),e$=new ot("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),$b=new ot("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Ib=new ot("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),t$=new ot("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),o$=new ot("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),n$=new ot("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),r$=new ot("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),i$=new ot("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),s$=new ot("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),a$=new ot("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),l$=new ot("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),ZD={zoom:{inKeyframes:J1,outKeyframes:e$},"zoom-big":{inKeyframes:$b,outKeyframes:Ib},"zoom-big-fast":{inKeyframes:$b,outKeyframes:Ib},"zoom-left":{inKeyframes:n$,outKeyframes:r$},"zoom-right":{inKeyframes:i$,outKeyframes:s$},"zoom-up":{inKeyframes:t$,outKeyframes:o$},"zoom-down":{inKeyframes:a$,outKeyframes:l$}},Pi=(e,t)=>{let{antCls:o}=e,n=`${o}-${t}`,{inKeyframes:r,outKeyframes:i}=ZD[t];return[ds(n,r,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
143
- ${n}-enter,
144
- ${n}-appear
145
- `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var c$=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),QD=e=>{let{componentCls:t,fontSize:o,lineWidth:n,groupBorderColor:r,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(n).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:o}},c$(`${t}-primary`,r),c$(`${t}-danger`,i)]}},d$=QD;var Mb=M(require("react"));var Nb=e=>Math.round(Number(e||0)),JD=e=>{if(e instanceof pt)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){let{b:t,...o}=e;return{...o,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},vn=class extends pt{constructor(t){super(JD(t))}toHsbString(){let t=this.toHsb(),o=Nb(t.s*100),n=Nb(t.b*100),r=Nb(t.h),i=t.a,s=`hsb(${r}, ${o}%, ${n}%)`,a=`hsba(${r}, ${o}%, ${n}%, ${i.toFixed(i===0?0:2)})`;return i===1?s:a}toHsb(){let{v:t,...o}=this.toHsv();return{...o,b:t,a:this.a}}};var Pb=e=>e instanceof vn?e:new vn(e),e5=Pb("#1677ff");var t5=M(require("react"));var m$=M(require("react"));var Tb=require("react");var o5=M(require("react"));var n5=M(require("react"));var u$=M(require("react"));var d5=require("react");var u5=M(require("react"));var f$=M(require("react"));var p$=M(require("react"));var m5=(e,t)=>e?.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6)||"",p5=(e,t)=>e?m5(e,t):"",od=function(){function e(t){if(Jr(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=t.colors?.map(n=>({color:new e(n.color),percent:n.percent})),this.cleared=t.cleared;return}let o=Array.isArray(t);o&&t.length?(this.colors=t.map(({color:n,percent:r})=>({color:new e(n),percent:r})),this.metaColor=new vn(this.colors[0].color.metaColor)):this.metaColor=new vn(o?"":t),(!t||o&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return ei(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return p5(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){let{colors:o}=this;return o?`linear-gradient(90deg, ${o.map(r=>`${r.color.toRgbString()} ${r.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(o){return!o||this.isGradient()!==o.isGradient()?!1:this.isGradient()?this.colors.length===o.colors.length&&this.colors.every((n,r)=>{let i=o.colors[r];return n.percent===i.percent&&n.color.equals(i.color)}):this.toHexString()===o.toHexString()}}])}();var S$=M(require("react"));var Ip=M(require("react"));var f5={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"},h$=f5;function kb(){return kb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},kb.apply(this,arguments)}var g5=(e,t)=>Ip.createElement(kt,kb({},e,{ref:t,icon:h$})),h5=Ip.forwardRef(g5),y$=h5;function Qn(){return Qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Qn.apply(null,arguments)}var Ob=()=>({height:0,opacity:0}),b$=e=>({height:e?.scrollHeight??0,opacity:e?1:0}),y5=e=>({height:e?.offsetHeight??0}),Ab=(e,t)=>t?.deadline===!0||Xu(t)&&t.propertyName==="height",b5=(e=rs)=>({motionName:`${e}-motion-collapse`,onAppearStart:Ob,onEnterStart:Ob,onAppearActive:b$,onEnterActive:b$,onLeaveStart:y5,onLeaveActive:Ob,onAppearEnd:Ab,onEnterEnd:Ab,onLeaveEnd:Ab,motionDeadline:500});var yr=(e,t,o)=>o!==void 0?o:`${e}-${t}`;var x$=b5;var v$=e=>e instanceof od?e:new od(e);var C$=(e,t)=>{let{r:o,g:n,b:r,a:i}=e.toRgb(),s=new vn(e.toRgbString()).onBackground(t).toHsv();return i<=.5?s.v>.5:o*.299+n*.587+r*.114>192};var Np=e=>{let{paddingInline:t,onlyIconSize:o,borderColorDisabled:n}=e;return ze(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:o,colorBorderDisabled:n})},Pp=e=>{let t=e.contentFontSize??e.fontSize,o=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,r=e.contentLineHeight??Va(t),i=e.contentLineHeightSM??Va(o),s=e.contentLineHeightLG??Va(n),a=C$(new od(e.colorBgSolid),"#fff")?"#000":"#fff",c=jo.reduce((u,m)=>({...u,[`${m}ShadowColor`]:`0 ${Y(e.controlOutlineWidth)} 0 ${la(e[`${m}1`],e.colorBgContainer)}`}),{}),l=e.colorBgContainerDisabled,d=e.colorBgContainerDisabled;return{...c,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:a,contentFontSize:t,contentFontSizeSM:o,contentFontSizeLG:n,contentLineHeight:r,contentLineHeightSM:i,contentLineHeightLG:s,paddingBlock:Math.max((e.controlHeight-t*r)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-o*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-n*s)/2-e.lineWidth,0),defaultBgDisabled:l,dashedBgDisabled:d}};var x5=e=>{let{componentCls:t,antCls:o,lineWidth:n,lineType:r}=e,[i,s]=Gt(o,"btn");return{[t]:[{[i("border-width")]:n,[i("border-color")]:"#000",[i("border-color-hover")]:s("border-color"),[i("border-color-active")]:s("border-color"),[i("border-color-disabled")]:s("border-color"),[i("border-style")]:r,[i("text-color")]:"#000",[i("text-color-hover")]:s("text-color"),[i("text-color-active")]:s("text-color"),[i("text-color-disabled")]:s("text-color"),[i("bg-color")]:"#ddd",[i("bg-color-hover")]:s("bg-color"),[i("bg-color-active")]:s("bg-color"),[i("bg-color-disabled")]:e.colorBgContainerDisabled,[i("bg-color-container")]:e.colorBgContainer,[i("shadow")]:"none"},{border:[s("border-width"),s("border-style"),s("border-color")].join(" "),color:s("text-color"),backgroundColor:s("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[s("border-width"),s("border-style"),s("border-color-hover")].join(" "),color:s("text-color-hover"),backgroundColor:s("bg-color-hover")},"&:active":{border:[s("border-width"),s("border-style"),s("border-color-active")].join(" "),color:s("text-color-active"),backgroundColor:s("bg-color-active")}}},{[`&${t}-variant-solid`]:{[i("solid-bg-color")]:s("color-base"),[i("solid-bg-color-hover")]:s("color-hover"),[i("solid-bg-color-active")]:s("color-active"),[i("border-color")]:"transparent",[i("text-color")]:e.colorTextLightSolid,[i("bg-color")]:s("solid-bg-color"),[i("bg-color-hover")]:s("solid-bg-color-hover"),[i("bg-color-active")]:s("solid-bg-color-active"),boxShadow:s("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("border-color")]:s("color-base"),[i("border-color-hover")]:s("color-hover"),[i("border-color-active")]:s("color-active"),[i("bg-color")]:s("bg-color-container"),[i("text-color")]:s("color-base"),[i("text-color-hover")]:s("color-hover"),[i("text-color-active")]:s("color-active"),boxShadow:s("shadow")},[`&${t}-variant-dashed`]:{[i("border-style")]:"dashed",[i("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i("border-color")]:"transparent",[i("text-color")]:s("color-base"),[i("bg-color")]:s("color-light"),[i("bg-color-hover")]:s("color-light-hover"),[i("bg-color-active")]:s("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[i("border-color")]:"transparent",[i("text-color")]:s("color-base"),[i("text-color-hover")]:s("color-hover"),[i("text-color-active")]:s("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")]:s("color-light"),[i("bg-color-active")]:s("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")]:s("text-color"),[i("text-color-active")]:s("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")]:s("text-color"),[i("text-color-active")]:s("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")]:s("text-color"),[i("text-color-active")]:s("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[i("text-color-hover")]:s("text-color"),[i("text-color-active")]:s("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}}}},jo.map(a=>{let c=e[`${a}6`],l=e[`${a}1`],d=e[`${a}Hover`],u=e[`${a}2`],m=e[`${a}3`],p=e[`${a}Active`],g=e[`${a}ShadowColor`];return{[`&${t}-color-${a}`]:{[i("color-base")]:c,[i("color-hover")]:d,[i("color-active")]:p,[i("color-light")]:l,[i("color-light-hover")]:u,[i("color-light-active")]:m,[i("shadow")]:g}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:s("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}}}]}},w$=x5;var v5=e=>{let{componentCls:t,iconCls:o,fontWeight:n,opacityLoading:r,motionDurationSlow:i,motionEaseInOut:s,iconGap:a,calc:c}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:a,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...oi(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:ca(),[`${t}-icon`]:{display:"inline-flex",alignItems:"center",[o]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":ln(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${o})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:r,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(l=>`${l} ${i} ${s}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineEnd:c(a).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(a).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineStart:c(a).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(a).mul(-1).equal()}}}}}},S5=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),Lb=(e,t="")=>{let{componentCls:o,controlHeight:n,fontSize:r,borderRadius:i,buttonPaddingHorizontal:s,iconCls:a,buttonPaddingVertical:c,buttonIconOnlyFontSize:l}=e;return[{[t]:{fontSize:r,height:n,padding:`${Y(c)} ${Y(s)}`,borderRadius:i,[`&${o}-icon-only`]:{width:n,[a]:{fontSize:l}}}},{[`${o}${o}-circle${t}`]:S5(e)},{[`${o}${o}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${o}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},C5=e=>{let t=ze(e,{fontSize:e.contentFontSize});return Lb(t,e.componentCls)},w5=e=>{let t=ze(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Lb(t,`${e.componentCls}-sm`)},R5=e=>{let t=ze(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Lb(t,`${e.componentCls}-lg`)},E5=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},R$=Ye("Button",e=>{let t=Np(e);return[v5(t),C5(t),w5(t),R5(t),E5(t),w$(t),d$(t)]},Pp,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function $5(e,t,o,n){let{focusElCls:r,focus:i,borderElCls:s}=o,a=s?"> *":"",c=a?` ${a}`:"",l=m=>m.filter(Boolean).map(p=>`&:${p}${c}`).join(","),d=l(["hover",r?`hover${r}`:null]),u=l([i?"focus":null,"active"]);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{[u]:{zIndex:3},[d]:{zIndex:4},...r?{[`&${r}`]:{zIndex:3}}:{},[`&[disabled] ${a}`]:{zIndex:0}}}}function I5(e,t,o){let{borderElCls:n}=o,r=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${r}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function gs(e,t={focus:!0}){let{componentCls:o}=e,{componentCls:n}=t,r=n||o,i=`${r}-compact`;return{[i]:{...$5(e,i,t,r),...I5(r,i,t)}}}function N5(e,t,o){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${o}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function P5(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 E$(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...N5(e,t,e.componentCls),...P5(e.componentCls,t)}}}var T5=e=>{let{antCls:t,componentCls:o,lineWidth:n,calc:r,colorBgContainer:i}=e,s=`${o}-variant-solid:not([disabled])`,a=r(n).mul(-1).equal(),[c,l]=Gt(t,"btn"),d=u=>({[`${o}-compact${u?"-vertical":""}-item`]:{[c("compact-connect-border-color")]:l("bg-color-hover"),[`&${s}`]:{transition:"none",[`& + ${s}:before`]:[{position:"absolute",backgroundColor:l("compact-connect-border-color"),content:'""'},u?{top:a,insetInline:a,height:n}:{insetBlock:a,insetInlineStart:a,width:n}],"&:hover:before":{display:"none"}}}});return[d(),d(!0),{[`${s}${o}-color-default`]:{[c("compact-connect-border-color")]:`color-mix(in srgb, ${l("bg-color-hover")} 75%, ${i})`}}]},$$=Jc(["Button","compact"],e=>{let t=Np(e);return[gs(t),E$(t),T5(t)]},Pp);function M5(e){if(st(e)){let t=e?.delay;return t=Ko(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var k5={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},O5=Jt.default.forwardRef((e,t)=>{let{_skipSemantic:o,loading:n=!1,prefixCls:r,color:i,variant:s,type:a,danger:c=!1,shape:l,size:d,disabled:u,className:m,rootClassName:p,children:g,icon:f,iconPosition:h,iconPlacement:b,ghost:x=!1,block:y=!1,htmlType:S="button",classNames:v,styles:C,style:w,autoInsertSpace:R,autoFocus:T,...N}=e,I=co(g),E=a||"default",{getPrefixCls:k,direction:F,autoInsertSpace:A,className:z,style:D,classNames:_,styles:V,loadingIcon:L,shape:G,color:H,variant:W}=Xe("button"),Z=l||G||"default",[B,K]=(0,Jt.useMemo)(()=>{if(i&&s)return[i,s];if(a||c){let Fe=k5[E]||[];return c?["danger",Fe[1]]:Fe}return s==="solid"?["primary",s]:H&&W?[H,W]:W==="solid"?["primary",W]:["default","outlined"]},[i,s,a,c,H,W,E]),[j,Q]=(0,Jt.useMemo)(()=>x&&K==="solid"?[B,"outlined"]:[B,K],[B,K,x]),X=j==="danger",U=X?"dangerous":j,J=R??A??!0,P=k("btn",r),[O,q]=R$(P),ee=(0,Jt.useContext)(zo),le=u??ee,re=(0,Jt.useContext)(Sb),ie=(0,Jt.useMemo)(()=>M5(n),[n]),[Ce,de]=Nu(ie.loading),[$e,ae]=(0,Jt.useState)(!1),Pe=(0,Jt.useRef)(null),he=bo(t,Pe),ne=I.length===1&&!f&&!xp(Q),fe=(0,Jt.useRef)(!0);Jt.default.useEffect(()=>(fe.current=!1,()=>{fe.current=!0}),[]),rt(()=>{ie.delay>0?de(!0,{ms:ie.delay}):de(ie.loading,!0)},[ie.delay,ie.loading]),(0,Jt.useEffect)(()=>{if(!Pe.current||!J)return;let Fe=Pe.current.textContent||"";ne&&yp(Fe)?$e||ae(!0):$e&&ae(!1)}),(0,Jt.useEffect)(()=>{T&&Pe.current?.focus()},[]);let ce=Jt.default.useCallback(Fe=>{if(Ce||le){Fe.preventDefault();return}e.onClick?.(("href"in e,Fe))},[e.onClick,Ce,le]),{compactSize:Re,compactItemClassnames:De}=Ln(P,F),we=Xt(Fe=>d??Re??re??Fe),pe=Ce?"loading":f,ue=b??h??"start",se=Ke(N,["navigate"]),Se={...e,type:E,color:j,variant:Q,danger:X,shape:Z,size:we,disabled:le,loading:Ce,iconPlacement:ue},Ie=_e(D),Te=_e(w),[qe,Ge]=Je([o?void 0:_,v],[o?void 0:V,Ie,C,Te],{props:Se}),mt=$(P,O,q,{[`${P}-${Z}`]:Z!=="default"&&Z!=="square"&&Z,[`${P}-${E}`]:E,[`${P}-dangerous`]:c,[`${P}-color-${U}`]:U,[`${P}-variant-${Q}`]:Q,[`${P}-lg`]:we==="large",[`${P}-sm`]:we==="small",[`${P}-icon-only`]:!g&&g!==0&&!!pe,[`${P}-background-ghost`]:x&&!xp(Q),[`${P}-loading`]:Ce,[`${P}-two-chinese-chars`]:$e&&J&&!Ce,[`${P}-block`]:y,[`${P}-rtl`]:F==="rtl",[`${P}-icon-end`]:ue==="end"},De,m,p,z,qe.root),Ze={className:qe.icon,style:Ge.icon},$t=Fe=>Jt.default.createElement(Cp,{prefixCls:P,...Ze},Fe),wt=Jt.default.createElement(H1,{existIcon:!!f,prefixCls:P,loading:Ce,mount:fe.current,...Ze}),gt=st(n)&&n.icon||L,ht;f&&!Ce?ht=$t(f):n&&gt?ht=$t(gt):ht=wt;let yt=lo(g)?F1(g,ne&&J,Ge.content,qe.content):null;if(se.href!==void 0)return Jt.default.createElement("a",{...se,className:$(mt,{[`${P}-disabled`]:le}),href:le?void 0:se.href,style:Ge.root,onClick:ce,ref:he,tabIndex:le?-1:0,"aria-disabled":le},ht,yt);let Rt=Jt.default.createElement("button",{...N,type:S,className:mt,style:Ge.root,onClick:ce,disabled:le,ref:he},ht,yt,De&&Jt.default.createElement($$,{prefixCls:P}));return xp(Q)||(Rt=Jt.default.createElement(vl,{component:"Button",disabled:Ce},Rt)),Rt}),Db=O5;Db.Group=D1;Db.__ANT_BUTTON=!0;var ni=Db;var nd=ni;var dn=M(require("react"));var Fb=M(require("react")),ha=require("react");function _b(){return _b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_b.apply(this,arguments)}var A5=(0,ha.forwardRef)((e,t)=>{let{prefixCls:o="rc-checkbox",className:n,style:r,checked:i,disabled:s,defaultChecked:a=!1,type:c="checkbox",title:l,onChange:d,...u}=e,m=(0,ha.useRef)(null),p=(0,ha.useRef)(null),[g,f]=it(a,i);(0,ha.useImperativeHandle)(t,()=>({focus:x=>{m.current?.focus(x)},blur:()=>{m.current?.blur()},input:m.current,nativeElement:p.current}));let h=$(o,n,{[`${o}-checked`]:g,[`${o}-disabled`]:s}),b=x=>{s||("checked"in e||f(x.target.checked),d?.({target:{...e,type:c,checked:x.target.checked},stopPropagation(){x.stopPropagation()},preventDefault(){x.preventDefault()},nativeEvent:x.nativeEvent}))};return Fb.createElement("span",{className:h,title:l,style:r,ref:p},Fb.createElement("input",_b({},u,{className:`${o}-input`,ref:m,onChange:b,disabled:s,checked:!!g,type:c})))}),I$=A5;var L5=e=>`${e}-css-var`,oo=L5;var Ti=M(require("react"));var uI=M(require("react"));var Sn=M(require("react"));var N$=M(require("react")),_r="RC_FORM_INTERNAL_HOOKS",_t=()=>{Kt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},D5=N$.createContext({getFieldValue:_t,getFieldsValue:_t,getFieldError:_t,getFieldWarning:_t,getFieldsError:_t,isFieldsTouched:_t,isFieldTouched:_t,isFieldValidating:_t,isFieldsValidating:_t,resetFields:_t,setFields:_t,setFieldValue:_t,setFieldsValue:_t,validateFields:_t,submit:_t,getInternalHooks:()=>(_t(),{dispatch:_t,initEntityValue:_t,registerField:_t,useSubscribe:_t,setInitialValues:_t,destroyForm:_t,setCallbacks:_t,registerWatch:_t,getFields:_t,setValidateMessages:_t,setPreserve:_t,getInitialValue:_t})}),Fr=D5;var P$=M(require("react")),_5=P$.createContext(null),hs=_5;function rd(e){return e==null?[]:Array.isArray(e)?e:[e]}function T$(e){return e&&!!e._init}function Tp(){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(){let e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Mp=Tp();var F5=/%[sdj%]/g,k$=()=>{};typeof process<"u"&&process.env;function kp(e){if(!e||!e.length)return null;let t={};return e.forEach(o=>{let n=o.field;t[n]=t[n]||[],t[n].push(o)}),t}function Eo(e,...t){let o=0,n=t.length;return typeof e=="function"?e.apply(null,t):typeof e=="string"?e.replace(F5,i=>{if(i==="%%")return"%";if(o>=n)return i;switch(i){case"%s":return String(t[o++]);case"%d":return Number(t[o++]);case"%j":try{return JSON.stringify(t[o++])}catch{return"[Circular]"}break;default:return i}}):e}function z5(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function Ct(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||z5(t)&&typeof e=="string"&&!e)}function B5(e,t,o){let n=[],r=0,i=e.length;function s(a){n.push(...a||[]),r++,r===i&&o(n)}e.forEach(a=>{t(a,s)})}function M$(e,t,o){let n=0,r=e.length;function i(s){if(s&&s.length){o(s);return}let a=n;n=n+1,a<r?t(e[a],i):o([])}i([])}function H5(e){let t=[];return Object.keys(e).forEach(o=>{t.push(...e[o]||[])}),t}var Op=class extends Error{errors;fields;constructor(t,o){super("Async Validation Error"),this.errors=t,this.fields=o}};function O$(e,t,o,n,r){if(t.first){let u=new Promise((m,p)=>{let g=h=>(n(h),h.length?p(new Op(h,kp(h))):m(r)),f=H5(e);M$(f,o,g)});return u.catch(m=>m),u}let i=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),a=s.length,c=0,l=[],d=new Promise((u,m)=>{let p=g=>{if(l.push.apply(l,g),c++,c===a)return n(l),l.length?m(new Op(l,kp(l))):u(r)};s.length||(n(l),u(r)),s.forEach(g=>{let f=e[g];i.indexOf(g)!==-1?M$(f,o,p):B5(f,o,p)})});return d.catch(u=>u),d}function V5(e){return!!(e&&e.message!==void 0)}function W5(e,t){let o=e;for(let n=0;n<t.length;n++){if(o==null)return o;o=o[t[n]]}return o}function zb(e,t){return o=>{let n;return e.fullFields?n=W5(t,e.fullFields):n=t[o.field||e.fullField],V5(o)?(o.field=o.field||e.fullField,o.fieldValue=n,o):{message:typeof o=="function"?o():o,fieldValue:n,field:o.field||e.fullField}}}function Bb(e,t){if(t){for(let o in t)if(t.hasOwnProperty(o)){let n=t[o];typeof n=="object"&&typeof e[o]=="object"?e[o]={...e[o],...n}:e[o]=n}}return e}var El="enum",j5=(e,t,o,n,r)=>{e[El]=Array.isArray(e[El])?e[El]:[],e[El].indexOf(t)===-1&&n.push(Eo(r.messages[El],e.fullField,e[El].join(", ")))},A$=j5;var U5=(e,t,o,n,r)=>{e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||n.push(Eo(r.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern=="string"&&(new RegExp(e.pattern).test(t)||n.push(Eo(r.messages.pattern.mismatch,e.fullField,t,e.pattern))))},L$=U5;var K5=(e,t,o,n,r)=>{let i=typeof e.len=="number",s=typeof e.min=="number",a=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,d=null,u=typeof t=="number",m=typeof t=="string",p=Array.isArray(t);if(u?d="number":m?d="string":p&&(d="array"),!d)return!1;p&&(l=t.length),m&&(l=t.replace(c,"_").length),i?l!==e.len&&n.push(Eo(r.messages[d].len,e.fullField,e.len)):s&&!a&&l<e.min?n.push(Eo(r.messages[d].min,e.fullField,e.min)):a&&!s&&l>e.max?n.push(Eo(r.messages[d].max,e.fullField,e.max)):s&&a&&(l<e.min||l>e.max)&&n.push(Eo(r.messages[d].range,e.fullField,e.min,e.max))},D$=K5;var q5=(e,t,o,n,r,i)=>{e.required&&(!o.hasOwnProperty(e.field)||Ct(t,i||e.type))&&n.push(Eo(r.messages.required,e.fullField))},Ap=q5;var Lp,_$=()=>{if(Lp)return Lp;let e="[a-fA-F\\d:]",t=v=>v&&v.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|$))`:"",o="(?: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}",n="[a-fA-F\\d]{1,4}",s=`(?:${[`(?:${n}:){7}(?:${n}|:)`,`(?:${n}:){6}(?:${o}|:${n}|:)`,`(?:${n}:){5}(?::${o}|(?::${n}){1,2}|:)`,`(?:${n}:){4}(?:(?::${n}){0,1}:${o}|(?::${n}){1,3}|:)`,`(?:${n}:){3}(?:(?::${n}){0,2}:${o}|(?::${n}){1,4}|:)`,`(?:${n}:){2}(?:(?::${n}){0,3}:${o}|(?::${n}){1,5}|:)`,`(?:${n}:){1}(?:(?::${n}){0,4}:${o}|(?::${n}){1,6}|:)`,`(?::(?:(?::${n}){0,5}:${o}|(?::${n}){1,7}|:))`].join("|")})(?:%[0-9a-zA-Z]{1,})?`,a=new RegExp(`(?:^${o}$)|(?:^${s}$)`),c=new RegExp(`^${o}$`),l=new RegExp(`^${s}$`),d=v=>v&&v.exact?a:new RegExp(`(?:${t(v)}${o}${t(v)})|(?:${t(v)}${s}${t(v)})`,"g");d.v4=v=>v&&v.exact?c:new RegExp(`${t(v)}${o}${t(v)}`,"g"),d.v6=v=>v&&v.exact?l:new RegExp(`${t(v)}${s}${t(v)}`,"g");let u="(?:(?:[a-z]+:)?//)",m="(?:\\S+(?::\\S*)?@)?",p=d.v4().source,g=d.v6().source,S=`(?:${u}|www\\.)${m}(?: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 Lp=new RegExp(`(?:^${S}$)`,"i"),Lp};var Hb={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},id={integer(e){return id.number(e)&&parseInt(e,10)===e},float(e){return id.number(e)&&!id.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"&&!id.array(e)},method(e){return typeof e=="function"},email(e){return typeof e=="string"&&e.length<=320&&!!e.match(Hb.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(Hb.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(_$())},hex(e){return typeof e=="string"&&!!e.match(Hb.hex)}},G5=(e,t,o,n,r)=>{if(e.required&&t===void 0){Ap(e,t,o,n,r);return}let i=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],s=e.type;i.indexOf(s)>-1?id[s](t)||n.push(Eo(r.messages.types[s],e.fullField,e.type)):s&&typeof t!==e.type&&n.push(Eo(r.messages.types[s],e.fullField,e.type))},F$=G5;var X5=(e,t,o,n,r)=>{(/^\s+$/.test(t)||t==="")&&n.push(Eo(r.messages.whitespace,e.fullField))},z$=X5;var We={required:Ap,whitespace:z$,type:F$,range:D$,enum:A$,pattern:L$};var Y5=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t)&&!e.required)return o();We.required(e,t,n,i,r)}o(i)},B$=Y5;var Z5=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(t==null&&!e.required)return o();We.required(e,t,n,i,r,"array"),t!=null&&(We.type(e,t,n,i,r),We.range(e,t,n,i,r))}o(i)},H$=Z5;var Q5=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t)&&!e.required)return o();We.required(e,t,n,i,r),t!==void 0&&We.type(e,t,n,i,r)}o(i)},V$=Q5;var J5=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t,"date")&&!e.required)return o();if(We.required(e,t,n,i,r),!Ct(t,"date")){let a;t instanceof Date?a=t:a=new Date(t),We.type(e,a,n,i,r),a&&We.range(e,a.getTime(),n,i,r)}}o(i)},W$=J5;var e_="enum",t_=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t)&&!e.required)return o();We.required(e,t,n,i,r),t!==void 0&&We[e_](e,t,n,i,r)}o(i)},j$=t_;var o_=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t)&&!e.required)return o();We.required(e,t,n,i,r),t!==void 0&&(We.type(e,t,n,i,r),We.range(e,t,n,i,r))}o(i)},U$=o_;var n_=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t)&&!e.required)return o();We.required(e,t,n,i,r),t!==void 0&&(We.type(e,t,n,i,r),We.range(e,t,n,i,r))}o(i)},K$=n_;var r_=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t)&&!e.required)return o();We.required(e,t,n,i,r),t!==void 0&&We.type(e,t,n,i,r)}o(i)},q$=r_;var i_=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(t===""&&(t=void 0),Ct(t)&&!e.required)return o();We.required(e,t,n,i,r),t!==void 0&&(We.type(e,t,n,i,r),We.range(e,t,n,i,r))}o(i)},G$=i_;var s_=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t)&&!e.required)return o();We.required(e,t,n,i,r),t!==void 0&&We.type(e,t,n,i,r)}o(i)},X$=s_;var a_=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t,"string")&&!e.required)return o();We.required(e,t,n,i,r),Ct(t,"string")||We.pattern(e,t,n,i,r)}o(i)},Y$=a_;var l_=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t)&&!e.required)return o();We.required(e,t,n,i,r),Ct(t)||We.type(e,t,n,i,r)}o(i)},Z$=l_;var c_=(e,t,o,n,r)=>{let i=[],s=Array.isArray(t)?"array":typeof t;We.required(e,t,n,i,r,s),o(i)},Q$=c_;var d_=(e,t,o,n,r)=>{let i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t,"string")&&!e.required)return o();We.required(e,t,n,i,r,"string"),Ct(t,"string")||(We.type(e,t,n,i,r),We.range(e,t,n,i,r),We.pattern(e,t,n,i,r),e.whitespace===!0&&We.whitespace(e,t,n,i,r))}o(i)},J$=d_;var u_=(e,t,o,n,r)=>{let i=e.type,s=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Ct(t,i)&&!e.required)return o();We.required(e,t,n,s,r,i),Ct(t,i)||We.type(e,t,n,s,r)}o(s)},sd=u_;var $l={string:J$,method:q$,number:G$,boolean:V$,regexp:Z$,integer:K$,float:U$,array:H$,object:X$,enum:j$,pattern:Y$,date:W$,url:sd,hex:sd,email:sd,tel:sd,required:Q$,any:B$};var Vb=class e{static register=function(o,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");$l[o]=n};static warning=k$;static messages=Mp;static validators=$l;rules=null;_messages=Mp;constructor(t){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(o=>{let n=t[o];this.rules[o]=Array.isArray(n)?n:[n]})}messages(t){return t&&(this._messages=Bb(Tp(),t)),this._messages}validate(t,o={},n=()=>{}){let r=t,i=o,s=n;if(typeof i=="function"&&(s=i,i={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,r),Promise.resolve(r);function a(u){let m=[],p={};function g(f){Array.isArray(f)?m=m.concat(...f):m.push(f)}for(let f=0;f<u.length;f++)g(u[f]);m.length?(p=kp(m),s(m,p)):s(null,r)}if(i.messages){let u=this.messages();u===Mp&&(u=Tp()),Bb(u,i.messages),i.messages=u}else i.messages=this.messages();let c={};(i.keys||Object.keys(this.rules)).forEach(u=>{let m=this.rules[u],p=r[u];m.forEach(g=>{let f=g;typeof f.transform=="function"&&(r===t&&(r={...r}),p=r[u]=f.transform(p),p!=null&&(f.type=f.type||(Array.isArray(p)?"array":typeof p))),typeof f=="function"?f={validator:f}:f={...f},f.validator=this.getValidationMethod(f),f.validator&&(f.field=u,f.fullField=f.fullField||u,f.type=this.getType(f),c[u]=c[u]||[],c[u].push({rule:f,value:p,source:r,field:u}))})});let d={};return O$(c,i,(u,m)=>{let p=u.rule,g=(p.type==="object"||p.type==="array")&&(typeof p.fields=="object"||typeof p.defaultField=="object");g=g&&(p.required||!p.required&&u.value),p.field=u.field;function f(x,y){return{...y,fullField:`${p.fullField}.${x}`,fullFields:p.fullFields?[...p.fullFields,x]:[x]}}function h(x=[]){let y=Array.isArray(x)?x:[x];!i.suppressWarning&&y.length&&e.warning("async-validator:",y),y.length&&p.message!==void 0&&p.message!==null&&(y=[].concat(p.message));let S=y.map(zb(p,r));if(i.first&&S.length)return d[p.field]=1,m(S);if(!g)m(S);else{if(p.required&&!u.value)return p.message!==void 0?S=[].concat(p.message).map(zb(p,r)):i.error&&(S=[i.error(p,Eo(i.messages.required,p.field))]),m(S);let v={};p.defaultField&&Object.keys(u.value).map(R=>{v[R]=p.defaultField}),v={...v,...u.rule.fields};let C={};Object.keys(v).forEach(R=>{let T=v[R],N=Array.isArray(T)?T:[T];C[R]=N.map(f.bind(null,R))});let w=new e(C);w.messages(i.messages),u.rule.options&&(u.rule.options.messages=i.messages,u.rule.options.error=i.error),w.validate(u.value,u.rule.options||i,R=>{let T=[];S&&S.length&&T.push(...S),R&&R.length&&T.push(...R),m(T.length?T:null)})}}let b;if(p.asyncValidator)b=p.asyncValidator(p,u.value,h,u.source,i);else if(p.validator){try{b=p.validator(p,u.value,h,u.source,i)}catch(x){console.error?.(x),i.suppressValidatorError||setTimeout(()=>{throw x},0),h(x.message)}b===!0?h():b===!1?h(typeof p.message=="function"?p.message(p.fullField||p.field):p.message||`${p.fullField||p.field} fails`):b instanceof Array?h(b):b instanceof Error&&h(b.message)}b&&b.then&&b.then(()=>h(),x=>h(x))},u=>{a(u)},r)}getType(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!$l.hasOwnProperty(t.type))throw new Error(Eo("Unknown rule type %s",t.type));return t.type||"string"}getValidationMethod(t){if(typeof t.validator=="function")return t.validator;let o=Object.keys(t),n=o.indexOf("message");return n!==-1&&o.splice(n,1),o.length===1&&o[0]==="required"?$l.required:$l[this.getType(t)]||void 0}},eI=Vb;var _p=M(require("react"));var Dn="'${name}' is not a valid ${type}",Dp={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:Dn,method:Dn,array:Dn,object:Dn,number:Dn,date:Dn,boolean:Dn,integer:Dn,float:Dn,regexp:Dn,email:Dn,tel:Dn,url:Dn,hex:Dn},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}"}};var tI=eI;function m_(e,t){return e.replace(/\\?\$\{\w+\}/g,o=>{if(o.startsWith("\\"))return o.slice(1);let n=o.slice(2,-1);return t[n]})}var oI="CODE_LOGIC_ERROR";async function Wb(e,t,o,n,r){let i={...o};if(delete i.ruleIndex,tI.warning=()=>{},i.validator){let m=i.validator;i.validator=(...p)=>{try{return m(...p)}catch(g){return console.error(g),Promise.reject(oI)}}}let s=null;i&&i.type==="array"&&i.defaultField&&(s=i.defaultField,delete i.defaultField);let a=new tI({[e]:[i]}),c=Yr(Dp,n.validateMessages);a.messages(c);let l=[];try{await Promise.resolve(a.validate({[e]:t},{...n}))}catch(m){m.errors&&(l=m.errors.map(({message:p},g)=>{let f=p===oI?c.default:p;return _p.isValidElement(f)?_p.cloneElement(f,{key:`error_${g}`}):f}))}if(!l.length&&s&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((p,g)=>Wb(`${e}.${g}`,p,s,n,r)))).reduce((p,g)=>[...p,...g],[]);let d={...o,name:e,enum:(o.enum||[]).join(", "),...r};return l.map(m=>typeof m=="string"?m_(m,d):m)}function nI(e,t,o,n,r,i){let s=e.join("."),a=o.map((l,d)=>{let u=l.validator,m={...l,ruleIndex:d};return u&&(m.validator=(p,g,f)=>{let h=!1,x=u(p,g,(...y)=>{Promise.resolve().then(()=>{Kt(!h,"Your validator function has already return a promise. `callback` will be ignored."),h||f(...y)})});h=x&&typeof x.then=="function"&&typeof x.catch=="function",Kt(h,"`callback` is deprecated. Please return a promise instead."),h&&x.then(()=>{f()}).catch(y=>{f(y||" ")})}),m}).sort(({warningOnly:l,ruleIndex:d},{warningOnly:u,ruleIndex:m})=>!!l==!!u?d-m:l?1:-1),c;if(r===!0)c=new Promise(async(l,d)=>{for(let u=0;u<a.length;u+=1){let m=a[u],p=await Wb(s,t,m,n,i);if(p.length){d([{errors:p,rule:m}]);return}}l([])});else{let l=a.map(d=>Wb(s,t,d,n,i).then(u=>({errors:u,rule:d})));c=(r?f_(l):p_(l)).then(d=>Promise.reject(d))}return c.catch(l=>l),c}async function p_(e){return Promise.all(e).then(t=>[].concat(...t))}async function f_(e){let t=0;return new Promise(o=>{e.forEach(n=>{n.then(r=>{r.errors.length&&o([r]),t+=1,t===e.length&&o([])})})})}function Yt(e){return rd(e)}function jb(e,t){let o={};return t.forEach(n=>{let r=ko(e,n);o=Uo(o,n,r)}),o}function ys(e,t,o=!1){return e&&e.some(n=>Il(t,n,o))}function Il(e,t,o=!1){return!e||!t||!o&&e.length!==t.length?!1:t.every((n,r)=>e[r]===n)}function rI(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;let o=Object.keys(e),n=Object.keys(t);return[...new Set([...o,...n])].every(i=>{let s=e[i],a=t[i];return typeof s=="function"&&typeof a=="function"?!0:s===a})}function iI(e,...t){let o=t[0];return o&&o.target&&typeof o.target=="object"&&e in o.target?o.target[e]:o}function Ub(e,t,o){let{length:n}=e;if(t<0||t>=n||o<0||o>=n)return e;let r=e[t],i=t-o;return i>0?[...e.slice(0,o),r,...e.slice(o,t),...e.slice(t+1,n)]:i<0?[...e.slice(0,t),...e.slice(t+1,o+1),r,...e.slice(o+1,n)]:e}var Kb=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},ad=class{namePathList=[];taskId=0;watcherList=new Set;form;constructor(t){this.form=t}register(t){return this.watcherList.add(t),()=>{this.watcherList.delete(t)}}notify(t){t.forEach(o=>{this.namePathList.every(n=>!Il(n,o))&&this.namePathList.push(o)}),this.doBatch()}doBatch(){this.taskId+=1;let t=this.taskId;Kb(()=>{if(t===this.taskId&&this.watcherList.size){let o=this.form.getForm(),n=o.getFieldsValue(),r=o.getFieldsValue(!0);this.watcherList.forEach(i=>{i(n,r,this.namePathList)}),this.namePathList=[]}})}};async function qb(){return new Promise(e=>{Kb(()=>{Ve(()=>{e()})})})}function Xb(){return Xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Xb.apply(this,arguments)}var ya=[],ld=[];function Gb(e,t,o,n,r,i){return typeof e=="function"?e(t,o,"source"in i?{source:i.source}:{}):n!==r}var Yb=class extends Sn.PureComponent{static contextType=Fr;state={resetCount:0};cancelRegisterFunc=null;mounted=!1;touched=!1;dirty=!1;validatePromise;prevValidating;errors=ya;warnings=ld;constructor(t){if(super(t),t.fieldContext){let{getInternalHooks:o}=t.fieldContext,{initEntityValue:n}=o(_r);n(this)}}componentDidMount(){let{shouldUpdate:t,fieldContext:o}=this.props;if(this.mounted=!0,o){let{getInternalHooks:n}=o,{registerField:r}=n(_r);this.cancelRegisterFunc=r(this)}t===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}cancelRegister=()=>{let{preserve:t,isListField:o,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(o,t,Yt(n)),this.cancelRegisterFunc=null};getNamePath=()=>{let{name:t,fieldContext:o}=this.props,{prefixName:n=[]}=o;return t!==void 0?[...n,...t]:[]};getRules=()=>{let{rules:t=[],fieldContext:o}=this.props;return t.map(n=>typeof n=="function"?n(o):n)};reRender(){this.mounted&&this.forceUpdate()}refresh=()=>{this.mounted&&this.setState(({resetCount:t})=>({resetCount:t+1}))};metaCache=null;triggerMetaEvent=t=>{let{onMetaChange:o}=this.props;if(o){let n={...this.getMeta(),destroy:t};kr(this.metaCache,n)||o(n),this.metaCache=n}else this.metaCache=null};onStoreChange=(t,o,n)=>{let{shouldUpdate:r,dependencies:i=[],onReset:s}=this.props,{store:a}=n,c=this.getNamePath(),l=this.getValue(t),d=this.getValue(a),u=o&&ys(o,c);switch(n.type==="valueUpdate"&&n.source==="external"&&!kr(l,d)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=ya,this.warnings=ld,this.triggerMetaEvent()),n.type){case"reset":if(!o||u){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=ya,this.warnings=ld,this.triggerMetaEvent(),s?.(),this.refresh();return}break;case"remove":{if(r&&Gb(r,t,a,l,d,n)){this.reRender();return}break}case"setField":{let{data:m}=n;if(u){"touched"in m&&(this.touched=m.touched),"validating"in m&&!("originRCField"in m)&&(this.validatePromise=m.validating?Promise.resolve([]):null),"errors"in m&&(this.errors=m.errors||ya),"warnings"in m&&(this.warnings=m.warnings||ld),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in m&&ys(o,c,!0)){this.reRender();return}if(r&&!c.length&&Gb(r,t,a,l,d,n)){this.reRender();return}break}case"dependenciesUpdate":{if(i.map(Yt).some(p=>ys(n.relatedFields,p))){this.reRender();return}break}default:if(u||(!i.length||c.length||r)&&Gb(r,t,a,l,d,n)){this.reRender();return}break}r===!0&&this.reRender()};validateRules=t=>{let o=this.getNamePath(),n=this.getValue(),{triggerName:r,validateOnly:i=!1,delayFrame:s}=t||{},a=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:c=!1,messageVariables:l,validateDebounce:d}=this.props;s&&await qb();let u=this.getRules();if(r&&(u=u.filter(p=>p).filter(p=>{let{validateTrigger:g}=p;return g?rd(g).includes(r):!0})),d&&r&&(await new Promise(p=>{setTimeout(p,d)}),this.validatePromise!==a))return[];let m=nI(o,n,u,t,c,l);return m.catch(p=>p).then((p=ya)=>{if(this.validatePromise===a){this.validatePromise=null;let g=[],f=[];p.forEach?.(({rule:{warningOnly:h},errors:b=ya})=>{h?f.push(...b):g.push(...b)}),this.errors=g,this.warnings=f,this.triggerMetaEvent(),this.reRender()}}),m});return i||(this.validatePromise=a,this.dirty=!0,this.errors=ya,this.warnings=ld,this.triggerMetaEvent(),this.reRender()),a};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:t}=this.props,{getInitialValue:o}=t.getInternalHooks(_r);return o(this.getNamePath())!==void 0};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null});getOnlyChild=t=>{if(typeof t=="function"){let n=this.getMeta();return{...this.getOnlyChild(t(this.getControlled(),n,this.props.fieldContext)),isFunction:!0}}let o=co(t);return o.length!==1||!Sn.isValidElement(o[0])?{child:o,isFunction:!1}:{child:o[0],isFunction:!1}};getValue=t=>{let{getFieldsValue:o}=this.props.fieldContext,n=this.getNamePath();return ko(t||o(!0),n)};getControlled=(t={})=>{let{name:o,trigger:n="onChange",validateTrigger:r,getValueFromEvent:i,normalize:s,valuePropName:a="value",getValueProps:c,fieldContext:l}=this.props,d=r!==void 0?r:l.validateTrigger,u=this.getNamePath(),{getInternalHooks:m,getFieldsValue:p}=l,{dispatch:g}=m(_r),f=this.getValue(),h=c||(v=>({[a]:v})),b=t[n],x=o!==void 0?h(f):{},y={...t,...x};return y[n]=(...v)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let C=this.getValue(),w;i?w=i(...v):w=iI(a,...v),s&&(w=s(w,C,p(!0))),w!==C&&g({type:"updateValue",namePath:u,value:w}),b&&b(...v)},rd(d||[]).forEach(v=>{let C=y[v];y[v]=(...w)=>{C&&C(...w);let{rules:R}=this.props;R&&R.length&&g({type:"validateField",namePath:u,triggerName:v})}}),y};render(){let{resetCount:t}=this.state,{children:o}=this.props,{child:n,isFunction:r}=this.getOnlyChild(o),i;return r?i=n:Sn.isValidElement(n)?i=Sn.cloneElement(n,this.getControlled(n.props)):(Kt(!n,"`children` of Field is not validate ReactElement."),i=n),Sn.createElement(Sn.Fragment,{key:t},i)}};function g_({name:e,...t}){let o=Sn.useContext(Fr),n=Sn.useContext(hs),r=e!==void 0?Yt(e):void 0,i=t.isListField??!!n,s="keep";return i||(s=`_${(r||[]).join("_")}`),Sn.createElement(Yb,Xb({key:s,name:r,isListField:i},t,{fieldContext:o}))}var Fp=g_;var Jn=M(require("react"));function h_({name:e,initialValue:t,children:o,rules:n,validateTrigger:r,isListField:i}){let s=Jn.useContext(Fr),a=Jn.useContext(hs),l=Jn.useRef({keys:[],id:0}).current,d=Jn.useMemo(()=>[...Yt(s.prefixName)||[],...Yt(e)],[s.prefixName,e]),u=Jn.useMemo(()=>({...s,prefixName:d}),[s,d]),m=Jn.useMemo(()=>({getKey:g=>{let f=d.length,h=g[f];return[l.keys[h],g.slice(f+1)]}}),[l,d]);if(typeof o!="function")return Kt(!1,"Form.List only accepts function as children."),null;let p=(g,f,{source:h})=>h==="internal"?!1:g!==f;return Jn.createElement(hs.Provider,{value:m},Jn.createElement(Fr.Provider,{value:u},Jn.createElement(Fp,{name:[],shouldUpdate:p,rules:n,validateTrigger:r,initialValue:t,isList:!0,isListField:i??!!a},({value:g=[],onChange:f},h)=>{let{getFieldValue:b}=s,x=()=>b(d||[])||[],y={add:(v,C)=>{let w=x();C>=0&&C<=w.length?(l.keys=[...l.keys.slice(0,C),l.id,...l.keys.slice(C)],f([...w.slice(0,C),v,...w.slice(C)])):(l.keys=[...l.keys,l.id],f([...w,v])),l.id+=1},remove:v=>{let C=x(),w=new Set(Array.isArray(v)?v:[v]);w.size<=0||(l.keys=l.keys.filter((R,T)=>!w.has(T)),f(C.filter((R,T)=>!w.has(T))))},move(v,C){if(v===C)return;let w=x();v<0||v>=w.length||C<0||C>=w.length||(l.keys=Ub(l.keys,v,C),f(Ub(w,v,C)))}},S=g||[];return Array.isArray(S)||(S=[]),o(S.map((v,C)=>{let w=l.keys[C];return w===void 0&&(l.keys[C]=l.id,w=l.keys[C],l.id+=1),{name:C,key:w,isListField:!0}}),y,h)})))}var sI=h_;var Bp=M(require("react"));function aI(e){let t=!1,o=e.length,n=[];return e.length?new Promise((r,i)=>{e.forEach((s,a)=>{s.catch(c=>(t=!0,c)).then(c=>{o-=1,n[a]=c,!(o>0)&&(t&&i(n),r(n))})})}):Promise.resolve([])}var Zb="__@field_split__";function zp(e){return e.map(t=>`${typeof t}:${t}`).join(Zb)}var Qb=class{kvs=new Map;set(t,o){this.kvs.set(zp(t),o)}get(t){return this.kvs.get(zp(t))}getAsPrefix(t){let o=zp(t),n=o+Zb,r=[],i=this.kvs.get(o);return i!==void 0&&r.push(i),this.kvs.forEach((s,a)=>{a.startsWith(n)&&r.push(s)}),r}update(t,o){let n=this.get(t),r=o(n);r?this.set(t,r):this.delete(t)}delete(t){this.kvs.delete(zp(t))}map(t){return[...this.kvs.entries()].map(([o,n])=>{let r=o.split(Zb);return t({key:r.map(i=>{let[,s,a]=i.match(/^([^:]*):(.*)$/);return s==="number"?Number(a):a}),value:n})})}toJSON(){let t={};return this.map(({key:o,value:n})=>(t[o.join(".")]=n,null)),t}},ba=Qb;var Jb=class{formHooked=!1;forceRootUpdate;subscribable=!0;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new ad(this);constructor(t){this.forceRootUpdate=t}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks});getInternalHooks=t=>t===_r?(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}):(Kt(!1,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=t=>{this.subscribable=t};prevWithoutPreserves=null;setInitialValues=(t,o)=>{if(this.initialValues=t||{},o){let n=Yr(t,this.store);this.prevWithoutPreserves?.map(({key:r})=>{n=Uo(n,r,ko(t,r))}),this.prevWithoutPreserves=null,this.updateStore(n)}};destroyForm=t=>{if(t)this.updateStore({});else{let o=new ba;this.getFieldEntities(!0).forEach(n=>{this.isMergedPreserve(n.isPreserve())||o.set(n.getNamePath(),!0)}),this.prevWithoutPreserves=o}};getInitialValue=t=>{let o=ko(this.initialValues,t);return t.length?Yr(o):o};setCallbacks=t=>{this.callbacks=t};setValidateMessages=t=>{this.validateMessages=t};setPreserve=t=>{this.preserve=t};registerWatch=t=>this.watcherCenter.register(t);notifyWatch=(t=[])=>{this.watcherCenter.notify(t)};timeoutId=null;warningUnhooked=()=>{};updateStore=t=>{this.store=t};getFieldEntities=(t=!1)=>t?this.fieldEntities.filter(o=>o.getNamePath().length):this.fieldEntities;getFieldsMap=(t=!1)=>{let o=new ba;return this.getFieldEntities(t).forEach(n=>{let r=n.getNamePath();o.set(r,n)}),o};getFieldEntitiesForNamePathList=(t,o=!1)=>{if(!t)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return o?t.flatMap(r=>{let i=Yt(r),s=n.getAsPrefix(i);return s.length?s:[{INVALIDATE_NAME_PATH:i}]}):t.map(r=>{let i=Yt(r);return n.get(i)||{INVALIDATE_NAME_PATH:Yt(r)}})};getFieldsValue=(t,o)=>{this.warningUnhooked();let n,r;if(t===!0||Array.isArray(t)?(n=t,r=o):t&&typeof t=="object"&&(r=t.filter),n===!0&&!r)return this.store;let i=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),s=[],a=[];i.forEach(l=>{let d=l.INVALIDATE_NAME_PATH||l.getNamePath();if(l.isList?.()){a.push(d);return}if(!r)s.push(d);else{let u="getMeta"in l?l.getMeta():null;r(u)&&s.push(d)}});let c=jb(this.store,s.map(Yt));return a.forEach(l=>{ko(c,l)||(c=Uo(c,l,[]))}),c};getFieldValue=t=>{this.warningUnhooked();let o=Yt(t);return ko(this.store,o)};getFieldsError=t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((n,r)=>n&&!n.INVALIDATE_NAME_PATH?{name:n.getNamePath(),errors:n.getErrors(),warnings:n.getWarnings()}:{name:Yt(t[r]),errors:[],warnings:[]}));getFieldError=t=>{this.warningUnhooked();let o=Yt(t);return this.getFieldsError([o])[0].errors};getFieldWarning=t=>{this.warningUnhooked();let o=Yt(t);return this.getFieldsError([o])[0].warnings};isFieldsTouched=(...t)=>{this.warningUnhooked();let[o,n]=t,r,i=!1;t.length===0?r=null:t.length===1?Array.isArray(o)?(r=o.map(Yt),i=!1):(r=null,i=o):(r=o.map(Yt),i=n);let s=this.getFieldEntities(!0),a=u=>u.isFieldTouched();if(!r)return i?s.every(u=>a(u)||u.isList()):s.some(a);let c=new ba;r.forEach(u=>{c.set(u,[])}),s.forEach(u=>{let m=u.getNamePath();r.forEach(p=>{p.every((g,f)=>m[f]===g)&&c.update(p,g=>[...g,u])})});let l=u=>u.some(a),d=c.map(({value:u})=>u);return i?d.every(l):d.some(l)};isFieldTouched=t=>(this.warningUnhooked(),this.isFieldsTouched([t]));isFieldsValidating=t=>{this.warningUnhooked();let o=this.getFieldEntities();if(!t)return o.some(r=>r.isFieldValidating());let n=t.map(Yt);return o.some(r=>{let i=r.getNamePath();return ys(n,i)&&r.isFieldValidating()})};isFieldValidating=t=>(this.warningUnhooked(),this.isFieldsValidating([t]));resetWithFieldInitialValue=(t={})=>{let o=new ba,n=this.getFieldEntities(!0);n.forEach(s=>{let{initialValue:a}=s.props,c=s.getNamePath();if(a!==void 0){let l=o.get(c)||new Set;l.add({entity:s,value:a}),o.set(c,l)}});let r=s=>{s.forEach(a=>{let{initialValue:c}=a.props;if(c!==void 0){let l=a.getNamePath();if(this.getInitialValue(l)!==void 0)Kt(!1,`Form already set 'initialValues' with path '${l.join(".")}'. Field can not overwrite it.`);else{let u=o.get(l);if(u&&u.size>1)Kt(!1,`Multiple Field with path '${l.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(u){let m=this.getFieldValue(l);!a.isListField()&&(!t.skipExist||m===void 0)&&this.updateStore(Uo(this.store,l,[...u][0].value))}}}})},i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(s=>{let a=o.get(s);a&&i.push(...[...a].map(c=>c.entity))})):i=n,r(i)};resetFields=t=>{this.warningUnhooked();let o=this.store;if(!t){this.updateStore(Yr(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(o,null,{type:"reset"}),this.notifyWatch();return}let n=t.map(Yt);n.forEach(r=>{let i=this.getInitialValue(r);this.updateStore(Uo(this.store,r,i))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(o,n,{type:"reset"}),this.notifyWatch(n)};setFields=t=>{this.warningUnhooked();let o=this.store,n=[];t.forEach(r=>{let{name:i,...s}=r,a=Yt(i);n.push(a),"value"in s&&this.updateStore(Uo(this.store,a,s.value)),this.notifyObservers(o,[a],{type:"setField",data:r})}),this.notifyWatch(n)};getFields=()=>this.getFieldEntities(!0).map(n=>{let r=n.getNamePath(),s={...n.getMeta(),name:r,value:this.getFieldValue(r)};return Object.defineProperty(s,"originRCField",{value:!0}),s});initEntityValue=t=>{let{initialValue:o}=t.props;if(o!==void 0){let n=t.getNamePath();ko(this.store,n)===void 0&&this.updateStore(Uo(this.store,n,o))}};isMergedPreserve=t=>(t!==void 0?t:this.preserve)??!0;registerField=t=>{this.fieldEntities.push(t);let o=t.getNamePath();if(this.notifyWatch([o]),t.props.initialValue!==void 0){let n=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(n,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(n,r,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(s=>s!==t),!this.isMergedPreserve(r)&&(!n||i.length>1)){let s=n?void 0:this.getInitialValue(o);if(o.length&&this.getFieldValue(o)!==s&&this.fieldEntities.every(a=>!Il(a.getNamePath(),o))){let a=this.store;this.updateStore(Uo(a,o,s,!0)),this.notifyObservers(a,[o],{type:"remove"}),this.triggerDependenciesUpdate(a,o)}}this.notifyWatch([o])}};dispatch=t=>{switch(t.type){case"updateValue":{let{namePath:o,value:n}=t;this.updateValue(o,n);break}case"validateField":{let{namePath:o,triggerName:n}=t;this.validateFields([o],{triggerName:n});break}default:}};notifyObservers=(t,o,n)=>{if(this.subscribable){let r={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:i})=>{i(t,o,r)})}else this.forceRootUpdate()};triggerDependenciesUpdate=(t,o)=>{let n=this.getDependencyChildrenFields(o);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(t,n,{type:"dependenciesUpdate",relatedFields:[o,...n]}),n};updateValue=(t,o)=>{let n=Yt(t),r=this.store;this.updateStore(Uo(this.store,n,o)),this.notifyObservers(r,[n],{type:"valueUpdate",source:"internal"}),this.notifyWatch([n]);let i=this.triggerDependenciesUpdate(r,n),{onValuesChange:s}=this.callbacks;if(s){let a=jb(this.store,[n]),c=this.getFieldsValue(),l=Uo(c,n,ko(a,n));s(a,l)}this.triggerOnFieldsChange([n,...i])};setFieldsValue=t=>{this.warningUnhooked();let o=this.store;if(t){let n=Yr(this.store,t);this.updateStore(n)}this.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()};setFieldValue=(t,o)=>{this.setFields([{name:t,value:o,errors:[],warnings:[],touched:!0}])};getDependencyChildrenFields=t=>{let o=new Set,n=[],r=new ba;this.getFieldEntities().forEach(s=>{let{dependencies:a}=s.props;(a||[]).forEach(c=>{let l=Yt(c);r.update(l,(d=new Set)=>(d.add(s),d))})});let i=s=>{(r.get(s)||new Set).forEach(c=>{if(!o.has(c)){o.add(c);let l=c.getNamePath();c.isFieldDirty()&&l.length&&(n.push(l),i(l))}})};return i(t),n};triggerOnFieldsChange=(t,o)=>{let{onFieldsChange:n}=this.callbacks;if(n){let r=this.getFields();if(o){let s=new ba;o.forEach(({name:a,errors:c})=>{s.set(a,c)}),r.forEach(a=>{a.errors=s.get(a.name)||a.errors})}let i=r.filter(({name:s})=>ys(t,s));i.length&&n(i,r)}};validateFields=(t,o)=>{this.warningUnhooked();let n,r;Array.isArray(t)||typeof t=="string"||typeof o=="string"?(n=t,r=o):r=t;let i=!!n,s=i?n.map(Yt):[],a=[...s],c=[],l=String(Date.now()),d=new Set,{recursive:u,dirty:m}=r||{};this.getFieldEntities(!0).forEach(h=>{let b=h.getNamePath();if(i||((!h.isList()||!s.some(x=>Il(x,b,!0)))&&a.push(b),s.push(b)),!(!h.props.rules||!h.props.rules.length)&&!(m&&!h.isFieldDirty())&&(d.add(b.join(l)),!i||ys(s,b,u))){let x=h.validateRules({validateMessages:{...Dp,...this.validateMessages},...r});c.push(x.then(()=>({name:b,errors:[],warnings:[]})).catch(y=>{let S=[],v=[];return y.forEach?.(({rule:{warningOnly:C},errors:w})=>{C?v.push(...w):S.push(...w)}),S.length?Promise.reject({name:b,errors:S,warnings:v}):{name:b,errors:S,warnings:v}}))}});let p=aI(c);this.lastValidatePromise=p,p.catch(h=>h).then(h=>{let b=h.map(({name:x})=>x);this.notifyObservers(this.store,b,{type:"validateFinish"}),this.triggerOnFieldsChange(b,h)});let g=p.then(()=>this.lastValidatePromise===p?Promise.resolve(this.getFieldsValue(a)):Promise.reject([])).catch(h=>{let b=h.filter(y=>y&&y.errors.length),x=b[0]?.errors?.[0];return Promise.reject({message:x,values:this.getFieldsValue(s),errorFields:b,outOfDate:this.lastValidatePromise!==p})});g.catch(h=>h);let f=s.filter(h=>d.has(h.join(l)));return this.triggerOnFieldsChange(f),g};submit=()=>{this.warningUnhooked(),this.validateFields().then(t=>{let{onFinish:o}=this.callbacks;if(o)try{o(t)}catch(n){console.error(n)}}).catch(t=>{let{onFinishFailed:o}=this.callbacks;o&&o(t)})}};function y_(e){let t=Bp.useRef(null),[,o]=Bp.useState({});if(!t.current)if(e)t.current=e;else{let n=()=>{o({})},r=new Jb(n);t.current=r.getForm()}return[t.current]}var Hp=y_;var Vo=M(require("react"));var bs=M(require("react")),ex=bs.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),tx=({validateMessages:e,onFormChange:t,onFormFinish:o,children:n})=>{let r=bs.useContext(ex),i=bs.useRef({});return bs.createElement(ex.Provider,{value:{...r,validateMessages:{...r.validateMessages,...e},triggerFormChange:(s,a)=>{t&&t(s,{changedFields:a,forms:i.current}),r.triggerFormChange(s,a)},triggerFormFinish:(s,a)=>{o&&o(s,{values:a,forms:i.current}),r.triggerFormFinish(s,a)},registerForm:(s,a)=>{s&&(i.current={...i.current,[s]:a}),r.registerForm(s,a)},unregisterForm:s=>{let a={...i.current};delete a[s],i.current=a,r.unregisterForm(s)}}},n)};var lI=ex;function ox(){return ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},ox.apply(this,arguments)}var b_=(e,t)=>{let{name:o,initialValues:n,fields:r,form:i,preserve:s,children:a,component:c="form",validateMessages:l,validateTrigger:d="onChange",onValuesChange:u,onFieldsChange:m,onFinish:p,onFinishFailed:g,clearOnDestroy:f,...h}=e,b=Vo.useRef(null),x=Vo.useContext(lI),[y]=Hp(i),{useSubscribe:S,setInitialValues:v,setCallbacks:C,setValidateMessages:w,setPreserve:R,destroyForm:T}=y.getInternalHooks(_r);Vo.useImperativeHandle(t,()=>({...y,nativeElement:b.current})),Vo.useEffect(()=>(x.registerForm(o,y),()=>{x.unregisterForm(o)}),[x,y,o]),w({...x.validateMessages,...l}),C({onValuesChange:u,onFieldsChange:(z,...D)=>{x.triggerFormChange(o,z),m&&m(z,...D)},onFinish:z=>{x.triggerFormFinish(o,z),p&&p(z)},onFinishFailed:g}),R(s);let N=Vo.useRef(null);v(n,!N.current),N.current||(N.current=!0),Vo.useEffect(()=>()=>T(f),[]);let I,E=typeof a=="function";if(E){let z=y.getFieldsValue(!0);I=a(z,y)}else I=a;S(!E);let k=Vo.useRef(null);Vo.useEffect(()=>{rI(k.current||[],r||[])||y.setFields(r||[]),k.current=r},[r,y]);let F=Vo.useMemo(()=>({...y,validateTrigger:d}),[y,d]),A=Vo.createElement(hs.Provider,{value:null},Vo.createElement(Fr.Provider,{value:F},I));return c===!1?A:Vo.createElement(c,ox({},h,{ref:b,onSubmit:z=>{z.preventDefault(),z.stopPropagation(),y.submit()},onReset:z=>{z.preventDefault(),y.resetFields(),h.onReset?.(z)}}),A)},cI=b_;var zr=require("react");function nx(e){try{return JSON.stringify(e)}catch{return Math.random()}}function x_(...e){let[t,o={}]=e,n=T$(o)?{form:o}:o,r=n.form,[i,s]=(0,zr.useState)(()=>typeof t=="function"?t({}):void 0),a=(0,zr.useMemo)(()=>nx(i),[i]),c=(0,zr.useRef)(a);c.current=a;let l=(0,zr.useContext)(Fr),d=r||l,u=d&&d._init,{getFieldsValue:m,getInternalHooks:p}=d,{registerWatch:g}=p(_r),f=Ne((b,x)=>{let y=n.preserve?x??m(!0):b??m(),S=typeof t=="function"?t(y):ko(y,Yt(t));nx(i)!==nx(S)&&s(S)}),h=typeof t=="function"?t:JSON.stringify(t);return(0,zr.useEffect)(()=>{u&&f()},[u,h]),(0,zr.useEffect)(()=>u?g((x,y)=>{f(x,y)}):void 0,[u]),i}var dI=x_;var v_=uI.forwardRef(cI),cd=v_;cd.FormProvider=tx;cd.Field=Fp;cd.List=sI;cd.useForm=Hp;cd.useWatch=dI;var cn=Ti.createContext({}),mI=({children:e,status:t,override:o})=>{let n=Ti.useContext(cn),r=Ti.useMemo(()=>{let i={...n};return o&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,o,n]);return Ti.createElement(cn.Provider,{value:r},e)},pI=Ti.createContext(void 0);var fI=M(require("react")),S_=fI.default.createContext(null),Vp=S_;var C_=e=>{let{checkboxCls:t,checkboxSize:o,lineWidth:n}=e,r=`${t}-wrapper`,i="@media (hover: hover) and (pointer: fine)";return[{[`${t}-group`]:{...Et(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[r]:{...Et(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0}},[t]:{...Et(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",boxSizing:"border-box",display:"block",width:o,height:o,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${Y(n)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,flex:"none",...oi(),"&:after":{boxSizing:"border-box",position:"absolute",top:`calc(${o} / 2 - ${n})`,insetInlineStart:`calc(${o} / 4 - ${n})`,display:"table",width:e.calc(o).div(14).mul(5).equal(),height:e.calc(o).div(14).mul(8).equal(),border:`${Y(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...Rl()},[`${t}-input`]:{position:"absolute",inset:`calc(-1 * (${n}))`,zIndex:1,cursor:"pointer",opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:An(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[i]:{[`
146
- ${r}:not(${r}-disabled),
147
- ${t}:not(${t}-disabled)
148
- `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...Rl()},[i]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'},[i]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function w_(e,t){let o=ze(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return C_(o)}var Wp=Ye("Checkbox",(e,{prefixCls:t})=>[w_(t,e)]);var gI=M(require("react"));function rx(e){let t=gI.default.useRef(null),o=()=>{Ve.cancel(t.current),t.current=null};return[()=>{o(),t.current=Ve(()=>{t.current=null})},i=>{t.current&&(i.stopPropagation(),o()),e?.(i)}]}var R_=(e,t)=>{let{prefixCls:o,children:n,indeterminate:r=!1,onMouseEnter:i,onMouseLeave:s,skipGroup:a=!1,disabled:c,rootClassName:l,className:d,style:u,classNames:m,styles:p,name:g,value:f,checked:h,defaultChecked:b,onChange:x,...y}=e,{getPrefixCls:S,direction:v,className:C,style:w,classNames:R,styles:T}=Xe("checkbox"),N=dn.useContext(Vp),{isFormItemInput:I}=dn.useContext(cn),E=dn.useContext(zo),k=c??N?.disabled??E,[F,A]=it(b,h),z=F,D=Ne(q=>{A(q.target.checked),x?.(q),!a&&N?.toggleOption&&N.toggleOption({label:n,value:f})});N&&!a&&(z=N.value.includes(f));let _=dn.useRef(null),V=bo(t,_);dn.useEffect(()=>{if(!(a||!N))return N.registerValue(f),()=>{N.cancelValue(f)}},[f,a]),dn.useEffect(()=>{_.current?.input&&(_.current.input.indeterminate=r)},[r]);let L=S("checkbox",o),G=oo(L),[H,W]=Wp(L,G),Z={...y},B={...e,indeterminate:r,disabled:k,checked:z},K=_e(w),j=_e(u),[Q,X]=Je([R,m],[T,K,p,j],{props:B}),U=$(`${L}-wrapper`,{[`${L}-rtl`]:v==="rtl",[`${L}-wrapper-checked`]:z,[`${L}-wrapper-disabled`]:k,[`${L}-wrapper-in-form-item`]:I},C,d,Q.root,l,W,G,H),J=$(Q.icon,{[`${L}-indeterminate`]:r},bl,H),[P,O]=rx(Z.onClick);return dn.createElement(vl,{component:"Checkbox",disabled:k},dn.createElement("label",{className:U,style:X.root,onMouseEnter:i,onMouseLeave:s,onClick:P},dn.createElement(I$,{...Z,name:!a&&N?N.name:g,checked:z,onClick:O,onChange:D,prefixCls:L,className:J,style:X.icon,disabled:k,ref:V,value:f}),lo(n)&&dn.createElement("span",{className:$(`${L}-label`,Q.label),style:X.label},n)))},E_=dn.forwardRef(R_),jp=E_;var er=M(require("react"));var $_=er.forwardRef((e,t)=>{let{defaultValue:o,children:n,options:r=[],prefixCls:i,className:s,rootClassName:a,style:c,onChange:l,role:d="group",...u}=e,{getPrefixCls:m,direction:p}=er.useContext(Oe),[g,f]=it(o||[],u.value),h=g||[],[b,x]=er.useState([]),y=er.useMemo(()=>r.map(z=>Tn(z)||Ko(z)?{label:z,value:z}:z).filter(z=>Pn(z)&&Pn(z.value)),[r]),S=z=>{x(D=>D.filter(_=>_!==z))},v=z=>{x(D=>[].concat(Zt(D),[z]))},C=z=>{let D=h.indexOf(z.value),_=Zt(h);D===-1?_.push(z.value):_.splice(D,1),f(_),l?.(_.filter(V=>b.includes(V)).sort((V,L)=>{let G=y.findIndex(W=>W.value===V),H=y.findIndex(W=>W.value===L);return G-H}))},w=m("checkbox",i),R=`${w}-group`,T=oo(w),[N,I]=Wp(w,T),E=Ke(u,["value","disabled"]),k=Array.isArray(y)&&y.length>0?y.map(z=>er.createElement(jp,{prefixCls:w,key:z.value.toString(),disabled:"disabled"in z?z.disabled:u.disabled,value:z.value,checked:h.includes(z.value),onChange:z.onChange,className:$(`${R}-item`,z.className),style:z.style,title:z.title,id:z.id,required:z.required},z.label)):n,F=er.useMemo(()=>({toggleOption:C,value:h,disabled:u.disabled,name:u.name,registerValue:v,cancelValue:S}),[C,h,u.disabled,u.name,v,S]),A=$(R,{[`${R}-rtl`]:p==="rtl"},s,a,I,T,N);return er.createElement("div",{className:A,style:c,role:d,...E,ref:t},er.createElement(Vp.Provider,{value:F},k))});var hI=$_;var ix=jp;ix.Group=hI;ix.__ANT_CHECKBOX=!0;var yI=ix;var no=M(require("react"));var Up=M(require("react"));var I_={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"},bI=I_;function sx(){return sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},sx.apply(this,arguments)}var N_=(e,t)=>Up.createElement(kt,sx({},e,{ref:t,icon:bI})),P_=Up.forwardRef(N_),xI=P_;var br=M(require("react"));var Kp=M(require("react")),{ESC:T_,TAB:M_}=ke;function ax({visible:e,triggerRef:t,onVisibleChange:o,autoFocus:n,overlayRef:r}){let i=Kp.useRef(!1),s=()=>{e&&(t.current?.focus?.(),o?.(!1))},a=()=>r.current?.focus?(r.current.focus(),i.current=!0,!0):!1,c=l=>{switch(l.keyCode){case T_:s();break;case M_:{let d=!1;i.current||(d=a()),d?l.preventDefault():s();break}}};Kp.useEffect(()=>e?(window.addEventListener("keydown",c),n&&Ve(a,3),()=>{window.removeEventListener("keydown",c),i.current=!1}):()=>{i.current=!1},[e])}var Mi=M(require("react")),k_=(0,Mi.forwardRef)((e,t)=>{let{overlay:o,arrow:n,prefixCls:r}=e,i=(0,Mi.useMemo)(()=>{let a;return typeof o=="function"?a=o():a=o,a},[o]),s=Mt(t,To(i));return Mi.default.createElement(Mi.default.Fragment,null,n&&Mi.default.createElement("div",{className:`${r}-arrow`}),Mi.default.cloneElement(i,{ref:ur(i)?s:void 0}))}),vI=k_;var Nl={adjustX:1,adjustY:1},Pl=[0,0],O_={topLeft:{points:["bl","tl"],overflow:Nl,offset:[0,-4],targetOffset:Pl},top:{points:["bc","tc"],overflow:Nl,offset:[0,-4],targetOffset:Pl},topRight:{points:["br","tr"],overflow:Nl,offset:[0,-4],targetOffset:Pl},bottomLeft:{points:["tl","bl"],overflow:Nl,offset:[0,4],targetOffset:Pl},bottom:{points:["tc","bc"],overflow:Nl,offset:[0,4],targetOffset:Pl},bottomRight:{points:["tr","br"],overflow:Nl,offset:[0,4],targetOffset:Pl}},SI=O_;function lx(){return lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},lx.apply(this,arguments)}var A_=br.default.forwardRef((e,t)=>{let{arrow:o=!1,prefixCls:n="rc-dropdown",transitionName:r,animation:i,align:s,placement:a="bottomLeft",placements:c=SI,getPopupContainer:l,showAction:d,hideAction:u,overlayClassName:m,overlayStyle:p,visible:g,trigger:f=["hover"],autoFocus:h,overlay:b,children:x,onVisibleChange:y,disabled:S,...v}=e,[C,w]=br.default.useState(),R="visible"in e?g:C,T=i?`${n}-${i}`:r,N=br.default.useRef(null),I=br.default.useRef(null),E=br.default.useRef(null);br.default.useImperativeHandle(t,()=>N.current);let k=Z=>{w(Z),y?.(Z)};ax({visible:R,triggerRef:E,onVisibleChange:k,autoFocus:h,overlayRef:I});let F=Z=>{let{onOverlayClick:B}=e;w(!1),B&&B(Z)},A=()=>br.default.createElement(vI,{ref:I,overlay:b,prefixCls:n,arrow:o}),z=()=>typeof b=="function"?A:A(),D=()=>{let{minOverlayWidthMatchTrigger:Z,alignPoint:B}=e;return"minOverlayWidthMatchTrigger"in e?Z:!B},_=()=>{let{openClassName:Z}=e;return Z!==void 0?Z:`${n}-open`},V=x,L=$(V.props?.className,R&&_()),G={className:L,ref:Mt(E,To(V))},H=ur(V)?br.default.cloneElement(V,G):br.default.createElement("span",{className:L,ref:E},br.default.cloneElement(V,{className:L})),W=u;return!W&&f.indexOf("contextMenu")!==-1&&(W=["click"]),br.default.createElement(ns,lx({builtinPlacements:c},v,{prefixCls:n,ref:N,popupClassName:$(m,{[`${n}-show-arrow`]:o}),popupStyle:p,action:f,showAction:d,hideAction:W,popupPlacement:a,popupAlign:s,popupMotion:{motionName:T},popupVisible:R,stretch:D()?"minWidth":"",popup:z(),onOpenChange:k,onPopupClick:F,getPopupContainer:l}),H)}),CI=A_;var qp=CI;function Gp(e){let{sizePopupArrow:t,borderRadiusXS:o,borderRadiusOuter:n}=e,r=t/2,i=0,s=r,a=n*1/Math.sqrt(2),c=r-n*(1-1/Math.sqrt(2)),l=r-o*(1/Math.sqrt(2)),d=n*(Math.sqrt(2)-1)+o*(1/Math.sqrt(2)),u=2*r-l,m=d,p=2*r-a,g=c,f=2*r-i,h=s,b=r*Math.sqrt(2)+n*(Math.sqrt(2)-2),x=n*(Math.sqrt(2)-1),y=`polygon(${x}px 100%, 50% ${x}px, ${2*r-x}px 100%, ${x}px 100%)`,S=`path('M ${i} ${s} A ${n} ${n} 0 0 0 ${a} ${c} L ${l} ${d} A ${o} ${o} 0 0 1 ${u} ${m} L ${p} ${g} A ${n} ${n} 0 0 0 ${f} ${h} Z')`;return{arrowShadowWidth:b,arrowPath:S,arrowPolygon:y}}var wI=(e,t,o)=>{let{sizePopupArrow:n,arrowPolygon:r,arrowPath:i,arrowShadowWidth:s,borderRadiusXS:a,calc:c}=e,l={content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${Y(a)} 0`},transform:"translateY(50%) rotate(-135deg)",zIndex:0,background:"transparent"};return o&&(l.boxShadow=o),{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:c(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[r,i]},content:'""'},"&::after":l}};var cx=8;function Tl(e){let{contentRadius:t,limitVerticalRadius:o}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:o?cx:n}}var L_=(e,t,o)=>{let{componentCls:n,boxShadowPopoverArrow:r,arrowOffsetVertical:i,arrowOffsetHorizontal:s,antCls:a}=e,[c]=Gt(a,"tooltip"),{arrowDistance:l=0,arrowShadow:d=!0}=o||{};return{[n]:{[`${n}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...wI(e,t,d?r:!1),"&:before":{background:t}}],[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:l,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[c("arrow-offset-x")]:s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{[c("arrow-offset-x")]:`calc(100% - ${Y(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}},[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:l,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[c("arrow-offset-x")]:s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{[c("arrow-offset-x")]:`calc(100% - ${Y(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}},[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:l},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:i},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:i},[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:l},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:i},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:i}}}},Xp=L_;function D_(e,t,o,n){if(n===!1)return{adjustX:!1,adjustY:!1};let r=st(n)?n:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+o,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+o,i.shiftX=!0,i.adjustX=!0;break}let s={...i,...r};return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}var RI={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"]}},__={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"]}},F_=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function dd(e){let{arrowWidth:t,autoAdjustOverflow:o,arrowPointAtCenter:n,offset:r,borderRadius:i,visibleFirst:s}=e,a=t/2,c={},l=Tl({contentRadius:i,limitVerticalRadius:!0});return Object.keys(RI).forEach(d=>{let m={...n&&__[d]||RI[d],offset:[0,0],dynamicInset:!0};switch(c[d]=m,F_.has(d)&&(m.autoArrow=!1),d){case"top":case"topLeft":case"topRight":m.offset[1]=-a-r;break;case"bottom":case"bottomLeft":case"bottomRight":m.offset[1]=a+r;break;case"left":case"leftTop":case"leftBottom":m.offset[0]=-a-r;break;case"right":case"rightTop":case"rightBottom":m.offset[0]=a+r;break}if(n)switch(d){case"topLeft":case"bottomLeft":m.offset[0]=-l.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":m.offset[0]=l.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":m.offset[1]=-l.arrowOffsetHorizontal*2+a;break;case"leftBottom":case"rightBottom":m.offset[1]=l.arrowOffsetHorizontal*2-a;break}m.overflow=D_(d,l,t,o),s&&(m.htmlRegion="visibleFirst")}),c}var _n=M(require("react"));function dx(e){return t=>_n.createElement(ss,{theme:{token:{motion:!1,zIndexPopupBase:0}}},_n.createElement(e,{...t}))}var z_=(e,t,o,n,r)=>dx(s=>{let{prefixCls:a,style:c}=s,l=_n.useRef(null),[d,u]=_n.useState(0),[m,p]=_n.useState(0),[g,f]=it(!1,s.open),{getPrefixCls:h}=_n.useContext(Oe),b=h(n||"select",a);_n.useEffect(()=>{if(f(!0),typeof ResizeObserver<"u"){let S=new ResizeObserver(C=>{let w=C[0].target;u(w.offsetHeight+8),p(w.offsetWidth)}),v=setInterval(()=>{let C=r?`.${r(b)}`:`.${b}-dropdown`,w=l.current?.querySelector(C);w&&(clearInterval(v),S.observe(w))},10);return()=>{clearInterval(v),S.disconnect()}}},[b]);let x={...s,style:{...c,margin:0},open:g,getPopupContainer:()=>l.current};return o&&(x=o(x)),t&&(x={...x,[t]:{overflow:{adjustX:!1,adjustY:!1}}}),_n.createElement("div",{ref:l,style:{paddingBottom:d,position:"relative",minWidth:m}},_n.createElement(e,{...x}))}),Yp=z_;var Rf=M(require("react")),Vl=require("react");var tr=M(require("react")),ri=require("react");var xa=M(require("react"));var Ml=void 0;function B_(e,t){let{prefixCls:o,invalidate:n,item:r,renderItem:i,responsive:s,responsiveDisabled:a,registerSize:c,itemKey:l,className:d,style:u,children:m,display:p,order:g,component:f="div",...h}=e,b=s&&!p;function x(w){c(l,w)}xa.useEffect(()=>()=>{x(null)},[]);let y=i&&r!==Ml?i(r,{index:g}):m,S;n||(S={opacity:b?0:1,height:b?0:Ml,overflowY:b?"hidden":Ml,order:s?g:Ml,pointerEvents:b?"none":Ml,position:b?"absolute":Ml});let v={};b&&(v["aria-hidden"]=!0);let C=xa.createElement(f,Qn({className:$(!n&&o,d),style:{...S,...u}},v,h,{ref:t}),y);return s&&(C=xa.createElement(sn,{onResize:({offsetWidth:w})=>{x(w)},disabled:a},C)),C}var H_=xa.forwardRef(B_),va=H_;var Zp=M(require("react")),EI=require("react-dom");function ux(e){if(typeof MessageChannel>"u")Ve(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function $I(){let e=Zp.useRef(null);return o=>{e.current||(e.current=[],ux(()=>{(0,EI.unstable_batchedUpdates)(()=>{e.current.forEach(n=>{n()}),e.current=null})})),e.current.push(o)}}function xs(e,t){let[o,n]=Zp.useState(t),r=Ne(i=>{e(()=>{n(i)})});return[o,r]}var vs=M(require("react"));var II=M(require("react")),Sa=II.default.createContext(null);var V_=(e,t)=>{let o=vs.useContext(Sa);if(!o){let{component:a="div",...c}=e;return vs.createElement(a,Qn({},c,{ref:t}))}let{className:n,...r}=o,{className:i,...s}=e;return vs.createElement(Sa.Provider,{value:null},vs.createElement(va,Qn({ref:t,className:$(n,i)},r,s)))},W_=vs.forwardRef(V_),NI=W_;var PI="responsive",TI="invalidate";function j_(e){return`+ ${e.length} ...`}function U_(e,t){let{prefixCls:o="rc-overflow",data:n=[],renderItem:r,renderRawItem:i,itemKey:s,itemWidth:a=10,ssr:c,style:l,className:d,maxCount:u,renderRest:m,renderRawRest:p,prefix:g,suffix:f,component:h="div",itemComponent:b,onVisibleChange:x,...y}=e,S=c==="full",v=$I(),[C,w]=xs(v,null),R=C||0,[T,N]=xs(v,new Map),[I,E]=xs(v,0),[k,F]=xs(v,0),[A,z]=xs(v,0),[D,_]=xs(v,0),[V,L]=(0,ri.useState)(null),[G,H]=(0,ri.useState)(null),W=tr.useMemo(()=>G===null&&S?Number.MAX_SAFE_INTEGER:G||0,[G,C]),[Z,B]=(0,ri.useState)(!1),K=`${o}-item`,j=Math.max(I,k),Q=u===PI,X=n.length&&Q,U=u===TI,J=X||typeof u=="number"&&n.length>u,P=(0,ri.useMemo)(()=>{let pe=n;return X?C===null&&S?pe=n:pe=n.slice(0,Math.min(n.length,R/a)):typeof u=="number"&&(pe=n.slice(0,u)),pe},[n,a,C,u,X]),O=(0,ri.useMemo)(()=>X?n.slice(W+1):n.slice(P.length),[n,P,X,W]),q=(0,ri.useCallback)((pe,ue)=>typeof s=="function"?s(pe):(s&&pe?.[s])??ue,[s]),ee=(0,ri.useCallback)(r||(pe=>pe),[r]);function le(pe,ue,se){G===pe&&(ue===void 0||ue===V)||(H(pe),se||(B(pe<n.length-1),x?.(pe)),ue!==void 0&&L(ue))}function re(pe,ue){w(ue.clientWidth)}function ie(pe,ue){N(se=>{let Se=new Map(se);return ue===null?Se.delete(pe):Se.set(pe,ue),Se})}function Ce(pe,ue){F(ue),E(k)}function de(pe,ue){z(ue)}function $e(pe,ue){_(ue)}function ae(pe){return T.get(q(P[pe],pe))}rt(()=>{if(R&&typeof j=="number"&&P){let pe=A+D,ue=P.length,se=ue-1;if(!ue){le(0,null);return}for(let Se=0;Se<ue;Se+=1){let Ie=ae(Se);if(S&&(Ie=Ie||0),Ie===void 0){le(Se-1,void 0,!0);break}if(pe+=Ie,se===0&&pe<=R||Se===se-1&&pe+ae(se)<=R){le(se,null);break}else if(pe+j>R){le(Se-1,pe-Ie-D+k);break}}f&&ae(0)+D>R&&L(null)}},[R,T,k,A,D,q,P]);let Pe=Z&&!!O.length,he={};V!==null&&X&&(he={position:"absolute",top:0,insetInlineStart:V});let ne={prefixCls:K,responsive:X,component:b,invalidate:U},fe=i?(pe,ue)=>{let se=q(pe,ue);return tr.createElement(Sa.Provider,{key:se,value:{...ne,order:ue,item:pe,itemKey:se,registerSize:ie,display:ue<=W}},i(pe,ue))}:(pe,ue)=>{let se=q(pe,ue);return tr.createElement(va,Qn({},ne,{order:ue,key:se,item:pe,renderItem:ee,itemKey:se,registerSize:ie,display:ue<=W}))},ce={order:Pe?W:Number.MAX_SAFE_INTEGER,className:`${K}-rest`,registerSize:Ce,display:Pe},Re=m||j_,De=p?tr.createElement(Sa.Provider,{value:{...ne,...ce}},p(O)):tr.createElement(va,Qn({},ne,ce),typeof Re=="function"?Re(O):Re),we=tr.createElement(h,Qn({className:$(!U&&o,d),style:l,ref:t},y),g&&tr.createElement(va,Qn({},ne,{responsive:Q,responsiveDisabled:!X,order:-1,className:`${K}-prefix`,registerSize:de,display:!0}),g),P.map(fe),J?De:null,f&&tr.createElement(va,Qn({},ne,{responsive:Q,responsiveDisabled:!X,order:W,className:`${K}-suffix`,registerSize:$e,display:!0,style:he}),f));return Q?tr.createElement(sn,{onResize:re,disabled:!X},we):we}var Qp=tr.forwardRef(U_);Qp.Item=NI;Qp.RESPONSIVE=PI;Qp.INVALIDATE=TI;var MI=Qp;var ii=MI;var bt=M(require("react")),jI=require("react"),UI=require("react-dom");var Jp=M(require("react")),mx=Jp.createContext(null);function px(e,t){return`${e}-${t}`}function ef(e){let t=Jp.useContext(mx);return px(t,e)}var kl=M(require("react"));var $o=kl.createContext(null);function K_(e,t){let o={...e};return Object.keys(t).forEach(n=>{let r=t[n];r!==void 0&&(o[n]=r)}),o}function ki({children:e,locked:t,...o}){let n=kl.useContext($o),r=qn(()=>K_(n,o),[n,o],(i,s)=>!t&&(i[0]!==s[0]||!kr(i[1],s[1],!0)));return kl.createElement($o.Provider,{value:r},e)}var Oi=M(require("react")),q_=[],fx=Oi.createContext(null);function Ss(){return Oi.useContext(fx)}var gx=Oi.createContext(q_);function Br(e){let t=Oi.useContext(gx);return Oi.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}var tf=Oi.createContext(null);var kI=M(require("react")),G_=kI.createContext({}),Ol=G_;var pd=M(require("react"));var{LEFT:hx,RIGHT:yx,UP:bx,DOWN:of,ENTER:nf,ESC:LI,HOME:ud,END:md}=ke,OI=[bx,of,hx,yx];function X_(e,t,o,n){let r="prev",i="next",s="children",a="parent";if(e==="inline"&&n===nf)return{inlineTrigger:!0};let c={[bx]:r,[of]:i},l={[hx]:o?i:r,[yx]:o?r:i,[of]:s,[nf]:s},d={[bx]:r,[of]:i,[nf]:s,[LI]:a,[hx]:o?s:a,[yx]:o?a:s};switch({inline:c,horizontal:l,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d}[`${e}${t?"":"Sub"}`]?.[n]){case r:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case a:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function Y_(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function Z_(e,t){let o=e||document.activeElement;for(;o;){if(t.has(o))return o;o=o.parentElement}return null}function rf(e,t){return Ec(e,!0).filter(n=>t.has(n))}function AI(e,t,o,n=1){if(!e)return null;let r=rf(e,t),i=r.length,s=r.findIndex(a=>o===a);return n<0?s===-1?s=i-1:s-=1:n>0&&(s+=1),s=(s+i)%i,r[s]}var fd=(e,t)=>{let o=new Set,n=new Map,r=new Map;return e.forEach(i=>{let s=document.querySelector(`[data-menu-id='${px(t,i)}']`);s&&(o.add(s),r.set(s,i),n.set(i,s))}),{elements:o,key2element:n,element2key:r}};function DI(e,t,o,n,r,i,s,a,c,l){let d=pd.useRef(void 0),u=pd.useRef(void 0);u.current=t;let m=()=>{Ve.cancel(d.current)};return pd.useEffect(()=>()=>{m()},[]),p=>{let{which:g}=p;if([...OI,nf,LI,ud,md].includes(g)){let f=i(),h=fd(f,n),{elements:b,key2element:x,element2key:y}=h,S=x.get(t),v=Z_(S,b),C=y.get(v),w=X_(e,s(C,!0).length===1,o,g);if(!w&&g!==ud&&g!==md)return;(OI.includes(g)||[ud,md].includes(g))&&p.preventDefault();let R=T=>{if(T){let N=T,I=T.querySelector("a");I?.getAttribute("href")&&(N=I);let E=y.get(T);a(E),m(),d.current=Ve(()=>{u.current===E&&N.focus()})}};if([ud,md].includes(g)||w.sibling||!v){let T;!v||e==="inline"?T=r.current:T=Y_(v);let N,I=rf(T,b);g===ud?N=I[0]:g===md?N=I[I.length-1]:N=AI(T,b,v,w.offset),R(N)}else if(w.inlineTrigger)c(C);else if(w.offset>0)c(C,!0),m(),d.current=Ve(()=>{h=fd(f,n);let T=v.getAttribute("aria-controls"),N=document.getElementById(T),I=AI(N,h.elements);R(I)},5);else if(w.offset<0){let T=s(C,!0),N=T[T.length-2],I=x.get(N);c(N,!1),R(I)}}l?.(p)}}var gd=M(require("react")),xr=require("react");function _I(e){Promise.resolve().then(e)}var xx="__RC_UTIL_PATH_SPLIT__",FI=e=>e.join(xx),Q_=e=>e.split(xx),sf="rc-menu-more";function vx(){let[,e]=gd.useState({}),t=(0,xr.useRef)(new Map),o=(0,xr.useRef)(new Map),[n,r]=gd.useState([]),i=(0,xr.useRef)(0),s=(0,xr.useRef)(!1),a=()=>{s.current||e({})},c=(0,xr.useCallback)((f,h)=>{let b=FI(h);o.current.set(b,f),t.current.set(f,b),i.current+=1;let x=i.current;_I(()=>{x===i.current&&a()})},[]),l=(0,xr.useCallback)((f,h)=>{let b=FI(h);o.current.delete(b),t.current.delete(f)},[]),d=(0,xr.useCallback)(f=>{r(f)},[]),u=(0,xr.useCallback)((f,h)=>{let b=t.current.get(f)||"",x=Q_(b);return h&&n.includes(x[0])&&x.unshift(sf),x},[n]),m=(0,xr.useCallback)((f,h)=>f.filter(b=>b!==void 0).some(b=>u(b,!0).includes(h)),[u]),p=()=>{let f=[...t.current.keys()];return n.length&&f.push(sf),f},g=(0,xr.useCallback)(f=>{let h=`${t.current.get(f)}${xx}`,b=new Set;return[...o.current.keys()].forEach(x=>{x.startsWith(h)&&b.add(o.current.get(x))}),b},[]);return gd.useEffect(()=>()=>{s.current=!0},[]),{registerPath:c,unregisterPath:l,refreshOverflowKeys:d,isSubPathKey:m,getKeyPath:u,getKeys:p,getSubPathKeys:g}}var af=M(require("react"));function Cs(e){let t=af.useRef(e);t.current=e;let o=af.useCallback((...n)=>t.current?.(...n),[]);return e?o:void 0}var Wo=M(require("react"));var zI=M(require("react"));function hd(e,t,o,n){let{activeKey:r,onActive:i,onInactive:s}=zI.useContext($o),a={active:r===e};return t||(a.onMouseEnter=c=>{o?.({key:e,domEvent:c}),i(e)},a.onMouseLeave=c=>{n?.({key:e,domEvent:c}),s(e)}),a}var BI=M(require("react"));function yd(e){let{mode:t,rtl:o,inlineIndent:n}=BI.useContext($o);if(t!=="inline")return null;let r=e;return o?{paddingRight:r*n}:{paddingLeft:r*n}}var HI=M(require("react"));function bd({icon:e,props:t,children:o}){let n;return e===null||e===!1?null:(typeof e=="function"?n=HI.createElement(e,{...t}):typeof e!="boolean"&&(n=e),n||o||null)}function Ca({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(Kt(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function xd(){return xd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},xd.apply(this,arguments)}var Sx=class extends Wo.Component{render(){let{title:t,attribute:o,elementRef:n,...r}=this.props,i=Ke(r,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Kt(!o,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),Wo.createElement(ii.Item,xd({},o,{title:typeof t=="string"?t:void 0},i,{ref:n}))}},J_=Wo.forwardRef((e,t)=>{let{style:o,className:n,eventKey:r,warnKey:i,disabled:s,itemIcon:a,children:c,itemData:l,role:d,onMouseEnter:u,onMouseLeave:m,onClick:p,onKeyDown:g,onFocus:f,...h}=e,b=ef(r),{prefixCls:x,onItemClick:y,disabled:S,overflowDisabled:v,itemIcon:C,selectedKeys:w,onActive:R}=Wo.useContext($o),{_internalRenderMenuItem:T}=Wo.useContext(Ol),N=`${x}-item`,I=Wo.useRef(null),E=Wo.useRef(null),k=S||s,F=bo(t,E),A=Br(r),z=j=>{let Q=l||{key:r||"",label:c,itemIcon:a,extra:e.extra,title:e.title};return{key:r,keyPath:[...A].reverse(),item:I.current,domEvent:j,itemData:l||Q}},D=a||C,{active:_,...V}=hd(r,k,u,m),L=w.includes(r),G=yd(A.length),H=j=>{if(k)return;let Q=z(j);p?.(Ca(Q)),y(Q)},W=j=>{if(g?.(j),j.which===ke.ENTER){let Q=z(j);p?.(Ca(Q)),y(Q)}},Z=j=>{R(r),f?.(j)},B={};e.role==="option"&&(B["aria-selected"]=L);let K=Wo.createElement(Sx,xd({ref:I,elementRef:F,role:d===null?"none":d||"menuitem",tabIndex:s?null:-1,"data-menu-id":v&&b?null:b},Ke(h,["extra"]),V,B,{component:"li","aria-disabled":s,style:{...G,...o},className:$(N,{[`${N}-active`]:_,[`${N}-selected`]:L,[`${N}-disabled`]:k},n),onClick:H,onKeyDown:W,onFocus:Z}),c,Wo.createElement(bd,{props:{...e,isSelected:L},icon:D}));return T&&(K=T(K,e,{selected:L})),K});function e6(e,t){let{eventKey:o}=e,n=Ss(),r=Br(o);return Wo.useEffect(()=>{if(n)return n.registerPath(o,r),()=>{n.unregisterPath(o,r)}},[r]),n?null:Wo.createElement(J_,xd({},e,{ref:t}))}var si=Wo.forwardRef(e6);var Nt=M(require("react"));var Al=M(require("react"));function Cx(){return Cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Cx.apply(this,arguments)}var t6=({className:e,children:t,...o},n)=>{let{prefixCls:r,mode:i,rtl:s}=Al.useContext($o);return Al.createElement("ul",Cx({className:$(r,s&&`${r}-rtl`,`${r}-sub`,`${r}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},o,{"data-menu-list":!0,ref:n}),t)},o6=Al.forwardRef(t6),lf=o6;var cf=M(require("react"));function Ll(e,t){return co(e).map((o,n)=>{if(cf.isValidElement(o)){let{key:r}=o,i=o.props?.eventKey??r;return i==null&&(i=`tmp_key-${[...t,n].join("-")}`),cf.cloneElement(o,{key:i,eventKey:i})}return o})}var Hr=M(require("react"));var un={adjustX:1,adjustY:1},VI={topLeft:{points:["bl","tl"],overflow:un},topRight:{points:["br","tr"],overflow:un},bottomLeft:{points:["tl","bl"],overflow:un},bottomRight:{points:["tr","br"],overflow:un},leftTop:{points:["tr","tl"],overflow:un},leftBottom:{points:["br","bl"],overflow:un},rightTop:{points:["tl","tr"],overflow:un},rightBottom:{points:["bl","br"],overflow:un}},WI={topLeft:{points:["bl","tl"],overflow:un},topRight:{points:["br","tr"],overflow:un},bottomLeft:{points:["tl","bl"],overflow:un},bottomRight:{points:["tr","br"],overflow:un},rightTop:{points:["tr","tl"],overflow:un},rightBottom:{points:["br","bl"],overflow:un},leftTop:{points:["tl","tr"],overflow:un},leftBottom:{points:["bl","br"],overflow:un}};function df(e,t,o){if(t)return t;if(o)return o[e]||o.other}var n6={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function wx({prefixCls:e,visible:t,children:o,popup:n,popupStyle:r,popupClassName:i,popupOffset:s,disabled:a,mode:c,onVisibleChange:l}){let{getPopupContainer:d,rtl:u,subMenuOpenDelay:m,subMenuCloseDelay:p,builtinPlacements:g,triggerSubMenuAction:f,forceSubMenuRender:h,rootClassName:b,motion:x,defaultMotions:y}=Hr.useContext($o),[S,v]=Hr.useState(!1),C=u?{...WI,...g}:{...VI,...g},w=n6[c],R=df(c,x,y),T=Hr.useRef(R);c!=="inline"&&(T.current=R);let N={...T.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},I=Hr.useRef(void 0);return Hr.useEffect(()=>(I.current=Ve(()=>{v(t)}),()=>{Ve.cancel(I.current)}),[t]),Hr.createElement(ns,{prefixCls:e,popupClassName:$(`${e}-popup`,{[`${e}-rtl`]:u},i,b),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:d,builtinPlacements:C,popupPlacement:w,popupVisible:S,popup:n,popupStyle:r,popupAlign:s&&{offset:s},action:a?[]:[f],mouseEnterDelay:m,mouseLeaveDelay:p,onPopupVisibleChange:l,forceRender:h,popupMotion:N,fresh:!0},o)}var vr=M(require("react"));function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Rx.apply(this,arguments)}function Ex({id:e,open:t,keyPath:o,children:n}){let r="inline",{prefixCls:i,forceSubMenuRender:s,motion:a,defaultMotions:c,mode:l}=vr.useContext($o),d=vr.useRef(!1);d.current=l===r;let[u,m]=vr.useState(!d.current),p=d.current?t:!1;vr.useEffect(()=>{d.current&&m(!1)},[l]);let g={...df(r,a,c)};o.length>1&&(g.motionAppear=!1);let f=g.onVisibleChanged;return g.onVisibleChanged=h=>(!d.current&&!h&&m(!0),f?.(h)),u?null:vr.createElement(ki,{mode:r,locked:!d.current},vr.createElement(fo,Rx({visible:p},g,{forceRender:s,removeOnLeave:!1,leavedClassName:`${i}-hidden`}),({className:h,style:b})=>vr.createElement(lf,{id:e,className:h,style:b},n)))}function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},vd.apply(this,arguments)}var r6=Nt.forwardRef((e,t)=>{let{style:o,className:n,styles:r,classNames:i,title:s,itemTitle:a,eventKey:c,warnKey:l,disabled:d,internalPopupClose:u,children:m,itemIcon:p,expandIcon:g,popupClassName:f,popupOffset:h,popupStyle:b,onClick:x,onMouseEnter:y,onMouseLeave:S,onTitleClick:v,onTitleMouseEnter:C,onTitleMouseLeave:w,popupRender:R,...T}=e,N=ef(c),{prefixCls:I,mode:E,openKeys:k,disabled:F,overflowDisabled:A,activeKey:z,selectedKeys:D,itemIcon:_,expandIcon:V,onItemClick:L,onOpenChange:G,onActive:H,popupRender:W}=Nt.useContext($o),{_internalRenderSubMenuItem:Z}=Nt.useContext(Ol),{isSubPathKey:B}=Nt.useContext(tf),K=Br(),j=`${I}-submenu`,Q=F||d,X=Nt.useRef(null),U=Nt.useRef(null),J=p??_,P=g??V,O=k.includes(c),q=!A&&O,ee=B(D,c),{active:le,...re}=hd(c,Q,C,w),[ie,Ce]=Nt.useState(!1),de=Te=>{Q||Ce(Te)},$e=Te=>{de(!0),y?.({key:c,domEvent:Te})},ae=Te=>{de(!1),S?.({key:c,domEvent:Te})},Pe=Nt.useMemo(()=>le||(E!=="inline"?ie||B([z],c):!1),[E,le,z,ie,c,B]),he=yd(K.length),ne=Te=>{Q||(v?.({key:c,domEvent:Te}),E==="inline"&&G(c,!O))},fe=Cs(Te=>{x?.(Ca(Te)),L(Te)}),ce=Te=>{E!=="inline"&&G(c,Te)},Re=()=>{H(c)},De=N&&`${N}-popup`,we=Nt.useMemo(()=>Nt.createElement(bd,{icon:E!=="horizontal"?P:void 0,props:{...e,isOpen:q,isSubMenu:!0}},Nt.createElement("i",{className:`${j}-arrow`})),[E,P,e,q,j]),pe=Nt.createElement("div",vd({role:"menuitem",style:he,className:`${j}-title`,tabIndex:Q?null:-1,ref:X,title:a??(typeof s=="string"?s:null),"data-menu-id":A&&N?null:N,"aria-expanded":q,"aria-haspopup":!0,"aria-controls":De,"aria-disabled":Q,onClick:ne,onFocus:Re},re),s,we),ue=Nt.useRef(E);E!=="inline"&&K.length>1?ue.current="vertical":ue.current=E;let se=ue.current,Se=Nt.useMemo(()=>{let Te=Nt.createElement(ki,{classNames:i,styles:r,mode:se==="horizontal"?"vertical":se},Nt.createElement(lf,{id:De,ref:U},m)),qe=R||W;return qe?qe(Te,{item:e,keys:K}):Te},[R,W,K,De,m,e,se]);if(!A){let Te=ue.current;pe=Nt.createElement(wx,{mode:Te,prefixCls:j,visible:!u&&q&&E!=="inline",popupClassName:f,popupOffset:h,popupStyle:b,popup:Se,disabled:Q,onVisibleChange:ce},pe)}let Ie=Nt.createElement(ii.Item,vd({ref:t,role:"none"},T,{component:"li",style:o,className:$(j,`${j}-${E}`,n,{[`${j}-open`]:q,[`${j}-active`]:Pe,[`${j}-selected`]:ee,[`${j}-disabled`]:Q}),onMouseEnter:$e,onMouseLeave:ae}),pe,!A&&Nt.createElement(Ex,{id:De,open:q,keyPath:K},m));return Z&&(Ie=Z(Ie,e,{selected:ee,active:Pe,open:q,disabled:Q})),Nt.createElement(ki,{classNames:i,styles:r,onItemClick:fe,mode:E==="horizontal"?"vertical":E,itemIcon:J,expandIcon:P},Ie)}),i6=Nt.forwardRef((e,t)=>{let{eventKey:o,children:n}=e,r=Br(o),i=Ll(n,r),s=Ss();Nt.useEffect(()=>{if(s)return s.registerPath(o,r),()=>{s.unregisterPath(o,r)}},[r]);let a;return s?a=i:a=Nt.createElement(r6,vd({ref:t},e),i),Nt.createElement(gx.Provider,{value:r},a)}),ws=i6;var li=M(require("react"));var uf=M(require("react"));function wa({className:e,style:t}){let{prefixCls:o}=uf.useContext($o);return Ss()?null:uf.createElement("li",{role:"separator",className:$(`${o}-item-divider`,e),style:t})}var ai=M(require("react"));function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},mf.apply(this,arguments)}var s6=ai.forwardRef((e,t)=>{let{className:o,title:n,eventKey:r,children:i,...s}=e,{prefixCls:a,classNames:c,styles:l}=ai.useContext($o),d=`${a}-item-group`;return ai.createElement("li",mf({ref:t,role:"presentation"},s,{onClick:u=>u.stopPropagation(),className:$(d,o)}),ai.createElement("div",{role:"presentation",className:$(`${d}-title`,c?.listTitle),style:l?.listTitle,title:typeof n=="string"?n:void 0},n),ai.createElement("ul",{role:"group",className:$(`${d}-list`,c?.list),style:l?.list},i))}),a6=ai.forwardRef((e,t)=>{let{eventKey:o,children:n}=e,r=Br(o),i=Ll(n,r);return Ss()?i:ai.createElement(s6,mf({ref:t},Ke(e,["warnKey"])),i)}),Dl=a6;function _l(){return _l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_l.apply(this,arguments)}function $x(e,t,o){let{item:n,group:r,submenu:i,divider:s}=t;return(e||[]).map((a,c)=>{if(a&&typeof a=="object"){let{label:l,children:d,key:u,type:m,extra:p,...g}=a,f=u??`tmp-${c}`;if(d||m==="group"){if(m==="group")return li.createElement(r,_l({key:f},g,{title:l}),$x(d,t,o));let{title:b,...x}=g;return li.createElement(i,_l({key:f},x,{title:l,itemTitle:typeof b=="string"?b:void 0}),$x(d,t,o))}if(m==="divider")return li.createElement(s,_l({key:f},g));let h=!!p||p===0;return li.createElement(n,_l({key:f},g,{extra:p,itemData:{...a,key:f}}),h?li.createElement(li.Fragment,null,li.createElement("span",{className:`${o}-item-label`},l),li.createElement("span",{className:`${o}-item-extra`},p)):l)}return null}).filter(a=>a)}function Ix(e,t,o,n,r){let i=e,s={divider:wa,item:si,group:Dl,submenu:ws,...n};return t&&(i=$x(t,s,r)),Ll(i,o)}function Nx(){return Nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Nx.apply(this,arguments)}var Ra=[],l6=bt.forwardRef((e,t)=>{let{prefixCls:o="rc-menu",rootClassName:n,style:r,className:i,styles:s,classNames:a,tabIndex:c=0,items:l,children:d,direction:u,id:m,mode:p="vertical",inlineCollapsed:g,disabled:f,disabledOverflow:h,subMenuOpenDelay:b=.1,subMenuCloseDelay:x=.1,forceSubMenuRender:y,defaultOpenKeys:S,openKeys:v,activeKey:C,defaultActiveFirst:w,selectable:R=!0,multiple:T=!1,defaultSelectedKeys:N,selectedKeys:I,onSelect:E,onDeselect:k,inlineIndent:F=24,motion:A,defaultMotions:z,triggerSubMenuAction:D="hover",builtinPlacements:_,itemIcon:V,expandIcon:L,overflowedIndicator:G="...",overflowedIndicatorPopupClassName:H,getPopupContainer:W,onClick:Z,onOpenChange:B,onKeyDown:K,openAnimation:j,openTransitionName:Q,_internalRenderMenuItem:X,_internalRenderSubMenuItem:U,_internalComponents:J,popupRender:P,...O}=e,[q,ee]=bt.useMemo(()=>[Ix(d,l,Ra,J,o),Ix(d,l,Ra,{},o)],[d,l,J]),[le,re]=bt.useState(!1),ie=bt.useRef(null),Ce=Co(),de=m??`rc-menu-uuid-${Ce}`,$e=u==="rtl",[ae,Pe]=it(S,v),he=ae||Ra,ne=(Be,tt=!1)=>{function dt(){Pe(Be),B?.(Be)}tt?(0,UI.flushSync)(dt):dt()},[fe,ce]=bt.useState(he),Re=bt.useRef(!1),[De,we]=bt.useMemo(()=>(p==="inline"||p==="vertical")&&g?["vertical",g]:[p,!1],[p,g]),pe=De==="inline",[ue,se]=bt.useState(De),[Se,Ie]=bt.useState(we);bt.useEffect(()=>{se(De),Ie(we),Re.current&&(pe?Pe(fe):ne(Ra))},[De,we]);let[Te,qe]=bt.useState(0),Ge=Te>=q.length-1||ue!=="horizontal"||h;bt.useEffect(()=>{pe&&ce(he)},[he]),bt.useEffect(()=>(Re.current=!0,()=>{Re.current=!1}),[]);let{registerPath:mt,unregisterPath:Ze,refreshOverflowKeys:$t,isSubPathKey:wt,getKeyPath:gt,getKeys:ht,getSubPathKeys:yt}=vx(),Rt=bt.useMemo(()=>({registerPath:mt,unregisterPath:Ze}),[mt,Ze]),Fe=bt.useMemo(()=>({isSubPathKey:wt}),[wt]);bt.useEffect(()=>{$t(Ge?Ra:q.slice(Te+1).map(Be=>Be.key))},[Te,Ge]);let[xt,be]=it(C||w&&q[0]?.key,C),oe=Cs(Be=>{be(Be)}),me=Cs(()=>{be(void 0)});(0,jI.useImperativeHandle)(t,()=>({list:ie.current,focus:Be=>{let tt=ht(),{elements:dt,key2element:Ae,element2key:je}=fd(tt,de),Tt=rf(ie.current,dt),po;xt&&tt.includes(xt)?po=xt:po=Tt[0]?je.get(Tt[0]):q.find(jt=>!jt.props.disabled)?.key;let vt=Ae.get(po);po&&vt&&vt?.focus?.(Be)},findItem:({key:Be})=>{let tt=ht(),{key2element:dt}=fd(tt,de);return dt.get(Be)||null}}));let[te,ge]=it(N||[],I),ye=bt.useMemo(()=>Array.isArray(te)?te:te==null?Ra:[te],[te]),Le=Be=>{if(R){let{key:tt}=Be,dt=ye.includes(tt),Ae;T?dt?Ae=ye.filter(Tt=>Tt!==tt):Ae=[...ye,tt]:Ae=[tt],ge(Ae);let je={...Be,selectedKeys:Ae};dt?k?.(je):E?.(je)}!T&&he.length&&ue!=="inline"&&ne(Ra)},Qe=Cs(Be=>{Z?.(Ca(Be)),Le(Be)}),Ot=Cs((Be,tt)=>{let dt=he.filter(Ae=>Ae!==Be);if(tt)dt.push(Be);else if(ue!=="inline"){let Ae=yt(Be);dt=dt.filter(je=>!Ae.has(je))}kr(he,dt,!0)||ne(dt,!0)}),Pt=DI(ue,xt,$e,de,ie,ht,gt,be,(Be,tt)=>{let dt=tt??!he.includes(Be);Ot(Be,dt)},K);bt.useEffect(()=>{re(!0)},[]);let to=bt.useMemo(()=>({_internalRenderMenuItem:X,_internalRenderSubMenuItem:U}),[X,U]),ao=ue!=="horizontal"||h?q:q.map((Be,tt)=>bt.createElement(ki,{key:Be.key,overflowDisabled:tt>Te,classNames:a,styles:s},Be)),In=bt.createElement(ii,Nx({id:m,ref:ie,prefixCls:`${o}-overflow`,component:"ul",itemComponent:si,className:$(o,`${o}-root`,`${o}-${ue}`,i,{[`${o}-inline-collapsed`]:Se,[`${o}-rtl`]:$e},n),dir:u,style:r,role:"menu",tabIndex:c,data:ao,renderRawItem:Be=>Be,renderRawRest:Be=>{let tt=Be.length,dt=tt?q.slice(-tt):null;return bt.createElement(ws,{eventKey:sf,title:G,disabled:Ge,internalPopupClose:tt===0,popupClassName:H},dt)},maxCount:ue!=="horizontal"||h?ii.INVALIDATE:ii.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:Be=>{qe(Be)},onKeyDown:Pt},O));return bt.createElement(Ol.Provider,{value:to},bt.createElement(mx.Provider,{value:de},bt.createElement(ki,{prefixCls:o,rootClassName:n,classNames:a,styles:s,mode:ue,openKeys:he,rtl:$e,disabled:f,motion:le?A:null,defaultMotions:le?z:null,activeKey:xt,onActive:oe,onInactive:me,selectedKeys:ye,inlineIndent:F,subMenuOpenDelay:b,subMenuCloseDelay:x,forceSubMenuRender:y,builtinPlacements:_,triggerSubMenuAction:D,getPopupContainer:W,itemIcon:V,expandIcon:L,onItemClick:Qe,onOpenChange:Ot,popupRender:P},bt.createElement(tf.Provider,{value:Fe},In),bt.createElement("div",{style:{display:"none"},"aria-hidden":!0},bt.createElement(fx.Provider,{value:Rt},ee)))))}),KI=l6;var Sd=KI;Sd.Item=si;Sd.SubMenu=ws;Sd.ItemGroup=Dl;Sd.Divider=wa;var pf=Sd;var Cd=M(require("react")),ff=require("react");var gf=Cd.createContext({});var nr=M(require("react")),gN=require("react");var hf=M(require("react"));var c6={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"},qI=c6;function Px(){return Px=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Px.apply(this,arguments)}var d6=(e,t)=>hf.createElement(kt,Px({},e,{ref:t,icon:qI})),u6=hf.forwardRef(d6),Fl=u6;var GI=require("react"),m6=(0,GI.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),Ea=m6;var yf=M(require("react"));var p6=e=>{let{prefixCls:t,className:o,dashed:n,...r}=e,{getPrefixCls:i}=yf.useContext(Oe),s=i("menu",t),a=$({[`${s}-item-divider-dashed`]:!!n},o);return yf.createElement(wa,{className:a,...r})},bf=p6;var Fn=M(require("react"));var Oo=M(require("react"));var XI=M(require("react")),f6=e=>{let{children:t,prefixCls:o,id:n,classNames:r,styles:i,className:s,style:a}=e;return XI.createElement("div",{id:n,className:$(`${o}-container`,r?.container,s),style:{...i?.container,...a},role:"tooltip"},typeof t=="function"?t():t)},wd=f6;var Vr=M(require("react")),xf=require("react");var zl={shiftX:64,adjustY:1},Bl={adjustX:1,shiftY:!0},Sr=[0,0],YI={left:{points:["cr","cl"],overflow:Bl,offset:[-4,0],targetOffset:Sr},right:{points:["cl","cr"],overflow:Bl,offset:[4,0],targetOffset:Sr},top:{points:["bc","tc"],overflow:zl,offset:[0,-4],targetOffset:Sr},bottom:{points:["tc","bc"],overflow:zl,offset:[0,4],targetOffset:Sr},topLeft:{points:["bl","tl"],overflow:zl,offset:[0,-4],targetOffset:Sr},leftTop:{points:["tr","tl"],overflow:Bl,offset:[-4,0],targetOffset:Sr},topRight:{points:["br","tr"],overflow:zl,offset:[0,-4],targetOffset:Sr},rightTop:{points:["tl","tr"],overflow:Bl,offset:[4,0],targetOffset:Sr},bottomRight:{points:["tr","br"],overflow:zl,offset:[0,4],targetOffset:Sr},rightBottom:{points:["bl","br"],overflow:Bl,offset:[4,0],targetOffset:Sr},bottomLeft:{points:["tl","bl"],overflow:zl,offset:[0,4],targetOffset:Sr},leftBottom:{points:["br","bl"],overflow:Bl,offset:[-4,0],targetOffset:Sr}};function Tx(){return Tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Tx.apply(this,arguments)}var g6=Vr.forwardRef((e,t)=>{let{trigger:o=["hover","focus"],mouseEnterDelay:n=0,mouseLeaveDelay:r=.1,prefixCls:i="rc-tooltip",children:s,onVisibleChange:a,afterVisibleChange:c,motion:l,placement:d="right",align:u={},destroyOnHidden:m=!1,defaultVisible:p,getTooltipContainer:g,arrowContent:f,overlay:h,id:b,showArrow:x=!0,classNames:y,styles:S,...v}=e,C=Co(b),w=(0,xf.useRef)(null);(0,xf.useImperativeHandle)(t,()=>w.current);let R={...v};"visible"in e&&(R.popupVisible=e.visible);let T=Vr.useMemo(()=>{if(!x)return!1;let I=x===!0?{}:x;return{...I,className:$(I.className,y?.arrow),style:{...I.style,...S?.arrow},content:I.content??f}},[x,y?.arrow,S?.arrow,f]),N=({open:I})=>{let E=Vr.Children.only(s),A={"aria-describedby":[E.props["aria-describedby"],h&&I?C:void 0].filter(Boolean).join(" ")||void 0};return Vr.cloneElement(E,A)};return Vr.createElement(ns,Tx({popupClassName:y?.root,prefixCls:i,popup:Vr.createElement(wd,{key:"content",prefixCls:i,id:C,classNames:y,styles:S},h),action:o,builtinPlacements:YI,popupPlacement:d,ref:w,popupAlign:u,getPopupContainer:g,onOpenChange:a,afterOpenChange:c,popupMotion:l,defaultPopupVisible:p,autoDestroy:m,mouseLeaveDelay:r,popupStyle:S?.root,mouseEnterDelay:n,arrow:T,uniqueContainerClassName:y?.uniqueContainer,uniqueContainerStyle:S?.uniqueContainer},R),N)}),ZI=g6;var QI=ZI;var Mx=M(require("react"));var h6=e=>{let{space:t,form:o,children:n}=e;if(!lo(n))return null;let r=n;return o&&(r=Mx.default.createElement(mI,{override:!0,status:!0},r)),t&&(r=Mx.default.createElement(L1,null,r)),r},Wr=h6;var JI=M(require("react")),y6=JI.default.createContext(!1),eN=y6;var tN=M(require("react")),b6=(e,t)=>{let o=n=>typeof n=="boolean"?{show:n}:n||{};return tN.default.useMemo(()=>{let n=o(e),r=o(t);return{...r,...n,show:n.show??r.show??!0}},[e,t])},oN=b6;var Rs=M(require("react"));var nN="50%",x6=e=>{let{calc:t,componentCls:o,tooltipMaxWidth:n,tooltipColor:r,tooltipBg:i,tooltipBorderRadius:s,zIndexPopup:a,controlHeight:c,dropShadowPopover:l,paddingSM:d,paddingXS:u,arrowOffsetHorizontal:m,sizePopupArrow:p,antCls:g}=e,[f,h]=Gt(g,"tooltip"),b=t(s).add(p).add(m).equal(),y={minWidth:t(s).mul(2).add(p).equal(),minHeight:c,padding:`${Y(e.calc(d).div(2).equal())} ${Y(u)}`,color:h("overlay-color",r),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:s,boxSizing:"border-box"},S={[f("valid-offset-x")]:h("arrow-offset-x","var(--arrow-x)"),transformOrigin:[h("valid-offset-x",nN),`var(--arrow-y, ${nN})`].join(" ")};return[{[o]:{...Et(e),position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:n,visibility:"visible",filter:l,...S,"&-hidden":{display:"none"},[f("arrow-background-color")]:i,[`${o}-container`]:[y,td(e,!0)],[`&:has(~ ${o}-unique-container)`]:{[`${o}-container`]:{border:"none",background:"transparent"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:b},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${o}-inner`]:{borderRadius:e.min(s,cx)}},[`${o}-content`]:{position:"relative"},...rp(e,(v,{darkColor:C})=>({[`&${o}-${v}`]:{[`${o}-container`]:{backgroundColor:C},[`${o}-arrow`]:{[f("arrow-background-color")]:C}}})),"&-rtl":{direction:"rtl"}}},Xp(e,h("arrow-background-color"),{arrowShadow:!1}),{[`${o}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${o}-unique-container`]:{...y,...S,position:"absolute",zIndex:t(a).sub(1).equal(),filter:l,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},v6=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...Tl({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...Gp(ze(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),vf=(e,t,o=!0)=>Ye("Tooltip",r=>{let{borderRadius:i,colorTextLightSolid:s,colorBgSpotlight:a,maxWidth:c}=r,l=ze(r,{tooltipMaxWidth:c,tooltipColor:s,tooltipBorderRadius:i,tooltipBg:a});return[x6(l),Pi(r,"zoom-big-fast")]},v6,{resetStyle:!1,injectStyle:o})(e,t);var S6=jo.map(e=>`${e}-inverse`);function rN(e,t=!0){return t?[].concat(Zt(S6),Zt(jo)).includes(e):jo.includes(e)}var Sf=(e,t,o)=>{let n=rN(o),[r]=Gt(e,"tooltip"),i=$({[`${t}-${o}`]:o&&n}),s={},a={},c=v$(o).toRgb(),d=(.299*c.r+.587*c.g+.114*c.b)/255<.5?"#FFF":"#000";return o&&!n&&(s.background=o,s[r("overlay-color")]=d,a[r("arrow-background-color")]=o),{className:i,overlayStyle:s,arrowStyle:a}};var C6=e=>{let{prefixCls:t,className:o,placement:n="top",title:r,color:i,overlayInnerStyle:s,classNames:a,styles:c}=e,{getPrefixCls:l}=Rs.useContext(Oe),d=l("tooltip",t),u=l(),m=oo(d),[p,g]=vf(d,m),f=Sf(u,d,i),h=f.arrowStyle,b=Rs.useMemo(()=>({container:{...s,...f.overlayStyle}}),[s,f.overlayStyle]),x={...e,placement:n},[y,S]=Je([a],[b,c],{props:x}),v=$(m,p,g,d,`${d}-pure`,`${d}-placement-${n}`,o,f.className);return Rs.createElement("div",{className:v,style:h},Rs.createElement("div",{className:`${d}-arrow`}),Rs.createElement(wd,{...e,className:p,prefixCls:d,classNames:y,styles:S},r))},iN=C6;var w6=Oo.forwardRef((e,t)=>{let{prefixCls:o,openClassName:n,getTooltipContainer:r,color:i,children:s,afterOpenChange:a,arrow:c,destroyTooltipOnHide:l,destroyOnHidden:d,title:u,overlay:m,trigger:p,builtinPlacements:g,autoAdjustOverflow:f=!0,motion:h,getPopupContainer:b,placement:x="top",mouseEnterDelay:y,mouseLeaveDelay:S,rootClassName:v,styles:C,classNames:w,onOpenChange:R,overlayInnerStyle:T,overlayStyle:N,overlayClassName:I,...E}=e,[,k]=qt(),F=e["data-popover-inject"],{getPopupContainer:A,getPrefixCls:z,direction:D,..._}=Xe("tooltip"),{className:V,style:L,classNames:G,styles:H,arrow:W,trigger:Z,mouseEnterDelay:B,mouseLeaveDelay:K}=F?{}:_,j=y??B??.1,Q=S??K??.1,X=oN(c,W),U=X.show,J=p||Z||"hover",P=b||r||A,O=d??!!l,q=Oo.useContext(eN),ee=Xa("Tooltip"),le=Oo.useRef(null),re=()=>{le.current?.forceAlign()};Oo.useImperativeHandle(t,()=>({forceAlign:re,nativeElement:le.current?.nativeElement,popupElement:le.current?.popupElement}));let[ie,Ce]=it(e.defaultOpen??!1,e.open),de=!u&&!m&&u!==0,$e=Fe=>{Ce(de?!1:Fe),!de&&R&&R(Fe)},ae=Oo.useMemo(()=>g||dd({arrowPointAtCenter:X?.pointAtCenter??!1,autoAdjustOverflow:f,arrowWidth:U?k.sizePopupArrow:0,borderRadius:k.borderRadius,offset:k.marginXXS,visibleFirst:!0}),[X,g,k,U,f]),Pe=Oo.useMemo(()=>u===0?u:m||u||"",[m,u]),he=Oo.createElement(Wr,{space:!0,form:!0},ct(Pe)?Pe():Pe),ne={...e,trigger:J,builtinPlacements:ae,getPopupContainer:P,destroyOnHidden:O,mouseEnterDelay:j,mouseLeaveDelay:Q},fe=_e(L),ce=_e(N),[Re,De]=Je([G,w],[H,fe,C,ce],{props:ne}),we=z("tooltip",o),pe=z(),ue=ie;(!("open"in e)&&de||q)&&(ue=!1);let se=Oo.isValidElement(s)&&!Vm(s)?s:Oo.createElement("span",null,s),Se=se.props,Ie=!Se.className||typeof Se.className=="string"?$(Se.className,n||`${we}-open`):Se.className,Te=oo(we),[qe,Ge]=vf(we,Te,!F),mt=Sf(pe,we,i),Ze=mt.arrowStyle,$t=$(Te,qe,Ge),wt=$(I,{[`${we}-rtl`]:D==="rtl"},mt.className,v,$t,V,Re.root),[gt,ht]=ti("Tooltip",E.zIndex),yt={...De.container,...T,...mt.overlayStyle},Rt=Oo.createElement(QI,{unique:!0,...E,zIndex:gt,showArrow:U,placement:x,mouseEnterDelay:j,mouseLeaveDelay:Q,prefixCls:we,classNames:{root:wt,container:Re.container,arrow:Re.arrow,uniqueContainer:$($t,Re.container)},styles:{root:{...Ze,...De.root},container:yt,uniqueContainer:yt,arrow:De.arrow},ref:le,overlay:he,visible:ue,onVisibleChange:$e,afterVisibleChange:a,arrowContent:Oo.createElement("span",{className:`${we}-arrow-content`}),motion:{motionName:yr(pe,"zoom-big-fast",typeof h?.motionName=="string"?h?.motionName:void 0),motionDeadline:1e3},trigger:J,builtinPlacements:ae,getTooltipContainer:P,destroyOnHidden:O},ue&&!E.disabled?Ro(se,{className:Ie}):se);return Oo.createElement(ls.Provider,{value:ht},Rt)}),kx=w6;kx._InternalPanelDoNotUseOrYouWillBeFired=iN;kx.UniqueProvider=Km;var Hl=kx;var R6=e=>{let{className:t,children:o,icon:n,title:r,danger:i,extra:s}=e,{prefixCls:a,firstLevel:c,direction:l,disableMenuItemTitleTooltip:d,tooltip:u,inlineCollapsed:m,styles:p,classNames:g}=Fn.useContext(Ea),{siderCollapsed:f}=Fn.useContext(gf),h=!!(f||m),[b,x]=Fn.useState(!1);Fn.useEffect(()=>{x(!1)},[h]);let y=N=>{let I=o?.[0],E=Fn.createElement("span",{className:$(`${a}-title-content`,c?g?.itemContent:g?.subMenu?.itemContent,{[`${a}-title-content-with-extra`]:!!s||s===0}),style:c?p?.itemContent:p?.subMenu?.itemContent},o);return(!n||Fn.isValidElement(o)&&o.type==="span")&&o&&N&&c&&typeof I=="string"?Fn.createElement("div",{className:`${a}-inline-collapsed-noicon`},I.charAt(0)):E},S=r;typeof r>"u"?S=c?o:"":r===!1&&(S="");let v=u===!1?void 0:u,C=v&&v.title!==void 0?v.title:S,w={...v??null,title:C};h?(w.open=v?.open??b,w.onOpenChange=N=>{x(N),v?.onOpenChange?.(N)}):(w.title=null,w.open=!1);let R=co(o).length,T=Fn.createElement(si,{...Ke(e,["title","icon","danger"]),className:$(c?g?.item:g?.subMenu?.item,{[`${a}-item-danger`]:i,[`${a}-item-only-child`]:(n?R+1:R)===1},t),style:{...c?p?.item:p?.subMenu?.item,...e.style},title:typeof r=="string"?r:void 0,itemData:e?.itemData??{...e,key:e.eventKey}},Ro(n,N=>({className:$(`${a}-item-icon`,c?g?.itemIcon:g?.subMenu?.itemIcon,N.className),style:{...c?p?.itemIcon:p?.subMenu?.itemIcon,...N.style}})),y(m));if(!d&&u!==!1){let N=v&&v.placement?v.placement:l==="rtl"?"left":"right",I=`${a}-inline-collapsed-tooltip`,E=F=>({...F,root:$(I,F?.root)}),k=ct(v?.classNames)?F=>{let A=v.classNames(F);return E(A)}:E(v?.classNames);T=Fn.createElement(Hl,{...w,placement:N,classNames:k},T)}return T},Cf=R6;var or=M(require("react"));var Ox=or.createContext(null),sN=or.forwardRef((e,t)=>{let{children:o,...n}=e,r=or.useContext(Ox),i=or.useMemo(()=>({...r,...n}),[r,n.prefixCls,n.mode,n.selectable,n.rootClassName]),s=Rc(o),a=bo(t,s?To(o):null);return or.createElement(Ox.Provider,{value:i},or.createElement(Wr,{space:!0},s?or.cloneElement(o,{ref:a}):o))}),Ax=Ox;var E6=e=>{let{componentCls:t,motionDurationSlow:o,horizontalLineHeight:n,colorSplit:r,lineWidth:i,lineType:s,itemPaddingInline:a}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${Y(i)} ${s} ${r}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:a},[`> ${t}-item:hover,
149
- > ${t}-item-active,
150
- > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(c=>`${c} ${o}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},aN=E6;var $6=({componentCls:e,menuArrowOffset:t,calc:o})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
151
- ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${Y(o(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${Y(t)})`}}}}),lN=$6;var cN=e=>An(e),I6=(e,t)=>{let{componentCls:o,itemColor:n,itemSelectedColor:r,subMenuItemSelectedColor:i,groupTitleColor:s,itemBg:a,subMenuItemBg:c,itemSelectedBg:l,activeBarHeight:d,activeBarWidth:u,activeBarBorderWidth:m,motionDurationSlow:p,motionEaseInOut:g,motionEaseOut:f,itemPaddingInline:h,motionDurationMid:b,itemHoverColor:x,lineType:y,colorSplit:S,itemDisabledColor:v,dangerItemColor:C,dangerItemHoverColor:w,dangerItemSelectedColor:R,dangerItemActiveBg:T,dangerItemSelectedBg:N,popupBg:I,itemHoverBg:E,itemActiveBg:k,menuSubMenuBg:F,horizontalItemSelectedColor:A,horizontalItemSelectedBg:z,horizontalItemBorderRadius:D,horizontalItemHoverBg:_}=e;return{[`${o}-${t}, ${o}-${t} > ${o}`]:{color:n,background:a,[`&${o}-root:focus-visible`]:{...cN(e)},[`${o}-item`]:{"&-group-title, &-extra":{color:s}},[`${o}-submenu-selected > ${o}-submenu-title`]:{color:i},[`${o}-item, ${o}-submenu-title`]:{color:n,[`&:not(${o}-item-disabled):focus-visible`]:{...cN(e)}},[`${o}-item-disabled, ${o}-submenu-disabled`]:{color:`${v} !important`},[`${o}-item:not(${o}-item-selected):not(${o}-submenu-selected)`]:{[`&:hover, > ${o}-submenu-title:hover`]:{color:x}},[`${o}-submenu:not(${o}-submenu-selected)`]:{[`> ${o}-submenu-title:hover`]:{color:x}},[`&:not(${o}-horizontal)`]:{[`${o}-item:not(${o}-item-selected)`]:{"&:hover":{backgroundColor:E},"&:active":{backgroundColor:k}},[`${o}-submenu-title`]:{"&:hover":{backgroundColor:E},"&:active":{backgroundColor:k}}},[`${o}-item-danger`]:{color:C,[`&${o}-item:hover`]:{[`&:not(${o}-item-selected):not(${o}-submenu-selected)`]:{color:w}},[`&${o}-item:active`]:{background:T}},[`${o}-item a`]:{"&, &:hover":{color:"inherit"}},[`${o}-item-selected`]:{color:r,[`&${o}-item-danger`]:{color:R},"a, a:hover":{color:"inherit"}},[`& ${o}-item-selected`]:{backgroundColor:l,[`&${o}-item-danger`]:{backgroundColor:N}},[`&${o}-submenu > ${o}`]:{backgroundColor:F},[`&${o}-popup > ${o}`]:{backgroundColor:I},[`&${o}-submenu-popup > ${o}`]:{backgroundColor:I},[`&${o}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${o}-item, > ${o}-submenu`]:{top:m,marginTop:e.calc(m).mul(-1).equal(),marginBottom:0,borderRadius:D,"&::after":{position:"absolute",insetInline:h,bottom:0,pointerEvents:"none",borderBottom:`${Y(d)} solid transparent`,transition:`border-color ${p} ${g}`,content:'""'},"&:hover, &-active, &-open":{background:_,"&::after":{borderBottomWidth:d,borderBottomColor:A}},"&-selected":{color:A,backgroundColor:z,"&:hover":{backgroundColor:z},"&::after":{borderBottomWidth:d,borderBottomColor:A}}}},[`&${o}-root`]:{[`&${o}-inline, &${o}-vertical`]:{borderInlineEnd:`${Y(m)} ${y} ${S}`}},[`&${o}-inline`]:{[`${o}-sub${o}-inline`]:{background:c},[`${o}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Y(u)} solid ${r}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(V=>`${V} ${b} ${f}`).join(","),content:'""'},[`&${o}-item-danger`]:{"&::after":{borderInlineEndColor:R}}},[`${o}-selected, ${o}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(V=>`${V} ${b} ${g}`).join(",")}}}}}},Lx=I6;var dN=e=>{let{componentCls:t,itemHeight:o,itemMarginInline:n,padding:r,menuArrowSize:i,marginXS:s,itemMarginBlock:a,itemWidth:c,itemPaddingInline:l}=e,d=e.calc(i).add(r).add(s).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:o,lineHeight:Y(o),paddingInline:l,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:a,width:c},[`> ${t}-item,
152
- > ${t}-submenu > ${t}-submenu-title`]:{height:o,lineHeight:Y(o)},[`${t}-item-group-list ${t}-submenu-title,
153
- ${t}-submenu-title`]:{paddingInlineEnd:d}}},N6=e=>{let{componentCls:t,iconCls:o,itemHeight:n,colorTextLightSolid:r,dropdownWidth:i,controlHeightLG:s,padding:a,paddingXL:c,itemMarginInline:l,fontSizeLG:d,motionDurationSlow:u,paddingXS:m,boxShadowSecondary:p,collapsedWidth:g,collapsedIconSize:f}=e,h={height:n,lineHeight:Y(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...dN(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...dN(e),boxShadow:p}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${Y(e.calc(s).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 ${u}`,`background-color ${u}`].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`]:h,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:h}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{transition:["border-color","background-color"].map(b=>`${b} ${u}`).join(","),[`> ${t}-inline-collapsed-noicon`]:{fontSize:d,textAlign:"center",width:"100%"}}},[`> ${t}-item,
154
- > ${t}-item-group > ${t}-item-group-list > ${t}-item,
155
- > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
156
- > ${t}-submenu > ${t}-submenu-title`]:{display:"flex",alignItems:"center",justifyContent:"flex-start",insetInlineStart:0,paddingInline:`calc(50% - ${Y(e.calc(f).div(2).equal())} - ${Y(l)})`,textOverflow:"clip",[`
157
- ${t}-submenu-arrow,
158
- ${t}-submenu-expand-icon
159
- `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:"hidden"},[`${t}-item-icon, ${o}`]:{margin:0,fontSize:f,lineHeight:Y(n),"+ span":{display:"inline-block",width:0,opacity:0,overflow:"hidden",marginInlineStart:0}}},[`${t}-item-icon, ${o}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${o}`]:{display:"none"},[`${t}-item-extra`]:{paddingInlineStart:a},"a, a:hover":{color:r}},[`${t}-item-group-title`]:{...Xo,paddingInline:m}}}]},uN=N6;var mN=e=>{let{componentCls:t,motionDurationSlow:o,motionDurationMid:n,motionEaseInOut:r,motionEaseOut:i,iconCls:s,iconSize:a,iconMarginInlineEnd:c}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${o}`,`background-color ${o}`,`padding calc(${o} + 0.1s) ${r}`].join(","),[`${t}-item-icon, ${s}`]:{minWidth:a,fontSize:a,transition:[`font-size ${n} ${i}`,`margin ${o} ${r}`,`color ${o}`].join(","),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${o} ${r}`,`margin ${o}`,`color ${o}`].join(",")}},[`${t}-item-icon`]:{...ca()},[`&${t}-item-only-child`]:{[`> ${s}, > ${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"}}}},pN=e=>{let{componentCls:t,motionDurationSlow:o,motionEaseInOut:n,borderRadius:r,menuArrowSize:i,menuArrowOffset:s}=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(a=>`${a} ${o}`).join(",")},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:r,transition:["background-color","transform","top","color"].map(a=>`${a} ${o} ${n}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${Y(e.calc(s).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${Y(s)})`}}}}},P6=e=>{let{antCls:t,componentCls:o,fontSize:n,motionDurationSlow:r,motionDurationMid:i,motionEaseInOut:s,paddingXS:a,padding:c,colorSplit:l,lineWidth:d,zIndexPopup:u,borderRadiusLG:m,subMenuItemBorderRadius:p,menuArrowSize:g,menuArrowOffset:f,lineType:h,groupTitleLineHeight:b,groupTitleFontSize:x,iconSize:y,iconMarginInlineEnd:S}=e,v=[`> ${t}-typography-ellipsis-single-line`,`> ${o}-item-label > ${t}-typography-ellipsis-single-line`].join(",");return[{"":{[o]:{...da(),"&-hidden":{display:"none"}}},[`${o}-submenu-hidden`]:{display:"none"}},{[o]:{...Et(e),...da(),marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${r} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${o}-item`]:{flex:"none"}},[`${o}-item, ${o}-submenu, ${o}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${o}-item-group-title`]:{padding:`${Y(a)} ${Y(c)}`,fontSize:x,lineHeight:b,transition:`all ${r}`},[`&-horizontal ${o}-submenu`]:{transition:["border-color","background-color"].map(C=>`${C} ${r} ${s}`).join(",")},[`${o}-submenu, ${o}-submenu-inline`]:{transition:[`border-color ${r}`,`background-color ${r}`,`padding ${i}`].map(C=>`${C} ${s}`).join(",")},[`${o}-submenu ${o}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(C=>`${C} ${r} ${s}`).join(",")},[`${o}-title-content`]:{transition:`color ${r}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%",minWidth:0},[`${o}-item-label`]:{flex:"auto",minWidth:0,...Xo},[v]:{display:"inline",verticalAlign:"unset"},[`${o}-item-extra`]:{flex:"none",marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${o}-item-icon + ${o}-title-content-with-extra`]:{width:`calc(100% - ${Y(e.calc(y).add(S??0).equal())})`},[`${o}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${o}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:l,borderStyle:h,borderWidth:0,borderTopWidth:d,marginBlock:d,padding:0,"&-dashed":{borderStyle:"dashed"}},...mN(e),[`${o}-item-group`]:{[`${o}-item-group-list`]:{margin:0,padding:0,[`${o}-item, ${o}-submenu-title`]:{paddingInline:`${Y(e.calc(n).mul(2).equal())} ${Y(c)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:u,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",[`&${o}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${o}`]:{borderRadius:m,...mN(e),...pN(e),[`${o}-item, ${o}-submenu > ${o}-submenu-title`]:{borderRadius:p},[`${o}-submenu-title::after`]:{transition:`transform ${r} ${s}`}}},"&-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}},...pN(e),[`&-inline-collapsed ${o}-submenu-arrow,
160
- &-inline ${o}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Y(f)})`},"&::after":{transform:`rotate(45deg) translateX(${Y(e.calc(f).mul(-1).equal())})`}},[`${o}-submenu-open${o}-submenu-inline > ${o}-submenu-title > ${o}-submenu-arrow`]:{transform:`translateY(${Y(e.calc(g).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${Y(e.calc(f).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${Y(f)})`}}}},{[`${t}-layout-header`]:{[o]:{lineHeight:"inherit"}}}]},T6=e=>{let{colorPrimary:t,colorError:o,colorTextDisabled:n,colorErrorBg:r,colorText:i,colorTextDescription:s,colorBgContainer:a,colorFillAlter:c,colorFillContent:l,lineWidth:d,lineWidthBold:u,controlItemBgActive:m,colorBgTextHover:p,controlHeightLG:g,lineHeight:f,colorBgElevated:h,marginXXS:b,padding:x,fontSize:y,controlHeightSM:S,fontSizeLG:v,colorTextLightSolid:C,colorErrorHover:w}=e,R=e.activeBarWidth??0,T=e.activeBarBorderWidth??d,N=e.itemMarginInline??e.marginXXS,I=new pt(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:s,groupTitleColor:s,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:a,itemBg:a,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:l,itemActiveBg:m,colorSubItemBg:c,subMenuItemBg:c,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:R,colorActiveBarHeight:u,activeBarHeight:u,colorActiveBarBorderSize:d,activeBarBorderWidth:T,colorItemTextDisabled:n,itemDisabledColor:n,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:r,dangerItemActiveBg:r,colorDangerItemBgSelected:r,dangerItemSelectedBg:r,itemMarginInline:N,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:g,groupTitleLineHeight:f,collapsedWidth:g*2,popupBg:h,itemMarginBlock:b,itemPaddingInline:x,horizontalLineHeight:`${g*1.15}px`,iconSize:y,iconMarginInlineEnd:S-y,collapsedIconSize:v,groupTitleFontSize:y,darkItemDisabledColor:new pt(C).setA(.25).toRgbString(),darkItemColor:I,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:C,darkItemSelectedBg:t,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:I,darkItemHoverColor:C,darkDangerItemHoverColor:w,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:o,itemWidth:R?`calc(100% + ${T}px)`:`calc(100% - ${N*2}px)`}},fN=(e,t=e,o=!0)=>Ye("Menu",r=>{let{colorBgElevated:i,controlHeightLG:s,fontSize:a,darkItemColor:c,darkDangerItemColor:l,darkItemBg:d,darkSubMenuItemBg:u,darkItemSelectedColor:m,darkItemSelectedBg:p,darkDangerItemSelectedBg:g,darkItemHoverBg:f,darkGroupTitleColor:h,darkItemHoverColor:b,darkItemDisabledColor:x,darkDangerItemHoverColor:y,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:v,popupBg:C,darkPopupBg:w}=r,R=r.calc(a).div(7).mul(5).equal(),T=ze(r,{menuArrowSize:R,menuHorizontalHeight:r.calc(s).mul(1.15).equal(),menuArrowOffset:r.calc(R).mul(.25).equal(),menuSubMenuBg:i,calc:r.calc,popupBg:C}),N=ze(T,{itemColor:c,itemHoverColor:b,groupTitleColor:h,itemSelectedColor:m,subMenuItemSelectedColor:m,itemBg:d,popupBg:w,subMenuItemBg:u,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:f,itemDisabledColor:x,dangerItemColor:l,dangerItemHoverColor:y,dangerItemSelectedColor:S,dangerItemActiveBg:v,dangerItemSelectedBg:g,menuSubMenuBg:u,horizontalItemSelectedColor:m,horizontalItemSelectedBg:p});return[P6(T),aN(T),uN(T),Lx(T,"light"),Lx(N,"dark"),lN(T),Eb(T),xn(T,"slide-up"),xn(T,"slide-down"),Pi(T,"zoom-big")]},T6,{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:o,unitless:{groupTitleLineHeight:!0}})(e,t);var Cn=M(require("react"));var M6=e=>{let{popupClassName:t,icon:o,title:n,theme:r}=e,i=Cn.useContext(Ea),{prefixCls:s,inlineCollapsed:a,theme:c,classNames:l,styles:d}=i,u=Br(),m;if(!o)m=a&&!u.length&&n&&typeof n=="string"?Cn.createElement("div",{className:`${s}-inline-collapsed-noicon`},n.charAt(0)):Cn.createElement("span",{className:`${s}-title-content`},n);else{let f=Cn.isValidElement(n)&&n.type==="span";m=Cn.createElement(Cn.Fragment,null,Ro(o,h=>({className:$(h.className,`${s}-item-icon`,l?.itemIcon),style:{...h.style,...d?.itemIcon}})),f?n:Cn.createElement("span",{className:`${s}-title-content`},n))}let p=Cn.useMemo(()=>({...i,firstLevel:!1}),[i]),[g]=ti("Menu");return Cn.createElement(Ea.Provider,{value:p},Cn.createElement(ws,{...Ke(e,["icon"]),title:m,classNames:{list:l?.subMenu?.list,listTitle:l?.subMenu?.itemTitle},styles:{list:d?.subMenu?.list,listTitle:d?.subMenu?.itemTitle},popupClassName:$(s,t,l?.popup?.root,`${s}-${r||c}`),popupStyle:{zIndex:g,...e.popupStyle,...d?.popup?.root}}))},wf=M6;function Dx(e){return e===null||e===!1}var k6={item:Cf,submenu:wf,divider:bf},O6=(0,gN.forwardRef)((e,t)=>{let o=nr.useContext(Ax),n=o||{},{prefixCls:r,className:i,style:s,theme:a="light",expandIcon:c,_internalDisableMenuItemTitleTooltip:l,tooltip:d,inlineCollapsed:u,siderCollapsed:m,rootClassName:p,mode:g,selectable:f,onClick:h,overflowedIndicatorPopupClassName:b,classNames:x,styles:y,...S}=e,{menu:v}=nr.useContext(Oe),{getPrefixCls:C,getPopupContainer:w,direction:R,className:T,style:N,classNames:I,styles:E}=Xe("menu"),k=C(),F=Ke(S,["collapsedWidth"]);n.validator?.({mode:g});let A=Ne((...P)=>{h?.(...P),n.onClick?.()}),z=n.mode||g,D=f??n.selectable,_=u??m,V={...e,mode:z,inlineCollapsed:_,selectable:D,theme:a},L=_e(N),G=_e(s),[H,W]=Je([I,x],[E,L,y,G],{props:V},{popup:{_default:"root"},subMenu:{_default:"item"}}),Z={horizontal:{motionName:`${k}-slide-up`},inline:x$(k),other:{motionName:`${k}-zoom-big`}},B=C("menu",r||n.prefixCls),K=oo(B),[j,Q]=fN(B,K,!o),X=$(`${B}-${a}`,T,i),U=nr.useMemo(()=>{if(ct(c)||Dx(c))return c||null;if(ct(n.expandIcon)||Dx(n.expandIcon))return n.expandIcon||null;if(ct(v?.expandIcon)||Dx(v?.expandIcon))return v?.expandIcon||null;let P=c??n?.expandIcon??v?.expandIcon;return Ro(P,{className:$(`${B}-submenu-expand-icon`,nr.isValidElement(P)?P.props?.className:void 0)})},[c,n?.expandIcon,v?.expandIcon,B]),J=nr.useMemo(()=>({prefixCls:B,inlineCollapsed:_||!1,direction:R,firstLevel:!0,theme:a,mode:z,disableMenuItemTitleTooltip:l,tooltip:d,classNames:H,styles:W}),[B,_,R,l,a,z,H,W,d]);return nr.createElement(Ax.Provider,{value:null},nr.createElement(Ea.Provider,{value:J},nr.createElement(pf,{getPopupContainer:w,overflowedIndicator:nr.createElement(Fl,null),overflowedIndicatorPopupClassName:$(B,`${B}-${a}`,b),classNames:{list:H.list,listTitle:H.itemTitle},styles:{list:W.list,listTitle:W.itemTitle},mode:z,selectable:D,onClick:A,...F,inlineCollapsed:_,style:W.root,className:X,prefixCls:B,direction:R,defaultMotions:Z,expandIcon:U,ref:t,rootClassName:$(p,j,n.rootClassName,Q,K,H.root),_internalComponents:k6})))}),hN=O6;var Rd=(0,Vl.forwardRef)((e,t)=>{let o=(0,Vl.useRef)(null),n=Rf.useContext(gf);return(0,Vl.useImperativeHandle)(t,()=>({menu:o.current,focus:r=>{o.current?.focus(r)}})),Rf.createElement(hN,{ref:o,...e,...n})});Rd.Item=Cf;Rd.SubMenu=wf;Rd.Divider=bf;Rd.ItemGroup=Dl;var yN=Rd;var A6=e=>{let{componentCls:t,menuCls:o,colorError:n,colorTextLightSolid:r}=e,i=`${o}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${o} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:n,"&:hover":{color:r,backgroundColor:n}}}}}},bN=A6;var L6=e=>{let{componentCls:t,menuCls:o,zIndexPopup:n,dropdownArrowDistance:r,sizePopupArrow:i,antCls:s,iconCls:a,motionDurationMid:c,paddingBlock:l,fontSize:d,dropdownEdgeChildPadding:u,colorTextDisabled:m,fontSizeIcon:p,controlPaddingHorizontal:g,colorBgElevated:f,controlHeightLG:h}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(r).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:`calc(100vh - ${Y(e.calc(h).mul(2.5).equal())})`,overflowY:"auto"},[`&-trigger${s}-btn`]:{[`& > ${a}-down, & > ${s}-btn-icon > ${a}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:"relative",[`${s}-btn > ${a}-down`]:{fontSize:p},[`${a}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${a}-down::before`]:{transform:"rotate(180deg)"}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:"none"},[`&${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottomLeft,
161
- &${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottomLeft,
162
- &${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottom,
163
- &${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottom,
164
- &${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottomRight,
165
- &${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:us},[`&${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-topLeft,
166
- &${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-topLeft,
167
- &${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-top,
168
- &${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-top,
169
- &${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-topRight,
170
- &${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-topRight`]:{animationName:ps},[`&${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottomLeft,
171
- &${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottom,
172
- &${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:ms},[`&${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-topLeft,
173
- &${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-top,
174
- &${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-topRight`]:{animationName:fs},[`&${s}-slide-right-enter${s}-slide-right-enter-active${t}-placement-right,
175
- &${s}-slide-right-appear${s}-slide-right-appear-active${t}-placement-right,
176
- &${s}-slide-right-enter${s}-slide-right-enter-active${t}-placement-rightTop,
177
- &${s}-slide-right-appear${s}-slide-right-appear-active${t}-placement-rightTop,
178
- &${s}-slide-right-enter${s}-slide-right-enter-active${t}-placement-rightBottom,
179
- &${s}-slide-right-appear${s}-slide-right-appear-active${t}-placement-rightBottom`]:{animationName:wp},[`&${s}-slide-left-enter${s}-slide-left-enter-active${t}-placement-left,
180
- &${s}-slide-left-appear${s}-slide-left-appear-active${t}-placement-left,
181
- &${s}-slide-left-enter${s}-slide-left-enter-active${t}-placement-leftTop,
182
- &${s}-slide-left-appear${s}-slide-left-appear-active${t}-placement-leftTop,
183
- &${s}-slide-left-enter${s}-slide-left-enter-active${t}-placement-leftBottom,
184
- &${s}-slide-left-appear${s}-slide-left-appear-active${t}-placement-leftBottom`]:{animationName:Ep},[`&${s}-slide-right-leave${s}-slide-right-leave-active${t}-placement-right,
185
- &${s}-slide-right-leave${s}-slide-right-leave-active${t}-placement-rightTop,
186
- &${s}-slide-right-leave${s}-slide-right-leave-active${t}-placement-rightBottom`]:{animationName:Rp},[`&${s}-slide-left-leave${s}-slide-left-leave-active${t}-placement-left,
187
- &${s}-slide-left-leave${s}-slide-left-leave-active${t}-placement-leftTop,
188
- &${s}-slide-left-leave${s}-slide-left-leave-active${t}-placement-leftBottom`]:{animationName:$p}}},Xp(e,f),{[`${t} ${o}`]:{position:"relative",margin:0},[`${o}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...Et(e),[o]:{padding:u,listStyleType:"none",backgroundColor:f,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...ln(e),"&:empty":{padding:0,boxShadow:"none"},[`${o}-item-group-title`]:{padding:`${Y(l)} ${Y(g)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${o}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${o}-item-icon`]:{minWidth:d,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${o}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> a, > ${o}-item-label > a`]:{color:"inherit",transition:`all ${c}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${o}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${o}-item, ${o}-submenu-title`]:{display:"flex",margin:0,padding:`${Y(l)} ${Y(g)}`,color:e.colorText,fontWeight:"normal",fontSize:d,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...ln(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:f,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Y(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:p,fontStyle:"normal"}}},[`${o}-item-group-list`]:{margin:`0 ${Y(e.marginXS)}`,padding:0,listStyle:"none"},[`${o}-submenu-title`]:{paddingInlineEnd:e.calc(g).add(e.fontSizeSM).equal()},[`${o}-submenu-vertical`]:{position:"relative"},[`${o}-submenu${o}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:m,backgroundColor:f,cursor:"not-allowed"}},[`${o}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[xn(e,"slide-up"),xn(e,"slide-down"),xn(e,"slide-left"),xn(e,"slide-right"),ga(e,"move-up"),ga(e,"move-down"),Pi(e,"zoom-big")]]},D6=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...Tl({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...Gp(e)}),xN=Ye("Dropdown",e=>{let{marginXXS:t,sizePopupArrow:o,paddingXXS:n,componentCls:r}=e,i=ze(e,{menuCls:`${r}-menu`,dropdownArrowDistance:e.calc(o).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[L6(i),bN(i)]},D6,{resetStyle:!1});var _x=no.forwardRef((e,t)=>{let{menu:o,arrow:n,prefixCls:r,children:i,trigger:s,disabled:a,dropdownRender:c,popupRender:l,getPopupContainer:d,overlayClassName:u,rootClassName:m,overlayStyle:p,open:g,onOpenChange:f,mouseEnterDelay:h=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:x=!0,placement:y="",transitionName:S,classNames:v,styles:C,destroyPopupOnHide:w,destroyOnHidden:R}=e,{getPrefixCls:T,direction:N,getPopupContainer:I,className:E,style:k,classNames:F,styles:A}=Xe("dropdown"),z={...e,mouseEnterDelay:h,mouseLeaveDelay:b,autoAdjustOverflow:x},D=_e(k),_=_e(p),[V,L]=Je([F,v],[A,D,C,_],{props:z}),G={...L.root},H=l||c,W=Xa("Dropdown"),Z=no.useMemo(()=>{let fe=T();return S!==void 0?S:y.startsWith("top")?`${fe}-slide-down`:y.startsWith("left")?`${fe}-slide-right`:y.startsWith("right")?`${fe}-slide-left`:`${fe}-slide-up`},[T,y,S]),B=no.useMemo(()=>y?y.includes("Center")?y.slice(0,y.indexOf("Center")):y:N==="rtl"?"bottomRight":"bottomLeft",[y,N]),K=T("dropdown",r),j=oo(K),[Q,X]=xN(K,j),[,U]=qt(),J=no.Children.only(Pw(i)?no.createElement("span",null,i):i),P=bo(t,To(J)),O=Ro(J,{className:$(`${K}-trigger`,{[`${K}-rtl`]:N==="rtl"},J.props.className),disabled:J.props.disabled??a,ref:P}),q=a?[]:s,ee=!!q?.includes("contextMenu"),[le,re]=it(!1,g),ie=Ne(fe=>{f?.(fe,{source:"trigger"}),re(fe)}),Ce=$(u,m,Q,X,j,E,V.root,{[`${K}-rtl`]:N==="rtl"}),de=dd({arrowPointAtCenter:st(n)&&n.pointAtCenter,autoAdjustOverflow:x,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),$e=Ne(()=>{o?.selectable&&o?.multiple||(f?.(!1,{source:"menu"}),re(!1))}),ae=()=>{let fe=Ke(V,["root"]),ce=Ke(L,["root"]),Re;return o?.items&&(Re=no.createElement(yN,{...o,classNames:{...fe,subMenu:{...fe}},styles:{...ce,subMenu:{...ce}}})),H&&(Re=H(Re)),Tn(Re)?Re=no.createElement("span",null,Re):no.isValidElement(Re)||(Re=no.createElement(no.Fragment,null,Re)),no.createElement(sN,{prefixCls:`${K}-menu`,rootClassName:$(X,j),expandIcon:no.createElement("span",{className:`${K}-menu-submenu-arrow`},N==="rtl"?no.createElement(xI,{className:`${K}-menu-submenu-arrow-icon`}):no.createElement(y$,{className:`${K}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:$e,validator:({mode:De})=>{}},Re)},[Pe,he]=ti("Dropdown",G.zIndex),ne=no.createElement(qp,{alignPoint:ee,...Ke(e,["rootClassName","onOpenChange"]),mouseEnterDelay:h,mouseLeaveDelay:b,visible:le,builtinPlacements:de,arrow:!!n,overlayClassName:Ce,prefixCls:K,getPopupContainer:d||I,transitionName:Z,trigger:q,overlay:ae,placement:B,onVisibleChange:ie,overlayStyle:{...G,zIndex:Pe},autoDestroy:R??w},O);return Pe&&(ne=no.createElement(ls.Provider,{value:he},ne)),ne}),_6=Yp(_x,"align",void 0,"dropdown",e=>e),F6=e=>no.createElement(_6,{...e},no.createElement("span",null));_x._InternalPanelDoNotUseOrYouWillBeFired=F6;var Ef=_x;var Ns=M(require("react"));var Is=M(require("react"));function Fx(e){return["small","middle","medium","large"].includes(e)}function zx(e){return e?Ko(e):!1}var $f=M(require("react"));var Ai=(e,t,o)=>$({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:o}),Es=(e,t)=>t||e;var z6=e=>{let{componentCls:t,borderRadius:o,paddingSM:n,colorBorder:r,paddingXS:i,fontSizeLG:s,fontSizeSM:a,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:d,lineWidth:u,lineType:m,antCls:p}=e,[g,f]=Gt(p,"space-addon");return{[t]:[{...Et(e),display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:n,margin:0,borderWidth:u,borderStyle:m,borderRadius:o,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:s,borderRadius:c},"&-small":{paddingInline:i,borderRadius:l,fontSize:a},"&-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")]:r,[g("addon-background")]:d,[g("addon-border-color-outlined")]:r,[g("addon-background-filled")]:d,borderColor:f("addon-border-color"),background:f("addon-background"),"&-variant-outlined":{[g("addon-border-color")]:f("addon-border-color-outlined")},"&-variant-filled":{[g("addon-border-color")]:"transparent",[g("addon-background")]:f("addon-background-filled"),[`&${t}-disabled`]:{[g("addon-border-color")]:r,[g("addon-background")]:d}},"&-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}}]}},vN=Ye("Addon",e=>[z6(e),gs(e,{focus:!1})]);var B6=$f.default.forwardRef((e,t)=>{let{className:o,children:n,style:r,prefixCls:i,variant:s="outlined",disabled:a,status:c,...l}=e,{getPrefixCls:d,direction:u}=$f.default.useContext(Oe),m=d("space-addon",i),[p,g]=vN(m),{compactItemClassnames:f,compactSize:h}=Ln(m,u),b=Ai(m,c),x=$(m,p,f,g,`${m}-variant-${s}`,b,{[`${m}-${h}`]:h,[`${m}-disabled`]:a},o);return $f.default.createElement("div",{ref:t,className:x,style:r,...l},n)}),SN=B6;var CN=M(require("react")),Bx=CN.default.createContext({latestIndex:0}),wN=Bx.Provider;var $s=M(require("react"));var H6=e=>{let{className:t,prefix:o,index:n,children:r,separator:i,style:s,classNames:a,styles:c}=e,{latestIndex:l}=$s.useContext(Bx);return lo(r)?$s.createElement($s.Fragment,null,$s.createElement("div",{className:t,style:s},r),n<l&&i&&$s.createElement("span",{className:$(`${o}-item-separator`,a?.separator),style:c?.separator},i)):null},RN=H6;var V6=e=>{let{componentCls:t,antCls:o}=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 > ${o}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},W6=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}};var EN=Ye("Space",e=>{let t=ze(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[V6(t),W6(t)]},()=>({}),{resetStyle:!1});var j6=Is.forwardRef((e,t)=>{let{getPrefixCls:o,direction:n,size:r,className:i,style:s,classNames:a,styles:c}=Xe("space"),{size:l=r??"small",align:d,className:u,rootClassName:m,children:p,direction:g,orientation:f,prefixCls:h,split:b,separator:x,style:y,vertical:S,wrap:v=!1,classNames:C,styles:w,...R}=e,[T,N]=Array.isArray(l)?l:[l,l],I=Fx(N),E=Fx(T),k=zx(N),F=zx(T),A=co(p,{keepEmpty:!0}),[z,D]=Cl(f,S,g),_=d===void 0&&!D?"center":d,V=x??b,L=o("space",h),[G,H]=EN(L),W={...e,size:l,orientation:z,align:_},Z=_e(s),B=_e(y),[K,j]=Je([a,C],[c,Z,w,B],{props:W}),Q=$(L,i,G,`${L}-${z}`,{[`${L}-rtl`]:n==="rtl",[`${L}-align-${_}`]:_,[`${L}-gap-row-${N}`]:I,[`${L}-gap-col-${T}`]:E},u,m,H,K.root),X=$(`${L}-item`,K.item),U=A.map((O,q)=>{let ee=O?.key||`${X}-${q}`;return Is.createElement(RN,{prefix:L,classNames:K,styles:j,className:X,key:ee,index:q,separator:V,style:j.item},O)}),J=Is.useMemo(()=>({latestIndex:A.reduce((q,ee,le)=>lo(ee)?le:q,0)}),[A]);if(A.length===0)return null;let P={};return v&&(P.flexWrap="wrap"),!E&&F&&(P.columnGap=T),!I&&k&&(P.rowGap=N),Is.createElement("div",{ref:t,className:Q,style:{...P,...j.root},...R},Is.createElement(wN,{value:J},U))}),Hx=j6;Hx.Compact=hp;Hx.Addon=SN;var If=Hx;var $N=e=>{let{getPopupContainer:t,getPrefixCls:o,direction:n}=Ns.useContext(Oe),{prefixCls:r,type:i="default",danger:s,disabled:a,loading:c,onClick:l,htmlType:d,children:u,className:m,menu:p,arrow:g,autoFocus:f,trigger:h,align:b,open:x,onOpenChange:y,placement:S,getPopupContainer:v,href:C,icon:w=Ns.createElement(Fl,null),title:R,buttonsRender:T=U=>U,mouseEnterDelay:N,mouseLeaveDelay:I,overlayClassName:E,overlayStyle:k,destroyOnHidden:F,destroyPopupOnHide:A,dropdownRender:z,popupRender:D,..._}=e,V=o("dropdown",r),L=`${V}-button`,H={menu:p,arrow:g,autoFocus:f,align:b,disabled:a,trigger:a?[]:h,onOpenChange:y,getPopupContainer:v||t,mouseEnterDelay:N,mouseLeaveDelay:I,classNames:{root:E},styles:{root:k},destroyOnHidden:F,popupRender:D||z},{compactSize:W,compactItemClassnames:Z}=Ln(V,n),B=$(L,Z,m);"destroyPopupOnHide"in e&&(H.destroyPopupOnHide=A),"open"in e&&(H.open=x),"placement"in e?H.placement=S:H.placement=n==="rtl"?"bottomLeft":"bottomRight";let K=Ns.createElement(nd,{type:i,danger:s,disabled:a,loading:c,onClick:l,htmlType:d,href:C,title:R},u),j=Ns.createElement(nd,{type:i,danger:s,icon:w}),[Q,X]=T([K,j]);return Ns.createElement(If.Compact,{className:B,size:W,block:!0,..._},Q,Ns.createElement(Ef,{...H},X))};$N.__ANT_BUTTON=!0;var IN=$N;var NN=Ef;NN.Button=IN;var PN=NN;var Wx=M(require("react")),Ed=require("react");function Li(e){return ze(e,{inputAffixPadding:e.paddingXXS})}var Di=e=>{let{controlHeight:t,fontSize:o,lineHeight:n,lineWidth:r,lineWidthFocus:i,controlHeightSM:s,controlHeightLG:a,fontSizeLG:c,lineHeightLG:l,paddingSM:d,controlPaddingHorizontalSM:u,controlPaddingHorizontal:m,colorFillAlter:p,colorPrimaryHover:g,colorPrimary:f,controlOutlineWidth:h,controlOutline:b,colorErrorOutline:x,colorWarningOutline:y,colorBgContainer:S,inputFontSize:v,inputFontSizeLG:C,inputFontSizeSM:w}=e,R=v||o,T=w||R,N=C||c,I=Math.round((t-R*n)/2*10)/10-r,E=Math.round((s-T*n)/2*10)/10-r,k=Math.ceil((a-N*l)/2*10)/10-r;return{lineWidthFocus:i===0?0:r,paddingBlock:Math.max(I,0),paddingBlockSM:Math.max(E,0),paddingBlockLG:Math.max(k,0),paddingInline:d-r,paddingInlineSM:u-r,paddingInlineLG:m-r,addonBg:p,activeBorderColor:f,hoverBorderColor:g,activeShadow:`0 0 0 ${h}px ${b}`,errorActiveShadow:`0 0 0 ${h}px ${x}`,warningActiveShadow:`0 0 0 ${h}px ${y}`,hoverBg:S,activeBg:S,inputFontSize:R,inputFontSizeLG:N,inputFontSizeSM:T}};var U6=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),Vx=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])":{...U6(ze(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),DN=(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}}),TN=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...DN(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),_N=(e,t)=>({"&-outlined":{...DN(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...Vx(e)},...TN(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...TN(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),MN=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),FN=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...MN(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...MN(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...Vx(e)}}}}),zN="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",BN=(e,t)=>({outline:`${Y(e.lineWidthFocus)} ${e.lineType} ${t}`,outlineOffset:Y(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(o=>`${o} 0s`).join(", ")}),kN=(e,t)=>({"&, & input, & textarea":{color:t.color},[zN]:BN(e,t.color),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),HN=(e,t)=>{let{componentCls:o}=e;return{"&-borderless":{background:"transparent",border:"none",paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${o}-sm, &${o}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${o}-lg, &${o}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:"none"},[zN]:BN(e,e.activeBorderColor),[`&${o}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${o}-status-error`]:kN(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${o}-status-warning`]:kN(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},VN=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:t?.inputColor??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),ON=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...VN(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),WN=(e,t)=>({"&-filled":{...VN(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...Vx(e)},...ON(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...ON(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),AN=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),jN=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...AN(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...AN(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),UN=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Y(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),LN=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...UN(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`}}),KN=(e,t)=>({"&-underlined":{...UN(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"},...LN(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...LN(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}});var K6=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}});var qN=e=>{let{paddingBlockLG:t,lineHeightLG:o,borderRadiusLG:n,paddingInlineLG:r}=e;return{padding:`${Y(t)} ${Y(r)}`,fontSize:e.inputFontSizeLG,lineHeight:o,borderRadius:n}},GN=e=>({padding:`${Y(e.paddingBlockSM)} ${Y(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),XN=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Y(e.paddingBlock)} ${Y(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...K6(e.colorTextPlaceholder),"&-lg":{...qN(e),...t.largeStyle},"&-sm":{...GN(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),q6=e=>{let{componentCls:t,antCls:o}=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`]:{...qN(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...GN(e)},[`&-lg ${o}-select-single`]:{height:e.controlHeightLG},[`&-sm ${o}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${Y(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${o}-select`]:{margin:`${Y(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${o}-select-single:not(${o}-select-customize-input):not(${o}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${Y(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${o}-cascader-picker`]:{margin:`-9px ${Y(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${o}-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,[`${o}-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,[`${o}-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",...da(),[`${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},[`
189
- & > ${t}-affix-wrapper,
190
- & > ${t}-number-affix-wrapper,
191
- & > ${o}-picker-range
192
- `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${o}-select,
193
- & > ${o}-select-auto-complete ${t},
194
- & > ${o}-cascader-picker ${t},
195
- & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${o}-select-focused`]:{zIndex:1},[`& > ${o}-select > ${o}-select-arrow`]:{zIndex:1},[`& > *:first-child,
196
- & > ${o}-select:first-child,
197
- & > ${o}-select-auto-complete:first-child ${t},
198
- & > ${o}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
199
- & > ${o}-select:last-child,
200
- & > ${o}-cascader-picker:last-child ${t},
201
- & > ${o}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${o}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},G6=e=>{let{componentCls:t,controlHeightSM:o,lineWidth:n,calc:r}=e,s=r(o).sub(r(n).mul(2)).sub(16).div(2).equal();return{[t]:{...Et(e),...XN(e),..._N(e),...WN(e),...HN(e),...KN(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:o,paddingTop:s,paddingBottom:s}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},X6=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...An(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Y(e.inputAffixPadding)}`}}}},Y6=e=>{let{componentCls:t,inputAffixPadding:o,colorTextDescription:n,motionDurationSlow:r,colorIcon:i,colorIconHover:s}=e,a=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[a]:{...XN(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:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:o},"&-suffix":{marginInlineStart:o},"&-password-icon":{display:"inline-flex",color:i,cursor:"pointer",transition:`all ${r}`,"&:hover":{color:s}}},...X6(e)},[`${t}-underlined`]:{borderRadius:0},[c]:{[`${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},Z6=e=>{let{componentCls:t,borderRadiusLG:o,borderRadiusSM:n}=e;return{[`${t}-group`]:{...Et(e),...q6(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:o,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}},...FN(e),...jN(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}}}}}},Q6=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Nf=Ye(["Input","Shared"],e=>{let t=ze(e,Li(e));return[G6(t),Y6(t)]},Di,{resetFont:!1}),Pf=Ye(["Input","Component"],e=>{let t=ze(e,Li(e));return[Z6(t),Q6(t),gs(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Di,{resetFont:!1});var J6=e=>{let{getPrefixCls:t,direction:o}=(0,Ed.useContext)(Oe),{prefixCls:n,className:r}=e,i=t("input-group",n),s=t("input"),[a,c]=Pf(s),l=$(i,c,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:o==="rtl"},a,r),d=(0,Ed.useContext)(cn),u=(0,Ed.useMemo)(()=>({...d,isFormItemInput:!1}),[d]);return Wx.createElement(cn.Provider,{value:u},Wx.createElement(If.Compact,{className:l,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},YN=J6;var zn=M(require("react"));var Yo=M(require("react"));function QN(e){return!!(e.addonBefore||e.addonAfter)}function JN(e){return!!(e.prefix||e.suffix||e.allowClear)}function ZN(e,t,o){let n=t.cloneNode(!0),r=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=o,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=(...i)=>{t.setSelectionRange(...i)},r}function Wl(e,t,o,n){if(!o)return;let r=t;if(t.type==="click"){r=ZN(t,e,""),o(r);return}if(e.type!=="file"&&n!==void 0){r=ZN(t,e,n),o(r);return}o(r)}function jx(){return jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},jx.apply(this,arguments)}var e4=Yo.default.forwardRef((e,t)=>{let{inputElement:o,children:n,prefixCls:r,prefix:i,suffix:s,addonBefore:a,addonAfter:c,className:l,style:d,disabled:u,readOnly:m,focused:p,triggerFocus:g,allowClear:f,value:h,handleReset:b,hidden:x,classes:y,classNames:S,dataAttrs:v,styles:C,components:w,onClear:R}=e,T=n??o,N=w?.affixWrapper||"span",I=w?.groupWrapper||"span",E=w?.wrapper||"span",k=w?.groupAddon||"span",F=(0,Yo.useRef)(null),A=V=>{F.current?.contains(V.target)&&g?.()},z=JN(e),D=(0,Yo.cloneElement)(T,{value:h,className:$(T.props?.className,!z&&S?.variant)||null}),_=(0,Yo.useRef)(null);if(Yo.default.useImperativeHandle(t,()=>({nativeElement:_.current||F.current})),z){let V=null;if(f){let W=!u&&!m&&h&&!(typeof f=="object"&&f.disabled),Z=`${r}-clear-icon`,B=typeof f=="object"&&f?.clearIcon?f.clearIcon:"\u2716";V=Yo.default.createElement("button",{type:"button",onClick:K=>{b?.(K),R?.()},onMouseDown:K=>K.preventDefault(),className:$(Z,{[`${Z}-hidden`]:!W,[`${Z}-has-suffix`]:!!s},S?.clear),style:C?.clear},B)}let L=`${r}-affix-wrapper`,G=$(L,{[`${r}-disabled`]:u,[`${L}-disabled`]:u,[`${L}-focused`]:p,[`${L}-readonly`]:m,[`${L}-input-with-clear-btn`]:s&&f&&h},y?.affixWrapper,S?.affixWrapper,S?.variant),H=(s||f)&&Yo.default.createElement("span",{className:$(`${r}-suffix`,S?.suffix),style:C?.suffix},V,s);D=Yo.default.createElement(N,jx({className:G,style:C?.affixWrapper,onClick:A},v?.affixWrapper,{ref:F}),i&&Yo.default.createElement("span",{className:$(`${r}-prefix`,S?.prefix),style:C?.prefix},i),D,H)}if(QN(e)){let V=`${r}-group`,L=`${V}-addon`,G=`${V}-wrapper`,H=$(`${r}-wrapper`,V,y?.wrapper,S?.wrapper),W=$(G,{[`${G}-disabled`]:u},y?.group,S?.groupWrapper);D=Yo.default.createElement(I,{className:W,ref:_},Yo.default.createElement(E,{className:H},a&&Yo.default.createElement(k,{className:L},a),D,c&&Yo.default.createElement(k,{className:L},c)))}return Yo.default.cloneElement(D,{className:$(D.props?.className,l)||null,style:{...D.props?.style,...d},hidden:x})}),$d=e4;var Ao=M(require("react"));var eP=M(require("react"));function Id(e,t){return eP.useMemo(()=>{let o={};t&&(o.show=typeof t=="object"&&t.formatter?t.formatter:!!t),o={...o,...e};let{show:n,...r}=o;return{...r,show:!!n,showFormatter:typeof n=="function"?n:void 0,strategy:r.strategy||(i=>i.length)}},[e,t])}var tP=M(require("react"));function Nd({countConfig:e,value:t,maxLength:o}){return tP.useMemo(()=>{let n=e.max??o,r=e.strategy(t),i=!!n&&r>n,s=Number(n)>0,a=e.show?e.showFormatter?e.showFormatter({value:t,count:r,maxLength:n}):`${r}${s?` / ${n}`:""}`:void 0;return{mergedMax:n,isOutOfRange:i,dataCount:a}},[e,o,t])}var _i=M(require("react"));function Pd({countConfig:e,getTarget:t}){let[o,n]=_i.useState(null),r=_i.useRef(t);return _i.useEffect(()=>{r.current=t},[t]),_i.useEffect(()=>{o&&(r.current()?.setSelectionRange(...o),n(null))},[o]),_i.useCallback((s,a)=>{let c=s;return!a&&e.exceedFormatter&&e.max&&e.strategy(s)>e.max&&(c=e.exceedFormatter(s,{max:e.max}),s!==c&&n([r.current()?.selectionStart||0,r.current()?.selectionEnd||0])),c},[e])}function Td(e,t){let[o,n]=it(e,t),r=o==null?"":String(o);return{value:o,setValue:n,formatValue:r}}function Tf(){return Tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Tf.apply(this,arguments)}var t4=(0,Ao.forwardRef)((e,t)=>{let{autoComplete:o,onChange:n,onFocus:r,onBlur:i,onPressEnter:s,onKeyDown:a,onKeyUp:c,prefixCls:l="rc-input",disabled:d,htmlSize:u,className:m,maxLength:p,suffix:g,showCount:f,count:h,type:b="text",classes:x,classNames:y,styles:S,onCompositionStart:v,onCompositionEnd:C,...w}=e,[R,T]=(0,Ao.useState)(!1),N=(0,Ao.useRef)(!1),I=(0,Ao.useRef)(!1),E=(0,Ao.useRef)(null),k=(0,Ao.useRef)(null),F=P=>{E.current&&qa(E.current,P)},{setValue:A,formatValue:z}=Td(e.defaultValue,e.value),D=Id(h,f),{isOutOfRange:_,dataCount:V}=Nd({countConfig:D,value:z,maxLength:p}),L=Pd({countConfig:D,getTarget:()=>E.current});(0,Ao.useImperativeHandle)(t,()=>({focus:F,blur:()=>{E.current?.blur()},setSelectionRange:(P,O,q)=>{E.current?.setSelectionRange(P,O,q)},select:()=>{E.current?.select()},input:E.current,nativeElement:k.current?.nativeElement||E.current})),(0,Ao.useEffect)(()=>{I.current&&(I.current=!1),T(P=>P&&d?!1:P)},[d]);let G=(P,O,q)=>{let ee=L(O,N.current);q.source==="compositionEnd"&&O===ee||(A(ee),E.current&&Wl(E.current,P,n,ee))},H=P=>{G(P,P.target.value,{source:"change"})},W=P=>{N.current=!1,G(P,P.currentTarget.value,{source:"compositionEnd"}),C?.(P)},Z=P=>{s&&P.key==="Enter"&&!I.current&&!P.nativeEvent.isComposing&&(I.current=!0,s(P)),a?.(P)},B=P=>{P.key==="Enter"&&(I.current=!1),c?.(P)},K=P=>{T(!0),r?.(P)},j=P=>{I.current&&(I.current=!1),T(!1),i?.(P)},Q=P=>{A(""),F(),E.current&&Wl(E.current,P,n)},X=_&&`${l}-out-of-range`,U=()=>{let P=Ke(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Ao.default.createElement("input",Tf({autoComplete:o},P,{onChange:H,onFocus:K,onBlur:j,onKeyDown:Z,onKeyUp:B,className:$(l,{[`${l}-disabled`]:d},y?.input),style:S?.input,ref:E,size:u,type:b,onCompositionStart:O=>{N.current=!0,v?.(O)},onCompositionEnd:W}))},J=()=>g||D.show?Ao.default.createElement(Ao.default.Fragment,null,D.show&&Ao.default.createElement("span",{className:$(`${l}-show-count-suffix`,{[`${l}-show-count-has-suffix`]:!!g},y?.count),style:{...S?.count}},V),g):null;return Ao.default.createElement($d,Tf({},w,{prefixCls:l,className:$(m,X),handleReset:Q,value:z,focused:R,triggerFocus:F,suffix:J(),disabled:d,classes:x,classNames:y,styles:S,ref:k}),U())}),oP=t4;var Qo=M(require("react"));var Zo=M(require("react"));var o4=`
202
- min-height:0 !important;
203
- max-height:none !important;
204
- height:0 !important;
205
- visibility:hidden !important;
206
- overflow:hidden !important;
207
- position:absolute !important;
208
- z-index:-1000 !important;
209
- top:0 !important;
210
- right:0 !important;
211
- pointer-events: none !important;
212
- `,n4=["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"],Ux={},rr;function r4(e,t=!1){let o=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&Ux[o])return Ux[o];let n=window.getComputedStyle(e),r=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),i=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),s=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),c={sizingStyle:n4.map(l=>`${l}:${n.getPropertyValue(l)}`).join(";"),paddingSize:i,borderSize:s,boxSizing:r};return t&&o&&(Ux[o]=c),c}function Kx(e,t=!1,o=null,n=null){rr||(rr=document.createElement("textarea"),rr.setAttribute("tab-index","-1"),rr.setAttribute("aria-hidden","true"),rr.setAttribute("name","hiddenTextarea"),document.body.appendChild(rr)),e.getAttribute("wrap")?rr.setAttribute("wrap",e.getAttribute("wrap")):rr.removeAttribute("wrap");let{paddingSize:r,borderSize:i,boxSizing:s,sizingStyle:a}=r4(e,t);rr.setAttribute("style",`${a};${o4}`),rr.value=e.value||e.placeholder||"";let c,l,d,u=rr.scrollHeight;if(s==="border-box"?u+=i:s==="content-box"&&(u-=r),o!==null||n!==null){rr.value=" ";let p=rr.scrollHeight-r;o!==null&&(c=p*o,s==="border-box"&&(c=c+r+i),u=Math.max(c,u)),n!==null&&(l=p*n,s==="border-box"&&(l=l+r+i),d=u>l?void 0:"hidden",u=Math.min(l,u))}let m={height:u,overflowY:d,resize:"none"};return c&&(m.minHeight=c),l&&(m.maxHeight=l),m}function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Yx.apply(this,arguments)}var qx=0,Gx=1,Xx=2,i4=Zo.forwardRef((e,t)=>{let{prefixCls:o,defaultValue:n,value:r,autoSize:i,onResize:s,className:a,style:c,disabled:l,onChange:d,onInternalAutoSize:u,...m}=e,[p,g]=it(n,r),f=p??"",h=A=>{g(A.target.value),d?.(A)},b=Zo.useRef(null);Zo.useImperativeHandle(t,()=>({textArea:b.current}));let[x,y]=Zo.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),S=!!i,[v,C]=Zo.useState(Xx),[w,R]=Zo.useState(),T=()=>{C(qx)};rt(()=>{S&&T()},[r,x,y,S]),rt(()=>{if(v===qx)C(Gx);else if(v===Gx){let A=Kx(b.current,!1,x,y);C(Xx),R(A)}},[v]);let N=Zo.useRef(void 0),I=()=>{N.current!==void 0&&Ve.cancel(N.current)},E=A=>{v===Xx&&(s?.(A),i&&(I(),N.current=Ve(()=>{T()})))};Zo.useEffect(()=>I,[]);let F={...c,...S?w:null};return(v===qx||v===Gx)&&(F.overflowY="hidden",F.overflowX="hidden"),Zo.createElement(sn,{onResize:E,disabled:!(i||s)},Zo.createElement("textarea",Yx({},m,{ref:b,style:F,className:$(o,a,{[`${o}-disabled`]:l}),disabled:l,value:f,onChange:h})))}),Zx=i4;function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Qx.apply(this,arguments)}var s4=Qo.default.forwardRef(({defaultValue:e,value:t,onFocus:o,onBlur:n,onChange:r,allowClear:i,maxLength:s,onCompositionStart:a,onCompositionEnd:c,suffix:l,prefixCls:d="rc-textarea",showCount:u,count:m,className:p,style:g,disabled:f,hidden:h,classNames:b,styles:x,onResize:y,onClear:S,onPressEnter:v,readOnly:C,autoSize:w,onKeyDown:R,...T},N)=>{let[I,E]=Qo.default.useState(!1),k=Qo.default.useRef(!1),[F,A]=Qo.default.useState(null),z=(0,Qo.useRef)(null),D=(0,Qo.useRef)(null),_=()=>D.current?.textArea||null,{setValue:V,formatValue:L}=Td(e,t),G=Id(m,u),{isOutOfRange:H,dataCount:W}=Nd({countConfig:G,value:L,maxLength:s}),Z=Pd({countConfig:G,getTarget:()=>D.current?.textArea||null}),B=()=>{_()?.focus()};(0,Qo.useImperativeHandle)(N,()=>({resizableTextArea:D.current,focus:B,blur:()=>{_()?.blur()},nativeElement:z.current?.nativeElement||_()})),(0,Qo.useEffect)(()=>{E(re=>!f&&re)},[f]);let K=(re,ie)=>{let Ce=Z(ie,k.current);V(Ce),Wl(re.currentTarget,re,r,Ce)},j=re=>{k.current=!0,a?.(re)},Q=re=>{k.current=!1,K(re,re.currentTarget.value),c?.(re)},X=re=>{K(re,re.target.value)},U=re=>{re.key==="Enter"&&v&&!re.nativeEvent.isComposing&&v(re),R?.(re)},J=re=>{E(!0),o?.(re)},P=re=>{E(!1),n?.(re)},O=re=>{V(""),B();let ie=_();ie&&Wl(ie,re,r)},q=l;G.show&&(q=Qo.default.createElement(Qo.default.Fragment,null,q,Qo.default.createElement("span",{className:$(`${d}-data-count`,b?.count),style:x?.count},W)));let ee=re=>{y?.(re),_()?.style.height&&A(!0)},le=!w&&!u&&!i;return Qo.default.createElement($d,{ref:z,value:L,allowClear:i,handleReset:O,suffix:q,prefixCls:d,classNames:{...b,affixWrapper:$(b?.affixWrapper,{[`${d}-show-count`]:u,[`${d}-textarea-allow-clear`]:i})},disabled:f,focused:I,className:$(p,H&&`${d}-out-of-range`),style:{...g,...F&&!le?{height:"auto"}:{}},dataAttrs:typeof W=="string"?{affixWrapper:{"data-count":W}}:void 0,styles:x,hidden:h,readOnly:C,onClear:S},Qo.default.createElement(Zx,Qx({},T,{autoSize:w,maxLength:s,onKeyDown:U,onChange:X,onFocus:J,onBlur:P,onCompositionStart:j,onCompositionEnd:Q,className:$(b?.textarea),style:{resize:g?.resize,...x?.textarea},disabled:f,prefixCls:d,onResize:ee,ref:D,readOnly:C})))}),Jx=s4;var nP=oP;var ev=M(require("react"));var a4=(e,t,o,n)=>{let r=ev.useContext(Oe),{variant:i,[e]:s}=r,a=ev.useContext(pI),c=n?r[n]:void 0,l=s?.variant??c?.variant,d=typeof t<"u"||o===!1||typeof a<"u"||typeof l<"u"||typeof i<"u",u;typeof t<"u"?u=t:o===!1?u="borderless":u=a??l??i??"outlined";let m=jy.includes(u);return[u,m,d]},ir=a4;var Mf=require("react");function Md(e,t){let o=(0,Mf.useRef)([]),n=()=>{o.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute("type")==="password"&&e.current?.input.hasAttribute("value")&&e.current?.input.removeAttribute("value")}))};return(0,Mf.useEffect)(()=>(t&&n(),()=>o.current.forEach(r=>{r&&clearTimeout(r)})),[t]),n}function rP(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var l4=(0,zn.forwardRef)((e,t)=>{let{prefixCls:o,bordered:n=!0,status:r,size:i,disabled:s,onBlur:a,onFocus:c,suffix:l,allowClear:d,addonAfter:u,addonBefore:m,className:p,style:g,styles:f,rootClassName:h,onChange:b,classNames:x,variant:y,...S}=e,{getPrefixCls:v,direction:C,allowClear:w,autoComplete:R,className:T,style:N,classNames:I,styles:E}=Xe("input"),k=v("input",o),F=(0,zn.useRef)(null),A=oo(k),[z,D]=Nf(k,h);Pf(k,A);let{compactSize:_,compactItemClassnames:V}=Ln(k,C),L=Xt(ae=>i??_??ae),G=zn.default.useContext(zo),H=s??G,W={...e,size:L,disabled:H},Z=_e(N),B=_e(g),[K,j]=Je([I,x],[E,Z,f,B],{props:W}),{status:Q,hasFeedback:X,feedbackIcon:U}=(0,zn.useContext)(cn),J=Es(Q,r),P=rP(e)||!!X,O=(0,zn.useRef)(P),q=Md(F,!0),ee=ae=>{q(),a?.(ae)},le=ae=>{q(),c?.(ae)},re=ae=>{q(),b?.(ae)},ie=(X||l)&&zn.default.createElement(zn.default.Fragment,null,l,X&&U),Ce=up({allowClear:d,contextAllowClear:w,componentName:"Input"}),[de,$e]=ir("input",y,n);return zn.default.createElement(nP,{ref:Mt(t,F),prefixCls:k,autoComplete:R,...S,disabled:H,onBlur:ee,onFocus:le,style:j.root,styles:j,suffix:ie,allowClear:Ce,className:$(p,h,D,A,V,T,K.root),onChange:re,addonBefore:m&&zn.default.createElement(Wr,{form:!0,space:!0},m),addonAfter:u&&zn.default.createElement(Wr,{form:!0,space:!0},u),classNames:{...K,input:$({[`${k}-sm`]:L==="small",[`${k}-lg`]:L==="large",[`${k}-rtl`]:C==="rtl"},K.input,z),variant:$({[`${k}-${de}`]:$e},Ai(k,J)),affixWrapper:$({[`${k}-affix-wrapper-sm`]:L==="small",[`${k}-affix-wrapper-lg`]:L==="large",[`${k}-affix-wrapper-rtl`]:C==="rtl"},z),wrapper:$({[`${k}-group-rtl`]:C==="rtl"},z),groupWrapper:$({[`${k}-group-wrapper-sm`]:L==="small",[`${k}-group-wrapper-lg`]:L==="large",[`${k}-group-wrapper-rtl`]:C==="rtl",[`${k}-group-wrapper-${de}`]:$e},Ai(`${k}-group-wrapper`,J,X),z)}})}),Ps=l4;var ro=M(require("react"));var c4=e=>{let{componentCls:t,paddingXS:o}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:o,[`${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}}}},iP=Ye(["Input","OTP"],e=>{let t=ze(e,Li(e));return c4(t)},Di);var Cr=M(require("react"));var d4="\u2022",u4=Cr.forwardRef((e,t)=>{let{className:o,value:n,onChange:r,onActiveChange:i,index:s,mask:a,onFocus:c,type:l,...d}=e,{getPrefixCls:u}=Cr.useContext(Oe),m=u("otp"),p=typeof a=="string"?a:d4,g=Cr.useRef(null);Cr.useImperativeHandle(t,()=>g.current);let f=y=>{r(s,y.target.value)},h=()=>{Ve(()=>{let y=g.current?.input;document.activeElement===y&&y&&y.select()})},b=y=>{c?.(y),h()},x=y=>{let{key:S,ctrlKey:v,metaKey:C}=y;S==="ArrowLeft"?i(s-1):S==="ArrowRight"?i(s+1):S==="z"&&(v||C)?y.preventDefault():S==="Backspace"&&!n&&i(s-1),h()};return Cr.createElement("span",{className:`${m}-input-wrapper`,role:"presentation"},a&&n!==""&&n!==void 0&&Cr.createElement("span",{className:`${m}-mask-icon`,"aria-hidden":"true"},p),Cr.createElement(Ps,{"aria-label":`OTP Input ${s+1}`,...d,type:l??(a?"password":"text"),ref:g,value:n,onInput:f,onFocus:b,onKeyDown:x,onMouseDown:h,onMouseUp:h,className:$(o,{[`${m}-mask-input`]:a})}))}),sP=u4;function kf(e){return(e||"").split("")}var m4=e=>{let{index:t,prefixCls:o,separator:n,className:r,style:i}=e,s=ct(n)?n(t):n;return s?ro.createElement("span",{className:$(`${o}-separator`,r),style:i},s):null},p4=ro.forwardRef((e,t)=>{let{prefixCls:o,length:n=6,size:r,defaultValue:i,value:s,onChange:a,formatter:c,separator:l,variant:d,disabled:u,status:m,autoFocus:p,mask:g,type:f,autoComplete:h,onInput:b,onFocus:x,inputMode:y,classNames:S,styles:v,className:C,style:w,...R}=e,{classNames:T,styles:N,getPrefixCls:I,direction:E,style:k,className:F}=Xe("otp"),A=I("otp",o),[z]=ir("otp",d,void 0,"input"),D={...e,length:n,variant:z},_=_e(k),V=_e(w),[L,G]=Je([T,S],[N,_,v,V],{props:D}),H=Mo(R,{aria:!0,data:!0,attr:!0}),[W,Z]=iP(A),B=Xt(de=>r??de),K=ro.useContext(cn),j=Es(K.status,m),Q=ro.useMemo(()=>({...K,status:j,hasFeedback:!1,feedbackIcon:null}),[K,j]),X=ro.useRef(null),U=ro.useRef({});ro.useImperativeHandle(t,()=>({focus:()=>{U.current[0]?.focus()},blur:()=>{for(let de=0;de<n;de+=1)U.current[de]?.blur()},nativeElement:X.current}));let J=de=>c?c(de):de,[P,O]=ro.useState(()=>kf(J(i||"")));ro.useEffect(()=>{s!==void 0&&O(kf(s))},[s]);let q=Ne(de=>{O(de),b&&b(de),a&&de.length===n&&de.every($e=>$e)&&de.some(($e,ae)=>P[ae]!==$e)&&a(de.join(""))}),ee=Ne((de,$e)=>{let ae=Zt(P);for(let he=0;he<de;he+=1)ae[he]||(ae[he]="");$e.length<=1?ae[de]=$e:ae=ae.slice(0,de).concat(kf($e)),ae=ae.slice(0,n);for(let he=ae.length-1;he>=0&&!ae[he];he-=1)ae.pop();let Pe=J(ae.map(he=>he||" ").join(""));return ae=kf(Pe).map((he,ne)=>he===" "&&!ae[ne]?ae[ne]:he),ae}),le=(de,$e)=>{let ae=ee(de,$e),Pe=Math.min(de+$e.length,n-1);Pe!==de&&ae[de]!==void 0&&U.current[Pe]?.focus(),q(ae)},re=de=>{U.current[de]?.focus()},ie=(de,$e)=>{for(let ae=0;ae<$e;ae+=1)if(!U.current[ae]?.input?.value){U.current[ae]?.focus();break}x?.(de)},Ce={variant:z,disabled:u,status:j,mask:g,type:f,inputMode:y,autoComplete:h};return ro.createElement("div",{...H,ref:X,className:$(C,A,{[`${A}-sm`]:B==="small",[`${A}-lg`]:B==="large",[`${A}-rtl`]:E==="rtl"},Z,W,F,L.root),style:G.root,role:"group"},ro.createElement(cn.Provider,{value:Q},Array.from({length:n}).map((de,$e)=>{let ae=`otp-${$e}`,Pe=P[$e]||"";return ro.createElement(ro.Fragment,{key:ae},ro.createElement(sP,{ref:he=>{U.current[$e]=he},index:$e,size:B,htmlSize:1,className:$(L.input,`${A}-input`),style:G.input,onChange:le,value:Pe,onActiveChange:re,autoFocus:$e===0&&p,onFocus:he=>ie(he,$e),...Ce}),$e<n-1&&ro.createElement(m4,{separator:l,index:$e,prefixCls:A,className:$(L.separator),style:G.separator}))})))}),aP=p4;var Bn=M(require("react")),Lf=require("react");var Of=M(require("react"));var f4={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"},lP=f4;function tv(){return tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},tv.apply(this,arguments)}var g4=(e,t)=>Of.createElement(kt,tv({},e,{ref:t,icon:lP})),h4=Of.forwardRef(g4),cP=h4;var Af=M(require("react"));var y4={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"},dP=y4;function ov(){return ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},ov.apply(this,arguments)}var b4=(e,t)=>Af.createElement(kt,ov({},e,{ref:t,icon:dP})),x4=Af.forwardRef(b4),uP=x4;var v4=e=>e?Bn.createElement(uP,null):Bn.createElement(cP,null),S4={click:"onClick",hover:"onMouseOver"},C4=Bn.forwardRef((e,t)=>{let{disabled:o,action:n="click",visibilityToggle:r=!0,iconRender:i,prefixCls:s,inputPrefixCls:a,suffix:c,className:l,style:d,classNames:u,styles:m,variant:p,...g}=e,{getPrefixCls:f,className:h,style:b,classNames:x,styles:y,iconRender:S}=Xe("inputPassword"),[v]=ir("inputPassword",p,e.bordered,"input"),[C]=qo("global"),w=Bn.useContext(zo),R=o??w,T={...e,disabled:R,variant:v},N=_e(b),I=_e(d),[E,k]=Je([x,u],[y,N,m,I],{props:T}),F=st(r)&&r.visible!==void 0,[A,z]=(0,Lf.useState)(()=>F?r.visible:!1),D=(0,Lf.useRef)(null);Bn.useEffect(()=>{F&&z(r.visible)},[F,r]);let _=Md(D),V=()=>{if(R)return;A&&_();let K=!A;F||z(K),st(r)&&r.onVisibleChange?.(K)},L=K=>{let j=S4[n]||"",X=(i||S||v4)(A),U=st(r)?r.tabIndex:void 0;return Bn.createElement("span",{key:"passwordIcon",role:"button",tabIndex:R?-1:U??0,className:`${K}-icon`,"aria-disabled":R,"aria-pressed":A,"aria-label":A?C.hide:C.show,onMouseDown:J=>{J.preventDefault()},onMouseUp:J=>{J.preventDefault()},onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),J.repeat||V())},[j]:V},X)},G=f("input",a),H=f("input-password",s),W=r&&L(H),Z=$(H,h,l,{[`${H}-${e.size}`]:!!e.size}),B={...g,type:A?"text":"password",prefixCls:G,suffix:Bn.createElement(Bn.Fragment,null,W,c),disabled:R,className:Z,classNames:E,styles:k,variant:v};return Bn.createElement(Ps,{ref:Mt(t,D),...B})}),mP=C4;var wr=M(require("react"));var Df=M(require("react"));var w4={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"},pP=w4;function nv(){return nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},nv.apply(this,arguments)}var R4=(e,t)=>Df.createElement(kt,nv({},e,{ref:t,icon:pP})),E4=Df.forwardRef(R4),_f=E4;var $4=e=>{let{componentCls:t,antCls:o,calc:n,max:r}=e,i=`${t}-btn`,[s,a]=Gt(o,"input-search"),c=e.inputFontSizeSM??e.fontSize,l=r(e.controlHeightSM,n(c).mul(e.lineHeight).add(n(e.paddingBlockSM).mul(2)).add(n(e.lineWidth).mul(2)).equal());return{[t]:{[s("btn-height")]:Y(e.controlHeight),width:"100%",[i]:{height:a("btn-height"),"&:focus-visible":{zIndex:5},[`&${o}-btn-icon-only`]:{width:a("btn-height")},"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}},[`&${t}-large`]:{[s("btn-height")]:Y(e.controlHeightLG)},[`&${t}-small`]:{[s("btn-height")]:Y(e.controlHeightSM)},[`&${t}-small ${i}`]:{minHeight:l,[`&${e.antCls}-btn-icon-only`]:{minWidth:l}}}}},fP=Ye(["Input","Search"],e=>{let t=ze(e,Li(e));return $4(t)},Di);var I4=wr.forwardRef((e,t)=>{let{prefixCls:o,inputPrefixCls:n,className:r,size:i,style:s,enterButton:a=!1,searchIcon:c,addonAfter:l,loading:d,disabled:u,onSearch:m,onChange:p,onCompositionStart:g,onCompositionEnd:f,variant:h,onPressEnter:b,classNames:x,styles:y,hidden:S,...v}=e,{direction:C,getPrefixCls:w,className:R,style:T,classNames:N,styles:I,searchIcon:E}=Xe("inputSearch"),k=wr.useContext(zo),F=u??k,[A,,z]=ir("inputSearch",h,e.bordered),D=z?A:void 0,[_]=ir("inputSearch",h,e.bordered,"input"),V={...e,enterButton:a,variant:D},L=_e(T),G=_e(s),[H,W]=Je([N,x],[I,L,y,G],{props:V},{button:{_default:"root"}}),Z=wr.useRef(!1),B=w("input-search",o),K=w("input",n),[j,Q]=fP(B),{compactSize:X}=Ln(B,C),U=Xt(ce=>i??X??ce),J=wr.useRef(null),P=ce=>{ce?.target&&ce.type==="click"&&m&&m(ce.target.value,ce,{source:"clear"}),p?.(ce)},O=ce=>{document.activeElement===J.current?.input&&ce.preventDefault()},q=ce=>{m&&m(J.current?.input?.value,ce,{source:"input"})},ee=ce=>{Z.current||d||(b?.(ce),q(ce))},le=typeof a=="boolean"?Qt(c,E,wr.createElement(_f,null)):null,re=`${B}-btn`,ie=$(re,{[`${re}-${D}`]:D}),Ce,de=a||{},$e=de.type&&de.type.__ANT_BUTTON===!0;if($e||de.type==="button"){let ce=de.props;Ce=Ro(de,{disabled:F||ce.disabled||!$e&&d,onMouseDown:Re=>{ce.onMouseDown?.(Re),O(Re)},onClick:Re=>{de?.props?.onClick?.(Re),q(Re)},key:"enterButton",...$e?{className:$(ie,ce.className),loading:d||ce.loading,size:U}:{}})}else Ce=wr.createElement(ni,{classNames:H.button,styles:W.button,className:ie,color:a?"primary":"default",size:U,disabled:u,key:"enterButton",onMouseDown:O,onClick:q,loading:d,icon:le,variant:D==="borderless"||D==="filled"||D==="underlined"?"text":a?"solid":void 0},a);l&&(Ce=[Ce,Ro(l,{key:"addonAfter"})]);let ae=$(B,Q,{[`${B}-rtl`]:C==="rtl",[`${B}-${U}`]:!!U,[`${B}-with-button`]:!!a},r,R,j,H.root),Pe=ce=>{Z.current=!0,g?.(ce)},he=ce=>{Z.current=!1,f?.(ce)},ne=Mo(v,{data:!0}),fe=Ke({...v,classNames:Ke(H,["button","root"]),styles:Ke(W,["button","root"]),prefixCls:K,type:"search",size:U,variant:_,onPressEnter:ee,onCompositionStart:Pe,onCompositionEnd:he,onChange:P,disabled:u},Object.keys(ne));return wr.createElement(hp,{className:ae,style:W.root,...ne,hidden:S},wr.createElement(Ps,{ref:Mt(J,t),...fe}),Ce)}),gP=I4;var sr=M(require("react")),yP=require("react");var N4=e=>{let{componentCls:t,paddingLG:o}=e,n=`${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"},[n]:{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"}},[`
213
- &-allow-clear > ${t},
214
- &-affix-wrapper${n}-has-feedback ${t}
215
- `]:{paddingInlineEnd:o},[`&-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},[`${n}-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}}}}}},hP=Ye(["Input","TextArea"],e=>{let t=ze(e,Li(e));return N4(t)},Di,{resetFont:!1});var P4=(0,yP.forwardRef)((e,t)=>{let{prefixCls:o,bordered:n=!0,size:r,disabled:i,status:s,allowClear:a,classNames:c,rootClassName:l,className:d,style:u,styles:m,variant:p,showCount:g,onMouseDown:f,onResize:h,...b}=e,{getPrefixCls:x,direction:y,allowClear:S,autoComplete:v,className:C,style:w,classNames:R,styles:T}=Xe("textArea"),N=sr.useContext(zo),I=i??N,{status:E,hasFeedback:k,feedbackIcon:F}=sr.useContext(cn),A=Es(E,s),z=_e(w),D=_e(u),[_,V]=Je([R,c],[T,z,m,D],{props:e}),L=sr.useRef(null);sr.useImperativeHandle(t,()=>({resizableTextArea:L.current?.resizableTextArea,focus:re=>{qa(L.current?.resizableTextArea?.textArea,re)},blur:()=>L.current?.blur(),nativeElement:L.current?.nativeElement||null}));let G=x("input",o),H=oo(G),[W,Z]=Nf(G,l);hP(G,H);let{compactSize:B,compactItemClassnames:K}=Ln(G,y),j=Xt(re=>r??B??re),[Q,X]=ir("textArea",p,n),U=up({allowClear:a,contextAllowClear:S,componentName:"TextArea"}),[J,P]=sr.useState(!1),[O,q]=sr.useState(!1),ee=re=>{P(!0),f?.(re);let ie=()=>{P(!1),document.removeEventListener("mouseup",ie)};document.addEventListener("mouseup",ie)},le=re=>{if(h?.(re),J&&ct(getComputedStyle)){let ie=L.current?.nativeElement?.querySelector("textarea");ie&&getComputedStyle(ie).resize==="both"&&q(!0)}};return sr.createElement(Jx,{autoComplete:v,...b,style:V.root,styles:V,disabled:I,allowClear:U,className:$(Z,H,d,l,K,C,_.root,{[`${G}-textarea-affix-wrapper-resize-dirty`]:O}),classNames:{..._,textarea:$({[`${G}-sm`]:j==="small",[`${G}-lg`]:j==="large"},W,_.textarea,J&&`${G}-mouse-active`),variant:$({[`${G}-${Q}`]:X},Ai(G,A)),affixWrapper:$(`${G}-textarea-affix-wrapper`,{[`${G}-affix-wrapper-rtl`]:y==="rtl",[`${G}-affix-wrapper-sm`]:j==="small",[`${G}-affix-wrapper-lg`]:j==="large",[`${G}-textarea-show-count`]:g||e.count?.show},W)},prefixCls:G,suffix:k&&sr.createElement("span",{className:`${G}-textarea-suffix`},F),showCount:g,ref:L,onResize:le,onMouseDown:ee})}),Ff=P4;var jl=Ps;jl.Group=YN;jl.Search=gP;jl.TextArea=Ff;jl.Password=mP;jl.OTP=aP;var bP=jl;var ql=M(require("react"));var Vt=M(require("react"));var zf=M(require("react"));var T4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},xP=T4;function rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},rv.apply(this,arguments)}var M4=(e,t)=>zf.createElement(kt,rv({},e,{ref:t,icon:xP})),k4=zf.forwardRef(M4),Bf=k4;var Hf=M(require("react"));var O4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},vP=O4;function iv(){return iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},iv.apply(this,arguments)}var A4=(e,t)=>Hf.createElement(kt,iv({},e,{ref:t,icon:vP})),L4=Hf.forwardRef(A4),SP=L4;var Vf=M(require("react"));var D4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},CP=D4;function sv(){return sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},sv.apply(this,arguments)}var _4=(e,t)=>Vf.createElement(kt,sv({},e,{ref:t,icon:CP})),F4=Vf.forwardRef(_4),wP=F4;var Uf=M(require("react"));var $a=M(require("react"));var z4=e=>{let{type:t,children:o,prefixCls:n,buttonProps:r,close:i,autoFocus:s,emitEvent:a,isSilent:c,quitOnNullishReturnValue:l,actionFn:d}=e,u=$a.useRef(!1),m=$a.useRef(null),[p,g]=Ua(!1),f=(...x)=>{i?.(...x)};$a.useEffect(()=>{let x=null;return s&&(x=setTimeout(()=>{m.current?.focus({preventScroll:!0})})),()=>{x&&clearTimeout(x)}},[s]);let h=x=>{Gu(x)&&(g(!0),x.then((...y)=>{g(!1,!0),f.apply(void 0,y),u.current=!1},y=>{if(g(!1,!0),u.current=!1,!c?.())return Promise.reject(y)}))},b=x=>{if(u.current)return;if(u.current=!0,!d){f();return}let y;if(a){if(y=d(x),l&&!Gu(y)){u.current=!1,f(x);return}}else if(d.length)y=d(i),u.current=!1;else if(y=d(),!Gu(y)){f();return}h(y)};return $a.createElement(ni,{...bp(t),onClick:b,loading:p,prefixCls:n,...r,ref:m},o)},Wf=z4;var RP=M(require("react")),Fi=RP.default.createContext({}),{Provider:jf}=Fi;var B4=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:o,isSilent:n,mergedOkCancel:r,rootPrefixCls:i,close:s,onCancel:a,onConfirm:c,onClose:l}=(0,Uf.useContext)(Fi);return r?Uf.default.createElement(Wf,{isSilent:n,actionFn:a,close:(...d)=>{s?.(...d),c?.(!1),l?.()},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${i}-btn`},o):null},av=B4;var Kf=M(require("react"));var H4=()=>{let{autoFocusButton:e,close:t,isSilent:o,okButtonProps:n,rootPrefixCls:r,okTextLocale:i,okType:s,onConfirm:a,onOk:c,onClose:l}=(0,Kf.useContext)(Fi);return Kf.default.createElement(Wf,{isSilent:o,type:s||"primary",actionFn:c,close:(...d)=>{t?.(...d),a?.(!0),l?.()},autoFocus:e==="ok",buttonProps:n,prefixCls:`${r}-btn`},i)},lv=H4;var Hn=M(require("react"));var ci=M(require("react"));var EP=M(require("react")),qf=EP.createContext({});var Ts=M(require("react")),Ia=require("react");function cv(e,t,o){let n=t;return!n&&o&&(n=`${e}-${o}`),n}function $P(e,t){let o=e[`page${t?"Y":"X"}Offset`],n=`scroll${t?"Top":"Left"}`;if(typeof o!="number"){let r=e.document;o=r.documentElement[n],typeof o!="number"&&(o=r.body[n])}return o}function IP(e){let t=e.getBoundingClientRect(),o={left:t.left,top:t.top},n=e.ownerDocument,r=n.defaultView||n.parentWindow;return o.left+=$P(r),o.top+=$P(r,!0),o}var zi=M(require("react")),uv=require("react");var Jo=M(require("react"));var NP=M(require("react")),PP=NP.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Gf.apply(this,arguments)}var V4=Jo.default.forwardRef((e,t)=>{let{prefixCls:o,className:n,style:r,title:i,ariaId:s,footer:a,closable:c,closeIcon:l,onClose:d,children:u,bodyStyle:m,bodyProps:p,modalRender:g,onMouseDown:f,onMouseUp:h,holderRef:b,visible:x,forceRender:y,width:S,height:v,classNames:C,styles:w,isFixedPos:R,focusTrap:T}=e,{panel:N}=Jo.default.useContext(qf),I=(0,Jo.useRef)(null),E=bo(b,N,I),[k]=Wh(x&&R&&T!==!1,()=>I.current);Jo.default.useImperativeHandle(t,()=>({focus:()=>{I.current?.focus({preventScroll:!0})}}));let F={};S!==void 0&&(F.width=S),v!==void 0&&(F.height=v);let A=a?Jo.default.createElement("div",{className:$(`${o}-footer`,C?.footer),style:{...w?.footer}},a):null,z=i?Jo.default.createElement("div",{className:$(`${o}-header`,C?.header),style:{...w?.header}},Jo.default.createElement("div",{className:$(`${o}-title`,C?.title),id:s,style:{...w?.title}},i)):null,D=(0,Jo.useMemo)(()=>typeof c=="object"&&c!==null?c:c?{closeIcon:l??Jo.default.createElement("span",{className:`${o}-close-x`})}:{},[c,l,o]),_=Mo(D,!0),V=typeof c=="object"&&c.disabled,L=c?Jo.default.createElement("button",Gf({type:"button",onClick:d,"aria-label":"Close"},_,{className:$(`${o}-close`,C?.close),disabled:V,style:w?.close}),D.closeIcon):null,G=Jo.default.createElement("div",{className:$(`${o}-container`,C?.container),style:w?.container},L,z,Jo.default.createElement("div",Gf({className:$(`${o}-body`,C?.body),style:{...m,...w?.body}},p),u),A);return Jo.default.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?s:null,"aria-modal":"true",ref:E,style:{...r,...F},className:$(o,n),onMouseDown:f,onMouseUp:h,tabIndex:-1,onFocus:H=>{k(H.target)}},Jo.default.createElement(PP,{shouldUpdate:x||y},g?g(G):G))}),kd=V4;function dv(){return dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},dv.apply(this,arguments)}var W4=zi.forwardRef((e,t)=>{let{prefixCls:o,title:n,style:r,className:i,visible:s,forceRender:a,destroyOnHidden:c,motionName:l,ariaId:d,onVisibleChanged:u,mousePosition:m}=e,p=(0,uv.useRef)(null),g=(0,uv.useRef)(null);zi.useImperativeHandle(t,()=>({...g.current,inMotion:p.current.inMotion,enableMotion:p.current.enableMotion}));let[f,h]=zi.useState(),b={};f&&(b.transformOrigin=f);function x(){if(!p.current?.nativeElement)return;let y=IP(p.current.nativeElement);h(m&&(m.x||m.y)?`${m.x-y.left}px ${m.y-y.top}px`:"")}return zi.createElement(fo,{visible:s,onVisibleChanged:u,onAppearPrepare:x,onEnterPrepare:x,forceRender:a,motionName:l,removeOnLeave:c,ref:p},({className:y,style:S},v)=>zi.createElement(kd,dv({},e,{ref:g,title:n,ariaId:d,prefixCls:o,holderRef:v,style:{...S,...r,...b},className:$(i,y)})))}),TP=W4;var pv=M(require("react"));function mv(){return mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},mv.apply(this,arguments)}var j4=e=>{let{prefixCls:t,style:o,visible:n,maskProps:r,motionName:i,className:s}=e;return pv.createElement(fo,{key:"mask",visible:n,motionName:i,leavedClassName:`${t}-mask-hidden`},({className:a,style:c},l)=>pv.createElement("div",mv({ref:l,style:{...c,...o},className:$(`${t}-mask`,a,s)},r)))},MP=j4;function Od(){return Od=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Od.apply(this,arguments)}var U4=e=>{let{prefixCls:t="rc-dialog",zIndex:o,visible:n=!1,focusTriggerAfterClose:r=!0,wrapStyle:i,wrapClassName:s,wrapProps:a,onClose:c,afterOpenChange:l,afterClose:d,transitionName:u,animation:m,closable:p=!0,mask:g=!0,maskTransitionName:f,maskAnimation:h,maskClosable:b=!0,maskStyle:x,maskProps:y,rootClassName:S,rootStyle:v,classNames:C,styles:w}=e,R=(0,Ia.useRef)(null),T=(0,Ia.useRef)(null),N=(0,Ia.useRef)(null),[I,E]=Ts.useState(n),[k,F]=Ts.useState(!1),A=Co();function z(){js(T.current,document.activeElement)||(R.current=document.activeElement)}function D(){js(T.current,document.activeElement)||N.current?.focus()}function _(){if(E(!1),g&&R.current&&r){try{R.current.focus({preventScroll:!0})}catch{}R.current=null}I&&d?.()}function V(B){B?D():_(),l?.(B)}function L(B){c?.(B)}let G=(0,Ia.useRef)(!1),H=null;b&&(H=B=>{T.current===B.target&&G.current&&L(B)});function W(B){G.current=B.target===T.current}(0,Ia.useEffect)(()=>{if(n){if(G.current=!1,E(!0),z(),T.current){let B=getComputedStyle(T.current);F(B.position==="fixed")}}else I&&N.current.enableMotion()&&!N.current.inMotion()&&_()},[n]);let Z={zIndex:o,...i,...w?.wrapper,display:I?null:"none"};return Ts.createElement("div",Od({className:$(`${t}-root`,S),style:v},Mo(e,{data:!0})),Ts.createElement(MP,{prefixCls:t,visible:g&&n,motionName:cv(t,f,h),style:{zIndex:o,...x,...w?.mask},maskProps:y,className:C?.mask}),Ts.createElement("div",Od({className:$(`${t}-wrap`,s,C?.wrapper),ref:T,onClick:H,onMouseDown:W,style:Z},a),Ts.createElement(TP,Od({},e,{isFixedPos:k,ref:N,closable:p,ariaId:A,prefixCls:t,visible:n&&I,onClose:L,onVisibleChanged:V,motionName:cv(t,u,m)}))))},kP=U4;function fv(){return fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},fv.apply(this,arguments)}var K4=e=>{let{visible:t,getContainer:o,forceRender:n,destroyOnHidden:r=!1,afterClose:i,closable:s,panelRef:a,keyboard:c=!0,scrollLock:l=!0,onClose:d}=e,{scrollLock:u,...m}=e,[p,g]=ci.useState(t),f=ci.useMemo(()=>({panel:a}),[a]),h=({top:b,event:x})=>{if(b&&c){x.stopPropagation(),d?.(x);return}};return ci.useEffect(()=>{t&&g(!0)},[t]),!n&&r&&!p?null:ci.createElement(qf.Provider,{value:f},ci.createElement(na,{open:t||n||p,onEsc:h,autoDestroy:!1,getContainer:o,autoLock:l&&(t||p)},ci.createElement(kP,fv({},m,{destroyOnHidden:r,afterClose:()=>{let b=s&&typeof s=="object"?s:{},{afterClose:x}=b||{};x?.(),i?.(),g(!1)}}))))},OP=K4;var AP=OP;var LP=()=>Ut()&&window.document.documentElement;var DP=require("react");function gv(e,t,o){return(0,DP.useMemo)(()=>({...{trap:t??!0,focusTriggerAfterClose:o??!0},...e}),[e,t,o])}var ui=M(require("react"));var Ad=M(require("react"));var Xf=M(require("react"));var q4=e=>{let{prefixCls:t,className:o,style:n,size:r,shape:i}=e,s=$({[`${t}-lg`]:r==="large",[`${t}-sm`]:r==="small"}),a=$({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),c=Xf.useMemo(()=>Ko(r)?{width:r,height:r,lineHeight:`${r}px`}:{},[r]);return Xf.createElement("span",{className:$(t,s,a,o),style:{...c,...n}})},Ms=q4;var G4=new ot("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),xv=e=>({height:e,lineHeight:Y(e)}),ks=e=>({width:e,...xv(e)}),X4=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:G4,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),hv=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...xv(e)}),Y4=e=>{let{skeletonAvatarCls:t,gradientFromColor:o,controlHeight:n,controlHeightLG:r,controlHeightSM:i}=e;return{[t]:{display:"inline-block",verticalAlign:"top",background:o,...ks(n)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...ks(r)},[`${t}${t}-sm`]:{...ks(i)}}},Z4=e=>{let{controlHeight:t,borderRadiusSM:o,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:i,gradientFromColor:s,calc:a}=e;return{[n]:{display:"inline-block",verticalAlign:"top",background:s,borderRadius:o,...hv(t,a)},[`${n}-lg`]:{...hv(r,a)},[`${n}-sm`]:{...hv(i,a)}}},_P=e=>{let{gradientFromColor:t,borderRadiusSM:o,imageSizeBase:n,calc:r}=e;return{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:t,borderRadius:o,...ks(r(n).mul(2).equal())}},Q4=e=>({[e.skeletonNodeCls]:{..._P(e)}}),J4=e=>{let{skeletonImageCls:t,imageSizeBase:o,calc:n}=e;return{[t]:{..._P(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...ks(o),maxWidth:n(o).mul(4).equal(),maxHeight:n(o).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}},[`${t}${t}-circle`]:{borderRadius:"50%"}}},yv=(e,t,o)=>{let{skeletonButtonCls:n}=e;return{[`${o}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${o}${n}-round`]:{borderRadius:t}}},bv=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...xv(e)}),eF=e=>{let{borderRadiusSM:t,skeletonButtonCls:o,controlHeight:n,controlHeightLG:r,controlHeightSM:i,gradientFromColor:s,calc:a}=e;return{[o]:{display:"inline-block",verticalAlign:"top",background:s,borderRadius:t,width:a(n).mul(2).equal(),minWidth:a(n).mul(2).equal(),...bv(n,a)},...yv(e,n,o),[`${o}-lg`]:{...bv(r,a)},...yv(e,r,`${o}-lg`),[`${o}-sm`]:{...bv(i,a)},...yv(e,i,`${o}-sm`)}},tF=e=>{let{componentCls:t,skeletonAvatarCls:o,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:i,skeletonInputCls:s,skeletonNodeCls:a,skeletonImageCls:c,controlHeight:l,controlHeightLG:d,controlHeightSM:u,gradientFromColor:m,padding:p,marginSM:g,borderRadius:f,titleHeight:h,blockRadius:b,paragraphLiHeight:x,controlHeightXS:y,paragraphMarginTop:S}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:p,verticalAlign:"top",[o]:{display:"inline-block",verticalAlign:"top",background:m,...ks(l)},[`${o}-circle`]:{borderRadius:"50%"},[`${o}-lg`]:{...ks(d)},[`${o}-sm`]:{...ks(u)}},[`${t}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:h,background:m,borderRadius:b,[`+ ${r}`]:{marginBlockStart:u}},[r]:{padding:0,"> li":{width:"100%",height:x,listStyle:"none",background:m,borderRadius:b,"+ li":{marginBlockStart:y}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-section`]:{[`${n}, ${r} > li`]:{borderRadius:f}}},[`${t}-with-avatar ${t}-section`]:{[n]:{marginBlockStart:g,[`+ ${r}`]:{marginBlockStart:S}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...eF(e),...Y4(e),...Z4(e),...Q4(e),...J4(e)},[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[s]:{width:"100%"}},[`${t}${t}-active`]:{[`
216
- ${n},
217
- ${r} > li,
218
- ${o},
219
- ${i},
220
- ${s},
221
- ${a},
222
- ${c}
223
- `]:{...X4(e)}}}},oF=e=>{let{colorFillContent:t,colorFill:o}=e,n=t,r=o;return{color:n,colorGradientEnd:r,gradientFromColor:n,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},di=Ye("Skeleton",e=>{let{componentCls:t,calc:o}=e,n=ze(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:o(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return tF(n)},oF,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]});var nF=e=>{let{prefixCls:t,className:o,classNames:n,rootClassName:r,active:i,style:s,styles:a,shape:c="circle",size:l,...d}=e,{getPrefixCls:u}=Ad.useContext(Oe),m=u("skeleton",t),[p,g]=di(m),f=Xt(b=>l??b),h=$(m,`${m}-element`,{[`${m}-active`]:i},n?.root,o,r,p,g);return Ad.createElement("div",{className:h,style:a?.root},Ad.createElement(Ms,{prefixCls:`${m}-avatar`,className:n?.content,style:{...a?.content,...s},shape:c,size:f,...d}))},FP=nF;var Ld=M(require("react"));var rF=e=>{let{prefixCls:t,className:o,rootClassName:n,classNames:r,active:i,style:s,styles:a,block:c=!1,size:l,...d}=e,{getPrefixCls:u}=Ld.useContext(Oe),m=u("skeleton",t),[p,g]=di(m),f=Xt(b=>l??b),h=$(m,`${m}-element`,{[`${m}-active`]:i,[`${m}-block`]:c},r?.root,o,n,p,g);return Ld.createElement("div",{className:h,style:a?.root},Ld.createElement(Ms,{prefixCls:`${m}-button`,className:r?.content,style:{...a?.content,...s},size:f,...d}))},zP=rF;var Na=M(require("react"));var Dd=M(require("react"));var iF=e=>{let{prefixCls:t,className:o,classNames:n,rootClassName:r,internalClassName:i,style:s,styles:a,active:c,children:l}=e,{getPrefixCls:d}=Dd.useContext(Oe),u=d("skeleton",t),[m,p]=di(u),g=$(u,`${u}-element`,{[`${u}-active`]:c},m,n?.root,o,r,p);return Dd.createElement("div",{className:g,style:a?.root},Dd.createElement("div",{className:$(n?.content,i||`${u}-node`),style:{...a?.content,...s}},l))},Yf=iF;var sF=e=>{let{getPrefixCls:t}=Na.useContext(Oe),o=t("skeleton",e.prefixCls);return Na.createElement(Yf,{...e,internalClassName:`${o}-image`},Na.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${o}-image-svg`,"aria-hidden":"true",focusable:"false"},Na.createElement("title",null,"Image placeholder"),Na.createElement("path",{d:"M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6",className:`${o}-image-path`})))},BP=sF;var _d=M(require("react"));var aF=e=>{let{prefixCls:t,className:o,classNames:n,rootClassName:r,active:i,block:s,style:a,styles:c,size:l,...d}=e,{getPrefixCls:u}=_d.useContext(Oe),m=u("skeleton",t),[p,g]=di(m),f=Xt(b=>l??b),h=$(m,`${m}-element`,{[`${m}-active`]:i,[`${m}-block`]:s},n?.root,o,r,p,g);return _d.createElement("div",{className:h,style:c?.root},_d.createElement(Ms,{prefixCls:`${m}-input`,className:n?.content,style:{...c?.content,...a},size:f,...d}))},HP=aF;var vv=M(require("react"));var lF=(e,t)=>{let{width:o,rows:n=2}=t;if(Array.isArray(o))return o[e];if(n-1===e)return o},cF=e=>{let{prefixCls:t,className:o,style:n,rows:r=0}=e,i=Array.from({length:r}).map((s,a)=>vv.createElement("li",{key:a,style:{width:lF(a,e)}}));return vv.createElement("ul",{className:$(t,o),style:n},i)},VP=cF;var WP=M(require("react"));var dF=({prefixCls:e,className:t,width:o,style:n})=>WP.createElement("h3",{className:$(e,t),style:{width:o,...n}}),jP=dF;function Sv(e){return st(e)?e:{}}function uF(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function mF(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function pF(e,t){let o={};return(!e||!t)&&(o.width="61%"),!e&&t?o.rows=3:o.rows=2,o}var Ul=ui.default.forwardRef((e,t)=>{let{prefixCls:o,loading:n,className:r,rootClassName:i,classNames:s,style:a,styles:c,children:l,avatar:d=!1,title:u=!0,paragraph:m=!0,active:p,round:g}=e,{getPrefixCls:f,direction:h,className:b,style:x,classNames:y,styles:S}=Xe("skeleton"),v=f("skeleton",o),[C,w]=di(v),R={...e,avatar:d,title:u,paragraph:m},T=_e(x),N=_e(a),[I,E]=Je([y,s],[S,T,c,N],{props:R}),k=ui.default.useRef(null);if(ui.default.useImperativeHandle(t,()=>({nativeElement:k.current})),n||!("loading"in e)){let F=!!d,A=!!u,z=!!m,D;if(F){let L={className:I.avatar,prefixCls:`${v}-avatar`,...uF(A,z),...Sv(d),style:E.avatar};D=ui.default.createElement("div",{className:$(I.header,`${v}-header`),style:E.header},ui.default.createElement(Ms,{...L}))}let _;if(A||z){let L;if(A){let H={className:I.title,prefixCls:`${v}-title`,...mF(F,z),...Sv(u),style:E.title};L=ui.default.createElement(jP,{...H})}let G;if(z){let H={className:I.paragraph,prefixCls:`${v}-paragraph`,...pF(F,A),...Sv(m),style:E.paragraph};G=ui.default.createElement(VP,{...H})}_=ui.default.createElement("div",{className:$(I.section,`${v}-section`),style:E.section},L,G)}let V=$(v,{[`${v}-with-avatar`]:F,[`${v}-active`]:p,[`${v}-rtl`]:h==="rtl",[`${v}-round`]:g},I.root,b,r,i,C,w);return ui.default.createElement("div",{ref:k,className:V,style:E.root},D,_)}return l??null});Ul.Button=zP;Ul.Avatar=FP;Ul.Input=HP;Ul.Image=BP;Ul.Node=Yf;var UP=Ul;var KP=UP;var Kl=M(require("react"));function qP(){}var fF=Kl.createContext({add:qP,remove:qP});function GP(e){let t=Kl.useContext(fF),o=Kl.useRef(null);return Ne(r=>{if(r){let i=e?r.querySelector(e):r;i&&(t.add(i),o.current=i)}else t.remove(o.current)})}var mi=M(require("react"));var Zf=M(require("react"));var gF=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:o}=(0,Zf.useContext)(Fi),n=r=>{o?.(r),e?.onClick?.(r)};return Zf.default.createElement(ni,{...e,onClick:n},t)},Cv=gF;var Qf=M(require("react"));var hF=()=>{let{confirmLoading:e,okButtonProps:t,okType:o,okTextLocale:n,onOk:r}=(0,Qf.useContext)(Fi);return Qf.default.createElement(ni,{...bp(o),loading:e,onClick:r,...t},n)},wv=hF;function Jf(e,t){return mi.default.createElement("span",{className:`${e}-close-x`},lo(t)?t:mi.default.createElement(Zn,{className:`${e}-close-icon`}))}var eg=e=>{let{okText:t,okType:o="primary",cancelText:n,confirmLoading:r,onOk:i,onCancel:s,okButtonProps:a,cancelButtonProps:c,footer:l}=e,[d]=qo("Modal",bm()),u=Qt(t,d?.okText),m=Qt(n,d?.cancelText),p=mi.default.useMemo(()=>({confirmLoading:r,okButtonProps:a,cancelButtonProps:c,okTextLocale:u,cancelTextLocale:m,okType:o,onOk:i,onCancel:s}),[r,a,c,u,m,o,i,s]),g;return ct(l)||typeof l>"u"?(g=mi.default.createElement(mi.default.Fragment,null,mi.default.createElement(Cv,null),mi.default.createElement(wv,null)),ct(l)&&(g=l(g,{OkBtn:wv,CancelBtn:Cv})),g=mi.default.createElement(jf,{value:p},g)):g=l,mi.default.createElement(qm,{disabled:!1},g)};var yF=e=>{let{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},bF=e=>{let{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},xF=(e,t)=>{let{componentCls:o,gridColumns:n,antCls:r}=e,[i,s]=Gt(r,"grid"),[,a]=Gt(r,"col"),c={};for(let l=n;l>=0;l--)l===0?(c[`${o}${t}-${l}`]={display:"none"},c[`${o}-push-${l}`]={insetInlineStart:"auto"},c[`${o}-pull-${l}`]={insetInlineEnd:"auto"},c[`${o}${t}-push-${l}`]={insetInlineStart:"auto"},c[`${o}${t}-pull-${l}`]={insetInlineEnd:"auto"},c[`${o}${t}-offset-${l}`]={marginInlineStart:0},c[`${o}${t}-order-${l}`]={order:0}):(c[`${o}${t}-${l}`]=[{[i("display")]:"block",display:"block"},{display:s("display"),flex:`0 0 ${l/n*100}%`,maxWidth:`${l/n*100}%`}],c[`${o}${t}-push-${l}`]={insetInlineStart:`${l/n*100}%`},c[`${o}${t}-pull-${l}`]={insetInlineEnd:`${l/n*100}%`},c[`${o}${t}-offset-${l}`]={marginInlineStart:`${l/n*100}%`},c[`${o}${t}-order-${l}`]={order:l});return c[`${o}${t}-flex`]={flex:a(`${t.replace(/-/,"")}-flex`)},c},Rv=(e,t)=>xF(e,t),vF=(e,t,o)=>({[`@media (min-width: ${Y(t)})`]:{...Rv(e,o)}}),SF=()=>({}),CF=()=>({}),Uye=Ye("Grid",yF,SF),Ev=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),Kye=Ye("Grid",e=>{let t=ze(e,{gridColumns:24}),o=Ev(t);return delete o.xs,[bF(t),Rv(t,""),Rv(t,"-xs"),Object.keys(o).map(n=>vF(t,o[n],`-${n}`)).reduce((n,r)=>({...n,...r}),{})]},CF);function XP(e){return{position:e,inset:0}}var wF=e=>{let{componentCls:t,antCls:o}=e;return[{[`${t}-root`]:{[`${t}${o}-zoom-enter, ${t}${o}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${o}-zoom-leave ${t}-container`]:{pointerEvents:"none"},[`${t}-mask`]:{...XP("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`&${t}-mask-blur`]:{backdropFilter:"blur(4px)"},[`${t}-hidden`]:{display:"none"}},[`${t}-wrap`]:{...XP("fixed"),zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"}}},{[`${t}-root`]:td(e)}]},RF=e=>{let{componentCls:t,motionDurationMid:o}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${Y(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...Et(e),pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${Y(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto","&:focus-visible":{borderRadius:e.borderRadiusLG,...An(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-container`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:{position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:["color","background-color"].map(n=>`${n} ${o}`).join(", "),"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:Y(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive},...ln(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${Y(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}}},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-container,
224
- ${t}-body,
225
- ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},EF=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},$F=e=>{let{componentCls:t}=e,o=Ev(e),n={...o};delete n.xs;let r=`--${t.replace(".","")}-`,i=Object.keys(n).map(s=>({[`@media (min-width: ${Y(n[s])})`]:{width:`var(${r}${s}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(Zt(Object.keys(o).map((s,a)=>{let c=Object.keys(o)[a-1];return c?{[`${r}${s}-width`]:`var(${r}${c}-width)`}:null})),[{width:`var(${r}xs-width)`}],Zt(i))}}},$v=e=>{let t=e.padding,o=e.fontSizeHeading5,n=e.lineHeightHeading5;return ze(e,{modalHeaderHeight:e.calc(e.calc(n).mul(o).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},Iv=e=>({footerBg:"transparent",headerBg:"transparent",titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${Y(e.paddingMD)} ${Y(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${Y(e.padding)} ${Y(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${Y(e.paddingXS)} ${Y(e.padding)}`:0,footerBorderTop:e.wireframe?`${Y(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${Y(e.padding*2)} ${Y(e.padding*2)} ${Y(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),tg=Ye("Modal",e=>{let t=$v(e);return[RF(t),EF(t),wF(t),Pi(t,"zoom"),$F(t)]},Iv,{unitless:{titleLineHeight:!0}});var Nv,IF=e=>{Nv={x:e.pageX,y:e.pageY},setTimeout(()=>{Nv=null},100)};LP()&&document.documentElement.addEventListener("click",IF,!0);var NF=e=>{let{prefixCls:t,className:o,rootClassName:n,open:r,wrapClassName:i,centered:s,getContainer:a,style:c,width:l=520,footer:d,classNames:u,styles:m,children:p,loading:g,confirmLoading:f,zIndex:h,mousePosition:b,onOk:x,onCancel:y,okButtonProps:S,cancelButtonProps:v,destroyOnHidden:C,destroyOnClose:w,panelRef:R=null,closable:T,mask:N,modalRender:I,maskClosable:E,_semanticOmit:k,scrollLock:F,focusTriggerAfterClose:A,focusable:z,_renderSemanticContent:D,..._}=e,{getPopupContainer:V,getPrefixCls:L,direction:G,className:H,style:W,classNames:Z,styles:B,centered:K,cancelButtonProps:j,okButtonProps:Q,mask:X,focusable:U}=Xe("modal"),{modal:J}=Hn.useContext(Oe),[P,O]=Hn.useMemo(()=>typeof T=="boolean"?[void 0,void 0]:[T?.afterClose,T?.onClose],[T]),q=L("modal",t),ee=L(),[le,re,ie]=I1(N,X,q,E),Ce=gv({...U,...z},le,A),de=Fe=>{f||(y?.(Fe),O?.())},$e=Fe=>{x?.(Fe),O?.()},ae=oo(q),[Pe,he]=tg(q,ae),ne=$(i,{[`${q}-centered`]:s??K,[`${q}-wrap-rtl`]:G==="rtl"}),fe=d!==null&&!g?Hn.createElement(eg,{...e,okButtonProps:{...Q,...S},onOk:$e,cancelButtonProps:{...j,...v},onCancel:de}):null,[ce,Re,De,we]=E1(xb(e),xb(J),{closable:!0,closeIcon:Hn.createElement(Zn,{className:`${q}-close-icon`}),closeIconRender:Fe=>Jf(q,Fe)}),pe=ce?{disabled:De,closeIcon:Re,afterClose:P,...we}:!1,ue=I?Fe=>Hn.createElement("div",{className:`${q}-render`},I(Fe)):void 0,se=`.${q}-${I?"render":"container"}`,Se=GP(se),Ie=Mt(R,Se),[Te,qe]=ti("Modal",h),Ge={...e,width:l,panelRef:R,focusTriggerAfterClose:Ce.focusTriggerAfterClose,focusable:Ce,mask:le,maskClosable:ie,zIndex:Te},[mt,Ze]=Je([Z,u,re],[B,m],{props:Ge}),$t=k?Ke(mt,k):mt,wt=k?Ke(Ze,k):Ze,gt=D?D({classNames:mt,styles:Ze}):p,[ht,yt]=Hn.useMemo(()=>st(l)?[void 0,l]:[l,void 0],[l]),Rt=Hn.useMemo(()=>{let Fe={};return yt&&Object.keys(yt).forEach(xt=>{let be=yt[xt];Pn(be)&&(Fe[`--${q}-${xt}-width`]=Ko(be)?`${be}px`:be)}),Fe},[q,yt]);return Hn.createElement(Wr,{form:!0,space:!0},Hn.createElement(ls.Provider,{value:qe},Hn.createElement(AP,{width:ht,..._,zIndex:Te,getContainer:a===void 0?V:a,prefixCls:q,rootClassName:$(Pe,n,he,ae,$t.root),rootStyle:wt.root,footer:fe,visible:r,mousePosition:b??Nv,onClose:de,closable:pe,closeIcon:Re,transitionName:yr(ee,"zoom",e.transitionName),maskTransitionName:yr(ee,"fade",e.maskTransitionName),mask:le,maskClosable:ie,scrollLock:F,className:$(Pe,o,H),style:{...W,...c,...Rt},classNames:{...$t,wrapper:$($t.wrapper,ne)},styles:wt,panelRef:Ie,destroyOnHidden:C??w,modalRender:ue,focusTriggerAfterClose:Ce.focusTriggerAfterClose,focusTrap:Ce.trap},g?Hn.createElement(KP,{active:!0,title:!1,paragraph:{rows:4},className:`${q}-body-skeleton`}):gt)))},og=NF;var PF=e=>{let{componentCls:t,titleFontSize:o,titleLineHeight:n,modalConfirmIconSize:r,fontSize:i,lineHeight:s,modalTitleHeight:a,fontHeight:c,confirmBodyPadding:l}=e,d=`${t}-confirm`;return{[d]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${d}-body-wrapper`]:{...da()},[`&${t} ${t}-body`]:{padding:l},[`${d}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:r,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(r).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(a).sub(r).equal()).div(2).equal()}},[`${d}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${Y(e.marginSM)})`},[`${d}-body-no-icon ${d}-paragraph`]:{maxWidth:"100%"},[`${e.iconCls} + ${d}-paragraph`]:{maxWidth:`calc(100% - ${Y(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${d}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:o,lineHeight:n},[`${d}-container`]:{color:e.colorText,fontSize:i,lineHeight:s},[`${d}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${d}-error ${d}-body > ${e.iconCls}`]:{color:e.colorError},[`${d}-warning ${d}-body > ${e.iconCls},
226
- ${d}-confirm ${d}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${d}-info ${d}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${d}-success ${d}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},YP=Jc(["Modal","confirm"],e=>{let t=$v(e);return PF(t)},Iv,{order:-1e3});var TF=["body"],Pv=e=>{let{prefixCls:t,icon:o,okText:n,cancelText:r,confirmPrefixCls:i,type:s,okCancel:a,footer:c,locale:l,autoFocusButton:d,focusable:u,contentClassName:m,contentStyle:p,...g}=e,{infoIcon:f,successIcon:h,errorIcon:b,warningIcon:x}=Xe("modal"),y=o;if(o===void 0)switch(s){case"info":y=Qt(f,Vt.createElement(wP,null));break;case"success":y=Qt(h,Vt.createElement(Bf,null));break;case"error":y=Qt(b,Vt.createElement(as,null));break;default:y=Qt(x,Vt.createElement(SP,null))}let S=a??s==="confirm",v=Vt.useMemo(()=>{let D=u?.autoFocusButton||d;return D||D===null?D:"ok"},[d,u?.autoFocusButton]),[C]=qo("Modal"),w=l||C,R=Qt(n,S?w?.okText:w?.justOkText),T=Qt(r,w?.cancelText),{closable:N}=g,{onClose:I}=st(N)?N:{},E=Vt.useMemo(()=>({autoFocusButton:v,cancelTextLocale:T,okTextLocale:R,mergedOkCancel:S,onClose:I,...g}),[v,T,R,S,I,g]),k=Vt.createElement(Vt.Fragment,null,Vt.createElement(av,null),Vt.createElement(lv,null)),F=lo(e.title),A=lo(y),z=`${i}-body`;return Vt.createElement("div",{className:`${i}-body-wrapper`},Vt.createElement("div",{className:$(z,{[`${z}-has-title`]:F,[`${z}-no-icon`]:!A})},y,Vt.createElement("div",{className:`${i}-paragraph`},F&&Vt.createElement("span",{className:`${i}-title`},e.title),Vt.createElement("div",{className:$(`${i}-content`,m),style:p},e.content))),c===void 0||ct(c)?Vt.createElement(jf,{value:E},Vt.createElement("div",{className:`${i}-btns`},ct(c)?c(k,{OkBtn:lv,CancelBtn:av}):k)):c,Vt.createElement(YP,{prefixCls:t}))},MF=e=>{let{close:t,zIndex:o,maskStyle:n,direction:r,prefixCls:i,wrapClassName:s,rootPrefixCls:a,bodyStyle:c,closable:l=!1,onConfirm:d,styles:u,title:m,mask:p,maskClosable:g,okButtonProps:f,cancelButtonProps:h}=e,{cancelButtonProps:b,okButtonProps:x}=Xe("modal"),y=`${i}-confirm`,S=e.width||416,v=e.style||{},C=ct(u)?E=>({body:c,mask:n,...u(E)}):{body:c,mask:n,...u},w=Ke(e,["bodyStyle","maskStyle"]),R=$(y,`${y}-${e.type}`,{[`${y}-rtl`]:r==="rtl"},e.className),T=Vt.useMemo(()=>{let E=pp(p,g);return E.closable??(E.closable=!1),E},[p,g]),[,N]=qt(),I=Vt.useMemo(()=>o!==void 0?o:N.zIndexPopupBase+vb,[o,N]);return Vt.createElement(og,{...w,className:R,wrapClassName:$({[`${y}-centered`]:!!e.centered},s),onCancel:()=>{t?.({triggerCancel:!0}),d?.(!1)},title:m,footer:null,transitionName:yr(a||"","zoom",e.transitionName),maskTransitionName:yr(a||"","fade",e.maskTransitionName),mask:T,style:v,styles:C,width:S,zIndex:I,closable:l,_semanticOmit:TF,_renderSemanticContent:({classNames:E,styles:k})=>Vt.createElement(Pv,{...e,confirmPrefixCls:y,okButtonProps:{...x,...f},cancelButtonProps:{...b,...h},contentClassName:E.body,contentStyle:k.body})})},kF=e=>{let{rootPrefixCls:t,iconPrefixCls:o,direction:n,theme:r}=e;return Vt.createElement(ss,{prefixCls:t,iconPrefixCls:o,direction:n,theme:r},Vt.createElement(MF,{...e}))},ng=kF;var OF=[],pi=OF;var ZP="";function QP(){return ZP}var AF=e=>{let{prefixCls:t,getContainer:o,direction:n}=e,r=bm(),i=(0,ql.useContext)(Oe),s=QP()||i.getPrefixCls(),a=t||`${s}-modal`,c=o;return c===!1&&(c=void 0),ql.default.createElement(ng,{...e,rootPrefixCls:s,prefixCls:a,iconPrefixCls:i.iconPrefixCls,theme:i.theme,direction:n??i.direction,locale:i.locale?.Modal??r,getContainer:c})};function Pa(e){let t=e1(),o=document.createDocumentFragment(),n={...e,close:a,open:!0},r;function i(...l){l.some(u=>u?.triggerCancel)&&e.onCancel?.(()=>{},...l.slice(1));for(let u=0;u<pi.length;u++)if(pi[u]===a){pi.splice(u,1);break}Ic(o).then(()=>{})}let s=l=>{clearTimeout(r),r=setTimeout(()=>{let d=t.getPrefixCls(void 0,QP()),u=t.getIconPrefixCls(),m=t.getTheme(),p=ql.default.createElement(AF,{...l});$c(ql.default.createElement(ss,{prefixCls:d,iconPrefixCls:u,theme:m},ct(t.holderRender)?t.holderRender(p):p),o)})};function a(...l){n={...n,open:!1,afterClose:()=>{ct(e.afterClose)&&e.afterClose(),i.apply(this,l)}},s(n)}function c(l){ct(l)?n=l(n):n={...n,...l},s(n)}return s(n),pi.push(a),{destroy:a,update:c}}function rg(e){return{...e,type:"warning"}}function ig(e){return{...e,type:"info"}}function sg(e){return{...e,type:"success"}}function ag(e){return{...e,type:"error"}}function lg(e){return{...e,type:"confirm"}}function JP({rootPrefixCls:e}){ZP=e}var Gl=M(require("react"));var LF=e=>{let{prefixCls:t,className:o,closeIcon:n,closable:r,type:i,title:s,children:a,footer:c,style:l,classNames:d,styles:u,...m}=e,{getPrefixCls:p}=Gl.useContext(Oe),{className:g,style:f,classNames:h,styles:b}=Xe("modal"),x=p(),y=t||p("modal"),S=oo(x),[v,C]=tg(y,S),w=_e(f),R=_e(l),[T,N]=Je([h,d],[b,w,u,R],{props:e}),I=`${y}-confirm`,E={};return i?E={closable:r??!1,title:"",footer:"",children:Gl.createElement(Pv,{...e,prefixCls:y,confirmPrefixCls:I,rootPrefixCls:x,content:a})}:E={closable:r??!0,title:s,footer:c!==null&&Gl.createElement(eg,{...e}),children:a},Gl.createElement(kd,{prefixCls:y,className:$(v,`${y}-pure-panel`,i&&I,i&&`${I}-${i}`,o,g,C,S,T.root),style:N.root,...m,closeIcon:Jf(y,n),closable:r,classNames:T,styles:N,...E})},eT=dx(LF);var io=M(require("react"));var jr=M(require("react"));var DF=jr.forwardRef((e,t)=>{let{afterClose:o,config:n,...r}=e,[i,s]=jr.useState(!0),[a,c]=jr.useState(n),{direction:l,getPrefixCls:d}=jr.useContext(Oe),u=d("modal"),m=d(),p=()=>{o(),a.afterClose?.()},g=(...b)=>{s(!1),b.some(y=>y?.triggerCancel)&&a.onCancel?.(()=>{},...b.slice(1))};jr.useImperativeHandle(t,()=>({destroy:g,update:b=>{c(x=>{let y=ct(b)?b(x):b;return{...x,...y}})}}));let f=a.okCancel??a.type==="confirm",[h]=qo("Modal",Yn.Modal);return jr.createElement(ng,{prefixCls:u,rootPrefixCls:m,...a,close:g,open:i,afterClose:p,okText:Qt(a.okText,f?h?.okText:h?.justOkText),direction:a.direction||l,cancelText:Qt(a.cancelText,h?.cancelText),...r})}),tT=DF;var oT=0,_F=io.memo(io.forwardRef((e,t)=>{let[o,n]=T1();return io.useImperativeHandle(t,()=>({patchElement:n}),[n]),io.createElement(io.Fragment,null,o)}));function FF(){let e=io.useRef(null),[t,o]=io.useState([]);io.useEffect(()=>{t.length&&(Zt(t).forEach(s=>{s()}),o([]))},[t]);let n=io.useCallback(i=>function(a){oT+=1;let c=io.createRef(),l,d=new Promise(f=>{l=f}),u=!1,m,p=io.createElement(tT,{key:`modal-${oT}`,config:i(a),ref:c,afterClose:()=>{m?.()},isSilent:()=>u,onConfirm:f=>{l(f)}});return m=e.current?.patchElement(p),m&&pi.push(m),{destroy:()=>{function f(){c.current?.destroy()}c.current?f():o(h=>[].concat(Zt(h),[f]))},update:f=>{function h(){c.current?.update(f)}c.current?h():o(b=>[].concat(Zt(b),[h]))},then:f=>(u=!0,d.then(f))}},[]);return[io.useMemo(()=>({info:n(ig),success:n(sg),error:n(ag),warning:n(rg),confirm:n(lg)}),[n]),io.createElement(_F,{key:"modal-holder",ref:e})]}var nT=FF;function rT(e){return Pa(rg(e))}var Ur=og;Ur.useModal=nT;Ur.info=function(t){return Pa(ig(t))};Ur.success=function(t){return Pa(sg(t))};Ur.error=function(t){return Pa(ag(t))};Ur.warning=rT;Ur.warn=rT;Ur.confirm=function(t){return Pa(lg(t))};Ur.destroyAll=function(){for(;pi.length;){let t=pi.pop();t&&t()}};Ur.config=JP;Ur._InternalPanelDoNotUseOrYouWillBeFired=eT;var iT=Ur;var en=M(require("react"));var cg=M(require("react"));var zF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},sT=zF;function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Tv.apply(this,arguments)}var BF=(e,t)=>cg.createElement(kt,Tv({},e,{ref:t,icon:sT})),HF=cg.forwardRef(BF),dg=HF;var Ta=M(require("react"));var WF=M(require("react"));var Fd=require("react"),Mv={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,railColor:"#D9D9D9",railWidth:1,gapPosition:"bottom",loading:!1},kv=()=>{let e=(0,Fd.useRef)([]),t=(0,Fd.useRef)(null);return(0,Fd.useEffect)(()=>{let o=Date.now(),n=!1;e.current.forEach(r=>{if(!r)return;n=!0;let i=r.style;i.transitionDuration=".3s, .3s, .3s, .06s",t.current&&o-t.current<100&&(i.transitionDuration="0s, 0s")}),n&&(t.current=Date.now())}),e.current};var VF=M(require("react"));var zd=M(require("react"));var Rr=M(require("react"));var aT=({bg:e,children:t})=>Rr.createElement("div",{style:{width:"100%",height:"100%",background:e}},t);function lT(e,t){return Object.keys(e).map(o=>{let n=parseFloat(o),r=`${Math.floor(n*t)}%`;return`${e[o]} ${r}`})}var jF=Rr.forwardRef((e,t)=>{let{prefixCls:o,color:n,gradientId:r,radius:i,className:s,style:a,ptg:c,strokeLinecap:l,strokeWidth:d,size:u,gapDegree:m}=e,p=n&&typeof n=="object",g=p?"#FFF":void 0,f=u/2,h=Rr.createElement("circle",{className:$(`${o}-circle-path`,s),r:i,cx:f,cy:f,stroke:g,strokeLinecap:l,strokeWidth:d,opacity:c===0?0:1,style:a,ref:t});if(!p)return h;let b=`${r}-conic`,x=m?`${180+m/2}deg`:"0deg",y=lT(n,(360-m)/360),S=lT(n,1),v=`conic-gradient(from ${x}, ${y.join(", ")})`,C=`linear-gradient(to ${m?"bottom":"top"}, ${S.join(", ")})`;return Rr.createElement(Rr.Fragment,null,Rr.createElement("mask",{id:b},h),Rr.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:`url(#${b})`},Rr.createElement(aT,{bg:C},Rr.createElement(aT,{bg:v}))))}),cT=jF;var ug=(e,t,o,n,r,i,s,a,c,l,d=0)=>{let u=o/100*360*((360-i)/360),m=i===0?0:{bottom:0,top:180,left:90,right:-90}[s],p=(100-n)/100*t;c==="round"&&n!==100&&(p+=l/2,p>=t&&(p=t-.01));let g=100/2;return{stroke:typeof a=="string"?a:void 0,strokeDasharray:`${t}px ${e}`,strokeDashoffset:p+d,transform:`rotate(${r+u+m}deg)`,transformOrigin:`${g}px ${g}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}};var dT=M(require("react")),uT=({id:e,loading:t})=>{if(!t)return{indeterminateStyleProps:{},indeterminateStyleAnimation:null};let o=`${e}-indeterminate-animate`;return{indeterminateStyleProps:{transform:"rotate(0deg)",animation:`${o} 1s linear infinite`},indeterminateStyleAnimation:dT.default.createElement("style",null,`@keyframes ${o} {
227
- 0% { transform: rotate(0deg); }
228
- 100% { transform: rotate(360deg); }
229
- }`)}};function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Ov.apply(this,arguments)}function mT(e){let t=e??[];return Array.isArray(t)?t:[t]}var UF=e=>{let{id:t,prefixCls:o,classNames:n={},styles:r={},steps:i,strokeWidth:s,railWidth:a,gapDegree:c=0,gapPosition:l,railColor:d,strokeLinecap:u,style:m,className:p,strokeColor:g,percent:f,loading:h,...b}={...Mv,...e},x=100/2,y=Co(t),S=`${y}-gradient`,v=x-s/2,C=Math.PI*2*v,w=c>0?90+c/2:-90,R=C*((360-c)/360),{count:T,gap:N}=typeof i=="object"?i:{count:i,gap:2},I=mT(f),E=mT(g),k=E.find(H=>H&&typeof H=="object"),A=k&&typeof k=="object"?"butt":u,{indeterminateStyleProps:z,indeterminateStyleAnimation:D}=uT({id:y,loading:h}),_=ug(C,R,0,100,w,c,l,d,A,s),V=kv(),L=()=>{let H=0;return I.map((W,Z)=>{let B=E[Z]||E[E.length-1],K=ug(C,R,H,W,w,c,l,B,A,s);return H+=W,zd.createElement(cT,{key:Z,color:B,ptg:W,radius:v,prefixCls:o,gradientId:S,className:n.track,style:{...K,...z,...r.track},strokeLinecap:A,strokeWidth:s,gapDegree:c,ref:j=>{V[Z]=j},size:100})}).reverse()},G=()=>{let H=Math.round(T*(I[0]/100)),W=100/T,Z=0;return new Array(T).fill(null).map((B,K)=>{let j=K<=H-1?E[0]:d,Q=j&&typeof j=="object"?`url(#${S})`:void 0,X=ug(C,R,Z,W,w,c,l,j,"butt",s,N);return Z+=(R-X.strokeDashoffset+N)*100/R,zd.createElement("circle",{key:K,className:$(`${o}-circle-path`,n.track),r:v,cx:x,cy:x,stroke:Q,strokeWidth:s,opacity:1,style:{...X,...r.track},ref:U=>{V[K]=U}})})};return zd.createElement("svg",Ov({className:$(`${o}-circle`,n.root,p),viewBox:`0 0 ${100} ${100}`,style:{...r.root,...m},id:t,role:"presentation"},b),!T&&zd.createElement("circle",{className:$(`${o}-circle-rail`,n.rail),r:v,cx:x,cy:x,stroke:d,strokeLinecap:A,strokeWidth:a||s,style:{..._,...r.rail}}),T?G():L(),D)},Av=UF;function Bi(e){return!e||e<0?0:e>100?100:e}function Xl({success:e}){let t;return e&&"percent"in e&&(t=e.percent),t}var pT=({percent:e,success:t})=>{let o=Bi(Xl({success:t}));return[o,Bi(Bi(e)-o)]},fT=({success:e={},strokeColor:t})=>{let{strokeColor:o}=e;return[o||xi.green,t||null]},Os=(e,t,o)=>{let n=-1,r=-1;if(t==="step"){let i=o.steps,s=o.strokeWidth;typeof e=="string"||typeof e>"u"?(n=e==="small"?2:14,r=s??8):Ko(e)?[n,r]=[e,e]:[n=14,r=8]=Array.isArray(e)?e:[e.width,e.height],n*=i}else if(t==="line"){let i=o?.strokeWidth;typeof e=="string"||typeof e>"u"?r=i||(e==="small"?6:8):Ko(e)?[n,r]=[e,e]:[n=-1,r=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[n,r]=e==="small"?[60,60]:[120,120]:Ko(e)?[n,r]=[e,e]:Array.isArray(e)&&(n=e[0]??e[1]??120,r=e[0]??e[1]??120));return[n,r]};var KF=3,qF=e=>KF/e*100,gT=["root","body","indicator"],GF=e=>{let{prefixCls:t,classNames:o,styles:n,railColor:r,trailColor:i,strokeLinecap:s="round",gapPosition:a,gapPlacement:c,gapDegree:l,width:d=120,type:u,children:m,success:p,size:g=d,steps:f}=e,{direction:h}=Xe("progress"),b=r??i,[x,y]=Os(g,"circle"),{strokeWidth:S}=e;S===void 0&&(S=Math.max(qF(x),6));let v={width:x,height:y,fontSize:x*.15+6},C=Ta.useMemo(()=>{if(l||l===0)return l;if(u==="dashboard")return 75},[l,u]),w=pT(e),R=Ta.useMemo(()=>{let A=(c??a)||u==="dashboard"&&"bottom"||void 0,z=h==="rtl";switch(A){case"start":return z?"right":"left";case"end":return z?"left":"right";default:return A}},[h,c,a,u]),T=st(e.strokeColor),N=fT({success:p,strokeColor:e.strokeColor}),I=$(`${t}-body`,{[`${t}-circle-gradient`]:T},o.body),E=Ta.createElement(Av,{steps:f,percent:f?w[1]:w,strokeWidth:S,railWidth:S,strokeColor:f?N[1]:N,strokeLinecap:s,railColor:b,prefixCls:t,gapDegree:C,gapPosition:R,classNames:Ke(o,gT),styles:Ke(n,gT)}),k=x<=20,F=Ta.createElement("div",{className:I,style:{...v,...n.body}},E,!k&&m);return k?Ta.createElement(Hl,{title:m},F):F},hT=GF;var Bd=M(require("react"));var pg="--progress-line-stroke-color",XF=e=>{let t=e?"100%":"-100%";return new ot(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},YF=e=>{let{componentCls:t,iconCls:o}=e;return{[t]:{...Et(e),display:"inline-flex","&-rtl":{direction:"rtl"},[`${t}-indicator`]:{color:e.colorText,lineHeight:1,whiteSpace:"nowrap",verticalAlign:"middle",wordBreak:"normal",[o]:{fontSize:e.fontSize}},[`&${t}-status-exception`]:{[`${t}-indicator`]:{color:e.colorError}},[`&${t}-status-success`]:{[`${t}-indicator`]:{color:e.colorSuccess}}}}},ZF=e=>{let{componentCls:t}=e;return{[`${t}-line`]:{position:"relative",width:"100%",fontSize:e.fontSize,[`${t}-body`]:{display:"inline-flex",alignItems:"center",width:"100%",gap:e.marginXS},[`${t}-rail`]:{flex:"auto",background:e.remainingColor,borderRadius:e.lineBorderRadius,position:"relative",width:"100%",overflow:"hidden"},[`&${t}-status-active`]:{[`${t}-track:after`]:{content:'""',position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:"inherit",opacity:0,animationName:XF(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite"}},[`${t}-track`]:{position:"absolute",insetInlineStart:0,insetBlock:0,borderRadius:"inherit",background:e.defaultColor,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,minWidth:"max-content",display:"flex",alignItems:"center","&-success":{background:e.colorSuccess}},[`&${t}-status-exception`]:{[`${t}-track`]:{background:e.colorError}},[`&${t}-status-success`]:{[`${t}-track`]:{background:e.colorSuccess}},[`${t}-indicator-outer`]:{[`&${t}-indicator-start`]:{order:-1}},[`${t}-body-layout-bottom`]:{flexDirection:"column",alignItems:"center",gap:e.marginXXS},[`${t}-indicator${t}-indicator-inner`]:{color:e.colorWhite,paddingInline:e.paddingXXS,width:"100%",display:"flex",justifyContent:"center",[`&${t}-indicator-end`]:{justifyContent:"end"},[`&${t}-indicator-start`]:{justifyContent:"start"},[`&${t}-indicator-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}}},QF=e=>{let{componentCls:t,iconCls:o}=e;return{[`${t}-circle`]:{[`${t}-circle-rail`]:{stroke:e.remainingColor},[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-body`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`${t}-indicator`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[o]:{fontSize:e.circleIconFontSize}},[`&${t}-status-exception`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}}},[`&${t}-status-success`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},JF=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-body":{display:"flex",flexDirection:"row",alignItems:"center",gap:e.progressStepMarginInlineEnd,[`${t}-indicator`]:{marginInlineStart:e.marginXS}},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},ez=e=>{let{componentCls:t,iconCls:o}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-indicator ${o}`]:{fontSize:e.fontSizeSM}}}},tz=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),yT=Ye("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),o=ze(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[YF(o),ZF(o),QF(o),JF(o),ez(o)]},tz);var oz=e=>{let t=[];return Object.keys(e).forEach(o=>{let n=Number.parseFloat(o.replace(/%/g,""));Number.isNaN(n)||t.push({key:n,value:e[o]})}),t=t.sort((o,n)=>o.key-n.key),t.map(({key:o,value:n})=>`${n} ${o}%`).join(", ")},nz=(e,t)=>{let{from:o=xi.blue,to:n=xi.blue,direction:r=t==="rtl"?"to left":"to right",...i}=e;if(Object.keys(i).length!==0){let a=oz(i),c=`linear-gradient(${r}, ${a})`;return{background:c,[pg]:c}}let s=`linear-gradient(${r}, ${o}, ${n})`;return{background:s,[pg]:s}},rz=e=>{let{prefixCls:t,classNames:o,styles:n,direction:r,percent:i,size:s,strokeWidth:a,strokeColor:c,strokeLinecap:l="round",children:d,railColor:u,trailColor:m,percentPosition:p,success:g}=e,{align:f,type:h}=p,b=u??m,x=l==="square"||l==="butt"?0:void 0,y=s??[-1,a||(s==="small"?6:8)],[S,v]=Os(y,"line",{strokeWidth:a}),C={backgroundColor:b||void 0,borderRadius:x,height:v},w=`${t}-track`,R=c&&typeof c!="string"?nz(c,r):{[pg]:c,background:c},T={width:`${Bi(i)}%`,height:v,borderRadius:x,...R},N=Xl(e),I={width:`${Bi(N)}%`,height:v,borderRadius:x,backgroundColor:g?.strokeColor};return Bd.createElement("div",{className:$(`${t}-body`,o.body,{[`${t}-body-layout-bottom`]:f==="center"&&h==="outer"}),style:{width:S>0?S:"100%",...n.body}},Bd.createElement("div",{className:$(`${t}-rail`,o.rail),style:{...C,...n.rail}},Bd.createElement("div",{className:$(w,o.track),style:{...T,...n.track}},h==="inner"&&d),N!==void 0&&Bd.createElement("div",{className:$(w,`${w}-success`,o.track),style:{...I,...n.track}})),h==="outer"&&d)},bT=rz;var Lv=M(require("react"));var iz=e=>{let{classNames:t,styles:o,size:n,steps:r,rounding:i=Math.round,percent:s=0,strokeWidth:a=8,strokeColor:c,railColor:l,trailColor:d,prefixCls:u,children:m}=e,p=i(r*(s/100)),f=n??[n==="small"?2:14,a],[h,b]=Os(f,"step",{steps:r,strokeWidth:a}),x=h/r,y=Array.from({length:r}),S=l??d;for(let v=0;v<r;v++){let C=Array.isArray(c)?c[v]:c;y[v]=Lv.createElement("div",{key:v,className:$(`${u}-steps-item`,{[`${u}-steps-item-active`]:v<=p-1},t.track),style:{backgroundColor:v<=p-1?C:S,width:x,height:b,...o.track}})}return Lv.createElement("div",{className:$(`${u}-steps-body`,t.body),style:o.body},y,m)},xT=iz;var sz=["normal","exception","active","success"],az=en.forwardRef((e,t)=>{let{prefixCls:o,className:n,rootClassName:r,classNames:i,styles:s,steps:a,strokeColor:c,percent:l=0,size:d="medium",showInfo:u=!0,type:m="line",status:p,format:g,style:f,percentPosition:h={},...b}=e,{align:x="end",type:y="outer"}=h,S=Array.isArray(c)?c[0]:c,v=typeof c=="string"||Array.isArray(c)?c:void 0,C=en.useMemo(()=>{if(S){let X=typeof S=="string"?S:Object.values(S)[0];return new pt(X).isLight()}return!1},[c]),w=en.useMemo(()=>{let X=Xl(e);return Number.parseInt(X!==void 0?(X??0)?.toString():(l??0)?.toString(),10)},[l,e.success]),R=en.useMemo(()=>!sz.includes(p)&&w>=100?"success":p||"normal",[p,w]),{getPrefixCls:T,direction:N,className:I,style:E,classNames:k,styles:F}=Xe("progress"),A=T("progress",o),[z,D]=yT(A),_={...e,percent:l,type:m,size:d,showInfo:u,percentPosition:h},V=_e(E),L=_e(f),[G,H]=Je([k,i],[F,V,s,L],{props:_}),W=m==="line",Z=W&&!a,B=en.useMemo(()=>{if(!u)return null;let X=Xl(e),U,J=g||(O=>`${O}%`),P=W&&C&&y==="inner";return y==="inner"||g||R!=="exception"&&R!=="success"?U=J(Bi(l),Bi(X)):R==="exception"?U=W?en.createElement(as,null):en.createElement(Zn,null):R==="success"&&(U=W?en.createElement(Bf,null):en.createElement(dg,null)),en.createElement("span",{className:$(`${A}-indicator`,{[`${A}-indicator-bright`]:P,[`${A}-indicator-${x}`]:Z,[`${A}-indicator-${y}`]:Z},G.indicator),style:H.indicator,title:typeof U=="string"?U:void 0},U)},[u,l,w,R,m,A,g,W,C,y,x,Z,G.indicator,H.indicator]),K={...e,classNames:G,styles:H},j;m==="line"?j=a?en.createElement(xT,{...K,strokeColor:v,prefixCls:A,steps:st(a)?a.count:a},B):en.createElement(bT,{...K,strokeColor:S,prefixCls:A,direction:N,percentPosition:{align:x,type:y}},B):(m==="circle"||m==="dashboard")&&(j=en.createElement(hT,{...K,strokeColor:S,prefixCls:A,progressStatus:R},B));let Q=$(A,`${A}-status-${R}`,{[`${A}-${m==="dashboard"&&"circle"||m}`]:m!=="line",[`${A}-inline-circle`]:m==="circle"&&Os(d,"circle")[0]<=20,[`${A}-line`]:Z,[`${A}-line-align-${x}`]:Z,[`${A}-line-position-${y}`]:Z,[`${A}-steps`]:a,[`${A}-show-info`]:u,[`${A}-small`]:d==="small",[`${A}-rtl`]:N==="rtl"},I,n,r,G.root,z,D);return en.createElement("div",{ref:t,style:H.root,className:Q,role:"progressbar","aria-valuenow":w,"aria-valuemin":0,"aria-valuemax":100,...Ke(b,["railColor","trailColor","strokeWidth","width","gapDegree","gapPosition","gapPlacement","strokeLinecap","success"])},j)}),vT=az;var ST=vT;var $r=M(require("react"));var Lo=M(require("react"));var Er=M(require("react")),CT=(e,t)=>{if(!e)return null;let o={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:o.top,bottom:o.bottom,height:o.height}:{left:o.left,right:o.right,width:o.width,top:0,bottom:0,height:0}},fi=e=>e!==void 0?`${e}px`:void 0;function Dv(e){let{prefixCls:t,containerRef:o,value:n,getValueIndex:r,motionName:i,onMotionStart:s,onMotionEnd:a,direction:c,vertical:l=!1}=e,d=Er.useRef(null),[u,m]=Er.useState(n),p=w=>{let R=r(w),T=o.current?.querySelectorAll(`.${t}-item`)[R];return T?.offsetParent&&T},[g,f]=Er.useState(null),[h,b]=Er.useState(null);rt(()=>{if(u!==n){let w=p(u),R=p(n),T=CT(w,l),N=CT(R,l);m(n),f(T),b(N),w&&R?s():a()}},[n]);let x=Er.useMemo(()=>fi(l?g?.top??0:c==="rtl"?-g?.right:g?.left),[l,c,g]),y=Er.useMemo(()=>fi(l?h?.top??0:c==="rtl"?-h?.right:h?.left),[l,c,h]),S=()=>l?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},v=()=>l?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},C=()=>{f(null),b(null),a()};return!g||!h?null:Er.createElement(fo,{visible:!0,motionName:i,motionAppear:!0,onAppearStart:S,onAppearActive:v,onVisibleChanged:C},({className:w,style:R},T)=>{let N={...R,"--thumb-start-left":x,"--thumb-start-width":fi(g?.width),"--thumb-active-left":y,"--thumb-active-width":fi(h?.width),"--thumb-start-top":x,"--thumb-start-height":fi(g?.height),"--thumb-active-top":y,"--thumb-active-height":fi(h?.height)},I={ref:Mt(d,T),style:N,className:$(`${t}-thumb`,w)};return Er.createElement("div",I)})}function fg(){return fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},fg.apply(this,arguments)}function lz(e){if(typeof e.title<"u")return e.title;if(typeof e.label!="object")return e.label?.toString()}function cz(e){return e.map(t=>{if(typeof t=="object"&&t!==null){let o=lz(t);return{...t,value:t.value,title:o}}return{label:t?.toString(),title:t?.toString(),value:t}})}var dz=({prefixCls:e,className:t,style:o,styles:n,classNames:r,data:i,disabled:s,checked:a,label:c,title:l,value:d,name:u,onChange:m,onFocus:p,onBlur:g,onKeyDown:f,onKeyUp:h,onMouseDown:b,itemRender:x=y=>y})=>{let y=v=>{s||m(v,d)},S=Lo.createElement("label",{className:$(t,{[`${e}-item-disabled`]:s}),style:o,onMouseDown:b},Lo.createElement("input",{name:u,className:`${e}-item-input`,type:"radio",disabled:s,checked:a,onChange:y,onFocus:p,onBlur:g,onKeyDown:f,onKeyUp:h}),Lo.createElement("div",{className:$(`${e}-item-label`,r?.label),title:l,style:n?.label},c));return x(S,{item:i})},uz=Lo.forwardRef((e,t)=>{let{prefixCls:o="rc-segmented",direction:n,vertical:r,options:i=[],disabled:s,defaultValue:a,value:c,name:l,onChange:d,className:u="",style:m,styles:p,classNames:g,motionName:f="thumb-motion",itemRender:h,...b}=e,x=Lo.useRef(null),y=Lo.useMemo(()=>Mt(x,t),[x,t]),S=Lo.useMemo(()=>cz(i),[i]),[v,C]=it(a??S[0]?.value,c),[w,R]=Lo.useState(!1),T=(H,W)=>{C(W),d?.(W)},N=Ke(b,["children"]),[I,E]=Lo.useState(!1),[k,F]=Lo.useState(!1),A=()=>{F(!0)},z=()=>{F(!1)},D=()=>{E(!1)},_=H=>{H.key==="Tab"&&E(!0)},V=H=>{let W=S.filter(Q=>Q.value===v||!Q.disabled),Z=W.findIndex(Q=>Q.value===v),B=W.length,K=(Z+H+B)%B,j=W[K];j&&j.value!==v&&(C(j.value),d?.(j.value))},L=H=>{switch(H.key){case"ArrowLeft":case"ArrowUp":V(-1);break;case"ArrowRight":case"ArrowDown":V(1);break}},G=H=>{let{value:W,disabled:Z}=H;return Lo.createElement(dz,fg({},H,{name:l,data:H,itemRender:h,key:W,prefixCls:o,className:$(H.className,`${o}-item`,g?.item,{[`${o}-item-selected`]:W===v&&!w,[`${o}-item-selected-text`]:W===v,[`${o}-item-focused`]:k&&I&&W===v}),style:p?.item,classNames:g,styles:p,checked:W===v,onChange:T,onFocus:A,onBlur:z,onKeyDown:L,onKeyUp:_,onMouseDown:D,disabled:!!s||!!Z}))};return Lo.createElement("div",fg({role:"radiogroup","aria-label":"segmented control",tabIndex:s?void 0:0,"aria-orientation":r?"vertical":"horizontal",style:m},N,{className:$(o,{[`${o}-rtl`]:n==="rtl",[`${o}-disabled`]:s,[`${o}-vertical`]:r},u),ref:y}),Lo.createElement("div",{className:`${o}-group`},Lo.createElement(Dv,{vertical:r,prefixCls:o,value:v,containerRef:x,motionName:`${o}-${f}`,direction:n,getValueIndex:H=>S.findIndex(W=>W.value===H),onMotionStart:()=>{R(!0)},onMotionEnd:()=>{R(!1)}}),S.map(G)))}),mz=uz,wT=mz;function RT(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}var ET=e=>({background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}),pz={overflow:"hidden",...Xo},fz=e=>{let{componentCls:t,motionDurationSlow:o,motionEaseInOut:n,motionDurationMid:r}=e,i=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),s=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),a=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:{...Et(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${r}`,...ln(e),[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${Y(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${r}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":{...ET(e),color:e.itemSelectedColor},"&-selected-text":{color:e.itemSelectedColor,transition:`color ${r}`},"&-focused":An(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,pointerEvents:"none",transition:["opacity","background-color"].map(c=>`${c} ${r}`).join(", ")},[`&:not(${t}-item-selected):not(${t}-item-selected-text):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":{minHeight:i,lineHeight:Y(i),padding:`0 ${Y(e.segmentedPaddingHorizontal)}`,...pz},"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-icon > svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:{...ET(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${Y(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}},[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:s,lineHeight:Y(s),padding:`0 ${Y(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:a,lineHeight:Y(a),padding:`0 ${Y(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...RT(`&-disabled ${t}-item`,e),...RT(`${t}-item-disabled`,e),[`${t}-thumb-motion-appear-active`]:{willChange:"transform, width",transition:["transform","width"].map(c=>`${c} ${o} ${n}`).join(", ")},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}}}},gz=e=>{let{colorTextLabel:t,colorText:o,colorFillSecondary:n,colorBgElevated:r,colorFill:i,lineWidthBold:s,colorBgLayout:a}=e;return{trackPadding:s,trackBg:a,itemColor:t,itemHoverColor:o,itemHoverBg:n,itemSelectedBg:r,itemActiveBg:i,itemSelectedColor:o}},$T=Ye("Segmented",e=>{let{lineWidth:t,calc:o}=e,n=ze(e,{segmentedPaddingHorizontal:o(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:o(e.controlPaddingHorizontalSM).sub(t).equal()});return fz(n)},gz);function hz(e){return st(e)&&!!e?.icon}var yz=$r.forwardRef((e,t)=>{let o=Co(),{prefixCls:n,className:r,rootClassName:i,block:s,options:a=[],size:c,style:l,vertical:d,orientation:u,shape:m="default",name:p=o,styles:g,classNames:f,...h}=e,{getPrefixCls:b,direction:x,className:y,style:S,classNames:v,styles:C}=Xe("segmented"),w={...e,options:a,size:c,shape:m},R=_e(S),T=_e(l),[N,I]=Je([v,f],[C,R,g,T],{props:w}),E=b("segmented",n),[k,F]=$T(E),A=Xt(c),z=$r.useMemo(()=>a.map(L=>{if(hz(L)){let{icon:G,label:H,...W}=L;return{...W,label:$r.createElement($r.Fragment,null,$r.createElement("span",{className:$(`${E}-item-icon`,N.icon),style:I.icon},G),lo(H)&&$r.createElement("span",null,H))}}return L}),[a,E,N.icon,I.icon]),[,D]=Cl(u,d),_=$(r,i,y,N.root,{[`${E}-block`]:s,[`${E}-sm`]:A==="small",[`${E}-lg`]:A==="large",[`${E}-vertical`]:D,[`${E}-shape-${m}`]:m==="round"},k,F),V=(L,{item:G})=>{if(!G.tooltip)return L;let H=st(G.tooltip)?G.tooltip:{title:G.tooltip};return $r.createElement(Hl,{...H},L)};return $r.createElement(wT,{...h,name:p,className:_,style:I.root,classNames:N,styles:I,itemRender:V,options:z,ref:t,prefixCls:E,direction:x,vertical:D})}),bz=yz,IT=bz;var Pr=M(require("react"));var zt=M(require("react"));var Ft=M(require("react"));var _v=require("react"),NT=(e,t,o,n,r=!1,i,s)=>{let a=(0,_v.useMemo)(()=>typeof o=="boolean"?{allowClear:o}:o&&typeof o=="object"?o:{allowClear:!1},[o]);return(0,_v.useMemo)(()=>{let c=!r&&a.allowClear!==!1&&(t.length||i)&&!(s==="combobox"&&i==="");return{allowClear:c,clearIcon:c?a.clearIcon||n||"\xD7":null,label:c?a.label??"Clear":""}},[a,n,r,t.length,i,s])};var gg=M(require("react")),Fv=gg.createContext(null);function mn(){return gg.useContext(Fv)}var Hd=M(require("react"));function zv(e=250){let t=Hd.useRef(null),o=Hd.useRef(null);Hd.useEffect(()=>()=>{window.clearTimeout(o.current)},[]);function n(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,n]}var PT=M(require("react"));function Bv(e,t){return e.filter(o=>o).some(o=>o.contains(t)||o===t)}function Hv(e,t,o,n){let r=Ne(i=>{if(n)return;let s=i.target;s.shadowRoot&&i.composed&&(s=i.composedPath()[0]||s),i._ori_target&&(s=i._ori_target),t&&!Bv(e(),s)&&o(!1)});PT.useEffect(()=>(window.addEventListener("mousedown",r),()=>window.removeEventListener("mousedown",r)),[r])}var Ir=M(require("react"));function Vv(){return Vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Vv.apply(this,arguments)}var xz=e=>{let t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},vz=(e,t)=>{let{prefixCls:o,disabled:n,visible:r,children:i,popupElement:s,animation:a,transitionName:c,popupStyle:l,popupClassName:d,direction:u="ltr",placement:m,builtinPlacements:p,popupMatchSelectWidth:g,popupRender:f,popupAlign:h,getPopupContainer:b,empty:x,onPopupVisibleChange:y,onPopupMouseEnter:S,onPopupMouseDown:v,onPopupBlur:C,...w}=e,R=`${o}-dropdown`,T=s;f&&(T=f(s));let N=Ir.useMemo(()=>p||xz(g),[p,g]),I=a?`${R}-${a}`:c,E=typeof g=="number",k=Ir.useMemo(()=>g===!1||E?"minWidth":"width",[g,E]),F=l;E&&(F={...l,width:g});let A=Ir.useRef(null);return Ir.useImperativeHandle(t,()=>({getPopupElement:()=>A.current?.popupElement})),Ir.createElement(ns,Vv({},w,{showAction:y?["click"]:[],hideAction:y?["click"]:[],popupPlacement:m||(u==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:N,prefixCls:R,popupMotion:{motionName:I},popup:Ir.createElement("div",{onMouseEnter:S,onMouseDown:v,onBlur:C},T),ref:A,stretch:k,popupAlign:h,popupVisible:r,getPopupContainer:b,popupClassName:$(d,{[`${R}-empty`]:x}),popupStyle:F,onPopupVisibleChange:y}),i)},Sz=Ir.forwardRef(vz),TT=Sz;function MT(e,t){let{key:o}=e,n;return"value"in e&&({value:n}=e),o??(n!==void 0?n:`rc-index-key-${t}`)}function Vd(e){return typeof e<"u"&&!Number.isNaN(e)}function Wv(e,t){let{label:o,value:n,options:r,groupLabel:i}=e||{},s=o||(t?"children":"label");return{label:s,value:n||"value",options:r||"options",groupLabel:i||s}}function kT(e,{fieldNames:t,childrenAsData:o}={}){let n=[],{label:r,value:i,options:s,groupLabel:a}=Wv(t,!1);function c(l,d){Array.isArray(l)&&l.forEach(u=>{if(d||!(s in u)){let m=u[i];n.push({key:MT(u,n.length),groupOption:d,data:u,label:u[r],value:m})}else{let m=u[a];m===void 0&&o&&(m=u.label),n.push({key:MT(u,n.length),group:!0,data:u,label:m}),c(u[s],!0)}})}return c(e,!1),n}function Wd(e){let t={...e};return"props"in t||Object.defineProperty(t,"props",{get(){return Kt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var OT=(e,t,o)=>{if(!t||!t.length)return null;let n=!1,r=(s,[a,...c])=>{if(!a)return[s];let l=s.split(a);return n=n||l.length>1,l.reduce((d,u)=>[...d,...r(u,c)],[]).filter(Boolean)},i=r(e,t);return n?typeof o<"u"?i.slice(0,o):i:null};var AT=M(require("react"));function jv(e){let{visible:t,values:o}=e;if(!t)return null;let n=50;return AT.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${o.slice(0,n).map(({label:r,value:i})=>["number","string"].includes(typeof r)?r:i).join(", ")}`,o.length>n?", ...":null)}var Ma=require("react"),Cz=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},hg=(e,t=1)=>{if(t<=0){e();return}Cz(()=>{hg(e,t-1)})};function Uv(e,t,o,n){let[r,i]=(0,Ma.useState)(!1);(0,Ma.useEffect)(()=>{i(!0)},[]);let[s,a]=it(e,t),[c,l]=(0,Ma.useState)(!1),d=r?s:!1,u=n(d),m=(0,Ma.useRef)(0),p=Ne(f=>{o&&u!==f&&o(f),a(f)}),g=Ne((f,h={})=>{let{cancelFun:b}=h;m.current+=1;let x=m.current,y=typeof f=="boolean"?f:!u;l(!y);function S(){x===m.current&&!b?.()&&(p(y),l(!1))}y?S():hg(()=>{S()})});return[d,u,g,c]}var Do=M(require("react"));var LT=M(require("react"));function yg(e){let{children:t,...o}=e;return t?LT.createElement("div",o,t):null}var qd=M(require("react"));var fn=M(require("react"));var pn=M(require("react"));var bg=M(require("react")),DT=bg.createContext(null);function gi(){return bg.useContext(DT)}var _T=DT;var wz=pn.forwardRef((e,t)=>{let{onChange:o,onKeyDown:n,onBlur:r,style:i,syncWidth:s,value:a,className:c,autoComplete:l,...d}=e,{prefixCls:u,mode:m,onSearch:p,onSearchSubmit:g,onInputBlur:f,autoFocus:h,tokenWithEnter:b,placeholder:x,components:{input:y="input"}}=gi(),{id:S,classNames:v,styles:C,open:w,activeDescendantId:R,role:T,disabled:N}=mn()||{},I=$(`${u}-input`,v?.input,c),E=pn.useRef(!1),k=pn.useRef(null),F=pn.useRef(null);pn.useImperativeHandle(t,()=>F.current);let A=B=>{let{value:K}=B.target;if(b&&k.current&&/[\r\n]/.test(k.current)){let j=k.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");K=K.replace(j,k.current)}k.current=null,p&&p(K,!0,E.current),o?.(B)},z=B=>{let{key:K}=B,{value:j}=B.currentTarget;K==="Enter"&&m==="tags"&&!w&&!E.current&&g&&g(j),n?.(B)},D=B=>{f?.(),r?.(B)},_=()=>{E.current=!0},V=B=>{if(E.current=!1,m!=="combobox"){let{value:K}=B.currentTarget;p?.(K,!0,!1)}},L=B=>{let{clipboardData:K}=B,j=K?.getData("text");k.current=j||""},[G,H]=pn.useState(void 0);rt(()=>{let B=F.current;if(s&&B){B.style.width="0px";let K=B.scrollWidth;H(K),B.style.width=""}},[s,a]);let W={id:S,type:"text",...d,ref:F,style:{...C?.input,...i,"--select-input-width":G},autoFocus:h,autoComplete:l||"new-password",className:I,disabled:N,value:a||"",onChange:A,onKeyDown:z,onBlur:D,onPaste:L,onCompositionStart:_,onCompositionEnd:V,role:T||"combobox","aria-expanded":w||!1,"aria-haspopup":"listbox","aria-owns":w?`${S}_list`:void 0,"aria-autocomplete":"list","aria-controls":w?`${S}_list`:void 0,"aria-activedescendant":w?R:void 0};if(pn.isValidElement(y)){let B=y.props||{},K={placeholder:e.placeholder||x,...W,...B};return Object.keys(B).forEach(j=>{let Q=B[j];typeof Q=="function"&&(K[j]=(...X)=>{Q(...X),W[j]?.(...X)})}),K.ref=Mt(y.ref,W.ref),pn.cloneElement(y,K)}return pn.createElement(y,W)}),xg=wz;var FT=M(require("react"));function jd(e){let{prefixCls:t,placeholder:o,displayValues:n}=gi(),{classNames:r,styles:i}=mn(),{show:s=!0}=e;return n.length?null:FT.createElement("div",{className:$(`${t}-placeholder`,r?.placeholder),style:{...s?{}:{visibility:"hidden"},...i?.placeholder}},o)}var zT=M(require("react")),Rz=zT.createContext(null),Yl=Rz;function Ud(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var zSe=typeof window<"u"&&window.document&&window.document.documentElement;function HT(e){return e!=null}function VT(e){return!e&&e!==0}function BT(e){return["string","number"].includes(typeof e)}function Kd(e){let t;return e&&(BT(e.title)?t=e.title.toString():BT(e.label)&&(t=e.label.toString())),t}function Kv(){return Kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Kv.apply(this,arguments)}var Ez=fn.forwardRef(({inputProps:e},t)=>{let{prefixCls:o,searchValue:n,activeValue:r,displayValues:i,maxLength:s,mode:a,components:c}=gi(),{triggerOpen:l,title:d,showSearch:u,classNames:m,styles:p}=mn(),g=fn.useContext(Yl),[f,h]=fn.useState(!1),b=a==="combobox",x=i[0],y=fn.useMemo(()=>b&&r&&!f&&l?r:u?n:"",[b,r,f,l,n,u]),[S,v,C,w]=fn.useMemo(()=>{let I,E,k;if(x&&g?.flattenOptions){let A=g.flattenOptions.find(z=>z.value===x.value);A?.data&&(I=A.data.className,E=A.data.style,k=Kd(A.data))}return x&&!k&&(k=Kd(x)),d!==void 0&&(k=d),[I,E,k,!!I||!!E]},[x,g?.flattenOptions,d]);fn.useEffect(()=>{b&&h(!1)},[b,r]);let R=x&&x.label!==null&&x.label!==void 0&&String(x.label).trim()!=="",N=!(b&&c?.input)?x?w?fn.createElement("div",{className:$(`${o}-content-value`,S),style:{...y?{visibility:"hidden"}:{},...v},title:C},x.label):x.label:fn.createElement(jd,{show:!y}):null;return fn.createElement("div",{className:$(`${o}-content`,R&&`${o}-content-has-value`,y&&`${o}-content-has-search-value`,w&&`${o}-content-has-option-style`,m?.content),style:p?.content,title:w?void 0:C},N,fn.createElement(xg,Kv({ref:t},e,{value:y,maxLength:a==="combobox"?s:void 0,onChange:I=>{h(!0),e.onChange?.(I)}})))}),WT=Ez;var hi=M(require("react"));var qv=M(require("react"));var $z=e=>{let{className:t,style:o,customizeIcon:n,customizeIconProps:r,children:i,onMouseDown:s,onClick:a}=e,c=typeof n=="function"?n(r):n;return qv.createElement("span",{className:t,onMouseDown:l=>{l.preventDefault(),s?.(l)},style:{userSelect:"none",WebkitUserSelect:"none",...o},unselectable:"on",onClick:a,"aria-hidden":!0},c!==void 0?c:qv.createElement("span",{className:$(t.split(/\s+/).map(l=>`${l}-icon`))},i))},vg=$z;function Gv(){return Gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Gv.apply(this,arguments)}function Iz(e){return e.key??e.value}var jT=e=>{e.preventDefault(),e.stopPropagation()},UT=hi.forwardRef(function({inputProps:t},o){let{prefixCls:n,displayValues:r,searchValue:i,mode:s,onSelectorRemove:a,removeIcon:c}=gi(),{disabled:l,showSearch:d,triggerOpen:u,rawOpen:m,toggleOpen:p,autoClearSearchValue:g,tagRender:f,maxTagPlaceholder:h,maxTagTextLength:b,maxTagCount:x,classNames:y,styles:S}=mn(),v=`${n}-selection-item`,C=i;!m&&s==="multiple"&&g!==!1&&(C="");let w=d&&C||"",R=d&&!l,T=c??"\xD7",N=h??(_=>`+ ${_.length} ...`),I=f,E=_=>{p(_)},k=_=>{a?.(_)},F=(_,V,L,G,H)=>hi.createElement("span",{title:Kd(_),className:$(v,{[`${v}-disabled`]:L},y?.item),style:S?.item},hi.createElement("span",{className:$(`${v}-content`,y?.itemContent),style:S?.itemContent},V),G&&hi.createElement(vg,{className:$(`${v}-remove`,y?.itemRemove),style:S?.itemRemove,onMouseDown:jT,onClick:H,customizeIcon:T},"\xD7")),A=(_,V,L,G,H,W,Z)=>hi.createElement("span",{onMouseDown:K=>{jT(K),E(!u)}},I({label:V,value:_,index:Z?.index,disabled:L,closable:G,onClose:H,isMaxTag:!!W})),z=(_,V)=>{let{disabled:L,label:G,value:H}=_,W=!l&&!L,Z=G;if(typeof b=="number"&&(typeof G=="string"||typeof G=="number")){let K=String(Z);K.length>b&&(Z=`${K.slice(0,b)}...`)}let B=K=>{K&&K.stopPropagation(),k(_)};return typeof I=="function"?A(H,Z,L,W,B,void 0,V):F(_,Z,L,W,B)},D=_=>{if(!r.length)return null;let V=typeof N=="function"?N(_):N;return typeof I=="function"?A(void 0,V,!1,!1,void 0,!0):F({title:V},V,!1)};return hi.createElement(ii,{prefixCls:`${n}-content`,className:y?.content,style:S?.content,prefix:!r.length&&!w&&hi.createElement(jd,null),data:r,renderItem:z,renderRest:D,suffix:hi.createElement(xg,Gv({ref:o,disabled:l,readOnly:!R},t,{value:w||"",syncWidth:!0})),itemKey:Iz,maxCount:x})});var Nz=qd.forwardRef(function(t,o){let{multiple:n,onInputKeyDown:r,tabIndex:i}=gi(),s=mn(),{showSearch:a}=s,l={...Mo(s,{aria:!0}),onKeyDown:r,readOnly:!a,tabIndex:i};return n?qd.createElement(UT,{ref:o,inputProps:l}):qd.createElement(WT,{ref:o,inputProps:l})}),KT=Nz;function qT(e){return e&&![ke.ESC,ke.SHIFT,ke.BACKSPACE,ke.TAB,ke.WIN_KEY,ke.ALT,ke.META,ke.WIN_KEY_RIGHT,ke.CTRL,ke.SEMICOLON,ke.EQUALS,ke.CAPS_LOCK,ke.CONTEXT_MENU,ke.UP,ke.LEFT,ke.RIGHT,ke.F1,ke.F2,ke.F3,ke.F4,ke.F5,ke.F6,ke.F7,ke.F8,ke.F9,ke.F10,ke.F11,ke.F12].includes(e)}function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Sg.apply(this,arguments)}var Pz=["value","onChange","removeIcon","placeholder","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex","activeValue","onSelectorRemove","focused"],GT=Do.forwardRef(function(t,o){let{prefixCls:n,className:r,style:i,prefix:s,suffix:a,clearIcon:c,clearLabel:l,children:d,multiple:u,displayValues:m,placeholder:p,mode:g,searchValue:f,onSearch:h,onSearchSubmit:b,onInputBlur:x,maxLength:y,autoFocus:S,onMouseDown:v,onClearMouseDown:C,onInputKeyDown:w,onSelectorRemove:R,tokenWithEnter:T,components:N,...I}=t,{triggerOpen:E,toggleOpen:k,showSearch:F,disabled:A,loading:z,classNames:D,styles:_}=mn(),V=Do.useRef(null),L=Do.useRef(null),G=Ne(X=>{let{which:U}=X,J=L.current instanceof HTMLTextAreaElement;if(!J&&E&&(U===ke.UP||U===ke.DOWN)&&X.preventDefault(),w&&w(X),J&&!E&&~[ke.UP,ke.DOWN,ke.LEFT,ke.RIGHT].indexOf(U))return;!(X.ctrlKey||X.altKey||X.metaKey)&&qT(U)&&k(!0)});Do.useImperativeHandle(o,()=>({focus:X=>{(L.current||V.current).focus?.(X)},blur:()=>{(L.current||V.current).blur?.()},nativeElement:Gn(V.current)}));let H=Ne(X=>{if(!A){let U=Gn(L.current);X.nativeEvent._ori_target=U;let J=U===X.target||U?.contains(X.target);U&&!J&&X.preventDefault();let q=E&&!u&&(g==="combobox"||F)||E&&u&&J;X.nativeEvent._select_lazy?E&&!u&&k(!1):(L.current?.focus(),q||k())}v?.(X)}),W=X=>{(X.key==="Enter"||X.key===" ")&&X.stopPropagation()},{root:Z}=N,B=Ke(I,Pz),K=Mo(B,{aria:!0}),j=Object.keys(K),Q={...t,onInputKeyDown:G};if(Z){let X=Z.props||{},U={...X,...B};return Object.keys(X).forEach(J=>{let P=X[J],O=B[J];typeof P=="function"&&typeof O=="function"&&(U[J]=(...q)=>{O(...q),P(...q)})}),Do.isValidElement(Z)?Do.cloneElement(Z,{...U,ref:Mt(Z.ref,V)}):Do.createElement(Z,Sg({},U,{ref:V}))}return Do.createElement(_T.Provider,{value:Q},Do.createElement("div",Sg({},Ke(B,j),{ref:V,className:r,style:i,onMouseDown:H}),Do.createElement(yg,{className:$(`${n}-prefix`,D?.prefix),style:_?.prefix},s),Do.createElement(KT,{ref:L}),Do.createElement(yg,{className:$(`${n}-suffix`,{[`${n}-suffix-loading`]:z},D?.suffix),style:_?.suffix},a),c&&Do.createElement("button",{type:"button","aria-label":l,className:$(`${n}-clear`,D?.clear),style:_?.clear,onMouseDown:X=>{X.preventDefault(),X.nativeEvent._select_lazy=!0},onKeyDown:W,onClick:C},c),d))});var XT=M(require("react"));function Xv(e,t,o){return XT.useMemo(()=>{let{root:n,input:r}=e||{};return o&&(n=o()),t&&(r=t()),{root:n,input:r}},[e,t,o])}function Yv(){return Yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Yv.apply(this,arguments)}var Gd=e=>e==="tags"||e==="multiple",Tz=Ft.forwardRef((e,t)=>{let{id:o,prefixCls:n,className:r,styles:i,classNames:s,showSearch:a,tagRender:c,showScrollBar:l="optional",direction:d,omitDomProps:u,displayValues:m,onDisplayValuesChange:p,emptyOptions:g,notFoundContent:f="Not Found",onClear:h,maxCount:b,placeholder:x,mode:y,disabled:S,loading:v,getInputElement:C,getRawInputElement:w,open:R,defaultOpen:T,onPopupVisibleChange:N,activeValue:I,onActiveValueChange:E,activeDescendantId:k,searchValue:F,autoClearSearchValue:A,onSearch:z,onSearchSplit:D,tokenSeparators:_,allowClear:V,prefix:L,suffix:G,suffixIcon:H,clearIcon:W,OptionList:Z,animation:B,transitionName:K,popupStyle:j,popupClassName:Q,popupMatchSelectWidth:X,popupRender:U,popupAlign:J,placement:P,builtinPlacements:O,getPopupContainer:q,showAction:ee=[],onFocus:le,onBlur:re,onKeyUp:ie,onKeyDown:Ce,onMouseDown:de,components:$e,...ae}=e,Pe=Gd(y),he=Ft.useRef(null),ne=Ft.useRef(null),fe=Ft.useRef(null),[ce,Re]=Ft.useState(!1);Ft.useImperativeHandle(t,()=>({focus:he.current?.focus,blur:he.current?.blur,scrollTo:Ae=>fe.current?.scrollTo(Ae),nativeElement:Gn(he.current)}));let De=Xv($e,C,w),we=Ft.useMemo(()=>{if(y!=="combobox")return F;let Ae=m[0]?.value;return typeof Ae=="string"||typeof Ae=="number"?String(Ae):""},[F,y,m]),pe=y==="combobox"&&typeof C=="function"&&C()||null,ue=!f&&g,[se,Se,Ie,Te]=Uv(T||!1,R,N,Ae=>S||ue?!1:Ae),qe=Ft.useMemo(()=>typeof _=="function"||(_||[]).some(Ae=>[`
230
- `,`\r
231
- `].includes(Ae)),[_]),Ge=Ft.useMemo(()=>typeof _=="function"?(Ae,je)=>{let Tt=_(Ae),po=Array.isArray(Tt)&&Tt.length===1&&Tt[0]===Ae;return!Array.isArray(Tt)||!Tt.length||po?null:typeof je<"u"?Tt.slice(0,je):Tt}:(Ae,je)=>OT(Ae,_,je),[_]),mt=(Ae,je,Tt)=>{if(Pe&&Vd(b)&&m.length>=b)return;let po=!0,vt=Ae;E?.(null);let jt=Vd(b)?b-m.length:void 0,_o=Tt?null:Ge(Ae,jt);return y!=="combobox"&&_o&&(vt="",D?.(_o),Ie(!1),po=!1),z&&we!==vt&&z(vt,{source:je?"typing":"effect"}),Ae&&je&&po&&Ie(!0),po},Ze=Ae=>{!Ae||!Ae.trim()||z(Ae,{source:"submit"})};Ft.useEffect(()=>{!se&&!Pe&&y!=="combobox"&&mt("",!1,!1)},[se]),Ft.useEffect(()=>{S&&(Ie(!1),Re(!1))},[S,Se]);let[$t,wt]=zv(),gt=Ft.useRef(!1),ht=Ae=>{let je=$t(),{key:Tt}=Ae,po=Tt==="Enter",vt=Tt===" ";if(po||vt){let jt=y==="combobox";(vt&&!(jt||a)||po&&!jt)&&Ae.preventDefault(),Se||Ie(!0)}if(wt(!!we),Tt==="Backspace"&&!je&&Pe&&!we&&m.length){let jt=[...m],_o=null;for(let hn=jt.length-1;hn>=0;hn-=1){let Tr=jt[hn];if(!Tr.disabled){jt.splice(hn,1),_o=Tr;break}}_o&&p(jt,{type:"remove",values:[_o]})}Se&&(!po||!gt.current)&&!vt&&(po&&(gt.current=!0),fe.current?.onKeyDown(Ae)),Ce?.(Ae)},yt=(Ae,...je)=>{Se&&fe.current?.onKeyUp(Ae,...je),Ae.key==="Enter"&&(gt.current=!1),ie?.(Ae,...je)},Rt=Ne(Ae=>{let je=m.filter(Tt=>Tt!==Ae);p(je,{type:"remove",values:[Ae]})}),Fe=()=>{gt.current=!1},xt=()=>[Gn(he.current),ne.current?.getPopupElement()];Hv(xt,Se,Ie,!!De.root);let be=Ft.useRef(!1),oe=Ae=>{Re(!0),S||(ee.includes("focus")&&Ie(!0),le?.(Ae))},me=()=>{Se&&!be.current&&Ie(!1,{cancelFun:()=>Bv(xt(),document.activeElement)})},te=Ae=>{Re(!1),we&&(y==="tags"?z(we,{source:"submit"}):y==="multiple"&&z("",{source:"blur"})),me(),S||re?.(Ae)},ge=(Ae,...je)=>{let{target:Tt}=Ae;ne.current?.getPopupElement()?.contains(Tt)&&Ie&&Ie(!0),de?.(Ae,...je),be.current=!0,hg(()=>{be.current=!1})},[,ye]=Ft.useState({});function Le(){ye({})}let Qe;De.root&&(Qe=Ae=>{Ie(Ae)});let Ot=Ft.useMemo(()=>({...e,notFoundContent:f,open:Se,triggerOpen:Se,rawOpen:se,id:o,showSearch:a,multiple:Pe,toggleOpen:Ie,showScrollBar:l,styles:i,classNames:s,lockOptions:Te}),[e,f,Ie,o,a,Pe,Se,se,l,i,s,Te]),Wt=Ft.useMemo(()=>{let Ae=G??H;return typeof Ae=="function"?Ae({searchValue:we,open:Se,focused:ce,showSearch:a,loading:v}):Ae},[G,H,we,Se,ce,a,v]),Pt=()=>{h?.(),he.current?.focus(),p([],{type:"clear",values:m}),mt("",!1,!1)},{allowClear:to,clearIcon:ao,label:In}=NT(n,m,V,W,S,we,y),Be=Ft.createElement(Z,{ref:fe}),tt=$(n,r,{[`${n}-focused`]:ce,[`${n}-multiple`]:Pe,[`${n}-single`]:!Pe,[`${n}-allow-clear`]:to,[`${n}-show-arrow`]:Wt!=null,[`${n}-disabled`]:S,[`${n}-loading`]:v,[`${n}-open`]:Se,[`${n}-customize-input`]:pe,[`${n}-show-search`]:a}),dt=Ft.createElement(GT,Yv({},ae,{ref:he,prefixCls:n,className:tt,focused:ce,prefix:L,suffix:Wt,clearIcon:ao,clearLabel:In,multiple:Pe,mode:y,displayValues:m,placeholder:x,searchValue:we,activeValue:I,onSearch:mt,onSearchSubmit:Ze,onInputBlur:Fe,onFocus:oe,onBlur:te,onClearMouseDown:Pt,onKeyDown:ht,onKeyUp:yt,onSelectorRemove:Rt,tokenWithEnter:qe,onMouseDown:ge,components:De}));return dt=Ft.createElement(TT,{ref:ne,disabled:S,prefixCls:n,visible:Se,popupElement:Be,animation:B,transitionName:K,popupStyle:j,popupClassName:Q,direction:d,popupMatchSelectWidth:X,popupRender:U,popupAlign:J,placement:P,builtinPlacements:O,getPopupContainer:q,empty:g,onPopupVisibleChange:Qe,onPopupMouseEnter:Le,onPopupMouseDown:ge,onPopupBlur:me},dt),Ft.createElement(Fv.Provider,{value:Ot},Ft.createElement(jv,{visible:ce&&!Se,values:m}),dt)}),Zv=Tz;var YT=()=>null;YT.isSelectOptGroup=!0;var Xd=YT;var ZT=()=>null;ZT.isSelectOption=!0;var Yd=ZT;var go=M(require("react")),Vn=require("react"),uS=require("react-dom");var Zl=M(require("react"));function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Qv.apply(this,arguments)}var QT=Zl.forwardRef(({height:e,offsetY:t,offsetX:o,children:n,prefixCls:r,onInnerResize:i,innerProps:s,rtl:a,extra:c},l)=>{let d={},u={display:"flex",flexDirection:"column"};return t!==void 0&&(d={height:e,position:"relative",overflow:"hidden"},u={...u,transform:`translateY(${t}px)`,[a?"marginRight":"marginLeft"]:-o||0,position:"absolute",left:0,right:0,top:0}),Zl.createElement("div",{style:d},Zl.createElement(sn,{onResize:({offsetHeight:m})=>{m&&i&&i()}},Zl.createElement("div",Qv({style:u,className:$({[`${r}-holder-inner`]:r}),ref:l},s),n,c)))});QT.displayName="Filler";var JT=QT;var tM=M(require("react"));var Cg=M(require("react"));function eM({children:e,setRef:t}){let o=Cg.useCallback(n=>{t(n)},[t]);return Cg.cloneElement(e,{ref:o})}function Jv(e,t,o,n,r,i,s,{getKey:a}){return e.slice(t,o+1).map((c,l)=>{let d=t+l,u=s(c,d,{style:{width:n},offsetX:r}),m=a(c);return tM.createElement(eM,{key:m,setRef:p=>i(c,p)},u)})}var Zd=M(require("react"));function oM(e,t,o){let n=e.length,r=t.length,i,s;if(n===0&&r===0)return null;n<r?(i=e,s=t):(i=t,s=e);let a={__EMPTY_ITEM__:!0};function c(u){return u!==void 0?o(u):a}let l=null,d=Math.abs(n-r)!==1;for(let u=0;u<s.length;u+=1){let m=c(i[u]),p=c(s[u]);if(m!==p){l=u,d=d||m!==c(s[u+1]);break}}return l===null?null:{index:l,multiple:d}}function eS(e,t,o){let[n,r]=Zd.useState(e),[i,s]=Zd.useState(null);return Zd.useEffect(()=>{let a=oM(n||[],e||[],t);a?.index!==void 0&&(o?.(a.index),s(e[a.index])),r(e)},[e]),[i]}var ka=require("react");var Mz=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),tS=Mz;var wg=require("react"),Rg=(e,t,o,n)=>{let r=(0,wg.useRef)(!1),i=(0,wg.useRef)(null);function s(){clearTimeout(i.current),r.current=!0,i.current=setTimeout(()=>{r.current=!1},50)}let a=(0,wg.useRef)({top:e,bottom:t,left:o,right:n});return a.current.top=e,a.current.bottom=t,a.current.left=o,a.current.right=n,(c,l,d=!1)=>{let u=c?l<0&&a.current.left||l>0&&a.current.right:l<0&&a.current.top||l>0&&a.current.bottom;return d&&u?(clearTimeout(i.current),r.current=!1):(!u||r.current)&&s(),!r.current&&u}};function oS(e,t,o,n,r,i,s){let a=(0,ka.useRef)(0),c=(0,ka.useRef)(null),l=(0,ka.useRef)(null),d=(0,ka.useRef)(!1),u=Rg(t,o,n,r);function m(x,y){if(Ve.cancel(c.current),u(!1,y))return;let S=x;if(!S._virtualHandled)S._virtualHandled=!0;else return;a.current+=y,l.current=y,tS||S.preventDefault(),c.current=Ve(()=>{let v=d.current?10:1;s(a.current*v,!1),a.current=0})}function p(x,y){s(y,!0),tS||x.preventDefault()}let g=(0,ka.useRef)(null),f=(0,ka.useRef)(null);function h(x){if(!e)return;Ve.cancel(f.current),f.current=Ve(()=>{g.current=null},2);let{deltaX:y,deltaY:S,shiftKey:v}=x,C=y,w=S;(g.current==="sx"||!g.current&&v&&S&&!y)&&(C=S,w=0,g.current="sx");let R=Math.abs(C),T=Math.abs(w);g.current===null&&(g.current=i&&R>T?"x":"y"),g.current==="y"?m(x,w):p(x,C)}function b(x){e&&(d.current=x.detail===l.current)}return[h,b]}var nM=M(require("react"));function rM(e,t,o,n){let[r,i]=nM.useMemo(()=>[new Map,[]],[e,o.id,n]);return(a,c=a)=>{let l=r.get(a),d=r.get(c);if(l===void 0||d===void 0){let u=e.length;for(let m=i.length;m<u;m+=1){let p=e[m],g=t(p);r.set(g,m);let f=o.get(g)??n;if(i[m]=(i[m-1]||0)+f,g===a&&(l=m),g===c&&(d=m),l!==void 0&&d!==void 0)break}}return{top:i[l-1]||0,bottom:i[d]}}}var aM=M(require("react")),Ql=require("react");var nS=class{maps;id=0;diffRecords=new Map;constructor(){this.maps=Object.create(null)}set(t,o){this.diffRecords.set(t,this.maps[t]),this.maps[t]=o,this.id+=1}get(t){return this.maps[t]}resetRecord(){this.diffRecords.clear()}getRecord(){return this.diffRecords}},iM=nS;function sM(e){let t=parseFloat(e);return isNaN(t)?0:t}function rS(e,t,o){let[n,r]=aM.useState(0),i=(0,Ql.useRef)(new Map),s=(0,Ql.useRef)(new iM),a=(0,Ql.useRef)(0);function c(){a.current+=1}function l(u=!1){c();let m=()=>{let p=!1;i.current.forEach((g,f)=>{if(g&&g.offsetParent){let{offsetHeight:h}=g,{marginTop:b,marginBottom:x}=getComputedStyle(g),y=sM(b),S=sM(x),v=h+y+S;s.current.get(f)!==v&&(s.current.set(f,v),p=!0)}}),p&&r(g=>g+1)};if(u)m();else{a.current+=1;let p=a.current;Promise.resolve().then(()=>{p===a.current&&m()})}}function d(u,m){let p=e(u),g=i.current.get(p);m?(i.current.set(p,m),l()):i.current.delete(p),!g!=!m&&(m?t?.(u):o?.(u))}return(0,Ql.useEffect)(()=>c,[]),[d,l,s.current,n]}var Jl=require("react"),lM=14/15;function iS(e,t,o){let n=(0,Jl.useRef)(!1),r=(0,Jl.useRef)(0),i=(0,Jl.useRef)(0),s=(0,Jl.useRef)(null),a=(0,Jl.useRef)(null),c,l=m=>{if(n.current){let p=Math.ceil(m.touches[0].pageX),g=Math.ceil(m.touches[0].pageY),f=r.current-p,h=i.current-g,b=Math.abs(f)>Math.abs(h);b?r.current=p:i.current=g;let x=o(b,b?f:h,!1,m);x&&m.preventDefault(),clearInterval(a.current),x&&(a.current=setInterval(()=>{b?f*=lM:h*=lM;let y=Math.floor(b?f:h);(!o(b,y,!0)||Math.abs(y)<=.1)&&clearInterval(a.current)},16))}},d=()=>{n.current=!1,c()},u=m=>{c(),m.touches.length===1&&!n.current&&(n.current=!0,r.current=Math.ceil(m.touches[0].pageX),i.current=Math.ceil(m.touches[0].pageY),s.current=m.target,s.current.addEventListener("touchmove",l,{passive:!1}),s.current.addEventListener("touchend",d,{passive:!0}))};c=()=>{s.current&&(s.current.removeEventListener("touchmove",l),s.current.removeEventListener("touchend",d))},rt(()=>(e&&t.current.addEventListener("touchstart",u,{passive:!0}),()=>{t.current?.removeEventListener("touchstart",u),c(),clearInterval(a.current)}),[e])}var dM=M(require("react"));function cM(e){return Math.floor(e**.5)}function Qd(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function kz(e){let t=e;for(;t;){if(t.draggable)return!0;t=t.parentElement}return!1}function sS(e,t,o){dM.useEffect(()=>{let n=t.current;if(e&&n){let r=!1,i,s,a=()=>{Ve.cancel(i)},c=()=>{a(),i=Ve(()=>{o(s),c()})},l=()=>{r=!1,a()},d=m=>{if(kz(m.target)||m.button!==0)return;let p=m;p._virtualHandled||(p._virtualHandled=!0,r=!0)},u=m=>{if(r){let p=Qd(m,!1),{top:g,bottom:f}=n.getBoundingClientRect();if(p<=g){let h=g-p;s=-cM(h),c()}else if(p>=f){let h=p-f;s=cM(h),c()}else a()}};return n.addEventListener("mousedown",d),n.ownerDocument.addEventListener("mouseup",l),n.ownerDocument.addEventListener("mousemove",u),n.ownerDocument.addEventListener("dragend",l),()=>{n.removeEventListener("mousedown",d),n.ownerDocument.removeEventListener("mouseup",l),n.ownerDocument.removeEventListener("mousemove",u),n.ownerDocument.removeEventListener("dragend",l),a()}}},[e])}var Eg=M(require("react"));var Oz=10;function Az(e,t){let o=typeof e=="function"?e(t):e;return Number.isFinite(o)?o:0}function aS(e,t,o,n,r,i,s,a,c){let l=Eg.useRef(void 0),[d,u]=Eg.useState(null);return rt(()=>{if(d&&d.times<Oz){if(!e.current){u(C=>({...C}));return}s();let{targetAlign:m,originAlign:p,offset:g}=d,f=d.index>=0?d.index:t.findIndex(C=>r(C)===d.key),h=m||p,b=Az(g,{getSize:i,align:h}),x=e.current.clientHeight,y=f<0,S=m,v=null;if(x&&f>=0){let C=0,w=0,R=0,T=Math.min(t.length-1,f);for(let I=0;I<=T;I+=1){let E=r(t[I]);w=C;let k=o.get(E);R=w+(k===void 0?n:k),C=R}let N=h==="top"?b:x-b;for(let I=T;I>=0;I-=1){let E=r(t[I]),k=o.get(E);if(k===void 0){y=!0;break}if(N-=k,N<=0)break}switch(h){case"top":v=w-b;break;case"bottom":v=R-x+b;break;default:{let{scrollTop:I}=e.current,E=I+x;w<I?S="top":R>E&&(S="bottom")}}v!==null&&a(v),v!==d.lastTop&&(y=!0)}y&&u(C=>({...C,times:C.times+1,index:f,targetAlign:S,lastTop:v}))}},[d,e.current]),m=>{if(m==null){c();return}if(Ve.cancel(l.current),typeof m=="number")a(m);else if(m&&typeof m=="object"){let p,g,{align:f}=m;"index"in m?{index:p}=m:(g=m.key,p=t.findIndex(b=>r(b)===g));let{offset:h=0}=m;u({times:0,index:p,key:g,offset:h,originAlign:f})}}}var eo=M(require("react"));function uM(e,t,o){if(t<=0||o<=0)return 0;let r=Math.max(Math.min(e,o),0)/o,i=Math.ceil(r*t);return i=Math.max(i,0),i=Math.min(i,t),i}var Lz=eo.forwardRef((e,t)=>{let{prefixCls:o,rtl:n,scrollOffset:r,scrollRange:i,onStartMove:s,onStopMove:a,onScroll:c,horizontal:l,spinSize:d,containerSize:u,style:m,thumbStyle:p,showScrollBar:g}=e,[f,h]=eo.useState(!1),[b,x]=eo.useState(null),[y,S]=eo.useState(null),v=!n,C=eo.useRef(null),w=eo.useRef(null),[R,T]=eo.useState(g),N=eo.useRef(void 0),I=()=>{g===!0||g===!1||(clearTimeout(N.current),T(!0),N.current=setTimeout(()=>{T(!1)},3e3))},E=i-u||0,k=u-d||0,F=eo.useMemo(()=>r===0||E===0?0:r/E*k,[r,E,k]),A=B=>!!B&&w.current?.contains(B),z=B=>{let K=C.current;if(!K)return;let j=K.getBoundingClientRect(),Q=Qd(B,l),X;if(Number.isFinite(Q)){if(l){let U=v?j.left:j.right;if(!Number.isFinite(U))return;X=(v?Q-U:U-Q)-d/2}else{if(!Number.isFinite(j.top))return;X=Q-j.top-d/2}c(uM(X,E,k),l)}},D=B=>{B.stopPropagation(),B.preventDefault(),!(B.button!==0||A(B.target))&&z(B)},_=eo.useRef({top:F,dragging:f,pageY:b,startTop:y});_.current={top:F,dragging:f,pageY:b,startTop:y};let V=Ne(B=>{h(!0),x(Qd(B,l)),S(_.current.top),s(),B.stopPropagation(),B.preventDefault()});eo.useEffect(()=>{let B=Q=>{Q.preventDefault()},K=C.current,j=w.current;return K.addEventListener("touchstart",B,{passive:!1}),j.addEventListener("touchstart",V,{passive:!1}),()=>{K.removeEventListener("touchstart",B),j.removeEventListener("touchstart",V)}},[V]);let L=eo.useRef(void 0);L.current=E;let G=eo.useRef(void 0);G.current=k,eo.useEffect(()=>{if(f){let B,K=Q=>{let{dragging:X,pageY:U,startTop:J}=_.current;Ve.cancel(B);let P=C.current.getBoundingClientRect(),O=u/(l?P.width:P.height);if(X){let q=(Qd(Q,l)-U)*O,ee=J;!v&&l?ee-=q:ee+=q;let le=L.current,re=G.current,ie=uM(ee,le,re);B=Ve(()=>{c(ie,l)})}},j=()=>{h(!1),a()};return window.addEventListener("mousemove",K,{passive:!0}),window.addEventListener("touchmove",K,{passive:!0}),window.addEventListener("mouseup",j,{passive:!0}),window.addEventListener("touchend",j,{passive:!0}),()=>{window.removeEventListener("mousemove",K),window.removeEventListener("touchmove",K),window.removeEventListener("mouseup",j),window.removeEventListener("touchend",j),Ve.cancel(B)}}},[f]),eo.useEffect(()=>(I(),()=>{clearTimeout(N.current)}),[r]),eo.useImperativeHandle(t,()=>({delayHidden:I}));let H=`${o}-scrollbar`,W={position:"absolute",visibility:R?null:"hidden"},Z={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return l?(Object.assign(W,{height:8,left:0,right:0,bottom:0}),Object.assign(Z,{height:"100%",width:d,[v?"left":"right"]:F})):(Object.assign(W,{width:8,top:0,bottom:0,[v?"right":"left"]:0}),Object.assign(Z,{width:"100%",height:d,top:F})),eo.createElement("div",{ref:C,className:$(H,{[`${H}-horizontal`]:l,[`${H}-vertical`]:!l,[`${H}-visible`]:R}),style:{...W,...m},onMouseDown:D,onMouseMove:I},eo.createElement("div",{ref:w,className:$(`${H}-thumb`,{[`${H}-thumb-moving`]:f}),style:{...Z,...p},onMouseDown:V}))}),lS=Lz;function cS(e=0,t=0){let o=e/t*e;return isNaN(o)&&(o=0),o=Math.max(o,20),Math.floor(o)}function dS(){return dS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},dS.apply(this,arguments)}var Dz=[],_z={overflowY:"auto",overflowAnchor:"none"};function mS(e,t){let{prefixCls:o="rc-virtual-list",className:n,height:r,itemHeight:i,fullHeight:s=!0,style:a,data:c,children:l,itemKey:d,virtual:u,direction:m,scrollWidth:p,component:g="div",onScroll:f,onVirtualScroll:h,onVisibleChange:b,innerProps:x,extraRender:y,styles:S,showScrollBar:v="optional",...C}=e,w=go.useCallback(be=>typeof d=="function"?d(be):be?.[d],[d]),[R,T,N,I]=rS(w,null,null),E=!!(u!==!1&&r&&i),k=go.useMemo(()=>Object.values(N.maps).reduce((be,oe)=>be+oe,0),[N.id,N.maps]),F=E&&c&&(Math.max(i*c.length,k)>r||!!p),A=m==="rtl",z=$(o,{[`${o}-rtl`]:A},n),D=c||Dz,_=(0,Vn.useRef)(null),V=(0,Vn.useRef)(null),L=(0,Vn.useRef)(null),[G,H]=(0,Vn.useState)(0),[W,Z]=(0,Vn.useState)(0),[B,K]=(0,Vn.useState)(!1),j=()=>{K(!0)},Q=()=>{K(!1)},X={getKey:w};function U(be){H(oe=>{let me;typeof be=="function"?me=be(oe):me=be;let te=ce(me);return _.current.scrollTop=te,te})}let J=(0,Vn.useRef)({start:0,end:D.length}),P=(0,Vn.useRef)(void 0),[O]=eS(D,w);P.current=O;let{scrollHeight:q,start:ee,end:le,offset:re}=go.useMemo(()=>{if(!E)return{scrollHeight:void 0,start:0,end:D.length-1,offset:void 0};if(!F)return{scrollHeight:V.current?.offsetHeight||0,start:0,end:D.length-1,offset:void 0};let be=0,oe,me,te,ge=D.length;for(let ye=0;ye<ge;ye+=1){let Le=D[ye],Qe=w(Le),Ot=N.get(Qe),Wt=be+(Ot===void 0?i:Ot);Wt>=G&&oe===void 0&&(oe=ye,me=be),Wt>G+r&&te===void 0&&(te=ye),be=Wt}return oe===void 0&&(oe=0,me=0,te=Math.ceil(r/i)),te===void 0&&(te=D.length-1),te=Math.min(te+1,D.length-1),{scrollHeight:be,start:oe,end:te,offset:me}},[F,E,G,D,I,r]);J.current.start=ee,J.current.end=le,go.useLayoutEffect(()=>{let be=N.getRecord();if(be.size===1){let oe=Array.from(be.keys())[0],me=be.get(oe),te=D[ee];if(te&&me===void 0&&w(te)===oe){let Le=N.get(oe)-i;U(Qe=>Qe+Le)}}N.resetRecord()},[q]);let[ie,Ce]=go.useState({width:0,height:r}),de=be=>{Ce({width:be.offsetWidth,height:be.offsetHeight})},$e=(0,Vn.useRef)(null),ae=(0,Vn.useRef)(null),Pe=go.useMemo(()=>cS(ie.width,p),[ie.width,p]),he=go.useMemo(()=>cS(ie.height,q),[ie.height,q]),ne=q-r,fe=(0,Vn.useRef)(ne);fe.current=ne;function ce(be){let oe=be;return Number.isNaN(fe.current)||(oe=Math.min(oe,fe.current)),oe=Math.max(oe,0),oe}let Re=G<=0,De=G>=ne,we=W<=0,pe=W>=p,ue=Rg(Re,De,we,pe),se=()=>({x:A?-W:W,y:G}),Se=(0,Vn.useRef)(se()),Ie=Ne(be=>{if(h){let oe={...se(),...be};(Se.current.x!==oe.x||Se.current.y!==oe.y)&&(h(oe),Se.current=oe)}});function Te(be,oe){let me=be;oe?((0,uS.flushSync)(()=>{Z(me)}),Ie()):U(me)}function qe(be){let{scrollTop:oe}=be.currentTarget;oe!==G&&U(oe),f?.(be),Ie()}let Ge=be=>{let oe=be,me=p?p-ie.width:0;return oe=Math.max(oe,0),oe=Math.min(oe,me),oe},mt=Ne((be,oe)=>{oe?((0,uS.flushSync)(()=>{Z(me=>{let te=me+(A?-be:be);return Ge(te)})}),Ie()):U(me=>me+be)}),[Ze,$t]=oS(E,Re,De,we,pe,!!p,mt);iS(E,_,(be,oe,me,te)=>{let ge=te;return ue(be,oe,me)?!1:!ge||!ge._virtualHandled?(ge&&(ge._virtualHandled=!0),Ze({preventDefault(){},deltaX:be?oe:0,deltaY:be?0:oe}),!0):!1}),sS(F,_,be=>{U(oe=>oe+be)}),rt(()=>{function be(me){let te=Re&&me.detail<0,ge=De&&me.detail>0;E&&!te&&!ge&&me.preventDefault()}let oe=_.current;return oe.addEventListener("wheel",Ze,{passive:!1}),oe.addEventListener("DOMMouseScroll",$t,{passive:!0}),oe.addEventListener("MozMousePixelScroll",be,{passive:!1}),()=>{oe.removeEventListener("wheel",Ze),oe.removeEventListener("DOMMouseScroll",$t),oe.removeEventListener("MozMousePixelScroll",be)}},[E,Re,De]),rt(()=>{if(p){let be=Ge(W);Z(be),Ie({x:be})}},[ie.width,p]);let wt=()=>{$e.current?.delayHidden(),ae.current?.delayHidden()},gt=rM(D,w,N,i),ht=aS(_,D,N,i,w,gt,()=>T(!0),U,wt);go.useImperativeHandle(t,()=>({nativeElement:L.current,getScrollInfo:se,scrollTo:be=>{function oe(me){return me&&typeof me=="object"&&("left"in me||"top"in me)}oe(be)?(be.left!==void 0&&Z(Ge(be.left)),ht(be.top)):ht(be)}})),rt(()=>{if(b){let be=D.slice(ee,le+1);b(be,D)}},[ee,le,D]);let yt=y?.({start:ee,end:le,virtual:F,offsetX:W,scrollTop:G,offsetY:re,rtl:A,getSize:gt}),Rt=Jv(D,ee,le,p,W,R,l,X),Fe=null;r&&(Fe={[s?"height":"maxHeight"]:r,..._z},E&&(Fe.overflowY="hidden",p&&(Fe.overflowX="hidden"),B&&(Fe.pointerEvents="none")));let xt={};return A&&(xt.dir="rtl"),go.createElement("div",dS({ref:L,style:{...a,position:"relative"},className:z},xt,C),go.createElement(sn,{onResize:de},go.createElement(g,{className:`${o}-holder`,style:Fe,ref:_,onScroll:qe,onMouseEnter:wt},go.createElement(JT,{prefixCls:o,height:q,offsetX:W,offsetY:re,scrollWidth:p,onInnerResize:T,ref:V,innerProps:x,rtl:A,extra:yt},Rt))),F&&q>r&&go.createElement(lS,{ref:$e,prefixCls:o,scrollOffset:G,scrollRange:q,rtl:A,onScroll:Te,onStartMove:j,onStopMove:Q,spinSize:he,containerSize:ie.height,style:S?.verticalScrollBar,thumbStyle:S?.verticalScrollBarThumb,showScrollBar:v}),F&&p>ie.width&&go.createElement(lS,{ref:ae,prefixCls:o,scrollOffset:W,scrollRange:p,rtl:A,onScroll:Te,onStartMove:j,onStopMove:Q,spinSize:Pe,containerSize:ie.width,horizontal:!0,style:S?.horizontalScrollBar,thumbStyle:S?.horizontalScrollBarThumb,showScrollBar:v}))}var mM=go.forwardRef(mS);mM.displayName="List";var pM=mM;var fM=M(require("react"));var Fz=fM.forwardRef((e,t)=>mS({...e,virtual:!1},t));Fz.displayName="List";var gM=pM;var At=M(require("react")),pS=require("react");function hM(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function Jd(){return Jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Jd.apply(this,arguments)}function yM(e){return typeof e=="string"||typeof e=="number"}var zz=(e,t)=>{let{prefixCls:o,id:n,open:r,multiple:i,mode:s,searchValue:a,toggleOpen:c,notFoundContent:l,onPopupScroll:d,showScrollBar:u,lockOptions:m}=mn(),{maxCount:p,flattenOptions:g,onActiveValue:f,defaultActiveFirstOption:h,onSelect:b,menuItemSelectedIcon:x,rawValues:y,fieldNames:S,virtual:v,direction:C,listHeight:w,listItemHeight:R,optionRender:T,classNames:N,styles:I}=At.useContext(Yl),E=`${o}-item`,k=qn(()=>g,[r,m],(U,J)=>J[0]&&!J[1]),F=At.useRef(null),A=At.useMemo(()=>i&&Vd(p)&&y?.size>=p,[i,p,y?.size]),z=U=>{U.preventDefault()},D=U=>{F.current?.scrollTo(typeof U=="number"?{index:U}:U)},_=At.useCallback(U=>s==="combobox"?!1:y.has(U),[s,[...y].toString(),y.size]),V=(U,J=1)=>{let P=k.length;for(let O=0;O<P;O+=1){let q=(U+O*J+P)%P,{group:ee,data:le}=k[q]||{};if(!ee&&!le?.disabled&&(_(le.value)||!A))return q}return-1},[L,G]=At.useState(()=>V(0)),H=(U,J=!1)=>{G(U);let P={source:J?"keyboard":"mouse"},O=k[U];if(!O){f(null,-1,P);return}f(O.value,U,P)};(0,pS.useEffect)(()=>{H(h!==!1?V(0):-1)},[k.length,a]);let W=At.useCallback(U=>s==="combobox"?String(U).toLowerCase()===a.toLowerCase():y.has(U),[s,a,[...y].toString(),y.size]);(0,pS.useEffect)(()=>{let U;if(!i&&r&&y.size===1){let J=Array.from(y)[0],P=k.findIndex(({data:O})=>a?String(O.value).startsWith(a):O.value===J);P!==-1&&(H(P),U=setTimeout(()=>{D(P)}))}return r&&F.current?.scrollTo(void 0),()=>clearTimeout(U)},[r,a]);let Z=U=>{U!==void 0&&b(U,{selected:!y.has(U)}),i||c(!1)};if(At.useImperativeHandle(t,()=>({onKeyDown:U=>{let{which:J,ctrlKey:P}=U;switch(J){case ke.N:case ke.P:case ke.UP:case ke.DOWN:{let O=0;if(J===ke.UP?O=-1:J===ke.DOWN?O=1:hM()&&P&&(J===ke.N?O=1:J===ke.P&&(O=-1)),O!==0){let q=V(L+O,O);D(q),H(q,!0)}break}case ke.TAB:case ke.ENTER:{let O=k[L];if(!O||O.data.disabled)return Z(void 0);!A||y.has(O.value)?Z(O.value):Z(void 0),r&&U.preventDefault();break}case ke.ESC:c(!1),r&&U.stopPropagation()}},onKeyUp:()=>{},scrollTo:U=>{D(U)}})),k.length===0)return At.createElement("div",{role:"listbox",id:`${n}_list`,className:`${E}-empty`,onMouseDown:z},l);let B=Object.keys(S).map(U=>S[U]),K=U=>U.label;function j(U,J){let{group:P}=U;return{role:P?"presentation":"option",id:`${n}_list_${J}`}}let Q=U=>{let J=k[U];if(!J)return null;let P=J.data||{},{value:O,disabled:q}=P,{group:ee}=J,le=Mo(P,!0),re=K(J);return J?At.createElement("div",Jd({"aria-label":typeof re=="string"&&!ee?re:null},le,{key:U},j(J,U),{"aria-selected":W(O),"aria-disabled":q}),O):null},X={role:"listbox",id:`${n}_list`};return At.createElement(At.Fragment,null,v&&At.createElement("div",Jd({},X,{style:{height:0,width:0,overflow:"hidden"}}),Q(L-1),Q(L),Q(L+1)),At.createElement(gM,{prefixCls:`${o}-dropdown-list`,itemKey:"key",ref:F,data:k,height:w,itemHeight:R,fullHeight:!1,onMouseDown:z,onScroll:d,virtual:v,direction:C,innerProps:v?null:X,showScrollBar:u,className:N?.popup?.list,style:I?.popup?.list},(U,J)=>{let{group:P,groupOption:O,data:q,label:ee,value:le}=U,{key:re}=q;if(P){let se=q.title??(yM(ee)?ee.toString():void 0);return At.createElement("div",{className:$(E,`${E}-group`,q.className),title:se},ee!==void 0?ee:re)}let{disabled:ie,title:Ce,children:de,style:$e,className:ae,...Pe}=q,he=Ke(Pe,B),ne=_(le),fe=ie||!ne&&A,ce=`${E}-option`,Re=$(E,ce,ae,N?.popup?.listItem,{[`${ce}-grouped`]:O,[`${ce}-active`]:L===J&&!fe,[`${ce}-disabled`]:fe,[`${ce}-selected`]:ne}),De=K(U),we=!x||typeof x=="function"||ne,pe=typeof De=="number"?De:De||le,ue=yM(pe)?pe.toString():void 0;return Ce!==void 0&&(ue=Ce),At.createElement("div",Jd({},Mo(he),v?{}:j(U,J),{"aria-selected":v?void 0:W(le),"aria-disabled":fe,className:Re,title:ue,onMouseMove:()=>{L===J||fe||H(J)},onClick:()=>{fe||Z(le)},style:{...I?.popup?.listItem,...$e}}),At.createElement("div",{className:`${ce}-content`},typeof T=="function"?T(U,{index:J}):pe),At.isValidElement(x)||ne,we&&At.createElement(vg,{className:`${E}-option-state`,customizeIcon:x,customizeIconProps:{value:le,disabled:fe,isSelected:ne}},ne?"\u2713":null))}))},Bz=At.forwardRef(zz),bM=Bz;var ec=M(require("react")),xM=(e,t)=>{let o=ec.useRef({values:new Map,options:new Map}),n=ec.useMemo(()=>{let{values:i,options:s}=o.current,a=e.map(d=>d.label===void 0?{...d,label:i.get(d.value)?.label}:d),c=new Map,l=new Map;return a.forEach(d=>{c.set(d.value,d),l.set(d.value,t.get(d.value)||s.get(d.value))}),o.current.values=c,o.current.options=l,a},[e,t]),r=ec.useCallback(i=>t.get(i)||o.current.options.get(i),[t]);return[n,r]};var vM=M(require("react"));function fS(e,t){return Ud(e).join("").toUpperCase().includes(t)}var SM=(e,t,o,n,r)=>vM.useMemo(()=>{if(!o||n===!1)return e;let{options:i,label:s,value:a}=t,c=[],l=typeof n=="function",d=o.toUpperCase(),u=l?n:(p,g)=>r&&r.length?r.some(f=>fS(g[f],d)):g[i]?fS(g[s!=="children"?s:"label"],d):fS(g[a],d),m=l?p=>Wd(p):p=>p;return e.forEach(p=>{if(p[i]){if(u(o,m(p)))c.push(p);else{let f=p[i].filter(h=>u(o,m(h)));f.length&&c.push({...p,[i]:f})}return}u(o,m(p))&&c.push(p)}),c},[e,n,r,o,t]);var wM=M(require("react"));var CM=M(require("react"));function Hz(e){let{key:t,props:{children:o,value:n,...r}}=e;return{key:t,value:n!==void 0?n:t,children:o,...r}}function $g(e,t=!1){return co(e).map((o,n)=>{if(!CM.isValidElement(o)||!o.type)return null;let{type:{isSelectOptGroup:r},key:i,props:{children:s,...a}}=o;return t||!r?Hz(o):{key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i,...a,options:$g(s)}}).filter(o=>o)}var Vz=(e,t,o,n,r)=>wM.useMemo(()=>{let i=e;!e&&(i=$g(t));let a=new Map,c=new Map,l=(u,m,p)=>{p&&typeof p=="string"&&u.set(m[p],m)},d=(u,m=!1)=>{for(let p=0;p<u.length;p+=1){let g=u[p];!g[o.options]||m?(a.set(g[o.value],g),l(c,g,o.label),n.forEach(f=>{l(c,g,f)}),l(c,g,r)):d(g[o.options],!0)}};return d(i),{options:i,valueOptions:a,labelOptions:c}},[e,t,o,n,r]),RM=Vz;var Ig=M(require("react"));function Ng(e){let t=Ig.useRef(e);return t.current=e,Ig.useCallback((...n)=>t.current(...n),[])}var Wz=M(require("react"));var EM=M(require("react"));function gS(e,t,o){let{filterOption:n,searchValue:r,optionFilterProp:i,filterSort:s,onSearch:a,autoClearSearchValue:c}=t;return EM.useMemo(()=>{let l=typeof e=="object",d={filterOption:n,searchValue:r,optionFilterProp:i,filterSort:s,onSearch:a,autoClearSearchValue:c,...l?e:{}};return[l||o==="combobox"||o==="tags"||o==="multiple"&&e===void 0?!0:e,d]},[o,e,n,r,i,s,a,c])}function hS(){return hS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},hS.apply(this,arguments)}var jz=["inputValue"];function Uz(e){return!e||typeof e!="object"}var Kz=zt.forwardRef((e,t)=>{let{id:o,mode:n,prefixCls:r="rc-select",backfill:i,fieldNames:s,showSearch:a,searchValue:c,onSearch:l,autoClearSearchValue:d,filterOption:u,optionFilterProp:m,filterSort:p,onSelect:g,onDeselect:f,onActive:h,popupMatchSelectWidth:b=!0,optionLabelProp:x,options:y,optionRender:S,children:v,defaultActiveFirstOption:C,menuItemSelectedIcon:w,virtual:R,direction:T,listHeight:N=200,listItemHeight:I=20,labelRender:E,value:k,defaultValue:F,labelInValue:A,onChange:z,maxCount:D,classNames:_,styles:V,...L}=e,G={searchValue:c,onSearch:l,autoClearSearchValue:d,filterOption:u,optionFilterProp:m,filterSort:p},[H,W]=gS(a,G,n),{filterOption:Z,searchValue:B,optionFilterProp:K,filterSort:j,onSearch:Q,autoClearSearchValue:X=!0}=W,U=zt.useMemo(()=>K?Array.isArray(K)?K:[K]:[],[K]),J=Co(o),P=Gd(n),O=!!(!y&&v),q=zt.useMemo(()=>Z===void 0&&n==="combobox"?!1:Z,[Z,n]),ee=zt.useMemo(()=>Wv(s,O),[JSON.stringify(s),O]),[le,re]=it("",B),ie=le||"",Ce=RM(y,v,ee,U,x),{valueOptions:de,labelOptions:$e,options:ae}=Ce,Pe=zt.useCallback(te=>Ud(te).map(ye=>{let Le,Qe,Ot,Wt;Uz(ye)?Le=ye:(Qe=ye.label,Le=ye.value);let Pt=de.get(Le);return Pt&&(Qe===void 0&&(Qe=Pt?.[x||ee.label]),Ot=Pt?.disabled,Wt=Pt?.title),{label:Qe,value:Le,key:Le,disabled:Ot,title:Wt}}),[ee,x,de]),[he,ne]=it(F,k),fe=zt.useMemo(()=>{let ge=Pe(P&&he===null?[]:he);return n==="combobox"&&VT(ge[0]?.value)?[]:ge},[he,Pe,n,P]),[ce,Re]=xM(fe,de),De=zt.useMemo(()=>{if(!n&&ce.length===1){let te=ce[0];if(te.value===null&&(te.label===null||te.label===void 0))return[]}return ce.map(te=>({...te,label:(typeof E=="function"?E(te):te.label)??te.value}))},[n,ce,E]),we=zt.useMemo(()=>new Set(ce.map(te=>te.value)),[ce]);zt.useEffect(()=>{if(n==="combobox"){let te=ce[0]?.value;re(HT(te)?String(te):"")}},[ce]);let pe=Ng((te,ge)=>{let ye=ge??te;return{[ee.value]:te,[ee.label]:ye}}),ue=zt.useMemo(()=>{if(n!=="tags")return ae;let te=[...ae],ge=ye=>de.has(ye);return[...ce].sort((ye,Le)=>ye.value<Le.value?-1:1).forEach(ye=>{let Le=ye.value;ge(Le)||te.push(pe(Le,ye.label))}),te},[pe,ae,de,ce,n]),se=SM(ue,ee,ie,q,U),Se=zt.useMemo(()=>{let te=ge=>U.length?U.some(ye=>ge?.[ye]===ie):ge?.value===ie;return n!=="tags"||!ie||se.some(ge=>te(ge))||se.some(ge=>ge[ee.value]===ie)||de.get(ie)?.disabled?se:[pe(ie),...se]},[pe,U,n,se,ie,ee,de]),Ie=te=>[...te].sort((ye,Le)=>j(ye,Le,{searchValue:ie})).map(ye=>Array.isArray(ye.options)?{...ye,options:ye.options.length>0?Ie(ye.options):ye.options}:ye),Te=zt.useMemo(()=>j?Ie(Se):Se,[Se,j,ie]),qe=zt.useMemo(()=>kT(Te,{fieldNames:ee,childrenAsData:O}),[Te,ee,O]),Ge=te=>{let ge=Pe(te);if(ne(ge),z&&(ge.length!==ce.length||ge.some((ye,Le)=>ce[Le]?.value!==ye?.value))){let ye=A?ge.map(({label:Qe,value:Ot})=>({label:Qe,value:Ot})):ge.map(Qe=>Qe.value),Le=ge.map(Qe=>Wd(Re(Qe.value)));z(P?ye:ye[0],P?Le:Le[0])}},[mt,Ze]=zt.useState(null),[$t,wt]=zt.useState(0),gt=C!==void 0?C:n!=="combobox",ht=zt.useRef(void 0),yt=zt.useCallback((te,ge,{source:ye="keyboard"}={})=>{wt(ge),i&&n==="combobox"&&te!==null&&ye==="keyboard"&&Ze(String(te));let Le=Promise.resolve().then(()=>{ht.current===Le&&h?.(te)});ht.current=Le},[i,n,h]),Rt=(te,ge,ye)=>{let Le=()=>{let Qe=Re(te);return[A?{label:Qe?.[ee.label],value:te}:te,Wd(Qe)]};if(ge&&g){let[Qe,Ot]=Le();g(Qe,Ot)}else if(!ge&&f&&ye!=="clear"){let[Qe,Ot]=Le();f(Qe,Ot)}},Fe=Ng((te,ge)=>{let ye,Le=P?ge.selected:!0;Le?ye=P?[...ce,te]:[te]:ye=ce.filter(Qe=>Qe.value!==te),Ge(ye),Rt(te,Le),n==="combobox"?Ze(""):(!Gd||X)&&(re(""),Ze(""))}),xt=(te,ge)=>{Ge(te);let{type:ye,values:Le}=ge;(ye==="remove"||ye==="clear")&&Le.forEach(Qe=>{Rt(Qe.value,!1,ye)})},be=(te,ge)=>{if(re(te),Ze(null),ge.source==="submit"){let ye=(te||"").trim();if(ye){if(de.get(ye)?.disabled){re("");return}let Le=Array.from(new Set([...we,ye]));Ge(Le),Rt(ye,!0),re("")}return}ge.source!=="blur"&&(n==="combobox"&&Ge(te),Q?.(te))},oe=te=>{let ge=te;n!=="tags"&&(ge=te.map(Le=>$e.get(Le)?.value).filter(Le=>Le!==void 0)),n==="tags"&&(ge=ge.filter(Le=>!de.get(Le)?.disabled));let ye=Array.from(new Set([...we,...ge]));Ge(ye),ye.forEach(Le=>{Rt(Le,!0)})},me=zt.useMemo(()=>({...Ce,flattenOptions:qe,onActiveValue:yt,defaultActiveFirstOption:gt,onSelect:Fe,menuItemSelectedIcon:w,rawValues:we,fieldNames:ee,virtual:R!==!1&&b!==!1,direction:T,listHeight:N,listItemHeight:I,childrenAsData:O,maxCount:D,optionRender:S,classNames:_,styles:V}),[D,Ce,qe,yt,gt,Fe,w,we,ee,R,b,T,N,I,O,S,_,V]);return zt.createElement(Yl.Provider,{value:me},zt.createElement(Zv,hS({},L,{id:J,prefixCls:r,ref:t,omitDomProps:jz,mode:n,classNames:_,styles:V,displayValues:De,onDisplayValuesChange:xt,maxCount:D,direction:T,showSearch:H,searchValue:ie,onSearch:be,autoClearSearchValue:X,onSearchSplit:oe,popupMatchSelectWidth:b,OptionList:bM,emptyOptions:!qe.length,activeValue:mt,activeDescendantId:`${J}_list_${$t}`})))}),yS=Kz;yS.Option=Yd;yS.OptGroup=Xd;var $M=yS;var IM=$M;var qz=(e,t,o)=>e===!1?null:e===!0?o:e&&t&&e[t]!==void 0?e[t]:o,bS=qz;var oc=M(require("react"));var Wn=M(require("react"));var ar=M(require("react")),NM=require("react");var Hi=(e,t)=>e?.startsWith("var(")||t?.startsWith("var(")?e:new pt(e).onBackground(t).toHexString();var Gz=()=>{let[,e]=qt(),[t]=qo("Empty"),{colorBgContainer:o,colorFill:n,colorFillSecondary:r,colorFillTertiary:i,colorTextQuaternary:s}=e,{panelBgColor:a,borderColor:c,detailColor:l,shadowColor:d,iconColor:u}=(0,NM.useMemo)(()=>({panelBgColor:Hi(i,o),borderColor:Hi(s,o),detailColor:Hi(n,o),shadowColor:Hi(r,o),iconColor:o}),[o,n,r,i,s]);return ar.createElement("svg",{width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},ar.createElement("title",null,t?.description||"Empty"),ar.createElement("g",{fill:"none",fillRule:"evenodd"},ar.createElement("g",{transform:"translate(24 31.7)"},ar.createElement("ellipse",{fillOpacity:".8",fill:d,cx:"67.8",cy:"106.9",rx:"67.8",ry:"12.7"}),ar.createElement("path",{fill:c,d:"M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z"}),ar.createElement("path",{fill:a,d:"M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4"}),ar.createElement("path",{fill:l,d:"M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8"})),ar.createElement("path",{fill:l,d:"m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8"}),ar.createElement("g",{fill:u,transform:"translate(149.7 15.4)"},ar.createElement("circle",{cx:"20.7",cy:"3.2",r:"2.8"}),ar.createElement("path",{d:"M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z"}))))},PM=Gz;var As=M(require("react")),TM=require("react");var Xz=()=>{let[,e]=qt(),[t]=qo("Empty"),{colorFill:o,colorFillTertiary:n,colorFillQuaternary:r,colorBgContainer:i}=e,{borderColor:s,shadowColor:a,contentColor:c}=(0,TM.useMemo)(()=>({borderColor:Hi(o,i),shadowColor:Hi(n,i),contentColor:Hi(r,i)}),[o,n,r,i]);return As.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},As.createElement("title",null,t?.description||"Empty"),As.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},As.createElement("ellipse",{fill:a,cx:"32",cy:"33",rx:"32",ry:"7"}),As.createElement("g",{fillRule:"nonzero",stroke:s},As.createElement("path",{d:"M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"}),As.createElement("path",{d:"M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3",fill:c}))))},MM=Xz;var Yz=e=>{let{componentCls:t,margin:o,marginXS:n,marginXL:r,fontSize:i,lineHeight:s}=e;return{[t]:{marginInline:n,fontSize:i,lineHeight:s,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:n,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:o},"&-normal":{marginBlock:r,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:n,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},kM=Ye("Empty",e=>{let{componentCls:t,controlHeightLG:o,calc:n}=e,r=ze(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n(o).mul(2.5).equal(),emptyImgHeightMD:o,emptyImgHeightSM:n(o).mul(.875).equal()});return Yz(r)});var OM=Wn.createElement(PM,null),AM=Wn.createElement(MM,null),xS=Wn.forwardRef((e,t)=>{let{className:o,rootClassName:n,prefixCls:r,image:i,description:s,children:a,imageStyle:c,style:l,classNames:d,styles:u,...m}=e,{getPrefixCls:p,direction:g,className:f,style:h,classNames:b,styles:x,image:y}=Xe("empty"),S=p("empty",r),[v,C]=kM(S),w=_e(h),R=_e(l),[T,N]=Je([b,d],[x,w,u,R],{props:e}),[I]=qo("Empty"),E=typeof s<"u"?s:I?.description,k=typeof E=="string"?E:"empty",F=i??y??OM,A=null;typeof F=="string"?A=Wn.createElement("img",{draggable:!1,alt:k,src:F}):A=F;let z=Wn.useRef(null);return Wn.useImperativeHandle(t,()=>({nativeElement:z.current})),Wn.createElement("div",{ref:z,className:$(v,C,S,f,{[`${S}-normal`]:F===AM,[`${S}-rtl`]:g==="rtl"},o,n,T.root),style:N.root,...m},Wn.createElement("div",{className:$(`${S}-image`,T.image),style:{...c,...N.image}},A),lo(E)&&Wn.createElement("div",{className:$(`${S}-description`,T.description),style:N.description},E),lo(a)&&Wn.createElement("div",{className:$(`${S}-footer`,T.footer),style:N.footer},a))});xS.PRESENTED_IMAGE_DEFAULT=OM;xS.PRESENTED_IMAGE_SIMPLE=AM;var tc=xS;var Zz=e=>{let{componentName:t}=e,{getPrefixCls:o}=(0,oc.useContext)(Oe),n=o("empty");switch(t){case"Table":case"List":return oc.default.createElement(tc,{image:tc.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return oc.default.createElement(tc,{image:tc.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return oc.default.createElement(tc,null)}},LM=Zz;var Qz=e=>{let o={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:{...o,points:["tl","bl"],offset:[0,4]},bottomRight:{...o,points:["tr","br"],offset:[0,4]},topLeft:{...o,points:["bl","tl"],offset:[0,-4]},topRight:{...o,points:["br","tr"],offset:[0,-4]}}};function Jz(e,t){return e||Qz(t)}var DM=Jz;var _M=e=>{let{optionHeight:t,optionFontSize:o,optionLineHeight:n,optionPadding:r}=e;return{position:"relative",display:"block",minHeight:t,padding:r,color:e.colorText,fontWeight:"normal",fontSize:o,lineHeight:n,boxSizing:"border-box"}},eB=e=>{let{antCls:t,componentCls:o}=e,n=`${o}-item`,r=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,s=`&${t}-slide-up-leave${t}-slide-up-leave-active`,a=`${o}-dropdown-placement-`,c=`${n}-option-selected`;return[{[`${o}-dropdown`]:{...Et(e),position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
232
- ${r}${a}bottomLeft,
233
- ${i}${a}bottomLeft
234
- `]:{animationName:us},[`
235
- ${r}${a}topLeft,
236
- ${i}${a}topLeft,
237
- ${r}${a}topRight,
238
- ${i}${a}topRight
239
- `]:{animationName:ps},[`${s}${a}bottomLeft`]:{animationName:ms},[`
240
- ${s}${a}topLeft,
241
- ${s}${a}topRight
242
- `]:{animationName:fs},"&-hidden":{display:"none"},[`${o}-dropdown-list-scrollbar`]:{cursor:"pointer","&:hover":{backgroundColor:e.colorFillQuaternary}},[n]:{..._M(e),cursor:"pointer",transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...Xo},"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected${n}-option-active:not(${n}-option-disabled)`]:{backgroundColor:e.controlItemBgActiveHover},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{..._M(e),color:e.colorTextDisabled}},[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},xn(e,"slide-up"),xn(e,"slide-down"),ga(e,"move-up"),ga(e,"move-down")]},FM=eB;var tB=e=>{let{antCls:t,componentCls:o}=e,n={background:"transparent"},r=["> input[disabled]","> textarea[disabled]",`> ${o}-input`,`> ${t}-input-affix-wrapper-disabled`,`> ${t}-input-search`].join(", ");return{[`&${o}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${o}-placeholder`]:{display:"none"},[`${o}-content`]:{margin:0,padding:0,"&-value":{display:"none"}},[`&${o}-filled ${o}-content`]:{[`${t}-input-filled`]:n},[`&${o}-disabled ${o}-content`]:{[r]:n,"input[disabled], textarea[disabled]":n}}}},zM=tB;var BM=4,oB=e=>{let{componentCls:t,calc:o,iconCls:n,paddingXS:r,paddingXXS:i,INTERNAL_FIXED_ITEM_MARGIN:s,lineWidth:a,lineType:c,colorIcon:l,colorIconHover:d,inputPaddingHorizontalBase:u,antCls:m}=e,[p,g]=Gt(m,"select");return{"&-multiple":{[p("multi-item-background")]:e.multipleItemBg,[p("multi-item-border-color")]:"transparent",[p("multi-item-border-radius")]:e.borderRadiusSM,[p("multi-item-height")]:e.multipleItemHeight,[p("multi-padding-base")]:`calc((${g("height")} - ${g("multi-item-height")}) / 2)`,[p("multi-padding-vertical")]:`calc(${g("multi-padding-base")} - ${s} - ${a})`,[p("multi-item-padding-horizontal")]:`calc(${u} - ${g("multi-padding-vertical")} - ${a} * 2)`,paddingBlock:g("multi-padding-vertical"),paddingInlineStart:`calc(${g("multi-padding-base")} - ${a})`,[`${t}-prefix`]:{marginInlineStart:g("multi-item-padding-horizontal")},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:"absolute",lineHeight:g("line-height"),insetInlineStart:g("multi-item-padding-horizontal"),width:`calc(100% - ${g("multi-item-padding-horizontal")})`,top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:g("font-size")},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${BM}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix,
243
- ${t}-content-item-suffix:first-child`]:{marginInlineStart:g("multi-item-padding-horizontal")},[`${t}-selection-item`]:{lineHeight:`calc(${g("multi-item-height")} - ${a} * 2)`,border:`${a} ${c} ${g("multi-item-border-color")}`,display:"flex",marginBlock:s,marginInlineEnd:o(s).mul(2).equal(),background:g("multi-item-background"),borderRadius:g("multi-item-border-radius"),paddingInlineStart:r,paddingInlineEnd:i,transition:["height","line-height","padding"].map(f=>`${f} ${e.motionDurationSlow}`).join(","),"&-content":{...Xo,marginInlineEnd:i},"&-remove":{...ca(),display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}}},[`${t}-input`]:{lineHeight:o(s).mul(2).add(g("multi-item-height")).equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:BM,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[p("multi-item-height")]:e.multipleItemHeightSM,[p("multi-item-border-radius")]:e.borderRadiusXS},[`&${t}-lg`]:{[p("multi-item-height")]:e.multipleItemHeightLG,[p("multi-item-border-radius")]:e.borderRadius},[`&${t}-filled`]:{[p("multi-item-border-color")]:e.colorSplit,[p("multi-item-background")]:e.colorBgContainer,[`&${t}-disabled`]:{[p("multi-item-border-color")]:"transparent"}}}}},HM=oB;var vS=(e,t)=>{let{componentCls:o,antCls:n}=e,[r]=Gt(n,"select"),{border:i,borderHover:s,borderActive:a,borderOutline:c}=t,l=t.background||e.selectorBg||e.colorBgContainer;return{[r("border-color")]:i,[r("background-color")]:l,[r("affix-color")]:t.affixColor,[`&:not(${o}-disabled)`]:{"&:hover":{[r("border-color")]:s,[r("background-color")]:t.backgroundHover||l},[`&${o}-focused`]:{[r("border-color")]:a,[r("background-color")]:t.backgroundActive||l,boxShadow:`0 0 0 ${Y(e.controlOutlineWidth)} ${c}`}},[`&${o}-disabled`]:{[r("border-color")]:t.borderDisabled||t.border,[r("background-color")]:t.backgroundDisabled||t.background}}},Pg=(e,t,o,n,r,i)=>{let{componentCls:s}=e;return{[`&${s}-${t}`]:[vS(e,o),{[`&${s}-status-error`]:vS(e,{...o,...n}),[`&${s}-status-warning`]:vS(e,{...o,...r})},i]}},SS=(e,t)=>({outline:`${Y(e.lineWidthFocus)} ${e.lineType} ${t}`,outlineOffset:Y(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(o=>`${o} 0s`).join(", ")}),nB=e=>{let{componentCls:t,fontHeight:o,controlHeight:n,fontSizeIcon:r,showArrowPaddingInlineEnd:i,iconCls:s,antCls:a,max:c,calc:l}=e,[d,u]=Gt(a,"select"),m=c(l(i).sub(r).equal(),0);return{[t]:[{[d("border-radius")]:e.borderRadius,[d("border-color")]:"#000",[d("border-size")]:e.lineWidth,[d("background-color")]:e.colorBgContainer,[d("font-size")]:e.fontSize,[d("line-height")]:e.lineHeight,[d("font-height")]:o,[d("color")]:e.colorText,[d("affix-color")]:e.colorText,[d("height")]:n,[d("padding-horizontal")]:l(e.paddingSM).sub(e.lineWidth).equal(),[d("padding-vertical")]:`calc((${u("height")} - ${u("font-height")}) / 2 - ${u("border-size")})`,...Et(e),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:u("border-radius"),borderWidth:u("border-size"),borderStyle:e.lineType,borderColor:u("border-color"),background:u("background-color"),fontSize:u("font-size"),lineHeight:u("line-height"),color:u("color"),paddingInline:u("padding-horizontal"),paddingBlock:u("padding-vertical"),[`${t}-prefix`]:{color:u("affix-color"),flex:"none",lineHeight:1},[`${t}-placeholder`]:{...Xo,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:m,"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"&-value":{visibility:"inherit"},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`${t}-suffix`]:{flex:"none",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,transition:["opacity","color"].map(p=>`${p} ${e.motionDurationMid} ease`).join(", "),"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:"center",[s]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,[d("color")]:e.colorTextDisabled,cursor:"not-allowed",input:{cursor:"not-allowed"}},"&-sm":{[d("height")]:e.controlHeightSM,[d("padding-horizontal")]:l(e.paddingXS).sub(e.lineWidth).equal(),[d("border-radius")]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:u("padding-horizontal")}},"&-lg":{[d("height")]:e.controlHeightLG,[d("font-size")]:e.fontSizeLG,[d("line-height")]:e.lineHeightLG,[d("font-height")]:e.fontHeightLG,[d("border-radius")]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:u("color"),fontFamily:"inherit",fontSize:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:"absolute",inset:0,lineHeight:"inherit"},[`${t}-content`]:{...Xo,alignSelf:"center","&-has-value":{display:"block","&:before":{display:"none"}},"&-has-search-value":{color:"transparent",[`> *:not(${t}-input)`]:{opacity:0}},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1,opacity:1}},[`&${t}-open ${t}-content`]:{"&-has-value":{opacity:.25},"&-has-search-value":{opacity:1,transition:`opacity ${e.motionDurationMid} ${e.motionEaseInOut}`,color:"transparent",[`> *:not(${t}-input)`]:{opacity:0}}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:"text"}},HM(e),Pg(e,"outlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorBorderHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline,affixColor:e.colorErrorAffix},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline,affixColor:e.colorWarningAffix}),Pg(e,"filled",{border:"transparent",borderHover:"transparent",borderActive:e.activeBorderColor,borderOutline:"transparent",borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{color:e.colorErrorText,background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),Pg(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"},{},{},{[`&:not(${t}-disabled):has(input:focus-visible), &:not(${t}-disabled):has(textarea:focus-visible)`]:SS(e,e.activeBorderColor),[`&${t}-status-error:not(${t}-disabled):has(input:focus-visible), &${t}-status-error:not(${t}-disabled):has(textarea:focus-visible)`]:SS(e,e.colorError),[`&${t}-status-warning:not(${t}-disabled):has(input:focus-visible), &${t}-status-warning:not(${t}-disabled):has(textarea:focus-visible)`]:SS(e,e.colorWarning)}),Pg(e,"underlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:"transparent"},{border:e.colorError,borderHover:e.colorErrorBorderHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderInlineColor:"transparent"}),zM(e)]}},VM=nB;var WM=e=>{let{fontSize:t,lineHeight:o,lineWidth:n,lineWidthFocus:r,controlHeight:i,controlHeightSM:s,controlHeightLG:a,paddingXXS:c,controlPaddingHorizontal:l,zIndexPopupBase:d,colorText:u,fontWeightStrong:m,controlItemBgActive:p,controlItemBgHover:g,colorBgContainer:f,colorFillSecondary:h,colorBgContainerDisabled:b,colorTextDisabled:x,colorPrimaryHover:y,colorPrimary:S,controlOutline:v}=e,C=c*2,w=n*2,R=Math.min(i-C,i-w),T=Math.min(s-C,s-w),N=Math.min(a-C,a-w),I=Math.floor(c/2);return{lineWidthFocus:r===0?0:n,INTERNAL_FIXED_ITEM_MARGIN:I,zIndexPopup:d+50,optionSelectedColor:u,optionSelectedFontWeight:m,optionSelectedBg:p,optionActiveBg:g,optionPadding:`${(i-t*o)/2}px ${l}px`,optionFontSize:t,optionLineHeight:o,optionHeight:i,selectorBg:f,clearBg:f,singleItemHeightLG:a,multipleItemBg:h,multipleItemBorderColor:"transparent",multipleItemHeight:R,multipleItemHeightSM:T,multipleItemHeightLG:N,multipleSelectorBgDisabled:b,multipleItemColorDisabled:x,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:y,activeBorderColor:S,activeOutlineColor:v,selectAffixPadding:c}};var rB=e=>{let{antCls:t,componentCls:o,motionDurationMid:n,inputPaddingHorizontalBase:r}=e,i={[`${o}-clear`]:{opacity:1},[`${o}-suffix:not(:last-child)`]:{opacity:0,pointerEvents:"none"},[`&${o}-allow-clear:not(${o}-show-arrow):not(${o}-customize) ${o}-content`]:{marginInlineEnd:e.showArrowPaddingInlineEnd}};return{[o]:{...Et(e),[`${o}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...Xo,[`> ${t}-typography`]:{display:"inline"}},[`${o}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${o}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),padding:0,background:"transparent",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontFamily:"inherit",fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",appearance:"none",border:0,cursor:"pointer",opacity:0,transition:["color","opacity"].map(s=>`${s} ${n} ease`).join(", "),textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":i,"&:hover":i},[`${o}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${o}-has-feedback`]:{[`${o}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},iB=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},rB(e),FM(e),{[`${t}-rtl`]:{direction:"rtl"}},gs(e,{focusElCls:`${t}-focused`})]},jM=Ye("Select",(e,{rootPrefixCls:t})=>{let o=ze(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[iB(o),VM(o)]},WM,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Nr=M(require("react"));var Tg=M(require("react"));var sB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},UM=sB;function CS(){return CS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},CS.apply(this,arguments)}var aB=(e,t)=>Tg.createElement(kt,CS({},e,{ref:t,icon:UM})),lB=Tg.forwardRef(aB),KM=lB;function wS({suffixIcon:e,contextSuffixIcon:t,clearIcon:o,contextClearIcon:n,menuItemSelectedIcon:r,contextMenuItemSelectedIcon:i,removeIcon:s,contextRemoveIcon:a,loading:c,loadingIcon:l,contextLoadingIcon:d,searchIcon:u,contextSearchIcon:m,multiple:p,hasFeedback:g,showSuffixIcon:f,feedbackIcon:h,showArrow:b,componentName:x}){return Nr.useMemo(()=>{let y=Qt(o,n,Nr.createElement(as,null)),S=R=>e===null&&!g&&!b?null:Nr.createElement(Nr.Fragment,null,f!==!1&&R,g&&h),v=null;e!==void 0?v=S(e):c?v=S(Qt(l,d,Nr.createElement(wl,{spin:!0}))):v=({open:R,showSearch:T})=>S(R&&T?Qt(u,m,Nr.createElement(_f,null)):Qt(t,Nr.createElement(KM,null)));let C=Qt(r,i,p?Nr.createElement(dg,null):null),w=Qt(s,a,Nr.createElement(Zn,null));return{clearIcon:y,suffixIcon:v,itemIcon:C,removeIcon:w}},[e,t,o,n,r,i,s,a,c,l,d,u,m,p,g,f,h,b])}var RS=M(require("react"));function cB(e){return RS.default.useMemo(()=>{if(e)return(...t)=>RS.default.createElement(Wr,{space:!0},e.apply(void 0,t))},[e])}var qM=cB;function ES(e,t){return t!==void 0?t:e!==null}var GM="SECRET_COMBOBOX_MODE_DO_NOT_USE",dB=(e,t)=>{let{prefixCls:o,bordered:n,className:r,rootClassName:i,getPopupContainer:s,popupClassName:a,dropdownClassName:c,listHeight:l=256,placement:d,listItemHeight:u,size:m,disabled:p,notFoundContent:g,status:f,builtinPlacements:h,dropdownMatchSelectWidth:b,popupMatchSelectWidth:x,direction:y,style:S,allowClear:v,variant:C,popupStyle:w,dropdownStyle:R,transitionName:T,tagRender:N,maxCount:I,prefix:E,dropdownRender:k,popupRender:F,onDropdownVisibleChange:A,onOpenChange:z,styles:D,classNames:_,clearIcon:V,showSearch:L,...G}=e,{getPopupContainer:H,getPrefixCls:W,renderEmpty:Z,direction:B,virtual:K,popupMatchSelectWidth:j,popupOverflow:Q}=Pr.useContext(Oe),{showSearch:X,allowClear:U,style:J,styles:P,className:O,classNames:q,clearIcon:ee,loadingIcon:le,menuItemSelectedIcon:re,removeIcon:ie,suffixIcon:Ce}=Xe("select"),[,de]=qt(),$e=u??de?.controlHeight,ae=W("select",o),Pe=W(),he=y??B,{compactSize:ne,compactItemClassnames:fe}=Ln(ae,he),[ce,Re]=ir("select",C,n),De=oo(ae),[we,pe]=jM(ae,De),ue=Pr.useMemo(()=>{let{mode:dt}=e;if(dt!=="combobox")return dt===GM?"combobox":dt},[e.mode]),se=ue==="multiple"||ue==="tags",Se=ES(e.suffixIcon,e.showArrow),Ie=x??b??j,Te=qM(F||k),qe=z||A,{status:Ge,hasFeedback:mt,isFormItemInput:Ze,feedbackIcon:$t}=Pr.useContext(cn),wt=Es(Ge,f),gt;g!==void 0?gt=g:ue==="combobox"?gt=null:gt=Z?.("Select")||Pr.createElement(LM,{componentName:"Select"});let{suffixIcon:ht,itemIcon:yt,removeIcon:Rt,clearIcon:Fe}=wS({...G,multiple:se,hasFeedback:mt,feedbackIcon:$t,showSuffixIcon:Se,prefixCls:ae,componentName:"Select",clearIcon:V,searchIcon:bS(L,"searchIcon"),contextClearIcon:ee,contextLoadingIcon:le,contextMenuItemSelectedIcon:re,contextRemoveIcon:ie,contextSearchIcon:bS(X,"searchIcon"),contextSuffixIcon:Ce}),xt=v??U,be=xt===!0?{clearIcon:Fe}:xt,oe=L??X,me=Ke(G,["suffixIcon","itemIcon"]),te=Xt(dt=>m??ne??dt),ge=Pr.useContext(zo),ye=p??ge,Le={...e,variant:ce,status:wt,disabled:ye,size:te},Qe=_e(J),Ot=_e(S),[Wt,Pt]=Je([q,_],[P,Qe,D,Ot],{props:Le},{popup:{_default:"root"}}),to=$(Wt.popup.root,a,c,{[`${ae}-dropdown-${he}`]:he==="rtl"},i,pe,De,we),ao={...Pt.popup?.root,...w??R},In=$({[`${ae}-lg`]:te==="large",[`${ae}-sm`]:te==="small",[`${ae}-rtl`]:he==="rtl",[`${ae}-${ce}`]:Re,[`${ae}-in-form-item`]:Ze},Ai(ae,wt,mt),fe,O,r,Wt.root,i,pe,De,we),Be=Pr.useMemo(()=>d!==void 0?d:he==="rtl"?"bottomRight":"bottomLeft",[d,he]),[tt]=ti("SelectLike",Pt.popup.root?.zIndex??ao.zIndex);return Pr.createElement(IM,{ref:t,virtual:K,classNames:Wt,styles:Pt,showSearch:oe,...me,style:Pt.root,popupMatchSelectWidth:Ie,transitionName:yr(Pe,"slide-up",T),builtinPlacements:DM(h,Q),listHeight:l,listItemHeight:$e,mode:ue,prefixCls:ae,placement:Be,direction:he,prefix:E,suffixIcon:ht,menuItemSelectedIcon:yt,removeIcon:Rt,allowClear:be,notFoundContent:gt,className:In,getPopupContainer:s||H,popupClassName:to,disabled:ye,popupStyle:{...Pt.popup.root,...ao,zIndex:tt},maxCount:se?I:void 0,tagRender:se?N:void 0,popupRender:Te,onPopupVisibleChange:qe})},nc=Pr.forwardRef(dB),uB=Yp(nc,"popupAlign");nc.SECRET_COMBOBOX_MODE_DO_NOT_USE=GM;nc.Option=Yd;nc.OptGroup=Xd;nc._InternalPanelDoNotUseOrYouWillBeFired=uB;var XM=nc;var Vi=M(require("react"));var Oa=M(require("react"));function $S(){return $S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},$S.apply(this,arguments)}var YM=Oa.forwardRef(({prefixCls:e="rc-switch",className:t,checked:o,defaultChecked:n,disabled:r,loadingIcon:i,checkedChildren:s,unCheckedChildren:a,onClick:c,onChange:l,onKeyDown:d,styles:u,classNames:m,...p},g)=>{let[f,h]=it(n??!1,o);function b(v,C){let w=f;return r||(w=v,h(w),l?.(w,C)),w}function x(v){v.which===ke.LEFT?b(!1,v):v.which===ke.RIGHT&&b(!0,v),d?.(v)}function y(v){let C=b(!f,v);c?.(C,v)}let S=$(e,t,{[`${e}-checked`]:f,[`${e}-disabled`]:r});return Oa.createElement("button",$S({},p,{type:"button",role:"switch","aria-checked":f,disabled:r,className:S,ref:g,onKeyDown:x,onClick:y}),i,Oa.createElement("span",{className:`${e}-inner`},Oa.createElement("span",{className:$(`${e}-inner-checked`,m?.content),style:u?.content},s),Oa.createElement("span",{className:$(`${e}-inner-unchecked`,m?.content),style:u?.content},a)))});YM.displayName="Switch";var ZM=YM;var mB=e=>{let{componentCls:t,trackHeightSM:o,trackPadding:n,trackMinWidthSM:r,innerMinMarginSM:i,innerMaxMarginSM:s,handleSizeSM:a,calc:c}=e,l=`${t}-inner`,d=Y(c(a).add(c(n).mul(2)).equal()),u=Y(c(s).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:r,height:o,lineHeight:Y(o),[`${t}-inner`]:{paddingInlineStart:s,paddingInlineEnd:i,[`${l}-checked, ${l}-unchecked`]:{minHeight:o},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${l}-unchecked`]:{marginTop:c(o).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:a,height:a},[`${t}-loading-icon`]:{top:c(c(a).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:s,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${Y(c(a).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},pB=e=>{let{componentCls:t,handleSize:o,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(o).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},fB=e=>{let{componentCls:t,trackPadding:o,handleBg:n,handleShadow:r,handleSize:i,calc:s}=e,a=`${t}-handle`;return{[t]:{[a]:{position:"absolute",top:o,insetInlineStart:o,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,...oi(),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:s(i).div(2).equal(),boxShadow:r,transition:`all ${e.switchDuration} ease-in-out`,content:'""',...Rl()}},[`&${t}-checked ${a}`]:{insetInlineStart:`calc(100% - ${Y(s(i).add(o).equal())})`},[`&:not(${t}-disabled):active`]:{[`${a}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${a}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},gB=e=>{let{componentCls:t,trackHeight:o,trackPadding:n,innerMinMargin:r,innerMaxMargin:i,handleSize:s,switchDuration:a,calc:c}=e,l=`${t}-inner`,d=Y(c(s).add(c(n).mul(2)).equal()),u=Y(c(i).mul(2).equal());return{[t]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:r,transition:["padding-inline-start","padding-inline-end"].map(m=>`${m} ${a} ease-in-out`).join(", "),...oi(),[`${l}-checked, ${l}-unchecked`]:{display:"flex",alignItems:"center",justifyContent:"center",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:"none",minHeight:o,transition:["margin-inline-start","margin-inline-end"].map(m=>`${m} ${a} ease-in-out`).join(", "),...oi()},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${l}-unchecked`]:{marginTop:c(o).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:r,paddingInlineEnd:i,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:c(n).mul(2).equal(),marginInlineEnd:c(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:c(n).mul(-1).mul(2).equal(),marginInlineEnd:c(n).mul(2).equal()}}}}}},hB=e=>{let{componentCls:t,trackHeight:o,trackMinWidth:n}=e;return{[t]:{...Et(e),position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:o,lineHeight:Y(o),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",...oi(),[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...ln(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}}}},yB=e=>{let{fontSize:t,lineHeight:o,controlHeight:n,colorWhite:r}=e,i=t*o,s=n/2,a=2,c=i-a*2,l=s-a*2;return{trackHeight:i,trackHeightSM:s,trackMinWidth:c*2+a*4,trackMinWidthSM:l*2+a*2,trackPadding:a,handleBg:r,handleSize:c,handleSizeSM:l,handleShadow:`0 2px 4px 0 ${new pt("#00230b").setA(.2).toRgbString()}`,innerMinMargin:c/2,innerMaxMargin:c+a+a*2,innerMinMarginSM:l/2,innerMaxMarginSM:l+a+a*2}},QM=Ye("Switch",e=>{let t=ze(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[hB(t),gB(t),fB(t),pB(t),mB(t)]},yB);var bB=Vi.forwardRef((e,t)=>{let{prefixCls:o,size:n,disabled:r,loading:i,className:s,rootClassName:a,style:c,checked:l,value:d,defaultChecked:u,defaultValue:m,onChange:p,styles:g,classNames:f,...h}=e,[b,x]=it(u??m??!1,l??d),{getPrefixCls:y,direction:S,className:v,style:C,classNames:w,styles:R}=Xe("switch"),T=Vi.useContext(zo),N=(r??T)||i,I=y("switch",o),[E,k]=QM(I),F=Xt(n),A={...e,size:F,disabled:N},z=_e(C),D=_e(c),[_,V]=Je([w,f],[R,z,g,D],{props:A}),L=Vi.createElement("div",{className:$(`${I}-handle`,_.indicator),style:V.indicator},i&&Vi.createElement(wl,{className:`${I}-loading-icon`})),G=$(v,{[`${I}-small`]:F==="small",[`${I}-loading`]:i,[`${I}-rtl`]:S==="rtl"},s,a,_.root,E,k);return Vi.createElement(vl,{component:"Switch",disabled:N},Vi.createElement(ZM,{...h,classNames:_,styles:V,checked:b,onChange:(...W)=>{x(W[0]),p?.(...W)},prefixCls:I,className:G,style:V.root,disabled:N,ref:t,loadingIcon:L}))}),JM=bB;JM.__ANT_SWITCH=!0;var ek=JM;var wn=M(require("react"));var Mg=M(require("react"));var xB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},tk=xB;function IS(){return IS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},IS.apply(this,arguments)}var vB=(e,t)=>Mg.createElement(kt,IS({},e,{ref:t,icon:tk})),SB=Mg.forwardRef(vB),ok=SB;var yi=M(require("react")),La=require("react");var nk=require("react"),rc=(0,nk.createContext)(null);var gk=M(require("react"));var tn=M(require("react")),ho=require("react");var Ls=M(require("react")),CB=e=>{let{activeTabOffset:t,horizontal:o,rtl:n,indicator:r={}}=e,{size:i,align:s="center"}=r,[a,c]=(0,Ls.useState)(),l=(0,Ls.useRef)(void 0),d=Ls.default.useCallback(m=>typeof i=="function"?i(m):typeof i=="number"?i:m,[i]);function u(){Ve.cancel(l.current)}return(0,Ls.useEffect)(()=>{let m={};if(t)if(o){m.width=d(t.width);let p=n?"right":"left";s==="start"&&(m[p]=t[p]),s==="center"&&(m[p]=t[p]+t.width/2,m.transform=n?"translateX(50%)":"translateX(-50%)"),s==="end"&&(m[p]=t[p]+t.width,m.transform="translateX(-100%)")}else m.height=d(t.height),s==="start"&&(m.top=t.top),s==="center"&&(m.top=t.top+t.height/2,m.transform="translateY(-50%)"),s==="end"&&(m.top=t.top+t.height,m.transform="translateY(-100%)");return u(),l.current=Ve(()=>{a&&m&&Object.keys(m).every(g=>{let f=m[g],h=a[g];return typeof f=="number"&&typeof h=="number"?Math.round(f)===Math.round(h):f===h})||c(m)}),u},[JSON.stringify(t),o,n,s,d]),{style:a}},rk=CB;var sk=require("react"),ik={width:0,height:0,left:0,top:0};function NS(e,t,o){return(0,sk.useMemo)(()=>{let n=new Map,r=t.get(e[0]?.key)||ik,i=r.left+r.width;for(let s=0;s<e.length;s+=1){let{key:a}=e[s],c=t.get(a);c||(c=t.get(e[s-1]?.key)||ik);let l=n.get(a)||{...c};l.right=i-l.left-l.width,n.set(a,l)}return n},[e.map(n=>n.key).join("_"),t,o])}var kg=M(require("react"));function Og(e,t){let o=kg.useRef(e),[,n]=kg.useState({});function r(i){let s=typeof i=="function"?i(o.current):i;s!==o.current&&t(s,o.current),o.current=s,n({})}return[o.current,r]}var ck=M(require("react")),Wi=require("react"),wB=.1,ak=.01,Ag=20,lk=.995**Ag;function PS(e,t){let[o,n]=(0,Wi.useState)(),[r,i]=(0,Wi.useState)(0),[s,a]=(0,Wi.useState)(0),[c,l]=(0,Wi.useState)(),d=(0,Wi.useRef)(void 0);function u(b){let{screenX:x,screenY:y}=b.touches[0];n({x,y}),window.clearInterval(d.current)}function m(b){if(!o)return;let{screenX:x,screenY:y}=b.touches[0];n({x,y});let S=x-o.x,v=y-o.y;t(S,v);let C=Date.now();i(C),a(C-r),l({x:S,y:v})}function p(){if(o&&(n(null),l(null),c)){let b=c.x/s,x=c.y/s,y=Math.abs(b),S=Math.abs(x);if(Math.max(y,S)<wB)return;let v=b,C=x;d.current=window.setInterval(()=>{if(Math.abs(v)<ak&&Math.abs(C)<ak){window.clearInterval(d.current);return}v*=lk,C*=lk,t(v*Ag,C*Ag)},Ag)}}let g=(0,Wi.useRef)(void 0);function f(b){let{deltaX:x,deltaY:y}=b,S,v=Math.abs(x),C=Math.abs(y);v===C?S=g.current==="x"?x:y:v>C?(S=x,g.current="x"):(S=y,g.current="y"),t(-S,-S)&&b.preventDefault()}let h=(0,Wi.useRef)(null);h.current={onTouchStart:u,onTouchMove:m,onTouchEnd:p,onWheel:f},ck.useEffect(()=>{function b(v){h.current.onTouchStart(v)}function x(v){h.current.onTouchMove(v)}function y(v){h.current.onTouchEnd(v)}function S(v){h.current.onWheel(v)}return document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",y,{passive:!0}),e.current.addEventListener("touchstart",b,{passive:!0}),e.current.addEventListener("wheel",S,{passive:!1}),()=>{document.removeEventListener("touchmove",x),document.removeEventListener("touchend",y)}},[])}var Ds=require("react");function Lg(e){let[t,o]=(0,Ds.useState)(0),n=(0,Ds.useRef)(0),r=(0,Ds.useRef)(void 0);return r.current=e,$u(()=>{r.current?.()},[t]),()=>{n.current===t&&(n.current+=1,o(n.current))}}function dk(e){let t=(0,Ds.useRef)([]),[,o]=(0,Ds.useState)({}),n=(0,Ds.useRef)(typeof e=="function"?e():e),r=Lg(()=>{let s=n.current;t.current.forEach(a=>{s=a(s)}),t.current=[],n.current=s,o({})});function i(s){t.current.push(s),r()}return[n.current,i]}var mk=require("react"),uk={width:0,height:0,left:0,top:0,right:0};function TS(e,t,o,n,r,i,{tabs:s,tabPosition:a,rtl:c}){let l,d,u;return["top","bottom"].includes(a)?(l="width",d=c?"right":"left",u=Math.abs(o)):(l="height",d="top",u=-o),(0,mk.useMemo)(()=>{if(!s.length)return[0,0];let m=s.length,p=m;for(let f=0;f<m;f+=1){let h=e.get(s[f].key)||uk;if(Math.floor(h[d]+h[l])>Math.floor(u+t)){p=f-1;break}}let g=0;for(let f=m-1;f>=0;f-=1)if((e.get(s[f].key)||uk)[d]<u){g=f+1;break}return g>p?[0,-1]:[g,p]},[e,t,n,r,i,u,a,s.map(m=>m.key).join("_"),c])}function MS(e){let t;return e instanceof Map?(t={},e.forEach((o,n)=>{t[n]=o})):t=e,JSON.stringify(t)}var RB="TABS_DQ";function Dg(e){return String(e).replace(/"/g,RB)}function ic(e,t,o,n){return!(!o||n||e===!1||e===void 0&&(t===!1||t===null))}var _g=M(require("react")),EB=_g.forwardRef((e,t)=>{let{prefixCls:o,editable:n,locale:r,style:i}=e;return!n||n.showAdd===!1?null:_g.createElement("button",{ref:t,type:"button",className:`${o}-nav-add`,style:i,"aria-label":r?.addAriaLabel||"Add tab",onClick:s=>{n.onEdit("add",{event:s})}},n.addIcon||"+")}),Fg=EB;var sc=M(require("react")),$B=sc.forwardRef((e,t)=>{let{position:o,prefixCls:n,extra:r}=e;if(!r)return null;let i,s={};return typeof r=="object"&&!sc.isValidElement(r)?s=r:s.right=r,o==="right"&&(i=s.right),o==="left"&&(i=s.left),i?sc.createElement("div",{className:`${n}-extra-content`,ref:t},i):null}),kS=$B;var lr=M(require("react")),ac=require("react");function OS(){return OS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},OS.apply(this,arguments)}var IB=lr.forwardRef((e,t)=>{let{prefixCls:o,id:n,tabs:r,locale:i,mobile:s,more:a={},style:c,className:l,editable:d,tabBarGutter:u,rtl:m,removeAriaLabel:p,onTabClick:g,getPopupContainer:f,popupClassName:h,popupStyle:b,classNames:x,styles:y}=e,[S,v]=(0,ac.useState)(!1),[C,w]=(0,ac.useState)(null),{icon:R="More",popupRender:T}=a,N=`${n}-more-popup`,I=`${o}-dropdown`,E=C!==null?`${N}-${C}`:null,k=i?.dropdownAriaLabel;function F(H,W){H.preventDefault(),H.stopPropagation(),d.onEdit("remove",{key:W,event:H})}let A=lr.createElement(pf,{onClick:({key:H,domEvent:W})=>{g(H,W),v(!1)},prefixCls:`${I}-menu`,id:N,tabIndex:-1,role:"listbox","aria-activedescendant":E,selectedKeys:[C],"aria-label":k!==void 0?k:"expanded dropdown"},r.map(H=>{let{closable:W,disabled:Z,closeIcon:B,key:K,label:j}=H,Q=ic(W,B,d,Z);return lr.createElement(si,{key:K,id:`${N}-${K}`,role:"option","aria-controls":n&&`${n}-panel-${K}`,disabled:Z},lr.createElement("span",null,j),Q&&lr.createElement("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:$(`${I}-menu-item-remove`,x?.remove),style:y?.remove,onClick:X=>{X.stopPropagation(),F(X,K)}},B||d.removeIcon||"\xD7"))})),z=T?T(A,{restTabs:r,onClose:()=>v(!1)}):A;function D(H){let W=r.filter(K=>!K.disabled),Z=W.findIndex(K=>K.key===C)||0,B=W.length;for(let K=0;K<B;K+=1){Z=(Z+H+B)%B;let j=W[Z];if(!j.disabled){w(j.key);return}}}function _(H){let{which:W}=H;if(!S){[ke.DOWN,ke.SPACE,ke.ENTER].includes(W)&&(v(!0),H.preventDefault());return}switch(W){case ke.UP:D(-1),H.preventDefault();break;case ke.DOWN:D(1),H.preventDefault();break;case ke.ESC:v(!1);break;case ke.SPACE:case ke.ENTER:C!==null&&g(C,H);break}}(0,ac.useEffect)(()=>{let H=document.getElementById(E);H?.scrollIntoView&&H.scrollIntoView(!1)},[E,C]),(0,ac.useEffect)(()=>{S||w(null)},[S]);let V={marginInlineStart:u};r.length||(V.visibility="hidden",V.order=1);let L=$(h,{[`${I}-rtl`]:m}),G=s?null:lr.createElement(qp,OS({prefixCls:I,overlay:z,visible:r.length?S:!1,onVisibleChange:v,overlayClassName:L,overlayStyle:b,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:f},a),lr.createElement("button",{type:"button",className:`${o}-nav-more`,style:V,"aria-haspopup":"listbox","aria-controls":N,id:`${n}-more`,"aria-expanded":S,onKeyDown:_},R));return lr.createElement("div",{className:$(`${o}-nav-operations`,l),style:c,ref:t},G,lr.createElement(Fg,{prefixCls:o,locale:i,editable:d}))}),pk=lr.memo(IB,(e,t)=>t.tabMoving);var cr=M(require("react"));var NB=e=>{let{prefixCls:t,id:o,active:n,focus:r,tab:{key:i,label:s,disabled:a,closeIcon:c,icon:l},closable:d,renderWrapper:u,removeAriaLabel:m,editable:p,onClick:g,onFocus:f,onBlur:h,onKeyDown:b,onMouseDown:x,onMouseUp:y,styles:S,classNames:v,tabCount:C,currentPosition:w}=e,R=`${t}-tab`,T=ic(d,c,p,a);function N(A){a||g(A)}function I(A){A.preventDefault(),A.stopPropagation(),p.onEdit("remove",{key:i,event:A})}let E=cr.useMemo(()=>l&&typeof s=="string"?cr.createElement("span",null,s):s,[s,l]),k=cr.useRef(null);cr.useEffect(()=>{r&&k.current&&k.current.focus()},[r]);let F=cr.createElement("div",{key:i,"data-node-key":Dg(i),className:$(R,v?.item,{[`${R}-with-remove`]:T,[`${R}-active`]:n,[`${R}-disabled`]:a,[`${R}-focus`]:r}),style:S?.item,onClick:N},cr.createElement("div",{ref:k,role:"tab","aria-selected":n,id:o&&`${o}-tab-${i}`,className:`${R}-btn`,"aria-controls":o&&`${o}-panel-${i}`,"aria-disabled":a,tabIndex:a?null:n?0:-1,onClick:A=>{A.stopPropagation(),N(A)},onKeyDown:b,onMouseDown:x,onMouseUp:y,onFocus:f,onBlur:h},r&&cr.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${w} of ${C}`),l&&cr.createElement("span",{className:`${R}-icon`},l),s&&E),T&&cr.createElement("button",{type:"button","aria-label":m||"remove",tabIndex:n?0:-1,className:$(`${R}-remove`,v?.remove),style:S?.remove,onClick:A=>{A.stopPropagation(),I(A)}},c||p.removeIcon||"\xD7"));return u?u(F):F},fk=NB;function AS(){return AS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},AS.apply(this,arguments)}var PB=(e,t)=>{let{offsetWidth:o,offsetHeight:n,offsetTop:r,offsetLeft:i}=e,{width:s,height:a,left:c,top:l}=e.getBoundingClientRect();return Math.abs(s-o)<1?[s,a,c-t.left,l-t.top]:[o,n,i,r]},lc=e=>{let{offsetWidth:t=0,offsetHeight:o=0}=e.current||{};if(e.current){let{width:n,height:r}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,r]}return[t,o]},zg=(e,t)=>e[t?0:1],TB=tn.forwardRef((e,t)=>{let{className:o,style:n,id:r,animated:i,activeKey:s,rtl:a,extra:c,editable:l,locale:d,tabPosition:u,tabBarGutter:m,children:p,onTabClick:g,onTabScroll:f,indicator:h,classNames:b,styles:x}=e,{prefixCls:y,tabs:S}=tn.useContext(rc),v=(0,ho.useRef)(null),C=(0,ho.useRef)(null),w=(0,ho.useRef)(null),R=(0,ho.useRef)(null),T=(0,ho.useRef)(null),N=(0,ho.useRef)(null),I=(0,ho.useRef)(null),E=u==="top"||u==="bottom",[k,F]=Og(0,(oe,me)=>{E&&f&&f({direction:oe>me?"left":"right"})}),[A,z]=Og(0,(oe,me)=>{!E&&f&&f({direction:oe>me?"top":"bottom"})}),[D,_]=(0,ho.useState)([0,0]),[V,L]=(0,ho.useState)([0,0]),[G,H]=(0,ho.useState)([0,0]),[W,Z]=(0,ho.useState)([0,0]),[B,K]=dk(new Map),j=NS(S,B,V[0]),Q=zg(D,E),X=zg(V,E),U=zg(G,E),J=zg(W,E),P=Math.floor(Q)<Math.floor(X+U),O=P?Q-J:Q-U,q=`${y}-nav-operations-hidden`,ee=0,le=0;E&&a?(ee=0,le=Math.max(0,X-O)):(ee=Math.min(0,O-X),le=0);function re(oe){return oe<ee?ee:oe>le?le:oe}let ie=(0,ho.useRef)(null),[Ce,de]=(0,ho.useState)();function $e(){de(Date.now())}function ae(){ie.current&&clearTimeout(ie.current)}PS(R,(oe,me)=>{function te(ge,ye){ge(Le=>re(Le+ye))}return P?(E?te(F,oe):te(z,me),ae(),$e(),!0):!1}),(0,ho.useEffect)(()=>(ae(),Ce&&(ie.current=setTimeout(()=>{de(0)},100)),ae),[Ce]);let[Pe,he]=TS(j,O,E?k:A,X,U,J,{...e,tabs:S}),ne=Ne((oe=s)=>{let me=j.get(oe)||{width:0,height:0,left:0,right:0,top:0};if(E){let te=k;a?me.right<k?te=me.right:me.right+me.width>k+O&&(te=me.right+me.width-O):me.left<-k?te=-me.left:me.left+me.width>-k+O&&(te=-(me.left+me.width-O)),z(0),F(re(te))}else{let te=A;me.top<-A?te=-me.top:me.top+me.height>-A+O&&(te=-(me.top+me.height-O)),F(0),z(re(te))}}),[fe,ce]=(0,ho.useState)(),[Re,De]=(0,ho.useState)(!1),we=S.filter(oe=>!oe.disabled).map(oe=>oe.key),pe=oe=>{let me=we.indexOf(fe||s),te=we.length,ge=(me+oe+te)%te,ye=we[ge];ce(ye)},ue=(oe,me)=>{let te=we.indexOf(oe),ge=S.find(Le=>Le.key===oe);ic(ge?.closable,ge?.closeIcon,l,ge?.disabled)&&(me.preventDefault(),me.stopPropagation(),l.onEdit("remove",{key:oe,event:me}),te===we.length-1?pe(-1):pe(1))},se=(oe,me)=>{De(!0),me.button===1&&ue(oe,me)},Se=oe=>{let{code:me}=oe,te=a&&E,ge=we[0],ye=we[we.length-1];switch(me){case"ArrowLeft":{E&&pe(te?1:-1);break}case"ArrowRight":{E&&pe(te?-1:1);break}case"ArrowUp":{oe.preventDefault(),E||pe(-1);break}case"ArrowDown":{oe.preventDefault(),E||pe(1);break}case"Home":{oe.preventDefault(),ce(ge);break}case"End":{oe.preventDefault(),ce(ye);break}case"Enter":case"Space":{oe.preventDefault(),g(fe??s,oe);break}case"Backspace":case"Delete":{ue(fe,oe);break}}},Ie={};E?Ie.marginInlineStart=m:Ie.marginTop=m;let Te=S.map((oe,me)=>{let{key:te}=oe;return tn.createElement(fk,{id:r,prefixCls:y,key:te,tab:oe,classNames:{item:b?.item,remove:b?.remove},styles:{item:me===0?x?.item:{...Ie,...x?.item},remove:x?.remove},closable:oe.closable,editable:l,active:te===s,focus:te===fe,renderWrapper:p,removeAriaLabel:d?.removeAriaLabel,tabCount:we.length,currentPosition:me+1,onClick:ge=>{g(te,ge)},onKeyDown:Se,onFocus:()=>{Re||ce(te),ne(te),$e(),R.current&&(a||(R.current.scrollLeft=0),R.current.scrollTop=0)},onBlur:()=>{ce(void 0)},onMouseDown:ge=>se(te,ge),onMouseUp:()=>{De(!1)}})}),qe=()=>K(()=>{let oe=new Map,me=T.current?.getBoundingClientRect();return S.forEach(({key:te})=>{let ge=T.current?.querySelector(`[data-node-key="${Dg(te)}"]`);if(ge){let[ye,Le,Qe,Ot]=PB(ge,me);oe.set(te,{width:ye,height:Le,left:Qe,top:Ot})}}),oe});(0,ho.useEffect)(()=>{qe()},[S.map(oe=>oe.key).join("_")]);let Ge=Lg(()=>{let oe=lc(v),me=lc(C),te=lc(w);_([oe[0]-me[0]-te[0],oe[1]-me[1]-te[1]]);let ge=lc(I);H(ge);let ye=lc(N);Z(ye);let Le=lc(T);L([Le[0]-ge[0],Le[1]-ge[1]]),qe()}),mt=S.slice(0,Pe),Ze=S.slice(he+1),$t=[...mt,...Ze],wt=j.get(s),{style:gt}=rk({activeTabOffset:wt,horizontal:E,indicator:h,rtl:a});(0,ho.useEffect)(()=>{ne()},[s,ee,le,MS(wt),MS(j),E]),(0,ho.useEffect)(()=>{Ge()},[a]);let ht=!!$t.length,yt=`${y}-nav-wrap`,Rt,Fe,xt,be;return E?a?(Fe=k>0,Rt=k!==le):(Rt=k<0,Fe=k!==ee):(xt=A<0,be=A!==ee),tn.createElement(sn,{onResize:Ge},tn.createElement("div",{ref:bo(t,v),role:"tablist","aria-orientation":E?"horizontal":"vertical",className:$(`${y}-nav`,o,b?.header),style:{...x?.header,...n},onKeyDown:()=>{$e()}},tn.createElement(kS,{ref:C,position:"left",extra:c,prefixCls:y}),tn.createElement(sn,{onResize:Ge},tn.createElement("div",{className:$(yt,{[`${yt}-ping-left`]:Rt,[`${yt}-ping-right`]:Fe,[`${yt}-ping-top`]:xt,[`${yt}-ping-bottom`]:be}),ref:R},tn.createElement(sn,{onResize:Ge},tn.createElement("div",{ref:T,className:`${y}-nav-list`,style:{transform:`translate(${k}px, ${A}px)`,transition:Ce?"none":void 0}},Te,tn.createElement(Fg,{ref:I,prefixCls:y,locale:d,editable:l,style:{...Te.length===0?void 0:Ie,visibility:ht?"hidden":null}}),tn.createElement("div",{className:$(`${y}-ink-bar`,b?.indicator,{[`${y}-ink-bar-animated`]:i.inkBar}),style:{...gt,...x?.indicator}}))))),tn.createElement(pk,AS({},e,{removeAriaLabel:d?.removeAriaLabel,ref:N,prefixCls:y,tabs:$t,className:!ht&&q,popupStyle:x?.popup,tabMoving:!!Ce})),tn.createElement(kS,{ref:w,position:"right",extra:c,prefixCls:y})))}),LS=TB;var MB=({renderTabBar:e,...t})=>e?e(t,LS):gk.createElement(LS,t),hk=MB;var Aa=M(require("react"));var cc=M(require("react")),kB=cc.forwardRef((e,t)=>{let{prefixCls:o,className:n,style:r,id:i,active:s,tabKey:a,children:c}=e,l=cc.Children.count(c)>0;return cc.createElement("div",{id:i&&`${i}-panel-${a}`,role:"tabpanel",tabIndex:s&&l?0:-1,"aria-labelledby":i&&`${i}-tab-${a}`,"aria-hidden":!s,style:r,className:$(o,s&&`${o}-active`,n),ref:t},c)}),yk=kB;function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Bg.apply(this,arguments)}var OB=e=>{let{id:t,activeKey:o,animated:n,tabPosition:r,destroyOnHidden:i,bodyStyle:s,bodyClassName:a,contentStyle:c,contentClassName:l}=e,{prefixCls:d,tabs:u}=Aa.useContext(rc),m=n.tabPane,p=`${d}-body`,g=`${d}-content`;return Aa.createElement("div",{className:$(`${p}-holder`)},Aa.createElement("div",{className:$(p,`${p}-${r}`,{[`${p}-animated`]:m},a),style:s},u.map(f=>{let{key:h,forceRender:b,style:x,className:y,destroyOnHidden:S,...v}=f,C=h===o;return Aa.createElement(fo,Bg({key:h,visible:C,forceRender:b,removeOnLeave:!!(i??S),leavedClassName:`${g}-hidden`},n.tabPaneMotion),({style:w,className:R},T)=>Aa.createElement(yk,Bg({},v,{prefixCls:g,id:t,tabKey:h,animated:m,active:C,style:{...c,...x,...w},className:$(l,y,R),ref:T})))})))},bk=OB;function DS(e={inkBar:!0,tabPane:!1}){let t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t={inkBar:!0,...typeof e=="object"?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},eu.apply(this,arguments)}var xk=0,AB=yi.forwardRef((e,t)=>{let{id:o,prefixCls:n="rc-tabs",className:r,items:i,direction:s,activeKey:a,defaultActiveKey:c,editable:l,animated:d,tabPosition:u="top",tabBarGutter:m,tabBarStyle:p,tabBarExtraContent:g,locale:f,more:h,destroyOnHidden:b,renderTabBar:x,onChange:y,onTabClick:S,onTabScroll:v,getPopupContainer:C,popupClassName:w,indicator:R,classNames:T,styles:N,...I}=e,E=yi.useMemo(()=>(i||[]).filter(j=>j&&typeof j=="object"&&"key"in j),[i]),k=s==="rtl",F=DS(d),[A,z]=(0,La.useState)(!1);(0,La.useEffect)(()=>{z(Xh())},[]);let[D,_]=it(c??E[0]?.key,a),[V,L]=(0,La.useState)(()=>E.findIndex(j=>j.key===D));(0,La.useEffect)(()=>{let j=E.findIndex(Q=>Q.key===D);j===-1&&(j=Math.max(0,Math.min(V,E.length-1)),_(E[j]?.key)),L(j)},[E.map(j=>j.key).join("_"),D,V]);let[G,H]=it(null,o);(0,La.useEffect)(()=>{o||(H(`rc-tabs-${xk}`),xk+=1)},[]);function W(j,Q){S?.(j,Q);let X=j!==D;_(j),X&&y?.(j)}let Z={id:G,activeKey:D,animated:F,tabPosition:u,rtl:k,mobile:A},B={...Z,editable:l,locale:f,more:h,tabBarGutter:m,onTabClick:W,onTabScroll:v,extra:g,style:p,getPopupContainer:C,popupClassName:$(w,T?.popup),indicator:R,styles:N,classNames:T},K=yi.useMemo(()=>({tabs:E,prefixCls:n}),[E,n]);return yi.createElement(rc.Provider,{value:K},yi.createElement("div",eu({ref:t,id:o,className:$(n,`${n}-${u}`,{[`${n}-mobile`]:A,[`${n}-editable`]:l,[`${n}-rtl`]:k},r)},I),yi.createElement(hk,eu({},B,{renderTabBar:x})),yi.createElement(bk,eu({destroyOnHidden:b},Z,{bodyStyle:N?.body,bodyClassName:T?.body,contentStyle:N?.content,contentClassName:T?.content,animated:F}))))}),vk=AB;var Sk=vk;var LB={motionAppear:!1,motionEnter:!0,motionLeave:!0};function _S(e,t={inkBar:!0,tabPane:!1}){let o;return t===!1?o={inkBar:!1,tabPane:!1}:t===!0?o={inkBar:!0,tabPane:!0}:o={inkBar:!0,...st(t)?t:{}},o.tabPane&&(o.tabPaneMotion={...LB,motionName:yr(e,"switch")}),o}var Ck=M(require("react"));function DB(e){return e.filter(t=>t)}function _B(e,t){if(e)return e.map(n=>({...n,destroyOnHidden:n.destroyOnHidden??n.destroyInactiveTabPane}));let o=co(t).map(n=>{if(Ck.isValidElement(n)){let{key:r,props:i}=n,{tab:s,...a}=i||{};return{key:String(r),...a,label:s}}return null});return DB(o)}var wk=_B;var FB=e=>{let{componentCls:t,motionDurationSlow:o}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${o}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${o}`}}}}},[xn(e,"slide-up"),xn(e,"slide-down")]]},Rk=FB;var zB=e=>{let{componentCls:t,tabsCardPadding:o,cardBg:n,cardGutter:r,colorBorderSecondary:i,itemSelectedColor:s}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:o,background:n,border:`${Y(e.lineWidth)} ${e.lineType} ${i}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:s,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:An(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:Y(r)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:Y(r)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadiusLG)} 0 0 ${Y(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},BB=e=>{let{antCls:t,componentCls:o,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${o}-dropdown`]:{...Et(e),position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`&${t}-slide-down-enter${t}-slide-down-enter-active${o}-dropdown-placement-bottomLeft,
244
- &${t}-slide-down-appear${t}-slide-down-appear-active${o}-dropdown-placement-bottomLeft,
245
- &${t}-slide-down-enter${t}-slide-down-enter-active${o}-dropdown-placement-bottom,
246
- &${t}-slide-down-appear${t}-slide-down-appear-active${o}-dropdown-placement-bottom,
247
- &${t}-slide-down-enter${t}-slide-down-enter-active${o}-dropdown-placement-bottomRight,
248
- &${t}-slide-down-appear${t}-slide-down-appear-active${o}-dropdown-placement-bottomRight`]:{animationName:us},[`&${t}-slide-up-enter${t}-slide-up-enter-active${o}-dropdown-placement-topLeft,
249
- &${t}-slide-up-appear${t}-slide-up-appear-active${o}-dropdown-placement-topLeft,
250
- &${t}-slide-up-enter${t}-slide-up-enter-active${o}-dropdown-placement-top,
251
- &${t}-slide-up-appear${t}-slide-up-appear-active${o}-dropdown-placement-top,
252
- &${t}-slide-up-enter${t}-slide-up-enter-active${o}-dropdown-placement-topRight,
253
- &${t}-slide-up-appear${t}-slide-up-appear-active${o}-dropdown-placement-topRight`]:{animationName:ps},[`&${t}-slide-down-leave${t}-slide-down-leave-active${o}-dropdown-placement-bottomLeft,
254
- &${t}-slide-down-leave${t}-slide-down-leave-active${o}-dropdown-placement-bottom,
255
- &${t}-slide-down-leave${t}-slide-down-leave-active${o}-dropdown-placement-bottomRight`]:{animationName:ms},[`&${t}-slide-up-leave${t}-slide-up-leave-active${o}-dropdown-placement-topLeft,
256
- &${t}-slide-up-leave${t}-slide-up-leave-active${o}-dropdown-placement-top,
257
- &${t}-slide-up-leave${t}-slide-up-leave-active${o}-dropdown-placement-topRight`]:{animationName:fs},[`${o}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${Y(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":{...Xo,display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${Y(e.paddingXXS)} ${Y(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}}}}}},HB=e=>{let{componentCls:t,margin:o,colorBorderSecondary:n,horizontalMargin:r,verticalItemPadding:i,verticalItemMargin:s,motionDurationSlow:a,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:r,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Y(e.lineWidth)} ${e.lineType} ${n}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:["width","left","right"].map(l=>`${l} ${a}`).join(", ")}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
258
- > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:o,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:i,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:s},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:["height","top"].map(l=>`${l} ${a}`).join(", ")}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{marginLeft:{_skip_check_:!0,value:Y(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${Y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},VB=e=>{let{componentCls:t,cardPaddingSM:o,cardPaddingLG:n,cardHeightSM:r,cardHeightLG:i,horizontalItemPaddingSM:s,horizontalItemPaddingLG:a}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o},[`${t}-nav-add`]:{minWidth:r,minHeight:r}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${Y(e.borderRadius)} ${Y(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${Y(e.borderRadius)} ${Y(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Y(e.borderRadius)} ${Y(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Y(e.borderRadius)} 0 0 ${Y(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}}}}}},WB=e=>{let{componentCls:t,itemActiveColor:o,itemHoverColor:n,iconCls:r,tabsHorizontalItemMargin:i,horizontalItemPadding:s,itemSelectedColor:a,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:s,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:o}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM},[`${l}-icon > svg`]:{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"}},"&-remove":{flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...ln(e)},"&:hover":{color:n},[`&${l}-active ${l}-btn`]:{color:a},[`&${l}-focus ${l}-btn:focus-visible`]:An(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${r}`]:{margin:0,verticalAlign:"middle"},[`${r}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:i}}}},jB=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:o,iconCls:n,cardGutter:r,calc:i}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:o},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[n]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:i(e.marginXXS).mul(-1).equal()},[n]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-body-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-body-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:r},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},UB=e=>{let{componentCls:t,tabsCardPadding:o,cardHeight:n,cardGutter:r,itemHoverColor:i,itemActiveColor:s,colorBorderSecondary:a}=e;return{[t]:{...Et(e),display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:o,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:{minWidth:n,minHeight:n,marginLeft:{_skip_check_:!0,value:r},background:"transparent",border:`${Y(e.lineWidth)} ${e.lineType} ${a}`,borderRadius:`${Y(e.borderRadiusLG)} ${Y(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:s},...ln(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...WB(e),[`${t}-body`]:{position:"relative",width:"100%"},[`${t}-body-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-content`]:{...ln(e),"&-hidden":{display:"none"}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},KB=e=>{let{cardHeight:t,cardHeightSM:o,cardHeightLG:n,controlHeight:r,controlHeightLG:i}=e,s=t||i,a=o||r,c=n||i+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:s,cardHeightSM:a,cardHeightLG:c,cardPadding:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},Ek=Ye("Tabs",e=>{let t=ze(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Y(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${Y(e.horizontalItemGutter)}`});return[VB(t),jB(t),HB(t),BB(t),zB(t),UB(t),Rk(t)]},KB);var qB=()=>null,$k=qB;var GB=wn.forwardRef((e,t)=>{let{type:o,className:n,rootClassName:r,size:i,onEdit:s,hideAdd:a,centered:c,addIcon:l,removeIcon:d,moreIcon:u,more:m,popupClassName:p,children:g,items:f,animated:h,style:b,indicatorSize:x,indicator:y,classNames:S,styles:v,destroyInactiveTabPane:C,destroyOnHidden:w,tabPlacement:R,tabPosition:T,...N}=e,{prefixCls:I}=N,{getPrefixCls:E,direction:k,getPopupContainer:F,className:A,style:z,classNames:D,styles:_}=Xe("tabs"),{tabs:V}=wn.useContext(Oe),L=E("tabs",I),G=oo(L),[H,W]=Ek(L,G),Z=wn.useRef(null);wn.useImperativeHandle(t,()=>({nativeElement:Z.current}));let B;o==="editable-card"&&(B={onEdit:(re,{key:ie,event:Ce})=>{s?.(re==="add"?Ce:ie,re)},removeIcon:d??V?.removeIcon??wn.createElement(Zn,null),addIcon:(l??V?.addIcon)||wn.createElement(ok,null),showAdd:a!==!0});let K=E(),j=Xt(i),Q=wk(f,g),X=_S(L,h),U={align:y?.align??V?.indicator?.align,size:y?.size??x??V?.indicator?.size??V?.indicatorSize},J=wn.useMemo(()=>{let re=R??T??void 0,ie=k==="rtl";switch(re){case"start":return ie?"right":"left";case"end":return ie?"left":"right";default:return re}},[R,T,k]),P={...e,size:j,tabPlacement:J,items:Q},O=_e(z),q=_e(b),[ee,le]=Je([D,S],[_,O,v,q],{props:P},{popup:{_default:"root"}});return wn.createElement(Sk,{ref:Z,direction:k,getPopupContainer:F,...N,items:Q,className:$({[`${L}-large`]:j==="large",[`${L}-small`]:j==="small",[`${L}-card`]:["card","editable-card"].includes(o),[`${L}-editable-card`]:o==="editable-card",[`${L}-centered`]:c},A,n,r,ee.root,H,W,G),classNames:{...ee,popup:$(p,H,W,G,ee.popup?.root)},styles:{...le,popup:le.popup?.root},style:le.root,editable:B,more:{icon:V?.more?.icon??V?.moreIcon??u??wn.createElement(Fl,null),transitionName:`${K}-slide-up`,...m},prefixCls:L,animated:X,indicator:U,destroyOnHidden:w??C,tabPosition:J})}),Ik=GB;Ik.TabPane=$k;var Nk=Ik;var Hg=M(require("react"),1);var XB={locale:"zh-cn",global:{close:"\u5173\u95ED"},Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"}},YB={locale:"en",global:{close:"Close"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"}};function Pk(e){return e==="en"?YB:XB}var tu=M(require("react"),1);function Tk(){return typeof document>"u"?!1:document.documentElement.hasAttribute("data-ds-dark-theme")||document.body?.hasAttribute("data-ds-dark-theme")===!0}function Mk(){let[e,t]=tu.default.useState(Tk);return tu.default.useEffect(()=>{let o=()=>t(Tk());o();let n=new MutationObserver(o);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-ds-dark-theme"]}),document.body&&n.observe(document.body,{attributes:!0,attributeFilter:["data-ds-dark-theme"]}),()=>n.disconnect()},[]),e}function kk(){let e=()=>(typeof document>"u"?"":document.documentElement.lang).toLowerCase().startsWith("en")?"en":"zh",[t,o]=tu.default.useState(e);return tu.default.useEffect(()=>{let n=()=>o(e());n();let r=new MutationObserver(n);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}),()=>r.disconnect()},[]),t}function jn(e){return e.default??e}var ZB=jn(Ff),ji=Object.assign(jn(bP),{TextArea:ZB}),QB=jn(nd),mo=Hg.default.forwardRef(function(t,o){return Hg.default.createElement(QB,{shape:"round",size:"middle",...t,ref:o})}),FS=jn(yI),JB=jn(ss),Vg=jn(PN),Da=jn(iT),Ok=jn(ST),Ak=jn(IT),gn=jn(XM),Wg=jn(ek),Lk=jn(Nk),eH=jn(W0),tH=jn(Ws);function oH(e){if(typeof document>"u")return"";let t=getComputedStyle(document.body).getPropertyValue(e).trim();return t!==""?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()}function Rn(e){let t=Mk(),o=kk(),n=oH("--dsw-alias-link");return Hg.default.createElement(JB,{locale:e.locale??Pk(o),button:{autoInsertSpace:!1},theme:{algorithm:t?eH:tH,...n===""?{}:{token:{colorLink:n,colorLinkHover:n,colorLinkActive:n}},components:{Button:{borderRadius:8}}}},e.children)}var En=require("react");var nH=new Map([["read-only",["permission.readOnly","Read Only"]],["workspace-write",["permission.workspaceWrite","Workspace Write"]],["danger-full-access",["permission.fullAccess","Full access"]]]);function Dk(e,t){let o=nH.get(e.value);return o!==void 0&&(e.name===e.value||e.name===o[1])?t(o[0]):e.name||e.value}function _k(e,t){return e!==t&&t==="danger-full-access"}var jg=class extends Error{constructor(){super("added-workspace-missing"),this.name="AddedWorkspaceMissingError"}};function Fk(e,t){let o=e.reflect?.get;if(typeof o=="function")try{return o.call(e.reflect,t)}catch{}if(typeof e.get=="function")try{return e.get(t)}catch{}}function zk(e,t){if(e===null||typeof e!="object")return;let o=e[t];return typeof o=="function"?o:void 0}function Bk(e){if(typeof e=="string"&&e.trim()!=="")return e;if(e===null||typeof e!="object")return;let t=e;if(t.canceled===!0)return;if(typeof t.path=="string"&&t.path.trim()!=="")return t.path;let o=Array.isArray(t.filePaths)?t.filePaths[0]:void 0;return typeof o=="string"&&o.trim()!==""?o:void 0}function rH(){let e=globalThis,t=e.__DSH_DIRECTORY_PICKER__?.pick;if(typeof t=="function")return{pick:()=>t.call(e.__DSH_DIRECTORY_PICKER__)}}function Hk(e){let t=rH();if(t!==void 0)return{async pickDirectory(){return Bk(await t.pick())}};let o=Fk(e,"uiWorkspace"),n=Fk(e,"dialog"),r=zk(o,"pickDirectory")!==void 0?o:n;if(!(zk(r,"pickDirectory")===void 0||r===void 0))return{async pickDirectory(){return Bk(await r.pickDirectory())}}}var xe=require("react/jsx-runtime"),iH=[1,2,3,4,5,6,7],sH=["once","interval","hourly","daily","weekly","monthly","custom"],aH=Array.from({length:24},(e,t)=>String(t).padStart(2,"0")),jk=Array.from({length:60},(e,t)=>String(t).padStart(2,"0"));function Uk({t:e,permissionT:t,modelT:o,busy:n,workspaces:r,models:i,modelFailures:s,defaultModel:a,skills:c,permissions:l,defaultPermission:d,draft:u,editing:m,onClose:p,onSubmit:g,onAddWorkspace:f}){let[h,b]=(0,En.useState)(()=>({...lh(new Date,r,a,d),...u})),[x,y]=(0,En.useState)(),[S,v]=(0,En.useState)(),[C,w]=(0,En.useState)(!1),[R,T]=(0,En.useState)(!1),[N,I]=(0,En.useState)(0),[E,k]=(0,En.useState)(0),[F,A]=(0,En.useState)(),z=(0,En.useRef)(null),D=(0,En.useRef)(0);(0,En.useEffect)(()=>{let O=q=>{if(q.key==="Escape"&&document.querySelector(".ant-select-dropdown:not(.ant-select-dropdown-hidden), .ant-dropdown:not(.ant-dropdown-hidden)")===null){if(q.preventDefault(),q.stopPropagation(),q.stopImmediatePropagation(),S!==void 0){w(!1),v(void 0);return}p()}};return window.addEventListener("keydown",O,!0),()=>window.removeEventListener("keydown",O,!0)},[S,p]);let _=O=>{b(q=>({...q,...O})),y(void 0)},V=r.some(O=>O.id===h.workspaceId),L=async()=>{if(!(f===void 0||R)){T(!0),y(void 0),document.activeElement instanceof HTMLElement&&document.activeElement.blur();try{let O=await f();O!==void 0&&_({workspaceId:O})}catch(O){y(O instanceof jg||O instanceof Error&&O.message==="picker-unavailable"||!(O instanceof Error)||O.message===""?e(O instanceof Error&&O.message==="picker-unavailable"?"form.workspaceUnavailable":"form.addWorkspaceFailed"):O.message)}finally{T(!1)}}},G=O=>{if(_k(h.permission,O)){w(!1),v(O);return}_({permission:O})},H=async O=>{O?.preventDefault();try{await g(h)}catch(q){if(q instanceof nn){y(e(q.key));return}y(q instanceof Error?q.message:e("error.action"))}},W=h.onceAt.slice(0,10),Z=h.onceAt.slice(11,16)||"09:00",B=lH(new Date),j=i.find(O=>`${O.provider}::${O.model}`===h.modelKey)?.reasoning,Q=ah(h.prompt,N),X=Q===void 0||F===Q.query?[]:bC(c,Q.query),U=Math.min(E,Math.max(X.length-1,0)),J=O=>{D.current=O,I(O)};(0,En.useEffect)(()=>{let O=document.querySelector('.dsh-st-skill-menu [aria-selected="true"]');O instanceof HTMLElement&&O.scrollIntoView({block:"nearest"})},[U,Q?.query]);let P=O=>{let q=xC(h.prompt,D.current,pu(O));_({prompt:q.text}),A(void 0),queueMicrotask(()=>{let ee=z.current?.resizableTextArea?.textArea;ee!=null&&(ee.focus(),ee.setSelectionRange(q.caret,q.caret),J(q.caret))})};return(0,xe.jsx)(Rn,{children:(0,xe.jsxs)(Da,{open:!0,title:e(m===!0?"modal.edit":"modal.title"),onCancel:p,maskClosable:!1,keyboard:!1,width:720,destroyOnHidden:!0,footer:[(0,xe.jsx)(mo,{disabled:n,onClick:p,children:e("form.cancel")},"cancel"),(0,xe.jsx)(mo,{htmlType:"submit",form:"dsh-st-create-form",type:"primary",disabled:n||R||!V,children:e("modal.save")},"save")],children:[(0,xe.jsxs)("form",{id:"dsh-st-create-form",className:"dsh-st-form",onSubmit:O=>{H(O)},children:[(0,xe.jsx)("p",{children:e("form.subtitle")}),(0,xe.jsxs)("label",{className:"dsh-st-field",children:[e("form.name"),(0,xe.jsx)(ji,{value:h.name,placeholder:e("form.namePlaceholder"),onChange:O=>_({name:O.target.value})})]}),(0,xe.jsxs)("div",{className:"dsh-st-plan-row",children:[(0,xe.jsxs)("div",{className:"dsh-st-field",children:[e("form.planTime"),(0,xe.jsxs)("div",{className:"dsh-st-inline",children:[(0,xe.jsx)(gn,{value:h.scheduleKind,options:sH.map(O=>({value:O,label:e(`form.${O}`)})),onChange:O=>_({scheduleKind:O})}),h.scheduleKind==="once"&&(0,xe.jsx)(ji,{type:"date",min:B,value:W,onChange:O=>_({onceAt:Wk(`${O.target.value}T${Z}`)})}),(h.scheduleKind==="once"||h.scheduleKind==="daily"||h.scheduleKind==="weekly"||h.scheduleKind==="monthly")&&(0,xe.jsx)(Vk,{value:h.scheduleKind==="once"?Z:h.time,onChange:O=>{h.scheduleKind==="once"?_({onceAt:Wk(`${W}T${O}`)}):_({time:O})}}),h.scheduleKind==="interval"&&(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)("span",{className:"dsh-st-suffix",children:e("form.every")}),(0,xe.jsx)("span",{className:"dsh-st-amount",children:(0,xe.jsx)(ji,{type:"number",min:1,value:h.everyMinutes,addonAfter:e("form.minutes"),onChange:O=>_({everyMinutes:O.target.value})})})]}),h.scheduleKind==="hourly"&&(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(gn,{value:h.hourlyMinute,options:jk.map(O=>({value:O,label:O})),onChange:O=>_({hourlyMinute:O})}),(0,xe.jsx)("span",{className:"dsh-st-suffix",children:e("form.minutesShort")})]}),h.scheduleKind==="monthly"&&(0,xe.jsx)(gn,{value:h.monthDay,options:Array.from({length:31},(O,q)=>{let ee=String(q+1);return{value:ee,label:e("form.monthDay",{day:ee})}}),onChange:O=>_({monthDay:O})}),h.scheduleKind==="custom"&&(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)("span",{className:"dsh-st-suffix",children:e("form.every")}),(0,xe.jsx)("span",{className:"dsh-st-amount",children:(0,xe.jsx)(ji,{type:"number",min:1,value:h.customDays,addonAfter:e("form.daysShort"),onChange:O=>_({customDays:O.target.value})})}),(0,xe.jsx)("span",{className:"dsh-st-suffix",children:e("form.atTime")}),(0,xe.jsx)(Vk,{value:h.time,onChange:O=>_({time:O})})]})]}),h.scheduleKind==="interval"&&(0,xe.jsx)("span",{className:"dsh-st-plan-hint",children:e("form.intervalHint")}),h.scheduleKind==="custom"&&(0,xe.jsx)("span",{className:"dsh-st-plan-hint",children:e("form.customHint")})]}),(0,xe.jsxs)("label",{className:"dsh-st-field dsh-st-concurrency",title:e("form.maxConcurrentRunsHint"),children:[e("form.maxConcurrentRuns"),(0,xe.jsx)(ji,{type:"number",min:1,step:1,value:h.maxConcurrentRuns,onChange:O=>_({maxConcurrentRuns:O.target.value})})]})]}),h.scheduleKind==="weekly"&&(0,xe.jsx)(FS.Group,{options:iH.map(O=>({label:e(`day.${O}`),value:String(O)})),value:h.weekdays.map(String),onChange:O=>_({weekdays:O.map(q=>Number(q))})}),(0,xe.jsxs)("div",{className:"dsh-st-settings",children:[(0,xe.jsxs)("label",{className:"dsh-st-picker-field",children:[(0,xe.jsx)("span",{children:e("form.fieldWorkspace")}),r.length===0?(0,xe.jsxs)("div",{className:"dsh-st-workspace-empty",children:[(0,xe.jsx)(mo,{type:"primary",icon:(0,xe.jsx)(hc,{width:14,height:14}),disabled:R,onClick:()=>{L()},children:e("form.addWorkspace")}),(0,xe.jsx)("span",{className:"dsh-st-workspace-note",children:e("form.workspaceRequired")})]}):(0,xe.jsx)(gn,{value:h.workspaceId===""?void 0:h.workspaceId,placeholder:e("form.workspace"),popupMatchSelectWidth:!1,options:r.map(O=>({value:O.id,label:O.title})),onChange:O=>_({workspaceId:O}),popupRender:O=>(0,xe.jsxs)("div",{children:[O,(0,xe.jsx)("div",{style:{height:1,margin:"6px 8px",background:"var(--dsw-alias-border-l2, rgba(255,255,255,.1))"}}),(0,xe.jsx)(mo,{type:"link",className:"dsh-st-add-workspace",icon:(0,xe.jsx)(hc,{width:14,height:14}),disabled:R,onMouseDown:q=>q.preventDefault(),onClick:q=>{q.preventDefault(),q.stopPropagation(),L()},children:e("form.addWorkspace")})]})})]}),(0,xe.jsxs)("label",{className:"dsh-st-picker-field",children:[(0,xe.jsx)("span",{children:e("form.fieldModel")}),(0,xe.jsx)(gn,{value:h.modelKey,popupMatchSelectWidth:!1,options:Array.from(i.reduce((O,q)=>{let ee=O.get(q.provider)??{label:q.providerLabel,options:[]};return ee.options.push({value:`${q.provider}::${q.model}`,label:q.label}),O.set(q.provider,ee),O},new Map),([,O])=>O),onChange:O=>{let q=i.find(ee=>`${ee.provider}::${ee.model}`===O);_({modelKey:O,reasoningEffort:q?.reasoning?.defaultEffort??"none"})}})]}),(0,xe.jsxs)("label",{className:"dsh-st-picker-field",children:[(0,xe.jsx)("span",{children:e("form.fieldEffort")}),(0,xe.jsx)(gn,{disabled:j===void 0,value:j===void 0?void 0:h.reasoningEffort,placeholder:o("effort.providerDefault"),popupMatchSelectWidth:!1,options:j===void 0?[]:[...j.defaultEffort===void 0?[{value:"none",label:o("effort.providerDefault")}]:[],...j.efforts.map(O=>({value:O.id,label:O.name}))],onChange:O=>_({reasoningEffort:O})})]}),(0,xe.jsxs)("label",{className:"dsh-st-picker-field",children:[(0,xe.jsx)("span",{children:e("form.fieldPermission")}),(0,xe.jsx)(gn,{value:h.permission,popupMatchSelectWidth:!1,options:l.map(O=>({value:O.value,label:Dk(O,e)})),onChange:O=>G(O)})]})]}),(0,xe.jsxs)("div",{className:"dsh-st-field",children:[(0,xe.jsxs)("span",{className:"dsh-st-prompt-label",children:[e("form.prompt"),(0,xe.jsx)("em",{children:e("form.slashHint")})]}),(0,xe.jsxs)("div",{className:"dsh-st-prompt-anchor",children:[Q!==void 0&&F!==Q.query&&(0,xe.jsx)("div",{className:"dsh-st-skill-menu",role:"listbox",children:X.length===0?(0,xe.jsx)("p",{children:e("form.slashEmpty")}):X.map((O,q)=>(0,xe.jsxs)("button",{type:"button",role:"option","aria-selected":q===U,onMouseDown:ee=>ee.preventDefault(),onClick:()=>P(O),children:[(0,xe.jsx)("span",{children:O.name}),(0,xe.jsx)("code",{children:pu(O)})]},O.id))}),(0,xe.jsxs)("div",{className:"dsh-st-prompt-card",children:[(0,xe.jsx)("div",{className:"dsh-st-prompt-backdrop","aria-hidden":"true",children:vC(h.prompt,c).map((O,q)=>O.kind==="skill"?(0,xe.jsx)("span",{className:"dsh-st-skill-token",children:O.text},q):(0,xe.jsx)("span",{children:O.text},q))}),(0,xe.jsx)(ji.TextArea,{ref:z,spellCheck:!1,variant:"borderless",className:"dsh-st-prompt-input",value:h.prompt,placeholder:e("form.promptPlaceholder"),autoSize:{minRows:4,maxRows:10},onChange:O=>{J(O.target.selectionStart),_({prompt:O.target.value}),A(void 0)},onSelect:O=>J(O.currentTarget.selectionStart),onScroll:O=>{let q=O.currentTarget.closest(".dsh-st-prompt-card")?.querySelector(".dsh-st-prompt-backdrop");q instanceof HTMLElement&&(q.scrollTop=O.currentTarget.scrollTop)},onKeyDown:O=>{if(Q!==void 0){if(O.key==="Escape"){O.preventDefault(),A(Q.query);return}if(X.length!==0){if(O.key==="ArrowDown")O.preventDefault(),k(q=>(Math.min(q,X.length-1)+1)%X.length);else if(O.key==="ArrowUp")O.preventDefault(),k(q=>(Math.min(q,X.length-1)+X.length-1)%X.length);else if(O.key==="Enter"||O.key==="Tab"){O.preventDefault();let q=X[U];q!==void 0&&P(q)}}}}})]})]})]}),s.map(O=>(0,xe.jsx)("p",{className:"dsh-st-error",children:o("warning.groupLoad",{name:O.providerLabel,message:O.message})},O.provider)),x!==void 0&&(0,xe.jsx)("p",{className:"dsh-st-error",children:x})]}),(0,xe.jsxs)(Da,{open:S!==void 0,title:t("confirm.title"),keyboard:!1,maskClosable:!1,okText:t("confirm.enable"),cancelText:t("confirm.cancel"),okButtonProps:{disabled:!C},onCancel:()=>{w(!1),v(void 0)},onOk:()=>{!C||S===void 0||(_({permission:S}),w(!1),v(void 0))},children:[(0,xe.jsx)("p",{children:t("confirm.description")}),(0,xe.jsx)(FS,{checked:C,onChange:O=>w(O.target.checked),children:t("confirm.acknowledge")})]})]})})}function Vk({value:e,onChange:t}){let[o,n]=[e.slice(0,2)||"09",e.slice(3,5)||"00"];return(0,xe.jsxs)("span",{className:"dsh-st-time",children:[(0,xe.jsx)(gn,{value:o,options:aH.map(r=>({value:r,label:r})),onChange:r=>t(`${r}:${n}`)}),(0,xe.jsx)("span",{className:"dsh-st-time-sep",children:":"}),(0,xe.jsx)(gn,{value:n,options:jk.map(r=>({value:r,label:r})),onChange:r=>t(`${o}:${r}`)})]})}function lH(e){let t=e.getTimezoneOffset()*6e4;return new Date(e.getTime()-t).toISOString().slice(0,10)}function Wk(e){let t=new Date(e),o=new Date;if(!Number.isFinite(t.getTime())||t.getTime()>o.getTime())return e;let n=new Date(o.getTime()+6e4);n.setSeconds(0,0);let r=n.getTimezoneOffset()*6e4;return new Date(n.getTime()-r).toISOString().slice(0,16)}var Kk=require("react");var _s=require("react/jsx-runtime");function qk({target:e,t,busy:o,onCancel:n,onConfirm:r}){return(0,Kk.useEffect)(()=>{if(e===void 0)return;let i=s=>{s.key==="Escape"&&(s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation(),n())};return window.addEventListener("keydown",i,!0),()=>window.removeEventListener("keydown",i,!0)},[n,e]),(0,_s.jsx)(Rn,{children:(0,_s.jsxs)(Da,{open:e!==void 0,title:t("card.confirmDelete"),onCancel:n,maskClosable:!1,keyboard:!1,footer:[(0,_s.jsx)(mo,{disabled:o,onClick:n,children:t("card.cancel")},"cancel"),(0,_s.jsx)(mo,{danger:!0,type:"primary",disabled:o,onClick:r,children:t("card.confirm")},"delete")],children:[e!==void 0&&(0,_s.jsx)("p",{children:e.name}),(0,_s.jsx)("p",{children:t("card.confirmDeleteHint")})]})})}var ou=null,zS=new Set;function Gk(e){ou=e;for(let t of[...zS])t(ou)}function BS(){let e=ou;return ou=null,e}function Xk(){return ou}function Yk(e){return zS.add(e),()=>{zS.delete(e)}}function Zk(e){let t=document.querySelector("[data-composer-seat] textarea");return t instanceof HTMLTextAreaElement?(Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value")?.set?.call(t,e),t.dispatchEvent(new InputEvent("input",{bubbles:!0})),t.focus(),!0):!1}function nu(e){if(typeof e!="object"||e===null||!("ok"in e))throw new Error("\u81EA\u52A8\u5316\u4E3B\u673A\u8FD4\u56DE\u4E86\u65E0\u6548\u54CD\u5E94\u3002");let t=e;if(t.ok===!0&&"value"in t)return t.value;if(t.ok===!1&&"error"in t){let o=t.error;throw new Error(o?.message??"\u81EA\u52A8\u5316\u8BF7\u6C42\u5931\u8D25\u3002")}throw new Error("\u81EA\u52A8\u5316\u4E3B\u673A\u8FD4\u56DE\u4E86\u65E0\u6548\u54CD\u5E94\u3002")}var ru="/dsh-automation",Jk=15e3,cH=2e3,eO=[1,2,4],Qk=eO.length+1,dH=5*60*1e3,uH=24*60*60*1e3;function mH(e){return(e??[]).some(t=>t.status==="running"||t.status==="queued")?cH:Jk}function HS(e,t){return t>0?mH(e):Jk}function VS(e){let t=e instanceof Error?e.message:String(e);return/failed to fetch|networkerror|load failed|network request failed/i.test(t)}function pH(e,t){let o=Date.parse(t),r=(Number.isFinite(o)?o:Date.now())-uH;return[...new Set(e.filter(i=>{if(i.status==="queued"||i.status==="running")return!0;let s=Date.parse(i.finishedAt??i.startedAt??i.scheduledFor);return Number.isFinite(s)&&s>=r}).map(i=>i.sessionId).filter(i=>i!==void 0&&i!==""))].sort()}function tO(e,t,o={}){let n=!1,r=0,i=e.source.getSnapshot().phase==="loading",s,a,c=0,l=0,d=0,u,m,p=!1,g=x=>{a=x,c=0,l=r,d=0,u=void 0},f=x=>{let y=e.source.getSnapshot().snapshot,S=x?.list?.getSnapshot();if(y===void 0||S===void 0||x?.refresh===void 0)return;let v=new Set([...S.ids??[],...Object.keys(S.byId??{})]);return pH(y.runs,y.serverNow).filter(C=>!v.has(C)).join("\0")},h=()=>{if(n)return;let x=t();x!==s&&(s=x,g());let y=f(x);if(y===void 0)return;if(y===""){g();return}if(y!==a&&g(y),c>=Qk){if((o.now??Date.now)()<d)return;g(y)}if(r<l)return;if(m!==void 0){p=!0;return}let S=c;c+=1;let v=eO[S];l=v===void 0?Number.POSITIVE_INFINITY:r+v,c>=Qk&&(d=(o.now??Date.now)()+dH),m=Promise.resolve().then(async()=>{await x.refresh()}).catch(C=>{!n&&u!==y&&(u=y,console.warn("[dsh-automation] \u5237\u65B0 Host \u4F1A\u8BDD\u5217\u8868\u5931\u8D25",C))}).finally(()=>{m=void 0,!(n||!p)&&(p=!1,h())})},b=e.source.subscribe(()=>{e.source.getSnapshot().phase==="loading"?i=!0:i&&(i=!1,r+=1),h()},{background:!0});return h(),()=>{n=!0,p=!1,b()}}function oO(e){let t={phase:"idle"},o,n,r=()=>{},i=new Set,s=new Set,a=()=>{if(n!==void 0&&clearInterval(n),i.size===0){n=void 0;return}n=setInterval(()=>{u().catch(()=>{})},HS(t.snapshot?.runs,s.size))},c=()=>{if(r(),s.size===0)return;let g=()=>{u().catch(()=>{})},f=()=>{document.visibilityState==="visible"&&g()};typeof window<"u"&&window.addEventListener("focus",g),typeof document<"u"&&document.addEventListener("visibilitychange",f),r=()=>{typeof window<"u"&&window.removeEventListener("focus",g),typeof document<"u"&&document.removeEventListener("visibilitychange",f),r=()=>{}}},l=g=>{let f=HS(t.snapshot?.runs,s.size);t=g,i.size>0&&f!==HS(t.snapshot?.runs,s.size)&&a();for(let h of[...i])h()},d={getSnapshot:()=>t,subscribe:(g,f={})=>{let h=i.size>0,b=s.size>0;return i.add(g),f.background!==!0&&s.add(g),(!h||f.background!==!0&&!b)&&queueMicrotask(()=>{i.size>0&&u().catch(()=>{})}),a(),s.size>0&&!b&&c(),()=>{i.delete(g),s.delete(g),i.size===0&&n!==void 0?(clearInterval(n),n=void 0):i.size>0&&a(),s.size===0&&r()}}},u=async()=>{if(o!==void 0)return o;let g=t.snapshot;return l(g===void 0?{phase:"loading"}:{phase:"loading",snapshot:g,...t.refreshedAt===void 0?{}:{refreshedAt:t.refreshedAt}}),o=(async()=>{try{let f=await e.call(ru,"snapshot",{sessionId:"settings"}),h=nu(f);l({phase:"ready",snapshot:h,refreshedAt:Date.now()})}catch(f){let h=f instanceof Error?f.message:String(f);throw l(g===void 0?{phase:"error",error:h}:{phase:"error",snapshot:g,error:h,...t.refreshedAt===void 0?{}:{refreshedAt:t.refreshedAt}}),f}finally{o=void 0}})(),o},m=async(g,f)=>{try{return await e.call(ru,g,f)}catch(h){if(!VS(h))throw h;return await e.call(ru,g,f)}},p=async(g,f,h)=>{nu(await m(g,f));let b=()=>{h!==void 0&&t.snapshot!==void 0&&l({phase:"ready",snapshot:h(t.snapshot),refreshedAt:Date.now()})},x=o;b(),x!==void 0&&(await x.catch(()=>{}),b());try{await u()}catch{}};return{source:d,refresh:u,async createAutomation(g){await p("create",{sessionId:"settings",input:g})},async mutateAutomation(g,f){await p("mutate",{sessionId:"settings",automationId:g,mutation:f},f==="delete"?b=>({...b,automations:b.automations.filter(x=>x.id!==g)}):b=>({...b,automations:b.automations.map(x=>x.id===g?{...x,status:f==="pause"?"paused":"active"}:x)}))},async updateAutomation(g,f){await p("update",{sessionId:"settings",automationId:g,input:f})},async runNow(g){await p("run-now",{sessionId:"settings",automationId:g})},async markRunRead(g){await p("mark-read",{sessionId:"settings",runId:g})},async registerWorkspace(g){let f=nu(await e.call(ru,"register-workspace",{path:g}));return await u(),f},async adoptSession(g){nu(await e.call(ru,"adopt-session",{sessionId:g}))},async forgetSession(g){await p("forget-session",{sessionId:g},f=>({...f,runs:f.runs.map(h=>{if(h.sessionId!==g)return h;let{sessionId:b,...x}=h;return x})}))},async forgetAutomationSessions(g){await p("forget-automation-sessions",{automationId:g},f=>({...f,runs:f.runs.map(h=>{if(h.automationId!==g)return h;let{sessionId:b,...x}=h;return x})}))}}}var rO=require("react");var $n=require("react/jsx-runtime"),nO=[["created","desc"],["created","asc"],["planned","asc"],["planned","desc"]];function Ug({t:e,storage:t,storageKey:o,sortKey:n,sortDirection:r,onSelect:i,iconOnly:s=!1,className:a}){let[c,l]=(0,rO.useState)(()=>Ki(t,o)),d=e(n==="planned"?`sort.planned.${r}`:`sort.created.${r}`),u=c?.key===n&&c.direction===r,m=()=>{t===void 0||u||(IC(t,o,n,r),l({key:n,direction:r}))},p=[...nO.map(([g,f])=>({key:`${g}-${f}`,label:e(g==="planned"?`sort.planned.${f}`:`sort.created.${f}`),onClick:()=>i(g,f)})),...t===void 0?[]:[{type:"divider"},{key:"default",label:e(u?"sort.default.saved":"sort.default.save"),disabled:u,onClick:m}]];return s?(0,$n.jsx)(Rn,{children:(0,$n.jsx)("span",{className:a,children:(0,$n.jsx)(Vg,{menu:{selectable:!0,selectedKeys:[`${n}-${r}`],items:p},children:(0,$n.jsx)(mo,{type:"text",shape:"default","aria-label":d,icon:(0,$n.jsx)(fH,{})})})})}):(0,$n.jsx)(Rn,{children:(0,$n.jsx)(gn,{className:a??"dsh-st-sort-select",value:`${n}-${r}`,popupMatchSelectWidth:!1,options:nO.map(([g,f])=>({value:`${g}-${f}`,label:e(g==="planned"?`sort.planned.${f}`:`sort.created.${f}`)})),onChange:g=>{let[f,h]=String(g).split("-");i(f,h)},...t===void 0?{}:{popupRender:g=>(0,$n.jsxs)($n.Fragment,{children:[g,(0,$n.jsx)("button",{type:"button",className:"dsh-st-sort-default",disabled:u,onMouseDown:f=>f.preventDefault(),onClick:m,children:e(u?"sort.default.saved":"sort.default.save")})]})}})})}function fH(){return(0,$n.jsx)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:(0,$n.jsx)("path",{d:"M4.5 3v10M4.5 3 2.5 5.2M4.5 3l2 2.2M11.5 13V3M11.5 13l-2-2.2M11.5 13l2-2.2",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}var Kg="dsh-automation:open-task-settings",WS="dsh-automation:pending-task-settings";function jS(e){if(typeof e!="object"||e===null)return;let t=e;if(!(typeof t.name!="string"||t.name.trim()===""||!Array.isArray(t.sessionIds)||t.sessionIds.some(o=>typeof o!="string"))&&!(t.automationId!==void 0&&(typeof t.automationId!="string"||t.automationId.trim()==="")))return{...typeof t.automationId=="string"?{automationId:t.automationId}:{},name:t.name,sessionIds:[...t.sessionIds]}}function gH(e,t){try{e?.setItem(WS,JSON.stringify(t))}catch{}}function US(e){typeof window>"u"||(gH(window.sessionStorage,e),window.dispatchEvent(new CustomEvent(Kg,{detail:e})))}function iO(e){if(e!==void 0)try{let t=e.getItem(WS);return t===null?void 0:jS(JSON.parse(t))}catch{return}}function sO(e){try{e?.removeItem(WS)}catch{}}function aO(e,t,o){if(e.automationId!==void 0){let a=t.find(c=>c.id===e.automationId);if(a!==void 0)return a}let n=new Set(e.sessionIds),r=o.find(a=>a.sessionId!==void 0&&n.has(a.sessionId))?.automationId,i=t.find(a=>a.id===r);if(i!==void 0)return i;let s=t.filter(a=>a.name===e.name);return s.length===1?s[0]:void 0}var ve=require("react/jsx-runtime");var qg=typeof window>"u"?void 0:window.localStorage,lO=typeof window>"u"?void 0:window.sessionStorage,hH=[{name:"\u6BCF\u65E5\u56DE\u5F52\u68C0\u67E5",scheduleKind:"daily",time:"09:00",weekdays:[1,2,3,4,5]},{name:"\u6BCF\u5468\u4F9D\u8D56\u5DE1\u68C0",scheduleKind:"weekly",time:"10:00",weekdays:[1]},{name:"\u5DE5\u4F5C\u65E5\u65E9\u62A5",scheduleKind:"weekly",time:"08:00",weekdays:[1,2,3,4,5]}];function cO({t:e,permissionT:t,modelT:o,runtime:n,closeSettings:r,addWorkspace:i}){let s=(0,yo.useSyncExternalStore)(n.source.subscribe,n.source.getSnapshot,n.source.getSnapshot),[a,c]=(0,yo.useState)("mine"),[l,d]=(0,yo.useState)(""),[u,m]=(0,yo.useState)(!1),[p,g]=(0,yo.useState)(),[f,h]=(0,yo.useState)(),[b,x]=(0,yo.useState)(),[y,S]=(0,yo.useState)(!1),[v,C]=(0,yo.useState)(),[w,R]=(0,yo.useState)("day"),[T,N]=(0,yo.useState)("all"),[I,E]=(0,yo.useState)("all"),[k,F]=(0,yo.useState)(()=>Ki(qg,yu)?.key??"created"),[A,z]=(0,yo.useState)(()=>Ki(qg,yu)?.direction??"desc"),[D,_]=(0,yo.useState)(()=>iO(lO)),V=(0,yo.useMemo)(()=>new Date(s.snapshot?.serverNow??Date.now()),[s.snapshot?.serverNow,s.refreshedAt]),L=s.snapshot,G=L?.workspaces??[],H=L?.models??[],W=L?.permissions??[],Z=L?.defaultPermission??"",B=hu((L?.automations??[]).filter(P=>l.trim()===""||`${P.name} ${P.prompt}`.toLowerCase().includes(l.trim().toLowerCase())),k,A),K=(L?.runs??[]).filter(P=>!(T!=="all"&&P.automationId!==T||I!=="all"&&P.status!==I)),j=NC(K,w,V,e),Q=async P=>{S(!0),C(void 0);try{await P()}catch(O){C(O instanceof nn?e(O.key):VS(O)?e("error.offline"):O instanceof Error?O.message:e("error.action"))}finally{S(!1)}},X=()=>{m(!1),x(void 0),g(void 0)},U=P=>{Z===""||W.length===0||(g(void 0),x(P),m(!0))},J=P=>{g(P.id),x(PC(P,G,L?.defaultModel??null,L?.defaultPermission??P.permission)),m(!0)};return(0,yo.useEffect)(()=>{if(typeof window>"u")return;let P=O=>{let q=jS(O.detail);q!==void 0&&_(q)};return window.addEventListener(Kg,P),()=>{window.removeEventListener(Kg,P)}},[]),(0,yo.useEffect)(()=>{if(D===void 0||L===void 0)return;let P=aO(D,L.automations,L.runs);if(sO(lO),_(void 0),c("mine"),d(""),P===void 0){C(e("error.taskMissing"));return}J(P)},[L,D,e]),(0,ve.jsx)(Rn,{children:(0,ve.jsxs)("div",{className:"dsh-st-shell",children:[(0,ve.jsxs)("header",{className:"dsh-st-top",children:[(0,ve.jsxs)("div",{className:"dsh-st-heading",children:[(0,ve.jsxs)("div",{className:"dsh-st-heading-row",children:[(0,ve.jsx)("h1",{children:e("tab")}),(0,ve.jsxs)("div",{className:"dsh-st-heading-links",children:[(0,ve.jsx)(mo,{size:"small",shape:"default",href:"https://github.com/MichengAI/dsh-automation",target:"_blank",rel:"noreferrer","aria-label":e("header.githubProject"),icon:(0,ve.jsx)(u0,{}),children:e("header.githubProject")}),(0,ve.jsx)(mo,{size:"small",shape:"default",href:"https://github.com/MichengAI/dsh-automation/issues",target:"_blank",rel:"noreferrer","aria-label":e("header.githubFeedback"),icon:(0,ve.jsx)(aC,{}),children:e("header.githubFeedback")})]})]}),(0,ve.jsx)("p",{children:e("header.lead")})]}),(0,ve.jsxs)("div",{className:"dsh-st-toolbar",children:[(0,ve.jsx)(ji,{className:"dsh-st-search",allowClear:!0,value:l,placeholder:e("search.placeholder"),onChange:P=>d(P.target.value)}),(0,ve.jsx)(mo,{icon:(0,ve.jsx)(d0,{}),onClick:()=>{Gk(e("chat.prompt")),r?.()},children:e("action.chatCreate")}),(0,ve.jsx)(mo,{type:"primary",icon:(0,ve.jsx)(hc,{}),disabled:Z===""||W.length===0,onClick:()=>U(),children:e("action.create")}),(0,ve.jsx)(mo,{icon:(0,ve.jsx)(s0,{}),"aria-label":e("section.refresh"),onClick:()=>{n.refresh()}})]})]}),(0,ve.jsx)("div",{className:"dsh-st-banner",role:"note",children:(0,ve.jsxs)("span",{children:[(0,ve.jsx)(c0,{}),e("banner.wake")]})}),(0,ve.jsxs)("section",{className:"dsh-st-examples",children:[(0,ve.jsx)("div",{className:"dsh-st-examples-head",children:(0,ve.jsx)("h2",{children:e("examples.title")})}),(0,ve.jsx)("div",{className:"dsh-st-example-row",children:hH.map((P,O)=>(0,ve.jsxs)("button",{type:"button",className:"dsh-st-example",disabled:Z===""||W.length===0,onClick:()=>U({name:e(`examples.${O+1}.title`),prompt:e(`examples.${O+1}.body`),scheduleKind:P.scheduleKind,time:P.time,weekdays:P.weekdays}),children:[(0,ve.jsx)("strong",{children:e(`examples.${O+1}.title`)}),(0,ve.jsx)("p",{children:e(`examples.${O+1}.body`)}),(0,ve.jsxs)("span",{className:"dsh-st-chip",children:[(0,ve.jsx)(yc,{}),e(`examples.${O+1}.chip`)]})]},P.name))})]}),v!==void 0&&(0,ve.jsx)("p",{className:"dsh-st-error",children:v}),(s.phase==="idle"||s.phase==="loading"&&L===void 0)&&(0,ve.jsx)("p",{className:"dsh-st-muted",children:e("loading")}),s.phase==="error"&&L===void 0&&(0,ve.jsxs)("div",{className:"dsh-st-empty",children:[(0,ve.jsx)("h3",{children:e("error.title")}),(0,ve.jsx)("p",{children:s.error}),(0,ve.jsx)(mo,{type:"primary",onClick:()=>{n.refresh()},children:e("error.retry")})]}),(0,ve.jsxs)("div",{className:"dsh-st-tabs",children:[(0,ve.jsx)(Lk,{className:"dsh-st-settings-tabs",activeKey:a,onChange:P=>c(P),items:[{key:"mine",label:e("tabs.mine")},{key:"runs",label:e("tabs.runs")}],styles:{header:{margin:0,height:40},item:{height:40,padding:0,display:"flex",alignItems:"center"},body:{display:"none"},content:{display:"none"}}}),a==="mine"&&(0,ve.jsx)("div",{className:"dsh-st-sort-wrap",children:(0,ve.jsx)(Ug,{t:e,...qg===void 0?{}:{storage:qg},storageKey:yu,sortKey:k,sortDirection:A,onSelect:(P,O)=>{F(P),z(O)}})}),a==="runs"&&(0,ve.jsxs)("div",{className:"dsh-st-filters",children:[(0,ve.jsx)(gn,{className:"dsh-st-filter-range",value:w,popupMatchSelectWidth:!1,options:["day","week","month"].map(P=>({value:P,label:e(`history.range.${P}`)})),onChange:R}),(0,ve.jsx)(gn,{className:"dsh-st-filter-task",value:T,popupMatchSelectWidth:!1,options:[{value:"all",label:e("history.allTasks")},...(L?.automations??[]).map(P=>({value:P.id,label:P.name}))],onChange:N}),(0,ve.jsx)(gn,{className:"dsh-st-filter-status",value:I,popupMatchSelectWidth:!1,options:[{value:"all",label:e("history.allStatus")},...$C.map(P=>({value:P,label:e(`status.${P}`)}))],onChange:P=>E(P)})]})]}),a==="mine"&&(B.length===0?(0,ve.jsxs)("div",{className:"dsh-st-empty",children:[(0,ve.jsx)("h3",{children:e("empty.title")}),(0,ve.jsx)("p",{children:e("empty.body")})]}):(0,ve.jsx)("div",{className:"dsh-st-grid",children:B.map(P=>(0,ve.jsx)(yH,{item:P,t:e,now:V,busy:y,onEdit:()=>J(P),onToggle:()=>{Q(()=>n.mutateAutomation(P.id,vu(P.status)))},onRun:()=>{Q(()=>n.runNow(P.id))},onDelete:()=>h(P)},P.id))})),a==="runs"&&(j.length===0?(0,ve.jsx)("div",{className:"dsh-st-empty",children:e("runs.empty")}):(0,ve.jsx)("div",{className:"dsh-st-timeline",children:j.map(P=>(0,ve.jsxs)("section",{className:"dsh-st-group",children:[(0,ve.jsx)("h3",{children:P.label}),P.items.map(O=>(0,ve.jsx)(bH,{run:O,t:e},O.id))]},P.key))})),u&&(0,ve.jsx)(Uk,{t:e,permissionT:t,modelT:o,busy:y,workspaces:G,models:H,modelFailures:L?.modelFailures??[],defaultModel:L?.defaultModel??null,skills:L?.skills??[],permissions:W,defaultPermission:Z,editing:p!==void 0,...b===void 0?{}:{draft:b},onClose:X,...i===void 0?{}:{onAddWorkspace:i},onSubmit:async P=>{let O=CC(P,G,H,new Date,{allowPastOnce:p!==void 0});await Q(async()=>{p===void 0?await n.createAutomation(O):await n.updateAutomation(p,O),X()})}},p??"create"),(0,ve.jsx)(qk,{target:f,t:e,busy:y,onCancel:()=>h(void 0),onConfirm:()=>{let P=f;P!==void 0&&Q(async()=>{await n.mutateAutomation(P.id,"delete"),h(void 0)})}})]})})}function yH({item:e,t,now:o,busy:n,onEdit:r,onToggle:i,onRun:s,onDelete:a}){return(0,ve.jsxs)("article",{className:"dsh-st-card",onClick:r,children:[(0,ve.jsxs)("div",{className:"dsh-st-card-head",children:[(0,ve.jsx)("span",{onClick:c=>c.stopPropagation(),children:(0,ve.jsx)(Wg,{checked:e.status==="active",disabled:n,"aria-label":e.status==="active"?t("card.pause"):t("card.resume"),onChange:()=>i()})}),(0,ve.jsx)("span",{onClick:c=>c.stopPropagation(),children:(0,ve.jsx)(Vg,{menu:{items:[{key:"run",label:t("menu.run"),disabled:n,onClick:s},{key:"edit",label:t("menu.edit"),disabled:n,onClick:r},{key:"delete",label:t("menu.delete"),danger:!0,disabled:n,onClick:a}]},children:(0,ve.jsx)(mo,{type:"text","aria-label":t("card.more"),icon:(0,ve.jsx)(l0,{width:16,height:16})})})})]}),(0,ve.jsx)("h3",{children:e.name}),(0,ve.jsx)("p",{children:e.prompt}),(0,ve.jsxs)("div",{className:"dsh-st-card-foot",children:[(0,ve.jsxs)("span",{className:"dsh-st-chip",children:[(0,ve.jsx)(yc,{}),fu(e.schedule,t)]}),(0,ve.jsx)("span",{children:e.nextRunAt===void 0?t("stats.noneScheduled"):t("history.nextApprox",{when:gu(e.nextRunAt,o,t)})})]})]})}function bH({run:e,t}){let o=RC(e.startedAt,e.finishedAt);return(0,ve.jsxs)("article",{className:`dsh-st-run is-${e.status}`,children:[(0,ve.jsx)("strong",{children:e.automationName}),(0,ve.jsxs)("p",{children:[(0,ve.jsx)("span",{children:EC(e.startedAt??e.scheduledFor)}),o!==void 0&&(0,ve.jsx)("span",{children:o}),(0,ve.jsx)("span",{children:yC(e.trigger,t)})]})]})}var dc="dsh-automation",dO={tab:"Scheduled tasks","sidebar.tab":"Scheduled","sidebar.tabs":"Workspace views","sidebar.tasksTab":"Tasks","sidebar.channelsTab":"Channels","sidebar.views":"Scheduled views","sidebar.viewOverview":"Task overview","sidebar.empty":"No scheduled runs yet.","sidebar.tasksEmpty":"No web tasks yet.","sidebar.ungrouped":"Ungrouped","sidebar.section":"Scheduled","sidebar.workspaces":"Workspaces","sidebar.search":"Search","sidebar.sessions":"Sessions","sidebar.searchSessions":"Search session names","sidebar.clearSearch":"Clear search","sidebar.filter":"View options","sidebar.groupBy":"Group by","sidebar.groupWorkspace":"WorkSpace","sidebar.groupWorkspaceTree":"Workspace Tree","sidebar.groupList":"In one list","sidebar.sortBy":"Order by","sidebar.sortManual":"Manual","sidebar.sortTime":"Last updated","sidebar.filterBy":"Filter sessions","sidebar.showArchived":"Show archived","sidebar.onlyArchived":"Archived only","header.lead":"Plan automatic tasks, or trigger them by hand. Describe the recurring work in any chat to create it quickly.","header.githubProject":"GitHub","header.githubFeedback":"Issues","examples.title":"Recommended examples","examples.1.title":"Daily regression check","examples.1.body":"Create a scheduled task that runs every day and inspects new test failures.","examples.1.chip":"Every day 09:00","examples.2.title":"Weekly dependency review","examples.2.body":"Create a scheduled task that runs every Monday and reports outdated or risky dependencies.","examples.2.chip":"Monday 10:00","examples.3.title":"Weekday morning briefing","examples.3.body":"Create a scheduled task that runs on weekdays and summarizes overnight changes.","examples.3.chip":"Weekdays 08:00","chat.hint":"In any conversation, describe the recurring work and ask the Agent to call automation_create.","chat.prompt":"I want to create a scheduled task that runs every [interval] and does [the actual task]","menu.run":"Run task","menu.edit":"Edit task","menu.delete":"Delete task","session.rename":"Rename","session.fork":"Fork session","session.archive":"Archive session","session.unarchive":"Restore","session.moreActions":"More actions for {title}","session.groupActions":"Actions for {name}","session.taskSettings":"Task settings","session.archiveGroup":"Archive all conversations","session.archiveGroupConfirm":"Archive all","session.archiveGroupDescription":"Archive all {count} conversations for \u201C{name}\u201D. Choose Filter \u2192 Show archived to restore them.","session.archiveGroupPending":"Archiving conversations\u2026","session.archiveGroupFailed":"Some conversations could not be archived: {message}","session.archiveGroupClose":"Close","session.archiveGroupCancel":"Cancel","session.deleteSession":"Delete session","session.deleteSessionConfirm":"Delete session","session.deleteSessionDescription":"This permanently deletes session \u201C{name}\u201D, its child agents (including any that are still running), and all of its records (conversation, stats, cache). This cannot be undone.","session.deleteSessionPending":"Deleting session\u2026","session.deleteSessionFailed":"Could not delete the session: {message}","session.deleteSessionClose":"Close","session.deleteSessionCancel":"Cancel","session.idle":"Idle","session.runningStatus":"Running","session.completed":"Completed","session.waitingApproval":"Waiting for approval","session.planReview":"Plan to review","session.waitingAnswer":"Waiting for an answer","session.subagentsRunning":"{count} subagents running","session.archived":"Archived","session.delete":"Remove from Scheduled","session.deleteFolder":"Remove folder","session.confirmDeleteFolder":"Remove this folder from Scheduled?","session.confirmDeleteFolderHint":'This only unlists {count} session(s) in "{name}" from Scheduled. Host sessions are not deleted and they stay hidden from Tasks.',"session.confirmDeleteFolderAction":"Remove from Scheduled","history.range.day":"By day","history.range.week":"By week","history.range.month":"By month","history.allTasks":"All tasks","history.allStatus":"All statuses","history.today":"Today","history.yesterday":"Yesterday","history.date":"{date}","history.week":"Week of {date}","history.month":"{month}","history.nextApprox":"Next run in about {when}","time.withinMinute":"about {count} minutes","time.withinHour":"about {count} hours","time.withinDay":"about {count} days","search.placeholder":"Search scheduled tasks...","action.chatCreate":"Create in chat","action.create":"New scheduled task","banner.wake":"Scheduled tasks run only while this computer stays awake.","tabs.mine":"My tasks","tabs.runs":"Run history","sort.by":"Sort","sort.created.asc":"Created time ascending","sort.created.desc":"Created time descending","sort.planned.asc":"Planned time ascending","sort.planned.desc":"Planned time descending","sort.default.save":"Set as default","sort.default.saved":"Default","form.workspace":"Workspace","form.fieldWorkspace":"Workspace","form.fieldModel":"Model","form.fieldEffort":"Reasoning","form.fieldPermission":"Permission","form.slashHint":"Type / to insert a skill","form.slashEmpty":"No matching skills","form.addWorkspace":"Add workspace","form.workspaceRequired":"Add a registered workspace before saving.","form.workspaceUnavailable":"This Host cannot create workspaces.","form.addWorkspaceFailed":"Could not add the workspace.","form.workspacePath":"Folder path","form.workspacePathPlaceholder":"D:\\work\\project","form.model":"Model","form.modelSelect":"Select model","form.effort":"Reasoning","form.effort.none":"Default","form.effort.low":"Low","form.effort.medium":"Medium","form.effort.high":"High","form.error.workspace":"Select a workspace.","modal.title":"New scheduled task","modal.edit":"Edit scheduled task","modal.save":"Save","header.eyebrow":"Unattended coding work","header.title":"Automations","header.subtitle":"Schedule standalone, auditable Agent runs for this workspace.","header.create":"New automation","header.closeCreate":"Hide form","scope.workspace":"Workspace","scope.folder":"Working directory","stats.total":"All","stats.active":"Active","stats.next":"Next run","stats.attention":"Needs attention","stats.noneScheduled":"None scheduled","stats.noAttention":"All clear","section.automations":"Workspace automations","section.automationsHint":"Each trigger starts a fresh DSH Session and keeps its own audit record.","section.runs":"Recent runs","section.runsHint":"Latest outcomes for this workspace.","section.refresh":"Refresh","empty.title":"Let recurring coding work run itself","empty.body":"Save a self-contained task, a schedule, and a permission boundary. Every run starts in a new Session.","empty.action":"Create the first automation","runs.empty":"No runs yet. Run one now, or wait for the next scheduled occurrence.","overview.empty":"No scheduled tasks yet. Create one in Settings.","form.title":"Create automation","form.subtitle":"Write a complete, standalone task. Scheduled runs do not inherit this conversation.","form.name":"Name","form.namePlaceholder":"Daily regression triage","form.prompt":"Task prompt","form.promptPlaceholder":"Inspect new test failures, locate the regression, and propose a verified minimal fix\u2026","form.schedule":"Schedule","form.planTime":"Schedule","form.hourly":"Hourly","form.monthly":"Monthly","form.custom":"Every few days","form.intervalHint":"Runs every this many minutes, starting now.","form.customHint":"Runs every this many days at the selected time.","form.atTime":"at","form.minutesShort":"min","form.daysShort":"days","form.monthDay":"Day {day} of month","form.skills":"Skills","form.skillsEmpty":"No skills available","schedule.hourlyAt":"Every hour at :{minute}","schedule.monthlyAt":"Monthly on day {day} \xB7 {time}","schedule.customAt":"Every {count} days \xB7 {time}","form.once":"Does not repeat","form.interval":"Interval","form.daily":"Daily","form.weekly":"Weekly","form.runAt":"Run at","form.every":"Every","form.minutes":"minutes","form.time":"Time","form.days":"Weekdays","form.timeZone":"Time zone","form.maxConcurrentRuns":"Concurrency","form.maxConcurrentRunsHint":"Queued and running executions share this limit. Defaults to 1; when full, scheduled triggers are skipped and manual runs are rejected.","form.error.maxConcurrentRuns":"Enter a positive whole number for concurrent runs.","form.permission":"Permission boundary","permission.readOnly":"Read Only","permission.workspaceWrite":"Workspace Write","permission.fullAccess":"Full access","form.cancel":"Cancel","form.submit":"Create automation","form.submitting":"Creating\u2026","form.error.name":"Enter a name.","form.error.prompt":"Enter a complete, standalone task prompt.","form.error.once":"Choose a valid future date and time.","form.error.interval":"The interval must be between 1 and 43,200 minutes.","form.error.weekdays":"Select at least one weekday.","day.1":"Mon","day.2":"Tue","day.3":"Wed","day.4":"Thu","day.5":"Fri","day.6":"Sat","day.7":"Sun","status.active":"Active","status.paused":"Paused","status.queued":"Queued","status.running":"Running","status.succeeded":"Succeeded","status.failed":"Failed","status.skipped":"Skipped","status.cancelled":"Cancelled","status.interrupted":"Interrupted","card.nextRun":"Next","card.lastRun":"Last","card.never":"Not yet run","schedule.onceAt":"Once \xB7 {time}","schedule.everyMinutes":"Every {count} minutes","schedule.dailyAt":"Daily \xB7 {time}","schedule.weeklyAt":"{days} \xB7 {time}","card.pause":"Pause","card.resume":"Resume","card.runNow":"Run now","card.more":"More actions","card.delete":"Delete","card.confirmDelete":"Delete this automation?","card.confirmDeleteHint":"Run history is kept for audit.","card.confirm":"Delete","card.cancel":"Cancel","run.trigger.schedule":"Scheduled","run.trigger.manual":"Manual","run.openSession":"Session {id}","run.markRead":"Mark reviewed",loading:"Loading automations\u2026","error.title":"Automations could not be loaded","error.retry":"Try again","error.action":"The action failed. Please try again.","error.taskMissing":"This scheduled task no longer exists.","error.offline":"Could not reach the local automation service. Check that DSH is still running and try again.","time.minutes":"{count}m","time.hours":"{count}h","time.days":"{count}d","time.months":"{count}mo","time.years":"{count}y","time.ago":"{text} ago","time.now":"now","session.copy":"Copy","session.copied":"Copied","session.compactApproval":"Approval","session.compactPlan":"Plan review","session.compactAnswer":"Answer","time.minuteAgo":"{count}m ago","time.hourAgo":"{count}h ago","time.dayAgo":"{count}d ago","time.inMinute":"in {count}m","time.inHour":"in {count}h","time.inDay":"in {count}d"},uO={tab:"\u5B9A\u65F6\u4EFB\u52A1","sidebar.tab":"\u5B9A\u65F6","sidebar.tabs":"\u5DE5\u4F5C\u533A\u5206\u7C7B","sidebar.tasksTab":"\u4EFB\u52A1","sidebar.channelsTab":"\u9891\u9053","sidebar.views":"\u5B9A\u65F6\u9875\u89C6\u56FE","sidebar.viewOverview":"\u4EFB\u52A1\u603B\u89C8","sidebar.empty":"\u8FD8\u6CA1\u6709\u5B9A\u65F6\u4EFB\u52A1\u6267\u884C\u8BB0\u5F55\u3002","sidebar.tasksEmpty":"\u6682\u65E0\u7F51\u9875\u4EFB\u52A1","sidebar.ungrouped":"\u672A\u5206\u7EC4","sidebar.section":"\u5B9A\u65F6\u4EFB\u52A1","sidebar.workspaces":"\u5DE5\u4F5C\u533A","sidebar.search":"\u641C\u7D22","sidebar.sessions":"\u4F1A\u8BDD","sidebar.searchSessions":"\u641C\u7D22\u4F1A\u8BDD\u540D\u79F0","sidebar.clearSearch":"\u6E05\u9664\u641C\u7D22","sidebar.filter":"\u89C6\u56FE\u9009\u9879","sidebar.groupBy":"\u5206\u7EC4\u65B9\u5F0F","sidebar.groupWorkspace":"\u6309\u5DE5\u4F5C\u533A","sidebar.groupWorkspaceTree":"\u6309\u5DE5\u4F5C\u533A\u6811","sidebar.groupList":"\u5355\u5217\u8868","sidebar.sortBy":"\u6392\u5E8F\u65B9\u5F0F","sidebar.sortManual":"\u624B\u52A8\u6392\u5E8F","sidebar.sortTime":"\u6700\u8FD1\u66F4\u65B0","sidebar.filterBy":"\u7B5B\u9009\u4F1A\u8BDD","sidebar.showArchived":"\u663E\u793A\u5DF2\u5F52\u6863","sidebar.onlyArchived":"\u4EC5\u663E\u793A\u5DF2\u5F52\u6863","header.lead":"\u6309\u8BA1\u5212\u81EA\u52A8\u6267\u884C\u4EFB\u52A1\uFF0C\u4E5F\u53EF\u968F\u65F6\u624B\u52A8\u89E6\u53D1\u3002\u5728\u4EFB\u610F\u5BF9\u8BDD\u4E2D\u63CF\u8FF0\u4F60\u60F3\u5B9A\u671F\u505A\u7684\u4E8B\uFF0C\u5373\u53EF\u5FEB\u901F\u521B\u5EFA","header.githubProject":"GitHub","header.githubFeedback":"\u95EE\u9898\u53CD\u9988","examples.title":"\u63A8\u8350\u6848\u4F8B","examples.1.title":"\u6BCF\u65E5\u56DE\u5F52\u68C0\u67E5","examples.1.body":"\u6211\u8981\u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u6BCF\u3010\u5929\u3011\u6267\u884C\u3010\u68C0\u67E5\u65B0\u589E\u6D4B\u8BD5\u5931\u8D25\u5E76\u7ED9\u51FA\u6700\u5C0F\u4FEE\u590D\u3011\u3002","examples.1.chip":"\u6BCF\u5929 09:00","examples.2.title":"\u6BCF\u5468\u4F9D\u8D56\u5DE1\u68C0","examples.2.body":"\u6211\u8981\u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u6BCF\u3010\u5468\u4E00\u3011\u6267\u884C\u3010\u68C0\u67E5\u8FC7\u671F\u6216\u6709\u98CE\u9669\u7684\u4F9D\u8D56\u5E76\u7ED9\u51FA\u5904\u7406\u5EFA\u8BAE\u3011\u3002","examples.2.chip":"\u6BCF\u5468\u4E00 10:00","examples.3.title":"\u5DE5\u4F5C\u65E5\u65E9\u62A5","examples.3.body":"\u6211\u8981\u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u6BCF\u3010\u5DE5\u4F5C\u65E5\u3011\u6267\u884C\u3010\u6C47\u603B\u6628\u591C\u4ED3\u5E93\u53D8\u66F4\u5E76\u7ED9\u51FA\u4ECA\u65E5\u5173\u6CE8\u70B9\u3011\u3002","examples.3.chip":"\u5DE5\u4F5C\u65E5 08:00","chat.hint":"\u5728\u4EFB\u610F\u5BF9\u8BDD\u4E2D\u63CF\u8FF0\u4F60\u60F3\u5B9A\u671F\u505A\u7684\u4E8B\uFF0C\u5E76\u8BA9 Agent \u8C03\u7528 automation_create\u3002","chat.prompt":"\u6211\u8981\u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u6BCF\u3010\u65F6\u95F4\u95F4\u9694\u3011\u6267\u884C\u3010\u5177\u4F53\u4EFB\u52A1\u3011","menu.run":"\u6267\u884C\u4EFB\u52A1","menu.edit":"\u7F16\u8F91\u4EFB\u52A1","menu.delete":"\u5220\u9664\u4EFB\u52A1","session.rename":"\u91CD\u547D\u540D","session.fork":"\u5206\u53C9\u4F1A\u8BDD","session.archive":"\u5F52\u6863\u4F1A\u8BDD","session.unarchive":"\u6062\u590D","session.moreActions":"\u201C{title}\u201D\u7684\u66F4\u591A\u64CD\u4F5C","session.groupActions":"\u201C{name}\u201D\u7684\u4EFB\u52A1\u64CD\u4F5C","session.taskSettings":"\u4EFB\u52A1\u8BBE\u7F6E","session.archiveGroup":"\u5F52\u6863\u6574\u7EC4\u4F1A\u8BDD","session.archiveGroupConfirm":"\u786E\u8BA4\u5F52\u6863","session.archiveGroupDescription":"\u5C06\u5F52\u6863\u201C{name}\u201D\u4E0B\u7684 {count} \u4E2A\u4F1A\u8BDD\u3002\u53EF\u5728\u7B5B\u9009\u4E2D\u9009\u62E9\u201C\u663E\u793A\u5DF2\u5F52\u6863\u201D\u540E\u6062\u590D\u3002","session.archiveGroupPending":"\u6B63\u5728\u5F52\u6863\u6574\u7EC4\u4F1A\u8BDD\u2026","session.archiveGroupFailed":"\u90E8\u5206\u4F1A\u8BDD\u5F52\u6863\u5931\u8D25\uFF1A{message}","session.archiveGroupClose":"\u5173\u95ED","session.archiveGroupCancel":"\u53D6\u6D88","session.deleteSession":"\u5220\u9664\u4F1A\u8BDD","session.deleteSessionConfirm":"\u5220\u9664\u4F1A\u8BDD","session.deleteSessionDescription":"\u5C06\u6C38\u4E45\u5220\u9664\u4F1A\u8BDD\u201C{name}\u201D\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u5168\u90E8\u8BB0\u5F55\uFF08\u5BF9\u8BDD\u5185\u5BB9\u3001\u7EDF\u8BA1\u3001\u7F13\u5B58\uFF09\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","session.deleteSessionPending":"\u6B63\u5728\u5220\u9664\u4F1A\u8BDD\u2026","session.deleteSessionFailed":"\u5220\u9664\u4F1A\u8BDD\u5931\u8D25\uFF1A{message}","session.deleteSessionClose":"\u5173\u95ED","session.deleteSessionCancel":"\u53D6\u6D88","session.idle":"\u7A7A\u95F2","session.runningStatus":"\u8FDB\u884C\u4E2D","session.completed":"\u5DF2\u5B8C\u6210","session.waitingApproval":"\u7B49\u5F85\u5BA1\u6279","session.planReview":"\u8BA1\u5212\u5F85\u5BA1","session.waitingAnswer":"\u7B49\u5F85\u56DE\u7B54","session.subagentsRunning":"{count} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","session.archived":"\u5DF2\u5F52\u6863","session.delete":"\u4ECE\u5B9A\u65F6\u9875\u79FB\u9664","session.deleteFolder":"\u4ECE\u5B9A\u65F6\u9875\u79FB\u9664\u6587\u4EF6\u5939","session.confirmDeleteFolder":"\u4ECE\u5B9A\u65F6\u9875\u79FB\u9664\u8FD9\u4E2A\u6587\u4EF6\u5939\uFF1F","session.confirmDeleteFolderHint":"\u53EA\u4F1A\u628A\u300C{name}\u300D\u4E0B\u7684 {count} \u6761\u4F1A\u8BDD\u4ECE\u5B9A\u65F6\u9875\u6458\u6389\uFF0C\u4E0D\u4F1A\u5220\u9664\u5BBF\u4E3B Session\u3002\u4EFB\u52A1\u9875\u672C\u6765\u4E5F\u4E0D\u5C55\u793A\u8FD9\u4E9B\u81EA\u52A8\u5316\u4F1A\u8BDD\u3002","session.confirmDeleteFolderAction":"\u4ECE\u5B9A\u65F6\u9875\u79FB\u9664","history.range.day":"\u6309\u5929","history.range.week":"\u6309\u5468","history.range.month":"\u6309\u6708","history.allTasks":"\u5168\u90E8\u4EFB\u52A1","history.allStatus":"\u5168\u90E8\u72B6\u6001","history.today":"\u4ECA\u5929","history.yesterday":"\u6628\u5929","history.date":"{date}","history.week":"{date} \u5F53\u5468","history.month":"{month}","history.nextApprox":"\u4E0B\u6B21\u6267\u884C \u5927\u7EA6 {when}","time.withinMinute":"{count} \u5206\u949F\u5185","time.withinHour":"{count} \u5C0F\u65F6\u5185","time.withinDay":"{count} \u5929\u5185","search.placeholder":"\u641C\u7D22\u5B9A\u65F6\u4EFB\u52A1...","action.chatCreate":"\u901A\u8FC7\u5BF9\u8BDD\u521B\u5EFA","action.create":"\u65B0\u5EFA\u5B9A\u65F6\u4EFB\u52A1","banner.wake":"\u5B9A\u65F6\u4EFB\u52A1\u4EC5\u5728\u7535\u8111\u4FDD\u6301\u5524\u9192\u65F6\u8FD0\u884C","tabs.mine":"\u6211\u7684\u5B9A\u65F6\u4EFB\u52A1","tabs.runs":"\u6267\u884C\u8BB0\u5F55","sort.by":"\u6392\u5E8F","sort.created.asc":"\u6309\u521B\u5EFA\u65F6\u95F4\u5347\u5E8F","sort.created.desc":"\u6309\u521B\u5EFA\u65F6\u95F4\u5012\u5E8F","sort.planned.asc":"\u6309\u8BA1\u5212\u65F6\u95F4\u5347\u5E8F","sort.planned.desc":"\u6309\u8BA1\u5212\u65F6\u95F4\u5012\u5E8F","sort.default.save":"\u8BBE\u4E3A\u9ED8\u8BA4","sort.default.saved":"\u9ED8\u8BA4","form.workspace":"\u5DE5\u4F5C\u76EE\u5F55","form.fieldWorkspace":"\u5DE5\u4F5C\u533A","form.fieldModel":"\u6A21\u578B","form.fieldEffort":"\u63A8\u7406\u7B49\u7EA7","form.fieldPermission":"\u6743\u9650","form.slashHint":"\u8F93\u5165 / \u53EC\u56DE\u6280\u80FD","form.slashEmpty":"\u6CA1\u6709\u5339\u914D\u7684\u6280\u80FD","form.addWorkspace":"\u6DFB\u52A0\u5DE5\u4F5C\u533A","form.workspaceRequired":"\u8BF7\u5148\u6DFB\u52A0\u5DF2\u767B\u8BB0\u7684\u5DE5\u4F5C\u533A\uFF0C\u5426\u5219\u65E0\u6CD5\u4FDD\u5B58\u3002","form.workspaceUnavailable":"\u5F53\u524D\u5BBF\u4E3B\u4E0D\u80FD\u65B0\u5EFA\u5DE5\u4F5C\u533A\u3002","form.addWorkspaceFailed":"\u6DFB\u52A0\u5DE5\u4F5C\u533A\u5931\u8D25\u3002","form.workspacePath":"\u76EE\u5F55\u8DEF\u5F84","form.workspacePathPlaceholder":"D:\\work\\project","form.model":"\u6A21\u578B","form.modelSelect":"\u9009\u62E9\u6A21\u578B","form.effort":"\u63A8\u7406\u7B49\u7EA7","form.effort.none":"\u9ED8\u8BA4","form.effort.low":"Low","form.effort.medium":"Medium","form.effort.high":"High","form.error.workspace":"\u8BF7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002","modal.title":"\u65B0\u5EFA\u5B9A\u65F6\u4EFB\u52A1","modal.edit":"\u7F16\u8F91\u5B9A\u65F6\u4EFB\u52A1","modal.save":"\u4FDD\u5B58","header.eyebrow":"\u81EA\u4E3B\u7F16\u7801\u4EFB\u52A1","header.title":"\u81EA\u52A8\u5316","header.subtitle":"\u4E3A\u5F53\u524D\u5DE5\u4F5C\u533A\u5B89\u6392\u72EC\u7ACB\u3001\u53EF\u5BA1\u8BA1\u7684 Agent \u8FD0\u884C\u3002","header.create":"\u65B0\u5EFA\u81EA\u52A8\u5316","header.closeCreate":"\u6536\u8D77\u8868\u5355","scope.workspace":"\u5DE5\u4F5C\u533A","scope.folder":"\u5DE5\u4F5C\u76EE\u5F55","stats.total":"\u5168\u90E8","stats.active":"\u5DF2\u542F\u7528","stats.next":"\u4E0B\u6B21\u8FD0\u884C","stats.attention":"\u9700\u8981\u5173\u6CE8","stats.noneScheduled":"\u6682\u65E0\u8BA1\u5212","stats.noAttention":"\u4E00\u5207\u6B63\u5E38","section.automations":"\u5DE5\u4F5C\u533A\u81EA\u52A8\u5316","section.automationsHint":"\u6BCF\u6B21\u89E6\u53D1\u90FD\u4F1A\u521B\u5EFA\u4E00\u4E2A\u5168\u65B0\u7684 DSH Session\uFF0C\u5E76\u4FDD\u7559\u72EC\u7ACB\u5BA1\u8BA1\u8BB0\u5F55\u3002","section.runs":"\u6700\u8FD1\u8FD0\u884C","section.runsHint":"\u5F53\u524D\u5DE5\u4F5C\u533A\u6700\u8FD1\u7684\u6267\u884C\u72B6\u6001\u3002","section.refresh":"\u5237\u65B0","empty.title":"\u8BA9\u91CD\u590D\u7684\u7F16\u7801\u5DE5\u4F5C\u81EA\u52A8\u8FD0\u884C","empty.body":"\u8BBE\u7F6E\u4E00\u4E2A\u76EE\u6807\u660E\u786E\u7684\u4EFB\u52A1\u3001\u8FD0\u884C\u65F6\u95F4\u548C\u6743\u9650\u8FB9\u754C\u3002\u6BCF\u6B21\u8FD0\u884C\u90FD\u4ECE\u5168\u65B0 Session \u5F00\u59CB\u3002","empty.action":"\u521B\u5EFA\u7B2C\u4E00\u4E2A\u81EA\u52A8\u5316","runs.empty":"\u8FD8\u6CA1\u6709\u8FD0\u884C\u8BB0\u5F55\u3002\u4F60\u53EF\u4EE5\u7ACB\u5373\u8FD0\u884C\u4E00\u6B21\uFF0C\u6216\u7B49\u5F85\u8BA1\u5212\u89E6\u53D1\u3002","overview.empty":"\u6682\u65E0\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u53EF\u5230\u8BBE\u7F6E\u9875\u521B\u5EFA\u3002","form.title":"\u521B\u5EFA\u81EA\u52A8\u5316","form.subtitle":"\u8BF7\u5199\u5B8C\u6574\u3001\u72EC\u7ACB\u7684\u4EFB\u52A1\u8BF4\u660E\uFF1A\u5B9A\u65F6\u8FD0\u884C\u4E0D\u4F1A\u7EE7\u627F\u5F53\u524D\u5BF9\u8BDD\u3002","form.name":"\u540D\u79F0","form.namePlaceholder":"\u6BCF\u65E5\u56DE\u5F52\u6D4B\u8BD5\u5206\u8BCA","form.prompt":"\u4EFB\u52A1\u6307\u4EE4","form.promptPlaceholder":"\u68C0\u67E5\u65B0\u589E\u6D4B\u8BD5\u5931\u8D25\uFF0C\u5B9A\u4F4D\u56DE\u5F52\u539F\u56E0\uFF0C\u5E76\u7ED9\u51FA\u7ECF\u8FC7\u9A8C\u8BC1\u7684\u6700\u5C0F\u4FEE\u590D\u65B9\u6848\u2026\u2026","form.schedule":"\u8FD0\u884C\u8BA1\u5212","form.planTime":"\u8BA1\u5212\u65F6\u95F4","form.hourly":"\u6BCF\u5C0F\u65F6","form.monthly":"\u6BCF\u6708","form.custom":"\u6BCF\u9694\u51E0\u5929","form.intervalHint":"\u4ECE\u73B0\u5728\u8D77\uFF0C\u6BCF\u9694\u8FD9\u4E48\u591A\u5206\u949F\u8FD0\u884C\u4E00\u6B21\u3002","form.customHint":"\u6BCF\u9694\u8FD9\u4E48\u591A\u5929\uFF0C\u5728\u6240\u9009\u65F6\u95F4\u8FD0\u884C\u4E00\u6B21\u3002","form.atTime":"\u4E8E","form.minutesShort":"\u5206","form.daysShort":"\u5929","form.monthDay":"\u6BCF\u6708\u7B2C {day} \u5929","form.skills":"\u6280\u80FD","form.skillsEmpty":"\u6682\u65E0\u53EF\u7528\u6280\u80FD","schedule.hourlyAt":"\u6BCF\u5C0F\u65F6 :{minute}","schedule.monthlyAt":"\u6BCF\u6708 {day} \u65E5 \xB7 {time}","schedule.customAt":"\u6BCF {count} \u5929 \xB7 {time}","form.once":"\u4E0D\u91CD\u590D","form.interval":"\u95F4\u9694","form.daily":"\u6BCF\u5929","form.weekly":"\u6BCF\u5468","form.runAt":"\u8FD0\u884C\u65F6\u95F4","form.every":"\u6BCF\u9694","form.minutes":"\u5206\u949F","form.time":"\u65F6\u95F4","form.days":"\u661F\u671F","form.timeZone":"\u65F6\u533A","form.maxConcurrentRuns":"\u5E76\u53D1\u6570\u91CF","form.maxConcurrentRunsHint":"\u540C\u4E00\u4EFB\u52A1\u7684\u6392\u961F\u53CA\u8FD0\u884C\u6B21\u6570\u5171\u7528\u6B64\u4E0A\u9650\uFF0C\u9ED8\u8BA4 1\uFF1B\u6EE1\u989D\u65F6\u8DF3\u8FC7\u5F53\u6B21\u5B9A\u65F6\u89E6\u53D1\uFF0C\u624B\u52A8\u8FD0\u884C\u5C06\u88AB\u62D2\u7EDD\u3002","form.error.maxConcurrentRuns":"\u5E76\u53D1\u6570\u91CF\u5FC5\u987B\u4E3A\u5927\u4E8E\u7B49\u4E8E 1 \u7684\u6574\u6570\u3002","form.permission":"\u6743\u9650\u8FB9\u754C","permission.readOnly":"\u53EA\u8BFB","permission.workspaceWrite":"\u5DE5\u4F5C\u533A\u5199\u5165","permission.fullAccess":"\u5B8C\u5168\u8BBF\u95EE","form.cancel":"\u53D6\u6D88","form.submit":"\u521B\u5EFA\u81EA\u52A8\u5316","form.submitting":"\u521B\u5EFA\u4E2D\u2026","form.error.name":"\u8BF7\u8F93\u5165\u540D\u79F0\u3002","form.error.prompt":"\u8BF7\u8F93\u5165\u5B8C\u6574\u3001\u72EC\u7ACB\u7684\u4EFB\u52A1\u6307\u4EE4\u3002","form.error.once":"\u8BF7\u9009\u62E9\u6709\u6548\u7684\u672A\u6765\u65E5\u671F\u548C\u65F6\u95F4\u3002","form.error.interval":"\u8FD0\u884C\u95F4\u9694\u5FC5\u987B\u5728 1 \u5230 43,200 \u5206\u949F\u4E4B\u95F4\u3002","form.error.weekdays":"\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u5929\u3002","day.1":"\u5468\u4E00","day.2":"\u5468\u4E8C","day.3":"\u5468\u4E09","day.4":"\u5468\u56DB","day.5":"\u5468\u4E94","day.6":"\u5468\u516D","day.7":"\u5468\u65E5","status.active":"\u5DF2\u542F\u7528","status.paused":"\u5DF2\u6682\u505C","status.queued":"\u6392\u961F\u4E2D","status.running":"\u8FD0\u884C\u4E2D","status.succeeded":"\u5DF2\u5B8C\u6210","status.failed":"\u5931\u8D25","status.skipped":"\u5DF2\u8DF3\u8FC7","status.cancelled":"\u5DF2\u53D6\u6D88","status.interrupted":"\u5DF2\u4E2D\u65AD","card.nextRun":"\u4E0B\u6B21","card.lastRun":"\u6700\u8FD1","card.never":"\u5C1A\u672A\u8FD0\u884C","schedule.onceAt":"\u5355\u6B21 \xB7 {time}","schedule.everyMinutes":"\u6BCF {count} \u5206\u949F","schedule.dailyAt":"\u6BCF\u5929 \xB7 {time}","schedule.weeklyAt":"{days} \xB7 {time}","card.pause":"\u6682\u505C","card.resume":"\u6062\u590D","card.runNow":"\u7ACB\u5373\u8FD0\u884C","card.more":"\u66F4\u591A\u64CD\u4F5C","card.delete":"\u5220\u9664","card.confirmDelete":"\u786E\u8BA4\u5220\u9664\u8FD9\u4E2A\u81EA\u52A8\u5316\uFF1F","card.confirmDeleteHint":"\u8FD0\u884C\u5386\u53F2\u4F1A\u4FDD\u7559\u7528\u4E8E\u5BA1\u8BA1\u3002","card.confirm":"\u786E\u8BA4\u5220\u9664","card.cancel":"\u53D6\u6D88","run.trigger.schedule":"\u5B9A\u65F6\u89E6\u53D1","run.trigger.manual":"\u624B\u52A8\u89E6\u53D1","run.openSession":"Session {id}","run.markRead":"\u6807\u8BB0\u5DF2\u5904\u7406",loading:"\u6B63\u5728\u52A0\u8F7D\u81EA\u52A8\u5316\u2026","error.title":"\u65E0\u6CD5\u52A0\u8F7D\u81EA\u52A8\u5316","error.retry":"\u91CD\u8BD5","error.action":"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002","error.taskMissing":"\u8BE5\u5B9A\u65F6\u4EFB\u52A1\u5DF2\u4E0D\u5B58\u5728\u3002","error.offline":"\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A\u81EA\u52A8\u5316\u670D\u52A1\uFF0C\u8BF7\u786E\u8BA4 DSH \u4ECD\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002","time.minutes":"{count}\u5206\u949F","time.hours":"{count}\u5C0F\u65F6","time.days":"{count}\u5929","time.months":"{count}\u4E2A\u6708","time.years":"{count}\u5E74","time.ago":"{text}\u524D","time.now":"\u521A\u521A","session.copy":"\u590D\u5236","session.copied":"\u5DF2\u590D\u5236","session.compactApproval":"\u5F85\u5BA1\u6279","session.compactPlan":"\u8BA1\u5212\u5F85\u5BA1","session.compactAnswer":"\u5F85\u56DE\u7B54","time.minuteAgo":"{count} \u5206\u949F\u524D","time.hourAgo":"{count} \u5C0F\u65F6\u524D","time.dayAgo":"{count} \u5929\u524D","time.inMinute":"{count} \u5206\u949F\u540E","time.inHour":"{count} \u5C0F\u65F6\u540E","time.inDay":"{count} \u5929\u540E"};var mO="__dshNativeTabs";function pO(e){let t=new Map,o=[],n=new Set,r=[],i=()=>{r=[...t.values()].sort((a,c)=>(a.order??0)-(c.order??0))},s=()=>{for(let a of n)a()};return{version:1,officialTree:e,sessionFilters:o,getTabs(){return r},subscribe(a){return n.add(a),()=>{n.delete(a)}},insert(a){if(a.id==="")return()=>{};let c=t.get(a.id);return t.set(a.id,a),c!==a&&(i(),s()),()=>{t.get(a.id)===a&&(t.delete(a.id),i(),s())}},addSessionFilter(a){return o.push(a),s(),()=>{let c=o.indexOf(a);c>=0&&o.splice(c,1),s()}}}}function KS(e){if(e==null||typeof e!="object"&&typeof e!="function")return;let t=e[mO];if(!(t==null||typeof t!="object"))return typeof t.insert=="function"?t:void 0}function qS(e,t){try{e[mO]=t}catch{}return t}function fO(e){let t=e;return KS(e)??KS(t?.component)}function gO(e){if(e==null)return!1;let t=e;return t.__dshNativeTabHost===!0||t.__imConnectWrapped===!0?!0:KS(e)!==void 0}var xH="@michengai/dsh-archive-manager";function GS(e){return e?.querySelector(`[data-plugin="${xH}"]`)!=null}function uc(e){return typeof e=="function"?e:void 0}function Gg(e){let t=e??{},o=uc(t.renameSession),n=uc(t.archiveSession),r=uc(t.unarchiveSession),i=uc(t.deleteSession),s=uc(t.forkSession),a=uc(t.notifyArchivedNotOpenable);return{...o===void 0?{}:{renameSession:o},...n===void 0?{}:{archiveSession:n},...r===void 0?{}:{unarchiveSession:r},...i===void 0?{}:{deleteSession:i},...s===void 0?{}:{forkSession:s},...a===void 0?{}:{notifyArchivedNotOpenable:a}}}function hO(e,t){return e&&t!==void 0}function yO(e){let t=["rename","fork"];return e.archived?e.canUnarchive&&t.push("unarchive"):t.push("archive"),e.canDelete&&t.push("delete-session"),t}function bO(e,t){return t!==null&&e.includes(t)}function xO(e,t){return e&&!t}async function vO(e,t){for(let o of e)await t(o)}var at=require("react"),LO=require("react-dom"),Io=require("@deepseek-ai/dsh-client-ui-primitives");function CO(e,t,o,n){if(e===void 0)return null;try{return e(t,o,n)??null}catch(r){if(!vH(r))throw r;return null}}function vH(e){return typeof e!="object"||e===null?!1:"name"in e&&e.name==="SlotOwnershipError"?!0:(e instanceof Error?e.message:"").includes("not declared by this entry")}function wO(e,t,o){let r=e.right+8,i=e.top+t.height>o.height-8?Math.max(8,o.height-t.height-8):Math.max(8,e.top);return{position:"fixed",zIndex:4100,left:`${Math.round(r)}px`,top:`${Math.round(i)}px`}}function RO(e,t){let o=e.runningSubagentCount??0,n=o===0?void 0:{state:"ongoing",label:t("session.subagentsRunning",{count:o})},r;e.pendingKind==="approval"?r={state:"warning",label:t("session.waitingApproval"),trailing:t("session.compactApproval")}:e.pendingKind==="plan-review"?r={state:"warning",label:t("session.planReview"),trailing:t("session.compactPlan")}:e.pendingKind==="question"&&(r={state:"warning",label:t("session.waitingAnswer"),trailing:t("session.compactAnswer")});let i;r!==void 0?i=n===void 0?[r]:[r,n]:e.running?i=n===void 0?[{state:"ongoing",label:t("session.runningStatus")}]:[{state:"ongoing",label:t("session.runningStatus")},n]:n!==void 0?i=[n]:e.completed===!0?i=[{state:"done",label:t("session.completed")}]:i=[{state:"idle",label:t("session.idle")}];let s=i.filter(a=>!(e.archived&&(a.state==="done"||a.state==="idle")));return e.archived&&s.push({state:"archived",label:t("session.archived")}),s}function EO(e,t){let o=Date.parse(e||"");if(!Number.isFinite(o))return;let n=6e4,r=36e5,i=864e5,s=Math.max(0,t-o);return s<n?{unit:"now",count:0}:s<r?{unit:"minutes",count:Math.floor(s/n)}:s<i?{unit:"hours",count:Math.floor(s/r)}:s<30*i?{unit:"days",count:Math.floor(s/i)}:s<365*i?{unit:"months",count:Math.floor(s/(30*i))}:{unit:"years",count:Math.floor(s/(365*i))}}function $O(e,t){return e.unit==="now"?t("time.now"):e.unit==="minutes"?t("time.minutes",{count:e.count}):e.unit==="hours"?t("time.hours",{count:e.count}):e.unit==="days"?t("time.days",{count:e.count}):e.unit==="months"?t("time.months",{count:e.count}):t("time.years",{count:e.count})}function SO(e,t,o){e.scrollLeft=t,t>0?e.dataset.scrolled="":delete e.dataset.scrolled,t<o?e.dataset.clipped="":delete e.dataset.clipped}function SH(e){e.scrollLeft=0,delete e.dataset.scrolled,delete e.dataset.clipped}function IO(e,t){if(e===null)return;let o=e.scrollWidth-e.clientWidth;if(o<=8)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){SO(e,o,o);return}cancelAnimationFrame(t.id);let n,r=0,i=s=>{r+=n===void 0?0:(s-n)*.03,n=s,SO(e,Math.min(r,o),o),r<o&&(t.id=requestAnimationFrame(i))};t.id=requestAnimationFrame(i)}function XS(e,t){cancelAnimationFrame(t.id),e!==null&&SH(e)}function NO(e,t,o=Date.now()){let n=EO(e,o);return n===void 0?"":$O(n,t)}function PO(e,t,o=Date.now()){let n=EO(e,o);return n===void 0?"":n.unit==="now"?t("time.now"):t("time.ago",{text:$O(n,t)})}var Fs=require("react");var so=require("react/jsx-runtime"),Xg=typeof window>"u"?void 0:window.localStorage;function Yg({t:e,view:t,onChange:o}){return(0,so.jsx)(Rn,{children:(0,so.jsx)(Ak,{block:!0,className:"dsh-st-rail-views","aria-label":e("sidebar.views"),value:t,options:[{value:"runs",label:e("tabs.runs")},{value:"overview",label:e("sidebar.viewOverview")}],onChange:n=>o(n)})})}function Zg({t:e,automations:t,serverNow:o,openTaskSettings:n,onToggleAutomation:r}){let[i,s]=(0,Fs.useState)(()=>Ki(Xg,bu)?.key??"planned"),[a,c]=(0,Fs.useState)(()=>Ki(Xg,bu)?.direction??"asc"),[l,d]=(0,Fs.useState)(()=>new Set),u=(0,Fs.useMemo)(()=>new Date(o??Date.now()),[o]),m=(0,Fs.useMemo)(()=>{let f=hu(t,i,a);return _C(f)},[t,a,i]),p=(0,Fs.useMemo)(()=>new Map(t.map(f=>[f.id,fu(f.schedule,e)])),[t,e]),g=(f,h)=>{r===void 0||l.has(f)||(d(b=>new Set(b).add(f)),Promise.resolve(r(f,h)).catch(b=>{console.warn("[dsh-automation] \u5207\u6362\u4EFB\u52A1\u72B6\u6001\u5931\u8D25",b)}).finally(()=>{d(b=>{let x=new Set(b);return x.delete(f),x})}))};return(0,so.jsx)(Rn,{children:(0,so.jsxs)("div",{className:"dsh-st-overview",children:[(0,so.jsxs)("div",{className:"dsh-st-overview-head",children:[(0,so.jsxs)("div",{className:"dsh-st-overview-title",children:[(0,so.jsx)("strong",{children:e("sidebar.viewOverview")}),(0,so.jsx)("span",{"aria-label":`${m.length}`,children:m.length})]}),(0,so.jsx)(Ug,{t:e,compact:!0,iconOnly:!0,className:"dsh-st-overview-sort",...Xg===void 0?{}:{storage:Xg},storageKey:bu,sortKey:i,sortDirection:a,onSelect:(f,h)=>{s(f),c(h)}})]}),m.length===0?(0,so.jsx)("div",{className:"dsh-st-rail-empty",children:e("overview.empty")}):m.map(f=>(0,so.jsx)(CH,{t:e,row:f,now:u,scheduleSummary:p.get(f.id)??"",toggleDisabled:r===void 0||l.has(f.id),onToggleAutomation:g,...n===void 0?{}:{openTaskSettings:n}},f.id))]})})}function CH({t:e,row:t,now:o,scheduleSummary:n,openTaskSettings:r,toggleDisabled:i,onToggleAutomation:s}){let a=t.status!=="active",c=t.nextRunAt===void 0?e("stats.noneScheduled"):gu(t.nextRunAt,o,e),l=t.nextRunAt===void 0?e("stats.noneScheduled"):wC(t.nextRunAt,o,e),d=`${e("stats.next")}: ${c}`,u=e(a?"card.resume":"card.pause");return(0,so.jsxs)("div",{className:`dsh-st-overview-row${a?" is-paused":""}`,children:[(0,so.jsxs)("button",{type:"button",className:"dsh-st-overview-open",disabled:r===void 0,onClick:()=>{r?.({automationId:t.id,name:t.name,sessionIds:[]})},children:[(0,so.jsxs)("span",{className:"dsh-st-overview-copy",children:[(0,so.jsx)("span",{className:"dsh-st-overview-name",children:t.name}),n!==""&&(0,so.jsxs)("span",{className:"dsh-st-overview-schedule",children:[(0,so.jsx)(a0,{width:14,height:14}),(0,so.jsx)("span",{children:n})]})]}),(0,so.jsx)("span",{className:"dsh-st-overview-next",title:d,"aria-label":d,children:(0,so.jsx)("strong",{children:l})})]}),(0,so.jsx)("span",{className:"dsh-st-overview-toggle",title:u,children:(0,so.jsx)(Wg,{size:"small",checked:!a,disabled:i,"aria-label":u,onChange:()=>{s?.(t.id,vu(t.status))}})})]})}var _a=require("react"),MO=require("@deepseek-ai/dsh-client-ui-primitives");function TO(e){return e?11:14}var So=require("react/jsx-runtime");function kO({t:e,query:t,sort:o,groupMode:n,archivedFilter:r="default",onQueryChange:i,onSortChange:s,onGroupModeChange:a,onArchivedFilterChange:c}){let[l,d]=(0,_a.useState)(t.trim()!==""),[u,m]=(0,_a.useState)(!1),p=(0,_a.useRef)(null),g=TO(l);(0,_a.useEffect)(()=>{l&&p.current?.focus()},[l]);let f=()=>{m(!1),d(!0)},h=()=>{i(""),d(!1)},b=[{type:"label",id:"group-by",text:e("sidebar.groupBy")},{id:"workspace",label:e("sidebar.groupWorkspace"),icon:(0,So.jsx)(uC,{})},{id:"workspace-tree",label:e("sidebar.groupWorkspaceTree"),icon:(0,So.jsx)(mC,{})},{id:"flat",label:e("sidebar.groupList"),icon:(0,So.jsx)(pC,{})},{type:"separator",id:"order-by-separator"},{type:"label",id:"order-by",text:e("sidebar.sortBy")},{id:"updated",label:e("sidebar.sortTime"),icon:(0,So.jsx)(fC,{})},...c!==void 0?[{type:"separator",id:"archived-filter-separator"},{type:"label",id:"filter-by",text:e("sidebar.filterBy")},{id:"show-archived",label:e("sidebar.showArchived"),icon:(0,So.jsx)(za,{})},{id:"only-archived",label:e("sidebar.onlyArchived"),icon:(0,So.jsx)(gC,{})}]:[]],x=[n==="list"?"flat":n,"updated",...r==="show"?["show-archived"]:[],...r==="only"?["only-archived"]:[]];return(0,So.jsxs)("div",{className:l?"dsh-st-n-toolbar is-search":"dsh-st-n-toolbar",children:[(0,So.jsx)("span",{className:"dsh-st-n-head-label",children:e(n==="list"?"sidebar.sessions":"sidebar.workspaces")}),(0,So.jsx)("div",{className:"dsh-st-n-search-slot",children:(0,So.jsxs)("div",{className:"dsh-st-n-search",onClick:f,children:[(0,So.jsx)("button",{type:"button",className:"dsh-st-n-search-btn","aria-label":e("sidebar.search"),"aria-expanded":l,onClick:f,children:(0,So.jsx)(lC,{size:g})}),(0,So.jsx)("input",{ref:p,className:"dsh-st-n-search-input",value:t,placeholder:e("sidebar.searchSessions"),"aria-label":e("sidebar.searchSessions"),tabIndex:l?0:-1,"aria-hidden":!l,onChange:y=>i(y.target.value),onKeyDown:y=>{y.key==="Escape"&&h()}}),l&&(0,So.jsx)("button",{type:"button",className:"dsh-st-n-search-clear","aria-label":e("sidebar.clearSearch"),onClick:y=>{y.stopPropagation(),h()},children:(0,So.jsx)(cC,{size:14})})]})}),(0,So.jsx)("div",{className:"dsh-st-n-head-acts",children:(0,So.jsx)(MO.Menu,{open:u,onClose:()=>{m(!1)},items:b,selectedIds:x,align:"end",dense:!0,portal:!0,onSelect:y=>{(y==="workspace"||y==="workspace-tree")&&a(y),y==="flat"&&a("list"),y==="updated"&&s("time"),y==="show-archived"&&c?.(r==="show"?"default":"show"),y==="only-archived"&&c?.(r==="only"?"default":"only"),m(!1)},anchor:(0,So.jsx)("button",{type:"button",className:u?"dsh-st-n-head-btn is-on":"dsh-st-n-head-btn","aria-label":e("sidebar.filter"),"aria-expanded":u,onClick:()=>m(y=>!y),children:(0,So.jsx)(dC,{size:16})})})})]})}var Ee=require("react/jsx-runtime"),OO={},AO=[];function Qg(e){let{t,runtime:o,openSession:n,useSessions:r,useWorkspaces:i,renameSession:s,archiveSession:a,unarchiveSession:c,deleteSession:l,forkSession:d,notifyArchivedNotOpenable:u,openTaskSettings:m,renderSlot:p,useSessionStatus:g}=e,f=(0,at.useSyncExternalStore)(o.source.subscribe,o.source.getSnapshot,o.source.getSnapshot),h=r?r(ne=>gc(ne)):null,b=r?r(ne=>ne.byId??OO):OO,x=i?i(ne=>ne.archivedSessionIds??[]):[],y=i?i(ne=>ne.items??AO):AO,S=g?g(ne=>ne):void 0,v=r?r(ne=>ne.projectionsBySession):void 0,[C,w]=(0,at.useState)({}),[R,T]=(0,at.useState)(),[N,I]=(0,at.useState)(),[E,k]=(0,at.useState)(),[F,A]=(0,at.useState)(!1),[z,D]=(0,at.useState)(),[_,V]=(0,at.useState)(),[L,G]=(0,at.useState)(!1),[H,W]=(0,at.useState)(),[Z,B]=(0,at.useState)(()=>typeof document<"u"&&GS(document)),[K,j]=(0,at.useState)("default"),[Q,X]=(0,at.useState)(""),[U,J]=(0,at.useState)("time"),[P,O]=(0,at.useState)("workspace"),[q,ee]=(0,at.useState)("runs"),le=(0,at.useRef)(null),re=(0,at.useMemo)(()=>new Set(x),[x]),ie=(0,at.useMemo)(()=>{let ne=f.snapshot;if(ne===void 0)return[];let fe=new Map(ne.automations.map(ce=>[ce.id,ce.timeZone]));return xu(ne.automations,ne.runs).map(ce=>({...ce,sessions:ce.sessions.filter(Re=>FC(Re.id,re,K)).map(Re=>{let De=ne.runs.find(we=>we.sessionId===Re.id);return{...Re,title:fc(De&&(De.startedAt||De.scheduledFor)||"",fe.get(ce.id)),updatedAt:De&&(De.startedAt||De.scheduledFor)||"",running:Re.running||b[Re.id]?.running===!0}})})).filter(ce=>ce.sessions.length>0)},[re,K,b,f.snapshot]);(0,at.useEffect)(()=>{if(!Su(h,f.snapshot?.runs)){le.current=null;return}le.current!==h&&(le.current=h,o.refresh().catch(()=>{}))},[o,h,f.snapshot?.runs]);let Ce=(0,at.useMemo)(()=>{let ne=P==="workspace-tree"?n0(ie.flatMap(fe=>fe.sessions.map(ce=>({...ce,automationId:fe.id}))),y,t("sidebar.ungrouped")):ie;return r0(ne.map(fe=>({...fe,name:fe.name})),Q,U,P)},[P,ie,Q,U,t,y]);(0,at.useEffect)(()=>{if(typeof document>"u"||typeof MutationObserver>"u")return;let ne=()=>{B(GS(document))};ne();let fe=new MutationObserver(ne);return fe.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{fe.disconnect()}},[]);let de=Z&&a!==void 0,$e=hO(Z,l),ae=c!==void 0,Pe=()=>{if(E===void 0||a===void 0||F)return;let ne=E;A(!0),D(void 0),vO(ne.sessionIds,a).then(()=>{k(void 0)}).catch(fe=>{D(fe instanceof Error?fe.message:t("error.action"))}).finally(()=>{A(!1)})},he=()=>{if(_===void 0||l===void 0||L)return;let ne=_;G(!0),W(void 0),Promise.resolve(l(ne.id)).then(()=>{V(void 0)}).catch(fe=>{W(fe instanceof Error?fe.message:t("error.action"))}).finally(()=>{G(!1)})};return(0,Ee.jsxs)("div",{className:"dsh-st-n",children:[(0,Ee.jsx)(Yg,{t,view:q,onChange:ee}),q==="overview"?f.snapshot===void 0?(0,Ee.jsx)("div",{className:"dsh-st-n-empty",children:f.phase==="loading"?t("loading"):t("overview.empty")}):(0,Ee.jsx)(Zg,{t,automations:f.snapshot.automations,onToggleAutomation:(ne,fe)=>o.mutateAutomation(ne,fe),...m===void 0?{}:{openTaskSettings:m},...f.snapshot.serverNow===void 0?{}:{serverNow:f.snapshot.serverNow}}):(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsx)(kO,{t,query:Q,sort:U,groupMode:P,archivedFilter:K,onQueryChange:X,onSortChange:J,onGroupModeChange:O,onArchivedFilterChange:j}),(0,Ee.jsx)("div",{className:"dsh-st-n-list-area",children:(0,Ee.jsxs)("div",{className:"dsh-st-n-tree",role:"tree",children:[f.phase==="loading"&&Ce.length===0&&(0,Ee.jsx)("div",{className:"dsh-st-n-empty",children:t("loading")}),Ce.length===0&&f.phase!=="loading"&&(0,Ee.jsx)("div",{className:"dsh-st-n-empty",children:t("sidebar.empty")}),Ce.map(ne=>{let fe=C[ne.id]!==!0,ce=bO(ne.sessions.map(se=>se.id),h),Re="depth"in ne?ne.depth:0,De=[...new Set(ne.sessions.flatMap(se=>"automationId"in se&&typeof se.automationId=="string"?[se.automationId]:[]))],we=P==="workspace-tree"&&De.length===1?f.snapshot?.automations.find(se=>se.id===De[0]):void 0,pe=P==="workspace-tree"?we?.id:ne.id,ue=P==="workspace-tree"?we?.name:ne.name;return(0,Ee.jsxs)("div",{className:"dsh-st-n-group",style:Re>0?{"--dsh-workspace-indent":`${Re*12}px`}:void 0,children:[P!=="list"&&(0,Ee.jsx)(wH,{t,id:ne.id,name:ne.name,sessionIds:ne.sessions.map(se=>se.id),expanded:fe,hasCurrentSession:ce,menuOpen:N===ne.id,canArchiveGroup:de,showTaskSettings:pe!==void 0,onToggle:()=>w(se=>({...se,[ne.id]:fe})),onMenuChange:se=>{T(void 0),I(se?ne.id:void 0)},onTaskSettings:()=>{pe!==void 0&&m?.({automationId:pe,name:ue??ne.name,sessionIds:ne.sessions.map(se=>se.id)})},onArchiveGroup:()=>{D(void 0),k({id:ne.id,name:ne.name,sessionIds:ne.sessions.map(se=>se.id)})}}),(P==="list"||fe)&&ne.sessions.map(se=>(0,Ee.jsx)(RH,{t,flat:P==="list",id:se.id,title:se.title,hoverTitle:String(b[se.id]?.displayTitle??b[se.id]?.title??ne.name),updatedAt:se.updatedAt,running:se.running,archived:re.has(se.id),selected:h===se.id,menuOpen:R===se.id,canDelete:$e,canUnarchive:ae,hoverStatuses:RO({running:se.running||S?.get(se.id)?.running===!0,archived:re.has(se.id),completed:S?.get(se.id)?.completionUnread===!0,...S?.get(se.id)?.pendingInteraction?.kind===void 0?{}:{pendingKind:S.get(se.id)?.pendingInteraction?.kind??""},runningSubagentCount:(v?.[se.id]?.values?.subagentCatalog??[]).filter(Se=>Se.id!==void 0&&S?.get(Se.id)?.running===!0).length},t),...p===void 0?{}:{renderSlot:p},onMenuChange:Se=>{I(void 0),T(Se?se.id:void 0)},onOpen:()=>{if(T(void 0),re.has(se.id)){u?.();return}n?.(se.id)},onDeleteSession:()=>{W(void 0),V({id:se.id,title:String(b[se.id]?.displayTitle??b[se.id]?.title??se.title)})},...s===void 0?{}:{renameSession:s},...a===void 0?{}:{archiveSession:a},...c===void 0?{}:{unarchiveSession:c},...d===void 0?{}:{forkSession:d}},se.id))]},ne.id===""?"ungrouped":ne.id)})]})})]}),(0,Ee.jsxs)(Io.Modal,{open:E!==void 0,onClose:()=>{F||(k(void 0),D(void 0))},closeLabel:t("session.archiveGroupClose"),title:t("session.archiveGroup"),footer:(0,Ee.jsxs)("div",{className:"dsh-st-n-dialog-actions",children:[(0,Ee.jsx)(Io.Button,{variant:"outline",disabled:F,onClick:()=>{k(void 0),D(void 0)},children:t("session.archiveGroupCancel")}),(0,Ee.jsx)(Io.Button,{variant:"outline",className:"dsh-st-n-danger-button",disabled:F,onClick:Pe,children:t("session.archiveGroupConfirm")})]}),children:[(0,Ee.jsx)("p",{className:"dsh-st-n-dialog-copy",children:E===void 0?"":t("session.archiveGroupDescription",{name:E.name,count:E.sessionIds.length})}),F&&(0,Ee.jsx)("div",{className:"dsh-st-n-dialog-status",role:"status",children:t("session.archiveGroupPending")}),z!==void 0&&(0,Ee.jsx)("div",{className:"dsh-st-n-dialog-error",role:"alert",children:t("session.archiveGroupFailed",{message:z})})]}),(0,Ee.jsxs)(Io.Modal,{open:_!==void 0,onClose:()=>{L||(V(void 0),W(void 0))},closeLabel:t("session.deleteSessionClose"),title:t("session.deleteSession"),footer:(0,Ee.jsxs)("div",{className:"dsh-st-n-dialog-actions",children:[(0,Ee.jsx)(Io.Button,{variant:"outline",disabled:L,onClick:()=>{V(void 0),W(void 0)},children:t("session.deleteSessionCancel")}),(0,Ee.jsx)(Io.Button,{variant:"outline",className:"dsh-st-n-danger-button",disabled:L,onClick:he,children:t("session.deleteSessionConfirm")})]}),children:[(0,Ee.jsx)("p",{className:"dsh-st-n-dialog-copy",children:_===void 0?"":t("session.deleteSessionDescription",{name:_.title})}),L&&(0,Ee.jsx)("div",{className:"dsh-st-n-dialog-status",role:"status",children:t("session.deleteSessionPending")}),H!==void 0&&(0,Ee.jsx)("div",{className:"dsh-st-n-dialog-error",role:"alert",children:t("session.deleteSessionFailed",{message:H})})]})]})}function wH(e){let{t,id:o,name:n,expanded:r,hasCurrentSession:i,menuOpen:s,canArchiveGroup:a,showTaskSettings:c,onToggle:l,onMenuChange:d,onTaskSettings:u,onArchiveGroup:m}=e,p=[...c?[{id:"task-settings",label:t("session.taskSettings"),icon:(0,Ee.jsx)(nC,{size:16})}]:[],...a?[...c?[{type:"separator",id:"archive-separator"}]:[],{id:"archive-group",label:t("session.archiveGroup"),icon:(0,Ee.jsx)(za,{size:16}),danger:!0}]:[]],g="dsh-st-n-row"+(i?" has-current-session":"")+(s?" is-menu":"");return(0,Ee.jsxs)("div",{className:g,role:"treeitem","aria-expanded":r,"data-n-group":o,onClick:l,children:[(0,Ee.jsx)("span",{className:"dsh-st-n-slot dsh-st-n-folder",children:r?(0,Ee.jsx)(f0,{width:16,height:16}):(0,Ee.jsx)(p0,{width:16,height:16})}),(0,Ee.jsx)("span",{className:"dsh-st-n-slot dsh-st-n-chevron",children:(0,Ee.jsx)(g0,{width:14,height:14,className:"dsh-st-n-arrow"+(r?" is-open":"")})}),(0,Ee.jsx)("span",{className:"dsh-st-n-project-text",children:(0,Ee.jsx)("span",{className:"dsh-st-n-title",children:n})}),(0,Ee.jsx)("span",{className:"dsh-st-n-acts",children:(0,Ee.jsx)(Io.Menu,{open:s,onClose:()=>{d(!1)},items:p,onSelect:f=>{d(!1),f==="task-settings"&&u(),f==="archive-group"&&m()},portal:!0,closeOnPointerLeave:!0,anchor:(0,Ee.jsx)("button",{type:"button",className:"dsh-st-n-ico","aria-label":t("session.groupActions",{name:n}),onMouseDown:f=>{f.stopPropagation()},onClick:f=>{f.stopPropagation(),d(!s)},children:(0,Ee.jsx)(sh,{size:16})})})})]})}function RH(e){let{t,flat:o,id:n,title:r,hoverTitle:i,updatedAt:s,running:a,archived:c,selected:l,menuOpen:d,canDelete:u,canUnarchive:m,hoverStatuses:p,renderSlot:g,onMenuChange:f,onOpen:h,onDeleteSession:b,renameSession:x,archiveSession:y,unarchiveSession:S,forkSession:v}=e,C=xO(o,a),w=(0,at.useRef)(null),R=(0,at.useRef)(null),[T,N]=(0,at.useState)(!1),[I,E]=(0,at.useState)({}),k=(0,at.useRef)(void 0),F=(0,at.useRef)(null),A=(0,at.useRef)({id:0});(0,at.useEffect)(()=>()=>{XS(F.current,A.current)},[]);let[z,D]=(0,at.useState)(!1),[_,V]=(0,at.useState)(r);(0,at.useEffect)(()=>{V(r)},[r]),(0,at.useEffect)(()=>{if(typeof Io.HoverCard=="function"||!T||d)return;let P=()=>{let O=w.current?.getBoundingClientRect(),q=R.current;if(O===void 0)return;let ee=q===null?{width:220,height:96}:{width:q.offsetWidth,height:q.offsetHeight};E(wO({right:O.right,top:O.top},ee,{width:window.innerWidth,height:window.innerHeight}))};return P(),window.addEventListener("resize",P),document.addEventListener("scroll",P,!0),()=>{window.removeEventListener("resize",P),document.removeEventListener("scroll",P,!0)}},[T,d,r,s,a]),(0,at.useEffect)(()=>()=>{k.current!==void 0&&window.clearTimeout(k.current)},[]);let L=P=>{Promise.resolve(P()).catch(()=>{})},G=()=>{typeof Io.HoverCard=="function"||d||(k.current!==void 0&&window.clearTimeout(k.current),k.current=window.setTimeout(()=>N(!0),500))},H=()=>{k.current!==void 0&&window.clearTimeout(k.current),N(!1)},W="dsh-st-n-sess"+(l?" is-on":"")+(d?" is-menu":"")+(C?" is-flat-idle":"")+(c?" is-archived":"");if(z)return(0,Ee.jsx)("div",{className:W,ref:w,children:(0,Ee.jsx)("input",{className:"dsh-st-n-rename",value:_,autoFocus:!0,"aria-label":t("session.rename"),onChange:P=>V(P.target.value),onClick:P=>P.stopPropagation(),onKeyDown:P=>{P.key==="Enter"&&(P.preventDefault(),D(!1),_.trim()!==""&&_.trim()!==r&&L(()=>x?.(n,_.trim()))),P.key==="Escape"&&(P.preventDefault(),D(!1),V(r))},onBlur:()=>{D(!1),_.trim()!==""&&_.trim()!==r&&L(()=>x?.(n,_.trim()))}})});let Z=(i??r).trim()||r,B=g!==void 0&&hC()?["rename","fork","archive","archive-manager.delete-session"].map(P=>g("sidebar.workspaces.session.menu.item",{sessionId:n,displayTitle:Z},{hookContext:[d,O=>f(O)],only:P})):void 0,K=B!==void 0?[]:yO({canDelete:u,archived:c,canUnarchive:m}).map(P=>P==="rename"?{id:P,label:t("session.rename"),icon:(0,Ee.jsx)(iC,{})}:P==="fork"?{id:P,label:t("session.fork"),icon:(0,Ee.jsx)(rC,{})}:P==="archive"?{id:P,label:t("session.archive"),icon:(0,Ee.jsx)(za,{size:16})}:P==="unarchive"?{id:P,label:t("session.unarchive"),icon:(0,Ee.jsx)(m0,{width:16,height:16})}:{id:P,label:t("session.deleteSession"),icon:(0,Ee.jsx)(sC,{}),danger:!0}),j=p.find(P=>P.state!=="archived"),Q=!c&&j!==void 0&&j.state!=="idle",X=j?.trailing,U=(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsx)("div",{className:"dsh-st-n-hover-title",children:Z}),(0,Ee.jsx)("div",{className:"dsh-st-n-hover-time",children:PO(s,t)}),p.map(P=>(0,Ee.jsxs)("div",{className:"dsh-st-n-hover-state",children:[P.state==="archived"?(0,Ee.jsx)(za,{size:14}):(0,Ee.jsx)(Io.StateDot,{state:P.state==="ongoing"?"ongoing":P.state==="warning"?"warning":P.state==="done"?"done":"idle",size:10}),P.label]},P.label))]}),J=(0,Ee.jsxs)("div",{className:W,ref:w,role:"treeitem",tabIndex:0,"aria-selected":l,"data-n-menu-root":n,onClick:h,onMouseEnter:()=>{IO(F.current,A.current),G()},onMouseLeave:()=>{XS(F.current,A.current),H()},onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),h())},onContextMenu:P=>{P.preventDefault(),P.stopPropagation(),H(),f(!0)},children:[!C&&(0,Ee.jsx)("span",{className:"dsh-st-n-slot",children:Q&&j!==void 0?(0,Ee.jsx)(Io.StateDot,{state:j.state==="ongoing"?"ongoing":j.state==="warning"?"warning":"done",size:10}):a?(0,Ee.jsx)(Cu,{}):null}),(0,Ee.jsx)("span",{ref:F,className:"dsh-st-n-title",onDoubleClick:P=>{x!==void 0&&(P.stopPropagation(),D(!0))},children:r}),(0,Ee.jsx)("span",{className:"dsh-st-n-time","aria-hidden":X===void 0?void 0:!0,children:X??NO(s,t)}),(0,Ee.jsxs)("span",{className:"dsh-st-n-acts",children:[B===void 0&&c&&m&&(0,Ee.jsx)("button",{type:"button",className:"dsh-st-n-restore",onMouseDown:P=>{P.stopPropagation()},onClick:P=>{P.stopPropagation(),L(()=>S?.(n))},children:t("session.unarchive")}),(0,Ee.jsx)(Io.Menu,{open:d,onClose:()=>{f(!1)},items:K,onSelect:P=>{f(!1),P==="rename"&&D(!0),P==="fork"&&L(()=>v?.(n)),P==="archive"&&L(()=>y?.(n)),P==="unarchive"&&L(()=>S?.(n)),P==="delete-session"&&b?.()},portal:!0,closeOnPointerLeave:!0,anchor:(0,Ee.jsx)("button",{type:"button",className:"dsh-st-n-ico","aria-label":t("session.moreActions",{title:r}),onMouseDown:P=>{P.stopPropagation()},onClick:P=>{P.stopPropagation(),H(),f(!d)},children:(0,Ee.jsx)(sh,{size:16})}),children:B}),CO(g,"sidebar.workspaces.session.row.action",{sessionId:n,displayTitle:Z},{only:"archive"})]}),typeof Io.HoverCard!="function"&&T&&!d&&typeof document<"u"&&(0,LO.createPortal)((0,Ee.jsx)("div",{ref:R,className:"dsh-st-n-hover",style:I,onMouseEnter:G,onMouseLeave:H,children:U}),document.body)]});return typeof Io.HoverCard!="function"?J:(0,Ee.jsx)(Io.HoverCard,{anchor:J,content:U,openDelayMs:800,disabled:d,copyText:Z,copyLabel:t("session.copy"),copiedLabel:t("session.copied")})}var Lt=require("react");var nt=require("react/jsx-runtime"),DO=[],_O=e=>()=>{},YS=class extends Lt.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(t){console.warn("[dsh-automation] official workspace tree crashed",t)}render(){return this.state.failed?this.props.fallback:this.props.children}};function FO({t:e,runtime:t,openSession:o,openTaskSettings:n,view:r,showViewSwitch:i=!0}){let s=(0,Lt.useSyncExternalStore)(t.source.subscribe,t.source.getSnapshot,t.source.getSnapshot),[a,c]=(0,Lt.useState)({}),[l,d]=(0,Lt.useState)("runs"),u=r??l,m=s.snapshot,p=(0,Lt.useMemo)(()=>m===void 0?[]:xu(m.automations,m.runs),[m]);return(0,nt.jsxs)("div",{className:"dsh-st-rail",children:[i&&(0,nt.jsx)(Yg,{t:e,view:u,onChange:d}),u==="overview"?m===void 0?(0,nt.jsx)("div",{className:"dsh-st-rail-empty",children:s.phase==="loading"?e("loading"):e("overview.empty")}):(0,nt.jsx)(Zg,{t:e,automations:m.automations,onToggleAutomation:(g,f)=>t.mutateAutomation(g,f),...n===void 0?{}:{openTaskSettings:n},...m.serverNow===void 0?{}:{serverNow:m.serverNow}}):(0,nt.jsxs)(nt.Fragment,{children:[s.phase==="loading"&&p.length===0&&(0,nt.jsx)("div",{className:"dsh-st-rail-empty",children:e("loading")}),p.length===0&&s.phase!=="loading"&&(0,nt.jsx)("div",{className:"dsh-st-rail-empty",children:e("sidebar.empty")}),p.map(g=>(0,nt.jsxs)("section",{className:"dsh-st-rail-group",children:[(0,nt.jsxs)("button",{type:"button",className:"dsh-st-rail-head",onClick:()=>c(f=>({...f,[g.id]:!f[g.id]})),children:[(0,nt.jsx)("span",{className:"dsh-st-rail-folder",children:(0,nt.jsx)(yc,{width:16,height:16})}),(0,nt.jsx)("span",{className:"dsh-st-rail-title",children:g.name})]}),a[g.id]!==!0&&g.sessions.map(f=>(0,nt.jsxs)("button",{type:"button",className:"dsh-st-rail-session",onClick:()=>o?.(f.id),children:[(0,nt.jsx)("span",{children:f.label}),f.running&&(0,nt.jsx)(Cu,{})]},f.id))]},g.id))]})]})}function zO({t:e,runtime:t,officialTree:o,hostProps:n,openSession:r,openTaskSettings:i,useSessions:s,useWorkspaces:a,renderSlot:c,hasChannels:l,subscribeChannels:d,tabRegistry:u,wide:m}){let p=o,[g,f]=(0,Lt.useState)(()=>{try{return HC(window.localStorage.getItem(dh))}catch{return"tasks"}}),h=(0,Lt.useSyncExternalStore)(u?.subscribe??_O,()=>u?.getTabs()??DO,()=>DO),b=(0,Lt.useSyncExternalStore)(d??_O,()=>{try{return l?.()===!0}catch{return!1}},()=>!1),x=s?.(D=>gc(D)),y=(0,Lt.useSyncExternalStore)(t.source.subscribe,t.source.getSnapshot,t.source.getSnapshot),S=(0,Lt.useMemo)(()=>zC(y.snapshot?.runs),[y.snapshot]),v=(0,Lt.useRef)(null);(0,Lt.useEffect)(()=>{if(!Su(x,y.snapshot?.runs)){v.current=null;return}v.current!==x&&(v.current=x??null,t.refresh().catch(()=>{}))},[y.snapshot?.runs,x,t]);let C=(0,Lt.useCallback)((D,_)=>s===void 0?D({ids:[],byId:{},current:null}):s(V=>D(GC(V,S)),_),[s,S]),w=(0,Lt.useCallback)((D,_)=>a===void 0?D({items:[],archivedSessionIds:[]}):a(V=>D(JC(V,S)),_),[a,S]);(0,Lt.useEffect)(()=>{try{window.localStorage.setItem(dh,g)}catch{}},[g]),(0,Lt.useEffect)(()=>{let D=_=>{let V=_.target instanceof Element?_.target.closest("button"):null;if(V===null)return;let L=`${V.textContent??""} ${V.getAttribute("aria-label")??""}`;/新会话|新建任务|New chat|New session/i.test(L)&&f("tasks")};return document.addEventListener("click",D,!0),()=>document.removeEventListener("click",D,!0)},[]);let R=(0,Lt.useRef)(x),T=(0,Lt.useRef)(!1);(0,Lt.useEffect)(()=>{let D=UC(x??void 0,S);if(!T.current){T.current=!0,R.current=x,D==="tasks"&&f("tasks");return}let _=R.current;if(R.current=x,!VC(_,x))return;let V=h.map(G=>G.id);D==="tasks"&&f("tasks"),D==="channels"&&(b||V.includes("channels"))&&f("channels");let L=h.find(G=>x!=null&&G.matchSession?.(String(x))===!0);L!==void 0&&L.id!=="schedule"&&f(L.id)},[x,b,h,S]);let N={...n??{},...m===void 0?{}:{wide:m}},I={...N,...s===void 0?{}:{useSessions:C},...a===void 0?{}:{useWorkspaces:w}},E=D=>p===void 0?(0,nt.jsx)(EH,{t:e,...r===void 0?{}:{openSession:r},...s===void 0?{}:{useSessions:C},...a===void 0?{}:{useWorkspaces:a}}):(0,nt.jsx)(YS,{fallback:(0,Lt.createElement)(p,N),children:(0,Lt.createElement)(p,D)});if(m===!1)return(0,nt.jsx)(nt.Fragment,{children:E(I)});let k=h.filter(D=>D.id!=="schedule"),F=jC({tab:g,channelsReady:b,extraTabIds:WC({extraTabIds:k.map(D=>D.id),channelsReady:b})}),A=h.find(D=>D.id==="schedule"),z=A===void 0?(0,nt.jsx)(Qg,{t:e,runtime:t,...r===void 0?{}:{openSession:r},...i===void 0?{}:{openTaskSettings:i},...s===void 0?{}:{useSessions:s},...a===void 0?{}:{useWorkspaces:a},...c===void 0?{}:{renderSlot:c},...Gg(n),...typeof n?.useSessionStatus=="function"?{useSessionStatus:n.useSessionStatus}:{}}):A.render({...n??{},openSession:r,open:r,useSessions:s,wide:!0});return(0,nt.jsxs)("div",{className:"dsh-st-shell-rail",children:[(0,nt.jsxs)("div",{className:"dsh-st-shell-tabs",role:"tablist","aria-label":e("sidebar.tabs"),children:[(0,nt.jsx)("button",{type:"button",role:"tab","aria-selected":F==="tasks",className:F==="tasks"?"is-on":void 0,onClick:()=>f("tasks"),children:e("sidebar.tasksTab")}),k.map(D=>(0,nt.jsx)("button",{type:"button",role:"tab","aria-selected":F===D.id,className:F===D.id?"is-on":void 0,onClick:()=>f(D.id),children:D.label},D.id)),b&&k.every(D=>D.id!=="channels")&&(0,nt.jsx)("button",{type:"button",role:"tab","aria-selected":F==="channels",className:F==="channels"?"is-on":void 0,onClick:()=>f("channels"),children:e("sidebar.channelsTab")}),(0,nt.jsx)("button",{type:"button",role:"tab","aria-selected":F==="schedule",className:F==="schedule"?"is-on":void 0,onClick:()=>f("schedule"),children:e("sidebar.tab")})]}),F==="schedule"?(0,nt.jsx)("div",{className:"dsh-st-shell-body",children:z}):k.find(D=>D.id===F)!==void 0?(0,nt.jsx)("div",{className:"dsh-st-shell-body",children:k.find(D=>D.id===F)?.render({...n??{},openSession:r,open:r,useSessions:s,wide:!0})}):F==="channels"?(0,nt.jsx)("div",{className:"dsh-st-shell-body",children:c?.("sidebar.channels",{...n??{},openSession:r,open:r,useSessions:s,wide:!0,skin:"native"})}):(0,nt.jsx)("div",{className:"dsh-st-official-tree",children:E(I)})]})}function EH({t:e,openSession:t,useSessions:o,useWorkspaces:n}){let r=o===void 0?{ids:[],byId:{},current:null}:o(c=>c??{ids:[],byId:{},current:null}),i=n===void 0?void 0:n(c=>c??{items:[],archivedSessionIds:[]}),s=BC(r,i,e("sidebar.ungrouped")),a=gc(r);return s.length===0?(0,nt.jsx)("div",{className:"dsh-st-rail-empty",children:e("sidebar.tasksEmpty")}):(0,nt.jsx)("div",{className:"dsh-st-rail",children:s.map(c=>(0,nt.jsxs)("section",{className:"dsh-st-rail-group",children:[(0,nt.jsx)("div",{className:"dsh-st-rail-head is-static",children:(0,nt.jsx)("span",{className:"dsh-st-rail-title",children:c.label})}),c.sessions.map(l=>(0,nt.jsx)("button",{type:"button",className:`dsh-st-rail-session${a===l.id?" is-on":""}`,onClick:()=>{l.id!==void 0&&t?.(l.id)},children:(0,nt.jsx)("span",{children:l.title||l.id})},l.id))]},c.id||"ungrouped"))})}var BO="dsh-automation-styles",Jg="@michengai/dsh-automation",HO=`
3
+ "use strict";var Qo=Object.create;var an=Object.defineProperty;var er=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var tr=Object.getPrototypeOf,sr=Object.prototype.hasOwnProperty;var or=(e,n)=>{for(var t in n)an(e,t,{get:n[t],enumerable:!0})},xt=(e,n,t,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of nr(n))!sr.call(e,r)&&r!==t&&an(e,r,{get:()=>n[r],enumerable:!(s=er(n,r))||s.enumerable});return e};var dn=(e,n,t)=>(t=e!=null?Qo(tr(e)):{},xt(n||!e||!e.__esModule?an(t,"default",{value:e,enumerable:!0}):t,e)),rr=e=>xt(an({},"__esModule",{value:!0}),e);var bi={};or(bi,{apply:()=>gi,inject:()=>li,name:()=>di});module.exports=rr(bi);var He=require("react");var ee=require("react");function kt(e,n){return n(`run.trigger.${e}`)}var ce=class extends Error{constructor(t){super(t);this.key=t}},ir=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function un(e){return`/${ir.test(e.name)?e.name:e.id}`}function ar(e,n,t){let s=n.startsWith("/")?n:`/${n}`,r=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`(^|\\s)${r}(?=\\s|$)`).test(e))return{text:e,caret:Math.min(Math.max(t,0),e.length)};let i=Math.min(Math.max(t,0),e.length),o=e.slice(0,i),a=e.slice(i),c=`${o.length>0&&!/\s$/.test(o)?" ":""}${s} `;return{text:o+c+a,caret:o.length+c.length}}function $n(e,n){let t=Math.min(Math.max(n,0),e.length),s=/(?:^|\s)\/([^\s/]*)$/.exec(e.slice(0,t));if(s===null)return;let r=s[1]??"";return{start:t-r.length-1,query:r}}function Tt(e,n){let t=n.trim().toLowerCase();return t===""?[...e]:e.filter(s=>s.id.toLowerCase().includes(t)||s.name.toLowerCase().includes(t))}function At(e,n,t){let s=$n(e,n),r=t.startsWith("/")?t:`/${t}`;return s===void 0?ar(e,r,n):{text:`${e.slice(0,s.start)}${r} ${e.slice(n)}`,caret:s.start+r.length+1}}function It(e,n){let t=new Set(n.map(o=>un(o).slice(1))),s=[],r=/(^|\s)(\/[a-z0-9]+(?:-[a-z0-9]+)*)(?=\s|$)/gi,i=0;for(let o of e.matchAll(r)){let a=o[1]??"",l=o[2]??"",c=(o.index??0)+a.length;t.has(l.slice(1))&&(c>i&&s.push({kind:"text",text:e.slice(i,c)}),s.push({kind:"skill",text:l}),i=c+l.length)}return(i<e.length||s.length===0)&&s.push({kind:"text",text:e.slice(i)}),s}function Ct(e=new Date){let n=new Date(e.getTime()+36e5);n.setMinutes(0,0,0);let t=n.getTimezoneOffset()*6e4;return new Date(n.getTime()-t).toISOString().slice(0,16)}function Kn(e=new Date,n=[],t,s=""){return{name:"",prompt:"",scheduleKind:"daily",onceAt:Ct(e),everyMinutes:"60",maxConcurrentRuns:"1",intervalAnchor:"",time:"09:00",weekdays:[1,2,3,4,5],hourlyMinute:"00",monthDay:"1",customDays:"2",timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone||"Asia/Shanghai",permission:s,workspaceId:n[0]?.id??"",modelKey:t==null?"default":`${t.provider}::${t.model}`,reasoningEffort:t?.reasoning?.defaultEffort??"none",skills:[]}}function Nt(e,n,t,s=new Date,r={}){let i=Number(e.maxConcurrentRuns);if(!Number.isSafeInteger(i)||i<1)throw new ce("form.error.maxConcurrentRuns");let o=e.name.trim(),a=e.prompt.trim();if(o==="")throw new ce("form.error.name");if(a==="")throw new ce("form.error.prompt");let l=n.find(m=>m.id===e.workspaceId);if(l===void 0)throw new ce("form.error.workspace");let c;switch(e.scheduleKind){case"once":{let m=new Date(e.onceAt);if(!Number.isFinite(m.getTime())||r.allowPastOnce!==!0&&m.getTime()<=s.getTime())throw new ce("form.error.once");c={kind:"once",at:m.toISOString(),timeZone:e.timeZone};break}case"interval":{let m=Number(e.everyMinutes);if(!Number.isInteger(m)||m<1||m>43200)throw new ce("form.error.interval");c={kind:"interval",everyMinutes:m,anchor:e.intervalAnchor.trim()||s.toISOString(),timeZone:e.timeZone};break}case"daily":c={kind:"daily",time:e.time,timeZone:e.timeZone};break;case"weekly":if(e.weekdays.length===0)throw new ce("form.error.weekdays");c={kind:"weekly",time:e.time,weekdays:[...e.weekdays].sort((m,T)=>m-T),timeZone:e.timeZone};break;case"hourly":{let m=Number(e.hourlyMinute);if(!Number.isInteger(m)||m<0||m>59)throw new ce("form.error.interval");c={kind:"hourly",minute:m,timeZone:e.timeZone};break}case"monthly":{let m=Number(e.monthDay);if(!Number.isInteger(m)||m<1||m>31)throw new ce("form.error.interval");c={kind:"monthly",day:m,time:e.time,timeZone:e.timeZone};break}case"custom":{let m=Number(e.customDays);if(!Number.isInteger(m)||m<1)throw new ce("form.error.interval");c={kind:"custom",everyDays:m,time:e.time,timeZone:e.timeZone};break}}let y=t.find(m=>`${m.provider}::${m.model}`===e.modelKey);return{name:o,prompt:a,schedule:c,timeZone:e.timeZone,permission:e.permission,maxConcurrentRuns:i,workspaceId:l.id,cwd:l.path,...y===void 0?{provider:null,model:null}:{provider:y.provider,model:y.model},reasoningEffort:e.reasoningEffort==="none"?null:e.reasoningEffort}}function Rt(e,n,t){let s=Date.parse(e);if(!Number.isFinite(s))return e;let r=Math.round((s-n.getTime())/6e4),i=Math.abs(r);if(i<1)return t("time.now");let o=r>0;if(i<60)return t(o?"time.inMinute":"time.minuteAgo",{count:i});let a=Math.round(i/60);if(a<24)return t(o?"time.inHour":"time.hourAgo",{count:a});let l=Math.round(a/24);return t(o?"time.inDay":"time.dayAgo",{count:l})}function pn(e,n){switch(e.kind){case"once":return n("schedule.onceAt",{time:new Date(e.at).toLocaleString()});case"interval":return n("schedule.everyMinutes",{count:e.everyMinutes});case"daily":return n("schedule.dailyAt",{time:e.time});case"weekly":{let t=e.weekdays.map(s=>n(`day.${s}`)).join("\u3001");return n("schedule.weeklyAt",{days:t,time:e.time})}case"hourly":return n("schedule.hourlyAt",{minute:String(e.minute).padStart(2,"0")});case"monthly":return n("schedule.monthlyAt",{day:e.day,time:e.time});case"custom":return n("schedule.customAt",{count:e.everyDays,time:e.time})}}function mn(e,n,t){let s=Date.parse(e)-n.getTime();if(!Number.isFinite(s)||s<=0)return t("time.now");let r=Math.max(1,Math.ceil(s/6e4));if(r<60)return t("time.withinMinute",{count:r});let i=Math.ceil(r/60);return i<24?t("time.withinHour",{count:i}):t("time.withinDay",{count:Math.ceil(i/24)})}function Et(e,n){if(e===void 0||n===void 0)return;let t=(Date.parse(n)-Date.parse(e))/1e3;if(!(!Number.isFinite(t)||t<0))return`${t.toFixed(1)}s`}function Mt(e){let n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}var Lt=["succeeded","failed","interrupted","running","queued","skipped","cancelled"];function ln(e){let n=Date.parse(e);return Number.isFinite(n)?n:0}function fn(e,n,t){let s=t==="asc"?1:-1;return e.slice().sort((r,i)=>{if(n==="planned"){let a=r.nextRunAt,l=i.nextRunAt;if(a===void 0||l===void 0)return a===void 0&&l===void 0?r.name.localeCompare(i.name)||r.id.localeCompare(i.id):a===void 0?1:-1;let c=ln(a)-ln(l);return c!==0?c*s:r.name.localeCompare(i.name)||r.id.localeCompare(i.id)}let o=ln(r.createdAt)-ln(i.createdAt);return o!==0?o*s:r.id.localeCompare(i.id)})}var hn="dsh-automation.sort-default.settings",gn="dsh-automation.sort-default.overview";function Ne(e,n){if(e!==void 0)try{let t=e.getItem(n);if(t===null)return;let s=JSON.parse(t);return s.key!=="created"&&s.key!=="planned"||s.direction!=="asc"&&s.direction!=="desc"?void 0:{key:s.key,direction:s.direction}}catch{return}}function Pt(e,n,t,s){e.setItem(n,JSON.stringify({key:t,direction:s}))}function Dt(e,n,t,s){let r=new Map;for(let i of e){let o=new Date(i.finishedAt??i.startedAt??i.scheduledFor);if(Number.isNaN(o.getTime()))continue;let a;if(n==="month")a=`${o.getFullYear()}-${String(o.getMonth()+1).padStart(2,"0")}`;else if(n==="week"){let c=dr(o);a=cn(c)}else a=cn(o);let l=r.get(a)??[];l.push(i),r.set(a,l)}return[...r.entries()].map(([i,o])=>({key:i,label:o[0]===void 0?i:n==="month"?s("history.month",{month:i.replace("-","/")}):n==="week"?s("history.week",{date:i.slice(5).replace("-","/")}):i===cn(t)?s("history.today"):i===cn(new Date(t.getTime()-864e5))?s("history.yesterday"):s("history.date",{date:i.slice(5).replace("-","/")}),items:o}))}function cn(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function dr(e){let n=new Date(e),t=n.getDay(),s=t===0?6:t-1;return n.setHours(0,0,0,0),n.setDate(n.getDate()-s),n}function Ot(e,n=[],t,s=e.permission){let r=Kn(new Date,n,t,s),i=e.schedule,o=e.provider&&e.model?`${e.provider}::${e.model}`:"default",a={...r,name:e.name,prompt:e.prompt,permission:e.permission,maxConcurrentRuns:String(e.maxConcurrentRuns??1),workspaceId:e.workspaceId??r.workspaceId,modelKey:o,reasoningEffort:e.reasoningEffort??"none",timeZone:e.timeZone||i.timeZone||r.timeZone};switch(i.kind){case"once":return{...a,scheduleKind:"once",onceAt:lr(i.at)};case"interval":return{...a,scheduleKind:"interval",everyMinutes:String(i.everyMinutes),intervalAnchor:i.anchor??""};case"hourly":return{...a,scheduleKind:"hourly",hourlyMinute:String(i.minute).padStart(2,"0")};case"daily":return{...a,scheduleKind:"daily",time:i.time};case"weekly":return{...a,scheduleKind:"weekly",time:i.time,weekdays:[...i.weekdays]};case"monthly":return{...a,scheduleKind:"monthly",time:i.time,monthDay:String(i.day)};case"custom":return{...a,scheduleKind:"custom",time:i.time,customDays:String(i.everyDays)}}}function lr(e){let n=new Date(e);if(Number.isNaN(n.getTime()))return Ct();let t=n.getTimezoneOffset()*6e4;return new Date(n.getTime()-t).toISOString().slice(0,16)}var qe=class extends Error{code="workspace/picker-unavailable";constructor(){super("workspace picker unavailable"),this.name="WorkspacePickerUnavailableError"}};function Le(e,n){if(!(e===null||typeof e!="object"&&typeof e!="function"))return Reflect.get(e,n)}function yn(e,n){if(e===null||typeof e!="object")return;let t;try{t=Reflect.get(e,"reflect")}catch{t=void 0}let s=Le(t,"get");if(typeof s=="function")try{let i=s.call(t,n);if(i!==void 0)return i}catch{}let r=Le(e,"get");if(typeof r=="function")try{let i=r.call(e,n);if(i!==void 0)return i}catch{return}if(typeof s!="function")try{return Le(e,n)}catch{return}}function Ft(e){if(typeof e=="string"&&e.trim()!=="")return e;if(e===null||typeof e!="object"||Reflect.get(e,"canceled")===!0)return;let n=Reflect.get(e,"path");if(typeof n=="string"&&n.trim()!=="")return n;let t=Reflect.get(e,"filePaths"),s=Array.isArray(t)?t[0]:void 0;return typeof s=="string"&&s.trim()!==""?s:void 0}async function Ht(e){let n=Le(e,"pickDirectory");if(typeof n=="function")return{picked:Ft(await n.call(e))}}async function jn(e,n){let t=yn(e,"workspaces"),s=Le(t,"create");if(typeof s!="function")return!1;try{return await s.call(t,{path:n}),!0}catch{return!1}}async function qn(e){let n;try{n=Reflect.get(globalThis,"__DSH_DIRECTORY_PICKER__")}catch{n=void 0}let t=Le(n,"pick");if(typeof t=="function")return Ft(await t.call(n));for(let s of["uiWorkspace","dialog","workspaces"]){let r=await Ht(yn(e,s));if(r!==void 0)return r.picked}try{let s=await Ht(Le(e,"workspaces"));if(s!==void 0)return s.picked}catch{}throw new qe}var cr={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"},Wt=new Map;function ur(e){let n=Wt.get(e);if(n!==void 0)return n;let t=new Intl.DateTimeFormat("en-CA",{...cr,timeZone:e});return Wt.set(e,t),t}function Ze(e,n){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;if(n===void 0){let s=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`,r=`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`;return`${s} ${r}`}try{let s=ur(n).formatToParts(t),r=y=>s.find(m=>m.type===y)?.value,[i,o,a,l,c]=["year","month","day","hour","minute"].map(y=>r(y));return[i,o,a,l,c].some(y=>y===void 0)?e:`${i}-${o}-${a} ${l}:${c}`}catch{return e}}var We="dsh-automation-session-",Xn="dsh-automation.sidebar-tab";function vn(e,n){let t=new Map,s=new Map;for(let o of e)t.set(o.id,o.name),o.timeZone!==void 0&&s.set(o.id,o.timeZone);for(let o of n){let a=(o.automationName||"").trim();a!==""&&a!==o.automationId&&!t.has(o.automationId)&&t.set(o.automationId,a)}let r=[],i=new Set;for(let o of e)i.has(o.id)||(r.push(o.id),i.add(o.id));for(let o of n)o.sessionId===void 0||o.sessionId===""||i.has(o.automationId)||(r.push(o.automationId),i.add(o.automationId));return r.map(o=>{let a=t.get(o)??o;return{id:o,name:a,sessions:n.filter(l=>l.automationId===o&&l.sessionId!==void 0&&l.sessionId!=="").slice().sort((l,c)=>Date.parse(c.startedAt??c.scheduledFor)-Date.parse(l.startedAt??l.scheduledFor)).map(l=>({id:l.sessionId,running:l.status==="running"||l.status==="queued",label:Ze(l.startedAt??l.scheduledFor,s.get(o))+" - "+a}))}}).filter(o=>o.sessions.length>0)}function bn(e){return e==="active"?"pause":"resume"}function $t(e){return e.map(n=>({id:n.id,name:n.name,status:n.status,...n.nextRunAt===void 0?{}:{nextRunAt:n.nextRunAt}}))}function Kt(e,n,t){if(e===void 0||e==="")return!1;let s=n.has(e);return t==="only"?s:t==="show"?!0:!s}function wn(e,n){return e==null||e===""||!e.startsWith(We)?!1:!(n??[]).some(t=>t.sessionId===e)}function jt(e){let n=new Set;for(let t of e??[]){let s=t.sessionId;typeof s=="string"&&s!==""&&n.add(s)}return n}var pr=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}/;function Jn(e,n,t=new Set){if(e.startsWith(We)||t.has(e))return!0;let s=String(n?.title??n?.displayTitle??"");return pr.test(s)}function _t(e,n=new Set){if(e===void 0||e.blank===!0||e.origin==="im"||e.origin==="subagent")return!1;let t=e.id??"";return!(t.startsWith("im:")||Jn(t,e,n))}function qt(e,n,t,s=new Set){let r=e.byId??{},i=new Set(n?.archivedSessionIds??[]),o=new Set,a=[];for(let c of n?.items??[]){let y=(c.sessionIds??[]).map(m=>r[m]).filter(m=>m!==void 0&&m.id!==void 0&&_t(m,s)&&!i.has(m.id));for(let m of y)m.id!==void 0&&o.add(m.id);y.length>0&&a.push({id:c.workspaceId??c.id??c.path??c.title??"workspace",label:c.title||c.path||t,sessions:y})}let l=(e.ids??[]).map(c=>r[c]).filter(c=>c!==void 0&&c.id!==void 0&&!o.has(c.id)&&_t(c,s)&&!i.has(c.id));return l.length>0&&a.push({id:"",label:t,sessions:l}),a}function Zt(e){return e==="channels"||e==="schedule"||e==="tasks"?e:"tasks"}function Xt(e,n){let t=e??"",s=n??"";return s!==""&&t!==s}function Jt(e){let n=["tasks"];for(let t of e.extraTabIds)t===""||t==="tasks"||t==="schedule"||n.includes(t)||n.push(t);return e.channelsReady&&!n.includes("channels")&&n.push("channels"),n.push("schedule"),n}function Yt(e){return e.extraTabIds.includes(e.tab)?e.tab:e.tab==="channels"&&e.channelsReady?"channels":"tasks"}function Qt(e,n){if(!(e==null||e===""))return(n!==void 0?n.has(e):e.startsWith(We))?"schedule":e.startsWith("im:")?"channels":"tasks"}function mr(e){return/dsh-codex-ui|michengai-codex-ui|michengai\.codexUi|codex-ui/i.test(String(e??""))}function fr(e){let n=e;return String(n?.options?.locale??n?.options?.id??n?.options?.name??n?.options?.registrant??n?.component?.displayName??n?.component?.name??n?.id??n?.name??"")}function es(e){return(e??[]).some(n=>mr(fr(n)))}var zt=new WeakMap,Gt=new WeakMap;function ns(e){return e.size===0?"":[...e].sort().join("\0")}function ts(e,n=new Set){let t=e??{ids:[],byId:{}},s=ns(n);if(typeof t=="object"&&t!==null){let a=zt.get(t);if(a!==void 0&&a.key===s)return a.result}let r=(t.ids??[]).filter(a=>{let l=String(a);return!l.startsWith("im:")&&!Jn(l,t.byId?.[l],n)}),o=r.length===(t.ids??[]).length?t:{...t,ids:r,byId:Object.fromEntries(r.map(a=>[a,t.byId?.[a]]).filter(a=>a[1]!==void 0))};return typeof t=="object"&&t!==null&&zt.set(t,{key:s,result:o}),o}function Xe(e){let n=e?.byId??{};for(let[t,s]of Object.entries(n))if((s?.retainedBy?.mainView??0)>0){let r=s.id?.trim();return r!==void 0&&r!==""?r:t}return null}function hr(e){if(e===null||typeof e!="object")return;let n=e.openSession;if(typeof n=="function")return{openSession:t=>{n.call(e,t)}}}function ss(e){let n=hr(yn(e,"uiWorkspace"));return{...n===void 0?{}:{uiWorkspace:n}}}function os(e){return typeof e.uiWorkspace?.openSession=="function"}function rs(e,n){if(typeof e.uiWorkspace?.openSession=="function"){e.uiWorkspace.openSession(n);return}throw new Error("no client session opener")}function Vt(e,n,t){if(e==="")return!1;let s=e.startsWith(We)||e.startsWith("im:")?[n,t]:[t,n];for(let r of s)if(typeof r=="function")try{return r(e),!0}catch{}return!1}async function is(e){let n=e.id.trim();return n===""?!1:(await e.adopt?.(n).catch(()=>{}),!(e.listed?.(n)===!0)&&e.refresh!==void 0&&await e.refresh().catch(()=>{}),Vt(n,e.openRuntime,e.openHost)?!0:(e.refresh!==void 0&&await e.refresh().catch(()=>{}),Vt(n,e.openRuntime,e.openHost)))}function gr(e,n=new Set){return e.startsWith("im:")||Jn(e,void 0,n)}function as(e,n=new Set){let t=e??{items:[],archivedSessionIds:[]},s=ns(n);if(typeof t=="object"&&t!==null){let a=Gt.get(t);if(a!==void 0&&a.key===s)return a.result}let r=!1,i=(t.items??[]).map(a=>{let l=(a.sessionIds??[]).filter(c=>!gr(String(c),n));return l.length!==(a.sessionIds??[]).length?(r=!0,{...a,sessionIds:l}):a}),o=r?{...t,items:i}:t;return typeof t=="object"&&t!==null&&Gt.set(t,{key:s,result:o}),o}function ds(e){return e==null||typeof e!="function"&&typeof e!="object"?{}:e}function yr(e){return ds(e).__dshAutomationWrapped===!0}function ls(e){let n=new Set,t=e;for(;t!=null&&!n.has(t);){n.add(t);let s=ds(t),r=s.__dshAutomationOriginal??s.__imConnectOriginal;if(r!==void 0&&r!==t){t=r;continue}return s.__dshAutomationWrapped===!0||s.__imConnectWrapped===!0?void 0:t}}function vr(e){let n=e,t=String(n?.options?.id??""),s=String(n?.component?.displayName??n?.component?.name??"");return t==="dsh-automation-native-switcher"||t==="dsh-automation-wrap-bump"||s==="AutomationNativeWorkspaceShell"||s==="AutomationWrapBump"||yr(n?.component)}function cs(e){for(let n of e)if(n?.component!==void 0&&!vr(n))return n}function Fe(e){return e.replace(/\\/g,"/").replace(/\/+$/,"")}function Ut(e,n){let t=Fe(e),s,r=-1;for(let i of n){let o=Fe(i);o.length>r&&t!==o&&t.startsWith(`${o}/`)&&(s=i,r=o.length)}return s}function us(e,n,t){let s=new Map;for(let u of n)for(let g of u.sessionIds??[])s.set(g,u);let r=new Map,i=[];for(let u of e){let g=u.id===void 0?void 0:s.get(u.id),h=g?.workspaceId??g?.id??g?.path;if(g===void 0||h===void 0||h===""){i.push(u);continue}let S=r.get(h)??[];S.push(u),r.set(h,S)}let o=new Map;for(let u of n)u.path!==void 0&&u.path!==""&&o.set(Fe(u.path),u);let a=new Map;for(let u of n){let g=u.workspaceId??u.id??u.path;if(g===void 0||g===""||!r.has(g))continue;a.set(g,u);let h=u.path,S=new Set;for(;h!==void 0&&h!==""&&!S.has(h);){S.add(h);let R=Ut(h,[...o.keys()]);if(R===void 0)break;let L=o.get(Fe(R)),H=L?.workspaceId??L?.id??L?.path;if(L===void 0||H===void 0||H==="")break;a.set(H,L),h=L.path}}let l=[...a.values()],c=l.map(u=>u.path).filter(u=>u!==void 0&&u!==""),y=u=>u.workspaceId??u.id??u.path??"",m=new Map,T=[];for(let u of l){let g=u.path===void 0?void 0:Ut(u.path,c),h=g===void 0?void 0:l.find(R=>R.path!==void 0&&Fe(R.path)===Fe(g)),S=h===void 0?void 0:y(h);if(h===void 0||S===void 0||S==="")T.push(u);else{let R=m.get(S)??[];R.push(u),m.set(S,R)}}let A=(u,g)=>(u.title||u.path||"").localeCompare(g.title||g.path||""),f=[],p=(u,g)=>{let h=y(u),S=r.get(h)??[];f.push({id:h,name:u.title||u.path||t,depth:g,keep:S.length===0,sessions:S});for(let R of(m.get(h)??[]).sort(A))p(R,g+1)};for(let u of T.sort(A))p(u,0);return i.length>0&&f.push({id:"",name:t,depth:0,sessions:i}),f}function ps(e,n,t,s="workspace"){let r=n.trim().toLocaleLowerCase(),i=e.map(o=>{if(r===""||o.name.toLocaleLowerCase().includes(r))return o;let a=o.sessions.filter(l=>`${l.title??""} ${l.label??""}`.toLocaleLowerCase().includes(r));return{...o,sessions:a}}).filter(o=>o.sessions.length>0||r===""&&o.keep===!0||r!==""&&o.name.toLocaleLowerCase().includes(r));if(s==="list"){let o=i.flatMap(a=>[...a.sessions]);return t==="time"&&o.sort((a,l)=>Zn(l)-Zn(a)),o.length===0?[]:[{...i[0],name:"",sessions:o}]}return s==="workspace-tree"||t==="manual"?i:[...i].sort((o,a)=>Bt(a)-Bt(o))}function Zn(e){let n=Date.parse(e.updatedAt??"");return Number.isFinite(n)?n:0}function Bt(e){let n=0;for(let t of e.sessions){let s=Zn(t);s>n&&(n=s)}return n}var ie=require("react/jsx-runtime");function Je({children:e,...n}){return(0,ie.jsx)("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:e})}function Sn(e){return(0,ie.jsx)(Je,{...e,children:(0,ie.jsx)("path",{d:"M12 5v14M5 12h14"})})}function ms(e){return(0,ie.jsxs)(Je,{...e,children:[(0,ie.jsx)("path",{d:"M19 7v5h-5"}),(0,ie.jsx)("path",{d:"M18.1 15.5A7.5 7.5 0 1 1 19 12"})]})}function fs(e){return(0,ie.jsxs)(Je,{...e,children:[(0,ie.jsx)("rect",{x:"4",y:"5.5",width:"16",height:"14",rx:"2"}),(0,ie.jsx)("path",{d:"M8 3.8v3.4M16 3.8v3.4M4 9.5h16"})]})}function hs(e){return(0,ie.jsxs)(Je,{...e,children:[(0,ie.jsx)("circle",{cx:"12",cy:"12",r:"8.25"}),(0,ie.jsx)("path",{d:"M12 10.4V16"}),(0,ie.jsx)("path",{d:"M12 7.6h.01"})]})}function gs(e){return(0,ie.jsx)(Je,{...e,children:(0,ie.jsx)("path",{d:"M5.5 6.5h13v9.2H9.2L5.5 18.8V6.5Z"})})}function ys(e){return(0,ie.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":"true",focusable:"false",...e,children:(0,ie.jsx)("path",{fill:"currentColor",d:"M8 0a8 8 0 0 0-2.53 15.59c.4.074.547-.173.547-.385 0-.19-.007-.693-.01-1.36-2.226.484-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.726-.496.055-.486.055-.486.803.056 1.225.824 1.225.824.714 1.223 1.872.87 2.328.665.072-.517.28-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.956 0-.874.31-1.588.823-2.148-.083-.202-.357-1.017.078-2.12 0 0 .672-.215 2.2.82A7.65 7.65 0 0 1 8 4.8c.68.003 1.365.092 2.004.27 1.527-1.035 2.197-.82 2.197-.82.437 1.103.162 1.918.08 2.12.513.56.822 1.274.822 2.148 0 3.076-1.872 3.752-3.654 3.95.288.248.544.735.544 1.482 0 1.07-.01 1.932-.01 2.195 0 .214.144.463.55.384A8.001 8.001 0 0 0 8 0Z"})})}function vs(e){return(0,ie.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",...e,children:(0,ie.jsx)("path",{d:"M9.5 2.5 13.5 6.5 6 14H2v-4z"})})}var Pe=require("react"),br=dn(require("@deepseek-ai/dsh-client-ui-primitives"),1);function xn(e,n){return function(s){return e(s)??n(s)}}function Y(e,...n){for(let t of n){let s=e[t];if(typeof s=="function")return s}return function(){return null}}var Q=br;function wr(){return(0,Pe.createElement)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none","aria-hidden":!0},(0,Pe.createElement)("path",{d:"M3 3h4v3H3V3Zm6 1h4M3 10h4v3H3v-3Zm6 1.5h4M7 4.5h2M7 11.5h2",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round"}))}function Sr(){return(0,Pe.createElement)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none","aria-hidden":!0},(0,Pe.createElement)("path",{d:"M3 4h10M3 8h10M3 12h10",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round"}))}function xr(){return(0,Pe.createElement)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none","aria-hidden":!0},(0,Pe.createElement)("path",{d:"M3 6.5h10v6H3v-6Zm1.2-2.5h7.6L13 6.5H3L4.2 4Zm2.3 5.2 1.3 1.3 2.6-2.6",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round"}))}var Ye=Y(Q,"IconEllipsisOutlineRegular"),bs=Y(Q,"IconSettingsOutlineRegular"),_e=Y(Q,"IconArchiveOutlineRegular"),ws=Y(Q,"IconBranchOutlineRegular"),Ss=Y(Q,"IconEditOutlineRegular"),Yn=Y(Q,"IconTrashOutlineRegular"),Mi=Y(Q,"IconCheckOutlineRegular"),Li=Y(Q,"IconChevronDownOutlineRegular"),Pi=Y(Q,"IconListPenOutlineRegular"),xs=Y(Q,"IconSearchOutlineRegular"),ks=Y(Q,"IconCloseFillRegular"),kn=Y(Q,"IconSlidersTwoOutlineRegular"),ze=Y(Q,"IconFolderCloseRegular"),Ts=Y(Q,"IconFolderOpenRegular"),As=Y(Q,"IconTriangleRightFillRegular"),Qn=Y(Q,"IconUnarchiveOutlineRegular"),Tn=xn(Y(Q,"IconWorkspaceTreeOutlineRegular"),wr),Ge=xn(Y(Q,"IconFlatListOutlineRegular"),Sr),Di=Y(Q,"IconChevronsUpDownOutlineRegular"),Ie=Y(Q,"IconClockOutlineRegular"),Is=Y(Q,"IconCopyOutlineRegular"),Cs=Y(Q,"IconArchiveOffOutlineRegular"),Ns=xn(Y(Q,"IconArchiveCheckOutlineRegular"),xr);var le=require("@deepseek-ai/dsh-client-ui-primitives");var et=dn(require("react"),1),Rs=require("@deepseek-ai/dsh-client-ui-primitives"),nt={width:22,minWidth:22,height:22,padding:0,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--dsw-radius-sm, 8px)"},Es=et.default.forwardRef(function(n,t){let{className:s,rows:r,...i}=n;return et.default.createElement("textarea",{...i,ref:t,className:["dsh-st-textarea",s].filter(Boolean).join(" "),rows:r||4})}),Ve=Rs.Input;function An(e,n){let t=e.target;if(!(t instanceof Element)||t.getAttribute("aria-hidden")!=="true")return;let s=t.parentElement?.querySelector('[role="dialog"]');!(s instanceof HTMLElement)||!s.classList.contains(n)||e.stopPropagation()}var ue=dn(require("react"),1),In=require("@deepseek-ai/dsh-client-ui-primitives");function tt(e){return{id:e.value,label:e.label,...e.disabled!==void 0?{disabled:e.disabled}:{},...e.danger!==void 0?{danger:e.danger}:{}}}function he(e){let[n,t]=ue.useState(!1),s=ue.useRef(null),r=e.options??[];ue.useEffect(()=>{if(!n)return;let c=s.current?.getBoundingClientRect().width??0;return c>0&&document.documentElement.style.setProperty("--dsh-st-menu-width",`${Math.round(c)}px`),()=>{document.documentElement.style.removeProperty("--dsh-st-menu-width")}},[n]),ue.useEffect(()=>{if(!n||typeof window>"u")return;let c=y=>{y.key==="Escape"&&(y.stopPropagation(),t(!1))};return window.addEventListener("keydown",c,!0),()=>{window.removeEventListener("keydown",c,!0)}},[n]);let i=ue.useMemo(()=>e.groups!==void 0&&e.groups.length>0?e.groups.flatMap(c=>[{type:"label",id:`label-${c.id}`,text:c.label},...c.options.map(tt)]):r.map(tt),[r,e.groups]),o=e.footer?.map(tt),a=r.find(c=>c.value===e.value)??e.groups?.flatMap(c=>[...c.options]).find(c=>c.value===e.value),l=a?a.label:e.placeholder??e.label??"";return ue.createElement("div",{ref:s,className:["dsh-st-menu-select-wrap",e.compact===!0?"is-compact":"",e.className].filter(Boolean).join(" ")},ue.createElement(In.Menu,{open:n,onClose:()=>{t(!1)},onSelect:c=>{if(e.footer?.some(y=>y.value===c)===!0){e.onFooter?.(c),t(!1);return}e.onChange(c),t(!1)},selectedId:e.value,align:"start",portal:!0,dense:!0,listClassName:["dsh-st-form-menu",e.listClassName].filter(Boolean).join(" "),...o!==void 0?{footer:o}:{},anchor:ue.createElement(In.Button,{variant:"outline",...e.compact===!0?{size:"sm"}:{},role:"combobox","aria-label":e.label??(typeof l=="string"?l:a?.text)??e.placeholder??"","aria-expanded":n,disabled:e.disabled,className:["dsh-st-menu-select-trigger",n?"is-open":""].filter(Boolean).join(" "),onClick:()=>{e.disabled||t(c=>!c)}},ue.createElement("span",{className:"dsh-st-menu-select-label"},l),ue.createElement("svg",{className:"dsh-st-menu-select-arrow",viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:4,transition:"transform 150ms ease",transform:n?"rotate(180deg)":"none"}},ue.createElement("path",{d:"m4 6 4 4 4-4"}))),items:i}))}var me=require("react");var kr=new Map([["read-only",["permission.readOnly","Read Only"]],["workspace-write",["permission.workspaceWrite","Workspace Write"]],["danger-full-access",["permission.fullAccess","Full access"]]]);function Ms(e,n){let t=kr.get(e.value);return t!==void 0&&(e.name===e.value||e.name===t[1])?n(t[0]):e.name||e.value}function Ls(e,n){return e!==n&&n==="danger-full-access"}var be=require("@deepseek-ai/dsh-client-ui-primitives");var b=require("react/jsx-runtime");function Tr(e,n,t,s){if(e==="deepseek-account"){let r=t("provider.account");return r&&r!=="provider.account"?r:s("form.providerAccount")}return n}function Ar(e,n){return(e==="deepseek-account"?0:e==="deepseek-official"?1:2)-(n==="deepseek-account"?0:n==="deepseek-official"?1:2)}function Ir(e){return(e.provider==="deepseek-account"||e.provider==="deepseek-official")&&e.model==="deepseek-flash"?(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,b.jsx)("span",{children:e.label}),(0,b.jsx)(be.Tag,{tone:"info",children:"1017"})]}):e.label}var Cr=[1,2,3,4,5,6,7],Nr=["once","interval","hourly","daily","weekly","monthly","custom"],Rr=Array.from({length:24},(e,n)=>String(n).padStart(2,"0")),Os=Array.from({length:60},(e,n)=>String(n).padStart(2,"0"));function Hs({t:e,permissionT:n,modelT:t,busy:s,workspaces:r,models:i,modelFailures:o,defaultModel:a,skills:l,permissions:c,defaultPermission:y,draft:m,editing:T,onClose:A,onSubmit:f,onAddWorkspace:p}){let[u,g]=(0,me.useState)(()=>({...Kn(new Date,r,a,y),...m})),[h,S]=(0,me.useState)(),[R,L]=(0,me.useState)(),[H,ae]=(0,me.useState)(!1),[de,W]=(0,me.useState)(!1),[se,K]=(0,me.useState)(0),[O,z]=(0,me.useState)(0),[_,oe]=(0,me.useState)(),pe=(0,me.useRef)(null),U=(0,me.useRef)(0);(0,me.useEffect)(()=>{let d=B=>{if(B.key==="Escape"&&document.querySelector('[role="menu"]')===null){if(B.preventDefault(),B.stopPropagation(),B.stopImmediatePropagation(),R!==void 0){ae(!1),L(void 0);return}A()}},I=B=>{An(B,"dsh-st-create-dialog")};return window.addEventListener("keydown",d,!0),document.addEventListener("click",I,!0),()=>{window.removeEventListener("keydown",d,!0),document.removeEventListener("click",I,!0)}},[R,A]);let M=d=>{g(I=>({...I,...d})),S(void 0)},G=r.some(d=>d.id===u.workspaceId),x=async()=>{if(!(p===void 0||de)){W(!0),S(void 0),document.activeElement instanceof HTMLElement&&document.activeElement.blur();try{let d=await p();d!==void 0&&M({workspaceId:d})}catch(d){d instanceof qe?S(e("form.workspaceUnavailable")):d instanceof Error&&d.message!==""?S(d.message):S(e("form.addWorkspaceFailed"))}finally{W(!1)}}},V=d=>{if(Ls(u.permission,d)){ae(!1),L(d);return}M({permission:d})},q=async d=>{d?.preventDefault();try{await f(u)}catch(I){if(I instanceof ce){S(e(I.key));return}S(I instanceof Error?I.message:e("error.action"))}},ne=u.onceAt.slice(0,10),te=u.onceAt.slice(11,16)||"09:00",fe=Er(new Date),ge=i.find(d=>`${d.provider}::${d.model}`===u.modelKey)?.reasoning,J=$n(u.prompt,se),re=J===void 0||_===J.query?[]:Tt(l,J.query),ye=Math.min(O,Math.max(re.length-1,0)),we=d=>{U.current=d,K(d)};(0,me.useEffect)(()=>{let d=document.querySelector('.dsh-st-skill-menu [aria-selected="true"]');d instanceof HTMLElement&&d.scrollIntoView({block:"nearest"})},[ye,J?.query]);let k=d=>{let I=At(u.prompt,U.current,un(d));M({prompt:I.text}),oe(void 0),queueMicrotask(()=>{let B=pe.current;B!=null&&(B.focus(),B.setSelectionRange(I.caret,I.caret),we(I.caret))})};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(be.Modal,{open:!0,className:"dsh-st-create-dialog",title:e(T===!0?"modal.edit":"modal.title"),closeLabel:e("form.cancel"),onClose:A,footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(be.Button,{variant:"outline",className:"dsh-st-modal-action",disabled:s,onClick:A,children:e("form.cancel")}),(0,b.jsx)(be.Button,{variant:"primary",className:"dsh-st-modal-action",type:"submit",form:"dsh-st-create-form",disabled:s||de||!G,children:e("modal.save")})]}),children:(0,b.jsxs)("form",{id:"dsh-st-create-form",className:"dsh-st-form",onSubmit:d=>{q(d)},children:[(0,b.jsx)("p",{children:e("form.subtitle")}),(0,b.jsxs)("label",{className:"dsh-st-field",children:[e("form.name"),(0,b.jsx)(Ve,{value:u.name,placeholder:e("form.namePlaceholder"),onChange:d=>M({name:d.target.value})})]}),(0,b.jsxs)("div",{className:"dsh-st-plan-row",children:[(0,b.jsxs)("div",{className:"dsh-st-field",children:[e("form.planTime"),(0,b.jsxs)("div",{className:"dsh-st-inline",children:[(0,b.jsx)(he,{value:u.scheduleKind,options:Nr.map(d=>({value:d,label:e(`form.${d}`)})),onChange:d=>M({scheduleKind:d})}),u.scheduleKind==="once"&&(0,b.jsx)(Ve,{type:"date",min:fe,value:ne,onChange:d=>M({onceAt:Ds(`${d.target.value}T${te}`)})}),(u.scheduleKind==="once"||u.scheduleKind==="daily"||u.scheduleKind==="weekly"||u.scheduleKind==="monthly")&&(0,b.jsx)(Ps,{value:u.scheduleKind==="once"?te:u.time,onChange:d=>{u.scheduleKind==="once"?M({onceAt:Ds(`${ne}T${d}`)}):M({time:d})}}),u.scheduleKind==="interval"&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"dsh-st-suffix",children:e("form.every")}),(0,b.jsxs)("span",{className:"dsh-st-amount",children:[(0,b.jsx)(Ve,{type:"number",min:1,value:u.everyMinutes,onChange:d=>M({everyMinutes:d.target.value})}),(0,b.jsx)("span",{className:"dsh-st-suffix",children:e("form.minutes")})]})]}),u.scheduleKind==="hourly"&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(he,{value:u.hourlyMinute,options:Os.map(d=>({value:d,label:d})),onChange:d=>M({hourlyMinute:d})}),(0,b.jsx)("span",{className:"dsh-st-suffix",children:e("form.minutesShort")})]}),u.scheduleKind==="monthly"&&(0,b.jsx)(he,{value:u.monthDay,options:Array.from({length:31},(d,I)=>{let B=String(I+1);return{value:B,label:e("form.monthDay",{day:B})}}),onChange:d=>M({monthDay:d})}),u.scheduleKind==="custom"&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"dsh-st-suffix",children:e("form.every")}),(0,b.jsxs)("span",{className:"dsh-st-amount",children:[(0,b.jsx)(Ve,{type:"number",min:1,value:u.customDays,onChange:d=>M({customDays:d.target.value})}),(0,b.jsx)("span",{className:"dsh-st-suffix",children:e("form.daysShort")})]}),(0,b.jsx)("span",{className:"dsh-st-suffix",children:e("form.atTime")}),(0,b.jsx)(Ps,{value:u.time,onChange:d=>M({time:d})})]})]}),u.scheduleKind==="interval"&&(0,b.jsx)("span",{className:"dsh-st-plan-hint",children:e("form.intervalHint")}),u.scheduleKind==="custom"&&(0,b.jsx)("span",{className:"dsh-st-plan-hint",children:e("form.customHint")})]}),(0,b.jsxs)("label",{className:"dsh-st-field dsh-st-concurrency",title:e("form.maxConcurrentRunsHint"),children:[e("form.maxConcurrentRuns"),(0,b.jsx)(Ve,{type:"number",min:1,step:1,value:u.maxConcurrentRuns,onChange:d=>M({maxConcurrentRuns:d.target.value})})]})]}),u.scheduleKind==="weekly"&&(0,b.jsx)("div",{className:"dsh-st-weekdays",children:Cr.map(d=>(0,b.jsx)(be.Checkbox,{checked:u.weekdays.includes(d),label:e(`day.${d}`),onChange:I=>M({weekdays:I?[...u.weekdays,d]:u.weekdays.filter(B=>B!==d)})},d))}),(0,b.jsxs)("div",{className:"dsh-st-settings",children:[(0,b.jsxs)("label",{className:"dsh-st-picker-field",children:[(0,b.jsx)("span",{children:e("form.fieldWorkspace")}),r.length===0?(0,b.jsxs)("div",{className:"dsh-st-workspace-empty",children:[(0,b.jsx)(be.Button,{variant:"primary",icon:(0,b.jsx)(Sn,{width:14,height:14}),disabled:de,onClick:()=>{x()},children:e("form.addWorkspace")}),(0,b.jsx)("span",{className:"dsh-st-workspace-note",children:e("form.workspaceRequired")})]}):(0,b.jsx)(he,{value:u.workspaceId,label:e("form.fieldWorkspace"),placeholder:e("form.workspace"),options:r.map(d=>({value:d.id,label:d.title})),footer:[{value:"add-workspace",label:e("form.addWorkspace"),disabled:de}],onFooter:()=>{x()},onChange:d=>M({workspaceId:d})})]}),(0,b.jsxs)("label",{className:"dsh-st-picker-field",children:[(0,b.jsx)("span",{children:e("form.fieldModel")}),(0,b.jsx)(he,{value:u.modelKey,label:e("form.fieldModel"),groups:Array.from(i.reduce((d,I)=>{let B=Tr(I.provider,I.providerLabel,t,e),Ce=d.get(I.provider)??{label:B,options:[]};return Ce.options.push({value:`${I.provider}::${I.model}`,label:Ir(I),text:I.label}),d.set(I.provider,Ce),d},new Map)).sort(([d],[I])=>Ar(d,I)).map(([d,I])=>({id:d,label:I.label,options:I.options})),onChange:d=>{let I=i.find(B=>`${B.provider}::${B.model}`===d);M({modelKey:d,reasoningEffort:I?.reasoning?.defaultEffort??"none"})}})]}),(0,b.jsxs)("label",{className:"dsh-st-picker-field",children:[(0,b.jsx)("span",{children:e("form.fieldEffort")}),(0,b.jsx)(he,{disabled:ge===void 0,value:ge===void 0?"":u.reasoningEffort,label:e("form.fieldEffort"),placeholder:t("effort.providerDefault"),options:ge===void 0?[]:[...ge.defaultEffort===void 0?[{value:"none",label:t("effort.providerDefault")}]:[],...ge.efforts.map(d=>({value:d.id,label:d.name}))],onChange:d=>M({reasoningEffort:d})})]}),(0,b.jsxs)("label",{className:"dsh-st-picker-field",children:[(0,b.jsx)("span",{children:e("form.fieldPermission")}),(0,b.jsx)(he,{value:u.permission,options:c.map(d=>({value:d.value,label:Ms(d,e)})),onChange:d=>V(d)})]})]}),(0,b.jsxs)("div",{className:"dsh-st-field",children:[(0,b.jsxs)("span",{className:"dsh-st-prompt-label",children:[e("form.prompt"),(0,b.jsx)("em",{children:e("form.slashHint")})]}),(0,b.jsxs)("div",{className:"dsh-st-prompt-anchor",children:[J!==void 0&&_!==J.query&&(0,b.jsx)("div",{className:"dsh-st-skill-menu",role:"listbox",children:re.length===0?(0,b.jsx)("p",{children:e("form.slashEmpty")}):re.map((d,I)=>(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":I===ye,onMouseDown:B=>B.preventDefault(),onClick:()=>k(d),children:[(0,b.jsx)("span",{children:d.name}),(0,b.jsx)("code",{children:un(d)})]},d.id))}),(0,b.jsxs)("div",{className:"dsh-st-prompt-card",children:[(0,b.jsx)("div",{className:"dsh-st-prompt-backdrop","aria-hidden":"true",children:It(u.prompt,l).map((d,I)=>d.kind==="skill"?(0,b.jsx)("span",{className:"dsh-st-skill-token",children:d.text},I):(0,b.jsx)("span",{children:d.text},I))}),(0,b.jsx)(Es,{ref:pe,spellCheck:!1,className:"dsh-st-prompt-input",value:u.prompt,placeholder:e("form.promptPlaceholder"),rows:4,onChange:d=>{we(d.target.selectionStart),M({prompt:d.target.value}),oe(void 0)},onSelect:d=>we(d.currentTarget.selectionStart),onScroll:d=>{let I=d.currentTarget.closest(".dsh-st-prompt-card")?.querySelector(".dsh-st-prompt-backdrop");I instanceof HTMLElement&&(I.scrollTop=d.currentTarget.scrollTop)},onKeyDown:d=>{if(J!==void 0){if(d.key==="Escape"){d.preventDefault(),oe(J.query);return}if(re.length!==0){if(d.key==="ArrowDown")d.preventDefault(),z(I=>(Math.min(I,re.length-1)+1)%re.length);else if(d.key==="ArrowUp")d.preventDefault(),z(I=>(Math.min(I,re.length-1)+re.length-1)%re.length);else if(d.key==="Enter"||d.key==="Tab"){d.preventDefault();let I=re[ye];I!==void 0&&k(I)}}}}})]})]})]}),o.map(d=>(0,b.jsx)("p",{className:"dsh-st-error",children:t("warning.groupLoad",{name:d.providerLabel,message:d.message})},d.provider)),h!==void 0&&(0,b.jsx)("p",{className:"dsh-st-error",children:h})]})}),(0,b.jsx)(be.RiskConfirmation,{open:R!==void 0,title:n("confirm.title"),description:n("confirm.description"),acknowledgeLabel:n("confirm.acknowledge"),cancelLabel:n("confirm.cancel"),closeLabel:n("confirm.cancel"),confirmLabel:n("confirm.enable"),acknowledged:H,onAcknowledgedChange:ae,onCancel:()=>{ae(!1),L(void 0)},onConfirm:()=>{!H||R===void 0||(M({permission:R}),ae(!1),L(void 0))}})]})}function Ps({value:e,onChange:n}){let[t,s]=e.split(":");return(0,b.jsxs)("span",{className:"dsh-st-time",children:[(0,b.jsx)(he,{value:t,options:Rr.map(r=>({value:r,label:r})),onChange:r=>n(`${r}:${s}`)}),(0,b.jsx)("span",{className:"dsh-st-time-sep",children:":"}),(0,b.jsx)(he,{value:s,options:Os.map(r=>({value:r,label:r})),onChange:r=>n(`${t}:${r}`)})]})}function Er(e){let n=e.getTimezoneOffset()*6e4;return new Date(e.getTime()-n).toISOString().slice(0,10)}function Ds(e){let n=new Date(e),t=new Date;if(!Number.isFinite(n.getTime())||n.getTime()>t.getTime())return e;let s=new Date(t.getTime()+6e4);s.setSeconds(0,0);let r=s.getTimezoneOffset()*6e4;return new Date(s.getTime()-r).toISOString().slice(0,16)}var Fs=require("react"),Qe=require("@deepseek-ai/dsh-client-ui-primitives");var Re=require("react/jsx-runtime");function Ws({target:e,t:n,busy:t,onCancel:s,onConfirm:r}){return(0,Fs.useEffect)(()=>{if(e===void 0)return;let i=a=>{a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation(),s())},o=a=>{An(a,"dsh-st-delete-dialog")};return window.addEventListener("keydown",i,!0),document.addEventListener("click",o,!0),()=>{window.removeEventListener("keydown",i,!0),document.removeEventListener("click",o,!0)}},[s,e]),(0,Re.jsx)(Qe.Modal,{open:e!==void 0,className:"dsh-st-delete-dialog",title:n("card.confirmDelete"),...e===void 0?{}:{description:`${e.name} ${n("card.confirmDeleteHint")}`},closeLabel:n("card.cancel"),onClose:s,footer:(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(Qe.Button,{variant:"outline",className:"dsh-st-modal-action",disabled:t,onClick:s,children:n("card.cancel")}),(0,Re.jsx)(Qe.Button,{variant:"outline",className:"dsh-st-modal-action dsh-st-btn-danger",disabled:t,onClick:r,children:n("card.confirm")})]})})}var en=null,st=new Set;function _s(e){en=e;for(let n of[...st])n(en)}function ot(){let e=en;return en=null,e}function zs(){return en}function Gs(e){return st.add(e),()=>{st.delete(e)}}function Vs(e){let n=document.querySelector("[data-composer-seat] textarea");return n instanceof HTMLTextAreaElement?(Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value")?.set?.call(n,e),n.dispatchEvent(new InputEvent("input",{bubbles:!0})),n.focus(),!0):!1}function nn(e){if(typeof e!="object"||e===null||!("ok"in e))throw new Error("\u81EA\u52A8\u5316\u4E3B\u673A\u8FD4\u56DE\u4E86\u65E0\u6548\u54CD\u5E94\u3002");let n=e;if(n.ok===!0&&"value"in n)return n.value;if(n.ok===!1&&"error"in n){let t=n.error;throw new Error(t?.message??"\u81EA\u52A8\u5316\u8BF7\u6C42\u5931\u8D25\u3002")}throw new Error("\u81EA\u52A8\u5316\u4E3B\u673A\u8FD4\u56DE\u4E86\u65E0\u6548\u54CD\u5E94\u3002")}var tn="/dsh-automation",Bs=15e3,Mr=2e3,$s=[1,2,4],Us=$s.length+1,Lr=5*60*1e3,Pr=24*60*60*1e3;function Dr(e){return(e??[]).some(n=>n.status==="running"||n.status==="queued")?Mr:Bs}function rt(e,n){return n>0?Dr(e):Bs}function it(e){let n=e instanceof Error?e.message:String(e);return/failed to fetch|networkerror|load failed|network request failed/i.test(n)}function Or(e,n){let t=Date.parse(n),r=(Number.isFinite(t)?t:Date.now())-Pr;return[...new Set(e.filter(i=>{if(i.status==="queued"||i.status==="running")return!0;let o=Date.parse(i.finishedAt??i.startedAt??i.scheduledFor);return Number.isFinite(o)&&o>=r}).map(i=>i.sessionId).filter(i=>i!==void 0&&i!==""))].sort()}function Ks(e,n,t={}){let s=!1,r=0,i=e.source.getSnapshot().phase==="loading",o,a,l=0,c=0,y=0,m,T,A=!1,f=h=>{a=h,l=0,c=r,y=0,m=void 0},p=h=>{let S=e.source.getSnapshot().snapshot,R=h?.list?.getSnapshot();if(S===void 0||R===void 0||h?.refresh===void 0)return;let L=new Set([...R.ids??[],...Object.keys(R.byId??{})]);return Or(S.runs,S.serverNow).filter(H=>!L.has(H)).join("\0")},u=()=>{if(s)return;let h=n();h!==o&&(o=h,f());let S=p(h);if(S===void 0)return;if(S===""){f();return}if(S!==a&&f(S),l>=Us){if((t.now??Date.now)()<y)return;f(S)}if(r<c)return;if(T!==void 0){A=!0;return}let R=l;l+=1;let L=$s[R];c=L===void 0?Number.POSITIVE_INFINITY:r+L,l>=Us&&(y=(t.now??Date.now)()+Lr),T=Promise.resolve().then(async()=>{await h.refresh()}).catch(H=>{!s&&m!==S&&(m=S,console.warn("[dsh-automation] \u5237\u65B0 Host \u4F1A\u8BDD\u5217\u8868\u5931\u8D25",H))}).finally(()=>{T=void 0,!(s||!A)&&(A=!1,u())})},g=e.source.subscribe(()=>{e.source.getSnapshot().phase==="loading"?i=!0:i&&(i=!1,r+=1),u()},{background:!0});return u(),()=>{s=!0,A=!1,g()}}function js(e){let n={phase:"idle"},t,s,r=()=>{},i=new Set,o=new Set,a=()=>{if(s!==void 0&&clearInterval(s),i.size===0){s=void 0;return}s=setInterval(()=>{m().catch(()=>{})},rt(n.snapshot?.runs,o.size))},l=()=>{if(r(),o.size===0)return;let f=()=>{m().catch(()=>{})},p=()=>{document.visibilityState==="visible"&&f()};typeof window<"u"&&window.addEventListener("focus",f),typeof document<"u"&&document.addEventListener("visibilitychange",p),r=()=>{typeof window<"u"&&window.removeEventListener("focus",f),typeof document<"u"&&document.removeEventListener("visibilitychange",p),r=()=>{}}},c=f=>{let p=rt(n.snapshot?.runs,o.size);n=f,i.size>0&&p!==rt(n.snapshot?.runs,o.size)&&a();for(let u of[...i])u()},y={getSnapshot:()=>n,subscribe:(f,p={})=>{let u=i.size>0,g=o.size>0;return i.add(f),p.background!==!0&&o.add(f),(!u||p.background!==!0&&!g)&&queueMicrotask(()=>{i.size>0&&m().catch(()=>{})}),a(),o.size>0&&!g&&l(),()=>{i.delete(f),o.delete(f),i.size===0&&s!==void 0?(clearInterval(s),s=void 0):i.size>0&&a(),o.size===0&&r()}}},m=async()=>{if(t!==void 0)return t;let f=n.snapshot;return c(f===void 0?{phase:"loading"}:{phase:"loading",snapshot:f,...n.refreshedAt===void 0?{}:{refreshedAt:n.refreshedAt}}),t=(async()=>{try{let p=await e.call(tn,"snapshot",{sessionId:"settings"}),u=nn(p);c({phase:"ready",snapshot:u,refreshedAt:Date.now()})}catch(p){let u=p instanceof Error?p.message:String(p);throw c(f===void 0?{phase:"error",error:u}:{phase:"error",snapshot:f,error:u,...n.refreshedAt===void 0?{}:{refreshedAt:n.refreshedAt}}),p}finally{t=void 0}})(),t},T=async(f,p)=>{try{return await e.call(tn,f,p)}catch(u){if(!it(u))throw u;return await e.call(tn,f,p)}},A=async(f,p,u)=>{nn(await T(f,p));let g=()=>{u!==void 0&&n.snapshot!==void 0&&c({phase:"ready",snapshot:u(n.snapshot),refreshedAt:Date.now()})},h=t;g(),h!==void 0&&(await h.catch(()=>{}),g());try{await m()}catch{}};return{source:y,refresh:m,async createAutomation(f){await A("create",{sessionId:"settings",input:f})},async mutateAutomation(f,p){await A("mutate",{sessionId:"settings",automationId:f,mutation:p},p==="delete"?g=>({...g,automations:g.automations.filter(h=>h.id!==f)}):g=>({...g,automations:g.automations.map(h=>h.id===f?{...h,status:p==="pause"?"paused":"active"}:h)}))},async updateAutomation(f,p){await A("update",{sessionId:"settings",automationId:f,input:p})},async runNow(f){await A("run-now",{sessionId:"settings",automationId:f})},async markRunRead(f){await A("mark-read",{sessionId:"settings",runId:f})},async registerWorkspace(f){let p=nn(await e.call(tn,"register-workspace",{path:f}));return await m(),p},async adoptSession(f){nn(await e.call(tn,"adopt-session",{sessionId:f}))},async forgetSession(f){await A("forget-session",{sessionId:f},p=>({...p,runs:p.runs.map(u=>{if(u.sessionId!==f)return u;let{sessionId:g,...h}=u;return h})}))},async forgetAutomationSessions(f){await A("forget-automation-sessions",{automationId:f},p=>({...p,runs:p.runs.map(u=>{if(u.automationId!==f)return u;let{sessionId:g,...h}=u;return h})}))}}}var at=require("react"),Ue=require("@deepseek-ai/dsh-client-ui-primitives");var Se=require("react/jsx-runtime"),Hr=[["created","desc"],["created","asc"],["planned","asc"],["planned","desc"]];function Cn({t:e,storage:n,storageKey:t,sortKey:s,sortDirection:r,onSelect:i,iconOnly:o=!1,className:a}){let[l,c]=(0,at.useState)(!1),[y,m]=(0,at.useState)(()=>Ne(n,t)),T=e(s==="planned"?`sort.planned.${r}`:`sort.created.${r}`),A=y?.key===s&&y.direction===r,f=()=>{n===void 0||A||(Pt(n,t,s,r),m({key:s,direction:r}))},p=[...Hr.map(([g,h])=>({id:`${g}-${h}`,label:e(g==="planned"?`sort.planned.${h}`:`sort.created.${h}`)})),...n===void 0?[]:[{type:"separator",id:"sort-default-sep"},{id:"save-default",label:e(A?"sort.default.saved":"sort.default.save")}]],u=o?(0,Se.jsx)(Ue.Tooltip,{label:T,side:"bottom",delayMs:500,disabled:l,portal:!0,children:(0,Se.jsx)("button",{type:"button",className:l?"dsh-st-n-head-btn is-on":"dsh-st-n-head-btn","aria-label":T,"aria-expanded":l,onClick:()=>c(g=>!g),children:(0,Se.jsx)(kn,{size:16})})}):(0,Se.jsxs)(Ue.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":T,"aria-expanded":l,className:["dsh-st-menu-select-trigger",l?"is-open":""].filter(Boolean).join(" "),onClick:()=>c(g=>!g),children:[(0,Se.jsx)("span",{className:"dsh-st-menu-select-label",children:T}),(0,Se.jsx)("svg",{className:"dsh-st-menu-select-arrow",viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:4,transition:"transform 150ms ease",transform:l?"rotate(180deg)":"none"},children:(0,Se.jsx)("path",{d:"m4 6 4 4 4-4"})})]});return(0,Se.jsx)("div",{className:["dsh-st-menu-select-wrap",a].filter(Boolean).join(" "),style:{display:"inline-flex",verticalAlign:"middle"},children:(0,Se.jsx)(Ue.Menu,{open:l,onClose:()=>c(!1),selectedId:`${s}-${r}`,align:o?"end":"start",portal:!0,dense:!0,anchor:u,items:p,onSelect:g=>{if(g==="save-default"){f(),c(!1);return}let[h,S]=g.split("-");i(h,S),c(!1)}})})}var Nn="dsh-automation:open-task-settings",dt="dsh-automation:pending-task-settings";function lt(e){if(typeof e!="object"||e===null)return;let n=e;if(!(typeof n.name!="string"||n.name.trim()===""||!Array.isArray(n.sessionIds)||n.sessionIds.some(t=>typeof t!="string"))&&!(n.automationId!==void 0&&(typeof n.automationId!="string"||n.automationId.trim()==="")))return{...typeof n.automationId=="string"?{automationId:n.automationId}:{},name:n.name,sessionIds:[...n.sessionIds]}}function Fr(e,n){try{e?.setItem(dt,JSON.stringify(n))}catch{}}function ct(e){typeof window>"u"||(Fr(window.sessionStorage,e),window.dispatchEvent(new CustomEvent(Nn,{detail:e})))}function qs(e){if(e!==void 0)try{let n=e.getItem(dt);return n===null?void 0:lt(JSON.parse(n))}catch{return}}function Zs(e){try{e?.removeItem(dt)}catch{}}function Xs(e,n,t){if(e.automationId!==void 0){let a=n.find(l=>l.id===e.automationId);if(a!==void 0)return a}let s=new Set(e.sessionIds),r=t.find(a=>a.sessionId!==void 0&&s.has(a.sessionId))?.automationId,i=n.find(a=>a.id===r);if(i!==void 0)return i;let o=n.filter(a=>a.name===e.name);return o.length===1?o[0]:void 0}var w=require("react/jsx-runtime");var Rn=typeof window>"u"?void 0:window.localStorage,Js=typeof window>"u"?void 0:window.sessionStorage,Wr=[{name:"\u6BCF\u65E5\u56DE\u5F52\u68C0\u67E5",scheduleKind:"daily",time:"09:00",weekdays:[1,2,3,4,5]},{name:"\u6BCF\u5468\u4F9D\u8D56\u5DE1\u68C0",scheduleKind:"weekly",time:"10:00",weekdays:[1]},{name:"\u5DE5\u4F5C\u65E5\u65E9\u62A5",scheduleKind:"weekly",time:"08:00",weekdays:[1,2,3,4,5]}];function Ys({t:e,permissionT:n,modelT:t,runtime:s,closeSettings:r,addWorkspace:i}){let o=(0,ee.useSyncExternalStore)(s.source.subscribe,s.source.getSnapshot,s.source.getSnapshot),[a,l]=(0,ee.useState)("mine"),[c,y]=(0,ee.useState)(""),[m,T]=(0,ee.useState)(!1),[A,f]=(0,ee.useState)(),[p,u]=(0,ee.useState)(),[g,h]=(0,ee.useState)(),[S,R]=(0,ee.useState)(!1),[L,H]=(0,ee.useState)(),[ae,de]=(0,ee.useState)("day"),[W,se]=(0,ee.useState)("all"),[K,O]=(0,ee.useState)("all"),[z,_]=(0,ee.useState)(()=>Ne(Rn,hn)?.key??"created"),[oe,pe]=(0,ee.useState)(()=>Ne(Rn,hn)?.direction??"desc"),[U,M]=(0,ee.useState)(()=>qs(Js)),G=(0,ee.useMemo)(()=>new Date(o.snapshot?.serverNow??Date.now()),[o.snapshot?.serverNow,o.refreshedAt]),x=o.snapshot,V=x?.workspaces??[],q=x?.models??[],ne=x?.permissions??[],te=x?.defaultPermission??"",fe=fn((x?.automations??[]).filter(k=>c.trim()===""||`${k.name} ${k.prompt}`.toLowerCase().includes(c.trim().toLowerCase())),z,oe),xe=(x?.runs??[]).filter(k=>!(W!=="all"&&k.automationId!==W||K!=="all"&&k.status!==K)),ge=Dt(xe,ae,G,e),J=async k=>{R(!0),H(void 0);try{await k()}catch(d){H(d instanceof ce?e(d.key):it(d)?e("error.offline"):d instanceof Error?d.message:e("error.action"))}finally{R(!1)}},re=()=>{T(!1),h(void 0),f(void 0)},ye=k=>{te===""||ne.length===0||(f(void 0),h(k),T(!0))},we=k=>{f(k.id),h(Ot(k,V,x?.defaultModel??null,x?.defaultPermission??k.permission)),T(!0)};return(0,ee.useEffect)(()=>{if(typeof window>"u")return;let k=d=>{let I=lt(d.detail);I!==void 0&&M(I)};return window.addEventListener(Nn,k),()=>{window.removeEventListener(Nn,k)}},[]),(0,ee.useEffect)(()=>{if(U===void 0||x===void 0)return;let k=Xs(U,x.automations,x.runs);if(Zs(Js),M(void 0),l("mine"),y(""),k===void 0){H(e("error.taskMissing"));return}we(k)},[x,U,e]),(0,w.jsxs)("div",{className:"dsh-st-shell",children:[(0,w.jsxs)("header",{className:"dsh-st-top",children:[(0,w.jsxs)("div",{className:"dsh-st-heading",children:[(0,w.jsxs)("div",{className:"dsh-st-heading-row",children:[(0,w.jsx)("h1",{children:e("tab")}),(0,w.jsxs)("div",{className:"dsh-st-heading-links",children:[(0,w.jsx)(le.Button,{variant:"outline",size:"sm","aria-label":e("header.githubProject"),icon:(0,w.jsx)(ys,{}),onClick:()=>{window.open("https://github.com/MichengAI/dsh-automation","_blank","noreferrer")},children:e("header.githubProject")}),(0,w.jsx)(le.Button,{variant:"outline",size:"sm","aria-label":e("header.githubFeedback"),icon:(0,w.jsx)(vs,{}),onClick:()=>{window.open("https://github.com/MichengAI/dsh-automation/issues","_blank","noreferrer")},children:e("header.githubFeedback")})]})]}),(0,w.jsx)("p",{children:e("header.lead")})]}),(0,w.jsxs)("div",{className:"dsh-st-toolbar",children:[(0,w.jsx)(le.Input,{className:"dsh-st-search",value:c,placeholder:e("search.placeholder"),onChange:k=>y(k.target.value)}),(0,w.jsx)(le.Button,{variant:"outline",icon:(0,w.jsx)(gs,{}),onClick:()=>{_s(e("chat.prompt")),r?.()},children:e("action.chatCreate")}),(0,w.jsx)(le.Button,{variant:"primary",icon:(0,w.jsx)(Sn,{}),disabled:te===""||ne.length===0,onClick:()=>ye(),children:e("action.create")}),(0,w.jsx)(le.Button,{className:"dsh-st-row-icon",variant:"outline",size:"sm",icon:(0,w.jsx)(ms,{}),"aria-label":e("section.refresh"),style:nt,onClick:()=>{s.refresh()}})]})]}),(0,w.jsx)("div",{className:"dsh-st-banner",role:"note",children:(0,w.jsxs)("span",{children:[(0,w.jsx)(hs,{}),e("banner.wake")]})}),(0,w.jsxs)("section",{className:"dsh-st-examples",children:[(0,w.jsx)("div",{className:"dsh-st-examples-head",children:(0,w.jsx)("h2",{children:e("examples.title")})}),(0,w.jsx)("div",{className:"dsh-st-example-row",children:Wr.map((k,d)=>(0,w.jsxs)("button",{type:"button",className:"dsh-st-example",disabled:te===""||ne.length===0,onClick:()=>ye({name:e(`examples.${d+1}.title`),prompt:e(`examples.${d+1}.body`),scheduleKind:k.scheduleKind,time:k.time,weekdays:k.weekdays}),children:[(0,w.jsx)("strong",{children:e(`examples.${d+1}.title`)}),(0,w.jsx)("p",{children:e(`examples.${d+1}.body`)}),(0,w.jsxs)("span",{className:"dsh-st-chip",children:[(0,w.jsx)(Ie,{size:14}),e(`examples.${d+1}.chip`)]})]},k.name))})]}),L!==void 0&&(0,w.jsx)("p",{className:"dsh-st-error",children:L}),(o.phase==="idle"||o.phase==="loading"&&x===void 0)&&(0,w.jsx)("p",{className:"dsh-st-muted",children:e("loading")}),o.phase==="error"&&x===void 0&&(0,w.jsxs)("div",{className:"dsh-st-empty",children:[(0,w.jsx)("h3",{children:e("error.title")}),(0,w.jsx)("p",{children:o.error}),(0,w.jsx)(le.Button,{variant:"primary",onClick:()=>{s.refresh()},children:e("error.retry")})]}),(0,w.jsxs)("div",{className:"dsh-st-tabs",children:[(0,w.jsx)(le.SegmentedTabs,{className:"dsh-st-settings-tabs",label:e("tab"),value:a,items:[{value:"mine",id:"dsh-st-tab-mine",panelId:"dsh-st-panel-mine",label:(0,w.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,w.jsx)(Ie,{}),(0,w.jsx)("span",{children:e("tabs.mine")})]})},{value:"runs",id:"dsh-st-tab-runs",panelId:"dsh-st-panel-runs",label:(0,w.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,w.jsx)(Ge,{}),(0,w.jsx)("span",{children:e("tabs.runs")})]})}],onChange:l}),a==="mine"&&(0,w.jsx)("div",{className:"dsh-st-sort-wrap",children:(0,w.jsx)(Cn,{t:e,...Rn===void 0?{}:{storage:Rn},storageKey:hn,sortKey:z,sortDirection:oe,onSelect:(k,d)=>{_(k),pe(d)}})}),a==="runs"&&(0,w.jsxs)("div",{className:"dsh-st-filters",children:[(0,w.jsx)(he,{compact:!0,className:"dsh-st-filter-range",value:ae,options:["day","week","month"].map(k=>({value:k,label:e(`history.range.${k}`)})),onChange:k=>de(k)}),(0,w.jsx)(he,{compact:!0,className:"dsh-st-filter-task",value:W,options:[{value:"all",label:e("history.allTasks")},...(x?.automations??[]).map(k=>({value:k.id,label:k.name}))],onChange:se}),(0,w.jsx)(he,{compact:!0,className:"dsh-st-filter-status",value:K,options:[{value:"all",label:e("history.allStatus")},...Lt.map(k=>({value:k,label:e(`status.${k}`)}))],onChange:k=>O(k)})]})]}),a==="mine"&&(fe.length===0?(0,w.jsxs)("div",{id:"dsh-st-panel-mine",role:"tabpanel","aria-labelledby":"dsh-st-tab-mine",className:"dsh-st-empty",children:[(0,w.jsx)("h3",{children:e("empty.title")}),(0,w.jsx)("p",{children:e("empty.body")})]}):(0,w.jsx)("div",{id:"dsh-st-panel-mine",role:"tabpanel","aria-labelledby":"dsh-st-tab-mine",className:"dsh-st-grid",children:fe.map(k=>(0,w.jsx)(_r,{item:k,t:e,now:G,busy:S,onEdit:()=>we(k),onToggle:()=>{J(()=>s.mutateAutomation(k.id,bn(k.status)))},onRun:()=>{J(()=>s.runNow(k.id))},onDelete:()=>u(k)},k.id))})),a==="runs"&&(ge.length===0?(0,w.jsx)("div",{id:"dsh-st-panel-runs",role:"tabpanel","aria-labelledby":"dsh-st-tab-runs",className:"dsh-st-empty",children:e("runs.empty")}):(0,w.jsx)("div",{id:"dsh-st-panel-runs",role:"tabpanel","aria-labelledby":"dsh-st-tab-runs",className:"dsh-st-timeline",children:ge.map(k=>(0,w.jsxs)("section",{className:"dsh-st-group",children:[(0,w.jsx)("h3",{children:k.label}),k.items.map(d=>(0,w.jsx)(zr,{run:d,t:e},d.id))]},k.key))})),m&&(0,w.jsx)(Hs,{t:e,permissionT:n,modelT:t,busy:S,workspaces:V,models:q,modelFailures:x?.modelFailures??[],defaultModel:x?.defaultModel??null,skills:x?.skills??[],permissions:ne,defaultPermission:te,editing:A!==void 0,...g===void 0?{}:{draft:g},onClose:re,...i===void 0?{}:{onAddWorkspace:i},onSubmit:async k=>{let d=Nt(k,V,q,new Date,{allowPastOnce:A!==void 0});await J(async()=>{A===void 0?await s.createAutomation(d):await s.updateAutomation(A,d),re()})}},A??"create"),(0,w.jsx)(Ws,{target:p,t:e,busy:S,onCancel:()=>u(void 0),onConfirm:()=>{let k=p;k!==void 0&&J(async()=>{await s.mutateAutomation(k.id,"delete"),u(void 0)})}})]})}function _r({item:e,t:n,now:t,busy:s,onEdit:r,onToggle:i,onRun:o,onDelete:a}){let[l,c]=(0,ee.useState)(!1);return(0,w.jsxs)("article",{className:"dsh-st-card",onClick:r,children:[(0,w.jsxs)("div",{className:"dsh-st-card-head",children:[(0,w.jsx)("span",{onClick:y=>y.stopPropagation(),children:(0,w.jsx)(le.Switch,{checked:e.status==="active",disabled:s,label:e.status==="active"?n("card.pause"):n("card.resume"),onChange:()=>i()})}),(0,w.jsx)("span",{onClick:y=>y.stopPropagation(),children:(0,w.jsx)(le.Menu,{open:l,onClose:()=>c(!1),align:"end",portal:!0,dense:!0,anchor:(0,w.jsx)(le.Tooltip,{label:n("card.more"),side:"bottom",delayMs:500,portal:!0,children:(0,w.jsx)("button",{type:"button",className:"dsh-st-row-icon","aria-label":n("card.more"),style:{...nt,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,border:"1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.15))",borderRadius:"var(--dsw-radius-sm, 6px)",background:"transparent",color:"var(--dsw-alias-label-secondary)",cursor:"pointer"},onClick:()=>c(y=>!y),children:(0,w.jsx)(Ye,{size:16})})}),items:[{id:"run",label:n("menu.run"),disabled:s},{id:"edit",label:n("menu.edit"),disabled:s},{id:"delete",label:n("menu.delete"),danger:!0,disabled:s}],onSelect:y=>{c(!1),y==="run"&&o(),y==="edit"&&r(),y==="delete"&&a()}})})]}),(0,w.jsx)("h3",{children:e.name}),(0,w.jsx)("p",{children:e.prompt}),(0,w.jsxs)("div",{className:"dsh-st-card-foot",children:[(0,w.jsxs)("span",{className:"dsh-st-chip",children:[(0,w.jsx)(Ie,{size:14}),pn(e.schedule,n)]}),(0,w.jsx)("span",{children:e.nextRunAt===void 0?n("stats.noneScheduled"):n("history.nextApprox",{when:mn(e.nextRunAt,t,n)})})]})]})}function zr({run:e,t:n}){let t=Et(e.startedAt,e.finishedAt);return(0,w.jsxs)("article",{className:`dsh-st-run is-${e.status}`,children:[(0,w.jsx)("strong",{children:e.automationName}),(0,w.jsxs)("p",{children:[(0,w.jsx)("span",{children:Mt(e.startedAt??e.scheduledFor)}),t!==void 0&&(0,w.jsx)("span",{children:t}),(0,w.jsx)("span",{children:kt(e.trigger,n)})]})]})}var Be="dsh-automation",Qs={tab:"Scheduled tasks","sidebar.tab":"Scheduled","sidebar.tabs":"Workspace views","sidebar.tasksTab":"Tasks","sidebar.channelsTab":"Channels","sidebar.views":"Scheduled views","sidebar.viewOverview":"Task overview","sidebar.runsTab":"Records","sidebar.overviewTab":"Tasks","sidebar.empty":"No scheduled runs yet.","sidebar.tasksEmpty":"No web tasks yet.","sidebar.ungrouped":"Ungrouped","sidebar.section":"Scheduled","sidebar.workspaces":"Workspaces","sidebar.search":"Search","sidebar.sessions":"Sessions","sidebar.searchSessions":"Search session names","sidebar.clearSearch":"Clear search","sidebar.filter":"View options","sidebar.groupBy":"Group by","sidebar.groupWorkspace":"WorkSpace","sidebar.groupWorkspaceTree":"Workspace Tree","sidebar.groupList":"In one list","sidebar.sortBy":"Order by","sidebar.sortManual":"Manual","sidebar.sortTime":"Last updated","sidebar.filterBy":"Filter sessions","sidebar.hideArchived":"Hide archived","sidebar.showArchived":"All conversations (show archived)","sidebar.onlyArchived":"Archived only","header.lead":"Plan automatic tasks, or trigger them by hand. Describe the recurring work in any chat to create it quickly.","header.githubProject":"GitHub","header.githubFeedback":"Issues","examples.title":"Recommended examples","examples.1.title":"Daily regression check","examples.1.body":"Create a scheduled task that runs every day and inspects new test failures.","examples.1.chip":"Every day 09:00","examples.2.title":"Weekly dependency review","examples.2.body":"Create a scheduled task that runs every Monday and reports outdated or risky dependencies.","examples.2.chip":"Monday 10:00","examples.3.title":"Weekday morning briefing","examples.3.body":"Create a scheduled task that runs on weekdays and summarizes overnight changes.","examples.3.chip":"Weekdays 08:00","chat.hint":"In any conversation, describe the recurring work and ask the Agent to call automation_create.","chat.prompt":"I want to create a scheduled task that runs every [interval] and does [the actual task]","menu.run":"Run task","menu.edit":"Edit task","menu.delete":"Delete task","session.rename":"Rename","session.fork":"Fork session","session.archive":"Archive session","session.unarchive":"Restore","session.copySessionId":"Copy Session ID","session.moreActions":"More actions for {title}","session.groupActions":"Actions for {name}","session.taskSettings":"Task settings","session.archiveGroup":"Archive all conversations","session.archiveGroupConfirm":"Archive all","session.archiveGroupDescription":"Archive all {count} conversations for \u201C{name}\u201D. Choose Filter \u2192 Show archived to restore them.","session.archiveGroupPending":"Archiving conversations\u2026","session.archiveGroupFailed":"Some conversations could not be archived: {message}","session.archiveGroupClose":"Close","session.archiveGroupCancel":"Cancel","session.unarchiveGroup":"Restore all conversations","session.unarchiveGroupConfirm":"Restore all","session.unarchiveGroupDescription":"Restore all {count} conversations for \u201C{name}\u201D.","session.unarchiveGroupPending":"Restoring conversations\u2026","session.unarchiveGroupFailed":"Some conversations could not be restored: {message}","session.unarchiveGroupClose":"Close","session.unarchiveGroupCancel":"Cancel","session.deleteSession":"Delete session","session.deleteSessionConfirm":"Delete session","session.deleteSessionDescription":"This permanently deletes session \u201C{name}\u201D, its child agents (including any that are still running), and all of its records (conversation, stats, cache). This cannot be undone.","session.deleteSessionPending":"Deleting session\u2026","session.deleteSessionFailed":"Could not delete the session: {message}","session.deleteSessionClose":"Close","session.deleteSessionCancel":"Cancel","session.idle":"Idle","session.runningStatus":"Running","session.completed":"Completed","session.waitingApproval":"Waiting for approval","session.planReview":"Plan to review","session.waitingAnswer":"Waiting for an answer","session.subagentsRunning":"{count} subagents running","session.archived":"Archived","session.delete":"Remove from Scheduled","session.deleteFolder":"Remove folder","session.confirmDeleteFolder":"Remove this folder from Scheduled?","session.confirmDeleteFolderHint":'This only unlists {count} session(s) in "{name}" from Scheduled. Host sessions are not deleted and they stay hidden from Tasks.',"session.confirmDeleteFolderAction":"Remove from Scheduled","history.range.day":"By day","history.range.week":"By week","history.range.month":"By month","history.allTasks":"All tasks","history.allStatus":"All statuses","history.today":"Today","history.yesterday":"Yesterday","history.date":"{date}","history.week":"Week of {date}","history.month":"{month}","history.nextApprox":"Next run in about {when}","time.withinMinute":"about {count} minutes","time.withinHour":"about {count} hours","time.withinDay":"about {count} days","search.placeholder":"Search scheduled tasks...","action.chatCreate":"Create in chat","action.create":"New scheduled task","banner.wake":"Scheduled tasks run only while this computer stays awake.","tabs.mine":"My tasks","tabs.runs":"Run history","sort.by":"Sort","sort.created.asc":"Created time ascending","sort.created.desc":"Created time descending","sort.planned.asc":"Planned time ascending","sort.planned.desc":"Planned time descending","sort.default.save":"Set as default","sort.default.saved":"Default","form.workspace":"Workspace","form.fieldWorkspace":"Workspace","form.fieldModel":"Model","form.providerAccount":"DeepSeek account","form.fieldEffort":"Reasoning","form.fieldPermission":"Permission","form.slashHint":"Type / to insert a skill","form.slashEmpty":"No matching skills","form.addWorkspace":"Add workspace","form.workspaceRequired":"Add a registered workspace before saving.","form.workspaceUnavailable":"This Host cannot create workspaces.","form.addWorkspaceFailed":"Could not add the workspace.","form.workspacePath":"Folder path","form.workspacePathPlaceholder":"D:\\work\\project","form.model":"Model","form.modelSelect":"Select model","form.effort":"Reasoning","form.effort.none":"Default","form.effort.low":"Low","form.effort.medium":"Medium","form.effort.high":"High","form.error.workspace":"Select a workspace.","modal.title":"New scheduled task","modal.edit":"Edit scheduled task","modal.save":"Save","header.eyebrow":"Unattended coding work","header.title":"Automations","header.subtitle":"Schedule standalone, auditable Agent runs for this workspace.","header.create":"New automation","header.closeCreate":"Hide form","scope.workspace":"Workspace","scope.folder":"Working directory","stats.total":"All","stats.active":"Active","stats.next":"Next run","stats.attention":"Needs attention","stats.noneScheduled":"None scheduled","stats.noAttention":"All clear","section.automations":"Workspace automations","section.automationsHint":"Each trigger starts a fresh DSH Session and keeps its own audit record.","section.runs":"Recent runs","section.runsHint":"Latest outcomes for this workspace.","section.refresh":"Refresh","empty.title":"Let recurring coding work run itself","empty.body":"Save a self-contained task, a schedule, and a permission boundary. Every run starts in a new Session.","empty.action":"Create the first automation","runs.empty":"No runs yet. Run one now, or wait for the next scheduled occurrence.","overview.empty":"No scheduled tasks yet. Create one in Settings.","form.title":"Create automation","form.subtitle":"Write a complete, standalone task. Scheduled runs do not inherit this conversation.","form.name":"Name","form.namePlaceholder":"Daily regression triage","form.prompt":"Task prompt","form.promptPlaceholder":"Inspect new test failures, locate the regression, and propose a verified minimal fix\u2026","form.schedule":"Schedule","form.planTime":"Schedule","form.hourly":"Hourly","form.monthly":"Monthly","form.custom":"Every few days","form.intervalHint":"Runs every this many minutes, starting now.","form.customHint":"Runs every this many days at the selected time.","form.atTime":"at","form.minutesShort":"min","form.daysShort":"days","form.monthDay":"Day {day} of month","form.skills":"Skills","form.skillsEmpty":"No skills available","schedule.hourlyAt":"Every hour at :{minute}","schedule.monthlyAt":"Monthly on day {day} \xB7 {time}","schedule.customAt":"Every {count} days \xB7 {time}","form.once":"Does not repeat","form.interval":"Interval","form.daily":"Daily","form.weekly":"Weekly","form.runAt":"Run at","form.every":"Every","form.minutes":"minutes","form.time":"Time","form.days":"Weekdays","form.timeZone":"Time zone","form.maxConcurrentRuns":"Concurrency","form.maxConcurrentRunsHint":"Queued and running executions share this limit. Defaults to 1; when full, scheduled triggers are skipped and manual runs are rejected.","form.error.maxConcurrentRuns":"Enter a positive whole number for concurrent runs.","form.permission":"Permission boundary","permission.readOnly":"Read Only","permission.workspaceWrite":"Workspace Write","permission.fullAccess":"Full access","form.cancel":"Cancel","form.submit":"Create automation","form.submitting":"Creating\u2026","form.error.name":"Enter a name.","form.error.prompt":"Enter a complete, standalone task prompt.","form.error.once":"Choose a valid future date and time.","form.error.interval":"The interval must be between 1 and 43,200 minutes.","form.error.weekdays":"Select at least one weekday.","day.1":"Mon","day.2":"Tue","day.3":"Wed","day.4":"Thu","day.5":"Fri","day.6":"Sat","day.7":"Sun","status.active":"Active","status.paused":"Paused","status.queued":"Queued","status.running":"Running","status.succeeded":"Succeeded","status.failed":"Failed","status.skipped":"Skipped","status.cancelled":"Cancelled","status.interrupted":"Interrupted","card.nextRun":"Next","card.lastRun":"Last","card.never":"Not yet run","schedule.onceAt":"Once \xB7 {time}","schedule.everyMinutes":"Every {count} minutes","schedule.dailyAt":"Daily \xB7 {time}","schedule.weeklyAt":"{days} \xB7 {time}","card.pause":"Pause","card.resume":"Resume","card.runNow":"Run now","card.more":"More actions","card.delete":"Delete","card.confirmDelete":"Delete this automation?","card.confirmDeleteHint":"Run history is kept for audit.","card.confirm":"Delete","card.cancel":"Cancel","run.trigger.schedule":"Scheduled","run.trigger.manual":"Manual","run.openSession":"Session {id}","run.markRead":"Mark reviewed",loading:"Loading automations\u2026","error.title":"Automations could not be loaded","error.retry":"Try again","error.action":"The action failed. Please try again.","error.taskMissing":"This scheduled task no longer exists.","error.offline":"Could not reach the local automation service. Check that DSH is still running and try again.","time.minutes":"{count}m","time.hours":"{count}h","time.days":"{count}d","time.months":"{count}mo","time.years":"{count}y","time.ago":"{text} ago","time.now":"now","session.copy":"Copy","session.copied":"Copied","session.compactApproval":"Approval","session.compactPlan":"Plan review","session.compactAnswer":"Answer","time.minuteAgo":"{count}m ago","time.hourAgo":"{count}h ago","time.dayAgo":"{count}d ago","time.inMinute":"in {count}m","time.inHour":"in {count}h","time.inDay":"in {count}d"},eo={tab:"\u5B9A\u65F6\u4EFB\u52A1","sidebar.tab":"\u5B9A\u65F6","sidebar.tabs":"\u5DE5\u4F5C\u533A\u5206\u7C7B","sidebar.tasksTab":"\u4EFB\u52A1","sidebar.channelsTab":"\u9891\u9053","sidebar.views":"\u5B9A\u65F6\u9875\u89C6\u56FE","sidebar.viewOverview":"\u4EFB\u52A1\u603B\u89C8","sidebar.runsTab":"\u8BB0\u5F55","sidebar.overviewTab":"\u4EFB\u52A1","sidebar.empty":"\u8FD8\u6CA1\u6709\u5B9A\u65F6\u4EFB\u52A1\u6267\u884C\u8BB0\u5F55\u3002","sidebar.tasksEmpty":"\u6682\u65E0\u7F51\u9875\u4EFB\u52A1","sidebar.ungrouped":"\u672A\u5206\u7EC4","sidebar.section":"\u5B9A\u65F6\u4EFB\u52A1","sidebar.workspaces":"\u5DE5\u4F5C\u533A","sidebar.search":"\u641C\u7D22","sidebar.sessions":"\u4F1A\u8BDD","sidebar.searchSessions":"\u641C\u7D22\u4F1A\u8BDD\u540D\u79F0","sidebar.clearSearch":"\u6E05\u9664\u641C\u7D22","sidebar.filter":"\u89C6\u56FE\u9009\u9879","sidebar.groupBy":"\u5206\u7EC4\u65B9\u5F0F","sidebar.groupWorkspace":"\u6309\u5DE5\u4F5C\u533A","sidebar.groupWorkspaceTree":"\u6309\u5DE5\u4F5C\u533A\u6811","sidebar.groupList":"\u5355\u5217\u8868","sidebar.sortBy":"\u6392\u5E8F\u65B9\u5F0F","sidebar.sortManual":"\u624B\u52A8\u6392\u5E8F","sidebar.sortTime":"\u6700\u8FD1\u66F4\u65B0","sidebar.filterBy":"\u7B5B\u9009\u4F1A\u8BDD","sidebar.hideArchived":"\u9690\u85CF\u5DF2\u5F52\u6863","sidebar.showArchived":"\u5168\u90E8\u5BF9\u8BDD\uFF08\u663E\u793A\u5DF2\u5F52\u6863\uFF09","sidebar.onlyArchived":"\u4EC5\u663E\u793A\u5DF2\u5F52\u6863","header.lead":"\u6309\u8BA1\u5212\u81EA\u52A8\u6267\u884C\u4EFB\u52A1\uFF0C\u4E5F\u53EF\u968F\u65F6\u624B\u52A8\u89E6\u53D1\u3002\u5728\u4EFB\u610F\u5BF9\u8BDD\u4E2D\u63CF\u8FF0\u4F60\u60F3\u5B9A\u671F\u505A\u7684\u4E8B\uFF0C\u5373\u53EF\u5FEB\u901F\u521B\u5EFA","header.githubProject":"GitHub","header.githubFeedback":"\u95EE\u9898\u53CD\u9988","examples.title":"\u63A8\u8350\u6848\u4F8B","examples.1.title":"\u6BCF\u65E5\u56DE\u5F52\u68C0\u67E5","examples.1.body":"\u6211\u8981\u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u6BCF\u3010\u5929\u3011\u6267\u884C\u3010\u68C0\u67E5\u65B0\u589E\u6D4B\u8BD5\u5931\u8D25\u5E76\u7ED9\u51FA\u6700\u5C0F\u4FEE\u590D\u3011\u3002","examples.1.chip":"\u6BCF\u5929 09:00","examples.2.title":"\u6BCF\u5468\u4F9D\u8D56\u5DE1\u68C0","examples.2.body":"\u6211\u8981\u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u6BCF\u3010\u5468\u4E00\u3011\u6267\u884C\u3010\u68C0\u67E5\u8FC7\u671F\u6216\u6709\u98CE\u9669\u7684\u4F9D\u8D56\u5E76\u7ED9\u51FA\u5904\u7406\u5EFA\u8BAE\u3011\u3002","examples.2.chip":"\u6BCF\u5468\u4E00 10:00","examples.3.title":"\u5DE5\u4F5C\u65E5\u65E9\u62A5","examples.3.body":"\u6211\u8981\u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u6BCF\u3010\u5DE5\u4F5C\u65E5\u3011\u6267\u884C\u3010\u6C47\u603B\u6628\u591C\u4ED3\u5E93\u53D8\u66F4\u5E76\u7ED9\u51FA\u4ECA\u65E5\u5173\u6CE8\u70B9\u3011\u3002","examples.3.chip":"\u5DE5\u4F5C\u65E5 08:00","chat.hint":"\u5728\u4EFB\u610F\u5BF9\u8BDD\u4E2D\u63CF\u8FF0\u4F60\u60F3\u5B9A\u671F\u505A\u7684\u4E8B\uFF0C\u5E76\u8BA9 Agent \u8C03\u7528 automation_create\u3002","chat.prompt":"\u6211\u8981\u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u6BCF\u3010\u65F6\u95F4\u95F4\u9694\u3011\u6267\u884C\u3010\u5177\u4F53\u4EFB\u52A1\u3011","menu.run":"\u6267\u884C\u4EFB\u52A1","menu.edit":"\u7F16\u8F91\u4EFB\u52A1","menu.delete":"\u5220\u9664\u4EFB\u52A1","session.rename":"\u91CD\u547D\u540D","session.fork":"\u5206\u53C9\u4F1A\u8BDD","session.archive":"\u5F52\u6863\u4F1A\u8BDD","session.unarchive":"\u6062\u590D","session.copySessionId":"\u590D\u5236 Session ID","session.moreActions":"\u201C{title}\u201D\u7684\u66F4\u591A\u64CD\u4F5C","session.groupActions":"\u201C{name}\u201D\u7684\u4EFB\u52A1\u64CD\u4F5C","session.taskSettings":"\u4EFB\u52A1\u8BBE\u7F6E","session.archiveGroup":"\u5F52\u6863\u6574\u7EC4\u4F1A\u8BDD","session.archiveGroupConfirm":"\u786E\u8BA4\u5F52\u6863","session.archiveGroupDescription":"\u5C06\u5F52\u6863\u201C{name}\u201D\u4E0B\u7684 {count} \u4E2A\u4F1A\u8BDD\u3002\u53EF\u5728\u7B5B\u9009\u4E2D\u9009\u62E9\u201C\u663E\u793A\u5DF2\u5F52\u6863\u201D\u540E\u6062\u590D\u3002","session.archiveGroupPending":"\u6B63\u5728\u5F52\u6863\u6574\u7EC4\u4F1A\u8BDD\u2026","session.archiveGroupFailed":"\u90E8\u5206\u4F1A\u8BDD\u5F52\u6863\u5931\u8D25\uFF1A{message}","session.archiveGroupClose":"\u5173\u95ED","session.archiveGroupCancel":"\u53D6\u6D88","session.unarchiveGroup":"\u6062\u590D\u6574\u7EC4\u4F1A\u8BDD","session.unarchiveGroupConfirm":"\u786E\u8BA4\u6062\u590D","session.unarchiveGroupDescription":"\u5C06\u6062\u590D\u201C{name}\u201D\u4E0B\u7684 {count} \u4E2A\u4F1A\u8BDD\u3002","session.unarchiveGroupPending":"\u6B63\u5728\u6062\u590D\u6574\u7EC4\u4F1A\u8BDD\u2026","session.unarchiveGroupFailed":"\u90E8\u5206\u4F1A\u8BDD\u6062\u590D\u5931\u8D25\uFF1A{message}","session.unarchiveGroupClose":"\u5173\u95ED","session.unarchiveGroupCancel":"\u53D6\u6D88","session.deleteSession":"\u5220\u9664\u4F1A\u8BDD","session.deleteSessionConfirm":"\u5220\u9664\u4F1A\u8BDD","session.deleteSessionDescription":"\u5C06\u6C38\u4E45\u5220\u9664\u4F1A\u8BDD\u201C{name}\u201D\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u5168\u90E8\u8BB0\u5F55\uFF08\u5BF9\u8BDD\u5185\u5BB9\u3001\u7EDF\u8BA1\u3001\u7F13\u5B58\uFF09\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","session.deleteSessionPending":"\u6B63\u5728\u5220\u9664\u4F1A\u8BDD\u2026","session.deleteSessionFailed":"\u5220\u9664\u4F1A\u8BDD\u5931\u8D25\uFF1A{message}","session.deleteSessionClose":"\u5173\u95ED","session.deleteSessionCancel":"\u53D6\u6D88","session.idle":"\u7A7A\u95F2","session.runningStatus":"\u8FDB\u884C\u4E2D","session.completed":"\u5DF2\u5B8C\u6210","session.waitingApproval":"\u7B49\u5F85\u5BA1\u6279","session.planReview":"\u8BA1\u5212\u5F85\u5BA1","session.waitingAnswer":"\u7B49\u5F85\u56DE\u7B54","session.subagentsRunning":"{count} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","session.archived":"\u5DF2\u5F52\u6863","session.delete":"\u4ECE\u5B9A\u65F6\u9875\u79FB\u9664","session.deleteFolder":"\u4ECE\u5B9A\u65F6\u9875\u79FB\u9664\u6587\u4EF6\u5939","session.confirmDeleteFolder":"\u4ECE\u5B9A\u65F6\u9875\u79FB\u9664\u8FD9\u4E2A\u6587\u4EF6\u5939\uFF1F","session.confirmDeleteFolderHint":"\u53EA\u4F1A\u628A\u300C{name}\u300D\u4E0B\u7684 {count} \u6761\u4F1A\u8BDD\u4ECE\u5B9A\u65F6\u9875\u6458\u6389\uFF0C\u4E0D\u4F1A\u5220\u9664\u5BBF\u4E3B Session\u3002\u4EFB\u52A1\u9875\u672C\u6765\u4E5F\u4E0D\u5C55\u793A\u8FD9\u4E9B\u81EA\u52A8\u5316\u4F1A\u8BDD\u3002","session.confirmDeleteFolderAction":"\u4ECE\u5B9A\u65F6\u9875\u79FB\u9664","history.range.day":"\u6309\u5929","history.range.week":"\u6309\u5468","history.range.month":"\u6309\u6708","history.allTasks":"\u5168\u90E8\u4EFB\u52A1","history.allStatus":"\u5168\u90E8\u72B6\u6001","history.today":"\u4ECA\u5929","history.yesterday":"\u6628\u5929","history.date":"{date}","history.week":"{date} \u5F53\u5468","history.month":"{month}","history.nextApprox":"\u4E0B\u6B21\u6267\u884C \u5927\u7EA6 {when}","time.withinMinute":"{count} \u5206\u949F\u5185","time.withinHour":"{count} \u5C0F\u65F6\u5185","time.withinDay":"{count} \u5929\u5185","search.placeholder":"\u641C\u7D22\u5B9A\u65F6\u4EFB\u52A1...","action.chatCreate":"\u901A\u8FC7\u5BF9\u8BDD\u521B\u5EFA","action.create":"\u65B0\u5EFA\u5B9A\u65F6\u4EFB\u52A1","banner.wake":"\u5B9A\u65F6\u4EFB\u52A1\u4EC5\u5728\u7535\u8111\u4FDD\u6301\u5524\u9192\u65F6\u8FD0\u884C","tabs.mine":"\u6211\u7684\u5B9A\u65F6\u4EFB\u52A1","tabs.runs":"\u6267\u884C\u8BB0\u5F55","sort.by":"\u6392\u5E8F","sort.created.asc":"\u6309\u521B\u5EFA\u65F6\u95F4\u5347\u5E8F","sort.created.desc":"\u6309\u521B\u5EFA\u65F6\u95F4\u5012\u5E8F","sort.planned.asc":"\u6309\u8BA1\u5212\u65F6\u95F4\u5347\u5E8F","sort.planned.desc":"\u6309\u8BA1\u5212\u65F6\u95F4\u5012\u5E8F","sort.default.save":"\u8BBE\u4E3A\u9ED8\u8BA4","sort.default.saved":"\u9ED8\u8BA4","form.workspace":"\u5DE5\u4F5C\u76EE\u5F55","form.fieldWorkspace":"\u5DE5\u4F5C\u533A","form.fieldModel":"\u6A21\u578B","form.providerAccount":"DeepSeek \u8D26\u53F7","form.fieldEffort":"\u63A8\u7406\u7B49\u7EA7","form.fieldPermission":"\u6743\u9650","form.slashHint":"\u8F93\u5165 / \u53EC\u56DE\u6280\u80FD","form.slashEmpty":"\u6CA1\u6709\u5339\u914D\u7684\u6280\u80FD","form.addWorkspace":"\u6DFB\u52A0\u5DE5\u4F5C\u533A","form.workspaceRequired":"\u8BF7\u5148\u6DFB\u52A0\u5DF2\u767B\u8BB0\u7684\u5DE5\u4F5C\u533A\uFF0C\u5426\u5219\u65E0\u6CD5\u4FDD\u5B58\u3002","form.workspaceUnavailable":"\u5F53\u524D\u5BBF\u4E3B\u4E0D\u80FD\u65B0\u5EFA\u5DE5\u4F5C\u533A\u3002","form.addWorkspaceFailed":"\u6DFB\u52A0\u5DE5\u4F5C\u533A\u5931\u8D25\u3002","form.workspacePath":"\u76EE\u5F55\u8DEF\u5F84","form.workspacePathPlaceholder":"D:\\work\\project","form.model":"\u6A21\u578B","form.modelSelect":"\u9009\u62E9\u6A21\u578B","form.effort":"\u63A8\u7406\u7B49\u7EA7","form.effort.none":"\u9ED8\u8BA4","form.effort.low":"Low","form.effort.medium":"Medium","form.effort.high":"High","form.error.workspace":"\u8BF7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002","modal.title":"\u65B0\u5EFA\u5B9A\u65F6\u4EFB\u52A1","modal.edit":"\u7F16\u8F91\u5B9A\u65F6\u4EFB\u52A1","modal.save":"\u4FDD\u5B58","header.eyebrow":"\u81EA\u4E3B\u7F16\u7801\u4EFB\u52A1","header.title":"\u81EA\u52A8\u5316","header.subtitle":"\u4E3A\u5F53\u524D\u5DE5\u4F5C\u533A\u5B89\u6392\u72EC\u7ACB\u3001\u53EF\u5BA1\u8BA1\u7684 Agent \u8FD0\u884C\u3002","header.create":"\u65B0\u5EFA\u81EA\u52A8\u5316","header.closeCreate":"\u6536\u8D77\u8868\u5355","scope.workspace":"\u5DE5\u4F5C\u533A","scope.folder":"\u5DE5\u4F5C\u76EE\u5F55","stats.total":"\u5168\u90E8","stats.active":"\u5DF2\u542F\u7528","stats.next":"\u4E0B\u6B21\u8FD0\u884C","stats.attention":"\u9700\u8981\u5173\u6CE8","stats.noneScheduled":"\u6682\u65E0\u8BA1\u5212","stats.noAttention":"\u4E00\u5207\u6B63\u5E38","section.automations":"\u5DE5\u4F5C\u533A\u81EA\u52A8\u5316","section.automationsHint":"\u6BCF\u6B21\u89E6\u53D1\u90FD\u4F1A\u521B\u5EFA\u4E00\u4E2A\u5168\u65B0\u7684 DSH Session\uFF0C\u5E76\u4FDD\u7559\u72EC\u7ACB\u5BA1\u8BA1\u8BB0\u5F55\u3002","section.runs":"\u6700\u8FD1\u8FD0\u884C","section.runsHint":"\u5F53\u524D\u5DE5\u4F5C\u533A\u6700\u8FD1\u7684\u6267\u884C\u72B6\u6001\u3002","section.refresh":"\u5237\u65B0","empty.title":"\u8BA9\u91CD\u590D\u7684\u7F16\u7801\u5DE5\u4F5C\u81EA\u52A8\u8FD0\u884C","empty.body":"\u8BBE\u7F6E\u4E00\u4E2A\u76EE\u6807\u660E\u786E\u7684\u4EFB\u52A1\u3001\u8FD0\u884C\u65F6\u95F4\u548C\u6743\u9650\u8FB9\u754C\u3002\u6BCF\u6B21\u8FD0\u884C\u90FD\u4ECE\u5168\u65B0 Session \u5F00\u59CB\u3002","empty.action":"\u521B\u5EFA\u7B2C\u4E00\u4E2A\u81EA\u52A8\u5316","runs.empty":"\u8FD8\u6CA1\u6709\u8FD0\u884C\u8BB0\u5F55\u3002\u4F60\u53EF\u4EE5\u7ACB\u5373\u8FD0\u884C\u4E00\u6B21\uFF0C\u6216\u7B49\u5F85\u8BA1\u5212\u89E6\u53D1\u3002","overview.empty":"\u6682\u65E0\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u53EF\u5230\u8BBE\u7F6E\u9875\u521B\u5EFA\u3002","form.title":"\u521B\u5EFA\u81EA\u52A8\u5316","form.subtitle":"\u8BF7\u5199\u5B8C\u6574\u3001\u72EC\u7ACB\u7684\u4EFB\u52A1\u8BF4\u660E\uFF1A\u5B9A\u65F6\u8FD0\u884C\u4E0D\u4F1A\u7EE7\u627F\u5F53\u524D\u5BF9\u8BDD\u3002","form.name":"\u540D\u79F0","form.namePlaceholder":"\u6BCF\u65E5\u56DE\u5F52\u6D4B\u8BD5\u5206\u8BCA","form.prompt":"\u4EFB\u52A1\u6307\u4EE4","form.promptPlaceholder":"\u68C0\u67E5\u65B0\u589E\u6D4B\u8BD5\u5931\u8D25\uFF0C\u5B9A\u4F4D\u56DE\u5F52\u539F\u56E0\uFF0C\u5E76\u7ED9\u51FA\u7ECF\u8FC7\u9A8C\u8BC1\u7684\u6700\u5C0F\u4FEE\u590D\u65B9\u6848\u2026\u2026","form.schedule":"\u8FD0\u884C\u8BA1\u5212","form.planTime":"\u8BA1\u5212\u65F6\u95F4","form.hourly":"\u6BCF\u5C0F\u65F6","form.monthly":"\u6BCF\u6708","form.custom":"\u6BCF\u9694\u51E0\u5929","form.intervalHint":"\u4ECE\u73B0\u5728\u8D77\uFF0C\u6BCF\u9694\u8FD9\u4E48\u591A\u5206\u949F\u8FD0\u884C\u4E00\u6B21\u3002","form.customHint":"\u6BCF\u9694\u8FD9\u4E48\u591A\u5929\uFF0C\u5728\u6240\u9009\u65F6\u95F4\u8FD0\u884C\u4E00\u6B21\u3002","form.atTime":"\u4E8E","form.minutesShort":"\u5206","form.daysShort":"\u5929","form.monthDay":"\u6BCF\u6708\u7B2C {day} \u5929","form.skills":"\u6280\u80FD","form.skillsEmpty":"\u6682\u65E0\u53EF\u7528\u6280\u80FD","schedule.hourlyAt":"\u6BCF\u5C0F\u65F6 :{minute}","schedule.monthlyAt":"\u6BCF\u6708 {day} \u65E5 \xB7 {time}","schedule.customAt":"\u6BCF {count} \u5929 \xB7 {time}","form.once":"\u4E0D\u91CD\u590D","form.interval":"\u95F4\u9694","form.daily":"\u6BCF\u5929","form.weekly":"\u6BCF\u5468","form.runAt":"\u8FD0\u884C\u65F6\u95F4","form.every":"\u6BCF\u9694","form.minutes":"\u5206\u949F","form.time":"\u65F6\u95F4","form.days":"\u661F\u671F","form.timeZone":"\u65F6\u533A","form.maxConcurrentRuns":"\u5E76\u53D1\u6570\u91CF","form.maxConcurrentRunsHint":"\u540C\u4E00\u4EFB\u52A1\u7684\u6392\u961F\u53CA\u8FD0\u884C\u6B21\u6570\u5171\u7528\u6B64\u4E0A\u9650\uFF0C\u9ED8\u8BA4 1\uFF1B\u6EE1\u989D\u65F6\u8DF3\u8FC7\u5F53\u6B21\u5B9A\u65F6\u89E6\u53D1\uFF0C\u624B\u52A8\u8FD0\u884C\u5C06\u88AB\u62D2\u7EDD\u3002","form.error.maxConcurrentRuns":"\u5E76\u53D1\u6570\u91CF\u5FC5\u987B\u4E3A\u5927\u4E8E\u7B49\u4E8E 1 \u7684\u6574\u6570\u3002","form.permission":"\u6743\u9650\u8FB9\u754C","permission.readOnly":"\u53EA\u8BFB","permission.workspaceWrite":"\u5DE5\u4F5C\u533A\u5199\u5165","permission.fullAccess":"\u5B8C\u5168\u8BBF\u95EE","form.cancel":"\u53D6\u6D88","form.submit":"\u521B\u5EFA\u81EA\u52A8\u5316","form.submitting":"\u521B\u5EFA\u4E2D\u2026","form.error.name":"\u8BF7\u8F93\u5165\u540D\u79F0\u3002","form.error.prompt":"\u8BF7\u8F93\u5165\u5B8C\u6574\u3001\u72EC\u7ACB\u7684\u4EFB\u52A1\u6307\u4EE4\u3002","form.error.once":"\u8BF7\u9009\u62E9\u6709\u6548\u7684\u672A\u6765\u65E5\u671F\u548C\u65F6\u95F4\u3002","form.error.interval":"\u8FD0\u884C\u95F4\u9694\u5FC5\u987B\u5728 1 \u5230 43,200 \u5206\u949F\u4E4B\u95F4\u3002","form.error.weekdays":"\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u5929\u3002","day.1":"\u5468\u4E00","day.2":"\u5468\u4E8C","day.3":"\u5468\u4E09","day.4":"\u5468\u56DB","day.5":"\u5468\u4E94","day.6":"\u5468\u516D","day.7":"\u5468\u65E5","status.active":"\u5DF2\u542F\u7528","status.paused":"\u5DF2\u6682\u505C","status.queued":"\u6392\u961F\u4E2D","status.running":"\u8FD0\u884C\u4E2D","status.succeeded":"\u5DF2\u5B8C\u6210","status.failed":"\u5931\u8D25","status.skipped":"\u5DF2\u8DF3\u8FC7","status.cancelled":"\u5DF2\u53D6\u6D88","status.interrupted":"\u5DF2\u4E2D\u65AD","card.nextRun":"\u4E0B\u6B21","card.lastRun":"\u6700\u8FD1","card.never":"\u5C1A\u672A\u8FD0\u884C","schedule.onceAt":"\u5355\u6B21 \xB7 {time}","schedule.everyMinutes":"\u6BCF {count} \u5206\u949F","schedule.dailyAt":"\u6BCF\u5929 \xB7 {time}","schedule.weeklyAt":"{days} \xB7 {time}","card.pause":"\u6682\u505C","card.resume":"\u6062\u590D","card.runNow":"\u7ACB\u5373\u8FD0\u884C","card.more":"\u66F4\u591A\u64CD\u4F5C","card.delete":"\u5220\u9664","card.confirmDelete":"\u786E\u8BA4\u5220\u9664\u8FD9\u4E2A\u81EA\u52A8\u5316\uFF1F","card.confirmDeleteHint":"\u8FD0\u884C\u5386\u53F2\u4F1A\u4FDD\u7559\u7528\u4E8E\u5BA1\u8BA1\u3002","card.confirm":"\u786E\u8BA4\u5220\u9664","card.cancel":"\u53D6\u6D88","run.trigger.schedule":"\u5B9A\u65F6\u89E6\u53D1","run.trigger.manual":"\u624B\u52A8\u89E6\u53D1","run.openSession":"Session {id}","run.markRead":"\u6807\u8BB0\u5DF2\u5904\u7406",loading:"\u6B63\u5728\u52A0\u8F7D\u81EA\u52A8\u5316\u2026","error.title":"\u65E0\u6CD5\u52A0\u8F7D\u81EA\u52A8\u5316","error.retry":"\u91CD\u8BD5","error.action":"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002","error.taskMissing":"\u8BE5\u5B9A\u65F6\u4EFB\u52A1\u5DF2\u4E0D\u5B58\u5728\u3002","error.offline":"\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A\u81EA\u52A8\u5316\u670D\u52A1\uFF0C\u8BF7\u786E\u8BA4 DSH \u4ECD\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002","time.minutes":"{count}\u5206\u949F","time.hours":"{count}\u5C0F\u65F6","time.days":"{count}\u5929","time.months":"{count}\u4E2A\u6708","time.years":"{count}\u5E74","time.ago":"{text}\u524D","time.now":"\u521A\u521A","session.copy":"\u590D\u5236","session.copied":"\u5DF2\u590D\u5236","session.compactApproval":"\u5F85\u5BA1\u6279","session.compactPlan":"\u8BA1\u5212\u5F85\u5BA1","session.compactAnswer":"\u5F85\u56DE\u7B54","time.minuteAgo":"{count} \u5206\u949F\u524D","time.hourAgo":"{count} \u5C0F\u65F6\u524D","time.dayAgo":"{count} \u5929\u524D","time.inMinute":"{count} \u5206\u949F\u540E","time.inHour":"{count} \u5C0F\u65F6\u540E","time.inDay":"{count} \u5929\u540E"};var no="__dshNativeTabs";function to(e){let n=new Map,t=[],s=new Set,r=[],i=()=>{r=[...n.values()].sort((a,l)=>(a.order??0)-(l.order??0))},o=()=>{for(let a of s)a()};return{version:1,officialTree:e,sessionFilters:t,getTabs(){return r},subscribe(a){return s.add(a),()=>{s.delete(a)}},insert(a){if(a.id==="")return()=>{};let l=n.get(a.id);return n.set(a.id,a),l!==a&&(i(),o()),()=>{n.get(a.id)===a&&(n.delete(a.id),i(),o())}},addSessionFilter(a){return t.push(a),o(),()=>{let l=t.indexOf(a);l>=0&&t.splice(l,1),o()}}}}function ut(e){if(e==null||typeof e!="object"&&typeof e!="function")return;let n=e[no];if(!(n==null||typeof n!="object"))return typeof n.insert=="function"?n:void 0}function pt(e,n){try{e[no]=n}catch{}return n}function so(e){let n=e;return ut(e)??ut(n?.component)}function oo(e){if(e==null)return!1;let n=e;return n.__dshNativeTabHost===!0||n.__imConnectWrapped===!0?!0:ut(e)!==void 0}var Gr="@michengai/dsh-archive-manager";function mt(e){return e?.querySelector(`[data-plugin="${Gr}"]`)!=null}function $e(e){return typeof e=="function"?e:void 0}function En(e){let n=e??{},t=$e(n.renameSession),s=$e(n.archiveSession),r=$e(n.unarchiveSession),i=$e(n.deleteSession),o=$e(n.forkSession),a=$e(n.notifyArchivedNotOpenable);return{...t===void 0?{}:{renameSession:t},...s===void 0?{}:{archiveSession:s},...r===void 0?{}:{unarchiveSession:r},...i===void 0?{}:{deleteSession:i},...o===void 0?{}:{forkSession:o},...a===void 0?{}:{notifyArchivedNotOpenable:a}}}function ro(e,n){return e&&n!==void 0}function io(e){let n=["rename","fork"];return e.archived?e.canUnarchive&&n.push("unarchive"):n.push("archive"),e.canDelete&&n.push("delete-session"),n}function ao(e,n){return n!==null&&e.includes(n)}function lo(e,n){return e&&!n}async function co(e,n){for(let t of e)await n(t)}async function uo(e,n){for(let t of e)await n(t)}var P=require("react"),Ao=require("react-dom"),j=require("@deepseek-ai/dsh-client-ui-primitives");function mo(e,n,t,s){if(e===void 0)return null;try{return e(n,t,s)??null}catch(r){if(!Vr(r))throw r;return null}}function Vr(e){return typeof e!="object"||e===null?!1:"name"in e&&e.name==="SlotOwnershipError"?!0:(e instanceof Error?e.message:"").includes("not declared by this entry")}function fo(e,n,t){let r=e.right+8,i=e.top+n.height>t.height-8?Math.max(8,t.height-n.height-8):Math.max(8,e.top);return{position:"fixed",zIndex:4100,left:`${Math.round(r)}px`,top:`${Math.round(i)}px`}}function ho(e,n){let t=e.runningSubagentCount??0,s=t===0?void 0:{state:"ongoing",label:n("session.subagentsRunning",{count:t})},r;e.pendingKind==="approval"?r={state:"warning",label:n("session.waitingApproval"),trailing:n("session.compactApproval")}:e.pendingKind==="plan-review"?r={state:"warning",label:n("session.planReview"),trailing:n("session.compactPlan")}:e.pendingKind==="question"&&(r={state:"warning",label:n("session.waitingAnswer"),trailing:n("session.compactAnswer")});let i;r!==void 0?i=s===void 0?[r]:[r,s]:e.running?i=s===void 0?[{state:"ongoing",label:n("session.runningStatus")}]:[{state:"ongoing",label:n("session.runningStatus")},s]:s!==void 0?i=[s]:e.completed===!0?i=[{state:"done",label:n("session.completed")}]:i=[{state:"idle",label:n("session.idle")}];let o=i.filter(a=>!(e.archived&&(a.state==="done"||a.state==="idle")));return e.archived&&o.push({state:"archived",label:n("session.archived")}),o}function go(e,n){let t=Date.parse(e||"");if(!Number.isFinite(t))return;let s=6e4,r=36e5,i=864e5,o=Math.max(0,n-t);return o<s?{unit:"now",count:0}:o<r?{unit:"minutes",count:Math.floor(o/s)}:o<i?{unit:"hours",count:Math.floor(o/r)}:o<30*i?{unit:"days",count:Math.floor(o/i)}:o<365*i?{unit:"months",count:Math.floor(o/(30*i))}:{unit:"years",count:Math.floor(o/(365*i))}}function yo(e,n){return e.unit==="now"?n("time.now"):e.unit==="minutes"?n("time.minutes",{count:e.count}):e.unit==="hours"?n("time.hours",{count:e.count}):e.unit==="days"?n("time.days",{count:e.count}):e.unit==="months"?n("time.months",{count:e.count}):n("time.years",{count:e.count})}function po(e,n,t){e.scrollLeft=n,n>0?e.dataset.scrolled="":delete e.dataset.scrolled,n<t?e.dataset.clipped="":delete e.dataset.clipped}function Ur(e){e.scrollLeft=0,delete e.dataset.scrolled,delete e.dataset.clipped}function vo(e,n){if(e===null)return;let t=e.scrollWidth-e.clientWidth;if(t<=8)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){po(e,t,t);return}cancelAnimationFrame(n.id);let s,r=0,i=o=>{r+=s===void 0?0:(o-s)*.03,s=o,po(e,Math.min(r,t),t),r<t&&(n.id=requestAnimationFrame(i))};n.id=requestAnimationFrame(i)}function ft(e,n){cancelAnimationFrame(n.id),e!==null&&Ur(e)}function bo(e,n,t=Date.now()){let s=go(e,t);return s===void 0?"":yo(s,n)}function wo(e,n,t=Date.now()){let s=go(e,t);return s===void 0?"":s.unit==="now"?n("time.now"):n("time.ago",{text:yo(s,n)})}var Ee=require("react");var Ln=require("@deepseek-ai/dsh-client-ui-primitives");var $=require("react/jsx-runtime"),Ke="dsh-st-rail-panel",Mn=typeof window>"u"?void 0:window.localStorage;function Pn({t:e,view:n,onChange:t}){return(0,$.jsx)(Ln.SegmentedTabs,{className:"dsh-st-rail-views",label:e("sidebar.views"),value:n,items:[{value:"runs",id:"dsh-st-rail-view-runs",panelId:Ke,label:(0,$.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:5},children:[(0,$.jsx)(Ge,{size:14}),(0,$.jsx)("span",{children:e("sidebar.runsTab")})]})},{value:"overview",id:"dsh-st-rail-view-overview",panelId:Ke,label:(0,$.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:5},children:[(0,$.jsx)(Tn,{size:14}),(0,$.jsx)("span",{children:e("sidebar.overviewTab")})]})}],onChange:t})}function Dn({t:e,automations:n,serverNow:t,openTaskSettings:s,onToggleAutomation:r}){let[i,o]=(0,Ee.useState)(()=>Ne(Mn,gn)?.key??"planned"),[a,l]=(0,Ee.useState)(()=>Ne(Mn,gn)?.direction??"asc"),[c,y]=(0,Ee.useState)(()=>new Set),m=(0,Ee.useMemo)(()=>new Date(t??Date.now()),[t]),T=(0,Ee.useMemo)(()=>{let p=fn(n,i,a);return $t(p)},[n,a,i]),A=(0,Ee.useMemo)(()=>new Map(n.map(p=>[p.id,pn(p.schedule,e)])),[n,e]),f=(p,u)=>{r===void 0||c.has(p)||(y(g=>new Set(g).add(p)),Promise.resolve(r(p,u)).catch(g=>{console.warn("[dsh-automation] \u5207\u6362\u4EFB\u52A1\u72B6\u6001\u5931\u8D25",g)}).finally(()=>{y(g=>{let h=new Set(g);return h.delete(p),h})}))};return(0,$.jsxs)("div",{className:"dsh-st-overview",children:[(0,$.jsxs)("div",{className:"dsh-st-overview-head",children:[(0,$.jsxs)("div",{className:"dsh-st-overview-title",children:[(0,$.jsx)("strong",{children:e("sidebar.viewOverview")}),(0,$.jsx)("span",{"aria-label":`${T.length}`,children:T.length})]}),(0,$.jsx)(Cn,{t:e,iconOnly:!0,className:"dsh-st-overview-sort",...Mn===void 0?{}:{storage:Mn},storageKey:gn,sortKey:i,sortDirection:a,onSelect:(p,u)=>{o(p),l(u)}})]}),T.length===0?(0,$.jsx)("div",{className:"dsh-st-rail-empty",children:e("overview.empty")}):T.map(p=>(0,$.jsx)(Br,{t:e,row:p,now:m,scheduleSummary:A.get(p.id)??"",toggleDisabled:r===void 0||c.has(p.id),onToggleAutomation:f,...s===void 0?{}:{openTaskSettings:s}},p.id))]})}function Br({t:e,row:n,now:t,scheduleSummary:s,openTaskSettings:r,toggleDisabled:i,onToggleAutomation:o}){let a=n.status!=="active",l=n.nextRunAt===void 0?e("stats.noneScheduled"):mn(n.nextRunAt,t,e),c=n.nextRunAt===void 0?e("stats.noneScheduled"):Rt(n.nextRunAt,t,e),y=`${e("stats.next")}: ${l}`,m=e(a?"card.resume":"card.pause");return(0,$.jsxs)("div",{className:`dsh-st-overview-row${a?" is-paused":""}`,children:[(0,$.jsxs)("button",{type:"button",className:"dsh-st-overview-open",disabled:r===void 0,onClick:()=>{r?.({automationId:n.id,name:n.name,sessionIds:[]})},children:[(0,$.jsxs)("span",{className:"dsh-st-overview-copy",children:[(0,$.jsx)("span",{className:"dsh-st-overview-name",children:n.name}),s!==""&&(0,$.jsxs)("span",{className:"dsh-st-overview-schedule",children:[(0,$.jsx)(fs,{width:14,height:14}),(0,$.jsx)("span",{children:s})]})]}),(0,$.jsx)("span",{className:"dsh-st-overview-next",title:y,"aria-label":y,children:(0,$.jsx)("strong",{children:c})})]}),(0,$.jsx)("span",{className:"dsh-st-overview-toggle",title:m,children:(0,$.jsx)(Ln.Switch,{checked:!a,disabled:i,label:m,onChange:()=>{o?.(n.id,bn(n.status))}})})]})}var De=require("react"),je=require("@deepseek-ai/dsh-client-ui-primitives");function So(e){return e?11:14}var X=require("react/jsx-runtime");function xo({t:e,query:n,sort:t,groupMode:s,archivedFilter:r="default",onQueryChange:i,onSortChange:o,onGroupModeChange:a,onArchivedFilterChange:l}){let[c,y]=(0,De.useState)(n.trim()!==""),[m,T]=(0,De.useState)(!1),A=(0,De.useRef)(null),f=So(c);(0,De.useEffect)(()=>{c&&A.current?.focus()},[c]);let p=()=>{T(!1),y(!0)},u=()=>{i(""),y(!1)},g=[{type:"label",id:"group-by",text:e("sidebar.groupBy")},{id:"workspace",label:e("sidebar.groupWorkspace"),icon:(0,X.jsx)(ze,{})},{id:"workspace-tree",label:e("sidebar.groupWorkspaceTree"),icon:(0,X.jsx)(Tn,{})},{id:"flat",label:e("sidebar.groupList"),icon:(0,X.jsx)(Ge,{})},{type:"separator",id:"order-by-separator"},{type:"label",id:"order-by",text:e("sidebar.sortBy")},{id:"updated",label:e("sidebar.sortTime"),icon:(0,X.jsx)(Ie,{})},...l!==void 0?[{type:"separator",id:"archived-filter-separator"},{type:"label",id:"filter-by",text:e("sidebar.filterBy")},{id:"hide-archived",label:e("sidebar.hideArchived"),icon:(0,X.jsx)(Cs,{})},{id:"show-archived",label:e("sidebar.showArchived"),icon:(0,X.jsx)(_e,{})},{id:"only-archived",label:e("sidebar.onlyArchived"),icon:(0,X.jsx)(Ns,{})}]:[]],h=[s==="list"?"flat":s,"updated",r==="show"?"show-archived":r==="only"?"only-archived":"hide-archived"];return(0,X.jsxs)("div",{className:c?"dsh-st-n-toolbar is-search":"dsh-st-n-toolbar",children:[(0,X.jsx)("span",{className:"dsh-st-n-head-label",children:e(s==="list"?"sidebar.sessions":"sidebar.workspaces")}),(0,X.jsx)("div",{className:"dsh-st-n-search-slot",children:(0,X.jsxs)("div",{className:"dsh-st-n-search",onClick:p,children:[(0,X.jsx)(je.Tooltip,{label:e("sidebar.search"),side:"bottom",delayMs:500,disabled:c,children:(0,X.jsx)("button",{type:"button",className:"dsh-st-n-search-btn","aria-label":e("sidebar.search"),"aria-expanded":c,onClick:p,children:(0,X.jsx)(xs,{size:f})})}),(0,X.jsx)("input",{ref:A,className:"dsh-st-n-search-input",value:n,placeholder:e("sidebar.searchSessions"),"aria-label":e("sidebar.searchSessions"),tabIndex:c?0:-1,"aria-hidden":!c,onChange:S=>i(S.target.value),onKeyDown:S=>{S.key==="Escape"&&u()}}),c&&(0,X.jsx)(je.Tooltip,{label:e("sidebar.clearSearch"),side:"bottom",delayMs:500,children:(0,X.jsx)("button",{type:"button",className:"dsh-st-n-search-clear","aria-label":e("sidebar.clearSearch"),onClick:S=>{S.stopPropagation(),u()},children:(0,X.jsx)(ks,{size:14})})})]})}),(0,X.jsx)("div",{className:"dsh-st-n-head-acts",children:(0,X.jsx)(je.Menu,{open:m,onClose:()=>{T(!1)},items:g,selectedIds:h,align:"end",dense:!0,portal:!0,onSelect:S=>{(S==="workspace"||S==="workspace-tree")&&a(S),S==="flat"&&a("list"),S==="updated"&&o("time"),S==="hide-archived"&&l?.("default"),S==="show-archived"&&l?.("show"),S==="only-archived"&&l?.("only"),T(!1)},anchor:(0,X.jsx)(je.Tooltip,{label:e("sidebar.filter"),side:"bottom",delayMs:500,disabled:m,children:(0,X.jsx)("button",{type:"button",className:m?"dsh-st-n-head-btn is-on":"dsh-st-n-head-btn","aria-label":e("sidebar.filter"),"aria-expanded":m,onClick:()=>T(S=>!S),children:(0,X.jsx)(kn,{size:16})})})})})]})}var v=require("react/jsx-runtime"),ko={},To=[];function On(e){let{t:n,runtime:t,openSession:s,useSessions:r,useWorkspaces:i,renameSession:o,archiveSession:a,unarchiveSession:l,deleteSession:c,forkSession:y,notifyArchivedNotOpenable:m,openTaskSettings:T,renderSlot:A,useSessionStatus:f}=e,p=(0,P.useSyncExternalStore)(t.source.subscribe,t.source.getSnapshot,t.source.getSnapshot),u=r?r(C=>Xe(C)):null,g=r?r(C=>C.byId??ko):ko,h=i?i(C=>C.archivedSessionIds??[]):[],S=i?i(C=>C.items??To):To,R=f?f(C=>C):void 0,L=r?r(C=>C.projectionsBySession):void 0,[H,ae]=(0,P.useState)({}),[de,W]=(0,P.useState)(),[se,K]=(0,P.useState)(),[O,z]=(0,P.useState)(),[_,oe]=(0,P.useState)(!1),[pe,U]=(0,P.useState)(),[M,G]=(0,P.useState)(),[x,V]=(0,P.useState)(!1),[q,ne]=(0,P.useState)(),[te,fe]=(0,P.useState)(),[xe,ge]=(0,P.useState)(!1),[J,re]=(0,P.useState)(),[ye,we]=(0,P.useState)(()=>typeof document<"u"&&mt(document)),[k,d]=(0,P.useState)("default"),[I,B]=(0,P.useState)(""),[Ce,Vo]=(0,P.useState)("time"),[ke,Uo]=(0,P.useState)("workspace"),[vt,Bo]=(0,P.useState)("runs"),Gn=(0,P.useRef)(null),Me=(0,P.useMemo)(()=>new Set(h),[h]),Vn=(0,P.useMemo)(()=>{let C=p.snapshot;if(C===void 0)return[];let Z=new Map(C.automations.map(ve=>[ve.id,ve.timeZone]));return vn(C.automations,C.runs).map(ve=>({...ve,sessions:ve.sessions.filter(Te=>Kt(Te.id,Me,k)).map(Te=>{let Ae=C.runs.find(on=>on.sessionId===Te.id);return{...Te,title:Ze(Ae&&(Ae.startedAt||Ae.scheduledFor)||"",Z.get(ve.id)),updatedAt:Ae&&(Ae.startedAt||Ae.scheduledFor)||"",running:Te.running||g[Te.id]?.running===!0}})})).filter(ve=>ve.sessions.length>0)},[Me,k,g,p.snapshot]);(0,P.useEffect)(()=>{if(!wn(u,p.snapshot?.runs)){Gn.current=null;return}Gn.current!==u&&(Gn.current=u,t.refresh().catch(()=>{}))},[t,u,p.snapshot?.runs]);let Un=(0,P.useMemo)(()=>{let C=ke==="workspace-tree"?us(Vn.flatMap(Z=>Z.sessions.map(ve=>({...ve,automationId:Z.id}))),S,n("sidebar.ungrouped")):Vn;return ps(C.map(Z=>({...Z,name:Z.name})),I,Ce,ke)},[ke,Vn,I,Ce,n,S]);(0,P.useEffect)(()=>{if(typeof document>"u"||typeof MutationObserver>"u")return;let C=()=>{we(mt(document))};C();let Z=new MutationObserver(C);return Z.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{Z.disconnect()}},[]);let $o=ye&&a!==void 0,Ko=ro(ye,c),bt=l!==void 0,jo=()=>{if(O===void 0||a===void 0||_)return;let C=O;oe(!0),U(void 0),co(C.sessionIds,a).then(()=>{z(void 0)}).catch(Z=>{U(Z instanceof Error?Z.message:n("error.action"))}).finally(()=>{oe(!1)})},qo=()=>{if(M===void 0||l===void 0||x)return;let C=M;V(!0),ne(void 0),uo(C.sessionIds,l).then(()=>{G(void 0)}).catch(Z=>{ne(Z instanceof Error?Z.message:n("error.action"))}).finally(()=>{V(!1)})},Zo=()=>{if(te===void 0||c===void 0||xe)return;let C=te;ge(!0),re(void 0),Promise.resolve(c(C.id)).then(()=>{fe(void 0)}).catch(Z=>{re(Z instanceof Error?Z.message:n("error.action"))}).finally(()=>{ge(!1)})};return(0,v.jsxs)("div",{className:"dsh-st-n",children:[(0,v.jsx)("div",{className:"dsh-st-n-views-wrap",children:(0,v.jsx)(Pn,{t:n,view:vt,onChange:Bo})}),(0,v.jsx)("div",{id:Ke,role:"tabpanel",className:"dsh-st-n-view-body",children:vt==="overview"?p.snapshot===void 0?(0,v.jsx)("div",{className:"dsh-st-n-empty",children:p.phase==="loading"?n("loading"):n("overview.empty")}):(0,v.jsx)(Dn,{t:n,automations:p.snapshot.automations,onToggleAutomation:(C,Z)=>t.mutateAutomation(C,Z),...T===void 0?{}:{openTaskSettings:T},...p.snapshot.serverNow===void 0?{}:{serverNow:p.snapshot.serverNow}}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(xo,{t:n,query:I,sort:Ce,groupMode:ke,archivedFilter:k,onQueryChange:B,onSortChange:Vo,onGroupModeChange:Uo,onArchivedFilterChange:d}),(0,v.jsx)("div",{className:"dsh-st-n-list-area",children:(0,v.jsxs)("div",{className:"dsh-st-n-tree",role:"tree",children:[p.phase==="loading"&&Un.length===0&&(0,v.jsx)("div",{className:"dsh-st-n-empty",children:n("loading")}),Un.length===0&&p.phase!=="loading"&&(0,v.jsx)("div",{className:"dsh-st-n-empty",children:n("sidebar.empty")}),Un.map(C=>{let Z=H[C.id]!==!0,ve=ao(C.sessions.map(E=>E.id),u),Te="depth"in C?C.depth:0,Ae=[...new Set(C.sessions.flatMap(E=>"automationId"in E&&typeof E.automationId=="string"?[E.automationId]:[]))],on=ke==="workspace-tree"&&Ae.length===1?p.snapshot?.automations.find(E=>E.id===Ae[0]):void 0,Bn=ke==="workspace-tree"?on?.id:C.id,Xo=ke==="workspace-tree"?on?.name:C.name,wt=C.sessions.filter(E=>!Me.has(E.id)).map(E=>E.id),St=C.sessions.filter(E=>Me.has(E.id)).map(E=>E.id),Jo=$o&&wt.length>0,Yo=bt&&St.length>0;return(0,v.jsxs)("div",{className:"dsh-st-n-group",style:Te>0?{"--dsh-workspace-indent":`${Te*12}px`}:void 0,children:[ke!=="list"&&(0,v.jsx)($r,{t:n,id:C.id,name:C.name,sessionIds:C.sessions.map(E=>E.id),expanded:Z,hasCurrentSession:ve,menuOpen:se===C.id,canArchiveGroup:Jo,canUnarchiveGroup:Yo,showTaskSettings:Bn!==void 0,onToggle:()=>ae(E=>({...E,[C.id]:Z})),onMenuChange:E=>{W(void 0),K(E?C.id:void 0)},onTaskSettings:()=>{Bn!==void 0&&T?.({automationId:Bn,name:Xo??C.name,sessionIds:C.sessions.map(E=>E.id)})},onArchiveGroup:()=>{U(void 0),z({id:C.id,name:C.name,sessionIds:wt})},onUnarchiveGroup:()=>{ne(void 0),G({id:C.id,name:C.name,sessionIds:St})}}),(ke==="list"||Z)&&C.sessions.map(E=>(0,v.jsx)(Kr,{t:n,flat:ke==="list",id:E.id,title:E.title,hoverTitle:String(g[E.id]?.displayTitle??g[E.id]?.title??C.name),updatedAt:E.updatedAt,running:E.running,archived:Me.has(E.id),selected:u===E.id,menuOpen:de===E.id,canDelete:Ko,canUnarchive:bt,hoverStatuses:ho({running:E.running||R?.get(E.id)?.running===!0,archived:Me.has(E.id),completed:R?.get(E.id)?.completionUnread===!0,...R?.get(E.id)?.pendingInteraction?.kind===void 0?{}:{pendingKind:R.get(E.id)?.pendingInteraction?.kind??""},runningSubagentCount:(L?.[E.id]?.values?.subagentCatalog??[]).filter(rn=>rn.id!==void 0&&R?.get(rn.id)?.running===!0).length},n),...A===void 0?{}:{renderSlot:A},onMenuChange:rn=>{K(void 0),W(rn?E.id:void 0)},onOpen:()=>{if(W(void 0),Me.has(E.id)){m?.();return}s?.(E.id)},onDeleteSession:()=>{re(void 0),fe({id:E.id,title:String(g[E.id]?.displayTitle??g[E.id]?.title??E.title)})},...o===void 0?{}:{renameSession:o},...a===void 0?{}:{archiveSession:a},...l===void 0?{}:{unarchiveSession:l},...y===void 0?{}:{forkSession:y}},E.id))]},C.id===""?"ungrouped":C.id)})]})})]})}),(0,v.jsx)(j.Modal,{open:O!==void 0,onClose:()=>{_||(z(void 0),U(void 0))},closeLabel:n("session.archiveGroupClose"),title:n("session.archiveGroup"),...O===void 0?{}:{description:n("session.archiveGroupDescription",{name:O.name,count:O.sessionIds.length})},footer:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(j.Button,{variant:"outline",className:"dsh-st-modal-action",disabled:_,onClick:()=>{z(void 0),U(void 0)},children:n("session.archiveGroupCancel")}),(0,v.jsx)(j.Button,{variant:"outline",className:"dsh-st-modal-action dsh-st-btn-danger",disabled:_,onClick:jo,children:n("session.archiveGroupConfirm")})]}),children:_||pe!==void 0?(0,v.jsxs)(v.Fragment,{children:[_&&(0,v.jsx)("div",{className:"dsh-st-n-dialog-status",role:"status",children:n("session.archiveGroupPending")}),pe!==void 0&&(0,v.jsx)("div",{className:"dsh-st-n-dialog-error",role:"alert",children:n("session.archiveGroupFailed",{message:pe})})]}):void 0}),(0,v.jsx)(j.Modal,{open:M!==void 0,onClose:()=>{x||(G(void 0),ne(void 0))},closeLabel:n("session.unarchiveGroupClose"),title:n("session.unarchiveGroup"),...M===void 0?{}:{description:n("session.unarchiveGroupDescription",{name:M.name,count:M.sessionIds.length})},footer:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(j.Button,{variant:"outline",className:"dsh-st-modal-action",disabled:x,onClick:()=>{G(void 0),ne(void 0)},children:n("session.unarchiveGroupCancel")}),(0,v.jsx)(j.Button,{variant:"primary",className:"dsh-st-modal-action",disabled:x,onClick:qo,children:n("session.unarchiveGroupConfirm")})]}),children:x||q!==void 0?(0,v.jsxs)(v.Fragment,{children:[x&&(0,v.jsx)("div",{className:"dsh-st-n-dialog-status",role:"status",children:n("session.unarchiveGroupPending")}),q!==void 0&&(0,v.jsx)("div",{className:"dsh-st-n-dialog-error",role:"alert",children:n("session.unarchiveGroupFailed",{message:q})})]}):void 0}),(0,v.jsx)(j.Modal,{open:te!==void 0,onClose:()=>{xe||(fe(void 0),re(void 0))},closeLabel:n("session.deleteSessionClose"),title:n("session.deleteSession"),...te===void 0?{}:{description:n("session.deleteSessionDescription",{name:te.title})},footer:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(j.Button,{variant:"outline",className:"dsh-st-modal-action",disabled:xe,onClick:()=>{fe(void 0),re(void 0)},children:n("session.deleteSessionCancel")}),(0,v.jsx)(j.Button,{variant:"outline",className:"dsh-st-modal-action dsh-st-btn-danger",disabled:xe,onClick:Zo,children:n("session.deleteSessionConfirm")})]}),children:xe||J!==void 0?(0,v.jsxs)(v.Fragment,{children:[xe&&(0,v.jsx)("div",{className:"dsh-st-n-dialog-status",role:"status",children:n("session.deleteSessionPending")}),J!==void 0&&(0,v.jsx)("div",{className:"dsh-st-n-dialog-error",role:"alert",children:n("session.deleteSessionFailed",{message:J})})]}):void 0})]})}function $r(e){let{t:n,id:t,name:s,expanded:r,hasCurrentSession:i,menuOpen:o,canArchiveGroup:a,canUnarchiveGroup:l,showTaskSettings:c,onToggle:y,onMenuChange:m,onTaskSettings:T,onArchiveGroup:A,onUnarchiveGroup:f}=e,p=[...c?[{id:"task-settings",label:n("session.taskSettings"),icon:(0,v.jsx)(bs,{size:16})}]:[],...a?[...c?[{type:"separator",id:"archive-separator"}]:[],{id:"archive-group",label:n("session.archiveGroup"),icon:(0,v.jsx)(_e,{size:16}),danger:!0}]:[],...l?[...c&&!a?[{type:"separator",id:"unarchive-separator"}]:[],{id:"unarchive-group",label:n("session.unarchiveGroup"),icon:(0,v.jsx)(Qn,{size:16})}]:[]],u="dsh-st-n-row"+(i?" has-current-session":"")+(o?" is-menu":"");return(0,v.jsxs)("div",{className:u,role:"treeitem","aria-expanded":r,"data-n-group":t,onClick:y,children:[(0,v.jsx)("span",{className:"dsh-st-n-slot dsh-st-n-folder",children:r?(0,v.jsx)(Ts,{size:16}):(0,v.jsx)(ze,{size:16})}),(0,v.jsx)("span",{className:"dsh-st-n-slot dsh-st-n-chevron",children:(0,v.jsx)(As,{size:14,className:"dsh-st-n-arrow"+(r?" is-open":"")})}),(0,v.jsx)("span",{className:"dsh-st-n-project-text",children:(0,v.jsx)("span",{className:"dsh-st-n-title",children:s})}),(0,v.jsx)("span",{className:"dsh-st-n-acts",children:(0,v.jsx)(j.Menu,{open:o,onClose:()=>{m(!1)},items:p,onSelect:g=>{m(!1),g==="task-settings"&&T(),g==="archive-group"&&A(),g==="unarchive-group"&&f?.()},portal:!0,closeOnPointerLeave:!0,anchor:(0,v.jsx)(j.Tooltip,{label:n("session.groupActions",{name:s}),side:"bottom",delayMs:500,portal:!0,children:(0,v.jsx)("button",{type:"button",className:"dsh-st-n-ico","aria-label":n("session.groupActions",{name:s}),onMouseDown:g=>{g.stopPropagation()},onClick:g=>{g.stopPropagation(),m(!o)},children:(0,v.jsx)(Ye,{size:16})})})})})]})}function Kr(e){let{t:n,flat:t,id:s,title:r,hoverTitle:i,updatedAt:o,running:a,archived:l,selected:c,menuOpen:y,canDelete:m,canUnarchive:T,hoverStatuses:A,renderSlot:f,onMenuChange:p,onOpen:u,onDeleteSession:g,renameSession:h,archiveSession:S,unarchiveSession:R,forkSession:L}=e,H=lo(t,a),ae=(0,P.useRef)(null),de=(0,P.useRef)(null),[W,se]=(0,P.useState)(!1),[K,O]=(0,P.useState)({}),z=(0,P.useRef)(void 0),_=(0,P.useRef)(null),oe=(0,P.useRef)({id:0});(0,P.useEffect)(()=>()=>{ft(_.current,oe.current)},[]);let[pe,U]=(0,P.useState)(!1),[M,G]=(0,P.useState)(r);(0,P.useEffect)(()=>{G(r)},[r]),(0,P.useEffect)(()=>{if(typeof j.HoverCard=="function"||!W||y)return;let d=()=>{let I=ae.current?.getBoundingClientRect(),B=de.current;if(I===void 0)return;let Ce=B===null?{width:220,height:96}:{width:B.offsetWidth,height:B.offsetHeight};O(fo({right:I.right,top:I.top},Ce,{width:window.innerWidth,height:window.innerHeight}))};return d(),window.addEventListener("resize",d),document.addEventListener("scroll",d,!0),()=>{window.removeEventListener("resize",d),document.removeEventListener("scroll",d,!0)}},[W,y,r,o,a]),(0,P.useEffect)(()=>()=>{z.current!==void 0&&window.clearTimeout(z.current)},[]);let x=d=>{Promise.resolve(d()).catch(()=>{})},V=()=>{typeof j.HoverCard=="function"||y||(z.current!==void 0&&window.clearTimeout(z.current),z.current=window.setTimeout(()=>se(!0),500))},q=()=>{z.current!==void 0&&window.clearTimeout(z.current),se(!1)},ne="dsh-st-n-sess"+(c?" is-on":"")+(y?" is-menu":"")+(H?" is-flat-idle":"")+(l?" is-archived":"");if(pe)return(0,v.jsx)("div",{className:ne,ref:ae,children:(0,v.jsx)("input",{className:"dsh-st-n-rename",value:M,autoFocus:!0,"aria-label":n("session.rename"),onChange:d=>G(d.target.value),onClick:d=>d.stopPropagation(),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),U(!1),M.trim()!==""&&M.trim()!==r&&x(()=>h?.(s,M.trim()))),d.key==="Escape"&&(d.preventDefault(),U(!1),G(r))},onBlur:()=>{U(!1),M.trim()!==""&&M.trim()!==r&&x(()=>h?.(s,M.trim()))}})});let te=(i??r).trim()||r,fe=f!==void 0?["pin","rename","fork","archive","session-id","archive-manager.delete-session"].map(d=>f("sidebar.workspaces.session.menu.item",{sessionId:s,displayTitle:te},{hookContext:[y,I=>p(I)],only:d})).filter(Boolean):void 0,ge=fe!==void 0&&fe.some(Boolean)?l&&m?[{id:"delete-session",label:n("session.deleteSession"),icon:(0,v.jsx)(Yn,{}),danger:!0}]:[]:[...io({canDelete:m,archived:l,canUnarchive:T}).map(d=>d==="rename"?{id:d,label:n("session.rename"),icon:(0,v.jsx)(Ss,{})}:d==="fork"?{id:d,label:n("session.fork"),icon:(0,v.jsx)(ws,{})}:d==="archive"?{id:d,label:n("session.archive"),icon:(0,v.jsx)(_e,{size:16})}:d==="unarchive"?{id:d,label:n("session.unarchive"),icon:(0,v.jsx)(Qn,{size:16})}:{id:d,label:n("session.deleteSession"),icon:(0,v.jsx)(Yn,{}),danger:!0}),{id:"session-id",label:n("session.copySessionId"),icon:(0,v.jsx)(Is,{size:16})}],J=A.find(d=>d.state!=="archived"),re=!l&&J!==void 0&&J.state!=="idle",ye=J?.trailing,we=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{className:"dsh-st-n-hover-title",children:te}),(0,v.jsx)("div",{className:"dsh-st-n-hover-time",children:wo(o,n)}),A.map(d=>(0,v.jsxs)("div",{className:"dsh-st-n-hover-state",children:[d.state==="archived"?(0,v.jsx)(_e,{size:14}):(0,v.jsx)(j.StateDot,{state:d.state==="ongoing"?"ongoing":d.state==="warning"?"warning":d.state==="done"?"done":"idle",size:10}),d.label]},d.label))]}),k=(0,v.jsxs)("div",{className:ne,ref:ae,role:"treeitem",tabIndex:0,"aria-selected":c,"data-n-menu-root":s,onClick:u,onMouseEnter:()=>{vo(_.current,oe.current),V()},onMouseLeave:()=>{ft(_.current,oe.current),q()},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),u())},onContextMenu:d=>{d.preventDefault(),d.stopPropagation(),q(),p(!0)},children:[!H&&(0,v.jsx)("span",{className:"dsh-st-n-slot",children:re&&J!==void 0?(0,v.jsx)(j.StateDot,{state:J.state==="ongoing"?"ongoing":J.state==="warning"?"warning":"done",size:10}):a?(0,v.jsx)(j.StateDot,{state:"ongoing",size:10}):null}),(0,v.jsx)("span",{ref:_,className:"dsh-st-n-title",onDoubleClick:d=>{h!==void 0&&(d.stopPropagation(),U(!0))},children:r}),(0,v.jsx)("span",{className:"dsh-st-n-time","aria-hidden":ye===void 0?void 0:!0,children:ye??bo(o,n)}),(0,v.jsxs)("span",{className:"dsh-st-n-acts",children:[fe===void 0&&l&&T&&(0,v.jsx)("button",{type:"button",className:"dsh-st-n-restore",onMouseDown:d=>{d.stopPropagation()},onClick:d=>{d.stopPropagation(),x(()=>R?.(s))},children:n("session.unarchive")}),(0,v.jsx)(j.Menu,{open:y,onClose:()=>{p(!1)},items:ge,onSelect:d=>{p(!1),d==="rename"&&U(!0),d==="fork"&&x(()=>L?.(s)),d==="archive"&&x(()=>S?.(s)),d==="unarchive"&&x(()=>R?.(s)),d==="session-id"&&navigator.clipboard?.writeText(s),d==="delete-session"&&g?.()},portal:!0,closeOnPointerLeave:!0,anchor:(0,v.jsx)(j.Tooltip,{label:n("session.moreActions",{title:r}),side:"bottom",delayMs:500,portal:!0,children:(0,v.jsx)("button",{type:"button",className:"dsh-st-n-ico","aria-label":n("session.moreActions",{title:r}),onMouseDown:d=>{d.stopPropagation()},onClick:d=>{d.stopPropagation(),q(),p(!y)},children:(0,v.jsx)(Ye,{size:16})})}),children:fe}),mo(f,"sidebar.workspaces.session.row.action",{sessionId:s,displayTitle:te},{only:"archive"})]}),typeof j.HoverCard!="function"&&W&&!y&&typeof document<"u"&&(0,Ao.createPortal)((0,v.jsx)("div",{ref:de,className:"dsh-st-n-hover",style:K,onMouseEnter:V,onMouseLeave:q,children:we}),document.body)]});return typeof j.HoverCard!="function"?k:(0,v.jsx)(j.HoverCard,{anchor:k,content:we,openDelayMs:800,disabled:y,copyText:te,copyLabel:n("session.copy"),copiedLabel:n("session.copied")})}var F=require("react"),Hn=require("@deepseek-ai/dsh-client-ui-primitives");var N=require("react/jsx-runtime"),Io=[],Co=e=>()=>{},sn="dsh-st-shell-panel",ht=class extends F.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(n){console.warn("[dsh-automation] official workspace tree crashed",n)}render(){return this.state.failed?this.props.fallback:this.props.children}};function No({t:e,runtime:n,openSession:t,openTaskSettings:s,view:r,showViewSwitch:i=!0}){let o=(0,F.useSyncExternalStore)(n.source.subscribe,n.source.getSnapshot,n.source.getSnapshot),[a,l]=(0,F.useState)({}),[c,y]=(0,F.useState)("runs"),m=r??c,T=o.snapshot,A=(0,F.useMemo)(()=>T===void 0?[]:vn(T.automations,T.runs),[T]);return(0,N.jsxs)("div",{className:"dsh-st-rail",children:[i&&(0,N.jsx)("div",{className:"dsh-st-n-views-wrap",children:(0,N.jsx)(Pn,{t:e,view:m,onChange:y})}),(0,N.jsx)("div",{id:Ke,role:"tabpanel",className:"dsh-st-rail-panel",children:m==="overview"?T===void 0?(0,N.jsx)("div",{className:"dsh-st-rail-empty",children:o.phase==="loading"?e("loading"):e("overview.empty")}):(0,N.jsx)(Dn,{t:e,automations:T.automations,onToggleAutomation:(f,p)=>n.mutateAutomation(f,p),...s===void 0?{}:{openTaskSettings:s},...T.serverNow===void 0?{}:{serverNow:T.serverNow}}):(0,N.jsxs)(N.Fragment,{children:[o.phase==="loading"&&A.length===0&&(0,N.jsx)("div",{className:"dsh-st-rail-empty",children:e("loading")}),A.length===0&&o.phase!=="loading"&&(0,N.jsx)("div",{className:"dsh-st-rail-empty",children:e("sidebar.empty")}),A.map(f=>(0,N.jsxs)("section",{className:"dsh-st-rail-group",children:[(0,N.jsxs)("button",{type:"button",className:"dsh-st-rail-head",onClick:()=>l(p=>({...p,[f.id]:!p[f.id]})),children:[(0,N.jsx)("span",{className:"dsh-st-rail-folder",children:(0,N.jsx)(Ie,{size:16})}),(0,N.jsx)("span",{className:"dsh-st-rail-title",children:f.name})]}),a[f.id]!==!0&&f.sessions.map(p=>(0,N.jsxs)("button",{type:"button",className:"dsh-st-rail-session",onClick:()=>t?.(p.id),children:[(0,N.jsx)("span",{children:p.label}),p.running&&(0,N.jsx)(Hn.StateDot,{state:"ongoing",size:10})]},p.id))]},f.id))]})})]})}function Ro({t:e,runtime:n,officialTree:t,hostProps:s,openSession:r,openTaskSettings:i,useSessions:o,useWorkspaces:a,renderSlot:l,hasChannels:c,subscribeChannels:y,tabRegistry:m,wide:T}){let A=t,[f,p]=(0,F.useState)(()=>{try{return Zt(window.localStorage.getItem(Xn))}catch{return"tasks"}}),u=(0,F.useSyncExternalStore)(m?.subscribe??Co,()=>m?.getTabs()??Io,()=>Io),g=(0,F.useSyncExternalStore)(y??Co,()=>{try{return c?.()===!0}catch{return!1}},()=>!1),h=o?.(x=>Xe(x)),S=(0,F.useSyncExternalStore)(n.source.subscribe,n.source.getSnapshot,n.source.getSnapshot),R=(0,F.useMemo)(()=>jt(S.snapshot?.runs),[S.snapshot]),L=(0,F.useRef)(null);(0,F.useEffect)(()=>{if(!wn(h,S.snapshot?.runs)){L.current=null;return}L.current!==h&&(L.current=h??null,n.refresh().catch(()=>{}))},[S.snapshot?.runs,h,n]);let H=(0,F.useCallback)((x,V)=>o===void 0?x({ids:[],byId:{}}):o(q=>x(ts(q,R)),V),[o,R]),ae=(0,F.useCallback)((x,V)=>a===void 0?x({items:[],archivedSessionIds:[]}):a(q=>x(as(q,R)),V),[a,R]);(0,F.useEffect)(()=>{try{window.localStorage.setItem(Xn,f)}catch{}},[f]),(0,F.useEffect)(()=>{let x=V=>{let q=V.target instanceof Element?V.target.closest("button"):null;if(q===null)return;let ne=`${q.textContent??""} ${q.getAttribute("aria-label")??""}`;/新会话|新建任务|New chat|New session/i.test(ne)&&p("tasks")};return document.addEventListener("click",x,!0),()=>document.removeEventListener("click",x,!0)},[]);let de=(0,F.useRef)(h),W=(0,F.useRef)(!1);(0,F.useEffect)(()=>{let x=Qt(h??void 0,R);if(!W.current){W.current=!0,de.current=h,x==="tasks"&&p("tasks");return}let V=de.current;if(de.current=h,!Xt(V,h))return;let q=u.map(te=>te.id);x==="tasks"&&p("tasks"),x==="channels"&&(g||q.includes("channels"))&&p("channels");let ne=u.find(te=>h!=null&&te.matchSession?.(String(h))===!0);ne!==void 0&&ne.id!=="schedule"&&p(ne.id)},[h,g,u,R]);let se={...s??{},...T===void 0?{}:{wide:T}},K={...se,...o===void 0?{}:{useSessions:H},...a===void 0?{}:{useWorkspaces:ae}},O=x=>A===void 0?(0,N.jsx)(jr,{t:e,...r===void 0?{}:{openSession:r},...o===void 0?{}:{useSessions:H},...a===void 0?{}:{useWorkspaces:a}}):(0,N.jsx)(ht,{fallback:(0,F.createElement)(A,se),children:(0,F.createElement)(A,x)});if(T===!1)return(0,N.jsx)(N.Fragment,{children:O(K)});let z=(0,F.useMemo)(()=>u.filter(x=>x.id!=="schedule"),[u]),_=Yt({tab:f,channelsReady:g,extraTabIds:Jt({extraTabIds:z.map(x=>x.id),channelsReady:g})}),oe=u.find(x=>x.id==="schedule"),pe=oe===void 0?(0,N.jsx)(On,{t:e,runtime:n,...r===void 0?{}:{openSession:r},...i===void 0?{}:{openTaskSettings:i},...o===void 0?{}:{useSessions:o},...a===void 0?{}:{useWorkspaces:a},...l===void 0?{}:{renderSlot:l},...En(s),...typeof s?.useSessionStatus=="function"?{useSessionStatus:s.useSessionStatus}:{}}):oe.render({...s??{},openSession:r,open:r,useSessions:o,wide:!0}),U=(0,F.useMemo)(()=>{let x=[{value:"tasks",id:"dsh-st-tab-tasks",panelId:sn,label:(0,N.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,N.jsx)(ze,{size:14}),(0,N.jsx)("span",{children:e("sidebar.tasksTab")})]})}];for(let V of z){if(V.id==="tasks")continue;let q=V.id==="channels"?(0,N.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,N.jsx)("svg",{viewBox:"0 0 16 16",width:14,height:14,fill:"none","aria-hidden":"true",children:(0,N.jsx)("path",{fill:"currentColor",d:"M2.15 2.9h11.7v8.2H6.42L2.15 13.85V2.9Zm1.4 1.4v6.62l1.78-1.12h7.12V4.3H3.55Z"})}),(0,N.jsx)("span",{children:V.label})]}):V.label;x.push({value:V.id,id:"dsh-st-tab-"+V.id,panelId:sn,label:q})}return g&&z.every(V=>V.id!=="channels")&&x.push({value:"channels",id:"dsh-st-tab-channels",panelId:sn,label:(0,N.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,N.jsx)("svg",{viewBox:"0 0 16 16",width:14,height:14,fill:"none","aria-hidden":"true",children:(0,N.jsx)("path",{fill:"currentColor",d:"M2.15 2.9h11.7v8.2H6.42L2.15 13.85V2.9Zm1.4 1.4v6.62l1.78-1.12h7.12V4.3H3.55Z"})}),(0,N.jsx)("span",{children:e("sidebar.channelsTab")})]})}),x.push({value:"schedule",id:"dsh-st-tab-schedule",panelId:sn,label:(0,N.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,N.jsx)(Ie,{size:14}),(0,N.jsx)("span",{children:e("sidebar.tab")})]})}),x},[g,z,e]),M=_==="schedule"||_==="channels"?void 0:z.find(x=>x.id===_),G=M!==void 0||_==="schedule"||_==="channels"?"dsh-st-shell-body":"dsh-st-official-tree";return(0,N.jsxs)("div",{className:"dsh-st-shell-rail",children:[(0,N.jsx)("div",{className:"dsh-st-shell-tabs-wrap",children:(0,N.jsx)(Hn.SegmentedTabs,{className:"dsh-st-shell-segmented-tabs",label:e("sidebar.tabs"),value:_,onChange:x=>p(x),items:U})}),(0,N.jsx)("div",{id:sn,role:"tabpanel",className:G,children:_==="schedule"?pe:M!==void 0?M.render({...s??{},openSession:r,open:r,useSessions:o,wide:!0}):_==="channels"?l?.("sidebar.channels",{...s??{},openSession:r,open:r,useSessions:o,wide:!0,skin:"native"}):O(K)})]})}function jr({t:e,openSession:n,useSessions:t,useWorkspaces:s}){let r=t===void 0?{ids:[],byId:{}}:t(l=>l??{ids:[],byId:{}}),i=s===void 0?void 0:s(l=>l??{items:[],archivedSessionIds:[]}),o=qt(r,i,e("sidebar.ungrouped")),a=Xe(r);return o.length===0?(0,N.jsx)("div",{className:"dsh-st-rail-empty",children:e("sidebar.tasksEmpty")}):(0,N.jsx)("div",{className:"dsh-st-rail",children:o.map(l=>(0,N.jsxs)("section",{className:"dsh-st-rail-group",children:[(0,N.jsx)("div",{className:"dsh-st-rail-head is-static",children:(0,N.jsx)("span",{className:"dsh-st-rail-title",children:l.label})}),l.sessions.map(c=>(0,N.jsx)("button",{type:"button",className:`dsh-st-rail-session${a===c.id?" is-on":""}`,onClick:()=>{c.id!==void 0&&n?.(c.id)},children:(0,N.jsx)("span",{children:c.title||c.id})},c.id))]},l.id||"ungrouped"))})}var Eo="dsh-automation-styles",Fn="@michengai/dsh-automation",Mo=`
259
4
  .dsh-st-shell{container-type:inline-size;min-width:0;box-sizing:border-box;max-width:1080px;width:100%;margin:0 auto;padding:0 0 32px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family,system-ui)}
260
5
  .dsh-st-top{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-bottom:12px}
261
6
  .dsh-st-heading h1,.dsh-st-top h1{margin:0;font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.4px;white-space:nowrap}
262
- .dsh-st-heading-row{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}.dsh-st-heading-links{display:inline-flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
7
+ .dsh-st-heading-row{display:flex;align-items:center;gap:8px 12px;min-width:0;flex-wrap:wrap}
8
+ .dsh-st-heading-links{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
9
+ .dsh-st-heading-links>span[data-mpi-check]{display:inline-flex;align-items:center}
263
10
  .dsh-st-heading p,.dsh-st-top p{margin:12px 0 0;max-width:none;color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:22px}
264
11
  .dsh-st-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px}
265
12
  .dsh-st-search{flex:1;min-width:0;max-width:280px}
@@ -268,87 +15,77 @@ ${i}
268
15
  .dsh-st-examples{margin-bottom:22px}
269
16
  .dsh-st-examples-head h2{margin:0 0 10px;font-size:13px;font-weight:600;color:var(--dsw-alias-label-secondary)}
270
17
  .dsh-st-example-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
271
- .dsh-st-example{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:132px;padding:14px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,.03));color:inherit;text-align:left;cursor:pointer}
272
- .dsh-st-example:hover{border-color:rgba(75,124,255,.45)}
18
+ .dsh-st-example{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:132px;padding:14px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md,12px);background:var(--dsw-alias-bg-layer-2);color:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}
19
+ .dsh-st-example:hover{border-color:var(--dsw-alias-border-inverted,rgba(255,255,255,.18));background:var(--dsw-alias-bg-layer-3)}
273
20
  .dsh-st-example strong{font-size:14px}
274
21
  .dsh-st-example p{margin:0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
275
- .dsh-st-tabs{display:flex;align-items:center;justify-content:space-between;gap:16px;height:40px;margin:4px 0 16px;flex-wrap:nowrap;border-bottom:1px solid var(--dsw-alias-border-l2,rgba(255,255,255,.12))}
276
- .dsh-st-settings-tabs{flex:0 0 auto;width:max-content;min-width:max-content;height:40px}
277
- .dsh-st-settings-tabs.ant-tabs{width:max-content!important}
278
- .dsh-st-settings-tabs .ant-tabs-nav,.dsh-st-settings-tabs .ant-tabs-nav-wrap{overflow:visible}
279
- .dsh-st-settings-tabs .ant-tabs-nav-operations{display:none}
280
- .dsh-st-settings-tabs .ant-tabs-nav{margin:0;height:40px}
281
- .dsh-st-settings-tabs .ant-tabs-nav::before{border-bottom:0}
282
- .dsh-st-settings-tabs .ant-tabs-tab{height:40px;padding:0;display:flex;align-items:center}
283
- .dsh-st-settings-tabs .ant-tabs-tab-btn{color:var(--dsw-alias-label-secondary);font-size:14px;line-height:22px}
284
- .dsh-st-settings-tabs .ant-tabs-tab-active .ant-tabs-tab-btn{color:var(--dsw-alias-label-primary);font-weight:600}
285
- .dsh-st-settings-tabs .ant-tabs-ink-bar{background:var(--dsw-alias-label-primary)}
286
- .dsh-st-sort-wrap,.dsh-st-filters{display:flex;align-items:center;align-self:center;justify-content:flex-end;gap:8px;height:32px;margin:0 0 0 auto;min-width:0;flex:1 1 auto;flex-wrap:nowrap}
22
+ .dsh-st-tabs{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:40px;margin:4px 0 16px;flex-wrap:nowrap}
23
+ .dsh-st-settings-tabs{flex:0 0 auto}
24
+ .dsh-st-sort-wrap{display:flex;align-items:center;align-self:center;justify-content:flex-end;gap:8px;height:32px;margin:0 0 0 auto;min-width:0;flex:0 0 auto;flex-wrap:nowrap}
25
+ .dsh-st-filters{display:flex;align-items:center;align-self:center;justify-content:flex-end;gap:8px;height:32px;margin:0 0 0 auto;min-width:0;flex:0 0 auto;flex-wrap:nowrap}
26
+ .dsh-st-filters>*{margin:0 !important}
287
27
  .dsh-st-sort-select{width:168px;max-width:100%}
288
28
  .dsh-st-sort-default{display:block;width:100%;margin:4px 0 0;padding:6px 12px;border:0;border-top:1px solid var(--dsw-alias-border-l2,rgba(255,255,255,.12));background:transparent;color:inherit;text-align:left;cursor:pointer}
289
29
  .dsh-st-sort-default:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.06))}
290
30
  .dsh-st-sort-default:disabled{opacity:.55;cursor:default}
291
- .dsh-st-filters .ant-select{min-width:0}
292
- .dsh-st-filter-range,.dsh-st-filter-status{width:112px;flex:0 0 112px}
293
- .dsh-st-filter-task{width:200px;max-width:240px;flex:0 1 240px;min-width:120px}
294
- .dsh-st-filters .ant-select-content,.dsh-st-filters .ant-select-selector,.dsh-st-sort-select .ant-select-content,.dsh-st-sort-select .ant-select-selector{min-width:0;overflow:hidden}
295
- .dsh-st-filters .ant-select-selection-item,.dsh-st-sort-select .ant-select-selection-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
31
+ .dsh-st-filters .dsh-st-menu-select-wrap{width:auto !important;flex:0 0 auto !important;margin:0 !important}
296
32
  .dsh-st-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
297
- .dsh-st-card,.dsh-st-empty{position:relative;padding:16px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,.03))}
33
+ .dsh-st-card,.dsh-st-empty{position:relative;padding:16px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md,12px);background:var(--dsw-alias-bg-layer-2);transition:border-color .15s ease,background .15s ease}
298
34
  .dsh-st-card{cursor:pointer}
299
- .dsh-st-card:hover{border-color:rgba(75,124,255,.45)}
35
+ .dsh-st-card:hover{border-color:var(--dsw-alias-border-inverted,rgba(255,255,255,.18));background:var(--dsw-alias-bg-layer-3)}
300
36
  .dsh-st-card h3,.dsh-st-empty h3{margin:10px 0 6px;font-size:14px;font-weight:500}
301
37
  .dsh-st-card p,.dsh-st-empty p{margin:0 0 14px;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
302
38
  .dsh-st-card-head{display:flex;align-items:center;justify-content:space-between}
303
- .dsh-st-card-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:12px;border-top:1px dashed var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);font-size:12px}
304
- .dsh-st-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:999px;background:rgba(255,255,255,.06)}
39
+ .dsh-st-menu-select-wrap{position:relative;display:inline-flex;vertical-align:middle;max-width:100%}
40
+ .dsh-st-menu-select-trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:6px;height:32px;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px;cursor:pointer;user-select:none;transition:border-color .15s ease,background .15s ease;width:100%}
41
+ .dsh-st-menu-select-trigger:hover:not(:disabled){border-color:var(--dsw-alias-border-inverted,rgba(255,255,255,.2));background:var(--dsw-alias-interactive-bg-hover)}
42
+ .dsh-st-menu-select-trigger.is-open{border-color:var(--dsw-alias-state-business-primary,#4c8dff)}
43
+ .dsh-st-menu-select-trigger:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#4c8dff);outline-offset:2px}
44
+ .dsh-st-menu-select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
45
+ .dsh-st-menu-select-arrow{flex:none;color:var(--dsw-alias-label-tertiary)}
46
+ .dsh-st-card-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);font-size:12px}
47
+ .dsh-st-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:var(--dsw-radius-xs,4px);background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,.06))}
305
48
  .dsh-st-timeline{display:flex;flex-direction:column;gap:22px;padding-left:10px}
306
49
  .dsh-st-group{position:relative;padding-left:18px}
307
- .dsh-st-group:before{content:'';position:absolute;top:8px;bottom:0;left:4px;width:1px;background:rgba(255,255,255,.08)}
50
+ .dsh-st-group:before{content:'';position:absolute;top:8px;bottom:0;left:4px;width:1px;background:var(--dsw-alias-border-l2,rgba(255,255,255,.08))}
308
51
  .dsh-st-group h3{margin:0 0 10px;font-size:13px;font-weight:600}
309
52
  .dsh-st-run{position:relative;margin:0 0 12px}
310
- .dsh-st-run:after{content:'';position:absolute;top:6px;left:-18px;width:7px;height:7px;border-radius:50%;background:#34c759}
311
- .dsh-st-run.is-failed:after,.dsh-st-run.is-interrupted:after{background:#ff6b6b}
312
- .dsh-st-run.is-queued:after,.dsh-st-run.is-skipped:after,.dsh-st-run.is-cancelled:after{background:#8b8f98}
53
+ .dsh-st-run:after{content:'';position:absolute;top:6px;left:-18px;width:7px;height:7px;border-radius:50%;background:var(--dsw-alias-state-success-primary,#34c759)}
54
+ .dsh-st-run.is-failed:after,.dsh-st-run.is-interrupted:after{background:var(--dsw-alias-state-danger-primary,#ff6b6b)}
55
+ .dsh-st-run.is-queued:after,.dsh-st-run.is-skipped:after,.dsh-st-run.is-cancelled:after{background:var(--dsw-alias-label-tertiary,#8b8f98)}
313
56
  .dsh-st-run strong{display:block;margin-bottom:4px;font-size:14px}
314
57
  .dsh-st-run p{display:flex;gap:10px;margin:0;color:var(--dsw-alias-label-tertiary);font-size:12px}
315
- .dsh-st-error{color:#ff6b6b;font-size:12px}
58
+ .dsh-st-error{color:var(--dsw-alias-state-danger-primary,#ff6b6b);font-size:12px}
316
59
  .dsh-st-workspace-empty{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
317
60
  .dsh-st-workspace-note{color:var(--dsw-alias-state-warning-primary,#d29922);font-size:12px;line-height:1.5}
318
- .dsh-st-add-workspace.ant-btn,
319
- .ant-select-dropdown .dsh-st-add-workspace.ant-btn,
320
- .ant-select-dropdown .dsh-st-add-workspace.ant-btn span,
321
- .ant-select-dropdown .dsh-st-add-workspace.ant-btn .ant-btn-icon,
322
- .dsh-st-add-workspace.ant-btn svg{--ant-btn-text-color:var(--dsw-alias-link,#4176e6);--ant-btn-text-color-hover:var(--dsw-alias-link,#4176e6);--ant-btn-text-color-active:var(--dsw-alias-link,#4176e6);color:var(--dsw-alias-link,#4176e6) !important;font-weight:550}
323
- .dsh-st-add-workspace.ant-btn:not(:disabled):hover,
324
- .dsh-st-add-workspace.ant-btn:not(:disabled):active,
325
- .ant-select-dropdown .dsh-st-add-workspace.ant-btn:hover{color:var(--dsw-alias-link,#4176e6) !important}
326
61
  .dsh-st-muted{color:var(--dsw-alias-label-secondary)}
327
- .dsh-st-form{display:flex;flex-direction:column;gap:12px}.dsh-st-form>p{margin:0;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.5}
328
- .dsh-st-field{display:flex;flex-direction:column;gap:6px;min-width:0;max-width:100%;font-size:13px}
329
- .dsh-st-field>.ant-input,.dsh-st-field>.ant-input-affix-wrapper,.dsh-st-field>.ant-input-textarea{width:100%}
330
- .dsh-st-plan-row{display:flex;align-items:flex-start;gap:16px}.dsh-st-plan-row>.dsh-st-field:first-child{flex:1;min-width:0}.dsh-st-concurrency{flex:0 0 128px}
331
- .dsh-st-inline{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.dsh-st-inline>.ant-select{flex:0 1 180px;width:auto;min-width:120px}
332
- .dsh-st-amount{flex:none;display:inline-flex;width:128px}
333
- .dsh-st-amount .ant-input-group-wrapper,.dsh-st-amount .ant-input{width:100%}
62
+ .dsh-st-form{display:flex;flex-direction:column;gap:16px}.dsh-st-form>p{margin:0;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.5}
63
+ .dsh-st-field{display:flex;flex-direction:column;gap:6px;min-width:0;max-width:100%;font-size:13px;color:var(--dsw-alias-label-secondary);font-weight:500}
64
+ .dsh-st-field>input,.dsh-st-field>:last-child,.dsh-st-weekdays{width:100%;max-width:100%}
65
+ .dsh-st-weekdays{display:flex;flex-wrap:wrap;gap:8px 12px;width:auto}
66
+ .dsh-st-plan-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 16px;align-items:start}.dsh-st-concurrency{min-width:0}
67
+ .dsh-st-inline{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;width:100%}.dsh-st-form .dsh-st-inline>.dsh-st-menu-select-wrap,.dsh-st-form .dsh-st-inline>.dsh-st-menu-select-wrap>span{display:flex;flex:1 1 120px;width:auto;min-width:0;height:auto;padding:0;margin:0;border:0}
68
+ .dsh-st-amount{flex:none;display:inline-flex;align-items:center;gap:6px;width:128px}
69
+ .dsh-st-amount input{width:100%;min-width:0}
334
70
  .dsh-st-plan-hint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5}
335
- .dsh-st-time{display:inline-flex;align-items:center;gap:6px;flex:none}.dsh-st-time .ant-select{width:88px;flex:none}.dsh-st-time-sep{color:var(--dsw-alias-label-secondary)}
71
+ .dsh-st-time{display:inline-flex;align-items:center;gap:6px;flex:none}.dsh-st-form .dsh-st-time .dsh-st-menu-select-wrap,.dsh-st-form .dsh-st-time .dsh-st-menu-select-wrap>span{width:64px;flex:none;min-width:64px}.dsh-st-time-sep{color:var(--dsw-alias-label-secondary)}
336
72
  .dsh-st-suffix{color:var(--dsw-alias-label-secondary);font-size:13px;white-space:nowrap}
337
- .dsh-st-settings{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}
73
+ .dsh-st-settings{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px}
338
74
  .dsh-st-picker-field{display:flex;min-width:0;flex-direction:column;gap:6px;font-size:13px}
339
- .dsh-st-picker-field>span{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:550}
340
- .dsh-st-settings .ant-select{width:100%;min-width:0}
341
- .dsh-st-settings .ant-select-selector{min-height:36px}
75
+ .dsh-st-picker-field>span{color:var(--dsw-alias-label-secondary);font-size:13px;font-weight:500}
76
+ .dsh-st-settings .dsh-st-menu-select-wrap,.dsh-st-settings .dsh-st-menu-select-wrap>span,.dsh-st-picker-field .dsh-st-menu-select-wrap,.dsh-st-picker-field .dsh-st-menu-select-wrap>span{display:flex;width:100%;min-width:0;height:auto;padding:0;margin:0;border:0}
77
+ .dsh-st-form .dsh-st-menu-select-trigger{width:100%;height:32px;min-width:0;justify-content:space-between}
78
+ .dsh-st-form-menu{box-sizing:border-box;width:max(var(--dsh-st-menu-width,144px),144px) !important;min-width:max(var(--dsh-st-menu-width,144px),144px) !important;max-width:360px !important}
342
79
  .dsh-st-prompt-label{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
343
80
  .dsh-st-prompt-label em{color:var(--dsw-alias-label-tertiary);font-size:12px;font-style:normal;font-weight:450}
344
- .dsh-st-prompt-card{position:relative;display:flex;flex-direction:column;flex:none;border:1px solid var(--dsw-alias-border-l2);border-radius:16px;background:rgba(255,255,255,.03);overflow:hidden}
81
+ .dsh-st-prompt-card{position:relative;display:flex;flex-direction:column;flex:none;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md,12px);background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,.03));overflow:hidden}
345
82
  .dsh-st-prompt-anchor{position:relative}
346
- .dsh-st-skill-menu{position:absolute;z-index:30;left:0;right:0;bottom:calc(100% + 6px);max-height:320px;margin:0;padding:4px;overflow:auto;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-1,#1c1c1c);box-shadow:0 8px 24px rgba(0,0,0,.28)}
83
+ .dsh-st-skill-menu{position:absolute;z-index:30;left:0;right:0;bottom:calc(100% + 6px);max-height:320px;margin:0;padding:4px;overflow:auto;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-specific-menu,var(--dsw-alias-bg-layer-1,#1c1c1c));backdrop-filter:var(--dsw-menu-backdrop-filter,blur(16px));box-shadow:0 8px 24px rgba(0,0,0,.28)}
347
84
  .dsh-st-skill-menu p{margin:6px 8px;color:var(--dsw-alias-label-tertiary);font-size:12px}
348
85
  .dsh-st-skill-menu button{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;border:0;border-radius:6px;background:transparent;color:inherit;padding:6px 8px;text-align:left;cursor:pointer}
349
86
  .dsh-st-skill-menu button[aria-selected="true"],.dsh-st-skill-menu button:hover{background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4b7cff) 16%,transparent)}
350
87
  .dsh-st-skill-menu code{color:var(--dsw-alias-label-tertiary);font-size:12px}
351
- .dsh-st-prompt-card textarea,.dsh-st-prompt-card .ant-input{position:relative;z-index:1;box-sizing:border-box;width:100%;margin:0;padding:14px 16px 8px !important;border:0;font-size:14px;line-height:1.65;letter-spacing:normal;resize:none;color:transparent !important;caret-color:var(--dsw-alias-label-primary,currentColor) !important;background:transparent !important}
88
+ .dsh-st-prompt-card textarea{position:relative;z-index:1;box-sizing:border-box;width:100%;margin:0;padding:14px 16px 8px !important;border:0;font-size:14px;line-height:1.65;letter-spacing:normal;resize:none;color:transparent !important;caret-color:var(--dsw-alias-label-primary,currentColor) !important;background:transparent !important}
352
89
  .dsh-st-prompt-card textarea::placeholder{color:var(--dsw-alias-label-tertiary)}
353
90
  .dsh-st-prompt-card textarea::selection{color:transparent;background:color-mix(in srgb,var(--dsw-alias-state-business-primary,#4b7cff) 28%,transparent)}
354
91
  .dsh-st-prompt-backdrop{position:absolute;z-index:0;inset:0;overflow:hidden;padding:14px 16px 8px;font-size:14px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;pointer-events:none;color:inherit}
@@ -356,16 +93,26 @@ ${i}
356
93
  .dsh-st-composer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 8px 6px}
357
94
  .dsh-st-composer-left,.dsh-st-composer-right{display:flex;align-items:center;gap:2px;min-width:0}
358
95
  .dsh-st-composer-left{flex:1}.dsh-st-composer-right{flex:none}
359
- .dsh-st-composer .ant-select{width:auto;max-width:200px}.dsh-st-composer .ant-btn{flex:none}
360
96
  @media(max-width:860px){.dsh-st-toolbar{flex-wrap:wrap}.dsh-st-search{flex-basis:100%;max-width:none}.dsh-st-grid,.dsh-st-example-row{grid-template-columns:1fr}.dsh-st-filters{width:100%;margin:8px 0}}
361
- .dsh-st-rail-views{margin:16px 8px 10px}
362
- .dsh-st-overview{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:2px 8px 14px}
97
+ .dsh-st-n-views-wrap{display:flex;flex:none;margin:2px 0 8px;padding:0;width:100%}
98
+ .dsh-st-n-views-wrap .dsh-st-rail-views{margin:0!important;width:100%!important}
99
+ .dsh-st-n-view-body{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column}
100
+ /* \u4EE5\u4E0B\u4E24\u6BB5\u8986\u76D6\u5BBF\u4E3B SegmentedTabs \u7684\u80F6\u56CA\u5916\u89C2\u3002\u9009\u62E9\u5668\u4F9D\u8D56\u539F\u8BED\u6E32\u67D3\u51FA\u7684\u7ED3\u6784\uFF1A
101
+ \u5BB9\u5668 [role=tablist] \u7684\u9996\u4E2A\u5B50\u5143\u7D20\u662F aria-hidden \u7684\u6ED1\u52A8\u6307\u793A\u5668\uFF0C\u5176\u540E\u624D\u662F\u5404 [role=tab]\u3002
102
+ \u5347\u7EA7 @deepseek-ai/dsh-client-ui-primitives \u65F6\u5FC5\u987B\u590D\u6838\u8BE5\u7ED3\u6784\uFF0C\u5426\u5219\u8FD9\u4E9B\u89C4\u5219\u4F1A\u9759\u9ED8\u5931\u6548\u3002 */
103
+ .dsh-st-rail-views{display:grid!important;width:100%;margin:0!important;padding:2px!important;background:color-mix(in srgb,var(--dsw-alias-label-primary,currentColor) 3%,transparent)!important;border-radius:8px!important;border:0.5px solid var(--dsw-alias-border-l1,rgba(255,255,255,.05))!important;box-sizing:border-box}
104
+ .dsh-st-rail-views>span[aria-hidden="true"]{inset:2px auto 2px 2px!important;border-radius:6px!important;border:0.5px solid var(--dsw-alias-border-l2,rgba(255,255,255,.08))!important;background:color-mix(in srgb,var(--dsw-alias-label-primary,currentColor) 8%,transparent)!important;border-color:color-mix(in srgb,var(--dsw-alias-label-primary,currentColor) 12%,transparent)!important;box-shadow:none!important}
105
+ .dsh-st-rail-views [role=tab]{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;height:26px!important;padding:0 6px!important;font-size:13px!important;line-height:18px!important;border-radius:6px!important;color:var(--dsw-alias-label-secondary,#8b8f98);font-weight:500;text-align:center!important}
106
+ .dsh-st-rail-views [role=tab]>*{display:inline-flex!important;align-items:center!important;justify-content:center!important}
107
+ .dsh-st-rail-views [role=tab]:hover{color:var(--dsw-alias-label-primary,inherit)}
108
+ .dsh-st-rail-views [role=tab][aria-selected=true]{color:var(--dsw-alias-label-primary,inherit)!important;font-weight:600}
109
+ .dsh-st-overview{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:2px 0 14px}
363
110
  .dsh-st-overview-head{display:flex;flex:none;align-items:center;justify-content:space-between;gap:8px;height:36px;min-height:36px;margin-bottom:4px;padding:6px 0}
364
111
  .dsh-st-overview-title{display:flex;align-items:baseline;min-width:0;gap:6px;color:var(--dsw-alias-label-tertiary,#81858C)}
365
112
  .dsh-st-overview-title strong{font-size:14px;font-weight:400;line-height:20px}
366
113
  .dsh-st-overview-title span{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,.1));color:var(--dsw-alias-label-tertiary,#8b8f98);font-size:11px;line-height:18px}
367
114
  .dsh-st-overview-sort{display:flex;align-items:center}
368
- .dsh-st-overview-row{position:relative;width:100%;min-height:56px;margin:0 0 8px;border:1px solid var(--dsw-alias-border-l2,rgba(255,255,255,.1));border-radius:9px;background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,.035));color:var(--dsw-alias-label-primary,inherit);box-shadow:inset 0 1px rgba(255,255,255,.025);transition:background .14s ease,border-color .14s ease;overflow:hidden}
115
+ .dsh-st-overview-row{position:relative;width:100%;min-height:56px;margin:0 0 8px;border:1px solid var(--dsw-alias-border-l2,rgba(255,255,255,.1));border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,.035));color:var(--dsw-alias-label-primary,inherit);box-shadow:inset 0 1px rgba(255,255,255,.025);transition:background .14s ease,border-color .14s ease;overflow:hidden}
369
116
  .dsh-st-overview-row:hover{border-color:var(--dsw-alias-border-inverted,rgba(255,255,255,.18));background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,.06))}
370
117
  .dsh-st-overview-open{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:18px 18px;align-items:center;gap:4px 8px;width:100%;min-height:56px;padding:8px 9px;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}
371
118
  .dsh-st-overview-open:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#4c8dff);outline-offset:-2px}
@@ -391,9 +138,13 @@ ${i}
391
138
  .dsh-st-rail-session span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
392
139
  .dsh-st-run-dot{flex:none;color:var(--dsw-static-deepseek-450,#4c8dff)}.dsh-st-run-dot-cell{fill:currentColor;opacity:.15;animation:dsh-st-run-chase 1s infinite}@keyframes dsh-st-run-chase{0%,12.4%{opacity:1}12.5%,24.9%{opacity:.6}25%,37.4%{opacity:.35}37.5%,100%{opacity:.15}}
393
140
  .dsh-st-shell-rail{display:flex;flex-direction:column;min-height:0;flex:1;height:100%;overflow:hidden}
394
- .dsh-st-shell-tabs{display:flex;flex:none;gap:18px;padding:6px 12px 0;border-bottom:1px solid var(--dsw-alias-border-l2,rgba(255,255,255,.08))}
395
- .dsh-st-shell-tabs button{appearance:none;border:0;background:transparent;color:var(--dsw-alias-label-secondary,#8b8f98);padding:8px 0 9px;font-size:13px;cursor:pointer}
396
- .dsh-st-shell-tabs button.is-on{color:var(--dsw-alias-label-primary,inherit);box-shadow:inset 0 -2px 0 currentColor}
141
+ .dsh-st-shell-tabs-wrap{display:flex;margin:2px var(--dsh-sidebar-inline-padding,12px) 8px 0;padding:0;width:auto}
142
+ .dsh-st-shell-tabs-wrap .dsh-st-shell-segmented-tabs{width:100%;background:color-mix(in srgb,var(--dsw-alias-label-primary,currentColor) 3%,transparent)!important;border-radius:8px!important;border:0.5px solid var(--dsw-alias-border-l1,rgba(255,255,255,.05))!important;box-sizing:border-box;padding:2px!important}
143
+ .dsh-st-shell-tabs-wrap .dsh-st-shell-segmented-tabs>span[aria-hidden="true"]{inset:2px auto 2px 2px!important;border-radius:6px!important;border:0.5px solid var(--dsw-alias-border-l2,rgba(255,255,255,.08))!important;background:color-mix(in srgb,var(--dsw-alias-label-primary,currentColor) 8%,transparent)!important;border-color:color-mix(in srgb,var(--dsw-alias-label-primary,currentColor) 12%,transparent)!important;box-shadow:none!important}
144
+ .dsh-st-shell-tabs-wrap .dsh-st-shell-segmented-tabs [role=tab]{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;height:26px!important;padding:0 6px!important;font-size:13px!important;line-height:18px!important;border-radius:6px!important;color:var(--dsw-alias-label-secondary,#8b8f98);text-align:center!important}
145
+ .dsh-st-shell-tabs-wrap .dsh-st-shell-segmented-tabs [role=tab]>*{display:inline-flex!important;align-items:center!important;justify-content:center!important}
146
+ .dsh-st-shell-tabs-wrap .dsh-st-shell-segmented-tabs [role=tab]:hover{color:var(--dsw-alias-label-primary,inherit)}
147
+ .dsh-st-shell-tabs-wrap .dsh-st-shell-segmented-tabs [role=tab][aria-selected=true]{color:var(--dsw-alias-label-primary,inherit)!important;font-weight:600}
397
148
  .dsh-st-shell-body{display:flex;min-height:0;flex:1;overflow:hidden}
398
149
  .dsh-st-shell-body>*{min-width:0;flex:1}.dsh-st-official-tree{display:flex;min-height:0;flex:1;overflow:hidden}.dsh-st-official-tree>*{min-width:0;flex:1}
399
150
  .dsh-st-rail-head.is-static{cursor:default;font-weight:600}
@@ -412,33 +163,26 @@ ${i}
412
163
  .dsh-st-n-arrow.is-open{transform:rotate(90deg)}
413
164
  .dsh-st-n-project-text{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}
414
165
  .dsh-st-n-sess:focus{outline:none}.dsh-st-n-sess:focus-visible:not(.is-on){box-shadow:inset 0 0 0 2px var(--dsw-alias-state-business-primary,#4c8dff)}
415
- .dsh-st-n-dialog-actions{display:flex;justify-content:flex-end;gap:8px}
416
166
  .dsh-st-n-dialog-copy{margin:0;color:var(--dsw-alias-label-secondary);font-size:14px;line-height:22px}
417
167
  .dsh-st-n-dialog-status{margin-top:12px;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}
418
168
  .dsh-st-n-dialog-error{margin-top:12px;color:var(--dsw-alias-state-error-primary,#f85149);font-size:13px;line-height:20px}
419
- .dsh-st-n-danger-button{color:var(--dsw-alias-state-error-primary,#f85149)!important}
420
- .dsh-st-n-danger-button:hover{background:var(--dsw-alias-interactive-bg-hover-danger,rgba(248,81,73,.12))!important}
169
+ .dsh-st-modal-action{min-width:72px}
170
+ .dsh-st-btn-danger:not(:disabled){color:var(--dsw-alias-state-error-primary,#ef7272)}
421
171
  .dsh-st-n-restore{flex:none;border:0;background:transparent;color:var(--dsw-alias-label-secondary,#c9cdd4);font:12px/16px inherit;padding:2px 4px;cursor:pointer}
422
172
  .dsh-st-n-sess.is-archived .dsh-st-n-title,.dsh-st-n-sess.is-archived .dsh-st-n-time{color:var(--dsw-alias-label-caption,#ADB2B8)}
423
173
  .dsh-st-n-sess .dsh-st-n-title[data-scrolled]{mask-image:linear-gradient(90deg,#0000,#000 12px)}
424
174
  .dsh-st-n-sess .dsh-st-n-title[data-clipped]{mask-image:linear-gradient(270deg,#0000,#000 12px)}
425
175
  .dsh-st-n-sess .dsh-st-n-title[data-scrolled][data-clipped]{mask-image:linear-gradient(90deg,#0000,#000 12px calc(100% - 12px),#0000)}
426
- `;function WO(){let e=document.getElementById(BO);if(e instanceof HTMLStyleElement)return e.textContent=HO,e.setAttribute("data-plugin",Jg),()=>{};let t=document.createElement("style");return t.id=BO,t.textContent=HO,t.setAttribute("data-plugin",Jg),document.head.append(t),()=>{t.remove()}}var VO="michengai-plugin-update-ui";function jO(e){let t=document.getElementById(VO);if(t instanceof HTMLStyleElement){t.getAttribute("data-plugin")===null&&t.setAttribute("data-plugin",Jg);return}let o=document.createElement("style");o.id=VO,o.textContent=e,o.setAttribute("data-plugin",Jg),(document.head??document.documentElement).append(o)}function $H(e,t){for(let o of t){let n=o.trim();if(n==="")continue;let r=e.find(i=>i.textContent?.replace(/\s+/g," ").trim()===n);if(r!==void 0)return r}}function IH(e){return e.find(o=>{let n=`${o.textContent??""} ${o.getAttribute("aria-label")??""}`.trim();return/(^|\s)(设置|settings)(\s|$)/i.test(n)})??(e.length===1?e[0]:void 0)}var eh,KO="[data-dcu-settings-trigger]",UO="[data-dcu-settings-page]",NH="dcu-settings-open-section";function PH(e){let t=document.querySelector(KO);if(t===null)return!1;let o=new CustomEvent(NH,{detail:{labels:[...e]},cancelable:!0});return!t.dispatchEvent(o)}function qO(e,t,o){if(typeof document>"u"||typeof window>"u"){o?.();return}if(PH(e)){t?.();return}let n=[...document.querySelectorAll('button[aria-haspopup="dialog"]')],r=IH(n),i=document.querySelector(KO),s=document.querySelector('[role="dialog"]')!==null,a=document.querySelector(UO)!==null;if(!s&&!a&&r===void 0&&i===null){o?.();return}eh?.(),!s&&!a&&(i??r)?.click();let c,l=!1,d=new MutationObserver(()=>{p()}),u=()=>{l||(l=!0,d.disconnect(),window.clearTimeout(g),c!==void 0&&window.cancelAnimationFrame(c),eh===u&&(eh=void 0))},m=()=>{let f=[...document.querySelectorAll('[role="dialog"] nav button'),...document.querySelectorAll(`${UO} nav button`)],h=$H(f,e);return h===void 0?!1:(u(),h.click(),t?.(),!0)},p=()=>{l||c!==void 0||(c=window.requestAnimationFrame(()=>{c=void 0,m()}))},g=window.setTimeout(()=>{m()||(u(),o?.())},1500);d.observe(document.body,{childList:!0,subtree:!0}),eh=u,p()}var lt=M(require("react"),1),ZS=require("react-dom/client");function GO(e,t,o){return`dsh plugin${e.trim()===""?"":` --profile ${e.trim()}`} add ${t}@${o} --registry=https://registry.npmjs.org/`}function XO(e,t){return e.key!=="Escape"?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),t(),!0)}var TH="x-michengai-plugin-update",MH=`
176
+ .dsh-st-create-dialog{width:min(720px,100%) !important;max-height:100%}
177
+ `;function Po(){let e=document.getElementById(Eo);if(e instanceof HTMLStyleElement)return e.textContent=Mo,e.setAttribute("data-plugin",Fn),()=>{};let n=document.createElement("style");return n.id=Eo,n.textContent=Mo,n.setAttribute("data-plugin",Fn),document.head.append(n),()=>{n.remove()}}var Lo="michengai-plugin-update-ui";function Do(e){let n=document.getElementById(Lo);if(n instanceof HTMLStyleElement){n.getAttribute("data-plugin")===null&&n.setAttribute("data-plugin",Fn);return}let t=document.createElement("style");t.id=Lo,t.textContent=e,t.setAttribute("data-plugin",Fn),(document.head??document.documentElement).append(t)}function qr(e,n){for(let t of n){let s=t.trim();if(s==="")continue;let r=e.find(i=>i.textContent?.replace(/\s+/g," ").trim()===s);if(r!==void 0)return r}}function Zr(e){return e.find(t=>{let s=`${t.textContent??""} ${t.getAttribute("aria-label")??""}`.trim();return/(^|\s)(设置|settings)(\s|$)/i.test(s)})??(e.length===1?e[0]:void 0)}var Wn,Ho="[data-dcu-settings-trigger]",Oo="[data-dcu-settings-page]",Xr="dcu-settings-open-section";function Jr(e){let n=document.querySelector(Ho);if(n===null)return!1;let t=new CustomEvent(Xr,{detail:{labels:[...e]},cancelable:!0});return!n.dispatchEvent(t)}function Fo(e,n,t){if(typeof document>"u"||typeof window>"u"){t?.();return}if(Jr(e)){n?.();return}let s=[...document.querySelectorAll('button[aria-haspopup="dialog"]')],r=Zr(s),i=document.querySelector(Ho),o=document.querySelector('[role="dialog"]')!==null,a=document.querySelector(Oo)!==null;if(!o&&!a&&r===void 0&&i===null){t?.();return}Wn?.(),!o&&!a&&(i??r)?.click();let l,c=!1,y=new MutationObserver(()=>{A()}),m=()=>{c||(c=!0,y.disconnect(),window.clearTimeout(f),l!==void 0&&window.cancelAnimationFrame(l),Wn===m&&(Wn=void 0))},T=()=>{let p=[...document.querySelectorAll('[role="dialog"] nav button'),...document.querySelectorAll(`${Oo} nav button`)],u=qr(p,e);return u===void 0?!1:(m(),u.click(),n?.(),!0)},A=()=>{c||l!==void 0||(l=window.requestAnimationFrame(()=>{l=void 0,T()}))},f=window.setTimeout(()=>{T()||(m(),t?.())},1500);y.observe(document.body,{childList:!0,subtree:!0}),Wn=m,A()}var D=dn(require("react"),1),gt=require("react-dom/client"),Oe=require("@deepseek-ai/dsh-client-ui-primitives");function Wo(e,n,t){return`dsh plugin${e.trim()===""?"":` --profile ${e.trim()}`} add ${n}@${t} --registry=https://registry.npmjs.org/`}function _o(e,n){return e.key!=="Escape"?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),n(),!0)}var Yr="x-michengai-plugin-update",Qr=`
427
178
  .mpi-version{margin-left:8px;color:var(--dsw-alias-label-tertiary,#a0a0a0);font-family:inherit;font-size:12px;font-weight:500;line-height:18px;letter-spacing:0;white-space:nowrap;vertical-align:baseline}.mpi-check-host{display:inline-flex;align-items:center}.mpi-icon{display:inline-flex;flex:0 0 auto;width:16px;height:16px;align-items:center;justify-content:center;pointer-events:none}.mpi-icon svg{display:block;width:16px;height:16px}
428
- .mpi-intro{margin:0 0 16px;color:var(--dsw-alias-label-secondary,#b9b9b9);font-size:13px;line-height:20px}.mpi-meta{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 18px;margin:0 0 16px;font-size:12px;line-height:18px}.mpi-meta dt{color:var(--dsw-alias-label-secondary,#b9b9b9)}.mpi-meta dd{margin:0}.mpi-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.mpi-latest{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px}.mpi-status{font-size:13px;font-weight:600;line-height:18px}.mpi-status[data-kind=error]{color:var(--dsw-alias-state-error-primary,#ef7272)}.mpi-status[data-kind=success]{color:var(--dsw-alias-state-success-primary,#51b976)}.mpi-status[data-kind=update]{color:#e8b15a !important}.mpi-manual{border-top:1px solid var(--dsw-alias-border-l2,#494949);padding-top:16px}.mpi-manual h3{margin:0 0 6px;font-size:14px;line-height:20px}.mpi-manual p{margin:0 0 10px;color:var(--dsw-alias-label-secondary,#b9b9b9);font-size:12px;line-height:18px}.mpi-command{display:flex;align-items:flex-start;gap:8px;border:1px solid var(--dsw-alias-border-l2,#494949);border-radius:7px;padding:10px;background:var(--dsw-alias-bg-layer-3,var(--dsw-specific-menu-item-hover,#353638))}.mpi-command code{min-width:0;flex:1;overflow:visible;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:560px){.mpi-meta{grid-template-columns:1fr;gap:2px}.mpi-meta dd{margin-bottom:6px}}
429
- `,kH={check:"\u68C0\u67E5\u66F4\u65B0",update:"\u66F4\u65B0",close:"\u5173\u95ED",recheck:"\u91CD\u65B0\u68C0\u67E5",auto:"\u81EA\u52A8\u66F4\u65B0",updating:"\u6B63\u5728\u66F4\u65B0\u2026",copy:"\u590D\u5236\u547D\u4EE4",copied:"\u5DF2\u590D\u5236",copyFailed:"\u590D\u5236\u5931\u8D25",checking:"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0\u2026",latest:"\u5DF2\u662F\u6700\u65B0\u7248\u672C",found:"\u53D1\u73B0\u65B0\u7248\u672C",failed:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",current:"\u8FD0\u884C\u7248\u672C",latestLabel:"\u6700\u65B0\u7248\u672C",profile:"\u76EE\u6807 profile",unknown:"\u672A\u77E5",manual:"\u624B\u5DE5\u66F4\u65B0",manualHint:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u53EF\u5728\u5F53\u524D DSH \u7EC8\u7AEF\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\uFF0C\u5B8C\u6210\u540E\u91CD\u542F DSH Web\u3002",manualHintDesktop:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u8BF7\u5148\u5B8C\u5168\u9000\u51FA DSH Desktop\uFF0C\u518D\u7528 Desktop \u81EA\u5E26\u7684 dsh \u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u3002\u666E\u901A dsh \u4F1A\u62D2\u7EDD desktop profile\u3002",intro:"\u4EC5\u68C0\u67E5\u5E76\u66F4\u65B0\u5F53\u524D\u63D2\u4EF6\uFF0C\u4E0D\u4F1A\u8054\u52A8\u5B89\u88C5\u5176\u4ED6\u63D2\u4EF6\u3002",restart:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u91CD\u542F DSH Web\u3002",restartDesktop:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u65B0\u6253\u5F00 DSH Desktop\u3002",restarting:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u6B63\u5728\u91CD\u542F DSH Desktop\u2026",unavailable:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0\uFF0C\u8BF7\u4F7F\u7528\u624B\u5DE5\u66F4\u65B0\u547D\u4EE4\u3002"},OH={check:"Check for updates",update:"Update",close:"Close",recheck:"Check again",auto:"Update automatically",updating:"Updating\u2026",copy:"Copy command",copied:"Copied",copyFailed:"Copy failed",checking:"Checking for updates\u2026",latest:"You are up to date",found:"New version available",failed:"Could not check for updates. Try again later.",current:"Running version",latestLabel:"Latest version",profile:"Target profile",unknown:"Unknown",manual:"Manual update",manualHint:"If automatic update fails, run this command in the current DSH terminal, then restart DSH Web.",manualHintDesktop:"If automatic update fails, fully quit DSH Desktop, then run this command with Desktop's own dsh. A regular dsh rejects the desktop profile.",intro:"Only this plugin is checked and updated. Other plugins are not changed.",restart:"Update complete. Restart DSH Web.",restartDesktop:"Update complete. Fully quit and reopen DSH Desktop.",restarting:"Update complete. Restarting DSH Desktop\u2026",unavailable:"Automatic update is unavailable. Use the manual command."};function th(e){return e.toLowerCase().startsWith("en")?OH:kH}function AH(e,t,o,n){let r=th(e),s=t?.profileName==="desktop"?{...r,manualHint:r.manualHintDesktop,restart:r.restartDesktop}:r,a=o!=="idle",c=s.checking,l="";return o==="checking"?c=s.checking:o==="updating"?c=s.updating:n.type==="error"?(c=n.message||s.failed,l="error"):n.type==="restart"?(c=s.restart,l="success"):n.type==="restarting"?(c=s.restarting,l="success"):t===void 0?c=s.checking:t.latestCheckFailed?(c=s.failed,l="error"):!t.canAutoUpdate&&t.updateAvailable?(c=s.unavailable,l="update"):t.updateAvailable?(c=`${s.found}: v${t.latestVersion??s.unknown}`,l="update"):(c=s.latest,l="success"),{copy:s,busy:a,message:c,kind:l,loading:o==="updating",updateLabel:o==="updating"?s.updating:s.auto,disabled:a||t?.canAutoUpdate!==!0||t.updateAvailable!==!0,currentVersion:t===void 0?s.unknown:`v${t.currentVersion}`,latestVersion:t?.latestVersion===void 0?s.unknown:`v${t.latestVersion}`,profileName:t?.profileName??s.unknown,profileRaw:t?.profileName??"",latestRaw:t?.latestVersion??"latest"}}function LH(e,t,o){let n="idle",r=t,i={type:"status"},s=new Set,a=()=>{for(let l of s)l()},c=l=>{r=l,o?.(l)};return{subscribe(l){return s.add(l),()=>{s.delete(l)}},view(l){return AH(l,r,n,i)},async check(){if(n==="idle"){n="checking",i={type:"status"},a();try{c(await e("GET")),i={type:"status"}}catch(l){i={type:"error",message:l instanceof Error?l.message:""}}finally{n="idle",a()}}},async update(){if(n==="idle"){n="updating",i={type:"status"},a();try{let l=await e("POST");c(l),i={type:l.autoReload===!0?"restarting":"restart"}}catch(l){i={type:"error",message:l instanceof Error?l.message:""}}finally{n="idle",a()}}}}}function DH(){jO(MH)}function _H(e){if(e===null||typeof e!="object")return!1;let t=e;return typeof t.packageName=="string"&&typeof t.currentVersion=="string"&&typeof t.updateAvailable=="boolean"&&typeof t.profileName=="string"&&typeof t.canAutoUpdate=="boolean"&&typeof t.latestCheckFailed=="boolean"&&(t.latestVersion===void 0||typeof t.latestVersion=="string")}async function YO(e,t,o){let n=o===void 0?{}:{signal:o},r=await fetch(e,t==="GET"?{cache:"no-store",...n}:{method:"POST",headers:{"content-type":"application/json",[TH]:"1"},body:"{}",...n}),i=await r.json();if(!r.ok||!_H(i))throw new Error(i!==null&&typeof i=="object"&&"error"in i&&typeof i.error=="string"?i.error:th(document.documentElement.lang).failed);return i}function FH(e){let t=lt.default.useRef(null);return lt.default.useLayoutEffect(()=>{t.current?.replaceChildren(e.node)},[e.node]),lt.default.createElement("span",{ref:t,className:"mpi-icon","aria-hidden":!0})}function zH(e){let t=lt.default.useRef(null),[,o]=lt.default.useState(0),[n,r]=lt.default.useState("idle");lt.default.useEffect(()=>e.flow.subscribe(()=>o(d=>d+1)),[e.flow]),lt.default.useEffect(()=>{let d=document.documentElement,u=new MutationObserver(()=>o(m=>m+1));return u.observe(d,{attributes:!0,attributeFilter:["lang"]}),()=>u.disconnect()},[]),lt.default.useEffect(()=>{e.flow.check()},[e.flow]),lt.default.useEffect(()=>{let d=u=>{XO(u,e.onClose)};return document.addEventListener("keydown",d,!0),()=>document.removeEventListener("keydown",d,!0)},[e.onClose]);let i=document.documentElement.lang,s=e.flow.view(i),a=i.toLowerCase().startsWith("en")?e.enName:e.zhName,c=GO(s.profileRaw,e.packageName,s.latestRaw),l=n==="copied"?s.copy.copied:n==="failed"?s.copy.copyFailed:s.copy.copy;return lt.default.createElement(Rn,null,lt.default.createElement(Da,{open:!0,className:"mpi-dialog",width:680,zIndex:1200,title:`${a} ${s.copy.update}`,keyboard:!1,destroyOnHidden:!0,onCancel:e.onClose,afterOpenChange:d=>{d&&t.current&&(t.current.tabIndex=-1,t.current.focus())},footer:[lt.default.createElement(mo,{key:"check",disabled:s.busy,loading:s.busy&&!s.loading,onClick:()=>{e.flow.check()}},s.copy.recheck),lt.default.createElement(mo,{key:"update",type:"primary",disabled:s.disabled,loading:s.loading,onClick:()=>{e.flow.update()}},s.updateLabel)]},lt.default.createElement("div",{ref:t},lt.default.createElement("p",{className:"mpi-intro"},s.copy.intro),lt.default.createElement("dl",{className:"mpi-meta"},lt.default.createElement("dt",null,s.copy.current),lt.default.createElement("dd",null,lt.default.createElement("span",{className:"mpi-mono"},s.currentVersion)),lt.default.createElement("dt",null,s.copy.latestLabel),lt.default.createElement("dd",{className:"mpi-latest"},lt.default.createElement("span",{className:"mpi-mono"},s.latestVersion),lt.default.createElement("span",{className:"mpi-status",role:"status","data-kind":s.kind,...s.kind==="update"?{style:{color:"#e8b15a"}}:{}},s.message)),lt.default.createElement("dt",null,s.copy.profile),lt.default.createElement("dd",null,lt.default.createElement("span",{className:"mpi-mono"},s.profileName))),s.busy?lt.default.createElement(Ok,{percent:100,showInfo:!1,status:"active"}):null,lt.default.createElement("section",{className:"mpi-manual"},lt.default.createElement("h3",null,s.copy.manual),lt.default.createElement("p",null,s.copy.manualHint),lt.default.createElement("div",{className:"mpi-command"},lt.default.createElement("code",null,c),lt.default.createElement(mo,{disabled:s.busy,onClick:()=>{let d=navigator.clipboard?.writeText(c);if(d===void 0){r("failed");return}d.then(()=>{r("copied"),window.setTimeout(()=>r("idle"),1400)}).catch(()=>r("failed"))}},l))))))}function ZO(e){if(typeof document>"u"||document.body===null)return()=>{};DH();let t=new AbortController,o,n,r,i,s,a,c,l=()=>{r?.unmount(),r=void 0,n=void 0,i=void 0},d=()=>{if(r===void 0)return;i===void 0&&(i=e.createIcon("refresh"));let h=i;r.render(lt.default.createElement(Rn,null,lt.default.createElement(mo,{size:"small",shape:"default",onClick:m,icon:lt.default.createElement(FH,{node:h})},lt.default.createElement("span",{"data-mpi-label":""},th(document.documentElement.lang).check))))},u=()=>{a?.unmount(),a=void 0,s?.remove(),s=void 0};function m(){u();let h=document.createElement("div");h.className="mpi-dialog-root",document.body.append(h),s=h;let b=(0,ZS.createRoot)(h);a=b,b.render(lt.default.createElement(zH,{flow:LH(x=>YO(e.endpoint,x,t.signal),o,x=>{o=x,p()}),packageName:e.packageName,zhName:e.zhName,enName:e.enName,onClose:u}))}let p=()=>{let h=document.querySelector(e.titleRowSelector);if(h===null)return;let b=h.querySelector("h1,h2");if(b!==null&&o!==void 0){let v=b.querySelector(`.mpi-version[data-package="${e.packageName}"]`);v===null&&(v=document.createElement("span"),v.className="mpi-version",v.dataset.package=e.packageName,b.append(v));let C=`v${o.currentVersion}`;v.textContent!==C&&(v.textContent=C)}n!==void 0&&!n.isConnected&&l();let x=h.querySelector(e.linksSelector);if(x===null)return;let y=x.querySelector(`[data-mpi-check="${e.packageName}"]`);if(y!==null){let v=y.querySelector("[data-mpi-label]");(v===null||v.textContent!==th(document.documentElement.lang).check)&&d();return}let S=document.createElement("span");S.dataset.mpiCheck=e.packageName,S.className="mpi-check-host",x.append(S),n=S,r=(0,ZS.createRoot)(S),d()},g=async()=>(o=await YO(e.endpoint,"GET",t.signal),p(),o),f=new MutationObserver(()=>{c===void 0&&(c=window.requestAnimationFrame(()=>{c=void 0,p()}))});return f.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["lang"]}),p(),g().catch(()=>{}),()=>{t.abort(),f.disconnect(),u(),l(),c!==void 0&&window.cancelAnimationFrame(c),document.querySelectorAll(`[data-mpi-check="${e.packageName}"],.mpi-version[data-package="${e.packageName}"]`).forEach(h=>h.remove())}}var BH="dsh-automation-client",HH=["slots","locale","connection","sessions"],VH={refresh:["M13.5 5.5V2.5m0 0h-3m3 0-2.1 2.1A5.5 5.5 0 1 0 13.2 12"],download:["M8 2v8m0 0 3-3m-3 3-3-3M3 13v2h10v-2"],copy:["M5 5h8v8H5z","M3 3h8"],close:["m4 4 8 8M12 4 4 12"]};function WH(e){let t=document.createElement("span"),o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 16 16"),o.setAttribute("width","16"),o.setAttribute("height","16"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","1.5"),o.setAttribute("stroke-linecap","round"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("aria-hidden","true");for(let n of VH[e]){let r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",n),o.append(r)}return t.append(o),t}var jH='<svg viewBox="0 0 16 16" width="16" height="16" fill="none" aria-hidden="true" data-dsh-schedule-icon="1"><path fill="currentColor" d="M8 1.15A6.85 6.85 0 1 0 8 14.85 6.85 6.85 0 0 0 8 1.15Zm0 1.4a5.45 5.45 0 1 1 0 10.9 5.45 5.45 0 0 1 0-10.9Z"/><path fill="currentColor" d="M8.62 4.35H7.28v4.2l3.02 1.78.67-1.13-2.35-1.39V4.35Z"/></svg>';function UH(e){return typeof e=="function"}function KH(e){return typeof e=="function"}function qH(e){let t=new Set(e().map(i=>i.trim()).filter(i=>i!=="")),o=i=>{let s=(i.textContent??"").replace(/\s+/g," ").trim();if(!t.has(s))return;let a=i.querySelector("svg");a===null||a.getAttribute("data-dsh-schedule-icon")==="1"||(a.outerHTML=jH)},n=i=>{i instanceof HTMLButtonElement&&o(i);for(let s of i.querySelectorAll?.("button")??[])o(s)};n(document);let r=new MutationObserver(i=>{for(let s of i){let c=(s.target instanceof Element?s.target:s.target.parentElement)?.closest("button");c instanceof HTMLButtonElement&&o(c);for(let l of s.addedNodes)l instanceof Element&&n(l)}});return r.observe(document.documentElement,{childList:!0,characterData:!0,subtree:!0}),()=>{r.disconnect()}}function GH(e){e.effect(()=>WO(),"dsh-automation: styles"),e.effect(()=>e.locale.register(dc,{zh:uO,en:dO}),"dsh-automation: locale"),e.effect(()=>ZO({endpoint:"/api/michengai/dsh-automation/update",packageName:"@michengai/dsh-automation",titleRowSelector:".dsh-st-heading-row",linksSelector:".dsh-st-heading-links",zhName:"\u5B9A\u65F6\u4EFB\u52A1",enName:"Scheduled tasks",createIcon:WH}),"dsh-automation: plugin update ui");let t=e.locale.bind(dc),o=e.locale.bind("permission.access"),n=e.locale.bind("model"),r=oO(e.connection.rpc),i=Hk(e),s=async()=>{let c=i===void 0?void 0:await i.pickDirectory();if(c===void 0){if(i===void 0)throw new Error("picker-unavailable");return}return(await r.registerWorkspace(c)).id},a=c=>{US(c),qO([t("tab"),"Scheduled tasks","\u5B9A\u65F6\u4EFB\u52A1"],()=>{US(c)})};e.effect(()=>tO(r,()=>e.sessions),"dsh-automation: session sync"),e.effect(()=>qH(()=>[t("tab"),"Scheduled tasks","\u5B9A\u65F6\u4EFB\u52A1"]),"dsh-automation: settings icon"),e.slots.inject("settings.section",()=>e.slots.register({name:"settings.section",id:"scheduled-tasks",order:35,locale:dc,label:()=>t("tab"),icon:"schedule"},function(l){return(0,Fa.createElement)(cO,{t,permissionT:o,modelT:n,runtime:r,...l.close===void 0?{}:{closeSettings:l.close},addWorkspace:s})})),e.slots.inject("sidebar.schedule",()=>e.slots.register({name:"sidebar.schedule",id:"dsh-automation-schedule",order:10,locale:dc,label:()=>t("sidebar.tab")},function(l){return(0,Fa.createElement)(FO,{t,runtime:r,openSession:QS(e,r,l.openSession),openTaskSettings:a,...l.view===void 0?{}:{view:l.view},...l.showViewSwitch===void 0?{}:{showViewSwitch:l.showViewSwitch}})})),e.slots.inject("sidebar.workspaces",()=>{let c,l,d,u,m,p=()=>{},g=!1,f,h=()=>{queueMicrotask(()=>window.dispatchEvent(new Event("dsh-native-sidebar-change")))},b=N=>e.slots.subscribe?.("sidebar.channels",N)??(()=>{}),x=()=>{f!==void 0&&(window.clearInterval(f),f=void 0)},y=()=>{if(x(),p(),p=()=>{},m=void 0,c!==void 0){l!==void 0&&c.component===d&&(c.component=l);let N=c;N.__dshNativeTabs===u&&delete N.__dshNativeTabs,h()}c=void 0,l=void 0,d=void 0,u=void 0},S=(N,I)=>{let E=fO(N);return E===void 0?!1:(m!==E&&(p(),p=()=>{},m=E),E.getTabs().some(k=>k.id==="schedule")||(p=E.insert({id:"schedule",label:t("sidebar.tab"),order:30,matchSession:k=>k.startsWith(Ha),render:k=>{let F=typeof k.openSession=="function"?k.openSession:typeof k.open=="function"?k.open:I,A=QS(e,r,F);return(0,Fa.createElement)(Qg,{t,runtime:r,openSession:A,...UH(k.useSessions)?{useSessions:k.useSessions}:{},...KH(k.useWorkspaces)?{useWorkspaces:k.useWorkspaces}:{},...typeof k.renderSlot=="function"?{renderSlot:k.renderSlot}:{},...typeof k.useSessionStatus=="function"?{useSessionStatus:k.useSessionStatus}:{},...Gg(k),openTaskSettings:a})}})),!0)},v=()=>{let N=oh(e,"sidebar.workspaces");for(let I of N){let E=I;if(S(I)||S(E.component))return!0}return!1},C=()=>{if(v()){x();return}if(f!==void 0)return;let N=0;f=window.setInterval(()=>{N+=1,(v()||N>=20)&&x()},250)},w=()=>{if(!g){g=!0;try{let D=function(L){let G=QS(e,r,L.openSession??L.open);return(0,Fa.createElement)(zO,{t,runtime:r,hostProps:L,openSession:G,openTaskSettings:a,tabRegistry:z,...L.wide===void 0?{}:{wide:L.wide},hasChannels:()=>YH(e,"sidebar.channels"),subscribeChannels:b,...L.useSessions===void 0?{}:{useSessions:L.useSessions},...L.useWorkspaces===void 0?{}:{useWorkspaces:L.useWorkspaces},...L.renderSlot===void 0?{}:{renderSlot:L.renderSlot},officialTree:V})};var N=D;if(KC(oh(e,"sidebar"))){y();return}let I=oh(e,"sidebar.workspaces"),E=I.find(L=>L?.component!==void 0);if(c!==void 0&&(E!==c||E.component!==d)&&y(),E===c&&E?.component===d&&d!==void 0){C();return}if(E===void 0){y();return}let k=o0(I),F=k?.component;if(F!==void 0&&gO(F)){C();return}if(k?.component===void 0)return;let A=t0(k.component);if(A===void 0)return;l=A;let z=pO(l);u=z,qS(k,z);let _=D;_.displayName="AutomationNativeWorkspaceShell",_.__dshNativeTabHost=!0,_.__dshAutomationWrapped=!0,_.__dshAutomationOriginal=l;let V=l;qS(_,z),k.component=_,d=_,c=k,C(),h()}catch(I){console.warn("[dsh-automation] \u5305\u88F9\u5B98\u65B9\u4EFB\u52A1\u6811\u5931\u8D25",I)}finally{g=!1}}};w();let R=typeof e.slots.subscribe=="function"?e.slots.subscribe("sidebar.workspaces",w):()=>{},T=e.slots.subscribe?.("sidebar",w)??(()=>{});return window.addEventListener("dsh-native-sidebar-change",w),C(),()=>{R(),T(),window.removeEventListener("dsh-native-sidebar-change",w),y()}}),e.slots.inject("conversation.input.left",()=>e.slots.register({name:"conversation.input.left",id:"dsh-automation-prefill",order:80,locale:dc},XH))}function QS(e,t,o){return n=>{let r=XC(e);QC({id:n,adopt:i=>t.adoptSession(i),listed:i=>{let s=e.sessions?.list?.getSnapshot();return(s?.ids??[]).includes(i)||s?.byId?.[i]!==void 0},...e.sessions?.refresh===void 0?{}:{refresh:()=>e.sessions.refresh()},...YC(r)?{openRuntime:i=>{ZC(r,i)}}:{},...o===void 0?{}:{openHost:o}})}}function XH(e){return(0,Fa.useEffect)(()=>{let t=o=>{if(!(o===null||o==="")){if(e.inputActions!==void 0){e.inputActions.setDraft(o),BS();return}Zk(o)&&BS()}};return t(Xk()),Yk(t)},[e.inputActions]),null}function oh(e,t){try{return(e.slots.entriesOfSlot??e.slots.entries)?.call(e.slots,t)??[]}catch{return[]}}function YH(e,t){return oh(e,t).length>0}
430
- /*! Bundled license information:
431
-
432
- react-is/cjs/react-is.production.js:
433
- (**
434
- * @license React
435
- * react-is.production.js
436
- *
437
- * Copyright (c) Meta Platforms, Inc. and affiliates.
438
- *
439
- * This source code is licensed under the MIT license found in the
440
- * LICENSE file in the root directory of this source tree.
441
- *)
442
- */
179
+ .dsh-st-modal-action{min-width:72px}
180
+ .mpi-intro{margin:0 0 16px;color:var(--dsw-alias-label-secondary,#b9b9b9);font-size:13px;line-height:20px}.mpi-meta{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 18px;margin:0 0 16px;font-size:12px;line-height:18px}.mpi-meta dt{color:var(--dsw-alias-label-secondary,#b9b9b9)}.mpi-meta dd{margin:0}.mpi-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.mpi-latest{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px}.mpi-status{font-size:13px;font-weight:600;line-height:18px}.mpi-status[data-kind=error]{color:var(--dsw-alias-state-error-primary,#ef7272)}.mpi-status[data-kind=success]{color:var(--dsw-alias-state-success-primary,#51b976)}.mpi-status[data-kind=update]{color:#e8b15a !important}.mpi-manual{border-top:0.5px solid var(--dsw-alias-border-l2,#494949);padding-top:16px}.mpi-manual h3{margin:0 0 6px;font-size:14px;line-height:20px}.mpi-manual p{margin:0 0 10px;color:var(--dsw-alias-label-secondary,#b9b9b9);font-size:12px;line-height:18px}.mpi-command{display:flex;align-items:flex-start;gap:8px;border:0.5px solid var(--dsw-alias-border-l2,#494949);border-radius:var(--dsw-radius-lg,16px);padding:10px;background:var(--dsw-alias-bg-layer-1,var(--dsw-alias-interactive-bg-hover,transparent))}.mpi-command code{min-width:0;flex:1;overflow:visible;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere}
181
+ .dsh-st-update-progress{height:4px;border-radius:2px;background:var(--dsw-alias-border-l1,#3a3a3a);overflow:hidden;margin:12px 0;position:relative}
182
+ .dsh-st-update-progress-bar{height:100%;width:40%;background:var(--dsw-alias-button-primary-fill,#4176e6);border-radius:2px;animation:dsh-st-progress-slide 1.4s ease-in-out infinite}
183
+ @keyframes dsh-st-progress-slide{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}
184
+ @media (prefers-reduced-motion:reduce){.dsh-st-update-progress-bar{animation:none;width:100%;opacity:.6}}
185
+ @media(max-width:560px){.mpi-meta{grid-template-columns:1fr;gap:2px}.mpi-meta dd{margin-bottom:6px}}
186
+ `,ei={check:"\u68C0\u67E5\u66F4\u65B0",update:"\u66F4\u65B0",close:"\u5173\u95ED",recheck:"\u91CD\u65B0\u68C0\u67E5",auto:"\u81EA\u52A8\u66F4\u65B0",updating:"\u6B63\u5728\u66F4\u65B0\u2026",copy:"\u590D\u5236\u547D\u4EE4",copied:"\u5DF2\u590D\u5236",copyFailed:"\u590D\u5236\u5931\u8D25",checking:"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0\u2026",latest:"\u5DF2\u662F\u6700\u65B0\u7248\u672C",found:"\u53D1\u73B0\u65B0\u7248\u672C",failed:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",current:"\u8FD0\u884C\u7248\u672C",latestLabel:"\u6700\u65B0\u7248\u672C",profile:"\u76EE\u6807 profile",unknown:"\u672A\u77E5",manual:"\u624B\u5DE5\u66F4\u65B0",manualHint:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u53EF\u5728\u5F53\u524D DSH \u7EC8\u7AEF\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\uFF0C\u5B8C\u6210\u540E\u91CD\u542F DSH Web\u3002",manualHintDesktop:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u8BF7\u5148\u5B8C\u5168\u9000\u51FA DSH Desktop\uFF0C\u518D\u7528 Desktop \u81EA\u5E26\u7684 dsh \u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u3002\u666E\u901A dsh \u4F1A\u62D2\u7EDD desktop profile\u3002",intro:"\u4EC5\u68C0\u67E5\u5E76\u66F4\u65B0\u5F53\u524D\u63D2\u4EF6\uFF0C\u4E0D\u4F1A\u8054\u52A8\u5B89\u88C5\u5176\u4ED6\u63D2\u4EF6\u3002",restart:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u91CD\u542F DSH Web\u3002",restartDesktop:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u65B0\u6253\u5F00 DSH Desktop\u3002",restarting:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u6B63\u5728\u91CD\u542F DSH Desktop\u2026",unavailable:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0\uFF0C\u8BF7\u4F7F\u7528\u624B\u5DE5\u66F4\u65B0\u547D\u4EE4\u3002"},ni={check:"Check for updates",update:"Update",close:"Close",recheck:"Check again",auto:"Update automatically",updating:"Updating\u2026",copy:"Copy command",copied:"Copied",copyFailed:"Copy failed",checking:"Checking for updates\u2026",latest:"You are up to date",found:"New version available",failed:"Could not check for updates. Try again later.",current:"Running version",latestLabel:"Latest version",profile:"Target profile",unknown:"Unknown",manual:"Manual update",manualHint:"If automatic update fails, run this command in the current DSH terminal, then restart DSH Web.",manualHintDesktop:"If automatic update fails, fully quit DSH Desktop, then run this command with Desktop's own dsh. A regular dsh rejects the desktop profile.",intro:"Only this plugin is checked and updated. Other plugins are not changed.",restart:"Update complete. Restart DSH Web.",restartDesktop:"Update complete. Fully quit and reopen DSH Desktop.",restarting:"Update complete. Restarting DSH Desktop\u2026",unavailable:"Automatic update is unavailable. Use the manual command."};function _n(e){return e.toLowerCase().startsWith("en")?ni:ei}function ti(e,n,t,s){let r=_n(e),o=n?.profileName==="desktop"?{...r,manualHint:r.manualHintDesktop,restart:r.restartDesktop}:r,a=t!=="idle",l=o.checking,c="";return t==="checking"?l=o.checking:t==="updating"?l=o.updating:s.type==="error"?(l=s.message||o.failed,c="error"):s.type==="restart"?(l=o.restart,c="success"):s.type==="restarting"?(l=o.restarting,c="success"):n===void 0?l=o.checking:n.latestCheckFailed?(l=o.failed,c="error"):!n.canAutoUpdate&&n.updateAvailable?(l=o.unavailable,c="update"):n.updateAvailable?(l=`${o.found}: v${n.latestVersion??o.unknown}`,c="update"):(l=o.latest,c="success"),{copy:o,busy:a,message:l,kind:c,loading:t==="updating",updateLabel:t==="updating"?o.updating:o.auto,disabled:a||n?.canAutoUpdate!==!0||n.updateAvailable!==!0,currentVersion:n===void 0?o.unknown:`v${n.currentVersion}`,latestVersion:n?.latestVersion===void 0?o.unknown:`v${n.latestVersion}`,profileName:n?.profileName??o.unknown,profileRaw:n?.profileName??"",latestRaw:n?.latestVersion??"latest"}}function si(e,n,t){let s="idle",r=n,i={type:"status"},o=new Set,a=()=>{for(let c of o)c()},l=c=>{r=c,t?.(c)};return{subscribe(c){return o.add(c),()=>{o.delete(c)}},view(c){return ti(c,r,s,i)},async check(){if(s==="idle"){s="checking",i={type:"status"},a();try{l(await e("GET")),i={type:"status"}}catch(c){i={type:"error",message:c instanceof Error?c.message:""}}finally{s="idle",a()}}},async update(){if(s==="idle"){s="updating",i={type:"status"},a();try{let c=await e("POST");l(c),i={type:c.autoReload===!0?"restarting":"restart"}}catch(c){i={type:"error",message:c instanceof Error?c.message:""}}finally{s="idle",a()}}}}}function oi(){Do(Qr)}function ri(e){if(e===null||typeof e!="object")return!1;let n=e;return typeof n.packageName=="string"&&typeof n.currentVersion=="string"&&typeof n.updateAvailable=="boolean"&&typeof n.profileName=="string"&&typeof n.canAutoUpdate=="boolean"&&typeof n.latestCheckFailed=="boolean"&&(n.latestVersion===void 0||typeof n.latestVersion=="string")}async function zo(e,n,t){let s=t===void 0?{}:{signal:t},r=await fetch(e,n==="GET"?{cache:"no-store",...s}:{method:"POST",headers:{"content-type":"application/json",[Yr]:"1"},body:"{}",...s}),i=await r.json();if(!r.ok||!ri(i))throw new Error(i!==null&&typeof i=="object"&&"error"in i&&typeof i.error=="string"?i.error:_n(document.documentElement.lang).failed);return i}function ii(e){let n=D.default.useRef(null);return D.default.useLayoutEffect(()=>{n.current?.replaceChildren(e.node)},[e.node]),D.default.createElement("span",{ref:n,className:"mpi-icon","aria-hidden":!0})}function ai(e){let n=D.default.useRef(null),[,t]=D.default.useState(0),[s,r]=D.default.useState("idle");D.default.useEffect(()=>e.flow.subscribe(()=>t(y=>y+1)),[e.flow]),D.default.useEffect(()=>{let y=document.documentElement,m=new MutationObserver(()=>t(T=>T+1));return m.observe(y,{attributes:!0,attributeFilter:["lang"]}),()=>m.disconnect()},[]),D.default.useEffect(()=>{e.flow.check()},[e.flow]),D.default.useEffect(()=>{let y=m=>{_o(m,e.onClose)};return document.addEventListener("keydown",y,!0),()=>document.removeEventListener("keydown",y,!0)},[e.onClose]);let i=document.documentElement.lang,o=e.flow.view(i),a=i.toLowerCase().startsWith("en")?e.enName:e.zhName,l=Wo(o.profileRaw,e.packageName,o.latestRaw),c=s==="copied"?o.copy.copied:s==="failed"?o.copy.copyFailed:o.copy.copy;return D.default.createElement(Oe.Modal,{open:!0,className:"dsh-st-update-dialog",title:`${a} ${o.copy.update}`,closeLabel:o.copy.close,onClose:e.onClose,footer:D.default.createElement(D.default.Fragment,null,D.default.createElement(Oe.Button,{variant:"outline",className:"dsh-st-modal-action",disabled:o.busy,onClick:()=>{e.flow.check()}},o.copy.recheck),D.default.createElement(Oe.Button,{variant:"primary",className:"dsh-st-modal-action",disabled:o.disabled,onClick:()=>{e.flow.update()}},o.updateLabel))},D.default.createElement("div",{ref:n},D.default.createElement("p",{className:"mpi-intro"},o.copy.intro),D.default.createElement("dl",{className:"mpi-meta"},D.default.createElement("dt",null,o.copy.current),D.default.createElement("dd",null,D.default.createElement("span",{className:"mpi-mono"},o.currentVersion)),D.default.createElement("dt",null,o.copy.latestLabel),D.default.createElement("dd",{className:"mpi-latest"},D.default.createElement("span",{className:"mpi-mono"},o.latestVersion),D.default.createElement("span",{className:"mpi-status",role:"status","data-kind":o.kind,...o.kind==="update"?{style:{color:"#e8b15a"}}:{}},o.message)),D.default.createElement("dt",null,o.copy.profile),D.default.createElement("dd",null,D.default.createElement("span",{className:"mpi-mono"},o.profileName))),o.busy?D.default.createElement("div",{className:"dsh-st-update-progress",role:"progressbar","aria-busy":"true"},D.default.createElement("div",{className:"dsh-st-update-progress-bar"})):null,D.default.createElement("section",{className:"mpi-manual"},D.default.createElement("h3",null,o.copy.manual),D.default.createElement("p",null,o.copy.manualHint),D.default.createElement("div",{className:"mpi-command"},D.default.createElement("code",null,l),D.default.createElement(Oe.Button,{variant:"outline",size:"sm",disabled:o.busy,onClick:()=>{let y=navigator.clipboard?.writeText(l);if(y===void 0){r("failed");return}y.then(()=>{r("copied"),window.setTimeout(()=>r("idle"),1400)}).catch(()=>r("failed"))}},c)))))}function Go(e){if(typeof document>"u"||document.body===null)return()=>{};oi();let n=new AbortController,t,s,r,i,o,a,l,c=()=>{r?.unmount(),r=void 0,s=void 0,i=void 0},y=()=>{if(r===void 0)return;i===void 0&&(i=e.createIcon("refresh"));let u=i;r.render(D.default.createElement(Oe.Button,{variant:"outline",size:"sm",onClick:T,icon:D.default.createElement(ii,{node:u})},D.default.createElement("span",{"data-mpi-label":""},_n(document.documentElement.lang).check)))},m=()=>{a?.unmount(),a=void 0,o?.remove(),o=void 0};function T(){m();let u=document.createElement("div");u.className="mpi-dialog-root",document.body.append(u),o=u;let g=(0,gt.createRoot)(u);a=g,g.render(D.default.createElement(ai,{flow:si(h=>zo(e.endpoint,h,n.signal),t,h=>{t=h,A()}),packageName:e.packageName,zhName:e.zhName,enName:e.enName,onClose:m}))}let A=()=>{let u=document.querySelector(e.titleRowSelector);if(u===null)return;let g=u.querySelector("h1,h2");if(g!==null&&t!==void 0){let L=g.querySelector(`.mpi-version[data-package="${e.packageName}"]`);L===null&&(L=document.createElement("span"),L.className="mpi-version",L.dataset.package=e.packageName,g.append(L));let H=`v${t.currentVersion}`;L.textContent!==H&&(L.textContent=H)}s!==void 0&&!s.isConnected&&c();let h=u.querySelector(e.linksSelector);if(h===null)return;let S=h.querySelector(`[data-mpi-check="${e.packageName}"]`);if(S!==null){let L=S.querySelector("[data-mpi-label]");(L===null||L.textContent!==_n(document.documentElement.lang).check)&&y();return}let R=document.createElement("span");R.dataset.mpiCheck=e.packageName,R.className="mpi-check-host",h.append(R),s=R,r=(0,gt.createRoot)(R),y()},f=async()=>(t=await zo(e.endpoint,"GET",n.signal),A(),t),p=new MutationObserver(()=>{l===void 0&&(l=window.requestAnimationFrame(()=>{l=void 0,A()}))});return p.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["lang"]}),A(),f().catch(()=>{}),()=>{n.abort(),p.disconnect(),m(),c(),l!==void 0&&window.cancelAnimationFrame(l),document.querySelectorAll(`[data-mpi-check="${e.packageName}"],.mpi-version[data-package="${e.packageName}"]`).forEach(u=>u.remove())}}var di="dsh-automation-client",li=["slots","locale","connection","sessions"],ci={refresh:["M13.5 5.5V2.5m0 0h-3m3 0-2.1 2.1A5.5 5.5 0 1 0 13.2 12"],download:["M8 2v8m0 0 3-3m-3 3-3-3M3 13v2h10v-2"],copy:["M5 5h8v8H5z","M3 3h8"],close:["m4 4 8 8M12 4 4 12"]};function ui(e){let n=document.createElement("span"),t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("viewBox","0 0 16 16"),t.setAttribute("width","16"),t.setAttribute("height","16"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.5"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-linejoin","round"),t.setAttribute("aria-hidden","true");for(let s of ci[e]){let r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",s),t.append(r)}return n.append(t),n}var pi='<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-dsh-schedule-icon="1"><path d="M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z"/><path d="M8 4.667V8l2.333 2.333"/></svg>';function mi(e){return typeof e=="function"}function fi(e){return typeof e=="function"}function hi(e){let n=new Set(e().map(i=>i.trim()).filter(i=>i!=="")),t=i=>{let o=(i.textContent??"").replace(/\s+/g," ").trim();if(!n.has(o))return;let a=i.querySelector("svg");a===null||a.getAttribute("data-dsh-schedule-icon")==="1"||(a.outerHTML=pi)},s=i=>{i instanceof HTMLButtonElement&&t(i);for(let o of i.querySelectorAll?.("button")??[])t(o)};s(document);let r=new MutationObserver(i=>{for(let o of i){let l=(o.target instanceof Element?o.target:o.target.parentElement)?.closest("button");l instanceof HTMLButtonElement&&t(l);for(let c of o.addedNodes)c instanceof Element&&s(c)}});return r.observe(document.documentElement,{childList:!0,characterData:!0,subtree:!0}),()=>{r.disconnect()}}function gi(e){e.effect(()=>Po(),"dsh-automation: styles"),e.effect(()=>e.locale.register(Be,{zh:eo,en:Qs}),"dsh-automation: locale"),e.effect(()=>Go({endpoint:"/api/michengai/dsh-automation/update",packageName:"@michengai/dsh-automation",titleRowSelector:".dsh-st-heading-row",linksSelector:".dsh-st-heading-links",zhName:"\u5B9A\u65F6\u4EFB\u52A1",enName:"Scheduled tasks",createIcon:ui}),"dsh-automation: plugin update ui");let n=e.locale.bind(Be),t=e.locale.bind("permission.access"),s=e.locale.bind("model"),r=js(e.connection.rpc),i=async()=>{let a=await qn(e);return a===void 0?void 0:(await jn(e,a),(await r.registerWorkspace(a)).id)},o=a=>{ct(a),Fo([n("tab"),"Scheduled tasks","\u5B9A\u65F6\u4EFB\u52A1"],()=>{ct(a)})};e.effect(()=>Ks(r,()=>e.sessions),"dsh-automation: session sync"),e.effect(()=>hi(()=>[n("tab"),"Scheduled tasks","\u5B9A\u65F6\u4EFB\u52A1"]),"dsh-automation: settings icon"),e.slots.inject("settings.section",()=>e.slots.register({name:"settings.section",id:"scheduled-tasks",order:35,locale:Be,label:()=>n("tab"),icon:"schedule",inject:()=>({createWorkspace:a=>jn(e,a.path),pickDirectory:()=>qn(e),permissionT:t,modelT:s})},function(l){return(0,He.createElement)(Ys,{t:n,permissionT:t,modelT:s,runtime:r,...l.close===void 0?{}:{closeSettings:l.close},addWorkspace:i})})),e.slots.inject("sidebar.schedule",()=>e.slots.register({name:"sidebar.schedule",id:"dsh-automation-schedule",order:10,locale:Be,label:()=>n("sidebar.tab")},function(l){return(0,He.createElement)(No,{t:n,runtime:r,openSession:yt(e,r,l.openSession),openTaskSettings:o,...l.view===void 0?{}:{view:l.view},...l.showViewSwitch===void 0?{}:{showViewSwitch:l.showViewSwitch}})})),e.slots.inject("sidebar.workspaces",()=>{let a,l,c,y,m,T=()=>{},A=!1,f,p=()=>{queueMicrotask(()=>window.dispatchEvent(new Event("dsh-native-sidebar-change")))},u=W=>e.slots.subscribe?.("sidebar.channels",W)??(()=>{}),g=()=>{f!==void 0&&(window.clearInterval(f),f=void 0)},h=()=>{if(g(),T(),T=()=>{},m=void 0,a!==void 0){l!==void 0&&a.component===c&&(a.component=l);let W=a;W.__dshNativeTabs===y&&delete W.__dshNativeTabs,p()}a=void 0,l=void 0,c=void 0,y=void 0},S=(W,se)=>{let K=so(W);return K===void 0?!1:(m!==K&&(T(),T=()=>{},m=K),K.getTabs().some(O=>O.id==="schedule")||(T=K.insert({id:"schedule",label:n("sidebar.tab"),order:30,matchSession:O=>O.startsWith(We),render:O=>{let z=typeof O.openSession=="function"?O.openSession:typeof O.open=="function"?O.open:se,_=yt(e,r,z);return(0,He.createElement)(On,{t:n,runtime:r,openSession:_,...mi(O.useSessions)?{useSessions:O.useSessions}:{},...fi(O.useWorkspaces)?{useWorkspaces:O.useWorkspaces}:{},...typeof O.renderSlot=="function"?{renderSlot:O.renderSlot}:{},...typeof O.useSessionStatus=="function"?{useSessionStatus:O.useSessionStatus}:{},...En(O),openTaskSettings:o})}})),!0)},R=()=>{let W=zn(e,"sidebar.workspaces");for(let se of W){let K=se;if(S(se)||S(K.component))return!0}return!1},L=()=>{if(R()){g();return}if(f!==void 0)return;let W=0;f=window.setInterval(()=>{W+=1,(R()||W>=20)&&g()},250)},H=()=>{if(!A){A=!0;try{let pe=function(G){let x=yt(e,r,G.openSession??G.open);return(0,He.createElement)(Ro,{t:n,runtime:r,hostProps:G,openSession:x,openTaskSettings:o,tabRegistry:oe,...G.wide===void 0?{}:{wide:G.wide},hasChannels:()=>vi(e,"sidebar.channels"),subscribeChannels:u,...G.useSessions===void 0?{}:{useSessions:G.useSessions},...G.useWorkspaces===void 0?{}:{useWorkspaces:G.useWorkspaces},...G.renderSlot===void 0?{}:{renderSlot:G.renderSlot},officialTree:M})};var W=pe;if(es(zn(e,"sidebar"))){h();return}let se=zn(e,"sidebar.workspaces"),K=se.find(G=>G?.component!==void 0);if(a!==void 0&&(K!==a||K.component!==c)&&h(),K===a&&K?.component===c&&c!==void 0){L();return}if(K===void 0){h();return}let O=cs(se),z=O?.component;if(z!==void 0&&oo(z)){L();return}if(O?.component===void 0)return;let _=ls(O.component);if(_===void 0)return;l=_;let oe=to(l);y=oe,pt(O,oe);let U=pe;U.displayName="AutomationNativeWorkspaceShell",U.__dshNativeTabHost=!0,U.__dshAutomationWrapped=!0,U.__dshAutomationOriginal=l;let M=l;pt(U,oe),O.component=U,c=U,a=O,L(),p()}catch(se){console.warn("[dsh-automation] \u5305\u88F9\u5B98\u65B9\u4EFB\u52A1\u6811\u5931\u8D25",se)}finally{A=!1}}};H();let ae=typeof e.slots.subscribe=="function"?e.slots.subscribe("sidebar.workspaces",H):()=>{},de=e.slots.subscribe?.("sidebar",H)??(()=>{});return window.addEventListener("dsh-native-sidebar-change",H),L(),()=>{ae(),de(),window.removeEventListener("dsh-native-sidebar-change",H),h()}}),e.slots.inject("conversation.input.left",()=>e.slots.register({name:"conversation.input.left",id:"dsh-automation-prefill",order:80,locale:Be},yi))}function yt(e,n,t){return s=>{let r=ss(e);is({id:s,adopt:i=>n.adoptSession(i),listed:i=>{let o=e.sessions?.list?.getSnapshot();return(o?.ids??[]).includes(i)||o?.byId?.[i]!==void 0},...e.sessions?.refresh===void 0?{}:{refresh:()=>e.sessions.refresh()},...os(r)?{openRuntime:i=>{rs(r,i)}}:{},...t===void 0?{}:{openHost:t}})}}function yi(e){return(0,He.useEffect)(()=>{let n=t=>{if(!(t===null||t==="")){if(e.inputActions!==void 0){e.inputActions.setDraft(t),ot();return}Vs(t)&&ot()}};return n(zs()),Gs(n)},[e.inputActions]),null}function zn(e,n){try{return(e.slots.entriesOfSlot??e.slots.entries)?.call(e.slots,n)??[]}catch{return[]}}function vi(e,n){return zn(e,n).length>0}
443
187
  return module.exports; } });
444
188
  //# sourceMappingURL=client.js.map