@gientech/modual 2.2.7 → 2.2.9
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/assets/{GientechStreamReader-BXECeWHn.js → GientechStreamReader-Btox1v82.js} +1 -1
- package/assets/{LeftOutlined-DZMeGbKk.js → LeftOutlined-DbVWaJal.js} +1 -1
- package/assets/{circle-plus-B73z_SUN.js → circle-plus-Bqwlq2UM.js} +1 -1
- package/assets/{index-usBlUHOb.js → index-BB-K4Uv2.js} +1 -1
- package/assets/{index-C2CNh8ez.js → index-BbQ5_tfg.js} +1 -1
- package/assets/{index-CJ_gYD7K.js → index-CQChY5LV.js} +1 -1
- package/assets/{index-BIEKgWu0.js → index-CaKTISxy.js} +4 -4
- package/assets/{index-DHK_n74G.js → index-DCnYE71u.js} +1 -1
- package/assets/{index-97Oe7YBe.js → index-DIaywdNt.js} +1 -1
- package/assets/{index-iOuQJ8vu.js → index-DiTGnLML.js} +4 -4
- package/assets/{index-B4k3tK0f.js → index-O8MDfMV6.js} +1 -1
- package/assets/{index-CzZQWA2P.js → index-zCzB-56N.js} +1 -1
- package/assets/{index-DVmtdVgB.js → index-zXg3ABkl.js} +1 -1
- package/assets/{lib_enter-e1LoilHd-CdMXmxII.js → lib_enter-e1LoilHd-DARjRYE-.js} +3 -3
- package/assets/{plus-BICgMvz9.js → plus-B4_cWXV7.js} +1 -1
- package/assets/{prism-cpp-DTm5qrps-BSaftFLm.js → prism-cpp-DTm5qrps-DCvIrbpC.js} +1 -1
- package/assets/{prism-java-l04-K_JR-BGPwi1gz.js → prism-java-l04-K_JR-DA8-aCBu.js} +1 -1
- package/assets/{prism-php-Cq3Hq1Wv-ClRPbOiD.js → prism-php-Cq3Hq1Wv-kjCPib2J.js} +1 -1
- package/assets/{prism-python-CP37PFZv-CHHzP9kx.js → prism-python-CP37PFZv-BhlyiSdN.js} +1 -1
- package/assets/{prism-ruby-DcAmdHPZ-BE2nW4HT.js → prism-ruby-DcAmdHPZ-k8JrZLoB.js} +1 -1
- package/assets/{prism-rust-CuWIv8B8-D_q9DWYT.js → prism-rust-CuWIv8B8-OHEgXNIx.js} +1 -1
- package/assets/{prism-typescript-DSWPRTnC-DvzycoW4.js → prism-typescript-DSWPRTnC-XMYg5ury.js} +1 -1
- package/assets/{search-CD5YKija.js → search-B5sYxJby.js} +1 -1
- package/assets/{style-5GNBfWLv.js → style-CLviPb8g.js} +1 -1
- package/assets/style3.css +1 -1
- package/assets/style4.css +1 -1
- package/assets/style5.css +1 -1
- package/assets/style6.css +1 -0
- package/assets/{triangle-alert-C4Z1AkGW.js → triangle-alert-DMLBtHZo.js} +1 -1
- package/assets/{x-DWGzNb9c.js → x-BHe7G4Ln.js} +1 -1
- package/assistantConfig.js +1 -1
- package/chat.js +1 -1
- package/chatCompare.js +1 -1
- package/database.js +1 -1
- package/databaseId.js +1 -1
- package/databaseTable.js +1 -1
- package/index.js +1 -1
- package/modelManage.js +14 -1
- package/package.json +1 -1
- package/sensitive.js +1 -1
- package/sensitiveWords.js +1 -1
- package/streamFilesReader.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var zn=Object.defineProperty;var Sn=p=>{throw TypeError(p)};var Gn=(p,a,b)=>a in p?zn(p,a,{enumerable:!0,configurable:!0,writable:!0,value:b}):p[a]=b;var se=(p,a,b)=>Gn(p,typeof a!="symbol"?a+"":a,b),an=(p,a,b)=>a.has(p)||Sn("Cannot "+b);var R=(p,a,b)=>(an(p,a,"read from private field"),b?b.call(p):a.get(p)),Ot=(p,a,b)=>a.has(p)?Sn("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(p):a.set(p,b),It=(p,a,b,f)=>(an(p,a,"write to private field"),f?f.call(p,b):a.set(p,b),b),Dt=(p,a,b)=>(an(p,a,"access private method"),b);var on=(p,a,b,f)=>({set _(A){It(p,a,A,b)},get _(){return R(p,a,f)}});import{jsxs,jsx,Fragment}from"react/jsx-runtime";import React__default,{forwardRef,createElement,useState,useRef,useEffect,useCallback,useMemo}from"react";import{c as createLucideIcon,a5 as getAugmentedNamespace,d as dt$1,
|
|
1
|
+
var zn=Object.defineProperty;var Sn=p=>{throw TypeError(p)};var Gn=(p,a,b)=>a in p?zn(p,a,{enumerable:!0,configurable:!0,writable:!0,value:b}):p[a]=b;var se=(p,a,b)=>Gn(p,typeof a!="symbol"?a+"":a,b),an=(p,a,b)=>a.has(p)||Sn("Cannot "+b);var R=(p,a,b)=>(an(p,a,"read from private field"),b?b.call(p):a.get(p)),Ot=(p,a,b)=>a.has(p)?Sn("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(p):a.set(p,b),It=(p,a,b,f)=>(an(p,a,"write to private field"),f?f.call(p,b):a.set(p,b),b),Dt=(p,a,b)=>(an(p,a,"access private method"),b);var on=(p,a,b,f)=>({set _(A){It(p,a,A,b)},get _(){return R(p,a,f)}});import{jsxs,jsx,Fragment}from"react/jsx-runtime";import React__default,{forwardRef,createElement,useState,useRef,useEffect,useCallback,useMemo}from"react";import{c as createLucideIcon,a5 as getAugmentedNamespace,d as dt$1,F as axios}from"./index-DCnYE71u.js";import{G as G8,r as ra}from"./lib_enter-e1LoilHd-DARjRYE-.js";import{a as ChevronRight}from"./index-BbQ5_tfg.js";import{X}from"./x-BHe7G4Ln.js";/**
|
|
2
2
|
* @license lucide-react v0.456.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as n,_ as r}from"./index-
|
|
1
|
+
import{I as n,_ as r}from"./index-DCnYE71u.js";import*as t from"react";var c={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"},o=function(e,a){return t.createElement(n,r({},e,{ref:a,icon:c}))},d=t.forwardRef(o),l={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"},f=function(e,a){return t.createElement(n,r({},e,{ref:a,icon:l}))},u=t.forwardRef(f);export{u as R,d as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as F,a as G,m as U,i as X,b as Y,r as Z,P as q,e as J,h as Q,C as ee,j as x,k as te,u as oe,l as ne,T as re,n as ae,o as se,K as le}from"./index-
|
|
1
|
+
import{c as F,a as G,m as U,i as X,b as Y,r as Z,P as q,e as J,h as Q,C as ee,j as x,k as te,u as oe,l as ne,T as re,n as ae,o as se,K as le}from"./index-DCnYE71u.js";import*as s from"react";import{isValidElement as ie}from"react";import"react-dom";/**
|
|
2
2
|
* @license lucide-react v0.456.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as i2,jsx as h,Fragment as D1}from"react/jsx-runtime";import*as E from"react";import P2,{forwardRef as SA,createElement as YA,useState as r0,useRef as nA,useEffect as P0,useMemo as gA,useContext as f1,useImperativeHandle as M3,useCallback as o0,memo as x1,Suspense as p9}from"react";import{d as e2,g as q0,x as I0,f as C2,c as zA,
|
|
1
|
+
import{jsxs as i2,jsx as h,Fragment as D1}from"react/jsx-runtime";import*as E from"react";import P2,{forwardRef as SA,createElement as YA,useState as r0,useRef as nA,useEffect as P0,useMemo as gA,useContext as f1,useImperativeHandle as M3,useCallback as o0,memo as x1,Suspense as p9}from"react";import{d as e2,g as q0,x as I0,f as C2,c as zA,A as c0,j as F2,br as CA,b6 as M9,V as x2,U as w2,Q as g2,a6 as WA,an as i0,l as F0,b3 as N0,O as D9,bu as x9,W as K0,_ as k2,b9 as P9,bv as D3,N as P1,L as HA,aW as Y9,aU as H9,az as ae,ba as b9,a as le,m as JA,s as f2,r as bA,a8 as x3,C as oA,a0 as k9,bw as Y1,ap as H1,b2 as se,bx as S9,by as P3,bz as z9,bA as y9,bB as F9,bC as R9,y as Ee,bD as L9,bE as O9,aO as VA,a9 as G9,e as j9,bF as N9,bG as T9,bH as X9,bI as J9,a7 as V9,bJ as Z9,bd as Ne,bj as Te,bg as U9,bf as W9,bi as K9,bh as q9,aX as _9,bK as $9,bL as A7,I as Ie,u as e7,bM as t7,H as _1,bo as Y3,bN as ce,ag as H3,a1 as b3,a2 as k3,bO as S3,bP as z3,bQ as y3,bl as Be,ae as F3,p as g7,t as n7,bR as r7,Y as C7,Z as Xe,bS as o7,J as u2,bT as i7,G as s0,S as t1,al as $1,ak as g1,a4 as Je,aj as Ve,T as de,ai as a7}from"./index-DCnYE71u.js";import{createPortal as R3}from"react-dom";const l7=e2.button.attrs({className:"zui-button"})`
|
|
2
2
|
${({$height:A})=>{const e=typeof A=="number"?`${A}px`:A||"32px",t=typeof A=="number"?`${Math.max(A-2,0)}px`:A&&typeof A=="string"&&A.endsWith("px")?`${Math.max(parseInt(A,10)-2,0)}px`:"30px";return`
|
|
3
3
|
height: ${e};
|
|
4
4
|
min-height: ${e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as ye,jsx as B,Fragment as Ki}from"react/jsx-runtime";import*as f from"react";import Q,{forwardRef as sr,createElement as Ua,version as bm,useMemo as Ut,useState as it,useRef as Oe,useCallback as Le,useEffect as ot,useImperativeHandle as Li,createContext as Hi,useContext as An,Children as xm,useLayoutEffect as Cm,isValidElement as wm}from"react";import{d as We,g as km,x as _s,f as ec}from"./index-
|
|
1
|
+
import{jsxs as ye,jsx as B,Fragment as Ki}from"react/jsx-runtime";import*as f from"react";import Q,{forwardRef as sr,createElement as Ua,version as bm,useMemo as Ut,useState as it,useRef as Oe,useCallback as Le,useEffect as ot,useImperativeHandle as Li,createContext as Hi,useContext as An,Children as xm,useLayoutEffect as Cm,isValidElement as wm}from"react";import{d as We,g as km,x as _s,f as ec}from"./index-DCnYE71u.js";import{e as Em,u as Sm,g as yd,Y as Am,f as Im}from"./index-BbQ5_tfg.js";/* empty css */import*as Om from"react-dom";import tc,{flushSync as Qa,createPortal as bd,unstable_batchedUpdates as Nm}from"react-dom";var vr=(e=>(e.FLAT="files",e.NAV="nav",e))(vr||{});const Mm=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-2xl font-bold",children:"\u5E94\u7528\u52A0\u8F7D\u4E2D..."})}),Pm=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-2xl font-bold",children:"\u5E94\u7528\u9519\u8BEF"})}),Fm=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-lg font-medium",children:"\u5BB9\u5668\u52A0\u8F7D\u4E2D..."})}),Bm=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-lg font-medium",children:"\u5BB9\u5668\u9519\u8BEF"})}),Rm=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-base font-medium",children:"\u5185\u5BB9\u52A0\u8F7D\u4E2D..."})}),Dm=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-base font-medium",children:"\u5185\u5BB9\u9519\u8BEF"})}),jm=({viewType:e,cardType:t})=>ye("div",{className:"main relative h-full w-full flex flex-col items-center justify-center",children:[B("div",{className:"text-6xl mb-4",style:{color:"#d1d5db"},children:"\u{1F4ED}"}),B("div",{className:"text-lg font-medium mb-2",style:{color:"#6b7280"},children:e==="card"?"\u6682\u65E0\u6570\u636E":e==="table"?"\u6682\u65E0\u8868\u683C\u6570\u636E":"\u6682\u65E0\u6570\u636E"}),B("div",{className:"text-sm",style:{color:"#9ca3af"},children:e==="card"?"\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\u6DFB\u52A0\u6570\u636E":e==="table"?"\u8BF7\u5148\u6DFB\u52A0\u6570\u636E\u5230\u8868\u683C\u4E2D":"\u8BF7\u5148\u6DFB\u52A0\u6570\u636E"})]}),xn=(e,t)=>{console.log("[findNodeById] Searching for id:",t,"in nodes:",e);for(const n of e){if(console.log("[findNodeById] Checking node:",n),n.id===t)return console.log("[findNodeById] Found node:",n),n;if(n.children){const r=Array.isArray(n.children)?n.children:Object.values(n.children);console.log("[findNodeById] Searching in children:",r);const o=xn(r,t);if(o)return console.log("[findNodeById] Found in children:",o),o}}return console.log("[findNodeById] Node not found for id:",t),null},Za=e=>{for(const t of e){if(t.type)return t.id;if(t.children){const n=Array.isArray(t.children)?t.children:Object.values(t.children),r=Za(n);if(r)return r}}},Tm=e=>{const t=n=>{let r=[];return n.children&&(r=Array.isArray(n.children)?n.children:Object.values(n.children)),{title:n.label,key:n.id,children:r.length>0?r.map(t):void 0,selectable:!0}};return e.map(t)},zm=(e,t)=>Array.isArray(e)?t==="table"?e.filter(n=>n&&n.data&&Array.isArray(n.data)):e:e&&typeof e=="object"?[e]:[],Km=e=>{const t=new Set;return e.forEach(n=>{n.adding&&t.add(n.id)}),t},Lm=(e,t)=>{const[n,r]=it(()=>{const g=Array.isArray(e)?e:[];return console.log("[useAppState] \u521D\u59CB\u5316innerData:",g),g}),[o,i]=it(new Set),[a,s]=it(new Set),[l,c]=it(""),[u,d]=it([]);ot(()=>{if(console.log("[useAppState] \u6570\u636E\u6E90\u53D8\u5316:",{dataSource:e,activeNodeType:t}),t==="form"){const m=Array.isArray(e)?e:[];r(m);return}const g=zm(e,t);console.log("[useAppState] \u9A8C\u8BC1\u540E\u7684\u6570\u636E:",g),r(g);const v=Km(g);s(v),d([])},[e,t]);const p=Le(()=>{d([]),c(""),i(new Set)},[]);return{innerData:n,setInnerData:r,pendingIds:o,setPendingIds:i,addingIds:a,setAddingIds:s,fuzzyValue:l,setFuzzyValue:c,selectedIds:u,setSelectedIds:d,resetStateOnNodeChange:p}},Hm=(e,t,n,r,o,i,a)=>{const s=Le((S,N)=>{const{tableId:F,...I}=N||{};N!=null&&N.animate?(r(S.id),e(M=>{if(F)return M.map(D=>{if(D.id===F){const z=[...D.children||[],{...S,adding:!0}];return{...D,children:z}}return D});const P={...S,adding:!0};if((I==null?void 0:I.position)==="start"||(I==null?void 0:I.position)===void 0)return[P,...M];if(typeof(I==null?void 0:I.position)=="number"){const D=[...M];return D.splice(I.position,0,P),D}return[P,...M]})):e(M=>{if(F)return M.map(P=>{if(P.id===F){const D=[...P.children||[],S];return{...P,children:D}}return P});if((I==null?void 0:I.position)==="start")return[S,...M];if(typeof(I==null?void 0:I.position)=="number"){const P=[...M];return P.splice(I.position,0,S),P}return[...M,S]})},[e,r]),l=Le((S,N)=>{S&&e(F=>{if(!Array.isArray(F))return console.warn("[useAppFunctions] removeItem: prev\u4E0D\u662F\u6570\u7EC4\uFF0C\u91CD\u7F6E\u4E3A\u7A7A\u6570\u7EC4"),[];if(N)return F.map(M=>{if(M.id===N&&M.children){const P=M.children.map(D=>D.id===S?{...D,removing:!0}:D);return{...M,children:P}}return M});const I=F.map(M=>M.id===S?{...M,removing:!0}:M);return console.log("[useAppFunctions] removeItem \u8BBE\u7F6Eremoving",S,I),I})},[e]),c=Le((S,N)=>{e(F=>Array.isArray(F)?F.map(I=>{if(I.id===N&&I.children){const M=I.children.filter(P=>P.id!==S);if(M.length===0){const{children:P,...D}=I;return D}return{...I,children:M}}return I}):[])},[e]),u=Le((S,N)=>{!S||S.length===0||e(F=>{if(!Array.isArray(F))return console.warn("[useAppFunctions] removeItems: prev\u4E0D\u662F\u6570\u7EC4\uFF0C\u91CD\u7F6E\u4E3A\u7A7A\u6570\u7EC4"),[];if(N)return F.map(M=>{if(M.id===N&&M.children){const P=M.children.map(D=>S.includes(D.id)?{...D,removing:!0}:D);return{...M,children:P}}return M});const I=F.map(M=>S.includes(M.id)?{...M,removing:!0}:M);return console.log("[useAppFunctions] removeItems \u8BBE\u7F6Eremoving",S,I),I})},[e]),d=Le(S=>{e(N=>{const F=N.find(I=>I.id===S);return F?F.hasOwnProperty("children")?(console.error(`[addSubTable] \u884C ${S} \u5DF2\u7ECF\u6709\u5B50table\u529F\u80FD\uFF0C\u65E0\u9700\u91CD\u590D\u6DFB\u52A0`),N):N.map(I=>I.id===S?{...I,children:[]}:I):(console.error(`[addSubTable] \u672A\u627E\u5230ID\u4E3A ${S} \u7684\u884C`),N)})},[e]),p=Le(S=>{e(N=>{const F=N.find(M=>M.id===S);if(!F)return console.error(`[deleteSubTable] \u672A\u627E\u5230ID\u4E3A ${S} \u7684\u884C`),N;if(!F.hasOwnProperty("children"))return console.error(`[deleteSubTable] \u884C ${S} \u6CA1\u6709\u5B50table\u529F\u80FD`),N;const I=(F.children||[]).filter(M=>!M.removing).length;return I>0?(console.error(`[deleteSubTable] \u884C ${S} \u7684\u5B50table\u8FD8\u6709 ${I} \u6761\u6570\u636E\uFF0C\u65E0\u6CD5\u5220\u9664\u5B50table\u529F\u80FD\u3002\u8BF7\u5148\u5220\u9664\u6240\u6709\u5B50table\u6570\u636E\u3002`),N):N.map(M=>{if(M.id===S&&M.hasOwnProperty("children")){const{children:P,...D}=M;return D}return M})})},[e]),g=Le((S,N,F)=>{N&&e(I=>I.map(M=>F&&M.id===F&&M.children?{...M,children:M.children.map(P=>P.id===N&&typeof P=="object"?v(P,S):P)}:M.id===N&&typeof M=="object"?v(M,S):M))},[e]),v=Le((S,N)=>{if(Array.isArray(N)){const F=[...S.data];return N.forEach(I=>{const M=F.findIndex(P=>P.columnId===I.columnId);M>=0?F[M]={...F[M],value:I.value}:F.push(I)}),{...S,data:F}}else if(typeof N=="object")return{...S,...N};return S},[]),m=Le(S=>{if(!S)return;const N=document.querySelector(`[data-item-id="${S}"]`);N&&N.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},[]),h=Le((S,N)=>{e(N?F=>F.map(I=>{if(I.id!==N)return I;if(!I.hasOwnProperty("children"))return console.warn(`[useAppFunctions] \u884C ${N} \u6CA1\u6709children\u5B57\u6BB5\uFF0C\u8DF3\u8FC7\u66F4\u65B0`),I;const M=I.children||[],P=M.findIndex(D=>D.id===S.id);if(P>=0){const D=[...M];return D[P]=S,{...I,children:D}}else return{...I,children:[...M,S]}}):Array.isArray(S)?S:[])},[e]);Le(S=>{e(N=>Array.isArray(N)?Array.isArray(S)?[...N,...S]:N:Array.isArray(S)?S:[])},[e]);const y=Le(S=>{t(S)},[t]),x=Le(S=>{e(N=>N.map(F=>F.id===S?{...F,tableLoading:!0}:F))},[e]),b=Le(S=>{e(N=>N.map(F=>F.id===S?{...F,tableLoading:!1}:F))},[e]),k=Le(S=>{n(S)},[n]),w=Le(S=>i.has(S),[i]),E=Le(S=>{r(S)},[r]),A=Le(S=>{o(S)},[o]),C=Le(S=>a.has(S),[a]);return{addItem:s,removeItem:l,removeItems:u,updateItem:g,scrollToItem:m,syncSourceData:h,addPending:y,removePending:k,isPending:w,addAdding:E,removeAdding:A,isAdding:C,tablePending:x,removeTablePending:b,addSubTable:d,deleteSubTable:p,removeSubTableRow:c}};/**
|
|
2
2
|
* @license lucide-react v0.456.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import*as i from"react";import ie,{forwardRef as zt,useMemo as Bo,useRef as He,useCallback as Ee,useImperativeHandle as xn,createContext as To}from"react";import{R as zo,a as Do}from"./LeftOutlined-DZMeGbKk.js";import{b3 as Te,K as pe,a0 as wn,b4 as Dt,b5 as Mn,L as de,Q as te,j as L,b6 as On,_ as ne,V as q,b7 as Ao,b8 as Pn,U as ee,B as xe,b9 as _o,l as Ve,O as Rn,M as En,az as we,aS as jo,aT as ko,aU as Lo,aW as Ho,ba as We,bb as At,v as Ko,a6 as Vo,I as Wo,C as ct,o as ut,T as Fo,bc as Xo,a2 as Go,s as D,a8 as qo,aX as Uo,a as Nn,m as Mt,a_ as Yo,bd as it,i as Bn,aG as an,r as Tn,aO as ln,be as Zo,a1 as zn,an as Ot,ap as Dn,b1 as Jo,bf as Qo,bg as er,bh as tr,bi as nr,b as or,bj as sn,$ as cn,h as rr,e as ir,au as ar,af as lr,bk as sr,a3 as cr,bl as ur,u as dr,bm as mr,bn as vr,bo as pr,J as un}from"./index-DHK_n74G.js";import{flushSync as fr}from"react-dom";var gr=pe.ESC,br=pe.TAB;function hr(e){var n=e.visible,t=e.triggerRef,o=e.onVisibleChange,r=e.autoFocus,l=e.overlayRef,a=i.useRef(!1),s=function(){if(n){var u,m;(u=t.current)===null||u===void 0||(m=u.focus)===null||m===void 0||m.call(u),o==null||o(!1)}},c=function(){var u;return(u=l.current)!==null&&u!==void 0&&u.focus?(l.current.focus(),a.current=!0,!0):!1},d=function(u){switch(u.keyCode){case gr:s();break;case br:{var m=!1;a.current||(m=c()),m?u.preventDefault():s();break}}};i.useEffect(function(){return n?(window.addEventListener("keydown",d),r&&Te(c,3),function(){window.removeEventListener("keydown",d),a.current=!1}):function(){a.current=!1}},[n])}var $r=zt(function(e,n){var t=e.overlay,o=e.arrow,r=e.prefixCls,l=Bo(function(){var s;return typeof t=="function"?s=t():s=t,s},[t]),a=wn(n,Dt(l));return ie.createElement(ie.Fragment,null,o&&ie.createElement("div",{className:"".concat(r,"-arrow")}),ie.cloneElement(l,{ref:Mn(l)?a:void 0}))}),Ne={adjustX:1,adjustY:1},Be=[0,0],Cr={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-4],targetOffset:Be},top:{points:["bc","tc"],overflow:Ne,offset:[0,-4],targetOffset:Be},topRight:{points:["br","tr"],overflow:Ne,offset:[0,-4],targetOffset:Be},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,4],targetOffset:Be},bottom:{points:["tc","bc"],overflow:Ne,offset:[0,4],targetOffset:Be},bottomRight:{points:["tr","br"],overflow:Ne,offset:[0,4],targetOffset:Be}},yr=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Ir(e,n){var t,o=e.arrow,r=o===void 0?!1:o,l=e.prefixCls,a=l===void 0?"rc-dropdown":l,s=e.transitionName,c=e.animation,d=e.align,f=e.placement,u=f===void 0?"bottomLeft":f,m=e.placements,g=m===void 0?Cr:m,v=e.getPopupContainer,p=e.showAction,b=e.hideAction,I=e.overlayClassName,w=e.overlayStyle,S=e.visible,C=e.trigger,$=C===void 0?["hover"]:C,h=e.autoFocus,E=e.overlay,y=e.children,x=e.onVisibleChange,T=de(e,yr),N=ie.useState(),P=te(N,2),M=P[0],O=P[1],R="visible"in e?S:M,H=ie.useRef(null),B=ie.useRef(null),k=ie.useRef(null);ie.useImperativeHandle(n,function(){return H.current});var F=function(K){O(K),x==null||x(K)};hr({visible:R,triggerRef:k,onVisibleChange:F,autoFocus:h,overlayRef:B});var X=function(K){var V=e.onOverlayClick;O(!1),V&&V(K)},J=function(){return ie.createElement($r,{ref:B,overlay:E,prefixCls:a,arrow:r})},U=function(){return typeof E=="function"?J:J()},z=function(){var K=e.minOverlayWidthMatchTrigger,V=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?K:!V},A=function(){var K=e.openClassName;return K!==void 0?K:"".concat(a,"-open")},_=ie.cloneElement(y,{className:L((t=y.props)===null||t===void 0?void 0:t.className,R&&A()),ref:Mn(y)?wn(k,Dt(y)):void 0}),Q=b;return!Q&&$.indexOf("contextMenu")!==-1&&(Q=["click"]),ie.createElement(On,ne({builtinPlacements:g},T,{prefixCls:a,ref:H,popupClassName:L(I,q({},"".concat(a,"-show-arrow"),r)),popupStyle:w,action:$,showAction:p,hideAction:Q,popupPlacement:u,popupAlign:d,popupTransitionName:s,popupAnimation:c,popupVisible:R,stretch:z()?"minWidth":"",popup:U(),onPopupVisibleChange:F,onPopupClick:X,getPopupContainer:v}),_)}const Sr=ie.forwardRef(Ir),xr=e=>typeof e!="object"&&typeof e!="function"||e===null;var An=i.createContext(null);function _n(e,n){return e===void 0?null:"".concat(e,"-").concat(n)}function jn(e){var n=i.useContext(An);return _n(n,e)}var wr=["children","locked"],ve=i.createContext(null);function Mr(e,n){var t=ee({},e);return Object.keys(n).forEach(function(o){var r=n[o];r!==void 0&&(t[o]=r)}),t}function Fe(e){var n=e.children,t=e.locked,o=de(e,wr),r=i.useContext(ve),l=Ao(function(){return Mr(r,o)},[r,o],function(a,s){return!t&&(a[0]!==s[0]||!Pn(a[1],s[1],!0))});return i.createElement(ve.Provider,{value:l},n)}var Or=[],kn=i.createContext(null);function dt(){return i.useContext(kn)}var Ln=i.createContext(Or);function ze(e){var n=i.useContext(Ln);return i.useMemo(function(){return e!==void 0?[].concat(xe(n),[e]):n},[n,e])}var Hn=i.createContext(null),_t=i.createContext({});function dn(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(_o(e)){var t=e.nodeName.toLowerCase(),o=["input","select","textarea","button"].includes(t)||e.isContentEditable||t==="a"&&!!e.getAttribute("href"),r=e.getAttribute("tabindex"),l=Number(r),a=null;return r&&!Number.isNaN(l)?a=l:o&&a===null&&(a=0),o&&e.disabled&&(a=null),a!==null&&(a>=0||n&&a<0)}return!1}function Pr(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=xe(e.querySelectorAll("*")).filter(function(o){return dn(o,n)});return dn(e,n)&&t.unshift(e),t}var Pt=pe.LEFT,Rt=pe.RIGHT,Et=pe.UP,ot=pe.DOWN,rt=pe.ENTER,Kn=pe.ESC,ke=pe.HOME,Le=pe.END,mn=[Et,ot,Pt,Rt];function Rr(e,n,t,o){var r,l="prev",a="next",s="children",c="parent";if(e==="inline"&&o===rt)return{inlineTrigger:!0};var d=q(q({},Et,l),ot,a),f=q(q(q(q({},Pt,t?a:l),Rt,t?l:a),ot,s),rt,s),u=q(q(q(q(q(q({},Et,l),ot,a),rt,s),Kn,c),Pt,t?s:c),Rt,t?c:s),m={inline:d,horizontal:f,vertical:u,inlineSub:d,horizontalSub:u,verticalSub:u},g=(r=m["".concat(e).concat(n?"":"Sub")])===null||r===void 0?void 0:r[o];switch(g){case l:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case c:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function Er(e){for(var n=e;n;){if(n.getAttribute("data-menu-list"))return n;n=n.parentElement}return null}function Nr(e,n){for(var t=e||document.activeElement;t;){if(n.has(t))return t;t=t.parentElement}return null}function jt(e,n){var t=Pr(e,!0);return t.filter(function(o){return n.has(o)})}function vn(e,n,t){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var r=jt(e,n),l=r.length,a=r.findIndex(function(s){return t===s});return o<0?a===-1?a=l-1:a-=1:o>0&&(a+=1),a=(a+l)%l,r[a]}var Nt=function(n,t){var o=new Set,r=new Map,l=new Map;return n.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(_n(t,a),"']"));s&&(o.add(s),l.set(s,a),r.set(a,s))}),{elements:o,key2element:r,element2key:l}};function Br(e,n,t,o,r,l,a,s,c,d){var f=i.useRef(),u=i.useRef();u.current=n;var m=function(){Te.cancel(f.current)};return i.useEffect(function(){return function(){m()}},[]),function(g){var v=g.which;if([].concat(mn,[rt,Kn,ke,Le]).includes(v)){var p=l(),b=Nt(p,o),I=b,w=I.elements,S=I.key2element,C=I.element2key,$=S.get(n),h=Nr($,w),E=C.get(h),y=Rr(e,a(E,!0).length===1,t,v);if(!y&&v!==ke&&v!==Le)return;(mn.includes(v)||[ke,Le].includes(v))&&g.preventDefault();var x=function(B){if(B){var k=B,F=B.querySelector("a");F!=null&&F.getAttribute("href")&&(k=F);var X=C.get(B);s(X),m(),f.current=Te(function(){u.current===X&&k.focus()})}};if([ke,Le].includes(v)||y.sibling||!h){var T;!h||e==="inline"?T=r.current:T=Er(h);var N,P=jt(T,w);v===ke?N=P[0]:v===Le?N=P[P.length-1]:N=vn(T,w,h,y.offset),x(N)}else if(y.inlineTrigger)c(E);else if(y.offset>0)c(E,!0),m(),f.current=Te(function(){b=Nt(p,o);var H=h.getAttribute("aria-controls"),B=document.getElementById(H),k=vn(B,b.elements);x(k)},5);else if(y.offset<0){var M=a(E,!0),O=M[M.length-2],R=S.get(O);c(O,!1),x(R)}}d==null||d(g)}}function Tr(e){Promise.resolve().then(e)}var kt="__RC_UTIL_PATH_SPLIT__",pn=function(n){return n.join(kt)},zr=function(n){return n.split(kt)},Bt="rc-menu-more";function Dr(){var e=i.useState({}),n=te(e,2),t=n[1],o=He(new Map),r=He(new Map),l=i.useState([]),a=te(l,2),s=a[0],c=a[1],d=He(0),f=He(!1),u=function(){f.current||t({})},m=Ee(function(S,C){var $=pn(C);r.current.set($,S),o.current.set(S,$),d.current+=1;var h=d.current;Tr(function(){h===d.current&&u()})},[]),g=Ee(function(S,C){var $=pn(C);r.current.delete($),o.current.delete(S)},[]),v=Ee(function(S){c(S)},[]),p=Ee(function(S,C){var $=o.current.get(S)||"",h=zr($);return C&&s.includes(h[0])&&h.unshift(Bt),h},[s]),b=Ee(function(S,C){return S.filter(function($){return $!==void 0}).some(function($){var h=p($,!0);return h.includes(C)})},[p]),I=function(){var C=xe(o.current.keys());return s.length&&C.push(Bt),C},w=Ee(function(S){var C="".concat(o.current.get(S)).concat(kt),$=new Set;return xe(r.current.keys()).forEach(function(h){h.startsWith(C)&&$.add(r.current.get(h))}),$},[]);return i.useEffect(function(){return function(){f.current=!0}},[]),{registerPath:m,unregisterPath:g,refreshOverflowKeys:v,isSubPathKey:b,getKeyPath:p,getKeys:I,getSubPathKeys:w}}function Ke(e){var n=i.useRef(e);n.current=e;var t=i.useCallback(function(){for(var o,r=arguments.length,l=new Array(r),a=0;a<r;a++)l[a]=arguments[a];return(o=n.current)===null||o===void 0?void 0:o.call.apply(o,[n].concat(l))},[]);return e?t:void 0}var Ar=Math.random().toFixed(5).toString().slice(2),fn=0;function _r(e){var n=Ve(e,{value:e}),t=te(n,2),o=t[0],r=t[1];return i.useEffect(function(){fn+=1;var l="".concat(Ar,"-").concat(fn);r("rc-menu-uuid-".concat(l))},[]),o}function Vn(e,n,t,o){var r=i.useContext(ve),l=r.activeKey,a=r.onActive,s=r.onInactive,c={active:l===e};return n||(c.onMouseEnter=function(d){t==null||t({key:e,domEvent:d}),a(e)},c.onMouseLeave=function(d){o==null||o({key:e,domEvent:d}),s(e)}),c}function Wn(e){var n=i.useContext(ve),t=n.mode,o=n.rtl,r=n.inlineIndent;if(t!=="inline")return null;var l=e;return o?{paddingRight:l*r}:{paddingLeft:l*r}}function Fn(e){var n=e.icon,t=e.props,o=e.children,r;return n===null||n===!1?null:(typeof n=="function"?r=i.createElement(n,ee({},t)):typeof n!="boolean"&&(r=n),r||o||null)}var jr=["item"];function at(e){var n=e.item,t=de(e,jr);return Object.defineProperty(t,"item",{get:function(){return Rn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),n}}),t}var kr=["title","attribute","elementRef"],Lr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Hr=["active"],Kr=(function(e){jo(t,e);var n=ko(t);function t(){return Lo(this,t),n.apply(this,arguments)}return Ho(t,[{key:"render",value:function(){var r=this.props,l=r.title,a=r.attribute,s=r.elementRef,c=de(r,kr),d=we(c,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Rn(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),i.createElement(We.Item,ne({},a,{title:typeof l=="string"?l:void 0},d,{ref:s}))}}]),t})(i.Component),Vr=i.forwardRef(function(e,n){var t=e.style,o=e.className,r=e.eventKey;e.warnKey;var l=e.disabled,a=e.itemIcon,s=e.children,c=e.role,d=e.onMouseEnter,f=e.onMouseLeave,u=e.onClick,m=e.onKeyDown,g=e.onFocus,v=de(e,Lr),p=jn(r),b=i.useContext(ve),I=b.prefixCls,w=b.onItemClick,S=b.disabled,C=b.overflowDisabled,$=b.itemIcon,h=b.selectedKeys,E=b.onActive,y=i.useContext(_t),x=y._internalRenderMenuItem,T="".concat(I,"-item"),N=i.useRef(),P=i.useRef(),M=S||l,O=En(n,P),R=ze(r),H=function(V){return{key:r,keyPath:xe(R).reverse(),item:N.current,domEvent:V}},B=a||$,k=Vn(r,M,d,f),F=k.active,X=de(k,Hr),J=h.includes(r),U=Wn(R.length),z=function(V){if(!M){var re=H(V);u==null||u(at(re)),w(re)}},A=function(V){if(m==null||m(V),V.which===pe.ENTER){var re=H(V);u==null||u(at(re)),w(re)}},_=function(V){E(r),g==null||g(V)},Q={};e.role==="option"&&(Q["aria-selected"]=J);var Y=i.createElement(Kr,ne({ref:N,elementRef:O,role:c===null?"none":c||"menuitem",tabIndex:l?null:-1,"data-menu-id":C&&p?null:p},we(v,["extra"]),X,Q,{component:"li","aria-disabled":l,style:ee(ee({},U),t),className:L(T,q(q(q({},"".concat(T,"-active"),F),"".concat(T,"-selected"),J),"".concat(T,"-disabled"),M),o),onClick:z,onKeyDown:A,onFocus:_}),s,i.createElement(Fn,{props:ee(ee({},e),{},{isSelected:J}),icon:B}));return x&&(Y=x(Y,e,{selected:J})),Y});function Wr(e,n){var t=e.eventKey,o=dt(),r=ze(t);return i.useEffect(function(){if(o)return o.registerPath(t,r),function(){o.unregisterPath(t,r)}},[r]),o?null:i.createElement(Vr,ne({},e,{ref:n}))}const mt=i.forwardRef(Wr);var Fr=["className","children"],Xr=function(n,t){var o=n.className,r=n.children,l=de(n,Fr),a=i.useContext(ve),s=a.prefixCls,c=a.mode,d=a.rtl;return i.createElement("ul",ne({className:L(s,d&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(c==="inline"?"inline":"vertical"),o),role:"menu"},l,{"data-menu-list":!0,ref:t}),r)},Lt=i.forwardRef(Xr);Lt.displayName="SubMenuList";function Ht(e,n){return At(e).map(function(t,o){if(i.isValidElement(t)){var r,l,a=t.key,s=(r=(l=t.props)===null||l===void 0?void 0:l.eventKey)!==null&&r!==void 0?r:a,c=s==null;c&&(s="tmp_key-".concat([].concat(xe(n),[o]).join("-")));var d={key:s,eventKey:s};return i.cloneElement(t,d)}return t})}var oe={adjustX:1,adjustY:1},Gr={topLeft:{points:["bl","tl"],overflow:oe},topRight:{points:["br","tr"],overflow:oe},bottomLeft:{points:["tl","bl"],overflow:oe},bottomRight:{points:["tr","br"],overflow:oe},leftTop:{points:["tr","tl"],overflow:oe},leftBottom:{points:["br","bl"],overflow:oe},rightTop:{points:["tl","tr"],overflow:oe},rightBottom:{points:["bl","br"],overflow:oe}},qr={topLeft:{points:["bl","tl"],overflow:oe},topRight:{points:["br","tr"],overflow:oe},bottomLeft:{points:["tl","bl"],overflow:oe},bottomRight:{points:["tr","br"],overflow:oe},rightTop:{points:["tr","tl"],overflow:oe},rightBottom:{points:["br","bl"],overflow:oe},leftTop:{points:["tl","tr"],overflow:oe},leftBottom:{points:["bl","br"],overflow:oe}};function Xn(e,n,t){if(n)return n;if(t)return t[e]||t.other}var Ur={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Yr(e){var n=e.prefixCls,t=e.visible,o=e.children,r=e.popup,l=e.popupStyle,a=e.popupClassName,s=e.popupOffset,c=e.disabled,d=e.mode,f=e.onVisibleChange,u=i.useContext(ve),m=u.getPopupContainer,g=u.rtl,v=u.subMenuOpenDelay,p=u.subMenuCloseDelay,b=u.builtinPlacements,I=u.triggerSubMenuAction,w=u.forceSubMenuRender,S=u.rootClassName,C=u.motion,$=u.defaultMotions,h=i.useState(!1),E=te(h,2),y=E[0],x=E[1],T=g?ee(ee({},qr),b):ee(ee({},Gr),b),N=Ur[d],P=Xn(d,C,$),M=i.useRef(P);d!=="inline"&&(M.current=P);var O=ee(ee({},M.current),{},{leavedClassName:"".concat(n,"-hidden"),removeOnLeave:!1,motionAppear:!0}),R=i.useRef();return i.useEffect(function(){return R.current=Te(function(){x(t)}),function(){Te.cancel(R.current)}},[t]),i.createElement(On,{prefixCls:n,popupClassName:L("".concat(n,"-popup"),q({},"".concat(n,"-rtl"),g),a,S),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:m,builtinPlacements:T,popupPlacement:N,popupVisible:y,popup:r,popupStyle:l,popupAlign:s&&{offset:s},action:c?[]:[I],mouseEnterDelay:v,mouseLeaveDelay:p,onPopupVisibleChange:f,forceRender:w,popupMotion:O,fresh:!0},o)}function Zr(e){var n=e.id,t=e.open,o=e.keyPath,r=e.children,l="inline",a=i.useContext(ve),s=a.prefixCls,c=a.forceSubMenuRender,d=a.motion,f=a.defaultMotions,u=a.mode,m=i.useRef(!1);m.current=u===l;var g=i.useState(!m.current),v=te(g,2),p=v[0],b=v[1],I=m.current?t:!1;i.useEffect(function(){m.current&&b(!1)},[u]);var w=ee({},Xn(l,d,f));o.length>1&&(w.motionAppear=!1);var S=w.onVisibleChanged;return w.onVisibleChanged=function(C){return!m.current&&!C&&b(!0),S==null?void 0:S(C)},p?null:i.createElement(Fe,{mode:l,locked:!m.current},i.createElement(Ko,ne({visible:I},w,{forceRender:c,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(C){var $=C.className,h=C.style;return i.createElement(Lt,{id:n,className:$,style:h},r)}))}var Jr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Qr=["active"],ei=i.forwardRef(function(e,n){var t=e.style,o=e.className,r=e.title,l=e.eventKey;e.warnKey;var a=e.disabled,s=e.internalPopupClose,c=e.children,d=e.itemIcon,f=e.expandIcon,u=e.popupClassName,m=e.popupOffset,g=e.popupStyle,v=e.onClick,p=e.onMouseEnter,b=e.onMouseLeave,I=e.onTitleClick,w=e.onTitleMouseEnter,S=e.onTitleMouseLeave,C=de(e,Jr),$=jn(l),h=i.useContext(ve),E=h.prefixCls,y=h.mode,x=h.openKeys,T=h.disabled,N=h.overflowDisabled,P=h.activeKey,M=h.selectedKeys,O=h.itemIcon,R=h.expandIcon,H=h.onItemClick,B=h.onOpenChange,k=h.onActive,F=i.useContext(_t),X=F._internalRenderSubMenuItem,J=i.useContext(Hn),U=J.isSubPathKey,z=ze(),A="".concat(E,"-submenu"),_=T||a,Q=i.useRef(),Y=i.useRef(),K=d??O,V=f??R,re=x.includes(l),ae=!N&&re,Me=U(M,l),Oe=Vn(l,_,w,S),fe=Oe.active,$e=de(Oe,Qr),Ce=i.useState(!1),G=te(Ce,2),Pe=G[0],qe=G[1],Ue=function(le){_||qe(le)},ft=function(le){Ue(!0),p==null||p({key:l,domEvent:le})},Ye=function(le){Ue(!1),b==null||b({key:l,domEvent:le})},ge=i.useMemo(function(){return fe||(y!=="inline"?Pe||U([P],l):!1)},[y,fe,P,Pe,l,U]),gt=Wn(z.length),bt=function(le){_||(I==null||I({key:l,domEvent:le}),y==="inline"&&B(l,!re))},Ze=Ke(function(me){v==null||v(at(me)),H(me)}),Je=function(le){y!=="inline"&&B(l,le)},ht=function(){k(l)},be=$&&"".concat($,"-popup"),De=i.useMemo(function(){return i.createElement(Fn,{icon:y!=="horizontal"?V:void 0,props:ee(ee({},e),{},{isOpen:ae,isSubMenu:!0})},i.createElement("i",{className:"".concat(A,"-arrow")}))},[y,V,e,ae,A]),ye=i.createElement("div",ne({role:"menuitem",style:gt,className:"".concat(A,"-title"),tabIndex:_?null:-1,ref:Q,title:typeof r=="string"?r:null,"data-menu-id":N&&$?null:$,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":be,"aria-disabled":_,onClick:bt,onFocus:ht},$e),r,De),Ae=i.useRef(y);if(y!=="inline"&&z.length>1?Ae.current="vertical":Ae.current=y,!N){var Re=Ae.current;ye=i.createElement(Yr,{mode:Re,prefixCls:A,visible:!s&&ae&&y!=="inline",popupClassName:u,popupOffset:m,popupStyle:g,popup:i.createElement(Fe,{mode:Re==="horizontal"?"vertical":Re},i.createElement(Lt,{id:be,ref:Y},c)),disabled:_,onVisibleChange:Je},ye)}var ue=i.createElement(We.Item,ne({ref:n,role:"none"},C,{component:"li",style:t,className:L(A,"".concat(A,"-").concat(y),o,q(q(q(q({},"".concat(A,"-open"),ae),"".concat(A,"-active"),ge),"".concat(A,"-selected"),Me),"".concat(A,"-disabled"),_)),onMouseEnter:ft,onMouseLeave:Ye}),ye,!N&&i.createElement(Zr,{id:be,open:ae,keyPath:z},c));return X&&(ue=X(ue,e,{selected:Me,active:ge,open:ae,disabled:_})),i.createElement(Fe,{onItemClick:Ze,mode:y==="horizontal"?"vertical":y,itemIcon:K,expandIcon:V},ue)}),vt=i.forwardRef(function(e,n){var t=e.eventKey,o=e.children,r=ze(t),l=Ht(o,r),a=dt();i.useEffect(function(){if(a)return a.registerPath(t,r),function(){a.unregisterPath(t,r)}},[r]);var s;return a?s=l:s=i.createElement(ei,ne({ref:n},e),l),i.createElement(Ln.Provider,{value:r},s)});function Kt(e){var n=e.className,t=e.style,o=i.useContext(ve),r=o.prefixCls,l=dt();return l?null:i.createElement("li",{role:"separator",className:L("".concat(r,"-item-divider"),n),style:t})}var ti=["className","title","eventKey","children"],ni=i.forwardRef(function(e,n){var t=e.className,o=e.title;e.eventKey;var r=e.children,l=de(e,ti),a=i.useContext(ve),s=a.prefixCls,c="".concat(s,"-item-group");return i.createElement("li",ne({ref:n,role:"presentation"},l,{onClick:function(f){return f.stopPropagation()},className:L(c,t)}),i.createElement("div",{role:"presentation",className:"".concat(c,"-title"),title:typeof o=="string"?o:void 0},o),i.createElement("ul",{role:"group",className:"".concat(c,"-list")},r))}),Vt=i.forwardRef(function(e,n){var t=e.eventKey,o=e.children,r=ze(t),l=Ht(o,r),a=dt();return a?l:i.createElement(ni,ne({ref:n},we(e,["warnKey"])),l)}),oi=["label","children","key","type","extra"];function Tt(e,n,t){var o=n.item,r=n.group,l=n.submenu,a=n.divider;return(e||[]).map(function(s,c){if(s&&Vo(s)==="object"){var d=s,f=d.label,u=d.children,m=d.key,g=d.type,v=d.extra,p=de(d,oi),b=m??"tmp-".concat(c);return u||g==="group"?g==="group"?i.createElement(r,ne({key:b},p,{title:f}),Tt(u,n,t)):i.createElement(l,ne({key:b},p,{title:f}),Tt(u,n,t)):g==="divider"?i.createElement(a,ne({key:b},p)):i.createElement(o,ne({key:b},p,{extra:v}),f,(!!v||v===0)&&i.createElement("span",{className:"".concat(t,"-item-extra")},v))}return null}).filter(function(s){return s})}function gn(e,n,t,o,r){var l=e,a=ee({divider:Kt,item:mt,group:Vt,submenu:vt},o);return n&&(l=Tt(n,a,r)),Ht(l,t)}var ri=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Se=[],ii=i.forwardRef(function(e,n){var t,o=e,r=o.prefixCls,l=r===void 0?"rc-menu":r,a=o.rootClassName,s=o.style,c=o.className,d=o.tabIndex,f=d===void 0?0:d,u=o.items,m=o.children,g=o.direction,v=o.id,p=o.mode,b=p===void 0?"vertical":p,I=o.inlineCollapsed,w=o.disabled,S=o.disabledOverflow,C=o.subMenuOpenDelay,$=C===void 0?.1:C,h=o.subMenuCloseDelay,E=h===void 0?.1:h,y=o.forceSubMenuRender,x=o.defaultOpenKeys,T=o.openKeys,N=o.activeKey,P=o.defaultActiveFirst,M=o.selectable,O=M===void 0?!0:M,R=o.multiple,H=R===void 0?!1:R,B=o.defaultSelectedKeys,k=o.selectedKeys,F=o.onSelect,X=o.onDeselect,J=o.inlineIndent,U=J===void 0?24:J,z=o.motion,A=o.defaultMotions,_=o.triggerSubMenuAction,Q=_===void 0?"hover":_,Y=o.builtinPlacements,K=o.itemIcon,V=o.expandIcon,re=o.overflowedIndicator,ae=re===void 0?"...":re,Me=o.overflowedIndicatorPopupClassName,Oe=o.getPopupContainer,fe=o.onClick,$e=o.onOpenChange,Ce=o.onKeyDown;o.openAnimation,o.openTransitionName;var G=o._internalRenderMenuItem,Pe=o._internalRenderSubMenuItem,qe=o._internalComponents,Ue=de(o,ri),ft=i.useMemo(function(){return[gn(m,u,Se,qe,l),gn(m,u,Se,{},l)]},[m,u,qe]),Ye=te(ft,2),ge=Ye[0],gt=Ye[1],bt=i.useState(!1),Ze=te(bt,2),Je=Ze[0],ht=Ze[1],be=i.useRef(),De=_r(v),ye=g==="rtl",Ae=Ve(x,{value:T,postState:function(j){return j||Se}}),Re=te(Ae,2),ue=Re[0],me=Re[1],le=function(j){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function se(){me(j),$e==null||$e(j)}W?fr(se):se()},to=i.useState(ue),Wt=te(to,2),no=Wt[0],oo=Wt[1],$t=i.useRef(!1),ro=i.useMemo(function(){return(b==="inline"||b==="vertical")&&I?["vertical",I]:[b,!1]},[b,I]),Ft=te(ro,2),Qe=Ft[0],Ct=Ft[1],Xt=Qe==="inline",io=i.useState(Qe),Gt=te(io,2),he=Gt[0],ao=Gt[1],lo=i.useState(Ct),qt=te(lo,2),so=qt[0],co=qt[1];i.useEffect(function(){ao(Qe),co(Ct),$t.current&&(Xt?me(no):le(Se))},[Qe,Ct]);var uo=i.useState(0),Ut=te(uo,2),et=Ut[0],mo=Ut[1],yt=et>=ge.length-1||he!=="horizontal"||S;i.useEffect(function(){Xt&&oo(ue)},[ue]),i.useEffect(function(){return $t.current=!0,function(){$t.current=!1}},[]);var Ie=Dr(),Yt=Ie.registerPath,Zt=Ie.unregisterPath,vo=Ie.refreshOverflowKeys,Jt=Ie.isSubPathKey,po=Ie.getKeyPath,Qt=Ie.getKeys,fo=Ie.getSubPathKeys,go=i.useMemo(function(){return{registerPath:Yt,unregisterPath:Zt}},[Yt,Zt]),bo=i.useMemo(function(){return{isSubPathKey:Jt}},[Jt]);i.useEffect(function(){vo(yt?Se:ge.slice(et+1).map(function(Z){return Z.key}))},[et,yt]);var ho=Ve(N||P&&((t=ge[0])===null||t===void 0?void 0:t.key),{value:N}),en=te(ho,2),_e=en[0],It=en[1],$o=Ke(function(Z){It(Z)}),Co=Ke(function(){It(void 0)});xn(n,function(){return{list:be.current,focus:function(j){var W,se=Qt(),ce=Nt(se,De),nt=ce.elements,St=ce.key2element,Eo=ce.element2key,on=jt(be.current,nt),rn=_e??(on[0]?Eo.get(on[0]):(W=ge.find(function(No){return!No.props.disabled}))===null||W===void 0?void 0:W.key),je=St.get(rn);if(rn&&je){var xt;je==null||(xt=je.focus)===null||xt===void 0||xt.call(je,j)}}}});var yo=Ve(B||[],{value:k,postState:function(j){return Array.isArray(j)?j:j==null?Se:[j]}}),tn=te(yo,2),tt=tn[0],Io=tn[1],So=function(j){if(O){var W=j.key,se=tt.includes(W),ce;H?se?ce=tt.filter(function(St){return St!==W}):ce=[].concat(xe(tt),[W]):ce=[W],Io(ce);var nt=ee(ee({},j),{},{selectedKeys:ce});se?X==null||X(nt):F==null||F(nt)}!H&&ue.length&&he!=="inline"&&le(Se)},xo=Ke(function(Z){fe==null||fe(at(Z)),So(Z)}),nn=Ke(function(Z,j){var W=ue.filter(function(ce){return ce!==Z});if(j)W.push(Z);else if(he!=="inline"){var se=fo(Z);W=W.filter(function(ce){return!se.has(ce)})}Pn(ue,W,!0)||le(W,!0)}),wo=function(j,W){var se=W??!ue.includes(j);nn(j,se)},Mo=Br(he,_e,ye,De,be,Qt,po,It,wo,Ce);i.useEffect(function(){ht(!0)},[]);var Oo=i.useMemo(function(){return{_internalRenderMenuItem:G,_internalRenderSubMenuItem:Pe}},[G,Pe]),Po=he!=="horizontal"||S?ge:ge.map(function(Z,j){return i.createElement(Fe,{key:Z.key,overflowDisabled:j>et},Z)}),Ro=i.createElement(We,ne({id:v,ref:be,prefixCls:"".concat(l,"-overflow"),component:"ul",itemComponent:mt,className:L(l,"".concat(l,"-root"),"".concat(l,"-").concat(he),c,q(q({},"".concat(l,"-inline-collapsed"),so),"".concat(l,"-rtl"),ye),a),dir:g,style:s,role:"menu",tabIndex:f,data:Po,renderRawItem:function(j){return j},renderRawRest:function(j){var W=j.length,se=W?ge.slice(-W):null;return i.createElement(vt,{eventKey:Bt,title:ae,disabled:yt,internalPopupClose:W===0,popupClassName:Me},se)},maxCount:he!=="horizontal"||S?We.INVALIDATE:We.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(j){mo(j)},onKeyDown:Mo},Ue));return i.createElement(_t.Provider,{value:Oo},i.createElement(An.Provider,{value:De},i.createElement(Fe,{prefixCls:l,rootClassName:a,mode:he,openKeys:ue,rtl:ye,disabled:w,motion:Je?z:null,defaultMotions:Je?A:null,activeKey:_e,onActive:$o,onInactive:Co,selectedKeys:tt,inlineIndent:U,subMenuOpenDelay:$,subMenuCloseDelay:E,forceSubMenuRender:y,builtinPlacements:Y,triggerSubMenuAction:Q,getPopupContainer:Oe,itemIcon:K,expandIcon:V,onItemClick:xo,onOpenChange:nn},i.createElement(Hn.Provider,{value:bo},Ro),i.createElement("div",{style:{display:"none"},"aria-hidden":!0},i.createElement(kn.Provider,{value:go},gt)))))}),Xe=ii;Xe.Item=mt;Xe.SubMenu=vt;Xe.ItemGroup=Vt;Xe.Divider=Kt;const Gn=i.createContext({});var ai={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"},li=function(n,t){return i.createElement(Wo,ne({},n,{ref:t,icon:ai}))},qn=i.forwardRef(li);const lt=To({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var si=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};const Un=e=>{const{prefixCls:n,className:t,dashed:o}=e,r=si(e,["prefixCls","className","dashed"]),{getPrefixCls:l}=i.useContext(ct),a=l("menu",n),s=L({[`${a}-item-divider-dashed`]:!!o},t);return i.createElement(Kt,Object.assign({className:s},r))},Yn=e=>{var n;const{className:t,children:o,icon:r,title:l,danger:a,extra:s}=e,{prefixCls:c,firstLevel:d,direction:f,disableMenuItemTitleTooltip:u,inlineCollapsed:m}=i.useContext(lt),g=S=>{const C=o==null?void 0:o[0],$=i.createElement("span",{className:L(`${c}-title-content`,{[`${c}-title-content-with-extra`]:!!s||s===0})},o);return(!r||i.isValidElement(o)&&o.type==="span")&&o&&S&&d&&typeof C=="string"?i.createElement("div",{className:`${c}-inline-collapsed-noicon`},C.charAt(0)):$},{siderCollapsed:v}=i.useContext(Gn);let p=l;typeof l>"u"?p=d?o:"":l===!1&&(p="");const b={title:p};!v&&!m&&(b.title=null,b.open=!1);const I=At(o).length;let w=i.createElement(mt,Object.assign({},we(e,["title","icon","danger"]),{className:L({[`${c}-item-danger`]:a,[`${c}-item-only-child`]:(r?I+1:I)===1},t),title:typeof l=="string"?l:void 0}),ut(r,{className:L(i.isValidElement(r)?(n=r.props)===null||n===void 0?void 0:n.className:void 0,`${c}-item-icon`)}),g(m));return u||(w=i.createElement(Fo,Object.assign({},b,{placement:f==="rtl"?"left":"right",classNames:{root:`${c}-inline-collapsed-tooltip`}}),w)),w};var ci=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};const st=i.createContext(null),ui=i.forwardRef((e,n)=>{const{children:t}=e,o=ci(e,["children"]),r=i.useContext(st),l=i.useMemo(()=>Object.assign(Object.assign({},r),o),[r,o.prefixCls,o.mode,o.selectable,o.rootClassName]),a=Xo(t),s=En(n,a?Dt(t):null);return i.createElement(st.Provider,{value:l},i.createElement(Go,{space:!0},a?i.cloneElement(t,{ref:s}):t))}),di=e=>{const{componentCls:n,motionDurationSlow:t,horizontalLineHeight:o,colorSplit:r,lineWidth:l,lineType:a,itemPaddingInline:s}=e;return{[`${n}-horizontal`]:{lineHeight:o,border:0,borderBottom:`${D(l)} ${a} ${r}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${n}-item, ${n}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${n}-item:hover,
|
|
1
|
+
import*as i from"react";import ie,{forwardRef as zt,useMemo as Bo,useRef as Le,useCallback as Ee,useImperativeHandle as xn,createContext as To}from"react";import{R as zo,a as Do}from"./LeftOutlined-DbVWaJal.js";import{b3 as Te,K as pe,a0 as wn,b4 as Dt,b5 as Mn,L as de,Q as te,j as H,b6 as On,_ as ne,V as q,b7 as Ao,b8 as Pn,U as ee,A as xe,b9 as _o,l as Ve,O as Rn,M as En,az as we,aS as jo,aT as ko,aU as Ho,aW as Lo,ba as We,bb as At,v as Ko,a6 as Vo,I as Wo,C as ct,o as ut,T as Fo,bc as Xo,a2 as Go,s as D,a8 as qo,aX as Uo,a as Nn,m as Mt,a_ as Yo,bd as it,i as Bn,aG as an,r as Tn,aO as ln,be as Zo,a1 as zn,an as Ot,ap as Dn,b1 as Jo,bf as Qo,bg as er,bh as tr,bi as nr,b as or,bj as sn,$ as cn,h as rr,e as ir,au as ar,af as lr,bk as sr,a3 as cr,bl as ur,u as dr,bm as mr,bn as vr,bo as pr,H as un}from"./index-DCnYE71u.js";import{flushSync as fr}from"react-dom";var gr=pe.ESC,br=pe.TAB;function hr(e){var n=e.visible,t=e.triggerRef,o=e.onVisibleChange,r=e.autoFocus,l=e.overlayRef,a=i.useRef(!1),s=function(){if(n){var u,m;(u=t.current)===null||u===void 0||(m=u.focus)===null||m===void 0||m.call(u),o==null||o(!1)}},c=function(){var u;return(u=l.current)!==null&&u!==void 0&&u.focus?(l.current.focus(),a.current=!0,!0):!1},d=function(u){switch(u.keyCode){case gr:s();break;case br:{var m=!1;a.current||(m=c()),m?u.preventDefault():s();break}}};i.useEffect(function(){return n?(window.addEventListener("keydown",d),r&&Te(c,3),function(){window.removeEventListener("keydown",d),a.current=!1}):function(){a.current=!1}},[n])}var $r=zt(function(e,n){var t=e.overlay,o=e.arrow,r=e.prefixCls,l=Bo(function(){var s;return typeof t=="function"?s=t():s=t,s},[t]),a=wn(n,Dt(l));return ie.createElement(ie.Fragment,null,o&&ie.createElement("div",{className:"".concat(r,"-arrow")}),ie.cloneElement(l,{ref:Mn(l)?a:void 0}))}),Ne={adjustX:1,adjustY:1},Be=[0,0],Cr={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-4],targetOffset:Be},top:{points:["bc","tc"],overflow:Ne,offset:[0,-4],targetOffset:Be},topRight:{points:["br","tr"],overflow:Ne,offset:[0,-4],targetOffset:Be},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,4],targetOffset:Be},bottom:{points:["tc","bc"],overflow:Ne,offset:[0,4],targetOffset:Be},bottomRight:{points:["tr","br"],overflow:Ne,offset:[0,4],targetOffset:Be}},yr=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Ir(e,n){var t,o=e.arrow,r=o===void 0?!1:o,l=e.prefixCls,a=l===void 0?"rc-dropdown":l,s=e.transitionName,c=e.animation,d=e.align,f=e.placement,u=f===void 0?"bottomLeft":f,m=e.placements,g=m===void 0?Cr:m,v=e.getPopupContainer,p=e.showAction,b=e.hideAction,I=e.overlayClassName,w=e.overlayStyle,S=e.visible,C=e.trigger,$=C===void 0?["hover"]:C,h=e.autoFocus,E=e.overlay,y=e.children,x=e.onVisibleChange,T=de(e,yr),N=ie.useState(),P=te(N,2),M=P[0],O=P[1],R="visible"in e?S:M,L=ie.useRef(null),B=ie.useRef(null),k=ie.useRef(null);ie.useImperativeHandle(n,function(){return L.current});var F=function(K){O(K),x==null||x(K)};hr({visible:R,triggerRef:k,onVisibleChange:F,autoFocus:h,overlayRef:B});var X=function(K){var V=e.onOverlayClick;O(!1),V&&V(K)},J=function(){return ie.createElement($r,{ref:B,overlay:E,prefixCls:a,arrow:r})},U=function(){return typeof E=="function"?J:J()},z=function(){var K=e.minOverlayWidthMatchTrigger,V=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?K:!V},A=function(){var K=e.openClassName;return K!==void 0?K:"".concat(a,"-open")},_=ie.cloneElement(y,{className:H((t=y.props)===null||t===void 0?void 0:t.className,R&&A()),ref:Mn(y)?wn(k,Dt(y)):void 0}),Q=b;return!Q&&$.indexOf("contextMenu")!==-1&&(Q=["click"]),ie.createElement(On,ne({builtinPlacements:g},T,{prefixCls:a,ref:L,popupClassName:H(I,q({},"".concat(a,"-show-arrow"),r)),popupStyle:w,action:$,showAction:p,hideAction:Q,popupPlacement:u,popupAlign:d,popupTransitionName:s,popupAnimation:c,popupVisible:R,stretch:z()?"minWidth":"",popup:U(),onPopupVisibleChange:F,onPopupClick:X,getPopupContainer:v}),_)}const Sr=ie.forwardRef(Ir),xr=e=>typeof e!="object"&&typeof e!="function"||e===null;var An=i.createContext(null);function _n(e,n){return e===void 0?null:"".concat(e,"-").concat(n)}function jn(e){var n=i.useContext(An);return _n(n,e)}var wr=["children","locked"],ve=i.createContext(null);function Mr(e,n){var t=ee({},e);return Object.keys(n).forEach(function(o){var r=n[o];r!==void 0&&(t[o]=r)}),t}function Fe(e){var n=e.children,t=e.locked,o=de(e,wr),r=i.useContext(ve),l=Ao(function(){return Mr(r,o)},[r,o],function(a,s){return!t&&(a[0]!==s[0]||!Pn(a[1],s[1],!0))});return i.createElement(ve.Provider,{value:l},n)}var Or=[],kn=i.createContext(null);function dt(){return i.useContext(kn)}var Hn=i.createContext(Or);function ze(e){var n=i.useContext(Hn);return i.useMemo(function(){return e!==void 0?[].concat(xe(n),[e]):n},[n,e])}var Ln=i.createContext(null),_t=i.createContext({});function dn(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(_o(e)){var t=e.nodeName.toLowerCase(),o=["input","select","textarea","button"].includes(t)||e.isContentEditable||t==="a"&&!!e.getAttribute("href"),r=e.getAttribute("tabindex"),l=Number(r),a=null;return r&&!Number.isNaN(l)?a=l:o&&a===null&&(a=0),o&&e.disabled&&(a=null),a!==null&&(a>=0||n&&a<0)}return!1}function Pr(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=xe(e.querySelectorAll("*")).filter(function(o){return dn(o,n)});return dn(e,n)&&t.unshift(e),t}var Pt=pe.LEFT,Rt=pe.RIGHT,Et=pe.UP,ot=pe.DOWN,rt=pe.ENTER,Kn=pe.ESC,ke=pe.HOME,He=pe.END,mn=[Et,ot,Pt,Rt];function Rr(e,n,t,o){var r,l="prev",a="next",s="children",c="parent";if(e==="inline"&&o===rt)return{inlineTrigger:!0};var d=q(q({},Et,l),ot,a),f=q(q(q(q({},Pt,t?a:l),Rt,t?l:a),ot,s),rt,s),u=q(q(q(q(q(q({},Et,l),ot,a),rt,s),Kn,c),Pt,t?s:c),Rt,t?c:s),m={inline:d,horizontal:f,vertical:u,inlineSub:d,horizontalSub:u,verticalSub:u},g=(r=m["".concat(e).concat(n?"":"Sub")])===null||r===void 0?void 0:r[o];switch(g){case l:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case c:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function Er(e){for(var n=e;n;){if(n.getAttribute("data-menu-list"))return n;n=n.parentElement}return null}function Nr(e,n){for(var t=e||document.activeElement;t;){if(n.has(t))return t;t=t.parentElement}return null}function jt(e,n){var t=Pr(e,!0);return t.filter(function(o){return n.has(o)})}function vn(e,n,t){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var r=jt(e,n),l=r.length,a=r.findIndex(function(s){return t===s});return o<0?a===-1?a=l-1:a-=1:o>0&&(a+=1),a=(a+l)%l,r[a]}var Nt=function(n,t){var o=new Set,r=new Map,l=new Map;return n.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(_n(t,a),"']"));s&&(o.add(s),l.set(s,a),r.set(a,s))}),{elements:o,key2element:r,element2key:l}};function Br(e,n,t,o,r,l,a,s,c,d){var f=i.useRef(),u=i.useRef();u.current=n;var m=function(){Te.cancel(f.current)};return i.useEffect(function(){return function(){m()}},[]),function(g){var v=g.which;if([].concat(mn,[rt,Kn,ke,He]).includes(v)){var p=l(),b=Nt(p,o),I=b,w=I.elements,S=I.key2element,C=I.element2key,$=S.get(n),h=Nr($,w),E=C.get(h),y=Rr(e,a(E,!0).length===1,t,v);if(!y&&v!==ke&&v!==He)return;(mn.includes(v)||[ke,He].includes(v))&&g.preventDefault();var x=function(B){if(B){var k=B,F=B.querySelector("a");F!=null&&F.getAttribute("href")&&(k=F);var X=C.get(B);s(X),m(),f.current=Te(function(){u.current===X&&k.focus()})}};if([ke,He].includes(v)||y.sibling||!h){var T;!h||e==="inline"?T=r.current:T=Er(h);var N,P=jt(T,w);v===ke?N=P[0]:v===He?N=P[P.length-1]:N=vn(T,w,h,y.offset),x(N)}else if(y.inlineTrigger)c(E);else if(y.offset>0)c(E,!0),m(),f.current=Te(function(){b=Nt(p,o);var L=h.getAttribute("aria-controls"),B=document.getElementById(L),k=vn(B,b.elements);x(k)},5);else if(y.offset<0){var M=a(E,!0),O=M[M.length-2],R=S.get(O);c(O,!1),x(R)}}d==null||d(g)}}function Tr(e){Promise.resolve().then(e)}var kt="__RC_UTIL_PATH_SPLIT__",pn=function(n){return n.join(kt)},zr=function(n){return n.split(kt)},Bt="rc-menu-more";function Dr(){var e=i.useState({}),n=te(e,2),t=n[1],o=Le(new Map),r=Le(new Map),l=i.useState([]),a=te(l,2),s=a[0],c=a[1],d=Le(0),f=Le(!1),u=function(){f.current||t({})},m=Ee(function(S,C){var $=pn(C);r.current.set($,S),o.current.set(S,$),d.current+=1;var h=d.current;Tr(function(){h===d.current&&u()})},[]),g=Ee(function(S,C){var $=pn(C);r.current.delete($),o.current.delete(S)},[]),v=Ee(function(S){c(S)},[]),p=Ee(function(S,C){var $=o.current.get(S)||"",h=zr($);return C&&s.includes(h[0])&&h.unshift(Bt),h},[s]),b=Ee(function(S,C){return S.filter(function($){return $!==void 0}).some(function($){var h=p($,!0);return h.includes(C)})},[p]),I=function(){var C=xe(o.current.keys());return s.length&&C.push(Bt),C},w=Ee(function(S){var C="".concat(o.current.get(S)).concat(kt),$=new Set;return xe(r.current.keys()).forEach(function(h){h.startsWith(C)&&$.add(r.current.get(h))}),$},[]);return i.useEffect(function(){return function(){f.current=!0}},[]),{registerPath:m,unregisterPath:g,refreshOverflowKeys:v,isSubPathKey:b,getKeyPath:p,getKeys:I,getSubPathKeys:w}}function Ke(e){var n=i.useRef(e);n.current=e;var t=i.useCallback(function(){for(var o,r=arguments.length,l=new Array(r),a=0;a<r;a++)l[a]=arguments[a];return(o=n.current)===null||o===void 0?void 0:o.call.apply(o,[n].concat(l))},[]);return e?t:void 0}var Ar=Math.random().toFixed(5).toString().slice(2),fn=0;function _r(e){var n=Ve(e,{value:e}),t=te(n,2),o=t[0],r=t[1];return i.useEffect(function(){fn+=1;var l="".concat(Ar,"-").concat(fn);r("rc-menu-uuid-".concat(l))},[]),o}function Vn(e,n,t,o){var r=i.useContext(ve),l=r.activeKey,a=r.onActive,s=r.onInactive,c={active:l===e};return n||(c.onMouseEnter=function(d){t==null||t({key:e,domEvent:d}),a(e)},c.onMouseLeave=function(d){o==null||o({key:e,domEvent:d}),s(e)}),c}function Wn(e){var n=i.useContext(ve),t=n.mode,o=n.rtl,r=n.inlineIndent;if(t!=="inline")return null;var l=e;return o?{paddingRight:l*r}:{paddingLeft:l*r}}function Fn(e){var n=e.icon,t=e.props,o=e.children,r;return n===null||n===!1?null:(typeof n=="function"?r=i.createElement(n,ee({},t)):typeof n!="boolean"&&(r=n),r||o||null)}var jr=["item"];function at(e){var n=e.item,t=de(e,jr);return Object.defineProperty(t,"item",{get:function(){return Rn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),n}}),t}var kr=["title","attribute","elementRef"],Hr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Lr=["active"],Kr=(function(e){jo(t,e);var n=ko(t);function t(){return Ho(this,t),n.apply(this,arguments)}return Lo(t,[{key:"render",value:function(){var r=this.props,l=r.title,a=r.attribute,s=r.elementRef,c=de(r,kr),d=we(c,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Rn(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),i.createElement(We.Item,ne({},a,{title:typeof l=="string"?l:void 0},d,{ref:s}))}}]),t})(i.Component),Vr=i.forwardRef(function(e,n){var t=e.style,o=e.className,r=e.eventKey;e.warnKey;var l=e.disabled,a=e.itemIcon,s=e.children,c=e.role,d=e.onMouseEnter,f=e.onMouseLeave,u=e.onClick,m=e.onKeyDown,g=e.onFocus,v=de(e,Hr),p=jn(r),b=i.useContext(ve),I=b.prefixCls,w=b.onItemClick,S=b.disabled,C=b.overflowDisabled,$=b.itemIcon,h=b.selectedKeys,E=b.onActive,y=i.useContext(_t),x=y._internalRenderMenuItem,T="".concat(I,"-item"),N=i.useRef(),P=i.useRef(),M=S||l,O=En(n,P),R=ze(r),L=function(V){return{key:r,keyPath:xe(R).reverse(),item:N.current,domEvent:V}},B=a||$,k=Vn(r,M,d,f),F=k.active,X=de(k,Lr),J=h.includes(r),U=Wn(R.length),z=function(V){if(!M){var re=L(V);u==null||u(at(re)),w(re)}},A=function(V){if(m==null||m(V),V.which===pe.ENTER){var re=L(V);u==null||u(at(re)),w(re)}},_=function(V){E(r),g==null||g(V)},Q={};e.role==="option"&&(Q["aria-selected"]=J);var Y=i.createElement(Kr,ne({ref:N,elementRef:O,role:c===null?"none":c||"menuitem",tabIndex:l?null:-1,"data-menu-id":C&&p?null:p},we(v,["extra"]),X,Q,{component:"li","aria-disabled":l,style:ee(ee({},U),t),className:H(T,q(q(q({},"".concat(T,"-active"),F),"".concat(T,"-selected"),J),"".concat(T,"-disabled"),M),o),onClick:z,onKeyDown:A,onFocus:_}),s,i.createElement(Fn,{props:ee(ee({},e),{},{isSelected:J}),icon:B}));return x&&(Y=x(Y,e,{selected:J})),Y});function Wr(e,n){var t=e.eventKey,o=dt(),r=ze(t);return i.useEffect(function(){if(o)return o.registerPath(t,r),function(){o.unregisterPath(t,r)}},[r]),o?null:i.createElement(Vr,ne({},e,{ref:n}))}const mt=i.forwardRef(Wr);var Fr=["className","children"],Xr=function(n,t){var o=n.className,r=n.children,l=de(n,Fr),a=i.useContext(ve),s=a.prefixCls,c=a.mode,d=a.rtl;return i.createElement("ul",ne({className:H(s,d&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(c==="inline"?"inline":"vertical"),o),role:"menu"},l,{"data-menu-list":!0,ref:t}),r)},Ht=i.forwardRef(Xr);Ht.displayName="SubMenuList";function Lt(e,n){return At(e).map(function(t,o){if(i.isValidElement(t)){var r,l,a=t.key,s=(r=(l=t.props)===null||l===void 0?void 0:l.eventKey)!==null&&r!==void 0?r:a,c=s==null;c&&(s="tmp_key-".concat([].concat(xe(n),[o]).join("-")));var d={key:s,eventKey:s};return i.cloneElement(t,d)}return t})}var oe={adjustX:1,adjustY:1},Gr={topLeft:{points:["bl","tl"],overflow:oe},topRight:{points:["br","tr"],overflow:oe},bottomLeft:{points:["tl","bl"],overflow:oe},bottomRight:{points:["tr","br"],overflow:oe},leftTop:{points:["tr","tl"],overflow:oe},leftBottom:{points:["br","bl"],overflow:oe},rightTop:{points:["tl","tr"],overflow:oe},rightBottom:{points:["bl","br"],overflow:oe}},qr={topLeft:{points:["bl","tl"],overflow:oe},topRight:{points:["br","tr"],overflow:oe},bottomLeft:{points:["tl","bl"],overflow:oe},bottomRight:{points:["tr","br"],overflow:oe},rightTop:{points:["tr","tl"],overflow:oe},rightBottom:{points:["br","bl"],overflow:oe},leftTop:{points:["tl","tr"],overflow:oe},leftBottom:{points:["bl","br"],overflow:oe}};function Xn(e,n,t){if(n)return n;if(t)return t[e]||t.other}var Ur={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Yr(e){var n=e.prefixCls,t=e.visible,o=e.children,r=e.popup,l=e.popupStyle,a=e.popupClassName,s=e.popupOffset,c=e.disabled,d=e.mode,f=e.onVisibleChange,u=i.useContext(ve),m=u.getPopupContainer,g=u.rtl,v=u.subMenuOpenDelay,p=u.subMenuCloseDelay,b=u.builtinPlacements,I=u.triggerSubMenuAction,w=u.forceSubMenuRender,S=u.rootClassName,C=u.motion,$=u.defaultMotions,h=i.useState(!1),E=te(h,2),y=E[0],x=E[1],T=g?ee(ee({},qr),b):ee(ee({},Gr),b),N=Ur[d],P=Xn(d,C,$),M=i.useRef(P);d!=="inline"&&(M.current=P);var O=ee(ee({},M.current),{},{leavedClassName:"".concat(n,"-hidden"),removeOnLeave:!1,motionAppear:!0}),R=i.useRef();return i.useEffect(function(){return R.current=Te(function(){x(t)}),function(){Te.cancel(R.current)}},[t]),i.createElement(On,{prefixCls:n,popupClassName:H("".concat(n,"-popup"),q({},"".concat(n,"-rtl"),g),a,S),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:m,builtinPlacements:T,popupPlacement:N,popupVisible:y,popup:r,popupStyle:l,popupAlign:s&&{offset:s},action:c?[]:[I],mouseEnterDelay:v,mouseLeaveDelay:p,onPopupVisibleChange:f,forceRender:w,popupMotion:O,fresh:!0},o)}function Zr(e){var n=e.id,t=e.open,o=e.keyPath,r=e.children,l="inline",a=i.useContext(ve),s=a.prefixCls,c=a.forceSubMenuRender,d=a.motion,f=a.defaultMotions,u=a.mode,m=i.useRef(!1);m.current=u===l;var g=i.useState(!m.current),v=te(g,2),p=v[0],b=v[1],I=m.current?t:!1;i.useEffect(function(){m.current&&b(!1)},[u]);var w=ee({},Xn(l,d,f));o.length>1&&(w.motionAppear=!1);var S=w.onVisibleChanged;return w.onVisibleChanged=function(C){return!m.current&&!C&&b(!0),S==null?void 0:S(C)},p?null:i.createElement(Fe,{mode:l,locked:!m.current},i.createElement(Ko,ne({visible:I},w,{forceRender:c,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(C){var $=C.className,h=C.style;return i.createElement(Ht,{id:n,className:$,style:h},r)}))}var Jr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Qr=["active"],ei=i.forwardRef(function(e,n){var t=e.style,o=e.className,r=e.title,l=e.eventKey;e.warnKey;var a=e.disabled,s=e.internalPopupClose,c=e.children,d=e.itemIcon,f=e.expandIcon,u=e.popupClassName,m=e.popupOffset,g=e.popupStyle,v=e.onClick,p=e.onMouseEnter,b=e.onMouseLeave,I=e.onTitleClick,w=e.onTitleMouseEnter,S=e.onTitleMouseLeave,C=de(e,Jr),$=jn(l),h=i.useContext(ve),E=h.prefixCls,y=h.mode,x=h.openKeys,T=h.disabled,N=h.overflowDisabled,P=h.activeKey,M=h.selectedKeys,O=h.itemIcon,R=h.expandIcon,L=h.onItemClick,B=h.onOpenChange,k=h.onActive,F=i.useContext(_t),X=F._internalRenderSubMenuItem,J=i.useContext(Ln),U=J.isSubPathKey,z=ze(),A="".concat(E,"-submenu"),_=T||a,Q=i.useRef(),Y=i.useRef(),K=d??O,V=f??R,re=x.includes(l),ae=!N&&re,Me=U(M,l),Oe=Vn(l,_,w,S),fe=Oe.active,$e=de(Oe,Qr),Ce=i.useState(!1),G=te(Ce,2),Pe=G[0],qe=G[1],Ue=function(le){_||qe(le)},ft=function(le){Ue(!0),p==null||p({key:l,domEvent:le})},Ye=function(le){Ue(!1),b==null||b({key:l,domEvent:le})},ge=i.useMemo(function(){return fe||(y!=="inline"?Pe||U([P],l):!1)},[y,fe,P,Pe,l,U]),gt=Wn(z.length),bt=function(le){_||(I==null||I({key:l,domEvent:le}),y==="inline"&&B(l,!re))},Ze=Ke(function(me){v==null||v(at(me)),L(me)}),Je=function(le){y!=="inline"&&B(l,le)},ht=function(){k(l)},be=$&&"".concat($,"-popup"),De=i.useMemo(function(){return i.createElement(Fn,{icon:y!=="horizontal"?V:void 0,props:ee(ee({},e),{},{isOpen:ae,isSubMenu:!0})},i.createElement("i",{className:"".concat(A,"-arrow")}))},[y,V,e,ae,A]),ye=i.createElement("div",ne({role:"menuitem",style:gt,className:"".concat(A,"-title"),tabIndex:_?null:-1,ref:Q,title:typeof r=="string"?r:null,"data-menu-id":N&&$?null:$,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":be,"aria-disabled":_,onClick:bt,onFocus:ht},$e),r,De),Ae=i.useRef(y);if(y!=="inline"&&z.length>1?Ae.current="vertical":Ae.current=y,!N){var Re=Ae.current;ye=i.createElement(Yr,{mode:Re,prefixCls:A,visible:!s&&ae&&y!=="inline",popupClassName:u,popupOffset:m,popupStyle:g,popup:i.createElement(Fe,{mode:Re==="horizontal"?"vertical":Re},i.createElement(Ht,{id:be,ref:Y},c)),disabled:_,onVisibleChange:Je},ye)}var ue=i.createElement(We.Item,ne({ref:n,role:"none"},C,{component:"li",style:t,className:H(A,"".concat(A,"-").concat(y),o,q(q(q(q({},"".concat(A,"-open"),ae),"".concat(A,"-active"),ge),"".concat(A,"-selected"),Me),"".concat(A,"-disabled"),_)),onMouseEnter:ft,onMouseLeave:Ye}),ye,!N&&i.createElement(Zr,{id:be,open:ae,keyPath:z},c));return X&&(ue=X(ue,e,{selected:Me,active:ge,open:ae,disabled:_})),i.createElement(Fe,{onItemClick:Ze,mode:y==="horizontal"?"vertical":y,itemIcon:K,expandIcon:V},ue)}),vt=i.forwardRef(function(e,n){var t=e.eventKey,o=e.children,r=ze(t),l=Lt(o,r),a=dt();i.useEffect(function(){if(a)return a.registerPath(t,r),function(){a.unregisterPath(t,r)}},[r]);var s;return a?s=l:s=i.createElement(ei,ne({ref:n},e),l),i.createElement(Hn.Provider,{value:r},s)});function Kt(e){var n=e.className,t=e.style,o=i.useContext(ve),r=o.prefixCls,l=dt();return l?null:i.createElement("li",{role:"separator",className:H("".concat(r,"-item-divider"),n),style:t})}var ti=["className","title","eventKey","children"],ni=i.forwardRef(function(e,n){var t=e.className,o=e.title;e.eventKey;var r=e.children,l=de(e,ti),a=i.useContext(ve),s=a.prefixCls,c="".concat(s,"-item-group");return i.createElement("li",ne({ref:n,role:"presentation"},l,{onClick:function(f){return f.stopPropagation()},className:H(c,t)}),i.createElement("div",{role:"presentation",className:"".concat(c,"-title"),title:typeof o=="string"?o:void 0},o),i.createElement("ul",{role:"group",className:"".concat(c,"-list")},r))}),Vt=i.forwardRef(function(e,n){var t=e.eventKey,o=e.children,r=ze(t),l=Lt(o,r),a=dt();return a?l:i.createElement(ni,ne({ref:n},we(e,["warnKey"])),l)}),oi=["label","children","key","type","extra"];function Tt(e,n,t){var o=n.item,r=n.group,l=n.submenu,a=n.divider;return(e||[]).map(function(s,c){if(s&&Vo(s)==="object"){var d=s,f=d.label,u=d.children,m=d.key,g=d.type,v=d.extra,p=de(d,oi),b=m??"tmp-".concat(c);return u||g==="group"?g==="group"?i.createElement(r,ne({key:b},p,{title:f}),Tt(u,n,t)):i.createElement(l,ne({key:b},p,{title:f}),Tt(u,n,t)):g==="divider"?i.createElement(a,ne({key:b},p)):i.createElement(o,ne({key:b},p,{extra:v}),f,(!!v||v===0)&&i.createElement("span",{className:"".concat(t,"-item-extra")},v))}return null}).filter(function(s){return s})}function gn(e,n,t,o,r){var l=e,a=ee({divider:Kt,item:mt,group:Vt,submenu:vt},o);return n&&(l=Tt(n,a,r)),Lt(l,t)}var ri=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Se=[],ii=i.forwardRef(function(e,n){var t,o=e,r=o.prefixCls,l=r===void 0?"rc-menu":r,a=o.rootClassName,s=o.style,c=o.className,d=o.tabIndex,f=d===void 0?0:d,u=o.items,m=o.children,g=o.direction,v=o.id,p=o.mode,b=p===void 0?"vertical":p,I=o.inlineCollapsed,w=o.disabled,S=o.disabledOverflow,C=o.subMenuOpenDelay,$=C===void 0?.1:C,h=o.subMenuCloseDelay,E=h===void 0?.1:h,y=o.forceSubMenuRender,x=o.defaultOpenKeys,T=o.openKeys,N=o.activeKey,P=o.defaultActiveFirst,M=o.selectable,O=M===void 0?!0:M,R=o.multiple,L=R===void 0?!1:R,B=o.defaultSelectedKeys,k=o.selectedKeys,F=o.onSelect,X=o.onDeselect,J=o.inlineIndent,U=J===void 0?24:J,z=o.motion,A=o.defaultMotions,_=o.triggerSubMenuAction,Q=_===void 0?"hover":_,Y=o.builtinPlacements,K=o.itemIcon,V=o.expandIcon,re=o.overflowedIndicator,ae=re===void 0?"...":re,Me=o.overflowedIndicatorPopupClassName,Oe=o.getPopupContainer,fe=o.onClick,$e=o.onOpenChange,Ce=o.onKeyDown;o.openAnimation,o.openTransitionName;var G=o._internalRenderMenuItem,Pe=o._internalRenderSubMenuItem,qe=o._internalComponents,Ue=de(o,ri),ft=i.useMemo(function(){return[gn(m,u,Se,qe,l),gn(m,u,Se,{},l)]},[m,u,qe]),Ye=te(ft,2),ge=Ye[0],gt=Ye[1],bt=i.useState(!1),Ze=te(bt,2),Je=Ze[0],ht=Ze[1],be=i.useRef(),De=_r(v),ye=g==="rtl",Ae=Ve(x,{value:T,postState:function(j){return j||Se}}),Re=te(Ae,2),ue=Re[0],me=Re[1],le=function(j){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function se(){me(j),$e==null||$e(j)}W?fr(se):se()},to=i.useState(ue),Wt=te(to,2),no=Wt[0],oo=Wt[1],$t=i.useRef(!1),ro=i.useMemo(function(){return(b==="inline"||b==="vertical")&&I?["vertical",I]:[b,!1]},[b,I]),Ft=te(ro,2),Qe=Ft[0],Ct=Ft[1],Xt=Qe==="inline",io=i.useState(Qe),Gt=te(io,2),he=Gt[0],ao=Gt[1],lo=i.useState(Ct),qt=te(lo,2),so=qt[0],co=qt[1];i.useEffect(function(){ao(Qe),co(Ct),$t.current&&(Xt?me(no):le(Se))},[Qe,Ct]);var uo=i.useState(0),Ut=te(uo,2),et=Ut[0],mo=Ut[1],yt=et>=ge.length-1||he!=="horizontal"||S;i.useEffect(function(){Xt&&oo(ue)},[ue]),i.useEffect(function(){return $t.current=!0,function(){$t.current=!1}},[]);var Ie=Dr(),Yt=Ie.registerPath,Zt=Ie.unregisterPath,vo=Ie.refreshOverflowKeys,Jt=Ie.isSubPathKey,po=Ie.getKeyPath,Qt=Ie.getKeys,fo=Ie.getSubPathKeys,go=i.useMemo(function(){return{registerPath:Yt,unregisterPath:Zt}},[Yt,Zt]),bo=i.useMemo(function(){return{isSubPathKey:Jt}},[Jt]);i.useEffect(function(){vo(yt?Se:ge.slice(et+1).map(function(Z){return Z.key}))},[et,yt]);var ho=Ve(N||P&&((t=ge[0])===null||t===void 0?void 0:t.key),{value:N}),en=te(ho,2),_e=en[0],It=en[1],$o=Ke(function(Z){It(Z)}),Co=Ke(function(){It(void 0)});xn(n,function(){return{list:be.current,focus:function(j){var W,se=Qt(),ce=Nt(se,De),nt=ce.elements,St=ce.key2element,Eo=ce.element2key,on=jt(be.current,nt),rn=_e??(on[0]?Eo.get(on[0]):(W=ge.find(function(No){return!No.props.disabled}))===null||W===void 0?void 0:W.key),je=St.get(rn);if(rn&&je){var xt;je==null||(xt=je.focus)===null||xt===void 0||xt.call(je,j)}}}});var yo=Ve(B||[],{value:k,postState:function(j){return Array.isArray(j)?j:j==null?Se:[j]}}),tn=te(yo,2),tt=tn[0],Io=tn[1],So=function(j){if(O){var W=j.key,se=tt.includes(W),ce;L?se?ce=tt.filter(function(St){return St!==W}):ce=[].concat(xe(tt),[W]):ce=[W],Io(ce);var nt=ee(ee({},j),{},{selectedKeys:ce});se?X==null||X(nt):F==null||F(nt)}!L&&ue.length&&he!=="inline"&&le(Se)},xo=Ke(function(Z){fe==null||fe(at(Z)),So(Z)}),nn=Ke(function(Z,j){var W=ue.filter(function(ce){return ce!==Z});if(j)W.push(Z);else if(he!=="inline"){var se=fo(Z);W=W.filter(function(ce){return!se.has(ce)})}Pn(ue,W,!0)||le(W,!0)}),wo=function(j,W){var se=W??!ue.includes(j);nn(j,se)},Mo=Br(he,_e,ye,De,be,Qt,po,It,wo,Ce);i.useEffect(function(){ht(!0)},[]);var Oo=i.useMemo(function(){return{_internalRenderMenuItem:G,_internalRenderSubMenuItem:Pe}},[G,Pe]),Po=he!=="horizontal"||S?ge:ge.map(function(Z,j){return i.createElement(Fe,{key:Z.key,overflowDisabled:j>et},Z)}),Ro=i.createElement(We,ne({id:v,ref:be,prefixCls:"".concat(l,"-overflow"),component:"ul",itemComponent:mt,className:H(l,"".concat(l,"-root"),"".concat(l,"-").concat(he),c,q(q({},"".concat(l,"-inline-collapsed"),so),"".concat(l,"-rtl"),ye),a),dir:g,style:s,role:"menu",tabIndex:f,data:Po,renderRawItem:function(j){return j},renderRawRest:function(j){var W=j.length,se=W?ge.slice(-W):null;return i.createElement(vt,{eventKey:Bt,title:ae,disabled:yt,internalPopupClose:W===0,popupClassName:Me},se)},maxCount:he!=="horizontal"||S?We.INVALIDATE:We.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(j){mo(j)},onKeyDown:Mo},Ue));return i.createElement(_t.Provider,{value:Oo},i.createElement(An.Provider,{value:De},i.createElement(Fe,{prefixCls:l,rootClassName:a,mode:he,openKeys:ue,rtl:ye,disabled:w,motion:Je?z:null,defaultMotions:Je?A:null,activeKey:_e,onActive:$o,onInactive:Co,selectedKeys:tt,inlineIndent:U,subMenuOpenDelay:$,subMenuCloseDelay:E,forceSubMenuRender:y,builtinPlacements:Y,triggerSubMenuAction:Q,getPopupContainer:Oe,itemIcon:K,expandIcon:V,onItemClick:xo,onOpenChange:nn},i.createElement(Ln.Provider,{value:bo},Ro),i.createElement("div",{style:{display:"none"},"aria-hidden":!0},i.createElement(kn.Provider,{value:go},gt)))))}),Xe=ii;Xe.Item=mt;Xe.SubMenu=vt;Xe.ItemGroup=Vt;Xe.Divider=Kt;const Gn=i.createContext({});var ai={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"},li=function(n,t){return i.createElement(Wo,ne({},n,{ref:t,icon:ai}))},qn=i.forwardRef(li);const lt=To({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var si=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};const Un=e=>{const{prefixCls:n,className:t,dashed:o}=e,r=si(e,["prefixCls","className","dashed"]),{getPrefixCls:l}=i.useContext(ct),a=l("menu",n),s=H({[`${a}-item-divider-dashed`]:!!o},t);return i.createElement(Kt,Object.assign({className:s},r))},Yn=e=>{var n;const{className:t,children:o,icon:r,title:l,danger:a,extra:s}=e,{prefixCls:c,firstLevel:d,direction:f,disableMenuItemTitleTooltip:u,inlineCollapsed:m}=i.useContext(lt),g=S=>{const C=o==null?void 0:o[0],$=i.createElement("span",{className:H(`${c}-title-content`,{[`${c}-title-content-with-extra`]:!!s||s===0})},o);return(!r||i.isValidElement(o)&&o.type==="span")&&o&&S&&d&&typeof C=="string"?i.createElement("div",{className:`${c}-inline-collapsed-noicon`},C.charAt(0)):$},{siderCollapsed:v}=i.useContext(Gn);let p=l;typeof l>"u"?p=d?o:"":l===!1&&(p="");const b={title:p};!v&&!m&&(b.title=null,b.open=!1);const I=At(o).length;let w=i.createElement(mt,Object.assign({},we(e,["title","icon","danger"]),{className:H({[`${c}-item-danger`]:a,[`${c}-item-only-child`]:(r?I+1:I)===1},t),title:typeof l=="string"?l:void 0}),ut(r,{className:H(i.isValidElement(r)?(n=r.props)===null||n===void 0?void 0:n.className:void 0,`${c}-item-icon`)}),g(m));return u||(w=i.createElement(Fo,Object.assign({},b,{placement:f==="rtl"?"left":"right",classNames:{root:`${c}-inline-collapsed-tooltip`}}),w)),w};var ci=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};const st=i.createContext(null),ui=i.forwardRef((e,n)=>{const{children:t}=e,o=ci(e,["children"]),r=i.useContext(st),l=i.useMemo(()=>Object.assign(Object.assign({},r),o),[r,o.prefixCls,o.mode,o.selectable,o.rootClassName]),a=Xo(t),s=En(n,a?Dt(t):null);return i.createElement(st.Provider,{value:l},i.createElement(Go,{space:!0},a?i.cloneElement(t,{ref:s}):t))}),di=e=>{const{componentCls:n,motionDurationSlow:t,horizontalLineHeight:o,colorSplit:r,lineWidth:l,lineType:a,itemPaddingInline:s}=e;return{[`${n}-horizontal`]:{lineHeight:o,border:0,borderBottom:`${D(l)} ${a} ${r}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${n}-item, ${n}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${n}-item:hover,
|
|
2
2
|
> ${n}-item-active,
|
|
3
3
|
> ${n}-submenu ${n}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${n}-item, ${n}-submenu-title`]:{transition:[`border-color ${t}`,`background ${t}`].join(",")},[`${n}-submenu-arrow`]:{display:"none"}}}},mi=({componentCls:e,menuArrowOffset:n,calc:t})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
4
|
-
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${D(t(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${D(n)})`}}}}),bn=e=>qo(e),hn=(e,n)=>{const{componentCls:t,itemColor:o,itemSelectedColor:r,subMenuItemSelectedColor:l,groupTitleColor:a,itemBg:s,subMenuItemBg:c,itemSelectedBg:d,activeBarHeight:f,activeBarWidth:u,activeBarBorderWidth:m,motionDurationSlow:g,motionEaseInOut:v,motionEaseOut:p,itemPaddingInline:b,motionDurationMid:I,itemHoverColor:w,lineType:S,colorSplit:C,itemDisabledColor:$,dangerItemColor:h,dangerItemHoverColor:E,dangerItemSelectedColor:y,dangerItemActiveBg:x,dangerItemSelectedBg:T,popupBg:N,itemHoverBg:P,itemActiveBg:M,menuSubMenuBg:O,horizontalItemSelectedColor:R,horizontalItemSelectedBg:
|
|
4
|
+
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${D(t(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${D(n)})`}}}}),bn=e=>qo(e),hn=(e,n)=>{const{componentCls:t,itemColor:o,itemSelectedColor:r,subMenuItemSelectedColor:l,groupTitleColor:a,itemBg:s,subMenuItemBg:c,itemSelectedBg:d,activeBarHeight:f,activeBarWidth:u,activeBarBorderWidth:m,motionDurationSlow:g,motionEaseInOut:v,motionEaseOut:p,itemPaddingInline:b,motionDurationMid:I,itemHoverColor:w,lineType:S,colorSplit:C,itemDisabledColor:$,dangerItemColor:h,dangerItemHoverColor:E,dangerItemSelectedColor:y,dangerItemActiveBg:x,dangerItemSelectedBg:T,popupBg:N,itemHoverBg:P,itemActiveBg:M,menuSubMenuBg:O,horizontalItemSelectedColor:R,horizontalItemSelectedBg:L,horizontalItemBorderRadius:B,horizontalItemHoverBg:k}=e;return{[`${t}-${n}, ${t}-${n} > ${t}`]:{color:o,background:s,[`&${t}-root:focus-visible`]:Object.assign({},bn(e)),[`${t}-item`]:{"&-group-title, &-extra":{color:a}},[`${t}-submenu-selected > ${t}-submenu-title`]:{color:l},[`${t}-item, ${t}-submenu-title`]:{color:o,[`&:not(${t}-item-disabled):focus-visible`]:Object.assign({},bn(e))},[`${t}-item-disabled, ${t}-submenu-disabled`]:{color:`${$} !important`},[`${t}-item:not(${t}-item-selected):not(${t}-submenu-selected)`]:{[`&:hover, > ${t}-submenu-title:hover`]:{color:w}},[`&:not(${t}-horizontal)`]:{[`${t}-item:not(${t}-item-selected)`]:{"&:hover":{backgroundColor:P},"&:active":{backgroundColor:M}},[`${t}-submenu-title`]:{"&:hover":{backgroundColor:P},"&:active":{backgroundColor:M}}},[`${t}-item-danger`]:{color:h,[`&${t}-item:hover`]:{[`&:not(${t}-item-selected):not(${t}-submenu-selected)`]:{color:E}},[`&${t}-item:active`]:{background:x}},[`${t}-item a`]:{"&, &:hover":{color:"inherit"}},[`${t}-item-selected`]:{color:r,[`&${t}-item-danger`]:{color:y},"a, a:hover":{color:"inherit"}},[`& ${t}-item-selected`]:{backgroundColor:d,[`&${t}-item-danger`]:{backgroundColor:T}},[`&${t}-submenu > ${t}`]:{backgroundColor:O},[`&${t}-popup > ${t}`]:{backgroundColor:N},[`&${t}-submenu-popup > ${t}`]:{backgroundColor:N},[`&${t}-horizontal`]:Object.assign(Object.assign({},n==="dark"?{borderBottom:0}:{}),{[`> ${t}-item, > ${t}-submenu`]:{top:m,marginTop:e.calc(m).mul(-1).equal(),marginBottom:0,borderRadius:B,"&::after":{position:"absolute",insetInline:b,bottom:0,borderBottom:`${D(f)} solid transparent`,transition:`border-color ${g} ${v}`,content:'""'},"&:hover, &-active, &-open":{background:k,"&::after":{borderBottomWidth:f,borderBottomColor:R}},"&-selected":{color:R,backgroundColor:L,"&:hover":{backgroundColor:L},"&::after":{borderBottomWidth:f,borderBottomColor:R}}}}),[`&${t}-root`]:{[`&${t}-inline, &${t}-vertical`]:{borderInlineEnd:`${D(m)} ${S} ${C}`}},[`&${t}-inline`]:{[`${t}-sub${t}-inline`]:{background:c},[`${t}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${D(u)} solid ${r}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${I} ${p}`,`opacity ${I} ${p}`].join(","),content:'""'},[`&${t}-item-danger`]:{"&::after":{borderInlineEndColor:y}}},[`${t}-selected, ${t}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${I} ${v}`,`opacity ${I} ${v}`].join(",")}}}}}},$n=e=>{const{componentCls:n,itemHeight:t,itemMarginInline:o,padding:r,menuArrowSize:l,marginXS:a,itemMarginBlock:s,itemWidth:c,itemPaddingInline:d}=e,f=e.calc(l).add(r).add(a).equal();return{[`${n}-item`]:{position:"relative",overflow:"hidden"},[`${n}-item, ${n}-submenu-title`]:{height:t,lineHeight:D(t),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:s,width:c},[`> ${n}-item,
|
|
5
5
|
> ${n}-submenu > ${n}-submenu-title`]:{height:t,lineHeight:D(t)},[`${n}-item-group-list ${n}-submenu-title,
|
|
6
6
|
${n}-submenu-title`]:{paddingInlineEnd:f}}},vi=e=>{const{componentCls:n,iconCls:t,itemHeight:o,colorTextLightSolid:r,dropdownWidth:l,controlHeightLG:a,motionEaseOut:s,paddingXL:c,itemMarginInline:d,fontSizeLG:f,motionDurationFast:u,motionDurationSlow:m,paddingXS:g,boxShadowSecondary:v,collapsedWidth:p,collapsedIconSize:b}=e,I={height:o,lineHeight:D(o),listStylePosition:"inside",listStyleType:"disc"};return[{[n]:{"&-inline, &-vertical":Object.assign({[`&${n}-root`]:{boxShadow:"none"}},$n(e))},[`${n}-submenu-popup`]:{[`${n}-vertical`]:Object.assign(Object.assign({},$n(e)),{boxShadow:v})}},{[`${n}-submenu-popup ${n}-vertical${n}-sub`]:{minWidth:l,maxHeight:`calc(100vh - ${D(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${n}-inline`]:{width:"100%",[`&${n}-root`]:{[`${n}-item, ${n}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${m}`,`background ${m}`,`padding ${u} ${s}`].join(","),[`> ${n}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${n}-sub${n}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${n}-submenu > ${n}-submenu-title`]:I,[`& ${n}-item-group-title`]:{paddingInlineStart:c}},[`${n}-item`]:I}},{[`${n}-inline-collapsed`]:{width:p,[`&${n}-root`]:{[`${n}-item, ${n}-submenu ${n}-submenu-title`]:{[`> ${n}-inline-collapsed-noicon`]:{fontSize:f,textAlign:"center"}}},[`> ${n}-item,
|
|
7
7
|
> ${n}-item-group > ${n}-item-group-list > ${n}-item,
|
|
@@ -10,7 +10,7 @@ import*as i from"react";import ie,{forwardRef as zt,useMemo as Bo,useRef as He,u
|
|
|
10
10
|
${n}-submenu-arrow,
|
|
11
11
|
${n}-submenu-expand-icon
|
|
12
12
|
`]:{opacity:0},[`${n}-item-icon, ${t}`]:{margin:0,fontSize:b,lineHeight:D(o),"+ span":{display:"inline-block",opacity:0}}},[`${n}-item-icon, ${t}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${n}-item-icon, ${t}`]:{display:"none"},"a, a:hover":{color:r}},[`${n}-item-group-title`]:Object.assign(Object.assign({},Uo),{paddingInline:g})}}]},Cn=e=>{const{componentCls:n,motionDurationSlow:t,motionDurationMid:o,motionEaseInOut:r,motionEaseOut:l,iconCls:a,iconSize:s,iconMarginInlineEnd:c}=e;return{[`${n}-item, ${n}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${t}`,`background ${t}`,`padding calc(${t} + 0.1s) ${r}`].join(","),[`${n}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${o} ${l}`,`margin ${t} ${r}`,`color ${t}`].join(","),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${t} ${r}`,`margin ${t}`,`color ${t}`].join(",")}},[`${n}-item-icon`]:Object.assign({},Zo()),[`&${n}-item-only-child`]:{[`> ${a}, > ${n}-item-icon`]:{marginInlineEnd:0}}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${n}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},yn=e=>{const{componentCls:n,motionDurationSlow:t,motionEaseInOut:o,borderRadius:r,menuArrowSize:l,menuArrowOffset:a}=e;return{[`${n}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:l,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${t} ${o}, opacity ${t}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(l).mul(.6).equal(),height:e.calc(l).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:r,transition:[`background ${t} ${o}`,`transform ${t} ${o}`,`top ${t} ${o}`,`color ${t} ${o}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${D(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${D(a)})`}}}}},pi=e=>{const{antCls:n,componentCls:t,fontSize:o,motionDurationSlow:r,motionDurationMid:l,motionEaseInOut:a,paddingXS:s,padding:c,colorSplit:d,lineWidth:f,zIndexPopup:u,borderRadiusLG:m,subMenuItemBorderRadius:g,menuArrowSize:v,menuArrowOffset:p,lineType:b,groupTitleLineHeight:I,groupTitleFontSize:w}=e;return[{"":{[t]:Object.assign(Object.assign({},an()),{"&-hidden":{display:"none"}})},[`${t}-submenu-hidden`]:{display:"none"}},{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Tn(e)),an()),{marginBottom:0,paddingInlineStart:0,fontSize:o,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",[`${t}-item`]:{flex:"none"}},[`${t}-item, ${t}-submenu, ${t}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${t}-item-group-title`]:{padding:`${D(s)} ${D(c)}`,fontSize:w,lineHeight:I,transition:`all ${r}`},[`&-horizontal ${t}-submenu`]:{transition:[`border-color ${r} ${a}`,`background ${r} ${a}`].join(",")},[`${t}-submenu, ${t}-submenu-inline`]:{transition:[`border-color ${r} ${a}`,`background ${r} ${a}`,`padding ${l} ${a}`].join(",")},[`${t}-submenu ${t}-sub`]:{cursor:"initial",transition:[`background ${r} ${a}`,`padding ${r} ${a}`].join(",")},[`${t}-title-content`]:{transition:`color ${r}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${n}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${t}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${t}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${t}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:b,borderWidth:0,borderTopWidth:f,marginBlock:f,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Cn(e)),{[`${t}-item-group`]:{[`${t}-item-group-list`]:{margin:0,padding:0,[`${t}-item, ${t}-submenu-title`]:{paddingInline:`${D(e.calc(o).mul(2).equal())} ${D(c)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:u,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",[`&${t}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${t}`]:Object.assign(Object.assign(Object.assign({borderRadius:m},Cn(e)),yn(e)),{[`${t}-item, ${t}-submenu > ${t}-submenu-title`]:{borderRadius:g},[`${t}-submenu-title::after`]:{transition:`transform ${r} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),yn(e)),{[`&-inline-collapsed ${t}-submenu-arrow,
|
|
13
|
-
&-inline ${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${D(p)})`},"&::after":{transform:`rotate(45deg) translateX(${D(e.calc(p).mul(-1).equal())})`}},[`${t}-submenu-open${t}-submenu-inline > ${t}-submenu-title > ${t}-submenu-arrow`]:{transform:`translateY(${D(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${D(e.calc(p).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${D(p)})`}}})},{[`${n}-layout-header`]:{[t]:{lineHeight:"inherit"}}}]},fi=e=>{var n,t,o;const{colorPrimary:r,colorError:l,colorTextDisabled:a,colorErrorBg:s,colorText:c,colorTextDescription:d,colorBgContainer:f,colorFillAlter:u,colorFillContent:m,lineWidth:g,lineWidthBold:v,controlItemBgActive:p,colorBgTextHover:b,controlHeightLG:I,lineHeight:w,colorBgElevated:S,marginXXS:C,padding:$,fontSize:h,controlHeightSM:E,fontSizeLG:y,colorTextLightSolid:x,colorErrorHover:T}=e,N=(n=e.activeBarWidth)!==null&&n!==void 0?n:0,P=(t=e.activeBarBorderWidth)!==null&&t!==void 0?t:g,M=(o=e.itemMarginInline)!==null&&o!==void 0?o:e.marginXXS,O=new ln(x).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:c,itemColor:c,colorItemTextHover:c,itemHoverColor:c,colorItemTextHoverHorizontal:r,horizontalItemHoverColor:r,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:r,itemSelectedColor:r,subMenuItemSelectedColor:r,colorItemTextSelectedHorizontal:r,horizontalItemSelectedColor:r,colorItemBg:f,itemBg:f,colorItemBgHover:b,itemHoverBg:b,colorItemBgActive:m,itemActiveBg:p,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:p,itemSelectedBg:p,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:N,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:g,activeBarBorderWidth:P,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:l,dangerItemColor:l,colorDangerItemTextHover:l,dangerItemHoverColor:l,colorDangerItemTextSelected:l,dangerItemSelectedColor:l,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:M,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:I,groupTitleLineHeight:w,collapsedWidth:I*2,popupBg:S,itemMarginBlock:C,itemPaddingInline:$,horizontalLineHeight:`${I*1.15}px`,iconSize:h,iconMarginInlineEnd:E-h,collapsedIconSize:y,groupTitleFontSize:h,darkItemDisabledColor:new ln(x).setA(.25).toRgbString(),darkItemColor:O,darkDangerItemColor:l,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:x,darkItemSelectedBg:r,darkDangerItemSelectedBg:l,darkItemHoverBg:"transparent",darkGroupTitleColor:O,darkItemHoverColor:x,darkDangerItemHoverColor:T,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:l,itemWidth:N?`calc(100% + ${P}px)`:`calc(100% - ${M*2}px)`}},gi=(e,n=e,t=!0)=>Nn("Menu",r=>{const{colorBgElevated:l,controlHeightLG:a,fontSize:s,darkItemColor:c,darkDangerItemColor:d,darkItemBg:f,darkSubMenuItemBg:u,darkItemSelectedColor:m,darkItemSelectedBg:g,darkDangerItemSelectedBg:v,darkItemHoverBg:p,darkGroupTitleColor:b,darkItemHoverColor:I,darkItemDisabledColor:w,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:$,popupBg:h,darkPopupBg:E}=r,y=r.calc(s).div(7).mul(5).equal(),x=Mt(r,{menuArrowSize:y,menuHorizontalHeight:r.calc(a).mul(1.15).equal(),menuArrowOffset:r.calc(y).mul(.25).equal(),menuSubMenuBg:l,calc:r.calc,popupBg:h}),T=Mt(x,{itemColor:c,itemHoverColor:I,groupTitleColor:b,itemSelectedColor:m,subMenuItemSelectedColor:m,itemBg:f,popupBg:E,subMenuItemBg:u,itemActiveBg:"transparent",itemSelectedBg:g,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:p,itemDisabledColor:w,dangerItemColor:d,dangerItemHoverColor:S,dangerItemSelectedColor:C,dangerItemActiveBg:$,dangerItemSelectedBg:v,menuSubMenuBg:u,horizontalItemSelectedColor:m,horizontalItemSelectedBg:g});return[pi(x),di(x),vi(x),hn(x,"light"),hn(T,"dark"),mi(x),Yo(x),it(x,"slide-up"),it(x,"slide-down"),Bn(x,"zoom-big")]},fi,{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:t,unitless:{groupTitleLineHeight:!0}})(e,n),Zn=e=>{var n;const{popupClassName:t,icon:o,title:r,theme:l}=e,a=i.useContext(lt),{prefixCls:s,inlineCollapsed:c,theme:d}=a,f=ze();let u;if(!o)u=c&&!f.length&&r&&typeof r=="string"?i.createElement("div",{className:`${s}-inline-collapsed-noicon`},r.charAt(0)):i.createElement("span",{className:`${s}-title-content`},r);else{const v=i.isValidElement(r)&&r.type==="span";u=i.createElement(i.Fragment,null,ut(o,{className:L(i.isValidElement(o)?(n=o.props)===null||n===void 0?void 0:n.className:void 0,`${s}-item-icon`)}),v?r:i.createElement("span",{className:`${s}-title-content`},r))}const m=i.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[g]=zn("Menu");return i.createElement(lt.Provider,{value:m},i.createElement(vt,Object.assign({},we(e,["icon"]),{title:u,popupClassName:L(s,t,`${s}-${l||d}`),popupStyle:Object.assign({zIndex:g},e.popupStyle)})))};var bi=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};function wt(e){return e===null||e===!1}const hi={item:Yn,submenu:Zn,divider:Un},$i=zt((e,n)=>{var t;const o=i.useContext(st),r=o||{},{getPrefixCls:l,getPopupContainer:a,direction:s,menu:c}=i.useContext(ct),d=l(),{prefixCls:f,className:u,style:m,theme:g="light",expandIcon:v,_internalDisableMenuItemTitleTooltip:p,inlineCollapsed:b,siderCollapsed:I,rootClassName:w,mode:S,selectable:C,onClick:$,overflowedIndicatorPopupClassName:h}=e,E=bi(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),y=we(E,["collapsedWidth"]);(t=r.validator)===null||t===void 0||t.call(r,{mode:S});const x=Ot((...U)=>{var z;$==null||$.apply(void 0,U),(z=r.onClick)===null||z===void 0||z.call(r)}),T=r.mode||S,N=C??r.selectable,P=b??I,M={horizontal:{motionName:`${d}-slide-up`},inline:Jo(d),other:{motionName:`${d}-zoom-big`}},O=l("menu",f||r.prefixCls),R=Dn(O),[H,B,k]=gi(O,R,!o),F=L(`${O}-${g}`,c==null?void 0:c.className,u),X=i.useMemo(()=>{var U,z;if(typeof v=="function"||wt(v))return v||null;if(typeof r.expandIcon=="function"||wt(r.expandIcon))return r.expandIcon||null;if(typeof(c==null?void 0:c.expandIcon)=="function"||wt(c==null?void 0:c.expandIcon))return(c==null?void 0:c.expandIcon)||null;const A=(U=v??(r==null?void 0:r.expandIcon))!==null&&U!==void 0?U:c==null?void 0:c.expandIcon;return ut(A,{className:L(`${O}-submenu-expand-icon`,i.isValidElement(A)?(z=A.props)===null||z===void 0?void 0:z.className:void 0)})},[v,r==null?void 0:r.expandIcon,c==null?void 0:c.expandIcon,O]),J=i.useMemo(()=>({prefixCls:O,inlineCollapsed:P||!1,direction:s,firstLevel:!0,theme:g,mode:T,disableMenuItemTitleTooltip:p}),[O,P,s,p,g]);return H(i.createElement(st.Provider,{value:null},i.createElement(lt.Provider,{value:J},i.createElement(Xe,Object.assign({getPopupContainer:a,overflowedIndicator:i.createElement(qn,null),overflowedIndicatorPopupClassName:L(O,`${O}-${g}`,h),mode:T,selectable:N,onClick:x},y,{inlineCollapsed:P,style:Object.assign(Object.assign({},c==null?void 0:c.style),m),className:F,prefixCls:O,direction:s,defaultMotions:M,expandIcon:X,ref:n,rootClassName:L(w,B,r.rootClassName,k,R),_internalComponents:hi})))))}),Ge=zt((e,n)=>{const t=He(null),o=i.useContext(Gn);return xn(n,()=>({menu:t.current,focus:r=>{var l;(l=t.current)===null||l===void 0||l.focus(r)}})),i.createElement($i,Object.assign({ref:t},e,o))});Ge.Item=Yn;Ge.SubMenu=Zn;Ge.Divider=Un;Ge.ItemGroup=Vt;const Ci=e=>{const{componentCls:n,menuCls:t,colorError:o,colorTextLightSolid:r}=e,l=`${t}-item`;return{[`${n}, ${n}-menu-submenu`]:{[`${t} ${l}`]:{[`&${l}-danger:not(${l}-disabled)`]:{color:o,"&:hover":{color:r,backgroundColor:o}}}}}},yi=e=>{const{componentCls:n,menuCls:t,zIndexPopup:o,dropdownArrowDistance:r,sizePopupArrow:l,antCls:a,iconCls:s,motionDurationMid:c,paddingBlock:d,fontSize:f,dropdownEdgeChildPadding:u,colorTextDisabled:m,fontSizeIcon:g,controlPaddingHorizontal:v,colorBgElevated:p}=e;return[{[n]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:e.calc(l).div(2).sub(r).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:g}},[`${n}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:g},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${n}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${n}-placement-bottomLeft,
|
|
13
|
+
&-inline ${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${D(p)})`},"&::after":{transform:`rotate(45deg) translateX(${D(e.calc(p).mul(-1).equal())})`}},[`${t}-submenu-open${t}-submenu-inline > ${t}-submenu-title > ${t}-submenu-arrow`]:{transform:`translateY(${D(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${D(e.calc(p).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${D(p)})`}}})},{[`${n}-layout-header`]:{[t]:{lineHeight:"inherit"}}}]},fi=e=>{var n,t,o;const{colorPrimary:r,colorError:l,colorTextDisabled:a,colorErrorBg:s,colorText:c,colorTextDescription:d,colorBgContainer:f,colorFillAlter:u,colorFillContent:m,lineWidth:g,lineWidthBold:v,controlItemBgActive:p,colorBgTextHover:b,controlHeightLG:I,lineHeight:w,colorBgElevated:S,marginXXS:C,padding:$,fontSize:h,controlHeightSM:E,fontSizeLG:y,colorTextLightSolid:x,colorErrorHover:T}=e,N=(n=e.activeBarWidth)!==null&&n!==void 0?n:0,P=(t=e.activeBarBorderWidth)!==null&&t!==void 0?t:g,M=(o=e.itemMarginInline)!==null&&o!==void 0?o:e.marginXXS,O=new ln(x).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:c,itemColor:c,colorItemTextHover:c,itemHoverColor:c,colorItemTextHoverHorizontal:r,horizontalItemHoverColor:r,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:r,itemSelectedColor:r,subMenuItemSelectedColor:r,colorItemTextSelectedHorizontal:r,horizontalItemSelectedColor:r,colorItemBg:f,itemBg:f,colorItemBgHover:b,itemHoverBg:b,colorItemBgActive:m,itemActiveBg:p,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:p,itemSelectedBg:p,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:N,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:g,activeBarBorderWidth:P,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:l,dangerItemColor:l,colorDangerItemTextHover:l,dangerItemHoverColor:l,colorDangerItemTextSelected:l,dangerItemSelectedColor:l,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:M,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:I,groupTitleLineHeight:w,collapsedWidth:I*2,popupBg:S,itemMarginBlock:C,itemPaddingInline:$,horizontalLineHeight:`${I*1.15}px`,iconSize:h,iconMarginInlineEnd:E-h,collapsedIconSize:y,groupTitleFontSize:h,darkItemDisabledColor:new ln(x).setA(.25).toRgbString(),darkItemColor:O,darkDangerItemColor:l,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:x,darkItemSelectedBg:r,darkDangerItemSelectedBg:l,darkItemHoverBg:"transparent",darkGroupTitleColor:O,darkItemHoverColor:x,darkDangerItemHoverColor:T,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:l,itemWidth:N?`calc(100% + ${P}px)`:`calc(100% - ${M*2}px)`}},gi=(e,n=e,t=!0)=>Nn("Menu",r=>{const{colorBgElevated:l,controlHeightLG:a,fontSize:s,darkItemColor:c,darkDangerItemColor:d,darkItemBg:f,darkSubMenuItemBg:u,darkItemSelectedColor:m,darkItemSelectedBg:g,darkDangerItemSelectedBg:v,darkItemHoverBg:p,darkGroupTitleColor:b,darkItemHoverColor:I,darkItemDisabledColor:w,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:$,popupBg:h,darkPopupBg:E}=r,y=r.calc(s).div(7).mul(5).equal(),x=Mt(r,{menuArrowSize:y,menuHorizontalHeight:r.calc(a).mul(1.15).equal(),menuArrowOffset:r.calc(y).mul(.25).equal(),menuSubMenuBg:l,calc:r.calc,popupBg:h}),T=Mt(x,{itemColor:c,itemHoverColor:I,groupTitleColor:b,itemSelectedColor:m,subMenuItemSelectedColor:m,itemBg:f,popupBg:E,subMenuItemBg:u,itemActiveBg:"transparent",itemSelectedBg:g,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:p,itemDisabledColor:w,dangerItemColor:d,dangerItemHoverColor:S,dangerItemSelectedColor:C,dangerItemActiveBg:$,dangerItemSelectedBg:v,menuSubMenuBg:u,horizontalItemSelectedColor:m,horizontalItemSelectedBg:g});return[pi(x),di(x),vi(x),hn(x,"light"),hn(T,"dark"),mi(x),Yo(x),it(x,"slide-up"),it(x,"slide-down"),Bn(x,"zoom-big")]},fi,{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:t,unitless:{groupTitleLineHeight:!0}})(e,n),Zn=e=>{var n;const{popupClassName:t,icon:o,title:r,theme:l}=e,a=i.useContext(lt),{prefixCls:s,inlineCollapsed:c,theme:d}=a,f=ze();let u;if(!o)u=c&&!f.length&&r&&typeof r=="string"?i.createElement("div",{className:`${s}-inline-collapsed-noicon`},r.charAt(0)):i.createElement("span",{className:`${s}-title-content`},r);else{const v=i.isValidElement(r)&&r.type==="span";u=i.createElement(i.Fragment,null,ut(o,{className:H(i.isValidElement(o)?(n=o.props)===null||n===void 0?void 0:n.className:void 0,`${s}-item-icon`)}),v?r:i.createElement("span",{className:`${s}-title-content`},r))}const m=i.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[g]=zn("Menu");return i.createElement(lt.Provider,{value:m},i.createElement(vt,Object.assign({},we(e,["icon"]),{title:u,popupClassName:H(s,t,`${s}-${l||d}`),popupStyle:Object.assign({zIndex:g},e.popupStyle)})))};var bi=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};function wt(e){return e===null||e===!1}const hi={item:Yn,submenu:Zn,divider:Un},$i=zt((e,n)=>{var t;const o=i.useContext(st),r=o||{},{getPrefixCls:l,getPopupContainer:a,direction:s,menu:c}=i.useContext(ct),d=l(),{prefixCls:f,className:u,style:m,theme:g="light",expandIcon:v,_internalDisableMenuItemTitleTooltip:p,inlineCollapsed:b,siderCollapsed:I,rootClassName:w,mode:S,selectable:C,onClick:$,overflowedIndicatorPopupClassName:h}=e,E=bi(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),y=we(E,["collapsedWidth"]);(t=r.validator)===null||t===void 0||t.call(r,{mode:S});const x=Ot((...U)=>{var z;$==null||$.apply(void 0,U),(z=r.onClick)===null||z===void 0||z.call(r)}),T=r.mode||S,N=C??r.selectable,P=b??I,M={horizontal:{motionName:`${d}-slide-up`},inline:Jo(d),other:{motionName:`${d}-zoom-big`}},O=l("menu",f||r.prefixCls),R=Dn(O),[L,B,k]=gi(O,R,!o),F=H(`${O}-${g}`,c==null?void 0:c.className,u),X=i.useMemo(()=>{var U,z;if(typeof v=="function"||wt(v))return v||null;if(typeof r.expandIcon=="function"||wt(r.expandIcon))return r.expandIcon||null;if(typeof(c==null?void 0:c.expandIcon)=="function"||wt(c==null?void 0:c.expandIcon))return(c==null?void 0:c.expandIcon)||null;const A=(U=v??(r==null?void 0:r.expandIcon))!==null&&U!==void 0?U:c==null?void 0:c.expandIcon;return ut(A,{className:H(`${O}-submenu-expand-icon`,i.isValidElement(A)?(z=A.props)===null||z===void 0?void 0:z.className:void 0)})},[v,r==null?void 0:r.expandIcon,c==null?void 0:c.expandIcon,O]),J=i.useMemo(()=>({prefixCls:O,inlineCollapsed:P||!1,direction:s,firstLevel:!0,theme:g,mode:T,disableMenuItemTitleTooltip:p}),[O,P,s,p,g]);return L(i.createElement(st.Provider,{value:null},i.createElement(lt.Provider,{value:J},i.createElement(Xe,Object.assign({getPopupContainer:a,overflowedIndicator:i.createElement(qn,null),overflowedIndicatorPopupClassName:H(O,`${O}-${g}`,h),mode:T,selectable:N,onClick:x},y,{inlineCollapsed:P,style:Object.assign(Object.assign({},c==null?void 0:c.style),m),className:F,prefixCls:O,direction:s,defaultMotions:M,expandIcon:X,ref:n,rootClassName:H(w,B,r.rootClassName,k,R),_internalComponents:hi})))))}),Ge=zt((e,n)=>{const t=Le(null),o=i.useContext(Gn);return xn(n,()=>({menu:t.current,focus:r=>{var l;(l=t.current)===null||l===void 0||l.focus(r)}})),i.createElement($i,Object.assign({ref:t},e,o))});Ge.Item=Yn;Ge.SubMenu=Zn;Ge.Divider=Un;Ge.ItemGroup=Vt;const Ci=e=>{const{componentCls:n,menuCls:t,colorError:o,colorTextLightSolid:r}=e,l=`${t}-item`;return{[`${n}, ${n}-menu-submenu`]:{[`${t} ${l}`]:{[`&${l}-danger:not(${l}-disabled)`]:{color:o,"&:hover":{color:r,backgroundColor:o}}}}}},yi=e=>{const{componentCls:n,menuCls:t,zIndexPopup:o,dropdownArrowDistance:r,sizePopupArrow:l,antCls:a,iconCls:s,motionDurationMid:c,paddingBlock:d,fontSize:f,dropdownEdgeChildPadding:u,colorTextDisabled:m,fontSizeIcon:g,controlPaddingHorizontal:v,colorBgElevated:p}=e;return[{[n]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:e.calc(l).div(2).sub(r).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:g}},[`${n}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:g},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${n}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${n}-placement-bottomLeft,
|
|
14
14
|
&${a}-slide-down-appear${a}-slide-down-appear-active${n}-placement-bottomLeft,
|
|
15
15
|
&${a}-slide-down-enter${a}-slide-down-enter-active${n}-placement-bottom,
|
|
16
16
|
&${a}-slide-down-appear${a}-slide-down-appear-active${n}-placement-bottom,
|
|
@@ -24,4 +24,4 @@ import*as i from"react";import ie,{forwardRef as zt,useMemo as Bo,useRef as He,u
|
|
|
24
24
|
&${a}-slide-down-leave${a}-slide-down-leave-active${n}-placement-bottom,
|
|
25
25
|
&${a}-slide-down-leave${a}-slide-down-leave-active${n}-placement-bottomRight`]:{animationName:er},[`&${a}-slide-up-leave${a}-slide-up-leave-active${n}-placement-topLeft,
|
|
26
26
|
&${a}-slide-up-leave${a}-slide-up-leave-active${n}-placement-top,
|
|
27
|
-
&${a}-slide-up-leave${a}-slide-up-leave-active${n}-placement-topRight`]:{animationName:Qo}}},or(e,p,{arrowPlacement:{top:!0,bottom:!0}}),{[`${n} ${t}`]:{position:"relative",margin:0},[`${t}-submenu-popup`]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${n}, ${n}-menu-submenu`]:Object.assign(Object.assign({},Tn(e)),{[t]:Object.assign(Object.assign({padding:u,listStyleType:"none",backgroundColor:p,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},cn(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${t}-item-group-title`]:{padding:`${D(d)} ${D(v)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${t}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${t}-item-icon`]:{minWidth:f,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${t}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${c}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${t}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${t}-item, ${t}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${D(d)} ${D(v)}`,color:e.colorText,fontWeight:"normal",fontSize:f,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},cn(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:p,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${D(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${n}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${n}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:g,fontStyle:"normal"}}}),[`${t}-item-group-list`]:{margin:`0 ${D(e.marginXS)}`,padding:0,listStyle:"none"},[`${t}-submenu-title`]:{paddingInlineEnd:e.calc(v).add(e.fontSizeSM).equal()},[`${t}-submenu-vertical`]:{position:"relative"},[`${t}-submenu${t}-submenu-disabled ${n}-menu-submenu-title`]:{[`&, ${n}-menu-submenu-arrow-icon`]:{color:m,backgroundColor:p,cursor:"not-allowed"}},[`${t}-submenu-selected ${n}-menu-submenu-title`]:{color:e.colorPrimary}})})},[it(e,"slide-up"),it(e,"slide-down"),sn(e,"move-up"),sn(e,"move-down"),Bn(e,"zoom-big")]]},Ii=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},rr({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),ir(e)),Si=Nn("Dropdown",e=>{const{marginXXS:n,sizePopupArrow:t,paddingXXS:o,componentCls:r}=e,l=Mt(e,{menuCls:`${r}-menu`,dropdownArrowDistance:e.calc(t).div(2).add(n).equal(),dropdownEdgeChildPadding:o});return[yi(l),Ci(l)]},Ii,{resetStyle:!1}),pt=e=>{var n;const{menu:t,arrow:o,prefixCls:r,children:l,trigger:a,disabled:s,dropdownRender:c,popupRender:d,getPopupContainer:f,overlayClassName:u,rootClassName:m,overlayStyle:g,open:v,onOpenChange:p,visible:b,onVisibleChange:I,mouseEnterDelay:w=.15,mouseLeaveDelay:S=.1,autoAdjustOverflow:C=!0,placement:$="",overlay:h,transitionName:E,destroyOnHidden:y,destroyPopupOnHide:x}=e,{getPopupContainer:T,getPrefixCls:N,direction:P,dropdown:M}=i.useContext(ct),O=d||c;ar();const R=i.useMemo(()=>{const G=N();return E!==void 0?E:$.includes("top")?`${G}-slide-down`:`${G}-slide-up`},[N,$,E]),
|
|
27
|
+
&${a}-slide-up-leave${a}-slide-up-leave-active${n}-placement-topRight`]:{animationName:Qo}}},or(e,p,{arrowPlacement:{top:!0,bottom:!0}}),{[`${n} ${t}`]:{position:"relative",margin:0},[`${t}-submenu-popup`]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${n}, ${n}-menu-submenu`]:Object.assign(Object.assign({},Tn(e)),{[t]:Object.assign(Object.assign({padding:u,listStyleType:"none",backgroundColor:p,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},cn(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${t}-item-group-title`]:{padding:`${D(d)} ${D(v)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${t}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${t}-item-icon`]:{minWidth:f,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${t}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${c}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${t}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${t}-item, ${t}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${D(d)} ${D(v)}`,color:e.colorText,fontWeight:"normal",fontSize:f,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},cn(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:p,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${D(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${n}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${n}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:g,fontStyle:"normal"}}}),[`${t}-item-group-list`]:{margin:`0 ${D(e.marginXS)}`,padding:0,listStyle:"none"},[`${t}-submenu-title`]:{paddingInlineEnd:e.calc(v).add(e.fontSizeSM).equal()},[`${t}-submenu-vertical`]:{position:"relative"},[`${t}-submenu${t}-submenu-disabled ${n}-menu-submenu-title`]:{[`&, ${n}-menu-submenu-arrow-icon`]:{color:m,backgroundColor:p,cursor:"not-allowed"}},[`${t}-submenu-selected ${n}-menu-submenu-title`]:{color:e.colorPrimary}})})},[it(e,"slide-up"),it(e,"slide-down"),sn(e,"move-up"),sn(e,"move-down"),Bn(e,"zoom-big")]]},Ii=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},rr({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),ir(e)),Si=Nn("Dropdown",e=>{const{marginXXS:n,sizePopupArrow:t,paddingXXS:o,componentCls:r}=e,l=Mt(e,{menuCls:`${r}-menu`,dropdownArrowDistance:e.calc(t).div(2).add(n).equal(),dropdownEdgeChildPadding:o});return[yi(l),Ci(l)]},Ii,{resetStyle:!1}),pt=e=>{var n;const{menu:t,arrow:o,prefixCls:r,children:l,trigger:a,disabled:s,dropdownRender:c,popupRender:d,getPopupContainer:f,overlayClassName:u,rootClassName:m,overlayStyle:g,open:v,onOpenChange:p,visible:b,onVisibleChange:I,mouseEnterDelay:w=.15,mouseLeaveDelay:S=.1,autoAdjustOverflow:C=!0,placement:$="",overlay:h,transitionName:E,destroyOnHidden:y,destroyPopupOnHide:x}=e,{getPopupContainer:T,getPrefixCls:N,direction:P,dropdown:M}=i.useContext(ct),O=d||c;ar();const R=i.useMemo(()=>{const G=N();return E!==void 0?E:$.includes("top")?`${G}-slide-down`:`${G}-slide-up`},[N,$,E]),L=i.useMemo(()=>$?$.includes("Center")?$.slice(0,$.indexOf("Center")):$:P==="rtl"?"bottomRight":"bottomLeft",[$,P]),B=N("dropdown",r),k=Dn(B),[F,X,J]=Si(B,k),[,U]=lr(),z=i.Children.only(xr(l)?i.createElement("span",null,l):l),A=ut(z,{className:H(`${B}-trigger`,{[`${B}-rtl`]:P==="rtl"},z.props.className),disabled:(n=z.props.disabled)!==null&&n!==void 0?n:s}),_=s?[]:a,Q=!!(_!=null&&_.includes("contextMenu")),[Y,K]=Ve(!1,{value:v??b}),V=Ot(G=>{p==null||p(G,{source:"trigger"}),I==null||I(G),K(G)}),re=H(u,m,X,J,k,M==null?void 0:M.className,{[`${B}-rtl`]:P==="rtl"}),ae=sr({arrowPointAtCenter:typeof o=="object"&&o.pointAtCenter,autoAdjustOverflow:C,offset:U.marginXXS,arrowWidth:o?U.sizePopupArrow:0,borderRadius:U.borderRadius}),Me=Ot(()=>{t!=null&&t.selectable&&(t!=null&&t.multiple)||(p==null||p(!1,{source:"menu"}),K(!1))}),Oe=()=>{let G;return t!=null&&t.items?G=i.createElement(Ge,Object.assign({},t)):typeof h=="function"?G=h():G=h,O&&(G=O(G)),G=i.Children.only(typeof G=="string"?i.createElement("span",null,G):G),i.createElement(ui,{prefixCls:`${B}-menu`,rootClassName:H(J,k),expandIcon:i.createElement("span",{className:`${B}-menu-submenu-arrow`},P==="rtl"?i.createElement(zo,{className:`${B}-menu-submenu-arrow-icon`}):i.createElement(Do,{className:`${B}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Me,validator:({mode:Pe})=>{}},G)},[fe,$e]=zn("Dropdown",g==null?void 0:g.zIndex);let Ce=i.createElement(Sr,Object.assign({alignPoint:Q},we(e,["rootClassName"]),{mouseEnterDelay:w,mouseLeaveDelay:S,visible:Y,builtinPlacements:ae,arrow:!!o,overlayClassName:re,prefixCls:B,getPopupContainer:f||T,transitionName:R,trigger:_,overlay:Oe,placement:L,onVisibleChange:V,overlayStyle:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.style),g),{zIndex:fe}),autoDestroy:y??x}),A);return fe&&(Ce=i.createElement(cr.Provider,{value:$e},Ce)),F(Ce)},xi=ur(pt,"align",void 0,"dropdown",e=>e),wi=e=>i.createElement(xi,Object.assign({},e),i.createElement("span",null));pt._InternalPanelDoNotUseOrYouWillBeFired=wi;function In(e){return["small","middle","large"].includes(e)}function Sn(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const Jn=ie.createContext({latestIndex:0}),Mi=Jn.Provider,Oi=({className:e,index:n,children:t,split:o,style:r})=>{const{latestIndex:l}=i.useContext(Jn);return t==null?null:i.createElement(i.Fragment,null,i.createElement("div",{className:e,style:r},t),n<l&&o&&i.createElement("span",{className:`${e}-split`},o))};var Pi=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};const Ri=i.forwardRef((e,n)=>{var t;const{getPrefixCls:o,direction:r,size:l,className:a,style:s,classNames:c,styles:d}=dr("space"),{size:f=l??"small",align:u,className:m,rootClassName:g,children:v,direction:p="horizontal",prefixCls:b,split:I,style:w,wrap:S=!1,classNames:C,styles:$}=e,h=Pi(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,y]=Array.isArray(f)?f:[f,f],x=In(y),T=In(E),N=Sn(y),P=Sn(E),M=At(v,{keepEmpty:!0}),O=u===void 0&&p==="horizontal"?"center":u,R=o("space",b),[L,B,k]=mr(R),F=H(R,a,B,`${R}-${p}`,{[`${R}-rtl`]:r==="rtl",[`${R}-align-${O}`]:O,[`${R}-gap-row-${y}`]:x,[`${R}-gap-col-${E}`]:T},m,g,k),X=H(`${R}-item`,(t=C==null?void 0:C.item)!==null&&t!==void 0?t:c.item),J=Object.assign(Object.assign({},d.item),$==null?void 0:$.item),U=M.map((_,Q)=>{const Y=(_==null?void 0:_.key)||`${X}-${Q}`;return i.createElement(Oi,{className:X,key:Y,index:Q,split:I,style:J},_)}),z=i.useMemo(()=>({latestIndex:M.reduce((Q,Y,K)=>Y!=null?K:Q,0)}),[M]);if(M.length===0)return null;const A={};return S&&(A.flexWrap="wrap"),!T&&P&&(A.columnGap=E),!x&&N&&(A.rowGap=y),L(i.createElement("div",Object.assign({ref:n,className:F,style:Object.assign(Object.assign(Object.assign({},A),s),w)},h),i.createElement(Mi,{value:z},U)))}),Qn=Ri;Qn.Compact=vr;var Ei=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};const eo=e=>{const{getPopupContainer:n,getPrefixCls:t,direction:o}=i.useContext(ct),{prefixCls:r,type:l="default",danger:a,disabled:s,loading:c,onClick:d,htmlType:f,children:u,className:m,menu:g,arrow:v,autoFocus:p,overlay:b,trigger:I,align:w,open:S,onOpenChange:C,placement:$,getPopupContainer:h,href:E,icon:y=i.createElement(qn,null),title:x,buttonsRender:T=ae=>ae,mouseEnterDelay:N,mouseLeaveDelay:P,overlayClassName:M,overlayStyle:O,destroyOnHidden:R,destroyPopupOnHide:L,dropdownRender:B,popupRender:k}=e,F=Ei(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),X=t("dropdown",r),J=`${X}-button`,z={menu:g,arrow:v,autoFocus:p,align:w,disabled:s,trigger:s?[]:I,onOpenChange:C,getPopupContainer:h||n,mouseEnterDelay:N,mouseLeaveDelay:P,overlayClassName:M,overlayStyle:O,destroyOnHidden:R,popupRender:k||B},{compactSize:A,compactItemClassnames:_}=pr(X,o),Q=H(J,_,m);"destroyPopupOnHide"in e&&(z.destroyPopupOnHide=L),"overlay"in e&&(z.overlay=b),"open"in e&&(z.open=S),"placement"in e?z.placement=$:z.placement=o==="rtl"?"bottomLeft":"bottomRight";const Y=i.createElement(un,{type:l,danger:a,disabled:s,loading:c,onClick:d,htmlType:f,href:E,title:x},u),K=i.createElement(un,{type:l,danger:a,icon:y}),[V,re]=T([Y,K]);return i.createElement(Qn.Compact,Object.assign({className:Q,size:A,block:!0},F),V,i.createElement(pt,Object.assign({},z),re))};eo.__ANT_BUTTON=!0;const Ni=pt;Ni.Button=eo;export{Ni as D,Ge as M,ui as O,In as i};
|
|
@@ -282,4 +282,4 @@ html body {
|
|
|
282
282
|
`,UP=["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"],il={},Rr;function GP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&il[r])return il[r];var n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),a=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),i=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),s=UP.map(function(c){return"".concat(c,":").concat(n.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:a,borderSize:i,boxSizing:o};return t&&r&&(il[r]=l),l}function KP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]: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");var o=GP(e,t),a=o.paddingSize,i=o.borderSize,s=o.boxSizing,l=o.sizingStyle;Rr.setAttribute("style","".concat(l,";").concat(qP)),Rr.value=e.value||e.placeholder||"";var c=void 0,d=void 0,f,v=Rr.scrollHeight;if(s==="border-box"?v+=i:s==="content-box"&&(v-=a),r!==null||n!==null){Rr.value=" ";var h=Rr.scrollHeight-a;r!==null&&(c=h*r,s==="border-box"&&(c=c+a+i),v=Math.max(c,v)),n!==null&&(d=h*n,s==="border-box"&&(d=d+a+i),f=v>d?"":"hidden",v=Math.min(d,v))}var g={height:v,overflowY:f,resize:"none"};return c&&(g.minHeight=c),d&&(g.maxHeight=d),g}var XP=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],sl=0,ll=1,cl=2,YP=u.forwardRef(function(e,t){var r=e,n=r.prefixCls,o=r.defaultValue,a=r.value,i=r.autoSize,s=r.onResize,l=r.className,c=r.style,d=r.disabled,f=r.onChange;r.onInternalAutoSize;var v=ft(r,XP),h=zr(o,{value:a,postState:function(q){return q??""}}),g=X(h,2),p=g[0],m=g[1],b=function(q){m(q.target.value),f==null||f(q)},y=u.useRef();u.useImperativeHandle(t,function(){return{textArea:y.current}});var S=u.useMemo(function(){return i&&Ue(i)==="object"?[i.minRows,i.maxRows]:[]},[i]),C=X(S,2),$=C[0],x=C[1],w=!!i,E=u.useState(cl),O=X(E,2),R=O[0],I=O[1],P=u.useState(),M=X(P,2),F=M[0],N=M[1],A=function(){I(sl)};Ct(function(){w&&A()},[a,$,x,w]),Ct(function(){if(R===sl)I(ll);else if(R===ll){var B=KP(y.current,!1,$,x);I(cl),N(B)}},[R]);var _=u.useRef(),D=function(){mt.cancel(_.current)},W=function(q){R===cl&&(s==null||s(q),i&&(D(),_.current=mt(function(){A()})))};u.useEffect(function(){return D},[]);var G=w?F:null,L=j(j({},c),G);return(R===sl||R===ll)&&(L.overflowY="hidden",L.overflowX="hidden"),u.createElement(In,{onResize:W,disabled:!(i||s)},u.createElement("textarea",Be({},v,{ref:y,style:L,className:oe(n,l,T({},"".concat(n,"-disabled"),d)),disabled:d,value:p,onChange:b})))}),QP=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],JP=ne.forwardRef(function(e,t){var r,n=e.defaultValue,o=e.value,a=e.onFocus,i=e.onBlur,s=e.onChange,l=e.allowClear,c=e.maxLength,d=e.onCompositionStart,f=e.onCompositionEnd,v=e.suffix,h=e.prefixCls,g=h===void 0?"rc-textarea":h,p=e.showCount,m=e.count,b=e.className,y=e.style,S=e.disabled,C=e.hidden,$=e.classNames,x=e.styles,w=e.onResize,E=e.onClear,O=e.onPressEnter,R=e.readOnly,I=e.autoSize,P=e.onKeyDown,M=ft(e,QP),F=zr(n,{value:o,defaultValue:n}),N=X(F,2),A=N[0],_=N[1],D=A==null?"":String(A),W=ne.useState(!1),G=X(W,2),L=G[0],B=G[1],q=ne.useRef(!1),H=ne.useState(null),z=X(H,2),V=z[0],Z=z[1],k=Fe(null),J=Fe(null),ae=function(){var Ce;return(Ce=J.current)===null||Ce===void 0?void 0:Ce.textArea},Y=function(){ae().focus()};Di(t,function(){var Oe;return{resizableTextArea:J.current,focus:Y,blur:function(){ae().blur()},nativeElement:((Oe=k.current)===null||Oe===void 0?void 0:Oe.nativeElement)||ae()}}),tr(function(){B(function(Oe){return!S&&Oe})},[S]);var U=ne.useState(null),re=X(U,2),se=re[0],K=re[1];ne.useEffect(function(){if(se){var Oe;(Oe=ae()).setSelectionRange.apply(Oe,ve(se))}},[se]);var ee=cp(m,p),fe=(r=ee.max)!==null&&r!==void 0?r:c,le=Number(fe)>0,de=ee.strategy(D),we=!!fe&&de>fe,be=function(Ce,Ve){var Ze=Ve;!q.current&&ee.exceedFormatter&&ee.max&&ee.strategy(Ve)>ee.max&&(Ze=ee.exceedFormatter(Ve,{max:ee.max}),Ve!==Ze&&K([ae().selectionStart||0,ae().selectionEnd||0])),_(Ze),Ai(Ce.currentTarget,Ce,s,Ze)},Se=function(Ce){q.current=!0,d==null||d(Ce)},me=function(Ce){q.current=!1,be(Ce,Ce.currentTarget.value),f==null||f(Ce)},te=function(Ce){be(Ce,Ce.target.value)},xe=function(Ce){Ce.key==="Enter"&&O&&O(Ce),P==null||P(Ce)},ze=function(Ce){B(!0),a==null||a(Ce)},Ae=function(Ce){B(!1),i==null||i(Ce)},Me=function(Ce){_(""),Y(),Ai(ae(),Ce,s)},Ee=v,He;ee.show&&(ee.showFormatter?He=ee.showFormatter({value:D,count:de,maxLength:fe}):He="".concat(de).concat(le?" / ".concat(fe):""),Ee=ne.createElement(ne.Fragment,null,Ee,ne.createElement("span",{className:oe("".concat(g,"-data-count"),$==null?void 0:$.count),style:x==null?void 0:x.count},He)));var Te=function(Ce){var Ve;w==null||w(Ce),(Ve=ae())!==null&&Ve!==void 0&&Ve.style.height&&Z(!0)},Le=!I&&!p&&!l;return ne.createElement(yu,{ref:k,value:D,allowClear:l,handleReset:Me,suffix:Ee,prefixCls:g,classNames:j(j({},$),{},{affixWrapper:oe($==null?void 0:$.affixWrapper,T(T({},"".concat(g,"-show-count"),p),"".concat(g,"-textarea-allow-clear"),l))}),disabled:S,focused:L,className:oe(b,we&&"".concat(g,"-out-of-range")),style:j(j({},y),V&&!Le?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof He=="string"?He:void 0}},hidden:C,readOnly:R,onClear:E},ne.createElement(YP,Be({},M,{autoSize:I,maxLength:c,onKeyDown:xe,onChange:te,onFocus:ze,onBlur:Ae,onCompositionStart:Se,onCompositionEnd:me,className:oe($==null?void 0:$.textarea),style:j(j({},x==null?void 0:x.textarea),{},{resize:y==null?void 0:y.resize}),disabled:S,prefixCls:g,onResize:Te,ref:J,readOnly:R})))});const ZP=e=>{const{componentCls:t,paddingLG:r}=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",[`&${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"}},[`
|
|
283
283
|
&-allow-clear > ${t},
|
|
284
284
|
&-affix-wrapper${n}-has-feedback ${t}
|
|
285
|
-
`]:{paddingInlineEnd:r},[`&-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}}}}}},eM=sr(["Input","TextArea"],e=>{const t=Et(e,_a(e));return ZP(t)},Aa,{resetFont:!1});var tM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const rM=dn((e,t)=>{var r;const{prefixCls:n,bordered:o=!0,size:a,disabled:i,status:s,allowClear:l,classNames:c,rootClassName:d,className:f,style:v,styles:h,variant:g,showCount:p,onMouseDown:m,onResize:b}=e,y=tM(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:S,direction:C,allowClear:$,autoComplete:x,className:w,style:E,classNames:O,styles:R}=Pn("textArea"),I=u.useContext(Mr),P=i??I,{status:M,hasFeedback:F,feedbackIcon:N}=u.useContext(pr),A=Na(M,s),_=u.useRef(null);u.useImperativeHandle(t,()=>{var ee;return{resizableTextArea:(ee=_.current)===null||ee===void 0?void 0:ee.resizableTextArea,focus:fe=>{var le,de;bu((de=(le=_.current)===null||le===void 0?void 0:le.resizableTextArea)===null||de===void 0?void 0:de.textArea,fe)},blur:()=>{var fe;return(fe=_.current)===null||fe===void 0?void 0:fe.blur()}}});const D=S("input",n),W=fn(D),[G,L,B]=ep(D,d),[q]=eM(D,W),{compactSize:H,compactItemClassnames:z}=zo(D,C),V=on(ee=>{var fe;return(fe=a??H)!==null&&fe!==void 0?fe:ee}),[Z,k]=vs("textArea",g,o),J=dp(l??$),[ae,Y]=u.useState(!1),[U,re]=u.useState(!1),se=ee=>{Y(!0),m==null||m(ee);const fe=()=>{Y(!1),document.removeEventListener("mouseup",fe)};document.addEventListener("mouseup",fe)},K=ee=>{var fe,le;if(b==null||b(ee),ae&&typeof getComputedStyle=="function"){const de=(le=(fe=_.current)===null||fe===void 0?void 0:fe.nativeElement)===null||le===void 0?void 0:le.querySelector("textarea");de&&getComputedStyle(de).resize==="both"&&re(!0)}};return G(q(u.createElement(JP,Object.assign({autoComplete:x},y,{style:Object.assign(Object.assign({},E),v),styles:Object.assign(Object.assign({},R),h),disabled:P,allowClear:J,className:oe(B,W,f,d,z,w,U&&`${D}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),O),{textarea:oe({[`${D}-sm`]:V==="small",[`${D}-lg`]:V==="large"},L,c==null?void 0:c.textarea,O.textarea,ae&&`${D}-mouse-active`),variant:oe({[`${D}-${Z}`]:k},No(D,A)),affixWrapper:oe(`${D}-textarea-affix-wrapper`,{[`${D}-affix-wrapper-rtl`]:C==="rtl",[`${D}-affix-wrapper-sm`]:V==="small",[`${D}-affix-wrapper-lg`]:V==="large",[`${D}-textarea-show-count`]:p||((r=e.count)===null||r===void 0?void 0:r.show)},L)}),prefixCls:D,suffix:F&&u.createElement("span",{className:`${D}-textarea-suffix`},N),showCount:p,ref:_,onResize:K,onMouseDown:se}))))}),ja=ps;ja.Group=IP;ja.Search=kP;ja.TextArea=rM;ja.Password=VP;ja.OTP=AP;var nM=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],yp=u.forwardRef(function(e,t){var r,n=e.prefixCls,o=n===void 0?"rc-switch":n,a=e.className,i=e.checked,s=e.defaultChecked,l=e.disabled,c=e.loadingIcon,d=e.checkedChildren,f=e.unCheckedChildren,v=e.onClick,h=e.onChange,g=e.onKeyDown,p=ft(e,nM),m=zr(!1,{value:i,defaultValue:s}),b=X(m,2),y=b[0],S=b[1];function C(E,O){var R=y;return l||(R=E,S(R),h==null||h(R,O)),R}function $(E){E.which===_e.LEFT?C(!1,E):E.which===_e.RIGHT&&C(!0,E),g==null||g(E)}function x(E){var O=C(!y,E);v==null||v(O,E)}var w=oe(o,a,(r={},T(r,"".concat(o,"-checked"),y),T(r,"".concat(o,"-disabled"),l),r));return u.createElement("button",Be({},p,{type:"button",role:"switch","aria-checked":y,disabled:l,className:w,ref:t,onKeyDown:$,onClick:x}),c,u.createElement("span",{className:"".concat(o,"-inner")},u.createElement("span",{className:"".concat(o,"-inner-checked")},d),u.createElement("span",{className:"".concat(o,"-inner-unchecked")},f)))});yp.displayName="Switch";const oM=e=>{const{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:o,innerMinMarginSM:a,innerMaxMarginSM:i,handleSizeSM:s,calc:l}=e,c=`${t}-inner`,d=ie(l(s).add(l(n).mul(2)).equal()),f=ie(l(i).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:o,height:r,lineHeight:ie(r),[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${c}-checked, ${c}-unchecked`]:{minHeight:r},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${c}-unchecked`]:{marginTop:l(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:l(l(s).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${ie(l(s).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}},aM=e=>{const{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},iM=e=>{const{componentCls:t,trackPadding:r,handleBg:n,handleShadow:o,handleSize:a,calc:i}=e,s=`${t}-handle`;return{[t]:{[s]:{position:"absolute",top:r,insetInlineStart:r,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:i(a).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${ie(i(a).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},sM=e=>{const{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:o,innerMaxMargin:a,handleSize:i,calc:s}=e,l=`${t}-inner`,c=ie(s(i).add(s(n).mul(2)).equal()),d=ie(s(a).mul(2).equal());return{[t]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:o,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${l}-unchecked`]:{marginTop:s(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:s(n).mul(2).equal(),marginInlineEnd:s(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:s(n).mul(-1).mul(2).equal(),marginInlineEnd:s(n).mul(2).equal()}}}}}},lM=e=>{const{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},ar(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:ie(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),ts(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"}})}},cM=e=>{const{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:o}=e,a=t*r,i=n/2,s=2,l=a-s*2,c=i-s*2;return{trackHeight:a,trackHeightSM:i,trackMinWidth:l*2+s*4,trackMinWidthSM:c*2+s*2,trackPadding:s,handleBg:o,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new bt("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+s+s*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+s+s*2}},uM=sr("Switch",e=>{const t=Et(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[lM(t),sM(t),iM(t),aM(t),oM(t)]},cM);var dM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const fM=u.forwardRef((e,t)=>{const{prefixCls:r,size:n,disabled:o,loading:a,className:i,rootClassName:s,style:l,checked:c,value:d,defaultChecked:f,defaultValue:v,onChange:h}=e,g=dM(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[p,m]=zr(!1,{value:c??d,defaultValue:f??v}),{getPrefixCls:b,direction:y,switch:S}=u.useContext(wt),C=u.useContext(Mr),$=(o??C)||a,x=b("switch",r),w=u.createElement("div",{className:`${x}-handle`},a&&u.createElement(rs,{className:`${x}-loading-icon`})),[E,O,R]=uM(x),I=on(n),P=oe(S==null?void 0:S.className,{[`${x}-small`]:I==="small",[`${x}-loading`]:a,[`${x}-rtl`]:y==="rtl"},i,s,O,R),M=Object.assign(Object.assign({},S==null?void 0:S.style),l),F=(...N)=>{m(N[0]),h==null||h.apply(void 0,N)};return E(u.createElement(Zc,{component:"Switch",disabled:$},u.createElement(yp,Object.assign({},g,{checked:p,onChange:F,prefixCls:x,className:P,style:M,disabled:$,ref:t,loadingIcon:w}))))}),mM=fM;mM.__ANT_SWITCH=!0;export{ts as $,Ud as A,ve as B,wt as C,tI as D,ba as E,Nn as F,hR as G,ja as H,br as I,ru as J,_e as K,ft as L,Do as M,En as N,or as O,Xn as P,X as Q,kI as R,Fa as S,vu as T,j as U,T as V,Ct as W,nu as X,GM as Y,UM as Z,Be as _,sr as a,RP as a$,Hr as a0,Ag as a1,To as a2,Fg as a3,mM as a4,jM as a5,Ue as a6,_a as a7,dg as a8,Aa as a9,VM as aA,og as aB,JM as aC,E$ as aD,PE as aE,ME as aF,YC as aG,Jn as aH,qM as aI,Tw as aJ,$n as aK,TE as aL,w$ as aM,Ds as aN,bt as aO,LR as aP,Zn as aQ,vr as aR,On as aS,Rn as aT,Vt as aU,at as aV,Wt as aW,Yl as aX,cx as aY,Pi as aZ,ox as a_,gs as aa,Hh as ab,gu as ac,Jh as ad,mg as ae,Vr as af,Oa as ag,sC as ah,zM as ai,ap as aj,eT as ak,p2 as al,R1 as am,Bt as an,KM as ao,fn as ap,rs as aq,tw as ar,Xc as as,K1 as at,Uc as au,Tg as av,Po as aw,YM as ax,xr as ay,Tn as az,lI as b,Mh as b$,vw as b0,Jd as b1,Mr as b2,mt as b3,$a as b4,Qn as b5,yh as b6,Xi as b7,Ri as b8,Qc as b9,Jc as bA,ou as bB,Yf as bC,wR as bD,SR as bE,Vh as bF,Xh as bG,Uh as bH,kh as bI,fs as bJ,sI as bK,Yh as bL,kR as bM,vs as bN,No as bO,Na as bP,yd as bQ,ZM as bR,sw as bS,DM as bT,EE as bU,Dr as bV,Ac as bW,bv as bX,QM as bY,d$ as bZ,xh as b_,Ma as ba,Gn as bb,HM as bc,of as bd,Ra as be,kg as bf,Vg as bg,Wg as bh,Hg as bi,nf as bj,fI as bk,NE as bl,Ww as bm,XM as bn,zo as bo,An as bp,sa as bq,rb as br,zh as bs,AM as bt,ea as bu,In as bv,pr as bw,xI as bx,Zc as by,wI as bz,cy as c,AI as c0,ps as c1,Th as c2,kM as c3,ry as d,iI as e,oy as f,LM as g,Ah as h,qg as i,oe as j,Fh as k,zr as l,Et as m,Bg as n,Mo as o,e1 as p,xt as q,ar as r,ie as s,pI as t,Pn as u,Mn as v,Ut as w,BM as x,sp as y,on as z};
|
|
285
|
+
`]:{paddingInlineEnd:r},[`&-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}}}}}},eM=sr(["Input","TextArea"],e=>{const t=Et(e,_a(e));return ZP(t)},Aa,{resetFont:!1});var tM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const rM=dn((e,t)=>{var r;const{prefixCls:n,bordered:o=!0,size:a,disabled:i,status:s,allowClear:l,classNames:c,rootClassName:d,className:f,style:v,styles:h,variant:g,showCount:p,onMouseDown:m,onResize:b}=e,y=tM(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:S,direction:C,allowClear:$,autoComplete:x,className:w,style:E,classNames:O,styles:R}=Pn("textArea"),I=u.useContext(Mr),P=i??I,{status:M,hasFeedback:F,feedbackIcon:N}=u.useContext(pr),A=Na(M,s),_=u.useRef(null);u.useImperativeHandle(t,()=>{var ee;return{resizableTextArea:(ee=_.current)===null||ee===void 0?void 0:ee.resizableTextArea,focus:fe=>{var le,de;bu((de=(le=_.current)===null||le===void 0?void 0:le.resizableTextArea)===null||de===void 0?void 0:de.textArea,fe)},blur:()=>{var fe;return(fe=_.current)===null||fe===void 0?void 0:fe.blur()}}});const D=S("input",n),W=fn(D),[G,L,B]=ep(D,d),[q]=eM(D,W),{compactSize:H,compactItemClassnames:z}=zo(D,C),V=on(ee=>{var fe;return(fe=a??H)!==null&&fe!==void 0?fe:ee}),[Z,k]=vs("textArea",g,o),J=dp(l??$),[ae,Y]=u.useState(!1),[U,re]=u.useState(!1),se=ee=>{Y(!0),m==null||m(ee);const fe=()=>{Y(!1),document.removeEventListener("mouseup",fe)};document.addEventListener("mouseup",fe)},K=ee=>{var fe,le;if(b==null||b(ee),ae&&typeof getComputedStyle=="function"){const de=(le=(fe=_.current)===null||fe===void 0?void 0:fe.nativeElement)===null||le===void 0?void 0:le.querySelector("textarea");de&&getComputedStyle(de).resize==="both"&&re(!0)}};return G(q(u.createElement(JP,Object.assign({autoComplete:x},y,{style:Object.assign(Object.assign({},E),v),styles:Object.assign(Object.assign({},R),h),disabled:P,allowClear:J,className:oe(B,W,f,d,z,w,U&&`${D}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),O),{textarea:oe({[`${D}-sm`]:V==="small",[`${D}-lg`]:V==="large"},L,c==null?void 0:c.textarea,O.textarea,ae&&`${D}-mouse-active`),variant:oe({[`${D}-${Z}`]:k},No(D,A)),affixWrapper:oe(`${D}-textarea-affix-wrapper`,{[`${D}-affix-wrapper-rtl`]:C==="rtl",[`${D}-affix-wrapper-sm`]:V==="small",[`${D}-affix-wrapper-lg`]:V==="large",[`${D}-textarea-show-count`]:p||((r=e.count)===null||r===void 0?void 0:r.show)},L)}),prefixCls:D,suffix:F&&u.createElement("span",{className:`${D}-textarea-suffix`},N),showCount:p,ref:_,onResize:K,onMouseDown:se}))))}),ja=ps;ja.Group=IP;ja.Search=kP;ja.TextArea=rM;ja.Password=VP;ja.OTP=AP;var nM=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],yp=u.forwardRef(function(e,t){var r,n=e.prefixCls,o=n===void 0?"rc-switch":n,a=e.className,i=e.checked,s=e.defaultChecked,l=e.disabled,c=e.loadingIcon,d=e.checkedChildren,f=e.unCheckedChildren,v=e.onClick,h=e.onChange,g=e.onKeyDown,p=ft(e,nM),m=zr(!1,{value:i,defaultValue:s}),b=X(m,2),y=b[0],S=b[1];function C(E,O){var R=y;return l||(R=E,S(R),h==null||h(R,O)),R}function $(E){E.which===_e.LEFT?C(!1,E):E.which===_e.RIGHT&&C(!0,E),g==null||g(E)}function x(E){var O=C(!y,E);v==null||v(O,E)}var w=oe(o,a,(r={},T(r,"".concat(o,"-checked"),y),T(r,"".concat(o,"-disabled"),l),r));return u.createElement("button",Be({},p,{type:"button",role:"switch","aria-checked":y,disabled:l,className:w,ref:t,onKeyDown:$,onClick:x}),c,u.createElement("span",{className:"".concat(o,"-inner")},u.createElement("span",{className:"".concat(o,"-inner-checked")},d),u.createElement("span",{className:"".concat(o,"-inner-unchecked")},f)))});yp.displayName="Switch";const oM=e=>{const{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:o,innerMinMarginSM:a,innerMaxMarginSM:i,handleSizeSM:s,calc:l}=e,c=`${t}-inner`,d=ie(l(s).add(l(n).mul(2)).equal()),f=ie(l(i).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:o,height:r,lineHeight:ie(r),[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${c}-checked, ${c}-unchecked`]:{minHeight:r},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${c}-unchecked`]:{marginTop:l(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:l(l(s).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${ie(l(s).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}},aM=e=>{const{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},iM=e=>{const{componentCls:t,trackPadding:r,handleBg:n,handleShadow:o,handleSize:a,calc:i}=e,s=`${t}-handle`;return{[t]:{[s]:{position:"absolute",top:r,insetInlineStart:r,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:i(a).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${ie(i(a).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},sM=e=>{const{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:o,innerMaxMargin:a,handleSize:i,calc:s}=e,l=`${t}-inner`,c=ie(s(i).add(s(n).mul(2)).equal()),d=ie(s(a).mul(2).equal());return{[t]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:o,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${l}-unchecked`]:{marginTop:s(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:s(n).mul(2).equal(),marginInlineEnd:s(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:s(n).mul(-1).mul(2).equal(),marginInlineEnd:s(n).mul(2).equal()}}}}}},lM=e=>{const{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},ar(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:ie(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),ts(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"}})}},cM=e=>{const{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:o}=e,a=t*r,i=n/2,s=2,l=a-s*2,c=i-s*2;return{trackHeight:a,trackHeightSM:i,trackMinWidth:l*2+s*4,trackMinWidthSM:c*2+s*2,trackPadding:s,handleBg:o,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new bt("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+s+s*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+s+s*2}},uM=sr("Switch",e=>{const t=Et(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[lM(t),sM(t),iM(t),aM(t),oM(t)]},cM);var dM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const fM=u.forwardRef((e,t)=>{const{prefixCls:r,size:n,disabled:o,loading:a,className:i,rootClassName:s,style:l,checked:c,value:d,defaultChecked:f,defaultValue:v,onChange:h}=e,g=dM(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[p,m]=zr(!1,{value:c??d,defaultValue:f??v}),{getPrefixCls:b,direction:y,switch:S}=u.useContext(wt),C=u.useContext(Mr),$=(o??C)||a,x=b("switch",r),w=u.createElement("div",{className:`${x}-handle`},a&&u.createElement(rs,{className:`${x}-loading-icon`})),[E,O,R]=uM(x),I=on(n),P=oe(S==null?void 0:S.className,{[`${x}-small`]:I==="small",[`${x}-loading`]:a,[`${x}-rtl`]:y==="rtl"},i,s,O,R),M=Object.assign(Object.assign({},S==null?void 0:S.style),l),F=(...N)=>{m(N[0]),h==null||h.apply(void 0,N)};return E(u.createElement(Zc,{component:"Switch",disabled:$},u.createElement(yp,Object.assign({},g,{checked:p,onChange:F,prefixCls:x,className:P,style:M,disabled:$,ref:t,loadingIcon:w}))))}),mM=fM;mM.__ANT_SWITCH=!0;export{ts as $,ve as A,tI as B,wt as C,ba as D,hR as E,Ut as F,ja as G,ru as H,br as I,Nn as J,_e as K,ft as L,Do as M,En as N,or as O,Xn as P,X as Q,kI as R,Fa as S,vu as T,j as U,T as V,Ct as W,nu as X,GM as Y,UM as Z,Be as _,sr as a,RP as a$,Hr as a0,Ag as a1,To as a2,Fg as a3,mM as a4,jM as a5,Ue as a6,_a as a7,dg as a8,Aa as a9,VM as aA,og as aB,JM as aC,E$ as aD,PE as aE,ME as aF,YC as aG,Jn as aH,qM as aI,Tw as aJ,$n as aK,TE as aL,w$ as aM,Ds as aN,bt as aO,LR as aP,Zn as aQ,vr as aR,On as aS,Rn as aT,Vt as aU,at as aV,Wt as aW,Yl as aX,cx as aY,Pi as aZ,ox as a_,gs as aa,Hh as ab,gu as ac,Jh as ad,mg as ae,Vr as af,Oa as ag,sC as ah,zM as ai,ap as aj,eT as ak,p2 as al,R1 as am,Bt as an,KM as ao,fn as ap,rs as aq,tw as ar,Xc as as,K1 as at,Uc as au,Tg as av,Po as aw,YM as ax,xr as ay,Tn as az,lI as b,Mh as b$,vw as b0,Jd as b1,Mr as b2,mt as b3,$a as b4,Qn as b5,yh as b6,Xi as b7,Ri as b8,Qc as b9,Jc as bA,ou as bB,Yf as bC,wR as bD,SR as bE,Vh as bF,Xh as bG,Uh as bH,kh as bI,fs as bJ,sI as bK,Yh as bL,kR as bM,vs as bN,No as bO,Na as bP,yd as bQ,ZM as bR,sw as bS,DM as bT,EE as bU,Dr as bV,Ac as bW,bv as bX,QM as bY,d$ as bZ,xh as b_,Ma as ba,Gn as bb,HM as bc,of as bd,Ra as be,kg as bf,Vg as bg,Wg as bh,Hg as bi,nf as bj,fI as bk,NE as bl,Ww as bm,XM as bn,zo as bo,An as bp,sa as bq,rb as br,zh as bs,AM as bt,ea as bu,In as bv,pr as bw,xI as bx,Zc as by,wI as bz,cy as c,AI as c0,ps as c1,Th as c2,kM as c3,ry as d,iI as e,oy as f,LM as g,Ah as h,qg as i,oe as j,Fh as k,zr as l,Et as m,Bg as n,Mo as o,e1 as p,xt as q,ar as r,ie as s,pI as t,Pn as u,Mn as v,sp as w,BM as x,on as y,Ud as z};
|