ysyt-react-agent-lib 1.2.19 → 1.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConsultModel-B_fLiQBh.mjs → ConsultModel-NOhzCzrd.mjs} +2 -2
- package/dist/{ConsultModel-CrHr2sC7.js → ConsultModel-oPMIoo5r.js} +1 -1
- package/dist/{TransferModel-ChcIcMX5.js → TransferModel-1zcxBpkk.js} +1 -1
- package/dist/{TransferModel-CK-_QKxd.mjs → TransferModel-Df3UJnMz.mjs} +2 -2
- package/dist/{index-CPZ7ggaQ.mjs → index-C-DyyNtr.mjs} +236 -236
- package/dist/{index-DHBJa5Bp.js → index-CKrnxkxp.js} +17 -17
- package/dist/{index-B4HQMqho.mjs → index-MdxI5z8R.mjs} +1 -1
- package/dist/{index-B6Kl661y.js → index-ybEs-re3.js} +1 -1
- package/dist/ysyt-react-agent-lib.cjs.js +1 -1
- package/dist/ysyt-react-agent-lib.es.js +1 -1
- package/package.json +2 -2
|
@@ -18,7 +18,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/var Wg;function _q(){return Wg||(Wg=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),A=Symbol.for("react.context"),a=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),V=!1,v=!1,m=!1,C=!1,w=!1,S;S=Symbol.for("react.module.reference");function M(Z){return!!(typeof Z=="string"||typeof Z=="function"||Z===n||Z===i||w||Z===r||Z===l||Z===u||C||Z===p||V||v||m||typeof Z=="object"&&Z!==null&&(Z.$$typeof===g||Z.$$typeof===d||Z.$$typeof===o||Z.$$typeof===A||Z.$$typeof===s||Z.$$typeof===S||Z.getModuleId!==void 0))}function I(Z){if(typeof Z=="object"&&Z!==null){var de=Z.$$typeof;switch(de){case t:var ce=Z.type;switch(ce){case n:case i:case r:case l:case u:return ce;default:var ye=ce&&ce.$$typeof;switch(ye){case a:case A:case s:case g:case d:case o:return ye;default:return de}}case e:return de}}}var f=A,R=o,q=t,E=s,h=n,y=g,x=d,b=e,B=i,O=r,N=l,F=u,j=!1,Y=!1;function H(Z){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(Z){return Y||(Y=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function G(Z){return I(Z)===A}function _(Z){return I(Z)===o}function K(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function J(Z){return I(Z)===s}function z(Z){return I(Z)===n}function te(Z){return I(Z)===g}function X(Z){return I(Z)===d}function Ae(Z){return I(Z)===e}function le(Z){return I(Z)===i}function ue(Z){return I(Z)===r}function ne(Z){return I(Z)===l}function me(Z){return I(Z)===u}Gt.ContextConsumer=f,Gt.ContextProvider=R,Gt.Element=q,Gt.ForwardRef=E,Gt.Fragment=h,Gt.Lazy=y,Gt.Memo=x,Gt.Portal=b,Gt.Profiler=B,Gt.StrictMode=O,Gt.Suspense=N,Gt.SuspenseList=F,Gt.isAsyncMode=H,Gt.isConcurrentMode=L,Gt.isContextConsumer=G,Gt.isContextProvider=_,Gt.isElement=K,Gt.isForwardRef=J,Gt.isFragment=z,Gt.isLazy=te,Gt.isMemo=X,Gt.isPortal=Ae,Gt.isProfiler=le,Gt.isStrictMode=ue,Gt.isSuspense=ne,Gt.isSuspenseList=me,Gt.isValidElementType=M,Gt.typeOf=I}()),Gt}var Xg;function $q(){return Xg||(Xg=1,process.env.NODE_ENV==="production"?fa.exports=Xq():fa.exports=_q()),fa.exports}var Tl=$q(),eE=Symbol.for("react.element"),tE=Symbol.for("react.transitional.element"),nE=Symbol.for("react.fragment");function EV(t){return t&&$e(t)==="object"&&(t.$$typeof===eE||t.$$typeof===tE)&&t.type===nE}var rE=Number(T.version.split(".")[0]),Od=function(e,n){typeof e=="function"?e(n):$e(e)==="object"&&e&&"current"in e&&(e.current=n)},kr=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n.filter(Boolean);return i.length<=1?i[0]:function(o){n.forEach(function(A){Od(A,o)})}},Fi=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return HA(function(){return kr.apply(void 0,n)},n,function(i,o){return i.length!==o.length||i.every(function(A,a){return A!==o[a]})})},Qi=function(e){var n,r;if(!e)return!1;if(Dd(e)&&rE>=19)return!0;var i=Tl.isMemo(e)?e.type.type:e.type;return!(typeof i=="function"&&!((n=i.prototype)!==null&&n!==void 0&&n.render)&&i.$$typeof!==Tl.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==Tl.ForwardRef)};function Dd(t){return T.isValidElement(t)&&!EV(t)}var iE=function(e){return Dd(e)&&Qi(e)},io=function(e){if(e&&Dd(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null};function Kr(t,e){for(var n=t,r=0;r<e.length;r+=1){if(n==null)return;n=n[e[r]]}return n}function yV(t){return Zm(t)||Wm(t)||Sd(t)||zm()}function wV(t,e,n,r){if(!e.length)return n;var i=yV(e),o=i[0],A=i.slice(1),a;return!t&&typeof o=="number"?a=[]:Array.isArray(t)?a=be(t):a=U({},t),r&&n===void 0&&A.length===1?delete a[o][A[0]]:a[o]=wV(a[o],A,n,r),a}function Mr(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!Kr(t,e.slice(0,-1))?t:wV(t,e,n,r)}function oE(t){return $e(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function _g(t){return Array.isArray(t)?[]:{}}var AE=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Eo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=_g(e[0]);return e.forEach(function(i){function o(A,a){var s=new Set(a),l=Kr(i,A),u=Array.isArray(l);if(u||oE(l)){if(!s.has(l)){s.add(l);var d=Kr(r,A);u?r=Mr(r,A,[]):(!d||$e(d)!=="object")&&(r=Mr(r,A,_g(l))),AE(l).forEach(function(g){o([].concat(be(A),[g]),s)})}}else r=Mr(r,A,l)}o([])}),r}function $g(t,e,n,r){var i=U({},e[t]);if(r!=null&&r.deprecatedTokens){var o=r.deprecatedTokens;o.forEach(function(a){var s=$(a,2),l=s[0],u=s[1];if(process.env.NODE_ENV!=="production"&&Ct(!(i!=null&&i[l]),"Component Token `".concat(String(l),"` of ").concat(String(t)," is deprecated. Please use `").concat(String(u),"` instead.")),i!=null&&i[l]||i!=null&&i[u]){var d;(d=i[u])!==null&&d!==void 0||(i[u]=i==null?void 0:i[l])}})}var A=U(U({},n),i);return Object.keys(A).forEach(function(a){A[a]===e[a]&&delete A[a]}),A}var SV=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",bc=!0;function Zt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!SV)return Object.assign.apply(Object,[{}].concat(e));bc=!1;var r={};return e.forEach(function(i){if($e(i)==="object"){var o=Object.keys(i);o.forEach(function(A){Object.defineProperty(r,A,{configurable:!0,enumerable:!0,get:function(){return i[A]}})})}}),bc=!0,r}var ef={};function aE(){}var sE=function(e){var n,r=e,i=aE;return SV&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(e,{get:function(A,a){if(bc){var s;(s=n)===null||s===void 0||s.add(a)}return A[a]}}),i=function(A,a){var s;ef[A]={global:Array.from(n),component:U(U({},(s=ef[A])===null||s===void 0?void 0:s.component),a)}}),{token:r,keys:n,flush:i}};function tf(t,e,n){if(typeof n=="function"){var r;return n(Zt(e,(r=e[t])!==null&&r!==void 0?r:{}))}return n??{}}function lE(t){return t==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return"max(".concat(r.map(function(o){return ve(o)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return"min(".concat(r.map(function(o){return ve(o)}).join(","),")")}}}var cE=1e3*60*10,uE=function(){function t(){fn(this,t),Q(this,"map",new Map),Q(this,"objectIDMap",new WeakMap),Q(this,"nextID",0),Q(this,"lastAccessBeat",new Map),Q(this,"accessBeat",0)}return hn(t,[{key:"set",value:function(n,r){this.clear();var i=this.getCompositeKey(n);this.map.set(i,r),this.lastAccessBeat.set(i,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),i=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,i}},{key:"getCompositeKey",value:function(n){var r=this,i=n.map(function(o){return o&&$e(o)==="object"?"obj_".concat(r.getObjectID(o)):"".concat($e(o),"_").concat(o)});return i.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(i,o){r-i>cE&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),t}(),nf=new uE;function dE(t,e){return T.useMemo(function(){var n=nf.get(e);if(n)return n;var r=t();return nf.set(e,r),r},e)}var gE=function(){return{}};function fE(t){var e=t.useCSP,n=e===void 0?gE:e,r=t.useToken,i=t.usePrefix,o=t.getResetStyles,A=t.getCommonStyle,a=t.getCompUnitless;function s(g,p,V,v){var m=Array.isArray(g)?g[0]:g;function C(q){return"".concat(String(m)).concat(q.slice(0,1).toUpperCase()).concat(q.slice(1))}var w=(v==null?void 0:v.unitless)||{},S=typeof a=="function"?a(g):{},M=U(U({},S),{},Q({},C("zIndexPopup"),!0));Object.keys(w).forEach(function(q){M[C(q)]=w[q]});var I=U(U({},v),{},{unitless:M,prefixToken:C}),f=u(g,p,V,I),R=l(m,V,I);return function(q){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q,h=f(q,E),y=$(h,2),x=y[1],b=R(E),B=$(b,2),O=B[0],N=B[1];return[O,x,N]}}function l(g,p,V){var v=V.unitless,m=V.injectStyle,C=m===void 0?!0:m,w=V.prefixToken,S=V.ignore,M=function(R){var q=R.rootCls,E=R.cssVar,h=E===void 0?{}:E,y=r(),x=y.realToken;return Yq({path:[g],prefix:h.prefix,key:h.key,unitless:v,ignore:S,token:x,scope:q},function(){var b=tf(g,x,p),B=$g(g,x,b,{deprecatedTokens:V==null?void 0:V.deprecatedTokens});return Object.keys(b).forEach(function(O){B[w(O)]=B[O],delete B[O]}),B}),null},I=function(R){var q=r(),E=q.cssVar;return[function(h){return C&&E?T.createElement(T.Fragment,null,T.createElement(M,{rootCls:R,cssVar:E,component:g}),h):h},E==null?void 0:E.key]};return I}function u(g,p,V){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=Array.isArray(g)?g:[g,g],C=$(m,1),w=C[0],S=m.join("-"),M=t.layer||{name:"antd"};return function(I){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I,R=r(),q=R.theme,E=R.realToken,h=R.hashId,y=R.token,x=R.cssVar,b=i(),B=b.rootPrefixCls,O=b.iconPrefixCls,N=n(),F=x?"css":"js",j=dE(function(){var K=new Set;return x&&Object.keys(v.unitless||{}).forEach(function(J){K.add(Oa(J,x.prefix)),K.add(Oa(J,zg(w,x.prefix)))}),Jq(F,K)},[F,w,x==null?void 0:x.prefix]),Y=lE(F),H=Y.max,L=Y.min,G={theme:q,token:y,hashId:h,nonce:function(){return N.nonce},clientOnly:v.clientOnly,layer:M,order:v.order||-999};typeof o=="function"&&Ic(U(U({},G),{},{clientOnly:!1,path:["Shared",B]}),function(){return o(y,{prefix:{rootPrefixCls:B,iconPrefixCls:O},csp:N})});var _=Ic(U(U({},G),{},{path:[S,I,O]}),function(){if(v.injectStyle===!1)return[];var K=sE(y),J=K.token,z=K.flush,te=tf(w,E,V),X=".".concat(I),Ae=$g(w,E,te,{deprecatedTokens:v.deprecatedTokens});x&&te&&$e(te)==="object"&&Object.keys(te).forEach(function(me){te[me]="var(".concat(Oa(me,zg(w,x.prefix)),")")});var le=Zt(J,{componentCls:X,prefixCls:I,iconCls:".".concat(O),antCls:".".concat(B),calc:j,max:H,min:L},x?te:Ae),ue=p(le,{hashId:h,prefixCls:I,rootPrefixCls:B,iconPrefixCls:O});z(w,Ae);var ne=typeof A=="function"?A(le,I,f,v.resetFont):null;return[v.resetStyle===!1?null:ne,ue]});return[_,h]}}function d(g,p,V){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=u(g,p,V,U({resetStyle:!1,order:-998},v)),C=function(S){var M=S.prefixCls,I=S.rootCls,f=I===void 0?M:I;return m(M,f),null};return process.env.NODE_ENV!=="production"&&(C.displayName="SubStyle_".concat(String(Array.isArray(g)?g.join("."):g))),C}return{genStyleHooks:s,genSubStyleComponent:d,genComponentStyleHook:u}}const Ti=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function ka(t){return(t+8)/t}function hE(t){const e=new Array(10).fill(null).map((n,r)=>{const i=r-1,o=t*Math.pow(Math.E,i/5),A=r>1?Math.floor(o):Math.ceil(o);return Math.floor(A/2)*2});return e[1]=t,e.map(n=>({size:n,lineHeight:ka(n)}))}const pE="5.24.0",IV={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},bA=Object.assign(Object.assign({},IV),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
21
|
+
*/var Wg;function _q(){return Wg||(Wg=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),A=Symbol.for("react.context"),a=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),V=!1,v=!1,m=!1,C=!1,w=!1,S;S=Symbol.for("react.module.reference");function M(Z){return!!(typeof Z=="string"||typeof Z=="function"||Z===n||Z===i||w||Z===r||Z===l||Z===u||C||Z===p||V||v||m||typeof Z=="object"&&Z!==null&&(Z.$$typeof===g||Z.$$typeof===d||Z.$$typeof===o||Z.$$typeof===A||Z.$$typeof===s||Z.$$typeof===S||Z.getModuleId!==void 0))}function I(Z){if(typeof Z=="object"&&Z!==null){var de=Z.$$typeof;switch(de){case t:var ce=Z.type;switch(ce){case n:case i:case r:case l:case u:return ce;default:var ye=ce&&ce.$$typeof;switch(ye){case a:case A:case s:case g:case d:case o:return ye;default:return de}}case e:return de}}}var f=A,R=o,q=t,E=s,h=n,y=g,x=d,b=e,B=i,O=r,N=l,F=u,j=!1,Y=!1;function H(Z){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(Z){return Y||(Y=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function G(Z){return I(Z)===A}function _(Z){return I(Z)===o}function K(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function W(Z){return I(Z)===s}function z(Z){return I(Z)===n}function te(Z){return I(Z)===g}function X(Z){return I(Z)===d}function Ae(Z){return I(Z)===e}function le(Z){return I(Z)===i}function ue(Z){return I(Z)===r}function ne(Z){return I(Z)===l}function me(Z){return I(Z)===u}Gt.ContextConsumer=f,Gt.ContextProvider=R,Gt.Element=q,Gt.ForwardRef=E,Gt.Fragment=h,Gt.Lazy=y,Gt.Memo=x,Gt.Portal=b,Gt.Profiler=B,Gt.StrictMode=O,Gt.Suspense=N,Gt.SuspenseList=F,Gt.isAsyncMode=H,Gt.isConcurrentMode=L,Gt.isContextConsumer=G,Gt.isContextProvider=_,Gt.isElement=K,Gt.isForwardRef=W,Gt.isFragment=z,Gt.isLazy=te,Gt.isMemo=X,Gt.isPortal=Ae,Gt.isProfiler=le,Gt.isStrictMode=ue,Gt.isSuspense=ne,Gt.isSuspenseList=me,Gt.isValidElementType=M,Gt.typeOf=I}()),Gt}var Xg;function $q(){return Xg||(Xg=1,process.env.NODE_ENV==="production"?fa.exports=Xq():fa.exports=_q()),fa.exports}var Tl=$q(),eE=Symbol.for("react.element"),tE=Symbol.for("react.transitional.element"),nE=Symbol.for("react.fragment");function EV(t){return t&&$e(t)==="object"&&(t.$$typeof===eE||t.$$typeof===tE)&&t.type===nE}var rE=Number(T.version.split(".")[0]),Od=function(e,n){typeof e=="function"?e(n):$e(e)==="object"&&e&&"current"in e&&(e.current=n)},kr=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n.filter(Boolean);return i.length<=1?i[0]:function(o){n.forEach(function(A){Od(A,o)})}},Fi=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return HA(function(){return kr.apply(void 0,n)},n,function(i,o){return i.length!==o.length||i.every(function(A,a){return A!==o[a]})})},Qi=function(e){var n,r;if(!e)return!1;if(Dd(e)&&rE>=19)return!0;var i=Tl.isMemo(e)?e.type.type:e.type;return!(typeof i=="function"&&!((n=i.prototype)!==null&&n!==void 0&&n.render)&&i.$$typeof!==Tl.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==Tl.ForwardRef)};function Dd(t){return T.isValidElement(t)&&!EV(t)}var iE=function(e){return Dd(e)&&Qi(e)},io=function(e){if(e&&Dd(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null};function Kr(t,e){for(var n=t,r=0;r<e.length;r+=1){if(n==null)return;n=n[e[r]]}return n}function yV(t){return Zm(t)||Wm(t)||Sd(t)||zm()}function wV(t,e,n,r){if(!e.length)return n;var i=yV(e),o=i[0],A=i.slice(1),a;return!t&&typeof o=="number"?a=[]:Array.isArray(t)?a=be(t):a=U({},t),r&&n===void 0&&A.length===1?delete a[o][A[0]]:a[o]=wV(a[o],A,n,r),a}function Mr(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!Kr(t,e.slice(0,-1))?t:wV(t,e,n,r)}function oE(t){return $e(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function _g(t){return Array.isArray(t)?[]:{}}var AE=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Eo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=_g(e[0]);return e.forEach(function(i){function o(A,a){var s=new Set(a),l=Kr(i,A),u=Array.isArray(l);if(u||oE(l)){if(!s.has(l)){s.add(l);var d=Kr(r,A);u?r=Mr(r,A,[]):(!d||$e(d)!=="object")&&(r=Mr(r,A,_g(l))),AE(l).forEach(function(g){o([].concat(be(A),[g]),s)})}}else r=Mr(r,A,l)}o([])}),r}function $g(t,e,n,r){var i=U({},e[t]);if(r!=null&&r.deprecatedTokens){var o=r.deprecatedTokens;o.forEach(function(a){var s=$(a,2),l=s[0],u=s[1];if(process.env.NODE_ENV!=="production"&&Ct(!(i!=null&&i[l]),"Component Token `".concat(String(l),"` of ").concat(String(t)," is deprecated. Please use `").concat(String(u),"` instead.")),i!=null&&i[l]||i!=null&&i[u]){var d;(d=i[u])!==null&&d!==void 0||(i[u]=i==null?void 0:i[l])}})}var A=U(U({},n),i);return Object.keys(A).forEach(function(a){A[a]===e[a]&&delete A[a]}),A}var SV=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",bc=!0;function Zt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!SV)return Object.assign.apply(Object,[{}].concat(e));bc=!1;var r={};return e.forEach(function(i){if($e(i)==="object"){var o=Object.keys(i);o.forEach(function(A){Object.defineProperty(r,A,{configurable:!0,enumerable:!0,get:function(){return i[A]}})})}}),bc=!0,r}var ef={};function aE(){}var sE=function(e){var n,r=e,i=aE;return SV&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(e,{get:function(A,a){if(bc){var s;(s=n)===null||s===void 0||s.add(a)}return A[a]}}),i=function(A,a){var s;ef[A]={global:Array.from(n),component:U(U({},(s=ef[A])===null||s===void 0?void 0:s.component),a)}}),{token:r,keys:n,flush:i}};function tf(t,e,n){if(typeof n=="function"){var r;return n(Zt(e,(r=e[t])!==null&&r!==void 0?r:{}))}return n??{}}function lE(t){return t==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return"max(".concat(r.map(function(o){return ve(o)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return"min(".concat(r.map(function(o){return ve(o)}).join(","),")")}}}var cE=1e3*60*10,uE=function(){function t(){fn(this,t),Q(this,"map",new Map),Q(this,"objectIDMap",new WeakMap),Q(this,"nextID",0),Q(this,"lastAccessBeat",new Map),Q(this,"accessBeat",0)}return hn(t,[{key:"set",value:function(n,r){this.clear();var i=this.getCompositeKey(n);this.map.set(i,r),this.lastAccessBeat.set(i,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),i=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,i}},{key:"getCompositeKey",value:function(n){var r=this,i=n.map(function(o){return o&&$e(o)==="object"?"obj_".concat(r.getObjectID(o)):"".concat($e(o),"_").concat(o)});return i.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(i,o){r-i>cE&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),t}(),nf=new uE;function dE(t,e){return T.useMemo(function(){var n=nf.get(e);if(n)return n;var r=t();return nf.set(e,r),r},e)}var gE=function(){return{}};function fE(t){var e=t.useCSP,n=e===void 0?gE:e,r=t.useToken,i=t.usePrefix,o=t.getResetStyles,A=t.getCommonStyle,a=t.getCompUnitless;function s(g,p,V,v){var m=Array.isArray(g)?g[0]:g;function C(q){return"".concat(String(m)).concat(q.slice(0,1).toUpperCase()).concat(q.slice(1))}var w=(v==null?void 0:v.unitless)||{},S=typeof a=="function"?a(g):{},M=U(U({},S),{},Q({},C("zIndexPopup"),!0));Object.keys(w).forEach(function(q){M[C(q)]=w[q]});var I=U(U({},v),{},{unitless:M,prefixToken:C}),f=u(g,p,V,I),R=l(m,V,I);return function(q){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q,h=f(q,E),y=$(h,2),x=y[1],b=R(E),B=$(b,2),O=B[0],N=B[1];return[O,x,N]}}function l(g,p,V){var v=V.unitless,m=V.injectStyle,C=m===void 0?!0:m,w=V.prefixToken,S=V.ignore,M=function(R){var q=R.rootCls,E=R.cssVar,h=E===void 0?{}:E,y=r(),x=y.realToken;return Yq({path:[g],prefix:h.prefix,key:h.key,unitless:v,ignore:S,token:x,scope:q},function(){var b=tf(g,x,p),B=$g(g,x,b,{deprecatedTokens:V==null?void 0:V.deprecatedTokens});return Object.keys(b).forEach(function(O){B[w(O)]=B[O],delete B[O]}),B}),null},I=function(R){var q=r(),E=q.cssVar;return[function(h){return C&&E?T.createElement(T.Fragment,null,T.createElement(M,{rootCls:R,cssVar:E,component:g}),h):h},E==null?void 0:E.key]};return I}function u(g,p,V){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=Array.isArray(g)?g:[g,g],C=$(m,1),w=C[0],S=m.join("-"),M=t.layer||{name:"antd"};return function(I){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I,R=r(),q=R.theme,E=R.realToken,h=R.hashId,y=R.token,x=R.cssVar,b=i(),B=b.rootPrefixCls,O=b.iconPrefixCls,N=n(),F=x?"css":"js",j=dE(function(){var K=new Set;return x&&Object.keys(v.unitless||{}).forEach(function(W){K.add(Oa(W,x.prefix)),K.add(Oa(W,zg(w,x.prefix)))}),Jq(F,K)},[F,w,x==null?void 0:x.prefix]),Y=lE(F),H=Y.max,L=Y.min,G={theme:q,token:y,hashId:h,nonce:function(){return N.nonce},clientOnly:v.clientOnly,layer:M,order:v.order||-999};typeof o=="function"&&Ic(U(U({},G),{},{clientOnly:!1,path:["Shared",B]}),function(){return o(y,{prefix:{rootPrefixCls:B,iconPrefixCls:O},csp:N})});var _=Ic(U(U({},G),{},{path:[S,I,O]}),function(){if(v.injectStyle===!1)return[];var K=sE(y),W=K.token,z=K.flush,te=tf(w,E,V),X=".".concat(I),Ae=$g(w,E,te,{deprecatedTokens:v.deprecatedTokens});x&&te&&$e(te)==="object"&&Object.keys(te).forEach(function(me){te[me]="var(".concat(Oa(me,zg(w,x.prefix)),")")});var le=Zt(W,{componentCls:X,prefixCls:I,iconCls:".".concat(O),antCls:".".concat(B),calc:j,max:H,min:L},x?te:Ae),ue=p(le,{hashId:h,prefixCls:I,rootPrefixCls:B,iconPrefixCls:O});z(w,Ae);var ne=typeof A=="function"?A(le,I,f,v.resetFont):null;return[v.resetStyle===!1?null:ne,ue]});return[_,h]}}function d(g,p,V){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=u(g,p,V,U({resetStyle:!1,order:-998},v)),C=function(S){var M=S.prefixCls,I=S.rootCls,f=I===void 0?M:I;return m(M,f),null};return process.env.NODE_ENV!=="production"&&(C.displayName="SubStyle_".concat(String(Array.isArray(g)?g.join("."):g))),C}return{genStyleHooks:s,genSubStyleComponent:d,genComponentStyleHook:u}}const Ti=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function ka(t){return(t+8)/t}function hE(t){const e=new Array(10).fill(null).map((n,r)=>{const i=r-1,o=t*Math.pow(Math.E,i/5),A=r>1?Math.floor(o):Math.ceil(o);return Math.floor(A/2)*2});return e[1]=t,e.map(n=>({size:n,lineHeight:ka(n)}))}const pE="5.24.0",IV={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},bA=Object.assign(Object.assign({},IV),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
22
22
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
23
23
|
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),En=Math.round;function Bl(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=e(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const rf=(t,e,n)=>n===0?t:t/100;function eA(t,e){const n=e||255;return t>n?n:t<0?0:t}class Pt{constructor(e){Q(this,"isValid",!0),Q(this,"r",0),Q(this,"g",0),Q(this,"b",0),Q(this,"a",1),Q(this,"_h",void 0),Q(this,"_s",void 0),Q(this,"_l",void 0),Q(this,"_v",void 0),Q(this,"_max",void 0),Q(this,"_min",void 0),Q(this,"_brightness",void 0);function n(r){return r[0]in e&&r[1]in e&&r[2]in e}if(e)if(typeof e=="string"){let i=function(o){return r.startsWith(o)};const r=e.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):i("rgb")?this.fromRgbString(r):i("hsl")?this.fromHslString(r):(i("hsv")||i("hsb"))&&this.fromHsvString(r)}else if(e instanceof Pt)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(n("rgb"))this.r=eA(e.r),this.g=eA(e.g),this.b=eA(e.b),this.a=typeof e.a=="number"?eA(e.a,1):1;else if(n("hsl"))this.fromHsl(e);else if(n("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const n=this.toHsv();return n.h=e,this._c(n)}getLuminance(){function e(o){const A=o/255;return A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4)}const n=e(this.r),r=e(this.g),i=e(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=En(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(e,n=50){const r=this._c(e),i=n/100,o=a=>(r[a]-this[a])*i+this[a],A={r:En(o("r")),g:En(o("g")),b:En(o("b")),a:En(o("a")*100)/100};return this._c(A)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const n=this._c(e),r=this.a+n.a*(1-this.a),i=o=>En((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const n=(this.r||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);e+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=En(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),n=En(this.getSaturation()*100),r=En(this.getLightness()*100);return this.a!==1?`hsla(${e},${n}%,${r}%,${this.a})`:`hsl(${e},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,n,r){const i=this.clone();return i[e]=eA(n,r),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const n=e.replace("#","");function r(i,o){return parseInt(n[i]+n[o||i],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:e,s:n,l:r,a:i}){if(this._h=e%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const g=En(r*255);this.r=g,this.g=g,this.b=g}let o=0,A=0,a=0;const s=e/60,l=(1-Math.abs(2*r-1))*n,u=l*(1-Math.abs(s%2-1));s>=0&&s<1?(o=l,A=u):s>=1&&s<2?(o=u,A=l):s>=2&&s<3?(A=l,a=u):s>=3&&s<4?(A=u,a=l):s>=4&&s<5?(o=u,a=l):s>=5&&s<6&&(o=l,a=u);const d=r-l/2;this.r=En((o+d)*255),this.g=En((A+d)*255),this.b=En((a+d)*255)}fromHsv({h:e,s:n,v:r,a:i}){this._h=e%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const o=En(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const A=e/60,a=Math.floor(A),s=A-a,l=En(r*(1-n)*255),u=En(r*(1-n*s)*255),d=En(r*(1-n*(1-s))*255);switch(a){case 0:this.g=d,this.b=l;break;case 1:this.r=u,this.b=l;break;case 2:this.r=l,this.b=d;break;case 3:this.r=l,this.g=u;break;case 4:this.r=d,this.g=l;break;case 5:default:this.g=l,this.b=u;break}}fromHsvString(e){const n=Bl(e,rf);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=Bl(e,rf);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=Bl(e,(r,i)=>i.includes("%")?En(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var ha=2,of=.16,mE=.05,VE=.05,vE=.15,bV=5,MV=4,CE=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function Af(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-ha*e:Math.round(t.h)+ha*e:r=n?Math.round(t.h)+ha*e:Math.round(t.h)-ha*e,r<0?r+=360:r>=360&&(r-=360),r}function af(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-of*e:e===MV?r=t.s+of:r=t.s+mE*e,r>1&&(r=1),n&&e===bV&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function sf(t,e,n){var r;return n?r=t.v+VE*e:r=t.v-vE*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function MA(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Pt(t),i=r.toHsv(),o=bV;o>0;o-=1){var A=new Pt({h:Af(i,o,!0),s:af(i,o,!0),v:sf(i,o,!0)});n.push(A)}n.push(r);for(var a=1;a<=MV;a+=1){var s=new Pt({h:Af(i,a),s:af(i,a),v:sf(i,a)});n.push(s)}return e.theme==="dark"?CE.map(function(l){var u=l.index,d=l.amount;return new Pt(e.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(l){return l.toHexString()})}var Ol={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Mc=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Mc.primary=Mc[5];var Rc=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Rc.primary=Rc[5];var xc=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];xc.primary=xc[5];var Tc=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Tc.primary=Tc[5];var Bc=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Bc.primary=Bc[5];var Oc=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Oc.primary=Oc[5];var Dc=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Dc.primary=Dc[5];var Nc=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Nc.primary=Nc[5];var ts=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];ts.primary=ts[5];var Fc=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Fc.primary=Fc[5];var Qc=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Qc.primary=Qc[5];var kc=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];kc.primary=kc[5];var Uc=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Uc.primary=Uc[5];var Dl={red:Mc,volcano:Rc,orange:xc,gold:Tc,yellow:Bc,lime:Oc,green:Dc,cyan:Nc,blue:ts,geekblue:Fc,purple:Qc,magenta:kc,grey:Uc};function qE(t,e){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=e;const{colorSuccess:i,colorWarning:o,colorError:A,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:u}=t,d=n(s),g=n(i),p=n(o),V=n(A),v=n(a),m=r(l,u),C=t.colorLink||t.colorInfo,w=n(C),S=new Pt(V[1]).mix(new Pt(V[3]),50).toHexString();return Object.assign(Object.assign({},m),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:g[1],colorSuccessBgHover:g[2],colorSuccessBorder:g[3],colorSuccessBorderHover:g[4],colorSuccessHover:g[4],colorSuccess:g[6],colorSuccessActive:g[7],colorSuccessTextHover:g[8],colorSuccessText:g[9],colorSuccessTextActive:g[10],colorErrorBg:V[1],colorErrorBgHover:V[2],colorErrorBgFilledHover:S,colorErrorBgActive:V[3],colorErrorBorder:V[3],colorErrorBorderHover:V[4],colorErrorHover:V[5],colorError:V[6],colorErrorActive:V[7],colorErrorTextHover:V[8],colorErrorText:V[9],colorErrorTextActive:V[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:w[4],colorLink:w[6],colorLinkActive:w[7],colorBgMask:new Pt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const EE=t=>{let e=t,n=t,r=t,i=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?r=1:t>=6&&(r=2),t>4&&t<8?i=4:t>=8&&(i=6),{borderRadius:t,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:i}};function yE(t){const{motionUnit:e,motionBase:n,borderRadius:r,lineWidth:i}=t;return Object.assign({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:i+1},EE(r))}const wE=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}},SE=t=>{const e=hE(t),n=e.map(u=>u.size),r=e.map(u=>u.lineHeight),i=n[1],o=n[0],A=n[2],a=r[1],s=r[0],l=r[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:A,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:a,lineHeightLG:l,lineHeightSM:s,fontHeight:Math.round(a*i),fontHeightLG:Math.round(l*A),fontHeightSM:Math.round(s*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function IE(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const hr=(t,e)=>new Pt(t).setA(e).toRgbString(),tA=(t,e)=>new Pt(t).darken(e).toHexString(),bE=t=>{const e=MA(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},ME=(t,e)=>{const n=t||"#fff",r=e||"#000";return{colorBgBase:n,colorTextBase:r,colorText:hr(r,.88),colorTextSecondary:hr(r,.65),colorTextTertiary:hr(r,.45),colorTextQuaternary:hr(r,.25),colorFill:hr(r,.15),colorFillSecondary:hr(r,.06),colorFillTertiary:hr(r,.04),colorFillQuaternary:hr(r,.02),colorBgSolid:hr(r,1),colorBgSolidHover:hr(r,.75),colorBgSolidActive:hr(r,.95),colorBgLayout:tA(n,4),colorBgContainer:tA(n,0),colorBgElevated:tA(n,0),colorBgSpotlight:hr(r,.85),colorBgBlur:"transparent",colorBorder:tA(n,15),colorBorderSecondary:tA(n,6)}};function RE(t){Ol.pink=Ol.magenta,Dl.pink=Dl.magenta;const e=Object.keys(IV).map(n=>{const r=t[n]===Ol[n]?Dl[n]:MA(t[n]);return new Array(10).fill(1).reduce((i,o,A)=>(i[`${n}-${A+1}`]=r[A],i[`${n}${A+1}`]=r[A],i),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),e),qE(t,{generateColorPalettes:bE,generateNeutralColorPalettes:ME})),SE(t.fontSize)),IE(t)),wE(t)),yE(t))}const RV=qc(RE),Gc={token:bA,override:{override:bA},hashed:!0},xV=T.createContext(Gc);function Nl(t){return t>=0&&t<=255}function cA(t,e){const{r:n,g:r,b:i,a:o}=new Pt(t).toRgb();if(o<1)return t;const{r:A,g:a,b:s}=new Pt(e).toRgb();for(let l=.01;l<=1;l+=.01){const u=Math.round((n-A*(1-l))/l),d=Math.round((r-a*(1-l))/l),g=Math.round((i-s*(1-l))/l);if(Nl(u)&&Nl(d)&&Nl(g))return new Pt({r:u,g:d,b:g,a:Math.round(l*100)/100}).toRgbString()}return new Pt({r:n,g:r,b:i,a:1}).toRgbString()}var xE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function TV(t){const{override:e}=t,n=xE(t,["override"]),r=Object.assign({},e);Object.keys(bA).forEach(g=>{delete r[g]});const i=Object.assign(Object.assign({},n),r),o=480,A=576,a=768,s=992,l=1200,u=1600;return i.motion===!1&&(i.motionDurationFast="0s",i.motionDurationMid="0s",i.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:cA(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:cA(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:cA(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:cA(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:`
|
|
24
24
|
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
@@ -61,7 +61,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
61
61
|
Copyright (c) 2018 Jed Watson.
|
|
62
62
|
Licensed under the MIT License (MIT), see
|
|
63
63
|
http://jedwatson.github.io/classnames
|
|
64
|
-
*/var ff;function ty(){return ff||(ff=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",A=0;A<arguments.length;A++){var a=arguments[A];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var A="";for(var a in o)e.call(o,a)&&o[a]&&(A=i(A,a));return A}function i(o,A){return A?o?o+" "+A:o+A:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(Fl)),Fl.exports}var ny=ty();const se=Wq(ny);function xA(t){return t instanceof HTMLElement||t instanceof SVGElement}function ry(t){return t&&$e(t)==="object"&&xA(t.nativeElement)?t.nativeElement:xA(t)?t:null}function ja(t){var e=ry(t);if(e)return e;if(t instanceof T.Component){var n;return(n=zr.findDOMNode)===null||n===void 0?void 0:n.call(zr,t)}return null}var iy=["children"],LV=c.createContext({});function oy(t){var e=t.children,n=qt(t,iy);return c.createElement(LV.Provider,{value:n},e)}var Ay=function(t){di(n,t);var e=gi(n);function n(){return fn(this,n),e.apply(this,arguments)}return hn(n,[{key:"render",value:function(){return this.props.children}}]),n}(c.Component);function ay(t){var e=c.useReducer(function(a){return a+1},0),n=$(e,2),r=n[1],i=c.useRef(t),o=nn(function(){return i.current}),A=nn(function(a){i.current=typeof a=="function"?a(i.current):a,r()});return[o,A]}var Ci="none",pa="appear",ma="enter",Va="leave",hf="none",Rr="prepare",yo="start",wo="active",Qd="end",YV="prepared";function pf(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function sy(t,e){var n={animationend:pf("Animation","AnimationEnd"),transitionend:pf("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var ly=sy(Qn(),typeof window<"u"?window:{}),HV={};if(Qn()){var cy=document.createElement("div");HV=cy.style}var va={};function KV(t){if(va[t])return va[t];var e=ly[t];if(e)for(var n=Object.keys(e),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(e,o)&&o in HV)return va[t]=e[o],va[t]}return""}var ZV=KV("animationend"),zV=KV("transitionend"),JV=!!(ZV&&zV),mf=ZV||"animationend",Vf=zV||"transitionend";function vf(t,e){if(!t)return null;if($e(t)==="object"){var n=e.replace(/-\w/g,function(r){return r[1].toUpperCase()});return t[n]}return"".concat(t,"-").concat(e)}const uy=function(t){var e=T.useRef();function n(i){i&&(i.removeEventListener(Vf,t),i.removeEventListener(mf,t))}function r(i){e.current&&e.current!==i&&n(e.current),i&&i!==e.current&&(i.addEventListener(Vf,t),i.addEventListener(mf,t),e.current=i)}return c.useEffect(function(){return function(){n(e.current)}},[]),[r,n]};var WV=Qn()?T.useLayoutEffect:T.useEffect,XV=function(e){return+setTimeout(e,16)},_V=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(XV=function(e){return window.requestAnimationFrame(e)},_V=function(e){return window.cancelAnimationFrame(e)});var Cf=0,ks=new Map;function $V(t){ks.delete(t)}var Lt=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Cf+=1;var r=Cf;function i(o){if(o===0)$V(r),e();else{var A=XV(function(){i(o-1)});ks.set(r,A)}}return i(n),r};Lt.cancel=function(t){var e=ks.get(t);return $V(t),_V(e)};process.env.NODE_ENV!=="production"&&(Lt.ids=function(){return ks});const dy=function(){var t=c.useRef(null);function e(){Lt.cancel(t.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Lt(function(){i<=1?r({isCanceled:function(){return o!==t.current}}):n(r,i-1)});t.current=o}return c.useEffect(function(){return function(){e()}},[]),[n,e]};var gy=[Rr,yo,wo,Qd],fy=[Rr,YV],e0=!1,hy=!0;function t0(t){return t===wo||t===Qd}const py=function(t,e,n){var r=Do(hf),i=$(r,2),o=i[0],A=i[1],a=dy(),s=$(a,2),l=s[0],u=s[1];function d(){A(Rr,!0)}var g=e?fy:gy;return WV(function(){if(o!==hf&&o!==Qd){var p=g.indexOf(o),V=g[p+1],v=n(o);v===e0?A(V,!0):V&&l(function(m){function C(){m.isCanceled()||A(V,!0)}v===!0?C():Promise.resolve(v).then(C)})}},[t,o]),c.useEffect(function(){return function(){u()}},[]),[d,o]};function my(t,e,n,r){var i=r.motionEnter,o=i===void 0?!0:i,A=r.motionAppear,a=A===void 0?!0:A,s=r.motionLeave,l=s===void 0?!0:s,u=r.motionDeadline,d=r.motionLeaveImmediately,g=r.onAppearPrepare,p=r.onEnterPrepare,V=r.onLeavePrepare,v=r.onAppearStart,m=r.onEnterStart,C=r.onLeaveStart,w=r.onAppearActive,S=r.onEnterActive,M=r.onLeaveActive,I=r.onAppearEnd,f=r.onEnterEnd,R=r.onLeaveEnd,q=r.onVisibleChanged,E=Do(),h=$(E,2),y=h[0],x=h[1],b=ay(Ci),B=$(b,2),O=B[0],N=B[1],F=Do(null),j=$(F,2),Y=j[0],H=j[1],L=O(),G=T.useRef(!1),_=T.useRef(null);function K(){return n()}var J=T.useRef(!1);function z(){N(Ci),H(null,!0)}var te=nn(function(Qe){var ke=O();if(ke!==Ci){var Se=K();if(!(Qe&&!Qe.deadline&&Qe.target!==Se)){var pe=J.current,Me;ke===pa&&pe?Me=I==null?void 0:I(Se,Qe):ke===ma&&pe?Me=f==null?void 0:f(Se,Qe):ke===Va&&pe&&(Me=R==null?void 0:R(Se,Qe)),pe&&Me!==!1&&z()}}}),X=uy(te),Ae=$(X,1),le=Ae[0],ue=function(ke){switch(ke){case pa:return Q(Q(Q({},Rr,g),yo,v),wo,w);case ma:return Q(Q(Q({},Rr,p),yo,m),wo,S);case Va:return Q(Q(Q({},Rr,V),yo,C),wo,M);default:return{}}},ne=c.useMemo(function(){return ue(L)},[L]),me=py(L,!t,function(Qe){if(Qe===Rr){var ke=ne[Rr];return ke?ke(K()):e0}if(ce in ne){var Se;H(((Se=ne[ce])===null||Se===void 0?void 0:Se.call(ne,K(),null))||null)}return ce===wo&&L!==Ci&&(le(K()),u>0&&(clearTimeout(_.current),_.current=setTimeout(function(){te({deadline:!0})},u))),ce===YV&&z(),hy}),Z=$(me,2),de=Z[0],ce=Z[1],ye=t0(ce);J.current=ye;var Ie=T.useRef(null);WV(function(){if(!(G.current&&Ie.current===e)){x(e);var Qe=G.current;G.current=!0;var ke;!Qe&&e&&a&&(ke=pa),Qe&&e&&o&&(ke=ma),(Qe&&!e&&l||!Qe&&d&&!e&&l)&&(ke=Va);var Se=ue(ke);ke&&(t||Se[Rr])?(N(ke),de()):N(Ci),Ie.current=e}},[e]),T.useEffect(function(){(L===pa&&!a||L===ma&&!o||L===Va&&!l)&&N(Ci)},[a,o,l]),T.useEffect(function(){return function(){G.current=!1,clearTimeout(_.current)}},[]);var Ve=c.useRef(!1);T.useEffect(function(){y&&(Ve.current=!0),y!==void 0&&L===Ci&&((Ve.current||y)&&(q==null||q(y)),Ve.current=!0)},[y,L]);var Be=Y;return ne[Rr]&&ce===yo&&(Be=U({transition:"none"},Be)),[L,ce,Be,y??e]}function Vy(t){var e=t;$e(t)==="object"&&(e=t.transitionSupport);function n(i,o){return!!(i.motionName&&e&&o!==!1)}var r=c.forwardRef(function(i,o){var A=i.visible,a=A===void 0?!0:A,s=i.removeOnLeave,l=s===void 0?!0:s,u=i.forceRender,d=i.children,g=i.motionName,p=i.leavedClassName,V=i.eventProps,v=c.useContext(LV),m=v.motion,C=n(i,m),w=T.useRef(),S=T.useRef();function M(){try{return w.current instanceof HTMLElement?w.current:ja(S.current)}catch{return null}}var I=my(C,a,M,i),f=$(I,4),R=f[0],q=f[1],E=f[2],h=f[3],y=c.useRef(h);h&&(y.current=!0);var x=c.useCallback(function(j){w.current=j,Od(o,j)},[o]),b,B=U(U({},V),{},{visible:a});if(!d)b=null;else if(R===Ci)h?b=d(U({},B),x):!l&&y.current&&p?b=d(U(U({},B),{},{className:p}),x):u||!l&&!p?b=d(U(U({},B),{},{style:{display:"none"}}),x):b=null;else{var O;q===Rr?O="prepare":t0(q)?O="active":q===yo&&(O="start");var N=vf(g,"".concat(R,"-").concat(O));b=d(U(U({},B),{},{className:se(vf(g,R),Q(Q({},N,N&&O),g,typeof g=="string")),style:E}),x)}if(c.isValidElement(b)&&Qi(b)){var F=io(b);F||(b=c.cloneElement(b,{ref:x}))}return c.createElement(Ay,{ref:S},b)});return r.displayName="CSSMotion",r}const oo=Vy(JV);var jc="add",Pc="keep",Lc="remove",Ql="removed";function vy(t){var e;return t&&$e(t)==="object"&&"key"in t?e=t:e={key:t},U(U({},e),{},{key:String(e.key)})}function Yc(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(vy)}function Cy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=e.length,o=Yc(t),A=Yc(e);o.forEach(function(l){for(var u=!1,d=r;d<i;d+=1){var g=A[d];if(g.key===l.key){r<d&&(n=n.concat(A.slice(r,d).map(function(p){return U(U({},p),{},{status:jc})})),r=d),n.push(U(U({},g),{},{status:Pc})),r+=1,u=!0;break}}u||n.push(U(U({},l),{},{status:Lc}))}),r<i&&(n=n.concat(A.slice(r).map(function(l){return U(U({},l),{},{status:jc})})));var a={};n.forEach(function(l){var u=l.key;a[u]=(a[u]||0)+1});var s=Object.keys(a).filter(function(l){return a[l]>1});return s.forEach(function(l){n=n.filter(function(u){var d=u.key,g=u.status;return d!==l||g!==Lc}),n.forEach(function(u){u.key===l&&(u.status=Pc)})}),n}var qy=["component","children","onVisibleChanged","onAllRemoved"],Ey=["status"],yy=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function wy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oo,n=function(r){di(o,r);var i=gi(o);function o(){var A;fn(this,o);for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return A=i.call.apply(i,[this].concat(s)),Q(Rt(A),"state",{keyEntities:[]}),Q(Rt(A),"removeKey",function(u){A.setState(function(d){var g=d.keyEntities.map(function(p){return p.key!==u?p:U(U({},p),{},{status:Ql})});return{keyEntities:g}},function(){var d=A.state.keyEntities,g=d.filter(function(p){var V=p.status;return V!==Ql}).length;g===0&&A.props.onAllRemoved&&A.props.onAllRemoved()})}),A}return hn(o,[{key:"render",value:function(){var a=this,s=this.state.keyEntities,l=this.props,u=l.component,d=l.children,g=l.onVisibleChanged;l.onAllRemoved;var p=qt(l,qy),V=u||c.Fragment,v={};return yy.forEach(function(m){v[m]=p[m],delete p[m]}),delete p.keys,c.createElement(V,p,s.map(function(m,C){var w=m.status,S=qt(m,Ey),M=w===jc||w===Pc;return c.createElement(e,Fe({},v,{key:S.key,visible:M,eventProps:S,onVisibleChanged:function(f){g==null||g(f,{key:S.key}),f||a.removeKey(S.key)}}),function(I,f){return d(U(U({},I),{},{index:C}),f)})}))}}],[{key:"getDerivedStateFromProps",value:function(a,s){var l=a.keys,u=s.keyEntities,d=Yc(l),g=Cy(u,d);return{keyEntities:g.filter(function(p){var V=u.find(function(v){var m=v.key;return p.key===m});return!(V&&V.status===Ql&&p.status===Lc)})}}}]),o}(c.Component);return Q(n,"defaultProps",{component:"div"}),n}const Sy=wy(JV);function Iy(t){const{children:e}=t,[,n]=lr(),{motion:r}=n,i=c.useRef(!1);return i.current=i.current||r===!1,i.current?c.createElement(oy,{motion:r},e):e}const n0=c.memo(t=>{let{dropdownMatchSelectWidth:e}=t;return an("ConfigProvider").deprecated(e===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(n0.displayName="PropWarning");const by=process.env.NODE_ENV!=="production"?n0:()=>null;var My=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Hc=!1;const r0=process.env.NODE_ENV!=="production"?t=>{process.env.NODE_ENV!=="production"&&exports.warning$1(!Hc,t,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,Ry=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let os,i0,o0,A0;function Pa(){return os||RA}function xy(){return i0||Ns}function Ty(t){return Object.keys(t).some(e=>e.endsWith("Color"))}const By=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:i}=t;e!==void 0&&(os=e),n!==void 0&&(i0=n),"holderRender"in t&&(A0=i),r&&(Ty(r)?(process.env.NODE_ENV!=="production"&&exports.warning$1(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),zE(Pa(),r)):o0=r)},kd=()=>({getPrefixCls:(t,e)=>e||(t?`${Pa()}-${t}`:Pa()),getIconPrefixCls:xy,getRootPrefixCls:()=>os||Pa(),getTheme:()=>o0,holderRender:A0}),Oy=t=>{const{children:e,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:A,locale:a,componentSize:s,direction:l,space:u,splitter:d,virtual:g,dropdownMatchSelectWidth:p,popupMatchSelectWidth:V,popupOverflow:v,legacyLocale:m,parentContext:C,iconPrefixCls:w,theme:S,componentDisabled:M,segmented:I,statistic:f,spin:R,calendar:q,carousel:E,cascader:h,collapse:y,typography:x,checkbox:b,descriptions:B,divider:O,drawer:N,skeleton:F,steps:j,image:Y,layout:H,list:L,mentions:G,modal:_,progress:K,result:J,slider:z,breadcrumb:te,menu:X,pagination:Ae,input:le,textArea:ue,empty:ne,badge:me,radio:Z,rate:de,switch:ce,transfer:ye,avatar:Ie,message:Ve,tag:Be,table:Qe,card:ke,tabs:Se,timeline:pe,timePicker:Me,upload:Le,notification:et,tree:nt,colorPicker:je,datePicker:Ee,rangePicker:We,flex:ct,wave:_e,dropdown:Oe,warning:Re,tour:At,tooltip:at,popover:vt,popconfirm:Tt,floatButtonGroup:Wt,variant:Jt,inputNumber:en,treeSelect:Xt}=t,Yt=c.useCallback((Ue,D)=>{const{prefixCls:fe}=t;if(D)return D;const k=fe||C.getPrefixCls("");return Ue?`${k}-${Ue}`:k},[C.getPrefixCls,t.prefixCls]),Mt=w||C.iconPrefixCls||Ns,pt=n||C.csp;kE(Mt,pt);const He=ey(S,C.theme,{prefixCls:Yt("")});process.env.NODE_ENV!=="production"&&(Hc=Hc||!!He);const Xe={csp:pt,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:a||m,direction:l,space:u,splitter:d,virtual:g,popupMatchSelectWidth:V??p,popupOverflow:v,getPrefixCls:Yt,iconPrefixCls:Mt,theme:He,segmented:I,statistic:f,spin:R,calendar:q,carousel:E,cascader:h,collapse:y,typography:x,checkbox:b,descriptions:B,divider:O,drawer:N,skeleton:F,steps:j,image:Y,input:le,textArea:ue,layout:H,list:L,mentions:G,modal:_,progress:K,result:J,slider:z,breadcrumb:te,menu:X,pagination:Ae,empty:ne,badge:me,radio:Z,rate:de,switch:ce,transfer:ye,avatar:Ie,message:Ve,tag:Be,table:Qe,card:ke,tabs:Se,timeline:pe,timePicker:Me,upload:Le,notification:et,tree:nt,colorPicker:je,datePicker:Ee,rangePicker:We,flex:ct,wave:_e,dropdown:Oe,warning:Re,tour:At,tooltip:at,popover:vt,popconfirm:Tt,floatButtonGroup:Wt,variant:Jt,inputNumber:en,treeSelect:Xt};process.env.NODE_ENV!=="production"&&an("ConfigProvider")(!("autoInsertSpaceInButton"in t),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const xe=Object.assign({},C);Object.keys(Xe).forEach(Ue=>{Xe[Ue]!==void 0&&(xe[Ue]=Xe[Ue])}),Ry.forEach(Ue=>{const D=t[Ue];D&&(xe[Ue]=D)}),typeof r<"u"&&(xe.button=Object.assign({autoInsertSpace:r},xe.button));const it=HA(()=>xe,xe,(Ue,D)=>{const fe=Object.keys(Ue),k=Object.keys(D);return fe.length!==k.length||fe.some(ae=>Ue[ae]!==D[ae])}),{layer:mt}=c.useContext(KA),De=c.useMemo(()=>({prefixCls:Mt,csp:pt,layer:mt?"antd":void 0}),[Mt,pt,mt]);let we=c.createElement(c.Fragment,null,c.createElement(by,{dropdownMatchSelectWidth:p}),e);const Ye=c.useMemo(()=>{var Ue,D,fe,k;return Eo(((Ue=eo.Form)===null||Ue===void 0?void 0:Ue.defaultValidateMessages)||{},((fe=(D=it.locale)===null||D===void 0?void 0:D.Form)===null||fe===void 0?void 0:fe.defaultValidateMessages)||{},((k=it.form)===null||k===void 0?void 0:k.validateMessages)||{},(A==null?void 0:A.validateMessages)||{})},[it,A==null?void 0:A.validateMessages]);Object.keys(Ye).length>0&&(we=c.createElement(GE.Provider,{value:Ye},we)),a&&(we=c.createElement(jV,{locale:a,_ANT_MARK__:GV},we)),we=c.createElement(Nd.Provider,{value:De},we),s&&(we=c.createElement(JE,{size:s},we)),we=c.createElement(Iy,null,we);const Ke=c.useMemo(()=>{const Ue=He||{},{algorithm:D,token:fe,components:k,cssVar:ae}=Ue,ee=My(Ue,["algorithm","token","components","cssVar"]),Ce=D&&(!Array.isArray(D)||D.length>0)?qc(D):RV,ze={};Object.entries(k||{}).forEach(Dt=>{let[gt,yt]=Dt;const qe=Object.assign({},yt);"algorithm"in qe&&(qe.algorithm===!0?qe.theme=Ce:(Array.isArray(qe.algorithm)||typeof qe.algorithm=="function")&&(qe.theme=qc(qe.algorithm)),delete qe.algorithm),ze[gt]=qe});const tt=Object.assign(Object.assign({},bA),fe);return Object.assign(Object.assign({},ee),{theme:Ce,token:tt,components:ze,override:Object.assign({override:tt},ze),cssVar:ae})},[He]);return S&&(we=c.createElement(xV.Provider,{value:Ke},we)),it.warning&&(we=c.createElement(kV.Provider,{value:it.warning},we)),M!==void 0&&(we=c.createElement(PV,{disabled:M},we)),c.createElement(Qt.Provider,{value:it},we)},Wr=t=>{const e=c.useContext(Qt),n=c.useContext(Fd);return c.createElement(Oy,Object.assign({parentContext:e,legacyLocale:n},t))};Wr.ConfigContext=Qt;Wr.SizeContext=No;Wr.config=By;Wr.useConfig=WE;Object.defineProperty(Wr,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&exports.warning$1(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),No)});process.env.NODE_ENV!=="production"&&(Wr.displayName="ConfigProvider");var Ca={exports:{}},nA={};/**
|
|
64
|
+
*/var ff;function ty(){return ff||(ff=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",A=0;A<arguments.length;A++){var a=arguments[A];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var A="";for(var a in o)e.call(o,a)&&o[a]&&(A=i(A,a));return A}function i(o,A){return A?o?o+" "+A:o+A:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(Fl)),Fl.exports}var ny=ty();const se=Wq(ny);function xA(t){return t instanceof HTMLElement||t instanceof SVGElement}function ry(t){return t&&$e(t)==="object"&&xA(t.nativeElement)?t.nativeElement:xA(t)?t:null}function ja(t){var e=ry(t);if(e)return e;if(t instanceof T.Component){var n;return(n=zr.findDOMNode)===null||n===void 0?void 0:n.call(zr,t)}return null}var iy=["children"],LV=c.createContext({});function oy(t){var e=t.children,n=qt(t,iy);return c.createElement(LV.Provider,{value:n},e)}var Ay=function(t){di(n,t);var e=gi(n);function n(){return fn(this,n),e.apply(this,arguments)}return hn(n,[{key:"render",value:function(){return this.props.children}}]),n}(c.Component);function ay(t){var e=c.useReducer(function(a){return a+1},0),n=$(e,2),r=n[1],i=c.useRef(t),o=nn(function(){return i.current}),A=nn(function(a){i.current=typeof a=="function"?a(i.current):a,r()});return[o,A]}var Ci="none",pa="appear",ma="enter",Va="leave",hf="none",Rr="prepare",yo="start",wo="active",Qd="end",YV="prepared";function pf(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function sy(t,e){var n={animationend:pf("Animation","AnimationEnd"),transitionend:pf("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var ly=sy(Qn(),typeof window<"u"?window:{}),HV={};if(Qn()){var cy=document.createElement("div");HV=cy.style}var va={};function KV(t){if(va[t])return va[t];var e=ly[t];if(e)for(var n=Object.keys(e),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(e,o)&&o in HV)return va[t]=e[o],va[t]}return""}var ZV=KV("animationend"),zV=KV("transitionend"),JV=!!(ZV&&zV),mf=ZV||"animationend",Vf=zV||"transitionend";function vf(t,e){if(!t)return null;if($e(t)==="object"){var n=e.replace(/-\w/g,function(r){return r[1].toUpperCase()});return t[n]}return"".concat(t,"-").concat(e)}const uy=function(t){var e=T.useRef();function n(i){i&&(i.removeEventListener(Vf,t),i.removeEventListener(mf,t))}function r(i){e.current&&e.current!==i&&n(e.current),i&&i!==e.current&&(i.addEventListener(Vf,t),i.addEventListener(mf,t),e.current=i)}return c.useEffect(function(){return function(){n(e.current)}},[]),[r,n]};var WV=Qn()?T.useLayoutEffect:T.useEffect,XV=function(e){return+setTimeout(e,16)},_V=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(XV=function(e){return window.requestAnimationFrame(e)},_V=function(e){return window.cancelAnimationFrame(e)});var Cf=0,ks=new Map;function $V(t){ks.delete(t)}var Lt=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Cf+=1;var r=Cf;function i(o){if(o===0)$V(r),e();else{var A=XV(function(){i(o-1)});ks.set(r,A)}}return i(n),r};Lt.cancel=function(t){var e=ks.get(t);return $V(t),_V(e)};process.env.NODE_ENV!=="production"&&(Lt.ids=function(){return ks});const dy=function(){var t=c.useRef(null);function e(){Lt.cancel(t.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Lt(function(){i<=1?r({isCanceled:function(){return o!==t.current}}):n(r,i-1)});t.current=o}return c.useEffect(function(){return function(){e()}},[]),[n,e]};var gy=[Rr,yo,wo,Qd],fy=[Rr,YV],e0=!1,hy=!0;function t0(t){return t===wo||t===Qd}const py=function(t,e,n){var r=Do(hf),i=$(r,2),o=i[0],A=i[1],a=dy(),s=$(a,2),l=s[0],u=s[1];function d(){A(Rr,!0)}var g=e?fy:gy;return WV(function(){if(o!==hf&&o!==Qd){var p=g.indexOf(o),V=g[p+1],v=n(o);v===e0?A(V,!0):V&&l(function(m){function C(){m.isCanceled()||A(V,!0)}v===!0?C():Promise.resolve(v).then(C)})}},[t,o]),c.useEffect(function(){return function(){u()}},[]),[d,o]};function my(t,e,n,r){var i=r.motionEnter,o=i===void 0?!0:i,A=r.motionAppear,a=A===void 0?!0:A,s=r.motionLeave,l=s===void 0?!0:s,u=r.motionDeadline,d=r.motionLeaveImmediately,g=r.onAppearPrepare,p=r.onEnterPrepare,V=r.onLeavePrepare,v=r.onAppearStart,m=r.onEnterStart,C=r.onLeaveStart,w=r.onAppearActive,S=r.onEnterActive,M=r.onLeaveActive,I=r.onAppearEnd,f=r.onEnterEnd,R=r.onLeaveEnd,q=r.onVisibleChanged,E=Do(),h=$(E,2),y=h[0],x=h[1],b=ay(Ci),B=$(b,2),O=B[0],N=B[1],F=Do(null),j=$(F,2),Y=j[0],H=j[1],L=O(),G=T.useRef(!1),_=T.useRef(null);function K(){return n()}var W=T.useRef(!1);function z(){N(Ci),H(null,!0)}var te=nn(function(Qe){var ke=O();if(ke!==Ci){var Se=K();if(!(Qe&&!Qe.deadline&&Qe.target!==Se)){var pe=W.current,Me;ke===pa&&pe?Me=I==null?void 0:I(Se,Qe):ke===ma&&pe?Me=f==null?void 0:f(Se,Qe):ke===Va&&pe&&(Me=R==null?void 0:R(Se,Qe)),pe&&Me!==!1&&z()}}}),X=uy(te),Ae=$(X,1),le=Ae[0],ue=function(ke){switch(ke){case pa:return Q(Q(Q({},Rr,g),yo,v),wo,w);case ma:return Q(Q(Q({},Rr,p),yo,m),wo,S);case Va:return Q(Q(Q({},Rr,V),yo,C),wo,M);default:return{}}},ne=c.useMemo(function(){return ue(L)},[L]),me=py(L,!t,function(Qe){if(Qe===Rr){var ke=ne[Rr];return ke?ke(K()):e0}if(ce in ne){var Se;H(((Se=ne[ce])===null||Se===void 0?void 0:Se.call(ne,K(),null))||null)}return ce===wo&&L!==Ci&&(le(K()),u>0&&(clearTimeout(_.current),_.current=setTimeout(function(){te({deadline:!0})},u))),ce===YV&&z(),hy}),Z=$(me,2),de=Z[0],ce=Z[1],ye=t0(ce);W.current=ye;var Ie=T.useRef(null);WV(function(){if(!(G.current&&Ie.current===e)){x(e);var Qe=G.current;G.current=!0;var ke;!Qe&&e&&a&&(ke=pa),Qe&&e&&o&&(ke=ma),(Qe&&!e&&l||!Qe&&d&&!e&&l)&&(ke=Va);var Se=ue(ke);ke&&(t||Se[Rr])?(N(ke),de()):N(Ci),Ie.current=e}},[e]),T.useEffect(function(){(L===pa&&!a||L===ma&&!o||L===Va&&!l)&&N(Ci)},[a,o,l]),T.useEffect(function(){return function(){G.current=!1,clearTimeout(_.current)}},[]);var Ve=c.useRef(!1);T.useEffect(function(){y&&(Ve.current=!0),y!==void 0&&L===Ci&&((Ve.current||y)&&(q==null||q(y)),Ve.current=!0)},[y,L]);var Be=Y;return ne[Rr]&&ce===yo&&(Be=U({transition:"none"},Be)),[L,ce,Be,y??e]}function Vy(t){var e=t;$e(t)==="object"&&(e=t.transitionSupport);function n(i,o){return!!(i.motionName&&e&&o!==!1)}var r=c.forwardRef(function(i,o){var A=i.visible,a=A===void 0?!0:A,s=i.removeOnLeave,l=s===void 0?!0:s,u=i.forceRender,d=i.children,g=i.motionName,p=i.leavedClassName,V=i.eventProps,v=c.useContext(LV),m=v.motion,C=n(i,m),w=T.useRef(),S=T.useRef();function M(){try{return w.current instanceof HTMLElement?w.current:ja(S.current)}catch{return null}}var I=my(C,a,M,i),f=$(I,4),R=f[0],q=f[1],E=f[2],h=f[3],y=c.useRef(h);h&&(y.current=!0);var x=c.useCallback(function(j){w.current=j,Od(o,j)},[o]),b,B=U(U({},V),{},{visible:a});if(!d)b=null;else if(R===Ci)h?b=d(U({},B),x):!l&&y.current&&p?b=d(U(U({},B),{},{className:p}),x):u||!l&&!p?b=d(U(U({},B),{},{style:{display:"none"}}),x):b=null;else{var O;q===Rr?O="prepare":t0(q)?O="active":q===yo&&(O="start");var N=vf(g,"".concat(R,"-").concat(O));b=d(U(U({},B),{},{className:se(vf(g,R),Q(Q({},N,N&&O),g,typeof g=="string")),style:E}),x)}if(c.isValidElement(b)&&Qi(b)){var F=io(b);F||(b=c.cloneElement(b,{ref:x}))}return c.createElement(Ay,{ref:S},b)});return r.displayName="CSSMotion",r}const oo=Vy(JV);var jc="add",Pc="keep",Lc="remove",Ql="removed";function vy(t){var e;return t&&$e(t)==="object"&&"key"in t?e=t:e={key:t},U(U({},e),{},{key:String(e.key)})}function Yc(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(vy)}function Cy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=e.length,o=Yc(t),A=Yc(e);o.forEach(function(l){for(var u=!1,d=r;d<i;d+=1){var g=A[d];if(g.key===l.key){r<d&&(n=n.concat(A.slice(r,d).map(function(p){return U(U({},p),{},{status:jc})})),r=d),n.push(U(U({},g),{},{status:Pc})),r+=1,u=!0;break}}u||n.push(U(U({},l),{},{status:Lc}))}),r<i&&(n=n.concat(A.slice(r).map(function(l){return U(U({},l),{},{status:jc})})));var a={};n.forEach(function(l){var u=l.key;a[u]=(a[u]||0)+1});var s=Object.keys(a).filter(function(l){return a[l]>1});return s.forEach(function(l){n=n.filter(function(u){var d=u.key,g=u.status;return d!==l||g!==Lc}),n.forEach(function(u){u.key===l&&(u.status=Pc)})}),n}var qy=["component","children","onVisibleChanged","onAllRemoved"],Ey=["status"],yy=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function wy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oo,n=function(r){di(o,r);var i=gi(o);function o(){var A;fn(this,o);for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return A=i.call.apply(i,[this].concat(s)),Q(Rt(A),"state",{keyEntities:[]}),Q(Rt(A),"removeKey",function(u){A.setState(function(d){var g=d.keyEntities.map(function(p){return p.key!==u?p:U(U({},p),{},{status:Ql})});return{keyEntities:g}},function(){var d=A.state.keyEntities,g=d.filter(function(p){var V=p.status;return V!==Ql}).length;g===0&&A.props.onAllRemoved&&A.props.onAllRemoved()})}),A}return hn(o,[{key:"render",value:function(){var a=this,s=this.state.keyEntities,l=this.props,u=l.component,d=l.children,g=l.onVisibleChanged;l.onAllRemoved;var p=qt(l,qy),V=u||c.Fragment,v={};return yy.forEach(function(m){v[m]=p[m],delete p[m]}),delete p.keys,c.createElement(V,p,s.map(function(m,C){var w=m.status,S=qt(m,Ey),M=w===jc||w===Pc;return c.createElement(e,Fe({},v,{key:S.key,visible:M,eventProps:S,onVisibleChanged:function(f){g==null||g(f,{key:S.key}),f||a.removeKey(S.key)}}),function(I,f){return d(U(U({},I),{},{index:C}),f)})}))}}],[{key:"getDerivedStateFromProps",value:function(a,s){var l=a.keys,u=s.keyEntities,d=Yc(l),g=Cy(u,d);return{keyEntities:g.filter(function(p){var V=u.find(function(v){var m=v.key;return p.key===m});return!(V&&V.status===Ql&&p.status===Lc)})}}}]),o}(c.Component);return Q(n,"defaultProps",{component:"div"}),n}const Sy=wy(JV);function Iy(t){const{children:e}=t,[,n]=lr(),{motion:r}=n,i=c.useRef(!1);return i.current=i.current||r===!1,i.current?c.createElement(oy,{motion:r},e):e}const n0=c.memo(t=>{let{dropdownMatchSelectWidth:e}=t;return an("ConfigProvider").deprecated(e===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(n0.displayName="PropWarning");const by=process.env.NODE_ENV!=="production"?n0:()=>null;var My=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Hc=!1;const r0=process.env.NODE_ENV!=="production"?t=>{process.env.NODE_ENV!=="production"&&exports.warning$1(!Hc,t,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,Ry=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let os,i0,o0,A0;function Pa(){return os||RA}function xy(){return i0||Ns}function Ty(t){return Object.keys(t).some(e=>e.endsWith("Color"))}const By=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:i}=t;e!==void 0&&(os=e),n!==void 0&&(i0=n),"holderRender"in t&&(A0=i),r&&(Ty(r)?(process.env.NODE_ENV!=="production"&&exports.warning$1(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),zE(Pa(),r)):o0=r)},kd=()=>({getPrefixCls:(t,e)=>e||(t?`${Pa()}-${t}`:Pa()),getIconPrefixCls:xy,getRootPrefixCls:()=>os||Pa(),getTheme:()=>o0,holderRender:A0}),Oy=t=>{const{children:e,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:A,locale:a,componentSize:s,direction:l,space:u,splitter:d,virtual:g,dropdownMatchSelectWidth:p,popupMatchSelectWidth:V,popupOverflow:v,legacyLocale:m,parentContext:C,iconPrefixCls:w,theme:S,componentDisabled:M,segmented:I,statistic:f,spin:R,calendar:q,carousel:E,cascader:h,collapse:y,typography:x,checkbox:b,descriptions:B,divider:O,drawer:N,skeleton:F,steps:j,image:Y,layout:H,list:L,mentions:G,modal:_,progress:K,result:W,slider:z,breadcrumb:te,menu:X,pagination:Ae,input:le,textArea:ue,empty:ne,badge:me,radio:Z,rate:de,switch:ce,transfer:ye,avatar:Ie,message:Ve,tag:Be,table:Qe,card:ke,tabs:Se,timeline:pe,timePicker:Me,upload:Le,notification:et,tree:nt,colorPicker:je,datePicker:Ee,rangePicker:We,flex:ct,wave:_e,dropdown:Oe,warning:Re,tour:At,tooltip:at,popover:vt,popconfirm:Tt,floatButtonGroup:Wt,variant:Jt,inputNumber:en,treeSelect:Xt}=t,Yt=c.useCallback((Ue,D)=>{const{prefixCls:fe}=t;if(D)return D;const k=fe||C.getPrefixCls("");return Ue?`${k}-${Ue}`:k},[C.getPrefixCls,t.prefixCls]),Mt=w||C.iconPrefixCls||Ns,pt=n||C.csp;kE(Mt,pt);const He=ey(S,C.theme,{prefixCls:Yt("")});process.env.NODE_ENV!=="production"&&(Hc=Hc||!!He);const Xe={csp:pt,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:a||m,direction:l,space:u,splitter:d,virtual:g,popupMatchSelectWidth:V??p,popupOverflow:v,getPrefixCls:Yt,iconPrefixCls:Mt,theme:He,segmented:I,statistic:f,spin:R,calendar:q,carousel:E,cascader:h,collapse:y,typography:x,checkbox:b,descriptions:B,divider:O,drawer:N,skeleton:F,steps:j,image:Y,input:le,textArea:ue,layout:H,list:L,mentions:G,modal:_,progress:K,result:W,slider:z,breadcrumb:te,menu:X,pagination:Ae,empty:ne,badge:me,radio:Z,rate:de,switch:ce,transfer:ye,avatar:Ie,message:Ve,tag:Be,table:Qe,card:ke,tabs:Se,timeline:pe,timePicker:Me,upload:Le,notification:et,tree:nt,colorPicker:je,datePicker:Ee,rangePicker:We,flex:ct,wave:_e,dropdown:Oe,warning:Re,tour:At,tooltip:at,popover:vt,popconfirm:Tt,floatButtonGroup:Wt,variant:Jt,inputNumber:en,treeSelect:Xt};process.env.NODE_ENV!=="production"&&an("ConfigProvider")(!("autoInsertSpaceInButton"in t),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const xe=Object.assign({},C);Object.keys(Xe).forEach(Ue=>{Xe[Ue]!==void 0&&(xe[Ue]=Xe[Ue])}),Ry.forEach(Ue=>{const D=t[Ue];D&&(xe[Ue]=D)}),typeof r<"u"&&(xe.button=Object.assign({autoInsertSpace:r},xe.button));const it=HA(()=>xe,xe,(Ue,D)=>{const fe=Object.keys(Ue),k=Object.keys(D);return fe.length!==k.length||fe.some(ae=>Ue[ae]!==D[ae])}),{layer:mt}=c.useContext(KA),De=c.useMemo(()=>({prefixCls:Mt,csp:pt,layer:mt?"antd":void 0}),[Mt,pt,mt]);let we=c.createElement(c.Fragment,null,c.createElement(by,{dropdownMatchSelectWidth:p}),e);const Ye=c.useMemo(()=>{var Ue,D,fe,k;return Eo(((Ue=eo.Form)===null||Ue===void 0?void 0:Ue.defaultValidateMessages)||{},((fe=(D=it.locale)===null||D===void 0?void 0:D.Form)===null||fe===void 0?void 0:fe.defaultValidateMessages)||{},((k=it.form)===null||k===void 0?void 0:k.validateMessages)||{},(A==null?void 0:A.validateMessages)||{})},[it,A==null?void 0:A.validateMessages]);Object.keys(Ye).length>0&&(we=c.createElement(GE.Provider,{value:Ye},we)),a&&(we=c.createElement(jV,{locale:a,_ANT_MARK__:GV},we)),we=c.createElement(Nd.Provider,{value:De},we),s&&(we=c.createElement(JE,{size:s},we)),we=c.createElement(Iy,null,we);const Ke=c.useMemo(()=>{const Ue=He||{},{algorithm:D,token:fe,components:k,cssVar:ae}=Ue,ee=My(Ue,["algorithm","token","components","cssVar"]),Ce=D&&(!Array.isArray(D)||D.length>0)?qc(D):RV,ze={};Object.entries(k||{}).forEach(Dt=>{let[gt,yt]=Dt;const qe=Object.assign({},yt);"algorithm"in qe&&(qe.algorithm===!0?qe.theme=Ce:(Array.isArray(qe.algorithm)||typeof qe.algorithm=="function")&&(qe.theme=qc(qe.algorithm)),delete qe.algorithm),ze[gt]=qe});const tt=Object.assign(Object.assign({},bA),fe);return Object.assign(Object.assign({},ee),{theme:Ce,token:tt,components:ze,override:Object.assign({override:tt},ze),cssVar:ae})},[He]);return S&&(we=c.createElement(xV.Provider,{value:Ke},we)),it.warning&&(we=c.createElement(kV.Provider,{value:it.warning},we)),M!==void 0&&(we=c.createElement(PV,{disabled:M},we)),c.createElement(Qt.Provider,{value:it},we)},Wr=t=>{const e=c.useContext(Qt),n=c.useContext(Fd);return c.createElement(Oy,Object.assign({parentContext:e,legacyLocale:n},t))};Wr.ConfigContext=Qt;Wr.SizeContext=No;Wr.config=By;Wr.useConfig=WE;Object.defineProperty(Wr,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&exports.warning$1(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),No)});process.env.NODE_ENV!=="production"&&(Wr.displayName="ConfigProvider");var Ca={exports:{}},nA={};/**
|
|
65
65
|
* @license React
|
|
66
66
|
* react-jsx-runtime.production.min.js
|
|
67
67
|
*
|
|
@@ -77,11 +77,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the MIT license found in the
|
|
79
79
|
* LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/var Ef;function Ny(){return Ef||(Ef=1,process.env.NODE_ENV!=="production"&&function(){var t=T,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),V=Symbol.iterator,v="@@iterator";function m(D){if(D===null||typeof D!="object")return null;var fe=V&&D[V]||D[v];return typeof fe=="function"?fe:null}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(D){{for(var fe=arguments.length,k=new Array(fe>1?fe-1:0),ae=1;ae<fe;ae++)k[ae-1]=arguments[ae];S("error",D,k)}}function S(D,fe,k){{var ae=C.ReactDebugCurrentFrame,ee=ae.getStackAddendum();ee!==""&&(fe+="%s",k=k.concat([ee]));var Ce=k.map(function(ze){return String(ze)});Ce.unshift("Warning: "+fe),Function.prototype.apply.call(console[D],console,Ce)}}var M=!1,I=!1,f=!1,R=!1,q=!1,E;E=Symbol.for("react.module.reference");function h(D){return!!(typeof D=="string"||typeof D=="function"||D===r||D===o||q||D===i||D===l||D===u||R||D===p||M||I||f||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===d||D.$$typeof===A||D.$$typeof===a||D.$$typeof===s||D.$$typeof===E||D.getModuleId!==void 0))}function y(D,fe,k){var ae=D.displayName;if(ae)return ae;var ee=fe.displayName||fe.name||"";return ee!==""?k+"("+ee+")":k}function x(D){return D.displayName||"Context"}function b(D){if(D==null)return null;if(typeof D.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof D=="function")return D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof D=="object")switch(D.$$typeof){case a:var fe=D;return x(fe)+".Consumer";case A:var k=D;return x(k._context)+".Provider";case s:return y(D,D.render,"ForwardRef");case d:var ae=D.displayName||null;return ae!==null?ae:b(D.type)||"Memo";case g:{var ee=D,Ce=ee._payload,ze=ee._init;try{return b(ze(Ce))}catch{return null}}}return null}var B=Object.assign,O=0,N,F,j,Y,H,L,G;function _(){}_.__reactDisabledLog=!0;function K(){{if(O===0){N=console.log,F=console.info,j=console.warn,Y=console.error,H=console.group,L=console.groupCollapsed,G=console.groupEnd;var D={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:D,log:D,warn:D,error:D,group:D,groupCollapsed:D,groupEnd:D})}O++}}function
|
|
80
|
+
*/var Ef;function Ny(){return Ef||(Ef=1,process.env.NODE_ENV!=="production"&&function(){var t=T,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),V=Symbol.iterator,v="@@iterator";function m(D){if(D===null||typeof D!="object")return null;var fe=V&&D[V]||D[v];return typeof fe=="function"?fe:null}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(D){{for(var fe=arguments.length,k=new Array(fe>1?fe-1:0),ae=1;ae<fe;ae++)k[ae-1]=arguments[ae];S("error",D,k)}}function S(D,fe,k){{var ae=C.ReactDebugCurrentFrame,ee=ae.getStackAddendum();ee!==""&&(fe+="%s",k=k.concat([ee]));var Ce=k.map(function(ze){return String(ze)});Ce.unshift("Warning: "+fe),Function.prototype.apply.call(console[D],console,Ce)}}var M=!1,I=!1,f=!1,R=!1,q=!1,E;E=Symbol.for("react.module.reference");function h(D){return!!(typeof D=="string"||typeof D=="function"||D===r||D===o||q||D===i||D===l||D===u||R||D===p||M||I||f||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===d||D.$$typeof===A||D.$$typeof===a||D.$$typeof===s||D.$$typeof===E||D.getModuleId!==void 0))}function y(D,fe,k){var ae=D.displayName;if(ae)return ae;var ee=fe.displayName||fe.name||"";return ee!==""?k+"("+ee+")":k}function x(D){return D.displayName||"Context"}function b(D){if(D==null)return null;if(typeof D.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof D=="function")return D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof D=="object")switch(D.$$typeof){case a:var fe=D;return x(fe)+".Consumer";case A:var k=D;return x(k._context)+".Provider";case s:return y(D,D.render,"ForwardRef");case d:var ae=D.displayName||null;return ae!==null?ae:b(D.type)||"Memo";case g:{var ee=D,Ce=ee._payload,ze=ee._init;try{return b(ze(Ce))}catch{return null}}}return null}var B=Object.assign,O=0,N,F,j,Y,H,L,G;function _(){}_.__reactDisabledLog=!0;function K(){{if(O===0){N=console.log,F=console.info,j=console.warn,Y=console.error,H=console.group,L=console.groupCollapsed,G=console.groupEnd;var D={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:D,log:D,warn:D,error:D,group:D,groupCollapsed:D,groupEnd:D})}O++}}function W(){{if(O--,O===0){var D={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},D,{value:N}),info:B({},D,{value:F}),warn:B({},D,{value:j}),error:B({},D,{value:Y}),group:B({},D,{value:H}),groupCollapsed:B({},D,{value:L}),groupEnd:B({},D,{value:G})})}O<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=C.ReactCurrentDispatcher,te;function X(D,fe,k){{if(te===void 0)try{throw Error()}catch(ee){var ae=ee.stack.trim().match(/\n( *(at )?)/);te=ae&&ae[1]||""}return`
|
|
81
81
|
`+te+D}}var Ae=!1,le;{var ue=typeof WeakMap=="function"?WeakMap:Map;le=new ue}function ne(D,fe){if(!D||Ae)return"";{var k=le.get(D);if(k!==void 0)return k}var ae;Ae=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ce;Ce=z.current,z.current=null,K();try{if(fe){var ze=function(){throw Error()};if(Object.defineProperty(ze.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ze,[])}catch(ut){ae=ut}Reflect.construct(D,[],ze)}else{try{ze.call()}catch(ut){ae=ut}D.call(ze.prototype)}}else{try{throw Error()}catch(ut){ae=ut}D()}}catch(ut){if(ut&&ae&&typeof ut.stack=="string"){for(var tt=ut.stack.split(`
|
|
82
82
|
`),Dt=ae.stack.split(`
|
|
83
83
|
`),gt=tt.length-1,yt=Dt.length-1;gt>=1&&yt>=0&&tt[gt]!==Dt[yt];)yt--;for(;gt>=1&&yt>=0;gt--,yt--)if(tt[gt]!==Dt[yt]){if(gt!==1||yt!==1)do if(gt--,yt--,yt<0||tt[gt]!==Dt[yt]){var qe=`
|
|
84
|
-
`+tt[gt].replace(" at new "," at ");return D.displayName&&qe.includes("<anonymous>")&&(qe=qe.replace("<anonymous>",D.displayName)),typeof D=="function"&&le.set(D,qe),qe}while(gt>=1&&yt>=0);break}}}finally{Ae=!1,z.current=Ce,
|
|
84
|
+
`+tt[gt].replace(" at new "," at ");return D.displayName&&qe.includes("<anonymous>")&&(qe=qe.replace("<anonymous>",D.displayName)),typeof D=="function"&&le.set(D,qe),qe}while(gt>=1&&yt>=0);break}}}finally{Ae=!1,z.current=Ce,W(),Error.prepareStackTrace=ee}var Te=D?D.displayName||D.name:"",st=Te?X(Te):"";return typeof D=="function"&&le.set(D,st),st}function me(D,fe,k){return ne(D,!1)}function Z(D){var fe=D.prototype;return!!(fe&&fe.isReactComponent)}function de(D,fe,k){if(D==null)return"";if(typeof D=="function")return ne(D,Z(D));if(typeof D=="string")return X(D);switch(D){case l:return X("Suspense");case u:return X("SuspenseList")}if(typeof D=="object")switch(D.$$typeof){case s:return me(D.render);case d:return de(D.type,fe,k);case g:{var ae=D,ee=ae._payload,Ce=ae._init;try{return de(Ce(ee),fe,k)}catch{}}}return""}var ce=Object.prototype.hasOwnProperty,ye={},Ie=C.ReactDebugCurrentFrame;function Ve(D){if(D){var fe=D._owner,k=de(D.type,D._source,fe?fe.type:null);Ie.setExtraStackFrame(k)}else Ie.setExtraStackFrame(null)}function Be(D,fe,k,ae,ee){{var Ce=Function.call.bind(ce);for(var ze in D)if(Ce(D,ze)){var tt=void 0;try{if(typeof D[ze]!="function"){var Dt=Error((ae||"React class")+": "+k+" type `"+ze+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof D[ze]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Dt.name="Invariant Violation",Dt}tt=D[ze](fe,ze,ae,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(gt){tt=gt}tt&&!(tt instanceof Error)&&(Ve(ee),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ae||"React class",k,ze,typeof tt),Ve(null)),tt instanceof Error&&!(tt.message in ye)&&(ye[tt.message]=!0,Ve(ee),w("Failed %s type: %s",k,tt.message),Ve(null))}}}var Qe=Array.isArray;function ke(D){return Qe(D)}function Se(D){{var fe=typeof Symbol=="function"&&Symbol.toStringTag,k=fe&&D[Symbol.toStringTag]||D.constructor.name||"Object";return k}}function pe(D){try{return Me(D),!1}catch{return!0}}function Me(D){return""+D}function Le(D){if(pe(D))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Se(D)),Me(D)}var et=C.ReactCurrentOwner,nt={key:!0,ref:!0,__self:!0,__source:!0},je,Ee;function We(D){if(ce.call(D,"ref")){var fe=Object.getOwnPropertyDescriptor(D,"ref").get;if(fe&&fe.isReactWarning)return!1}return D.ref!==void 0}function ct(D){if(ce.call(D,"key")){var fe=Object.getOwnPropertyDescriptor(D,"key").get;if(fe&&fe.isReactWarning)return!1}return D.key!==void 0}function _e(D,fe){typeof D.ref=="string"&&et.current}function Oe(D,fe){{var k=function(){je||(je=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",fe))};k.isReactWarning=!0,Object.defineProperty(D,"key",{get:k,configurable:!0})}}function Re(D,fe){{var k=function(){Ee||(Ee=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",fe))};k.isReactWarning=!0,Object.defineProperty(D,"ref",{get:k,configurable:!0})}}var At=function(D,fe,k,ae,ee,Ce,ze){var tt={$$typeof:e,type:D,key:fe,ref:k,props:ze,_owner:Ce};return tt._store={},Object.defineProperty(tt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(tt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ae}),Object.defineProperty(tt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(tt.props),Object.freeze(tt)),tt};function at(D,fe,k,ae,ee){{var Ce,ze={},tt=null,Dt=null;k!==void 0&&(Le(k),tt=""+k),ct(fe)&&(Le(fe.key),tt=""+fe.key),We(fe)&&(Dt=fe.ref,_e(fe,ee));for(Ce in fe)ce.call(fe,Ce)&&!nt.hasOwnProperty(Ce)&&(ze[Ce]=fe[Ce]);if(D&&D.defaultProps){var gt=D.defaultProps;for(Ce in gt)ze[Ce]===void 0&&(ze[Ce]=gt[Ce])}if(tt||Dt){var yt=typeof D=="function"?D.displayName||D.name||"Unknown":D;tt&&Oe(ze,yt),Dt&&Re(ze,yt)}return At(D,tt,Dt,ee,ae,et.current,ze)}}var vt=C.ReactCurrentOwner,Tt=C.ReactDebugCurrentFrame;function Wt(D){if(D){var fe=D._owner,k=de(D.type,D._source,fe?fe.type:null);Tt.setExtraStackFrame(k)}else Tt.setExtraStackFrame(null)}var Jt;Jt=!1;function en(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function Xt(){{if(vt.current){var D=b(vt.current.type);if(D)return`
|
|
85
85
|
|
|
86
86
|
Check the render method of \``+D+"`."}return""}}function Yt(D){return""}var Mt={};function pt(D){{var fe=Xt();if(!fe){var k=typeof D=="string"?D:D.displayName||D.name;k&&(fe=`
|
|
87
87
|
|
|
@@ -152,7 +152,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
152
152
|
`+i+`
|
|
153
153
|
`);if(this.state===dt.Connected){if(this.onMessage)try{this.onMessage(i)}catch(o){throw this.logger.error(o.toString()),this.logger.error("Exception thrown by onMessage callback"),o}}else this.logger.warn("Received message while not connected, discarding...")}else this.logger.warn("Received empty message, discarding...")}onWebSocketOpen(e,n){n===this._ws&&this._state===dt.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(dt.Connected))}transitionLoopDetectedError(e){let n="A state transition loop has been detected.";return n+=` An attempt to transition from ${this._state} to ${e} before the prior transition completed.`,n+=" Perhaps you are synchronously calling connect() or disconnect() from a callback or state change handler?",this.logger.error(n),new iA("Loop detected.")}transitionState(e,n){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${e}`)};if(this.transitioningState)throw this.transitionLoopDetectedError(e);switch(this.transitioningState=!0,this._state){case dt.Connecting:e!==dt.Connected&&e!==dt.Disconnecting&&e!==dt.Disconnected&&r();break;case dt.Connected:e!==dt.Disconnecting&&e!==dt.Disconnected&&r();break;case dt.Disconnecting:e!==dt.Connecting&&e!==dt.Disconnected&&r();break;case dt.Disconnected:e!==dt.Connecting&&r();break;default:throw new Error("Unknown state.")}const i=this._state;this._state=e;const o=this.connectResolve,A=this.connectReject;i===dt.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,s=this.disconnectReject;if(i===dt.Disconnecting&&(this.disconnectPromise=void 0,this.disconnectResolve=void 0,this.disconnectReject=void 0),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0),this.logger.log(`Transitioned from ${i} to ${this._state}`),this._stateEventEmitter.emit(this._state),e===dt.Connected&&(this.startSendingKeepAlives(),this.onConnect))try{this.onConnect()}catch(l){throw this.logger.error(l.toString()),this.logger.error("Exception thrown by onConnect callback"),l}if(i===dt.Connected&&(this.stopSendingKeepAlives(),this.onDisconnect))try{n?this.onDisconnect(n):this.onDisconnect()}catch(l){throw this.logger.error(l.toString()),this.logger.error("Exception thrown by onDisconnect callback"),l}if(i===dt.Connecting){if(!o)throw new Error("Connect resolve undefined.");if(!A)throw new Error("Connect reject undefined.");e===dt.Connected?o():A(n||new Error("Connect aborted."))}if(i===dt.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!s)throw new Error("Disconnect reject undefined.");e===dt.Disconnected?a():s(n||new Error("Disconnect aborted."))}this.transitioningState=!1}clearKeepAliveTimeout(){this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveDebounceTimeout=void 0}sendKeepAlive(){return this.keepAliveDebounceTimeout?Promise.resolve():(this.keepAliveDebounceTimeout=setTimeout(()=>{this.clearKeepAliveTimeout()},1e3*this.configuration.keepAliveDebounce),this.send(`\r
|
|
154
154
|
\r
|
|
155
|
-
`))}startSendingKeepAlives(){this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive(),this.startSendingKeepAlives()},(e=>{const n=.8*e;return 1e3*(Math.random()*(e-n)+n)})(this.configuration.keepAliveInterval)))}stopSendingKeepAlives(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}};y0.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};let xf=class Ka{constructor(e={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=Rn.Stopped,this._stateEventEmitter=new TA,this.delegate=e.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ka.defaultOptions()),{sipjsId:Hi(5)}),{uri:new Ri("sip","anonymous."+Hi(6),"anonymous.invalid")}),{viaHost:Hi(12)+".invalid"}),Ka.stripUndefinedProperties(e)),this.options.hackIpInContact)if(typeof this.options.hackIpInContact=="boolean"&&this.options.hackIpInContact){const i=Math.floor(Math.random()*254+1);this.options.viaHost="192.0.2."+i}else this.options.hackIpInContact&&(this.options.viaHost=this.options.hackIpInContact);switch(this.loggerFactory=new zy,this.logger=this.loggerFactory.getLogger("sip.UserAgent"),this.loggerFactory.builtinEnabled=this.options.logBuiltinEnabled,this.loggerFactory.connector=this.options.logConnector,this.options.logLevel){case"error":this.loggerFactory.level=Sn.error;break;case"warn":this.loggerFactory.level=Sn.warn;break;case"log":this.loggerFactory.level=Sn.log;break;case"debug":this.loggerFactory.level=Sn.debug}if(this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(n=>{const r=this.options[n];switch(n){case"uri":case"sessionDescriptionHandlerFactory":this.logger.log("· "+n+": "+r);break;case"authorizationPassword":this.logger.log("· "+n+": NOT SHOWN");break;case"transportConstructor":this.logger.log("· "+n+": "+r.name);break;default:this.logger.log("· "+n+": "+JSON.stringify(r))}})),this.options.transportOptions){const n=this.options.transportOptions,r=n.maxReconnectionAttempts,i=n.reconnectionTimeout;r!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),i!==void 0&&this.logger.warn('The transport option "reconnectionTimeout" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),e.reconnectionDelay===void 0&&i!==void 0&&(this.options.reconnectionDelay=i),e.reconnectionAttempts===void 0&&r!==void 0&&(this.options.reconnectionAttempts=r)}if(e.reconnectionDelay!==void 0&&this.logger.warn('The user agent option "reconnectionDelay" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),e.reconnectionAttempts!==void 0&&this.logger.warn('The user agent option "reconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),this._transport=new this.options.transportConstructor(this.getLogger("sip.Transport"),this.options.transportOptions),this.initTransportCallbacks(),this._contact=this.initContact(),this._instanceId=this.options.instanceId?this.options.instanceId:Ka.newUUID(),Vn.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(e){return Vn.URIParse(e)}static defaultOptions(){return{allowLegacyNotifications:!1,authorizationHa1:"",authorizationPassword:"",authorizationUsername:"",delegate:{},contactName:"",contactParams:{transport:"ws"},displayName:"",forceRport:!1,gracefulShutdown:!0,hackAllowUnregisteredOptionTags:!1,hackIpInContact:!1,hackViaTcp:!1,instanceId:"",instanceIdAlwaysAdded:!1,logBuiltinEnabled:!0,logConfiguration:!0,logConnector:()=>{},logLevel:"log",noAnswerTimeout:60,preloadedRouteSet:[],reconnectionAttempts:0,reconnectionDelay:4,sendInitialProvisionalResponse:!0,sessionDescriptionHandlerFactory:gw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:xr.Unsupported,sipExtensionReplaces:xr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:y0,transportOptions:{},uri:new Ri("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/0.21.1",viaHost:""}}static newUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=Math.floor(16*Math.random());return(e==="x"?n:n%4+8).toString(16)})}static stripUndefinedProperties(e){return Object.keys(e).reduce((n,r)=>(e[r]!==void 0&&(n[r]=e[r]),n),{})}get configuration(){return this.options}get contact(){return this._contact}get instanceId(){return this._instanceId}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get transport(){return this._transport}get userAgentCore(){return this._userAgentCore}getLogger(e,n){return this.loggerFactory.getLogger(e,n)}getLoggerFactory(){return this.loggerFactory}isConnected(){return this.transport.isConnected()}reconnect(){return this.state===Rn.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===Rn.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(Rn.Started),this.transport.connect())}async stop(){if(this.state===Rn.Stopped)return this.logger.warn("User agent already stopped"),Promise.resolve();if(this.logger.log(`Stopping ${this.configuration.uri}`),!this.options.gracefulShutdown)return this.logger.log("Dispose of transport"),this.transport.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),this.userAgentCore.dispose(),this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this.transitionState(Rn.Stopped),Promise.resolve();const e=Object.assign({},this._publishers),n=Object.assign({},this._registerers),r=Object.assign({},this._sessions),i=Object.assign({},this._subscriptions),o=this.transport,A=this.userAgentCore;this.logger.log("Dispose of registerers");for(const a in n)n[a]&&await n[a].dispose().catch(s=>{throw this.logger.error(s.message),delete this._registerers[a],s});this.logger.log("Dispose of sessions");for(const a in r)r[a]&&await r[a].dispose().catch(s=>{throw this.logger.error(s.message),delete this._sessions[a],s});this.logger.log("Dispose of subscriptions");for(const a in i)i[a]&&await i[a].dispose().catch(s=>{throw this.logger.error(s.message),delete this._subscriptions[a],s});this.logger.log("Dispose of publishers");for(const a in e)e[a]&&await e[a].dispose().catch(s=>{throw this.logger.error(s.message),delete this._publishers[a],s});this.logger.log("Dispose of transport"),await o.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),A.dispose(),this.transitionState(Rn.Stopped)}_makeInviter(e,n){return new f0(this,e,n)}attemptReconnection(e=1){const n=this.options.reconnectionAttempts,r=this.options.reconnectionDelay;e>n?this.logger.log("Maximum reconnection attempts reached"):(this.logger.log(`Reconnection attempt ${e} of ${n} - trying`),setTimeout(()=>{this.reconnect().then(()=>{this.logger.log(`Reconnection attempt ${e} of ${n} - succeeded`)}).catch(i=>{this.logger.error(i.message),this.logger.log(`Reconnection attempt ${e} of ${n} - failed`),this.attemptReconnection(++e)})},e===1?0:1e3*r))}initContact(){const e=this.options.contactName!==""?this.options.contactName:Hi(8),n=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new Ri("sip",e,this.options.viaHost,void 0,n),toString:(r={})=>{const i=r.anonymous||!1,o=r.outbound||!1,A=r.register||!1;let a="<";return a+=i?this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${n.transport?n.transport:"ws"}`:A?this.contact.uri:this.contact.pubGruu||this.contact.uri,o&&(a+=";ob"),a+=">",this.options.instanceIdAlwaysAdded&&(a+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),a}}}initCore(){let e=[];e.push("outbound"),this.options.sipExtension100rel===xr.Supported&&e.push("100rel"),this.options.sipExtensionReplaces===xr.Supported&&e.push("replaces"),this.options.sipExtensionExtraSupported&&e.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(e=e.filter(o=>Ky[o])),e=Array.from(new Set(e));const n=e.slice();(this.contact.pubGruu||this.contact.tempGruu)&&n.push("gruu");const r={aor:this.options.uri,contact:this.contact,displayName:this.options.displayName,loggerFactory:this.loggerFactory,hackViaTcp:this.options.hackViaTcp,routeSet:this.options.preloadedRouteSet,supportedOptionTags:e,supportedOptionTagsResponse:n,sipjsId:this.options.sipjsId,userAgentHeaderFieldValue:this.options.userAgentString,viaForceRport:this.options.forceRport,viaHost:this.options.viaHost,authenticationFactory:()=>{const o=this.options.authorizationUsername?this.options.authorizationUsername:this.options.uri.user,A=this.options.authorizationPassword?this.options.authorizationPassword:void 0,a=this.options.authorizationHa1?this.options.authorizationHa1:void 0;return new Zy(this.getLoggerFactory(),a,o,A)},transportAccessor:()=>this.transport},i={onInvite:o=>{var A;const a=new Wc(this,o);if(o.delegate={onCancel:s=>{a._onCancel(s)},onTransportError:s=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},o.trying(),this.options.sipExtensionReplaces!==xr.Unsupported){const s=o.message.parseHeader("replaces");if(s){const l=s.call_id;if(typeof l!="string")throw new Error("Type of call id is not string");const u=s.replaces_to_tag;if(typeof u!="string")throw new Error("Type of to tag is not string");const d=s.replaces_from_tag;if(typeof d!="string")throw new Error("type of from tag is not string");const g=l+u+d,p=this.userAgentCore.dialogs.get(g);if(!p)return void a.reject({statusCode:481});if(!p.early&&s.early_only===!0)return void a.reject({statusCode:486});const V=this._sessions[l+d]||this._sessions[l+u]||void 0;if(!V)throw new Error("Session does not exist.");a._replacee=V}}if(!((A=this.delegate)===null||A===void 0)&&A.onInvite)return a.autoSendAnInitialProvisionalResponse?void a.progress().then(()=>{var s;if(((s=this.delegate)===null||s===void 0?void 0:s.onInvite)===void 0)throw new Error("onInvite undefined.");this.delegate.onInvite(a)}):void this.delegate.onInvite(a);a.reject({statusCode:486})},onMessage:o=>{if(this.delegate&&this.delegate.onMessage){const A=new d0(o);this.delegate.onMessage(A)}else o.accept()},onNotify:o=>{if(this.delegate&&this.delegate.onNotify){const A=new zc(o);this.delegate.onNotify(A)}else this.options.allowLegacyNotifications?o.accept():o.reject({statusCode:481})},onRefer:o=>{this.logger.warn("Received an out of dialog REFER request"),this.delegate&&this.delegate.onReferRequest?this.delegate.onReferRequest(o):o.reject({statusCode:405})},onRegister:o=>{this.logger.warn("Received an out of dialog REGISTER request"),this.delegate&&this.delegate.onRegisterRequest?this.delegate.onRegisterRequest(o):o.reject({statusCode:405})},onSubscribe:o=>{this.logger.warn("Received an out of dialog SUBSCRIBE request"),this.delegate&&this.delegate.onSubscribeRequest?this.delegate.onSubscribeRequest(o):o.reject({statusCode:405})}};return new dw(r,i)}initTransportCallbacks(){this.transport.onConnect=()=>this.onTransportConnect(),this.transport.onDisconnect=e=>this.onTransportDisconnect(e),this.transport.onMessage=e=>this.onTransportMessage(e)}onTransportConnect(){this.state!==Rn.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(e){this.state!==Rn.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(e),e&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(e){const n=Ha.parseMessage(e,this.getLogger("sip.Parser"));if(!n)return void this.logger.warn("Failed to parse incoming message. Dropping.");if(this.state===Rn.Stopped&&n instanceof Mo)return void this.logger.warn(`Received ${n.method} request while stopped. Dropping.`);const r=()=>{const i=["from","to","call_id","cseq","via"];for(const o of i)if(!n.hasHeader(o))return this.logger.warn(`Missing mandatory header field : ${o}.`),!1;return!0};if(n instanceof Mo){if(!r())return void this.logger.warn("Request missing mandatory header field. Dropping.");if(!n.toTag&&n.callId.substr(0,5)===this.options.sipjsId)return void this.userAgentCore.replyStateless(n,{statusCode:482});const i=BA(n.body),o=n.getHeader("content-length");if(o&&i<Number(o))return void this.userAgentCore.replyStateless(n,{statusCode:400})}if(n instanceof Bi){if(!r())return void this.logger.warn("Response missing mandatory header field. Dropping.");if(n.getHeaders("via").length>1)return void this.logger.warn("More than one Via header field present in the response. Dropping.");if(n.via.host!==this.options.viaHost||n.via.port!==void 0)return void this.logger.warn("Via sent-by in the response does not match UA Via host value. Dropping.");const i=BA(n.body),o=n.getHeader("content-length");if(o&&i<Number(o))return void this.logger.warn("Message body length is lower than the value in Content-Length header field. Dropping.")}if(n instanceof Mo)this.userAgentCore.receiveIncomingRequestFromTransport(n);else{if(!(n instanceof Bi))throw new Error("Invalid message type.");this.userAgentCore.receiveIncomingResponseFromTransport(n)}}transitionState(e,n){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${e}`)};switch(this._state){case Rn.Started:e!==Rn.Stopped&&r();break;case Rn.Stopped:e!==Rn.Started&&r();break;default:throw new Error("Unknown state.")}this.logger.log(`Transitioned from ${this._state} to ${e}`),this._state=e,this._stateEventEmitter.emit(this._state)}},S0=class{constructor(e){this.listeners=[],this.keyListeners={},this.data={...e},this.proxy=new Proxy(this.data,{set:(n,r,i)=>(n[r]!==i&&(n[r]=i,this.notify(),this.notifyKey(r,i)),!0)})}getState(){return this.proxy}setState(e,n=!1){let r=!1;for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=this.data[i],A=e[i];(n||o!==A)&&(this.data[i]=A,r=!0,this.notifyKey(i,A))}(r||n)&&this.notify()}subscribe(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter(n=>n!==e)}}subscribeKey(e,n){return this.keyListeners[e]||(this.keyListeners[e]=[]),this.keyListeners[e].push(n),()=>{this.keyListeners[e]=this.keyListeners[e].filter(r=>r!==n)}}notify(){const e=this.getState();for(const n of this.listeners)n(e)}notifyKey(e,n){const r=this.keyListeners[e];r&&r.forEach(i=>i(n))}};var bt,yn,rt,Cr,oe,Ge,Ht;(function(t){t[t.IDLE=1]="IDLE",t[t.BUSY=2]="BUSY",t[t.RINGING=3]="RINGING",t[t.OFFLINE=0]="OFFLINE",t[t.UNREGISTERED=4]="UNREGISTERED"})(bt||(bt={})),function(t){t.OUTGOING="outgoing",t.INCOMING="incoming",t.CONSULT="consult",t.MEETING="meeting",t.TRANSFER="transfer",t.PREDICT_OUT_CALL="predict_out_call"}(yn||(yn={})),function(t){t[t.OUT_CALL=100]="OUT_CALL",t[t.AGENT_STATE=101]="AGENT_STATE",t[t.OUT_CALL_INCOMING_CALL=102]="OUT_CALL_INCOMING_CALL",t[t.OUT_CALL_RINGING=103]="OUT_CALL_RINGING",t[t.OUT_CALL_ANSWER=104]="OUT_CALL_ANSWER",t[t.CALL_HOLD=105]="CALL_HOLD",t[t.CALL_UNHOLD=106]="CALL_UNHOLD",t[t.OUT_CALL_END=107]="OUT_CALL_END",t[t.CONSULT_REQUEST=108]="CONSULT_REQUEST",t[t.CONSULT_RINGING=109]="CONSULT_RINGING",t[t.CONSULT_ANSWER=110]="CONSULT_ANSWER",t[t.CONSULT_FAIL=111]="CONSULT_FAIL",t[t.MUTE=112]="MUTE",t[t.UNMUTE=113]="UNMUTE",t[t.CONSULT_CALL_IN=114]="CONSULT_CALL_IN",t[t.CONSULT_CALL_IN_SUCCESS=115]="CONSULT_CALL_IN_SUCCESS",t[t.CONSULT_RETURN_CALL=125]="CONSULT_RETURN_CALL",t[t.CONSULT_RETURN_CALL_SUCCESS=126]="CONSULT_RETURN_CALL_SUCCESS",t[t.CONSULT_TRANSFER=116]="CONSULT_TRANSFER",t[t.CONSULT_TRANSFER_FAILED=118]="CONSULT_TRANSFER_FAILED",t[t.CONSULT_TRANSFER_OFF_HOOK=117]="CONSULT_TRANSFER_OFF_HOOK",t[t.INCOMING_CALL=119]="INCOMING_CALL",t[t.INCOMING_CALL_OFF_HOOK=120]="INCOMING_CALL_OFF_HOOK",t[t.INCOMING_CALL_END=121]="INCOMING_CALL_END",t[t.SATISFACTION_EVALUATION=122]="SATISFACTION_EVALUATION",t[t.CONSULT_THREE_WAY=123]="CONSULT_THREE_WAY",t[t.CONSULT_THREE_WAY_RESULT=124]="CONSULT_THREE_WAY_RESULT",t[t.TRANSFER=127]="TRANSFER",t[t.TRANSFER_FAILED=128]="TRANSFER_FAILED",t[t.TRANSFER_INCOMING_CALL=129]="TRANSFER_INCOMING_CALL",t[t.TRANSFER_OFF_HOOK=130]="TRANSFER_OFF_HOOK",t[t.AGENT_HANGUP=131]="AGENT_HANGUP",t[t.KICK_OFFLINE=132]="KICK_OFFLINE",t[t.CONTINUOUS_NOT_ANSWER=133]="CONTINUOUS_NOT_ANSWER",t[t.PREVIEW_OUT_CALL=134]="PREVIEW_OUT_CALL",t[t.SIGN_OUT=135]="SIGN_OUT",t[t.SIGN_IN_SWITCH_DEVICE=136]="SIGN_IN_SWITCH_DEVICE",t[t.LISTEN_CALL_FAILED=137]="LISTEN_CALL_FAILED",t[t.LISTEN_INCOMING_CALL=138]="LISTEN_INCOMING_CALL",t[t.LISTEN_INCOMING_CALL_OFF_HOOK=139]="LISTEN_INCOMING_CALL_OFF_HOOK",t[t.EAR_SPEECH=140]="EAR_SPEECH",t[t.STOP_EAR_SPEECH=141]="STOP_EAR_SPEECH",t[t.CALL_FORCE_INSERT=142]="CALL_FORCE_INSERT",t[t.INTERNAL_CALL_START_CONSULT=145]="INTERNAL_CALL_START_CONSULT",t[t.INTERNAL_CALL_END_CONSULT=146]="INTERNAL_CALL_END_CONSULT",t[t.CALL_SIP_INCOMING_CALL=147]="CALL_SIP_INCOMING_CALL"}(rt||(rt={})),function(t){t.WEB_RTC_CONNECTING="connecting",t.WEB_RTC_CONNECTED="connected",t.WEB_RTC_DISCONNECTING="disconnecting",t.WEB_RTC_DISCONNECTED="disconnected",t.WEB_RTC_REGISTERED="registered",t.WEB_RTC_UNREGISTERED="unregistered",t.WEB_RTC_TERMINATED="terminated",t.WEB_RTC_REGISTER_FAILED="register_failed",t.WEB_RTC_ANSWER_FAILED="answer_failed",t.WEB_RTC_SEND_DTMF="send_dtmf"}(Cr||(Cr={})),function(t){t.CUSTOMER_INFO="customer_info",t.CALL_PROGRESS="call_progress",t.OUT_INCOMING_CALL="out_call_incoming_call",t.INTERNAL_OUT_INCOMING_CALL="internal_out_incoming_call",t.PREVIEW_OUT_INCOMING_CALL="preview_out_incoming_call",t.OUT_SUCCESS="out_call_success",t.OUT_FAILED="out_call_failed",t.OUT_RINGING="out_call_ringing",t.OUT_OFF_ANSWER="out_call_answer",t.INTERNAL_OUT_OFF_ANSWER="internal_out_call_answer",t.HOLD_SUCCESS="hold_success",t.HOLD_FAILED="hold_failed",t.UNHOLD_SUCCESS="unhold_success",t.UNHOLD_FAILED="unhold_failed",t.OUT_HANGUP="out_call_hangup",t.CONSULT_RINGING="consult_ringing",t.CONSULT_OFF_HOOK="consult_off_hook",t.CONSULT_FAILED="consult_failed",t.CONSULT_INCOMING="consult_incoming",t.CONSULT_CALL_IN_SUCCESS="consult_call_in_success",t.CONSULT_RETURN_CALL_SUCCESS="consult_return_call_success",t.OTHER_SIDE_CONSULT_HANGUP="other_side_consult_hangup",t.OUR_SIDE_CONSULT_HANGUP="our_side_consult_hangup",t.AGENT_STATE="agent_state",t.MUTE_SUCCESS="mute_success",t.MUTE_FAILED="mute_failed",t.UNMUTE_SUCCESS="unmute_success",t.UNMUTE_FAILED="unmute_failed",t.CONSULT_TRANSFER_SUCCESS="consult_transfer_success",t.CONSULT_TRANSFER_FAILED="consult_transfer_failed",t.CONSULT_TRANSFER_OFF_HOOK="consult_transfer_off_hook",t.INCOMING_CALL="incoming_call",t.INCOMING_CALL_IN="incoming_call_in",t.PREDICT_INCOMING_CALL="predict_incoming_call",t.DUAL_CALL_INCOMING_CALL="dual_call_incoming_call",t.INCOMING_CALL_OFF_HOOK="incoming_call_off_hook",t.INCOMING_CALL_IN_OFF_HOOK="incoming_call_in_off_hook",t.INCOMING_CALL_END="incoming_call_end",t.SATISFACTION_EVALUATION_SUCCESS="satisfaction_evaluation_success",t.SATISFACTION_EVALUATION_FAILED="satisfaction_evaluation_failed",t.CONSULT_THREE_WAY_SUCCESS="consult_three_way_success",t.CONSULT_THREE_WAY_FAILED="consult_three_way_failed",t.THREE_WAY_OUR_SIDE_HANGUP="three_way_our_side_hangup",t.TRANSFER_FAILED="transfer_failed",t.TRANSFER_PROGRESS="transfer_progress",t.TRANSFER_INCOMING_CALL="transfer_incoming_call",t.TRANSFER_OFF_HOOK="transfer_off_hook",t.TRANSFER_END="transfer_end",t.REJECT="reject",t.LISTEN_CALL_FAILED="listen_call_failed",t.LISTEN_INCOMING_CALL="listen_incoming_call",t.LISTEN_INCOMING_CALL_OFF_HOOK="listen_incoming_call_off_hook",t.LISTEN_HANGUP="listen_hangup",t.EAR_SPEECH_SUCCESS="ear_speech_success",t.EAR_SPEECH_BE_SUCCESS="ear_speech_be_success",t.EAR_SPEECH_FAILED="ear_speech_failed",t.STOP_EAR_SPEECH_SUCCESS="stop_ear_speech_success",t.STOP_EAR_SPEECH_FAILED="stop_ear_speech_failed",t.CALL_FORCE_INSERT_SUCCESS="call_force_insert_success",t.CALL_FORCE_INSERT_SUCCESS_LISTENER="call_force_insert_success_listener",t.CALL_FORCE_INSERT_FAILED="call_force_insert_failed",t.CALL_SIP_INCOMING_CALL="call_sip_incoming_call"}(oe||(oe={})),function(t){t.EVENT_ALL="event_all",t.NOTIFICATION_CLICK="notification_click",t.UPDATE_ANSWER_DEVICE="update_answer_device",t.PHONE_BAR_OPERATION="phone_bar_operation",t.AGENT_INIT_STATUS="agent_init_status",t.WEBSITE_DELAY="website_delay",t.SELECT_EXTERNAL_NUMBER="select_external_number",t.FAIL_NOTIFICATION="fail_notification",t.KICK_OFF="kick_off",t.DESTROY="destroy",t.NETWORK_OFFLINE="network_offline",t.NETWORK_ONLINE="network_online",t.SIGN_OUT="sign_out",t.SIGN_IN_SWITCH_DEVICE="sign_in_switch_device"}(Ge||(Ge={})),function(t){t.RINGING="客户振铃",t.AGENT_RINGING="振铃中",t.CALLING="通话中",t.CONSULTING="正在咨询",t.CONSULT_CALL_IN="咨询来电",t.INCOMING_CALL="客户来电",t.MEETING="会议中",t.TRANSFERRING="转接中",t.TRANSFER_INCOMING_CALL="转接来电",t.HOLDING="保持中",t.MUTING="静音中",t.LISTENING="监听来电",t.LINKING="正在链接",t.OTHER_SIDE_CONSULTING="对方正咨询"}(Ht||(Ht={}));const oA={all:mi=mi||new Map,on:function(t,e){var n=mi.get(t);n?n.push(e):mi.set(t,[e])},off:function(t,e){var n=mi.get(t);n&&(e?n.splice(n.indexOf(e)>>>0,1):mi.set(t,[]))},emit:function(t,e){var n=mi.get(t);n&&n.slice().map(function(r){r(e)}),(n=mi.get("*"))&&n.slice().map(function(r){r(t,e)})}};var mi;const ge={on:(t,e)=>(oA.on(t,e),ge),off(t,e){oA.off(t,e)},emit(t,e){oA.emit(t,e),oA.emit(Ge.EVENT_ALL,{event:t,data:e})},clearAllListeners(){oA.all.clear()}},W={agentInfo:{},isRtcReconnecting:!1,sessionId:"",enableBrowserAlert:!1,autoStateTimer:null,autoAnswerTimer:null,logBuiltinEnabled:!1,browserAlertTime:3e3,latency:0,monitoredAgentNo:"",earSpeakAgent:"",stateObject:{state:bt.BUSY,state_name:"忙碌"}},pr={isCalling:!1,direction:null,outCallIsAnswer:!1,incomingIsAnswer:!1,transferIsAnswer:!1,isMeeting:!1,isHold:!1,displayText:"",isMuted:!1,consultIsAnswer:!1,actionConfigs:[],answerDevice:1,selectOutNumber:"",customerObject:void 0,isNextState:!0,isSipConnected:!1},P=new class extends S0{updateIsCalling(t){this.setState({isCalling:t})}updateDirection(t){this.setState({direction:t})}updateOutCallIsAnswer(t){this.setState({outCallIsAnswer:t})}updateIsHold(t){var n;if(((n=W.stateObject)==null?void 0:n.state)===bt.UNREGISTERED)return;const e=this.get("actionConfigs");if(t){const r=[...e.filter(i=>i!=="hold")];r.push("unhold"),this.updateActionConfigs(r)}else{const r=[...e.filter(i=>i!=="unhold")];r.push("hold"),this.updateActionConfigs(r)}this.getState().isHold=t}updateDisplayText(t){this.setState({displayText:t}),ge.emit(oe.CALL_PROGRESS,t)}updateActionConfigs(t,e=!0){const{show_satisfaction:n}=W.agentInfo||{},r=this.get("answerDevice"),i=t.filter(o=>(n!==0||o!=="satisfaction"||!e)&&(r!==2||o!=="answer"));this.setState({actionConfigs:i}),ge.emit(Ge.PHONE_BAR_OPERATION,i)}updateConsultIsAnswer(t){this.setState({consultIsAnswer:t})}updateIsMuted(t){var n;if(((n=W.stateObject)==null?void 0:n.state)===bt.UNREGISTERED)return;const e=this.get("actionConfigs");if(t){const r=[...e.filter(i=>i!=="mute")];r.push("unmute"),this.updateActionConfigs(r)}else{const r=[...e.filter(i=>i!=="unmute")];r.push("mute"),this.updateActionConfigs(r)}this.setState({isMuted:t})}updateIncomingIsAnswer(t){this.setState({incomingIsAnswer:t})}updateAnswerDevice(t){this.setState({answerDevice:t}),ge.emit(Ge.UPDATE_ANSWER_DEVICE,t)}updateIsMeeting(t){this.setState({isMeeting:t})}updateTransferIsAnswer(t){this.setState({transferIsAnswer:t})}updateSelectOutNumber(t){ge.emit(Ge.SELECT_EXTERNAL_NUMBER,t),this.setState({selectOutNumber:t})}updateCustomerInfo(t){const e=this.get("displayText");if(t&&e){const{contact_count:n,customer_name:r,phone:i,city:o,province:A,is_vip:a,in_contact_count:s,trace_id:l,contact_count_month:u,in_contact_count_month:d}=t;ge.emit(oe.CUSTOMER_INFO,{customer_name:r||"未知客户",phone:i,city:o||"未知",province:A||"未知",contact_count:n||0,in_contact_count:s||0,is_vip:a,trace_id:l,contact_count_month:u||0,in_contact_count_month:d||0})}else ge.emit(oe.CUSTOMER_INFO,void 0);this.setState({customerObject:t})}updateIsNextState(t){this.setState({isNextState:t}),t?ge.emit(Ge.NETWORK_ONLINE):(W.stateObject={state:bt.OFFLINE,state_name:"离线"},this.updateActionConfigs([]),ge.emit(oe.AGENT_STATE,W.stateObject),ge.emit(Ge.NETWORK_OFFLINE))}updateIsSipConnected(t){this.setState({isSipConnected:t})}reset(){this.updateAnswerDevice(1),this.updateIsCalling(pr.isCalling),this.updateDirection(pr.direction),this.updateOutCallIsAnswer(pr.outCallIsAnswer),this.updateIsHold(pr.isHold),this.updateDisplayText(pr.displayText),this.updateActionConfigs(pr.actionConfigs),this.updateConsultIsAnswer(pr.consultIsAnswer),this.updateIsMuted(pr.isMuted),this.updateIncomingIsAnswer(pr.incomingIsAnswer),this.updateIsMeeting(pr.isMeeting),this.updateTransferIsAnswer(pr.transferIsAnswer),this.updateCustomerInfo(void 0)}getCallInfo(){return this.getState()}get(t){return this.getState()[t]}}(pr),I0=new class extends S0{updateRttObject(t){this.setState({rttObject:t}),ge.emit(Ge.WEBSITE_DELAY,t)}}({rttObject:{rtt:null,jitter:null,packetsLost:null,packetsReceived:null,packetsSent:null,sendBitrate:null,recvBitrate:null,codec:null}});let fw=class{constructor(e,n){this.config=e,this.eventCallback=n,this.userAgent=null,this.registerer=null,this.activeSession=null,this.callTimeoutTimer=null,this.incomingInvitation=null,this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.reconnectTimer=null,this.isOffline=!1,this.isManuallyStopped=!1,this.registerInterval=6e4,this.handleNetworkInfoChange=r=>{var i,o;(i=r.rttObject)!=null&&i.rtt&&((((o=r.rttObject)==null?void 0:o.rtt)||-1)===-1?this.isOffline||(this.isOffline=!0,this.handleOffline()):this.isOffline&&(this.isOffline=!1,this.handleOnline()))},this.handleOffline=()=>{console.warn("[SIPClient] 网络断开,准备销毁 SIP 客户端",new Date().toLocaleString()),ge.emit(Ge.FAIL_NOTIFICATION,"网络断开,准备销毁 SIP 客户端"),this.destroy()},this.handleOnline=()=>{console.warn("[SIPClient] 网络恢复,准备重新启动 SIP 客户端",new Date().toLocaleString()),this.reconnect()},this.sleep=r=>new Promise(i=>setTimeout(i,r)),I0.subscribe(this.handleNetworkInfoChange)}async start(){const e=xf.makeURI(`sip:${this.config.user}@${this.config.server}`);if(!e)throw new Error("无效的SIP配置");const n={uri:e,authorizationUsername:this.config.user,authorizationPassword:this.config.password,sendInitialProvisionalResponse:!1,transportOptions:{server:this.config.webSocket,connectionTimeout:10,keepAliveInterval:20,keepAliveDebounce:10},contactName:this.config.user,contactParams:{transport:"wss"},userAgentString:"SwiftSIP/2.0.21",sessionDescriptionHandlerFactoryOptions:{alwaysAcquireMediaFirst:!0,peerConnectionConfiguration:{iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceCandidatePoolSize:0,iceTransportPolicy:"all",rtcpMuxPolicy:"require",bundlePolicy:"balanced",certificates:void 0,peerIdentity:void 0},iceGatheringTimeout:1e3},logBuiltinEnabled:W.logBuiltinEnabled};this.userAgent=new xf(n),this.setupEventListeners(),await this.userAgent.start(),await this.register()}setupEventListeners(){this.userAgent&&(this.userAgent.transport.stateChange.addListener(e=>{var r;let n;switch(e){case dt.Connecting:n=Cr.WEB_RTC_CONNECTING;break;case dt.Connected:n=Cr.WEB_RTC_CONNECTED,this.reconnectAttempts=0,W.isRtcReconnecting=!1,P.updateIsSipConnected(!0),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);break;case dt.Disconnecting:n=Cr.WEB_RTC_DISCONNECTING,P.updateIsSipConnected(!1);break;case dt.Disconnected:{if(P.updateIsSipConnected(!1),this.isManuallyStopped)return void console.warn("[SIP] 手动断开,不触发重连");ge.emit(Ge.FAIL_NOTIFICATION,"软电话链接失败"),n=Cr.WEB_RTC_DISCONNECTED;const i=P.get("answerDevice");if(!W.isRtcReconnecting&&this.reconnectAttempts<this.maxReconnectAttempts&&i===1){this.reconnectAttempts++;const o=1e3*this.reconnectAttempts;console.warn(`SIP WebSocket 断开,第 ${this.reconnectAttempts} 次尝试重连,${o}ms 后重试...`),this.reconnectTimer=setTimeout(()=>{this.reconnect()},o)}else this.reconnectAttempts>=this.maxReconnectAttempts&&(console.error("SIP 重连失败:已达到最大重试次数"),ge.emit(Ge.FAIL_NOTIFICATION,"SIP 重连失败:已达到最大重试次数"));break}default:P.updateIsSipConnected(!1),n="unknown"}(r=this.eventCallback)==null||r.call(this,{type:n})}),this.userAgent.delegate={onInvite:e=>{this.handleIncomingCall(e)}})}async refreshRegister(){if(this.registerer)try{await this.registerer.register(),new Date().toLocaleTimeString()}catch(e){console.error("[SIPClient] REGISTER刷新失败",e)}}async register(){var e,n;if(this.userAgent){this.registerer=new Xc(this.userAgent,{expires:120,refreshFrequency:80}),(e=this.registerer)==null||e.stateChange.addListener(r=>{var o;let i;switch(r){case kt.Initial:P.updateDisplayText(Ht.LINKING),i="initial";break;case kt.Registered:P.updateDisplayText(""),i=Cr.WEB_RTC_REGISTERED;break;case kt.Unregistered:i=Cr.WEB_RTC_UNREGISTERED;break;case kt.Terminated:i=Cr.WEB_RTC_TERMINATED;break;default:i="unknown"}(o=this.eventCallback)==null||o.call(this,{type:i})});try{await this.registerer.register()}catch(r){(n=this.eventCallback)==null||n.call(this,{type:Cr.WEB_RTC_REGISTER_FAILED,data:r})}}}attachRemoteAudio(e){const n=e.sessionDescriptionHandler;if(n){const r=n.peerConnection;if(!r)return;const i=new MediaStream;r.getReceivers().forEach(A=>{A.track&&A.track.kind==="audio"&&i.addTrack(A.track)});let o=document.getElementById("sip-remote-audio");o||(o=document.createElement("audio"),o.id="sip-remote-audio",o.autoplay=!0,o.style.display="none",document.body.appendChild(o)),o.srcObject=i,o.play().catch(A=>{console.error("音频播放失败,需要用户交互触发",A)})}}handleSessionState(e,n,r){e.stateChange.addListener(i=>{switch(i){case he.Established:clearTimeout(this.callTimeoutTimer),this.activeSession=e,this.attachRemoteAudio(e);break;case he.Terminating:break;case he.Terminated:this.activeSession=null,clearTimeout(this.callTimeoutTimer);case he.Establishing:}})}handleIncomingCall(e){this.incomingInvitation=e,this.handleSessionState(e,!1),e.progress({statusCode:180,reasonPhrase:"Ringing"}).catch(n=>console.error("发送 180 失败",n)),P.get("direction")===yn.OUTGOING&&this.answerCall()}async answerCall(){var e;if(!this.incomingInvitation)throw new Error("无来电可接听");W.autoAnswerTimer&&(clearTimeout(W.autoAnswerTimer),W.autoAnswerTimer=null);try{await this.incomingInvitation.accept(),this.activeSession=this.incomingInvitation,this.incomingInvitation=null}catch(n){(e=this.eventCallback)==null||e.call(this,{type:Cr.WEB_RTC_ANSWER_FAILED,data:{detail:n}})}}async rejectInCall(){var e;if(this.incomingInvitation)try{await this.incomingInvitation.reject(),this.incomingInvitation=null,P.updateDirection(null),P.updateIsCalling(!1),clearTimeout(this.callTimeoutTimer)}catch(n){(e=this.eventCallback)==null||e.call(this,{type:"error",data:{message:"拒接失败",detail:n}})}}sendDTMF(e){var r;if(!this.activeSession)throw new Error("当前没有活跃的通话");const n=this.activeSession.sessionDescriptionHandler;n&&typeof n.sendDtmf=="function"?(n.sendDtmf(e),(r=this.eventCallback)==null||r.call(this,{type:Cr.WEB_RTC_SEND_DTMF,data:{tone:e}})):console.warn("DTMF发送不支持或未初始化")}async hangup(){if(this.activeSession,this.activeSession){clearTimeout(this.callTimeoutTimer);const e=this.activeSession;if(!e)return;const n=e.state;try{n===he.Established?await e.bye():n===he.Establishing&&(e instanceof f0?await e.cancel():e instanceof Wc&&await e.reject()),clearTimeout(this.callTimeoutTimer)}catch(r){console.error("挂断失败",r)}finally{this.activeSession=null}}}async rejectOutCall(){this.activeSession instanceof Wc&&(await this.activeSession.reject(),this.activeSession=null)}async destroy(){if(this.isManuallyStopped=!0,clearTimeout(this.callTimeoutTimer),this.activeSession&&await this.hangup(),this.registerer){try{await this.registerer.unregister()}catch(e){console.warn("注销失败",e)}this.registerer=null}this.userAgent&&(await this.userAgent.stop(),this.userAgent=null)}async reconnect(){if(!W.isRtcReconnecting){W.isRtcReconnecting=!0;try{await this.destroy(),this.isManuallyStopped=!1,await this.start(),this.isOffline=!1,this.reconnectAttempts=0}catch(e){console.error("重连失败",e),W.isRtcReconnecting=!1}finally{W.isRtcReconnecting=!1}}}async getNetworkStats(){var e;if(this.activeSession){const n=(e=this.activeSession.sessionDescriptionHandler)==null?void 0:e.peerConnection;if(!n)return null;const r=await n.getStats(),i={};return r.forEach(o=>{o.type==="candidate-pair"&&o.state==="succeeded"&&o.currentRoundTripTime!=null&&(i.rtt=+(1e3*o.currentRoundTripTime).toFixed(2)),o.type==="inbound-rtp"&&o.kind==="audio"&&(i.jitter=+(1e3*o.jitter).toFixed(2),i.packetsLost=o.packetsLost,i.packetsReceived=o.packetsReceived,o.bytesReceived&&o.timestamp&&(i.recvBitrate=+(o.bytesReceived/1024).toFixed(2))),o.type==="outbound-rtp"&&o.kind==="audio"&&(i.packetsSent=o.packetsSent,o.bytesSent&&o.timestamp&&(i.sendBitrate=+(o.bytesSent/1024).toFixed(2))),o.type==="codec"&&o.mimeType&&(i.codec=o.mimeType)}),{...i,rtt:(i==null?void 0:i.rtt)||40}}return{rtt:W.latency||1}}};class Tf extends Error{constructor(n,r,i){const o=`${n.status||n.status===0?n.status:""} ${n.statusText||""}`.trim();super(`Request failed with ${o?`status code ${o}`:"an unknown error"}: ${r.method} ${r.url}`);Pr(this,"response");Pr(this,"request");Pr(this,"options");this.name="HTTPError",this.response=n,this.request=r,this.options=i}}let Bf=class extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);Pr(this,"request");this.name="TimeoutError",this.request=n}};const Of=(()=>{let t=!1,e=!1;const n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(n&&r)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return t&&!e})(),hw=typeof globalThis.AbortController=="function",pw=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",mw=typeof globalThis.ReadableStream=="function",Vw=typeof globalThis.FormData=="function",b0=["get","post","put","patch","head","delete"],vw={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Df=2147483647,Cw=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,M0=Symbol("stop"),qw={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},Ew={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},yw=(t,e)=>{const n=(i=>{if(!i)return 0;if(i instanceof FormData){let o=0;for(const[A,a]of i)o+=Cw,o+=new TextEncoder().encode(`Content-Disposition: form-data; name="${A}"`).length,o+=typeof a=="string"?new TextEncoder().encode(a).length:a.size;return o}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const o=JSON.stringify(i);return new TextEncoder().encode(o).length}catch{return 0}return 0})(t.body);let r=0;return new Request(t,{duplex:"half",body:new ReadableStream({async start(i){const o=t.body instanceof ReadableStream?t.body.getReader():new Response("").body.getReader();await async function A(){const{done:a,value:s}=await o.read();if(a)return e&&e({percent:1,transferredBytes:r,totalBytes:Math.max(n,r)},new Uint8Array),void i.close();r+=s.byteLength;let l=n===0?0:r/n;(n<r||l===1)&&(l=.99),e&&e({percent:Number(l.toFixed(2)),transferredBytes:r,totalBytes:n},s),i.enqueue(s),await A()}()}})})},uA=t=>t!==null&&typeof t=="object",qa=(...t)=>{for(const e of t)if((!uA(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Gd({},...t)},R0=(t={},e={})=>{const n=new globalThis.Headers(t),r=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[o,A]of i.entries())r&&A==="undefined"||A===void 0?n.delete(o):n.set(o,A);return n};function Ea(t,e,n){return Object.hasOwn(e,n)&&e[n]===void 0?[]:Gd(t[n]??[],e[n]??[])}const x0=(t={},e={})=>({beforeRequest:Ea(t,e,"beforeRequest"),beforeRetry:Ea(t,e,"beforeRetry"),afterResponse:Ea(t,e,"afterResponse"),beforeError:Ea(t,e,"beforeError")}),Gd=(...t)=>{let e={},n={},r={};for(const i of t)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(uA(i)){for(let[o,A]of Object.entries(i))uA(A)&&o in e&&(A=Gd(e[o],A)),e={...e,[o]:A};uA(i.hooks)&&(r=x0(r,i.hooks),e.hooks=r),uA(i.headers)&&(n=R0(n,i.headers),e.headers=n)}return e},ww=t=>b0.includes(t)?t.toUpperCase():t,Nf={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},Sw=(t={})=>{if(typeof t=="number")return{...Nf,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...Nf,...t}};class ls{constructor(e,n={}){Pr(this,"request");Pr(this,"abortController");Pr(this,"_retryCount",0);Pr(this,"_input");Pr(this,"_options");var r,i;if(this._input=e,this._options={...n,headers:R0(this._input.headers,n.headers),hooks:x0({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:ww(n.method??this._input.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:Sw(n.retry),throwHttpErrors:n.throwHttpErrors!==!1,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(hw&&pw){const o=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=o?AbortSignal.any([o,this.abortController.signal]):this.abortController.signal}if(Of&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((i=(r=this._options).stringifyJson)==null?void 0:i.call(r,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),A=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);!(Vw&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(A,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Of)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=yw(this.request,this._options.onUploadProgress))}}static create(e,n){const r=new ls(e,n),i=async()=>{if(typeof r._options.timeout=="number"&&r._options.timeout>Df)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let A=await r._fetch();for(const a of r._options.hooks.afterResponse){const s=await a(r.request,r._options,r._decorateResponse(A.clone()));s instanceof globalThis.Response&&(A=s)}if(r._decorateResponse(A),!A.ok&&r._options.throwHttpErrors){let a=new Tf(A,r.request,r._options);for(const s of r._options.hooks.beforeError)a=await s(a);throw a}if(r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!mw)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return((a,s)=>{const l=Number(a.headers.get("content-length"))||0;let u=0;return a.status===204?(s&&s({percent:1,totalBytes:l,transferredBytes:u},new Uint8Array),new Response(null,{status:a.status,statusText:a.statusText,headers:a.headers})):new Response(new ReadableStream({async start(d){const g=a.body.getReader();s&&s({percent:0,transferredBytes:0,totalBytes:l},new Uint8Array),await async function p(){const{done:V,value:v}=await g.read();V?d.close():(s&&(u+=v.byteLength,s({percent:l===0?0:u/l,transferredBytes:u,totalBytes:l},v)),d.enqueue(v),await p())}()}}),{status:a.status,statusText:a.statusText,headers:a.headers})})(A.clone(),r._options.onDownloadProgress)}return A},o=(r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i()).finally(async()=>{var A;r.request.bodyUsed||await((A=r.request.body)==null?void 0:A.cancel())});for(const[A,a]of Object.entries(vw))o[A]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||a);const s=await o;if(A==="json"){if(s.status===204||(await s.clone().arrayBuffer()).byteLength===0)return"";if(n.parseJson)return n.parseJson(await s.text())}return s[A]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof Bf)throw e;if(e instanceof Tf){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const r=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(r&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=1e3*Number(r);Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const o=this._options.retry.maxRetryAfter??i;return i<o?i:o}if(e.response.status===413)throw e}const n=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,n)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(n){const r=Math.min(this._calculateRetryDelay(n),Df);if(this._retryCount<1)throw n;await async function(i,{signal:o}){return new Promise((A,a)=>{function s(){clearTimeout(l),a(o.reason)}o&&(o.throwIfAborted(),o.addEventListener("abort",s,{once:!0}));const l=setTimeout(()=>{o==null||o.removeEventListener("abort",s),A()},i)})}(r,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===M0)return;return this._retry(e)}}async _fetch(){for(const r of this._options.hooks.beforeRequest){const i=await r(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=((r,i)=>{const o={};for(const A in i)A in Ew||A in qw||A in r||(o[A]=i[A]);return o})(this.request,this._options),n=this.request;return this.request=n.clone(),this._options.timeout===!1?this._options.fetch(n,e):async function(r,i,o,A){return new Promise((a,s)=>{const l=setTimeout(()=>{o&&o.abort(),s(new Bf(r))},A.timeout);A.fetch(r,i).then(a).catch(s).then(()=>{clearTimeout(l)})})}(n,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const $c=t=>{const e=(n,r)=>ls.create(n,qa(t,r));for(const n of b0)e[n]=(r,i)=>ls.create(r,qa(t,i,{method:n}));return e.create=n=>$c(qa(n)),e.extend=n=>(typeof n=="function"&&(n=n(t??{})),$c(qa(t,n))),e.stop=M0,e};var Pl,Iw=$c(),bw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},T0={exports:{}};/**
|
|
155
|
+
`))}startSendingKeepAlives(){this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive(),this.startSendingKeepAlives()},(e=>{const n=.8*e;return 1e3*(Math.random()*(e-n)+n)})(this.configuration.keepAliveInterval)))}stopSendingKeepAlives(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}};y0.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};let xf=class Ka{constructor(e={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=Rn.Stopped,this._stateEventEmitter=new TA,this.delegate=e.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ka.defaultOptions()),{sipjsId:Hi(5)}),{uri:new Ri("sip","anonymous."+Hi(6),"anonymous.invalid")}),{viaHost:Hi(12)+".invalid"}),Ka.stripUndefinedProperties(e)),this.options.hackIpInContact)if(typeof this.options.hackIpInContact=="boolean"&&this.options.hackIpInContact){const i=Math.floor(Math.random()*254+1);this.options.viaHost="192.0.2."+i}else this.options.hackIpInContact&&(this.options.viaHost=this.options.hackIpInContact);switch(this.loggerFactory=new zy,this.logger=this.loggerFactory.getLogger("sip.UserAgent"),this.loggerFactory.builtinEnabled=this.options.logBuiltinEnabled,this.loggerFactory.connector=this.options.logConnector,this.options.logLevel){case"error":this.loggerFactory.level=Sn.error;break;case"warn":this.loggerFactory.level=Sn.warn;break;case"log":this.loggerFactory.level=Sn.log;break;case"debug":this.loggerFactory.level=Sn.debug}if(this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(n=>{const r=this.options[n];switch(n){case"uri":case"sessionDescriptionHandlerFactory":this.logger.log("· "+n+": "+r);break;case"authorizationPassword":this.logger.log("· "+n+": NOT SHOWN");break;case"transportConstructor":this.logger.log("· "+n+": "+r.name);break;default:this.logger.log("· "+n+": "+JSON.stringify(r))}})),this.options.transportOptions){const n=this.options.transportOptions,r=n.maxReconnectionAttempts,i=n.reconnectionTimeout;r!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),i!==void 0&&this.logger.warn('The transport option "reconnectionTimeout" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),e.reconnectionDelay===void 0&&i!==void 0&&(this.options.reconnectionDelay=i),e.reconnectionAttempts===void 0&&r!==void 0&&(this.options.reconnectionAttempts=r)}if(e.reconnectionDelay!==void 0&&this.logger.warn('The user agent option "reconnectionDelay" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),e.reconnectionAttempts!==void 0&&this.logger.warn('The user agent option "reconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),this._transport=new this.options.transportConstructor(this.getLogger("sip.Transport"),this.options.transportOptions),this.initTransportCallbacks(),this._contact=this.initContact(),this._instanceId=this.options.instanceId?this.options.instanceId:Ka.newUUID(),Vn.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(e){return Vn.URIParse(e)}static defaultOptions(){return{allowLegacyNotifications:!1,authorizationHa1:"",authorizationPassword:"",authorizationUsername:"",delegate:{},contactName:"",contactParams:{transport:"ws"},displayName:"",forceRport:!1,gracefulShutdown:!0,hackAllowUnregisteredOptionTags:!1,hackIpInContact:!1,hackViaTcp:!1,instanceId:"",instanceIdAlwaysAdded:!1,logBuiltinEnabled:!0,logConfiguration:!0,logConnector:()=>{},logLevel:"log",noAnswerTimeout:60,preloadedRouteSet:[],reconnectionAttempts:0,reconnectionDelay:4,sendInitialProvisionalResponse:!0,sessionDescriptionHandlerFactory:gw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:xr.Unsupported,sipExtensionReplaces:xr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:y0,transportOptions:{},uri:new Ri("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/0.21.1",viaHost:""}}static newUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=Math.floor(16*Math.random());return(e==="x"?n:n%4+8).toString(16)})}static stripUndefinedProperties(e){return Object.keys(e).reduce((n,r)=>(e[r]!==void 0&&(n[r]=e[r]),n),{})}get configuration(){return this.options}get contact(){return this._contact}get instanceId(){return this._instanceId}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get transport(){return this._transport}get userAgentCore(){return this._userAgentCore}getLogger(e,n){return this.loggerFactory.getLogger(e,n)}getLoggerFactory(){return this.loggerFactory}isConnected(){return this.transport.isConnected()}reconnect(){return this.state===Rn.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===Rn.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(Rn.Started),this.transport.connect())}async stop(){if(this.state===Rn.Stopped)return this.logger.warn("User agent already stopped"),Promise.resolve();if(this.logger.log(`Stopping ${this.configuration.uri}`),!this.options.gracefulShutdown)return this.logger.log("Dispose of transport"),this.transport.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),this.userAgentCore.dispose(),this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this.transitionState(Rn.Stopped),Promise.resolve();const e=Object.assign({},this._publishers),n=Object.assign({},this._registerers),r=Object.assign({},this._sessions),i=Object.assign({},this._subscriptions),o=this.transport,A=this.userAgentCore;this.logger.log("Dispose of registerers");for(const a in n)n[a]&&await n[a].dispose().catch(s=>{throw this.logger.error(s.message),delete this._registerers[a],s});this.logger.log("Dispose of sessions");for(const a in r)r[a]&&await r[a].dispose().catch(s=>{throw this.logger.error(s.message),delete this._sessions[a],s});this.logger.log("Dispose of subscriptions");for(const a in i)i[a]&&await i[a].dispose().catch(s=>{throw this.logger.error(s.message),delete this._subscriptions[a],s});this.logger.log("Dispose of publishers");for(const a in e)e[a]&&await e[a].dispose().catch(s=>{throw this.logger.error(s.message),delete this._publishers[a],s});this.logger.log("Dispose of transport"),await o.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),A.dispose(),this.transitionState(Rn.Stopped)}_makeInviter(e,n){return new f0(this,e,n)}attemptReconnection(e=1){const n=this.options.reconnectionAttempts,r=this.options.reconnectionDelay;e>n?this.logger.log("Maximum reconnection attempts reached"):(this.logger.log(`Reconnection attempt ${e} of ${n} - trying`),setTimeout(()=>{this.reconnect().then(()=>{this.logger.log(`Reconnection attempt ${e} of ${n} - succeeded`)}).catch(i=>{this.logger.error(i.message),this.logger.log(`Reconnection attempt ${e} of ${n} - failed`),this.attemptReconnection(++e)})},e===1?0:1e3*r))}initContact(){const e=this.options.contactName!==""?this.options.contactName:Hi(8),n=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new Ri("sip",e,this.options.viaHost,void 0,n),toString:(r={})=>{const i=r.anonymous||!1,o=r.outbound||!1,A=r.register||!1;let a="<";return a+=i?this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${n.transport?n.transport:"ws"}`:A?this.contact.uri:this.contact.pubGruu||this.contact.uri,o&&(a+=";ob"),a+=">",this.options.instanceIdAlwaysAdded&&(a+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),a}}}initCore(){let e=[];e.push("outbound"),this.options.sipExtension100rel===xr.Supported&&e.push("100rel"),this.options.sipExtensionReplaces===xr.Supported&&e.push("replaces"),this.options.sipExtensionExtraSupported&&e.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(e=e.filter(o=>Ky[o])),e=Array.from(new Set(e));const n=e.slice();(this.contact.pubGruu||this.contact.tempGruu)&&n.push("gruu");const r={aor:this.options.uri,contact:this.contact,displayName:this.options.displayName,loggerFactory:this.loggerFactory,hackViaTcp:this.options.hackViaTcp,routeSet:this.options.preloadedRouteSet,supportedOptionTags:e,supportedOptionTagsResponse:n,sipjsId:this.options.sipjsId,userAgentHeaderFieldValue:this.options.userAgentString,viaForceRport:this.options.forceRport,viaHost:this.options.viaHost,authenticationFactory:()=>{const o=this.options.authorizationUsername?this.options.authorizationUsername:this.options.uri.user,A=this.options.authorizationPassword?this.options.authorizationPassword:void 0,a=this.options.authorizationHa1?this.options.authorizationHa1:void 0;return new Zy(this.getLoggerFactory(),a,o,A)},transportAccessor:()=>this.transport},i={onInvite:o=>{var A;const a=new Wc(this,o);if(o.delegate={onCancel:s=>{a._onCancel(s)},onTransportError:s=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},o.trying(),this.options.sipExtensionReplaces!==xr.Unsupported){const s=o.message.parseHeader("replaces");if(s){const l=s.call_id;if(typeof l!="string")throw new Error("Type of call id is not string");const u=s.replaces_to_tag;if(typeof u!="string")throw new Error("Type of to tag is not string");const d=s.replaces_from_tag;if(typeof d!="string")throw new Error("type of from tag is not string");const g=l+u+d,p=this.userAgentCore.dialogs.get(g);if(!p)return void a.reject({statusCode:481});if(!p.early&&s.early_only===!0)return void a.reject({statusCode:486});const V=this._sessions[l+d]||this._sessions[l+u]||void 0;if(!V)throw new Error("Session does not exist.");a._replacee=V}}if(!((A=this.delegate)===null||A===void 0)&&A.onInvite)return a.autoSendAnInitialProvisionalResponse?void a.progress().then(()=>{var s;if(((s=this.delegate)===null||s===void 0?void 0:s.onInvite)===void 0)throw new Error("onInvite undefined.");this.delegate.onInvite(a)}):void this.delegate.onInvite(a);a.reject({statusCode:486})},onMessage:o=>{if(this.delegate&&this.delegate.onMessage){const A=new d0(o);this.delegate.onMessage(A)}else o.accept()},onNotify:o=>{if(this.delegate&&this.delegate.onNotify){const A=new zc(o);this.delegate.onNotify(A)}else this.options.allowLegacyNotifications?o.accept():o.reject({statusCode:481})},onRefer:o=>{this.logger.warn("Received an out of dialog REFER request"),this.delegate&&this.delegate.onReferRequest?this.delegate.onReferRequest(o):o.reject({statusCode:405})},onRegister:o=>{this.logger.warn("Received an out of dialog REGISTER request"),this.delegate&&this.delegate.onRegisterRequest?this.delegate.onRegisterRequest(o):o.reject({statusCode:405})},onSubscribe:o=>{this.logger.warn("Received an out of dialog SUBSCRIBE request"),this.delegate&&this.delegate.onSubscribeRequest?this.delegate.onSubscribeRequest(o):o.reject({statusCode:405})}};return new dw(r,i)}initTransportCallbacks(){this.transport.onConnect=()=>this.onTransportConnect(),this.transport.onDisconnect=e=>this.onTransportDisconnect(e),this.transport.onMessage=e=>this.onTransportMessage(e)}onTransportConnect(){this.state!==Rn.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(e){this.state!==Rn.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(e),e&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(e){const n=Ha.parseMessage(e,this.getLogger("sip.Parser"));if(!n)return void this.logger.warn("Failed to parse incoming message. Dropping.");if(this.state===Rn.Stopped&&n instanceof Mo)return void this.logger.warn(`Received ${n.method} request while stopped. Dropping.`);const r=()=>{const i=["from","to","call_id","cseq","via"];for(const o of i)if(!n.hasHeader(o))return this.logger.warn(`Missing mandatory header field : ${o}.`),!1;return!0};if(n instanceof Mo){if(!r())return void this.logger.warn("Request missing mandatory header field. Dropping.");if(!n.toTag&&n.callId.substr(0,5)===this.options.sipjsId)return void this.userAgentCore.replyStateless(n,{statusCode:482});const i=BA(n.body),o=n.getHeader("content-length");if(o&&i<Number(o))return void this.userAgentCore.replyStateless(n,{statusCode:400})}if(n instanceof Bi){if(!r())return void this.logger.warn("Response missing mandatory header field. Dropping.");if(n.getHeaders("via").length>1)return void this.logger.warn("More than one Via header field present in the response. Dropping.");if(n.via.host!==this.options.viaHost||n.via.port!==void 0)return void this.logger.warn("Via sent-by in the response does not match UA Via host value. Dropping.");const i=BA(n.body),o=n.getHeader("content-length");if(o&&i<Number(o))return void this.logger.warn("Message body length is lower than the value in Content-Length header field. Dropping.")}if(n instanceof Mo)this.userAgentCore.receiveIncomingRequestFromTransport(n);else{if(!(n instanceof Bi))throw new Error("Invalid message type.");this.userAgentCore.receiveIncomingResponseFromTransport(n)}}transitionState(e,n){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${e}`)};switch(this._state){case Rn.Started:e!==Rn.Stopped&&r();break;case Rn.Stopped:e!==Rn.Started&&r();break;default:throw new Error("Unknown state.")}this.logger.log(`Transitioned from ${this._state} to ${e}`),this._state=e,this._stateEventEmitter.emit(this._state)}},S0=class{constructor(e){this.listeners=[],this.keyListeners={},this.data={...e},this.proxy=new Proxy(this.data,{set:(n,r,i)=>(n[r]!==i&&(n[r]=i,this.notify(),this.notifyKey(r,i)),!0)})}getState(){return this.proxy}setState(e,n=!1){let r=!1;for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=this.data[i],A=e[i];(n||o!==A)&&(this.data[i]=A,r=!0,this.notifyKey(i,A))}(r||n)&&this.notify()}subscribe(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter(n=>n!==e)}}subscribeKey(e,n){return this.keyListeners[e]||(this.keyListeners[e]=[]),this.keyListeners[e].push(n),()=>{this.keyListeners[e]=this.keyListeners[e].filter(r=>r!==n)}}notify(){const e=this.getState();for(const n of this.listeners)n(e)}notifyKey(e,n){const r=this.keyListeners[e];r&&r.forEach(i=>i(n))}};var bt,yn,rt,Cr,oe,Ge,Ht;(function(t){t[t.IDLE=1]="IDLE",t[t.BUSY=2]="BUSY",t[t.RINGING=3]="RINGING",t[t.OFFLINE=0]="OFFLINE",t[t.UNREGISTERED=4]="UNREGISTERED"})(bt||(bt={})),function(t){t.OUTGOING="outgoing",t.INCOMING="incoming",t.CONSULT="consult",t.MEETING="meeting",t.TRANSFER="transfer",t.PREDICT_OUT_CALL="predict_out_call"}(yn||(yn={})),function(t){t[t.OUT_CALL=100]="OUT_CALL",t[t.AGENT_STATE=101]="AGENT_STATE",t[t.OUT_CALL_INCOMING_CALL=102]="OUT_CALL_INCOMING_CALL",t[t.OUT_CALL_RINGING=103]="OUT_CALL_RINGING",t[t.OUT_CALL_ANSWER=104]="OUT_CALL_ANSWER",t[t.CALL_HOLD=105]="CALL_HOLD",t[t.CALL_UNHOLD=106]="CALL_UNHOLD",t[t.OUT_CALL_END=107]="OUT_CALL_END",t[t.CONSULT_REQUEST=108]="CONSULT_REQUEST",t[t.CONSULT_RINGING=109]="CONSULT_RINGING",t[t.CONSULT_ANSWER=110]="CONSULT_ANSWER",t[t.CONSULT_FAIL=111]="CONSULT_FAIL",t[t.MUTE=112]="MUTE",t[t.UNMUTE=113]="UNMUTE",t[t.CONSULT_CALL_IN=114]="CONSULT_CALL_IN",t[t.CONSULT_CALL_IN_SUCCESS=115]="CONSULT_CALL_IN_SUCCESS",t[t.CONSULT_RETURN_CALL=125]="CONSULT_RETURN_CALL",t[t.CONSULT_RETURN_CALL_SUCCESS=126]="CONSULT_RETURN_CALL_SUCCESS",t[t.CONSULT_TRANSFER=116]="CONSULT_TRANSFER",t[t.CONSULT_TRANSFER_FAILED=118]="CONSULT_TRANSFER_FAILED",t[t.CONSULT_TRANSFER_OFF_HOOK=117]="CONSULT_TRANSFER_OFF_HOOK",t[t.INCOMING_CALL=119]="INCOMING_CALL",t[t.INCOMING_CALL_OFF_HOOK=120]="INCOMING_CALL_OFF_HOOK",t[t.INCOMING_CALL_END=121]="INCOMING_CALL_END",t[t.SATISFACTION_EVALUATION=122]="SATISFACTION_EVALUATION",t[t.CONSULT_THREE_WAY=123]="CONSULT_THREE_WAY",t[t.CONSULT_THREE_WAY_RESULT=124]="CONSULT_THREE_WAY_RESULT",t[t.TRANSFER=127]="TRANSFER",t[t.TRANSFER_FAILED=128]="TRANSFER_FAILED",t[t.TRANSFER_INCOMING_CALL=129]="TRANSFER_INCOMING_CALL",t[t.TRANSFER_OFF_HOOK=130]="TRANSFER_OFF_HOOK",t[t.AGENT_HANGUP=131]="AGENT_HANGUP",t[t.KICK_OFFLINE=132]="KICK_OFFLINE",t[t.CONTINUOUS_NOT_ANSWER=133]="CONTINUOUS_NOT_ANSWER",t[t.PREVIEW_OUT_CALL=134]="PREVIEW_OUT_CALL",t[t.SIGN_OUT=135]="SIGN_OUT",t[t.SIGN_IN_SWITCH_DEVICE=136]="SIGN_IN_SWITCH_DEVICE",t[t.LISTEN_CALL_FAILED=137]="LISTEN_CALL_FAILED",t[t.LISTEN_INCOMING_CALL=138]="LISTEN_INCOMING_CALL",t[t.LISTEN_INCOMING_CALL_OFF_HOOK=139]="LISTEN_INCOMING_CALL_OFF_HOOK",t[t.EAR_SPEECH=140]="EAR_SPEECH",t[t.STOP_EAR_SPEECH=141]="STOP_EAR_SPEECH",t[t.CALL_FORCE_INSERT=142]="CALL_FORCE_INSERT",t[t.INTERNAL_CALL_START_CONSULT=145]="INTERNAL_CALL_START_CONSULT",t[t.INTERNAL_CALL_END_CONSULT=146]="INTERNAL_CALL_END_CONSULT",t[t.CALL_SIP_INCOMING_CALL=147]="CALL_SIP_INCOMING_CALL"}(rt||(rt={})),function(t){t.WEB_RTC_CONNECTING="connecting",t.WEB_RTC_CONNECTED="connected",t.WEB_RTC_DISCONNECTING="disconnecting",t.WEB_RTC_DISCONNECTED="disconnected",t.WEB_RTC_REGISTERED="registered",t.WEB_RTC_UNREGISTERED="unregistered",t.WEB_RTC_TERMINATED="terminated",t.WEB_RTC_REGISTER_FAILED="register_failed",t.WEB_RTC_ANSWER_FAILED="answer_failed",t.WEB_RTC_SEND_DTMF="send_dtmf"}(Cr||(Cr={})),function(t){t.CUSTOMER_INFO="customer_info",t.CALL_PROGRESS="call_progress",t.OUT_INCOMING_CALL="out_call_incoming_call",t.INTERNAL_OUT_INCOMING_CALL="internal_out_incoming_call",t.PREVIEW_OUT_INCOMING_CALL="preview_out_incoming_call",t.OUT_SUCCESS="out_call_success",t.OUT_FAILED="out_call_failed",t.OUT_RINGING="out_call_ringing",t.OUT_OFF_ANSWER="out_call_answer",t.INTERNAL_OUT_OFF_ANSWER="internal_out_call_answer",t.HOLD_SUCCESS="hold_success",t.HOLD_FAILED="hold_failed",t.UNHOLD_SUCCESS="unhold_success",t.UNHOLD_FAILED="unhold_failed",t.OUT_HANGUP="out_call_hangup",t.CONSULT_RINGING="consult_ringing",t.CONSULT_OFF_HOOK="consult_off_hook",t.CONSULT_FAILED="consult_failed",t.CONSULT_INCOMING="consult_incoming",t.CONSULT_CALL_IN_SUCCESS="consult_call_in_success",t.CONSULT_RETURN_CALL_SUCCESS="consult_return_call_success",t.OTHER_SIDE_CONSULT_HANGUP="other_side_consult_hangup",t.OUR_SIDE_CONSULT_HANGUP="our_side_consult_hangup",t.AGENT_STATE="agent_state",t.MUTE_SUCCESS="mute_success",t.MUTE_FAILED="mute_failed",t.UNMUTE_SUCCESS="unmute_success",t.UNMUTE_FAILED="unmute_failed",t.CONSULT_TRANSFER_SUCCESS="consult_transfer_success",t.CONSULT_TRANSFER_FAILED="consult_transfer_failed",t.CONSULT_TRANSFER_OFF_HOOK="consult_transfer_off_hook",t.INCOMING_CALL="incoming_call",t.INCOMING_CALL_IN="incoming_call_in",t.PREDICT_INCOMING_CALL="predict_incoming_call",t.DUAL_CALL_INCOMING_CALL="dual_call_incoming_call",t.INCOMING_CALL_OFF_HOOK="incoming_call_off_hook",t.INCOMING_CALL_IN_OFF_HOOK="incoming_call_in_off_hook",t.INCOMING_CALL_END="incoming_call_end",t.SATISFACTION_EVALUATION_SUCCESS="satisfaction_evaluation_success",t.SATISFACTION_EVALUATION_FAILED="satisfaction_evaluation_failed",t.CONSULT_THREE_WAY_SUCCESS="consult_three_way_success",t.CONSULT_THREE_WAY_FAILED="consult_three_way_failed",t.THREE_WAY_OUR_SIDE_HANGUP="three_way_our_side_hangup",t.TRANSFER_FAILED="transfer_failed",t.TRANSFER_PROGRESS="transfer_progress",t.TRANSFER_INCOMING_CALL="transfer_incoming_call",t.TRANSFER_OFF_HOOK="transfer_off_hook",t.TRANSFER_END="transfer_end",t.REJECT="reject",t.LISTEN_CALL_FAILED="listen_call_failed",t.LISTEN_INCOMING_CALL="listen_incoming_call",t.LISTEN_INCOMING_CALL_OFF_HOOK="listen_incoming_call_off_hook",t.LISTEN_HANGUP="listen_hangup",t.EAR_SPEECH_SUCCESS="ear_speech_success",t.EAR_SPEECH_BE_SUCCESS="ear_speech_be_success",t.EAR_SPEECH_FAILED="ear_speech_failed",t.STOP_EAR_SPEECH_SUCCESS="stop_ear_speech_success",t.STOP_EAR_SPEECH_FAILED="stop_ear_speech_failed",t.CALL_FORCE_INSERT_SUCCESS="call_force_insert_success",t.CALL_FORCE_INSERT_SUCCESS_LISTENER="call_force_insert_success_listener",t.CALL_FORCE_INSERT_FAILED="call_force_insert_failed",t.CALL_SIP_INCOMING_CALL="call_sip_incoming_call"}(oe||(oe={})),function(t){t.EVENT_ALL="event_all",t.NOTIFICATION_CLICK="notification_click",t.UPDATE_ANSWER_DEVICE="update_answer_device",t.PHONE_BAR_OPERATION="phone_bar_operation",t.AGENT_INIT_STATUS="agent_init_status",t.WEBSITE_DELAY="website_delay",t.SELECT_EXTERNAL_NUMBER="select_external_number",t.FAIL_NOTIFICATION="fail_notification",t.KICK_OFF="kick_off",t.DESTROY="destroy",t.NETWORK_OFFLINE="network_offline",t.NETWORK_ONLINE="network_online",t.SIGN_OUT="sign_out",t.SIGN_IN_SWITCH_DEVICE="sign_in_switch_device"}(Ge||(Ge={})),function(t){t.RINGING="客户振铃",t.AGENT_RINGING="振铃中",t.CALLING="通话中",t.CONSULTING="正在咨询",t.CONSULT_CALL_IN="咨询来电",t.INCOMING_CALL="客户来电",t.MEETING="会议中",t.TRANSFERRING="转接中",t.TRANSFER_INCOMING_CALL="转接来电",t.HOLDING="保持中",t.MUTING="静音中",t.LISTENING="监听来电",t.LINKING="正在链接",t.OTHER_SIDE_CONSULTING="对方正咨询"}(Ht||(Ht={}));const oA={all:mi=mi||new Map,on:function(t,e){var n=mi.get(t);n?n.push(e):mi.set(t,[e])},off:function(t,e){var n=mi.get(t);n&&(e?n.splice(n.indexOf(e)>>>0,1):mi.set(t,[]))},emit:function(t,e){var n=mi.get(t);n&&n.slice().map(function(r){r(e)}),(n=mi.get("*"))&&n.slice().map(function(r){r(t,e)})}};var mi;const ge={on:(t,e)=>(oA.on(t,e),ge),off(t,e){oA.off(t,e)},emit(t,e){oA.emit(t,e),oA.emit(Ge.EVENT_ALL,{event:t,data:e})},clearAllListeners(){oA.all.clear()}},J={agentInfo:{},isRtcReconnecting:!1,sessionId:"",enableBrowserAlert:!1,autoStateTimer:null,autoAnswerTimer:null,logBuiltinEnabled:!1,browserAlertTime:3e3,latency:0,monitoredAgentNo:"",earSpeakAgent:"",stateObject:{state:bt.BUSY,state_name:"忙碌"}},pr={isCalling:!1,direction:null,outCallIsAnswer:!1,incomingIsAnswer:!1,transferIsAnswer:!1,isMeeting:!1,isHold:!1,displayText:"",isMuted:!1,consultIsAnswer:!1,actionConfigs:[],answerDevice:1,selectOutNumber:"",customerObject:void 0,isNextState:!0,isSipConnected:!1},P=new class extends S0{updateIsCalling(t){this.setState({isCalling:t})}updateDirection(t){this.setState({direction:t})}updateOutCallIsAnswer(t){this.setState({outCallIsAnswer:t})}updateIsHold(t){var n;if(((n=J.stateObject)==null?void 0:n.state)===bt.UNREGISTERED)return;const e=this.get("actionConfigs");if(t){const r=[...e.filter(i=>i!=="hold")];r.push("unhold"),this.updateActionConfigs(r)}else{const r=[...e.filter(i=>i!=="unhold")];r.push("hold"),this.updateActionConfigs(r)}this.getState().isHold=t}updateDisplayText(t){this.setState({displayText:t}),ge.emit(oe.CALL_PROGRESS,t)}updateActionConfigs(t,e=!0){const{show_satisfaction:n}=J.agentInfo||{},r=this.get("answerDevice"),i=t.filter(o=>(n!==0||o!=="satisfaction"||!e)&&(r!==2||o!=="answer"));this.setState({actionConfigs:i}),ge.emit(Ge.PHONE_BAR_OPERATION,i)}updateConsultIsAnswer(t){this.setState({consultIsAnswer:t})}updateIsMuted(t){var n;if(((n=J.stateObject)==null?void 0:n.state)===bt.UNREGISTERED)return;const e=this.get("actionConfigs");if(t){const r=[...e.filter(i=>i!=="mute")];r.push("unmute"),this.updateActionConfigs(r)}else{const r=[...e.filter(i=>i!=="unmute")];r.push("mute"),this.updateActionConfigs(r)}this.setState({isMuted:t})}updateIncomingIsAnswer(t){this.setState({incomingIsAnswer:t})}updateAnswerDevice(t){this.setState({answerDevice:t}),ge.emit(Ge.UPDATE_ANSWER_DEVICE,t)}updateIsMeeting(t){this.setState({isMeeting:t})}updateTransferIsAnswer(t){this.setState({transferIsAnswer:t})}updateSelectOutNumber(t){ge.emit(Ge.SELECT_EXTERNAL_NUMBER,t),this.setState({selectOutNumber:t})}updateCustomerInfo(t){const e=this.get("displayText");if(t&&e){const{contact_count:n,customer_name:r,phone:i,city:o,province:A,is_vip:a,in_contact_count:s,trace_id:l,contact_count_month:u,in_contact_count_month:d}=t;ge.emit(oe.CUSTOMER_INFO,{customer_name:r||"未知客户",phone:i,city:o||"未知",province:A||"未知",contact_count:n||0,in_contact_count:s||0,is_vip:a,trace_id:l,contact_count_month:u||0,in_contact_count_month:d||0})}else ge.emit(oe.CUSTOMER_INFO,void 0);this.setState({customerObject:t})}updateIsNextState(t){this.setState({isNextState:t}),t?ge.emit(Ge.NETWORK_ONLINE):(J.stateObject={state:bt.OFFLINE,state_name:"离线"},this.updateActionConfigs([]),ge.emit(oe.AGENT_STATE,J.stateObject),ge.emit(Ge.NETWORK_OFFLINE))}updateIsSipConnected(t){this.setState({isSipConnected:t})}reset(){this.updateAnswerDevice(1),this.updateIsCalling(pr.isCalling),this.updateDirection(pr.direction),this.updateOutCallIsAnswer(pr.outCallIsAnswer),this.updateIsHold(pr.isHold),this.updateDisplayText(pr.displayText),this.updateActionConfigs(pr.actionConfigs),this.updateConsultIsAnswer(pr.consultIsAnswer),this.updateIsMuted(pr.isMuted),this.updateIncomingIsAnswer(pr.incomingIsAnswer),this.updateIsMeeting(pr.isMeeting),this.updateTransferIsAnswer(pr.transferIsAnswer),this.updateCustomerInfo(void 0)}getCallInfo(){return this.getState()}get(t){return this.getState()[t]}}(pr),I0=new class extends S0{updateRttObject(t){this.setState({rttObject:t}),ge.emit(Ge.WEBSITE_DELAY,t)}}({rttObject:{rtt:null,jitter:null,packetsLost:null,packetsReceived:null,packetsSent:null,sendBitrate:null,recvBitrate:null,codec:null}});let fw=class{constructor(e,n){this.config=e,this.eventCallback=n,this.userAgent=null,this.registerer=null,this.activeSession=null,this.callTimeoutTimer=null,this.incomingInvitation=null,this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.reconnectTimer=null,this.isOffline=!1,this.isManuallyStopped=!1,this.registerInterval=6e4,this.handleNetworkInfoChange=r=>{var i,o;(i=r.rttObject)!=null&&i.rtt&&((((o=r.rttObject)==null?void 0:o.rtt)||-1)===-1?this.isOffline||(this.isOffline=!0,this.handleOffline()):this.isOffline&&(this.isOffline=!1,this.handleOnline()))},this.handleOffline=()=>{console.warn("[SIPClient] 网络断开,准备销毁 SIP 客户端",new Date().toLocaleString()),ge.emit(Ge.FAIL_NOTIFICATION,"网络断开,准备销毁 SIP 客户端"),this.destroy()},this.handleOnline=()=>{console.warn("[SIPClient] 网络恢复,准备重新启动 SIP 客户端",new Date().toLocaleString()),this.reconnect()},this.sleep=r=>new Promise(i=>setTimeout(i,r)),I0.subscribe(this.handleNetworkInfoChange)}async start(){const e=xf.makeURI(`sip:${this.config.user}@${this.config.server}`);if(!e)throw new Error("无效的SIP配置");const n={uri:e,authorizationUsername:this.config.user,authorizationPassword:this.config.password,sendInitialProvisionalResponse:!1,transportOptions:{server:this.config.webSocket,connectionTimeout:10,keepAliveInterval:20,keepAliveDebounce:10},contactName:this.config.user,contactParams:{transport:"wss"},userAgentString:"SwiftSIP/2.0.21",sessionDescriptionHandlerFactoryOptions:{alwaysAcquireMediaFirst:!0,peerConnectionConfiguration:{iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceCandidatePoolSize:0,iceTransportPolicy:"all",rtcpMuxPolicy:"require",bundlePolicy:"balanced",certificates:void 0,peerIdentity:void 0},iceGatheringTimeout:1e3},logBuiltinEnabled:J.logBuiltinEnabled};this.userAgent=new xf(n),this.setupEventListeners(),await this.userAgent.start(),await this.register()}setupEventListeners(){this.userAgent&&(this.userAgent.transport.stateChange.addListener(e=>{var r;let n;switch(e){case dt.Connecting:n=Cr.WEB_RTC_CONNECTING;break;case dt.Connected:n=Cr.WEB_RTC_CONNECTED,this.reconnectAttempts=0,J.isRtcReconnecting=!1,P.updateIsSipConnected(!0),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);break;case dt.Disconnecting:n=Cr.WEB_RTC_DISCONNECTING,P.updateIsSipConnected(!1);break;case dt.Disconnected:{if(P.updateIsSipConnected(!1),this.isManuallyStopped)return void console.warn("[SIP] 手动断开,不触发重连");ge.emit(Ge.FAIL_NOTIFICATION,"软电话链接失败"),n=Cr.WEB_RTC_DISCONNECTED;const i=P.get("answerDevice");if(!J.isRtcReconnecting&&this.reconnectAttempts<this.maxReconnectAttempts&&i===1){this.reconnectAttempts++;const o=1e3*this.reconnectAttempts;console.warn(`SIP WebSocket 断开,第 ${this.reconnectAttempts} 次尝试重连,${o}ms 后重试...`),this.reconnectTimer=setTimeout(()=>{this.reconnect()},o)}else this.reconnectAttempts>=this.maxReconnectAttempts&&(console.error("SIP 重连失败:已达到最大重试次数"),ge.emit(Ge.FAIL_NOTIFICATION,"SIP 重连失败:已达到最大重试次数"));break}default:P.updateIsSipConnected(!1),n="unknown"}(r=this.eventCallback)==null||r.call(this,{type:n})}),this.userAgent.delegate={onInvite:e=>{this.handleIncomingCall(e)}})}async refreshRegister(){if(this.registerer)try{await this.registerer.register(),new Date().toLocaleTimeString()}catch(e){console.error("[SIPClient] REGISTER刷新失败",e)}}async register(){var e,n;if(this.userAgent){this.registerer=new Xc(this.userAgent,{expires:120,refreshFrequency:80}),(e=this.registerer)==null||e.stateChange.addListener(r=>{var o;let i;switch(r){case kt.Initial:P.updateDisplayText(Ht.LINKING),i="initial";break;case kt.Registered:P.updateDisplayText(""),i=Cr.WEB_RTC_REGISTERED;break;case kt.Unregistered:i=Cr.WEB_RTC_UNREGISTERED;break;case kt.Terminated:i=Cr.WEB_RTC_TERMINATED;break;default:i="unknown"}(o=this.eventCallback)==null||o.call(this,{type:i})});try{await this.registerer.register()}catch(r){(n=this.eventCallback)==null||n.call(this,{type:Cr.WEB_RTC_REGISTER_FAILED,data:r})}}}attachRemoteAudio(e){const n=e.sessionDescriptionHandler;if(n){const r=n.peerConnection;if(!r)return;const i=new MediaStream;r.getReceivers().forEach(A=>{A.track&&A.track.kind==="audio"&&i.addTrack(A.track)});let o=document.getElementById("sip-remote-audio");o||(o=document.createElement("audio"),o.id="sip-remote-audio",o.autoplay=!0,o.style.display="none",document.body.appendChild(o)),o.srcObject=i,o.play().catch(A=>{console.error("音频播放失败,需要用户交互触发",A)})}}handleSessionState(e,n,r){e.stateChange.addListener(i=>{switch(i){case he.Established:clearTimeout(this.callTimeoutTimer),this.activeSession=e,this.attachRemoteAudio(e);break;case he.Terminating:break;case he.Terminated:this.activeSession=null,clearTimeout(this.callTimeoutTimer);case he.Establishing:}})}handleIncomingCall(e){this.incomingInvitation=e,this.handleSessionState(e,!1),e.progress({statusCode:180,reasonPhrase:"Ringing"}).catch(n=>console.error("发送 180 失败",n)),P.get("direction")===yn.OUTGOING&&this.answerCall()}async answerCall(){var e;if(!this.incomingInvitation)throw new Error("无来电可接听");J.autoAnswerTimer&&(clearTimeout(J.autoAnswerTimer),J.autoAnswerTimer=null);try{await this.incomingInvitation.accept(),this.activeSession=this.incomingInvitation,this.incomingInvitation=null}catch(n){(e=this.eventCallback)==null||e.call(this,{type:Cr.WEB_RTC_ANSWER_FAILED,data:{detail:n}})}}async rejectInCall(){var e;if(this.incomingInvitation)try{await this.incomingInvitation.reject(),this.incomingInvitation=null,P.updateDirection(null),P.updateIsCalling(!1),clearTimeout(this.callTimeoutTimer)}catch(n){(e=this.eventCallback)==null||e.call(this,{type:"error",data:{message:"拒接失败",detail:n}})}}sendDTMF(e){var r;if(!this.activeSession)throw new Error("当前没有活跃的通话");const n=this.activeSession.sessionDescriptionHandler;n&&typeof n.sendDtmf=="function"?(n.sendDtmf(e),(r=this.eventCallback)==null||r.call(this,{type:Cr.WEB_RTC_SEND_DTMF,data:{tone:e}})):console.warn("DTMF发送不支持或未初始化")}async hangup(){if(this.activeSession,this.activeSession){clearTimeout(this.callTimeoutTimer);const e=this.activeSession;if(!e)return;const n=e.state;try{n===he.Established?await e.bye():n===he.Establishing&&(e instanceof f0?await e.cancel():e instanceof Wc&&await e.reject()),clearTimeout(this.callTimeoutTimer)}catch(r){console.error("挂断失败",r)}finally{this.activeSession=null}}}async rejectOutCall(){this.activeSession instanceof Wc&&(await this.activeSession.reject(),this.activeSession=null)}async destroy(){if(this.isManuallyStopped=!0,clearTimeout(this.callTimeoutTimer),this.activeSession&&await this.hangup(),this.registerer){try{await this.registerer.unregister()}catch(e){console.warn("注销失败",e)}this.registerer=null}this.userAgent&&(await this.userAgent.stop(),this.userAgent=null)}async reconnect(){if(!J.isRtcReconnecting){J.isRtcReconnecting=!0;try{await this.destroy(),this.isManuallyStopped=!1,await this.start(),this.isOffline=!1,this.reconnectAttempts=0}catch(e){console.error("重连失败",e),J.isRtcReconnecting=!1}finally{J.isRtcReconnecting=!1}}}async getNetworkStats(){var e;if(this.activeSession){const n=(e=this.activeSession.sessionDescriptionHandler)==null?void 0:e.peerConnection;if(!n)return null;const r=await n.getStats(),i={};return r.forEach(o=>{o.type==="candidate-pair"&&o.state==="succeeded"&&o.currentRoundTripTime!=null&&(i.rtt=+(1e3*o.currentRoundTripTime).toFixed(2)),o.type==="inbound-rtp"&&o.kind==="audio"&&(i.jitter=+(1e3*o.jitter).toFixed(2),i.packetsLost=o.packetsLost,i.packetsReceived=o.packetsReceived,o.bytesReceived&&o.timestamp&&(i.recvBitrate=+(o.bytesReceived/1024).toFixed(2))),o.type==="outbound-rtp"&&o.kind==="audio"&&(i.packetsSent=o.packetsSent,o.bytesSent&&o.timestamp&&(i.sendBitrate=+(o.bytesSent/1024).toFixed(2))),o.type==="codec"&&o.mimeType&&(i.codec=o.mimeType)}),{...i,rtt:(i==null?void 0:i.rtt)||40}}return{rtt:J.latency||1}}};class Tf extends Error{constructor(n,r,i){const o=`${n.status||n.status===0?n.status:""} ${n.statusText||""}`.trim();super(`Request failed with ${o?`status code ${o}`:"an unknown error"}: ${r.method} ${r.url}`);Pr(this,"response");Pr(this,"request");Pr(this,"options");this.name="HTTPError",this.response=n,this.request=r,this.options=i}}let Bf=class extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);Pr(this,"request");this.name="TimeoutError",this.request=n}};const Of=(()=>{let t=!1,e=!1;const n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(n&&r)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return t&&!e})(),hw=typeof globalThis.AbortController=="function",pw=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",mw=typeof globalThis.ReadableStream=="function",Vw=typeof globalThis.FormData=="function",b0=["get","post","put","patch","head","delete"],vw={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Df=2147483647,Cw=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,M0=Symbol("stop"),qw={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},Ew={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},yw=(t,e)=>{const n=(i=>{if(!i)return 0;if(i instanceof FormData){let o=0;for(const[A,a]of i)o+=Cw,o+=new TextEncoder().encode(`Content-Disposition: form-data; name="${A}"`).length,o+=typeof a=="string"?new TextEncoder().encode(a).length:a.size;return o}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const o=JSON.stringify(i);return new TextEncoder().encode(o).length}catch{return 0}return 0})(t.body);let r=0;return new Request(t,{duplex:"half",body:new ReadableStream({async start(i){const o=t.body instanceof ReadableStream?t.body.getReader():new Response("").body.getReader();await async function A(){const{done:a,value:s}=await o.read();if(a)return e&&e({percent:1,transferredBytes:r,totalBytes:Math.max(n,r)},new Uint8Array),void i.close();r+=s.byteLength;let l=n===0?0:r/n;(n<r||l===1)&&(l=.99),e&&e({percent:Number(l.toFixed(2)),transferredBytes:r,totalBytes:n},s),i.enqueue(s),await A()}()}})})},uA=t=>t!==null&&typeof t=="object",qa=(...t)=>{for(const e of t)if((!uA(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Gd({},...t)},R0=(t={},e={})=>{const n=new globalThis.Headers(t),r=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[o,A]of i.entries())r&&A==="undefined"||A===void 0?n.delete(o):n.set(o,A);return n};function Ea(t,e,n){return Object.hasOwn(e,n)&&e[n]===void 0?[]:Gd(t[n]??[],e[n]??[])}const x0=(t={},e={})=>({beforeRequest:Ea(t,e,"beforeRequest"),beforeRetry:Ea(t,e,"beforeRetry"),afterResponse:Ea(t,e,"afterResponse"),beforeError:Ea(t,e,"beforeError")}),Gd=(...t)=>{let e={},n={},r={};for(const i of t)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(uA(i)){for(let[o,A]of Object.entries(i))uA(A)&&o in e&&(A=Gd(e[o],A)),e={...e,[o]:A};uA(i.hooks)&&(r=x0(r,i.hooks),e.hooks=r),uA(i.headers)&&(n=R0(n,i.headers),e.headers=n)}return e},ww=t=>b0.includes(t)?t.toUpperCase():t,Nf={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},Sw=(t={})=>{if(typeof t=="number")return{...Nf,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...Nf,...t}};class ls{constructor(e,n={}){Pr(this,"request");Pr(this,"abortController");Pr(this,"_retryCount",0);Pr(this,"_input");Pr(this,"_options");var r,i;if(this._input=e,this._options={...n,headers:R0(this._input.headers,n.headers),hooks:x0({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:ww(n.method??this._input.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:Sw(n.retry),throwHttpErrors:n.throwHttpErrors!==!1,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(hw&&pw){const o=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=o?AbortSignal.any([o,this.abortController.signal]):this.abortController.signal}if(Of&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((i=(r=this._options).stringifyJson)==null?void 0:i.call(r,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),A=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);!(Vw&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(A,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Of)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=yw(this.request,this._options.onUploadProgress))}}static create(e,n){const r=new ls(e,n),i=async()=>{if(typeof r._options.timeout=="number"&&r._options.timeout>Df)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let A=await r._fetch();for(const a of r._options.hooks.afterResponse){const s=await a(r.request,r._options,r._decorateResponse(A.clone()));s instanceof globalThis.Response&&(A=s)}if(r._decorateResponse(A),!A.ok&&r._options.throwHttpErrors){let a=new Tf(A,r.request,r._options);for(const s of r._options.hooks.beforeError)a=await s(a);throw a}if(r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!mw)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return((a,s)=>{const l=Number(a.headers.get("content-length"))||0;let u=0;return a.status===204?(s&&s({percent:1,totalBytes:l,transferredBytes:u},new Uint8Array),new Response(null,{status:a.status,statusText:a.statusText,headers:a.headers})):new Response(new ReadableStream({async start(d){const g=a.body.getReader();s&&s({percent:0,transferredBytes:0,totalBytes:l},new Uint8Array),await async function p(){const{done:V,value:v}=await g.read();V?d.close():(s&&(u+=v.byteLength,s({percent:l===0?0:u/l,transferredBytes:u,totalBytes:l},v)),d.enqueue(v),await p())}()}}),{status:a.status,statusText:a.statusText,headers:a.headers})})(A.clone(),r._options.onDownloadProgress)}return A},o=(r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i()).finally(async()=>{var A;r.request.bodyUsed||await((A=r.request.body)==null?void 0:A.cancel())});for(const[A,a]of Object.entries(vw))o[A]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||a);const s=await o;if(A==="json"){if(s.status===204||(await s.clone().arrayBuffer()).byteLength===0)return"";if(n.parseJson)return n.parseJson(await s.text())}return s[A]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof Bf)throw e;if(e instanceof Tf){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const r=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(r&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=1e3*Number(r);Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const o=this._options.retry.maxRetryAfter??i;return i<o?i:o}if(e.response.status===413)throw e}const n=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,n)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(n){const r=Math.min(this._calculateRetryDelay(n),Df);if(this._retryCount<1)throw n;await async function(i,{signal:o}){return new Promise((A,a)=>{function s(){clearTimeout(l),a(o.reason)}o&&(o.throwIfAborted(),o.addEventListener("abort",s,{once:!0}));const l=setTimeout(()=>{o==null||o.removeEventListener("abort",s),A()},i)})}(r,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===M0)return;return this._retry(e)}}async _fetch(){for(const r of this._options.hooks.beforeRequest){const i=await r(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=((r,i)=>{const o={};for(const A in i)A in Ew||A in qw||A in r||(o[A]=i[A]);return o})(this.request,this._options),n=this.request;return this.request=n.clone(),this._options.timeout===!1?this._options.fetch(n,e):async function(r,i,o,A){return new Promise((a,s)=>{const l=setTimeout(()=>{o&&o.abort(),s(new Bf(r))},A.timeout);A.fetch(r,i).then(a).catch(s).then(()=>{clearTimeout(l)})})}(n,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const $c=t=>{const e=(n,r)=>ls.create(n,qa(t,r));for(const n of b0)e[n]=(r,i)=>ls.create(r,qa(t,i,{method:n}));return e.create=n=>$c(qa(n)),e.extend=n=>(typeof n=="function"&&(n=n(t??{})),$c(qa(t,n))),e.stop=M0,e};var Pl,Iw=$c(),bw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},T0={exports:{}};/**
|
|
156
156
|
* [js-md5]{@link https://github.com/emn178/js-md5}
|
|
157
157
|
*
|
|
158
158
|
* @namespace md5
|
|
@@ -160,7 +160,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
160
160
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
161
161
|
* @copyright Chen, Yi-Cyuan 2014-2023
|
|
162
162
|
* @license MIT
|
|
163
|
-
*/Pl=T0,function(){var t="input is invalid type",e=typeof window=="object",n=e?window:{};n.JS_MD5_NO_WINDOW&&(e=!1);var r=!e&&typeof self=="object",i=!n.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;i?n=bw:r&&(n=self);var o,A=!n.JS_MD5_NO_COMMON_JS&&Pl.exports,a=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",s="0123456789abcdef".split(""),l=[128,32768,8388608,-2147483648],u=[0,8,16,24],d=["hex","array","digest","buffer","arrayBuffer","base64"],g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),p=[];if(a){var V=new ArrayBuffer(68);o=new Uint8Array(V),p=new Uint32Array(V)}var v=Array.isArray;!n.JS_MD5_NO_NODE_JS&&v||(v=function(q){return Object.prototype.toString.call(q)==="[object Array]"});var m=ArrayBuffer.isView;!a||!n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&m||(m=function(q){return typeof q=="object"&&q.buffer&&q.buffer.constructor===ArrayBuffer});var C=function(q){var E=typeof q;if(E==="string")return[q,!0];if(E!=="object"||q===null)throw new Error(t);if(a&&q.constructor===ArrayBuffer)return[new Uint8Array(q),!1];if(!v(q)&&!m(q))throw new Error(t);return[q,!1]},w=function(q){return function(E){return new I(!0).update(E)[q]()}},S=function(q){var E,h=wf,y=wf.Buffer;return E=y.from&&!n.JS_MD5_NO_BUFFER_FROM?y.from:function(x){return new y(x)},function(x){if(typeof x=="string")return h.createHash("md5").update(x,"utf8").digest("hex");if(x==null)throw new Error(t);return x.constructor===ArrayBuffer&&(x=new Uint8Array(x)),v(x)||m(x)||x.constructor===y?h.createHash("md5").update(E(x)).digest("hex"):q(x)}},M=function(q){return function(E,h){return new f(E,!0).update(h)[q]()}};function I(q){if(q)p[0]=p[16]=p[1]=p[2]=p[3]=p[4]=p[5]=p[6]=p[7]=p[8]=p[9]=p[10]=p[11]=p[12]=p[13]=p[14]=p[15]=0,this.blocks=p,this.buffer8=o;else if(a){var E=new ArrayBuffer(68);this.buffer8=new Uint8Array(E),this.blocks=new Uint32Array(E)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function f(q,E){var h,y=C(q);if(q=y[0],y[1]){var x,b=[],B=q.length,O=0;for(h=0;h<B;++h)(x=q.charCodeAt(h))<128?b[O++]=x:x<2048?(b[O++]=192|x>>>6,b[O++]=128|63&x):x<55296||x>=57344?(b[O++]=224|x>>>12,b[O++]=128|x>>>6&63,b[O++]=128|63&x):(x=65536+((1023&x)<<10|1023&q.charCodeAt(++h)),b[O++]=240|x>>>18,b[O++]=128|x>>>12&63,b[O++]=128|x>>>6&63,b[O++]=128|63&x);q=b}q.length>64&&(q=new I(!0).update(q).array());var N=[],F=[];for(h=0;h<64;++h){var j=q[h]||0;N[h]=92^j,F[h]=54^j}I.call(this,E),this.update(F),this.oKeyPad=N,this.inner=!0,this.sharedMemory=E}I.prototype.update=function(q){if(this.finalized)throw new Error("finalize already called");var E=C(q);q=E[0];for(var h,y,x=E[1],b=0,B=q.length,O=this.blocks,N=this.buffer8;b<B;){if(this.hashed&&(this.hashed=!1,O[0]=O[16],O[16]=O[1]=O[2]=O[3]=O[4]=O[5]=O[6]=O[7]=O[8]=O[9]=O[10]=O[11]=O[12]=O[13]=O[14]=O[15]=0),x)if(a)for(y=this.start;b<B&&y<64;++b)(h=q.charCodeAt(b))<128?N[y++]=h:h<2048?(N[y++]=192|h>>>6,N[y++]=128|63&h):h<55296||h>=57344?(N[y++]=224|h>>>12,N[y++]=128|h>>>6&63,N[y++]=128|63&h):(h=65536+((1023&h)<<10|1023&q.charCodeAt(++b)),N[y++]=240|h>>>18,N[y++]=128|h>>>12&63,N[y++]=128|h>>>6&63,N[y++]=128|63&h);else for(y=this.start;b<B&&y<64;++b)(h=q.charCodeAt(b))<128?O[y>>>2]|=h<<u[3&y++]:h<2048?(O[y>>>2]|=(192|h>>>6)<<u[3&y++],O[y>>>2]|=(128|63&h)<<u[3&y++]):h<55296||h>=57344?(O[y>>>2]|=(224|h>>>12)<<u[3&y++],O[y>>>2]|=(128|h>>>6&63)<<u[3&y++],O[y>>>2]|=(128|63&h)<<u[3&y++]):(h=65536+((1023&h)<<10|1023&q.charCodeAt(++b)),O[y>>>2]|=(240|h>>>18)<<u[3&y++],O[y>>>2]|=(128|h>>>12&63)<<u[3&y++],O[y>>>2]|=(128|h>>>6&63)<<u[3&y++],O[y>>>2]|=(128|63&h)<<u[3&y++]);else if(a)for(y=this.start;b<B&&y<64;++b)N[y++]=q[b];else for(y=this.start;b<B&&y<64;++b)O[y>>>2]|=q[b]<<u[3&y++];this.lastByteIndex=y,this.bytes+=y-this.start,y>=64?(this.start=y-64,this.hash(),this.hashed=!0):this.start=y}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},I.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var q=this.blocks,E=this.lastByteIndex;q[E>>>2]|=l[3&E],E>=56&&(this.hashed||this.hash(),q[0]=q[16],q[16]=q[1]=q[2]=q[3]=q[4]=q[5]=q[6]=q[7]=q[8]=q[9]=q[10]=q[11]=q[12]=q[13]=q[14]=q[15]=0),q[14]=this.bytes<<3,q[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},I.prototype.hash=function(){var q,E,h,y,x,b,B=this.blocks;this.first?E=((E=((q=((q=B[0]-680876937)<<7|q>>>25)-271733879|0)^(h=((h=(-271733879^(y=((y=(-1732584194^2004318071&q)+B[1]-117830708)<<12|y>>>20)+q|0)&(-271733879^q))+B[2]-1126478375)<<17|h>>>15)+y|0)&(y^q))+B[3]-1316259209)<<22|E>>>10)+h|0:(q=this.h0,E=this.h1,h=this.h2,E=((E+=((q=((q+=((y=this.h3)^E&(h^y))+B[0]-680876936)<<7|q>>>25)+E|0)^(h=((h+=(E^(y=((y+=(h^q&(E^h))+B[1]-389564586)<<12|y>>>20)+q|0)&(q^E))+B[2]+606105819)<<17|h>>>15)+y|0)&(y^q))+B[3]-1044525330)<<22|E>>>10)+h|0),E=((E+=((q=((q+=(y^E&(h^y))+B[4]-176418897)<<7|q>>>25)+E|0)^(h=((h+=(E^(y=((y+=(h^q&(E^h))+B[5]+1200080426)<<12|y>>>20)+q|0)&(q^E))+B[6]-1473231341)<<17|h>>>15)+y|0)&(y^q))+B[7]-45705983)<<22|E>>>10)+h|0,E=((E+=((q=((q+=(y^E&(h^y))+B[8]+1770035416)<<7|q>>>25)+E|0)^(h=((h+=(E^(y=((y+=(h^q&(E^h))+B[9]-1958414417)<<12|y>>>20)+q|0)&(q^E))+B[10]-42063)<<17|h>>>15)+y|0)&(y^q))+B[11]-1990404162)<<22|E>>>10)+h|0,E=((E+=((q=((q+=(y^E&(h^y))+B[12]+1804603682)<<7|q>>>25)+E|0)^(h=((h+=(E^(y=((y+=(h^q&(E^h))+B[13]-40341101)<<12|y>>>20)+q|0)&(q^E))+B[14]-1502002290)<<17|h>>>15)+y|0)&(y^q))+B[15]+1236535329)<<22|E>>>10)+h|0,E=((E+=((y=((y+=(E^h&((q=((q+=(h^y&(E^h))+B[1]-165796510)<<5|q>>>27)+E|0)^E))+B[6]-1069501632)<<9|y>>>23)+q|0)^q&((h=((h+=(q^E&(y^q))+B[11]+643717713)<<14|h>>>18)+y|0)^y))+B[0]-373897302)<<20|E>>>12)+h|0,E=((E+=((y=((y+=(E^h&((q=((q+=(h^y&(E^h))+B[5]-701558691)<<5|q>>>27)+E|0)^E))+B[10]+38016083)<<9|y>>>23)+q|0)^q&((h=((h+=(q^E&(y^q))+B[15]-660478335)<<14|h>>>18)+y|0)^y))+B[4]-405537848)<<20|E>>>12)+h|0,E=((E+=((y=((y+=(E^h&((q=((q+=(h^y&(E^h))+B[9]+568446438)<<5|q>>>27)+E|0)^E))+B[14]-1019803690)<<9|y>>>23)+q|0)^q&((h=((h+=(q^E&(y^q))+B[3]-187363961)<<14|h>>>18)+y|0)^y))+B[8]+1163531501)<<20|E>>>12)+h|0,E=((E+=((y=((y+=(E^h&((q=((q+=(h^y&(E^h))+B[13]-1444681467)<<5|q>>>27)+E|0)^E))+B[2]-51403784)<<9|y>>>23)+q|0)^q&((h=((h+=(q^E&(y^q))+B[7]+1735328473)<<14|h>>>18)+y|0)^y))+B[12]-1926607734)<<20|E>>>12)+h|0,E=((E+=((b=(y=((y+=((x=E^h)^(q=((q+=(x^y)+B[5]-378558)<<4|q>>>28)+E|0))+B[8]-2022574463)<<11|y>>>21)+q|0)^q)^(h=((h+=(b^E)+B[11]+1839030562)<<16|h>>>16)+y|0))+B[14]-35309556)<<23|E>>>9)+h|0,E=((E+=((b=(y=((y+=((x=E^h)^(q=((q+=(x^y)+B[1]-1530992060)<<4|q>>>28)+E|0))+B[4]+1272893353)<<11|y>>>21)+q|0)^q)^(h=((h+=(b^E)+B[7]-155497632)<<16|h>>>16)+y|0))+B[10]-1094730640)<<23|E>>>9)+h|0,E=((E+=((b=(y=((y+=((x=E^h)^(q=((q+=(x^y)+B[13]+681279174)<<4|q>>>28)+E|0))+B[0]-358537222)<<11|y>>>21)+q|0)^q)^(h=((h+=(b^E)+B[3]-722521979)<<16|h>>>16)+y|0))+B[6]+76029189)<<23|E>>>9)+h|0,E=((E+=((b=(y=((y+=((x=E^h)^(q=((q+=(x^y)+B[9]-640364487)<<4|q>>>28)+E|0))+B[12]-421815835)<<11|y>>>21)+q|0)^q)^(h=((h+=(b^E)+B[15]+530742520)<<16|h>>>16)+y|0))+B[2]-995338651)<<23|E>>>9)+h|0,E=((E+=((y=((y+=(E^((q=((q+=(h^(E|~y))+B[0]-198630844)<<6|q>>>26)+E|0)|~h))+B[7]+1126891415)<<10|y>>>22)+q|0)^((h=((h+=(q^(y|~E))+B[14]-1416354905)<<15|h>>>17)+y|0)|~q))+B[5]-57434055)<<21|E>>>11)+h|0,E=((E+=((y=((y+=(E^((q=((q+=(h^(E|~y))+B[12]+1700485571)<<6|q>>>26)+E|0)|~h))+B[3]-1894986606)<<10|y>>>22)+q|0)^((h=((h+=(q^(y|~E))+B[10]-1051523)<<15|h>>>17)+y|0)|~q))+B[1]-2054922799)<<21|E>>>11)+h|0,E=((E+=((y=((y+=(E^((q=((q+=(h^(E|~y))+B[8]+1873313359)<<6|q>>>26)+E|0)|~h))+B[15]-30611744)<<10|y>>>22)+q|0)^((h=((h+=(q^(y|~E))+B[6]-1560198380)<<15|h>>>17)+y|0)|~q))+B[13]+1309151649)<<21|E>>>11)+h|0,E=((E+=((y=((y+=(E^((q=((q+=(h^(E|~y))+B[4]-145523070)<<6|q>>>26)+E|0)|~h))+B[11]-1120210379)<<10|y>>>22)+q|0)^((h=((h+=(q^(y|~E))+B[2]+718787259)<<15|h>>>17)+y|0)|~q))+B[9]-343485551)<<21|E>>>11)+h|0,this.first?(this.h0=q+1732584193|0,this.h1=E-271733879|0,this.h2=h-1732584194|0,this.h3=y+271733878|0,this.first=!1):(this.h0=this.h0+q|0,this.h1=this.h1+E|0,this.h2=this.h2+h|0,this.h3=this.h3+y|0)},I.prototype.hex=function(){this.finalize();var q=this.h0,E=this.h1,h=this.h2,y=this.h3;return s[q>>>4&15]+s[15&q]+s[q>>>12&15]+s[q>>>8&15]+s[q>>>20&15]+s[q>>>16&15]+s[q>>>28&15]+s[q>>>24&15]+s[E>>>4&15]+s[15&E]+s[E>>>12&15]+s[E>>>8&15]+s[E>>>20&15]+s[E>>>16&15]+s[E>>>28&15]+s[E>>>24&15]+s[h>>>4&15]+s[15&h]+s[h>>>12&15]+s[h>>>8&15]+s[h>>>20&15]+s[h>>>16&15]+s[h>>>28&15]+s[h>>>24&15]+s[y>>>4&15]+s[15&y]+s[y>>>12&15]+s[y>>>8&15]+s[y>>>20&15]+s[y>>>16&15]+s[y>>>28&15]+s[y>>>24&15]},I.prototype.toString=I.prototype.hex,I.prototype.digest=function(){this.finalize();var q=this.h0,E=this.h1,h=this.h2,y=this.h3;return[255&q,q>>>8&255,q>>>16&255,q>>>24&255,255&E,E>>>8&255,E>>>16&255,E>>>24&255,255&h,h>>>8&255,h>>>16&255,h>>>24&255,255&y,y>>>8&255,y>>>16&255,y>>>24&255]},I.prototype.array=I.prototype.digest,I.prototype.arrayBuffer=function(){this.finalize();var q=new ArrayBuffer(16),E=new Uint32Array(q);return E[0]=this.h0,E[1]=this.h1,E[2]=this.h2,E[3]=this.h3,q},I.prototype.buffer=I.prototype.arrayBuffer,I.prototype.base64=function(){for(var q,E,h,y="",x=this.array(),b=0;b<15;)q=x[b++],E=x[b++],h=x[b++],y+=g[q>>>2]+g[63&(q<<4|E>>>4)]+g[63&(E<<2|h>>>6)]+g[63&h];return q=x[b],y+=g[q>>>2]+g[q<<4&63]+"=="},f.prototype=new I,f.prototype.finalize=function(){if(I.prototype.finalize.call(this),this.inner){this.inner=!1;var q=this.array();I.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(q),I.prototype.finalize.call(this)}};var R=function(){var q=w("hex");i&&(q=S(q)),q.create=function(){return new I},q.update=function(y){return q.create().update(y)};for(var E=0;E<d.length;++E){var h=d[E];q[h]=w(h)}return q}();R.md5=R,R.md5.hmac=function(){var q=M("hex");q.create=function(y){return new f(y)},q.update=function(y,x){return q.create(y).update(x)};for(var E=0;E<d.length;++E){var h=d[E];q[h]=M(h)}return q}(),A?Pl.exports=R:n.md5=R}();var Mw=T0.exports;const B0=(t,e)=>{const n=Date.now(),r=`${t}:${n}:${Mw.md5(`${e}${n}`)}`,i=new TextEncoder().encode(r);return btoa(String.fromCharCode(...i))},eu=t=>{if(/^\d+$/.test(t)||!t||typeof t!="string"||t.length%4!=0||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t))return!1;try{const e=atob(t);return btoa(e)===t}catch{return!1}},ya="/v1/aicc/bmserver",br="/v1/aicc/ccs";let Ei="",jd="",Pd="",Ll="";function O0(t){const e=B0(jd,Pd);return Iw.create({prefixUrl:`${Ei}`,timeout:!1,headers:{Authorization:e,...t},hooks:{afterResponse:[async(n,r,i)=>{if(i.url.indexOf("heartbeat")!==-1)return i;const o=await i.clone().json();if(o.code!==0)throw new Error(JSON.stringify(o)||"请求失败");return i.json=async()=>o,i}]}})}async function Ln(t,e,n){const r=O0(n),i="api/"+t.replace(/^\/+/,"");return r.post(i,{json:e}).json()}class So{static requestPermission(){"Notification"in window&&Notification.permission==="default"&&Notification.requestPermission()}static async requestMediaPermissions(){try{return(await navigator.mediaDevices.enumerateDevices()).some(n=>n.kind==="audioinput"&&n.label!=="")?null:await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){return console.warn("获取音频权限失败:",e),null}}static show(e,n,r,i){if("Notification"in window&&Notification.permission==="granted"){const o=new Notification(e,{body:n,tag:`xy-global-notification${new Date().getTime()}`,renotify:!0});o.onclick=()=>{window.focus(),o.close(),r==null||r()},setTimeout(()=>o.close(),1e3*(i||3))}}static async checkMediaPermissions(){try{return(await navigator.mediaDevices.enumerateDevices()).some(e=>e.kind==="audioinput"&&e.label!=="")}catch(e){return console.warn("无法检查设备权限:",e),!1}}}const Ff=(t,e)=>Ln(`${br}/state/change?h=${e}`,t,{h:e}),Rw=()=>async function(t,e){const n=O0(),r=t.replace(/^\/+/,"");return n.post(r,{json:e}).json()}("/heartbeat",{}),xw=[],Yn=["call_number"],cs=["call_number"],Tw=["hangup"],Vi=["hold","hangup","mute","transfer","consult","satisfaction","dtmf"],Yl=["hold","hangup","mute","transfer","consult"],Qf=["consult_transfer","conference","consult_retrieve"],Bw=["hangup"],Ow=["hangup"],wa=["answer","reject"],Gi=["hangup","consult","transfer","hold","mute","satisfaction","dtmf"],kf=["hangup","whisper","force_insert","force_disconnect"],Dw=["hangup"],Nw=["hangup","cancel_whisper","force_insert"],Fw=["hangup"],Qw=["hangup"];class OA{constructor(){this.roleData={agentInfo:()=>{var e;if(!((e=W.agentInfo)!=null&&e.agent_no))throw new Error(JSON.stringify({code:1,msg:"请先登录"}))},requestInfo:e=>{if(!e.data)throw new Error(JSON.stringify({code:1,msg:'Parameter "data" is required'}))},changeDevice:e=>{if(!e)throw new Error(JSON.stringify({code:1,msg:'Parameter "device" is required'}));const{answer_devices:n}=W.agentInfo;if(!n.split(",").map(r=>Number(r)).includes(e))throw new Error(JSON.stringify({code:1,msg:"当前状态不支持"}))},changeState:(e,n)=>{if(!e)throw new Error(JSON.stringify({code:1,msg:'Parameter "state" is required'}));if(!n)throw new Error(JSON.stringify({code:1,msg:'Parameter "state_name" is required'}));if(e===2&&(n==="通话中"||n==="整理"))throw new Error(JSON.stringify({code:1,msg:"当前状态不支持"}));if(![1,2].includes(e))throw new Error(JSON.stringify({code:1,msg:"当前状态不支持"}))},setAgentExplicit:e=>{const{out_display_select_switch:n,out_display_data:r}=W.agentInfo;if(n!==1)throw new Error(JSON.stringify({code:1,msg:"当前坐席设置未开启允许指定外显"}));if(!e)throw new Error(JSON.stringify({code:1,msg:'Parameter "number" is required'}));if(!(r||"").split("#").includes(e))throw new Error(JSON.stringify({code:1,msg:"当前外显号码不存在"}))}},this.changeDevice=async e=>{try{if(P.get("isCalling"))throw new Error(JSON.stringify({code:1,msg:"当前正在通话中,请勿切换设备"}));this.roleData.agentInfo(),this.roleData.requestInfo(e);const{data:n,success:r}=e,{device:i}=n;i===1&&await OA.initRtcFn(),this.roleData.changeDevice(i);const{agent_no:o}=W.agentInfo;await(a=>Ln(`${br}/device/change`,a))({agent_no:o,answer_device:i}),P.updateAnswerDevice(i);const A=P.get("actionConfigs");P.updateActionConfigs(A),i===2&&W.stateObject.state===bt.UNREGISTERED&&await this._changeState({data:{...W.stateBeforeChange,state_name:W.stateBeforeChange.state===bt.IDLE?"空闲":"忙碌"}},"q"),r==null||r({code:0,msg:"请求成功"})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}}formatDate(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`}static setInitRtcFn(e){this.initRtcFn=e}async _agentLogin(e){try{const r=await(n={agent_no:e},Ln(`${br}/agent/login`,n));W.agentInfo=r.data}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}var n}async _changeState(e,n){try{W.autoStateTimer&&(clearTimeout(W.autoStateTimer),W.autoStateTimer=null),this.roleData.agentInfo(),this.roleData.requestInfo(e);const{data:r,success:i}=e,{state:o,state_name:A}=r,{agent_no:a}=W.agentInfo;await Ff({agent_no:a,state_name:A,state:o},n),o===bt.IDLE?P.updateActionConfigs(Yn):o===bt.BUSY&&P.updateActionConfigs(cs),W.stateObject={state:o,state_name:A},i==null||i({code:0,msg:"请求成功"})}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async _getInCallCrmDetail(e){var n;try{const{phone:r}=e.data,i={};eu(r)?i.trace_id=r:i.phone=r.replace(/[\s\r\n-]+/g,"");const o=await(A=>Ln(`${ya}/crm/popups`,A))({...i});(n=e.success)==null||n.call(e,o)}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async changeState(e,n){try{if(P.get("isCalling"))throw new Error(JSON.stringify({code:1,msg:"当前正在通话中,请勿切换设备"}));W.autoStateTimer&&(clearTimeout(W.autoStateTimer),W.autoStateTimer=null),this.roleData.agentInfo(),this.roleData.requestInfo(e);const{data:r,success:i}=e,{state:o,state_name:A}=r;this.roleData.changeState(o,A);const{agent_no:a}=W.agentInfo;await Ff({agent_no:a,state_name:A,state:o},n),(W.stateObject.state===bt.IDLE||W.stateObject.state===bt.BUSY&&A!=="整理")&&(W.stateBeforeChange=W.stateObject),o===bt.IDLE?P.updateActionConfigs(Yn):o===bt.BUSY&&P.updateActionConfigs(cs),W.stateObject={state:o,state_name:A},i==null||i({code:0,msg:"请求成功"})}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async getIdleAgentList(e){var r;const{agent_no:n}=W.agentInfo;try{this.roleData.agentInfo();const i=await(o=>Ln(`${br}/agent/free`,o))({agent_no:n});(r=e.success)==null||r.call(e,i)}catch(i){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(i.message).msg),i}}async getAgentState(e){var n;try{const r=await Ln(`${ya}/agent/statecfg/list`,{}),i=(r.data||[]).filter(o=>o.enable===0).filter(o=>o.state!==0&&o.state!==3).filter(o=>o.state_name!=="通话中"&&o.state_name!=="整理"&&o.state_name!=="未注册"&&o.state_name!=="离线接听").map(o=>({state:o.state,state_name:o.state_name})).reverse();(n=e.success)==null||n.call(e,{...r,data:i})}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async setAgentExplicit(e){var n;try{this.roleData.agentInfo(),this.roleData.requestInfo(e),this.roleData.setAgentExplicit(e.data.number);const{agent_id:r}=W.agentInfo;await(i=>Ln(`${ya}/agent/update`,i))({agent_id:r,out_display_number:e.data.number}),P.updateSelectOutNumber(e.data.number),(n=e.success)==null||n.call(e,{code:0,msg:"请求成功"})}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async checkAgentLogin(e){var n;try{this.roleData.requestInfo(e);const{agent_no:r}=e.data;if(!r)throw new Error(JSON.stringify({code:1,msg:'Parameter "agent_no" is required'}));const i=await(o=>Ln(`${br}/agent/islogin`,o))({agent_no:r});(n=e.success)==null||n.call(e,i)}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async getCallRecord(e){try{this.roleData.agentInfo();const{success:n}=e,r=new Date,i=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0),o=new Date(r.getFullYear(),r.getMonth(),r.getDate(),23,59,59),A=[this.formatDate(i),this.formatDate(o)],{agent_no:a}=W.agentInfo,s=await(g=>Ln(`${ya}/agent/recordpage`,g))({start_time:A[0],end_time:A[1],page_no:1,page_size:10,agent_no:a}),{code:l,msg:u,data:d}=s;n==null||n({code:l,msg:u,data:d})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async logout(e){this.roleData.agentInfo();try{const{agent_no:n}=W.agentInfo,{data:r,success:i}=e;await(o=>Ln(`${br}/agent/logout`,o))({...r,agent_no:n}),i==null||i({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async listenCall(e){try{const{agent_no:n}=W.agentInfo,{data:r,success:i}=e;if(this.roleData.agentInfo(),this.roleData.requestInfo(e),!r.monitored_agent_no)throw new Error(JSON.stringify({code:1,msg:'Parameter "monitored_agent_no" is required'}));await(o=>Ln(`${br}/call/monitor`,o))({...r,monitor_agent_no:n}),W.monitoredAgentNo=r.monitored_agent_no,i==null||i({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async earCall(e){try{const{agentInfo:n,monitoredAgentNo:r}=W,{agent_no:i}=n;this.roleData.agentInfo();const{success:o}=e;if(!r)throw new Error(JSON.stringify({code:1,msg:"当前未有监听坐席"}));await(A=>Ln(`${br}/call/whisper`,A))({monitored_agent_no:r,monitor_agent_no:i}),o==null||o({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async stopEarCall(e){try{const{agentInfo:n,earSpeakAgent:r}=W;if(!r)throw new Error(JSON.stringify({code:1,msg:"当前没有正在耳语的坐席"}));const{agent_no:i}=n;this.roleData.agentInfo();const{success:o}=e;await(A=>Ln(`${br}/call/stopwhisper`,A))({monitor_agent_no:i,monitored_agent_no:r}),o==null||o({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async forceInsert(e){try{const{agentInfo:n,monitoredAgentNo:r}=W,{agent_no:i}=n;this.roleData.agentInfo();const{success:o}=e;if(!r)throw new Error(JSON.stringify({code:1,msg:"当前未有监听坐席"}));await(A=>Ln(`${br}/call/bargein`,A))({monitored_agent_no:r,monitor_agent_no:i}),o==null||o({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async forceDisconnect(e){try{const{agentInfo:n,monitoredAgentNo:r}=W,{agent_no:i}=n;this.roleData.agentInfo();const{success:o}=e;if(!r)throw new Error(JSON.stringify({code:1,msg:"当前未有监听坐席"}));await(A=>Ln(`${br}/call/intercept`,A))({monitored_agent_no:r,monitor_agent_no:i}),o==null||o({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}}const kw=console.log,Uf=(...t)=>{W.logBuiltinEnabled&&kw(...t)};let ti=null;class An{constructor(e,n){this.url=e,this.onOpenCallback=n,this.ws=null,this.heartbeatWorker=null,this.reconnectDelay=3e3,this.manualClose=!1,this.apiClient=new OA,this.sipClient=null,this.pendingMessages=new Map,this.initWebSocket()}static getInstance({url:e,sipClient:n,onOpen:r}){if(!ti){if(!e)throw new Error("WebSocket 尚未初始化");ti=new An(e,r),ti.sipClient=n}return ti}setSipClient(e){this.sipClient=e}stateIdleChange(e){const{state:n}=W.stateObject;n!==bt.IDLE&&this.apiClient._changeState({data:{...W.stateBeforeChange,state_name:W.stateBeforeChange.state===bt.IDLE?"空闲":"忙碌"}},e)}inCallAutoAnswer(){const{soft_device_auto_answer:e,auto_answer_time:n}=W.agentInfo,r=e===1,i=P.get("direction");if(r&&i===yn.INCOMING){const o=Number(n)||0;o>0&&(W.autoAnswerTimer=setTimeout(()=>{var A;(A=this.sipClient)==null||A.answerCall(),W.autoAnswerTimer=null},1e3*o-500))}}async getCustomerInfo(e){try{await this.apiClient._getInCallCrmDetail({data:{phone:e},success:n=>{P.updateCustomerInfo(n.data||{phone:n.data.phone,is_vip:0,customer_name:"未知客户",city:"未知",province:"未知",contact_count:0,in_contact_count:0,trace_id:n.data.trace_id,contact_count_month:0,in_contact_count_month:0})}})}catch{}}putAgentState(e,n){if(!e)return;if(n===5)return void this.stateIdleChange("device_type5");W.sessionId="";const{post_call_process_time:r}=W.agentInfo,i=r||0;if(W.autoStateTimer&&(clearTimeout(W.autoStateTimer),W.autoStateTimer=null),P.updateCustomerInfo(void 0),i>0){const{state:o}=W.stateObject;if(o===bt.IDLE)return;this.apiClient._changeState({data:{state:bt.BUSY,state_name:"整理"}},"ez"),W.autoStateTimer=setTimeout(()=>{W.autoStateTimer=null,this.stateIdleChange(`delay${i}`)},1e3*i)}else this.stateIdleChange("delay0")}stateBusyChange(){W.sessionId="",clearTimeout(W.autoStateTimer),P.updateCustomerInfo(void 0),this.apiClient._changeState({data:{state:bt.BUSY,state_name:"忙碌"}},"dm")}initWebSocket(){var n;if(((n=this.ws)==null?void 0:n.readyState)===1||!P.get("isNextState")||this.manualClose)return;const e=B0(jd,Pd);this.ws=new WebSocket(this.url+e),this.ws.onopen=()=>{const r=new Date().getTime();this.sendMessage({type:0,msg_id:r}),this.pendingMessages.set(r,performance.now()),this.startHeartbeat(),this.manualClose=!1,this.onOpenCallback&&this.onOpenCallback()},this.ws.onmessage=async r=>{var u;const i=JSON.parse(r.data),{type:o,data:A,code:a,msg:s,msg_id:l}=i;if(o===0&&l){const d=this.pendingMessages.get(l),g=performance.now()-d;W.latency=parseFloat(g.toFixed(2)),this.pendingMessages.delete(l)}if(o!==0&&Uf("%cWebSocket 收到消息:","color: blue; font-weight: bold;",i),o!==rt.OUT_CALL&&o!==rt.PREVIEW_OUT_CALL||(a!==0?(P.reset(),ge.emit(oe.OUT_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s),P.updateActionConfigs(Yn),setTimeout(()=>{P.updateCustomerInfo(void 0)},500),this.stateIdleChange("h")):a===0&&(ge.emit(oe.OUT_SUCCESS),clearTimeout(W.autoStateTimer))),o===rt.AGENT_STATE){const{state:d,state_name:g}=A;W.stateObject={state:d,state_name:g},(u=W.stateBeforeChange)!=null&&u.state||W.stateObject.state!==bt.IDLE&&(W.stateObject.state!==bt.BUSY||g==="整理")||(W.stateBeforeChange=W.stateObject),g==="振铃中"&&P.updateDisplayText(Ht.AGENT_RINGING);const p=P.get("isCalling");d!==bt.UNREGISTERED||p||P.updateActionConfigs(xw),d===bt.IDLE&&W.stateObject.state===bt.UNREGISTERED&&P.updateActionConfigs(Yn),ge.emit(oe.AGENT_STATE,{state:d,state_name:g})}else if(o===rt.OUT_CALL_INCOMING_CALL){try{await this.getCustomerInfo(A.trace_id||A.customer_phone)}catch(d){console.error(d)}A.preview_task_id?ge.emit(oe.PREVIEW_OUT_INCOMING_CALL,{customer_phone:A.customer_phone,session_id:A.session_id,preview_task_id:A.preview_task_id,trace_id:A.trace_id}):A.direction===0?ge.emit(oe.OUT_INCOMING_CALL,{customer_phone:A.customer_phone,session_id:A.session_id,trace_id:A.trace_id}):A.direction===8&&ge.emit(oe.INTERNAL_OUT_INCOMING_CALL,{customer_phone:A.customer_phone,session_id:A.session_id,trace_id:A.trace_id}),W.sessionId=A.session_id,P.updateActionConfigs(Tw,A.direction!==8)}else if(o===rt.OUT_CALL_END){if(W.sessionId!==A.session_id)return;if(P.updateDisplayText(""),A.device_type===1&&A.agent_no===W.agentInfo.agent_no)P.reset(),ge.emit(oe.OUT_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0);else if(A.device_type===2&&A.agent_no===W.agentInfo.agent_no)P.reset(),ge.emit(oe.OUR_SIDE_CONSULT_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0);else if(A.device_type===2&&A.agent_no!==W.agentInfo.agent_no)P.get("isCalling")&&(P.updateDisplayText(Ht.CALLING),ge.emit(oe.OTHER_SIDE_CONSULT_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Vi));else if(A.device_type===3&&A.agent_no===W.agentInfo.agent_no)P.reset(),ge.emit(oe.THREE_WAY_OUR_SIDE_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0);else if(A.device_type===4&&A.agent_no===W.agentInfo.agent_no)P.reset(),ge.emit(oe.TRANSFER_END,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0);else if(A.device_type===4&&A.agent_no!==W.agentInfo.agent_no){ge.emit(oe.TRANSFER_FAILED,"未知原因"),ge.emit(Ge.FAIL_NOTIFICATION,"转接失败");const d=P.get("direction");d===yn.OUTGOING?P.updateActionConfigs(Vi):d===yn.INCOMING&&P.updateActionConfigs(Gi)}else A.device_type===5&&A.agent_no===W.agentInfo.agent_no&&(W.monitoredAgentNo="",W.earSpeakAgent="",P.reset(),ge.emit(oe.LISTEN_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0,5))}else if(o===rt.OUT_CALL_RINGING)A.type===1&&(ge.emit(oe.OUT_RINGING,{session_id:W.sessionId,type:A.type}),P.updateDisplayText(Ht.RINGING));else if(o===rt.OUT_CALL_ANSWER)clearTimeout(W.autoStateTimer),P.updateIsCalling(!0),P.updateOutCallIsAnswer(!0),P.updateDisplayText(Ht.CALLING),A.direction===8?(ge.emit(oe.INTERNAL_OUT_OFF_ANSWER,{session_id:W.sessionId}),P.updateActionConfigs(Yl)):(ge.emit(oe.OUT_OFF_ANSWER,{session_id:W.sessionId}),P.updateActionConfigs(Vi));else if(o===rt.CONSULT_RINGING)ge.emit(oe.CONSULT_RINGING,{session_id:A.session_id}),P.updateDisplayText(Ht.AGENT_RINGING),P.updateActionConfigs([]),clearTimeout(W.autoStateTimer);else if(o===rt.CONSULT_ANSWER)ge.emit(oe.CONSULT_OFF_HOOK,{session_id:A.session_id}),P.updateConsultIsAnswer(!0),P.updateDisplayText(Ht.CONSULTING),P.updateActionConfigs(Qf);else if(o===rt.CONSULT_FAIL)ge.emit(oe.CONSULT_FAILED,{custom_reason:A.custom_reason}),P.updateDisplayText(Ht.CALLING),P.updateActionConfigs(Vi);else if(o===rt.CONSULT_CALL_IN)ge.emit(oe.CONSULT_INCOMING,{agent_no:A.agent_no,agent_mane:A.agent_name,session_id:A.session_id}),W.sessionId=A.session_id,P.updateIsCalling(!0),P.updateDirection(yn.CONSULT),P.updateDisplayText(Ht.CONSULT_CALL_IN),P.updateActionConfigs(wa),W.enableBrowserAlert&&So.show("📞 咨询来电",`坐席 [${A.agent_name}] 正在咨询...`,()=>{ge.emit(Ge.NOTIFICATION_CLICK,{agent_mane:A.agent_name,agent_no:A.agent_no})},W.browserAlertTime);else if(o===rt.CONSULT_CALL_IN_SUCCESS)ge.emit(oe.CONSULT_CALL_IN_SUCCESS,{session_id:A.session_id}),P.updateConsultIsAnswer(!0),P.updateDisplayText(Ht.CALLING),P.updateActionConfigs(Bw);else if(o===rt.CONSULT_RETURN_CALL_SUCCESS)A.status==="success"?(P.updateConsultIsAnswer(!1),ge.emit(oe.CONSULT_RETURN_CALL_SUCCESS),P.updateDisplayText(Ht.CALLING),ge.emit(oe.OTHER_SIDE_CONSULT_HANGUP),P.updateActionConfigs(Vi)):ge.emit(Ge.FAIL_NOTIFICATION,"媒体失败");else if(o===rt.MUTE)a===0?(P.updateIsMuted(!0),ge.emit(oe.MUTE_SUCCESS),P.updateDisplayText(Ht.MUTING)):(ge.emit(oe.MUTE_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.UNMUTE)a===0?(P.updateIsMuted(!1),ge.emit(oe.UNMUTE_SUCCESS),P.updateDisplayText(Ht.CALLING)):(ge.emit(oe.UNMUTE_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CALL_HOLD)a===0?(P.updateIsHold(!0),P.updateDisplayText(Ht.HOLDING),ge.emit(oe.HOLD_SUCCESS)):(ge.emit(oe.HOLD_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CALL_UNHOLD)a===0?(P.updateDisplayText(Ht.CALLING),P.updateIsHold(!1),ge.emit(oe.UNHOLD_SUCCESS)):(ge.emit(oe.UNHOLD_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CONSULT_TRANSFER)a===0?ge.emit(oe.CONSULT_TRANSFER_SUCCESS):(ge.emit(oe.CONSULT_TRANSFER_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CONSULT_TRANSFER_FAILED)ge.emit(oe.CONSULT_TRANSFER_FAILED,A.status);else if(o===rt.CONSULT_TRANSFER_OFF_HOOK)P.updateDirection(yn.INCOMING),P.updateDisplayText(Ht.CALLING),ge.emit(oe.CONSULT_TRANSFER_OFF_HOOK),P.updateActionConfigs(Gi),P.updateIncomingIsAnswer(!0),P.updateConsultIsAnswer(!1);else if(o===rt.INCOMING_CALL){clearTimeout(W.autoStateTimer),W.sessionId=A.session_id;try{await this.getCustomerInfo(A.trace_id||A.customer_phone)}catch(d){console.error(d)}P.updateIsCalling(!0),P.updateDirection(yn.INCOMING),P.updateDisplayText(Ht.INCOMING_CALL),this.inCallAutoAnswer(),A.direction===1&&ge.emit(oe.INCOMING_CALL,{customer_phone:A.customer_phone,trace_id:A.trace_id,session_id:A.session_id}),A.direction===8&&ge.emit(oe.INCOMING_CALL_IN,{customer_phone:A.customer_phone,trace_id:A.trace_id,session_id:A.session_id}),A.direction===3&&ge.emit(oe.PREDICT_INCOMING_CALL,{customer_phone:A.customer_phone,trace_id:A.trace_id,session_id:A.session_id}),A.direction===6&&ge.emit(oe.DUAL_CALL_INCOMING_CALL,{customer_phone:A.customer_phone,trace_id:A.trace_id,session_id:A.session_id}),P.updateActionConfigs(wa),W.enableBrowserAlert&&So.show("📞 客户来电",`客户 [${A.customer_phone}] 正在呼入...`,()=>{ge.emit(Ge.NOTIFICATION_CLICK,{customer_phone:A.customer_phone})},W.browserAlertTime)}else if(o===rt.INCOMING_CALL_OFF_HOOK)P.updateIncomingIsAnswer(!0),A.direction===8?(P.updateActionConfigs(Yl),ge.emit(oe.INCOMING_CALL_IN_OFF_HOOK,{session_id:W.sessionId})):(P.updateActionConfigs(Gi),ge.emit(oe.INCOMING_CALL_OFF_HOOK,{session_id:W.sessionId})),P.updateDisplayText(Ht.CALLING);else if(o===rt.INCOMING_CALL_END){if(W.sessionId!==A.session_id)return;if(P.updateDisplayText(""),A.device_type!==1&&A.device_type!==7||A.agent_no!==W.agentInfo.agent_no)if(A.device_type===2&&A.agent_no===W.agentInfo.agent_no)P.reset(),ge.emit(oe.OUR_SIDE_CONSULT_HANGUP,{session_id:A.session_id}),this.putAgentState(!0),P.updateActionConfigs(Yn);else if(A.device_type===2&&A.agent_no!==W.agentInfo.agent_no)P.updateDisplayText(Ht.CALLING),ge.emit(oe.OTHER_SIDE_CONSULT_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Vi);else if(A.device_type===3&&A.agent_no===W.agentInfo.agent_no)this.putAgentState(!0),P.reset(),ge.emit(oe.THREE_WAY_OUR_SIDE_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn);else if(A.device_type===4&&A.agent_no===W.agentInfo.agent_no)this.putAgentState(!0),P.reset(),ge.emit(oe.TRANSFER_END,{session_id:A.session_id}),P.updateActionConfigs(Yn);else if(A.device_type===4&&A.agent_no!==W.agentInfo.agent_no){ge.emit(oe.TRANSFER_FAILED,"未知原因"),ge.emit(Ge.FAIL_NOTIFICATION,"转接失败");const d=P.get("direction");d===yn.OUTGOING?P.updateActionConfigs(Vi):d===yn.INCOMING&&P.updateActionConfigs(Gi)}else A.device_type===5&&A.agent_no===W.agentInfo.agent_no&&(this.putAgentState(!0,5),W.monitoredAgentNo="",W.earSpeakAgent="",P.reset(),ge.emit(oe.LISTEN_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn));else this.putAgentState(!0),P.reset(),ge.emit(oe.INCOMING_CALL_END,{session_id:A.session_id}),P.updateActionConfigs(Yn)}else if(o===rt.SATISFACTION_EVALUATION)a===0?ge.emit(oe.SATISFACTION_EVALUATION_SUCCESS):(ge.emit(oe.SATISFACTION_EVALUATION_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CONSULT_THREE_WAY)a!==0?(ge.emit(oe.CONSULT_THREE_WAY_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s)):a===0&&P.updateIsMeeting(!0);else if(o===rt.CONSULT_THREE_WAY_RESULT)A.status==="success"?(P.updateDirection(yn.MEETING),P.updateDisplayText(Ht.MEETING),P.updateActionConfigs(Ow),ge.emit(oe.CONSULT_THREE_WAY_SUCCESS)):(ge.emit(oe.CONSULT_THREE_WAY_FAILED,{conf_name:A.conf_name}),P.updateIsMeeting(!1));else if(o===rt.TRANSFER_INCOMING_CALL)clearTimeout(W.autoStateTimer),A.agent_no===W.agentInfo.agent_no?(P.updateDisplayText(Ht.TRANSFERRING),ge.emit(oe.TRANSFER_PROGRESS),P.updateActionConfigs([]),P.updateTransferIsAnswer(!0)):(W.sessionId=A.session_id,ge.emit(oe.TRANSFER_INCOMING_CALL,{agent_no:A.agent_no,agent_name:A.agent_name,session_id:A.session_id}),P.updateIsCalling(!0),P.updateDirection(yn.TRANSFER),P.updateDisplayText(Ht.TRANSFER_INCOMING_CALL),P.updateActionConfigs(wa),W.enableBrowserAlert&&So.show("📞 转接来电",`坐席 [${A.agent_no}] 正在转接...`,()=>{ge.emit(Ge.NOTIFICATION_CLICK,{agent_no:A.agent_no})},W.browserAlertTime));else if(o===rt.TRANSFER_OFF_HOOK)ge.emit(oe.TRANSFER_OFF_HOOK,{session_id:W.sessionId}),P.updateTransferIsAnswer(!1),P.updateDisplayText(Ht.CALLING),P.updateActionConfigs(Gi,A.direction!==8);else if(o===rt.TRANSFER_FAILED){if(A.status==="failed"){ge.emit(oe.TRANSFER_FAILED,"未知原因"),ge.emit(Ge.FAIL_NOTIFICATION,"转接失败");const d=P.get("direction");d===yn.OUTGOING?P.updateActionConfigs(Vi):d===yn.INCOMING&&P.updateActionConfigs(Gi)}}else o===rt.KICK_OFFLINE?ge.emit(Ge.KICK_OFF):o===rt.CONTINUOUS_NOT_ANSWER?(ge.emit(Ge.FAIL_NOTIFICATION,`已连续 ${A.miss_count} 次未接, 设置忙碌`),this.stateBusyChange()):o===rt.SIGN_OUT?ge.emit(Ge.SIGN_OUT):o===rt.SIGN_IN_SWITCH_DEVICE?ge.emit(Ge.SIGN_IN_SWITCH_DEVICE,A):o===rt.LISTEN_INCOMING_CALL?(clearTimeout(W.autoStateTimer),W.sessionId=A.session_id,P.updateIsCalling(!0),P.updateDirection(yn.INCOMING),this.inCallAutoAnswer(),P.updateDisplayText(Ht.LISTENING),P.updateActionConfigs(wa),ge.emit(oe.LISTEN_INCOMING_CALL,{session_id:A.session_id}),W.enableBrowserAlert&&So.show("📞 监听来电","正在来电...",()=>{ge.emit(Ge.NOTIFICATION_CLICK,{customer_phone:A.customer_phone})},W.browserAlertTime)):o===rt.LISTEN_INCOMING_CALL_OFF_HOOK?(W.monitoredAgentNo=A.monitored_agent_no,W.earSpeakAgent="",P.updateIncomingIsAnswer(!0),ge.emit(oe.LISTEN_INCOMING_CALL_OFF_HOOK,{session_id:W.sessionId,monitored_agent_no:A.monitored_agent_no}),P.updateActionConfigs(kf),P.updateDisplayText(Ht.CALLING)):o===rt.LISTEN_CALL_FAILED?A.status==="failed"&&(ge.emit(oe.LISTEN_CALL_FAILED),W.monitoredAgentNo=""):o===rt.EAR_SPEECH?A.status==="success"?(A.monitored_agent_no===W.agentInfo.agent_no&&(P.updateActionConfigs(Dw),ge.emit(oe.EAR_SPEECH_BE_SUCCESS)),A.monitor_agent_no===W.agentInfo.agent_no&&(P.updateActionConfigs(Nw),ge.emit(oe.EAR_SPEECH_SUCCESS,{monitored_agent_no:A.monitored_agent_no,monitor_agent_no:A.monitor_agent_no}),W.earSpeakAgent=A.monitored_agent_no)):ge.emit(oe.EAR_SPEECH_FAILED):o===rt.STOP_EAR_SPEECH?A.status==="success"?(A.monitored_agent_no===W.agentInfo.agent_no&&P.updateActionConfigs(Gi),A.monitor_agent_no===W.agentInfo.agent_no&&P.updateActionConfigs(kf),W.earSpeakAgent="",ge.emit(oe.STOP_EAR_SPEECH_SUCCESS)):ge.emit(oe.STOP_EAR_SPEECH_FAILED):o===rt.CALL_FORCE_INSERT?A.status==="success"?(A.monitored_agent_no===W.agentInfo.agent_no&&(P.updateActionConfigs(Qw),ge.emit(oe.CALL_FORCE_INSERT_SUCCESS,{monitored_agent_no:A.monitored_agent_no,monitor_agent_no:A.monitor_agent_no})),A.monitor_agent_no===W.agentInfo.agent_no&&(P.updateActionConfigs(Fw),ge.emit(oe.CALL_FORCE_INSERT_SUCCESS_LISTENER,{monitored_agent_no:A.monitored_agent_no,monitor_agent_no:A.monitor_agent_no}))):ge.emit(oe.CALL_FORCE_INSERT_FAILED):o===rt.INTERNAL_CALL_START_CONSULT?A.agent_no===W.agentInfo.agent_no?(P.updateConsultIsAnswer(!0),P.updateActionConfigs(Qf),P.updateDisplayText(Ht.CONSULTING)):(P.updateDisplayText(Ht.OTHER_SIDE_CONSULTING),P.updateActionConfigs([])):o===rt.INTERNAL_CALL_END_CONSULT?(P.updateActionConfigs(Yl),P.updateDisplayText(""),P.updateConsultIsAnswer(!1)):o===rt.CALL_SIP_INCOMING_CALL&&ge.emit(oe.CALL_SIP_INCOMING_CALL)},this.ws.onclose=r=>{ge.emit(Ge.FAIL_NOTIFICATION,"链接已断开,请检查网络"),this.stopHeartbeat();const i=P.get("isNextState");!this.manualClose&&i&&setTimeout(()=>this.initWebSocket(),this.reconnectDelay)},this.ws.onerror=r=>{var i;ge.emit(Ge.FAIL_NOTIFICATION,"连接失败,请检查网络"),(i=this.ws)==null||i.close()}}startHeartbeat(){const e=new Blob([`
|
|
163
|
+
*/Pl=T0,function(){var t="input is invalid type",e=typeof window=="object",n=e?window:{};n.JS_MD5_NO_WINDOW&&(e=!1);var r=!e&&typeof self=="object",i=!n.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;i?n=bw:r&&(n=self);var o,A=!n.JS_MD5_NO_COMMON_JS&&Pl.exports,a=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",s="0123456789abcdef".split(""),l=[128,32768,8388608,-2147483648],u=[0,8,16,24],d=["hex","array","digest","buffer","arrayBuffer","base64"],g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),p=[];if(a){var V=new ArrayBuffer(68);o=new Uint8Array(V),p=new Uint32Array(V)}var v=Array.isArray;!n.JS_MD5_NO_NODE_JS&&v||(v=function(q){return Object.prototype.toString.call(q)==="[object Array]"});var m=ArrayBuffer.isView;!a||!n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&m||(m=function(q){return typeof q=="object"&&q.buffer&&q.buffer.constructor===ArrayBuffer});var C=function(q){var E=typeof q;if(E==="string")return[q,!0];if(E!=="object"||q===null)throw new Error(t);if(a&&q.constructor===ArrayBuffer)return[new Uint8Array(q),!1];if(!v(q)&&!m(q))throw new Error(t);return[q,!1]},w=function(q){return function(E){return new I(!0).update(E)[q]()}},S=function(q){var E,h=wf,y=wf.Buffer;return E=y.from&&!n.JS_MD5_NO_BUFFER_FROM?y.from:function(x){return new y(x)},function(x){if(typeof x=="string")return h.createHash("md5").update(x,"utf8").digest("hex");if(x==null)throw new Error(t);return x.constructor===ArrayBuffer&&(x=new Uint8Array(x)),v(x)||m(x)||x.constructor===y?h.createHash("md5").update(E(x)).digest("hex"):q(x)}},M=function(q){return function(E,h){return new f(E,!0).update(h)[q]()}};function I(q){if(q)p[0]=p[16]=p[1]=p[2]=p[3]=p[4]=p[5]=p[6]=p[7]=p[8]=p[9]=p[10]=p[11]=p[12]=p[13]=p[14]=p[15]=0,this.blocks=p,this.buffer8=o;else if(a){var E=new ArrayBuffer(68);this.buffer8=new Uint8Array(E),this.blocks=new Uint32Array(E)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function f(q,E){var h,y=C(q);if(q=y[0],y[1]){var x,b=[],B=q.length,O=0;for(h=0;h<B;++h)(x=q.charCodeAt(h))<128?b[O++]=x:x<2048?(b[O++]=192|x>>>6,b[O++]=128|63&x):x<55296||x>=57344?(b[O++]=224|x>>>12,b[O++]=128|x>>>6&63,b[O++]=128|63&x):(x=65536+((1023&x)<<10|1023&q.charCodeAt(++h)),b[O++]=240|x>>>18,b[O++]=128|x>>>12&63,b[O++]=128|x>>>6&63,b[O++]=128|63&x);q=b}q.length>64&&(q=new I(!0).update(q).array());var N=[],F=[];for(h=0;h<64;++h){var j=q[h]||0;N[h]=92^j,F[h]=54^j}I.call(this,E),this.update(F),this.oKeyPad=N,this.inner=!0,this.sharedMemory=E}I.prototype.update=function(q){if(this.finalized)throw new Error("finalize already called");var E=C(q);q=E[0];for(var h,y,x=E[1],b=0,B=q.length,O=this.blocks,N=this.buffer8;b<B;){if(this.hashed&&(this.hashed=!1,O[0]=O[16],O[16]=O[1]=O[2]=O[3]=O[4]=O[5]=O[6]=O[7]=O[8]=O[9]=O[10]=O[11]=O[12]=O[13]=O[14]=O[15]=0),x)if(a)for(y=this.start;b<B&&y<64;++b)(h=q.charCodeAt(b))<128?N[y++]=h:h<2048?(N[y++]=192|h>>>6,N[y++]=128|63&h):h<55296||h>=57344?(N[y++]=224|h>>>12,N[y++]=128|h>>>6&63,N[y++]=128|63&h):(h=65536+((1023&h)<<10|1023&q.charCodeAt(++b)),N[y++]=240|h>>>18,N[y++]=128|h>>>12&63,N[y++]=128|h>>>6&63,N[y++]=128|63&h);else for(y=this.start;b<B&&y<64;++b)(h=q.charCodeAt(b))<128?O[y>>>2]|=h<<u[3&y++]:h<2048?(O[y>>>2]|=(192|h>>>6)<<u[3&y++],O[y>>>2]|=(128|63&h)<<u[3&y++]):h<55296||h>=57344?(O[y>>>2]|=(224|h>>>12)<<u[3&y++],O[y>>>2]|=(128|h>>>6&63)<<u[3&y++],O[y>>>2]|=(128|63&h)<<u[3&y++]):(h=65536+((1023&h)<<10|1023&q.charCodeAt(++b)),O[y>>>2]|=(240|h>>>18)<<u[3&y++],O[y>>>2]|=(128|h>>>12&63)<<u[3&y++],O[y>>>2]|=(128|h>>>6&63)<<u[3&y++],O[y>>>2]|=(128|63&h)<<u[3&y++]);else if(a)for(y=this.start;b<B&&y<64;++b)N[y++]=q[b];else for(y=this.start;b<B&&y<64;++b)O[y>>>2]|=q[b]<<u[3&y++];this.lastByteIndex=y,this.bytes+=y-this.start,y>=64?(this.start=y-64,this.hash(),this.hashed=!0):this.start=y}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},I.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var q=this.blocks,E=this.lastByteIndex;q[E>>>2]|=l[3&E],E>=56&&(this.hashed||this.hash(),q[0]=q[16],q[16]=q[1]=q[2]=q[3]=q[4]=q[5]=q[6]=q[7]=q[8]=q[9]=q[10]=q[11]=q[12]=q[13]=q[14]=q[15]=0),q[14]=this.bytes<<3,q[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},I.prototype.hash=function(){var q,E,h,y,x,b,B=this.blocks;this.first?E=((E=((q=((q=B[0]-680876937)<<7|q>>>25)-271733879|0)^(h=((h=(-271733879^(y=((y=(-1732584194^2004318071&q)+B[1]-117830708)<<12|y>>>20)+q|0)&(-271733879^q))+B[2]-1126478375)<<17|h>>>15)+y|0)&(y^q))+B[3]-1316259209)<<22|E>>>10)+h|0:(q=this.h0,E=this.h1,h=this.h2,E=((E+=((q=((q+=((y=this.h3)^E&(h^y))+B[0]-680876936)<<7|q>>>25)+E|0)^(h=((h+=(E^(y=((y+=(h^q&(E^h))+B[1]-389564586)<<12|y>>>20)+q|0)&(q^E))+B[2]+606105819)<<17|h>>>15)+y|0)&(y^q))+B[3]-1044525330)<<22|E>>>10)+h|0),E=((E+=((q=((q+=(y^E&(h^y))+B[4]-176418897)<<7|q>>>25)+E|0)^(h=((h+=(E^(y=((y+=(h^q&(E^h))+B[5]+1200080426)<<12|y>>>20)+q|0)&(q^E))+B[6]-1473231341)<<17|h>>>15)+y|0)&(y^q))+B[7]-45705983)<<22|E>>>10)+h|0,E=((E+=((q=((q+=(y^E&(h^y))+B[8]+1770035416)<<7|q>>>25)+E|0)^(h=((h+=(E^(y=((y+=(h^q&(E^h))+B[9]-1958414417)<<12|y>>>20)+q|0)&(q^E))+B[10]-42063)<<17|h>>>15)+y|0)&(y^q))+B[11]-1990404162)<<22|E>>>10)+h|0,E=((E+=((q=((q+=(y^E&(h^y))+B[12]+1804603682)<<7|q>>>25)+E|0)^(h=((h+=(E^(y=((y+=(h^q&(E^h))+B[13]-40341101)<<12|y>>>20)+q|0)&(q^E))+B[14]-1502002290)<<17|h>>>15)+y|0)&(y^q))+B[15]+1236535329)<<22|E>>>10)+h|0,E=((E+=((y=((y+=(E^h&((q=((q+=(h^y&(E^h))+B[1]-165796510)<<5|q>>>27)+E|0)^E))+B[6]-1069501632)<<9|y>>>23)+q|0)^q&((h=((h+=(q^E&(y^q))+B[11]+643717713)<<14|h>>>18)+y|0)^y))+B[0]-373897302)<<20|E>>>12)+h|0,E=((E+=((y=((y+=(E^h&((q=((q+=(h^y&(E^h))+B[5]-701558691)<<5|q>>>27)+E|0)^E))+B[10]+38016083)<<9|y>>>23)+q|0)^q&((h=((h+=(q^E&(y^q))+B[15]-660478335)<<14|h>>>18)+y|0)^y))+B[4]-405537848)<<20|E>>>12)+h|0,E=((E+=((y=((y+=(E^h&((q=((q+=(h^y&(E^h))+B[9]+568446438)<<5|q>>>27)+E|0)^E))+B[14]-1019803690)<<9|y>>>23)+q|0)^q&((h=((h+=(q^E&(y^q))+B[3]-187363961)<<14|h>>>18)+y|0)^y))+B[8]+1163531501)<<20|E>>>12)+h|0,E=((E+=((y=((y+=(E^h&((q=((q+=(h^y&(E^h))+B[13]-1444681467)<<5|q>>>27)+E|0)^E))+B[2]-51403784)<<9|y>>>23)+q|0)^q&((h=((h+=(q^E&(y^q))+B[7]+1735328473)<<14|h>>>18)+y|0)^y))+B[12]-1926607734)<<20|E>>>12)+h|0,E=((E+=((b=(y=((y+=((x=E^h)^(q=((q+=(x^y)+B[5]-378558)<<4|q>>>28)+E|0))+B[8]-2022574463)<<11|y>>>21)+q|0)^q)^(h=((h+=(b^E)+B[11]+1839030562)<<16|h>>>16)+y|0))+B[14]-35309556)<<23|E>>>9)+h|0,E=((E+=((b=(y=((y+=((x=E^h)^(q=((q+=(x^y)+B[1]-1530992060)<<4|q>>>28)+E|0))+B[4]+1272893353)<<11|y>>>21)+q|0)^q)^(h=((h+=(b^E)+B[7]-155497632)<<16|h>>>16)+y|0))+B[10]-1094730640)<<23|E>>>9)+h|0,E=((E+=((b=(y=((y+=((x=E^h)^(q=((q+=(x^y)+B[13]+681279174)<<4|q>>>28)+E|0))+B[0]-358537222)<<11|y>>>21)+q|0)^q)^(h=((h+=(b^E)+B[3]-722521979)<<16|h>>>16)+y|0))+B[6]+76029189)<<23|E>>>9)+h|0,E=((E+=((b=(y=((y+=((x=E^h)^(q=((q+=(x^y)+B[9]-640364487)<<4|q>>>28)+E|0))+B[12]-421815835)<<11|y>>>21)+q|0)^q)^(h=((h+=(b^E)+B[15]+530742520)<<16|h>>>16)+y|0))+B[2]-995338651)<<23|E>>>9)+h|0,E=((E+=((y=((y+=(E^((q=((q+=(h^(E|~y))+B[0]-198630844)<<6|q>>>26)+E|0)|~h))+B[7]+1126891415)<<10|y>>>22)+q|0)^((h=((h+=(q^(y|~E))+B[14]-1416354905)<<15|h>>>17)+y|0)|~q))+B[5]-57434055)<<21|E>>>11)+h|0,E=((E+=((y=((y+=(E^((q=((q+=(h^(E|~y))+B[12]+1700485571)<<6|q>>>26)+E|0)|~h))+B[3]-1894986606)<<10|y>>>22)+q|0)^((h=((h+=(q^(y|~E))+B[10]-1051523)<<15|h>>>17)+y|0)|~q))+B[1]-2054922799)<<21|E>>>11)+h|0,E=((E+=((y=((y+=(E^((q=((q+=(h^(E|~y))+B[8]+1873313359)<<6|q>>>26)+E|0)|~h))+B[15]-30611744)<<10|y>>>22)+q|0)^((h=((h+=(q^(y|~E))+B[6]-1560198380)<<15|h>>>17)+y|0)|~q))+B[13]+1309151649)<<21|E>>>11)+h|0,E=((E+=((y=((y+=(E^((q=((q+=(h^(E|~y))+B[4]-145523070)<<6|q>>>26)+E|0)|~h))+B[11]-1120210379)<<10|y>>>22)+q|0)^((h=((h+=(q^(y|~E))+B[2]+718787259)<<15|h>>>17)+y|0)|~q))+B[9]-343485551)<<21|E>>>11)+h|0,this.first?(this.h0=q+1732584193|0,this.h1=E-271733879|0,this.h2=h-1732584194|0,this.h3=y+271733878|0,this.first=!1):(this.h0=this.h0+q|0,this.h1=this.h1+E|0,this.h2=this.h2+h|0,this.h3=this.h3+y|0)},I.prototype.hex=function(){this.finalize();var q=this.h0,E=this.h1,h=this.h2,y=this.h3;return s[q>>>4&15]+s[15&q]+s[q>>>12&15]+s[q>>>8&15]+s[q>>>20&15]+s[q>>>16&15]+s[q>>>28&15]+s[q>>>24&15]+s[E>>>4&15]+s[15&E]+s[E>>>12&15]+s[E>>>8&15]+s[E>>>20&15]+s[E>>>16&15]+s[E>>>28&15]+s[E>>>24&15]+s[h>>>4&15]+s[15&h]+s[h>>>12&15]+s[h>>>8&15]+s[h>>>20&15]+s[h>>>16&15]+s[h>>>28&15]+s[h>>>24&15]+s[y>>>4&15]+s[15&y]+s[y>>>12&15]+s[y>>>8&15]+s[y>>>20&15]+s[y>>>16&15]+s[y>>>28&15]+s[y>>>24&15]},I.prototype.toString=I.prototype.hex,I.prototype.digest=function(){this.finalize();var q=this.h0,E=this.h1,h=this.h2,y=this.h3;return[255&q,q>>>8&255,q>>>16&255,q>>>24&255,255&E,E>>>8&255,E>>>16&255,E>>>24&255,255&h,h>>>8&255,h>>>16&255,h>>>24&255,255&y,y>>>8&255,y>>>16&255,y>>>24&255]},I.prototype.array=I.prototype.digest,I.prototype.arrayBuffer=function(){this.finalize();var q=new ArrayBuffer(16),E=new Uint32Array(q);return E[0]=this.h0,E[1]=this.h1,E[2]=this.h2,E[3]=this.h3,q},I.prototype.buffer=I.prototype.arrayBuffer,I.prototype.base64=function(){for(var q,E,h,y="",x=this.array(),b=0;b<15;)q=x[b++],E=x[b++],h=x[b++],y+=g[q>>>2]+g[63&(q<<4|E>>>4)]+g[63&(E<<2|h>>>6)]+g[63&h];return q=x[b],y+=g[q>>>2]+g[q<<4&63]+"=="},f.prototype=new I,f.prototype.finalize=function(){if(I.prototype.finalize.call(this),this.inner){this.inner=!1;var q=this.array();I.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(q),I.prototype.finalize.call(this)}};var R=function(){var q=w("hex");i&&(q=S(q)),q.create=function(){return new I},q.update=function(y){return q.create().update(y)};for(var E=0;E<d.length;++E){var h=d[E];q[h]=w(h)}return q}();R.md5=R,R.md5.hmac=function(){var q=M("hex");q.create=function(y){return new f(y)},q.update=function(y,x){return q.create(y).update(x)};for(var E=0;E<d.length;++E){var h=d[E];q[h]=M(h)}return q}(),A?Pl.exports=R:n.md5=R}();var Mw=T0.exports;const B0=(t,e)=>{const n=Date.now(),r=`${t}:${n}:${Mw.md5(`${e}${n}`)}`,i=new TextEncoder().encode(r);return btoa(String.fromCharCode(...i))},eu=t=>{if(/^\d+$/.test(t)||!t||typeof t!="string"||t.length%4!=0||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t))return!1;try{const e=atob(t);return btoa(e)===t}catch{return!1}},ya="/v1/aicc/bmserver",br="/v1/aicc/ccs";let Ei="",jd="",Pd="",Ll="";function O0(t){const e=B0(jd,Pd);return Iw.create({prefixUrl:`${Ei}`,timeout:!1,headers:{Authorization:e,...t},hooks:{afterResponse:[async(n,r,i)=>{if(i.url.indexOf("heartbeat")!==-1)return i;const o=await i.clone().json();if(o.code!==0)throw new Error(JSON.stringify(o)||"请求失败");return i.json=async()=>o,i}]}})}async function Ln(t,e,n){const r=O0(n),i="api/"+t.replace(/^\/+/,"");return r.post(i,{json:e}).json()}class So{static requestPermission(){"Notification"in window&&Notification.permission==="default"&&Notification.requestPermission()}static async requestMediaPermissions(){try{return(await navigator.mediaDevices.enumerateDevices()).some(n=>n.kind==="audioinput"&&n.label!=="")?null:await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){return console.warn("获取音频权限失败:",e),null}}static show(e,n,r,i){if("Notification"in window&&Notification.permission==="granted"){const o=new Notification(e,{body:n,tag:`xy-global-notification${new Date().getTime()}`,renotify:!0});o.onclick=()=>{window.focus(),o.close(),r==null||r()},setTimeout(()=>o.close(),1e3*(i||3))}}static async checkMediaPermissions(){try{return(await navigator.mediaDevices.enumerateDevices()).some(e=>e.kind==="audioinput"&&e.label!=="")}catch(e){return console.warn("无法检查设备权限:",e),!1}}}const Ff=(t,e)=>Ln(`${br}/state/change?h=${e}`,t,{h:e}),Rw=()=>async function(t,e){const n=O0(),r=t.replace(/^\/+/,"");return n.post(r,{json:e}).json()}("/heartbeat",{}),xw=[],Yn=["call_number"],cs=["call_number"],Tw=["hangup"],Vi=["hold","hangup","mute","transfer","consult","satisfaction","dtmf"],Yl=["hold","hangup","mute","transfer","consult"],Qf=["consult_transfer","conference","consult_retrieve"],Bw=["hangup"],Ow=["hangup"],wa=["answer","reject"],Gi=["hangup","consult","transfer","hold","mute","satisfaction","dtmf"],kf=["hangup","whisper","force_insert","force_disconnect"],Dw=["hangup"],Nw=["hangup","cancel_whisper","force_insert"],Fw=["hangup"],Qw=["hangup"];class OA{constructor(){this.roleData={agentInfo:()=>{var e;if(!((e=J.agentInfo)!=null&&e.agent_no))throw new Error(JSON.stringify({code:1,msg:"请先登录"}))},requestInfo:e=>{if(!e.data)throw new Error(JSON.stringify({code:1,msg:'Parameter "data" is required'}))},changeDevice:e=>{if(!e)throw new Error(JSON.stringify({code:1,msg:'Parameter "device" is required'}));const{answer_devices:n}=J.agentInfo;if(!n.split(",").map(r=>Number(r)).includes(e))throw new Error(JSON.stringify({code:1,msg:"当前状态不支持"}))},changeState:(e,n)=>{if(!e)throw new Error(JSON.stringify({code:1,msg:'Parameter "state" is required'}));if(!n)throw new Error(JSON.stringify({code:1,msg:'Parameter "state_name" is required'}));if(e===2&&(n==="通话中"||n==="整理"))throw new Error(JSON.stringify({code:1,msg:"当前状态不支持"}));if(![1,2].includes(e))throw new Error(JSON.stringify({code:1,msg:"当前状态不支持"}))},setAgentExplicit:e=>{const{out_display_select_switch:n,out_display_data:r}=J.agentInfo;if(n!==1)throw new Error(JSON.stringify({code:1,msg:"当前坐席设置未开启允许指定外显"}));if(!e)throw new Error(JSON.stringify({code:1,msg:'Parameter "number" is required'}));if(!(r||"").split("#").includes(e))throw new Error(JSON.stringify({code:1,msg:"当前外显号码不存在"}))}},this.changeDevice=async e=>{try{if(P.get("isCalling"))throw new Error(JSON.stringify({code:1,msg:"当前正在通话中,请勿切换设备"}));this.roleData.agentInfo(),this.roleData.requestInfo(e);const{data:n,success:r}=e,{device:i}=n;i===1&&await OA.initRtcFn(),this.roleData.changeDevice(i);const{agent_no:o}=J.agentInfo;await(a=>Ln(`${br}/device/change`,a))({agent_no:o,answer_device:i}),P.updateAnswerDevice(i);const A=P.get("actionConfigs");P.updateActionConfigs(A),i===2&&J.stateObject.state===bt.UNREGISTERED&&await this._changeState({data:{...J.stateBeforeChange,state_name:J.stateBeforeChange.state===bt.IDLE?"空闲":"忙碌"}},"q"),r==null||r({code:0,msg:"请求成功"})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}}formatDate(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`}static setInitRtcFn(e){this.initRtcFn=e}async _agentLogin(e){try{const r=await(n={agent_no:e},Ln(`${br}/agent/login`,n));J.agentInfo=r.data}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}var n}async _changeState(e,n){try{J.autoStateTimer&&(clearTimeout(J.autoStateTimer),J.autoStateTimer=null),this.roleData.agentInfo(),this.roleData.requestInfo(e);const{data:r,success:i}=e,{state:o,state_name:A}=r,{agent_no:a}=J.agentInfo;await Ff({agent_no:a,state_name:A,state:o},n),o===bt.IDLE?P.updateActionConfigs(Yn):o===bt.BUSY&&P.updateActionConfigs(cs),J.stateObject={state:o,state_name:A},i==null||i({code:0,msg:"请求成功"})}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async _getInCallCrmDetail(e){var n;try{const{phone:r}=e.data,i={};eu(r)?i.trace_id=r:i.phone=r.replace(/[\s\r\n-]+/g,"");const o=await(A=>Ln(`${ya}/crm/popups`,A))({...i});(n=e.success)==null||n.call(e,o)}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async changeState(e,n){try{if(P.get("isCalling"))throw new Error(JSON.stringify({code:1,msg:"当前正在通话中,请勿切换设备"}));J.autoStateTimer&&(clearTimeout(J.autoStateTimer),J.autoStateTimer=null),this.roleData.agentInfo(),this.roleData.requestInfo(e);const{data:r,success:i}=e,{state:o,state_name:A}=r;this.roleData.changeState(o,A);const{agent_no:a}=J.agentInfo;await Ff({agent_no:a,state_name:A,state:o},n),(J.stateObject.state===bt.IDLE||J.stateObject.state===bt.BUSY&&A!=="整理")&&(J.stateBeforeChange=J.stateObject),o===bt.IDLE?P.updateActionConfigs(Yn):o===bt.BUSY&&P.updateActionConfigs(cs),J.stateObject={state:o,state_name:A},i==null||i({code:0,msg:"请求成功"})}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async getIdleAgentList(e){var r;const{agent_no:n}=J.agentInfo;try{this.roleData.agentInfo();const i=await(o=>Ln(`${br}/agent/free`,o))({agent_no:n});(r=e.success)==null||r.call(e,i)}catch(i){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(i.message).msg),i}}async getAgentState(e){var n;try{const r=await Ln(`${ya}/agent/statecfg/list`,{}),i=(r.data||[]).filter(o=>o.enable===0).filter(o=>o.state!==0&&o.state!==3).filter(o=>o.state_name!=="通话中"&&o.state_name!=="整理"&&o.state_name!=="未注册"&&o.state_name!=="离线接听").map(o=>({state:o.state,state_name:o.state_name})).reverse();(n=e.success)==null||n.call(e,{...r,data:i})}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async setAgentExplicit(e){var n;try{this.roleData.agentInfo(),this.roleData.requestInfo(e),this.roleData.setAgentExplicit(e.data.number);const{agent_id:r}=J.agentInfo;await(i=>Ln(`${ya}/agent/update`,i))({agent_id:r,out_display_number:e.data.number}),P.updateSelectOutNumber(e.data.number),(n=e.success)==null||n.call(e,{code:0,msg:"请求成功"})}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async checkAgentLogin(e){var n;try{this.roleData.requestInfo(e);const{agent_no:r}=e.data;if(!r)throw new Error(JSON.stringify({code:1,msg:'Parameter "agent_no" is required'}));const i=await(o=>Ln(`${br}/agent/islogin`,o))({agent_no:r});(n=e.success)==null||n.call(e,i)}catch(r){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(r.message).msg),r}}async getCallRecord(e){try{this.roleData.agentInfo();const{success:n}=e,r=new Date,i=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0),o=new Date(r.getFullYear(),r.getMonth(),r.getDate(),23,59,59),A=[this.formatDate(i),this.formatDate(o)],{agent_no:a}=J.agentInfo,s=await(g=>Ln(`${ya}/agent/recordpage`,g))({start_time:A[0],end_time:A[1],page_no:1,page_size:10,agent_no:a}),{code:l,msg:u,data:d}=s;n==null||n({code:l,msg:u,data:d})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async logout(e){this.roleData.agentInfo();try{const{agent_no:n}=J.agentInfo,{data:r,success:i}=e;await(o=>Ln(`${br}/agent/logout`,o))({...r,agent_no:n}),i==null||i({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async listenCall(e){try{const{agent_no:n}=J.agentInfo,{data:r,success:i}=e;if(this.roleData.agentInfo(),this.roleData.requestInfo(e),!r.monitored_agent_no)throw new Error(JSON.stringify({code:1,msg:'Parameter "monitored_agent_no" is required'}));await(o=>Ln(`${br}/call/monitor`,o))({...r,monitor_agent_no:n}),J.monitoredAgentNo=r.monitored_agent_no,i==null||i({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async earCall(e){try{const{agentInfo:n,monitoredAgentNo:r}=J,{agent_no:i}=n;this.roleData.agentInfo();const{success:o}=e;if(!r)throw new Error(JSON.stringify({code:1,msg:"当前未有监听坐席"}));await(A=>Ln(`${br}/call/whisper`,A))({monitored_agent_no:r,monitor_agent_no:i}),o==null||o({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async stopEarCall(e){try{const{agentInfo:n,earSpeakAgent:r}=J;if(!r)throw new Error(JSON.stringify({code:1,msg:"当前没有正在耳语的坐席"}));const{agent_no:i}=n;this.roleData.agentInfo();const{success:o}=e;await(A=>Ln(`${br}/call/stopwhisper`,A))({monitor_agent_no:i,monitored_agent_no:r}),o==null||o({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async forceInsert(e){try{const{agentInfo:n,monitoredAgentNo:r}=J,{agent_no:i}=n;this.roleData.agentInfo();const{success:o}=e;if(!r)throw new Error(JSON.stringify({code:1,msg:"当前未有监听坐席"}));await(A=>Ln(`${br}/call/bargein`,A))({monitored_agent_no:r,monitor_agent_no:i}),o==null||o({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}async forceDisconnect(e){try{const{agentInfo:n,monitoredAgentNo:r}=J,{agent_no:i}=n;this.roleData.agentInfo();const{success:o}=e;if(!r)throw new Error(JSON.stringify({code:1,msg:"当前未有监听坐席"}));await(A=>Ln(`${br}/call/intercept`,A))({monitored_agent_no:r,monitor_agent_no:i}),o==null||o({code:0,msg:""})}catch(n){throw ge.emit(Ge.FAIL_NOTIFICATION,JSON.parse(n.message).msg),n}}}const kw=console.log,Uf=(...t)=>{J.logBuiltinEnabled&&kw(...t)};let ti=null;class An{constructor(e,n){this.url=e,this.onOpenCallback=n,this.ws=null,this.heartbeatWorker=null,this.reconnectDelay=3e3,this.manualClose=!1,this.apiClient=new OA,this.sipClient=null,this.pendingMessages=new Map,this.initWebSocket()}static getInstance({url:e,sipClient:n,onOpen:r}){if(!ti){if(!e)throw new Error("WebSocket 尚未初始化");ti=new An(e,r),ti.sipClient=n}return ti}setSipClient(e){this.sipClient=e}stateIdleChange(e){const{state:n}=J.stateObject;n!==bt.IDLE&&this.apiClient._changeState({data:{...J.stateBeforeChange,state_name:J.stateBeforeChange.state===bt.IDLE?"空闲":"忙碌"}},e)}inCallAutoAnswer(){const{soft_device_auto_answer:e,auto_answer_time:n}=J.agentInfo,r=e===1,i=P.get("direction");if(r&&i===yn.INCOMING){const o=Number(n)||0;o>0&&(J.autoAnswerTimer=setTimeout(()=>{var A;(A=this.sipClient)==null||A.answerCall(),J.autoAnswerTimer=null},1e3*o-500))}}async getCustomerInfo(e){try{await this.apiClient._getInCallCrmDetail({data:{phone:e},success:n=>{P.updateCustomerInfo(n.data||{phone:n.data.phone,is_vip:0,customer_name:"未知客户",city:"未知",province:"未知",contact_count:0,in_contact_count:0,trace_id:n.data.trace_id,contact_count_month:0,in_contact_count_month:0})}})}catch{}}putAgentState(e,n){if(!e)return;if(n===5)return void this.stateIdleChange("device_type5");J.sessionId="";const{post_call_process_time:r}=J.agentInfo,i=r||0;if(J.autoStateTimer&&(clearTimeout(J.autoStateTimer),J.autoStateTimer=null),P.updateCustomerInfo(void 0),i>0){const{state:o}=J.stateObject;if(o===bt.IDLE)return;this.apiClient._changeState({data:{state:bt.BUSY,state_name:"整理"}},"ez"),J.autoStateTimer=setTimeout(()=>{J.autoStateTimer=null,this.stateIdleChange(`delay${i}`)},1e3*i)}else this.stateIdleChange("delay0")}stateBusyChange(){J.sessionId="",clearTimeout(J.autoStateTimer),P.updateCustomerInfo(void 0),this.apiClient._changeState({data:{state:bt.BUSY,state_name:"忙碌"}},"dm")}initWebSocket(){var n;if(((n=this.ws)==null?void 0:n.readyState)===1||!P.get("isNextState")||this.manualClose)return;const e=B0(jd,Pd);this.ws=new WebSocket(this.url+e),this.ws.onopen=()=>{const r=new Date().getTime();this.sendMessage({type:0,msg_id:r}),this.pendingMessages.set(r,performance.now()),this.startHeartbeat(),this.manualClose=!1,this.onOpenCallback&&this.onOpenCallback()},this.ws.onmessage=async r=>{var u;const i=JSON.parse(r.data),{type:o,data:A,code:a,msg:s,msg_id:l}=i;if(o===0&&l){const d=this.pendingMessages.get(l),g=performance.now()-d;J.latency=parseFloat(g.toFixed(2)),this.pendingMessages.delete(l)}if(o!==0&&Uf("%cWebSocket 收到消息:","color: blue; font-weight: bold;",i),o!==rt.OUT_CALL&&o!==rt.PREVIEW_OUT_CALL||(a!==0?(P.reset(),ge.emit(oe.OUT_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s),P.updateActionConfigs(Yn),setTimeout(()=>{P.updateCustomerInfo(void 0)},500),this.stateIdleChange("h")):a===0&&(ge.emit(oe.OUT_SUCCESS),J.sessionId=A.session_id,clearTimeout(J.autoStateTimer))),o===rt.AGENT_STATE){const{state:d,state_name:g}=A;J.stateObject={state:d,state_name:g},(u=J.stateBeforeChange)!=null&&u.state||J.stateObject.state!==bt.IDLE&&(J.stateObject.state!==bt.BUSY||g==="整理")||(J.stateBeforeChange=J.stateObject),g==="振铃中"&&P.updateDisplayText(Ht.AGENT_RINGING);const p=P.get("isCalling");d!==bt.UNREGISTERED||p||P.updateActionConfigs(xw),d===bt.IDLE&&J.stateObject.state===bt.UNREGISTERED&&P.updateActionConfigs(Yn),ge.emit(oe.AGENT_STATE,{state:d,state_name:g})}else if(o===rt.OUT_CALL_INCOMING_CALL){try{await this.getCustomerInfo(A.trace_id||A.customer_phone)}catch(d){console.error(d)}A.preview_task_id?ge.emit(oe.PREVIEW_OUT_INCOMING_CALL,{customer_phone:A.customer_phone,session_id:A.session_id,preview_task_id:A.preview_task_id,trace_id:A.trace_id}):A.direction===0?ge.emit(oe.OUT_INCOMING_CALL,{customer_phone:A.customer_phone,session_id:A.session_id,trace_id:A.trace_id}):A.direction===8&&ge.emit(oe.INTERNAL_OUT_INCOMING_CALL,{customer_phone:A.customer_phone,session_id:A.session_id,trace_id:A.trace_id}),J.sessionId=A.session_id,P.updateActionConfigs(Tw,A.direction!==8)}else if(o===rt.OUT_CALL_END){if(J.sessionId!==A.session_id)return;if(P.updateDisplayText(""),A.device_type===1&&A.agent_no===J.agentInfo.agent_no)P.reset(),ge.emit(oe.OUT_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0);else if(A.device_type===2&&A.agent_no===J.agentInfo.agent_no)P.reset(),ge.emit(oe.OUR_SIDE_CONSULT_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0);else if(A.device_type===2&&A.agent_no!==J.agentInfo.agent_no)P.get("isCalling")&&(P.updateDisplayText(Ht.CALLING),ge.emit(oe.OTHER_SIDE_CONSULT_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Vi));else if(A.device_type===3&&A.agent_no===J.agentInfo.agent_no)P.reset(),ge.emit(oe.THREE_WAY_OUR_SIDE_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0);else if(A.device_type===4&&A.agent_no===J.agentInfo.agent_no)P.reset(),ge.emit(oe.TRANSFER_END,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0);else if(A.device_type===4&&A.agent_no!==J.agentInfo.agent_no){ge.emit(oe.TRANSFER_FAILED,"未知原因"),ge.emit(Ge.FAIL_NOTIFICATION,"转接失败");const d=P.get("direction");d===yn.OUTGOING?P.updateActionConfigs(Vi):d===yn.INCOMING&&P.updateActionConfigs(Gi)}else A.device_type===5&&A.agent_no===J.agentInfo.agent_no&&(J.monitoredAgentNo="",J.earSpeakAgent="",P.reset(),ge.emit(oe.LISTEN_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn),this.putAgentState(!0,5))}else if(o===rt.OUT_CALL_RINGING)A.type===1&&(ge.emit(oe.OUT_RINGING,{session_id:J.sessionId,type:A.type}),P.updateDisplayText(Ht.RINGING));else if(o===rt.OUT_CALL_ANSWER)clearTimeout(J.autoStateTimer),P.updateIsCalling(!0),P.updateOutCallIsAnswer(!0),P.updateDisplayText(Ht.CALLING),A.direction===8?(ge.emit(oe.INTERNAL_OUT_OFF_ANSWER,{session_id:J.sessionId}),P.updateActionConfigs(Yl)):(ge.emit(oe.OUT_OFF_ANSWER,{session_id:J.sessionId}),P.updateActionConfigs(Vi));else if(o===rt.CONSULT_RINGING)ge.emit(oe.CONSULT_RINGING,{session_id:A.session_id}),P.updateDisplayText(Ht.AGENT_RINGING),P.updateActionConfigs([]),clearTimeout(J.autoStateTimer);else if(o===rt.CONSULT_ANSWER)ge.emit(oe.CONSULT_OFF_HOOK,{session_id:A.session_id}),P.updateConsultIsAnswer(!0),P.updateDisplayText(Ht.CONSULTING),P.updateActionConfigs(Qf);else if(o===rt.CONSULT_FAIL)ge.emit(oe.CONSULT_FAILED,{custom_reason:A.custom_reason}),P.updateDisplayText(Ht.CALLING),P.updateActionConfigs(Vi);else if(o===rt.CONSULT_CALL_IN)ge.emit(oe.CONSULT_INCOMING,{agent_no:A.agent_no,agent_mane:A.agent_name,session_id:A.session_id}),J.sessionId=A.session_id,P.updateIsCalling(!0),P.updateDirection(yn.CONSULT),P.updateDisplayText(Ht.CONSULT_CALL_IN),P.updateActionConfigs(wa),J.enableBrowserAlert&&So.show("📞 咨询来电",`坐席 [${A.agent_name}] 正在咨询...`,()=>{ge.emit(Ge.NOTIFICATION_CLICK,{agent_mane:A.agent_name,agent_no:A.agent_no})},J.browserAlertTime);else if(o===rt.CONSULT_CALL_IN_SUCCESS)ge.emit(oe.CONSULT_CALL_IN_SUCCESS,{session_id:A.session_id}),P.updateConsultIsAnswer(!0),P.updateDisplayText(Ht.CALLING),P.updateActionConfigs(Bw);else if(o===rt.CONSULT_RETURN_CALL_SUCCESS)A.status==="success"?(P.updateConsultIsAnswer(!1),ge.emit(oe.CONSULT_RETURN_CALL_SUCCESS),P.updateDisplayText(Ht.CALLING),ge.emit(oe.OTHER_SIDE_CONSULT_HANGUP),P.updateActionConfigs(Vi)):ge.emit(Ge.FAIL_NOTIFICATION,"媒体失败");else if(o===rt.MUTE)a===0?(P.updateIsMuted(!0),ge.emit(oe.MUTE_SUCCESS),P.updateDisplayText(Ht.MUTING)):(ge.emit(oe.MUTE_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.UNMUTE)a===0?(P.updateIsMuted(!1),ge.emit(oe.UNMUTE_SUCCESS),P.updateDisplayText(Ht.CALLING)):(ge.emit(oe.UNMUTE_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CALL_HOLD)a===0?(P.updateIsHold(!0),P.updateDisplayText(Ht.HOLDING),ge.emit(oe.HOLD_SUCCESS)):(ge.emit(oe.HOLD_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CALL_UNHOLD)a===0?(P.updateDisplayText(Ht.CALLING),P.updateIsHold(!1),ge.emit(oe.UNHOLD_SUCCESS)):(ge.emit(oe.UNHOLD_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CONSULT_TRANSFER)a===0?ge.emit(oe.CONSULT_TRANSFER_SUCCESS):(ge.emit(oe.CONSULT_TRANSFER_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CONSULT_TRANSFER_FAILED)ge.emit(oe.CONSULT_TRANSFER_FAILED,A.status);else if(o===rt.CONSULT_TRANSFER_OFF_HOOK)P.updateDirection(yn.INCOMING),P.updateDisplayText(Ht.CALLING),ge.emit(oe.CONSULT_TRANSFER_OFF_HOOK),P.updateActionConfigs(Gi),P.updateIncomingIsAnswer(!0),P.updateConsultIsAnswer(!1);else if(o===rt.INCOMING_CALL){clearTimeout(J.autoStateTimer),J.sessionId=A.session_id;try{await this.getCustomerInfo(A.trace_id||A.customer_phone)}catch(d){console.error(d)}P.updateIsCalling(!0),P.updateDirection(yn.INCOMING),P.updateDisplayText(Ht.INCOMING_CALL),this.inCallAutoAnswer(),A.direction===1&&ge.emit(oe.INCOMING_CALL,{customer_phone:A.customer_phone,trace_id:A.trace_id,session_id:A.session_id}),A.direction===8&&ge.emit(oe.INCOMING_CALL_IN,{customer_phone:A.customer_phone,trace_id:A.trace_id,session_id:A.session_id}),A.direction===3&&ge.emit(oe.PREDICT_INCOMING_CALL,{customer_phone:A.customer_phone,trace_id:A.trace_id,session_id:A.session_id}),A.direction===6&&ge.emit(oe.DUAL_CALL_INCOMING_CALL,{customer_phone:A.customer_phone,trace_id:A.trace_id,session_id:A.session_id}),P.updateActionConfigs(wa),J.enableBrowserAlert&&So.show("📞 客户来电",`客户 [${A.customer_phone}] 正在呼入...`,()=>{ge.emit(Ge.NOTIFICATION_CLICK,{customer_phone:A.customer_phone})},J.browserAlertTime)}else if(o===rt.INCOMING_CALL_OFF_HOOK)P.updateIncomingIsAnswer(!0),A.direction===8?(P.updateActionConfigs(Yl),ge.emit(oe.INCOMING_CALL_IN_OFF_HOOK,{session_id:J.sessionId})):(P.updateActionConfigs(Gi),ge.emit(oe.INCOMING_CALL_OFF_HOOK,{session_id:J.sessionId})),P.updateDisplayText(Ht.CALLING);else if(o===rt.INCOMING_CALL_END){if(J.sessionId!==A.session_id)return;if(P.updateDisplayText(""),A.device_type!==1&&A.device_type!==7||A.agent_no!==J.agentInfo.agent_no)if(A.device_type===2&&A.agent_no===J.agentInfo.agent_no)P.reset(),ge.emit(oe.OUR_SIDE_CONSULT_HANGUP,{session_id:A.session_id}),this.putAgentState(!0),P.updateActionConfigs(Yn);else if(A.device_type===2&&A.agent_no!==J.agentInfo.agent_no)P.updateDisplayText(Ht.CALLING),ge.emit(oe.OTHER_SIDE_CONSULT_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Vi);else if(A.device_type===3&&A.agent_no===J.agentInfo.agent_no)this.putAgentState(!0),P.reset(),ge.emit(oe.THREE_WAY_OUR_SIDE_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn);else if(A.device_type===4&&A.agent_no===J.agentInfo.agent_no)this.putAgentState(!0),P.reset(),ge.emit(oe.TRANSFER_END,{session_id:A.session_id}),P.updateActionConfigs(Yn);else if(A.device_type===4&&A.agent_no!==J.agentInfo.agent_no){ge.emit(oe.TRANSFER_FAILED,"未知原因"),ge.emit(Ge.FAIL_NOTIFICATION,"转接失败");const d=P.get("direction");d===yn.OUTGOING?P.updateActionConfigs(Vi):d===yn.INCOMING&&P.updateActionConfigs(Gi)}else A.device_type===5&&A.agent_no===J.agentInfo.agent_no&&(this.putAgentState(!0,5),J.monitoredAgentNo="",J.earSpeakAgent="",P.reset(),ge.emit(oe.LISTEN_HANGUP,{session_id:A.session_id}),P.updateActionConfigs(Yn));else this.putAgentState(!0),P.reset(),ge.emit(oe.INCOMING_CALL_END,{session_id:A.session_id}),P.updateActionConfigs(Yn)}else if(o===rt.SATISFACTION_EVALUATION)a===0?ge.emit(oe.SATISFACTION_EVALUATION_SUCCESS):(ge.emit(oe.SATISFACTION_EVALUATION_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s));else if(o===rt.CONSULT_THREE_WAY)a!==0?(ge.emit(oe.CONSULT_THREE_WAY_FAILED,s),ge.emit(Ge.FAIL_NOTIFICATION,s)):a===0&&P.updateIsMeeting(!0);else if(o===rt.CONSULT_THREE_WAY_RESULT)A.status==="success"?(P.updateDirection(yn.MEETING),P.updateDisplayText(Ht.MEETING),P.updateActionConfigs(Ow),ge.emit(oe.CONSULT_THREE_WAY_SUCCESS)):(ge.emit(oe.CONSULT_THREE_WAY_FAILED,{conf_name:A.conf_name}),P.updateIsMeeting(!1));else if(o===rt.TRANSFER_INCOMING_CALL)clearTimeout(J.autoStateTimer),A.agent_no===J.agentInfo.agent_no?(P.updateDisplayText(Ht.TRANSFERRING),ge.emit(oe.TRANSFER_PROGRESS),P.updateActionConfigs([]),P.updateTransferIsAnswer(!0)):(J.sessionId=A.session_id,ge.emit(oe.TRANSFER_INCOMING_CALL,{agent_no:A.agent_no,agent_name:A.agent_name,session_id:A.session_id}),P.updateIsCalling(!0),P.updateDirection(yn.TRANSFER),P.updateDisplayText(Ht.TRANSFER_INCOMING_CALL),P.updateActionConfigs(wa),J.enableBrowserAlert&&So.show("📞 转接来电",`坐席 [${A.agent_no}] 正在转接...`,()=>{ge.emit(Ge.NOTIFICATION_CLICK,{agent_no:A.agent_no})},J.browserAlertTime));else if(o===rt.TRANSFER_OFF_HOOK)ge.emit(oe.TRANSFER_OFF_HOOK,{session_id:J.sessionId}),P.updateTransferIsAnswer(!1),P.updateDisplayText(Ht.CALLING),P.updateActionConfigs(Gi,A.direction!==8);else if(o===rt.TRANSFER_FAILED){if(A.status==="failed"){ge.emit(oe.TRANSFER_FAILED,"未知原因"),ge.emit(Ge.FAIL_NOTIFICATION,"转接失败");const d=P.get("direction");d===yn.OUTGOING?P.updateActionConfigs(Vi):d===yn.INCOMING&&P.updateActionConfigs(Gi)}}else o===rt.KICK_OFFLINE?ge.emit(Ge.KICK_OFF):o===rt.CONTINUOUS_NOT_ANSWER?(ge.emit(Ge.FAIL_NOTIFICATION,`已连续 ${A.miss_count} 次未接, 设置忙碌`),this.stateBusyChange()):o===rt.SIGN_OUT?ge.emit(Ge.SIGN_OUT):o===rt.SIGN_IN_SWITCH_DEVICE?ge.emit(Ge.SIGN_IN_SWITCH_DEVICE,A):o===rt.LISTEN_INCOMING_CALL?(clearTimeout(J.autoStateTimer),J.sessionId=A.session_id,P.updateIsCalling(!0),P.updateDirection(yn.INCOMING),this.inCallAutoAnswer(),P.updateDisplayText(Ht.LISTENING),P.updateActionConfigs(wa),ge.emit(oe.LISTEN_INCOMING_CALL,{session_id:A.session_id}),J.enableBrowserAlert&&So.show("📞 监听来电","正在来电...",()=>{ge.emit(Ge.NOTIFICATION_CLICK,{customer_phone:A.customer_phone})},J.browserAlertTime)):o===rt.LISTEN_INCOMING_CALL_OFF_HOOK?(J.monitoredAgentNo=A.monitored_agent_no,J.earSpeakAgent="",P.updateIncomingIsAnswer(!0),ge.emit(oe.LISTEN_INCOMING_CALL_OFF_HOOK,{session_id:J.sessionId,monitored_agent_no:A.monitored_agent_no}),P.updateActionConfigs(kf),P.updateDisplayText(Ht.CALLING)):o===rt.LISTEN_CALL_FAILED?A.status==="failed"&&(ge.emit(oe.LISTEN_CALL_FAILED),J.monitoredAgentNo=""):o===rt.EAR_SPEECH?A.status==="success"?(A.monitored_agent_no===J.agentInfo.agent_no&&(P.updateActionConfigs(Dw),ge.emit(oe.EAR_SPEECH_BE_SUCCESS)),A.monitor_agent_no===J.agentInfo.agent_no&&(P.updateActionConfigs(Nw),ge.emit(oe.EAR_SPEECH_SUCCESS,{monitored_agent_no:A.monitored_agent_no,monitor_agent_no:A.monitor_agent_no}),J.earSpeakAgent=A.monitored_agent_no)):ge.emit(oe.EAR_SPEECH_FAILED):o===rt.STOP_EAR_SPEECH?A.status==="success"?(A.monitored_agent_no===J.agentInfo.agent_no&&P.updateActionConfigs(Gi),A.monitor_agent_no===J.agentInfo.agent_no&&P.updateActionConfigs(kf),J.earSpeakAgent="",ge.emit(oe.STOP_EAR_SPEECH_SUCCESS)):ge.emit(oe.STOP_EAR_SPEECH_FAILED):o===rt.CALL_FORCE_INSERT?A.status==="success"?(A.monitored_agent_no===J.agentInfo.agent_no&&(P.updateActionConfigs(Qw),ge.emit(oe.CALL_FORCE_INSERT_SUCCESS,{monitored_agent_no:A.monitored_agent_no,monitor_agent_no:A.monitor_agent_no})),A.monitor_agent_no===J.agentInfo.agent_no&&(P.updateActionConfigs(Fw),ge.emit(oe.CALL_FORCE_INSERT_SUCCESS_LISTENER,{monitored_agent_no:A.monitored_agent_no,monitor_agent_no:A.monitor_agent_no}))):ge.emit(oe.CALL_FORCE_INSERT_FAILED):o===rt.INTERNAL_CALL_START_CONSULT?A.agent_no===J.agentInfo.agent_no?(P.updateConsultIsAnswer(!0),P.updateActionConfigs(Qf),P.updateDisplayText(Ht.CONSULTING)):(P.updateDisplayText(Ht.OTHER_SIDE_CONSULTING),P.updateActionConfigs([])):o===rt.INTERNAL_CALL_END_CONSULT?(P.updateActionConfigs(Yl),P.updateDisplayText(""),P.updateConsultIsAnswer(!1)):o===rt.CALL_SIP_INCOMING_CALL&&ge.emit(oe.CALL_SIP_INCOMING_CALL)},this.ws.onclose=r=>{ge.emit(Ge.FAIL_NOTIFICATION,"链接已断开,请检查网络"),this.stopHeartbeat();const i=P.get("isNextState");!this.manualClose&&i&&setTimeout(()=>this.initWebSocket(),this.reconnectDelay)},this.ws.onerror=r=>{var i;ge.emit(Ge.FAIL_NOTIFICATION,"连接失败,请检查网络"),(i=this.ws)==null||i.close()}}startHeartbeat(){const e=new Blob([`
|
|
164
164
|
let timer;
|
|
165
165
|
self.onmessage = function (e) {
|
|
166
166
|
if (e.data === 'start') {
|
|
@@ -171,7 +171,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
171
171
|
clearInterval(timer);
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
-
`],{type:"application/javascript"}),n=URL.createObjectURL(e);this.heartbeatWorker=new Worker(n),this.heartbeatWorker.onmessage=()=>{const r=new Date().getTime();this.sendMessage({type:0,msg_id:r}),this.pendingMessages.set(r,performance.now())},this.heartbeatWorker.postMessage("start")}stopHeartbeat(){this.heartbeatWorker&&(this.heartbeatWorker.postMessage("stop"),this.heartbeatWorker.terminate(),this.heartbeatWorker=null)}sendMessage(e){var n;((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),e.type!==0&&Uf("%cWebSocket 发送消息:","color: green; font-weight: bold;",e)):console.warn("WebSocket 未连接,消息未发送")}close(){var e;this.manualClose=!0,this.stopHeartbeat(),(e=this.ws)==null||e.close()}reconnect(){this.initWebSocket()}static __internalClose(){ti&&(ti.close(),ti=null)}static __internalSend(e){if(!ti)throw new Error("WebSocket 尚未初始化");ti.sendMessage(e)}}class Uw{constructor(e){this.sipClient=null,this.sipClient=e}roleMute(){const e=P.get("isCalling"),n=W.sessionId;if(!e)throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));if(!n)throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}))}holdCall(){this.roleMute();const e=P.get("isHold"),{sessionId:n}=W;if(n){if(!P.get("actionConfigs").includes("hold"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿保持"}));if(e)throw new Error(JSON.stringify({code:1,msg:"当前已处于保持状态"}));An.__internalSend({type:rt.CALL_HOLD,data:{session_id:n}})}}unholdCall(){this.roleMute();const{isHold:e}=P.getState(),{sessionId:n}=W;if(!P.get("actionConfigs").includes("unhold"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿取消保持"}));if(n){if(!e)throw new Error(JSON.stringify({code:1,msg:"当前未处于保持状态"}));An.__internalSend({type:rt.CALL_UNHOLD,data:{session_id:n}})}}sendDTMF(e){if(P.get("answerDevice")!==1)throw new Error(JSON.stringify({code:1,msg:"当前设备不支持此功能"}));if(!P.get("actionConfigs").includes("dtmf"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿发送按键"}));const{isCalling:n}=P.getState();if(!n)throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));this.sipClient.sendDTMF(e)}cancelCall(){if(!P.get("isCalling"))throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));const e=W.sessionId;ge.emit(oe.REJECT,{session_id:e}),An.__internalSend({type:rt.AGENT_HANGUP,data:{session_id:e}})}async consultCall(e){this.roleMute();const{isCalling:n,outCallIsAnswer:r,consultIsAnswer:i,incomingIsAnswer:o}=P.getState(),A=W.sessionId;if(!P.get("actionConfigs").includes("consult"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用咨询"}));if(i)throw new Error(JSON.stringify({code:1,msg:"当前正在咨询"}));if(!(n||r||o))throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));if(!A)throw new Error(JSON.stringify({code:1,msg:"sessionId不存在"}));An.__internalSend({type:rt.CONSULT_REQUEST,data:{session_id:A,consultation_agent_no:e}})}async answerCall(){if(P.get("answerDevice")!==1)throw new Error(JSON.stringify({code:1,msg:"当前设备不支持此功能"}));await this.sipClient.answerCall()}makeCall(e){if(typeof e!="string"||e.trim()==="")throw new Error(JSON.stringify({code:1,msg:"外呼号码非法"}));const n={};eu(e)?n.trace_id=e:n.customer_phone=e.replace(/[\s\r\n-]+/g,"");const r=P.get("isCalling"),i=P.get("selectOutNumber")||"";if(r)throw new Error(JSON.stringify({code:1,msg:"正在呼叫中,请勿重复点击"}));P.updateIsCalling(!0),P.updateDirection(yn.OUTGOING),An.__internalSend({type:rt.OUT_CALL,data:{...n,caller:i.replace(/[\s\r\n-]+/g,"")}})}previewCall(e,n){const r={};eu(e)?r.trace_id=e:r.customer_phone=e.replace(/[\s\r\n-]+/g,"");const i=P.get("isCalling"),o=P.get("selectOutNumber")||"";if(i)throw new Error(JSON.stringify({code:1,msg:"正在呼叫中,请勿重复点击"}));if(typeof e!="string"||e.trim()==="")throw new Error(JSON.stringify({code:1,msg:"外呼号码非法"}));P.updateIsCalling(!0),P.updateDirection(yn.OUTGOING),An.__internalSend({type:rt.PREVIEW_OUT_CALL,data:{...r,caller:o,preview_task_id:n}})}async hangup(){if(!P.get("isCalling"))throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));const e=W.sessionId;An.__internalSend({type:rt.AGENT_HANGUP,data:{session_id:e}})}mute(){this.roleMute();const e=P.get("actionConfigs"),n=P.get("isMuted"),r=W.sessionId;if(n)throw new Error(JSON.stringify({code:1,msg:"当前未处于静音状态"}));if(!e.includes("mute"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用静音"}));An.__internalSend({type:rt.MUTE,data:{session_id:r}})}unmute(){this.roleMute();const e=P.get("actionConfigs"),n=P.get("isMuted"),r=W.sessionId;if(!n)throw new Error(JSON.stringify({code:1,msg:"当前未处于未静音状态"}));if(!e.includes("unmute"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用静音"}));An.__internalSend({type:rt.UNMUTE,data:{session_id:r}})}consultTransfer(){this.roleMute();const e=P.get("consultIsAnswer"),n=W.sessionId;if(!P.get("actionConfigs").includes("consult_transfer"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用咨询转移"}));if(!e)throw new Error(JSON.stringify({code:1,msg:"当前未处于咨询中"}));An.__internalSend({type:rt.CONSULT_TRANSFER,data:{session_id:n}})}satisfactionEvaluation(){this.roleMute();const e=W.sessionId;if(!P.get("actionConfigs").includes("satisfaction"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用满意度评价"}));An.__internalSend({type:rt.SATISFACTION_EVALUATION,data:{session_id:e}})}startConference(){if(this.roleMute(),!P.get("actionConfigs").includes("conference"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用三方会议"}));const e=W.sessionId;if(!P.get("consultIsAnswer"))throw new Error(JSON.stringify({code:1,msg:"当前未处于咨询中"}));An.__internalSend({type:rt.CONSULT_THREE_WAY,data:{session_id:e}})}consultRetrieve(){if(this.roleMute(),!P.get("actionConfigs").includes("consult_retrieve"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿取回通话"}));const e=W.sessionId;if(!P.get("consultIsAnswer"))throw new Error(JSON.stringify({code:1,msg:"当前未处于咨询中"}));An.__internalSend({type:rt.CONSULT_RETURN_CALL,data:{session_id:e}})}async transferAgent(e){if(this.roleMute(),!P.get("actionConfigs").includes("transfer"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿转接"}));const{transferIsAnswer:n}=P.getState(),r=W.sessionId;if(n)throw new Error(JSON.stringify({code:1,msg:"当前正在转接"}));An.__internalSend({type:rt.TRANSFER,data:{session_id:r,transfer_type:0,transfer_dest:e}})}async transferOutline(e){if(this.roleMute(),!P.get("actionConfigs").includes("transfer"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿转接"}));if(!e)throw new Error(JSON.stringify({code:1,msg:"号码不能为空"}));if(!/^\d+$/.test(e))throw new Error(JSON.stringify({code:1,msg:"号码格式错误"}));const{transferIsAnswer:n}=P.getState(),r=W.sessionId;if(n)throw new Error(JSON.stringify({code:1,msg:"当前正在转接"}));if(n)throw new Error(JSON.stringify({code:1,msg:"当前正在转接"}));An.__internalSend({type:rt.TRANSFER,data:{session_id:r,transfer_type:2,transfer_dest:e}})}}var or,xn,un,ln,Ji,GA,jA,Wi,PA,LA,Ni,D0,N0,YA,F0;const Ts=class Ts{constructor(){fr(this,Ni);fr(this,xn);fr(this,un);fr(this,ln);fr(this,Ji);fr(this,GA);fr(this,jA);fr(this,Wi);fr(this,PA);fr(this,LA);fr(this,YA);if(Dn(this,xn,null),Dn(this,un,new OA),Dn(this,Ji,null),Dn(this,Wi,!1),Dn(this,PA,()=>{}),Dn(this,LA,()=>{}),this.initWebRtc=async()=>{if(lt(this,xn))return;const e=W.agentInfo.sip_account_list.find(n=>n.device_type===1);if(!e)throw new Error(JSON.stringify({code:1,msg:"未找到 sip_account_list"}));{const n=e.sip_register_addr;Dn(this,xn,new fw({server:n.split(":")[0],user:e.sip_account,password:e.sip_password,webSocket:`wss://${n}`,callTimeout:3e4},lt(this,YA))),await lt(this,xn).start()}},Dn(this,YA,e=>{const{type:n,data:r}=e;ge.emit(n,r)}),!or._creatingInstance)throw new Error("请使用 YSYTAgentSdk.getInstance() 获取实例");clearInterval(lt(this,Ji)),Dn(this,Ji,setInterval(async()=>{const e=await ua(this,Ni,F0).call(this);I0.updateRttObject(e)},2e3)),So.requestMediaPermissions(),Dn(this,jA,P.subscribeKey("isNextState",async e=>{if(e){P.get("answerDevice")===1&&await lt(this,xn).reconnect();let n="";const r=new URL(Ei).host;n=Ei.includes("https")?`wss://${r}`:`ws://${r}`;const{agent_no:i}=W.agentInfo;An.getInstance({url:`${n}/ccs-ws/api/v1/ws/call/${i}?Authorization=`,sipClient:lt(this,xn)}),setTimeout(()=>{lt(this,un)._changeState({data:{state:bt.BUSY,state_name:"忙碌"},success:()=>{P.updateDisplayText(""),ge.emit(oe.AGENT_STATE,{state:bt.BUSY,state_name:"忙碌"})}},"d")},10)}else An.__internalClose(),P.updateIsCalling(!1),P.updateOutCallIsAnswer(!1),P.updateIncomingIsAnswer(!1),P.updateIsMuted(!1),P.updateConsultIsAnswer(!1),P.updateIsHold(!1),P.updateCustomerInfo(void 0),P.updateDisplayText("离线")})),Dn(this,GA,P.subscribeKey("answerDevice",async e=>{e===1?W.stateObject.state===bt.UNREGISTERED&&await lt(this,un)._changeState({data:{...W.stateBeforeChange,state_name:W.stateBeforeChange.state===bt.IDLE?"空闲":"忙碌"}},"qq"):await this.destroyRtc()})),this.on(Ge.KICK_OFF,()=>{this.destroy()}),window.addEventListener("beforeunload",e=>{e.returnValue="",this.destroy()}),window.addEventListener("online",lt(this,PA)),window.addEventListener("offline",lt(this,LA))}static get instance(){return this._instance}static async destroyInstance(){this._instance&&(await this._instance.destroy(),this._instance=null)}static getInstance(e){if(!this._instance){if(!e)throw new Error("首次调用必须传入配置参数");const{url:n,appKey:r,appSecret:i,agentNo:o}=e;Ei=n||"https://aicc-api.yescloudy.com",jd=r,Pd=i,Ll=o,or._creatingInstance=!0,this._instance=new or,delete or._creatingInstance}return this._instance}getInit(){return lt(this,Wi)}async init({enableBrowserAlert:e,logBuiltinEnabled:n,browserAlertTime:r}){try{let i="";const o=new URL(Ei).host;i=Ei.includes("https")?`wss://${o}`:`ws://${o}`;const A=An.getInstance({url:`${i}/ccs-ws/api/v1/ws/call/${Ll}?Authorization=`,sipClient:null,onOpen:async()=>{W.logBuiltinEnabled=n||!1,W.browserAlertTime=r||5e3,await lt(this,un)._agentLogin(Ll);const{current_answer_device:a,current_state:s,out_display_number:l,out_display_select_switch:u}=W.agentInfo;s===bt.IDLE?(P.updateActionConfigs(Yn),W.stateObject={state:s,state_name:"空闲"},W.stateBeforeChange=W.stateObject):s===bt.BUSY?(P.updateActionConfigs(cs),W.stateObject={state:s,state_name:"忙碌"},W.stateBeforeChange=W.stateObject):s===bt.UNREGISTERED&&(P.updateActionConfigs(cs),W.stateObject={state:s,state_name:"未注册"}),u===1?P.updateSelectOutNumber(l):P.updateSelectOutNumber(""),P.updateAnswerDevice(a),OA.setInitRtcFn(this.initWebRtc),a===1&&(await this.initWebRtc(),A.setSipClient(lt(this,xn))),Dn(this,ln,new Uw(lt(this,xn))),W.enableBrowserAlert=e,e&&So.requestPermission(),ge.emit(Ge.AGENT_INIT_STATUS,!0),Dn(this,Wi,!0),clearInterval(or._timer),or._timer=null,ua(this,Ni,N0).call(this)}})}catch{ge.emit(Ge.AGENT_INIT_STATUS,!1),Dn(this,Wi,!1)}}on(e,n){return ge.on(e,n),this}off(e,n){ge.off(e,n)}offAll(){ge.clearAllListeners()}async destroyRtc(){var e;await((e=lt(this,xn))==null?void 0:e.destroy()),Dn(this,xn,null)}async destroy(){var e,n;or._instance&&(await this.destroyRtc(),(e=lt(this,GA))==null||e.call(this),(n=lt(this,jA))==null||n.call(this),clearInterval(lt(this,Ji)),An.__internalClose(),ge.emit(Ge.DESTROY),this.offAll(),or._instance=null,P.reset(),P.updateSelectOutNumber(""),clearInterval(or._timer),or._timer=null)}get call_api(){const e=n=>(...r)=>n.apply(this,r);return{answerCall:e(()=>lt(this,ln).answerCall()),makeCall:n=>lt(this,ln).makeCall(n),previewMakeCall:(n,r)=>lt(this,ln).previewCall(n,r),cancelCall:e(()=>lt(this,ln).cancelCall()),hangup:e(()=>lt(this,ln).hangup()),sendDTMF:e(n=>lt(this,ln).sendDTMF(n)),holdCall:e(()=>lt(this,ln).holdCall()),unholdCall:e(()=>lt(this,ln).unholdCall()),consultCall:e(async n=>{try{await lt(this,ln).consultCall(n)}catch(r){throw console.warn(r),r}}),consultRetrieve:e(()=>lt(this,ln).consultRetrieve()),consultTransfer:e(()=>lt(this,ln).consultTransfer()),mute:e(()=>lt(this,ln).mute()),unmute:e(()=>lt(this,ln).unmute()),satisfactionEvaluation:e(()=>lt(this,ln).satisfactionEvaluation()),startConference:e(()=>lt(this,ln).startConference()),transferAgent:e(n=>lt(this,ln).transferAgent(n)),transferOutline:e(n=>lt(this,ln).transferOutline(n)),earSpeakStart:e(n=>lt(this,un).earCall(n)),earSpeakStop:e(n=>lt(this,un).stopEarCall(n)),forceInsert:e(n=>lt(this,un).forceInsert(n)),forceDisconnect:e(n=>lt(this,un).forceDisconnect(n))}}get agent_api(){const e=n=>(...r)=>n.apply(this,r);return{changeDevice:e(n=>lt(this,un).changeDevice(n)),changeState:e(async n=>{const r=P.get("answerDevice");if(W.stateObject.state===bt.UNREGISTERED&&r===1){await lt(this,xn).reconnect();let i="";const o=new URL(Ei).host;i=Ei.includes("https")?`wss://${o}`:`ws://${o}`;const{agent_no:A}=W.agentInfo;An.getInstance({url:`${i}/ccs-ws/api/v1/ws/call/${A}?Authorization=`,sipClient:lt(this,xn)})}await lt(this,un).changeState(n,"c")}),getIdleAgentList:e(n=>lt(this,un).getIdleAgentList(n)),getAgentState:e(n=>lt(this,un).getAgentState(n)),setAgentExplicit:e(n=>lt(this,un).setAgentExplicit(n)),checkAgentLogin:n=>lt(this,un).checkAgentLogin(n),getCallRecord:n=>lt(this,un).getCallRecord(n),agentLogout:async(n,r)=>{try{await lt(this,un).logout(n),await this.destroy(),r==null||r({code:0,msg:""})}catch{}},listenAgentCall:n=>lt(this,un).listenCall(n)}}getAgentData(){const{agent_no:e,agent_name:n,answer_devices:r,out_display_data:i,out_display_select_switch:o,current_state:A}=W.agentInfo,{stateObject:a}=W,s={1:"软电话",2:"手机模式",3:"SIP话机"};return{agent_no:e,agent_name:n,init_state:A,default_device:P.get("answerDevice"),out_display_data:i,out_display_select_switch:o,answer_devices:(r||"").split(",").map(l=>({value:Number(l),label:s[Number(l)]})),stateObject:a}}async getRealTimeCustomerInfo(){return P.get("customerObject")}setBrowserAlert(e){if(typeof e!="boolean")throw new Error(JSON.stringify({code:1,msg:"参数类型错误"}));W.logBuiltinEnabled=e||!1}setBrowserAlertTime(e){if(typeof e!="number")throw new Error(JSON.stringify({code:1,msg:"参数类型错误"}));W.browserAlertTime=e||3e3}};xn=new WeakMap,un=new WeakMap,ln=new WeakMap,Ji=new WeakMap,GA=new WeakMap,jA=new WeakMap,Wi=new WeakMap,PA=new WeakMap,LA=new WeakMap,Ni=new WeakSet,D0=async function(){const e=P.get("isNextState");try{await Rw(),e||P.updateIsNextState(!0)}catch{ge.emit(Ge.FAIL_NOTIFICATION,"网络断开,请检查网络"),e&&P.updateIsNextState(!1)}},N0=function(){or._timer||(or._timer=setInterval(()=>ua(this,Ni,D0).call(this),3e3))},YA=new WeakMap,F0=async function(){return lt(this,xn)?lt(this,xn).getNetworkStats():{}},Ts._instance=null,Ts._timer=null;let Bn=Ts;or=Bn;var _n=function(){return _n=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_n.apply(this,arguments)};function to(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Gw(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var jw=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Pw=Gw(function(t){return jw.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),_t="-ms-",mA="-moz-",jt="-webkit-",Q0="comm",js="rule",Ld="decl",Lw="@import",k0="@keyframes",Yw="@layer",U0=Math.abs,Yd=String.fromCharCode,tu=Object.assign;function Hw(t,e){return wn(t,0)^45?(((e<<2^wn(t,0))<<2^wn(t,1))<<2^wn(t,2))<<2^wn(t,3):0}function G0(t){return t.trim()}function ii(t,e){return(t=e.exec(t))?t[0]:t}function It(t,e,n){return t.replace(e,n)}function Za(t,e,n){return t.indexOf(e,n)}function wn(t,e){return t.charCodeAt(e)|0}function Qo(t,e,n){return t.slice(e,n)}function Hr(t){return t.length}function j0(t){return t.length}function dA(t,e){return e.push(t),t}function Kw(t,e){return t.map(e).join("")}function Gf(t,e){return t.filter(function(n){return!ii(n,e)})}var Ps=1,ko=1,P0=0,wr=0,gn=0,Ko="";function Ls(t,e,n,r,i,o,A,a){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Ps,column:ko,length:A,return:"",siblings:a}}function yi(t,e){return tu(Ls("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function uo(t){for(;t.root;)t=yi(t.root,{children:[t]});dA(t,t.siblings)}function Zw(){return gn}function zw(){return gn=wr>0?wn(Ko,--wr):0,ko--,gn===10&&(ko=1,Ps--),gn}function Or(){return gn=wr<P0?wn(Ko,wr++):0,ko++,gn===10&&(ko=1,Ps++),gn}function _i(){return wn(Ko,wr)}function za(){return wr}function Ys(t,e){return Qo(Ko,t,e)}function nu(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Jw(t){return Ps=ko=1,P0=Hr(Ko=t),wr=0,[]}function Ww(t){return Ko="",t}function Hl(t){return G0(Ys(wr-1,ru(t===91?t+2:t===40?t+1:t)))}function Xw(t){for(;(gn=_i())&&gn<33;)Or();return nu(t)>2||nu(gn)>3?"":" "}function _w(t,e){for(;--e&&Or()&&!(gn<48||gn>102||gn>57&&gn<65||gn>70&&gn<97););return Ys(t,za()+(e<6&&_i()==32&&Or()==32))}function ru(t){for(;Or();)switch(gn){case t:return wr;case 34:case 39:t!==34&&t!==39&&ru(gn);break;case 40:t===41&&ru(t);break;case 92:Or();break}return wr}function $w(t,e){for(;Or()&&t+gn!==57;)if(t+gn===84&&_i()===47)break;return"/*"+Ys(e,wr-1)+"*"+Yd(t===47?t:Or())}function eS(t){for(;!nu(_i());)Or();return Ys(t,wr)}function tS(t){return Ww(Ja("",null,null,null,[""],t=Jw(t),0,[0],t))}function Ja(t,e,n,r,i,o,A,a,s){for(var l=0,u=0,d=A,g=0,p=0,V=0,v=1,m=1,C=1,w=0,S="",M=i,I=o,f=r,R=S;m;)switch(V=w,w=Or()){case 40:if(V!=108&&wn(R,d-1)==58){Za(R+=It(Hl(w),"&","&\f"),"&\f",U0(l?a[l-1]:0))!=-1&&(C=-1);break}case 34:case 39:case 91:R+=Hl(w);break;case 9:case 10:case 13:case 32:R+=Xw(V);break;case 92:R+=_w(za()-1,7);continue;case 47:switch(_i()){case 42:case 47:dA(nS($w(Or(),za()),e,n,s),s);break;default:R+="/"}break;case 123*v:a[l++]=Hr(R)*C;case 125*v:case 59:case 0:switch(w){case 0:case 125:m=0;case 59+u:C==-1&&(R=It(R,/\f/g,"")),p>0&&Hr(R)-d&&dA(p>32?Pf(R+";",r,n,d-1,s):Pf(It(R," ","")+";",r,n,d-2,s),s);break;case 59:R+=";";default:if(dA(f=jf(R,e,n,l,u,i,a,S,M=[],I=[],d,o),o),w===123)if(u===0)Ja(R,e,f,f,M,o,d,a,I);else switch(g===99&&wn(R,3)===110?100:g){case 100:case 108:case 109:case 115:Ja(t,f,f,r&&dA(jf(t,f,f,0,0,i,a,S,i,M=[],d,I),I),i,I,d,a,r?M:I);break;default:Ja(R,f,f,f,[""],I,0,a,I)}}l=u=p=0,v=C=1,S=R="",d=A;break;case 58:d=1+Hr(R),p=V;default:if(v<1){if(w==123)--v;else if(w==125&&v++==0&&zw()==125)continue}switch(R+=Yd(w),w*v){case 38:C=u>0?1:(R+="\f",-1);break;case 44:a[l++]=(Hr(R)-1)*C,C=1;break;case 64:_i()===45&&(R+=Hl(Or())),g=_i(),u=d=Hr(S=R+=eS(za())),w++;break;case 45:V===45&&Hr(R)==2&&(v=0)}}return o}function jf(t,e,n,r,i,o,A,a,s,l,u,d){for(var g=i-1,p=i===0?o:[""],V=j0(p),v=0,m=0,C=0;v<r;++v)for(var w=0,S=Qo(t,g+1,g=U0(m=A[v])),M=t;w<V;++w)(M=G0(m>0?p[w]+" "+S:It(S,/&\f/g,p[w])))&&(s[C++]=M);return Ls(t,e,n,i===0?js:a,s,l,u,d)}function nS(t,e,n,r){return Ls(t,e,n,Q0,Yd(Zw()),Qo(t,2,-2),0,r)}function Pf(t,e,n,r,i){return Ls(t,e,n,Ld,Qo(t,0,r),Qo(t,r+1,-1),r,i)}function L0(t,e,n){switch(Hw(t,e)){case 5103:return jt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return jt+t+t;case 4789:return mA+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return jt+t+mA+t+_t+t+t;case 5936:switch(wn(t,e+11)){case 114:return jt+t+_t+It(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return jt+t+_t+It(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return jt+t+_t+It(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return jt+t+_t+t+t;case 6165:return jt+t+_t+"flex-"+t+t;case 5187:return jt+t+It(t,/(\w+).+(:[^]+)/,jt+"box-$1$2"+_t+"flex-$1$2")+t;case 5443:return jt+t+_t+"flex-item-"+It(t,/flex-|-self/g,"")+(ii(t,/flex-|baseline/)?"":_t+"grid-row-"+It(t,/flex-|-self/g,""))+t;case 4675:return jt+t+_t+"flex-line-pack"+It(t,/align-content|flex-|-self/g,"")+t;case 5548:return jt+t+_t+It(t,"shrink","negative")+t;case 5292:return jt+t+_t+It(t,"basis","preferred-size")+t;case 6060:return jt+"box-"+It(t,"-grow","")+jt+t+_t+It(t,"grow","positive")+t;case 4554:return jt+It(t,/([^-])(transform)/g,"$1"+jt+"$2")+t;case 6187:return It(It(It(t,/(zoom-|grab)/,jt+"$1"),/(image-set)/,jt+"$1"),t,"")+t;case 5495:case 3959:return It(t,/(image-set\([^]*)/,jt+"$1$`$1");case 4968:return It(It(t,/(.+:)(flex-)?(.*)/,jt+"box-pack:$3"+_t+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+jt+t+t;case 4200:if(!ii(t,/flex-|baseline/))return _t+"grid-column-align"+Qo(t,e)+t;break;case 2592:case 3360:return _t+It(t,"template-","")+t;case 4384:case 3616:return n&&n.some(function(r,i){return e=i,ii(r.props,/grid-\w+-end/)})?~Za(t+(n=n[e].value),"span",0)?t:_t+It(t,"-start","")+t+_t+"grid-row-span:"+(~Za(n,"span",0)?ii(n,/\d+/):+ii(n,/\d+/)-+ii(t,/\d+/))+";":_t+It(t,"-start","")+t;case 4896:case 4128:return n&&n.some(function(r){return ii(r.props,/grid-\w+-start/)})?t:_t+It(It(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return It(t,/(.+)-inline(.+)/,jt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Hr(t)-1-e>6)switch(wn(t,e+1)){case 109:if(wn(t,e+4)!==45)break;case 102:return It(t,/(.+:)(.+)-([^]+)/,"$1"+jt+"$2-$3$1"+mA+(wn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Za(t,"stretch",0)?L0(It(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return It(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,o,A,a,s,l){return _t+i+":"+o+l+(A?_t+i+"-span:"+(a?s:+s-+o)+l:"")+t});case 4949:if(wn(t,e+6)===121)return It(t,":",":"+jt)+t;break;case 6444:switch(wn(t,wn(t,14)===45?18:11)){case 120:return It(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+jt+(wn(t,14)===45?"inline-":"")+"box$3$1"+jt+"$2$3$1"+_t+"$2box$3")+t;case 100:return It(t,":",":"+_t)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return It(t,"scroll-","scroll-snap-")+t}return t}function us(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function rS(t,e,n,r){switch(t.type){case Yw:if(t.children.length)break;case Lw:case Ld:return t.return=t.return||t.value;case Q0:return"";case k0:return t.return=t.value+"{"+us(t.children,r)+"}";case js:if(!Hr(t.value=t.props.join(",")))return""}return Hr(n=us(t.children,r))?t.return=t.value+"{"+n+"}":""}function iS(t){var e=j0(t);return function(n,r,i,o){for(var A="",a=0;a<e;a++)A+=t[a](n,r,i,o)||"";return A}}function oS(t){return function(e){e.root||(e=e.return)&&t(e)}}function AS(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case Ld:t.return=L0(t.value,t.length,n);return;case k0:return us([yi(t,{value:It(t.value,"@","@"+jt)})],r);case js:if(t.length)return Kw(n=t.props,function(i){switch(ii(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":uo(yi(t,{props:[It(i,/:(read-\w+)/,":"+mA+"$1")]})),uo(yi(t,{props:[i]})),tu(t,{props:Gf(n,r)});break;case"::placeholder":uo(yi(t,{props:[It(i,/:(plac\w+)/,":"+jt+"input-$1")]})),uo(yi(t,{props:[It(i,/:(plac\w+)/,":"+mA+"$1")]})),uo(yi(t,{props:[It(i,/:(plac\w+)/,_t+"input-$1")]})),uo(yi(t,{props:[i]})),tu(t,{props:Gf(n,r)});break}return""})}}var aS={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},no=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Y0="active",H0="data-styled-version",Hs="6.1.19",Hd=`/*!sc*/
|
|
174
|
+
`],{type:"application/javascript"}),n=URL.createObjectURL(e);this.heartbeatWorker=new Worker(n),this.heartbeatWorker.onmessage=()=>{const r=new Date().getTime();this.sendMessage({type:0,msg_id:r}),this.pendingMessages.set(r,performance.now())},this.heartbeatWorker.postMessage("start")}stopHeartbeat(){this.heartbeatWorker&&(this.heartbeatWorker.postMessage("stop"),this.heartbeatWorker.terminate(),this.heartbeatWorker=null)}sendMessage(e){var n;((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),e.type!==0&&Uf("%cWebSocket 发送消息:","color: green; font-weight: bold;",e)):console.warn("WebSocket 未连接,消息未发送")}close(){var e;this.manualClose=!0,this.stopHeartbeat(),(e=this.ws)==null||e.close()}reconnect(){this.initWebSocket()}static __internalClose(){ti&&(ti.close(),ti=null)}static __internalSend(e){if(!ti)throw new Error("WebSocket 尚未初始化");ti.sendMessage(e)}}class Uw{constructor(e){this.sipClient=null,this.sipClient=e}roleMute(){const e=P.get("isCalling"),n=J.sessionId;if(!e)throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));if(!n)throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}))}holdCall(){this.roleMute();const e=P.get("isHold"),{sessionId:n}=J;if(n){if(!P.get("actionConfigs").includes("hold"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿保持"}));if(e)throw new Error(JSON.stringify({code:1,msg:"当前已处于保持状态"}));An.__internalSend({type:rt.CALL_HOLD,data:{session_id:n}})}}unholdCall(){this.roleMute();const{isHold:e}=P.getState(),{sessionId:n}=J;if(!P.get("actionConfigs").includes("unhold"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿取消保持"}));if(n){if(!e)throw new Error(JSON.stringify({code:1,msg:"当前未处于保持状态"}));An.__internalSend({type:rt.CALL_UNHOLD,data:{session_id:n}})}}sendDTMF(e){if(P.get("answerDevice")!==1)throw new Error(JSON.stringify({code:1,msg:"当前设备不支持此功能"}));if(!P.get("actionConfigs").includes("dtmf"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿发送按键"}));const{isCalling:n}=P.getState();if(!n)throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));this.sipClient.sendDTMF(e)}cancelCall(){if(!P.get("isCalling"))throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));const e=J.sessionId;ge.emit(oe.REJECT,{session_id:e}),An.__internalSend({type:rt.AGENT_HANGUP,data:{session_id:e}})}async consultCall(e){this.roleMute();const{isCalling:n,outCallIsAnswer:r,consultIsAnswer:i,incomingIsAnswer:o}=P.getState(),A=J.sessionId;if(!P.get("actionConfigs").includes("consult"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用咨询"}));if(i)throw new Error(JSON.stringify({code:1,msg:"当前正在咨询"}));if(!(n||r||o))throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));if(!A)throw new Error(JSON.stringify({code:1,msg:"sessionId不存在"}));An.__internalSend({type:rt.CONSULT_REQUEST,data:{session_id:A,consultation_agent_no:e}})}async answerCall(){if(P.get("answerDevice")!==1)throw new Error(JSON.stringify({code:1,msg:"当前设备不支持此功能"}));await this.sipClient.answerCall()}makeCall(e){if(typeof e!="string"||e.trim()==="")throw new Error(JSON.stringify({code:1,msg:"外呼号码非法"}));const n={};eu(e)?n.trace_id=e:n.customer_phone=e.replace(/[\s\r\n-]+/g,"");const r=P.get("isCalling"),i=P.get("selectOutNumber")||"";if(r)throw new Error(JSON.stringify({code:1,msg:"正在呼叫中,请勿重复点击"}));P.updateIsCalling(!0),P.updateDirection(yn.OUTGOING),An.__internalSend({type:rt.OUT_CALL,data:{...n,caller:i.replace(/[\s\r\n-]+/g,"")}})}previewCall(e,n){const r={};eu(e)?r.trace_id=e:r.customer_phone=e.replace(/[\s\r\n-]+/g,"");const i=P.get("isCalling"),o=P.get("selectOutNumber")||"";if(i)throw new Error(JSON.stringify({code:1,msg:"正在呼叫中,请勿重复点击"}));if(typeof e!="string"||e.trim()==="")throw new Error(JSON.stringify({code:1,msg:"外呼号码非法"}));P.updateIsCalling(!0),P.updateDirection(yn.OUTGOING),An.__internalSend({type:rt.PREVIEW_OUT_CALL,data:{...r,caller:o,preview_task_id:n}})}async hangup(){if(!P.get("isCalling"))throw new Error(JSON.stringify({code:1,msg:"当前没有通话"}));const e=J.sessionId;An.__internalSend({type:rt.AGENT_HANGUP,data:{session_id:e}})}mute(){this.roleMute();const e=P.get("actionConfigs"),n=P.get("isMuted"),r=J.sessionId;if(n)throw new Error(JSON.stringify({code:1,msg:"当前未处于静音状态"}));if(!e.includes("mute"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用静音"}));An.__internalSend({type:rt.MUTE,data:{session_id:r}})}unmute(){this.roleMute();const e=P.get("actionConfigs"),n=P.get("isMuted"),r=J.sessionId;if(!n)throw new Error(JSON.stringify({code:1,msg:"当前未处于未静音状态"}));if(!e.includes("unmute"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用静音"}));An.__internalSend({type:rt.UNMUTE,data:{session_id:r}})}consultTransfer(){this.roleMute();const e=P.get("consultIsAnswer"),n=J.sessionId;if(!P.get("actionConfigs").includes("consult_transfer"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用咨询转移"}));if(!e)throw new Error(JSON.stringify({code:1,msg:"当前未处于咨询中"}));An.__internalSend({type:rt.CONSULT_TRANSFER,data:{session_id:n}})}satisfactionEvaluation(){this.roleMute();const e=J.sessionId;if(!P.get("actionConfigs").includes("satisfaction"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用满意度评价"}));An.__internalSend({type:rt.SATISFACTION_EVALUATION,data:{session_id:e}})}startConference(){if(this.roleMute(),!P.get("actionConfigs").includes("conference"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿调用三方会议"}));const e=J.sessionId;if(!P.get("consultIsAnswer"))throw new Error(JSON.stringify({code:1,msg:"当前未处于咨询中"}));An.__internalSend({type:rt.CONSULT_THREE_WAY,data:{session_id:e}})}consultRetrieve(){if(this.roleMute(),!P.get("actionConfigs").includes("consult_retrieve"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿取回通话"}));const e=J.sessionId;if(!P.get("consultIsAnswer"))throw new Error(JSON.stringify({code:1,msg:"当前未处于咨询中"}));An.__internalSend({type:rt.CONSULT_RETURN_CALL,data:{session_id:e}})}async transferAgent(e){if(this.roleMute(),!P.get("actionConfigs").includes("transfer"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿转接"}));const{transferIsAnswer:n}=P.getState(),r=J.sessionId;if(n)throw new Error(JSON.stringify({code:1,msg:"当前正在转接"}));An.__internalSend({type:rt.TRANSFER,data:{session_id:r,transfer_type:0,transfer_dest:e}})}async transferOutline(e){if(this.roleMute(),!P.get("actionConfigs").includes("transfer"))throw new Error(JSON.stringify({code:1,msg:"当前状态请勿转接"}));if(!e)throw new Error(JSON.stringify({code:1,msg:"号码不能为空"}));if(!/^\d+$/.test(e))throw new Error(JSON.stringify({code:1,msg:"号码格式错误"}));const{transferIsAnswer:n}=P.getState(),r=J.sessionId;if(n)throw new Error(JSON.stringify({code:1,msg:"当前正在转接"}));if(n)throw new Error(JSON.stringify({code:1,msg:"当前正在转接"}));An.__internalSend({type:rt.TRANSFER,data:{session_id:r,transfer_type:2,transfer_dest:e}})}}var or,xn,un,ln,Ji,GA,jA,Wi,PA,LA,Ni,D0,N0,YA,F0;const Ts=class Ts{constructor(){fr(this,Ni);fr(this,xn);fr(this,un);fr(this,ln);fr(this,Ji);fr(this,GA);fr(this,jA);fr(this,Wi);fr(this,PA);fr(this,LA);fr(this,YA);if(Dn(this,xn,null),Dn(this,un,new OA),Dn(this,Ji,null),Dn(this,Wi,!1),Dn(this,PA,()=>{}),Dn(this,LA,()=>{}),this.initWebRtc=async()=>{if(lt(this,xn))return;const e=J.agentInfo.sip_account_list.find(n=>n.device_type===1);if(!e)throw new Error(JSON.stringify({code:1,msg:"未找到 sip_account_list"}));{const n=e.sip_register_addr;Dn(this,xn,new fw({server:n.split(":")[0],user:e.sip_account,password:e.sip_password,webSocket:`wss://${n}`,callTimeout:3e4},lt(this,YA))),await lt(this,xn).start()}},Dn(this,YA,e=>{const{type:n,data:r}=e;ge.emit(n,r)}),!or._creatingInstance)throw new Error("请使用 YSYTAgentSdk.getInstance() 获取实例");clearInterval(lt(this,Ji)),Dn(this,Ji,setInterval(async()=>{const e=await ua(this,Ni,F0).call(this);I0.updateRttObject(e)},2e3)),So.requestMediaPermissions(),Dn(this,jA,P.subscribeKey("isNextState",async e=>{if(e){P.get("answerDevice")===1&&await lt(this,xn).reconnect();let n="";const r=new URL(Ei).host;n=Ei.includes("https")?`wss://${r}`:`ws://${r}`;const{agent_no:i}=J.agentInfo;An.getInstance({url:`${n}/ccs-ws/api/v1/ws/call/${i}?Authorization=`,sipClient:lt(this,xn)}),setTimeout(()=>{lt(this,un)._changeState({data:{state:bt.BUSY,state_name:"忙碌"},success:()=>{P.updateDisplayText(""),ge.emit(oe.AGENT_STATE,{state:bt.BUSY,state_name:"忙碌"})}},"d")},10)}else An.__internalClose(),P.updateIsCalling(!1),P.updateOutCallIsAnswer(!1),P.updateIncomingIsAnswer(!1),P.updateIsMuted(!1),P.updateConsultIsAnswer(!1),P.updateIsHold(!1),P.updateCustomerInfo(void 0),P.updateDisplayText("离线")})),Dn(this,GA,P.subscribeKey("answerDevice",async e=>{e===1?J.stateObject.state===bt.UNREGISTERED&&await lt(this,un)._changeState({data:{...J.stateBeforeChange,state_name:J.stateBeforeChange.state===bt.IDLE?"空闲":"忙碌"}},"qq"):await this.destroyRtc()})),this.on(Ge.KICK_OFF,()=>{this.destroy()}),window.addEventListener("beforeunload",e=>{e.returnValue="",this.destroy()}),window.addEventListener("online",lt(this,PA)),window.addEventListener("offline",lt(this,LA))}static get instance(){return this._instance}static async destroyInstance(){this._instance&&(await this._instance.destroy(),this._instance=null)}static getInstance(e){if(!this._instance){if(!e)throw new Error("首次调用必须传入配置参数");const{url:n,appKey:r,appSecret:i,agentNo:o}=e;Ei=n||"https://aicc-api.yescloudy.com",jd=r,Pd=i,Ll=o,or._creatingInstance=!0,this._instance=new or,delete or._creatingInstance}return this._instance}getInit(){return lt(this,Wi)}async init({enableBrowserAlert:e,logBuiltinEnabled:n,browserAlertTime:r}){try{let i="";const o=new URL(Ei).host;i=Ei.includes("https")?`wss://${o}`:`ws://${o}`;const A=An.getInstance({url:`${i}/ccs-ws/api/v1/ws/call/${Ll}?Authorization=`,sipClient:null,onOpen:async()=>{J.logBuiltinEnabled=n||!1,J.browserAlertTime=r||5e3,await lt(this,un)._agentLogin(Ll);const{current_answer_device:a,current_state:s,out_display_number:l,out_display_select_switch:u}=J.agentInfo;s===bt.IDLE?(P.updateActionConfigs(Yn),J.stateObject={state:s,state_name:"空闲"},J.stateBeforeChange=J.stateObject):s===bt.BUSY?(P.updateActionConfigs(cs),J.stateObject={state:s,state_name:"忙碌"},J.stateBeforeChange=J.stateObject):s===bt.UNREGISTERED&&(P.updateActionConfigs(cs),J.stateObject={state:s,state_name:"未注册"}),u===1?P.updateSelectOutNumber(l):P.updateSelectOutNumber(""),P.updateAnswerDevice(a),OA.setInitRtcFn(this.initWebRtc),a===1&&(await this.initWebRtc(),A.setSipClient(lt(this,xn))),Dn(this,ln,new Uw(lt(this,xn))),J.enableBrowserAlert=e,e&&So.requestPermission(),ge.emit(Ge.AGENT_INIT_STATUS,!0),Dn(this,Wi,!0),clearInterval(or._timer),or._timer=null,ua(this,Ni,N0).call(this)}})}catch{ge.emit(Ge.AGENT_INIT_STATUS,!1),Dn(this,Wi,!1)}}on(e,n){return ge.on(e,n),this}off(e,n){ge.off(e,n)}offAll(){ge.clearAllListeners()}async destroyRtc(){var e;await((e=lt(this,xn))==null?void 0:e.destroy()),Dn(this,xn,null)}async destroy(){var e,n;or._instance&&(await this.destroyRtc(),(e=lt(this,GA))==null||e.call(this),(n=lt(this,jA))==null||n.call(this),clearInterval(lt(this,Ji)),An.__internalClose(),ge.emit(Ge.DESTROY),this.offAll(),or._instance=null,P.reset(),P.updateSelectOutNumber(""),clearInterval(or._timer),or._timer=null)}get call_api(){const e=n=>(...r)=>n.apply(this,r);return{answerCall:e(()=>lt(this,ln).answerCall()),makeCall:n=>lt(this,ln).makeCall(n),previewMakeCall:(n,r)=>lt(this,ln).previewCall(n,r),cancelCall:e(()=>lt(this,ln).cancelCall()),hangup:e(()=>lt(this,ln).hangup()),sendDTMF:e(n=>lt(this,ln).sendDTMF(n)),holdCall:e(()=>lt(this,ln).holdCall()),unholdCall:e(()=>lt(this,ln).unholdCall()),consultCall:e(async n=>{try{await lt(this,ln).consultCall(n)}catch(r){throw console.warn(r),r}}),consultRetrieve:e(()=>lt(this,ln).consultRetrieve()),consultTransfer:e(()=>lt(this,ln).consultTransfer()),mute:e(()=>lt(this,ln).mute()),unmute:e(()=>lt(this,ln).unmute()),satisfactionEvaluation:e(()=>lt(this,ln).satisfactionEvaluation()),startConference:e(()=>lt(this,ln).startConference()),transferAgent:e(n=>lt(this,ln).transferAgent(n)),transferOutline:e(n=>lt(this,ln).transferOutline(n)),earSpeakStart:e(n=>lt(this,un).earCall(n)),earSpeakStop:e(n=>lt(this,un).stopEarCall(n)),forceInsert:e(n=>lt(this,un).forceInsert(n)),forceDisconnect:e(n=>lt(this,un).forceDisconnect(n))}}get agent_api(){const e=n=>(...r)=>n.apply(this,r);return{changeDevice:e(n=>lt(this,un).changeDevice(n)),changeState:e(async n=>{const r=P.get("answerDevice");if(J.stateObject.state===bt.UNREGISTERED&&r===1){await lt(this,xn).reconnect();let i="";const o=new URL(Ei).host;i=Ei.includes("https")?`wss://${o}`:`ws://${o}`;const{agent_no:A}=J.agentInfo;An.getInstance({url:`${i}/ccs-ws/api/v1/ws/call/${A}?Authorization=`,sipClient:lt(this,xn)})}await lt(this,un).changeState(n,"c")}),getIdleAgentList:e(n=>lt(this,un).getIdleAgentList(n)),getAgentState:e(n=>lt(this,un).getAgentState(n)),setAgentExplicit:e(n=>lt(this,un).setAgentExplicit(n)),checkAgentLogin:n=>lt(this,un).checkAgentLogin(n),getCallRecord:n=>lt(this,un).getCallRecord(n),agentLogout:async(n,r)=>{try{await lt(this,un).logout(n),await this.destroy(),r==null||r({code:0,msg:""})}catch{}},listenAgentCall:n=>lt(this,un).listenCall(n)}}getAgentData(){const{agent_no:e,agent_name:n,answer_devices:r,out_display_data:i,out_display_select_switch:o,current_state:A}=J.agentInfo,{stateObject:a}=J,s={1:"软电话",2:"手机模式",3:"SIP话机"};return{agent_no:e,agent_name:n,init_state:A,default_device:P.get("answerDevice"),out_display_data:i,out_display_select_switch:o,answer_devices:(r||"").split(",").map(l=>({value:Number(l),label:s[Number(l)]})),stateObject:a}}async getRealTimeCustomerInfo(){return P.get("customerObject")}setBrowserAlert(e){if(typeof e!="boolean")throw new Error(JSON.stringify({code:1,msg:"参数类型错误"}));J.logBuiltinEnabled=e||!1}setBrowserAlertTime(e){if(typeof e!="number")throw new Error(JSON.stringify({code:1,msg:"参数类型错误"}));J.browserAlertTime=e||3e3}};xn=new WeakMap,un=new WeakMap,ln=new WeakMap,Ji=new WeakMap,GA=new WeakMap,jA=new WeakMap,Wi=new WeakMap,PA=new WeakMap,LA=new WeakMap,Ni=new WeakSet,D0=async function(){const e=P.get("isNextState");try{await Rw(),e||P.updateIsNextState(!0)}catch{ge.emit(Ge.FAIL_NOTIFICATION,"网络断开,请检查网络"),e&&P.updateIsNextState(!1)}},N0=function(){or._timer||(or._timer=setInterval(()=>ua(this,Ni,D0).call(this),3e3))},YA=new WeakMap,F0=async function(){return lt(this,xn)?lt(this,xn).getNetworkStats():{}},Ts._instance=null,Ts._timer=null;let Bn=Ts;or=Bn;var _n=function(){return _n=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_n.apply(this,arguments)};function to(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Gw(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var jw=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Pw=Gw(function(t){return jw.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),_t="-ms-",mA="-moz-",jt="-webkit-",Q0="comm",js="rule",Ld="decl",Lw="@import",k0="@keyframes",Yw="@layer",U0=Math.abs,Yd=String.fromCharCode,tu=Object.assign;function Hw(t,e){return wn(t,0)^45?(((e<<2^wn(t,0))<<2^wn(t,1))<<2^wn(t,2))<<2^wn(t,3):0}function G0(t){return t.trim()}function ii(t,e){return(t=e.exec(t))?t[0]:t}function It(t,e,n){return t.replace(e,n)}function Za(t,e,n){return t.indexOf(e,n)}function wn(t,e){return t.charCodeAt(e)|0}function Qo(t,e,n){return t.slice(e,n)}function Hr(t){return t.length}function j0(t){return t.length}function dA(t,e){return e.push(t),t}function Kw(t,e){return t.map(e).join("")}function Gf(t,e){return t.filter(function(n){return!ii(n,e)})}var Ps=1,ko=1,P0=0,wr=0,gn=0,Ko="";function Ls(t,e,n,r,i,o,A,a){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Ps,column:ko,length:A,return:"",siblings:a}}function yi(t,e){return tu(Ls("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function uo(t){for(;t.root;)t=yi(t.root,{children:[t]});dA(t,t.siblings)}function Zw(){return gn}function zw(){return gn=wr>0?wn(Ko,--wr):0,ko--,gn===10&&(ko=1,Ps--),gn}function Or(){return gn=wr<P0?wn(Ko,wr++):0,ko++,gn===10&&(ko=1,Ps++),gn}function _i(){return wn(Ko,wr)}function za(){return wr}function Ys(t,e){return Qo(Ko,t,e)}function nu(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Jw(t){return Ps=ko=1,P0=Hr(Ko=t),wr=0,[]}function Ww(t){return Ko="",t}function Hl(t){return G0(Ys(wr-1,ru(t===91?t+2:t===40?t+1:t)))}function Xw(t){for(;(gn=_i())&&gn<33;)Or();return nu(t)>2||nu(gn)>3?"":" "}function _w(t,e){for(;--e&&Or()&&!(gn<48||gn>102||gn>57&&gn<65||gn>70&&gn<97););return Ys(t,za()+(e<6&&_i()==32&&Or()==32))}function ru(t){for(;Or();)switch(gn){case t:return wr;case 34:case 39:t!==34&&t!==39&&ru(gn);break;case 40:t===41&&ru(t);break;case 92:Or();break}return wr}function $w(t,e){for(;Or()&&t+gn!==57;)if(t+gn===84&&_i()===47)break;return"/*"+Ys(e,wr-1)+"*"+Yd(t===47?t:Or())}function eS(t){for(;!nu(_i());)Or();return Ys(t,wr)}function tS(t){return Ww(Ja("",null,null,null,[""],t=Jw(t),0,[0],t))}function Ja(t,e,n,r,i,o,A,a,s){for(var l=0,u=0,d=A,g=0,p=0,V=0,v=1,m=1,C=1,w=0,S="",M=i,I=o,f=r,R=S;m;)switch(V=w,w=Or()){case 40:if(V!=108&&wn(R,d-1)==58){Za(R+=It(Hl(w),"&","&\f"),"&\f",U0(l?a[l-1]:0))!=-1&&(C=-1);break}case 34:case 39:case 91:R+=Hl(w);break;case 9:case 10:case 13:case 32:R+=Xw(V);break;case 92:R+=_w(za()-1,7);continue;case 47:switch(_i()){case 42:case 47:dA(nS($w(Or(),za()),e,n,s),s);break;default:R+="/"}break;case 123*v:a[l++]=Hr(R)*C;case 125*v:case 59:case 0:switch(w){case 0:case 125:m=0;case 59+u:C==-1&&(R=It(R,/\f/g,"")),p>0&&Hr(R)-d&&dA(p>32?Pf(R+";",r,n,d-1,s):Pf(It(R," ","")+";",r,n,d-2,s),s);break;case 59:R+=";";default:if(dA(f=jf(R,e,n,l,u,i,a,S,M=[],I=[],d,o),o),w===123)if(u===0)Ja(R,e,f,f,M,o,d,a,I);else switch(g===99&&wn(R,3)===110?100:g){case 100:case 108:case 109:case 115:Ja(t,f,f,r&&dA(jf(t,f,f,0,0,i,a,S,i,M=[],d,I),I),i,I,d,a,r?M:I);break;default:Ja(R,f,f,f,[""],I,0,a,I)}}l=u=p=0,v=C=1,S=R="",d=A;break;case 58:d=1+Hr(R),p=V;default:if(v<1){if(w==123)--v;else if(w==125&&v++==0&&zw()==125)continue}switch(R+=Yd(w),w*v){case 38:C=u>0?1:(R+="\f",-1);break;case 44:a[l++]=(Hr(R)-1)*C,C=1;break;case 64:_i()===45&&(R+=Hl(Or())),g=_i(),u=d=Hr(S=R+=eS(za())),w++;break;case 45:V===45&&Hr(R)==2&&(v=0)}}return o}function jf(t,e,n,r,i,o,A,a,s,l,u,d){for(var g=i-1,p=i===0?o:[""],V=j0(p),v=0,m=0,C=0;v<r;++v)for(var w=0,S=Qo(t,g+1,g=U0(m=A[v])),M=t;w<V;++w)(M=G0(m>0?p[w]+" "+S:It(S,/&\f/g,p[w])))&&(s[C++]=M);return Ls(t,e,n,i===0?js:a,s,l,u,d)}function nS(t,e,n,r){return Ls(t,e,n,Q0,Yd(Zw()),Qo(t,2,-2),0,r)}function Pf(t,e,n,r,i){return Ls(t,e,n,Ld,Qo(t,0,r),Qo(t,r+1,-1),r,i)}function L0(t,e,n){switch(Hw(t,e)){case 5103:return jt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return jt+t+t;case 4789:return mA+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return jt+t+mA+t+_t+t+t;case 5936:switch(wn(t,e+11)){case 114:return jt+t+_t+It(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return jt+t+_t+It(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return jt+t+_t+It(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return jt+t+_t+t+t;case 6165:return jt+t+_t+"flex-"+t+t;case 5187:return jt+t+It(t,/(\w+).+(:[^]+)/,jt+"box-$1$2"+_t+"flex-$1$2")+t;case 5443:return jt+t+_t+"flex-item-"+It(t,/flex-|-self/g,"")+(ii(t,/flex-|baseline/)?"":_t+"grid-row-"+It(t,/flex-|-self/g,""))+t;case 4675:return jt+t+_t+"flex-line-pack"+It(t,/align-content|flex-|-self/g,"")+t;case 5548:return jt+t+_t+It(t,"shrink","negative")+t;case 5292:return jt+t+_t+It(t,"basis","preferred-size")+t;case 6060:return jt+"box-"+It(t,"-grow","")+jt+t+_t+It(t,"grow","positive")+t;case 4554:return jt+It(t,/([^-])(transform)/g,"$1"+jt+"$2")+t;case 6187:return It(It(It(t,/(zoom-|grab)/,jt+"$1"),/(image-set)/,jt+"$1"),t,"")+t;case 5495:case 3959:return It(t,/(image-set\([^]*)/,jt+"$1$`$1");case 4968:return It(It(t,/(.+:)(flex-)?(.*)/,jt+"box-pack:$3"+_t+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+jt+t+t;case 4200:if(!ii(t,/flex-|baseline/))return _t+"grid-column-align"+Qo(t,e)+t;break;case 2592:case 3360:return _t+It(t,"template-","")+t;case 4384:case 3616:return n&&n.some(function(r,i){return e=i,ii(r.props,/grid-\w+-end/)})?~Za(t+(n=n[e].value),"span",0)?t:_t+It(t,"-start","")+t+_t+"grid-row-span:"+(~Za(n,"span",0)?ii(n,/\d+/):+ii(n,/\d+/)-+ii(t,/\d+/))+";":_t+It(t,"-start","")+t;case 4896:case 4128:return n&&n.some(function(r){return ii(r.props,/grid-\w+-start/)})?t:_t+It(It(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return It(t,/(.+)-inline(.+)/,jt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Hr(t)-1-e>6)switch(wn(t,e+1)){case 109:if(wn(t,e+4)!==45)break;case 102:return It(t,/(.+:)(.+)-([^]+)/,"$1"+jt+"$2-$3$1"+mA+(wn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Za(t,"stretch",0)?L0(It(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return It(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,o,A,a,s,l){return _t+i+":"+o+l+(A?_t+i+"-span:"+(a?s:+s-+o)+l:"")+t});case 4949:if(wn(t,e+6)===121)return It(t,":",":"+jt)+t;break;case 6444:switch(wn(t,wn(t,14)===45?18:11)){case 120:return It(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+jt+(wn(t,14)===45?"inline-":"")+"box$3$1"+jt+"$2$3$1"+_t+"$2box$3")+t;case 100:return It(t,":",":"+_t)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return It(t,"scroll-","scroll-snap-")+t}return t}function us(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function rS(t,e,n,r){switch(t.type){case Yw:if(t.children.length)break;case Lw:case Ld:return t.return=t.return||t.value;case Q0:return"";case k0:return t.return=t.value+"{"+us(t.children,r)+"}";case js:if(!Hr(t.value=t.props.join(",")))return""}return Hr(n=us(t.children,r))?t.return=t.value+"{"+n+"}":""}function iS(t){var e=j0(t);return function(n,r,i,o){for(var A="",a=0;a<e;a++)A+=t[a](n,r,i,o)||"";return A}}function oS(t){return function(e){e.root||(e=e.return)&&t(e)}}function AS(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case Ld:t.return=L0(t.value,t.length,n);return;case k0:return us([yi(t,{value:It(t.value,"@","@"+jt)})],r);case js:if(t.length)return Kw(n=t.props,function(i){switch(ii(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":uo(yi(t,{props:[It(i,/:(read-\w+)/,":"+mA+"$1")]})),uo(yi(t,{props:[i]})),tu(t,{props:Gf(n,r)});break;case"::placeholder":uo(yi(t,{props:[It(i,/:(plac\w+)/,":"+jt+"input-$1")]})),uo(yi(t,{props:[It(i,/:(plac\w+)/,":"+mA+"$1")]})),uo(yi(t,{props:[It(i,/:(plac\w+)/,_t+"input-$1")]})),uo(yi(t,{props:[i]})),tu(t,{props:Gf(n,r)});break}return""})}}var aS={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},no=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Y0="active",H0="data-styled-version",Hs="6.1.19",Hd=`/*!sc*/
|
|
175
175
|
`,ds=typeof window<"u"&&typeof document<"u",sS=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),Lf=/invalid hook call/i,Sa=new Set,lS=function(t,e){if(process.env.NODE_ENV!=="production"){var n=e?' with the id of "'.concat(e,'"'):"",r="The component ".concat(t).concat(n,` has been created dynamically.
|
|
176
176
|
`)+`You may see this warning because you've called styled inside another component.
|
|
177
177
|
To resolve this only create new StyledComponents outside of any render method and function component.
|
|
@@ -217,7 +217,7 @@ as for instance in your render method then you may be running into this limitati
|
|
|
217
217
|
|
|
218
218
|
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
219
219
|
Has styled-components' style tag been unmounted or altered by another script?
|
|
220
|
-
`,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function yS(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t[0],r=[],i=1,o=t.length;i<o;i+=1)r.push(t[i]);return r.forEach(function(A){n=n.replace(/%[a-z]/,A)}),n}function Zo(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):"")):new Error(yS.apply(void 0,to([ES[t]],e,!1)).trim())}var wS=function(){function t(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return t.prototype.indexOfGroup=function(e){for(var n=0,r=0;r<e;r++)n+=this.groupSizes[r];return n},t.prototype.insertRules=function(e,n){if(e>=this.groupSizes.length){for(var r=this.groupSizes,i=r.length,o=i;e>=o;)if((o<<=1)<0)throw Zo(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var A=i;A<o;A++)this.groupSizes[A]=0}for(var a=this.indexOfGroup(e+1),s=(A=0,n.length);A<s;A++)this.tag.insertRule(a,n[A])&&(this.groupSizes[e]++,a++)},t.prototype.clearGroup=function(e){if(e<this.length){var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;this.groupSizes[e]=0;for(var o=r;o<i;o++)this.tag.deleteRule(r)}},t.prototype.getGroup=function(e){var n="";if(e>=this.length||this.groupSizes[e]===0)return n;for(var r=this.groupSizes[e],i=this.indexOfGroup(e),o=i+r,A=i;A<o;A++)n+="".concat(this.tag.getRule(A)).concat(Hd);return n},t}(),SS=1<<30,Wa=new Map,gs=new Map,Xa=1,ba=function(t){if(Wa.has(t))return Wa.get(t);for(;gs.has(Xa);)Xa++;var e=Xa++;if(process.env.NODE_ENV!=="production"&&((0|e)<0||e>SS))throw Zo(16,"".concat(e));return Wa.set(t,e),gs.set(e,t),e},IS=function(t,e){Xa=e+1,Wa.set(t,e),gs.set(e,t)},bS="style[".concat(no,"][").concat(H0,'="').concat(Hs,'"]'),MS=new RegExp("^".concat(no,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),RS=function(t,e,n){for(var r,i=n.split(","),o=0,A=i.length;o<A;o++)(r=i[o])&&t.registerName(e,r)},xS=function(t,e){for(var n,r=((n=e.textContent)!==null&&n!==void 0?n:"").split(Hd),i=[],o=0,A=r.length;o<A;o++){var a=r[o].trim();if(a){var s=a.match(MS);if(s){var l=0|parseInt(s[1],10),u=s[2];l!==0&&(IS(u,l),RS(t,u,s[3]),t.getTag().insertRules(l,i)),i.length=0}else i.push(a)}}},Jf=function(t){for(var e=document.querySelectorAll(bS),n=0,r=e.length;n<r;n++){var i=e[n];i&&i.getAttribute(no)!==Y0&&(xS(t,i),i.parentNode&&i.parentNode.removeChild(i))}};function TS(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var ev=function(t){var e=document.head,n=t||e,r=document.createElement("style"),i=function(a){var s=Array.from(a.querySelectorAll("style[".concat(no,"]")));return s[s.length-1]}(n),o=i!==void 0?i.nextSibling:null;r.setAttribute(no,Y0),r.setAttribute(H0,Hs);var A=TS();return A&&r.setAttribute("nonce",A),n.insertBefore(r,o),r},BS=function(){function t(e){this.element=ev(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(n){if(n.sheet)return n.sheet;for(var r=document.styleSheets,i=0,o=r.length;i<o;i++){var A=r[i];if(A.ownerNode===n)return A}throw Zo(17)}(this.element),this.length=0}return t.prototype.insertRule=function(e,n){try{return this.sheet.insertRule(n,e),this.length++,!0}catch{return!1}},t.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.prototype.getRule=function(e){var n=this.sheet.cssRules[e];return n&&n.cssText?n.cssText:""},t}(),OS=function(){function t(e){this.element=ev(e),this.nodes=this.element.childNodes,this.length=0}return t.prototype.insertRule=function(e,n){if(e<=this.length&&e>=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},t}(),DS=function(){function t(e){this.rules=[],this.length=0}return t.prototype.insertRule=function(e,n){return e<=this.length&&(this.rules.splice(e,0,n),this.length++,!0)},t.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},t}(),Wf=ds,NS={isServer:!ds,useCSSOMInjection:!sS},tv=function(){function t(e,n,r){e===void 0&&(e=Uo),n===void 0&&(n={});var i=this;this.options=_n(_n({},NS),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&ds&&Wf&&(Wf=!1,Jf(this)),Zd(this,function(){return function(o){for(var A=o.getTag(),a=A.length,s="",l=function(d){var g=function(C){return gs.get(C)}(d);if(g===void 0)return"continue";var p=o.names.get(g),V=A.getGroup(d);if(p===void 0||!p.size||V.length===0)return"continue";var v="".concat(no,".g").concat(d,'[id="').concat(g,'"]'),m="";p!==void 0&&p.forEach(function(C){C.length>0&&(m+="".concat(C,","))}),s+="".concat(V).concat(v,'{content:"').concat(m,'"}').concat(Hd)},u=0;u<a;u++)l(u);return s}(i)})}return t.registerId=function(e){return ba(e)},t.prototype.rehydrate=function(){!this.server&&ds&&Jf(this)},t.prototype.reconstructWithOptions=function(e,n){return n===void 0&&(n=!0),new t(_n(_n({},this.options),e),this.gs,n&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(n){var r=n.useCSSOMInjection,i=n.target;return n.isServer?new DS(i):r?new BS(i):new OS(i)}(this.options),new wS(e)));var e},t.prototype.hasNameForId=function(e,n){return this.names.has(e)&&this.names.get(e).has(n)},t.prototype.registerName=function(e,n){if(ba(e),this.names.has(e))this.names.get(e).add(n);else{var r=new Set;r.add(n),this.names.set(e,r)}},t.prototype.insertRules=function(e,n,r){this.registerName(e,n),this.getTag().insertRules(ba(e),r)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ba(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),FS=/&/g,QS=/^\s*\/\/.*$/gm;function nv(t,e){return t.map(function(n){return n.type==="rule"&&(n.value="".concat(e," ").concat(n.value),n.value=n.value.replaceAll(",",",".concat(e," ")),n.props=n.props.map(function(r){return"".concat(e," ").concat(r)})),Array.isArray(n.children)&&n.type!=="@keyframes"&&(n.children=nv(n.children,e)),n})}function kS(t){var e,n,r,i=Uo,o=i.options,A=o===void 0?Uo:o,a=i.plugins,s=a===void 0?Ks:a,l=function(g,p,V){return V.startsWith(n)&&V.endsWith(n)&&V.replaceAll(n,"").length>0?".".concat(e):g},u=s.slice();u.push(function(g){g.type===js&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(FS,n).replace(r,l))}),A.prefix&&u.push(AS),u.push(rS);var d=function(g,p,V,v){p===void 0&&(p=""),V===void 0&&(V=""),v===void 0&&(v="&"),e=v,n=p,r=new RegExp("\\".concat(n,"\\b"),"g");var m=g.replace(QS,""),C=tS(V||p?"".concat(V," ").concat(p," { ").concat(m," }"):m);A.namespace&&(C=nv(C,A.namespace));var w=[];return us(C,iS(u.concat(oS(function(S){return w.push(S)})))),w};return d.hash=s.length?s.reduce(function(g,p){return p.name||Zo(15),Yi(g,p.name)},K0).toString():"",d}var US=new tv,su=kS(),rv=T.createContext({shouldForwardProp:void 0,styleSheet:US,stylis:su});rv.Consumer;T.createContext(void 0);function Xf(){return T.useContext(rv)}var lu=function(){function t(e,n){var r=this;this.inject=function(i,o){o===void 0&&(o=su);var A=r.name+o.hash;i.hasNameForId(r.id,A)||i.insertRules(r.id,A,o(r.rules,A,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=n,Zd(this,function(){throw Zo(12,String(r.name))})}return t.prototype.getName=function(e){return e===void 0&&(e=su),this.name+e.hash},t}(),GS=function(t){return t>="A"&&t<="Z"};function _f(t){for(var e="",n=0;n<t.length;n++){var r=t[n];if(n===1&&r==="-"&&t[0]==="-")return t;GS(r)?e+="-"+r.toLowerCase():e+=r}return e.startsWith("ms-")?"-"+e:e}var iv=function(t){return t==null||t===!1||t===""},ov=function(t){var e,n,r=[];for(var i in t){var o=t[i];t.hasOwnProperty(i)&&!iv(o)&&(Array.isArray(o)&&o.isCss||Go(o)?r.push("".concat(_f(i),":"),o,";"):jo(o)?r.push.apply(r,to(to(["".concat(i," {")],ov(o),!1),["}"],!1)):r.push("".concat(_f(i),": ").concat((e=i,(n=o)==null||typeof n=="boolean"||n===""?"":typeof n!="number"||n===0||e in aS||e.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function $i(t,e,n,r){if(iv(t))return[];if(Kd(t))return[".".concat(t.styledComponentId)];if(Go(t)){if(!Go(o=t)||o.prototype&&o.prototype.isReactComponent||!e)return[t];var i=t(e);return process.env.NODE_ENV==="production"||typeof i!="object"||Array.isArray(i)||i instanceof lu||jo(i)||i===null||console.error("".concat(J0(t)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),$i(i,e,n,r)}var o;return t instanceof lu?n?(t.inject(n,r),[t.getName(r)]):[t]:jo(t)?ov(t):Array.isArray(t)?Array.prototype.concat.apply(Ks,t.map(function(A){return $i(A,e,n,r)})):[t.toString()]}function jS(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(Go(n)&&!Kd(n))return!1}return!0}var PS=Z0(Hs),LS=function(){function t(e,n,r){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&jS(e),this.componentId=n,this.baseHash=Yi(PS,n),this.baseStyle=r,tv.registerId(n)}return t.prototype.generateAndInjectStyles=function(e,n,r){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,n,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(this.componentId,this.staticRulesId))i=Ki(i,this.staticRulesId);else{var o=Au($i(this.rules,e,n,r)),A=ou(Yi(this.baseHash,o)>>>0);if(!n.hasNameForId(this.componentId,A)){var a=r(o,".".concat(A),void 0,this.componentId);n.insertRules(this.componentId,A,a)}i=Ki(i,A),this.staticRulesId=A}else{for(var s=Yi(this.baseHash,r.hash),l="",u=0;u<this.rules.length;u++){var d=this.rules[u];if(typeof d=="string")l+=d,process.env.NODE_ENV!=="production"&&(s=Yi(s,d));else if(d){var g=Au($i(d,e,n,r));s=Yi(s,g+u),l+=g}}if(l){var p=ou(s>>>0);n.hasNameForId(this.componentId,p)||n.insertRules(this.componentId,p,r(l,".".concat(p),void 0,this.componentId)),i=Ki(i,p)}}return i},t}(),Av=T.createContext(void 0);Av.Consumer;var zl={},$f=new Set;function YS(t,e,n){var r=Kd(t),i=t,o=!Zl(t),A=e.attrs,a=A===void 0?Ks:A,s=e.componentId,l=s===void 0?function(M,I){var f=typeof M!="string"?"sc":Yf(M);zl[f]=(zl[f]||0)+1;var R="".concat(f,"-").concat(z0(Hs+f+zl[f]));return I?"".concat(I,"-").concat(R):R}(e.displayName,e.parentComponentId):s,u=e.displayName,d=u===void 0?function(M){return Zl(M)?"styled.".concat(M):"Styled(".concat(J0(M),")")}(t):u,g=e.displayName&&e.componentId?"".concat(Yf(e.displayName),"-").concat(e.componentId):e.componentId||l,p=r&&i.attrs?i.attrs.concat(a).filter(Boolean):a,V=e.shouldForwardProp;if(r&&i.shouldForwardProp){var v=i.shouldForwardProp;if(e.shouldForwardProp){var m=e.shouldForwardProp;V=function(M,I){return v(M,I)&&m(M,I)}}else V=v}var C=new LS(n,g,r?i.componentStyle:void 0);function w(M,I){return function(f,R,q){var E=f.attrs,h=f.componentStyle,y=f.defaultProps,x=f.foldedComponentIds,b=f.styledComponentId,B=f.target,O=T.useContext(Av),N=Xf(),F=f.shouldForwardProp||N.shouldForwardProp;process.env.NODE_ENV!=="production"&&T.useDebugValue(b);var j=cS(R,O,y)||Uo,Y=function(J,z,te){for(var X,Ae=_n(_n({},z),{className:void 0,theme:te}),le=0;le<J.length;le+=1){var ue=Go(X=J[le])?X(Ae):X;for(var ne in ue)Ae[ne]=ne==="className"?Ki(Ae[ne],ue[ne]):ne==="style"?_n(_n({},Ae[ne]),ue[ne]):ue[ne]}return z.className&&(Ae.className=Ki(Ae.className,z.className)),Ae}(E,R,j),H=Y.as||B,L={};for(var G in Y)Y[G]===void 0||G[0]==="$"||G==="as"||G==="theme"&&Y.theme===j||(G==="forwardedAs"?L.as=Y.forwardedAs:F&&!F(G,H)||(L[G]=Y[G],F||process.env.NODE_ENV!=="development"||Pw(G)||$f.has(G)||!iu.has(H)||($f.add(G),console.warn('styled-components: it looks like an unknown prop "'.concat(G,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var _=function(J,z){var te=Xf(),X=J.generateAndInjectStyles(z,te.styleSheet,te.stylis);return process.env.NODE_ENV!=="production"&&T.useDebugValue(X),X}(h,Y);process.env.NODE_ENV!=="production"&&f.warnTooManyClasses&&f.warnTooManyClasses(_);var K=Ki(x,b);return _&&(K+=" "+_),Y.className&&(K+=" "+Y.className),L[Zl(H)&&!iu.has(H)?"class":"className"]=K,q&&(L.ref=q),T.createElement(H,L)}(S,M,I)}w.displayName=d;var S=T.forwardRef(w);return S.attrs=p,S.componentStyle=C,S.displayName=d,S.shouldForwardProp=V,S.foldedComponentIds=r?Ki(i.foldedComponentIds,i.styledComponentId):"",S.styledComponentId=g,S.target=r?i.target:t,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(M){this._foldedDefaultProps=r?function(I){for(var f=[],R=1;R<arguments.length;R++)f[R-1]=arguments[R];for(var q=0,E=f;q<E.length;q++)au(I,E[q],!0);return I}({},i.defaultProps,M):M}}),process.env.NODE_ENV!=="production"&&(lS(d,g),S.warnTooManyClasses=function(M,I){var f={},R=!1;return function(q){if(!R&&(f[q]=!0,Object.keys(f).length>=200)){var E=I?' with the id of "'.concat(I,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(M).concat(E,`.
|
|
220
|
+
`,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function yS(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t[0],r=[],i=1,o=t.length;i<o;i+=1)r.push(t[i]);return r.forEach(function(A){n=n.replace(/%[a-z]/,A)}),n}function Zo(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):"")):new Error(yS.apply(void 0,to([ES[t]],e,!1)).trim())}var wS=function(){function t(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return t.prototype.indexOfGroup=function(e){for(var n=0,r=0;r<e;r++)n+=this.groupSizes[r];return n},t.prototype.insertRules=function(e,n){if(e>=this.groupSizes.length){for(var r=this.groupSizes,i=r.length,o=i;e>=o;)if((o<<=1)<0)throw Zo(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var A=i;A<o;A++)this.groupSizes[A]=0}for(var a=this.indexOfGroup(e+1),s=(A=0,n.length);A<s;A++)this.tag.insertRule(a,n[A])&&(this.groupSizes[e]++,a++)},t.prototype.clearGroup=function(e){if(e<this.length){var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;this.groupSizes[e]=0;for(var o=r;o<i;o++)this.tag.deleteRule(r)}},t.prototype.getGroup=function(e){var n="";if(e>=this.length||this.groupSizes[e]===0)return n;for(var r=this.groupSizes[e],i=this.indexOfGroup(e),o=i+r,A=i;A<o;A++)n+="".concat(this.tag.getRule(A)).concat(Hd);return n},t}(),SS=1<<30,Wa=new Map,gs=new Map,Xa=1,ba=function(t){if(Wa.has(t))return Wa.get(t);for(;gs.has(Xa);)Xa++;var e=Xa++;if(process.env.NODE_ENV!=="production"&&((0|e)<0||e>SS))throw Zo(16,"".concat(e));return Wa.set(t,e),gs.set(e,t),e},IS=function(t,e){Xa=e+1,Wa.set(t,e),gs.set(e,t)},bS="style[".concat(no,"][").concat(H0,'="').concat(Hs,'"]'),MS=new RegExp("^".concat(no,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),RS=function(t,e,n){for(var r,i=n.split(","),o=0,A=i.length;o<A;o++)(r=i[o])&&t.registerName(e,r)},xS=function(t,e){for(var n,r=((n=e.textContent)!==null&&n!==void 0?n:"").split(Hd),i=[],o=0,A=r.length;o<A;o++){var a=r[o].trim();if(a){var s=a.match(MS);if(s){var l=0|parseInt(s[1],10),u=s[2];l!==0&&(IS(u,l),RS(t,u,s[3]),t.getTag().insertRules(l,i)),i.length=0}else i.push(a)}}},Jf=function(t){for(var e=document.querySelectorAll(bS),n=0,r=e.length;n<r;n++){var i=e[n];i&&i.getAttribute(no)!==Y0&&(xS(t,i),i.parentNode&&i.parentNode.removeChild(i))}};function TS(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var ev=function(t){var e=document.head,n=t||e,r=document.createElement("style"),i=function(a){var s=Array.from(a.querySelectorAll("style[".concat(no,"]")));return s[s.length-1]}(n),o=i!==void 0?i.nextSibling:null;r.setAttribute(no,Y0),r.setAttribute(H0,Hs);var A=TS();return A&&r.setAttribute("nonce",A),n.insertBefore(r,o),r},BS=function(){function t(e){this.element=ev(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(n){if(n.sheet)return n.sheet;for(var r=document.styleSheets,i=0,o=r.length;i<o;i++){var A=r[i];if(A.ownerNode===n)return A}throw Zo(17)}(this.element),this.length=0}return t.prototype.insertRule=function(e,n){try{return this.sheet.insertRule(n,e),this.length++,!0}catch{return!1}},t.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.prototype.getRule=function(e){var n=this.sheet.cssRules[e];return n&&n.cssText?n.cssText:""},t}(),OS=function(){function t(e){this.element=ev(e),this.nodes=this.element.childNodes,this.length=0}return t.prototype.insertRule=function(e,n){if(e<=this.length&&e>=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},t}(),DS=function(){function t(e){this.rules=[],this.length=0}return t.prototype.insertRule=function(e,n){return e<=this.length&&(this.rules.splice(e,0,n),this.length++,!0)},t.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},t}(),Wf=ds,NS={isServer:!ds,useCSSOMInjection:!sS},tv=function(){function t(e,n,r){e===void 0&&(e=Uo),n===void 0&&(n={});var i=this;this.options=_n(_n({},NS),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&ds&&Wf&&(Wf=!1,Jf(this)),Zd(this,function(){return function(o){for(var A=o.getTag(),a=A.length,s="",l=function(d){var g=function(C){return gs.get(C)}(d);if(g===void 0)return"continue";var p=o.names.get(g),V=A.getGroup(d);if(p===void 0||!p.size||V.length===0)return"continue";var v="".concat(no,".g").concat(d,'[id="').concat(g,'"]'),m="";p!==void 0&&p.forEach(function(C){C.length>0&&(m+="".concat(C,","))}),s+="".concat(V).concat(v,'{content:"').concat(m,'"}').concat(Hd)},u=0;u<a;u++)l(u);return s}(i)})}return t.registerId=function(e){return ba(e)},t.prototype.rehydrate=function(){!this.server&&ds&&Jf(this)},t.prototype.reconstructWithOptions=function(e,n){return n===void 0&&(n=!0),new t(_n(_n({},this.options),e),this.gs,n&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(n){var r=n.useCSSOMInjection,i=n.target;return n.isServer?new DS(i):r?new BS(i):new OS(i)}(this.options),new wS(e)));var e},t.prototype.hasNameForId=function(e,n){return this.names.has(e)&&this.names.get(e).has(n)},t.prototype.registerName=function(e,n){if(ba(e),this.names.has(e))this.names.get(e).add(n);else{var r=new Set;r.add(n),this.names.set(e,r)}},t.prototype.insertRules=function(e,n,r){this.registerName(e,n),this.getTag().insertRules(ba(e),r)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ba(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),FS=/&/g,QS=/^\s*\/\/.*$/gm;function nv(t,e){return t.map(function(n){return n.type==="rule"&&(n.value="".concat(e," ").concat(n.value),n.value=n.value.replaceAll(",",",".concat(e," ")),n.props=n.props.map(function(r){return"".concat(e," ").concat(r)})),Array.isArray(n.children)&&n.type!=="@keyframes"&&(n.children=nv(n.children,e)),n})}function kS(t){var e,n,r,i=Uo,o=i.options,A=o===void 0?Uo:o,a=i.plugins,s=a===void 0?Ks:a,l=function(g,p,V){return V.startsWith(n)&&V.endsWith(n)&&V.replaceAll(n,"").length>0?".".concat(e):g},u=s.slice();u.push(function(g){g.type===js&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(FS,n).replace(r,l))}),A.prefix&&u.push(AS),u.push(rS);var d=function(g,p,V,v){p===void 0&&(p=""),V===void 0&&(V=""),v===void 0&&(v="&"),e=v,n=p,r=new RegExp("\\".concat(n,"\\b"),"g");var m=g.replace(QS,""),C=tS(V||p?"".concat(V," ").concat(p," { ").concat(m," }"):m);A.namespace&&(C=nv(C,A.namespace));var w=[];return us(C,iS(u.concat(oS(function(S){return w.push(S)})))),w};return d.hash=s.length?s.reduce(function(g,p){return p.name||Zo(15),Yi(g,p.name)},K0).toString():"",d}var US=new tv,su=kS(),rv=T.createContext({shouldForwardProp:void 0,styleSheet:US,stylis:su});rv.Consumer;T.createContext(void 0);function Xf(){return T.useContext(rv)}var lu=function(){function t(e,n){var r=this;this.inject=function(i,o){o===void 0&&(o=su);var A=r.name+o.hash;i.hasNameForId(r.id,A)||i.insertRules(r.id,A,o(r.rules,A,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=n,Zd(this,function(){throw Zo(12,String(r.name))})}return t.prototype.getName=function(e){return e===void 0&&(e=su),this.name+e.hash},t}(),GS=function(t){return t>="A"&&t<="Z"};function _f(t){for(var e="",n=0;n<t.length;n++){var r=t[n];if(n===1&&r==="-"&&t[0]==="-")return t;GS(r)?e+="-"+r.toLowerCase():e+=r}return e.startsWith("ms-")?"-"+e:e}var iv=function(t){return t==null||t===!1||t===""},ov=function(t){var e,n,r=[];for(var i in t){var o=t[i];t.hasOwnProperty(i)&&!iv(o)&&(Array.isArray(o)&&o.isCss||Go(o)?r.push("".concat(_f(i),":"),o,";"):jo(o)?r.push.apply(r,to(to(["".concat(i," {")],ov(o),!1),["}"],!1)):r.push("".concat(_f(i),": ").concat((e=i,(n=o)==null||typeof n=="boolean"||n===""?"":typeof n!="number"||n===0||e in aS||e.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function $i(t,e,n,r){if(iv(t))return[];if(Kd(t))return[".".concat(t.styledComponentId)];if(Go(t)){if(!Go(o=t)||o.prototype&&o.prototype.isReactComponent||!e)return[t];var i=t(e);return process.env.NODE_ENV==="production"||typeof i!="object"||Array.isArray(i)||i instanceof lu||jo(i)||i===null||console.error("".concat(J0(t)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),$i(i,e,n,r)}var o;return t instanceof lu?n?(t.inject(n,r),[t.getName(r)]):[t]:jo(t)?ov(t):Array.isArray(t)?Array.prototype.concat.apply(Ks,t.map(function(A){return $i(A,e,n,r)})):[t.toString()]}function jS(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(Go(n)&&!Kd(n))return!1}return!0}var PS=Z0(Hs),LS=function(){function t(e,n,r){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&jS(e),this.componentId=n,this.baseHash=Yi(PS,n),this.baseStyle=r,tv.registerId(n)}return t.prototype.generateAndInjectStyles=function(e,n,r){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,n,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(this.componentId,this.staticRulesId))i=Ki(i,this.staticRulesId);else{var o=Au($i(this.rules,e,n,r)),A=ou(Yi(this.baseHash,o)>>>0);if(!n.hasNameForId(this.componentId,A)){var a=r(o,".".concat(A),void 0,this.componentId);n.insertRules(this.componentId,A,a)}i=Ki(i,A),this.staticRulesId=A}else{for(var s=Yi(this.baseHash,r.hash),l="",u=0;u<this.rules.length;u++){var d=this.rules[u];if(typeof d=="string")l+=d,process.env.NODE_ENV!=="production"&&(s=Yi(s,d));else if(d){var g=Au($i(d,e,n,r));s=Yi(s,g+u),l+=g}}if(l){var p=ou(s>>>0);n.hasNameForId(this.componentId,p)||n.insertRules(this.componentId,p,r(l,".".concat(p),void 0,this.componentId)),i=Ki(i,p)}}return i},t}(),Av=T.createContext(void 0);Av.Consumer;var zl={},$f=new Set;function YS(t,e,n){var r=Kd(t),i=t,o=!Zl(t),A=e.attrs,a=A===void 0?Ks:A,s=e.componentId,l=s===void 0?function(M,I){var f=typeof M!="string"?"sc":Yf(M);zl[f]=(zl[f]||0)+1;var R="".concat(f,"-").concat(z0(Hs+f+zl[f]));return I?"".concat(I,"-").concat(R):R}(e.displayName,e.parentComponentId):s,u=e.displayName,d=u===void 0?function(M){return Zl(M)?"styled.".concat(M):"Styled(".concat(J0(M),")")}(t):u,g=e.displayName&&e.componentId?"".concat(Yf(e.displayName),"-").concat(e.componentId):e.componentId||l,p=r&&i.attrs?i.attrs.concat(a).filter(Boolean):a,V=e.shouldForwardProp;if(r&&i.shouldForwardProp){var v=i.shouldForwardProp;if(e.shouldForwardProp){var m=e.shouldForwardProp;V=function(M,I){return v(M,I)&&m(M,I)}}else V=v}var C=new LS(n,g,r?i.componentStyle:void 0);function w(M,I){return function(f,R,q){var E=f.attrs,h=f.componentStyle,y=f.defaultProps,x=f.foldedComponentIds,b=f.styledComponentId,B=f.target,O=T.useContext(Av),N=Xf(),F=f.shouldForwardProp||N.shouldForwardProp;process.env.NODE_ENV!=="production"&&T.useDebugValue(b);var j=cS(R,O,y)||Uo,Y=function(W,z,te){for(var X,Ae=_n(_n({},z),{className:void 0,theme:te}),le=0;le<W.length;le+=1){var ue=Go(X=W[le])?X(Ae):X;for(var ne in ue)Ae[ne]=ne==="className"?Ki(Ae[ne],ue[ne]):ne==="style"?_n(_n({},Ae[ne]),ue[ne]):ue[ne]}return z.className&&(Ae.className=Ki(Ae.className,z.className)),Ae}(E,R,j),H=Y.as||B,L={};for(var G in Y)Y[G]===void 0||G[0]==="$"||G==="as"||G==="theme"&&Y.theme===j||(G==="forwardedAs"?L.as=Y.forwardedAs:F&&!F(G,H)||(L[G]=Y[G],F||process.env.NODE_ENV!=="development"||Pw(G)||$f.has(G)||!iu.has(H)||($f.add(G),console.warn('styled-components: it looks like an unknown prop "'.concat(G,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var _=function(W,z){var te=Xf(),X=W.generateAndInjectStyles(z,te.styleSheet,te.stylis);return process.env.NODE_ENV!=="production"&&T.useDebugValue(X),X}(h,Y);process.env.NODE_ENV!=="production"&&f.warnTooManyClasses&&f.warnTooManyClasses(_);var K=Ki(x,b);return _&&(K+=" "+_),Y.className&&(K+=" "+Y.className),L[Zl(H)&&!iu.has(H)?"class":"className"]=K,q&&(L.ref=q),T.createElement(H,L)}(S,M,I)}w.displayName=d;var S=T.forwardRef(w);return S.attrs=p,S.componentStyle=C,S.displayName=d,S.shouldForwardProp=V,S.foldedComponentIds=r?Ki(i.foldedComponentIds,i.styledComponentId):"",S.styledComponentId=g,S.target=r?i.target:t,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(M){this._foldedDefaultProps=r?function(I){for(var f=[],R=1;R<arguments.length;R++)f[R-1]=arguments[R];for(var q=0,E=f;q<E.length;q++)au(I,E[q],!0);return I}({},i.defaultProps,M):M}}),process.env.NODE_ENV!=="production"&&(lS(d,g),S.warnTooManyClasses=function(M,I){var f={},R=!1;return function(q){if(!R&&(f[q]=!0,Object.keys(f).length>=200)){var E=I?' with the id of "'.concat(I,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(M).concat(E,`.
|
|
221
221
|
`)+`Consider using the attrs method, together with a style object for frequently changed styles.
|
|
222
222
|
Example:
|
|
223
223
|
const Component = styled.div.attrs(props => ({
|
|
@@ -530,7 +530,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Ma]+=1);const HS=rn.div`
|
|
|
530
530
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
531
531
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
532
532
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
533
|
-
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,O2="".concat(T2," ").concat(B2).split(/[\s\n]+/),D2="aria-",N2="data-";function Ip(t,e){return t.indexOf(e)===0}function Oi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=U({},e);var r={};return Object.keys(t).forEach(function(i){(n.aria&&(i==="role"||Ip(i,D2))||n.data&&Ip(i,N2)||n.attr&&O2.includes(i))&&(r[i]=t[i])}),r}const Ur=t=>{const[,,,,e]=lr();return e?`${t}-css-var`:""},ki=t=>{const e=T.useContext(No);return T.useMemo(()=>t?typeof t=="string"?t??e:t instanceof Function?t(e):e:e,[t,e])},Mv=c.createContext(null),F2=Mv.Provider,Rv=c.createContext(null),Q2=Rv.Provider;var k2=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],U2=T.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-checkbox":n,i=t.className,o=t.style,A=t.checked,a=t.disabled,s=t.defaultChecked,l=s===void 0?!1:s,u=t.type,d=u===void 0?"checkbox":u,g=t.title,p=t.onChange,V=qt(t,k2),v=T.useRef(null),m=T.useRef(null),C=Tn(l,{value:A}),w=$(C,2),S=w[0],M=w[1];T.useImperativeHandle(e,function(){return{focus:function(q){var E;(E=v.current)===null||E===void 0||E.focus(q)},blur:function(){var q;(q=v.current)===null||q===void 0||q.blur()},input:v.current,nativeElement:m.current}});var I=se(r,i,Q(Q({},"".concat(r,"-checked"),S),"".concat(r,"-disabled"),a)),f=function(q){a||("checked"in t||M(q.target.checked),p==null||p({target:U(U({},t),{},{type:d,checked:q.target.checked}),stopPropagation:function(){q.stopPropagation()},preventDefault:function(){q.preventDefault()},nativeEvent:q.nativeEvent}))};return c.createElement("span",{className:I,title:g,style:o,ref:m},c.createElement("input",Fe({},V,{className:"".concat(r,"-input"),ref:v,onChange:f,disabled:a,checked:!!S,type:d})),c.createElement("span",{className:"".concat(r,"-inner")}))});const rg=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),o=i.width,A=i.height;if(o||A)return!0}}return!1};function xv(t){return t&&T.isValidElement(t)&&t.type===T.Fragment}const Tv=(t,e,n)=>T.isValidElement(t)?T.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function Dr(t,e){return Tv(t,t,e)}const G2=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},j2=QE("Wave",t=>[G2(t)]),ig=`${RA}-wave-target`;function Bv(t,e){this.v=t,this.k=e}function Nn(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}Nn=function(A,a,s,l){if(a)i?i(A,a,{value:s,enumerable:!l,configurable:!l,writable:!l}):A[a]=s;else{var u=function(g,p){Nn(A,g,function(V){return this._invoke(g,p,V)})};u("next",0),u("throw",1),u("return",2)}},Nn(t,e,n,r)}function og(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(p,V,v,m){var C=V&&V.prototype instanceof a?V:a,w=Object.create(C.prototype);return Nn(w,"_invoke",function(S,M,I){var f,R,q,E=0,h=I||[],y=!1,x={p:0,n:0,v:t,a:b,f:b.bind(t,4),d:function(O,N){return f=O,R=0,q=t,x.n=N,A}};function b(B,O){for(R=B,q=O,e=0;!y&&E&&!N&&e<h.length;e++){var N,F=h[e],j=x.p,Y=F[2];B>3?(N=Y===O)&&(q=F[(R=F[4])?5:(R=3,3)],F[4]=F[5]=t):F[0]<=j&&((N=B<2&&j<F[1])?(R=0,x.v=O,x.n=F[1]):j<Y&&(N=B<3||F[0]>O||O>Y)&&(F[4]=B,F[5]=O,x.n=Y,R=0))}if(N||B>1)return A;throw y=!0,O}return function(B,O,N){if(E>1)throw TypeError("Generator is already running");for(y&&O===1&&b(O,N),R=O,q=N;(e=R<2?t:q)||!y;){f||(R?R<3?(R>1&&(x.n=-1),b(R,q)):x.n=q:x.v=q);try{if(E=2,f){if(R||(B="next"),e=f[B]){if(!(e=e.call(f,q)))throw TypeError("iterator result is not an object");if(!e.done)return e;q=e.value,R<2&&(R=0)}else R===1&&(e=f.return)&&e.call(f),R<2&&(q=TypeError("The iterator does not provide a '"+B+"' method"),R=1);f=t}else if((e=(y=x.n<0)?q:S.call(M,x))!==A)break}catch(F){f=t,R=1,q=F}finally{E=1}}return{value:e,done:y}}}(p,v,m),!0),w}var A={};function a(){}function s(){}function l(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(Nn(e={},r,function(){return this}),e),d=l.prototype=a.prototype=Object.create(u);function g(p){return Object.setPrototypeOf?Object.setPrototypeOf(p,l):(p.__proto__=l,Nn(p,i,"GeneratorFunction")),p.prototype=Object.create(d),p}return s.prototype=l,Nn(d,"constructor",l),Nn(l,"constructor",s),s.displayName="GeneratorFunction",Nn(l,i,"GeneratorFunction"),Nn(d),Nn(d,i,"Generator"),Nn(d,r,function(){return this}),Nn(d,"toString",function(){return"[object Generator]"}),(og=function(){return{w:o,m:g}})()}function hs(t,e){function n(i,o,A,a){try{var s=t[i](o),l=s.value;return l instanceof Bv?e.resolve(l.v).then(function(u){n("next",u,A,a)},function(u){n("throw",u,A,a)}):e.resolve(l).then(function(u){s.value=u,A(s)},function(u){return n("throw",u,A,a)})}catch(u){a(u)}}var r;this.next||(Nn(hs.prototype),Nn(hs.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Nn(this,"_invoke",function(i,o,A){function a(){return new e(function(s,l){n(i,A,s,l)})}return r=r?r.then(a,a):a()},!0)}function Ov(t,e,n,r,i){return new hs(og().w(t,e,n,r),i||Promise)}function P2(t,e,n,r,i){var o=Ov(t,e,n,r,i);return o.next().then(function(A){return A.done?A.value:o.next()})}function L2(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function i(){for(;n.length;)if((r=n.pop())in e)return i.value=r,i.done=!1,i;return i.done=!0,i}}function bp(t){if(t!=null){var e=t[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError($e(t)+" is not iterable")}function kn(){var t=og(),e=t.m(kn),n=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function r(A){var a=typeof A=="function"&&A.constructor;return!!a&&(a===n||(a.displayName||a.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(A){var a,s;return function(l){a||(a={stop:function(){return s(l.a,2)},catch:function(){return l.v},abrupt:function(d,g){return s(l.a,i[d],g)},delegateYield:function(d,g,p){return a.resultName=g,s(l.d,bp(d),p)},finish:function(d){return s(l.f,d)}},s=function(d,g,p){l.p=a.prev,l.n=a.next;try{return d(g,p)}finally{a.next=l.n}}),a.resultName&&(a[a.resultName]=l.v,a.resultName=void 0),a.sent=l.v,a.next=l.n;try{return A.call(this,a)}finally{l.p=a.prev,l.n=a.next}}}return(kn=function(){return{wrap:function(s,l,u,d){return t.w(o(s),l,u,d&&d.reverse())},isGeneratorFunction:r,mark:t.m,awrap:function(s,l){return new Bv(s,l)},AsyncIterator:hs,async:function(s,l,u,d,g){return(r(l)?Ov:P2)(o(s),l,u,d,g)},keys:L2,values:bp}})()}function Mp(t,e,n,r,i,o,A){try{var a=t[o](A),s=a.value}catch(l){return void n(l)}a.done?e(s):Promise.resolve(s).then(r,i)}function ao(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function A(s){Mp(o,r,i,A,a,"next",s)}function a(s){Mp(o,r,i,A,a,"throw",s)}A(void 0)})}}var XA=U({},Km),Y2=XA.version,Xl=XA.render,H2=XA.unmountComponentAtNode,Xs;try{var K2=Number((Y2||"").split(".")[0]);K2>=18&&(Xs=XA.createRoot)}catch{}function Rp(t){var e=XA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&$e(e)==="object"&&(e.usingClientEntryPoint=t)}var ps="__rc_react_root__";function Z2(t,e){Rp(!0);var n=e[ps]||Xs(e);Rp(!1),n.render(t),e[ps]=n}function z2(t,e){Xl==null||Xl(t,e)}function J2(t,e){if(Xs){Z2(t,e);return}z2(t,e)}function W2(t){return Wu.apply(this,arguments)}function Wu(){return Wu=ao(kn().mark(function t(e){return kn().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=e[ps])===null||i===void 0||i.unmount(),delete e[ps]}));case 1:case"end":return r.stop()}},t)})),Wu.apply(this,arguments)}function X2(t){H2(t)}function _2(t){return Xu.apply(this,arguments)}function Xu(){return Xu=ao(kn().mark(function t(e){return kn().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Xs===void 0){r.next=2;break}return r.abrupt("return",W2(e));case 2:X2(e);case 3:case"end":return r.stop()}},t)})),Xu.apply(this,arguments)}const $2=(t,e)=>{if(process.env.NODE_ENV!=="production"){const n=parseInt(c.version.split(".")[0],10),r=Object.keys(Km);process.env.NODE_ENV!=="production"&&exports.warning$1(n<19||r.includes("createRoot"),"compatible","antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.")}return J2(t,e),()=>_2(e)};let eM=$2;function Ag(){return eM}function _l(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"}function tM(t){const{borderTopColor:e,borderColor:n,backgroundColor:r}=getComputedStyle(t);return _l(e)?e:_l(n)?n:_l(r)?r:null}function $l(t){return Number.isNaN(t)?0:t}const nM=t=>{const{className:e,target:n,component:r,registerUnmount:i}=t,o=c.useRef(null),A=c.useRef(null);c.useEffect(()=>{A.current=i()},[]);const[a,s]=c.useState(null),[l,u]=c.useState([]),[d,g]=c.useState(0),[p,V]=c.useState(0),[v,m]=c.useState(0),[C,w]=c.useState(0),[S,M]=c.useState(!1),I={left:d,top:p,width:v,height:C,borderRadius:l.map(q=>`${q}px`).join(" ")};a&&(I["--wave-color"]=a);function f(){const q=getComputedStyle(n);s(tM(n));const E=q.position==="static",{borderLeftWidth:h,borderTopWidth:y}=q;g(E?n.offsetLeft:$l(-parseFloat(h))),V(E?n.offsetTop:$l(-parseFloat(y))),m(n.offsetWidth),w(n.offsetHeight);const{borderTopLeftRadius:x,borderTopRightRadius:b,borderBottomLeftRadius:B,borderBottomRightRadius:O}=q;u([x,b,O,B].map(N=>$l(parseFloat(N))))}if(c.useEffect(()=>{if(n){const q=Lt(()=>{f(),M(!0)});let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(f),E.observe(n)),()=>{Lt.cancel(q),E==null||E.disconnect()}}},[]),!S)return null;const R=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(ig));return c.createElement(oo,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(q,E)=>{var h,y;if(E.deadline||E.propertyName==="opacity"){const x=(h=o.current)===null||h===void 0?void 0:h.parentElement;(y=A.current)===null||y===void 0||y.call(A).then(()=>{x==null||x.remove()})}return!1}},(q,E)=>{let{className:h}=q;return c.createElement("div",{ref:kr(o,E),className:se(e,h,{"wave-quick":R}),style:I})})},rM=(t,e)=>{var n;const{component:r}=e;if(r==="Checkbox"&&!(!((n=t.querySelector("input"))===null||n===void 0)&&n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",t==null||t.insertBefore(i,t==null?void 0:t.firstChild);const o=Ag();let A=null;function a(){return A}A=o(c.createElement(nM,Object.assign({},e,{target:t,registerUnmount:a})),i)},iM=(t,e,n)=>{const{wave:r}=c.useContext(Qt),[,i,o]=lr(),A=nn(l=>{const u=t.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${ig}`)||u,{showEffect:g}=r||{};(g||rM)(d,{className:e,token:i,component:n,event:l,hashId:o})}),a=c.useRef(null);return l=>{Lt.cancel(a.current),a.current=Lt(()=>{A(l)})}},_s=t=>{const{children:e,disabled:n,component:r}=t,{getPrefixCls:i}=T.useContext(Qt),o=T.useRef(null),A=i("wave"),[,a]=j2(A),s=iM(o,se(A,a),r);if(T.useEffect(()=>{const u=o.current;if(!u||u.nodeType!==1||n)return;const d=g=>{!rg(g.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||s(g)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!T.isValidElement(e))return e??null;const l=Qi(e)?kr(io(e),o):o;return Dr(e,{ref:l})};process.env.NODE_ENV!=="production"&&(_s.displayName="Wave");function oM(t){const e=T.useRef(null),n=()=>{Lt.cancel(e.current),e.current=null};return[()=>{n(),e.current=Lt(()=>{e.current=null})},o=>{e.current&&(o.stopPropagation(),n()),t==null||t(o)}]}function Nr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return T.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(Nr(r)):EV(r)&&r.props?n=n.concat(Nr(r.props.children,e)):n.push(r))}),n}var Zi="RC_FORM_INTERNAL_HOOKS",zt=function(){Ct(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Lo=c.createContext({getFieldValue:zt,getFieldsValue:zt,getFieldError:zt,getFieldWarning:zt,getFieldsError:zt,isFieldsTouched:zt,isFieldTouched:zt,isFieldValidating:zt,isFieldsValidating:zt,resetFields:zt,setFields:zt,setFieldValue:zt,setFieldsValue:zt,validateFields:zt,submit:zt,getInternalHooks:function(){return zt(),{dispatch:zt,initEntityValue:zt,registerField:zt,useSubscribe:zt,setInitialValues:zt,destroyForm:zt,setCallbacks:zt,registerWatch:zt,getFields:zt,setValidateMessages:zt,setPreserve:zt,getInitialValue:zt}}}),ms=c.createContext(null);function _u(t){return t==null?[]:Array.isArray(t)?t:[t]}function AM(t){return t&&!!t._init}function $u(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var ed=$u();function aM(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function sM(t,e,n){if(Md())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&wA(i,n.prototype),i}function td(t){var e=typeof Map=="function"?new Map:void 0;return td=function(r){if(r===null||!aM(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return sM(r,arguments,SA(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),wA(i,r)},td(t)}var lM=/%[sdj%]/g,Dv=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Dv=function(e,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(r){return typeof r=="string"})&&console.warn(e,n)});function nd(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function ar(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var A=t.replace(lM,function(a){if(a==="%%")return"%";if(i>=o)return a;switch(a){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return a}});return A}return t}function cM(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function vn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||cM(e)&&typeof t=="string"&&!t)}function uM(t,e,n){var r=[],i=0,o=t.length;function A(a){r.push.apply(r,be(a||[])),i++,i===o&&n(r)}t.forEach(function(a){e(a,A)})}function xp(t,e,n){var r=0,i=t.length;function o(A){if(A&&A.length){n(A);return}var a=r;r=r+1,a<i?e(t[a],o):n([])}o([])}function dM(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,be(t[n]||[]))}),e}var Tp=function(t){di(n,t);var e=gi(n);function n(r,i){var o;return fn(this,n),o=e.call(this,"Async Validation Error"),Q(Rt(o),"errors",void 0),Q(Rt(o),"fields",void 0),o.errors=r,o.fields=i,o}return hn(n)}(td(Error));function gM(t,e,n,r,i){if(e.first){var o=new Promise(function(g,p){var V=function(C){return r(C),C.length?p(new Tp(C,nd(C))):g(i)},v=dM(t);xp(v,n,V)});return o.catch(function(g){return g}),o}var A=e.firstFields===!0?Object.keys(t):e.firstFields||[],a=Object.keys(t),s=a.length,l=0,u=[],d=new Promise(function(g,p){var V=function(m){if(u.push.apply(u,m),l++,l===s)return r(u),u.length?p(new Tp(u,nd(u))):g(i)};a.length||(r(u),g(i)),a.forEach(function(v){var m=t[v];A.indexOf(v)!==-1?xp(m,n,V):uM(m,n,V)})});return d.catch(function(g){return g}),d}function fM(t){return!!(t&&t.message!==void 0)}function hM(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function Bp(t,e){return function(n){var r;return t.fullFields?r=hM(e,t.fullFields):r=e[n.field||t.fullField],fM(n)?(n.field=n.field||t.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||t.fullField}}}function Op(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];$e(r)==="object"&&$e(t[n])==="object"?t[n]=U(U({},t[n]),r):t[n]=r}}return t}var go="enum",pM=function(e,n,r,i,o){e[go]=Array.isArray(e[go])?e[go]:[],e[go].indexOf(n)===-1&&i.push(ar(o.messages[go],e.fullField,e[go].join(", ")))},mM=function(e,n,r,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(ar(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var A=new RegExp(e.pattern);A.test(n)||i.push(ar(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},VM=function(e,n,r,i,o){var A=typeof e.len=="number",a=typeof e.min=="number",s=typeof e.max=="number",l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,g=typeof n=="number",p=typeof n=="string",V=Array.isArray(n);if(g?d="number":p?d="string":V&&(d="array"),!d)return!1;V&&(u=n.length),p&&(u=n.replace(l,"_").length),A?u!==e.len&&i.push(ar(o.messages[d].len,e.fullField,e.len)):a&&!s&&u<e.min?i.push(ar(o.messages[d].min,e.fullField,e.min)):s&&!a&&u>e.max?i.push(ar(o.messages[d].max,e.fullField,e.max)):a&&s&&(u<e.min||u>e.max)&&i.push(ar(o.messages[d].range,e.fullField,e.min,e.max))},Nv=function(e,n,r,i,o,A){e.required&&(!r.hasOwnProperty(e.field)||vn(n,A||e.type))&&i.push(ar(o.messages.required,e.fullField))},xa;const vM=function(){if(xa)return xa;var t="[a-fA-F\\d:]",e=function(f){return f&&f.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",A="(?:".concat(i.join("|"),")").concat(o),a=new RegExp("(?:^".concat(n,"$)|(?:^").concat(A,"$)")),s=new RegExp("^".concat(n,"$")),l=new RegExp("^".concat(A,"$")),u=function(f){return f&&f.exact?a:new RegExp("(?:".concat(e(f)).concat(n).concat(e(f),")|(?:").concat(e(f)).concat(A).concat(e(f),")"),"g")};u.v4=function(I){return I&&I.exact?s:new RegExp("".concat(e(I)).concat(n).concat(e(I)),"g")},u.v6=function(I){return I&&I.exact?l:new RegExp("".concat(e(I)).concat(A).concat(e(I)),"g")};var d="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,V=u.v6().source,v="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",C="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",w="(?::\\d{2,5})?",S='(?:[/?#][^\\s"]*)?',M="(?:".concat(d,"|www\\.)").concat(g,"(?:localhost|").concat(p,"|").concat(V,"|").concat(v).concat(m).concat(C,")").concat(w).concat(S);return xa=new RegExp("(?:^".concat(M,"$)"),"i"),xa};var Dp={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},gA={integer:function(e){return gA.number(e)&&parseInt(e,10)===e},float:function(e){return gA.number(e)&&!gA.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return $e(e)==="object"&&!gA.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Dp.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(vM())},hex:function(e){return typeof e=="string"&&!!e.match(Dp.hex)}},CM=function(e,n,r,i,o){if(e.required&&n===void 0){Nv(e,n,r,i,o);return}var A=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;A.indexOf(a)>-1?gA[a](n)||i.push(ar(o.messages.types[a],e.fullField,e.type)):a&&$e(n)!==e.type&&i.push(ar(o.messages.types[a],e.fullField,e.type))},qM=function(e,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(ar(o.messages.whitespace,e.fullField))};const Bt={required:Nv,whitespace:qM,type:CM,range:VM,enum:pM,pattern:mM};var EM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o)}r(A)},yM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return r();Bt.required(e,n,i,A,o,"array"),n!=null&&(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o))}r(A)},wM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&Bt.type(e,n,i,A,o)}r(A)},SM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n,"date")&&!e.required)return r();if(Bt.required(e,n,i,A,o),!vn(n,"date")){var s;n instanceof Date?s=n:s=new Date(n),Bt.type(e,s,i,A,o),s&&Bt.range(e,s.getTime(),i,A,o)}}r(A)},IM="enum",bM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&Bt[IM](e,n,i,A,o)}r(A)},MM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o))}r(A)},RM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o))}r(A)},xM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&Bt.type(e,n,i,A,o)}r(A)},TM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o))}r(A)},BM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&Bt.type(e,n,i,A,o)}r(A)},OM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n,"string")&&!e.required)return r();Bt.required(e,n,i,A,o),vn(n,"string")||Bt.pattern(e,n,i,A,o)}r(A)},DM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),vn(n)||Bt.type(e,n,i,A,o)}r(A)},NM=function(e,n,r,i,o){var A=[],a=Array.isArray(n)?"array":$e(n);Bt.required(e,n,i,A,o,a),r(A)},FM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n,"string")&&!e.required)return r();Bt.required(e,n,i,A,o,"string"),vn(n,"string")||(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o),Bt.pattern(e,n,i,A,o),e.whitespace===!0&&Bt.whitespace(e,n,i,A,o))}r(A)},ec=function(e,n,r,i,o){var A=e.type,a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(vn(n,A)&&!e.required)return r();Bt.required(e,n,i,a,o,A),vn(n,A)||Bt.type(e,n,i,a,o)}r(a)};const VA={string:FM,method:xM,number:TM,boolean:wM,regexp:DM,integer:RM,float:MM,array:yM,object:BM,enum:bM,pattern:OM,date:SM,url:ec,hex:ec,email:ec,required:NM,any:EM};var _A=function(){function t(e){fn(this,t),Q(this,"rules",null),Q(this,"_messages",ed),this.define(e)}return hn(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if($e(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var o=n[i];r.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=Op($u(),n)),this._messages}},{key:"validate",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},A=n,a=i,s=o;if(typeof a=="function"&&(s=a,a={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,A),Promise.resolve(A);function l(V){var v=[],m={};function C(S){if(Array.isArray(S)){var M;v=(M=v).concat.apply(M,be(S))}else v.push(S)}for(var w=0;w<V.length;w++)C(V[w]);v.length?(m=nd(v),s(v,m)):s(null,A)}if(a.messages){var u=this.messages();u===ed&&(u=$u()),Op(u,a.messages),a.messages=u}else a.messages=this.messages();var d={},g=a.keys||Object.keys(this.rules);g.forEach(function(V){var v=r.rules[V],m=A[V];v.forEach(function(C){var w=C;typeof w.transform=="function"&&(A===n&&(A=U({},A)),m=A[V]=w.transform(m),m!=null&&(w.type=w.type||(Array.isArray(m)?"array":$e(m)))),typeof w=="function"?w={validator:w}:w=U({},w),w.validator=r.getValidationMethod(w),w.validator&&(w.field=V,w.fullField=w.fullField||V,w.type=r.getType(w),d[V]=d[V]||[],d[V].push({rule:w,value:m,source:A,field:V}))})});var p={};return gM(d,a,function(V,v){var m=V.rule,C=(m.type==="object"||m.type==="array")&&($e(m.fields)==="object"||$e(m.defaultField)==="object");C=C&&(m.required||!m.required&&V.value),m.field=V.field;function w(R,q){return U(U({},q),{},{fullField:"".concat(m.fullField,".").concat(R),fullFields:m.fullFields?[].concat(be(m.fullFields),[R]):[R]})}function S(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],q=Array.isArray(R)?R:[R];!a.suppressWarning&&q.length&&t.warning("async-validator:",q),q.length&&m.message!==void 0&&(q=[].concat(m.message));var E=q.map(Bp(m,A));if(a.first&&E.length)return p[m.field]=1,v(E);if(!C)v(E);else{if(m.required&&!V.value)return m.message!==void 0?E=[].concat(m.message).map(Bp(m,A)):a.error&&(E=[a.error(m,ar(a.messages.required,m.field))]),v(E);var h={};m.defaultField&&Object.keys(V.value).map(function(b){h[b]=m.defaultField}),h=U(U({},h),V.rule.fields);var y={};Object.keys(h).forEach(function(b){var B=h[b],O=Array.isArray(B)?B:[B];y[b]=O.map(w.bind(null,b))});var x=new t(y);x.messages(a.messages),V.rule.options&&(V.rule.options.messages=a.messages,V.rule.options.error=a.error),x.validate(V.value,V.rule.options||a,function(b){var B=[];E&&E.length&&B.push.apply(B,be(E)),b&&b.length&&B.push.apply(B,be(b)),v(B.length?B:null)})}}var M;if(m.asyncValidator)M=m.asyncValidator(m,V.value,S,V.source,a);else if(m.validator){try{M=m.validator(m,V.value,S,V.source,a)}catch(R){var I,f;(I=(f=console).error)===null||I===void 0||I.call(f,R),a.suppressValidatorError||setTimeout(function(){throw R},0),S(R.message)}M===!0?S():M===!1?S(typeof m.message=="function"?m.message(m.fullField||m.field):m.message||"".concat(m.fullField||m.field," fails")):M instanceof Array?S(M):M instanceof Error&&S(M.message)}M&&M.then&&M.then(function(){return S()},function(R){return S(R)})},function(V){l(V)},A)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!VA.hasOwnProperty(n.type))throw new Error(ar("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),i=r.indexOf("message");return i!==-1&&r.splice(i,1),r.length===1&&r[0]==="required"?VA.required:VA[this.getType(n)]||void 0}}]),t}();Q(_A,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");VA[e]=n});Q(_A,"warning",Dv);Q(_A,"messages",ed);Q(_A,"validators",VA);var rr="'${name}' is not a valid ${type}",Fv={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:rr,method:rr,array:rr,object:rr,number:rr,date:rr,boolean:rr,integer:rr,float:rr,regexp:rr,email:rr,url:rr,hex:rr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Np=_A;function QM(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return e[r]})}var Fp="CODE_LOGIC_ERROR";function rd(t,e,n,r,i){return id.apply(this,arguments)}function id(){return id=ao(kn().mark(function t(e,n,r,i,o){var A,a,s,l,u,d,g,p,V;return kn().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return A=U({},r),delete A.ruleIndex,Np.warning=function(){},A.validator&&(a=A.validator,A.validator=function(){try{return a.apply(void 0,arguments)}catch(C){return console.error(C),Promise.reject(Fp)}}),s=null,A&&A.type==="array"&&A.defaultField&&(s=A.defaultField,delete A.defaultField),l=new Np(Q({},e,[A])),u=Eo(Fv,i.validateMessages),l.messages(u),d=[],m.prev=10,m.next=13,Promise.resolve(l.validate(Q({},e,n),U({},i)));case 13:m.next=18;break;case 15:m.prev=15,m.t0=m.catch(10),m.t0.errors&&(d=m.t0.errors.map(function(C,w){var S=C.message,M=S===Fp?u.default:S;return c.isValidElement(M)?c.cloneElement(M,{key:"error_".concat(w)}):M}));case 18:if(!(!d.length&&s)){m.next=23;break}return m.next=21,Promise.all(n.map(function(C,w){return rd("".concat(e,".").concat(w),C,s,i,o)}));case 21:return g=m.sent,m.abrupt("return",g.reduce(function(C,w){return[].concat(be(C),be(w))},[]));case 23:return p=U(U({},r),{},{name:e,enum:(r.enum||[]).join(", ")},o),V=d.map(function(C){return typeof C=="string"?QM(C,p):C}),m.abrupt("return",V);case 26:case"end":return m.stop()}},t,null,[[10,15]])})),id.apply(this,arguments)}function kM(t,e,n,r,i,o){var A=t.join("."),a=n.map(function(u,d){var g=u.validator,p=U(U({},u),{},{ruleIndex:d});return g&&(p.validator=function(V,v,m){var C=!1,w=function(){for(var I=arguments.length,f=new Array(I),R=0;R<I;R++)f[R]=arguments[R];Promise.resolve().then(function(){Ct(!C,"Your validator function has already return a promise. `callback` will be ignored."),C||m.apply(void 0,f)})},S=g(V,v,w);C=S&&typeof S.then=="function"&&typeof S.catch=="function",Ct(C,"`callback` is deprecated. Please return a promise instead."),C&&S.then(function(){m()}).catch(function(M){m(M||" ")})}),p}).sort(function(u,d){var g=u.warningOnly,p=u.ruleIndex,V=d.warningOnly,v=d.ruleIndex;return!!g==!!V?p-v:g?1:-1}),s;if(i===!0)s=new Promise(function(){var u=ao(kn().mark(function d(g,p){var V,v,m;return kn().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:V=0;case 1:if(!(V<a.length)){w.next=12;break}return v=a[V],w.next=5,rd(A,e,v,r,o);case 5:if(m=w.sent,!m.length){w.next=9;break}return p([{errors:m,rule:v}]),w.abrupt("return");case 9:V+=1,w.next=1;break;case 12:g([]);case 13:case"end":return w.stop()}},d)}));return function(d,g){return u.apply(this,arguments)}}());else{var l=a.map(function(u){return rd(A,e,u,r,o).then(function(d){return{errors:d,rule:u}})});s=(i?GM(l):UM(l)).then(function(u){return Promise.reject(u)})}return s.catch(function(u){return u}),s}function UM(t){return od.apply(this,arguments)}function od(){return od=ao(kn().mark(function t(e){return kn().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(e).then(function(i){var o,A=(o=[]).concat.apply(o,be(i));return A}));case 1:case"end":return r.stop()}},t)})),od.apply(this,arguments)}function GM(t){return Ad.apply(this,arguments)}function Ad(){return Ad=ao(kn().mark(function t(e){var n;return kn().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=0,i.abrupt("return",new Promise(function(o){e.forEach(function(A){A.then(function(a){a.errors.length&&o([a]),n+=1,n===e.length&&o([])})})}));case 2:case"end":return i.stop()}},t)})),Ad.apply(this,arguments)}function cn(t){return _u(t)}function Qp(t,e){var n={};return e.forEach(function(r){var i=Kr(t,r);n=Mr(n,r,i)}),n}function Ro(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return Qv(e,r,n)})}function Qv(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(r,i){return t[i]===r})}function jM(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||$e(t)!=="object"||$e(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),i=new Set([].concat(n,r));return be(i).every(function(o){var A=t[o],a=e[o];return typeof A=="function"&&typeof a=="function"?!0:A===a})}function PM(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&$e(e.target)==="object"&&t in e.target?e.target[t]:e}function kp(t,e,n){var r=t.length;if(e<0||e>=r||n<0||n>=r)return t;var i=t[e],o=e-n;return o>0?[].concat(be(t.slice(0,n)),[i],be(t.slice(n,e)),be(t.slice(e+1,r))):o<0?[].concat(be(t.slice(0,e)),be(t.slice(e+1,n+1)),[i],be(t.slice(n+1,r))):t}var LM=["name"],mr=[];function tc(t,e,n,r,i,o){return typeof t=="function"?t(e,n,"source"in o?{source:o.source}:{}):r!==i}var ag=function(t){di(n,t);var e=gi(n);function n(r){var i;if(fn(this,n),i=e.call(this,r),Q(Rt(i),"state",{resetCount:0}),Q(Rt(i),"cancelRegisterFunc",null),Q(Rt(i),"mounted",!1),Q(Rt(i),"touched",!1),Q(Rt(i),"dirty",!1),Q(Rt(i),"validatePromise",void 0),Q(Rt(i),"prevValidating",void 0),Q(Rt(i),"errors",mr),Q(Rt(i),"warnings",mr),Q(Rt(i),"cancelRegister",function(){var s=i.props,l=s.preserve,u=s.isListField,d=s.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(u,l,cn(d)),i.cancelRegisterFunc=null}),Q(Rt(i),"getNamePath",function(){var s=i.props,l=s.name,u=s.fieldContext,d=u.prefixName,g=d===void 0?[]:d;return l!==void 0?[].concat(be(g),be(l)):[]}),Q(Rt(i),"getRules",function(){var s=i.props,l=s.rules,u=l===void 0?[]:l,d=s.fieldContext;return u.map(function(g){return typeof g=="function"?g(d):g})}),Q(Rt(i),"refresh",function(){i.mounted&&i.setState(function(s){var l=s.resetCount;return{resetCount:l+1}})}),Q(Rt(i),"metaCache",null),Q(Rt(i),"triggerMetaEvent",function(s){var l=i.props.onMetaChange;if(l){var u=U(U({},i.getMeta()),{},{destroy:s});yA(i.metaCache,u)||l(u),i.metaCache=u}else i.metaCache=null}),Q(Rt(i),"onStoreChange",function(s,l,u){var d=i.props,g=d.shouldUpdate,p=d.dependencies,V=p===void 0?[]:p,v=d.onReset,m=u.store,C=i.getNamePath(),w=i.getValue(s),S=i.getValue(m),M=l&&Ro(l,C);switch(u.type==="valueUpdate"&&u.source==="external"&&!yA(w,S)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=mr,i.warnings=mr,i.triggerMetaEvent()),u.type){case"reset":if(!l||M){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=mr,i.warnings=mr,i.triggerMetaEvent(),v==null||v(),i.refresh();return}break;case"remove":{if(g&&tc(g,s,m,w,S,u)){i.reRender();return}break}case"setField":{var I=u.data;if(M){"touched"in I&&(i.touched=I.touched),"validating"in I&&!("originRCField"in I)&&(i.validatePromise=I.validating?Promise.resolve([]):null),"errors"in I&&(i.errors=I.errors||mr),"warnings"in I&&(i.warnings=I.warnings||mr),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in I&&Ro(l,C,!0)){i.reRender();return}if(g&&!C.length&&tc(g,s,m,w,S,u)){i.reRender();return}break}case"dependenciesUpdate":{var f=V.map(cn);if(f.some(function(R){return Ro(u.relatedFields,R)})){i.reRender();return}break}default:if(M||(!V.length||C.length||g)&&tc(g,s,m,w,S,u)){i.reRender();return}break}g===!0&&i.reRender()}),Q(Rt(i),"validateRules",function(s){var l=i.getNamePath(),u=i.getValue(),d=s||{},g=d.triggerName,p=d.validateOnly,V=p===void 0?!1:p,v=Promise.resolve().then(ao(kn().mark(function m(){var C,w,S,M,I,f,R;return kn().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(i.mounted){E.next=2;break}return E.abrupt("return",[]);case 2:if(C=i.props,w=C.validateFirst,S=w===void 0?!1:w,M=C.messageVariables,I=C.validateDebounce,f=i.getRules(),g&&(f=f.filter(function(h){return h}).filter(function(h){var y=h.validateTrigger;if(!y)return!0;var x=_u(y);return x.includes(g)})),!(I&&g)){E.next=10;break}return E.next=8,new Promise(function(h){setTimeout(h,I)});case 8:if(i.validatePromise===v){E.next=10;break}return E.abrupt("return",[]);case 10:return R=kM(l,u,f,s,S,M),R.catch(function(h){return h}).then(function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mr;if(i.validatePromise===v){var y;i.validatePromise=null;var x=[],b=[];(y=h.forEach)===null||y===void 0||y.call(h,function(B){var O=B.rule.warningOnly,N=B.errors,F=N===void 0?mr:N;O?b.push.apply(b,be(F)):x.push.apply(x,be(F))}),i.errors=x,i.warnings=b,i.triggerMetaEvent(),i.reRender()}}),E.abrupt("return",R);case 13:case"end":return E.stop()}},m)})));return V||(i.validatePromise=v,i.dirty=!0,i.errors=mr,i.warnings=mr,i.triggerMetaEvent(),i.reRender()),v}),Q(Rt(i),"isFieldValidating",function(){return!!i.validatePromise}),Q(Rt(i),"isFieldTouched",function(){return i.touched}),Q(Rt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var s=i.props.fieldContext,l=s.getInternalHooks(Zi),u=l.getInitialValue;return u(i.getNamePath())!==void 0}),Q(Rt(i),"getErrors",function(){return i.errors}),Q(Rt(i),"getWarnings",function(){return i.warnings}),Q(Rt(i),"isListField",function(){return i.props.isListField}),Q(Rt(i),"isList",function(){return i.props.isList}),Q(Rt(i),"isPreserve",function(){return i.props.preserve}),Q(Rt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var s={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return s}),Q(Rt(i),"getOnlyChild",function(s){if(typeof s=="function"){var l=i.getMeta();return U(U({},i.getOnlyChild(s(i.getControlled(),l,i.props.fieldContext))),{},{isFunction:!0})}var u=Nr(s);return u.length!==1||!c.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),Q(Rt(i),"getValue",function(s){var l=i.props.fieldContext.getFieldsValue,u=i.getNamePath();return Kr(s||l(!0),u)}),Q(Rt(i),"getControlled",function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=i.props,u=l.name,d=l.trigger,g=l.validateTrigger,p=l.getValueFromEvent,V=l.normalize,v=l.valuePropName,m=l.getValueProps,C=l.fieldContext,w=g!==void 0?g:C.validateTrigger,S=i.getNamePath(),M=C.getInternalHooks,I=C.getFieldsValue,f=M(Zi),R=f.dispatch,q=i.getValue(),E=m||function(B){return Q({},v,B)},h=s[d],y=u!==void 0?E(q):{};process.env.NODE_ENV!=="production"&&y&&Object.keys(y).forEach(function(B){Ct(typeof y[B]!="function","It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(B,")"))});var x=U(U({},s),y);x[d]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var B,O=arguments.length,N=new Array(O),F=0;F<O;F++)N[F]=arguments[F];p?B=p.apply(void 0,N):B=PM.apply(void 0,[v].concat(N)),V&&(B=V(B,q,I(!0))),B!==q&&R({type:"updateValue",namePath:S,value:B}),h&&h.apply(void 0,N)};var b=_u(w||[]);return b.forEach(function(B){var O=x[B];x[B]=function(){O&&O.apply(void 0,arguments);var N=i.props.rules;N&&N.length&&R({type:"validateField",namePath:S,triggerName:B})}}),x}),r.fieldContext){var o=r.fieldContext.getInternalHooks,A=o(Zi),a=A.initEntityValue;a(Rt(i))}return i}return hn(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,A=i.fieldContext;if(this.mounted=!0,A){var a=A.getInternalHooks,s=a(Zi),l=s.registerField;this.cancelRegisterFunc=l(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,o=this.props.children,A=this.getOnlyChild(o),a=A.child,s=A.isFunction,l;return s?l=a:c.isValidElement(a)?l=c.cloneElement(a,this.getControlled(a.props)):(Ct(!a,"`children` of Field is not validate ReactElement."),l=a),c.createElement(c.Fragment,{key:i},l)}}]),n}(c.Component);Q(ag,"contextType",Lo);Q(ag,"defaultProps",{trigger:"onChange",valuePropName:"value"});function kv(t){var e,n=t.name,r=qt(t,LM),i=c.useContext(Lo),o=c.useContext(ms),A=n!==void 0?cn(n):void 0,a=(e=r.isListField)!==null&&e!==void 0?e:!!o,s="keep";return a||(s="_".concat((A||[]).join("_"))),process.env.NODE_ENV!=="production"&&r.preserve===!1&&a&&A.length<=1&&Ct(!1,"`preserve` should not apply on Form.List fields."),c.createElement(ag,Fe({key:s,name:A,isListField:a},r,{fieldContext:i}))}function YM(t){var e=t.name,n=t.initialValue,r=t.children,i=t.rules,o=t.validateTrigger,A=t.isListField,a=c.useContext(Lo),s=c.useContext(ms),l=c.useRef({keys:[],id:0}),u=l.current,d=c.useMemo(function(){var v=cn(a.prefixName)||[];return[].concat(be(v),be(cn(e)))},[a.prefixName,e]),g=c.useMemo(function(){return U(U({},a),{},{prefixName:d})},[a,d]),p=c.useMemo(function(){return{getKey:function(m){var C=d.length,w=m[C];return[u.keys[w],m.slice(C+1)]}}},[d]);if(typeof r!="function")return Ct(!1,"Form.List only accepts function as children."),null;var V=function(m,C,w){var S=w.source;return S==="internal"?!1:m!==C};return c.createElement(ms.Provider,{value:p},c.createElement(Lo.Provider,{value:g},c.createElement(kv,{name:[],shouldUpdate:V,rules:i,validateTrigger:o,initialValue:n,isList:!0,isListField:A??!!s},function(v,m){var C=v.value,w=C===void 0?[]:C,S=v.onChange,M=a.getFieldValue,I=function(){var E=M(d||[]);return E||[]},f={add:function(E,h){var y=I();h>=0&&h<=y.length?(u.keys=[].concat(be(u.keys.slice(0,h)),[u.id],be(u.keys.slice(h))),S([].concat(be(y.slice(0,h)),[E],be(y.slice(h))))):(process.env.NODE_ENV!=="production"&&(h<0||h>y.length)&&Ct(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(be(u.keys),[u.id]),S([].concat(be(y),[E]))),u.id+=1},remove:function(E){var h=I(),y=new Set(Array.isArray(E)?E:[E]);y.size<=0||(u.keys=u.keys.filter(function(x,b){return!y.has(b)}),S(h.filter(function(x,b){return!y.has(b)})))},move:function(E,h){if(E!==h){var y=I();E<0||E>=y.length||h<0||h>=y.length||(u.keys=kp(u.keys,E,h),S(kp(y,E,h)))}}},R=w||[];return Array.isArray(R)||(R=[],process.env.NODE_ENV!=="production"&&Ct(!1,"Current value of '".concat(d.join(" > "),"' is not an array type."))),r(R.map(function(q,E){var h=u.keys[E];return h===void 0&&(u.keys[E]=u.id,h=u.keys[E],u.id+=1),{name:E,key:h,isListField:!0}}),f,m)})))}function HM(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(i,o){t.forEach(function(A,a){A.catch(function(s){return e=!0,s}).then(function(s){n-=1,r[a]=s,!(n>0)&&(e&&o(r),i(r))})})}):Promise.resolve([])}var Uv="__@field_split__";function nc(t){return t.map(function(e){return"".concat($e(e),":").concat(e)}).join(Uv)}var fo=function(){function t(){fn(this,t),Q(this,"kvs",new Map)}return hn(t,[{key:"set",value:function(n,r){this.kvs.set(nc(n),r)}},{key:"get",value:function(n){return this.kvs.get(nc(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(nc(n))}},{key:"map",value:function(n){return be(this.kvs.entries()).map(function(r){var i=$(r,2),o=i[0],A=i[1],a=o.split(Uv);return n({key:a.map(function(s){var l=s.match(/^([^:]*):(.*)$/),u=$(l,3),d=u[1],g=u[2];return d==="number"?Number(g):g}),value:A})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),t}(),KM=["name"],ZM=hn(function t(e){var n=this;fn(this,t),Q(this,"formHooked",!1),Q(this,"forceRootUpdate",void 0),Q(this,"subscribable",!0),Q(this,"store",{}),Q(this,"fieldEntities",[]),Q(this,"initialValues",{}),Q(this,"callbacks",{}),Q(this,"validateMessages",null),Q(this,"preserve",null),Q(this,"lastValidatePromise",null),Q(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),Q(this,"getInternalHooks",function(r){return r===Zi?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Ct(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),Q(this,"useSubscribe",function(r){n.subscribable=r}),Q(this,"prevWithoutPreserves",null),Q(this,"setInitialValues",function(r,i){if(n.initialValues=r||{},i){var o,A=Eo(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(a){var s=a.key;A=Mr(A,s,Kr(r,s))}),n.prevWithoutPreserves=null,n.updateStore(A)}}),Q(this,"destroyForm",function(r){if(r)n.updateStore({});else{var i=new fo;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=i}}),Q(this,"getInitialValue",function(r){var i=Kr(n.initialValues,r);return r.length?Eo(i):i}),Q(this,"setCallbacks",function(r){n.callbacks=r}),Q(this,"setValidateMessages",function(r){n.validateMessages=r}),Q(this,"setPreserve",function(r){n.preserve=r}),Q(this,"watchList",[]),Q(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}}),Q(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(A){A(i,o,r)})}}),Q(this,"timeoutId",null),Q(this,"warningUnhooked",function(){process.env.NODE_ENV!=="production"&&!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||Ct(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),Q(this,"updateStore",function(r){n.store=r}),Q(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities}),Q(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new fo;return n.getFieldEntities(r).forEach(function(o){var A=o.getNamePath();i.set(A,o)}),i}),Q(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var A=cn(o);return i.get(A)||{INVALIDATE_NAME_PATH:cn(o)}})}),Q(this,"getFieldsValue",function(r,i){n.warningUnhooked();var o,A,a;if(r===!0||Array.isArray(r)?(o=r,A=i):r&&$e(r)==="object"&&(a=r.strict,A=r.filter),o===!0&&!A)return n.store;var s=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),l=[];return s.forEach(function(u){var d,g,p="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(a){var V,v;if((V=(v=u).isList)!==null&&V!==void 0&&V.call(v))return}else if(!o&&(d=(g=u).isListField)!==null&&d!==void 0&&d.call(g))return;if(!A)l.push(p);else{var m="getMeta"in u?u.getMeta():null;A(m)&&l.push(p)}}),Qp(n.store,l.map(cn))}),Q(this,"getFieldValue",function(r){n.warningUnhooked();var i=cn(r);return Kr(n.store,i)}),Q(this,"getFieldsError",function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,A){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:cn(r[A]),errors:[],warnings:[]}})}),Q(this,"getFieldError",function(r){n.warningUnhooked();var i=cn(r),o=n.getFieldsError([i])[0];return o.errors}),Q(this,"getFieldWarning",function(r){n.warningUnhooked();var i=cn(r),o=n.getFieldsError([i])[0];return o.warnings}),Q(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var A=i[0],a=i[1],s,l=!1;i.length===0?s=null:i.length===1?Array.isArray(A)?(s=A.map(cn),l=!1):(s=null,l=A):(s=A.map(cn),l=a);var u=n.getFieldEntities(!0),d=function(m){return m.isFieldTouched()};if(!s)return l?u.every(function(v){return d(v)||v.isList()}):u.some(d);var g=new fo;s.forEach(function(v){g.set(v,[])}),u.forEach(function(v){var m=v.getNamePath();s.forEach(function(C){C.every(function(w,S){return m[S]===w})&&g.update(C,function(w){return[].concat(be(w),[v])})})});var p=function(m){return m.some(d)},V=g.map(function(v){var m=v.value;return m});return l?V.every(p):V.some(p)}),Q(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),Q(this,"isFieldsValidating",function(r){n.warningUnhooked();var i=n.getFieldEntities();if(!r)return i.some(function(A){return A.isFieldValidating()});var o=r.map(cn);return i.some(function(A){var a=A.getNamePath();return Ro(o,a)&&A.isFieldValidating()})}),Q(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),Q(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new fo,o=n.getFieldEntities(!0);o.forEach(function(s){var l=s.props.initialValue,u=s.getNamePath();if(l!==void 0){var d=i.get(u)||new Set;d.add({entity:s,value:l}),i.set(u,d)}});var A=function(l){l.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var g=u.getNamePath(),p=n.getInitialValue(g);if(p!==void 0)Ct(!1,"Form already set 'initialValues' with path '".concat(g.join("."),"'. Field can not overwrite it."));else{var V=i.get(g);if(V&&V.size>1)Ct(!1,"Multiple Field with path '".concat(g.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(V){var v=n.getFieldValue(g),m=u.isListField();!m&&(!r.skipExist||v===void 0)&&n.updateStore(Mr(n.store,g,be(V)[0].value))}}}})},a;r.entities?a=r.entities:r.namePathList?(a=[],r.namePathList.forEach(function(s){var l=i.get(s);if(l){var u;(u=a).push.apply(u,be(be(l).map(function(d){return d.entity})))}})):a=o,A(a)}),Q(this,"resetFields",function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Eo(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(cn);o.forEach(function(A){var a=n.getInitialValue(A);n.updateStore(Mr(n.store,A,a))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)}),Q(this,"setFields",function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(A){var a=A.name,s=qt(A,KM),l=cn(a);o.push(l),"value"in s&&n.updateStore(Mr(n.store,l,s.value)),n.notifyObservers(i,[l],{type:"setField",data:A})}),n.notifyWatch(o)}),Q(this,"getFields",function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var A=o.getNamePath(),a=o.getMeta(),s=U(U({},a),{},{name:A,value:n.getFieldValue(A)});return Object.defineProperty(s,"originRCField",{value:!0}),s});return i}),Q(this,"initEntityValue",function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),A=Kr(n.store,o);A===void 0&&n.updateStore(Mr(n.store,o,i))}}),Q(this,"isMergedPreserve",function(r){var i=r!==void 0?r:n.preserve;return i??!0}),Q(this,"registerField",function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(A,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(a)&&(!A||s.length>1)){var l=A?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==l&&n.fieldEntities.every(function(d){return!Qv(d.getNamePath(),i)})){var u=n.store;n.updateStore(Mr(u,i,l,!0)),n.notifyObservers(u,[i],{type:"remove"}),n.triggerDependenciesUpdate(u,i)}}n.notifyWatch([i])}}),Q(this,"dispatch",function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var A=r.namePath,a=r.triggerName;n.validateFields([A],{triggerName:a});break}}}),Q(this,"notifyObservers",function(r,i,o){if(n.subscribable){var A=U(U({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(a){var s=a.onStoreChange;s(r,i,A)})}else n.forceRootUpdate()}),Q(this,"triggerDependenciesUpdate",function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat(be(o))}),o}),Q(this,"updateValue",function(r,i){var o=cn(r),A=n.store;n.updateStore(Mr(n.store,o,i)),n.notifyObservers(A,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var a=n.triggerDependenciesUpdate(A,o),s=n.callbacks.onValuesChange;if(s){var l=Qp(n.store,[o]);s(l,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(be(a)))}),Q(this,"setFieldsValue",function(r){n.warningUnhooked();var i=n.store;if(r){var o=Eo(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),Q(this,"setFieldValue",function(r,i){n.setFields([{name:r,value:i,errors:[],warnings:[]}])}),Q(this,"getDependencyChildrenFields",function(r){var i=new Set,o=[],A=new fo;n.getFieldEntities().forEach(function(s){var l=s.props.dependencies;(l||[]).forEach(function(u){var d=cn(u);A.update(d,function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return g.add(s),g})})});var a=function s(l){var u=A.get(l)||new Set;u.forEach(function(d){if(!i.has(d)){i.add(d);var g=d.getNamePath();d.isFieldDirty()&&g.length&&(o.push(g),s(g))}})};return a(r),o}),Q(this,"triggerOnFieldsChange",function(r,i){var o=n.callbacks.onFieldsChange;if(o){var A=n.getFields();if(i){var a=new fo;i.forEach(function(l){var u=l.name,d=l.errors;a.set(u,d)}),A.forEach(function(l){l.errors=a.get(l.name)||l.errors})}var s=A.filter(function(l){var u=l.name;return Ro(r,u)});s.length&&o(s,A)}}),Q(this,"validateFields",function(r,i){n.warningUnhooked();var o,A;Array.isArray(r)||typeof r=="string"||typeof i=="string"?(o=r,A=i):A=r;var a=!!o,s=a?o.map(cn):[],l=[],u=String(Date.now()),d=new Set,g=A||{},p=g.recursive,V=g.dirty;n.getFieldEntities(!0).forEach(function(w){if(a||s.push(w.getNamePath()),!(!w.props.rules||!w.props.rules.length)&&!(V&&!w.isFieldDirty())){var S=w.getNamePath();if(d.add(S.join(u)),!a||Ro(s,S,p)){var M=w.validateRules(U({validateMessages:U(U({},Fv),n.validateMessages)},A));l.push(M.then(function(){return{name:S,errors:[],warnings:[]}}).catch(function(I){var f,R=[],q=[];return(f=I.forEach)===null||f===void 0||f.call(I,function(E){var h=E.rule.warningOnly,y=E.errors;h?q.push.apply(q,be(y)):R.push.apply(R,be(y))}),R.length?Promise.reject({name:S,errors:R,warnings:q}):{name:S,errors:R,warnings:q}}))}}});var v=HM(l);n.lastValidatePromise=v,v.catch(function(w){return w}).then(function(w){var S=w.map(function(M){var I=M.name;return I});n.notifyObservers(n.store,S,{type:"validateFinish"}),n.triggerOnFieldsChange(S,w)});var m=v.then(function(){return n.lastValidatePromise===v?Promise.resolve(n.getFieldsValue(s)):Promise.reject([])}).catch(function(w){var S=w.filter(function(M){return M&&M.errors.length});return Promise.reject({values:n.getFieldsValue(s),errorFields:S,outOfDate:n.lastValidatePromise!==v})});m.catch(function(w){return w});var C=s.filter(function(w){return d.has(w.join(u))});return n.triggerOnFieldsChange(C),m}),Q(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})}),this.forceRootUpdate=e});function Gv(t){var e=c.useRef(),n=c.useState({}),r=$(n,2),i=r[1];if(!e.current)if(t)e.current=t;else{var o=function(){i({})},A=new ZM(o);e.current=A.getForm()}return[e.current]}var ad=c.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),zM=function(e){var n=e.validateMessages,r=e.onFormChange,i=e.onFormFinish,o=e.children,A=c.useContext(ad),a=c.useRef({});return c.createElement(ad.Provider,{value:U(U({},A),{},{validateMessages:U(U({},A.validateMessages),n),triggerFormChange:function(l,u){r&&r(l,{changedFields:u,forms:a.current}),A.triggerFormChange(l,u)},triggerFormFinish:function(l,u){i&&i(l,{values:u,forms:a.current}),A.triggerFormFinish(l,u)},registerForm:function(l,u){l&&(a.current=U(U({},a.current),{},Q({},l,u))),A.registerForm(l,u)},unregisterForm:function(l){var u=U({},a.current);delete u[l],a.current=u,A.unregisterForm(l)}})},o)},JM=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],WM=function(e,n){var r=e.name,i=e.initialValues,o=e.fields,A=e.form,a=e.preserve,s=e.children,l=e.component,u=l===void 0?"form":l,d=e.validateMessages,g=e.validateTrigger,p=g===void 0?"onChange":g,V=e.onValuesChange,v=e.onFieldsChange,m=e.onFinish,C=e.onFinishFailed,w=e.clearOnDestroy,S=qt(e,JM),M=c.useRef(null),I=c.useContext(ad),f=Gv(A),R=$(f,1),q=R[0],E=q.getInternalHooks(Zi),h=E.useSubscribe,y=E.setInitialValues,x=E.setCallbacks,b=E.setValidateMessages,B=E.setPreserve,O=E.destroyForm;c.useImperativeHandle(n,function(){return U(U({},q),{},{nativeElement:M.current})}),c.useEffect(function(){return I.registerForm(r,q),function(){I.unregisterForm(r)}},[I,q,r]),b(U(U({},I.validateMessages),d)),x({onValuesChange:V,onFieldsChange:function(K){if(I.triggerFormChange(r,K),v){for(var J=arguments.length,z=new Array(J>1?J-1:0),te=1;te<J;te++)z[te-1]=arguments[te];v.apply(void 0,[K].concat(z))}},onFinish:function(K){I.triggerFormFinish(r,K),m&&m(K)},onFinishFailed:C}),B(a);var N=c.useRef(null);y(i,!N.current),N.current||(N.current=!0),c.useEffect(function(){return function(){return O(w)}},[]);var F,j=typeof s=="function";if(j){var Y=q.getFieldsValue(!0);F=s(Y,q)}else F=s;h(!j);var H=c.useRef();c.useEffect(function(){jM(H.current||[],o||[])||q.setFields(o||[]),H.current=o},[o,q]);var L=c.useMemo(function(){return U(U({},q),{},{validateTrigger:p})},[q,p]),G=c.createElement(ms.Provider,{value:null},c.createElement(Lo.Provider,{value:L},F));return u===!1?G:c.createElement(u,Fe({},S,{ref:M,onSubmit:function(K){K.preventDefault(),K.stopPropagation(),q.submit()},onReset:function(K){var J;K.preventDefault(),q.resetFields(),(J=S.onReset)===null||J===void 0||J.call(S,K)}}),G)};function Up(t){try{return JSON.stringify(t)}catch{return Math.random()}}var XM=process.env.NODE_ENV!=="production"?function(t){var e=t.join("__RC_FIELD_FORM_SPLIT__"),n=T.useRef(e);Ct(n.current===e,"`useWatch` is not support dynamic `namePath`. Please provide static instead.")}:function(){};function _M(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=i===void 0?{}:i,A=AM(o)?{form:o}:o,a=A.form,s=T.useState(),l=$(s,2),u=l[0],d=l[1],g=T.useMemo(function(){return Up(u)},[u]),p=T.useRef(g);p.current=g;var V=T.useContext(Lo),v=a||V,m=v&&v._init;process.env.NODE_ENV!=="production"&&Ct(e.length===2?a?m:!0:m,"useWatch requires a form instance since it can not auto detect from context.");var C=cn(r),w=T.useRef(C);return w.current=C,XM(C),T.useEffect(function(){if(m){var S=v.getFieldsValue,M=v.getInternalHooks,I=M(Zi),f=I.registerWatch,R=function(y,x){var b=A.preserve?x:y;return typeof r=="function"?r(b):Kr(b,w.current)},q=f(function(h,y){var x=R(h,y),b=Up(x);p.current!==b&&(p.current=b,d(x))}),E=R(S(),S(!0));return u!==E&&d(E),q}},[m]),u}var $M=c.forwardRef(WM),$A=$M;$A.FormProvider=zM;$A.Field=kv;$A.List=YM;$A.useForm=Gv;$A.useWatch=_M;function $n(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(r){delete n[r]}),n}const Fr=c.createContext({});process.env.NODE_ENV!=="production"&&(Fr.displayName="FormItemInputContext");const e4=t=>{let{children:e,status:n,override:r}=t;const i=c.useContext(Fr),o=c.useMemo(()=>{const A=Object.assign({},i);return r&&delete A.isFormItemInput,n&&(delete A.status,delete A.hasFeedback,delete A.feedbackIcon),A},[n,r,i]);return c.createElement(Fr.Provider,{value:o},e)},t4=c.createContext(void 0);var n4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const r4=(t,e)=>{var n,r;const i=c.useContext(Mv),o=c.useContext(Rv),{getPrefixCls:A,direction:a,radio:s}=c.useContext(Qt),l=c.useRef(null),u=kr(e,l),{isFormItemInput:d}=c.useContext(Fr);if(process.env.NODE_ENV!=="production"){const N=an("Radio");process.env.NODE_ENV!=="production"&&N(!("optionType"in t),"usage","`optionType` is only support in Radio.Group.")}const g=N=>{var F,j;(F=t.onChange)===null||F===void 0||F.call(t,N),(j=i==null?void 0:i.onChange)===null||j===void 0||j.call(i,N)},{prefixCls:p,className:V,rootClassName:v,children:m,style:C,title:w}=t,S=n4(t,["prefixCls","className","rootClassName","children","style","title"]),M=A("radio",p),I=((i==null?void 0:i.optionType)||o)==="button",f=I?`${M}-button`:M,R=Ur(M),[q,E,h]=cv(M,R),y=Object.assign({},S),x=c.useContext(li);i&&(y.name=i.name,y.onChange=g,y.checked=t.value===i.value,y.disabled=(n=y.disabled)!==null&&n!==void 0?n:i.disabled),y.disabled=(r=y.disabled)!==null&&r!==void 0?r:x;const b=se(`${f}-wrapper`,{[`${f}-wrapper-checked`]:y.checked,[`${f}-wrapper-disabled`]:y.disabled,[`${f}-wrapper-rtl`]:a==="rtl",[`${f}-wrapper-in-form-item`]:d,[`${f}-wrapper-block`]:!!(i!=null&&i.block)},s==null?void 0:s.className,V,v,E,h,R),[B,O]=oM(y.onClick);return q(c.createElement(_s,{component:"Radio",disabled:y.disabled},c.createElement("label",{className:b,style:Object.assign(Object.assign({},s==null?void 0:s.style),C),onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,title:w,onClick:B},c.createElement(U2,Object.assign({},y,{className:se(y.className,{[ig]:!I}),type:"radio",prefixCls:f,ref:u,onClick:O})),m!==void 0?c.createElement("span",{className:`${f}-label`},m):null)))},DA=c.forwardRef(r4);process.env.NODE_ENV!=="production"&&(DA.displayName="Radio");function i4(){var t=U({},c);return t.useId}var Gp=0,jp=i4();const $s=jp?function(e){var n=jp();return e||(process.env.NODE_ENV==="test"?"test-id":n)}:function(e){var n=c.useState("ssr-id"),r=$(n,2),i=r[0],o=r[1];return c.useEffect(function(){var A=Gp;Gp+=1,o("rc_unique_".concat(A))},[]),e||(process.env.NODE_ENV==="test"?"test-id":i)},o4=c.forwardRef((t,e)=>{const{getPrefixCls:n,direction:r}=c.useContext(Qt),i=$s(),{prefixCls:o,className:A,rootClassName:a,options:s,buttonStyle:l="outline",disabled:u,children:d,size:g,style:p,id:V,optionType:v,name:m=i,defaultValue:C,value:w,block:S=!1,onChange:M,onMouseEnter:I,onMouseLeave:f,onFocus:R,onBlur:q}=t,[E,h]=Tn(C,{value:w}),y=c.useCallback(G=>{const _=E,K=G.target.value;"value"in t||h(K),K!==_&&(M==null||M(G))},[E,h,M]),x=n("radio",o),b=`${x}-group`,B=Ur(x),[O,N,F]=cv(x,B);let j=d;s&&s.length>0&&(j=s.map(G=>typeof G=="string"||typeof G=="number"?c.createElement(DA,{key:G.toString(),prefixCls:x,disabled:u,value:G,checked:E===G},G):c.createElement(DA,{key:`radio-group-value-options-${G.value}`,prefixCls:x,disabled:G.disabled||u,value:G.value,checked:E===G.value,title:G.title,style:G.style,id:G.id,required:G.required},G.label)));const Y=ki(g),H=se(b,`${b}-${l}`,{[`${b}-${Y}`]:Y,[`${b}-rtl`]:r==="rtl",[`${b}-block`]:S},A,a,N,F,B),L=c.useMemo(()=>({onChange:y,value:E,disabled:u,name:m,optionType:v,block:S}),[y,E,u,m,v,S]);return O(c.createElement("div",Object.assign({},Oi(t,{aria:!0,data:!0}),{className:H,style:p,onMouseEnter:I,onMouseLeave:f,onFocus:R,onBlur:q,id:V,ref:e}),c.createElement(F2,{value:L},j)))}),A4=c.memo(o4);var a4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const s4=(t,e)=>{const{getPrefixCls:n}=c.useContext(Qt),{prefixCls:r}=t,i=a4(t,["prefixCls"]),o=n("radio",r);return c.createElement(Q2,{value:"button"},c.createElement(DA,Object.assign({prefixCls:o},i,{type:"radio",ref:e})))},l4=c.forwardRef(s4),ea=DA;ea.Button=l4;ea.Group=A4;ea.__ANT_RADIO=!0;const c4=t=>{const{getPrefixCls:e,direction:n}=T.useContext(Qt),{prefixCls:r,className:i}=t,o=e("input-group",r),A=e("input"),[a,s]=Vv(A),l=se(o,{[`${o}-lg`]:t.size==="large",[`${o}-sm`]:t.size==="small",[`${o}-compact`]:t.compact,[`${o}-rtl`]:n==="rtl"},s,i),u=T.useContext(Fr),d=T.useMemo(()=>Object.assign(Object.assign({},u),{isFormItemInput:!1}),[u]);return process.env.NODE_ENV!=="production"&&an("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),a(c.createElement("span",{className:l,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},c.createElement(Fr.Provider,{value:d},t.children)))};function u4(t){return!!(t.addonBefore||t.addonAfter)}function d4(t){return!!(t.prefix||t.suffix||t.allowClear)}function Pp(t,e,n){var r=e.cloneNode(!0),i=Object.create(t,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(r.selectionStart=e.selectionStart,r.selectionEnd=e.selectionEnd),r.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},i}function Vs(t,e,n,r){if(n){var i=e;if(e.type==="click"){i=Pp(e,t,""),n(i);return}if(t.type!=="file"&&r!==void 0){i=Pp(e,t,r),n(i);return}n(i)}}function jv(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var i=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}}var Pv=T.forwardRef(function(t,e){var n,r,i,o=t.inputElement,A=t.children,a=t.prefixCls,s=t.prefix,l=t.suffix,u=t.addonBefore,d=t.addonAfter,g=t.className,p=t.style,V=t.disabled,v=t.readOnly,m=t.focused,C=t.triggerFocus,w=t.allowClear,S=t.value,M=t.handleReset,I=t.hidden,f=t.classes,R=t.classNames,q=t.dataAttrs,E=t.styles,h=t.components,y=t.onClear,x=A??o,b=(h==null?void 0:h.affixWrapper)||"span",B=(h==null?void 0:h.groupWrapper)||"span",O=(h==null?void 0:h.wrapper)||"span",N=(h==null?void 0:h.groupAddon)||"span",F=T.useRef(null),j=function(de){var ce;(ce=F.current)!==null&&ce!==void 0&&ce.contains(de.target)&&(C==null||C())},Y=d4(t),H=T.cloneElement(x,{value:S,className:se((n=x.props)===null||n===void 0?void 0:n.className,!Y&&(R==null?void 0:R.variant))||null}),L=T.useRef(null);if(T.useImperativeHandle(e,function(){return{nativeElement:L.current||F.current}}),Y){var G=null;if(w){var _=!V&&!v&&S,K="".concat(a,"-clear-icon"),J=$e(w)==="object"&&w!==null&&w!==void 0&&w.clearIcon?w.clearIcon:"✖";G=T.createElement("button",{type:"button",tabIndex:-1,onClick:function(de){M==null||M(de),y==null||y()},onMouseDown:function(de){return de.preventDefault()},className:se(K,Q(Q({},"".concat(K,"-hidden"),!_),"".concat(K,"-has-suffix"),!!l))},J)}var z="".concat(a,"-affix-wrapper"),te=se(z,Q(Q(Q(Q(Q({},"".concat(a,"-disabled"),V),"".concat(z,"-disabled"),V),"".concat(z,"-focused"),m),"".concat(z,"-readonly"),v),"".concat(z,"-input-with-clear-btn"),l&&w&&S),f==null?void 0:f.affixWrapper,R==null?void 0:R.affixWrapper,R==null?void 0:R.variant),X=(l||w)&&T.createElement("span",{className:se("".concat(a,"-suffix"),R==null?void 0:R.suffix),style:E==null?void 0:E.suffix},G,l);H=T.createElement(b,Fe({className:te,style:E==null?void 0:E.affixWrapper,onClick:j},q==null?void 0:q.affixWrapper,{ref:F}),s&&T.createElement("span",{className:se("".concat(a,"-prefix"),R==null?void 0:R.prefix),style:E==null?void 0:E.prefix},s),H,X)}if(u4(t)){var Ae="".concat(a,"-group"),le="".concat(Ae,"-addon"),ue="".concat(Ae,"-wrapper"),ne=se("".concat(a,"-wrapper"),Ae,f==null?void 0:f.wrapper,R==null?void 0:R.wrapper),me=se(ue,Q({},"".concat(ue,"-disabled"),V),f==null?void 0:f.group,R==null?void 0:R.groupWrapper);H=T.createElement(B,{className:me,ref:L},T.createElement(O,{className:ne},u&&T.createElement(N,{className:le},u),H,d&&T.createElement(N,{className:le},d)))}return T.cloneElement(H,{className:se((r=H.props)===null||r===void 0?void 0:r.className,g)||null,style:U(U({},(i=H.props)===null||i===void 0?void 0:i.style),p),hidden:I})}),g4=["show"];function Lv(t,e){return c.useMemo(function(){var n={};e&&(n.show=$e(e)==="object"&&e.formatter?e.formatter:!!e),n=U(U({},n),t);var r=n,i=r.show,o=qt(r,g4);return U(U({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(A){return A.length}})},[t,e])}var f4=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],h4=T.forwardRef(function(t,e){var n=t.autoComplete,r=t.onChange,i=t.onFocus,o=t.onBlur,A=t.onPressEnter,a=t.onKeyDown,s=t.onKeyUp,l=t.prefixCls,u=l===void 0?"rc-input":l,d=t.disabled,g=t.htmlSize,p=t.className,V=t.maxLength,v=t.suffix,m=t.showCount,C=t.count,w=t.type,S=w===void 0?"text":w,M=t.classes,I=t.classNames,f=t.styles,R=t.onCompositionStart,q=t.onCompositionEnd,E=qt(t,f4),h=T.useState(!1),y=$(h,2),x=y[0],b=y[1],B=T.useRef(!1),O=T.useRef(!1),N=T.useRef(null),F=T.useRef(null),j=function(pe){N.current&&jv(N.current,pe)},Y=Tn(t.defaultValue,{value:t.value}),H=$(Y,2),L=H[0],G=H[1],_=L==null?"":String(L),K=T.useState(null),J=$(K,2),z=J[0],te=J[1],X=Lv(C,m),Ae=X.max||V,le=X.strategy(_),ue=!!Ae&&le>Ae;T.useImperativeHandle(e,function(){var Se;return{focus:j,blur:function(){var Me;(Me=N.current)===null||Me===void 0||Me.blur()},setSelectionRange:function(Me,Le,et){var nt;(nt=N.current)===null||nt===void 0||nt.setSelectionRange(Me,Le,et)},select:function(){var Me;(Me=N.current)===null||Me===void 0||Me.select()},input:N.current,nativeElement:((Se=F.current)===null||Se===void 0?void 0:Se.nativeElement)||N.current}}),T.useEffect(function(){O.current&&(O.current=!1),b(function(Se){return Se&&d?!1:Se})},[d]);var ne=function(pe,Me,Le){var et=Me;if(!B.current&&X.exceedFormatter&&X.max&&X.strategy(Me)>X.max){if(et=X.exceedFormatter(Me,{max:X.max}),Me!==et){var nt,je;te([((nt=N.current)===null||nt===void 0?void 0:nt.selectionStart)||0,((je=N.current)===null||je===void 0?void 0:je.selectionEnd)||0])}}else if(Le.source==="compositionEnd")return;G(et),N.current&&Vs(N.current,pe,r,et)};T.useEffect(function(){if(z){var Se;(Se=N.current)===null||Se===void 0||Se.setSelectionRange.apply(Se,be(z))}},[z]);var me=function(pe){ne(pe,pe.target.value,{source:"change"})},Z=function(pe){B.current=!1,ne(pe,pe.currentTarget.value,{source:"compositionEnd"}),q==null||q(pe)},de=function(pe){A&&pe.key==="Enter"&&!O.current&&(O.current=!0,A(pe)),a==null||a(pe)},ce=function(pe){pe.key==="Enter"&&(O.current=!1),s==null||s(pe)},ye=function(pe){b(!0),i==null||i(pe)},Ie=function(pe){O.current&&(O.current=!1),b(!1),o==null||o(pe)},Ve=function(pe){G(""),j(),N.current&&Vs(N.current,pe,r)},Be=ue&&"".concat(u,"-out-of-range"),Qe=function(){var pe=$n(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return T.createElement("input",Fe({autoComplete:n},pe,{onChange:me,onFocus:ye,onBlur:Ie,onKeyDown:de,onKeyUp:ce,className:se(u,Q({},"".concat(u,"-disabled"),d),I==null?void 0:I.input),style:f==null?void 0:f.input,ref:N,size:g,type:S,onCompositionStart:function(Le){B.current=!0,R==null||R(Le)},onCompositionEnd:Z}))},ke=function(){var pe=Number(Ae)>0;if(v||X.show){var Me=X.showFormatter?X.showFormatter({value:_,count:le,maxLength:Ae}):"".concat(le).concat(pe?" / ".concat(Ae):"");return T.createElement(T.Fragment,null,X.show&&T.createElement("span",{className:se("".concat(u,"-show-count-suffix"),Q({},"".concat(u,"-show-count-has-suffix"),!!v),I==null?void 0:I.count),style:U({},f==null?void 0:f.count)},Me),v)}return null};return T.createElement(Pv,Fe({},E,{prefixCls:u,className:se(p,Be),handleReset:Ve,value:_,focused:x,triggerFocus:j,suffix:ke(),disabled:d,classes:M,classNames:I,styles:f}),Qe())}),Yv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const el=c.createContext(null),zo=(t,e)=>{const n=c.useContext(el),r=c.useMemo(()=>{if(!n)return"";const{compactDirection:i,isFirstItem:o,isLastItem:A}=n,a=i==="vertical"?"-vertical-":"-";return se(`${t}-compact${a}item`,{[`${t}-compact${a}first-item`]:o,[`${t}-compact${a}last-item`]:A,[`${t}-compact${a}item-rtl`]:e==="rtl"})},[t,e,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},p4=t=>{const{children:e}=t;return c.createElement(el.Provider,{value:null},e)},m4=t=>{const{children:e}=t,n=Yv(t,["children"]);return c.createElement(el.Provider,{value:c.useMemo(()=>n,[n])},e)},V4=t=>{const{getPrefixCls:e,direction:n}=c.useContext(Qt),{size:r,direction:i,block:o,prefixCls:A,className:a,rootClassName:s,children:l}=t,u=Yv(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=ki(S=>r??S),g=e("space-compact",A),[p,V]=bv(g),v=se(g,V,{[`${g}-rtl`]:n==="rtl",[`${g}-block`]:o,[`${g}-vertical`]:i==="vertical"},a,s),m=c.useContext(el),C=Nr(l),w=c.useMemo(()=>C.map((S,M)=>{const I=(S==null?void 0:S.key)||`${g}-item-${M}`;return c.createElement(m4,{key:I,compactSize:d,compactDirection:i,isFirstItem:M===0&&(!m||(m==null?void 0:m.isFirstItem)),isLastItem:M===C.length-1&&(!m||(m==null?void 0:m.isLastItem))},S)}),[r,C,m]);return C.length===0?null:p(c.createElement("div",Object.assign({className:v},u),w))},NA=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let i=r;return n&&(i=T.createElement(e4,{override:!0,status:!0},i)),e&&(i=T.createElement(p4,null,i)),i};var v4={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function Hv(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function C4(t){return Hv(t)instanceof ShadowRoot}function vs(t){return C4(t)?Hv(t):null}function q4(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function E4(t,e){Ct(t,"[@ant-design/icons] ".concat(e))}function Lp(t){return $e(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&($e(t.icon)==="object"||typeof t.icon=="function")}function Yp(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[q4(n)]=r}return e},{})}function sd(t,e,n){return n?T.createElement(t.tag,U(U({key:e},Yp(t.attrs)),n),(t.children||[]).map(function(r,i){return sd(r,"".concat(e,"-").concat(t.tag,"-").concat(i))})):T.createElement(t.tag,U({key:e},Yp(t.attrs)),(t.children||[]).map(function(r,i){return sd(r,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function Kv(t){return MA(t)[0]}function Zv(t){return t?Array.isArray(t)?t:[t]:[]}var y4=`
|
|
533
|
+
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,O2="".concat(T2," ").concat(B2).split(/[\s\n]+/),D2="aria-",N2="data-";function Ip(t,e){return t.indexOf(e)===0}function Oi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=U({},e);var r={};return Object.keys(t).forEach(function(i){(n.aria&&(i==="role"||Ip(i,D2))||n.data&&Ip(i,N2)||n.attr&&O2.includes(i))&&(r[i]=t[i])}),r}const Ur=t=>{const[,,,,e]=lr();return e?`${t}-css-var`:""},ki=t=>{const e=T.useContext(No);return T.useMemo(()=>t?typeof t=="string"?t??e:t instanceof Function?t(e):e:e,[t,e])},Mv=c.createContext(null),F2=Mv.Provider,Rv=c.createContext(null),Q2=Rv.Provider;var k2=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],U2=T.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-checkbox":n,i=t.className,o=t.style,A=t.checked,a=t.disabled,s=t.defaultChecked,l=s===void 0?!1:s,u=t.type,d=u===void 0?"checkbox":u,g=t.title,p=t.onChange,V=qt(t,k2),v=T.useRef(null),m=T.useRef(null),C=Tn(l,{value:A}),w=$(C,2),S=w[0],M=w[1];T.useImperativeHandle(e,function(){return{focus:function(q){var E;(E=v.current)===null||E===void 0||E.focus(q)},blur:function(){var q;(q=v.current)===null||q===void 0||q.blur()},input:v.current,nativeElement:m.current}});var I=se(r,i,Q(Q({},"".concat(r,"-checked"),S),"".concat(r,"-disabled"),a)),f=function(q){a||("checked"in t||M(q.target.checked),p==null||p({target:U(U({},t),{},{type:d,checked:q.target.checked}),stopPropagation:function(){q.stopPropagation()},preventDefault:function(){q.preventDefault()},nativeEvent:q.nativeEvent}))};return c.createElement("span",{className:I,title:g,style:o,ref:m},c.createElement("input",Fe({},V,{className:"".concat(r,"-input"),ref:v,onChange:f,disabled:a,checked:!!S,type:d})),c.createElement("span",{className:"".concat(r,"-inner")}))});const rg=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),o=i.width,A=i.height;if(o||A)return!0}}return!1};function xv(t){return t&&T.isValidElement(t)&&t.type===T.Fragment}const Tv=(t,e,n)=>T.isValidElement(t)?T.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function Dr(t,e){return Tv(t,t,e)}const G2=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},j2=QE("Wave",t=>[G2(t)]),ig=`${RA}-wave-target`;function Bv(t,e){this.v=t,this.k=e}function Nn(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}Nn=function(A,a,s,l){if(a)i?i(A,a,{value:s,enumerable:!l,configurable:!l,writable:!l}):A[a]=s;else{var u=function(g,p){Nn(A,g,function(V){return this._invoke(g,p,V)})};u("next",0),u("throw",1),u("return",2)}},Nn(t,e,n,r)}function og(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(p,V,v,m){var C=V&&V.prototype instanceof a?V:a,w=Object.create(C.prototype);return Nn(w,"_invoke",function(S,M,I){var f,R,q,E=0,h=I||[],y=!1,x={p:0,n:0,v:t,a:b,f:b.bind(t,4),d:function(O,N){return f=O,R=0,q=t,x.n=N,A}};function b(B,O){for(R=B,q=O,e=0;!y&&E&&!N&&e<h.length;e++){var N,F=h[e],j=x.p,Y=F[2];B>3?(N=Y===O)&&(q=F[(R=F[4])?5:(R=3,3)],F[4]=F[5]=t):F[0]<=j&&((N=B<2&&j<F[1])?(R=0,x.v=O,x.n=F[1]):j<Y&&(N=B<3||F[0]>O||O>Y)&&(F[4]=B,F[5]=O,x.n=Y,R=0))}if(N||B>1)return A;throw y=!0,O}return function(B,O,N){if(E>1)throw TypeError("Generator is already running");for(y&&O===1&&b(O,N),R=O,q=N;(e=R<2?t:q)||!y;){f||(R?R<3?(R>1&&(x.n=-1),b(R,q)):x.n=q:x.v=q);try{if(E=2,f){if(R||(B="next"),e=f[B]){if(!(e=e.call(f,q)))throw TypeError("iterator result is not an object");if(!e.done)return e;q=e.value,R<2&&(R=0)}else R===1&&(e=f.return)&&e.call(f),R<2&&(q=TypeError("The iterator does not provide a '"+B+"' method"),R=1);f=t}else if((e=(y=x.n<0)?q:S.call(M,x))!==A)break}catch(F){f=t,R=1,q=F}finally{E=1}}return{value:e,done:y}}}(p,v,m),!0),w}var A={};function a(){}function s(){}function l(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(Nn(e={},r,function(){return this}),e),d=l.prototype=a.prototype=Object.create(u);function g(p){return Object.setPrototypeOf?Object.setPrototypeOf(p,l):(p.__proto__=l,Nn(p,i,"GeneratorFunction")),p.prototype=Object.create(d),p}return s.prototype=l,Nn(d,"constructor",l),Nn(l,"constructor",s),s.displayName="GeneratorFunction",Nn(l,i,"GeneratorFunction"),Nn(d),Nn(d,i,"Generator"),Nn(d,r,function(){return this}),Nn(d,"toString",function(){return"[object Generator]"}),(og=function(){return{w:o,m:g}})()}function hs(t,e){function n(i,o,A,a){try{var s=t[i](o),l=s.value;return l instanceof Bv?e.resolve(l.v).then(function(u){n("next",u,A,a)},function(u){n("throw",u,A,a)}):e.resolve(l).then(function(u){s.value=u,A(s)},function(u){return n("throw",u,A,a)})}catch(u){a(u)}}var r;this.next||(Nn(hs.prototype),Nn(hs.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Nn(this,"_invoke",function(i,o,A){function a(){return new e(function(s,l){n(i,A,s,l)})}return r=r?r.then(a,a):a()},!0)}function Ov(t,e,n,r,i){return new hs(og().w(t,e,n,r),i||Promise)}function P2(t,e,n,r,i){var o=Ov(t,e,n,r,i);return o.next().then(function(A){return A.done?A.value:o.next()})}function L2(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function i(){for(;n.length;)if((r=n.pop())in e)return i.value=r,i.done=!1,i;return i.done=!0,i}}function bp(t){if(t!=null){var e=t[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError($e(t)+" is not iterable")}function kn(){var t=og(),e=t.m(kn),n=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function r(A){var a=typeof A=="function"&&A.constructor;return!!a&&(a===n||(a.displayName||a.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(A){var a,s;return function(l){a||(a={stop:function(){return s(l.a,2)},catch:function(){return l.v},abrupt:function(d,g){return s(l.a,i[d],g)},delegateYield:function(d,g,p){return a.resultName=g,s(l.d,bp(d),p)},finish:function(d){return s(l.f,d)}},s=function(d,g,p){l.p=a.prev,l.n=a.next;try{return d(g,p)}finally{a.next=l.n}}),a.resultName&&(a[a.resultName]=l.v,a.resultName=void 0),a.sent=l.v,a.next=l.n;try{return A.call(this,a)}finally{l.p=a.prev,l.n=a.next}}}return(kn=function(){return{wrap:function(s,l,u,d){return t.w(o(s),l,u,d&&d.reverse())},isGeneratorFunction:r,mark:t.m,awrap:function(s,l){return new Bv(s,l)},AsyncIterator:hs,async:function(s,l,u,d,g){return(r(l)?Ov:P2)(o(s),l,u,d,g)},keys:L2,values:bp}})()}function Mp(t,e,n,r,i,o,A){try{var a=t[o](A),s=a.value}catch(l){return void n(l)}a.done?e(s):Promise.resolve(s).then(r,i)}function ao(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function A(s){Mp(o,r,i,A,a,"next",s)}function a(s){Mp(o,r,i,A,a,"throw",s)}A(void 0)})}}var XA=U({},Km),Y2=XA.version,Xl=XA.render,H2=XA.unmountComponentAtNode,Xs;try{var K2=Number((Y2||"").split(".")[0]);K2>=18&&(Xs=XA.createRoot)}catch{}function Rp(t){var e=XA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&$e(e)==="object"&&(e.usingClientEntryPoint=t)}var ps="__rc_react_root__";function Z2(t,e){Rp(!0);var n=e[ps]||Xs(e);Rp(!1),n.render(t),e[ps]=n}function z2(t,e){Xl==null||Xl(t,e)}function J2(t,e){if(Xs){Z2(t,e);return}z2(t,e)}function W2(t){return Wu.apply(this,arguments)}function Wu(){return Wu=ao(kn().mark(function t(e){return kn().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=e[ps])===null||i===void 0||i.unmount(),delete e[ps]}));case 1:case"end":return r.stop()}},t)})),Wu.apply(this,arguments)}function X2(t){H2(t)}function _2(t){return Xu.apply(this,arguments)}function Xu(){return Xu=ao(kn().mark(function t(e){return kn().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Xs===void 0){r.next=2;break}return r.abrupt("return",W2(e));case 2:X2(e);case 3:case"end":return r.stop()}},t)})),Xu.apply(this,arguments)}const $2=(t,e)=>{if(process.env.NODE_ENV!=="production"){const n=parseInt(c.version.split(".")[0],10),r=Object.keys(Km);process.env.NODE_ENV!=="production"&&exports.warning$1(n<19||r.includes("createRoot"),"compatible","antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.")}return J2(t,e),()=>_2(e)};let eM=$2;function Ag(){return eM}function _l(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"}function tM(t){const{borderTopColor:e,borderColor:n,backgroundColor:r}=getComputedStyle(t);return _l(e)?e:_l(n)?n:_l(r)?r:null}function $l(t){return Number.isNaN(t)?0:t}const nM=t=>{const{className:e,target:n,component:r,registerUnmount:i}=t,o=c.useRef(null),A=c.useRef(null);c.useEffect(()=>{A.current=i()},[]);const[a,s]=c.useState(null),[l,u]=c.useState([]),[d,g]=c.useState(0),[p,V]=c.useState(0),[v,m]=c.useState(0),[C,w]=c.useState(0),[S,M]=c.useState(!1),I={left:d,top:p,width:v,height:C,borderRadius:l.map(q=>`${q}px`).join(" ")};a&&(I["--wave-color"]=a);function f(){const q=getComputedStyle(n);s(tM(n));const E=q.position==="static",{borderLeftWidth:h,borderTopWidth:y}=q;g(E?n.offsetLeft:$l(-parseFloat(h))),V(E?n.offsetTop:$l(-parseFloat(y))),m(n.offsetWidth),w(n.offsetHeight);const{borderTopLeftRadius:x,borderTopRightRadius:b,borderBottomLeftRadius:B,borderBottomRightRadius:O}=q;u([x,b,O,B].map(N=>$l(parseFloat(N))))}if(c.useEffect(()=>{if(n){const q=Lt(()=>{f(),M(!0)});let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(f),E.observe(n)),()=>{Lt.cancel(q),E==null||E.disconnect()}}},[]),!S)return null;const R=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(ig));return c.createElement(oo,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(q,E)=>{var h,y;if(E.deadline||E.propertyName==="opacity"){const x=(h=o.current)===null||h===void 0?void 0:h.parentElement;(y=A.current)===null||y===void 0||y.call(A).then(()=>{x==null||x.remove()})}return!1}},(q,E)=>{let{className:h}=q;return c.createElement("div",{ref:kr(o,E),className:se(e,h,{"wave-quick":R}),style:I})})},rM=(t,e)=>{var n;const{component:r}=e;if(r==="Checkbox"&&!(!((n=t.querySelector("input"))===null||n===void 0)&&n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",t==null||t.insertBefore(i,t==null?void 0:t.firstChild);const o=Ag();let A=null;function a(){return A}A=o(c.createElement(nM,Object.assign({},e,{target:t,registerUnmount:a})),i)},iM=(t,e,n)=>{const{wave:r}=c.useContext(Qt),[,i,o]=lr(),A=nn(l=>{const u=t.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${ig}`)||u,{showEffect:g}=r||{};(g||rM)(d,{className:e,token:i,component:n,event:l,hashId:o})}),a=c.useRef(null);return l=>{Lt.cancel(a.current),a.current=Lt(()=>{A(l)})}},_s=t=>{const{children:e,disabled:n,component:r}=t,{getPrefixCls:i}=T.useContext(Qt),o=T.useRef(null),A=i("wave"),[,a]=j2(A),s=iM(o,se(A,a),r);if(T.useEffect(()=>{const u=o.current;if(!u||u.nodeType!==1||n)return;const d=g=>{!rg(g.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||s(g)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!T.isValidElement(e))return e??null;const l=Qi(e)?kr(io(e),o):o;return Dr(e,{ref:l})};process.env.NODE_ENV!=="production"&&(_s.displayName="Wave");function oM(t){const e=T.useRef(null),n=()=>{Lt.cancel(e.current),e.current=null};return[()=>{n(),e.current=Lt(()=>{e.current=null})},o=>{e.current&&(o.stopPropagation(),n()),t==null||t(o)}]}function Nr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return T.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(Nr(r)):EV(r)&&r.props?n=n.concat(Nr(r.props.children,e)):n.push(r))}),n}var Zi="RC_FORM_INTERNAL_HOOKS",zt=function(){Ct(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Lo=c.createContext({getFieldValue:zt,getFieldsValue:zt,getFieldError:zt,getFieldWarning:zt,getFieldsError:zt,isFieldsTouched:zt,isFieldTouched:zt,isFieldValidating:zt,isFieldsValidating:zt,resetFields:zt,setFields:zt,setFieldValue:zt,setFieldsValue:zt,validateFields:zt,submit:zt,getInternalHooks:function(){return zt(),{dispatch:zt,initEntityValue:zt,registerField:zt,useSubscribe:zt,setInitialValues:zt,destroyForm:zt,setCallbacks:zt,registerWatch:zt,getFields:zt,setValidateMessages:zt,setPreserve:zt,getInitialValue:zt}}}),ms=c.createContext(null);function _u(t){return t==null?[]:Array.isArray(t)?t:[t]}function AM(t){return t&&!!t._init}function $u(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var ed=$u();function aM(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function sM(t,e,n){if(Md())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&wA(i,n.prototype),i}function td(t){var e=typeof Map=="function"?new Map:void 0;return td=function(r){if(r===null||!aM(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return sM(r,arguments,SA(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),wA(i,r)},td(t)}var lM=/%[sdj%]/g,Dv=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Dv=function(e,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(r){return typeof r=="string"})&&console.warn(e,n)});function nd(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function ar(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var A=t.replace(lM,function(a){if(a==="%%")return"%";if(i>=o)return a;switch(a){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return a}});return A}return t}function cM(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function vn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||cM(e)&&typeof t=="string"&&!t)}function uM(t,e,n){var r=[],i=0,o=t.length;function A(a){r.push.apply(r,be(a||[])),i++,i===o&&n(r)}t.forEach(function(a){e(a,A)})}function xp(t,e,n){var r=0,i=t.length;function o(A){if(A&&A.length){n(A);return}var a=r;r=r+1,a<i?e(t[a],o):n([])}o([])}function dM(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,be(t[n]||[]))}),e}var Tp=function(t){di(n,t);var e=gi(n);function n(r,i){var o;return fn(this,n),o=e.call(this,"Async Validation Error"),Q(Rt(o),"errors",void 0),Q(Rt(o),"fields",void 0),o.errors=r,o.fields=i,o}return hn(n)}(td(Error));function gM(t,e,n,r,i){if(e.first){var o=new Promise(function(g,p){var V=function(C){return r(C),C.length?p(new Tp(C,nd(C))):g(i)},v=dM(t);xp(v,n,V)});return o.catch(function(g){return g}),o}var A=e.firstFields===!0?Object.keys(t):e.firstFields||[],a=Object.keys(t),s=a.length,l=0,u=[],d=new Promise(function(g,p){var V=function(m){if(u.push.apply(u,m),l++,l===s)return r(u),u.length?p(new Tp(u,nd(u))):g(i)};a.length||(r(u),g(i)),a.forEach(function(v){var m=t[v];A.indexOf(v)!==-1?xp(m,n,V):uM(m,n,V)})});return d.catch(function(g){return g}),d}function fM(t){return!!(t&&t.message!==void 0)}function hM(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function Bp(t,e){return function(n){var r;return t.fullFields?r=hM(e,t.fullFields):r=e[n.field||t.fullField],fM(n)?(n.field=n.field||t.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||t.fullField}}}function Op(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];$e(r)==="object"&&$e(t[n])==="object"?t[n]=U(U({},t[n]),r):t[n]=r}}return t}var go="enum",pM=function(e,n,r,i,o){e[go]=Array.isArray(e[go])?e[go]:[],e[go].indexOf(n)===-1&&i.push(ar(o.messages[go],e.fullField,e[go].join(", ")))},mM=function(e,n,r,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(ar(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var A=new RegExp(e.pattern);A.test(n)||i.push(ar(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},VM=function(e,n,r,i,o){var A=typeof e.len=="number",a=typeof e.min=="number",s=typeof e.max=="number",l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,g=typeof n=="number",p=typeof n=="string",V=Array.isArray(n);if(g?d="number":p?d="string":V&&(d="array"),!d)return!1;V&&(u=n.length),p&&(u=n.replace(l,"_").length),A?u!==e.len&&i.push(ar(o.messages[d].len,e.fullField,e.len)):a&&!s&&u<e.min?i.push(ar(o.messages[d].min,e.fullField,e.min)):s&&!a&&u>e.max?i.push(ar(o.messages[d].max,e.fullField,e.max)):a&&s&&(u<e.min||u>e.max)&&i.push(ar(o.messages[d].range,e.fullField,e.min,e.max))},Nv=function(e,n,r,i,o,A){e.required&&(!r.hasOwnProperty(e.field)||vn(n,A||e.type))&&i.push(ar(o.messages.required,e.fullField))},xa;const vM=function(){if(xa)return xa;var t="[a-fA-F\\d:]",e=function(f){return f&&f.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",A="(?:".concat(i.join("|"),")").concat(o),a=new RegExp("(?:^".concat(n,"$)|(?:^").concat(A,"$)")),s=new RegExp("^".concat(n,"$")),l=new RegExp("^".concat(A,"$")),u=function(f){return f&&f.exact?a:new RegExp("(?:".concat(e(f)).concat(n).concat(e(f),")|(?:").concat(e(f)).concat(A).concat(e(f),")"),"g")};u.v4=function(I){return I&&I.exact?s:new RegExp("".concat(e(I)).concat(n).concat(e(I)),"g")},u.v6=function(I){return I&&I.exact?l:new RegExp("".concat(e(I)).concat(A).concat(e(I)),"g")};var d="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,V=u.v6().source,v="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",C="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",w="(?::\\d{2,5})?",S='(?:[/?#][^\\s"]*)?',M="(?:".concat(d,"|www\\.)").concat(g,"(?:localhost|").concat(p,"|").concat(V,"|").concat(v).concat(m).concat(C,")").concat(w).concat(S);return xa=new RegExp("(?:^".concat(M,"$)"),"i"),xa};var Dp={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},gA={integer:function(e){return gA.number(e)&&parseInt(e,10)===e},float:function(e){return gA.number(e)&&!gA.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return $e(e)==="object"&&!gA.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Dp.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(vM())},hex:function(e){return typeof e=="string"&&!!e.match(Dp.hex)}},CM=function(e,n,r,i,o){if(e.required&&n===void 0){Nv(e,n,r,i,o);return}var A=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;A.indexOf(a)>-1?gA[a](n)||i.push(ar(o.messages.types[a],e.fullField,e.type)):a&&$e(n)!==e.type&&i.push(ar(o.messages.types[a],e.fullField,e.type))},qM=function(e,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(ar(o.messages.whitespace,e.fullField))};const Bt={required:Nv,whitespace:qM,type:CM,range:VM,enum:pM,pattern:mM};var EM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o)}r(A)},yM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return r();Bt.required(e,n,i,A,o,"array"),n!=null&&(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o))}r(A)},wM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&Bt.type(e,n,i,A,o)}r(A)},SM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n,"date")&&!e.required)return r();if(Bt.required(e,n,i,A,o),!vn(n,"date")){var s;n instanceof Date?s=n:s=new Date(n),Bt.type(e,s,i,A,o),s&&Bt.range(e,s.getTime(),i,A,o)}}r(A)},IM="enum",bM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&Bt[IM](e,n,i,A,o)}r(A)},MM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o))}r(A)},RM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o))}r(A)},xM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&Bt.type(e,n,i,A,o)}r(A)},TM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o))}r(A)},BM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),n!==void 0&&Bt.type(e,n,i,A,o)}r(A)},OM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n,"string")&&!e.required)return r();Bt.required(e,n,i,A,o),vn(n,"string")||Bt.pattern(e,n,i,A,o)}r(A)},DM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n)&&!e.required)return r();Bt.required(e,n,i,A,o),vn(n)||Bt.type(e,n,i,A,o)}r(A)},NM=function(e,n,r,i,o){var A=[],a=Array.isArray(n)?"array":$e(n);Bt.required(e,n,i,A,o,a),r(A)},FM=function(e,n,r,i,o){var A=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(vn(n,"string")&&!e.required)return r();Bt.required(e,n,i,A,o,"string"),vn(n,"string")||(Bt.type(e,n,i,A,o),Bt.range(e,n,i,A,o),Bt.pattern(e,n,i,A,o),e.whitespace===!0&&Bt.whitespace(e,n,i,A,o))}r(A)},ec=function(e,n,r,i,o){var A=e.type,a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(vn(n,A)&&!e.required)return r();Bt.required(e,n,i,a,o,A),vn(n,A)||Bt.type(e,n,i,a,o)}r(a)};const VA={string:FM,method:xM,number:TM,boolean:wM,regexp:DM,integer:RM,float:MM,array:yM,object:BM,enum:bM,pattern:OM,date:SM,url:ec,hex:ec,email:ec,required:NM,any:EM};var _A=function(){function t(e){fn(this,t),Q(this,"rules",null),Q(this,"_messages",ed),this.define(e)}return hn(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if($e(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var o=n[i];r.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=Op($u(),n)),this._messages}},{key:"validate",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},A=n,a=i,s=o;if(typeof a=="function"&&(s=a,a={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,A),Promise.resolve(A);function l(V){var v=[],m={};function C(S){if(Array.isArray(S)){var M;v=(M=v).concat.apply(M,be(S))}else v.push(S)}for(var w=0;w<V.length;w++)C(V[w]);v.length?(m=nd(v),s(v,m)):s(null,A)}if(a.messages){var u=this.messages();u===ed&&(u=$u()),Op(u,a.messages),a.messages=u}else a.messages=this.messages();var d={},g=a.keys||Object.keys(this.rules);g.forEach(function(V){var v=r.rules[V],m=A[V];v.forEach(function(C){var w=C;typeof w.transform=="function"&&(A===n&&(A=U({},A)),m=A[V]=w.transform(m),m!=null&&(w.type=w.type||(Array.isArray(m)?"array":$e(m)))),typeof w=="function"?w={validator:w}:w=U({},w),w.validator=r.getValidationMethod(w),w.validator&&(w.field=V,w.fullField=w.fullField||V,w.type=r.getType(w),d[V]=d[V]||[],d[V].push({rule:w,value:m,source:A,field:V}))})});var p={};return gM(d,a,function(V,v){var m=V.rule,C=(m.type==="object"||m.type==="array")&&($e(m.fields)==="object"||$e(m.defaultField)==="object");C=C&&(m.required||!m.required&&V.value),m.field=V.field;function w(R,q){return U(U({},q),{},{fullField:"".concat(m.fullField,".").concat(R),fullFields:m.fullFields?[].concat(be(m.fullFields),[R]):[R]})}function S(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],q=Array.isArray(R)?R:[R];!a.suppressWarning&&q.length&&t.warning("async-validator:",q),q.length&&m.message!==void 0&&(q=[].concat(m.message));var E=q.map(Bp(m,A));if(a.first&&E.length)return p[m.field]=1,v(E);if(!C)v(E);else{if(m.required&&!V.value)return m.message!==void 0?E=[].concat(m.message).map(Bp(m,A)):a.error&&(E=[a.error(m,ar(a.messages.required,m.field))]),v(E);var h={};m.defaultField&&Object.keys(V.value).map(function(b){h[b]=m.defaultField}),h=U(U({},h),V.rule.fields);var y={};Object.keys(h).forEach(function(b){var B=h[b],O=Array.isArray(B)?B:[B];y[b]=O.map(w.bind(null,b))});var x=new t(y);x.messages(a.messages),V.rule.options&&(V.rule.options.messages=a.messages,V.rule.options.error=a.error),x.validate(V.value,V.rule.options||a,function(b){var B=[];E&&E.length&&B.push.apply(B,be(E)),b&&b.length&&B.push.apply(B,be(b)),v(B.length?B:null)})}}var M;if(m.asyncValidator)M=m.asyncValidator(m,V.value,S,V.source,a);else if(m.validator){try{M=m.validator(m,V.value,S,V.source,a)}catch(R){var I,f;(I=(f=console).error)===null||I===void 0||I.call(f,R),a.suppressValidatorError||setTimeout(function(){throw R},0),S(R.message)}M===!0?S():M===!1?S(typeof m.message=="function"?m.message(m.fullField||m.field):m.message||"".concat(m.fullField||m.field," fails")):M instanceof Array?S(M):M instanceof Error&&S(M.message)}M&&M.then&&M.then(function(){return S()},function(R){return S(R)})},function(V){l(V)},A)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!VA.hasOwnProperty(n.type))throw new Error(ar("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),i=r.indexOf("message");return i!==-1&&r.splice(i,1),r.length===1&&r[0]==="required"?VA.required:VA[this.getType(n)]||void 0}}]),t}();Q(_A,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");VA[e]=n});Q(_A,"warning",Dv);Q(_A,"messages",ed);Q(_A,"validators",VA);var rr="'${name}' is not a valid ${type}",Fv={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:rr,method:rr,array:rr,object:rr,number:rr,date:rr,boolean:rr,integer:rr,float:rr,regexp:rr,email:rr,url:rr,hex:rr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Np=_A;function QM(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return e[r]})}var Fp="CODE_LOGIC_ERROR";function rd(t,e,n,r,i){return id.apply(this,arguments)}function id(){return id=ao(kn().mark(function t(e,n,r,i,o){var A,a,s,l,u,d,g,p,V;return kn().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return A=U({},r),delete A.ruleIndex,Np.warning=function(){},A.validator&&(a=A.validator,A.validator=function(){try{return a.apply(void 0,arguments)}catch(C){return console.error(C),Promise.reject(Fp)}}),s=null,A&&A.type==="array"&&A.defaultField&&(s=A.defaultField,delete A.defaultField),l=new Np(Q({},e,[A])),u=Eo(Fv,i.validateMessages),l.messages(u),d=[],m.prev=10,m.next=13,Promise.resolve(l.validate(Q({},e,n),U({},i)));case 13:m.next=18;break;case 15:m.prev=15,m.t0=m.catch(10),m.t0.errors&&(d=m.t0.errors.map(function(C,w){var S=C.message,M=S===Fp?u.default:S;return c.isValidElement(M)?c.cloneElement(M,{key:"error_".concat(w)}):M}));case 18:if(!(!d.length&&s)){m.next=23;break}return m.next=21,Promise.all(n.map(function(C,w){return rd("".concat(e,".").concat(w),C,s,i,o)}));case 21:return g=m.sent,m.abrupt("return",g.reduce(function(C,w){return[].concat(be(C),be(w))},[]));case 23:return p=U(U({},r),{},{name:e,enum:(r.enum||[]).join(", ")},o),V=d.map(function(C){return typeof C=="string"?QM(C,p):C}),m.abrupt("return",V);case 26:case"end":return m.stop()}},t,null,[[10,15]])})),id.apply(this,arguments)}function kM(t,e,n,r,i,o){var A=t.join("."),a=n.map(function(u,d){var g=u.validator,p=U(U({},u),{},{ruleIndex:d});return g&&(p.validator=function(V,v,m){var C=!1,w=function(){for(var I=arguments.length,f=new Array(I),R=0;R<I;R++)f[R]=arguments[R];Promise.resolve().then(function(){Ct(!C,"Your validator function has already return a promise. `callback` will be ignored."),C||m.apply(void 0,f)})},S=g(V,v,w);C=S&&typeof S.then=="function"&&typeof S.catch=="function",Ct(C,"`callback` is deprecated. Please return a promise instead."),C&&S.then(function(){m()}).catch(function(M){m(M||" ")})}),p}).sort(function(u,d){var g=u.warningOnly,p=u.ruleIndex,V=d.warningOnly,v=d.ruleIndex;return!!g==!!V?p-v:g?1:-1}),s;if(i===!0)s=new Promise(function(){var u=ao(kn().mark(function d(g,p){var V,v,m;return kn().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:V=0;case 1:if(!(V<a.length)){w.next=12;break}return v=a[V],w.next=5,rd(A,e,v,r,o);case 5:if(m=w.sent,!m.length){w.next=9;break}return p([{errors:m,rule:v}]),w.abrupt("return");case 9:V+=1,w.next=1;break;case 12:g([]);case 13:case"end":return w.stop()}},d)}));return function(d,g){return u.apply(this,arguments)}}());else{var l=a.map(function(u){return rd(A,e,u,r,o).then(function(d){return{errors:d,rule:u}})});s=(i?GM(l):UM(l)).then(function(u){return Promise.reject(u)})}return s.catch(function(u){return u}),s}function UM(t){return od.apply(this,arguments)}function od(){return od=ao(kn().mark(function t(e){return kn().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(e).then(function(i){var o,A=(o=[]).concat.apply(o,be(i));return A}));case 1:case"end":return r.stop()}},t)})),od.apply(this,arguments)}function GM(t){return Ad.apply(this,arguments)}function Ad(){return Ad=ao(kn().mark(function t(e){var n;return kn().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=0,i.abrupt("return",new Promise(function(o){e.forEach(function(A){A.then(function(a){a.errors.length&&o([a]),n+=1,n===e.length&&o([])})})}));case 2:case"end":return i.stop()}},t)})),Ad.apply(this,arguments)}function cn(t){return _u(t)}function Qp(t,e){var n={};return e.forEach(function(r){var i=Kr(t,r);n=Mr(n,r,i)}),n}function Ro(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return Qv(e,r,n)})}function Qv(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(r,i){return t[i]===r})}function jM(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||$e(t)!=="object"||$e(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),i=new Set([].concat(n,r));return be(i).every(function(o){var A=t[o],a=e[o];return typeof A=="function"&&typeof a=="function"?!0:A===a})}function PM(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&$e(e.target)==="object"&&t in e.target?e.target[t]:e}function kp(t,e,n){var r=t.length;if(e<0||e>=r||n<0||n>=r)return t;var i=t[e],o=e-n;return o>0?[].concat(be(t.slice(0,n)),[i],be(t.slice(n,e)),be(t.slice(e+1,r))):o<0?[].concat(be(t.slice(0,e)),be(t.slice(e+1,n+1)),[i],be(t.slice(n+1,r))):t}var LM=["name"],mr=[];function tc(t,e,n,r,i,o){return typeof t=="function"?t(e,n,"source"in o?{source:o.source}:{}):r!==i}var ag=function(t){di(n,t);var e=gi(n);function n(r){var i;if(fn(this,n),i=e.call(this,r),Q(Rt(i),"state",{resetCount:0}),Q(Rt(i),"cancelRegisterFunc",null),Q(Rt(i),"mounted",!1),Q(Rt(i),"touched",!1),Q(Rt(i),"dirty",!1),Q(Rt(i),"validatePromise",void 0),Q(Rt(i),"prevValidating",void 0),Q(Rt(i),"errors",mr),Q(Rt(i),"warnings",mr),Q(Rt(i),"cancelRegister",function(){var s=i.props,l=s.preserve,u=s.isListField,d=s.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(u,l,cn(d)),i.cancelRegisterFunc=null}),Q(Rt(i),"getNamePath",function(){var s=i.props,l=s.name,u=s.fieldContext,d=u.prefixName,g=d===void 0?[]:d;return l!==void 0?[].concat(be(g),be(l)):[]}),Q(Rt(i),"getRules",function(){var s=i.props,l=s.rules,u=l===void 0?[]:l,d=s.fieldContext;return u.map(function(g){return typeof g=="function"?g(d):g})}),Q(Rt(i),"refresh",function(){i.mounted&&i.setState(function(s){var l=s.resetCount;return{resetCount:l+1}})}),Q(Rt(i),"metaCache",null),Q(Rt(i),"triggerMetaEvent",function(s){var l=i.props.onMetaChange;if(l){var u=U(U({},i.getMeta()),{},{destroy:s});yA(i.metaCache,u)||l(u),i.metaCache=u}else i.metaCache=null}),Q(Rt(i),"onStoreChange",function(s,l,u){var d=i.props,g=d.shouldUpdate,p=d.dependencies,V=p===void 0?[]:p,v=d.onReset,m=u.store,C=i.getNamePath(),w=i.getValue(s),S=i.getValue(m),M=l&&Ro(l,C);switch(u.type==="valueUpdate"&&u.source==="external"&&!yA(w,S)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=mr,i.warnings=mr,i.triggerMetaEvent()),u.type){case"reset":if(!l||M){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=mr,i.warnings=mr,i.triggerMetaEvent(),v==null||v(),i.refresh();return}break;case"remove":{if(g&&tc(g,s,m,w,S,u)){i.reRender();return}break}case"setField":{var I=u.data;if(M){"touched"in I&&(i.touched=I.touched),"validating"in I&&!("originRCField"in I)&&(i.validatePromise=I.validating?Promise.resolve([]):null),"errors"in I&&(i.errors=I.errors||mr),"warnings"in I&&(i.warnings=I.warnings||mr),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in I&&Ro(l,C,!0)){i.reRender();return}if(g&&!C.length&&tc(g,s,m,w,S,u)){i.reRender();return}break}case"dependenciesUpdate":{var f=V.map(cn);if(f.some(function(R){return Ro(u.relatedFields,R)})){i.reRender();return}break}default:if(M||(!V.length||C.length||g)&&tc(g,s,m,w,S,u)){i.reRender();return}break}g===!0&&i.reRender()}),Q(Rt(i),"validateRules",function(s){var l=i.getNamePath(),u=i.getValue(),d=s||{},g=d.triggerName,p=d.validateOnly,V=p===void 0?!1:p,v=Promise.resolve().then(ao(kn().mark(function m(){var C,w,S,M,I,f,R;return kn().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(i.mounted){E.next=2;break}return E.abrupt("return",[]);case 2:if(C=i.props,w=C.validateFirst,S=w===void 0?!1:w,M=C.messageVariables,I=C.validateDebounce,f=i.getRules(),g&&(f=f.filter(function(h){return h}).filter(function(h){var y=h.validateTrigger;if(!y)return!0;var x=_u(y);return x.includes(g)})),!(I&&g)){E.next=10;break}return E.next=8,new Promise(function(h){setTimeout(h,I)});case 8:if(i.validatePromise===v){E.next=10;break}return E.abrupt("return",[]);case 10:return R=kM(l,u,f,s,S,M),R.catch(function(h){return h}).then(function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mr;if(i.validatePromise===v){var y;i.validatePromise=null;var x=[],b=[];(y=h.forEach)===null||y===void 0||y.call(h,function(B){var O=B.rule.warningOnly,N=B.errors,F=N===void 0?mr:N;O?b.push.apply(b,be(F)):x.push.apply(x,be(F))}),i.errors=x,i.warnings=b,i.triggerMetaEvent(),i.reRender()}}),E.abrupt("return",R);case 13:case"end":return E.stop()}},m)})));return V||(i.validatePromise=v,i.dirty=!0,i.errors=mr,i.warnings=mr,i.triggerMetaEvent(),i.reRender()),v}),Q(Rt(i),"isFieldValidating",function(){return!!i.validatePromise}),Q(Rt(i),"isFieldTouched",function(){return i.touched}),Q(Rt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var s=i.props.fieldContext,l=s.getInternalHooks(Zi),u=l.getInitialValue;return u(i.getNamePath())!==void 0}),Q(Rt(i),"getErrors",function(){return i.errors}),Q(Rt(i),"getWarnings",function(){return i.warnings}),Q(Rt(i),"isListField",function(){return i.props.isListField}),Q(Rt(i),"isList",function(){return i.props.isList}),Q(Rt(i),"isPreserve",function(){return i.props.preserve}),Q(Rt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var s={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return s}),Q(Rt(i),"getOnlyChild",function(s){if(typeof s=="function"){var l=i.getMeta();return U(U({},i.getOnlyChild(s(i.getControlled(),l,i.props.fieldContext))),{},{isFunction:!0})}var u=Nr(s);return u.length!==1||!c.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),Q(Rt(i),"getValue",function(s){var l=i.props.fieldContext.getFieldsValue,u=i.getNamePath();return Kr(s||l(!0),u)}),Q(Rt(i),"getControlled",function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=i.props,u=l.name,d=l.trigger,g=l.validateTrigger,p=l.getValueFromEvent,V=l.normalize,v=l.valuePropName,m=l.getValueProps,C=l.fieldContext,w=g!==void 0?g:C.validateTrigger,S=i.getNamePath(),M=C.getInternalHooks,I=C.getFieldsValue,f=M(Zi),R=f.dispatch,q=i.getValue(),E=m||function(B){return Q({},v,B)},h=s[d],y=u!==void 0?E(q):{};process.env.NODE_ENV!=="production"&&y&&Object.keys(y).forEach(function(B){Ct(typeof y[B]!="function","It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(B,")"))});var x=U(U({},s),y);x[d]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var B,O=arguments.length,N=new Array(O),F=0;F<O;F++)N[F]=arguments[F];p?B=p.apply(void 0,N):B=PM.apply(void 0,[v].concat(N)),V&&(B=V(B,q,I(!0))),B!==q&&R({type:"updateValue",namePath:S,value:B}),h&&h.apply(void 0,N)};var b=_u(w||[]);return b.forEach(function(B){var O=x[B];x[B]=function(){O&&O.apply(void 0,arguments);var N=i.props.rules;N&&N.length&&R({type:"validateField",namePath:S,triggerName:B})}}),x}),r.fieldContext){var o=r.fieldContext.getInternalHooks,A=o(Zi),a=A.initEntityValue;a(Rt(i))}return i}return hn(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,A=i.fieldContext;if(this.mounted=!0,A){var a=A.getInternalHooks,s=a(Zi),l=s.registerField;this.cancelRegisterFunc=l(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,o=this.props.children,A=this.getOnlyChild(o),a=A.child,s=A.isFunction,l;return s?l=a:c.isValidElement(a)?l=c.cloneElement(a,this.getControlled(a.props)):(Ct(!a,"`children` of Field is not validate ReactElement."),l=a),c.createElement(c.Fragment,{key:i},l)}}]),n}(c.Component);Q(ag,"contextType",Lo);Q(ag,"defaultProps",{trigger:"onChange",valuePropName:"value"});function kv(t){var e,n=t.name,r=qt(t,LM),i=c.useContext(Lo),o=c.useContext(ms),A=n!==void 0?cn(n):void 0,a=(e=r.isListField)!==null&&e!==void 0?e:!!o,s="keep";return a||(s="_".concat((A||[]).join("_"))),process.env.NODE_ENV!=="production"&&r.preserve===!1&&a&&A.length<=1&&Ct(!1,"`preserve` should not apply on Form.List fields."),c.createElement(ag,Fe({key:s,name:A,isListField:a},r,{fieldContext:i}))}function YM(t){var e=t.name,n=t.initialValue,r=t.children,i=t.rules,o=t.validateTrigger,A=t.isListField,a=c.useContext(Lo),s=c.useContext(ms),l=c.useRef({keys:[],id:0}),u=l.current,d=c.useMemo(function(){var v=cn(a.prefixName)||[];return[].concat(be(v),be(cn(e)))},[a.prefixName,e]),g=c.useMemo(function(){return U(U({},a),{},{prefixName:d})},[a,d]),p=c.useMemo(function(){return{getKey:function(m){var C=d.length,w=m[C];return[u.keys[w],m.slice(C+1)]}}},[d]);if(typeof r!="function")return Ct(!1,"Form.List only accepts function as children."),null;var V=function(m,C,w){var S=w.source;return S==="internal"?!1:m!==C};return c.createElement(ms.Provider,{value:p},c.createElement(Lo.Provider,{value:g},c.createElement(kv,{name:[],shouldUpdate:V,rules:i,validateTrigger:o,initialValue:n,isList:!0,isListField:A??!!s},function(v,m){var C=v.value,w=C===void 0?[]:C,S=v.onChange,M=a.getFieldValue,I=function(){var E=M(d||[]);return E||[]},f={add:function(E,h){var y=I();h>=0&&h<=y.length?(u.keys=[].concat(be(u.keys.slice(0,h)),[u.id],be(u.keys.slice(h))),S([].concat(be(y.slice(0,h)),[E],be(y.slice(h))))):(process.env.NODE_ENV!=="production"&&(h<0||h>y.length)&&Ct(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(be(u.keys),[u.id]),S([].concat(be(y),[E]))),u.id+=1},remove:function(E){var h=I(),y=new Set(Array.isArray(E)?E:[E]);y.size<=0||(u.keys=u.keys.filter(function(x,b){return!y.has(b)}),S(h.filter(function(x,b){return!y.has(b)})))},move:function(E,h){if(E!==h){var y=I();E<0||E>=y.length||h<0||h>=y.length||(u.keys=kp(u.keys,E,h),S(kp(y,E,h)))}}},R=w||[];return Array.isArray(R)||(R=[],process.env.NODE_ENV!=="production"&&Ct(!1,"Current value of '".concat(d.join(" > "),"' is not an array type."))),r(R.map(function(q,E){var h=u.keys[E];return h===void 0&&(u.keys[E]=u.id,h=u.keys[E],u.id+=1),{name:E,key:h,isListField:!0}}),f,m)})))}function HM(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(i,o){t.forEach(function(A,a){A.catch(function(s){return e=!0,s}).then(function(s){n-=1,r[a]=s,!(n>0)&&(e&&o(r),i(r))})})}):Promise.resolve([])}var Uv="__@field_split__";function nc(t){return t.map(function(e){return"".concat($e(e),":").concat(e)}).join(Uv)}var fo=function(){function t(){fn(this,t),Q(this,"kvs",new Map)}return hn(t,[{key:"set",value:function(n,r){this.kvs.set(nc(n),r)}},{key:"get",value:function(n){return this.kvs.get(nc(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(nc(n))}},{key:"map",value:function(n){return be(this.kvs.entries()).map(function(r){var i=$(r,2),o=i[0],A=i[1],a=o.split(Uv);return n({key:a.map(function(s){var l=s.match(/^([^:]*):(.*)$/),u=$(l,3),d=u[1],g=u[2];return d==="number"?Number(g):g}),value:A})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),t}(),KM=["name"],ZM=hn(function t(e){var n=this;fn(this,t),Q(this,"formHooked",!1),Q(this,"forceRootUpdate",void 0),Q(this,"subscribable",!0),Q(this,"store",{}),Q(this,"fieldEntities",[]),Q(this,"initialValues",{}),Q(this,"callbacks",{}),Q(this,"validateMessages",null),Q(this,"preserve",null),Q(this,"lastValidatePromise",null),Q(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),Q(this,"getInternalHooks",function(r){return r===Zi?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Ct(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),Q(this,"useSubscribe",function(r){n.subscribable=r}),Q(this,"prevWithoutPreserves",null),Q(this,"setInitialValues",function(r,i){if(n.initialValues=r||{},i){var o,A=Eo(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(a){var s=a.key;A=Mr(A,s,Kr(r,s))}),n.prevWithoutPreserves=null,n.updateStore(A)}}),Q(this,"destroyForm",function(r){if(r)n.updateStore({});else{var i=new fo;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=i}}),Q(this,"getInitialValue",function(r){var i=Kr(n.initialValues,r);return r.length?Eo(i):i}),Q(this,"setCallbacks",function(r){n.callbacks=r}),Q(this,"setValidateMessages",function(r){n.validateMessages=r}),Q(this,"setPreserve",function(r){n.preserve=r}),Q(this,"watchList",[]),Q(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}}),Q(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(A){A(i,o,r)})}}),Q(this,"timeoutId",null),Q(this,"warningUnhooked",function(){process.env.NODE_ENV!=="production"&&!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||Ct(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),Q(this,"updateStore",function(r){n.store=r}),Q(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities}),Q(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new fo;return n.getFieldEntities(r).forEach(function(o){var A=o.getNamePath();i.set(A,o)}),i}),Q(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var A=cn(o);return i.get(A)||{INVALIDATE_NAME_PATH:cn(o)}})}),Q(this,"getFieldsValue",function(r,i){n.warningUnhooked();var o,A,a;if(r===!0||Array.isArray(r)?(o=r,A=i):r&&$e(r)==="object"&&(a=r.strict,A=r.filter),o===!0&&!A)return n.store;var s=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),l=[];return s.forEach(function(u){var d,g,p="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(a){var V,v;if((V=(v=u).isList)!==null&&V!==void 0&&V.call(v))return}else if(!o&&(d=(g=u).isListField)!==null&&d!==void 0&&d.call(g))return;if(!A)l.push(p);else{var m="getMeta"in u?u.getMeta():null;A(m)&&l.push(p)}}),Qp(n.store,l.map(cn))}),Q(this,"getFieldValue",function(r){n.warningUnhooked();var i=cn(r);return Kr(n.store,i)}),Q(this,"getFieldsError",function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,A){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:cn(r[A]),errors:[],warnings:[]}})}),Q(this,"getFieldError",function(r){n.warningUnhooked();var i=cn(r),o=n.getFieldsError([i])[0];return o.errors}),Q(this,"getFieldWarning",function(r){n.warningUnhooked();var i=cn(r),o=n.getFieldsError([i])[0];return o.warnings}),Q(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var A=i[0],a=i[1],s,l=!1;i.length===0?s=null:i.length===1?Array.isArray(A)?(s=A.map(cn),l=!1):(s=null,l=A):(s=A.map(cn),l=a);var u=n.getFieldEntities(!0),d=function(m){return m.isFieldTouched()};if(!s)return l?u.every(function(v){return d(v)||v.isList()}):u.some(d);var g=new fo;s.forEach(function(v){g.set(v,[])}),u.forEach(function(v){var m=v.getNamePath();s.forEach(function(C){C.every(function(w,S){return m[S]===w})&&g.update(C,function(w){return[].concat(be(w),[v])})})});var p=function(m){return m.some(d)},V=g.map(function(v){var m=v.value;return m});return l?V.every(p):V.some(p)}),Q(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),Q(this,"isFieldsValidating",function(r){n.warningUnhooked();var i=n.getFieldEntities();if(!r)return i.some(function(A){return A.isFieldValidating()});var o=r.map(cn);return i.some(function(A){var a=A.getNamePath();return Ro(o,a)&&A.isFieldValidating()})}),Q(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),Q(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new fo,o=n.getFieldEntities(!0);o.forEach(function(s){var l=s.props.initialValue,u=s.getNamePath();if(l!==void 0){var d=i.get(u)||new Set;d.add({entity:s,value:l}),i.set(u,d)}});var A=function(l){l.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var g=u.getNamePath(),p=n.getInitialValue(g);if(p!==void 0)Ct(!1,"Form already set 'initialValues' with path '".concat(g.join("."),"'. Field can not overwrite it."));else{var V=i.get(g);if(V&&V.size>1)Ct(!1,"Multiple Field with path '".concat(g.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(V){var v=n.getFieldValue(g),m=u.isListField();!m&&(!r.skipExist||v===void 0)&&n.updateStore(Mr(n.store,g,be(V)[0].value))}}}})},a;r.entities?a=r.entities:r.namePathList?(a=[],r.namePathList.forEach(function(s){var l=i.get(s);if(l){var u;(u=a).push.apply(u,be(be(l).map(function(d){return d.entity})))}})):a=o,A(a)}),Q(this,"resetFields",function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Eo(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(cn);o.forEach(function(A){var a=n.getInitialValue(A);n.updateStore(Mr(n.store,A,a))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)}),Q(this,"setFields",function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(A){var a=A.name,s=qt(A,KM),l=cn(a);o.push(l),"value"in s&&n.updateStore(Mr(n.store,l,s.value)),n.notifyObservers(i,[l],{type:"setField",data:A})}),n.notifyWatch(o)}),Q(this,"getFields",function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var A=o.getNamePath(),a=o.getMeta(),s=U(U({},a),{},{name:A,value:n.getFieldValue(A)});return Object.defineProperty(s,"originRCField",{value:!0}),s});return i}),Q(this,"initEntityValue",function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),A=Kr(n.store,o);A===void 0&&n.updateStore(Mr(n.store,o,i))}}),Q(this,"isMergedPreserve",function(r){var i=r!==void 0?r:n.preserve;return i??!0}),Q(this,"registerField",function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(A,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(a)&&(!A||s.length>1)){var l=A?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==l&&n.fieldEntities.every(function(d){return!Qv(d.getNamePath(),i)})){var u=n.store;n.updateStore(Mr(u,i,l,!0)),n.notifyObservers(u,[i],{type:"remove"}),n.triggerDependenciesUpdate(u,i)}}n.notifyWatch([i])}}),Q(this,"dispatch",function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var A=r.namePath,a=r.triggerName;n.validateFields([A],{triggerName:a});break}}}),Q(this,"notifyObservers",function(r,i,o){if(n.subscribable){var A=U(U({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(a){var s=a.onStoreChange;s(r,i,A)})}else n.forceRootUpdate()}),Q(this,"triggerDependenciesUpdate",function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat(be(o))}),o}),Q(this,"updateValue",function(r,i){var o=cn(r),A=n.store;n.updateStore(Mr(n.store,o,i)),n.notifyObservers(A,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var a=n.triggerDependenciesUpdate(A,o),s=n.callbacks.onValuesChange;if(s){var l=Qp(n.store,[o]);s(l,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(be(a)))}),Q(this,"setFieldsValue",function(r){n.warningUnhooked();var i=n.store;if(r){var o=Eo(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),Q(this,"setFieldValue",function(r,i){n.setFields([{name:r,value:i,errors:[],warnings:[]}])}),Q(this,"getDependencyChildrenFields",function(r){var i=new Set,o=[],A=new fo;n.getFieldEntities().forEach(function(s){var l=s.props.dependencies;(l||[]).forEach(function(u){var d=cn(u);A.update(d,function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return g.add(s),g})})});var a=function s(l){var u=A.get(l)||new Set;u.forEach(function(d){if(!i.has(d)){i.add(d);var g=d.getNamePath();d.isFieldDirty()&&g.length&&(o.push(g),s(g))}})};return a(r),o}),Q(this,"triggerOnFieldsChange",function(r,i){var o=n.callbacks.onFieldsChange;if(o){var A=n.getFields();if(i){var a=new fo;i.forEach(function(l){var u=l.name,d=l.errors;a.set(u,d)}),A.forEach(function(l){l.errors=a.get(l.name)||l.errors})}var s=A.filter(function(l){var u=l.name;return Ro(r,u)});s.length&&o(s,A)}}),Q(this,"validateFields",function(r,i){n.warningUnhooked();var o,A;Array.isArray(r)||typeof r=="string"||typeof i=="string"?(o=r,A=i):A=r;var a=!!o,s=a?o.map(cn):[],l=[],u=String(Date.now()),d=new Set,g=A||{},p=g.recursive,V=g.dirty;n.getFieldEntities(!0).forEach(function(w){if(a||s.push(w.getNamePath()),!(!w.props.rules||!w.props.rules.length)&&!(V&&!w.isFieldDirty())){var S=w.getNamePath();if(d.add(S.join(u)),!a||Ro(s,S,p)){var M=w.validateRules(U({validateMessages:U(U({},Fv),n.validateMessages)},A));l.push(M.then(function(){return{name:S,errors:[],warnings:[]}}).catch(function(I){var f,R=[],q=[];return(f=I.forEach)===null||f===void 0||f.call(I,function(E){var h=E.rule.warningOnly,y=E.errors;h?q.push.apply(q,be(y)):R.push.apply(R,be(y))}),R.length?Promise.reject({name:S,errors:R,warnings:q}):{name:S,errors:R,warnings:q}}))}}});var v=HM(l);n.lastValidatePromise=v,v.catch(function(w){return w}).then(function(w){var S=w.map(function(M){var I=M.name;return I});n.notifyObservers(n.store,S,{type:"validateFinish"}),n.triggerOnFieldsChange(S,w)});var m=v.then(function(){return n.lastValidatePromise===v?Promise.resolve(n.getFieldsValue(s)):Promise.reject([])}).catch(function(w){var S=w.filter(function(M){return M&&M.errors.length});return Promise.reject({values:n.getFieldsValue(s),errorFields:S,outOfDate:n.lastValidatePromise!==v})});m.catch(function(w){return w});var C=s.filter(function(w){return d.has(w.join(u))});return n.triggerOnFieldsChange(C),m}),Q(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})}),this.forceRootUpdate=e});function Gv(t){var e=c.useRef(),n=c.useState({}),r=$(n,2),i=r[1];if(!e.current)if(t)e.current=t;else{var o=function(){i({})},A=new ZM(o);e.current=A.getForm()}return[e.current]}var ad=c.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),zM=function(e){var n=e.validateMessages,r=e.onFormChange,i=e.onFormFinish,o=e.children,A=c.useContext(ad),a=c.useRef({});return c.createElement(ad.Provider,{value:U(U({},A),{},{validateMessages:U(U({},A.validateMessages),n),triggerFormChange:function(l,u){r&&r(l,{changedFields:u,forms:a.current}),A.triggerFormChange(l,u)},triggerFormFinish:function(l,u){i&&i(l,{values:u,forms:a.current}),A.triggerFormFinish(l,u)},registerForm:function(l,u){l&&(a.current=U(U({},a.current),{},Q({},l,u))),A.registerForm(l,u)},unregisterForm:function(l){var u=U({},a.current);delete u[l],a.current=u,A.unregisterForm(l)}})},o)},JM=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],WM=function(e,n){var r=e.name,i=e.initialValues,o=e.fields,A=e.form,a=e.preserve,s=e.children,l=e.component,u=l===void 0?"form":l,d=e.validateMessages,g=e.validateTrigger,p=g===void 0?"onChange":g,V=e.onValuesChange,v=e.onFieldsChange,m=e.onFinish,C=e.onFinishFailed,w=e.clearOnDestroy,S=qt(e,JM),M=c.useRef(null),I=c.useContext(ad),f=Gv(A),R=$(f,1),q=R[0],E=q.getInternalHooks(Zi),h=E.useSubscribe,y=E.setInitialValues,x=E.setCallbacks,b=E.setValidateMessages,B=E.setPreserve,O=E.destroyForm;c.useImperativeHandle(n,function(){return U(U({},q),{},{nativeElement:M.current})}),c.useEffect(function(){return I.registerForm(r,q),function(){I.unregisterForm(r)}},[I,q,r]),b(U(U({},I.validateMessages),d)),x({onValuesChange:V,onFieldsChange:function(K){if(I.triggerFormChange(r,K),v){for(var W=arguments.length,z=new Array(W>1?W-1:0),te=1;te<W;te++)z[te-1]=arguments[te];v.apply(void 0,[K].concat(z))}},onFinish:function(K){I.triggerFormFinish(r,K),m&&m(K)},onFinishFailed:C}),B(a);var N=c.useRef(null);y(i,!N.current),N.current||(N.current=!0),c.useEffect(function(){return function(){return O(w)}},[]);var F,j=typeof s=="function";if(j){var Y=q.getFieldsValue(!0);F=s(Y,q)}else F=s;h(!j);var H=c.useRef();c.useEffect(function(){jM(H.current||[],o||[])||q.setFields(o||[]),H.current=o},[o,q]);var L=c.useMemo(function(){return U(U({},q),{},{validateTrigger:p})},[q,p]),G=c.createElement(ms.Provider,{value:null},c.createElement(Lo.Provider,{value:L},F));return u===!1?G:c.createElement(u,Fe({},S,{ref:M,onSubmit:function(K){K.preventDefault(),K.stopPropagation(),q.submit()},onReset:function(K){var W;K.preventDefault(),q.resetFields(),(W=S.onReset)===null||W===void 0||W.call(S,K)}}),G)};function Up(t){try{return JSON.stringify(t)}catch{return Math.random()}}var XM=process.env.NODE_ENV!=="production"?function(t){var e=t.join("__RC_FIELD_FORM_SPLIT__"),n=T.useRef(e);Ct(n.current===e,"`useWatch` is not support dynamic `namePath`. Please provide static instead.")}:function(){};function _M(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=i===void 0?{}:i,A=AM(o)?{form:o}:o,a=A.form,s=T.useState(),l=$(s,2),u=l[0],d=l[1],g=T.useMemo(function(){return Up(u)},[u]),p=T.useRef(g);p.current=g;var V=T.useContext(Lo),v=a||V,m=v&&v._init;process.env.NODE_ENV!=="production"&&Ct(e.length===2?a?m:!0:m,"useWatch requires a form instance since it can not auto detect from context.");var C=cn(r),w=T.useRef(C);return w.current=C,XM(C),T.useEffect(function(){if(m){var S=v.getFieldsValue,M=v.getInternalHooks,I=M(Zi),f=I.registerWatch,R=function(y,x){var b=A.preserve?x:y;return typeof r=="function"?r(b):Kr(b,w.current)},q=f(function(h,y){var x=R(h,y),b=Up(x);p.current!==b&&(p.current=b,d(x))}),E=R(S(),S(!0));return u!==E&&d(E),q}},[m]),u}var $M=c.forwardRef(WM),$A=$M;$A.FormProvider=zM;$A.Field=kv;$A.List=YM;$A.useForm=Gv;$A.useWatch=_M;function $n(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(r){delete n[r]}),n}const Fr=c.createContext({});process.env.NODE_ENV!=="production"&&(Fr.displayName="FormItemInputContext");const e4=t=>{let{children:e,status:n,override:r}=t;const i=c.useContext(Fr),o=c.useMemo(()=>{const A=Object.assign({},i);return r&&delete A.isFormItemInput,n&&(delete A.status,delete A.hasFeedback,delete A.feedbackIcon),A},[n,r,i]);return c.createElement(Fr.Provider,{value:o},e)},t4=c.createContext(void 0);var n4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const r4=(t,e)=>{var n,r;const i=c.useContext(Mv),o=c.useContext(Rv),{getPrefixCls:A,direction:a,radio:s}=c.useContext(Qt),l=c.useRef(null),u=kr(e,l),{isFormItemInput:d}=c.useContext(Fr);if(process.env.NODE_ENV!=="production"){const N=an("Radio");process.env.NODE_ENV!=="production"&&N(!("optionType"in t),"usage","`optionType` is only support in Radio.Group.")}const g=N=>{var F,j;(F=t.onChange)===null||F===void 0||F.call(t,N),(j=i==null?void 0:i.onChange)===null||j===void 0||j.call(i,N)},{prefixCls:p,className:V,rootClassName:v,children:m,style:C,title:w}=t,S=n4(t,["prefixCls","className","rootClassName","children","style","title"]),M=A("radio",p),I=((i==null?void 0:i.optionType)||o)==="button",f=I?`${M}-button`:M,R=Ur(M),[q,E,h]=cv(M,R),y=Object.assign({},S),x=c.useContext(li);i&&(y.name=i.name,y.onChange=g,y.checked=t.value===i.value,y.disabled=(n=y.disabled)!==null&&n!==void 0?n:i.disabled),y.disabled=(r=y.disabled)!==null&&r!==void 0?r:x;const b=se(`${f}-wrapper`,{[`${f}-wrapper-checked`]:y.checked,[`${f}-wrapper-disabled`]:y.disabled,[`${f}-wrapper-rtl`]:a==="rtl",[`${f}-wrapper-in-form-item`]:d,[`${f}-wrapper-block`]:!!(i!=null&&i.block)},s==null?void 0:s.className,V,v,E,h,R),[B,O]=oM(y.onClick);return q(c.createElement(_s,{component:"Radio",disabled:y.disabled},c.createElement("label",{className:b,style:Object.assign(Object.assign({},s==null?void 0:s.style),C),onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,title:w,onClick:B},c.createElement(U2,Object.assign({},y,{className:se(y.className,{[ig]:!I}),type:"radio",prefixCls:f,ref:u,onClick:O})),m!==void 0?c.createElement("span",{className:`${f}-label`},m):null)))},DA=c.forwardRef(r4);process.env.NODE_ENV!=="production"&&(DA.displayName="Radio");function i4(){var t=U({},c);return t.useId}var Gp=0,jp=i4();const $s=jp?function(e){var n=jp();return e||(process.env.NODE_ENV==="test"?"test-id":n)}:function(e){var n=c.useState("ssr-id"),r=$(n,2),i=r[0],o=r[1];return c.useEffect(function(){var A=Gp;Gp+=1,o("rc_unique_".concat(A))},[]),e||(process.env.NODE_ENV==="test"?"test-id":i)},o4=c.forwardRef((t,e)=>{const{getPrefixCls:n,direction:r}=c.useContext(Qt),i=$s(),{prefixCls:o,className:A,rootClassName:a,options:s,buttonStyle:l="outline",disabled:u,children:d,size:g,style:p,id:V,optionType:v,name:m=i,defaultValue:C,value:w,block:S=!1,onChange:M,onMouseEnter:I,onMouseLeave:f,onFocus:R,onBlur:q}=t,[E,h]=Tn(C,{value:w}),y=c.useCallback(G=>{const _=E,K=G.target.value;"value"in t||h(K),K!==_&&(M==null||M(G))},[E,h,M]),x=n("radio",o),b=`${x}-group`,B=Ur(x),[O,N,F]=cv(x,B);let j=d;s&&s.length>0&&(j=s.map(G=>typeof G=="string"||typeof G=="number"?c.createElement(DA,{key:G.toString(),prefixCls:x,disabled:u,value:G,checked:E===G},G):c.createElement(DA,{key:`radio-group-value-options-${G.value}`,prefixCls:x,disabled:G.disabled||u,value:G.value,checked:E===G.value,title:G.title,style:G.style,id:G.id,required:G.required},G.label)));const Y=ki(g),H=se(b,`${b}-${l}`,{[`${b}-${Y}`]:Y,[`${b}-rtl`]:r==="rtl",[`${b}-block`]:S},A,a,N,F,B),L=c.useMemo(()=>({onChange:y,value:E,disabled:u,name:m,optionType:v,block:S}),[y,E,u,m,v,S]);return O(c.createElement("div",Object.assign({},Oi(t,{aria:!0,data:!0}),{className:H,style:p,onMouseEnter:I,onMouseLeave:f,onFocus:R,onBlur:q,id:V,ref:e}),c.createElement(F2,{value:L},j)))}),A4=c.memo(o4);var a4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const s4=(t,e)=>{const{getPrefixCls:n}=c.useContext(Qt),{prefixCls:r}=t,i=a4(t,["prefixCls"]),o=n("radio",r);return c.createElement(Q2,{value:"button"},c.createElement(DA,Object.assign({prefixCls:o},i,{type:"radio",ref:e})))},l4=c.forwardRef(s4),ea=DA;ea.Button=l4;ea.Group=A4;ea.__ANT_RADIO=!0;const c4=t=>{const{getPrefixCls:e,direction:n}=T.useContext(Qt),{prefixCls:r,className:i}=t,o=e("input-group",r),A=e("input"),[a,s]=Vv(A),l=se(o,{[`${o}-lg`]:t.size==="large",[`${o}-sm`]:t.size==="small",[`${o}-compact`]:t.compact,[`${o}-rtl`]:n==="rtl"},s,i),u=T.useContext(Fr),d=T.useMemo(()=>Object.assign(Object.assign({},u),{isFormItemInput:!1}),[u]);return process.env.NODE_ENV!=="production"&&an("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),a(c.createElement("span",{className:l,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},c.createElement(Fr.Provider,{value:d},t.children)))};function u4(t){return!!(t.addonBefore||t.addonAfter)}function d4(t){return!!(t.prefix||t.suffix||t.allowClear)}function Pp(t,e,n){var r=e.cloneNode(!0),i=Object.create(t,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(r.selectionStart=e.selectionStart,r.selectionEnd=e.selectionEnd),r.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},i}function Vs(t,e,n,r){if(n){var i=e;if(e.type==="click"){i=Pp(e,t,""),n(i);return}if(t.type!=="file"&&r!==void 0){i=Pp(e,t,r),n(i);return}n(i)}}function jv(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var i=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}}var Pv=T.forwardRef(function(t,e){var n,r,i,o=t.inputElement,A=t.children,a=t.prefixCls,s=t.prefix,l=t.suffix,u=t.addonBefore,d=t.addonAfter,g=t.className,p=t.style,V=t.disabled,v=t.readOnly,m=t.focused,C=t.triggerFocus,w=t.allowClear,S=t.value,M=t.handleReset,I=t.hidden,f=t.classes,R=t.classNames,q=t.dataAttrs,E=t.styles,h=t.components,y=t.onClear,x=A??o,b=(h==null?void 0:h.affixWrapper)||"span",B=(h==null?void 0:h.groupWrapper)||"span",O=(h==null?void 0:h.wrapper)||"span",N=(h==null?void 0:h.groupAddon)||"span",F=T.useRef(null),j=function(de){var ce;(ce=F.current)!==null&&ce!==void 0&&ce.contains(de.target)&&(C==null||C())},Y=d4(t),H=T.cloneElement(x,{value:S,className:se((n=x.props)===null||n===void 0?void 0:n.className,!Y&&(R==null?void 0:R.variant))||null}),L=T.useRef(null);if(T.useImperativeHandle(e,function(){return{nativeElement:L.current||F.current}}),Y){var G=null;if(w){var _=!V&&!v&&S,K="".concat(a,"-clear-icon"),W=$e(w)==="object"&&w!==null&&w!==void 0&&w.clearIcon?w.clearIcon:"✖";G=T.createElement("button",{type:"button",tabIndex:-1,onClick:function(de){M==null||M(de),y==null||y()},onMouseDown:function(de){return de.preventDefault()},className:se(K,Q(Q({},"".concat(K,"-hidden"),!_),"".concat(K,"-has-suffix"),!!l))},W)}var z="".concat(a,"-affix-wrapper"),te=se(z,Q(Q(Q(Q(Q({},"".concat(a,"-disabled"),V),"".concat(z,"-disabled"),V),"".concat(z,"-focused"),m),"".concat(z,"-readonly"),v),"".concat(z,"-input-with-clear-btn"),l&&w&&S),f==null?void 0:f.affixWrapper,R==null?void 0:R.affixWrapper,R==null?void 0:R.variant),X=(l||w)&&T.createElement("span",{className:se("".concat(a,"-suffix"),R==null?void 0:R.suffix),style:E==null?void 0:E.suffix},G,l);H=T.createElement(b,Fe({className:te,style:E==null?void 0:E.affixWrapper,onClick:j},q==null?void 0:q.affixWrapper,{ref:F}),s&&T.createElement("span",{className:se("".concat(a,"-prefix"),R==null?void 0:R.prefix),style:E==null?void 0:E.prefix},s),H,X)}if(u4(t)){var Ae="".concat(a,"-group"),le="".concat(Ae,"-addon"),ue="".concat(Ae,"-wrapper"),ne=se("".concat(a,"-wrapper"),Ae,f==null?void 0:f.wrapper,R==null?void 0:R.wrapper),me=se(ue,Q({},"".concat(ue,"-disabled"),V),f==null?void 0:f.group,R==null?void 0:R.groupWrapper);H=T.createElement(B,{className:me,ref:L},T.createElement(O,{className:ne},u&&T.createElement(N,{className:le},u),H,d&&T.createElement(N,{className:le},d)))}return T.cloneElement(H,{className:se((r=H.props)===null||r===void 0?void 0:r.className,g)||null,style:U(U({},(i=H.props)===null||i===void 0?void 0:i.style),p),hidden:I})}),g4=["show"];function Lv(t,e){return c.useMemo(function(){var n={};e&&(n.show=$e(e)==="object"&&e.formatter?e.formatter:!!e),n=U(U({},n),t);var r=n,i=r.show,o=qt(r,g4);return U(U({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(A){return A.length}})},[t,e])}var f4=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],h4=T.forwardRef(function(t,e){var n=t.autoComplete,r=t.onChange,i=t.onFocus,o=t.onBlur,A=t.onPressEnter,a=t.onKeyDown,s=t.onKeyUp,l=t.prefixCls,u=l===void 0?"rc-input":l,d=t.disabled,g=t.htmlSize,p=t.className,V=t.maxLength,v=t.suffix,m=t.showCount,C=t.count,w=t.type,S=w===void 0?"text":w,M=t.classes,I=t.classNames,f=t.styles,R=t.onCompositionStart,q=t.onCompositionEnd,E=qt(t,f4),h=T.useState(!1),y=$(h,2),x=y[0],b=y[1],B=T.useRef(!1),O=T.useRef(!1),N=T.useRef(null),F=T.useRef(null),j=function(pe){N.current&&jv(N.current,pe)},Y=Tn(t.defaultValue,{value:t.value}),H=$(Y,2),L=H[0],G=H[1],_=L==null?"":String(L),K=T.useState(null),W=$(K,2),z=W[0],te=W[1],X=Lv(C,m),Ae=X.max||V,le=X.strategy(_),ue=!!Ae&&le>Ae;T.useImperativeHandle(e,function(){var Se;return{focus:j,blur:function(){var Me;(Me=N.current)===null||Me===void 0||Me.blur()},setSelectionRange:function(Me,Le,et){var nt;(nt=N.current)===null||nt===void 0||nt.setSelectionRange(Me,Le,et)},select:function(){var Me;(Me=N.current)===null||Me===void 0||Me.select()},input:N.current,nativeElement:((Se=F.current)===null||Se===void 0?void 0:Se.nativeElement)||N.current}}),T.useEffect(function(){O.current&&(O.current=!1),b(function(Se){return Se&&d?!1:Se})},[d]);var ne=function(pe,Me,Le){var et=Me;if(!B.current&&X.exceedFormatter&&X.max&&X.strategy(Me)>X.max){if(et=X.exceedFormatter(Me,{max:X.max}),Me!==et){var nt,je;te([((nt=N.current)===null||nt===void 0?void 0:nt.selectionStart)||0,((je=N.current)===null||je===void 0?void 0:je.selectionEnd)||0])}}else if(Le.source==="compositionEnd")return;G(et),N.current&&Vs(N.current,pe,r,et)};T.useEffect(function(){if(z){var Se;(Se=N.current)===null||Se===void 0||Se.setSelectionRange.apply(Se,be(z))}},[z]);var me=function(pe){ne(pe,pe.target.value,{source:"change"})},Z=function(pe){B.current=!1,ne(pe,pe.currentTarget.value,{source:"compositionEnd"}),q==null||q(pe)},de=function(pe){A&&pe.key==="Enter"&&!O.current&&(O.current=!0,A(pe)),a==null||a(pe)},ce=function(pe){pe.key==="Enter"&&(O.current=!1),s==null||s(pe)},ye=function(pe){b(!0),i==null||i(pe)},Ie=function(pe){O.current&&(O.current=!1),b(!1),o==null||o(pe)},Ve=function(pe){G(""),j(),N.current&&Vs(N.current,pe,r)},Be=ue&&"".concat(u,"-out-of-range"),Qe=function(){var pe=$n(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return T.createElement("input",Fe({autoComplete:n},pe,{onChange:me,onFocus:ye,onBlur:Ie,onKeyDown:de,onKeyUp:ce,className:se(u,Q({},"".concat(u,"-disabled"),d),I==null?void 0:I.input),style:f==null?void 0:f.input,ref:N,size:g,type:S,onCompositionStart:function(Le){B.current=!0,R==null||R(Le)},onCompositionEnd:Z}))},ke=function(){var pe=Number(Ae)>0;if(v||X.show){var Me=X.showFormatter?X.showFormatter({value:_,count:le,maxLength:Ae}):"".concat(le).concat(pe?" / ".concat(Ae):"");return T.createElement(T.Fragment,null,X.show&&T.createElement("span",{className:se("".concat(u,"-show-count-suffix"),Q({},"".concat(u,"-show-count-has-suffix"),!!v),I==null?void 0:I.count),style:U({},f==null?void 0:f.count)},Me),v)}return null};return T.createElement(Pv,Fe({},E,{prefixCls:u,className:se(p,Be),handleReset:Ve,value:_,focused:x,triggerFocus:j,suffix:ke(),disabled:d,classes:M,classNames:I,styles:f}),Qe())}),Yv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const el=c.createContext(null),zo=(t,e)=>{const n=c.useContext(el),r=c.useMemo(()=>{if(!n)return"";const{compactDirection:i,isFirstItem:o,isLastItem:A}=n,a=i==="vertical"?"-vertical-":"-";return se(`${t}-compact${a}item`,{[`${t}-compact${a}first-item`]:o,[`${t}-compact${a}last-item`]:A,[`${t}-compact${a}item-rtl`]:e==="rtl"})},[t,e,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},p4=t=>{const{children:e}=t;return c.createElement(el.Provider,{value:null},e)},m4=t=>{const{children:e}=t,n=Yv(t,["children"]);return c.createElement(el.Provider,{value:c.useMemo(()=>n,[n])},e)},V4=t=>{const{getPrefixCls:e,direction:n}=c.useContext(Qt),{size:r,direction:i,block:o,prefixCls:A,className:a,rootClassName:s,children:l}=t,u=Yv(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=ki(S=>r??S),g=e("space-compact",A),[p,V]=bv(g),v=se(g,V,{[`${g}-rtl`]:n==="rtl",[`${g}-block`]:o,[`${g}-vertical`]:i==="vertical"},a,s),m=c.useContext(el),C=Nr(l),w=c.useMemo(()=>C.map((S,M)=>{const I=(S==null?void 0:S.key)||`${g}-item-${M}`;return c.createElement(m4,{key:I,compactSize:d,compactDirection:i,isFirstItem:M===0&&(!m||(m==null?void 0:m.isFirstItem)),isLastItem:M===C.length-1&&(!m||(m==null?void 0:m.isLastItem))},S)}),[r,C,m]);return C.length===0?null:p(c.createElement("div",Object.assign({className:v},u),w))},NA=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let i=r;return n&&(i=T.createElement(e4,{override:!0,status:!0},i)),e&&(i=T.createElement(p4,null,i)),i};var v4={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function Hv(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function C4(t){return Hv(t)instanceof ShadowRoot}function vs(t){return C4(t)?Hv(t):null}function q4(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function E4(t,e){Ct(t,"[@ant-design/icons] ".concat(e))}function Lp(t){return $e(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&($e(t.icon)==="object"||typeof t.icon=="function")}function Yp(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[q4(n)]=r}return e},{})}function sd(t,e,n){return n?T.createElement(t.tag,U(U({key:e},Yp(t.attrs)),n),(t.children||[]).map(function(r,i){return sd(r,"".concat(e,"-").concat(t.tag,"-").concat(i))})):T.createElement(t.tag,U({key:e},Yp(t.attrs)),(t.children||[]).map(function(r,i){return sd(r,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function Kv(t){return MA(t)[0]}function Zv(t){return t?Array.isArray(t)?t:[t]:[]}var y4=`
|
|
534
534
|
.anticon {
|
|
535
535
|
display: inline-flex;
|
|
536
536
|
align-items: center;
|
|
@@ -587,7 +587,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Ma]+=1);const HS=rn.div`
|
|
|
587
587
|
}
|
|
588
588
|
`,w4=function(e){var n=T.useContext(Nd),r=n.csp,i=n.prefixCls,o=n.layer,A=y4;i&&(A=A.replace(/anticon/g,i)),o&&(A="@layer ".concat(o,` {
|
|
589
589
|
`).concat(A,`
|
|
590
|
-
}`)),T.useEffect(function(){var a=e.current,s=vs(a);si(A,"@ant-design-icons",{prepend:!o,csp:r,attachTo:s})},[])},S4=["icon","className","onClick","style","primaryColor","secondaryColor"],vA={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function I4(t){var e=t.primaryColor,n=t.secondaryColor;vA.primaryColor=e,vA.secondaryColor=n||Kv(e),vA.calculated=!!n}function b4(){return U({},vA)}var Jo=function(e){var n=e.icon,r=e.className,i=e.onClick,o=e.style,A=e.primaryColor,a=e.secondaryColor,s=qt(e,S4),l=c.useRef(),u=vA;if(A&&(u={primaryColor:A,secondaryColor:a||Kv(A)}),w4(l),E4(Lp(n),"icon should be icon definiton, but got ".concat(n)),!Lp(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=U(U({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),sd(d.icon,"svg-".concat(d.name),U(U({className:r,onClick:i,style:o,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s),{},{ref:l}))};Jo.displayName="IconReact";Jo.getTwoToneColors=b4;Jo.setTwoToneColors=I4;function zv(t){var e=Zv(t),n=$(e,2),r=n[0],i=n[1];return Jo.setTwoToneColors({primaryColor:r,secondaryColor:i})}function M4(){var t=Jo.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var R4=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];zv(ts.primary);var Mn=c.forwardRef(function(t,e){var n=t.className,r=t.icon,i=t.spin,o=t.rotate,A=t.tabIndex,a=t.onClick,s=t.twoToneColor,l=qt(t,R4),u=c.useContext(Nd),d=u.prefixCls,g=d===void 0?"anticon":d,p=u.rootClassName,V=se(p,g,Q(Q({},"".concat(g,"-").concat(r.name),!!r.name),"".concat(g,"-spin"),!!i||r.name==="loading"),n),v=A;v===void 0&&a&&(v=-1);var m=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,C=Zv(s),w=$(C,2),S=w[0],M=w[1];return c.createElement("span",Fe({role:"img","aria-label":r.name},l,{ref:e,tabIndex:v,onClick:a,className:V}),c.createElement(Jo,{icon:r,primaryColor:S,secondaryColor:M,style:m}))});Mn.displayName="AntdIcon";Mn.getTwoToneColor=M4;Mn.setTwoToneColor=zv;var x4=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:v4}))},ta=c.forwardRef(x4);process.env.NODE_ENV!=="production"&&(ta.displayName="CloseCircleFilled");const Jv=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:T.createElement(ta,null)}),e};function Cs(t,e,n){return se({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const tl=(t,e)=>e||t,sg=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var r,i;const{variant:o,[t]:A}=c.useContext(Qt),a=c.useContext(t4),s=A==null?void 0:A.variant;let l;typeof e<"u"?l=e:n===!1?l="borderless":l=(i=(r=a??s)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const u=OE.includes(l);return[l,u]};function Wv(t,e){const n=T.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var i,o,A,a;!((i=t.current)===null||i===void 0)&&i.input&&((o=t.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((A=t.current)===null||A===void 0)&&A.input.hasAttribute("value"))&&((a=t.current)===null||a===void 0||a.input.removeAttribute("value"))}))};return T.useEffect(()=>(e&&r(),()=>n.current.forEach(i=>{i&&clearTimeout(i)})),[]),r}function T4(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var B4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const na=T.forwardRef((t,e)=>{const{prefixCls:n,bordered:r=!0,status:i,size:o,disabled:A,onBlur:a,onFocus:s,suffix:l,allowClear:u,addonAfter:d,addonBefore:g,className:p,style:V,styles:v,rootClassName:m,onChange:C,classNames:w,variant:S}=t,M=B4(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:Ve}=an("Input");Ve(!("bordered"in t),"bordered","variant")}const{getPrefixCls:I,direction:f,allowClear:R,autoComplete:q,className:E,style:h,classNames:y,styles:x}=Jr("input"),b=I("input",n),B=T.useRef(null),O=Ur(b),[N,F,j]=mv(b,m),[Y]=Vv(b,O),{compactSize:H,compactItemClassnames:L}=zo(b,f),G=ki(Ve=>{var Be;return(Be=o??H)!==null&&Be!==void 0?Be:Ve}),_=T.useContext(li),K=A??_,{status:J,hasFeedback:z,feedbackIcon:te}=T.useContext(Fr),X=tl(J,i),Ae=T4(t)||!!z,le=T.useRef(Ae);if(process.env.NODE_ENV!=="production"){const Ve=an("Input");T.useEffect(()=>{var Be;Ae&&!le.current&&process.env.NODE_ENV!=="production"&&Ve(document.activeElement===((Be=B.current)===null||Be===void 0?void 0:Be.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),le.current=Ae},[Ae])}const ue=Wv(B,!0),ne=Ve=>{ue(),a==null||a(Ve)},me=Ve=>{ue(),s==null||s(Ve)},Z=Ve=>{ue(),C==null||C(Ve)},de=(z||l)&&T.createElement(T.Fragment,null,l,z&&te),ce=Jv(u??R),[ye,Ie]=sg("input",S,r);return N(Y(T.createElement(h4,Object.assign({ref:kr(e,B),prefixCls:b,autoComplete:q},M,{disabled:K,onBlur:ne,onFocus:me,style:Object.assign(Object.assign({},h),V),styles:Object.assign(Object.assign({},x),v),suffix:de,allowClear:ce,className:se(p,m,j,O,L,E),onChange:Z,addonBefore:g&&T.createElement(NA,{form:!0,space:!0},g),addonAfter:d&&T.createElement(NA,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},w),y),{input:se({[`${b}-sm`]:G==="small",[`${b}-lg`]:G==="large",[`${b}-rtl`]:f==="rtl"},w==null?void 0:w.input,y.input,F),variant:se({[`${b}-${ye}`]:Ie},Cs(b,X)),affixWrapper:se({[`${b}-affix-wrapper-sm`]:G==="small",[`${b}-affix-wrapper-lg`]:G==="large",[`${b}-affix-wrapper-rtl`]:f==="rtl"},F),wrapper:se({[`${b}-group-rtl`]:f==="rtl"},F),groupWrapper:se({[`${b}-group-wrapper-sm`]:G==="small",[`${b}-group-wrapper-lg`]:G==="large",[`${b}-group-wrapper-rtl`]:f==="rtl",[`${b}-group-wrapper-${ye}`]:Ie},Cs(`${b}-group-wrapper`,X,z),F)})}))))});process.env.NODE_ENV!=="production"&&(na.displayName="Input");const O4=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},D4=bn(["Input","OTP"],t=>{const e=Zt(t,Zs(t));return[O4(e)]},zs);var N4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const F4=c.forwardRef((t,e)=>{const{value:n,onChange:r,onActiveChange:i,index:o,mask:A}=t,a=N4(t,["value","onChange","onActiveChange","index","mask"]),s=n&&typeof A=="string"?A:n,l=V=>{r(o,V.target.value)},u=c.useRef(null);c.useImperativeHandle(e,()=>u.current);const d=()=>{Lt(()=>{var V;const v=(V=u.current)===null||V===void 0?void 0:V.input;document.activeElement===v&&v&&v.select()})},g=V=>{const{key:v,ctrlKey:m,metaKey:C}=V;v==="ArrowLeft"?i(o-1):v==="ArrowRight"?i(o+1):v==="z"&&(m||C)&&V.preventDefault(),d()},p=V=>{V.key==="Backspace"&&!n&&i(o-1),d()};return c.createElement(na,Object.assign({type:A===!0?"password":"text"},a,{ref:u,value:s,onInput:l,onFocus:d,onKeyDown:g,onKeyUp:p,onMouseDown:d,onMouseUp:d}))});var Q4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Ta(t){return(t||"").split("")}const k4=c.forwardRef((t,e)=>{const{prefixCls:n,length:r=6,size:i,defaultValue:o,value:A,onChange:a,formatter:s,separator:l,variant:u,disabled:d,status:g,autoFocus:p,mask:V,type:v,onInput:m,inputMode:C}=t,w=Q4(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]);if(process.env.NODE_ENV!=="production"){const z=an("Input.OTP");process.env.NODE_ENV!=="production"&&z(!(typeof V=="string"&&V.length>1),"usage","`mask` prop should be a single character.")}const{getPrefixCls:S,direction:M}=c.useContext(Qt),I=S("otp",n),f=Oi(w,{aria:!0,data:!0,attr:!0}),R=Ur(I),[q,E,h]=D4(I,R),y=ki(z=>i??z),x=c.useContext(Fr),b=tl(x.status,g),B=c.useMemo(()=>Object.assign(Object.assign({},x),{status:b,hasFeedback:!1,feedbackIcon:null}),[x,b]),O=c.useRef(null),N=c.useRef({});c.useImperativeHandle(e,()=>({focus:()=>{var z;(z=N.current[0])===null||z===void 0||z.focus()},blur:()=>{var z;for(let te=0;te<r;te+=1)(z=N.current[te])===null||z===void 0||z.blur()},nativeElement:O.current}));const F=z=>s?s(z):z,[j,Y]=c.useState(Ta(F(o||"")));c.useEffect(()=>{A!==void 0&&Y(Ta(A))},[A]);const H=nn(z=>{Y(z),m&&m(z),a&&z.length===r&&z.every(te=>te)&&z.some((te,X)=>j[X]!==te)&&a(z.join(""))}),L=nn((z,te)=>{let X=be(j);for(let le=0;le<z;le+=1)X[le]||(X[le]="");te.length<=1?X[z]=te:X=X.slice(0,z).concat(Ta(te)),X=X.slice(0,r);for(let le=X.length-1;le>=0&&!X[le];le-=1)X.pop();const Ae=F(X.map(le=>le||" ").join(""));return X=Ta(Ae).map((le,ue)=>le===" "&&!X[ue]?X[ue]:le),X}),G=(z,te)=>{var X;const Ae=L(z,te),le=Math.min(z+te.length,r-1);le!==z&&Ae[z]!==void 0&&((X=N.current[le])===null||X===void 0||X.focus()),H(Ae)},_=z=>{var te;(te=N.current[z])===null||te===void 0||te.focus()},K={variant:u,disabled:d,status:b,mask:V,type:v,inputMode:C},J=z=>{const te=typeof l=="function"?l(z):l;return te?c.createElement("span",{className:`${I}-separator`},te):null};return q(c.createElement("div",Object.assign({},f,{ref:O,className:se(I,{[`${I}-sm`]:y==="small",[`${I}-lg`]:y==="large",[`${I}-rtl`]:M==="rtl"},h,E)}),c.createElement(Fr.Provider,{value:B},Array.from({length:r}).map((z,te)=>{const X=`otp-${te}`,Ae=j[te]||"";return c.createElement(c.Fragment,{key:X},c.createElement(F4,Object.assign({ref:le=>{N.current[te]=le},index:te,size:y,htmlSize:1,className:`${I}-input`,onChange:G,value:Ae,onActiveChange:_,autoFocus:te===0&&p},K)),l&&te<r-1&&J(te))}))))});var U4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},G4=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:U4}))},Xv=c.forwardRef(G4);process.env.NODE_ENV!=="production"&&(Xv.displayName="EyeInvisibleOutlined");var j4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},P4=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:j4}))},_v=c.forwardRef(P4);process.env.NODE_ENV!=="production"&&(_v.displayName="EyeOutlined");var L4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Y4=t=>t?c.createElement(_v,null):c.createElement(Xv,null),H4={click:"onClick",hover:"onMouseOver"},$v=c.forwardRef((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:i=!0,iconRender:o=Y4}=t,A=c.useContext(li),a=n??A,s=typeof i=="object"&&i.visible!==void 0,[l,u]=T.useState(()=>s?i.visible:!1),d=T.useRef(null);c.useEffect(()=>{s&&u(i.visible)},[s,i]);const g=Wv(d),p=()=>{var h;if(a)return;l&&g();const y=!l;u(y),typeof i=="object"&&((h=i.onVisibleChange)===null||h===void 0||h.call(i,y))},V=h=>{const y=H4[r]||"",x=o(l),b={[y]:p,className:`${h}-icon`,key:"passwordIcon",onMouseDown:B=>{B.preventDefault()},onMouseUp:B=>{B.preventDefault()}};return c.cloneElement(c.isValidElement(x)?x:c.createElement("span",null,x),b)},{className:v,prefixCls:m,inputPrefixCls:C,size:w}=t,S=L4(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:M}=c.useContext(Qt),I=M("input",C),f=M("input-password",m),R=i&&V(f),q=se(f,v,{[`${f}-${w}`]:!!w}),E=Object.assign(Object.assign({},$n(S,["suffix","iconRender","visibilityToggle"])),{type:l?"text":"password",className:q,prefixCls:I,suffix:R});return w&&(E.size=w),c.createElement(na,Object.assign({ref:kr(e,d)},E))});process.env.NODE_ENV!=="production"&&($v.displayName="Input.Password");var K4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Z4=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:K4}))},lg=c.forwardRef(Z4);process.env.NODE_ENV!=="production"&&(lg.displayName="SearchOutlined");var z4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const e1=c.createContext(void 0),J4=t=>{const{getPrefixCls:e,direction:n}=c.useContext(Qt),{prefixCls:r,size:i,className:o}=t,A=z4(t,["prefixCls","size","className"]),a=e("btn-group",r),[,,s]=lr(),l=c.useMemo(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]);if(process.env.NODE_ENV!=="production"){const d=an("Button.Group");d.deprecated(!1,"Button.Group","Space.Compact"),process.env.NODE_ENV!=="production"&&d(!i||["large","small","middle"].includes(i),"usage","Invalid prop `size`.")}const u=se(a,{[`${a}-${l}`]:l,[`${a}-rtl`]:n==="rtl"},o,s);return c.createElement(e1.Provider,{value:i},c.createElement("div",Object.assign({},A,{className:u})))},Hp=/^[\u4E00-\u9FA5]{2}$/,ld=Hp.test.bind(Hp);function W4(t){return t==="danger"?{danger:!0}:{type:t}}function Kp(t){return typeof t=="string"}function Ba(t){return t==="text"||t==="link"}function X4(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&Kp(t.type)&&ld(t.props.children)?Dr(t,{children:t.props.children.split("").join(n)}):Kp(t)?ld(t)?T.createElement("span",null,t.split("").join(n)):T.createElement("span",null,t):xv(t)?T.createElement("span",null,t):t}function _4(t,e){let n=!1;const r=[];return T.Children.forEach(t,i=>{const o=typeof i,A=o==="string"||o==="number";if(n&&A){const a=r.length-1,s=r[a];r[a]=`${s}${i}`}else r.push(i);n=A}),T.Children.map(r,i=>X4(i,e))}["default","primary","danger"].concat(be(Ti));var $4={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},e6=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:$4}))},nl=c.forwardRef(e6);process.env.NODE_ENV!=="production"&&(nl.displayName="LoadingOutlined");const cd=T.forwardRef((t,e)=>{const{className:n,style:r,children:i,prefixCls:o}=t,A=se(`${o}-icon`,n);return T.createElement("span",{ref:e,className:A,style:r},i)}),Zp=T.forwardRef((t,e)=>{const{prefixCls:n,className:r,style:i,iconClassName:o}=t,A=se(`${n}-loading-icon`,r);return T.createElement(cd,{prefixCls:n,className:A,style:i,ref:e},T.createElement(nl,{className:o}))}),rc=()=>({width:0,opacity:0,transform:"scale(0)"}),ic=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),t6=t=>{const{prefixCls:e,loading:n,existIcon:r,className:i,style:o,mount:A}=t,a=!!n;return r?T.createElement(Zp,{prefixCls:e,className:i,style:o}):T.createElement(oo,{visible:a,motionName:`${e}-loading-icon-motion`,motionAppear:!A,motionEnter:!A,motionLeave:!A,removeOnLeave:!0,onAppearStart:rc,onAppearActive:ic,onEnterStart:rc,onEnterActive:ic,onLeaveStart:ic,onLeaveActive:rc},(s,l)=>{let{className:u,style:d}=s;const g=Object.assign(Object.assign({},o),d);return T.createElement(Zp,{prefixCls:e,className:se(i,u),style:g,ref:l})})},zp=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),n6=t=>{const{componentCls:e,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:o}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(r).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},zp(`${e}-primary`,i),zp(`${e}-danger`,o)]}};var r6=["b"],i6=["v"],oc=function(e){return Math.round(Number(e||0))},o6=function(e){if(e instanceof Pt)return e;if(e&&$e(e)==="object"&&"h"in e&&"b"in e){var n=e,r=n.b,i=qt(n,r6);return U(U({},i),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},ci=function(t){di(n,t);var e=gi(n);function n(r){return fn(this,n),e.call(this,o6(r))}return hn(n,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=oc(i.s*100),A=oc(i.b*100),a=oc(i.h),s=i.a,l="hsb(".concat(a,", ").concat(o,"%, ").concat(A,"%)"),u="hsba(".concat(a,", ").concat(o,"%, ").concat(A,"%, ").concat(s.toFixed(s===0?0:2),")");return s===1?l:u}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,A=qt(i,i6);return U(U({},A),{},{b:o,a:this.a})}}]),n}(Pt),A6="rc-color-picker",xo=function(e){return e instanceof ci?e:new ci(e)},a6=xo("#1677ff"),t1=function(e){var n=e.offset,r=e.targetRef,i=e.containerRef,o=e.color,A=e.type,a=i.current.getBoundingClientRect(),s=a.width,l=a.height,u=r.current.getBoundingClientRect(),d=u.width,g=u.height,p=d/2,V=g/2,v=(n.x+p)/s,m=1-(n.y+V)/l,C=o.toHsb(),w=v,S=(n.x+p)/s*360;if(A)switch(A){case"hue":return xo(U(U({},C),{},{h:S<=0?0:S}));case"alpha":return xo(U(U({},C),{},{a:w<=0?0:w}))}return xo({h:C.h,s:v<=0?0:v,b:m>=1?1:m,a:C.a})},n1=function(e,n){var r=e.toHsb();switch(n){case"hue":return{x:r.h/360*100,y:50};case"alpha":return{x:e.a*100,y:50};default:return{x:r.s*100,y:(1-r.b)*100}}},s6=function(e){var n=e.color,r=e.prefixCls,i=e.className,o=e.style,A=e.onClick,a="".concat(r,"-color-block");return T.createElement("div",{className:se(a,i),style:o,onClick:A},T.createElement("div",{className:"".concat(a,"-inner"),style:{background:n}}))};function l6(t){var e="touches"in t?t.touches[0]:t,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:e.pageX-n,pageY:e.pageY-r}}function r1(t){var e=t.targetRef,n=t.containerRef,r=t.direction,i=t.onDragChange,o=t.onDragChangeComplete,A=t.calculate,a=t.color,s=t.disabledDrag,l=T.useState({x:0,y:0}),u=$(l,2),d=u[0],g=u[1],p=T.useRef(null),V=T.useRef(null);T.useEffect(function(){g(A())},[a]),T.useEffect(function(){return function(){document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",V.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",V.current),p.current=null,V.current=null}},[]);var v=function(M){var I=l6(M),f=I.pageX,R=I.pageY,q=n.current.getBoundingClientRect(),E=q.x,h=q.y,y=q.width,x=q.height,b=e.current.getBoundingClientRect(),B=b.width,O=b.height,N=B/2,F=O/2,j=Math.max(0,Math.min(f-E,y))-N,Y=Math.max(0,Math.min(R-h,x))-F,H={x:j,y:r==="x"?d.y:Y};if(B===0&&O===0||B!==O)return!1;i==null||i(H)},m=function(M){M.preventDefault(),v(M)},C=function(M){M.preventDefault(),document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",V.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",V.current),p.current=null,V.current=null,o==null||o()},w=function(M){document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",V.current),!s&&(v(M),document.addEventListener("mousemove",m),document.addEventListener("mouseup",C),document.addEventListener("touchmove",m),document.addEventListener("touchend",C),p.current=m,V.current=C)};return[d,w]}var i1=function(e){var n=e.size,r=n===void 0?"default":n,i=e.color,o=e.prefixCls;return T.createElement("div",{className:se("".concat(o,"-handler"),Q({},"".concat(o,"-handler-sm"),r==="small")),style:{backgroundColor:i}})},o1=function(e){var n=e.children,r=e.style,i=e.prefixCls;return T.createElement("div",{className:"".concat(i,"-palette"),style:U({position:"relative"},r)},n)},A1=T.forwardRef(function(t,e){var n=t.children,r=t.x,i=t.y;return T.createElement("div",{ref:e,style:{position:"absolute",left:"".concat(r,"%"),top:"".concat(i,"%"),zIndex:1,transform:"translate(-50%, -50%)"}},n)}),c6=function(e){var n=e.color,r=e.onChange,i=e.prefixCls,o=e.onChangeComplete,A=e.disabled,a=T.useRef(),s=T.useRef(),l=T.useRef(n),u=nn(function(v){var m=t1({offset:v,targetRef:s,containerRef:a,color:n});l.current=m,r(m)}),d=r1({color:n,containerRef:a,targetRef:s,calculate:function(){return n1(n)},onDragChange:u,onDragChangeComplete:function(){return o==null?void 0:o(l.current)},disabledDrag:A}),g=$(d,2),p=g[0],V=g[1];return T.createElement("div",{ref:a,className:"".concat(i,"-select"),onMouseDown:V,onTouchStart:V},T.createElement(o1,{prefixCls:i},T.createElement(A1,{x:p.x,y:p.y,ref:s},T.createElement(i1,{color:n.toRgbString(),prefixCls:i})),T.createElement("div",{className:"".concat(i,"-saturation"),style:{backgroundColor:"hsl(".concat(n.toHsb().h,",100%, 50%)"),backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},u6=function(e,n){var r=Tn(e,{value:n}),i=$(r,2),o=i[0],A=i[1],a=T.useMemo(function(){return xo(o)},[o]);return[a,A]},d6=function(e){var n=e.colors,r=e.children,i=e.direction,o=i===void 0?"to right":i,A=e.type,a=e.prefixCls,s=T.useMemo(function(){return n.map(function(l,u){var d=xo(l);return A==="alpha"&&u===n.length-1&&(d=new ci(d.setA(1))),d.toRgbString()}).join(",")},[n,A]);return T.createElement("div",{className:"".concat(a,"-gradient"),style:{position:"absolute",inset:0,background:"linear-gradient(".concat(o,", ").concat(s,")")}},r)},g6=function(e){var n=e.prefixCls,r=e.colors,i=e.disabled,o=e.onChange,A=e.onChangeComplete,a=e.color,s=e.type,l=T.useRef(),u=T.useRef(),d=T.useRef(a),g=function(I){return s==="hue"?I.getHue():I.a*100},p=nn(function(M){var I=t1({offset:M,targetRef:u,containerRef:l,color:a,type:s});d.current=I,o(g(I))}),V=r1({color:a,targetRef:u,containerRef:l,calculate:function(){return n1(a,s)},onDragChange:p,onDragChangeComplete:function(){A(g(d.current))},direction:"x",disabledDrag:i}),v=$(V,2),m=v[0],C=v[1],w=T.useMemo(function(){if(s==="hue"){var M=a.toHsb();M.s=1,M.b=1,M.a=1;var I=new ci(M);return I}return a},[a,s]),S=T.useMemo(function(){return r.map(function(M){return"".concat(M.color," ").concat(M.percent,"%")})},[r]);return T.createElement("div",{ref:l,className:se("".concat(n,"-slider"),"".concat(n,"-slider-").concat(s)),onMouseDown:C,onTouchStart:C},T.createElement(o1,{prefixCls:n},T.createElement(A1,{x:m.x,y:m.y,ref:u},T.createElement(i1,{size:"small",color:w.toHexString(),prefixCls:n})),T.createElement(d6,{colors:S,type:s,prefixCls:n})))};function f6(t){return c.useMemo(function(){var e=t||{},n=e.slider;return[n||g6]},[t])}var h6=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],p6=T.forwardRef(function(t,e){var n=t.value,r=t.defaultValue,i=t.prefixCls,o=i===void 0?A6:i,A=t.onChange,a=t.onChangeComplete,s=t.className,l=t.style,u=t.panelRender,d=t.disabledAlpha,g=d===void 0?!1:d,p=t.disabled,V=p===void 0?!1:p,v=t.components,m=f6(v),C=$(m,1),w=C[0],S=u6(r||a6,n),M=$(S,2),I=M[0],f=M[1],R=T.useMemo(function(){return I.setA(1).toRgbString()},[I]),q=function(Y,H){n||f(Y),A==null||A(Y,H)},E=function(Y){return new ci(I.setHue(Y))},h=function(Y){return new ci(I.setA(Y/100))},y=function(Y){q(E(Y),{type:"hue",value:Y})},x=function(Y){q(h(Y),{type:"alpha",value:Y})},b=function(Y){a&&a(E(Y))},B=function(Y){a&&a(h(Y))},O=se("".concat(o,"-panel"),s,Q({},"".concat(o,"-panel-disabled"),V)),N={prefixCls:o,disabled:V,color:I},F=T.createElement(T.Fragment,null,T.createElement(c6,Fe({onChange:q},N,{onChangeComplete:a})),T.createElement("div",{className:"".concat(o,"-slider-container")},T.createElement("div",{className:se("".concat(o,"-slider-group"),Q({},"".concat(o,"-slider-group-disabled-alpha"),g))},T.createElement(w,Fe({},N,{type:"hue",colors:h6,min:0,max:359,value:I.getHue(),onChange:y,onChangeComplete:b})),!g&&T.createElement(w,Fe({},N,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:R}],min:0,max:100,value:I.a*100,onChange:x,onChangeComplete:B}))),T.createElement(s6,{color:I.toRgbString(),prefixCls:o})));return T.createElement("div",{className:O,style:l,ref:e},typeof u=="function"?u(F):F)});process.env.NODE_ENV!=="production"&&(p6.displayName="ColorPicker");const m6=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",V6=(t,e)=>t?m6(t,e):"";let v6=function(){function t(e){fn(this,t);var n;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)===null||n===void 0?void 0:n.map(i=>({color:new t(i.color),percent:i.percent})),this.cleared=e.cleared;return}const r=Array.isArray(e);r&&e.length?(this.colors=e.map(i=>{let{color:o,percent:A}=i;return{color:new t(o),percent:A}}),this.metaColor=new ci(this.colors[0].color.metaColor)):this.metaColor=new ci(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return hn(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return V6(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,i)=>{const o=n.colors[i];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])}();var C6={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"},q6=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:C6}))},qs=c.forwardRef(q6);process.env.NODE_ENV!=="production"&&(qs.displayName="RightOutlined");var ot={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224};const Ac=()=>({height:0,opacity:0}),Jp=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},E6=t=>({height:t?t.offsetHeight:0}),ac=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",y6=function(){return{motionName:`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:RA}-motion-collapse`,onAppearStart:Ac,onEnterStart:Ac,onAppearActive:Jp,onEnterActive:Jp,onLeaveStart:E6,onLeaveActive:Ac,onAppearEnd:ac,onEnterEnd:ac,onLeaveEnd:ac,motionDeadline:500}},rl=(t,e,n)=>n!==void 0?n:`${t}-${e}`,w6=(t,e)=>{const{r:n,g:r,b:i,a:o}=t.toRgb(),A=new ci(t.toRgbString()).onBackground(e).toHsv();return o<=.5?A.v>.5:n*.299+r*.587+i*.114>192},a1=t=>{const{paddingInline:e,onlyIconSize:n}=t;return Zt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},s1=t=>{var e,n,r,i,o,A;const a=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,s=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,l=(r=t.contentFontSizeLG)!==null&&r!==void 0?r:t.fontSizeLG,u=(i=t.contentLineHeight)!==null&&i!==void 0?i:ka(a),d=(o=t.contentLineHeightSM)!==null&&o!==void 0?o:ka(s),g=(A=t.contentLineHeightLG)!==null&&A!==void 0?A:ka(l),p=w6(new v6(t.colorBgSolid),"#fff")?"#000":"#fff",V=Ti.reduce((v,m)=>Object.assign(Object.assign({},v),{[`${m}ShadowColor`]:`0 ${ve(t.controlOutlineWidth)} 0 ${cA(t[`${m}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},V),{fontWeight:400,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:p,contentFontSize:a,contentFontSizeSM:s,contentFontSizeLG:l,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:g,paddingBlock:Math.max((t.controlHeight-a*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-s*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-l*g)/2-t.lineWidth,0)})},S6=t=>{const{componentCls:e,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:A,marginXS:a,calc:s}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:t.marginXS,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${ve(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:ZA(),"> a":{color:"currentColor"},"&:not(:disabled)":is(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"},[`&${e}-round`]:{width:"auto"}},[`&${e}-loading`]:{opacity:i,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(l=>`${l} ${o} ${A}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:s(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:s(a).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:s(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:s(a).mul(-1).equal()}}}}}},l1=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),I6=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),b6=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.calc(t.controlHeight).div(2).equal(),paddingInlineEnd:t.calc(t.controlHeight).div(2).equal()}),M6=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),cg=(t,e,n,r,i,o,A,a)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:r||void 0,boxShadow:"none"},l1(t,Object.assign({background:e},A),Object.assign({background:e},a))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),R6=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},M6(t))}),x6=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),il=(t,e,n,r)=>{const o=r&&["link","text"].includes(r)?x6:R6;return Object.assign(Object.assign({},o(t)),l1(t.componentCls,e,n))},ol=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},il(t,r,i))}),Al=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},il(t,r,i))}),al=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),sl=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},il(t,n,r))}),Di=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},il(t,r,i,n))}),T6=t=>{const{componentCls:e}=t;return Ti.reduce((n,r)=>{const i=t[`${r}6`],o=t[`${r}1`],A=t[`${r}5`],a=t[`${r}2`],s=t[`${r}3`],l=t[`${r}7`];return Object.assign(Object.assign({},n),{[`&${e}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:t[`${r}ShadowColor`]},ol(t,t.colorTextLightSolid,i,{background:A},{background:l})),Al(t,i,t.colorBgContainer,{color:A,borderColor:A,background:t.colorBgContainer},{color:l,borderColor:l,background:t.colorBgContainer})),al(t)),sl(t,o,{background:a},{background:s})),Di(t,i,"link",{color:A},{color:l})),Di(t,i,"text",{color:A,background:o},{color:l,background:s}))})},{})},B6=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},ol(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),al(t)),sl(t,t.colorFillTertiary,{background:t.colorFillSecondary},{background:t.colorFill})),Di(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),cg(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),O6=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},Al(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),al(t)),sl(t,t.colorPrimaryBg,{background:t.colorPrimaryBgHover},{background:t.colorPrimaryBorder})),Di(t,t.colorLink,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),cg(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),D6=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},ol(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),Al(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),al(t)),sl(t,t.colorErrorBg,{background:t.colorErrorBgFilledHover},{background:t.colorErrorBgActive})),Di(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Di(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),cg(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),N6=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:B6(t),[`${e}-color-primary`]:O6(t),[`${e}-color-dangerous`]:D6(t)},T6(t))},F6=t=>Object.assign(Object.assign(Object.assign(Object.assign({},Al(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Di(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),ol(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Di(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),ug=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,controlHeight:r,fontSize:i,borderRadius:o,buttonPaddingHorizontal:A,iconCls:a,buttonPaddingVertical:s,buttonIconOnlyFontSize:l}=t;return[{[e]:{fontSize:i,height:r,padding:`${ve(s)} ${ve(A)}`,borderRadius:o,[`&${n}-icon-only`]:{width:r,[a]:{fontSize:l}}}},{[`${n}${n}-circle${e}`]:I6(t)},{[`${n}${n}-round${e}`]:b6(t)}]},Q6=t=>{const e=Zt(t,{fontSize:t.contentFontSize});return ug(e,t.componentCls)},k6=t=>{const e=Zt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return ug(e,`${t.componentCls}-sm`)},U6=t=>{const e=Zt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return ug(e,`${t.componentCls}-lg`)},G6=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},j6=bn("Button",t=>{const e=a1(t);return[S6(e),Q6(e),k6(e),U6(e),G6(e),N6(e),F6(e),n6(e)]},s1,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function P6(t,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function L6(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Y6(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},P6(t,e)),L6(t.componentCls,e))}}const H6=t=>{const{componentCls:e,colorPrimaryHover:n,lineWidth:r,calc:i}=t,o=i(r).mul(-1).equal(),A=a=>{const s=`${e}-compact${a?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${s} + ${s}::before`]:{position:"absolute",top:a?o:0,insetInlineStart:a?0:o,backgroundColor:n,content:'""',width:a?"100%":r,height:a?r:"100%"}}};return Object.assign(Object.assign({},A()),A(!0))},K6=NV(["Button","compact"],t=>{const e=a1(t);return[zd(e),Y6(e),H6(e)]},s1);var Z6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function z6(t){if(typeof t=="object"&&t){let e=t==null?void 0:t.delay;return e=!Number.isNaN(e)&&typeof e=="number"?e:0,{loading:e<=0,delay:e}}return{loading:!!t,delay:0}}const J6={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["primary","link"],text:["default","text"]},W6=T.forwardRef((t,e)=>{var n,r;const{loading:i=!1,prefixCls:o,color:A,variant:a,type:s,danger:l=!1,shape:u="default",size:d,styles:g,disabled:p,className:V,rootClassName:v,children:m,icon:C,iconPosition:w="start",ghost:S=!1,block:M=!1,htmlType:I="button",classNames:f,style:R={},autoInsertSpace:q,autoFocus:E}=t,h=Z6(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),y=s||"default",[x,b]=T.useMemo(()=>{if(A&&a)return[A,a];const Re=J6[y]||[];return l?["danger",Re[1]]:Re},[s,A,a,l]),O=x==="danger"?"dangerous":x,{getPrefixCls:N,direction:F,autoInsertSpace:j,className:Y,style:H,classNames:L,styles:G}=Jr("button"),_=(n=q??j)!==null&&n!==void 0?n:!0,K=N("btn",o),[J,z,te]=j6(K),X=T.useContext(li),Ae=p??X,le=T.useContext(e1),ue=T.useMemo(()=>z6(i),[i]),[ne,me]=T.useState(ue.loading),[Z,de]=T.useState(!1),ce=T.useRef(null),ye=Fi(e,ce),Ie=T.Children.count(m)===1&&!C&&!Ba(b),Ve=T.useRef(!0);T.useEffect(()=>(Ve.current=!1,()=>{Ve.current=!0}),[]),T.useEffect(()=>{let Re=null;ue.delay>0?Re=setTimeout(()=>{Re=null,me(!0)},ue.delay):me(ue.loading);function At(){Re&&(clearTimeout(Re),Re=null)}return At},[ue]),T.useEffect(()=>{if(!ce.current||!_)return;const Re=ce.current.textContent||"";Ie&&ld(Re)?Z||de(!0):Z&&de(!1)}),T.useEffect(()=>{E&&ce.current&&ce.current.focus()},[]);const Be=T.useCallback(Re=>{var At;if(ne||Ae){Re.preventDefault();return}(At=t.onClick)===null||At===void 0||At.call(t,("href"in t,Re))},[t.onClick,ne,Ae]);if(process.env.NODE_ENV!=="production"){const Re=an("Button");process.env.NODE_ENV!=="production"&&Re(!(typeof C=="string"&&C.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${C}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&Re(!(S&&Ba(b)),"usage","`link` or `text` button can't be a `ghost` button.")}const{compactSize:Qe,compactItemClassnames:ke}=zo(K,F),Se={large:"lg",small:"sm",middle:void 0},pe=ki(Re=>{var At,at;return(at=(At=d??Qe)!==null&&At!==void 0?At:le)!==null&&at!==void 0?at:Re}),Me=pe&&(r=Se[pe])!==null&&r!==void 0?r:"",Le=ne?"loading":C,et=$n(h,["navigate"]),nt=se(K,z,te,{[`${K}-${u}`]:u!=="default"&&u,[`${K}-${y}`]:y,[`${K}-dangerous`]:l,[`${K}-color-${O}`]:O,[`${K}-variant-${b}`]:b,[`${K}-${Me}`]:Me,[`${K}-icon-only`]:!m&&m!==0&&!!Le,[`${K}-background-ghost`]:S&&!Ba(b),[`${K}-loading`]:ne,[`${K}-two-chinese-chars`]:Z&&_&&!ne,[`${K}-block`]:M,[`${K}-rtl`]:F==="rtl",[`${K}-icon-end`]:w==="end"},ke,V,v,Y),je=Object.assign(Object.assign({},H),R),Ee=se(f==null?void 0:f.icon,L.icon),We=Object.assign(Object.assign({},(g==null?void 0:g.icon)||{}),G.icon||{}),ct=C&&!ne?T.createElement(cd,{prefixCls:K,className:Ee,style:We},C):i&&typeof i=="object"&&i.icon?T.createElement(cd,{prefixCls:K,className:Ee,style:We},i.icon):T.createElement(t6,{existIcon:!!C,prefixCls:K,loading:ne,mount:Ve.current}),_e=m||m===0?_4(m,Ie&&_):null;if(et.href!==void 0)return J(T.createElement("a",Object.assign({},et,{className:se(nt,{[`${K}-disabled`]:Ae}),href:Ae?void 0:et.href,style:je,onClick:Be,ref:ye,tabIndex:Ae?-1:0}),ct,_e));let Oe=T.createElement("button",Object.assign({},h,{type:I,className:nt,style:je,onClick:Be,disabled:Ae,ref:ye}),ct,_e,ke&&T.createElement(K6,{prefixCls:K}));return Ba(b)||(Oe=T.createElement(_s,{component:"Button",disabled:ne},Oe)),J(Oe)}),ro=W6;ro.Group=J4;ro.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(ro.displayName="Button");var X6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const c1=c.forwardRef((t,e)=>{const{prefixCls:n,inputPrefixCls:r,className:i,size:o,suffix:A,enterButton:a=!1,addonAfter:s,loading:l,disabled:u,onSearch:d,onChange:g,onCompositionStart:p,onCompositionEnd:V}=t,v=X6(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:m,direction:C}=c.useContext(Qt),w=c.useRef(!1),S=m("input-search",n),M=m("input",r),{compactSize:I}=zo(S,C),f=ki(L=>{var G;return(G=o??I)!==null&&G!==void 0?G:L}),R=c.useRef(null),q=L=>{L!=null&&L.target&&L.type==="click"&&d&&d(L.target.value,L,{source:"clear"}),g==null||g(L)},E=L=>{var G;document.activeElement===((G=R.current)===null||G===void 0?void 0:G.input)&&L.preventDefault()},h=L=>{var G,_;d&&d((_=(G=R.current)===null||G===void 0?void 0:G.input)===null||_===void 0?void 0:_.value,L,{source:"input"})},y=L=>{w.current||l||h(L)},x=typeof a=="boolean"?c.createElement(lg,null):null,b=`${S}-button`;let B;const O=a||{},N=O.type&&O.type.__ANT_BUTTON===!0;N||O.type==="button"?B=Dr(O,Object.assign({onMouseDown:E,onClick:L=>{var G,_;(_=(G=O==null?void 0:O.props)===null||G===void 0?void 0:G.onClick)===null||_===void 0||_.call(G,L),h(L)},key:"enterButton"},N?{className:b,size:f}:{})):B=c.createElement(ro,{className:b,type:a?"primary":void 0,size:f,disabled:u,key:"enterButton",onMouseDown:E,onClick:h,loading:l,icon:x},a),s&&(B=[B,Dr(s,{key:"addonAfter"})]);const F=se(S,{[`${S}-rtl`]:C==="rtl",[`${S}-${f}`]:!!f,[`${S}-with-button`]:!!a},i),j=Object.assign(Object.assign({},v),{className:F,prefixCls:M,type:"search"}),Y=L=>{w.current=!0,p==null||p(L)},H=L=>{w.current=!1,V==null||V(L)};return c.createElement(na,Object.assign({ref:kr(R,e),onPressEnter:y},j,{size:f,onCompositionStart:Y,onCompositionEnd:H,addonAfter:B,suffix:A,onChange:q,disabled:u}))});process.env.NODE_ENV!=="production"&&(c1.displayName="Search");var ud=c.createContext(null);function _6(t){var e=t.children,n=t.onBatchResize,r=c.useRef(0),i=c.useRef([]),o=c.useContext(ud),A=c.useCallback(function(a,s,l){r.current+=1;var u=r.current;i.current.push({size:a,element:s,data:l}),Promise.resolve().then(function(){u===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(a,s,l)},[n,o]);return c.createElement(ud.Provider,{value:A},e)}var u1=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var A=o[i];n.call(r,A[1],A[0])}},e}()}(),dd=typeof window<"u"&&typeof document<"u"&&window.document===document,Es=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),$6=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Es):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),eR=2;function tR(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&a()}function A(){$6(o)}function a(){var s=Date.now();if(n){if(s-i<eR)return;r=!0}else n=!0,r=!1,setTimeout(A,e);i=s}return a}var nR=20,rR=["top","right","bottom","left","width","height","size","weight"],iR=typeof MutationObserver<"u",oR=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=tR(this.refresh.bind(this),nR)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return e.forEach(function(n){return n.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!dd||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),iR?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!dd||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=rR.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),d1=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Yo=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||Es},g1=ll(0,0,0,0);function ys(t){return parseFloat(t)||0}function Wp(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(r,i){var o=t["border-"+i+"-width"];return r+ys(o)},0)}function AR(t){for(var e=["top","right","bottom","left"],n={},r=0,i=e;r<i.length;r++){var o=i[r],A=t["padding-"+o];n[o]=ys(A)}return n}function aR(t){var e=t.getBBox();return ll(0,0,e.width,e.height)}function sR(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return g1;var r=Yo(t).getComputedStyle(t),i=AR(r),o=i.left+i.right,A=i.top+i.bottom,a=ys(r.width),s=ys(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+o)!==e&&(a-=Wp(r,"left","right")+o),Math.round(s+A)!==n&&(s-=Wp(r,"top","bottom")+A)),!cR(t)){var l=Math.round(a+o)-e,u=Math.round(s+A)-n;Math.abs(l)!==1&&(a-=l),Math.abs(u)!==1&&(s-=u)}return ll(i.left,i.top,a,s)}var lR=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof Yo(t).SVGGraphicsElement}:function(t){return t instanceof Yo(t).SVGElement&&typeof t.getBBox=="function"}}();function cR(t){return t===Yo(t).document.documentElement}function uR(t){return dd?lR(t)?aR(t):sR(t):g1}function dR(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,A=Object.create(o.prototype);return d1(A,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),A}function ll(t,e,n,r){return{x:t,y:e,width:n,height:r}}var gR=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ll(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=uR(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),fR=function(){function t(e,n){var r=dR(n);d1(this,{target:e,contentRect:r})}return t}(),hR=function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new u1,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Yo(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new gR(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Yo(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new fR(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),f1=typeof WeakMap<"u"?new WeakMap:new u1,h1=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=oR.getInstance(),r=new hR(e,n,this);f1.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){h1.prototype[t]=function(){var e;return(e=f1.get(this))[t].apply(e,arguments)}});var pR=function(){return typeof Es.ResizeObserver<"u"?Es.ResizeObserver:h1}(),ai=new Map;function p1(t){t.forEach(function(e){var n,r=e.target;(n=ai.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var m1=new pR(p1);process.env.NODE_ENV;process.env.NODE_ENV;function mR(t,e){ai.has(t)||(ai.set(t,new Set),m1.observe(t)),ai.get(t).add(e)}function VR(t,e){ai.has(t)&&(ai.get(t).delete(e),ai.get(t).size||(m1.unobserve(t),ai.delete(t)))}var vR=function(t){di(n,t);var e=gi(n);function n(){return fn(this,n),e.apply(this,arguments)}return hn(n,[{key:"render",value:function(){return this.props.children}}]),n}(c.Component);function CR(t,e){var n=t.children,r=t.disabled,i=c.useRef(null),o=c.useRef(null),A=c.useContext(ud),a=typeof n=="function",s=a?n(i):n,l=c.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!a&&c.isValidElement(s)&&Qi(s),d=u?io(s):null,g=Fi(d,i),p=function(){var C;return ja(i.current)||(i.current&&$e(i.current)==="object"?ja((C=i.current)===null||C===void 0?void 0:C.nativeElement):null)||ja(o.current)};c.useImperativeHandle(e,function(){return p()});var V=c.useRef(t);V.current=t;var v=c.useCallback(function(m){var C=V.current,w=C.onResize,S=C.data,M=m.getBoundingClientRect(),I=M.width,f=M.height,R=m.offsetWidth,q=m.offsetHeight,E=Math.floor(I),h=Math.floor(f);if(l.current.width!==E||l.current.height!==h||l.current.offsetWidth!==R||l.current.offsetHeight!==q){var y={width:E,height:h,offsetWidth:R,offsetHeight:q};l.current=y;var x=R===Math.round(I)?I:R,b=q===Math.round(f)?f:q,B=U(U({},y),{},{offsetWidth:x,offsetHeight:b});A==null||A(B,m,S),w&&Promise.resolve().then(function(){w(B,m)})}},[]);return c.useEffect(function(){var m=p();return m&&!r&&mR(m,v),function(){return VR(m,v)}},[i.current,r]),c.createElement(vR,{ref:o},u?c.cloneElement(s,{ref:g}):s)}var V1=c.forwardRef(CR);process.env.NODE_ENV!=="production"&&(V1.displayName="SingleObserver");var qR="rc-observer-key";function ER(t,e){var n=t.children,r=typeof n=="function"?[n]:Nr(n);return process.env.NODE_ENV!=="production"&&(r.length>1?xi(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&xi(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(i,o){var A=(i==null?void 0:i.key)||"".concat(qR,"-").concat(o);return c.createElement(V1,Fe({},t,{key:A,ref:o===0?e:void 0}),i)})}var fi=c.forwardRef(ER);process.env.NODE_ENV!=="production"&&(fi.displayName="ResizeObserver");fi.Collection=_6;var yR=`
|
|
590
|
+
}`)),T.useEffect(function(){var a=e.current,s=vs(a);si(A,"@ant-design-icons",{prepend:!o,csp:r,attachTo:s})},[])},S4=["icon","className","onClick","style","primaryColor","secondaryColor"],vA={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function I4(t){var e=t.primaryColor,n=t.secondaryColor;vA.primaryColor=e,vA.secondaryColor=n||Kv(e),vA.calculated=!!n}function b4(){return U({},vA)}var Jo=function(e){var n=e.icon,r=e.className,i=e.onClick,o=e.style,A=e.primaryColor,a=e.secondaryColor,s=qt(e,S4),l=c.useRef(),u=vA;if(A&&(u={primaryColor:A,secondaryColor:a||Kv(A)}),w4(l),E4(Lp(n),"icon should be icon definiton, but got ".concat(n)),!Lp(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=U(U({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),sd(d.icon,"svg-".concat(d.name),U(U({className:r,onClick:i,style:o,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s),{},{ref:l}))};Jo.displayName="IconReact";Jo.getTwoToneColors=b4;Jo.setTwoToneColors=I4;function zv(t){var e=Zv(t),n=$(e,2),r=n[0],i=n[1];return Jo.setTwoToneColors({primaryColor:r,secondaryColor:i})}function M4(){var t=Jo.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var R4=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];zv(ts.primary);var Mn=c.forwardRef(function(t,e){var n=t.className,r=t.icon,i=t.spin,o=t.rotate,A=t.tabIndex,a=t.onClick,s=t.twoToneColor,l=qt(t,R4),u=c.useContext(Nd),d=u.prefixCls,g=d===void 0?"anticon":d,p=u.rootClassName,V=se(p,g,Q(Q({},"".concat(g,"-").concat(r.name),!!r.name),"".concat(g,"-spin"),!!i||r.name==="loading"),n),v=A;v===void 0&&a&&(v=-1);var m=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,C=Zv(s),w=$(C,2),S=w[0],M=w[1];return c.createElement("span",Fe({role:"img","aria-label":r.name},l,{ref:e,tabIndex:v,onClick:a,className:V}),c.createElement(Jo,{icon:r,primaryColor:S,secondaryColor:M,style:m}))});Mn.displayName="AntdIcon";Mn.getTwoToneColor=M4;Mn.setTwoToneColor=zv;var x4=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:v4}))},ta=c.forwardRef(x4);process.env.NODE_ENV!=="production"&&(ta.displayName="CloseCircleFilled");const Jv=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:T.createElement(ta,null)}),e};function Cs(t,e,n){return se({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const tl=(t,e)=>e||t,sg=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var r,i;const{variant:o,[t]:A}=c.useContext(Qt),a=c.useContext(t4),s=A==null?void 0:A.variant;let l;typeof e<"u"?l=e:n===!1?l="borderless":l=(i=(r=a??s)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const u=OE.includes(l);return[l,u]};function Wv(t,e){const n=T.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var i,o,A,a;!((i=t.current)===null||i===void 0)&&i.input&&((o=t.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((A=t.current)===null||A===void 0)&&A.input.hasAttribute("value"))&&((a=t.current)===null||a===void 0||a.input.removeAttribute("value"))}))};return T.useEffect(()=>(e&&r(),()=>n.current.forEach(i=>{i&&clearTimeout(i)})),[]),r}function T4(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var B4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const na=T.forwardRef((t,e)=>{const{prefixCls:n,bordered:r=!0,status:i,size:o,disabled:A,onBlur:a,onFocus:s,suffix:l,allowClear:u,addonAfter:d,addonBefore:g,className:p,style:V,styles:v,rootClassName:m,onChange:C,classNames:w,variant:S}=t,M=B4(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:Ve}=an("Input");Ve(!("bordered"in t),"bordered","variant")}const{getPrefixCls:I,direction:f,allowClear:R,autoComplete:q,className:E,style:h,classNames:y,styles:x}=Jr("input"),b=I("input",n),B=T.useRef(null),O=Ur(b),[N,F,j]=mv(b,m),[Y]=Vv(b,O),{compactSize:H,compactItemClassnames:L}=zo(b,f),G=ki(Ve=>{var Be;return(Be=o??H)!==null&&Be!==void 0?Be:Ve}),_=T.useContext(li),K=A??_,{status:W,hasFeedback:z,feedbackIcon:te}=T.useContext(Fr),X=tl(W,i),Ae=T4(t)||!!z,le=T.useRef(Ae);if(process.env.NODE_ENV!=="production"){const Ve=an("Input");T.useEffect(()=>{var Be;Ae&&!le.current&&process.env.NODE_ENV!=="production"&&Ve(document.activeElement===((Be=B.current)===null||Be===void 0?void 0:Be.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),le.current=Ae},[Ae])}const ue=Wv(B,!0),ne=Ve=>{ue(),a==null||a(Ve)},me=Ve=>{ue(),s==null||s(Ve)},Z=Ve=>{ue(),C==null||C(Ve)},de=(z||l)&&T.createElement(T.Fragment,null,l,z&&te),ce=Jv(u??R),[ye,Ie]=sg("input",S,r);return N(Y(T.createElement(h4,Object.assign({ref:kr(e,B),prefixCls:b,autoComplete:q},M,{disabled:K,onBlur:ne,onFocus:me,style:Object.assign(Object.assign({},h),V),styles:Object.assign(Object.assign({},x),v),suffix:de,allowClear:ce,className:se(p,m,j,O,L,E),onChange:Z,addonBefore:g&&T.createElement(NA,{form:!0,space:!0},g),addonAfter:d&&T.createElement(NA,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},w),y),{input:se({[`${b}-sm`]:G==="small",[`${b}-lg`]:G==="large",[`${b}-rtl`]:f==="rtl"},w==null?void 0:w.input,y.input,F),variant:se({[`${b}-${ye}`]:Ie},Cs(b,X)),affixWrapper:se({[`${b}-affix-wrapper-sm`]:G==="small",[`${b}-affix-wrapper-lg`]:G==="large",[`${b}-affix-wrapper-rtl`]:f==="rtl"},F),wrapper:se({[`${b}-group-rtl`]:f==="rtl"},F),groupWrapper:se({[`${b}-group-wrapper-sm`]:G==="small",[`${b}-group-wrapper-lg`]:G==="large",[`${b}-group-wrapper-rtl`]:f==="rtl",[`${b}-group-wrapper-${ye}`]:Ie},Cs(`${b}-group-wrapper`,X,z),F)})}))))});process.env.NODE_ENV!=="production"&&(na.displayName="Input");const O4=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},D4=bn(["Input","OTP"],t=>{const e=Zt(t,Zs(t));return[O4(e)]},zs);var N4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const F4=c.forwardRef((t,e)=>{const{value:n,onChange:r,onActiveChange:i,index:o,mask:A}=t,a=N4(t,["value","onChange","onActiveChange","index","mask"]),s=n&&typeof A=="string"?A:n,l=V=>{r(o,V.target.value)},u=c.useRef(null);c.useImperativeHandle(e,()=>u.current);const d=()=>{Lt(()=>{var V;const v=(V=u.current)===null||V===void 0?void 0:V.input;document.activeElement===v&&v&&v.select()})},g=V=>{const{key:v,ctrlKey:m,metaKey:C}=V;v==="ArrowLeft"?i(o-1):v==="ArrowRight"?i(o+1):v==="z"&&(m||C)&&V.preventDefault(),d()},p=V=>{V.key==="Backspace"&&!n&&i(o-1),d()};return c.createElement(na,Object.assign({type:A===!0?"password":"text"},a,{ref:u,value:s,onInput:l,onFocus:d,onKeyDown:g,onKeyUp:p,onMouseDown:d,onMouseUp:d}))});var Q4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Ta(t){return(t||"").split("")}const k4=c.forwardRef((t,e)=>{const{prefixCls:n,length:r=6,size:i,defaultValue:o,value:A,onChange:a,formatter:s,separator:l,variant:u,disabled:d,status:g,autoFocus:p,mask:V,type:v,onInput:m,inputMode:C}=t,w=Q4(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]);if(process.env.NODE_ENV!=="production"){const z=an("Input.OTP");process.env.NODE_ENV!=="production"&&z(!(typeof V=="string"&&V.length>1),"usage","`mask` prop should be a single character.")}const{getPrefixCls:S,direction:M}=c.useContext(Qt),I=S("otp",n),f=Oi(w,{aria:!0,data:!0,attr:!0}),R=Ur(I),[q,E,h]=D4(I,R),y=ki(z=>i??z),x=c.useContext(Fr),b=tl(x.status,g),B=c.useMemo(()=>Object.assign(Object.assign({},x),{status:b,hasFeedback:!1,feedbackIcon:null}),[x,b]),O=c.useRef(null),N=c.useRef({});c.useImperativeHandle(e,()=>({focus:()=>{var z;(z=N.current[0])===null||z===void 0||z.focus()},blur:()=>{var z;for(let te=0;te<r;te+=1)(z=N.current[te])===null||z===void 0||z.blur()},nativeElement:O.current}));const F=z=>s?s(z):z,[j,Y]=c.useState(Ta(F(o||"")));c.useEffect(()=>{A!==void 0&&Y(Ta(A))},[A]);const H=nn(z=>{Y(z),m&&m(z),a&&z.length===r&&z.every(te=>te)&&z.some((te,X)=>j[X]!==te)&&a(z.join(""))}),L=nn((z,te)=>{let X=be(j);for(let le=0;le<z;le+=1)X[le]||(X[le]="");te.length<=1?X[z]=te:X=X.slice(0,z).concat(Ta(te)),X=X.slice(0,r);for(let le=X.length-1;le>=0&&!X[le];le-=1)X.pop();const Ae=F(X.map(le=>le||" ").join(""));return X=Ta(Ae).map((le,ue)=>le===" "&&!X[ue]?X[ue]:le),X}),G=(z,te)=>{var X;const Ae=L(z,te),le=Math.min(z+te.length,r-1);le!==z&&Ae[z]!==void 0&&((X=N.current[le])===null||X===void 0||X.focus()),H(Ae)},_=z=>{var te;(te=N.current[z])===null||te===void 0||te.focus()},K={variant:u,disabled:d,status:b,mask:V,type:v,inputMode:C},W=z=>{const te=typeof l=="function"?l(z):l;return te?c.createElement("span",{className:`${I}-separator`},te):null};return q(c.createElement("div",Object.assign({},f,{ref:O,className:se(I,{[`${I}-sm`]:y==="small",[`${I}-lg`]:y==="large",[`${I}-rtl`]:M==="rtl"},h,E)}),c.createElement(Fr.Provider,{value:B},Array.from({length:r}).map((z,te)=>{const X=`otp-${te}`,Ae=j[te]||"";return c.createElement(c.Fragment,{key:X},c.createElement(F4,Object.assign({ref:le=>{N.current[te]=le},index:te,size:y,htmlSize:1,className:`${I}-input`,onChange:G,value:Ae,onActiveChange:_,autoFocus:te===0&&p},K)),l&&te<r-1&&W(te))}))))});var U4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},G4=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:U4}))},Xv=c.forwardRef(G4);process.env.NODE_ENV!=="production"&&(Xv.displayName="EyeInvisibleOutlined");var j4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},P4=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:j4}))},_v=c.forwardRef(P4);process.env.NODE_ENV!=="production"&&(_v.displayName="EyeOutlined");var L4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Y4=t=>t?c.createElement(_v,null):c.createElement(Xv,null),H4={click:"onClick",hover:"onMouseOver"},$v=c.forwardRef((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:i=!0,iconRender:o=Y4}=t,A=c.useContext(li),a=n??A,s=typeof i=="object"&&i.visible!==void 0,[l,u]=T.useState(()=>s?i.visible:!1),d=T.useRef(null);c.useEffect(()=>{s&&u(i.visible)},[s,i]);const g=Wv(d),p=()=>{var h;if(a)return;l&&g();const y=!l;u(y),typeof i=="object"&&((h=i.onVisibleChange)===null||h===void 0||h.call(i,y))},V=h=>{const y=H4[r]||"",x=o(l),b={[y]:p,className:`${h}-icon`,key:"passwordIcon",onMouseDown:B=>{B.preventDefault()},onMouseUp:B=>{B.preventDefault()}};return c.cloneElement(c.isValidElement(x)?x:c.createElement("span",null,x),b)},{className:v,prefixCls:m,inputPrefixCls:C,size:w}=t,S=L4(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:M}=c.useContext(Qt),I=M("input",C),f=M("input-password",m),R=i&&V(f),q=se(f,v,{[`${f}-${w}`]:!!w}),E=Object.assign(Object.assign({},$n(S,["suffix","iconRender","visibilityToggle"])),{type:l?"text":"password",className:q,prefixCls:I,suffix:R});return w&&(E.size=w),c.createElement(na,Object.assign({ref:kr(e,d)},E))});process.env.NODE_ENV!=="production"&&($v.displayName="Input.Password");var K4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Z4=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:K4}))},lg=c.forwardRef(Z4);process.env.NODE_ENV!=="production"&&(lg.displayName="SearchOutlined");var z4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const e1=c.createContext(void 0),J4=t=>{const{getPrefixCls:e,direction:n}=c.useContext(Qt),{prefixCls:r,size:i,className:o}=t,A=z4(t,["prefixCls","size","className"]),a=e("btn-group",r),[,,s]=lr(),l=c.useMemo(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]);if(process.env.NODE_ENV!=="production"){const d=an("Button.Group");d.deprecated(!1,"Button.Group","Space.Compact"),process.env.NODE_ENV!=="production"&&d(!i||["large","small","middle"].includes(i),"usage","Invalid prop `size`.")}const u=se(a,{[`${a}-${l}`]:l,[`${a}-rtl`]:n==="rtl"},o,s);return c.createElement(e1.Provider,{value:i},c.createElement("div",Object.assign({},A,{className:u})))},Hp=/^[\u4E00-\u9FA5]{2}$/,ld=Hp.test.bind(Hp);function W4(t){return t==="danger"?{danger:!0}:{type:t}}function Kp(t){return typeof t=="string"}function Ba(t){return t==="text"||t==="link"}function X4(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&Kp(t.type)&&ld(t.props.children)?Dr(t,{children:t.props.children.split("").join(n)}):Kp(t)?ld(t)?T.createElement("span",null,t.split("").join(n)):T.createElement("span",null,t):xv(t)?T.createElement("span",null,t):t}function _4(t,e){let n=!1;const r=[];return T.Children.forEach(t,i=>{const o=typeof i,A=o==="string"||o==="number";if(n&&A){const a=r.length-1,s=r[a];r[a]=`${s}${i}`}else r.push(i);n=A}),T.Children.map(r,i=>X4(i,e))}["default","primary","danger"].concat(be(Ti));var $4={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},e6=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:$4}))},nl=c.forwardRef(e6);process.env.NODE_ENV!=="production"&&(nl.displayName="LoadingOutlined");const cd=T.forwardRef((t,e)=>{const{className:n,style:r,children:i,prefixCls:o}=t,A=se(`${o}-icon`,n);return T.createElement("span",{ref:e,className:A,style:r},i)}),Zp=T.forwardRef((t,e)=>{const{prefixCls:n,className:r,style:i,iconClassName:o}=t,A=se(`${n}-loading-icon`,r);return T.createElement(cd,{prefixCls:n,className:A,style:i,ref:e},T.createElement(nl,{className:o}))}),rc=()=>({width:0,opacity:0,transform:"scale(0)"}),ic=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),t6=t=>{const{prefixCls:e,loading:n,existIcon:r,className:i,style:o,mount:A}=t,a=!!n;return r?T.createElement(Zp,{prefixCls:e,className:i,style:o}):T.createElement(oo,{visible:a,motionName:`${e}-loading-icon-motion`,motionAppear:!A,motionEnter:!A,motionLeave:!A,removeOnLeave:!0,onAppearStart:rc,onAppearActive:ic,onEnterStart:rc,onEnterActive:ic,onLeaveStart:ic,onLeaveActive:rc},(s,l)=>{let{className:u,style:d}=s;const g=Object.assign(Object.assign({},o),d);return T.createElement(Zp,{prefixCls:e,className:se(i,u),style:g,ref:l})})},zp=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),n6=t=>{const{componentCls:e,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:o}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(r).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},zp(`${e}-primary`,i),zp(`${e}-danger`,o)]}};var r6=["b"],i6=["v"],oc=function(e){return Math.round(Number(e||0))},o6=function(e){if(e instanceof Pt)return e;if(e&&$e(e)==="object"&&"h"in e&&"b"in e){var n=e,r=n.b,i=qt(n,r6);return U(U({},i),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},ci=function(t){di(n,t);var e=gi(n);function n(r){return fn(this,n),e.call(this,o6(r))}return hn(n,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=oc(i.s*100),A=oc(i.b*100),a=oc(i.h),s=i.a,l="hsb(".concat(a,", ").concat(o,"%, ").concat(A,"%)"),u="hsba(".concat(a,", ").concat(o,"%, ").concat(A,"%, ").concat(s.toFixed(s===0?0:2),")");return s===1?l:u}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,A=qt(i,i6);return U(U({},A),{},{b:o,a:this.a})}}]),n}(Pt),A6="rc-color-picker",xo=function(e){return e instanceof ci?e:new ci(e)},a6=xo("#1677ff"),t1=function(e){var n=e.offset,r=e.targetRef,i=e.containerRef,o=e.color,A=e.type,a=i.current.getBoundingClientRect(),s=a.width,l=a.height,u=r.current.getBoundingClientRect(),d=u.width,g=u.height,p=d/2,V=g/2,v=(n.x+p)/s,m=1-(n.y+V)/l,C=o.toHsb(),w=v,S=(n.x+p)/s*360;if(A)switch(A){case"hue":return xo(U(U({},C),{},{h:S<=0?0:S}));case"alpha":return xo(U(U({},C),{},{a:w<=0?0:w}))}return xo({h:C.h,s:v<=0?0:v,b:m>=1?1:m,a:C.a})},n1=function(e,n){var r=e.toHsb();switch(n){case"hue":return{x:r.h/360*100,y:50};case"alpha":return{x:e.a*100,y:50};default:return{x:r.s*100,y:(1-r.b)*100}}},s6=function(e){var n=e.color,r=e.prefixCls,i=e.className,o=e.style,A=e.onClick,a="".concat(r,"-color-block");return T.createElement("div",{className:se(a,i),style:o,onClick:A},T.createElement("div",{className:"".concat(a,"-inner"),style:{background:n}}))};function l6(t){var e="touches"in t?t.touches[0]:t,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:e.pageX-n,pageY:e.pageY-r}}function r1(t){var e=t.targetRef,n=t.containerRef,r=t.direction,i=t.onDragChange,o=t.onDragChangeComplete,A=t.calculate,a=t.color,s=t.disabledDrag,l=T.useState({x:0,y:0}),u=$(l,2),d=u[0],g=u[1],p=T.useRef(null),V=T.useRef(null);T.useEffect(function(){g(A())},[a]),T.useEffect(function(){return function(){document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",V.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",V.current),p.current=null,V.current=null}},[]);var v=function(M){var I=l6(M),f=I.pageX,R=I.pageY,q=n.current.getBoundingClientRect(),E=q.x,h=q.y,y=q.width,x=q.height,b=e.current.getBoundingClientRect(),B=b.width,O=b.height,N=B/2,F=O/2,j=Math.max(0,Math.min(f-E,y))-N,Y=Math.max(0,Math.min(R-h,x))-F,H={x:j,y:r==="x"?d.y:Y};if(B===0&&O===0||B!==O)return!1;i==null||i(H)},m=function(M){M.preventDefault(),v(M)},C=function(M){M.preventDefault(),document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",V.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",V.current),p.current=null,V.current=null,o==null||o()},w=function(M){document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",V.current),!s&&(v(M),document.addEventListener("mousemove",m),document.addEventListener("mouseup",C),document.addEventListener("touchmove",m),document.addEventListener("touchend",C),p.current=m,V.current=C)};return[d,w]}var i1=function(e){var n=e.size,r=n===void 0?"default":n,i=e.color,o=e.prefixCls;return T.createElement("div",{className:se("".concat(o,"-handler"),Q({},"".concat(o,"-handler-sm"),r==="small")),style:{backgroundColor:i}})},o1=function(e){var n=e.children,r=e.style,i=e.prefixCls;return T.createElement("div",{className:"".concat(i,"-palette"),style:U({position:"relative"},r)},n)},A1=T.forwardRef(function(t,e){var n=t.children,r=t.x,i=t.y;return T.createElement("div",{ref:e,style:{position:"absolute",left:"".concat(r,"%"),top:"".concat(i,"%"),zIndex:1,transform:"translate(-50%, -50%)"}},n)}),c6=function(e){var n=e.color,r=e.onChange,i=e.prefixCls,o=e.onChangeComplete,A=e.disabled,a=T.useRef(),s=T.useRef(),l=T.useRef(n),u=nn(function(v){var m=t1({offset:v,targetRef:s,containerRef:a,color:n});l.current=m,r(m)}),d=r1({color:n,containerRef:a,targetRef:s,calculate:function(){return n1(n)},onDragChange:u,onDragChangeComplete:function(){return o==null?void 0:o(l.current)},disabledDrag:A}),g=$(d,2),p=g[0],V=g[1];return T.createElement("div",{ref:a,className:"".concat(i,"-select"),onMouseDown:V,onTouchStart:V},T.createElement(o1,{prefixCls:i},T.createElement(A1,{x:p.x,y:p.y,ref:s},T.createElement(i1,{color:n.toRgbString(),prefixCls:i})),T.createElement("div",{className:"".concat(i,"-saturation"),style:{backgroundColor:"hsl(".concat(n.toHsb().h,",100%, 50%)"),backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},u6=function(e,n){var r=Tn(e,{value:n}),i=$(r,2),o=i[0],A=i[1],a=T.useMemo(function(){return xo(o)},[o]);return[a,A]},d6=function(e){var n=e.colors,r=e.children,i=e.direction,o=i===void 0?"to right":i,A=e.type,a=e.prefixCls,s=T.useMemo(function(){return n.map(function(l,u){var d=xo(l);return A==="alpha"&&u===n.length-1&&(d=new ci(d.setA(1))),d.toRgbString()}).join(",")},[n,A]);return T.createElement("div",{className:"".concat(a,"-gradient"),style:{position:"absolute",inset:0,background:"linear-gradient(".concat(o,", ").concat(s,")")}},r)},g6=function(e){var n=e.prefixCls,r=e.colors,i=e.disabled,o=e.onChange,A=e.onChangeComplete,a=e.color,s=e.type,l=T.useRef(),u=T.useRef(),d=T.useRef(a),g=function(I){return s==="hue"?I.getHue():I.a*100},p=nn(function(M){var I=t1({offset:M,targetRef:u,containerRef:l,color:a,type:s});d.current=I,o(g(I))}),V=r1({color:a,targetRef:u,containerRef:l,calculate:function(){return n1(a,s)},onDragChange:p,onDragChangeComplete:function(){A(g(d.current))},direction:"x",disabledDrag:i}),v=$(V,2),m=v[0],C=v[1],w=T.useMemo(function(){if(s==="hue"){var M=a.toHsb();M.s=1,M.b=1,M.a=1;var I=new ci(M);return I}return a},[a,s]),S=T.useMemo(function(){return r.map(function(M){return"".concat(M.color," ").concat(M.percent,"%")})},[r]);return T.createElement("div",{ref:l,className:se("".concat(n,"-slider"),"".concat(n,"-slider-").concat(s)),onMouseDown:C,onTouchStart:C},T.createElement(o1,{prefixCls:n},T.createElement(A1,{x:m.x,y:m.y,ref:u},T.createElement(i1,{size:"small",color:w.toHexString(),prefixCls:n})),T.createElement(d6,{colors:S,type:s,prefixCls:n})))};function f6(t){return c.useMemo(function(){var e=t||{},n=e.slider;return[n||g6]},[t])}var h6=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],p6=T.forwardRef(function(t,e){var n=t.value,r=t.defaultValue,i=t.prefixCls,o=i===void 0?A6:i,A=t.onChange,a=t.onChangeComplete,s=t.className,l=t.style,u=t.panelRender,d=t.disabledAlpha,g=d===void 0?!1:d,p=t.disabled,V=p===void 0?!1:p,v=t.components,m=f6(v),C=$(m,1),w=C[0],S=u6(r||a6,n),M=$(S,2),I=M[0],f=M[1],R=T.useMemo(function(){return I.setA(1).toRgbString()},[I]),q=function(Y,H){n||f(Y),A==null||A(Y,H)},E=function(Y){return new ci(I.setHue(Y))},h=function(Y){return new ci(I.setA(Y/100))},y=function(Y){q(E(Y),{type:"hue",value:Y})},x=function(Y){q(h(Y),{type:"alpha",value:Y})},b=function(Y){a&&a(E(Y))},B=function(Y){a&&a(h(Y))},O=se("".concat(o,"-panel"),s,Q({},"".concat(o,"-panel-disabled"),V)),N={prefixCls:o,disabled:V,color:I},F=T.createElement(T.Fragment,null,T.createElement(c6,Fe({onChange:q},N,{onChangeComplete:a})),T.createElement("div",{className:"".concat(o,"-slider-container")},T.createElement("div",{className:se("".concat(o,"-slider-group"),Q({},"".concat(o,"-slider-group-disabled-alpha"),g))},T.createElement(w,Fe({},N,{type:"hue",colors:h6,min:0,max:359,value:I.getHue(),onChange:y,onChangeComplete:b})),!g&&T.createElement(w,Fe({},N,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:R}],min:0,max:100,value:I.a*100,onChange:x,onChangeComplete:B}))),T.createElement(s6,{color:I.toRgbString(),prefixCls:o})));return T.createElement("div",{className:O,style:l,ref:e},typeof u=="function"?u(F):F)});process.env.NODE_ENV!=="production"&&(p6.displayName="ColorPicker");const m6=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",V6=(t,e)=>t?m6(t,e):"";let v6=function(){function t(e){fn(this,t);var n;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)===null||n===void 0?void 0:n.map(i=>({color:new t(i.color),percent:i.percent})),this.cleared=e.cleared;return}const r=Array.isArray(e);r&&e.length?(this.colors=e.map(i=>{let{color:o,percent:A}=i;return{color:new t(o),percent:A}}),this.metaColor=new ci(this.colors[0].color.metaColor)):this.metaColor=new ci(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return hn(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return V6(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,i)=>{const o=n.colors[i];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])}();var C6={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"},q6=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:C6}))},qs=c.forwardRef(q6);process.env.NODE_ENV!=="production"&&(qs.displayName="RightOutlined");var ot={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224};const Ac=()=>({height:0,opacity:0}),Jp=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},E6=t=>({height:t?t.offsetHeight:0}),ac=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",y6=function(){return{motionName:`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:RA}-motion-collapse`,onAppearStart:Ac,onEnterStart:Ac,onAppearActive:Jp,onEnterActive:Jp,onLeaveStart:E6,onLeaveActive:Ac,onAppearEnd:ac,onEnterEnd:ac,onLeaveEnd:ac,motionDeadline:500}},rl=(t,e,n)=>n!==void 0?n:`${t}-${e}`,w6=(t,e)=>{const{r:n,g:r,b:i,a:o}=t.toRgb(),A=new ci(t.toRgbString()).onBackground(e).toHsv();return o<=.5?A.v>.5:n*.299+r*.587+i*.114>192},a1=t=>{const{paddingInline:e,onlyIconSize:n}=t;return Zt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},s1=t=>{var e,n,r,i,o,A;const a=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,s=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,l=(r=t.contentFontSizeLG)!==null&&r!==void 0?r:t.fontSizeLG,u=(i=t.contentLineHeight)!==null&&i!==void 0?i:ka(a),d=(o=t.contentLineHeightSM)!==null&&o!==void 0?o:ka(s),g=(A=t.contentLineHeightLG)!==null&&A!==void 0?A:ka(l),p=w6(new v6(t.colorBgSolid),"#fff")?"#000":"#fff",V=Ti.reduce((v,m)=>Object.assign(Object.assign({},v),{[`${m}ShadowColor`]:`0 ${ve(t.controlOutlineWidth)} 0 ${cA(t[`${m}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},V),{fontWeight:400,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:p,contentFontSize:a,contentFontSizeSM:s,contentFontSizeLG:l,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:g,paddingBlock:Math.max((t.controlHeight-a*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-s*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-l*g)/2-t.lineWidth,0)})},S6=t=>{const{componentCls:e,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:A,marginXS:a,calc:s}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:t.marginXS,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${ve(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:ZA(),"> a":{color:"currentColor"},"&:not(:disabled)":is(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"},[`&${e}-round`]:{width:"auto"}},[`&${e}-loading`]:{opacity:i,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(l=>`${l} ${o} ${A}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:s(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:s(a).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:s(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:s(a).mul(-1).equal()}}}}}},l1=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),I6=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),b6=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.calc(t.controlHeight).div(2).equal(),paddingInlineEnd:t.calc(t.controlHeight).div(2).equal()}),M6=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),cg=(t,e,n,r,i,o,A,a)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:r||void 0,boxShadow:"none"},l1(t,Object.assign({background:e},A),Object.assign({background:e},a))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),R6=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},M6(t))}),x6=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),il=(t,e,n,r)=>{const o=r&&["link","text"].includes(r)?x6:R6;return Object.assign(Object.assign({},o(t)),l1(t.componentCls,e,n))},ol=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},il(t,r,i))}),Al=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},il(t,r,i))}),al=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),sl=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},il(t,n,r))}),Di=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},il(t,r,i,n))}),T6=t=>{const{componentCls:e}=t;return Ti.reduce((n,r)=>{const i=t[`${r}6`],o=t[`${r}1`],A=t[`${r}5`],a=t[`${r}2`],s=t[`${r}3`],l=t[`${r}7`];return Object.assign(Object.assign({},n),{[`&${e}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:t[`${r}ShadowColor`]},ol(t,t.colorTextLightSolid,i,{background:A},{background:l})),Al(t,i,t.colorBgContainer,{color:A,borderColor:A,background:t.colorBgContainer},{color:l,borderColor:l,background:t.colorBgContainer})),al(t)),sl(t,o,{background:a},{background:s})),Di(t,i,"link",{color:A},{color:l})),Di(t,i,"text",{color:A,background:o},{color:l,background:s}))})},{})},B6=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},ol(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),al(t)),sl(t,t.colorFillTertiary,{background:t.colorFillSecondary},{background:t.colorFill})),Di(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),cg(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),O6=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},Al(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),al(t)),sl(t,t.colorPrimaryBg,{background:t.colorPrimaryBgHover},{background:t.colorPrimaryBorder})),Di(t,t.colorLink,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),cg(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),D6=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},ol(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),Al(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),al(t)),sl(t,t.colorErrorBg,{background:t.colorErrorBgFilledHover},{background:t.colorErrorBgActive})),Di(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Di(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),cg(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),N6=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:B6(t),[`${e}-color-primary`]:O6(t),[`${e}-color-dangerous`]:D6(t)},T6(t))},F6=t=>Object.assign(Object.assign(Object.assign(Object.assign({},Al(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Di(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),ol(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Di(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),ug=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,controlHeight:r,fontSize:i,borderRadius:o,buttonPaddingHorizontal:A,iconCls:a,buttonPaddingVertical:s,buttonIconOnlyFontSize:l}=t;return[{[e]:{fontSize:i,height:r,padding:`${ve(s)} ${ve(A)}`,borderRadius:o,[`&${n}-icon-only`]:{width:r,[a]:{fontSize:l}}}},{[`${n}${n}-circle${e}`]:I6(t)},{[`${n}${n}-round${e}`]:b6(t)}]},Q6=t=>{const e=Zt(t,{fontSize:t.contentFontSize});return ug(e,t.componentCls)},k6=t=>{const e=Zt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return ug(e,`${t.componentCls}-sm`)},U6=t=>{const e=Zt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return ug(e,`${t.componentCls}-lg`)},G6=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},j6=bn("Button",t=>{const e=a1(t);return[S6(e),Q6(e),k6(e),U6(e),G6(e),N6(e),F6(e),n6(e)]},s1,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function P6(t,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function L6(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Y6(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},P6(t,e)),L6(t.componentCls,e))}}const H6=t=>{const{componentCls:e,colorPrimaryHover:n,lineWidth:r,calc:i}=t,o=i(r).mul(-1).equal(),A=a=>{const s=`${e}-compact${a?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${s} + ${s}::before`]:{position:"absolute",top:a?o:0,insetInlineStart:a?0:o,backgroundColor:n,content:'""',width:a?"100%":r,height:a?r:"100%"}}};return Object.assign(Object.assign({},A()),A(!0))},K6=NV(["Button","compact"],t=>{const e=a1(t);return[zd(e),Y6(e),H6(e)]},s1);var Z6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function z6(t){if(typeof t=="object"&&t){let e=t==null?void 0:t.delay;return e=!Number.isNaN(e)&&typeof e=="number"?e:0,{loading:e<=0,delay:e}}return{loading:!!t,delay:0}}const J6={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["primary","link"],text:["default","text"]},W6=T.forwardRef((t,e)=>{var n,r;const{loading:i=!1,prefixCls:o,color:A,variant:a,type:s,danger:l=!1,shape:u="default",size:d,styles:g,disabled:p,className:V,rootClassName:v,children:m,icon:C,iconPosition:w="start",ghost:S=!1,block:M=!1,htmlType:I="button",classNames:f,style:R={},autoInsertSpace:q,autoFocus:E}=t,h=Z6(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),y=s||"default",[x,b]=T.useMemo(()=>{if(A&&a)return[A,a];const Re=J6[y]||[];return l?["danger",Re[1]]:Re},[s,A,a,l]),O=x==="danger"?"dangerous":x,{getPrefixCls:N,direction:F,autoInsertSpace:j,className:Y,style:H,classNames:L,styles:G}=Jr("button"),_=(n=q??j)!==null&&n!==void 0?n:!0,K=N("btn",o),[W,z,te]=j6(K),X=T.useContext(li),Ae=p??X,le=T.useContext(e1),ue=T.useMemo(()=>z6(i),[i]),[ne,me]=T.useState(ue.loading),[Z,de]=T.useState(!1),ce=T.useRef(null),ye=Fi(e,ce),Ie=T.Children.count(m)===1&&!C&&!Ba(b),Ve=T.useRef(!0);T.useEffect(()=>(Ve.current=!1,()=>{Ve.current=!0}),[]),T.useEffect(()=>{let Re=null;ue.delay>0?Re=setTimeout(()=>{Re=null,me(!0)},ue.delay):me(ue.loading);function At(){Re&&(clearTimeout(Re),Re=null)}return At},[ue]),T.useEffect(()=>{if(!ce.current||!_)return;const Re=ce.current.textContent||"";Ie&&ld(Re)?Z||de(!0):Z&&de(!1)}),T.useEffect(()=>{E&&ce.current&&ce.current.focus()},[]);const Be=T.useCallback(Re=>{var At;if(ne||Ae){Re.preventDefault();return}(At=t.onClick)===null||At===void 0||At.call(t,("href"in t,Re))},[t.onClick,ne,Ae]);if(process.env.NODE_ENV!=="production"){const Re=an("Button");process.env.NODE_ENV!=="production"&&Re(!(typeof C=="string"&&C.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${C}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&Re(!(S&&Ba(b)),"usage","`link` or `text` button can't be a `ghost` button.")}const{compactSize:Qe,compactItemClassnames:ke}=zo(K,F),Se={large:"lg",small:"sm",middle:void 0},pe=ki(Re=>{var At,at;return(at=(At=d??Qe)!==null&&At!==void 0?At:le)!==null&&at!==void 0?at:Re}),Me=pe&&(r=Se[pe])!==null&&r!==void 0?r:"",Le=ne?"loading":C,et=$n(h,["navigate"]),nt=se(K,z,te,{[`${K}-${u}`]:u!=="default"&&u,[`${K}-${y}`]:y,[`${K}-dangerous`]:l,[`${K}-color-${O}`]:O,[`${K}-variant-${b}`]:b,[`${K}-${Me}`]:Me,[`${K}-icon-only`]:!m&&m!==0&&!!Le,[`${K}-background-ghost`]:S&&!Ba(b),[`${K}-loading`]:ne,[`${K}-two-chinese-chars`]:Z&&_&&!ne,[`${K}-block`]:M,[`${K}-rtl`]:F==="rtl",[`${K}-icon-end`]:w==="end"},ke,V,v,Y),je=Object.assign(Object.assign({},H),R),Ee=se(f==null?void 0:f.icon,L.icon),We=Object.assign(Object.assign({},(g==null?void 0:g.icon)||{}),G.icon||{}),ct=C&&!ne?T.createElement(cd,{prefixCls:K,className:Ee,style:We},C):i&&typeof i=="object"&&i.icon?T.createElement(cd,{prefixCls:K,className:Ee,style:We},i.icon):T.createElement(t6,{existIcon:!!C,prefixCls:K,loading:ne,mount:Ve.current}),_e=m||m===0?_4(m,Ie&&_):null;if(et.href!==void 0)return W(T.createElement("a",Object.assign({},et,{className:se(nt,{[`${K}-disabled`]:Ae}),href:Ae?void 0:et.href,style:je,onClick:Be,ref:ye,tabIndex:Ae?-1:0}),ct,_e));let Oe=T.createElement("button",Object.assign({},h,{type:I,className:nt,style:je,onClick:Be,disabled:Ae,ref:ye}),ct,_e,ke&&T.createElement(K6,{prefixCls:K}));return Ba(b)||(Oe=T.createElement(_s,{component:"Button",disabled:ne},Oe)),W(Oe)}),ro=W6;ro.Group=J4;ro.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(ro.displayName="Button");var X6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const c1=c.forwardRef((t,e)=>{const{prefixCls:n,inputPrefixCls:r,className:i,size:o,suffix:A,enterButton:a=!1,addonAfter:s,loading:l,disabled:u,onSearch:d,onChange:g,onCompositionStart:p,onCompositionEnd:V}=t,v=X6(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:m,direction:C}=c.useContext(Qt),w=c.useRef(!1),S=m("input-search",n),M=m("input",r),{compactSize:I}=zo(S,C),f=ki(L=>{var G;return(G=o??I)!==null&&G!==void 0?G:L}),R=c.useRef(null),q=L=>{L!=null&&L.target&&L.type==="click"&&d&&d(L.target.value,L,{source:"clear"}),g==null||g(L)},E=L=>{var G;document.activeElement===((G=R.current)===null||G===void 0?void 0:G.input)&&L.preventDefault()},h=L=>{var G,_;d&&d((_=(G=R.current)===null||G===void 0?void 0:G.input)===null||_===void 0?void 0:_.value,L,{source:"input"})},y=L=>{w.current||l||h(L)},x=typeof a=="boolean"?c.createElement(lg,null):null,b=`${S}-button`;let B;const O=a||{},N=O.type&&O.type.__ANT_BUTTON===!0;N||O.type==="button"?B=Dr(O,Object.assign({onMouseDown:E,onClick:L=>{var G,_;(_=(G=O==null?void 0:O.props)===null||G===void 0?void 0:G.onClick)===null||_===void 0||_.call(G,L),h(L)},key:"enterButton"},N?{className:b,size:f}:{})):B=c.createElement(ro,{className:b,type:a?"primary":void 0,size:f,disabled:u,key:"enterButton",onMouseDown:E,onClick:h,loading:l,icon:x},a),s&&(B=[B,Dr(s,{key:"addonAfter"})]);const F=se(S,{[`${S}-rtl`]:C==="rtl",[`${S}-${f}`]:!!f,[`${S}-with-button`]:!!a},i),j=Object.assign(Object.assign({},v),{className:F,prefixCls:M,type:"search"}),Y=L=>{w.current=!0,p==null||p(L)},H=L=>{w.current=!1,V==null||V(L)};return c.createElement(na,Object.assign({ref:kr(R,e),onPressEnter:y},j,{size:f,onCompositionStart:Y,onCompositionEnd:H,addonAfter:B,suffix:A,onChange:q,disabled:u}))});process.env.NODE_ENV!=="production"&&(c1.displayName="Search");var ud=c.createContext(null);function _6(t){var e=t.children,n=t.onBatchResize,r=c.useRef(0),i=c.useRef([]),o=c.useContext(ud),A=c.useCallback(function(a,s,l){r.current+=1;var u=r.current;i.current.push({size:a,element:s,data:l}),Promise.resolve().then(function(){u===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(a,s,l)},[n,o]);return c.createElement(ud.Provider,{value:A},e)}var u1=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var A=o[i];n.call(r,A[1],A[0])}},e}()}(),dd=typeof window<"u"&&typeof document<"u"&&window.document===document,Es=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),$6=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Es):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),eR=2;function tR(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&a()}function A(){$6(o)}function a(){var s=Date.now();if(n){if(s-i<eR)return;r=!0}else n=!0,r=!1,setTimeout(A,e);i=s}return a}var nR=20,rR=["top","right","bottom","left","width","height","size","weight"],iR=typeof MutationObserver<"u",oR=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=tR(this.refresh.bind(this),nR)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return e.forEach(function(n){return n.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!dd||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),iR?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!dd||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=rR.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),d1=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Yo=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||Es},g1=ll(0,0,0,0);function ys(t){return parseFloat(t)||0}function Wp(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(r,i){var o=t["border-"+i+"-width"];return r+ys(o)},0)}function AR(t){for(var e=["top","right","bottom","left"],n={},r=0,i=e;r<i.length;r++){var o=i[r],A=t["padding-"+o];n[o]=ys(A)}return n}function aR(t){var e=t.getBBox();return ll(0,0,e.width,e.height)}function sR(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return g1;var r=Yo(t).getComputedStyle(t),i=AR(r),o=i.left+i.right,A=i.top+i.bottom,a=ys(r.width),s=ys(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+o)!==e&&(a-=Wp(r,"left","right")+o),Math.round(s+A)!==n&&(s-=Wp(r,"top","bottom")+A)),!cR(t)){var l=Math.round(a+o)-e,u=Math.round(s+A)-n;Math.abs(l)!==1&&(a-=l),Math.abs(u)!==1&&(s-=u)}return ll(i.left,i.top,a,s)}var lR=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof Yo(t).SVGGraphicsElement}:function(t){return t instanceof Yo(t).SVGElement&&typeof t.getBBox=="function"}}();function cR(t){return t===Yo(t).document.documentElement}function uR(t){return dd?lR(t)?aR(t):sR(t):g1}function dR(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,A=Object.create(o.prototype);return d1(A,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),A}function ll(t,e,n,r){return{x:t,y:e,width:n,height:r}}var gR=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ll(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=uR(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),fR=function(){function t(e,n){var r=dR(n);d1(this,{target:e,contentRect:r})}return t}(),hR=function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new u1,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Yo(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new gR(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Yo(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new fR(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),f1=typeof WeakMap<"u"?new WeakMap:new u1,h1=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=oR.getInstance(),r=new hR(e,n,this);f1.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){h1.prototype[t]=function(){var e;return(e=f1.get(this))[t].apply(e,arguments)}});var pR=function(){return typeof Es.ResizeObserver<"u"?Es.ResizeObserver:h1}(),ai=new Map;function p1(t){t.forEach(function(e){var n,r=e.target;(n=ai.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var m1=new pR(p1);process.env.NODE_ENV;process.env.NODE_ENV;function mR(t,e){ai.has(t)||(ai.set(t,new Set),m1.observe(t)),ai.get(t).add(e)}function VR(t,e){ai.has(t)&&(ai.get(t).delete(e),ai.get(t).size||(m1.unobserve(t),ai.delete(t)))}var vR=function(t){di(n,t);var e=gi(n);function n(){return fn(this,n),e.apply(this,arguments)}return hn(n,[{key:"render",value:function(){return this.props.children}}]),n}(c.Component);function CR(t,e){var n=t.children,r=t.disabled,i=c.useRef(null),o=c.useRef(null),A=c.useContext(ud),a=typeof n=="function",s=a?n(i):n,l=c.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!a&&c.isValidElement(s)&&Qi(s),d=u?io(s):null,g=Fi(d,i),p=function(){var C;return ja(i.current)||(i.current&&$e(i.current)==="object"?ja((C=i.current)===null||C===void 0?void 0:C.nativeElement):null)||ja(o.current)};c.useImperativeHandle(e,function(){return p()});var V=c.useRef(t);V.current=t;var v=c.useCallback(function(m){var C=V.current,w=C.onResize,S=C.data,M=m.getBoundingClientRect(),I=M.width,f=M.height,R=m.offsetWidth,q=m.offsetHeight,E=Math.floor(I),h=Math.floor(f);if(l.current.width!==E||l.current.height!==h||l.current.offsetWidth!==R||l.current.offsetHeight!==q){var y={width:E,height:h,offsetWidth:R,offsetHeight:q};l.current=y;var x=R===Math.round(I)?I:R,b=q===Math.round(f)?f:q,B=U(U({},y),{},{offsetWidth:x,offsetHeight:b});A==null||A(B,m,S),w&&Promise.resolve().then(function(){w(B,m)})}},[]);return c.useEffect(function(){var m=p();return m&&!r&&mR(m,v),function(){return VR(m,v)}},[i.current,r]),c.createElement(vR,{ref:o},u?c.cloneElement(s,{ref:g}):s)}var V1=c.forwardRef(CR);process.env.NODE_ENV!=="production"&&(V1.displayName="SingleObserver");var qR="rc-observer-key";function ER(t,e){var n=t.children,r=typeof n=="function"?[n]:Nr(n);return process.env.NODE_ENV!=="production"&&(r.length>1?xi(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&xi(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(i,o){var A=(i==null?void 0:i.key)||"".concat(qR,"-").concat(o);return c.createElement(V1,Fe({},t,{key:A,ref:o===0?e:void 0}),i)})}var fi=c.forwardRef(ER);process.env.NODE_ENV!=="production"&&(fi.displayName="ResizeObserver");fi.Collection=_6;var yR=`
|
|
591
591
|
min-height:0 !important;
|
|
592
592
|
max-height:none !important;
|
|
593
593
|
height:0 !important;
|
|
@@ -598,10 +598,10 @@ See https://s-c.sh/2BAXzed for more info.`),window[Ma]+=1);const HS=rn.div`
|
|
|
598
598
|
top:0 !important;
|
|
599
599
|
right:0 !important;
|
|
600
600
|
pointer-events: none !important;
|
|
601
|
-
`,wR=["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"],sc={},ir;function SR(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&sc[n])return sc[n];var r=window.getComputedStyle(t),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),A=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),a=wR.map(function(l){return"".concat(l,":").concat(r.getPropertyValue(l))}).join(";"),s={sizingStyle:a,paddingSize:o,borderSize:A,boxSizing:i};return e&&n&&(sc[n]=s),s}function IR(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ir||(ir=document.createElement("textarea"),ir.setAttribute("tab-index","-1"),ir.setAttribute("aria-hidden","true"),ir.setAttribute("name","hiddenTextarea"),document.body.appendChild(ir)),t.getAttribute("wrap")?ir.setAttribute("wrap",t.getAttribute("wrap")):ir.removeAttribute("wrap");var i=SR(t,e),o=i.paddingSize,A=i.borderSize,a=i.boxSizing,s=i.sizingStyle;ir.setAttribute("style","".concat(s,";").concat(yR)),ir.value=t.value||t.placeholder||"";var l=void 0,u=void 0,d,g=ir.scrollHeight;if(a==="border-box"?g+=A:a==="content-box"&&(g-=o),n!==null||r!==null){ir.value=" ";var p=ir.scrollHeight-o;n!==null&&(l=p*n,a==="border-box"&&(l=l+o+A),g=Math.max(l,g)),r!==null&&(u=p*r,a==="border-box"&&(u=u+o+A),d=g>u?"":"hidden",g=Math.min(u,g))}var V={height:g,overflowY:d,resize:"none"};return l&&(V.minHeight=l),u&&(V.maxHeight=u),V}var bR=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],lc=0,cc=1,uc=2,MR=c.forwardRef(function(t,e){var n=t,r=n.prefixCls,i=n.defaultValue,o=n.value,A=n.autoSize,a=n.onResize,s=n.className,l=n.style,u=n.disabled,d=n.onChange,g=n.onInternalAutoSize,p=qt(n,bR),V=Tn(i,{value:o,postState:function(
|
|
601
|
+
`,wR=["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"],sc={},ir;function SR(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&sc[n])return sc[n];var r=window.getComputedStyle(t),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),A=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),a=wR.map(function(l){return"".concat(l,":").concat(r.getPropertyValue(l))}).join(";"),s={sizingStyle:a,paddingSize:o,borderSize:A,boxSizing:i};return e&&n&&(sc[n]=s),s}function IR(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ir||(ir=document.createElement("textarea"),ir.setAttribute("tab-index","-1"),ir.setAttribute("aria-hidden","true"),ir.setAttribute("name","hiddenTextarea"),document.body.appendChild(ir)),t.getAttribute("wrap")?ir.setAttribute("wrap",t.getAttribute("wrap")):ir.removeAttribute("wrap");var i=SR(t,e),o=i.paddingSize,A=i.borderSize,a=i.boxSizing,s=i.sizingStyle;ir.setAttribute("style","".concat(s,";").concat(yR)),ir.value=t.value||t.placeholder||"";var l=void 0,u=void 0,d,g=ir.scrollHeight;if(a==="border-box"?g+=A:a==="content-box"&&(g-=o),n!==null||r!==null){ir.value=" ";var p=ir.scrollHeight-o;n!==null&&(l=p*n,a==="border-box"&&(l=l+o+A),g=Math.max(l,g)),r!==null&&(u=p*r,a==="border-box"&&(u=u+o+A),d=g>u?"":"hidden",g=Math.min(u,g))}var V={height:g,overflowY:d,resize:"none"};return l&&(V.minHeight=l),u&&(V.maxHeight=u),V}var bR=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],lc=0,cc=1,uc=2,MR=c.forwardRef(function(t,e){var n=t,r=n.prefixCls,i=n.defaultValue,o=n.value,A=n.autoSize,a=n.onResize,s=n.className,l=n.style,u=n.disabled,d=n.onChange,g=n.onInternalAutoSize,p=qt(n,bR),V=Tn(i,{value:o,postState:function(W){return W??""}}),v=$(V,2),m=v[0],C=v[1],w=function(W){C(W.target.value),d==null||d(W)},S=c.useRef();c.useImperativeHandle(e,function(){return{textArea:S.current}});var M=c.useMemo(function(){return A&&$e(A)==="object"?[A.minRows,A.maxRows]:[]},[A]),I=$(M,2),f=I[0],R=I[1],q=!!A,E=function(){try{if(document.activeElement===S.current){var W=S.current,z=W.selectionStart,te=W.selectionEnd,X=W.scrollTop;S.current.setSelectionRange(z,te),S.current.scrollTop=X}}catch{}},h=c.useState(uc),y=$(h,2),x=y[0],b=y[1],B=c.useState(),O=$(B,2),N=O[0],F=O[1],j=function(){b(lc),process.env.NODE_ENV==="test"&&(g==null||g())};$t(function(){q&&j()},[o,f,R,q]),$t(function(){if(x===lc)b(cc);else if(x===cc){var K=IR(S.current,!1,f,R);b(uc),F(K)}else E()},[x]);var Y=c.useRef(),H=function(){Lt.cancel(Y.current)},L=function(W){x===uc&&(a==null||a(W),A&&(H(),Y.current=Lt(function(){j()})))};c.useEffect(function(){return H},[]);var G=q?N:null,_=U(U({},l),G);return(x===lc||x===cc)&&(_.overflowY="hidden",_.overflowX="hidden"),c.createElement(fi,{onResize:L,disabled:!(A||a)},c.createElement("textarea",Fe({},p,{ref:S,style:_,className:se(r,s,Q({},"".concat(r,"-disabled"),u)),disabled:u,value:m,onChange:w})))}),RR=["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"],xR=T.forwardRef(function(t,e){var n,r=t.defaultValue,i=t.value,o=t.onFocus,A=t.onBlur,a=t.onChange,s=t.allowClear,l=t.maxLength,u=t.onCompositionStart,d=t.onCompositionEnd,g=t.suffix,p=t.prefixCls,V=p===void 0?"rc-textarea":p,v=t.showCount,m=t.count,C=t.className,w=t.style,S=t.disabled,M=t.hidden,I=t.classNames,f=t.styles,R=t.onResize,q=t.onClear,E=t.onPressEnter,h=t.readOnly,y=t.autoSize,x=t.onKeyDown,b=qt(t,RR),B=Tn(r,{value:i,defaultValue:r}),O=$(B,2),N=O[0],F=O[1],j=N==null?"":String(N),Y=T.useState(!1),H=$(Y,2),L=H[0],G=H[1],_=T.useRef(!1),K=T.useState(null),W=$(K,2),z=W[0],te=W[1],X=T.useRef(null),Ae=T.useRef(null),le=function(){var Oe;return(Oe=Ae.current)===null||Oe===void 0?void 0:Oe.textArea},ue=function(){le().focus()};T.useImperativeHandle(e,function(){var _e;return{resizableTextArea:Ae.current,focus:ue,blur:function(){le().blur()},nativeElement:((_e=X.current)===null||_e===void 0?void 0:_e.nativeElement)||le()}}),T.useEffect(function(){G(function(_e){return!S&&_e})},[S]);var ne=T.useState(null),me=$(ne,2),Z=me[0],de=me[1];T.useEffect(function(){if(Z){var _e;(_e=le()).setSelectionRange.apply(_e,be(Z))}},[Z]);var ce=Lv(m,v),ye=(n=ce.max)!==null&&n!==void 0?n:l,Ie=Number(ye)>0,Ve=ce.strategy(j),Be=!!ye&&Ve>ye,Qe=function(Oe,Re){var At=Re;!_.current&&ce.exceedFormatter&&ce.max&&ce.strategy(Re)>ce.max&&(At=ce.exceedFormatter(Re,{max:ce.max}),Re!==At&&de([le().selectionStart||0,le().selectionEnd||0])),F(At),Vs(Oe.currentTarget,Oe,a,At)},ke=function(Oe){_.current=!0,u==null||u(Oe)},Se=function(Oe){_.current=!1,Qe(Oe,Oe.currentTarget.value),d==null||d(Oe)},pe=function(Oe){Qe(Oe,Oe.target.value)},Me=function(Oe){Oe.key==="Enter"&&E&&E(Oe),x==null||x(Oe)},Le=function(Oe){G(!0),o==null||o(Oe)},et=function(Oe){G(!1),A==null||A(Oe)},nt=function(Oe){F(""),ue(),Vs(le(),Oe,a)},je=g,Ee;ce.show&&(ce.showFormatter?Ee=ce.showFormatter({value:j,count:Ve,maxLength:ye}):Ee="".concat(Ve).concat(Ie?" / ".concat(ye):""),je=T.createElement(T.Fragment,null,je,T.createElement("span",{className:se("".concat(V,"-data-count"),I==null?void 0:I.count),style:f==null?void 0:f.count},Ee)));var We=function(Oe){var Re;R==null||R(Oe),(Re=le())!==null&&Re!==void 0&&Re.style.height&&te(!0)},ct=!y&&!v&&!s;return T.createElement(Pv,{ref:X,value:j,allowClear:s,handleReset:nt,suffix:je,prefixCls:V,classNames:U(U({},I),{},{affixWrapper:se(I==null?void 0:I.affixWrapper,Q(Q({},"".concat(V,"-show-count"),v),"".concat(V,"-textarea-allow-clear"),s))}),disabled:S,focused:L,className:se(C,Be&&"".concat(V,"-out-of-range")),style:U(U({},w),z&&!ct?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ee=="string"?Ee:void 0}},hidden:M,readOnly:h,onClear:q},T.createElement(MR,Fe({},b,{autoSize:y,maxLength:l,onKeyDown:Me,onChange:pe,onFocus:Le,onBlur:et,onCompositionStart:ke,onCompositionEnd:Se,className:se(I==null?void 0:I.textarea),style:U(U({},f==null?void 0:f.textarea),{},{resize:w==null?void 0:w.resize}),disabled:S,prefixCls:V,onResize:We,ref:Ae,readOnly:h})))});const TR=t=>{const{componentCls:e,paddingLG:n}=t,r=`${e}-textarea`;return{[r]:{position:"relative","&-show-count":{[`> ${e}`]:{height:"100%"},[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
602
602
|
&-allow-clear > ${e},
|
|
603
603
|
&-affix-wrapper${r}-has-feedback ${e}
|
|
604
|
-
`]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},BR=bn(["Input","TextArea"],t=>{const e=Zt(t,Zs(t));return[TR(e)]},zs,{resetFont:!1});var OR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const DR=T.forwardRef((t,e)=>{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:A,status:a,allowClear:s,classNames:l,rootClassName:u,className:d,style:g,styles:p,variant:V}=t,v=OR(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:te}=an("TextArea");te(!("bordered"in t),"bordered","variant")}const{getPrefixCls:m,direction:C,allowClear:w,autoComplete:S,className:M,style:I,classNames:f,styles:R}=Jr("textArea"),q=c.useContext(li),E=A??q,{status:h,hasFeedback:y,feedbackIcon:x}=c.useContext(Fr),b=tl(h,a),B=c.useRef(null);c.useImperativeHandle(e,()=>{var te;return{resizableTextArea:(te=B.current)===null||te===void 0?void 0:te.resizableTextArea,focus:X=>{var Ae,le;jv((le=(Ae=B.current)===null||Ae===void 0?void 0:Ae.resizableTextArea)===null||le===void 0?void 0:le.textArea,X)},blur:()=>{var X;return(X=B.current)===null||X===void 0?void 0:X.blur()}}});const O=m("input",r),N=Ur(O),[F,j,Y]=mv(O,u),[H]=BR(O,N),{compactSize:L,compactItemClassnames:G}=zo(O,C),_=ki(te=>{var X;return(X=o??L)!==null&&X!==void 0?X:te}),[K,
|
|
604
|
+
`]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},BR=bn(["Input","TextArea"],t=>{const e=Zt(t,Zs(t));return[TR(e)]},zs,{resetFont:!1});var OR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const DR=T.forwardRef((t,e)=>{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:A,status:a,allowClear:s,classNames:l,rootClassName:u,className:d,style:g,styles:p,variant:V}=t,v=OR(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:te}=an("TextArea");te(!("bordered"in t),"bordered","variant")}const{getPrefixCls:m,direction:C,allowClear:w,autoComplete:S,className:M,style:I,classNames:f,styles:R}=Jr("textArea"),q=c.useContext(li),E=A??q,{status:h,hasFeedback:y,feedbackIcon:x}=c.useContext(Fr),b=tl(h,a),B=c.useRef(null);c.useImperativeHandle(e,()=>{var te;return{resizableTextArea:(te=B.current)===null||te===void 0?void 0:te.resizableTextArea,focus:X=>{var Ae,le;jv((le=(Ae=B.current)===null||Ae===void 0?void 0:Ae.resizableTextArea)===null||le===void 0?void 0:le.textArea,X)},blur:()=>{var X;return(X=B.current)===null||X===void 0?void 0:X.blur()}}});const O=m("input",r),N=Ur(O),[F,j,Y]=mv(O,u),[H]=BR(O,N),{compactSize:L,compactItemClassnames:G}=zo(O,C),_=ki(te=>{var X;return(X=o??L)!==null&&X!==void 0?X:te}),[K,W]=sg("textArea",V,i),z=Jv(s??w);return F(H(c.createElement(xR,Object.assign({autoComplete:S},v,{style:Object.assign(Object.assign({},I),g),styles:Object.assign(Object.assign({},R),p),disabled:E,allowClear:z,className:se(Y,N,d,u,G,M),classNames:Object.assign(Object.assign(Object.assign({},l),f),{textarea:se({[`${O}-sm`]:_==="small",[`${O}-lg`]:_==="large"},j,l==null?void 0:l.textarea,f.textarea),variant:se({[`${O}-${K}`]:W},Cs(O,b)),affixWrapper:se(`${O}-textarea-affix-wrapper`,{[`${O}-affix-wrapper-rtl`]:C==="rtl",[`${O}-affix-wrapper-sm`]:_==="small",[`${O}-affix-wrapper-lg`]:_==="large",[`${O}-textarea-show-count`]:t.showCount||((n=t.count)===null||n===void 0?void 0:n.show)},j)}),prefixCls:O,suffix:y&&c.createElement("span",{className:`${O}-textarea-suffix`},x),ref:B}))))}),ui=na;ui.Group=c4;ui.Search=c1;ui.TextArea=DR;ui.Password=$v;ui.OTP=k4;var v1=c.createContext(null),Xp=[];function NR(t,e){var n=c.useState(function(){if(!Qn())return null;var V=document.createElement("div");return process.env.NODE_ENV!=="production"&&e&&V.setAttribute("data-debug",e),V}),r=$(n,1),i=r[0],o=c.useRef(!1),A=c.useContext(v1),a=c.useState(Xp),s=$(a,2),l=s[0],u=s[1],d=A||(o.current?void 0:function(V){u(function(v){var m=[V].concat(be(v));return m})});function g(){i.parentElement||document.body.appendChild(i),o.current=!0}function p(){var V;(V=i.parentElement)===null||V===void 0||V.removeChild(i),o.current=!1}return $t(function(){return t?A?A(g):g():p(),p},[t]),$t(function(){l.length&&(l.forEach(function(V){return V()}),u(Xp))},[l]),[i,d]}function FR(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var i,o;if(t){var A=getComputedStyle(t);r.scrollbarColor=A.scrollbarColor,r.scrollbarWidth=A.scrollbarWidth;var a=getComputedStyle(t,"::-webkit-scrollbar"),s=parseInt(a.width,10),l=parseInt(a.height,10);try{var u=s?"width: ".concat(a.width,";"):"",d=l?"height: ".concat(a.height,";"):"";si(`
|
|
605
605
|
#`.concat(e,`::-webkit-scrollbar {
|
|
606
606
|
`).concat(u,`
|
|
607
607
|
`).concat(d,`
|
|
@@ -609,7 +609,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Ma]+=1);const HS=rn.div`
|
|
|
609
609
|
html body {
|
|
610
610
|
overflow-y: hidden;
|
|
611
611
|
`.concat(A?"width: calc(100% - ".concat(o,"px);"):"",`
|
|
612
|
-
}`),i)}else EA(i);return function(){EA(i)}},[e,i])}var jR=!1;function PR(t){return jR}var $p=function(e){return e===!1?!1:!Qn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},cl=c.forwardRef(function(t,e){var n=t.open,r=t.autoLock,i=t.getContainer,o=t.debug,A=t.autoDestroy,a=A===void 0?!0:A,s=t.children,l=c.useState(n),u=$(l,2),d=u[0],g=u[1],p=d||n;process.env.NODE_ENV!=="production"&&Ct(Qn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),c.useEffect(function(){(a||n)&&g(n)},[n,a]);var V=c.useState(function(){return $p(i)}),v=$(V,2),m=v[0],C=v[1];c.useEffect(function(){var x=$p(i);C(x??null)});var w=NR(p&&!m,o),S=$(w,2),M=S[0],I=S[1],f=m??M;GR(r&&n&&Qn()&&(f===M||f===document.body));var R=null;if(s&&Qi(s)&&e){var q=s;R=q.ref}var E=Fi(R,e);if(!p||!Qn()||m===void 0)return null;var h=f===!1||PR(),y=s;return e&&(y=c.cloneElement(s,{ref:E})),c.createElement(v1.Provider,{value:I},h?y:zr.createPortal(y,f))});process.env.NODE_ENV!=="production"&&(cl.displayName="Portal");const C1=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};function LR(t){var e=t.prefixCls,n=t.align,r=t.arrow,i=t.arrowPos,o=r||{},A=o.className,a=o.content,s=i.x,l=s===void 0?0:s,u=i.y,d=u===void 0?0:u,g=c.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(n.autoArrow!==!1){var V=n.points[0],v=n.points[1],m=V[0],C=V[1],w=v[0],S=v[1];m===w||!["t","b"].includes(m)?p.top=d:m==="t"?p.top=0:p.bottom=0,C===S||!["l","r"].includes(C)?p.left=l:C==="l"?p.left=0:p.right=0}return c.createElement("div",{ref:g,className:se("".concat(e,"-arrow"),A),style:p},a)}function YR(t){var e=t.prefixCls,n=t.open,r=t.zIndex,i=t.mask,o=t.motion;return i?c.createElement(oo,Fe({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(A){var a=A.className;return c.createElement("div",{style:{zIndex:r},className:se("".concat(e,"-mask"),a)})}):null}var q1=c.memo(function(t){var e=t.children;return e},function(t,e){return e.cache});process.env.NODE_ENV!=="production"&&(q1.displayName="PopupContent");var E1=c.forwardRef(function(t,e){var n=t.popup,r=t.className,i=t.prefixCls,o=t.style,A=t.target,a=t.onVisibleChanged,s=t.open,l=t.keepDom,u=t.fresh,d=t.onClick,g=t.mask,p=t.arrow,V=t.arrowPos,v=t.align,m=t.motion,C=t.maskMotion,w=t.forceRender,S=t.getPopupContainer,M=t.autoDestroy,I=t.portal,f=t.zIndex,R=t.onMouseEnter,q=t.onMouseLeave,E=t.onPointerEnter,h=t.onPointerDownCapture,y=t.ready,x=t.offsetX,b=t.offsetY,B=t.offsetR,O=t.offsetB,N=t.onAlign,F=t.onPrepare,j=t.stretch,Y=t.targetWidth,H=t.targetHeight,L=typeof n=="function"?n():n,G=s||l,_=(S==null?void 0:S.length)>0,K=c.useState(!S||!_),J=$(K,2),z=J[0],te=J[1];if($t(function(){!z&&_&&A&&te(!0)},[z,_,A]),!z)return null;var X="auto",Ae={left:"-1000vw",top:"-1000vh",right:X,bottom:X};if(y||!s){var le,ue=v.points,ne=v.dynamicInset||((le=v._experimental)===null||le===void 0?void 0:le.dynamicInset),me=ne&&ue[0][1]==="r",Z=ne&&ue[0][0]==="b";me?(Ae.right=B,Ae.left=X):(Ae.left=x,Ae.right=X),Z?(Ae.bottom=O,Ae.top=X):(Ae.top=b,Ae.bottom=X)}var de={};return j&&(j.includes("height")&&H?de.height=H:j.includes("minHeight")&&H&&(de.minHeight=H),j.includes("width")&&Y?de.width=Y:j.includes("minWidth")&&Y&&(de.minWidth=Y)),s||(de.pointerEvents="none"),c.createElement(I,{open:w||G,getContainer:S&&function(){return S(A)},autoDestroy:M},c.createElement(YR,{prefixCls:i,open:s,zIndex:f,mask:g,motion:C}),c.createElement(fi,{onResize:N,disabled:!s},function(ce){return c.createElement(oo,Fe({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:w,leavedClassName:"".concat(i,"-hidden")},m,{onAppearPrepare:F,onEnterPrepare:F,visible:s,onVisibleChanged:function(Ie){var Ve;m==null||(Ve=m.onVisibleChanged)===null||Ve===void 0||Ve.call(m,Ie),a(Ie)}}),function(ye,Ie){var Ve=ye.className,Be=ye.style,Qe=se(i,Ve,r);return c.createElement("div",{ref:kr(ce,e,Ie),className:Qe,style:U(U(U(U({"--arrow-x":"".concat(V.x||0,"px"),"--arrow-y":"".concat(V.y||0,"px")},Ae),de),Be),{},{boxSizing:"border-box",zIndex:f},o),onMouseEnter:R,onMouseLeave:q,onPointerEnter:E,onClick:d,onPointerDownCapture:h},p&&c.createElement(LR,{prefixCls:i,arrow:p,arrowPos:V,align:v}),c.createElement(q1,{cache:!s&&!u},L))})}))});process.env.NODE_ENV!=="production"&&(E1.displayName="Popup");var y1=c.forwardRef(function(t,e){var n=t.children,r=t.getTriggerDOMNode,i=Qi(n),o=c.useCallback(function(a){Od(e,r?r(a):a)},[r]),A=Fi(o,io(n));return i?c.cloneElement(n,{ref:A}):n});process.env.NODE_ENV!=="production"&&(y1.displayName="TriggerWrapper");var em=c.createContext(null);function tm(t){return t?Array.isArray(t)?t:[t]:[]}function HR(t,e,n,r){return c.useMemo(function(){var i=tm(n??e),o=tm(r??e),A=new Set(i),a=new Set(o);return t&&(A.has("hover")&&(A.delete("hover"),A.add("click")),a.has("hover")&&(a.delete("hover"),a.add("click"))),[A,a]},[t,e,n,r])}function KR(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function ZR(t,e,n,r){for(var i=n.points,o=Object.keys(t),A=0;A<o.length;A+=1){var a,s=o[A];if(KR((a=t[s])===null||a===void 0?void 0:a.points,i,r))return"".concat(e,"-placement-").concat(s)}return""}function nm(t,e,n,r){return e||(n?{motionName:"".concat(t,"-").concat(n)}:r?{motionName:r}:null)}function ra(t){return t.ownerDocument.defaultView}function gd(t){for(var e=[],n=t==null?void 0:t.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=ra(n).getComputedStyle(n),o=i.overflowX,A=i.overflowY,a=i.overflow;[o,A,a].some(function(s){return r.includes(s)})&&e.push(n),n=n.parentElement}return e}function FA(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function AA(t){return FA(parseFloat(t),0)}function rm(t,e){var n=U({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=ra(r).getComputedStyle(r),o=i.overflow,A=i.overflowClipMargin,a=i.borderTopWidth,s=i.borderBottomWidth,l=i.borderLeftWidth,u=i.borderRightWidth,d=r.getBoundingClientRect(),g=r.offsetHeight,p=r.clientHeight,V=r.offsetWidth,v=r.clientWidth,m=AA(a),C=AA(s),w=AA(l),S=AA(u),M=FA(Math.round(d.width/V*1e3)/1e3),I=FA(Math.round(d.height/g*1e3)/1e3),f=(V-v-w-S)*M,R=(g-p-m-C)*I,q=m*I,E=C*I,h=w*M,y=S*M,x=0,b=0;if(o==="clip"){var B=AA(A);x=B*M,b=B*I}var O=d.x+h-x,N=d.y+q-b,F=O+d.width+2*x-h-y-f,j=N+d.height+2*b-q-E-R;n.left=Math.max(n.left,O),n.top=Math.max(n.top,N),n.right=Math.min(n.right,F),n.bottom=Math.min(n.bottom,j)}}),n}function im(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function om(t,e){var n=e||[],r=$(n,2),i=r[0],o=r[1];return[im(t.width,i),im(t.height,o)]}function Am(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function ho(t,e){var n=e[0],r=e[1],i,o;return n==="t"?o=t.y:n==="b"?o=t.y+t.height:o=t.y+t.height/2,r==="l"?i=t.x:r==="r"?i=t.x+t.width:i=t.x+t.width/2,{x:i,y:o}}function vi(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,i){return i===e?n[r]||"c":r}).join("")}function zR(t,e,n,r,i,o,A){var a=c.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),s=$(a,2),l=s[0],u=s[1],d=c.useRef(0),g=c.useMemo(function(){return e?gd(e):[]},[e]),p=c.useRef({}),V=function(){p.current={}};t||V();var v=nn(function(){if(e&&n&&t){let gr=function(_o,ei){var hi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Me,$o=G.x+_o,sa=G.y+ei,ql=$o+Z,El=sa+me,yl=Math.max($o,hi.left),Je=Math.max(sa,hi.top),ht=Math.min(ql,hi.right),tn=Math.min(El,hi.bottom);return Math.max(0,(ht-yl)*(tn-Je))},lo=function(){ze=G.y+it,tt=ze+me,Dt=G.x+xe,gt=Dt+Z};var w,S,M,I,f=e,R=f.ownerDocument,q=ra(f),E=q.getComputedStyle(f),h=E.position,y=f.style.left,x=f.style.top,b=f.style.right,B=f.style.bottom,O=f.style.overflow,N=U(U({},i[r]),o),F=R.createElement("div");(w=f.parentElement)===null||w===void 0||w.appendChild(F),F.style.left="".concat(f.offsetLeft,"px"),F.style.top="".concat(f.offsetTop,"px"),F.style.position=h,F.style.height="".concat(f.offsetHeight,"px"),F.style.width="".concat(f.offsetWidth,"px"),f.style.left="0",f.style.top="0",f.style.right="auto",f.style.bottom="auto",f.style.overflow="hidden";var j;if(Array.isArray(n))j={x:n[0],y:n[1],width:0,height:0};else{var Y,H,L=n.getBoundingClientRect();L.x=(Y=L.x)!==null&&Y!==void 0?Y:L.left,L.y=(H=L.y)!==null&&H!==void 0?H:L.top,j={x:L.x,y:L.y,width:L.width,height:L.height}}var G=f.getBoundingClientRect(),_=q.getComputedStyle(f),K=_.height,J=_.width;G.x=(S=G.x)!==null&&S!==void 0?S:G.left,G.y=(M=G.y)!==null&&M!==void 0?M:G.top;var z=R.documentElement,te=z.clientWidth,X=z.clientHeight,Ae=z.scrollWidth,le=z.scrollHeight,ue=z.scrollTop,ne=z.scrollLeft,me=G.height,Z=G.width,de=j.height,ce=j.width,ye={left:0,top:0,right:te,bottom:X},Ie={left:-ne,top:-ue,right:Ae-ne,bottom:le-ue},Ve=N.htmlRegion,Be="visible",Qe="visibleFirst";Ve!=="scroll"&&Ve!==Qe&&(Ve=Be);var ke=Ve===Qe,Se=rm(Ie,g),pe=rm(ye,g),Me=Ve===Be?pe:Se,Le=ke?pe:Me;f.style.left="auto",f.style.top="auto",f.style.right="0",f.style.bottom="0";var et=f.getBoundingClientRect();f.style.left=y,f.style.top=x,f.style.right=b,f.style.bottom=B,f.style.overflow=O,(I=f.parentElement)===null||I===void 0||I.removeChild(F);var nt=FA(Math.round(Z/parseFloat(J)*1e3)/1e3),je=FA(Math.round(me/parseFloat(K)*1e3)/1e3);if(nt===0||je===0||xA(n)&&!rg(n))return;var Ee=N.offset,We=N.targetOffset,ct=om(G,Ee),_e=$(ct,2),Oe=_e[0],Re=_e[1],At=om(j,We),at=$(At,2),vt=at[0],Tt=at[1];j.x-=vt,j.y-=Tt;var Wt=N.points||[],Jt=$(Wt,2),en=Jt[0],Xt=Jt[1],Yt=Am(Xt),Mt=Am(en),pt=ho(j,Yt),He=ho(G,Mt),Xe=U({},N),xe=pt.x-He.x+Oe,it=pt.y-He.y+Re,mt=gr(xe,it),De=gr(xe,it,pe),we=ho(j,["t","l"]),Ye=ho(G,["t","l"]),Ke=ho(j,["b","r"]),Ue=ho(G,["b","r"]),D=N.overflow||{},fe=D.adjustX,k=D.adjustY,ae=D.shiftX,ee=D.shiftY,Ce=function(ei){return typeof ei=="boolean"?ei:ei>=0},ze,tt,Dt,gt;lo();var yt=Ce(k),qe=Mt[0]===Yt[0];if(yt&&Mt[0]==="t"&&(tt>Le.bottom||p.current.bt)){var Te=it;qe?Te-=me-de:Te=we.y-Ue.y-Re;var st=gr(xe,Te),ut=gr(xe,Te,pe);st>mt||st===mt&&(!ke||ut>=De)?(p.current.bt=!0,it=Te,Re=-Re,Xe.points=[vi(Mt,0),vi(Yt,0)]):p.current.bt=!1}if(yt&&Mt[0]==="b"&&(ze<Le.top||p.current.tb)){var Nt=it;qe?Nt+=me-de:Nt=Ke.y-Ye.y-Re;var On=gr(xe,Nt),sn=gr(xe,Nt,pe);On>mt||On===mt&&(!ke||sn>=De)?(p.current.tb=!0,it=Nt,Re=-Re,Xe.points=[vi(Mt,0),vi(Yt,0)]):p.current.tb=!1}var Kn=Ce(fe),Gr=Mt[1]===Yt[1];if(Kn&&Mt[1]==="l"&&(gt>Le.right||p.current.rl)){var Un=xe;Gr?Un-=Z-ce:Un=we.x-Ue.x-Oe;var Gn=gr(Un,it),Sr=gr(Un,it,pe);Gn>mt||Gn===mt&&(!ke||Sr>=De)?(p.current.rl=!0,xe=Un,Oe=-Oe,Xe.points=[vi(Mt,1),vi(Yt,1)]):p.current.rl=!1}if(Kn&&Mt[1]==="r"&&(Dt<Le.left||p.current.lr)){var jn=xe;Gr?jn+=Z-ce:jn=Ke.x-Ye.x-Oe;var _r=gr(jn,it),Ir=gr(jn,it,pe);_r>mt||_r===mt&&(!ke||Ir>=De)?(p.current.lr=!0,xe=jn,Oe=-Oe,Xe.points=[vi(Mt,1),vi(Yt,1)]):p.current.lr=!1}lo();var Pn=ae===!0?0:ae;typeof Pn=="number"&&(Dt<pe.left&&(xe-=Dt-pe.left-Oe,j.x+ce<pe.left+Pn&&(xe+=j.x-pe.left+ce-Pn)),gt>pe.right&&(xe-=gt-pe.right-Oe,j.x>pe.right-Pn&&(xe+=j.x-pe.right+Pn)));var er=ee===!0?0:ee;typeof er=="number"&&(ze<pe.top&&(it-=ze-pe.top-Re,j.y+de<pe.top+er&&(it+=j.y-pe.top+de-er)),tt>pe.bottom&&(it-=tt-pe.bottom-Re,j.y>pe.bottom-er&&(it+=j.y-pe.bottom+er)));var ur=G.x+xe,dr=ur+Z,jr=G.y+it,$r=jr+me,wt=j.x,Pe=wt+ce,ft=j.y,Et=ft+de,xt=Math.max(ur,wt),Ot=Math.min(dr,Pe),Cn=(xt+Ot)/2,qn=Cn-ur,Zn=Math.max(jr,ft),tr=Math.min($r,Et),zn=(Zn+tr)/2,Jn=zn-jr;A==null||A(e,Xe);var pn=et.right-G.x-(xe+G.width),Ui=et.bottom-G.y-(it+G.height);nt===1&&(xe=Math.round(xe),pn=Math.round(pn)),je===1&&(it=Math.round(it),Ui=Math.round(Ui));var Cl={ready:!0,offsetX:xe/nt,offsetY:it/je,offsetR:pn/nt,offsetB:Ui/je,arrowX:qn/nt,arrowY:Jn/je,scaleX:nt,scaleY:je,align:Xe};u(Cl)}}),m=function(){d.current+=1;var S=d.current;Promise.resolve().then(function(){d.current===S&&v()})},C=function(){u(function(S){return U(U({},S),{},{ready:!1})})};return $t(C,[r]),$t(function(){t||C()},[t]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,m]}function JR(t,e,n,r,i){$t(function(){if(t&&e&&n){let d=function(){r(),i()};var o=e,A=n,a=gd(o),s=gd(A),l=ra(A),u=new Set([l].concat(be(a),be(s)));return u.forEach(function(g){g.addEventListener("scroll",d,{passive:!0})}),l.addEventListener("resize",d,{passive:!0}),r(),function(){u.forEach(function(g){g.removeEventListener("scroll",d),l.removeEventListener("resize",d)})}}},[t,e,n])}function WR(t,e,n,r,i,o,A,a){var s=c.useRef(t);s.current=t;var l=c.useRef(!1);c.useEffect(function(){if(e&&r&&(!i||o)){var d=function(){l.current=!1},g=function(M){var I;s.current&&!A(((I=M.composedPath)===null||I===void 0||(I=I.call(M))===null||I===void 0?void 0:I[0])||M.target)&&!l.current&&a(!1)},p=ra(r);p.addEventListener("pointerdown",d,!0),p.addEventListener("mousedown",g,!0),p.addEventListener("contextmenu",g,!0);var V=vs(n);if(V&&(V.addEventListener("mousedown",g,!0),V.addEventListener("contextmenu",g,!0)),process.env.NODE_ENV!=="production"){var v,m,C=n==null||(v=n.getRootNode)===null||v===void 0?void 0:v.call(n),w=(m=r.getRootNode)===null||m===void 0?void 0:m.call(r);xi(C===w,"trigger element and popup element should in same shadow root.")}return function(){p.removeEventListener("pointerdown",d,!0),p.removeEventListener("mousedown",g,!0),p.removeEventListener("contextmenu",g,!0),V&&(V.removeEventListener("mousedown",g,!0),V.removeEventListener("contextmenu",g,!0))}}},[e,n,r,i,o]);function u(){l.current=!0}return u}var XR=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function _R(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cl,e=c.forwardRef(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,A=n.children,a=n.action,s=a===void 0?"hover":a,l=n.showAction,u=n.hideAction,d=n.popupVisible,g=n.defaultPopupVisible,p=n.onPopupVisibleChange,V=n.afterPopupVisibleChange,v=n.mouseEnterDelay,m=n.mouseLeaveDelay,C=m===void 0?.1:m,w=n.focusDelay,S=n.blurDelay,M=n.mask,I=n.maskClosable,f=I===void 0?!0:I,R=n.getPopupContainer,q=n.forceRender,E=n.autoDestroy,h=n.destroyPopupOnHide,y=n.popup,x=n.popupClassName,b=n.popupStyle,B=n.popupPlacement,O=n.builtinPlacements,N=O===void 0?{}:O,F=n.popupAlign,j=n.zIndex,Y=n.stretch,H=n.getPopupClassNameFromAlign,L=n.fresh,G=n.alignPoint,_=n.onPopupClick,K=n.onPopupAlign,J=n.arrow,z=n.popupMotion,te=n.maskMotion,X=n.popupTransitionName,Ae=n.popupAnimation,le=n.maskTransitionName,ue=n.maskAnimation,ne=n.className,me=n.getTriggerDOMNode,Z=qt(n,XR),de=E||h||!1,ce=c.useState(!1),ye=$(ce,2),Ie=ye[0],Ve=ye[1];$t(function(){Ve(C1())},[]);var Be=c.useRef({}),Qe=c.useContext(em),ke=c.useMemo(function(){return{registerSubPopup:function(ht,tn){Be.current[ht]=tn,Qe==null||Qe.registerSubPopup(ht,tn)}}},[Qe]),Se=$s(),pe=c.useState(null),Me=$(pe,2),Le=Me[0],et=Me[1],nt=c.useRef(null),je=nn(function(Je){nt.current=Je,xA(Je)&&Le!==Je&&et(Je),Qe==null||Qe.registerSubPopup(Se,Je)}),Ee=c.useState(null),We=$(Ee,2),ct=We[0],_e=We[1],Oe=c.useRef(null),Re=nn(function(Je){xA(Je)&&ct!==Je&&(_e(Je),Oe.current=Je)}),At=c.Children.only(A),at=(At==null?void 0:At.props)||{},vt={},Tt=nn(function(Je){var ht,tn,mn=ct;return(mn==null?void 0:mn.contains(Je))||((ht=vs(mn))===null||ht===void 0?void 0:ht.host)===Je||Je===mn||(Le==null?void 0:Le.contains(Je))||((tn=vs(Le))===null||tn===void 0?void 0:tn.host)===Je||Je===Le||Object.values(Be.current).some(function(on){return(on==null?void 0:on.contains(Je))||Je===on})}),Wt=nm(o,z,Ae,X),Jt=nm(o,te,ue,le),en=c.useState(g||!1),Xt=$(en,2),Yt=Xt[0],Mt=Xt[1],pt=d??Yt,He=nn(function(Je){d===void 0&&Mt(Je)});$t(function(){Mt(d||!1)},[d]);var Xe=c.useRef(pt);Xe.current=pt;var xe=c.useRef([]);xe.current=[];var it=nn(function(Je){var ht;He(Je),((ht=xe.current[xe.current.length-1])!==null&&ht!==void 0?ht:pt)!==Je&&(xe.current.push(Je),p==null||p(Je))}),mt=c.useRef(),De=function(){clearTimeout(mt.current)},we=function(ht){var tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;De(),tn===0?it(ht):mt.current=setTimeout(function(){it(ht)},tn*1e3)};c.useEffect(function(){return De},[]);var Ye=c.useState(!1),Ke=$(Ye,2),Ue=Ke[0],D=Ke[1];$t(function(Je){(!Je||pt)&&D(!0)},[pt]);var fe=c.useState(null),k=$(fe,2),ae=k[0],ee=k[1],Ce=c.useState(null),ze=$(Ce,2),tt=ze[0],Dt=ze[1],gt=function(ht){Dt([ht.clientX,ht.clientY])},yt=zR(pt,Le,G&&tt!==null?tt:ct,B,N,F,K),qe=$(yt,11),Te=qe[0],st=qe[1],ut=qe[2],Nt=qe[3],On=qe[4],sn=qe[5],Kn=qe[6],Gr=qe[7],Un=qe[8],Gn=qe[9],Sr=qe[10],jn=HR(Ie,s,l,u),_r=$(jn,2),Ir=_r[0],Pn=_r[1],er=Ir.has("click"),ur=Pn.has("click")||Pn.has("contextMenu"),dr=nn(function(){Ue||Sr()}),jr=function(){Xe.current&&G&&ur&&we(!1)};JR(pt,ct,Le,dr,jr),$t(function(){dr()},[tt,B]),$t(function(){pt&&!(N!=null&&N[B])&&dr()},[JSON.stringify(F)]);var $r=c.useMemo(function(){var Je=ZR(N,o,Gn,G);return se(Je,H==null?void 0:H(Gn))},[Gn,H,N,o,G]);c.useImperativeHandle(r,function(){return{nativeElement:Oe.current,popupElement:nt.current,forceAlign:dr}});var wt=c.useState(0),Pe=$(wt,2),ft=Pe[0],Et=Pe[1],xt=c.useState(0),Ot=$(xt,2),Cn=Ot[0],qn=Ot[1],Zn=function(){if(Y&&ct){var ht=ct.getBoundingClientRect();Et(ht.width),qn(ht.height)}},tr=function(){Zn(),dr()},zn=function(ht){D(!1),Sr(),V==null||V(ht)},Jn=function(){return new Promise(function(ht){Zn(),ee(function(){return ht})})};$t(function(){ae&&(Sr(),ae(),ee(null))},[ae]);function pn(Je,ht,tn,mn){vt[Je]=function(on){var la;mn==null||mn(on),we(ht,tn);for(var wl=arguments.length,Bg=new Array(wl>1?wl-1:0),ca=1;ca<wl;ca++)Bg[ca-1]=arguments[ca];(la=at[Je])===null||la===void 0||la.call.apply(la,[at,on].concat(Bg))}}(er||ur)&&(vt.onClick=function(Je){var ht;Xe.current&&ur?we(!1):!Xe.current&&er&&(gt(Je),we(!0));for(var tn=arguments.length,mn=new Array(tn>1?tn-1:0),on=1;on<tn;on++)mn[on-1]=arguments[on];(ht=at.onClick)===null||ht===void 0||ht.call.apply(ht,[at,Je].concat(mn))});var Ui=WR(pt,ur,ct,Le,M,f,Tt,we),Cl=Ir.has("hover"),gr=Pn.has("hover"),lo,_o;Cl&&(pn("onMouseEnter",!0,v,function(Je){gt(Je)}),pn("onPointerEnter",!0,v,function(Je){gt(Je)}),lo=function(ht){(pt||Ue)&&Le!==null&&Le!==void 0&&Le.contains(ht.target)&&we(!0,v)},G&&(vt.onMouseMove=function(Je){var ht;(ht=at.onMouseMove)===null||ht===void 0||ht.call(at,Je)})),gr&&(pn("onMouseLeave",!1,C),pn("onPointerLeave",!1,C),_o=function(){we(!1,C)}),Ir.has("focus")&&pn("onFocus",!0,w),Pn.has("focus")&&pn("onBlur",!1,S),Ir.has("contextMenu")&&(vt.onContextMenu=function(Je){var ht;Xe.current&&Pn.has("contextMenu")?we(!1):(gt(Je),we(!0)),Je.preventDefault();for(var tn=arguments.length,mn=new Array(tn>1?tn-1:0),on=1;on<tn;on++)mn[on-1]=arguments[on];(ht=at.onContextMenu)===null||ht===void 0||ht.call.apply(ht,[at,Je].concat(mn))}),ne&&(vt.className=se(at.className,ne));var ei=c.useRef(!1);ei.current||(ei.current=q||pt||Ue);var hi=U(U({},at),vt),$o={},sa=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];sa.forEach(function(Je){Z[Je]&&($o[Je]=function(){for(var ht,tn=arguments.length,mn=new Array(tn),on=0;on<tn;on++)mn[on]=arguments[on];(ht=hi[Je])===null||ht===void 0||ht.call.apply(ht,[hi].concat(mn)),Z[Je].apply(Z,mn)})});var ql=c.cloneElement(At,U(U({},hi),$o)),El={x:sn,y:Kn},yl=J?U({},J!==!0?J:{}):null;return c.createElement(c.Fragment,null,c.createElement(fi,{disabled:!pt,ref:Re,onResize:tr},c.createElement(y1,{getTriggerDOMNode:me},ql)),ei.current&&c.createElement(em.Provider,{value:ke},c.createElement(E1,{portal:t,ref:je,prefixCls:o,popup:y,className:se(x,$r),style:b,target:ct,onMouseEnter:lo,onMouseLeave:_o,onPointerEnter:lo,zIndex:j,open:pt,keepDom:Ue,fresh:L,onClick:_,onPointerDownCapture:Ui,mask:M,motion:Wt,maskMotion:Jt,onVisibleChanged:zn,onPrepare:Jn,forceRender:q,autoDestroy:de,getPopupContainer:R,align:Gn,arrow:yl,arrowPos:El,ready:Te,offsetX:st,offsetY:ut,offsetR:Nt,offsetB:On,onAlign:dr,stretch:Y,targetWidth:ft/Gr,targetHeight:Cn/Un})))});return process.env.NODE_ENV!=="production"&&(e.displayName="Trigger"),e}const ul=_R(cl);var $R=ot.ESC,ex=ot.TAB;function tx(t){var e=t.visible,n=t.triggerRef,r=t.onVisibleChange,i=t.autoFocus,o=t.overlayRef,A=c.useRef(!1),a=function(){if(e){var d,g;(d=n.current)===null||d===void 0||(g=d.focus)===null||g===void 0||g.call(d),r==null||r(!1)}},s=function(){var d;return(d=o.current)!==null&&d!==void 0&&d.focus?(o.current.focus(),A.current=!0,!0):!1},l=function(d){switch(d.keyCode){case $R:a();break;case ex:{var g=!1;A.current||(g=s()),g?d.preventDefault():a();break}}};c.useEffect(function(){return e?(window.addEventListener("keydown",l),i&&Lt(s,3),function(){window.removeEventListener("keydown",l),A.current=!1}):function(){A.current=!1}},[e])}var nx=T.forwardRef(function(t,e){var n=t.overlay,r=t.arrow,i=t.prefixCls,o=T.useMemo(function(){var a;return typeof n=="function"?a=n():a=n,a},[n]),A=kr(e,io(o));return T.createElement(T.Fragment,null,r&&T.createElement("div",{className:"".concat(i,"-arrow")}),T.cloneElement(o,{ref:Qi(o)?A:void 0}))}),po={adjustX:1,adjustY:1},mo=[0,0],rx={topLeft:{points:["bl","tl"],overflow:po,offset:[0,-4],targetOffset:mo},top:{points:["bc","tc"],overflow:po,offset:[0,-4],targetOffset:mo},topRight:{points:["br","tr"],overflow:po,offset:[0,-4],targetOffset:mo},bottomLeft:{points:["tl","bl"],overflow:po,offset:[0,4],targetOffset:mo},bottom:{points:["tc","bc"],overflow:po,offset:[0,4],targetOffset:mo},bottomRight:{points:["tr","br"],overflow:po,offset:[0,4],targetOffset:mo}},ix=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function ox(t,e){var n,r=t.arrow,i=r===void 0?!1:r,o=t.prefixCls,A=o===void 0?"rc-dropdown":o,a=t.transitionName,s=t.animation,l=t.align,u=t.placement,d=u===void 0?"bottomLeft":u,g=t.placements,p=g===void 0?rx:g,V=t.getPopupContainer,v=t.showAction,m=t.hideAction,C=t.overlayClassName,w=t.overlayStyle,S=t.visible,M=t.trigger,I=M===void 0?["hover"]:M,f=t.autoFocus,R=t.overlay,q=t.children,E=t.onVisibleChange,h=qt(t,ix),y=T.useState(),x=$(y,2),b=x[0],B=x[1],O="visible"in t?S:b,N=T.useRef(null),F=T.useRef(null),j=T.useRef(null);T.useImperativeHandle(e,function(){return N.current});var Y=function(X){B(X),E==null||E(X)};tx({visible:O,triggerRef:j,onVisibleChange:Y,autoFocus:f,overlayRef:F});var H=function(X){var Ae=t.onOverlayClick;B(!1),Ae&&Ae(X)},L=function(){return T.createElement(nx,{ref:F,overlay:R,prefixCls:A,arrow:i})},G=function(){return typeof R=="function"?L:L()},_=function(){var X=t.minOverlayWidthMatchTrigger,Ae=t.alignPoint;return"minOverlayWidthMatchTrigger"in t?X:!Ae},K=function(){var X=t.openClassName;return X!==void 0?X:"".concat(A,"-open")},J=T.cloneElement(q,{className:se((n=q.props)===null||n===void 0?void 0:n.className,O&&K()),ref:Qi(q)?kr(j,io(q)):void 0}),z=m;return!z&&I.indexOf("contextMenu")!==-1&&(z=["click"]),T.createElement(ul,Fe({builtinPlacements:p},h,{prefixCls:A,ref:N,popupClassName:se(C,Q({},"".concat(A,"-show-arrow"),i)),popupStyle:w,action:I,showAction:v,hideAction:z,popupPlacement:d,popupAlign:l,popupTransitionName:a,popupAnimation:s,popupVisible:O,stretch:_()?"minWidth":"",popup:G(),onPopupVisibleChange:Y,onPopupClick:H,getPopupContainer:V}),J)}const Ax=T.forwardRef(ox),ax=t=>typeof t!="object"&&typeof t!="function"||t===null;function sx(t,e,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(t){case"top":case"bottom":o.shiftX=e.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=e.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const A=Object.assign(Object.assign({},o),i);return A.shiftX||(A.adjustX=!0),A.shiftY||(A.adjustY=!0),A}const am={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},lx={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},cx=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function w1(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:A}=t,a=e/2,s={};return Object.keys(am).forEach(l=>{const u=r&&lx[l]||am[l],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(s[l]=d,cx.has(l)&&(d.autoArrow=!1),l){case"top":case"topLeft":case"topRight":d.offset[1]=-a-i;break;case"bottom":case"bottomLeft":case"bottomRight":d.offset[1]=a+i;break;case"left":case"leftTop":case"leftBottom":d.offset[0]=-a-i;break;case"right":case"rightTop":case"rightBottom":d.offset[0]=a+i;break}const g=Ws({contentRadius:o,limitVerticalRadius:!0});if(r)switch(l){case"topLeft":case"bottomLeft":d.offset[0]=-g.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":d.offset[0]=g.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":d.offset[1]=-g.arrowOffsetHorizontal*2+a;break;case"leftBottom":case"rightBottom":d.offset[1]=g.arrowOffsetHorizontal*2-a;break}d.overflow=sx(l,g,e,n),A&&(d.htmlRegion="visibleFirst")}),s}function S1(t){return e=>c.createElement(Wr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},c.createElement(t,Object.assign({},e)))}const I1=(t,e,n,r,i)=>S1(A=>{const{prefixCls:a,style:s}=A,l=c.useRef(null),[u,d]=c.useState(0),[g,p]=c.useState(0),[V,v]=Tn(!1,{value:A.open}),{getPrefixCls:m}=c.useContext(Qt),C=m(r||"select",a);c.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const M=new ResizeObserver(f=>{const R=f[0].target;d(R.offsetHeight+8),p(R.offsetWidth)}),I=setInterval(()=>{var f;const R=i?`.${i(C)}`:`.${C}-dropdown`,q=(f=l.current)===null||f===void 0?void 0:f.querySelector(R);q&&(clearInterval(I),M.observe(q))},10);return()=>{clearInterval(I),M.disconnect()}}},[]);let w=Object.assign(Object.assign({},A),{style:Object.assign(Object.assign({},s),{margin:0}),open:V,visible:V,getPopupContainer:()=>l.current});e&&Object.assign(w,{[e]:{overflow:{adjustX:!1,adjustY:!1}}});const S={paddingBottom:u,position:"relative",minWidth:g};return c.createElement("div",{ref:l,style:S},c.createElement(t,Object.assign({},w)))});var ux=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Vo=void 0;function dx(t,e){var n=t.prefixCls,r=t.invalidate,i=t.item,o=t.renderItem,A=t.responsive,a=t.responsiveDisabled,s=t.registerSize,l=t.itemKey,u=t.className,d=t.style,g=t.children,p=t.display,V=t.order,v=t.component,m=v===void 0?"div":v,C=qt(t,ux),w=A&&!p;function S(q){s(l,q)}c.useEffect(function(){return function(){S(null)}},[]);var M=o&&i!==Vo?o(i,{index:V}):g,I;r||(I={opacity:w?0:1,height:w?0:Vo,overflowY:w?"hidden":Vo,order:A?V:Vo,pointerEvents:w?"none":Vo,position:w?"absolute":Vo});var f={};w&&(f["aria-hidden"]=!0);var R=c.createElement(m,Fe({className:se(!r&&n,u),style:U(U({},I),d)},f,C,{ref:e}),M);return A&&(R=c.createElement(fi,{onResize:function(E){var h=E.offsetWidth;S(h)},disabled:a},R)),R}var CA=c.forwardRef(dx);CA.displayName="Item";function gx(t){if(typeof MessageChannel>"u")Lt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function fx(){var t=c.useRef(null),e=function(r){t.current||(t.current=[],gx(function(){zr.unstable_batchedUpdates(function(){t.current.forEach(function(i){i()}),t.current=null})})),t.current.push(r)};return e}function aA(t,e){var n=c.useState(e),r=$(n,2),i=r[0],o=r[1],A=nn(function(a){t(function(){o(a)})});return[i,A]}var ws=T.createContext(null),hx=["component"],px=["className"],mx=["className"],Vx=function(e,n){var r=c.useContext(ws);if(!r){var i=e.component,o=i===void 0?"div":i,A=qt(e,hx);return c.createElement(o,Fe({},A,{ref:n}))}var a=r.className,s=qt(r,px),l=e.className,u=qt(e,mx);return c.createElement(ws.Provider,{value:null},c.createElement(CA,Fe({ref:n,className:se(a,l)},s,u)))},b1=c.forwardRef(Vx);b1.displayName="RawItem";var vx=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],M1="responsive",R1="invalidate";function Cx(t){return"+ ".concat(t.length," ...")}function qx(t,e){var n=t.prefixCls,r=n===void 0?"rc-overflow":n,i=t.data,o=i===void 0?[]:i,A=t.renderItem,a=t.renderRawItem,s=t.itemKey,l=t.itemWidth,u=l===void 0?10:l,d=t.ssr,g=t.style,p=t.className,V=t.maxCount,v=t.renderRest,m=t.renderRawRest,C=t.suffix,w=t.component,S=w===void 0?"div":w,M=t.itemComponent,I=t.onVisibleChange,f=qt(t,vx),R=d==="full",q=fx(),E=aA(q,null),h=$(E,2),y=h[0],x=h[1],b=y||0,B=aA(q,new Map),O=$(B,2),N=O[0],F=O[1],j=aA(q,0),Y=$(j,2),H=Y[0],L=Y[1],G=aA(q,0),_=$(G,2),K=_[0],J=_[1],z=aA(q,0),te=$(z,2),X=te[0],Ae=te[1],le=T.useState(null),ue=$(le,2),ne=ue[0],me=ue[1],Z=T.useState(null),de=$(Z,2),ce=de[0],ye=de[1],Ie=c.useMemo(function(){return ce===null&&R?Number.MAX_SAFE_INTEGER:ce||0},[ce,y]),Ve=T.useState(!1),Be=$(Ve,2),Qe=Be[0],ke=Be[1],Se="".concat(r,"-item"),pe=Math.max(H,K),Me=V===M1,Le=o.length&&Me,et=V===R1,nt=Le||typeof V=="number"&&o.length>V,je=T.useMemo(function(){var He=o;return Le?y===null&&R?He=o:He=o.slice(0,Math.min(o.length,b/u)):typeof V=="number"&&(He=o.slice(0,V)),He},[o,u,y,V,Le]),Ee=T.useMemo(function(){return Le?o.slice(Ie+1):o.slice(je.length)},[o,je,Le,Ie]),We=T.useCallback(function(He,Xe){var xe;return typeof s=="function"?s(He):(xe=s&&(He==null?void 0:He[s]))!==null&&xe!==void 0?xe:Xe},[s]),ct=T.useCallback(A||function(He){return He},[A]);function _e(He,Xe,xe){ce===He&&(Xe===void 0||Xe===ne)||(ye(He),xe||(ke(He<o.length-1),I==null||I(He)),Xe!==void 0&&me(Xe))}function Oe(He,Xe){x(Xe.clientWidth)}function Re(He,Xe){F(function(xe){var it=new Map(xe);return Xe===null?it.delete(He):it.set(He,Xe),it})}function At(He,Xe){J(Xe),L(K)}function at(He,Xe){Ae(Xe)}function vt(He){return N.get(We(je[He],He))}$t(function(){if(b&&typeof pe=="number"&&je){var He=X,Xe=je.length,xe=Xe-1;if(!Xe){_e(0,null);return}for(var it=0;it<Xe;it+=1){var mt=vt(it);if(R&&(mt=mt||0),mt===void 0){_e(it-1,void 0,!0);break}if(He+=mt,xe===0&&He<=b||it===xe-1&&He+vt(xe)<=b){_e(xe,null);break}else if(He+pe>b){_e(it-1,He-mt-X+K);break}}C&&vt(0)+X>b&&me(null)}},[b,N,K,X,We,je]);var Tt=Qe&&!!Ee.length,Wt={};ne!==null&&Le&&(Wt={position:"absolute",left:ne,top:0});var Jt={prefixCls:Se,responsive:Le,component:M,invalidate:et},en=a?function(He,Xe){var xe=We(He,Xe);return c.createElement(ws.Provider,{key:xe,value:U(U({},Jt),{},{order:Xe,item:He,itemKey:xe,registerSize:Re,display:Xe<=Ie})},a(He,Xe))}:function(He,Xe){var xe=We(He,Xe);return c.createElement(CA,Fe({},Jt,{order:Xe,key:xe,item:He,renderItem:ct,itemKey:xe,registerSize:Re,display:Xe<=Ie}))},Xt={order:Tt?Ie:Number.MAX_SAFE_INTEGER,className:"".concat(Se,"-rest"),registerSize:At,display:Tt},Yt=v||Cx,Mt=m?c.createElement(ws.Provider,{value:U(U({},Jt),Xt)},m(Ee)):c.createElement(CA,Fe({},Jt,Xt),typeof Yt=="function"?Yt(Ee):Yt),pt=c.createElement(S,Fe({className:se(!et&&r,p),style:g,ref:e},f),je.map(en),nt?Mt:null,C&&c.createElement(CA,Fe({},Jt,{responsive:Me,responsiveDisabled:!Le,order:Ie,className:"".concat(Se,"-suffix"),registerSize:at,display:!0,style:Wt}),C));return Me?c.createElement(fi,{onResize:Oe,disabled:!Le},pt):pt}var Zr=c.forwardRef(qx);Zr.displayName="Overflow";Zr.Item=b1;Zr.RESPONSIVE=M1;Zr.INVALIDATE=R1;var x1=c.createContext(null);function T1(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function B1(t){var e=c.useContext(x1);return T1(e,t)}var Ex=["children","locked"],Qr=c.createContext(null);function yx(t,e){var n=U({},t);return Object.keys(e).forEach(function(r){var i=e[r];i!==void 0&&(n[r]=i)}),n}function QA(t){var e=t.children,n=t.locked,r=qt(t,Ex),i=c.useContext(Qr),o=HA(function(){return yx(i,r)},[i,r],function(A,a){return!n&&(A[0]!==a[0]||!yA(A[1],a[1],!0))});return c.createElement(Qr.Provider,{value:o},e)}var wx=[],O1=c.createContext(null);function dl(){return c.useContext(O1)}var D1=c.createContext(wx);function Wo(t){var e=c.useContext(D1);return c.useMemo(function(){return t!==void 0?[].concat(be(e),[t]):e},[e,t])}var N1=c.createContext(null),dg=c.createContext({});function sm(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(rg(t)){var n=t.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),i=t.getAttribute("tabindex"),o=Number(i),A=null;return i&&!Number.isNaN(o)?A=o:r&&A===null&&(A=0),r&&t.disabled&&(A=null),A!==null&&(A>=0||e&&A<0)}return!1}function Sx(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=be(t.querySelectorAll("*")).filter(function(r){return sm(r,e)});return sm(t,e)&&n.unshift(t),n}var fd=ot.LEFT,hd=ot.RIGHT,pd=ot.UP,_a=ot.DOWN,$a=ot.ENTER,F1=ot.ESC,sA=ot.HOME,lA=ot.END,lm=[pd,_a,fd,hd];function Ix(t,e,n,r){var i,o="prev",A="next",a="children",s="parent";if(t==="inline"&&r===$a)return{inlineTrigger:!0};var l=Q(Q({},pd,o),_a,A),u=Q(Q(Q(Q({},fd,n?A:o),hd,n?o:A),_a,a),$a,a),d=Q(Q(Q(Q(Q(Q({},pd,o),_a,A),$a,a),F1,s),fd,n?a:s),hd,n?s:a),g={inline:l,horizontal:u,vertical:d,inlineSub:l,horizontalSub:d,verticalSub:d},p=(i=g["".concat(t).concat(e?"":"Sub")])===null||i===void 0?void 0:i[r];switch(p){case o:return{offset:-1,sibling:!0};case A:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case a:return{offset:1,sibling:!1};default:return null}}function bx(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function Mx(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function gg(t,e){var n=Sx(t,!0);return n.filter(function(r){return e.has(r)})}function cm(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var i=gg(t,e),o=i.length,A=i.findIndex(function(a){return n===a});return r<0?A===-1?A=o-1:A-=1:r>0&&(A+=1),A=(A+o)%o,i[A]}var md=function(e,n){var r=new Set,i=new Map,o=new Map;return e.forEach(function(A){var a=document.querySelector("[data-menu-id='".concat(T1(n,A),"']"));a&&(r.add(a),o.set(a,A),i.set(A,a))}),{elements:r,key2element:i,element2key:o}};function Rx(t,e,n,r,i,o,A,a,s,l){var u=c.useRef(),d=c.useRef();d.current=e;var g=function(){Lt.cancel(u.current)};return c.useEffect(function(){return function(){g()}},[]),function(p){var V=p.which;if([].concat(lm,[$a,F1,sA,lA]).includes(V)){var v=o(),m=md(v,r),C=m,w=C.elements,S=C.key2element,M=C.element2key,I=S.get(e),f=Mx(I,w),R=M.get(f),q=Ix(t,A(R,!0).length===1,n,V);if(!q&&V!==sA&&V!==lA)return;(lm.includes(V)||[sA,lA].includes(V))&&p.preventDefault();var E=function(F){if(F){var j=F,Y=F.querySelector("a");Y!=null&&Y.getAttribute("href")&&(j=Y);var H=M.get(F);a(H),g(),u.current=Lt(function(){d.current===H&&j.focus()})}};if([sA,lA].includes(V)||q.sibling||!f){var h;!f||t==="inline"?h=i.current:h=bx(f);var y,x=gg(h,w);V===sA?y=x[0]:V===lA?y=x[x.length-1]:y=cm(h,w,f,q.offset),E(y)}else if(q.inlineTrigger)s(R);else if(q.offset>0)s(R,!0),g(),u.current=Lt(function(){m=md(v,r);var N=f.getAttribute("aria-controls"),F=document.getElementById(N),j=cm(F,m.elements);E(j)},5);else if(q.offset<0){var b=A(R,!0),B=b[b.length-2],O=S.get(B);s(B,!1),E(O)}}l==null||l(p)}}function xx(t){Promise.resolve().then(t)}var fg="__RC_UTIL_PATH_SPLIT__",um=function(e){return e.join(fg)},Tx=function(e){return e.split(fg)},Vd="rc-menu-more";function Bx(){var t=c.useState({}),e=$(t,2),n=e[1],r=T.useRef(new Map),i=T.useRef(new Map),o=c.useState([]),A=$(o,2),a=A[0],s=A[1],l=T.useRef(0),u=T.useRef(!1),d=function(){u.current||n({})},g=T.useCallback(function(S,M){process.env.NODE_ENV!=="production"&&Ct(!r.current.has(S),"Duplicated key '".concat(S,"' used in Menu by path [").concat(M.join(" > "),"]"));var I=um(M);i.current.set(I,S),r.current.set(S,I),l.current+=1;var f=l.current;xx(function(){f===l.current&&d()})},[]),p=T.useCallback(function(S,M){var I=um(M);i.current.delete(I),r.current.delete(S)},[]),V=T.useCallback(function(S){s(S)},[]),v=T.useCallback(function(S,M){var I=r.current.get(S)||"",f=Tx(I);return M&&a.includes(f[0])&&f.unshift(Vd),f},[a]),m=T.useCallback(function(S,M){return S.filter(function(I){return I!==void 0}).some(function(I){var f=v(I,!0);return f.includes(M)})},[v]),C=function(){var M=be(r.current.keys());return a.length&&M.push(Vd),M},w=T.useCallback(function(S){var M="".concat(r.current.get(S)).concat(fg),I=new Set;return be(i.current.keys()).forEach(function(f){f.startsWith(M)&&I.add(i.current.get(f))}),I},[]);return c.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:g,unregisterPath:p,refreshOverflowKeys:V,isSubPathKey:m,getKeyPath:v,getKeys:C,getSubPathKeys:w}}function fA(t){var e=c.useRef(t);e.current=t;var n=c.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),A=0;A<i;A++)o[A]=arguments[A];return(r=e.current)===null||r===void 0?void 0:r.call.apply(r,[e].concat(o))},[]);return t?n:void 0}var Ox=Math.random().toFixed(5).toString().slice(2),dm=0;function Dx(t){var e=Tn(t,{value:t}),n=$(e,2),r=n[0],i=n[1];return c.useEffect(function(){dm+=1;var o=process.env.NODE_ENV==="test"?"test":"".concat(Ox,"-").concat(dm);i("rc-menu-uuid-".concat(o))},[]),r}function Q1(t,e,n,r){var i=c.useContext(Qr),o=i.activeKey,A=i.onActive,a=i.onInactive,s={active:o===t};return e||(s.onMouseEnter=function(l){n==null||n({key:t,domEvent:l}),A(t)},s.onMouseLeave=function(l){r==null||r({key:t,domEvent:l}),a(t)}),s}function k1(t){var e=c.useContext(Qr),n=e.mode,r=e.rtl,i=e.inlineIndent;if(n!=="inline")return null;var o=t;return r?{paddingRight:o*i}:{paddingLeft:o*i}}function U1(t){var e=t.icon,n=t.props,r=t.children,i;return e===null||e===!1?null:(typeof e=="function"?i=c.createElement(e,U({},n)):typeof e!="boolean"&&(i=e),i||r||null)}var Nx=["item"];function Ss(t){var e=t.item,n=qt(t,Nx);return Object.defineProperty(n,"item",{get:function(){return Ct(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e}}),n}var Fx=["title","attribute","elementRef"],Qx=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],kx=["active"],Ux=function(t){di(n,t);var e=gi(n);function n(){return fn(this,n),e.apply(this,arguments)}return hn(n,[{key:"render",value:function(){var i=this.props,o=i.title,A=i.attribute,a=i.elementRef,s=qt(i,Fx),l=$n(s,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Ct(!A,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),c.createElement(Zr.Item,Fe({},A,{title:typeof o=="string"?o:void 0},l,{ref:a}))}}]),n}(c.Component),Gx=c.forwardRef(function(t,e){var n=t.style,r=t.className,i=t.eventKey,o=t.warnKey,A=t.disabled,a=t.itemIcon,s=t.children,l=t.role,u=t.onMouseEnter,d=t.onMouseLeave,g=t.onClick,p=t.onKeyDown,V=t.onFocus,v=qt(t,Qx),m=B1(i),C=c.useContext(Qr),w=C.prefixCls,S=C.onItemClick,M=C.disabled,I=C.overflowDisabled,f=C.itemIcon,R=C.selectedKeys,q=C.onActive,E=c.useContext(dg),h=E._internalRenderMenuItem,y="".concat(w,"-item"),x=c.useRef(),b=c.useRef(),B=M||A,O=Fi(e,b),N=Wo(i);process.env.NODE_ENV!=="production"&&o&&Ct(!1,"MenuItem should not leave undefined `key`.");var F=function(le){return{key:i,keyPath:be(N).reverse(),item:x.current,domEvent:le}},j=a||f,Y=Q1(i,B,u,d),H=Y.active,L=qt(Y,kx),G=R.includes(i),_=k1(N.length),K=function(le){if(!B){var ue=F(le);g==null||g(Ss(ue)),S(ue)}},J=function(le){if(p==null||p(le),le.which===ot.ENTER){var ue=F(le);g==null||g(Ss(ue)),S(ue)}},z=function(le){q(i),V==null||V(le)},te={};t.role==="option"&&(te["aria-selected"]=G);var X=c.createElement(Ux,Fe({ref:x,elementRef:O,role:l===null?"none":l||"menuitem",tabIndex:A?null:-1,"data-menu-id":I&&m?null:m},$n(v,["extra"]),L,te,{component:"li","aria-disabled":A,style:U(U({},_),n),className:se(y,Q(Q(Q({},"".concat(y,"-active"),H),"".concat(y,"-selected"),G),"".concat(y,"-disabled"),B),r),onClick:K,onKeyDown:J,onFocus:z}),s,c.createElement(U1,{props:U(U({},t),{},{isSelected:G}),icon:j}));return h&&(X=h(X,t,{selected:G})),X});function jx(t,e){var n=t.eventKey,r=dl(),i=Wo(n);return c.useEffect(function(){if(r)return r.registerPath(n,i),function(){r.unregisterPath(n,i)}},[i]),r?null:c.createElement(Gx,Fe({},t,{ref:e}))}const gl=c.forwardRef(jx);var Px=["className","children"],Lx=function(e,n){var r=e.className,i=e.children,o=qt(e,Px),A=c.useContext(Qr),a=A.prefixCls,s=A.mode,l=A.rtl;return c.createElement("ul",Fe({className:se(a,l&&"".concat(a,"-rtl"),"".concat(a,"-sub"),"".concat(a,"-").concat(s==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),i)},hg=c.forwardRef(Lx);hg.displayName="SubMenuList";function pg(t,e){return Nr(t).map(function(n,r){if(c.isValidElement(n)){var i,o,A=n.key,a=(i=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:A,s=a==null;s&&(a="tmp_key-".concat([].concat(be(e),[r]).join("-")));var l={key:a,eventKey:a};return process.env.NODE_ENV!=="production"&&s&&(l.warnKey=!0),c.cloneElement(n,l)}return n})}var Fn={adjustX:1,adjustY:1},Yx={topLeft:{points:["bl","tl"],overflow:Fn},topRight:{points:["br","tr"],overflow:Fn},bottomLeft:{points:["tl","bl"],overflow:Fn},bottomRight:{points:["tr","br"],overflow:Fn},leftTop:{points:["tr","tl"],overflow:Fn},leftBottom:{points:["br","bl"],overflow:Fn},rightTop:{points:["tl","tr"],overflow:Fn},rightBottom:{points:["bl","br"],overflow:Fn}},Hx={topLeft:{points:["bl","tl"],overflow:Fn},topRight:{points:["br","tr"],overflow:Fn},bottomLeft:{points:["tl","bl"],overflow:Fn},bottomRight:{points:["tr","br"],overflow:Fn},rightTop:{points:["tr","tl"],overflow:Fn},rightBottom:{points:["br","bl"],overflow:Fn},leftTop:{points:["tl","tr"],overflow:Fn},leftBottom:{points:["bl","br"],overflow:Fn}};function G1(t,e,n){if(e)return e;if(n)return n[t]||n.other}var Kx={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Zx(t){var e=t.prefixCls,n=t.visible,r=t.children,i=t.popup,o=t.popupStyle,A=t.popupClassName,a=t.popupOffset,s=t.disabled,l=t.mode,u=t.onVisibleChange,d=c.useContext(Qr),g=d.getPopupContainer,p=d.rtl,V=d.subMenuOpenDelay,v=d.subMenuCloseDelay,m=d.builtinPlacements,C=d.triggerSubMenuAction,w=d.forceSubMenuRender,S=d.rootClassName,M=d.motion,I=d.defaultMotions,f=c.useState(!1),R=$(f,2),q=R[0],E=R[1],h=U(p?U({},Hx):U({},Yx),m),y=Kx[l],x=G1(l,M,I),b=c.useRef(x);l!=="inline"&&(b.current=x);var B=U(U({},b.current),{},{leavedClassName:"".concat(e,"-hidden"),removeOnLeave:!1,motionAppear:!0}),O=c.useRef();return c.useEffect(function(){return O.current=Lt(function(){E(n)}),function(){Lt.cancel(O.current)}},[n]),c.createElement(ul,{prefixCls:e,popupClassName:se("".concat(e,"-popup"),Q({},"".concat(e,"-rtl"),p),A,S),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:h,popupPlacement:y,popupVisible:q,popup:i,popupStyle:o,popupAlign:a&&{offset:a},action:s?[]:[C],mouseEnterDelay:V,mouseLeaveDelay:v,onPopupVisibleChange:u,forceRender:w,popupMotion:B,fresh:!0},r)}function zx(t){var e=t.id,n=t.open,r=t.keyPath,i=t.children,o="inline",A=c.useContext(Qr),a=A.prefixCls,s=A.forceSubMenuRender,l=A.motion,u=A.defaultMotions,d=A.mode,g=c.useRef(!1);g.current=d===o;var p=c.useState(!g.current),V=$(p,2),v=V[0],m=V[1],C=g.current?n:!1;c.useEffect(function(){g.current&&m(!1)},[d]);var w=U({},G1(o,l,u));r.length>1&&(w.motionAppear=!1);var S=w.onVisibleChanged;return w.onVisibleChanged=function(M){return!g.current&&!M&&m(!0),S==null?void 0:S(M)},v?null:c.createElement(QA,{mode:o,locked:!g.current},c.createElement(oo,Fe({visible:C},w,{forceRender:s,removeOnLeave:!1,leavedClassName:"".concat(a,"-hidden")}),function(M){var I=M.className,f=M.style;return c.createElement(hg,{id:e,className:I,style:f},i)}))}var Jx=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Wx=["active"],Xx=c.forwardRef(function(t,e){var n=t.style,r=t.className,i=t.title,o=t.eventKey,A=t.warnKey,a=t.disabled,s=t.internalPopupClose,l=t.children,u=t.itemIcon,d=t.expandIcon,g=t.popupClassName,p=t.popupOffset,V=t.popupStyle,v=t.onClick,m=t.onMouseEnter,C=t.onMouseLeave,w=t.onTitleClick,S=t.onTitleMouseEnter,M=t.onTitleMouseLeave,I=qt(t,Jx),f=B1(o),R=c.useContext(Qr),q=R.prefixCls,E=R.mode,h=R.openKeys,y=R.disabled,x=R.overflowDisabled,b=R.activeKey,B=R.selectedKeys,O=R.itemIcon,N=R.expandIcon,F=R.onItemClick,j=R.onOpenChange,Y=R.onActive,H=c.useContext(dg),L=H._internalRenderSubMenuItem,G=c.useContext(N1),_=G.isSubPathKey,K=Wo(),J="".concat(q,"-submenu"),z=y||a,te=c.useRef(),X=c.useRef();process.env.NODE_ENV!=="production"&&A&&Ct(!1,"SubMenu should not leave undefined `key`.");var Ae=u??O,le=d??N,ue=h.includes(o),ne=!x&&ue,me=_(B,o),Z=Q1(o,z,S,M),de=Z.active,ce=qt(Z,Wx),ye=c.useState(!1),Ie=$(ye,2),Ve=Ie[0],Be=Ie[1],Qe=function(at){z||Be(at)},ke=function(at){Qe(!0),m==null||m({key:o,domEvent:at})},Se=function(at){Qe(!1),C==null||C({key:o,domEvent:at})},pe=c.useMemo(function(){return de||(E!=="inline"?Ve||_([b],o):!1)},[E,de,b,Ve,o,_]),Me=k1(K.length),Le=function(at){z||(w==null||w({key:o,domEvent:at}),E==="inline"&&j(o,!ue))},et=fA(function(At){v==null||v(Ss(At)),F(At)}),nt=function(at){E!=="inline"&&j(o,at)},je=function(){Y(o)},Ee=f&&"".concat(f,"-popup"),We=c.useMemo(function(){return c.createElement(U1,{icon:E!=="horizontal"?le:void 0,props:U(U({},t),{},{isOpen:ne,isSubMenu:!0})},c.createElement("i",{className:"".concat(J,"-arrow")}))},[E,le,t,ne,J]),ct=c.createElement("div",Fe({role:"menuitem",style:Me,className:"".concat(J,"-title"),tabIndex:z?null:-1,ref:te,title:typeof i=="string"?i:null,"data-menu-id":x&&f?null:f,"aria-expanded":ne,"aria-haspopup":!0,"aria-controls":Ee,"aria-disabled":z,onClick:Le,onFocus:je},ce),i,We),_e=c.useRef(E);if(E!=="inline"&&K.length>1?_e.current="vertical":_e.current=E,!x){var Oe=_e.current;ct=c.createElement(Zx,{mode:Oe,prefixCls:J,visible:!s&&ne&&E!=="inline",popupClassName:g,popupOffset:p,popupStyle:V,popup:c.createElement(QA,{mode:Oe==="horizontal"?"vertical":Oe},c.createElement(hg,{id:Ee,ref:X},l)),disabled:z,onVisibleChange:nt},ct)}var Re=c.createElement(Zr.Item,Fe({ref:e,role:"none"},I,{component:"li",style:n,className:se(J,"".concat(J,"-").concat(E),r,Q(Q(Q(Q({},"".concat(J,"-open"),ne),"".concat(J,"-active"),pe),"".concat(J,"-selected"),me),"".concat(J,"-disabled"),z)),onMouseEnter:ke,onMouseLeave:Se}),ct,!x&&c.createElement(zx,{id:Ee,open:ne,keyPath:K},l));return L&&(Re=L(Re,t,{selected:me,active:pe,open:ne,disabled:z})),c.createElement(QA,{onItemClick:et,mode:E==="horizontal"?"vertical":E,itemIcon:Ae,expandIcon:le},Re)}),ia=c.forwardRef(function(t,e){var n=t.eventKey,r=t.children,i=Wo(n),o=pg(r,i),A=dl();c.useEffect(function(){if(A)return A.registerPath(n,i),function(){A.unregisterPath(n,i)}},[i]);var a;return A?a=o:a=c.createElement(Xx,Fe({ref:e},t),o),c.createElement(D1.Provider,{value:i},a)});process.env.NODE_ENV!=="production"&&(ia.displayName="SubMenu");function mg(t){var e=t.className,n=t.style,r=c.useContext(Qr),i=r.prefixCls,o=dl();return o?null:c.createElement("li",{role:"separator",className:se("".concat(i,"-item-divider"),e),style:n})}var _x=["className","title","eventKey","children"],$x=c.forwardRef(function(t,e){var n=t.className,r=t.title;t.eventKey;var i=t.children,o=qt(t,_x),A=c.useContext(Qr),a=A.prefixCls,s="".concat(a,"-item-group");return c.createElement("li",Fe({ref:e,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:se(s,n)}),c.createElement("div",{role:"presentation",className:"".concat(s,"-title"),title:typeof r=="string"?r:void 0},r),c.createElement("ul",{role:"group",className:"".concat(s,"-list")},i))}),fl=c.forwardRef(function(t,e){var n=t.eventKey,r=t.children,i=Wo(n),o=pg(r,i),A=dl();return A?o:c.createElement($x,Fe({ref:e},$n(t,["warnKey"])),o)});process.env.NODE_ENV!=="production"&&(fl.displayName="MenuItemGroup");var eT=["label","children","key","type","extra"];function vd(t,e,n){var r=e.item,i=e.group,o=e.submenu,A=e.divider;return(t||[]).map(function(a,s){if(a&&$e(a)==="object"){var l=a,u=l.label,d=l.children,g=l.key,p=l.type,V=l.extra,v=qt(l,eT),m=g??"tmp-".concat(s);return d||p==="group"?p==="group"?c.createElement(i,Fe({key:m},v,{title:u}),vd(d,e,n)):c.createElement(o,Fe({key:m},v,{title:u}),vd(d,e,n)):p==="divider"?c.createElement(A,Fe({key:m},v)):c.createElement(r,Fe({key:m},v,{extra:V}),u,(!!V||V===0)&&c.createElement("span",{className:"".concat(n,"-item-extra")},V))}return null}).filter(function(a){return a})}function gm(t,e,n,r,i){var o=t,A=U({divider:mg,item:gl,group:fl,submenu:ia},r);return e&&(o=vd(e,A,i)),pg(o,n)}var tT=["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"],ji=[],nT=c.forwardRef(function(t,e){var n,r=t,i=r.prefixCls,o=i===void 0?"rc-menu":i,A=r.rootClassName,a=r.style,s=r.className,l=r.tabIndex,u=l===void 0?0:l,d=r.items,g=r.children,p=r.direction,V=r.id,v=r.mode,m=v===void 0?"vertical":v,C=r.inlineCollapsed,w=r.disabled,S=r.disabledOverflow,M=r.subMenuOpenDelay,I=M===void 0?.1:M,f=r.subMenuCloseDelay,R=f===void 0?.1:f,q=r.forceSubMenuRender,E=r.defaultOpenKeys,h=r.openKeys,y=r.activeKey,x=r.defaultActiveFirst,b=r.selectable,B=b===void 0?!0:b,O=r.multiple,N=O===void 0?!1:O,F=r.defaultSelectedKeys,j=r.selectedKeys,Y=r.onSelect,H=r.onDeselect,L=r.inlineIndent,G=L===void 0?24:L,_=r.motion,K=r.defaultMotions,J=r.triggerSubMenuAction,z=J===void 0?"hover":J,te=r.builtinPlacements,X=r.itemIcon,Ae=r.expandIcon,le=r.overflowedIndicator,ue=le===void 0?"...":le,ne=r.overflowedIndicatorPopupClassName,me=r.getPopupContainer,Z=r.onClick,de=r.onOpenChange,ce=r.onKeyDown,ye=r.openAnimation,Ie=r.openTransitionName,Ve=r._internalRenderMenuItem,Be=r._internalRenderSubMenuItem,Qe=r._internalComponents,ke=qt(r,tT),Se=c.useMemo(function(){return[gm(g,d,ji,Qe,o),gm(g,d,ji,{},o)]},[g,d,Qe]),pe=$(Se,2),Me=pe[0],Le=pe[1],et=c.useState(!1),nt=$(et,2),je=nt[0],Ee=nt[1],We=c.useRef(),ct=Dx(V),_e=p==="rtl";process.env.NODE_ENV!=="production"&&Ct(!ye&&!Ie,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var Oe=Tn(E,{value:h,postState:function(ft){return ft||ji}}),Re=$(Oe,2),At=Re[0],at=Re[1],vt=function(ft){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function xt(){at(ft),de==null||de(ft)}Et?zr.flushSync(xt):xt()},Tt=c.useState(At),Wt=$(Tt,2),Jt=Wt[0],en=Wt[1],Xt=c.useRef(!1),Yt=c.useMemo(function(){return(m==="inline"||m==="vertical")&&C?["vertical",C]:[m,!1]},[m,C]),Mt=$(Yt,2),pt=Mt[0],He=Mt[1],Xe=pt==="inline",xe=c.useState(pt),it=$(xe,2),mt=it[0],De=it[1],we=c.useState(He),Ye=$(we,2),Ke=Ye[0],Ue=Ye[1];c.useEffect(function(){De(pt),Ue(He),Xt.current&&(Xe?at(Jt):vt(ji))},[pt,He]);var D=c.useState(0),fe=$(D,2),k=fe[0],ae=fe[1],ee=k>=Me.length-1||mt!=="horizontal"||S;c.useEffect(function(){Xe&&en(At)},[At]),c.useEffect(function(){return Xt.current=!0,function(){Xt.current=!1}},[]);var Ce=Bx(),ze=Ce.registerPath,tt=Ce.unregisterPath,Dt=Ce.refreshOverflowKeys,gt=Ce.isSubPathKey,yt=Ce.getKeyPath,qe=Ce.getKeys,Te=Ce.getSubPathKeys,st=c.useMemo(function(){return{registerPath:ze,unregisterPath:tt}},[ze,tt]),ut=c.useMemo(function(){return{isSubPathKey:gt}},[gt]);c.useEffect(function(){Dt(ee?ji:Me.slice(k+1).map(function(Pe){return Pe.key}))},[k,ee]);var Nt=Tn(y||x&&((n=Me[0])===null||n===void 0?void 0:n.key),{value:y}),On=$(Nt,2),sn=On[0],Kn=On[1],Gr=fA(function(Pe){Kn(Pe)}),Un=fA(function(){Kn(void 0)});T.useImperativeHandle(e,function(){return{list:We.current,focus:function(ft){var Et,xt=qe(),Ot=md(xt,ct),Cn=Ot.elements,qn=Ot.key2element,Zn=Ot.element2key,tr=gg(We.current,Cn),zn=sn??(tr[0]?Zn.get(tr[0]):(Et=Me.find(function(Ui){return!Ui.props.disabled}))===null||Et===void 0?void 0:Et.key),Jn=qn.get(zn);if(zn&&Jn){var pn;Jn==null||(pn=Jn.focus)===null||pn===void 0||pn.call(Jn,ft)}}}});var Gn=Tn(F||[],{value:j,postState:function(ft){return Array.isArray(ft)?ft:ft==null?ji:[ft]}}),Sr=$(Gn,2),jn=Sr[0],_r=Sr[1],Ir=function(ft){if(B){var Et=ft.key,xt=jn.includes(Et),Ot;N?xt?Ot=jn.filter(function(qn){return qn!==Et}):Ot=[].concat(be(jn),[Et]):Ot=[Et],_r(Ot);var Cn=U(U({},ft),{},{selectedKeys:Ot});xt?H==null||H(Cn):Y==null||Y(Cn)}!N&&At.length&&mt!=="inline"&&vt(ji)},Pn=fA(function(Pe){Z==null||Z(Ss(Pe)),Ir(Pe)}),er=fA(function(Pe,ft){var Et=At.filter(function(Ot){return Ot!==Pe});if(ft)Et.push(Pe);else if(mt!=="inline"){var xt=Te(Pe);Et=Et.filter(function(Ot){return!xt.has(Ot)})}yA(At,Et,!0)||vt(Et,!0)}),ur=function(ft,Et){var xt=Et??!At.includes(ft);er(ft,xt)},dr=Rx(mt,sn,_e,ct,We,qe,yt,Kn,ur,ce);c.useEffect(function(){Ee(!0)},[]);var jr=c.useMemo(function(){return{_internalRenderMenuItem:Ve,_internalRenderSubMenuItem:Be}},[Ve,Be]),$r=mt!=="horizontal"||S?Me:Me.map(function(Pe,ft){return c.createElement(QA,{key:Pe.key,overflowDisabled:ft>k},Pe)}),wt=c.createElement(Zr,Fe({id:V,ref:We,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:gl,className:se(o,"".concat(o,"-root"),"".concat(o,"-").concat(mt),s,Q(Q({},"".concat(o,"-inline-collapsed"),Ke),"".concat(o,"-rtl"),_e),A),dir:p,style:a,role:"menu",tabIndex:u,data:$r,renderRawItem:function(ft){return ft},renderRawRest:function(ft){var Et=ft.length,xt=Et?Me.slice(-Et):null;return c.createElement(ia,{eventKey:Vd,title:ue,disabled:ee,internalPopupClose:Et===0,popupClassName:ne},xt)},maxCount:mt!=="horizontal"||S?Zr.INVALIDATE:Zr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ft){ae(ft)},onKeyDown:dr},ke));return c.createElement(dg.Provider,{value:jr},c.createElement(x1.Provider,{value:ct},c.createElement(QA,{prefixCls:o,rootClassName:A,mode:mt,openKeys:At,rtl:_e,disabled:w,motion:je?_:null,defaultMotions:je?K:null,activeKey:sn,onActive:Gr,onInactive:Un,selectedKeys:jn,inlineIndent:G,subMenuOpenDelay:I,subMenuCloseDelay:R,forceSubMenuRender:q,builtinPlacements:te,triggerSubMenuAction:z,getPopupContainer:me,itemIcon:X,expandIcon:Ae,onItemClick:Pn,onOpenChange:er},c.createElement(N1.Provider,{value:ut},wt),c.createElement("div",{style:{display:"none"},"aria-hidden":!0},c.createElement(O1.Provider,{value:st},Le)))))}),oa=nT;oa.Item=gl;oa.SubMenu=ia;oa.ItemGroup=fl;oa.Divider=mg;var rT={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},iT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:rT}))},j1=c.forwardRef(iT);process.env.NODE_ENV!=="production"&&(j1.displayName="BarsOutlined");var oT={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"},AT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:oT}))},Cd=c.forwardRef(AT);process.env.NODE_ENV!=="production"&&(Cd.displayName="LeftOutlined");const aT=c.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),sT=t=>{const{antCls:e,componentCls:n,colorText:r,footerBg:i,headerHeight:o,headerPadding:A,headerColor:a,footerPadding:s,fontSize:l,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:A,color:a,lineHeight:ve(o),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:s,color:r,fontSize:l,background:i},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},P1=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:o,marginXXS:A,colorTextLightSolid:a,colorBgContainer:s}=t,l=r*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${l}px`,headerColor:i,footerPadding:`${o}px ${l}px`,footerBg:e,siderBg:"#001529",triggerHeight:r+A*2,triggerBg:"#002140",triggerColor:a,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:s,lightTriggerBg:s,lightTriggerColor:i}},L1=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];bn("Layout",t=>[sT(t)],P1,{deprecatedTokens:L1});const lT=t=>{const{componentCls:e,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:o,triggerHeight:A,triggerColor:a,triggerBg:s,headerHeight:l,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:g,lightSiderBg:p,lightTriggerColor:V,lightTriggerBg:v,bodyBg:m}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:A},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:A,color:a,lineHeight:ve(A),textAlign:"center",background:s,cursor:"pointer",transition:`all ${r}`},[`${e}-zero-width`]:{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:l,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:a,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${ve(g)} ${ve(g)} 0`,cursor:"pointer",transition:`background ${i} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${i}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:t.calc(u).mul(-1).equal(),borderRadius:`${ve(g)} 0 0 ${ve(g)}`}}},"&-light":{background:p,[`${e}-trigger`]:{color:V,background:v},[`${e}-zero-width-trigger`]:{color:V,background:v,border:`1px solid ${m}`,borderInlineStart:0}}}}},cT=bn(["Layout","Sider"],t=>[lT(t)],P1,{deprecatedTokens:L1});var uT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const fm={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},dT=t=>!Number.isNaN(Number.parseFloat(t))&&isFinite(t),Vg=c.createContext({}),gT=(()=>{let t=0;return function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t+=1,`${e}${t}`}})(),fT=c.forwardRef((t,e)=>{const{prefixCls:n,className:r,trigger:i,children:o,defaultCollapsed:A=!1,theme:a="dark",style:s={},collapsible:l=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:g=80,zeroWidthTriggerStyle:p,breakpoint:V,onCollapse:v,onBreakpoint:m}=t,C=uT(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:w}=T.useContext(aT),[S,M]=T.useState("collapsed"in t?t.collapsed:A),[I,f]=T.useState(!1);T.useEffect(()=>{"collapsed"in t&&M(t.collapsed)},[t.collapsed]);const R=(X,Ae)=>{"collapsed"in t||M(X),v==null||v(X,Ae)},{getPrefixCls:q,direction:E}=T.useContext(Qt),h=q("layout-sider",n),[y,x,b]=cT(h),B=T.useRef(null);B.current=X=>{f(X.matches),m==null||m(X.matches),S!==X.matches&&R(X.matches,"responsive")},T.useEffect(()=>{function X(le){return B.current(le)}let Ae;if(typeof window<"u"){const{matchMedia:le}=window;if(le&&V&&V in fm){Ae=le(`screen and (max-width: ${fm[V]})`);try{Ae.addEventListener("change",X)}catch{Ae.addListener(X)}X(Ae)}}return()=>{try{Ae==null||Ae.removeEventListener("change",X)}catch{Ae==null||Ae.removeListener(X)}}},[V]),T.useEffect(()=>{const X=gT("ant-sider-");return w.addSider(X),()=>w.removeSider(X)},[]);const O=()=>{R(!S,"clickTrigger")},N=$n(C,["collapsed"]),F=S?g:d,j=dT(F)?`${F}px`:String(F),Y=parseFloat(String(g||0))===0?c.createElement("span",{onClick:O,className:se(`${h}-zero-width-trigger`,`${h}-zero-width-trigger-${u?"right":"left"}`),style:p},i||c.createElement(j1,null)):null,H=E==="rtl"==!u,_={expanded:H?c.createElement(qs,null):c.createElement(Cd,null),collapsed:H?c.createElement(Cd,null):c.createElement(qs,null)}[S?"collapsed":"expanded"],K=i!==null?Y||c.createElement("div",{className:`${h}-trigger`,onClick:O,style:{width:j}},i||_):null,J=Object.assign(Object.assign({},s),{flex:`0 0 ${j}`,maxWidth:j,minWidth:j,width:j}),z=se(h,`${h}-${a}`,{[`${h}-collapsed`]:!!S,[`${h}-has-trigger`]:l&&i!==null&&!Y,[`${h}-below`]:!!I,[`${h}-zero-width`]:parseFloat(j)===0},r,x,b),te=c.useMemo(()=>({siderCollapsed:S}),[S]);return y(c.createElement(Vg.Provider,{value:te},c.createElement("aside",Object.assign({className:z},N,{style:J,ref:e}),c.createElement("div",{className:`${h}-children`},o),l||I&&Y?K:null)))});process.env.NODE_ENV!=="production"&&(fT.displayName="Sider");var hT={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"},pT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:hT}))},vg=c.forwardRef(pT);process.env.NODE_ENV!=="production"&&(vg.displayName="EllipsisOutlined");const Is=T.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var mT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Y1=t=>{const{prefixCls:e,className:n,dashed:r}=t,i=mT(t,["prefixCls","className","dashed"]),{getPrefixCls:o}=c.useContext(Qt),A=o("menu",e),a=se({[`${A}-item-divider-dashed`]:!!r},n);return c.createElement(mg,Object.assign({className:a},i))};function Cg(t){var e=t.children,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle,o=t.bodyClassName,A=t.className,a=t.style;return c.createElement("div",{className:se("".concat(n,"-content"),A),style:a},c.createElement("div",{className:se("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof e=="function"?e():e))}var vo={shiftX:64,adjustY:1},Co={adjustX:1,shiftY:!0},Vr=[0,0],VT={left:{points:["cr","cl"],overflow:Co,offset:[-4,0],targetOffset:Vr},right:{points:["cl","cr"],overflow:Co,offset:[4,0],targetOffset:Vr},top:{points:["bc","tc"],overflow:vo,offset:[0,-4],targetOffset:Vr},bottom:{points:["tc","bc"],overflow:vo,offset:[0,4],targetOffset:Vr},topLeft:{points:["bl","tl"],overflow:vo,offset:[0,-4],targetOffset:Vr},leftTop:{points:["tr","tl"],overflow:Co,offset:[-4,0],targetOffset:Vr},topRight:{points:["br","tr"],overflow:vo,offset:[0,-4],targetOffset:Vr},rightTop:{points:["tl","tr"],overflow:Co,offset:[4,0],targetOffset:Vr},bottomRight:{points:["tr","br"],overflow:vo,offset:[0,4],targetOffset:Vr},rightBottom:{points:["bl","br"],overflow:Co,offset:[4,0],targetOffset:Vr},bottomLeft:{points:["tl","bl"],overflow:vo,offset:[0,4],targetOffset:Vr},leftBottom:{points:["br","bl"],overflow:Co,offset:[-4,0],targetOffset:Vr}},vT=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],CT=function(e,n){var r=e.overlayClassName,i=e.trigger,o=i===void 0?["hover"]:i,A=e.mouseEnterDelay,a=A===void 0?0:A,s=e.mouseLeaveDelay,l=s===void 0?.1:s,u=e.overlayStyle,d=e.prefixCls,g=d===void 0?"rc-tooltip":d,p=e.children,V=e.onVisibleChange,v=e.afterVisibleChange,m=e.transitionName,C=e.animation,w=e.motion,S=e.placement,M=S===void 0?"right":S,I=e.align,f=I===void 0?{}:I,R=e.destroyTooltipOnHide,q=R===void 0?!1:R,E=e.defaultVisible,h=e.getTooltipContainer,y=e.overlayInnerStyle;e.arrowContent;var x=e.overlay,b=e.id,B=e.showArrow,O=B===void 0?!0:B,N=e.classNames,F=e.styles,j=qt(e,vT),Y=$s(b),H=T.useRef(null);T.useImperativeHandle(n,function(){return H.current});var L=U({},j);"visible"in e&&(L.popupVisible=e.visible);var G=function(){return c.createElement(Cg,{key:"content",prefixCls:g,id:Y,bodyClassName:N==null?void 0:N.body,overlayInnerStyle:U(U({},y),F==null?void 0:F.body)},x)},_=function(){var J=c.Children.only(p),z=(J==null?void 0:J.props)||{},te=U(U({},z),{},{"aria-describedby":x?Y:null});return c.cloneElement(p,te)};return c.createElement(ul,Fe({popupClassName:se(r,N==null?void 0:N.root),prefixCls:g,popup:G,action:o,builtinPlacements:VT,popupPlacement:M,ref:H,popupAlign:f,getPopupContainer:h,onPopupVisibleChange:V,afterPopupVisibleChange:v,popupTransitionName:m,popupAnimation:C,popupMotion:w,defaultPopupVisible:E,autoDestroy:q,mouseLeaveDelay:l,popupStyle:U(U({},u),F==null?void 0:F.root),mouseEnterDelay:a,arrow:O},L),_())};const qT=T.forwardRef(CT),ET=Ti.map(t=>`${t}-inverse`),yT=["success","processing","error","default","warning"];function H1(t){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(be(ET),be(Ti)).includes(t):Ti.includes(t)}function wT(t){return yT.includes(t)}function K1(t,e){const n=H1(e),r=se({[`${t}-${e}`]:e&&n}),i={},o={};return e&&!n&&(i.background=e,o["--antd-arrow-background-color"]=e),{className:r,overlayStyle:i,arrowStyle:o}}const ST=t=>{const{prefixCls:e,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:A}=t,{getPrefixCls:a}=c.useContext(Qt),s=a("tooltip",e),[l,u,d]=Iv(s),g=K1(s,o),p=g.arrowStyle,V=Object.assign(Object.assign({},A),g.overlayStyle),v=se(u,d,s,`${s}-pure`,`${s}-placement-${r}`,n,g.className);return l(c.createElement("div",{className:v,style:p},c.createElement("div",{className:`${s}-arrow`}),c.createElement(Cg,Object.assign({},t,{className:u,prefixCls:s,overlayInnerStyle:V}),i)))};var IT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const bT=c.forwardRef((t,e)=>{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:A,color:a,overlayInnerStyle:s,children:l,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:g,arrow:p=!0,title:V,overlay:v,builtinPlacements:m,arrowPointAtCenter:C=!1,autoAdjustOverflow:w=!0,motion:S,getPopupContainer:M,placement:I="top",mouseEnterDelay:f=.1,mouseLeaveDelay:R=.1,overlayStyle:q,rootClassName:E,overlayClassName:h,styles:y,classNames:x}=t,b=IT(t,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),B=!!p,[,O]=lr(),{getPopupContainer:N,getPrefixCls:F,direction:j,className:Y,style:H,classNames:L,styles:G}=Jr("tooltip"),_=an("Tooltip"),K=c.useRef(null),J=()=>{var Ee;(Ee=K.current)===null||Ee===void 0||Ee.forceAlign()};c.useImperativeHandle(e,()=>{var Ee,We;return{forceAlign:J,forcePopupAlign:()=>{_.deprecated(!1,"forcePopupAlign","forceAlign"),J()},nativeElement:(Ee=K.current)===null||Ee===void 0?void 0:Ee.nativeElement,popupElement:(We=K.current)===null||We===void 0?void 0:We.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName","classNames={{ root: {} }}"]].forEach(Ee=>{let[We,ct]=Ee;_.deprecated(!(We in t),We,ct)}),process.env.NODE_ENV!=="production"&&_(!g||typeof g=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&_(!p||typeof p=="boolean"||!("arrowPointAtCenter"in p),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[z,te]=Tn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),X=!V&&!v&&V!==0,Ae=Ee=>{var We,ct;te(X?!1:Ee),X||((We=t.onOpenChange)===null||We===void 0||We.call(t,Ee),(ct=t.onVisibleChange)===null||ct===void 0||ct.call(t,Ee))},le=c.useMemo(()=>{var Ee,We;let ct=C;return typeof p=="object"&&(ct=(We=(Ee=p.pointAtCenter)!==null&&Ee!==void 0?Ee:p.arrowPointAtCenter)!==null&&We!==void 0?We:C),m||w1({arrowPointAtCenter:ct,autoAdjustOverflow:w,arrowWidth:B?O.sizePopupArrow:0,borderRadius:O.borderRadius,offset:O.marginXXS,visibleFirst:!0})},[C,p,m,O]),ue=c.useMemo(()=>V===0?V:v||V||"",[v,V]),ne=c.createElement(NA,{space:!0},typeof ue=="function"?ue():ue),me=F("tooltip",i),Z=F(),de=t["data-popover-inject"];let ce=z;!("open"in t)&&!("visible"in t)&&X&&(ce=!1);const ye=c.isValidElement(l)&&!xv(l)?l:c.createElement("span",null,l),Ie=ye.props,Ve=!Ie.className||typeof Ie.className=="string"?se(Ie.className,o||`${me}-open`):Ie.className,[Be,Qe,ke]=Iv(me,!de),Se=K1(me,a),pe=Se.arrowStyle,Me=se(h,{[`${me}-rtl`]:j==="rtl"},Se.className,E,Qe,ke,Y,L.root,x==null?void 0:x.root),Le=se(L.body,x==null?void 0:x.body),[et,nt]=WA("Tooltip",b.zIndex),je=c.createElement(qT,Object.assign({},b,{zIndex:et,showArrow:B,placement:I,mouseEnterDelay:f,mouseLeaveDelay:R,prefixCls:me,classNames:{root:Me,body:Le},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pe),G.root),H),q),y==null?void 0:y.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},G.body),s),y==null?void 0:y.body),Se.overlayStyle)},getTooltipContainer:M||A||N,ref:K,builtinPlacements:le,overlay:ne,visible:ce,onVisibleChange:Ae,afterVisibleChange:u??d,arrowContent:c.createElement("span",{className:`${me}-arrow-content`}),motion:{motionName:rl(Z,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!g}),ce?Dr(ye,{className:Ve}):ye);return Be(c.createElement(JA.Provider,{value:nt},je))}),Aa=bT;process.env.NODE_ENV!=="production"&&(Aa.displayName="Tooltip");Aa._InternalPanelDoNotUseOrYouWillBeFired=ST;const Z1=t=>{var e;const{className:n,children:r,icon:i,title:o,danger:A,extra:a}=t,{prefixCls:s,firstLevel:l,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:g}=c.useContext(Is),p=S=>{const M=r==null?void 0:r[0],I=c.createElement("span",{className:se(`${s}-title-content`,{[`${s}-title-content-with-extra`]:!!a||a===0})},r);return(!i||c.isValidElement(r)&&r.type==="span")&&r&&S&&l&&typeof M=="string"?c.createElement("div",{className:`${s}-inline-collapsed-noicon`},M.charAt(0)):I},{siderCollapsed:V}=c.useContext(Vg);let v=o;typeof o>"u"?v=l?r:"":o===!1&&(v="");const m={title:v};!V&&!g&&(m.title=null,m.open=!1);const C=Nr(r).length;let w=c.createElement(gl,Object.assign({},$n(t,["title","icon","danger"]),{className:se({[`${s}-item-danger`]:A,[`${s}-item-only-child`]:(i?C+1:C)===1},n),title:typeof o=="string"?o:void 0}),Dr(i,{className:se(c.isValidElement(i)?(e=i.props)===null||e===void 0?void 0:e.className:"",`${s}-item-icon`)}),p(g));return d||(w=c.createElement(Aa,Object.assign({},m,{placement:u==="rtl"?"left":"right",classNames:{root:`${s}-inline-collapsed-tooltip`}}),w)),w};var MT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const bs=c.createContext(null),RT=c.forwardRef((t,e)=>{const{children:n}=t,r=MT(t,["children"]),i=c.useContext(bs),o=c.useMemo(()=>Object.assign(Object.assign({},i),r),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),A=iE(n),a=Fi(e,A?io(n):null);return c.createElement(bs.Provider,{value:o},c.createElement(NA,{space:!0},A?c.cloneElement(n,{ref:a}):n))}),xT=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:o,lineType:A,itemPaddingInline:a}=t;return{[`${e}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${ve(o)} ${A} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:a},[`> ${e}-item:hover,
|
|
612
|
+
}`),i)}else EA(i);return function(){EA(i)}},[e,i])}var jR=!1;function PR(t){return jR}var $p=function(e){return e===!1?!1:!Qn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},cl=c.forwardRef(function(t,e){var n=t.open,r=t.autoLock,i=t.getContainer,o=t.debug,A=t.autoDestroy,a=A===void 0?!0:A,s=t.children,l=c.useState(n),u=$(l,2),d=u[0],g=u[1],p=d||n;process.env.NODE_ENV!=="production"&&Ct(Qn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),c.useEffect(function(){(a||n)&&g(n)},[n,a]);var V=c.useState(function(){return $p(i)}),v=$(V,2),m=v[0],C=v[1];c.useEffect(function(){var x=$p(i);C(x??null)});var w=NR(p&&!m,o),S=$(w,2),M=S[0],I=S[1],f=m??M;GR(r&&n&&Qn()&&(f===M||f===document.body));var R=null;if(s&&Qi(s)&&e){var q=s;R=q.ref}var E=Fi(R,e);if(!p||!Qn()||m===void 0)return null;var h=f===!1||PR(),y=s;return e&&(y=c.cloneElement(s,{ref:E})),c.createElement(v1.Provider,{value:I},h?y:zr.createPortal(y,f))});process.env.NODE_ENV!=="production"&&(cl.displayName="Portal");const C1=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};function LR(t){var e=t.prefixCls,n=t.align,r=t.arrow,i=t.arrowPos,o=r||{},A=o.className,a=o.content,s=i.x,l=s===void 0?0:s,u=i.y,d=u===void 0?0:u,g=c.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(n.autoArrow!==!1){var V=n.points[0],v=n.points[1],m=V[0],C=V[1],w=v[0],S=v[1];m===w||!["t","b"].includes(m)?p.top=d:m==="t"?p.top=0:p.bottom=0,C===S||!["l","r"].includes(C)?p.left=l:C==="l"?p.left=0:p.right=0}return c.createElement("div",{ref:g,className:se("".concat(e,"-arrow"),A),style:p},a)}function YR(t){var e=t.prefixCls,n=t.open,r=t.zIndex,i=t.mask,o=t.motion;return i?c.createElement(oo,Fe({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(A){var a=A.className;return c.createElement("div",{style:{zIndex:r},className:se("".concat(e,"-mask"),a)})}):null}var q1=c.memo(function(t){var e=t.children;return e},function(t,e){return e.cache});process.env.NODE_ENV!=="production"&&(q1.displayName="PopupContent");var E1=c.forwardRef(function(t,e){var n=t.popup,r=t.className,i=t.prefixCls,o=t.style,A=t.target,a=t.onVisibleChanged,s=t.open,l=t.keepDom,u=t.fresh,d=t.onClick,g=t.mask,p=t.arrow,V=t.arrowPos,v=t.align,m=t.motion,C=t.maskMotion,w=t.forceRender,S=t.getPopupContainer,M=t.autoDestroy,I=t.portal,f=t.zIndex,R=t.onMouseEnter,q=t.onMouseLeave,E=t.onPointerEnter,h=t.onPointerDownCapture,y=t.ready,x=t.offsetX,b=t.offsetY,B=t.offsetR,O=t.offsetB,N=t.onAlign,F=t.onPrepare,j=t.stretch,Y=t.targetWidth,H=t.targetHeight,L=typeof n=="function"?n():n,G=s||l,_=(S==null?void 0:S.length)>0,K=c.useState(!S||!_),W=$(K,2),z=W[0],te=W[1];if($t(function(){!z&&_&&A&&te(!0)},[z,_,A]),!z)return null;var X="auto",Ae={left:"-1000vw",top:"-1000vh",right:X,bottom:X};if(y||!s){var le,ue=v.points,ne=v.dynamicInset||((le=v._experimental)===null||le===void 0?void 0:le.dynamicInset),me=ne&&ue[0][1]==="r",Z=ne&&ue[0][0]==="b";me?(Ae.right=B,Ae.left=X):(Ae.left=x,Ae.right=X),Z?(Ae.bottom=O,Ae.top=X):(Ae.top=b,Ae.bottom=X)}var de={};return j&&(j.includes("height")&&H?de.height=H:j.includes("minHeight")&&H&&(de.minHeight=H),j.includes("width")&&Y?de.width=Y:j.includes("minWidth")&&Y&&(de.minWidth=Y)),s||(de.pointerEvents="none"),c.createElement(I,{open:w||G,getContainer:S&&function(){return S(A)},autoDestroy:M},c.createElement(YR,{prefixCls:i,open:s,zIndex:f,mask:g,motion:C}),c.createElement(fi,{onResize:N,disabled:!s},function(ce){return c.createElement(oo,Fe({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:w,leavedClassName:"".concat(i,"-hidden")},m,{onAppearPrepare:F,onEnterPrepare:F,visible:s,onVisibleChanged:function(Ie){var Ve;m==null||(Ve=m.onVisibleChanged)===null||Ve===void 0||Ve.call(m,Ie),a(Ie)}}),function(ye,Ie){var Ve=ye.className,Be=ye.style,Qe=se(i,Ve,r);return c.createElement("div",{ref:kr(ce,e,Ie),className:Qe,style:U(U(U(U({"--arrow-x":"".concat(V.x||0,"px"),"--arrow-y":"".concat(V.y||0,"px")},Ae),de),Be),{},{boxSizing:"border-box",zIndex:f},o),onMouseEnter:R,onMouseLeave:q,onPointerEnter:E,onClick:d,onPointerDownCapture:h},p&&c.createElement(LR,{prefixCls:i,arrow:p,arrowPos:V,align:v}),c.createElement(q1,{cache:!s&&!u},L))})}))});process.env.NODE_ENV!=="production"&&(E1.displayName="Popup");var y1=c.forwardRef(function(t,e){var n=t.children,r=t.getTriggerDOMNode,i=Qi(n),o=c.useCallback(function(a){Od(e,r?r(a):a)},[r]),A=Fi(o,io(n));return i?c.cloneElement(n,{ref:A}):n});process.env.NODE_ENV!=="production"&&(y1.displayName="TriggerWrapper");var em=c.createContext(null);function tm(t){return t?Array.isArray(t)?t:[t]:[]}function HR(t,e,n,r){return c.useMemo(function(){var i=tm(n??e),o=tm(r??e),A=new Set(i),a=new Set(o);return t&&(A.has("hover")&&(A.delete("hover"),A.add("click")),a.has("hover")&&(a.delete("hover"),a.add("click"))),[A,a]},[t,e,n,r])}function KR(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function ZR(t,e,n,r){for(var i=n.points,o=Object.keys(t),A=0;A<o.length;A+=1){var a,s=o[A];if(KR((a=t[s])===null||a===void 0?void 0:a.points,i,r))return"".concat(e,"-placement-").concat(s)}return""}function nm(t,e,n,r){return e||(n?{motionName:"".concat(t,"-").concat(n)}:r?{motionName:r}:null)}function ra(t){return t.ownerDocument.defaultView}function gd(t){for(var e=[],n=t==null?void 0:t.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=ra(n).getComputedStyle(n),o=i.overflowX,A=i.overflowY,a=i.overflow;[o,A,a].some(function(s){return r.includes(s)})&&e.push(n),n=n.parentElement}return e}function FA(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function AA(t){return FA(parseFloat(t),0)}function rm(t,e){var n=U({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=ra(r).getComputedStyle(r),o=i.overflow,A=i.overflowClipMargin,a=i.borderTopWidth,s=i.borderBottomWidth,l=i.borderLeftWidth,u=i.borderRightWidth,d=r.getBoundingClientRect(),g=r.offsetHeight,p=r.clientHeight,V=r.offsetWidth,v=r.clientWidth,m=AA(a),C=AA(s),w=AA(l),S=AA(u),M=FA(Math.round(d.width/V*1e3)/1e3),I=FA(Math.round(d.height/g*1e3)/1e3),f=(V-v-w-S)*M,R=(g-p-m-C)*I,q=m*I,E=C*I,h=w*M,y=S*M,x=0,b=0;if(o==="clip"){var B=AA(A);x=B*M,b=B*I}var O=d.x+h-x,N=d.y+q-b,F=O+d.width+2*x-h-y-f,j=N+d.height+2*b-q-E-R;n.left=Math.max(n.left,O),n.top=Math.max(n.top,N),n.right=Math.min(n.right,F),n.bottom=Math.min(n.bottom,j)}}),n}function im(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function om(t,e){var n=e||[],r=$(n,2),i=r[0],o=r[1];return[im(t.width,i),im(t.height,o)]}function Am(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function ho(t,e){var n=e[0],r=e[1],i,o;return n==="t"?o=t.y:n==="b"?o=t.y+t.height:o=t.y+t.height/2,r==="l"?i=t.x:r==="r"?i=t.x+t.width:i=t.x+t.width/2,{x:i,y:o}}function vi(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,i){return i===e?n[r]||"c":r}).join("")}function zR(t,e,n,r,i,o,A){var a=c.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),s=$(a,2),l=s[0],u=s[1],d=c.useRef(0),g=c.useMemo(function(){return e?gd(e):[]},[e]),p=c.useRef({}),V=function(){p.current={}};t||V();var v=nn(function(){if(e&&n&&t){let gr=function(_o,ei){var hi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Me,$o=G.x+_o,sa=G.y+ei,ql=$o+Z,El=sa+me,yl=Math.max($o,hi.left),Je=Math.max(sa,hi.top),ht=Math.min(ql,hi.right),tn=Math.min(El,hi.bottom);return Math.max(0,(ht-yl)*(tn-Je))},lo=function(){ze=G.y+it,tt=ze+me,Dt=G.x+xe,gt=Dt+Z};var w,S,M,I,f=e,R=f.ownerDocument,q=ra(f),E=q.getComputedStyle(f),h=E.position,y=f.style.left,x=f.style.top,b=f.style.right,B=f.style.bottom,O=f.style.overflow,N=U(U({},i[r]),o),F=R.createElement("div");(w=f.parentElement)===null||w===void 0||w.appendChild(F),F.style.left="".concat(f.offsetLeft,"px"),F.style.top="".concat(f.offsetTop,"px"),F.style.position=h,F.style.height="".concat(f.offsetHeight,"px"),F.style.width="".concat(f.offsetWidth,"px"),f.style.left="0",f.style.top="0",f.style.right="auto",f.style.bottom="auto",f.style.overflow="hidden";var j;if(Array.isArray(n))j={x:n[0],y:n[1],width:0,height:0};else{var Y,H,L=n.getBoundingClientRect();L.x=(Y=L.x)!==null&&Y!==void 0?Y:L.left,L.y=(H=L.y)!==null&&H!==void 0?H:L.top,j={x:L.x,y:L.y,width:L.width,height:L.height}}var G=f.getBoundingClientRect(),_=q.getComputedStyle(f),K=_.height,W=_.width;G.x=(S=G.x)!==null&&S!==void 0?S:G.left,G.y=(M=G.y)!==null&&M!==void 0?M:G.top;var z=R.documentElement,te=z.clientWidth,X=z.clientHeight,Ae=z.scrollWidth,le=z.scrollHeight,ue=z.scrollTop,ne=z.scrollLeft,me=G.height,Z=G.width,de=j.height,ce=j.width,ye={left:0,top:0,right:te,bottom:X},Ie={left:-ne,top:-ue,right:Ae-ne,bottom:le-ue},Ve=N.htmlRegion,Be="visible",Qe="visibleFirst";Ve!=="scroll"&&Ve!==Qe&&(Ve=Be);var ke=Ve===Qe,Se=rm(Ie,g),pe=rm(ye,g),Me=Ve===Be?pe:Se,Le=ke?pe:Me;f.style.left="auto",f.style.top="auto",f.style.right="0",f.style.bottom="0";var et=f.getBoundingClientRect();f.style.left=y,f.style.top=x,f.style.right=b,f.style.bottom=B,f.style.overflow=O,(I=f.parentElement)===null||I===void 0||I.removeChild(F);var nt=FA(Math.round(Z/parseFloat(W)*1e3)/1e3),je=FA(Math.round(me/parseFloat(K)*1e3)/1e3);if(nt===0||je===0||xA(n)&&!rg(n))return;var Ee=N.offset,We=N.targetOffset,ct=om(G,Ee),_e=$(ct,2),Oe=_e[0],Re=_e[1],At=om(j,We),at=$(At,2),vt=at[0],Tt=at[1];j.x-=vt,j.y-=Tt;var Wt=N.points||[],Jt=$(Wt,2),en=Jt[0],Xt=Jt[1],Yt=Am(Xt),Mt=Am(en),pt=ho(j,Yt),He=ho(G,Mt),Xe=U({},N),xe=pt.x-He.x+Oe,it=pt.y-He.y+Re,mt=gr(xe,it),De=gr(xe,it,pe),we=ho(j,["t","l"]),Ye=ho(G,["t","l"]),Ke=ho(j,["b","r"]),Ue=ho(G,["b","r"]),D=N.overflow||{},fe=D.adjustX,k=D.adjustY,ae=D.shiftX,ee=D.shiftY,Ce=function(ei){return typeof ei=="boolean"?ei:ei>=0},ze,tt,Dt,gt;lo();var yt=Ce(k),qe=Mt[0]===Yt[0];if(yt&&Mt[0]==="t"&&(tt>Le.bottom||p.current.bt)){var Te=it;qe?Te-=me-de:Te=we.y-Ue.y-Re;var st=gr(xe,Te),ut=gr(xe,Te,pe);st>mt||st===mt&&(!ke||ut>=De)?(p.current.bt=!0,it=Te,Re=-Re,Xe.points=[vi(Mt,0),vi(Yt,0)]):p.current.bt=!1}if(yt&&Mt[0]==="b"&&(ze<Le.top||p.current.tb)){var Nt=it;qe?Nt+=me-de:Nt=Ke.y-Ye.y-Re;var On=gr(xe,Nt),sn=gr(xe,Nt,pe);On>mt||On===mt&&(!ke||sn>=De)?(p.current.tb=!0,it=Nt,Re=-Re,Xe.points=[vi(Mt,0),vi(Yt,0)]):p.current.tb=!1}var Kn=Ce(fe),Gr=Mt[1]===Yt[1];if(Kn&&Mt[1]==="l"&&(gt>Le.right||p.current.rl)){var Un=xe;Gr?Un-=Z-ce:Un=we.x-Ue.x-Oe;var Gn=gr(Un,it),Sr=gr(Un,it,pe);Gn>mt||Gn===mt&&(!ke||Sr>=De)?(p.current.rl=!0,xe=Un,Oe=-Oe,Xe.points=[vi(Mt,1),vi(Yt,1)]):p.current.rl=!1}if(Kn&&Mt[1]==="r"&&(Dt<Le.left||p.current.lr)){var jn=xe;Gr?jn+=Z-ce:jn=Ke.x-Ye.x-Oe;var _r=gr(jn,it),Ir=gr(jn,it,pe);_r>mt||_r===mt&&(!ke||Ir>=De)?(p.current.lr=!0,xe=jn,Oe=-Oe,Xe.points=[vi(Mt,1),vi(Yt,1)]):p.current.lr=!1}lo();var Pn=ae===!0?0:ae;typeof Pn=="number"&&(Dt<pe.left&&(xe-=Dt-pe.left-Oe,j.x+ce<pe.left+Pn&&(xe+=j.x-pe.left+ce-Pn)),gt>pe.right&&(xe-=gt-pe.right-Oe,j.x>pe.right-Pn&&(xe+=j.x-pe.right+Pn)));var er=ee===!0?0:ee;typeof er=="number"&&(ze<pe.top&&(it-=ze-pe.top-Re,j.y+de<pe.top+er&&(it+=j.y-pe.top+de-er)),tt>pe.bottom&&(it-=tt-pe.bottom-Re,j.y>pe.bottom-er&&(it+=j.y-pe.bottom+er)));var ur=G.x+xe,dr=ur+Z,jr=G.y+it,$r=jr+me,wt=j.x,Pe=wt+ce,ft=j.y,Et=ft+de,xt=Math.max(ur,wt),Ot=Math.min(dr,Pe),Cn=(xt+Ot)/2,qn=Cn-ur,Zn=Math.max(jr,ft),tr=Math.min($r,Et),zn=(Zn+tr)/2,Jn=zn-jr;A==null||A(e,Xe);var pn=et.right-G.x-(xe+G.width),Ui=et.bottom-G.y-(it+G.height);nt===1&&(xe=Math.round(xe),pn=Math.round(pn)),je===1&&(it=Math.round(it),Ui=Math.round(Ui));var Cl={ready:!0,offsetX:xe/nt,offsetY:it/je,offsetR:pn/nt,offsetB:Ui/je,arrowX:qn/nt,arrowY:Jn/je,scaleX:nt,scaleY:je,align:Xe};u(Cl)}}),m=function(){d.current+=1;var S=d.current;Promise.resolve().then(function(){d.current===S&&v()})},C=function(){u(function(S){return U(U({},S),{},{ready:!1})})};return $t(C,[r]),$t(function(){t||C()},[t]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,m]}function JR(t,e,n,r,i){$t(function(){if(t&&e&&n){let d=function(){r(),i()};var o=e,A=n,a=gd(o),s=gd(A),l=ra(A),u=new Set([l].concat(be(a),be(s)));return u.forEach(function(g){g.addEventListener("scroll",d,{passive:!0})}),l.addEventListener("resize",d,{passive:!0}),r(),function(){u.forEach(function(g){g.removeEventListener("scroll",d),l.removeEventListener("resize",d)})}}},[t,e,n])}function WR(t,e,n,r,i,o,A,a){var s=c.useRef(t);s.current=t;var l=c.useRef(!1);c.useEffect(function(){if(e&&r&&(!i||o)){var d=function(){l.current=!1},g=function(M){var I;s.current&&!A(((I=M.composedPath)===null||I===void 0||(I=I.call(M))===null||I===void 0?void 0:I[0])||M.target)&&!l.current&&a(!1)},p=ra(r);p.addEventListener("pointerdown",d,!0),p.addEventListener("mousedown",g,!0),p.addEventListener("contextmenu",g,!0);var V=vs(n);if(V&&(V.addEventListener("mousedown",g,!0),V.addEventListener("contextmenu",g,!0)),process.env.NODE_ENV!=="production"){var v,m,C=n==null||(v=n.getRootNode)===null||v===void 0?void 0:v.call(n),w=(m=r.getRootNode)===null||m===void 0?void 0:m.call(r);xi(C===w,"trigger element and popup element should in same shadow root.")}return function(){p.removeEventListener("pointerdown",d,!0),p.removeEventListener("mousedown",g,!0),p.removeEventListener("contextmenu",g,!0),V&&(V.removeEventListener("mousedown",g,!0),V.removeEventListener("contextmenu",g,!0))}}},[e,n,r,i,o]);function u(){l.current=!0}return u}var XR=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function _R(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cl,e=c.forwardRef(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,A=n.children,a=n.action,s=a===void 0?"hover":a,l=n.showAction,u=n.hideAction,d=n.popupVisible,g=n.defaultPopupVisible,p=n.onPopupVisibleChange,V=n.afterPopupVisibleChange,v=n.mouseEnterDelay,m=n.mouseLeaveDelay,C=m===void 0?.1:m,w=n.focusDelay,S=n.blurDelay,M=n.mask,I=n.maskClosable,f=I===void 0?!0:I,R=n.getPopupContainer,q=n.forceRender,E=n.autoDestroy,h=n.destroyPopupOnHide,y=n.popup,x=n.popupClassName,b=n.popupStyle,B=n.popupPlacement,O=n.builtinPlacements,N=O===void 0?{}:O,F=n.popupAlign,j=n.zIndex,Y=n.stretch,H=n.getPopupClassNameFromAlign,L=n.fresh,G=n.alignPoint,_=n.onPopupClick,K=n.onPopupAlign,W=n.arrow,z=n.popupMotion,te=n.maskMotion,X=n.popupTransitionName,Ae=n.popupAnimation,le=n.maskTransitionName,ue=n.maskAnimation,ne=n.className,me=n.getTriggerDOMNode,Z=qt(n,XR),de=E||h||!1,ce=c.useState(!1),ye=$(ce,2),Ie=ye[0],Ve=ye[1];$t(function(){Ve(C1())},[]);var Be=c.useRef({}),Qe=c.useContext(em),ke=c.useMemo(function(){return{registerSubPopup:function(ht,tn){Be.current[ht]=tn,Qe==null||Qe.registerSubPopup(ht,tn)}}},[Qe]),Se=$s(),pe=c.useState(null),Me=$(pe,2),Le=Me[0],et=Me[1],nt=c.useRef(null),je=nn(function(Je){nt.current=Je,xA(Je)&&Le!==Je&&et(Je),Qe==null||Qe.registerSubPopup(Se,Je)}),Ee=c.useState(null),We=$(Ee,2),ct=We[0],_e=We[1],Oe=c.useRef(null),Re=nn(function(Je){xA(Je)&&ct!==Je&&(_e(Je),Oe.current=Je)}),At=c.Children.only(A),at=(At==null?void 0:At.props)||{},vt={},Tt=nn(function(Je){var ht,tn,mn=ct;return(mn==null?void 0:mn.contains(Je))||((ht=vs(mn))===null||ht===void 0?void 0:ht.host)===Je||Je===mn||(Le==null?void 0:Le.contains(Je))||((tn=vs(Le))===null||tn===void 0?void 0:tn.host)===Je||Je===Le||Object.values(Be.current).some(function(on){return(on==null?void 0:on.contains(Je))||Je===on})}),Wt=nm(o,z,Ae,X),Jt=nm(o,te,ue,le),en=c.useState(g||!1),Xt=$(en,2),Yt=Xt[0],Mt=Xt[1],pt=d??Yt,He=nn(function(Je){d===void 0&&Mt(Je)});$t(function(){Mt(d||!1)},[d]);var Xe=c.useRef(pt);Xe.current=pt;var xe=c.useRef([]);xe.current=[];var it=nn(function(Je){var ht;He(Je),((ht=xe.current[xe.current.length-1])!==null&&ht!==void 0?ht:pt)!==Je&&(xe.current.push(Je),p==null||p(Je))}),mt=c.useRef(),De=function(){clearTimeout(mt.current)},we=function(ht){var tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;De(),tn===0?it(ht):mt.current=setTimeout(function(){it(ht)},tn*1e3)};c.useEffect(function(){return De},[]);var Ye=c.useState(!1),Ke=$(Ye,2),Ue=Ke[0],D=Ke[1];$t(function(Je){(!Je||pt)&&D(!0)},[pt]);var fe=c.useState(null),k=$(fe,2),ae=k[0],ee=k[1],Ce=c.useState(null),ze=$(Ce,2),tt=ze[0],Dt=ze[1],gt=function(ht){Dt([ht.clientX,ht.clientY])},yt=zR(pt,Le,G&&tt!==null?tt:ct,B,N,F,K),qe=$(yt,11),Te=qe[0],st=qe[1],ut=qe[2],Nt=qe[3],On=qe[4],sn=qe[5],Kn=qe[6],Gr=qe[7],Un=qe[8],Gn=qe[9],Sr=qe[10],jn=HR(Ie,s,l,u),_r=$(jn,2),Ir=_r[0],Pn=_r[1],er=Ir.has("click"),ur=Pn.has("click")||Pn.has("contextMenu"),dr=nn(function(){Ue||Sr()}),jr=function(){Xe.current&&G&&ur&&we(!1)};JR(pt,ct,Le,dr,jr),$t(function(){dr()},[tt,B]),$t(function(){pt&&!(N!=null&&N[B])&&dr()},[JSON.stringify(F)]);var $r=c.useMemo(function(){var Je=ZR(N,o,Gn,G);return se(Je,H==null?void 0:H(Gn))},[Gn,H,N,o,G]);c.useImperativeHandle(r,function(){return{nativeElement:Oe.current,popupElement:nt.current,forceAlign:dr}});var wt=c.useState(0),Pe=$(wt,2),ft=Pe[0],Et=Pe[1],xt=c.useState(0),Ot=$(xt,2),Cn=Ot[0],qn=Ot[1],Zn=function(){if(Y&&ct){var ht=ct.getBoundingClientRect();Et(ht.width),qn(ht.height)}},tr=function(){Zn(),dr()},zn=function(ht){D(!1),Sr(),V==null||V(ht)},Jn=function(){return new Promise(function(ht){Zn(),ee(function(){return ht})})};$t(function(){ae&&(Sr(),ae(),ee(null))},[ae]);function pn(Je,ht,tn,mn){vt[Je]=function(on){var la;mn==null||mn(on),we(ht,tn);for(var wl=arguments.length,Bg=new Array(wl>1?wl-1:0),ca=1;ca<wl;ca++)Bg[ca-1]=arguments[ca];(la=at[Je])===null||la===void 0||la.call.apply(la,[at,on].concat(Bg))}}(er||ur)&&(vt.onClick=function(Je){var ht;Xe.current&&ur?we(!1):!Xe.current&&er&&(gt(Je),we(!0));for(var tn=arguments.length,mn=new Array(tn>1?tn-1:0),on=1;on<tn;on++)mn[on-1]=arguments[on];(ht=at.onClick)===null||ht===void 0||ht.call.apply(ht,[at,Je].concat(mn))});var Ui=WR(pt,ur,ct,Le,M,f,Tt,we),Cl=Ir.has("hover"),gr=Pn.has("hover"),lo,_o;Cl&&(pn("onMouseEnter",!0,v,function(Je){gt(Je)}),pn("onPointerEnter",!0,v,function(Je){gt(Je)}),lo=function(ht){(pt||Ue)&&Le!==null&&Le!==void 0&&Le.contains(ht.target)&&we(!0,v)},G&&(vt.onMouseMove=function(Je){var ht;(ht=at.onMouseMove)===null||ht===void 0||ht.call(at,Je)})),gr&&(pn("onMouseLeave",!1,C),pn("onPointerLeave",!1,C),_o=function(){we(!1,C)}),Ir.has("focus")&&pn("onFocus",!0,w),Pn.has("focus")&&pn("onBlur",!1,S),Ir.has("contextMenu")&&(vt.onContextMenu=function(Je){var ht;Xe.current&&Pn.has("contextMenu")?we(!1):(gt(Je),we(!0)),Je.preventDefault();for(var tn=arguments.length,mn=new Array(tn>1?tn-1:0),on=1;on<tn;on++)mn[on-1]=arguments[on];(ht=at.onContextMenu)===null||ht===void 0||ht.call.apply(ht,[at,Je].concat(mn))}),ne&&(vt.className=se(at.className,ne));var ei=c.useRef(!1);ei.current||(ei.current=q||pt||Ue);var hi=U(U({},at),vt),$o={},sa=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];sa.forEach(function(Je){Z[Je]&&($o[Je]=function(){for(var ht,tn=arguments.length,mn=new Array(tn),on=0;on<tn;on++)mn[on]=arguments[on];(ht=hi[Je])===null||ht===void 0||ht.call.apply(ht,[hi].concat(mn)),Z[Je].apply(Z,mn)})});var ql=c.cloneElement(At,U(U({},hi),$o)),El={x:sn,y:Kn},yl=W?U({},W!==!0?W:{}):null;return c.createElement(c.Fragment,null,c.createElement(fi,{disabled:!pt,ref:Re,onResize:tr},c.createElement(y1,{getTriggerDOMNode:me},ql)),ei.current&&c.createElement(em.Provider,{value:ke},c.createElement(E1,{portal:t,ref:je,prefixCls:o,popup:y,className:se(x,$r),style:b,target:ct,onMouseEnter:lo,onMouseLeave:_o,onPointerEnter:lo,zIndex:j,open:pt,keepDom:Ue,fresh:L,onClick:_,onPointerDownCapture:Ui,mask:M,motion:Wt,maskMotion:Jt,onVisibleChanged:zn,onPrepare:Jn,forceRender:q,autoDestroy:de,getPopupContainer:R,align:Gn,arrow:yl,arrowPos:El,ready:Te,offsetX:st,offsetY:ut,offsetR:Nt,offsetB:On,onAlign:dr,stretch:Y,targetWidth:ft/Gr,targetHeight:Cn/Un})))});return process.env.NODE_ENV!=="production"&&(e.displayName="Trigger"),e}const ul=_R(cl);var $R=ot.ESC,ex=ot.TAB;function tx(t){var e=t.visible,n=t.triggerRef,r=t.onVisibleChange,i=t.autoFocus,o=t.overlayRef,A=c.useRef(!1),a=function(){if(e){var d,g;(d=n.current)===null||d===void 0||(g=d.focus)===null||g===void 0||g.call(d),r==null||r(!1)}},s=function(){var d;return(d=o.current)!==null&&d!==void 0&&d.focus?(o.current.focus(),A.current=!0,!0):!1},l=function(d){switch(d.keyCode){case $R:a();break;case ex:{var g=!1;A.current||(g=s()),g?d.preventDefault():a();break}}};c.useEffect(function(){return e?(window.addEventListener("keydown",l),i&&Lt(s,3),function(){window.removeEventListener("keydown",l),A.current=!1}):function(){A.current=!1}},[e])}var nx=T.forwardRef(function(t,e){var n=t.overlay,r=t.arrow,i=t.prefixCls,o=T.useMemo(function(){var a;return typeof n=="function"?a=n():a=n,a},[n]),A=kr(e,io(o));return T.createElement(T.Fragment,null,r&&T.createElement("div",{className:"".concat(i,"-arrow")}),T.cloneElement(o,{ref:Qi(o)?A:void 0}))}),po={adjustX:1,adjustY:1},mo=[0,0],rx={topLeft:{points:["bl","tl"],overflow:po,offset:[0,-4],targetOffset:mo},top:{points:["bc","tc"],overflow:po,offset:[0,-4],targetOffset:mo},topRight:{points:["br","tr"],overflow:po,offset:[0,-4],targetOffset:mo},bottomLeft:{points:["tl","bl"],overflow:po,offset:[0,4],targetOffset:mo},bottom:{points:["tc","bc"],overflow:po,offset:[0,4],targetOffset:mo},bottomRight:{points:["tr","br"],overflow:po,offset:[0,4],targetOffset:mo}},ix=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function ox(t,e){var n,r=t.arrow,i=r===void 0?!1:r,o=t.prefixCls,A=o===void 0?"rc-dropdown":o,a=t.transitionName,s=t.animation,l=t.align,u=t.placement,d=u===void 0?"bottomLeft":u,g=t.placements,p=g===void 0?rx:g,V=t.getPopupContainer,v=t.showAction,m=t.hideAction,C=t.overlayClassName,w=t.overlayStyle,S=t.visible,M=t.trigger,I=M===void 0?["hover"]:M,f=t.autoFocus,R=t.overlay,q=t.children,E=t.onVisibleChange,h=qt(t,ix),y=T.useState(),x=$(y,2),b=x[0],B=x[1],O="visible"in t?S:b,N=T.useRef(null),F=T.useRef(null),j=T.useRef(null);T.useImperativeHandle(e,function(){return N.current});var Y=function(X){B(X),E==null||E(X)};tx({visible:O,triggerRef:j,onVisibleChange:Y,autoFocus:f,overlayRef:F});var H=function(X){var Ae=t.onOverlayClick;B(!1),Ae&&Ae(X)},L=function(){return T.createElement(nx,{ref:F,overlay:R,prefixCls:A,arrow:i})},G=function(){return typeof R=="function"?L:L()},_=function(){var X=t.minOverlayWidthMatchTrigger,Ae=t.alignPoint;return"minOverlayWidthMatchTrigger"in t?X:!Ae},K=function(){var X=t.openClassName;return X!==void 0?X:"".concat(A,"-open")},W=T.cloneElement(q,{className:se((n=q.props)===null||n===void 0?void 0:n.className,O&&K()),ref:Qi(q)?kr(j,io(q)):void 0}),z=m;return!z&&I.indexOf("contextMenu")!==-1&&(z=["click"]),T.createElement(ul,Fe({builtinPlacements:p},h,{prefixCls:A,ref:N,popupClassName:se(C,Q({},"".concat(A,"-show-arrow"),i)),popupStyle:w,action:I,showAction:v,hideAction:z,popupPlacement:d,popupAlign:l,popupTransitionName:a,popupAnimation:s,popupVisible:O,stretch:_()?"minWidth":"",popup:G(),onPopupVisibleChange:Y,onPopupClick:H,getPopupContainer:V}),W)}const Ax=T.forwardRef(ox),ax=t=>typeof t!="object"&&typeof t!="function"||t===null;function sx(t,e,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(t){case"top":case"bottom":o.shiftX=e.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=e.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const A=Object.assign(Object.assign({},o),i);return A.shiftX||(A.adjustX=!0),A.shiftY||(A.adjustY=!0),A}const am={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},lx={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},cx=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function w1(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:A}=t,a=e/2,s={};return Object.keys(am).forEach(l=>{const u=r&&lx[l]||am[l],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(s[l]=d,cx.has(l)&&(d.autoArrow=!1),l){case"top":case"topLeft":case"topRight":d.offset[1]=-a-i;break;case"bottom":case"bottomLeft":case"bottomRight":d.offset[1]=a+i;break;case"left":case"leftTop":case"leftBottom":d.offset[0]=-a-i;break;case"right":case"rightTop":case"rightBottom":d.offset[0]=a+i;break}const g=Ws({contentRadius:o,limitVerticalRadius:!0});if(r)switch(l){case"topLeft":case"bottomLeft":d.offset[0]=-g.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":d.offset[0]=g.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":d.offset[1]=-g.arrowOffsetHorizontal*2+a;break;case"leftBottom":case"rightBottom":d.offset[1]=g.arrowOffsetHorizontal*2-a;break}d.overflow=sx(l,g,e,n),A&&(d.htmlRegion="visibleFirst")}),s}function S1(t){return e=>c.createElement(Wr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},c.createElement(t,Object.assign({},e)))}const I1=(t,e,n,r,i)=>S1(A=>{const{prefixCls:a,style:s}=A,l=c.useRef(null),[u,d]=c.useState(0),[g,p]=c.useState(0),[V,v]=Tn(!1,{value:A.open}),{getPrefixCls:m}=c.useContext(Qt),C=m(r||"select",a);c.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const M=new ResizeObserver(f=>{const R=f[0].target;d(R.offsetHeight+8),p(R.offsetWidth)}),I=setInterval(()=>{var f;const R=i?`.${i(C)}`:`.${C}-dropdown`,q=(f=l.current)===null||f===void 0?void 0:f.querySelector(R);q&&(clearInterval(I),M.observe(q))},10);return()=>{clearInterval(I),M.disconnect()}}},[]);let w=Object.assign(Object.assign({},A),{style:Object.assign(Object.assign({},s),{margin:0}),open:V,visible:V,getPopupContainer:()=>l.current});e&&Object.assign(w,{[e]:{overflow:{adjustX:!1,adjustY:!1}}});const S={paddingBottom:u,position:"relative",minWidth:g};return c.createElement("div",{ref:l,style:S},c.createElement(t,Object.assign({},w)))});var ux=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Vo=void 0;function dx(t,e){var n=t.prefixCls,r=t.invalidate,i=t.item,o=t.renderItem,A=t.responsive,a=t.responsiveDisabled,s=t.registerSize,l=t.itemKey,u=t.className,d=t.style,g=t.children,p=t.display,V=t.order,v=t.component,m=v===void 0?"div":v,C=qt(t,ux),w=A&&!p;function S(q){s(l,q)}c.useEffect(function(){return function(){S(null)}},[]);var M=o&&i!==Vo?o(i,{index:V}):g,I;r||(I={opacity:w?0:1,height:w?0:Vo,overflowY:w?"hidden":Vo,order:A?V:Vo,pointerEvents:w?"none":Vo,position:w?"absolute":Vo});var f={};w&&(f["aria-hidden"]=!0);var R=c.createElement(m,Fe({className:se(!r&&n,u),style:U(U({},I),d)},f,C,{ref:e}),M);return A&&(R=c.createElement(fi,{onResize:function(E){var h=E.offsetWidth;S(h)},disabled:a},R)),R}var CA=c.forwardRef(dx);CA.displayName="Item";function gx(t){if(typeof MessageChannel>"u")Lt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function fx(){var t=c.useRef(null),e=function(r){t.current||(t.current=[],gx(function(){zr.unstable_batchedUpdates(function(){t.current.forEach(function(i){i()}),t.current=null})})),t.current.push(r)};return e}function aA(t,e){var n=c.useState(e),r=$(n,2),i=r[0],o=r[1],A=nn(function(a){t(function(){o(a)})});return[i,A]}var ws=T.createContext(null),hx=["component"],px=["className"],mx=["className"],Vx=function(e,n){var r=c.useContext(ws);if(!r){var i=e.component,o=i===void 0?"div":i,A=qt(e,hx);return c.createElement(o,Fe({},A,{ref:n}))}var a=r.className,s=qt(r,px),l=e.className,u=qt(e,mx);return c.createElement(ws.Provider,{value:null},c.createElement(CA,Fe({ref:n,className:se(a,l)},s,u)))},b1=c.forwardRef(Vx);b1.displayName="RawItem";var vx=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],M1="responsive",R1="invalidate";function Cx(t){return"+ ".concat(t.length," ...")}function qx(t,e){var n=t.prefixCls,r=n===void 0?"rc-overflow":n,i=t.data,o=i===void 0?[]:i,A=t.renderItem,a=t.renderRawItem,s=t.itemKey,l=t.itemWidth,u=l===void 0?10:l,d=t.ssr,g=t.style,p=t.className,V=t.maxCount,v=t.renderRest,m=t.renderRawRest,C=t.suffix,w=t.component,S=w===void 0?"div":w,M=t.itemComponent,I=t.onVisibleChange,f=qt(t,vx),R=d==="full",q=fx(),E=aA(q,null),h=$(E,2),y=h[0],x=h[1],b=y||0,B=aA(q,new Map),O=$(B,2),N=O[0],F=O[1],j=aA(q,0),Y=$(j,2),H=Y[0],L=Y[1],G=aA(q,0),_=$(G,2),K=_[0],W=_[1],z=aA(q,0),te=$(z,2),X=te[0],Ae=te[1],le=T.useState(null),ue=$(le,2),ne=ue[0],me=ue[1],Z=T.useState(null),de=$(Z,2),ce=de[0],ye=de[1],Ie=c.useMemo(function(){return ce===null&&R?Number.MAX_SAFE_INTEGER:ce||0},[ce,y]),Ve=T.useState(!1),Be=$(Ve,2),Qe=Be[0],ke=Be[1],Se="".concat(r,"-item"),pe=Math.max(H,K),Me=V===M1,Le=o.length&&Me,et=V===R1,nt=Le||typeof V=="number"&&o.length>V,je=T.useMemo(function(){var He=o;return Le?y===null&&R?He=o:He=o.slice(0,Math.min(o.length,b/u)):typeof V=="number"&&(He=o.slice(0,V)),He},[o,u,y,V,Le]),Ee=T.useMemo(function(){return Le?o.slice(Ie+1):o.slice(je.length)},[o,je,Le,Ie]),We=T.useCallback(function(He,Xe){var xe;return typeof s=="function"?s(He):(xe=s&&(He==null?void 0:He[s]))!==null&&xe!==void 0?xe:Xe},[s]),ct=T.useCallback(A||function(He){return He},[A]);function _e(He,Xe,xe){ce===He&&(Xe===void 0||Xe===ne)||(ye(He),xe||(ke(He<o.length-1),I==null||I(He)),Xe!==void 0&&me(Xe))}function Oe(He,Xe){x(Xe.clientWidth)}function Re(He,Xe){F(function(xe){var it=new Map(xe);return Xe===null?it.delete(He):it.set(He,Xe),it})}function At(He,Xe){W(Xe),L(K)}function at(He,Xe){Ae(Xe)}function vt(He){return N.get(We(je[He],He))}$t(function(){if(b&&typeof pe=="number"&&je){var He=X,Xe=je.length,xe=Xe-1;if(!Xe){_e(0,null);return}for(var it=0;it<Xe;it+=1){var mt=vt(it);if(R&&(mt=mt||0),mt===void 0){_e(it-1,void 0,!0);break}if(He+=mt,xe===0&&He<=b||it===xe-1&&He+vt(xe)<=b){_e(xe,null);break}else if(He+pe>b){_e(it-1,He-mt-X+K);break}}C&&vt(0)+X>b&&me(null)}},[b,N,K,X,We,je]);var Tt=Qe&&!!Ee.length,Wt={};ne!==null&&Le&&(Wt={position:"absolute",left:ne,top:0});var Jt={prefixCls:Se,responsive:Le,component:M,invalidate:et},en=a?function(He,Xe){var xe=We(He,Xe);return c.createElement(ws.Provider,{key:xe,value:U(U({},Jt),{},{order:Xe,item:He,itemKey:xe,registerSize:Re,display:Xe<=Ie})},a(He,Xe))}:function(He,Xe){var xe=We(He,Xe);return c.createElement(CA,Fe({},Jt,{order:Xe,key:xe,item:He,renderItem:ct,itemKey:xe,registerSize:Re,display:Xe<=Ie}))},Xt={order:Tt?Ie:Number.MAX_SAFE_INTEGER,className:"".concat(Se,"-rest"),registerSize:At,display:Tt},Yt=v||Cx,Mt=m?c.createElement(ws.Provider,{value:U(U({},Jt),Xt)},m(Ee)):c.createElement(CA,Fe({},Jt,Xt),typeof Yt=="function"?Yt(Ee):Yt),pt=c.createElement(S,Fe({className:se(!et&&r,p),style:g,ref:e},f),je.map(en),nt?Mt:null,C&&c.createElement(CA,Fe({},Jt,{responsive:Me,responsiveDisabled:!Le,order:Ie,className:"".concat(Se,"-suffix"),registerSize:at,display:!0,style:Wt}),C));return Me?c.createElement(fi,{onResize:Oe,disabled:!Le},pt):pt}var Zr=c.forwardRef(qx);Zr.displayName="Overflow";Zr.Item=b1;Zr.RESPONSIVE=M1;Zr.INVALIDATE=R1;var x1=c.createContext(null);function T1(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function B1(t){var e=c.useContext(x1);return T1(e,t)}var Ex=["children","locked"],Qr=c.createContext(null);function yx(t,e){var n=U({},t);return Object.keys(e).forEach(function(r){var i=e[r];i!==void 0&&(n[r]=i)}),n}function QA(t){var e=t.children,n=t.locked,r=qt(t,Ex),i=c.useContext(Qr),o=HA(function(){return yx(i,r)},[i,r],function(A,a){return!n&&(A[0]!==a[0]||!yA(A[1],a[1],!0))});return c.createElement(Qr.Provider,{value:o},e)}var wx=[],O1=c.createContext(null);function dl(){return c.useContext(O1)}var D1=c.createContext(wx);function Wo(t){var e=c.useContext(D1);return c.useMemo(function(){return t!==void 0?[].concat(be(e),[t]):e},[e,t])}var N1=c.createContext(null),dg=c.createContext({});function sm(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(rg(t)){var n=t.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),i=t.getAttribute("tabindex"),o=Number(i),A=null;return i&&!Number.isNaN(o)?A=o:r&&A===null&&(A=0),r&&t.disabled&&(A=null),A!==null&&(A>=0||e&&A<0)}return!1}function Sx(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=be(t.querySelectorAll("*")).filter(function(r){return sm(r,e)});return sm(t,e)&&n.unshift(t),n}var fd=ot.LEFT,hd=ot.RIGHT,pd=ot.UP,_a=ot.DOWN,$a=ot.ENTER,F1=ot.ESC,sA=ot.HOME,lA=ot.END,lm=[pd,_a,fd,hd];function Ix(t,e,n,r){var i,o="prev",A="next",a="children",s="parent";if(t==="inline"&&r===$a)return{inlineTrigger:!0};var l=Q(Q({},pd,o),_a,A),u=Q(Q(Q(Q({},fd,n?A:o),hd,n?o:A),_a,a),$a,a),d=Q(Q(Q(Q(Q(Q({},pd,o),_a,A),$a,a),F1,s),fd,n?a:s),hd,n?s:a),g={inline:l,horizontal:u,vertical:d,inlineSub:l,horizontalSub:d,verticalSub:d},p=(i=g["".concat(t).concat(e?"":"Sub")])===null||i===void 0?void 0:i[r];switch(p){case o:return{offset:-1,sibling:!0};case A:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case a:return{offset:1,sibling:!1};default:return null}}function bx(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function Mx(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function gg(t,e){var n=Sx(t,!0);return n.filter(function(r){return e.has(r)})}function cm(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var i=gg(t,e),o=i.length,A=i.findIndex(function(a){return n===a});return r<0?A===-1?A=o-1:A-=1:r>0&&(A+=1),A=(A+o)%o,i[A]}var md=function(e,n){var r=new Set,i=new Map,o=new Map;return e.forEach(function(A){var a=document.querySelector("[data-menu-id='".concat(T1(n,A),"']"));a&&(r.add(a),o.set(a,A),i.set(A,a))}),{elements:r,key2element:i,element2key:o}};function Rx(t,e,n,r,i,o,A,a,s,l){var u=c.useRef(),d=c.useRef();d.current=e;var g=function(){Lt.cancel(u.current)};return c.useEffect(function(){return function(){g()}},[]),function(p){var V=p.which;if([].concat(lm,[$a,F1,sA,lA]).includes(V)){var v=o(),m=md(v,r),C=m,w=C.elements,S=C.key2element,M=C.element2key,I=S.get(e),f=Mx(I,w),R=M.get(f),q=Ix(t,A(R,!0).length===1,n,V);if(!q&&V!==sA&&V!==lA)return;(lm.includes(V)||[sA,lA].includes(V))&&p.preventDefault();var E=function(F){if(F){var j=F,Y=F.querySelector("a");Y!=null&&Y.getAttribute("href")&&(j=Y);var H=M.get(F);a(H),g(),u.current=Lt(function(){d.current===H&&j.focus()})}};if([sA,lA].includes(V)||q.sibling||!f){var h;!f||t==="inline"?h=i.current:h=bx(f);var y,x=gg(h,w);V===sA?y=x[0]:V===lA?y=x[x.length-1]:y=cm(h,w,f,q.offset),E(y)}else if(q.inlineTrigger)s(R);else if(q.offset>0)s(R,!0),g(),u.current=Lt(function(){m=md(v,r);var N=f.getAttribute("aria-controls"),F=document.getElementById(N),j=cm(F,m.elements);E(j)},5);else if(q.offset<0){var b=A(R,!0),B=b[b.length-2],O=S.get(B);s(B,!1),E(O)}}l==null||l(p)}}function xx(t){Promise.resolve().then(t)}var fg="__RC_UTIL_PATH_SPLIT__",um=function(e){return e.join(fg)},Tx=function(e){return e.split(fg)},Vd="rc-menu-more";function Bx(){var t=c.useState({}),e=$(t,2),n=e[1],r=T.useRef(new Map),i=T.useRef(new Map),o=c.useState([]),A=$(o,2),a=A[0],s=A[1],l=T.useRef(0),u=T.useRef(!1),d=function(){u.current||n({})},g=T.useCallback(function(S,M){process.env.NODE_ENV!=="production"&&Ct(!r.current.has(S),"Duplicated key '".concat(S,"' used in Menu by path [").concat(M.join(" > "),"]"));var I=um(M);i.current.set(I,S),r.current.set(S,I),l.current+=1;var f=l.current;xx(function(){f===l.current&&d()})},[]),p=T.useCallback(function(S,M){var I=um(M);i.current.delete(I),r.current.delete(S)},[]),V=T.useCallback(function(S){s(S)},[]),v=T.useCallback(function(S,M){var I=r.current.get(S)||"",f=Tx(I);return M&&a.includes(f[0])&&f.unshift(Vd),f},[a]),m=T.useCallback(function(S,M){return S.filter(function(I){return I!==void 0}).some(function(I){var f=v(I,!0);return f.includes(M)})},[v]),C=function(){var M=be(r.current.keys());return a.length&&M.push(Vd),M},w=T.useCallback(function(S){var M="".concat(r.current.get(S)).concat(fg),I=new Set;return be(i.current.keys()).forEach(function(f){f.startsWith(M)&&I.add(i.current.get(f))}),I},[]);return c.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:g,unregisterPath:p,refreshOverflowKeys:V,isSubPathKey:m,getKeyPath:v,getKeys:C,getSubPathKeys:w}}function fA(t){var e=c.useRef(t);e.current=t;var n=c.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),A=0;A<i;A++)o[A]=arguments[A];return(r=e.current)===null||r===void 0?void 0:r.call.apply(r,[e].concat(o))},[]);return t?n:void 0}var Ox=Math.random().toFixed(5).toString().slice(2),dm=0;function Dx(t){var e=Tn(t,{value:t}),n=$(e,2),r=n[0],i=n[1];return c.useEffect(function(){dm+=1;var o=process.env.NODE_ENV==="test"?"test":"".concat(Ox,"-").concat(dm);i("rc-menu-uuid-".concat(o))},[]),r}function Q1(t,e,n,r){var i=c.useContext(Qr),o=i.activeKey,A=i.onActive,a=i.onInactive,s={active:o===t};return e||(s.onMouseEnter=function(l){n==null||n({key:t,domEvent:l}),A(t)},s.onMouseLeave=function(l){r==null||r({key:t,domEvent:l}),a(t)}),s}function k1(t){var e=c.useContext(Qr),n=e.mode,r=e.rtl,i=e.inlineIndent;if(n!=="inline")return null;var o=t;return r?{paddingRight:o*i}:{paddingLeft:o*i}}function U1(t){var e=t.icon,n=t.props,r=t.children,i;return e===null||e===!1?null:(typeof e=="function"?i=c.createElement(e,U({},n)):typeof e!="boolean"&&(i=e),i||r||null)}var Nx=["item"];function Ss(t){var e=t.item,n=qt(t,Nx);return Object.defineProperty(n,"item",{get:function(){return Ct(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e}}),n}var Fx=["title","attribute","elementRef"],Qx=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],kx=["active"],Ux=function(t){di(n,t);var e=gi(n);function n(){return fn(this,n),e.apply(this,arguments)}return hn(n,[{key:"render",value:function(){var i=this.props,o=i.title,A=i.attribute,a=i.elementRef,s=qt(i,Fx),l=$n(s,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Ct(!A,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),c.createElement(Zr.Item,Fe({},A,{title:typeof o=="string"?o:void 0},l,{ref:a}))}}]),n}(c.Component),Gx=c.forwardRef(function(t,e){var n=t.style,r=t.className,i=t.eventKey,o=t.warnKey,A=t.disabled,a=t.itemIcon,s=t.children,l=t.role,u=t.onMouseEnter,d=t.onMouseLeave,g=t.onClick,p=t.onKeyDown,V=t.onFocus,v=qt(t,Qx),m=B1(i),C=c.useContext(Qr),w=C.prefixCls,S=C.onItemClick,M=C.disabled,I=C.overflowDisabled,f=C.itemIcon,R=C.selectedKeys,q=C.onActive,E=c.useContext(dg),h=E._internalRenderMenuItem,y="".concat(w,"-item"),x=c.useRef(),b=c.useRef(),B=M||A,O=Fi(e,b),N=Wo(i);process.env.NODE_ENV!=="production"&&o&&Ct(!1,"MenuItem should not leave undefined `key`.");var F=function(le){return{key:i,keyPath:be(N).reverse(),item:x.current,domEvent:le}},j=a||f,Y=Q1(i,B,u,d),H=Y.active,L=qt(Y,kx),G=R.includes(i),_=k1(N.length),K=function(le){if(!B){var ue=F(le);g==null||g(Ss(ue)),S(ue)}},W=function(le){if(p==null||p(le),le.which===ot.ENTER){var ue=F(le);g==null||g(Ss(ue)),S(ue)}},z=function(le){q(i),V==null||V(le)},te={};t.role==="option"&&(te["aria-selected"]=G);var X=c.createElement(Ux,Fe({ref:x,elementRef:O,role:l===null?"none":l||"menuitem",tabIndex:A?null:-1,"data-menu-id":I&&m?null:m},$n(v,["extra"]),L,te,{component:"li","aria-disabled":A,style:U(U({},_),n),className:se(y,Q(Q(Q({},"".concat(y,"-active"),H),"".concat(y,"-selected"),G),"".concat(y,"-disabled"),B),r),onClick:K,onKeyDown:W,onFocus:z}),s,c.createElement(U1,{props:U(U({},t),{},{isSelected:G}),icon:j}));return h&&(X=h(X,t,{selected:G})),X});function jx(t,e){var n=t.eventKey,r=dl(),i=Wo(n);return c.useEffect(function(){if(r)return r.registerPath(n,i),function(){r.unregisterPath(n,i)}},[i]),r?null:c.createElement(Gx,Fe({},t,{ref:e}))}const gl=c.forwardRef(jx);var Px=["className","children"],Lx=function(e,n){var r=e.className,i=e.children,o=qt(e,Px),A=c.useContext(Qr),a=A.prefixCls,s=A.mode,l=A.rtl;return c.createElement("ul",Fe({className:se(a,l&&"".concat(a,"-rtl"),"".concat(a,"-sub"),"".concat(a,"-").concat(s==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),i)},hg=c.forwardRef(Lx);hg.displayName="SubMenuList";function pg(t,e){return Nr(t).map(function(n,r){if(c.isValidElement(n)){var i,o,A=n.key,a=(i=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:A,s=a==null;s&&(a="tmp_key-".concat([].concat(be(e),[r]).join("-")));var l={key:a,eventKey:a};return process.env.NODE_ENV!=="production"&&s&&(l.warnKey=!0),c.cloneElement(n,l)}return n})}var Fn={adjustX:1,adjustY:1},Yx={topLeft:{points:["bl","tl"],overflow:Fn},topRight:{points:["br","tr"],overflow:Fn},bottomLeft:{points:["tl","bl"],overflow:Fn},bottomRight:{points:["tr","br"],overflow:Fn},leftTop:{points:["tr","tl"],overflow:Fn},leftBottom:{points:["br","bl"],overflow:Fn},rightTop:{points:["tl","tr"],overflow:Fn},rightBottom:{points:["bl","br"],overflow:Fn}},Hx={topLeft:{points:["bl","tl"],overflow:Fn},topRight:{points:["br","tr"],overflow:Fn},bottomLeft:{points:["tl","bl"],overflow:Fn},bottomRight:{points:["tr","br"],overflow:Fn},rightTop:{points:["tr","tl"],overflow:Fn},rightBottom:{points:["br","bl"],overflow:Fn},leftTop:{points:["tl","tr"],overflow:Fn},leftBottom:{points:["bl","br"],overflow:Fn}};function G1(t,e,n){if(e)return e;if(n)return n[t]||n.other}var Kx={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Zx(t){var e=t.prefixCls,n=t.visible,r=t.children,i=t.popup,o=t.popupStyle,A=t.popupClassName,a=t.popupOffset,s=t.disabled,l=t.mode,u=t.onVisibleChange,d=c.useContext(Qr),g=d.getPopupContainer,p=d.rtl,V=d.subMenuOpenDelay,v=d.subMenuCloseDelay,m=d.builtinPlacements,C=d.triggerSubMenuAction,w=d.forceSubMenuRender,S=d.rootClassName,M=d.motion,I=d.defaultMotions,f=c.useState(!1),R=$(f,2),q=R[0],E=R[1],h=U(p?U({},Hx):U({},Yx),m),y=Kx[l],x=G1(l,M,I),b=c.useRef(x);l!=="inline"&&(b.current=x);var B=U(U({},b.current),{},{leavedClassName:"".concat(e,"-hidden"),removeOnLeave:!1,motionAppear:!0}),O=c.useRef();return c.useEffect(function(){return O.current=Lt(function(){E(n)}),function(){Lt.cancel(O.current)}},[n]),c.createElement(ul,{prefixCls:e,popupClassName:se("".concat(e,"-popup"),Q({},"".concat(e,"-rtl"),p),A,S),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:h,popupPlacement:y,popupVisible:q,popup:i,popupStyle:o,popupAlign:a&&{offset:a},action:s?[]:[C],mouseEnterDelay:V,mouseLeaveDelay:v,onPopupVisibleChange:u,forceRender:w,popupMotion:B,fresh:!0},r)}function zx(t){var e=t.id,n=t.open,r=t.keyPath,i=t.children,o="inline",A=c.useContext(Qr),a=A.prefixCls,s=A.forceSubMenuRender,l=A.motion,u=A.defaultMotions,d=A.mode,g=c.useRef(!1);g.current=d===o;var p=c.useState(!g.current),V=$(p,2),v=V[0],m=V[1],C=g.current?n:!1;c.useEffect(function(){g.current&&m(!1)},[d]);var w=U({},G1(o,l,u));r.length>1&&(w.motionAppear=!1);var S=w.onVisibleChanged;return w.onVisibleChanged=function(M){return!g.current&&!M&&m(!0),S==null?void 0:S(M)},v?null:c.createElement(QA,{mode:o,locked:!g.current},c.createElement(oo,Fe({visible:C},w,{forceRender:s,removeOnLeave:!1,leavedClassName:"".concat(a,"-hidden")}),function(M){var I=M.className,f=M.style;return c.createElement(hg,{id:e,className:I,style:f},i)}))}var Jx=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Wx=["active"],Xx=c.forwardRef(function(t,e){var n=t.style,r=t.className,i=t.title,o=t.eventKey,A=t.warnKey,a=t.disabled,s=t.internalPopupClose,l=t.children,u=t.itemIcon,d=t.expandIcon,g=t.popupClassName,p=t.popupOffset,V=t.popupStyle,v=t.onClick,m=t.onMouseEnter,C=t.onMouseLeave,w=t.onTitleClick,S=t.onTitleMouseEnter,M=t.onTitleMouseLeave,I=qt(t,Jx),f=B1(o),R=c.useContext(Qr),q=R.prefixCls,E=R.mode,h=R.openKeys,y=R.disabled,x=R.overflowDisabled,b=R.activeKey,B=R.selectedKeys,O=R.itemIcon,N=R.expandIcon,F=R.onItemClick,j=R.onOpenChange,Y=R.onActive,H=c.useContext(dg),L=H._internalRenderSubMenuItem,G=c.useContext(N1),_=G.isSubPathKey,K=Wo(),W="".concat(q,"-submenu"),z=y||a,te=c.useRef(),X=c.useRef();process.env.NODE_ENV!=="production"&&A&&Ct(!1,"SubMenu should not leave undefined `key`.");var Ae=u??O,le=d??N,ue=h.includes(o),ne=!x&&ue,me=_(B,o),Z=Q1(o,z,S,M),de=Z.active,ce=qt(Z,Wx),ye=c.useState(!1),Ie=$(ye,2),Ve=Ie[0],Be=Ie[1],Qe=function(at){z||Be(at)},ke=function(at){Qe(!0),m==null||m({key:o,domEvent:at})},Se=function(at){Qe(!1),C==null||C({key:o,domEvent:at})},pe=c.useMemo(function(){return de||(E!=="inline"?Ve||_([b],o):!1)},[E,de,b,Ve,o,_]),Me=k1(K.length),Le=function(at){z||(w==null||w({key:o,domEvent:at}),E==="inline"&&j(o,!ue))},et=fA(function(At){v==null||v(Ss(At)),F(At)}),nt=function(at){E!=="inline"&&j(o,at)},je=function(){Y(o)},Ee=f&&"".concat(f,"-popup"),We=c.useMemo(function(){return c.createElement(U1,{icon:E!=="horizontal"?le:void 0,props:U(U({},t),{},{isOpen:ne,isSubMenu:!0})},c.createElement("i",{className:"".concat(W,"-arrow")}))},[E,le,t,ne,W]),ct=c.createElement("div",Fe({role:"menuitem",style:Me,className:"".concat(W,"-title"),tabIndex:z?null:-1,ref:te,title:typeof i=="string"?i:null,"data-menu-id":x&&f?null:f,"aria-expanded":ne,"aria-haspopup":!0,"aria-controls":Ee,"aria-disabled":z,onClick:Le,onFocus:je},ce),i,We),_e=c.useRef(E);if(E!=="inline"&&K.length>1?_e.current="vertical":_e.current=E,!x){var Oe=_e.current;ct=c.createElement(Zx,{mode:Oe,prefixCls:W,visible:!s&&ne&&E!=="inline",popupClassName:g,popupOffset:p,popupStyle:V,popup:c.createElement(QA,{mode:Oe==="horizontal"?"vertical":Oe},c.createElement(hg,{id:Ee,ref:X},l)),disabled:z,onVisibleChange:nt},ct)}var Re=c.createElement(Zr.Item,Fe({ref:e,role:"none"},I,{component:"li",style:n,className:se(W,"".concat(W,"-").concat(E),r,Q(Q(Q(Q({},"".concat(W,"-open"),ne),"".concat(W,"-active"),pe),"".concat(W,"-selected"),me),"".concat(W,"-disabled"),z)),onMouseEnter:ke,onMouseLeave:Se}),ct,!x&&c.createElement(zx,{id:Ee,open:ne,keyPath:K},l));return L&&(Re=L(Re,t,{selected:me,active:pe,open:ne,disabled:z})),c.createElement(QA,{onItemClick:et,mode:E==="horizontal"?"vertical":E,itemIcon:Ae,expandIcon:le},Re)}),ia=c.forwardRef(function(t,e){var n=t.eventKey,r=t.children,i=Wo(n),o=pg(r,i),A=dl();c.useEffect(function(){if(A)return A.registerPath(n,i),function(){A.unregisterPath(n,i)}},[i]);var a;return A?a=o:a=c.createElement(Xx,Fe({ref:e},t),o),c.createElement(D1.Provider,{value:i},a)});process.env.NODE_ENV!=="production"&&(ia.displayName="SubMenu");function mg(t){var e=t.className,n=t.style,r=c.useContext(Qr),i=r.prefixCls,o=dl();return o?null:c.createElement("li",{role:"separator",className:se("".concat(i,"-item-divider"),e),style:n})}var _x=["className","title","eventKey","children"],$x=c.forwardRef(function(t,e){var n=t.className,r=t.title;t.eventKey;var i=t.children,o=qt(t,_x),A=c.useContext(Qr),a=A.prefixCls,s="".concat(a,"-item-group");return c.createElement("li",Fe({ref:e,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:se(s,n)}),c.createElement("div",{role:"presentation",className:"".concat(s,"-title"),title:typeof r=="string"?r:void 0},r),c.createElement("ul",{role:"group",className:"".concat(s,"-list")},i))}),fl=c.forwardRef(function(t,e){var n=t.eventKey,r=t.children,i=Wo(n),o=pg(r,i),A=dl();return A?o:c.createElement($x,Fe({ref:e},$n(t,["warnKey"])),o)});process.env.NODE_ENV!=="production"&&(fl.displayName="MenuItemGroup");var eT=["label","children","key","type","extra"];function vd(t,e,n){var r=e.item,i=e.group,o=e.submenu,A=e.divider;return(t||[]).map(function(a,s){if(a&&$e(a)==="object"){var l=a,u=l.label,d=l.children,g=l.key,p=l.type,V=l.extra,v=qt(l,eT),m=g??"tmp-".concat(s);return d||p==="group"?p==="group"?c.createElement(i,Fe({key:m},v,{title:u}),vd(d,e,n)):c.createElement(o,Fe({key:m},v,{title:u}),vd(d,e,n)):p==="divider"?c.createElement(A,Fe({key:m},v)):c.createElement(r,Fe({key:m},v,{extra:V}),u,(!!V||V===0)&&c.createElement("span",{className:"".concat(n,"-item-extra")},V))}return null}).filter(function(a){return a})}function gm(t,e,n,r,i){var o=t,A=U({divider:mg,item:gl,group:fl,submenu:ia},r);return e&&(o=vd(e,A,i)),pg(o,n)}var tT=["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"],ji=[],nT=c.forwardRef(function(t,e){var n,r=t,i=r.prefixCls,o=i===void 0?"rc-menu":i,A=r.rootClassName,a=r.style,s=r.className,l=r.tabIndex,u=l===void 0?0:l,d=r.items,g=r.children,p=r.direction,V=r.id,v=r.mode,m=v===void 0?"vertical":v,C=r.inlineCollapsed,w=r.disabled,S=r.disabledOverflow,M=r.subMenuOpenDelay,I=M===void 0?.1:M,f=r.subMenuCloseDelay,R=f===void 0?.1:f,q=r.forceSubMenuRender,E=r.defaultOpenKeys,h=r.openKeys,y=r.activeKey,x=r.defaultActiveFirst,b=r.selectable,B=b===void 0?!0:b,O=r.multiple,N=O===void 0?!1:O,F=r.defaultSelectedKeys,j=r.selectedKeys,Y=r.onSelect,H=r.onDeselect,L=r.inlineIndent,G=L===void 0?24:L,_=r.motion,K=r.defaultMotions,W=r.triggerSubMenuAction,z=W===void 0?"hover":W,te=r.builtinPlacements,X=r.itemIcon,Ae=r.expandIcon,le=r.overflowedIndicator,ue=le===void 0?"...":le,ne=r.overflowedIndicatorPopupClassName,me=r.getPopupContainer,Z=r.onClick,de=r.onOpenChange,ce=r.onKeyDown,ye=r.openAnimation,Ie=r.openTransitionName,Ve=r._internalRenderMenuItem,Be=r._internalRenderSubMenuItem,Qe=r._internalComponents,ke=qt(r,tT),Se=c.useMemo(function(){return[gm(g,d,ji,Qe,o),gm(g,d,ji,{},o)]},[g,d,Qe]),pe=$(Se,2),Me=pe[0],Le=pe[1],et=c.useState(!1),nt=$(et,2),je=nt[0],Ee=nt[1],We=c.useRef(),ct=Dx(V),_e=p==="rtl";process.env.NODE_ENV!=="production"&&Ct(!ye&&!Ie,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var Oe=Tn(E,{value:h,postState:function(ft){return ft||ji}}),Re=$(Oe,2),At=Re[0],at=Re[1],vt=function(ft){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function xt(){at(ft),de==null||de(ft)}Et?zr.flushSync(xt):xt()},Tt=c.useState(At),Wt=$(Tt,2),Jt=Wt[0],en=Wt[1],Xt=c.useRef(!1),Yt=c.useMemo(function(){return(m==="inline"||m==="vertical")&&C?["vertical",C]:[m,!1]},[m,C]),Mt=$(Yt,2),pt=Mt[0],He=Mt[1],Xe=pt==="inline",xe=c.useState(pt),it=$(xe,2),mt=it[0],De=it[1],we=c.useState(He),Ye=$(we,2),Ke=Ye[0],Ue=Ye[1];c.useEffect(function(){De(pt),Ue(He),Xt.current&&(Xe?at(Jt):vt(ji))},[pt,He]);var D=c.useState(0),fe=$(D,2),k=fe[0],ae=fe[1],ee=k>=Me.length-1||mt!=="horizontal"||S;c.useEffect(function(){Xe&&en(At)},[At]),c.useEffect(function(){return Xt.current=!0,function(){Xt.current=!1}},[]);var Ce=Bx(),ze=Ce.registerPath,tt=Ce.unregisterPath,Dt=Ce.refreshOverflowKeys,gt=Ce.isSubPathKey,yt=Ce.getKeyPath,qe=Ce.getKeys,Te=Ce.getSubPathKeys,st=c.useMemo(function(){return{registerPath:ze,unregisterPath:tt}},[ze,tt]),ut=c.useMemo(function(){return{isSubPathKey:gt}},[gt]);c.useEffect(function(){Dt(ee?ji:Me.slice(k+1).map(function(Pe){return Pe.key}))},[k,ee]);var Nt=Tn(y||x&&((n=Me[0])===null||n===void 0?void 0:n.key),{value:y}),On=$(Nt,2),sn=On[0],Kn=On[1],Gr=fA(function(Pe){Kn(Pe)}),Un=fA(function(){Kn(void 0)});T.useImperativeHandle(e,function(){return{list:We.current,focus:function(ft){var Et,xt=qe(),Ot=md(xt,ct),Cn=Ot.elements,qn=Ot.key2element,Zn=Ot.element2key,tr=gg(We.current,Cn),zn=sn??(tr[0]?Zn.get(tr[0]):(Et=Me.find(function(Ui){return!Ui.props.disabled}))===null||Et===void 0?void 0:Et.key),Jn=qn.get(zn);if(zn&&Jn){var pn;Jn==null||(pn=Jn.focus)===null||pn===void 0||pn.call(Jn,ft)}}}});var Gn=Tn(F||[],{value:j,postState:function(ft){return Array.isArray(ft)?ft:ft==null?ji:[ft]}}),Sr=$(Gn,2),jn=Sr[0],_r=Sr[1],Ir=function(ft){if(B){var Et=ft.key,xt=jn.includes(Et),Ot;N?xt?Ot=jn.filter(function(qn){return qn!==Et}):Ot=[].concat(be(jn),[Et]):Ot=[Et],_r(Ot);var Cn=U(U({},ft),{},{selectedKeys:Ot});xt?H==null||H(Cn):Y==null||Y(Cn)}!N&&At.length&&mt!=="inline"&&vt(ji)},Pn=fA(function(Pe){Z==null||Z(Ss(Pe)),Ir(Pe)}),er=fA(function(Pe,ft){var Et=At.filter(function(Ot){return Ot!==Pe});if(ft)Et.push(Pe);else if(mt!=="inline"){var xt=Te(Pe);Et=Et.filter(function(Ot){return!xt.has(Ot)})}yA(At,Et,!0)||vt(Et,!0)}),ur=function(ft,Et){var xt=Et??!At.includes(ft);er(ft,xt)},dr=Rx(mt,sn,_e,ct,We,qe,yt,Kn,ur,ce);c.useEffect(function(){Ee(!0)},[]);var jr=c.useMemo(function(){return{_internalRenderMenuItem:Ve,_internalRenderSubMenuItem:Be}},[Ve,Be]),$r=mt!=="horizontal"||S?Me:Me.map(function(Pe,ft){return c.createElement(QA,{key:Pe.key,overflowDisabled:ft>k},Pe)}),wt=c.createElement(Zr,Fe({id:V,ref:We,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:gl,className:se(o,"".concat(o,"-root"),"".concat(o,"-").concat(mt),s,Q(Q({},"".concat(o,"-inline-collapsed"),Ke),"".concat(o,"-rtl"),_e),A),dir:p,style:a,role:"menu",tabIndex:u,data:$r,renderRawItem:function(ft){return ft},renderRawRest:function(ft){var Et=ft.length,xt=Et?Me.slice(-Et):null;return c.createElement(ia,{eventKey:Vd,title:ue,disabled:ee,internalPopupClose:Et===0,popupClassName:ne},xt)},maxCount:mt!=="horizontal"||S?Zr.INVALIDATE:Zr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ft){ae(ft)},onKeyDown:dr},ke));return c.createElement(dg.Provider,{value:jr},c.createElement(x1.Provider,{value:ct},c.createElement(QA,{prefixCls:o,rootClassName:A,mode:mt,openKeys:At,rtl:_e,disabled:w,motion:je?_:null,defaultMotions:je?K:null,activeKey:sn,onActive:Gr,onInactive:Un,selectedKeys:jn,inlineIndent:G,subMenuOpenDelay:I,subMenuCloseDelay:R,forceSubMenuRender:q,builtinPlacements:te,triggerSubMenuAction:z,getPopupContainer:me,itemIcon:X,expandIcon:Ae,onItemClick:Pn,onOpenChange:er},c.createElement(N1.Provider,{value:ut},wt),c.createElement("div",{style:{display:"none"},"aria-hidden":!0},c.createElement(O1.Provider,{value:st},Le)))))}),oa=nT;oa.Item=gl;oa.SubMenu=ia;oa.ItemGroup=fl;oa.Divider=mg;var rT={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},iT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:rT}))},j1=c.forwardRef(iT);process.env.NODE_ENV!=="production"&&(j1.displayName="BarsOutlined");var oT={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"},AT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:oT}))},Cd=c.forwardRef(AT);process.env.NODE_ENV!=="production"&&(Cd.displayName="LeftOutlined");const aT=c.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),sT=t=>{const{antCls:e,componentCls:n,colorText:r,footerBg:i,headerHeight:o,headerPadding:A,headerColor:a,footerPadding:s,fontSize:l,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:A,color:a,lineHeight:ve(o),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:s,color:r,fontSize:l,background:i},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},P1=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:o,marginXXS:A,colorTextLightSolid:a,colorBgContainer:s}=t,l=r*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${l}px`,headerColor:i,footerPadding:`${o}px ${l}px`,footerBg:e,siderBg:"#001529",triggerHeight:r+A*2,triggerBg:"#002140",triggerColor:a,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:s,lightTriggerBg:s,lightTriggerColor:i}},L1=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];bn("Layout",t=>[sT(t)],P1,{deprecatedTokens:L1});const lT=t=>{const{componentCls:e,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:o,triggerHeight:A,triggerColor:a,triggerBg:s,headerHeight:l,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:g,lightSiderBg:p,lightTriggerColor:V,lightTriggerBg:v,bodyBg:m}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:A},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:A,color:a,lineHeight:ve(A),textAlign:"center",background:s,cursor:"pointer",transition:`all ${r}`},[`${e}-zero-width`]:{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:l,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:a,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${ve(g)} ${ve(g)} 0`,cursor:"pointer",transition:`background ${i} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${i}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:t.calc(u).mul(-1).equal(),borderRadius:`${ve(g)} 0 0 ${ve(g)}`}}},"&-light":{background:p,[`${e}-trigger`]:{color:V,background:v},[`${e}-zero-width-trigger`]:{color:V,background:v,border:`1px solid ${m}`,borderInlineStart:0}}}}},cT=bn(["Layout","Sider"],t=>[lT(t)],P1,{deprecatedTokens:L1});var uT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const fm={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},dT=t=>!Number.isNaN(Number.parseFloat(t))&&isFinite(t),Vg=c.createContext({}),gT=(()=>{let t=0;return function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t+=1,`${e}${t}`}})(),fT=c.forwardRef((t,e)=>{const{prefixCls:n,className:r,trigger:i,children:o,defaultCollapsed:A=!1,theme:a="dark",style:s={},collapsible:l=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:g=80,zeroWidthTriggerStyle:p,breakpoint:V,onCollapse:v,onBreakpoint:m}=t,C=uT(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:w}=T.useContext(aT),[S,M]=T.useState("collapsed"in t?t.collapsed:A),[I,f]=T.useState(!1);T.useEffect(()=>{"collapsed"in t&&M(t.collapsed)},[t.collapsed]);const R=(X,Ae)=>{"collapsed"in t||M(X),v==null||v(X,Ae)},{getPrefixCls:q,direction:E}=T.useContext(Qt),h=q("layout-sider",n),[y,x,b]=cT(h),B=T.useRef(null);B.current=X=>{f(X.matches),m==null||m(X.matches),S!==X.matches&&R(X.matches,"responsive")},T.useEffect(()=>{function X(le){return B.current(le)}let Ae;if(typeof window<"u"){const{matchMedia:le}=window;if(le&&V&&V in fm){Ae=le(`screen and (max-width: ${fm[V]})`);try{Ae.addEventListener("change",X)}catch{Ae.addListener(X)}X(Ae)}}return()=>{try{Ae==null||Ae.removeEventListener("change",X)}catch{Ae==null||Ae.removeListener(X)}}},[V]),T.useEffect(()=>{const X=gT("ant-sider-");return w.addSider(X),()=>w.removeSider(X)},[]);const O=()=>{R(!S,"clickTrigger")},N=$n(C,["collapsed"]),F=S?g:d,j=dT(F)?`${F}px`:String(F),Y=parseFloat(String(g||0))===0?c.createElement("span",{onClick:O,className:se(`${h}-zero-width-trigger`,`${h}-zero-width-trigger-${u?"right":"left"}`),style:p},i||c.createElement(j1,null)):null,H=E==="rtl"==!u,_={expanded:H?c.createElement(qs,null):c.createElement(Cd,null),collapsed:H?c.createElement(Cd,null):c.createElement(qs,null)}[S?"collapsed":"expanded"],K=i!==null?Y||c.createElement("div",{className:`${h}-trigger`,onClick:O,style:{width:j}},i||_):null,W=Object.assign(Object.assign({},s),{flex:`0 0 ${j}`,maxWidth:j,minWidth:j,width:j}),z=se(h,`${h}-${a}`,{[`${h}-collapsed`]:!!S,[`${h}-has-trigger`]:l&&i!==null&&!Y,[`${h}-below`]:!!I,[`${h}-zero-width`]:parseFloat(j)===0},r,x,b),te=c.useMemo(()=>({siderCollapsed:S}),[S]);return y(c.createElement(Vg.Provider,{value:te},c.createElement("aside",Object.assign({className:z},N,{style:W,ref:e}),c.createElement("div",{className:`${h}-children`},o),l||I&&Y?K:null)))});process.env.NODE_ENV!=="production"&&(fT.displayName="Sider");var hT={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"},pT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:hT}))},vg=c.forwardRef(pT);process.env.NODE_ENV!=="production"&&(vg.displayName="EllipsisOutlined");const Is=T.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var mT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Y1=t=>{const{prefixCls:e,className:n,dashed:r}=t,i=mT(t,["prefixCls","className","dashed"]),{getPrefixCls:o}=c.useContext(Qt),A=o("menu",e),a=se({[`${A}-item-divider-dashed`]:!!r},n);return c.createElement(mg,Object.assign({className:a},i))};function Cg(t){var e=t.children,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle,o=t.bodyClassName,A=t.className,a=t.style;return c.createElement("div",{className:se("".concat(n,"-content"),A),style:a},c.createElement("div",{className:se("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof e=="function"?e():e))}var vo={shiftX:64,adjustY:1},Co={adjustX:1,shiftY:!0},Vr=[0,0],VT={left:{points:["cr","cl"],overflow:Co,offset:[-4,0],targetOffset:Vr},right:{points:["cl","cr"],overflow:Co,offset:[4,0],targetOffset:Vr},top:{points:["bc","tc"],overflow:vo,offset:[0,-4],targetOffset:Vr},bottom:{points:["tc","bc"],overflow:vo,offset:[0,4],targetOffset:Vr},topLeft:{points:["bl","tl"],overflow:vo,offset:[0,-4],targetOffset:Vr},leftTop:{points:["tr","tl"],overflow:Co,offset:[-4,0],targetOffset:Vr},topRight:{points:["br","tr"],overflow:vo,offset:[0,-4],targetOffset:Vr},rightTop:{points:["tl","tr"],overflow:Co,offset:[4,0],targetOffset:Vr},bottomRight:{points:["tr","br"],overflow:vo,offset:[0,4],targetOffset:Vr},rightBottom:{points:["bl","br"],overflow:Co,offset:[4,0],targetOffset:Vr},bottomLeft:{points:["tl","bl"],overflow:vo,offset:[0,4],targetOffset:Vr},leftBottom:{points:["br","bl"],overflow:Co,offset:[-4,0],targetOffset:Vr}},vT=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],CT=function(e,n){var r=e.overlayClassName,i=e.trigger,o=i===void 0?["hover"]:i,A=e.mouseEnterDelay,a=A===void 0?0:A,s=e.mouseLeaveDelay,l=s===void 0?.1:s,u=e.overlayStyle,d=e.prefixCls,g=d===void 0?"rc-tooltip":d,p=e.children,V=e.onVisibleChange,v=e.afterVisibleChange,m=e.transitionName,C=e.animation,w=e.motion,S=e.placement,M=S===void 0?"right":S,I=e.align,f=I===void 0?{}:I,R=e.destroyTooltipOnHide,q=R===void 0?!1:R,E=e.defaultVisible,h=e.getTooltipContainer,y=e.overlayInnerStyle;e.arrowContent;var x=e.overlay,b=e.id,B=e.showArrow,O=B===void 0?!0:B,N=e.classNames,F=e.styles,j=qt(e,vT),Y=$s(b),H=T.useRef(null);T.useImperativeHandle(n,function(){return H.current});var L=U({},j);"visible"in e&&(L.popupVisible=e.visible);var G=function(){return c.createElement(Cg,{key:"content",prefixCls:g,id:Y,bodyClassName:N==null?void 0:N.body,overlayInnerStyle:U(U({},y),F==null?void 0:F.body)},x)},_=function(){var W=c.Children.only(p),z=(W==null?void 0:W.props)||{},te=U(U({},z),{},{"aria-describedby":x?Y:null});return c.cloneElement(p,te)};return c.createElement(ul,Fe({popupClassName:se(r,N==null?void 0:N.root),prefixCls:g,popup:G,action:o,builtinPlacements:VT,popupPlacement:M,ref:H,popupAlign:f,getPopupContainer:h,onPopupVisibleChange:V,afterPopupVisibleChange:v,popupTransitionName:m,popupAnimation:C,popupMotion:w,defaultPopupVisible:E,autoDestroy:q,mouseLeaveDelay:l,popupStyle:U(U({},u),F==null?void 0:F.root),mouseEnterDelay:a,arrow:O},L),_())};const qT=T.forwardRef(CT),ET=Ti.map(t=>`${t}-inverse`),yT=["success","processing","error","default","warning"];function H1(t){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(be(ET),be(Ti)).includes(t):Ti.includes(t)}function wT(t){return yT.includes(t)}function K1(t,e){const n=H1(e),r=se({[`${t}-${e}`]:e&&n}),i={},o={};return e&&!n&&(i.background=e,o["--antd-arrow-background-color"]=e),{className:r,overlayStyle:i,arrowStyle:o}}const ST=t=>{const{prefixCls:e,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:A}=t,{getPrefixCls:a}=c.useContext(Qt),s=a("tooltip",e),[l,u,d]=Iv(s),g=K1(s,o),p=g.arrowStyle,V=Object.assign(Object.assign({},A),g.overlayStyle),v=se(u,d,s,`${s}-pure`,`${s}-placement-${r}`,n,g.className);return l(c.createElement("div",{className:v,style:p},c.createElement("div",{className:`${s}-arrow`}),c.createElement(Cg,Object.assign({},t,{className:u,prefixCls:s,overlayInnerStyle:V}),i)))};var IT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const bT=c.forwardRef((t,e)=>{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:A,color:a,overlayInnerStyle:s,children:l,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:g,arrow:p=!0,title:V,overlay:v,builtinPlacements:m,arrowPointAtCenter:C=!1,autoAdjustOverflow:w=!0,motion:S,getPopupContainer:M,placement:I="top",mouseEnterDelay:f=.1,mouseLeaveDelay:R=.1,overlayStyle:q,rootClassName:E,overlayClassName:h,styles:y,classNames:x}=t,b=IT(t,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),B=!!p,[,O]=lr(),{getPopupContainer:N,getPrefixCls:F,direction:j,className:Y,style:H,classNames:L,styles:G}=Jr("tooltip"),_=an("Tooltip"),K=c.useRef(null),W=()=>{var Ee;(Ee=K.current)===null||Ee===void 0||Ee.forceAlign()};c.useImperativeHandle(e,()=>{var Ee,We;return{forceAlign:W,forcePopupAlign:()=>{_.deprecated(!1,"forcePopupAlign","forceAlign"),W()},nativeElement:(Ee=K.current)===null||Ee===void 0?void 0:Ee.nativeElement,popupElement:(We=K.current)===null||We===void 0?void 0:We.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName","classNames={{ root: {} }}"]].forEach(Ee=>{let[We,ct]=Ee;_.deprecated(!(We in t),We,ct)}),process.env.NODE_ENV!=="production"&&_(!g||typeof g=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&_(!p||typeof p=="boolean"||!("arrowPointAtCenter"in p),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[z,te]=Tn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),X=!V&&!v&&V!==0,Ae=Ee=>{var We,ct;te(X?!1:Ee),X||((We=t.onOpenChange)===null||We===void 0||We.call(t,Ee),(ct=t.onVisibleChange)===null||ct===void 0||ct.call(t,Ee))},le=c.useMemo(()=>{var Ee,We;let ct=C;return typeof p=="object"&&(ct=(We=(Ee=p.pointAtCenter)!==null&&Ee!==void 0?Ee:p.arrowPointAtCenter)!==null&&We!==void 0?We:C),m||w1({arrowPointAtCenter:ct,autoAdjustOverflow:w,arrowWidth:B?O.sizePopupArrow:0,borderRadius:O.borderRadius,offset:O.marginXXS,visibleFirst:!0})},[C,p,m,O]),ue=c.useMemo(()=>V===0?V:v||V||"",[v,V]),ne=c.createElement(NA,{space:!0},typeof ue=="function"?ue():ue),me=F("tooltip",i),Z=F(),de=t["data-popover-inject"];let ce=z;!("open"in t)&&!("visible"in t)&&X&&(ce=!1);const ye=c.isValidElement(l)&&!xv(l)?l:c.createElement("span",null,l),Ie=ye.props,Ve=!Ie.className||typeof Ie.className=="string"?se(Ie.className,o||`${me}-open`):Ie.className,[Be,Qe,ke]=Iv(me,!de),Se=K1(me,a),pe=Se.arrowStyle,Me=se(h,{[`${me}-rtl`]:j==="rtl"},Se.className,E,Qe,ke,Y,L.root,x==null?void 0:x.root),Le=se(L.body,x==null?void 0:x.body),[et,nt]=WA("Tooltip",b.zIndex),je=c.createElement(qT,Object.assign({},b,{zIndex:et,showArrow:B,placement:I,mouseEnterDelay:f,mouseLeaveDelay:R,prefixCls:me,classNames:{root:Me,body:Le},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pe),G.root),H),q),y==null?void 0:y.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},G.body),s),y==null?void 0:y.body),Se.overlayStyle)},getTooltipContainer:M||A||N,ref:K,builtinPlacements:le,overlay:ne,visible:ce,onVisibleChange:Ae,afterVisibleChange:u??d,arrowContent:c.createElement("span",{className:`${me}-arrow-content`}),motion:{motionName:rl(Z,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!g}),ce?Dr(ye,{className:Ve}):ye);return Be(c.createElement(JA.Provider,{value:nt},je))}),Aa=bT;process.env.NODE_ENV!=="production"&&(Aa.displayName="Tooltip");Aa._InternalPanelDoNotUseOrYouWillBeFired=ST;const Z1=t=>{var e;const{className:n,children:r,icon:i,title:o,danger:A,extra:a}=t,{prefixCls:s,firstLevel:l,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:g}=c.useContext(Is),p=S=>{const M=r==null?void 0:r[0],I=c.createElement("span",{className:se(`${s}-title-content`,{[`${s}-title-content-with-extra`]:!!a||a===0})},r);return(!i||c.isValidElement(r)&&r.type==="span")&&r&&S&&l&&typeof M=="string"?c.createElement("div",{className:`${s}-inline-collapsed-noicon`},M.charAt(0)):I},{siderCollapsed:V}=c.useContext(Vg);let v=o;typeof o>"u"?v=l?r:"":o===!1&&(v="");const m={title:v};!V&&!g&&(m.title=null,m.open=!1);const C=Nr(r).length;let w=c.createElement(gl,Object.assign({},$n(t,["title","icon","danger"]),{className:se({[`${s}-item-danger`]:A,[`${s}-item-only-child`]:(i?C+1:C)===1},n),title:typeof o=="string"?o:void 0}),Dr(i,{className:se(c.isValidElement(i)?(e=i.props)===null||e===void 0?void 0:e.className:"",`${s}-item-icon`)}),p(g));return d||(w=c.createElement(Aa,Object.assign({},m,{placement:u==="rtl"?"left":"right",classNames:{root:`${s}-inline-collapsed-tooltip`}}),w)),w};var MT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const bs=c.createContext(null),RT=c.forwardRef((t,e)=>{const{children:n}=t,r=MT(t,["children"]),i=c.useContext(bs),o=c.useMemo(()=>Object.assign(Object.assign({},i),r),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),A=iE(n),a=Fi(e,A?io(n):null);return c.createElement(bs.Provider,{value:o},c.createElement(NA,{space:!0},A?c.cloneElement(n,{ref:a}):n))}),xT=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:o,lineType:A,itemPaddingInline:a}=t;return{[`${e}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${ve(o)} ${A} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:a},[`> ${e}-item:hover,
|
|
613
613
|
> ${e}-item-active,
|
|
614
614
|
> ${e}-submenu ${e}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${e}-item, ${e}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${e}-submenu-arrow`]:{display:"none"}}}},TT=t=>{let{componentCls:e,menuArrowOffset:n,calc:r}=t;return{[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
615
615
|
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${ve(r(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ve(n)})`}}}}},hm=t=>Object.assign({},Fs(t)),pm=(t,e)=>{const{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:A,itemBg:a,subMenuItemBg:s,itemSelectedBg:l,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:g,motionDurationSlow:p,motionEaseInOut:V,motionEaseOut:v,itemPaddingInline:m,motionDurationMid:C,itemHoverColor:w,lineType:S,colorSplit:M,itemDisabledColor:I,dangerItemColor:f,dangerItemHoverColor:R,dangerItemSelectedColor:q,dangerItemActiveBg:E,dangerItemSelectedBg:h,popupBg:y,itemHoverBg:x,itemActiveBg:b,menuSubMenuBg:B,horizontalItemSelectedColor:O,horizontalItemSelectedBg:N,horizontalItemBorderRadius:F,horizontalItemHoverBg:j}=t;return{[`${n}-${e}, ${n}-${e} > ${n}`]:{color:r,background:a,[`&${n}-root:focus-visible`]:Object.assign({},hm(t)),[`${n}-item`]:{"&-group-title, &-extra":{color:A}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:o},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},hm(t))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${I} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:w}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:x},"&:active":{backgroundColor:b}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:x},"&:active":{backgroundColor:b}}},[`${n}-item-danger`]:{color:f,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:R}},[`&${n}-item:active`]:{background:E}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:q},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:h}},[`&${n}-submenu > ${n}`]:{backgroundColor:B},[`&${n}-popup > ${n}`]:{backgroundColor:y},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:y},[`&${n}-horizontal`]:Object.assign(Object.assign({},e==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:g,marginTop:t.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:F,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:`${ve(u)} solid transparent`,transition:`border-color ${p} ${V}`,content:'""'},"&:hover, &-active, &-open":{background:j,"&::after":{borderBottomWidth:u,borderBottomColor:O}},"&-selected":{color:O,backgroundColor:N,"&:hover":{backgroundColor:N},"&::after":{borderBottomWidth:u,borderBottomColor:O}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${ve(g)} ${S} ${M}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:s},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ve(d)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${C} ${v}`,`opacity ${C} ${v}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:q}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${C} ${V}`,`opacity ${C} ${V}`].join(",")}}}}}},mm=t=>{const{componentCls:e,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:o,marginXS:A,itemMarginBlock:a,itemWidth:s,itemPaddingInline:l}=t,u=t.calc(o).add(i).add(A).equal();return{[`${e}-item`]:{position:"relative",overflow:"hidden"},[`${e}-item, ${e}-submenu-title`]:{height:n,lineHeight:ve(n),paddingInline:l,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:a,width:s},[`> ${e}-item,
|
|
@@ -621,9 +621,9 @@ html body {
|
|
|
621
621
|
${e}-submenu-arrow,
|
|
622
622
|
${e}-submenu-expand-icon
|
|
623
623
|
`]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:m,lineHeight:ve(r),"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:i}},[`${e}-item-group-title`]:Object.assign(Object.assign({},ns),{paddingInline:p})}}]},Vm=t=>{const{componentCls:e,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:o,iconCls:A,iconSize:a,iconMarginInlineEnd:s}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(","),[`${e}-item-icon, ${A}`]:{minWidth:a,fontSize:a,transition:[`font-size ${r} ${o}`,`margin ${n} ${i}`,`color ${n}`].join(","),"+ span":{marginInlineStart:s,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(",")}},[`${e}-item-icon`]:Object.assign({},ZA()),[`&${e}-item-only-child`]:{[`> ${A}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},vm=t=>{const{componentCls:e,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:o,menuArrowOffset:A}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(o).mul(.6).equal(),height:t.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${ve(t.calc(A).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ve(A)})`}}}}},OT=t=>{const{antCls:e,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:A,paddingXS:a,padding:s,colorSplit:l,lineWidth:u,zIndexPopup:d,borderRadiusLG:g,subMenuItemBorderRadius:p,menuArrowSize:V,menuArrowOffset:v,lineType:m,groupTitleLineHeight:C,groupTitleFontSize:w}=t;return[{"":{[n]:Object.assign(Object.assign({},rs()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Hn(t)),rs()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${ve(a)} ${ve(s)}`,fontSize:w,lineHeight:C,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${i} ${A}`,`background ${i} ${A}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i} ${A}`,`background ${i} ${A}`,`padding ${o} ${A}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${i} ${A}`,`padding ${i} ${A}`].join(",")},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${e}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:l,borderStyle:m,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Vm(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${ve(t.calc(r).mul(2).equal())} ${ve(s)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:g},Vm(t)),vm(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${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:t.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:t.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:t.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:t.paddingXS}}}),vm(t)),{[`&-inline-collapsed ${n}-submenu-arrow,
|
|
624
|
-
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ve(v)})`},"&::after":{transform:`rotate(45deg) translateX(${ve(t.calc(v).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${ve(t.calc(V).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ve(t.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ve(v)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},DT=t=>{var e,n,r;const{colorPrimary:i,colorError:o,colorTextDisabled:A,colorErrorBg:a,colorText:s,colorTextDescription:l,colorBgContainer:u,colorFillAlter:d,colorFillContent:g,lineWidth:p,lineWidthBold:V,controlItemBgActive:v,colorBgTextHover:m,controlHeightLG:C,lineHeight:w,colorBgElevated:S,marginXXS:M,padding:I,fontSize:f,controlHeightSM:R,fontSizeLG:q,colorTextLightSolid:E,colorErrorHover:h}=t,y=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,x=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:p,b=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,B=new Pt(E).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:s,itemColor:s,colorItemTextHover:s,itemHoverColor:s,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:l,groupTitleColor:l,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:u,itemBg:u,colorItemBgHover:m,itemHoverBg:m,colorItemBgActive:g,itemActiveBg:v,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:v,itemSelectedBg:v,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:y,colorActiveBarHeight:V,activeBarHeight:V,colorActiveBarBorderSize:p,activeBarBorderWidth:x,colorItemTextDisabled:A,itemDisabledColor:A,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:a,dangerItemActiveBg:a,colorDangerItemBgSelected:a,dangerItemSelectedBg:a,itemMarginInline:b,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:C,groupTitleLineHeight:w,collapsedWidth:C*2,popupBg:S,itemMarginBlock:M,itemPaddingInline:I,horizontalLineHeight:`${C*1.15}px`,iconSize:f,iconMarginInlineEnd:R-f,collapsedIconSize:q,groupTitleFontSize:f,darkItemDisabledColor:new Pt(E).setA(.25).toRgbString(),darkItemColor:B,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:E,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:B,darkItemHoverColor:E,darkDangerItemHoverColor:h,darkDangerItemSelectedColor:E,darkDangerItemActiveBg:o,itemWidth:y?`calc(100% + ${x}px)`:`calc(100% - ${b*2}px)`}},NT=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return bn("Menu",i=>{const{colorBgElevated:o,controlHeightLG:A,fontSize:a,darkItemColor:s,darkDangerItemColor:l,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:g,darkItemSelectedBg:p,darkDangerItemSelectedBg:V,darkItemHoverBg:v,darkGroupTitleColor:m,darkItemHoverColor:C,darkItemDisabledColor:w,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:M,darkDangerItemActiveBg:I,popupBg:f,darkPopupBg:R}=i,q=i.calc(a).div(7).mul(5).equal(),E=Zt(i,{menuArrowSize:q,menuHorizontalHeight:i.calc(A).mul(1.15).equal(),menuArrowOffset:i.calc(q).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:f}),h=Zt(E,{itemColor:s,itemHoverColor:C,groupTitleColor:m,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:u,popupBg:R,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:w,dangerItemColor:l,dangerItemHoverColor:S,dangerItemSelectedColor:M,dangerItemActiveBg:I,dangerItemSelectedBg:V,menuSubMenuBg:d,horizontalItemSelectedColor:g,horizontalItemSelectedBg:p});return[OT(E),xT(E),BT(E),pm(E,"light"),pm(h,"dark"),TT(E),gb(E),Po(E,"slide-up"),Po(E,"slide-down"),zA(E,"zoom-big")]},DT,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(t,e)},z1=t=>{var e;const{popupClassName:n,icon:r,title:i,theme:o}=t,A=c.useContext(Is),{prefixCls:a,inlineCollapsed:s,theme:l}=A,u=Wo();let d;if(!r)d=s&&!u.length&&i&&typeof i=="string"?c.createElement("div",{className:`${a}-inline-collapsed-noicon`},i.charAt(0)):c.createElement("span",{className:`${a}-title-content`},i);else{const V=c.isValidElement(i)&&i.type==="span";d=c.createElement(c.Fragment,null,Dr(r,{className:se(c.isValidElement(r)?(e=r.props)===null||e===void 0?void 0:e.className:"",`${a}-item-icon`)}),V?i:c.createElement("span",{className:`${a}-title-content`},i))}const g=c.useMemo(()=>Object.assign(Object.assign({},A),{firstLevel:!1}),[A]),[p]=WA("Menu");return c.createElement(Is.Provider,{value:g},c.createElement(ia,Object.assign({},$n(t,["icon"]),{title:d,popupClassName:se(a,n,`${a}-${o||l}`),popupStyle:Object.assign({zIndex:p},t.popupStyle)})))};var FT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function dc(t){return t===null||t===!1}const QT={item:Z1,submenu:z1,divider:Y1},kT=T.forwardRef((t,e)=>{var n;const r=c.useContext(bs),i=r||{},{getPrefixCls:o,getPopupContainer:A,direction:a,menu:s}=c.useContext(Qt),l=o(),{prefixCls:u,className:d,style:g,theme:p="light",expandIcon:V,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:m,siderCollapsed:C,rootClassName:w,mode:S,selectable:M,onClick:I,overflowedIndicatorPopupClassName:f}=t,R=FT(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),q=$n(R,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const G=an("Menu");process.env.NODE_ENV!=="production"&&G(!("inlineCollapsed"in t&&S!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),G.deprecated("items"in t&&!t.children,"children","items")}(n=i.validator)===null||n===void 0||n.call(i,{mode:S});const E=nn(function(){var G;I==null||I.apply(void 0,arguments),(G=i.onClick)===null||G===void 0||G.call(i)}),h=i.mode||S,y=M??i.selectable,x=m??C,b={horizontal:{motionName:`${l}-slide-up`},inline:y6(l),other:{motionName:`${l}-zoom-big`}},B=o("menu",u||i.prefixCls),O=Ur(B),[N,F,j]=NT(B,O,!r),Y=se(`${B}-${p}`,s==null?void 0:s.className,d),H=c.useMemo(()=>{var G,_;if(typeof V=="function"||dc(V))return V||null;if(typeof i.expandIcon=="function"||dc(i.expandIcon))return i.expandIcon||null;if(typeof(s==null?void 0:s.expandIcon)=="function"||dc(s==null?void 0:s.expandIcon))return(s==null?void 0:s.expandIcon)||null;const K=(G=V??(i==null?void 0:i.expandIcon))!==null&&G!==void 0?G:s==null?void 0:s.expandIcon;return Dr(K,{className:se(`${B}-submenu-expand-icon`,c.isValidElement(K)?(_=K.props)===null||_===void 0?void 0:_.className:void 0)})},[V,i==null?void 0:i.expandIcon,s==null?void 0:s.expandIcon,B]),L=c.useMemo(()=>({prefixCls:B,inlineCollapsed:x||!1,direction:a,firstLevel:!0,theme:p,mode:h,disableMenuItemTitleTooltip:v}),[B,x,a,v,p]);return N(c.createElement(bs.Provider,{value:null},c.createElement(Is.Provider,{value:L},c.createElement(oa,Object.assign({getPopupContainer:A,overflowedIndicator:c.createElement(vg,null),overflowedIndicatorPopupClassName:se(B,`${B}-${p}`,f),mode:h,selectable:y,onClick:E},q,{inlineCollapsed:x,style:Object.assign(Object.assign({},s==null?void 0:s.style),g),className:Y,prefixCls:B,direction:a,defaultMotions:b,expandIcon:H,ref:e,rootClassName:se(w,F,i.rootClassName,j,O),_internalComponents:QT})))))}),Xo=T.forwardRef((t,e)=>{const n=T.useRef(null),r=c.useContext(Vg);return T.useImperativeHandle(e,()=>({menu:n.current,focus:i=>{var o;(o=n.current)===null||o===void 0||o.focus(i)}})),c.createElement(kT,Object.assign({ref:n},t,r))});Xo.Item=Z1;Xo.SubMenu=z1;Xo.Divider=Y1;Xo.ItemGroup=fl;process.env.NODE_ENV!=="production"&&(Xo.displayName="Menu");const aa=t=>{var e;const{menu:n,arrow:r,prefixCls:i,children:o,trigger:A,disabled:a,dropdownRender:s,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:g,open:p,onOpenChange:V,visible:v,onVisibleChange:m,mouseEnterDelay:C=.15,mouseLeaveDelay:w=.1,autoAdjustOverflow:S=!0,placement:M="",overlay:I,transitionName:f}=t,{getPopupContainer:R,getPrefixCls:q,direction:E,dropdown:h}=c.useContext(Qt),y=an("Dropdown");process.env.NODE_ENV!=="production"&&([["visible","open"],["onVisibleChange","onOpenChange"]].forEach(Z=>{let[de,ce]=Z;y.deprecated(!(de in t),de,ce)}),y.deprecated(!("overlay"in t),"overlay","menu"));const x=c.useMemo(()=>{const Z=q();return f!==void 0?f:M.includes("top")?`${Z}-slide-down`:`${Z}-slide-up`},[q,M,f]),b=c.useMemo(()=>M?M.includes("Center")?M.slice(0,M.indexOf("Center")):M:E==="rtl"?"bottomRight":"bottomLeft",[M,E]);if(process.env.NODE_ENV!=="production"){if(M.includes("Center")){const Z=M.slice(0,M.indexOf("Center"));process.env.NODE_ENV!=="production"&&y(!M.includes("Center"),"deprecated",`You are using '${M}' placement in Dropdown, which is deprecated. Try to use '${Z}' instead.`)}[["visible","open"],["onVisibleChange","onOpenChange"]].forEach(Z=>{let[de,ce]=Z;y.deprecated(!(de in t),de,ce)})}const B=q("dropdown",i),O=Ur(B),[N,F,j]=Hb(B,O),[,Y]=lr(),H=c.Children.only(ax(o)?c.createElement("span",null,o):o),L=Dr(H,{className:se(`${B}-trigger`,{[`${B}-rtl`]:E==="rtl"},H.props.className),disabled:(e=H.props.disabled)!==null&&e!==void 0?e:a}),G=a?[]:A,_=!!(G!=null&&G.includes("contextMenu")),[K,J]=Tn(!1,{value:p??v}),z=nn(Z=>{V==null||V(Z,{source:"trigger"}),m==null||m(Z),J(Z)}),te=se(u,d,F,j,O,h==null?void 0:h.className,{[`${B}-rtl`]:E==="rtl"}),X=w1({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:S,offset:Y.marginXXS,arrowWidth:r?Y.sizePopupArrow:0,borderRadius:Y.borderRadius}),Ae=c.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(V==null||V(!1,{source:"menu"}),J(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),le=()=>{let Z;return n!=null&&n.items?Z=c.createElement(Xo,Object.assign({},n)):typeof I=="function"?Z=I():Z=I,s&&(Z=s(Z)),Z=c.Children.only(typeof Z=="string"?c.createElement("span",null,Z):Z),c.createElement(RT,{prefixCls:`${B}-menu`,rootClassName:se(j,O),expandIcon:c.createElement("span",{className:`${B}-menu-submenu-arrow`},c.createElement(qs,{className:`${B}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Ae,validator:de=>{let{mode:ce}=de;process.env.NODE_ENV!=="production"&&y(!ce||ce==="vertical","usage",`mode="${ce}" is not supported for Dropdown's Menu.`)}},Z)},[ue,ne]=WA("Dropdown",g==null?void 0:g.zIndex);let me=c.createElement(Ax,Object.assign({alignPoint:_},$n(t,["rootClassName"]),{mouseEnterDelay:C,mouseLeaveDelay:w,visible:K,builtinPlacements:X,arrow:!!r,overlayClassName:te,prefixCls:B,getPopupContainer:l||R,transitionName:x,trigger:G,overlay:le,placement:b,onVisibleChange:z,overlayStyle:Object.assign(Object.assign(Object.assign({},h==null?void 0:h.style),g),{zIndex:ue})}),L);return ue&&(me=c.createElement(JA.Provider,{value:ne},me)),N(me)},UT=I1(aa,"align",void 0,"dropdown",t=>t),GT=t=>c.createElement(UT,Object.assign({},t),c.createElement("span",null));aa._InternalPanelDoNotUseOrYouWillBeFired=GT;process.env.NODE_ENV!=="production"&&(aa.displayName="Dropdown");function Cm(t){return["small","middle","large"].includes(t)}function qm(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const J1=T.createContext({latestIndex:0}),jT=J1.Provider,PT=t=>{let{className:e,index:n,children:r,split:i,style:o}=t;const{latestIndex:A}=c.useContext(J1);return r==null?null:c.createElement(c.Fragment,null,c.createElement("div",{className:e,style:o},r),n<A&&i&&c.createElement("span",{className:`${e}-split`},i))};var LT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const YT=c.forwardRef((t,e)=>{var n;const{getPrefixCls:r,direction:i,size:o,className:A,style:a,classNames:s,styles:l}=Jr("space"),{size:u=o??"small",align:d,className:g,rootClassName:p,children:V,direction:v="horizontal",prefixCls:m,split:C,style:w,wrap:S=!1,classNames:M,styles:I}=t,f=LT(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[R,q]=Array.isArray(u)?u:[u,u],E=Cm(q),h=Cm(R),y=qm(q),x=qm(R),b=Nr(V,{keepEmpty:!0}),B=d===void 0&&v==="horizontal"?"center":d,O=r("space",m),[N,F,j]=bv(O),Y=se(O,A,F,`${O}-${v}`,{[`${O}-rtl`]:i==="rtl",[`${O}-align-${B}`]:B,[`${O}-gap-row-${q}`]:E,[`${O}-gap-col-${R}`]:h},g,p,j),H=se(`${O}-item`,(n=M==null?void 0:M.item)!==null&&n!==void 0?n:s.item);let L=0;const G=b.map((J,z)=>{var te;J!=null&&(L=z);const X=(J==null?void 0:J.key)||`${H}-${z}`;return c.createElement(PT,{className:H,key:X,index:z,split:C,style:(te=I==null?void 0:I.item)!==null&&te!==void 0?te:l.item},J)}),_=c.useMemo(()=>({latestIndex:L}),[L]);if(b.length===0)return null;const K={};return S&&(K.flexWrap="wrap"),!h&&x&&(K.columnGap=R),!E&&y&&(K.rowGap=q),N(c.createElement("div",Object.assign({ref:e,className:Y,style:Object.assign(Object.assign(Object.assign({},K),a),w)},f),c.createElement(jT,{value:_},G)))}),hl=YT;hl.Compact=V4;process.env.NODE_ENV!=="production"&&(hl.displayName="Space");var HT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const W1=t=>{const{getPopupContainer:e,getPrefixCls:n,direction:r}=c.useContext(Qt),{prefixCls:i,type:o="default",danger:A,disabled:a,loading:s,onClick:l,htmlType:u,children:d,className:g,menu:p,arrow:V,autoFocus:v,overlay:m,trigger:C,align:w,open:S,onOpenChange:M,placement:I,getPopupContainer:f,href:R,icon:q=c.createElement(vg,null),title:E,buttonsRender:h=X=>X,mouseEnterDelay:y,mouseLeaveDelay:x,overlayClassName:b,overlayStyle:B,destroyPopupOnHide:O,dropdownRender:N}=t,F=HT(t,["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","destroyPopupOnHide","dropdownRender"]),j=n("dropdown",i),Y=`${j}-button`,H={menu:p,arrow:V,autoFocus:v,align:w,disabled:a,trigger:a?[]:C,onOpenChange:M,getPopupContainer:f||e,mouseEnterDelay:y,mouseLeaveDelay:x,overlayClassName:b,overlayStyle:B,destroyPopupOnHide:O,dropdownRender:N},{compactSize:L,compactItemClassnames:G}=zo(j,r),_=se(Y,G,g);"overlay"in t&&(H.overlay=m),"open"in t&&(H.open=S),"placement"in t?H.placement=I:H.placement=r==="rtl"?"bottomLeft":"bottomRight";const K=c.createElement(ro,{type:o,danger:A,disabled:a,loading:s,onClick:l,htmlType:u,href:R,title:E},d),J=c.createElement(ro,{type:o,danger:A,icon:q}),[z,te]=h([K,J]);return c.createElement(hl.Compact,Object.assign({className:_,size:L,block:!0},F),z,c.createElement(aa,Object.assign({},H),te))};W1.__ANT_BUTTON=!0;const X1=aa;X1.Button=W1;const KT=T.createContext({});var ZT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},zT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:ZT}))},qg=c.forwardRef(zT);process.env.NODE_ENV!=="production"&&(qg.displayName="CheckCircleFilled");var JT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},WT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:JT}))},Eg=c.forwardRef(WT);process.env.NODE_ENV!=="production"&&(Eg.displayName="ExclamationCircleFilled");var XT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},_T=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:XT}))},yg=c.forwardRef(_T);process.env.NODE_ENV!=="production"&&(yg.displayName="InfoCircleFilled");var _1=c.forwardRef(function(t,e){var n=t.prefixCls,r=t.style,i=t.className,o=t.duration,A=o===void 0?4.5:o,a=t.showProgress,s=t.pauseOnHover,l=s===void 0?!0:s,u=t.eventKey,d=t.content,g=t.closable,p=t.closeIcon,V=p===void 0?"x":p,v=t.props,m=t.onClick,C=t.onNoticeClose,w=t.times,S=t.hovering,M=c.useState(!1),I=$(M,2),f=I[0],R=I[1],q=c.useState(0),E=$(q,2),h=E[0],y=E[1],x=c.useState(0),b=$(x,2),B=b[0],O=b[1],N=S||f,F=A>0&&a,j=function(){C(u)},Y=function(J){(J.key==="Enter"||J.code==="Enter"||J.keyCode===ot.ENTER)&&j()};c.useEffect(function(){if(!N&&A>0){var K=Date.now()-B,J=setTimeout(function(){j()},A*1e3-B);return function(){l&&clearTimeout(J),O(Date.now()-K)}}},[A,N,w]),c.useEffect(function(){if(!N&&F&&(l||B===0)){var K=performance.now(),J,z=function te(){cancelAnimationFrame(J),J=requestAnimationFrame(function(X){var Ae=X+B-K,le=Math.min(Ae/(A*1e3),1);y(le*100),le<1&&te()})};return z(),function(){l&&cancelAnimationFrame(J)}}},[A,B,N,F,w]);var H=c.useMemo(function(){return $e(g)==="object"&&g!==null?g:g?{closeIcon:V}:{}},[g,V]),L=Oi(H,!0),G=100-(!h||h<0?0:h>100?100:h),_="".concat(n,"-notice");return c.createElement("div",Fe({},v,{ref:e,className:se(_,i,Q({},"".concat(_,"-closable"),g)),style:r,onMouseEnter:function(J){var z;R(!0),v==null||(z=v.onMouseEnter)===null||z===void 0||z.call(v,J)},onMouseLeave:function(J){var z;R(!1),v==null||(z=v.onMouseLeave)===null||z===void 0||z.call(v,J)},onClick:m}),c.createElement("div",{className:"".concat(_,"-content")},d),g&&c.createElement("a",Fe({tabIndex:0,className:"".concat(_,"-close"),onKeyDown:Y,"aria-label":"Close"},L,{onClick:function(J){J.preventDefault(),J.stopPropagation(),j()}}),H.closeIcon),F&&c.createElement("progress",{className:"".concat(_,"-progress"),max:"100",value:G},G+"%"))}),$1=T.createContext({}),$T=function(e){var n=e.children,r=e.classNames;return T.createElement($1.Provider,{value:{classNames:r}},n)},Em=8,ym=3,wm=16,e5=function(e){var n={offset:Em,threshold:ym,gap:wm};if(e&&$e(e)==="object"){var r,i,o;n.offset=(r=e.offset)!==null&&r!==void 0?r:Em,n.threshold=(i=e.threshold)!==null&&i!==void 0?i:ym,n.gap=(o=e.gap)!==null&&o!==void 0?o:wm}return[!!e,n]},t5=["className","style","classNames","styles"],eC=function(e){var n=e.configList,r=e.placement,i=e.prefixCls,o=e.className,A=e.style,a=e.motion,s=e.onAllNoticeRemoved,l=e.onNoticeClose,u=e.stack,d=T.useContext($1),g=d.classNames,p=T.useRef({}),V=T.useState(null),v=$(V,2),m=v[0],C=v[1],w=T.useState([]),S=$(w,2),M=S[0],I=S[1],f=n.map(function(N){return{config:N,key:String(N.key)}}),R=e5(u),q=$(R,2),E=q[0],h=q[1],y=h.offset,x=h.threshold,b=h.gap,B=E&&(M.length>0||f.length<=x),O=typeof a=="function"?a(r):a;return T.useEffect(function(){E&&M.length>1&&I(function(N){return N.filter(function(F){return f.some(function(j){var Y=j.key;return F===Y})})})},[M,f,E]),T.useEffect(function(){var N;if(E&&p.current[(N=f[f.length-1])===null||N===void 0?void 0:N.key]){var F;C(p.current[(F=f[f.length-1])===null||F===void 0?void 0:F.key])}},[f,E]),T.createElement(Sy,Fe({key:r,className:se(i,"".concat(i,"-").concat(r),g==null?void 0:g.list,o,Q(Q({},"".concat(i,"-stack"),!!E),"".concat(i,"-stack-expanded"),B)),style:A,keys:f,motionAppear:!0},O,{onAllRemoved:function(){s(r)}}),function(N,F){var j=N.config,Y=N.className,H=N.style,L=N.index,G=j,_=G.key,K=G.times,J=String(_),z=j,te=z.className,X=z.style,Ae=z.classNames,le=z.styles,ue=qt(z,t5),ne=f.findIndex(function(pe){return pe.key===J}),me={};if(E){var Z=f.length-1-(ne>-1?ne:L-1),de=r==="top"||r==="bottom"?"-50%":"0";if(Z>0){var ce,ye,Ie;me.height=B?(ce=p.current[J])===null||ce===void 0?void 0:ce.offsetHeight:m==null?void 0:m.offsetHeight;for(var Ve=0,Be=0;Be<Z;Be++){var Qe;Ve+=((Qe=p.current[f[f.length-1-Be].key])===null||Qe===void 0?void 0:Qe.offsetHeight)+b}var ke=(B?Ve:Z*y)*(r.startsWith("top")?1:-1),Se=!B&&m!==null&&m!==void 0&&m.offsetWidth&&(ye=p.current[J])!==null&&ye!==void 0&&ye.offsetWidth?((m==null?void 0:m.offsetWidth)-y*2*(Z<3?Z:3))/((Ie=p.current[J])===null||Ie===void 0?void 0:Ie.offsetWidth):1;me.transform="translate3d(".concat(de,", ").concat(ke,"px, 0) scaleX(").concat(Se,")")}else me.transform="translate3d(".concat(de,", 0, 0)")}return T.createElement("div",{ref:F,className:se("".concat(i,"-notice-wrapper"),Y,Ae==null?void 0:Ae.wrapper),style:U(U(U({},H),me),le==null?void 0:le.wrapper),onMouseEnter:function(){return I(function(Me){return Me.includes(J)?Me:[].concat(be(Me),[J])})},onMouseLeave:function(){return I(function(Me){return Me.filter(function(Le){return Le!==J})})}},T.createElement(_1,Fe({},ue,{ref:function(Me){ne>-1?p.current[J]=Me:delete p.current[J]},prefixCls:i,classNames:Ae,styles:le,className:se(te,g==null?void 0:g.notice),style:X,times:K,key:_,eventKey:_,onNoticeClose:l,hovering:E&&M.length>0})))})};process.env.NODE_ENV!=="production"&&(eC.displayName="NoticeList");var tC=c.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-notification":n,i=t.container,o=t.motion,A=t.maxCount,a=t.className,s=t.style,l=t.onAllRemoved,u=t.stack,d=t.renderNotifications,g=c.useState([]),p=$(g,2),V=p[0],v=p[1],m=function(E){var h,y=V.find(function(x){return x.key===E});y==null||(h=y.onClose)===null||h===void 0||h.call(y),v(function(x){return x.filter(function(b){return b.key!==E})})};c.useImperativeHandle(e,function(){return{open:function(E){v(function(h){var y=be(h),x=y.findIndex(function(O){return O.key===E.key}),b=U({},E);if(x>=0){var B;b.times=(((B=h[x])===null||B===void 0?void 0:B.times)||0)+1,y[x]=b}else b.times=0,y.push(b);return A>0&&y.length>A&&(y=y.slice(-A)),y})},close:function(E){m(E)},destroy:function(){v([])}}});var C=c.useState({}),w=$(C,2),S=w[0],M=w[1];c.useEffect(function(){var q={};V.forEach(function(E){var h=E.placement,y=h===void 0?"topRight":h;y&&(q[y]=q[y]||[],q[y].push(E))}),Object.keys(S).forEach(function(E){q[E]=q[E]||[]}),M(q)},[V]);var I=function(E){M(function(h){var y=U({},h),x=y[E]||[];return x.length||delete y[E],y})},f=c.useRef(!1);if(c.useEffect(function(){Object.keys(S).length>0?f.current=!0:f.current&&(l==null||l(),f.current=!1)},[S]),!i)return null;var R=Object.keys(S);return zr.createPortal(c.createElement(c.Fragment,null,R.map(function(q){var E=S[q],h=c.createElement(eC,{key:q,configList:E,placement:q,prefixCls:r,className:a==null?void 0:a(q),style:s==null?void 0:s(q),motion:o,onNoticeClose:m,onAllNoticeRemoved:I,stack:u});return d?d(h,{prefixCls:r,key:q}):h})),i)});process.env.NODE_ENV!=="production"&&(tC.displayName="Notifications");var n5=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],r5=function(){return document.body},Sm=0;function i5(){for(var t={},e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(function(i){i&&Object.keys(i).forEach(function(o){var A=i[o];A!==void 0&&(t[o]=A)})}),t}function o5(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.getContainer,n=e===void 0?r5:e,r=t.motion,i=t.prefixCls,o=t.maxCount,A=t.className,a=t.style,s=t.onAllRemoved,l=t.stack,u=t.renderNotifications,d=qt(t,n5),g=c.useState(),p=$(g,2),V=p[0],v=p[1],m=c.useRef(),C=c.createElement(tC,{container:V,ref:m,prefixCls:i,motion:r,maxCount:o,className:A,style:a,onAllRemoved:s,stack:l,renderNotifications:u}),w=c.useState([]),S=$(w,2),M=S[0],I=S[1],f=nn(function(q){var E=i5(d,q);(E.key===null||E.key===void 0)&&(E.key="rc-notification-".concat(Sm),Sm+=1),I(function(h){return[].concat(be(h),[{type:"open",config:E}])})}),R=c.useMemo(function(){return{open:f,close:function(E){I(function(h){return[].concat(be(h),[{type:"close",key:E}])})},destroy:function(){I(function(E){return[].concat(be(E),[{type:"destroy"}])})}}},[]);return c.useEffect(function(){v(n())}),c.useEffect(function(){if(m.current&&M.length){M.forEach(function(h){switch(h.type){case"open":m.current.open(h.config);break;case"close":m.current.close(h.key);break;case"destroy":m.current.destroy();break}});var q,E;I(function(h){return(q!==h||!E)&&(q=h,E=h.filter(function(y){return!M.includes(y)})),E})}},[M]),[R,C]}var A5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const a5={info:c.createElement(yg,null),success:c.createElement(qg,null),error:c.createElement(ta,null),warning:c.createElement(Eg,null),loading:c.createElement(nl,null)},nC=t=>{let{prefixCls:e,type:n,icon:r,children:i}=t;return c.createElement("div",{className:se(`${e}-custom-content`,`${e}-${n}`)},r||a5[n],c.createElement("span",null,i))},s5=t=>{const{prefixCls:e,className:n,type:r,icon:i,content:o}=t,A=A5(t,["prefixCls","className","type","icon","content"]),{getPrefixCls:a}=c.useContext(Qt),s=e||a("message"),l=Ur(s),[u,d,g]=qv(s,l);return u(c.createElement(_1,Object.assign({},A,{prefixCls:s,className:se(n,d,`${s}-notice-pure-panel`,g,l),eventKey:"pure",duration:null,content:c.createElement(nC,{prefixCls:s,type:r,icon:i},o)})))};var l5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},c5=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:l5}))},pl=c.forwardRef(c5);process.env.NODE_ENV!=="production"&&(pl.displayName="CloseOutlined");function u5(t,e){return{motionName:e??`${t}-move-up`}}function wg(t){let e;const n=new Promise(i=>{e=t(()=>{i(!0)})}),r=()=>{e==null||e()};return r.then=(i,o)=>n.then(i,o),r.promise=n,r}var d5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const g5=8,f5=3,h5=t=>{let{children:e,prefixCls:n}=t;const r=Ur(n),[i,o,A]=qv(n,r);return i(c.createElement($T,{classNames:{list:se(o,A,r)}},e))},p5=(t,e)=>{let{prefixCls:n,key:r}=e;return c.createElement(h5,{prefixCls:n,key:r},t)},m5=c.forwardRef((t,e)=>{const{top:n,prefixCls:r,getContainer:i,maxCount:o,duration:A=f5,rtl:a,transitionName:s,onAllRemoved:l}=t,{getPrefixCls:u,getPopupContainer:d,message:g,direction:p}=c.useContext(Qt),V=r||u("message"),v=()=>({left:"50%",transform:"translateX(-50%)",top:n??g5}),m=()=>se({[`${V}-rtl`]:a??p==="rtl"}),C=()=>u5(V,s),w=c.createElement("span",{className:`${V}-close-x`},c.createElement(pl,{className:`${V}-close-icon`})),[S,M]=o5({prefixCls:V,style:v,className:m,motion:C,closable:!1,closeIcon:w,duration:A,getContainer:()=>(i==null?void 0:i())||(d==null?void 0:d())||document.body,maxCount:o,onAllRemoved:l,renderNotifications:p5});return c.useImperativeHandle(e,()=>Object.assign(Object.assign({},S),{prefixCls:V,message:g})),M});let Im=0;function rC(t){const e=c.useRef(null),n=an("Message");return[c.useMemo(()=>{const i=l=>{var u;(u=e.current)===null||u===void 0||u.close(l)},o=l=>{if(!e.current){process.env.NODE_ENV!=="production"&&n(!1,"usage","You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");const R=()=>{};return R.then=()=>{},R}const{open:u,prefixCls:d,message:g}=e.current,p=`${d}-notice`,{content:V,icon:v,type:m,key:C,className:w,style:S,onClose:M}=l,I=d5(l,["content","icon","type","key","className","style","onClose"]);let f=C;return f==null&&(Im+=1,f=`antd-message-${Im}`),wg(R=>(u(Object.assign(Object.assign({},I),{key:f,content:c.createElement(nC,{prefixCls:d,type:m,icon:v},V),placement:"top",className:se(m&&`${p}-${m}`,w,g==null?void 0:g.className),style:Object.assign(Object.assign({},g==null?void 0:g.style),S),onClose:()=>{M==null||M(),R()}})),()=>{i(f)}))},a={open:o,destroy:l=>{var u;l!==void 0?i(l):(u=e.current)===null||u===void 0||u.destroy()}};return["info","success","warning","error","loading"].forEach(l=>{const u=(d,g,p)=>{let V;d&&typeof d=="object"&&"content"in d?V=d:V={content:d};let v,m;typeof g=="function"?m=g:(v=g,m=p);const C=Object.assign(Object.assign({onClose:m,duration:v},V),{type:l});return o(C)};a[l]=u}),a},[]),c.createElement(m5,Object.assign({key:"message-holder"},t,{ref:e}))]}function V5(t){return rC(t)}let qr=null,zi=t=>t(),kA=[],UA={};function bm(){const{getContainer:t,duration:e,rtl:n,maxCount:r,top:i}=UA,o=(t==null?void 0:t())||document.body;return{getContainer:()=>o,duration:e,rtl:n,maxCount:r,top:i}}const v5=T.forwardRef((t,e)=>{const{messageConfig:n,sync:r}=t,{getPrefixCls:i}=T.useContext(Qt),o=UA.prefixCls||i("message"),A=T.useContext(KT),[a,s]=rC(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),A.message));return T.useImperativeHandle(e,()=>{const l=Object.assign({},a);return Object.keys(l).forEach(u=>{l[u]=function(){return r(),a[u].apply(a,arguments)}}),{instance:l,sync:r}}),s}),C5=T.forwardRef((t,e)=>{const[n,r]=T.useState(bm),i=()=>{r(bm)};T.useEffect(i,[]);const o=kd(),A=o.getRootPrefixCls(),a=o.getIconPrefixCls(),s=o.getTheme(),l=T.createElement(v5,{ref:e,sync:i,messageConfig:n});return T.createElement(Wr,{prefixCls:A,iconPrefixCls:a,theme:s},o.holderRender?o.holderRender(l):l)});function ml(){if(!qr){const t=document.createDocumentFragment(),e={fragment:t};qr=e,zi(()=>{Ag()(T.createElement(C5,{ref:r=>{const{instance:i,sync:o}=r||{};Promise.resolve().then(()=>{!e.instance&&i&&(e.instance=i,e.sync=o,ml())})}}),t)});return}qr.instance&&(kA.forEach(t=>{const{type:e,skipped:n}=t;if(!n)switch(e){case"open":{zi(()=>{const r=qr.instance.open(Object.assign(Object.assign({},UA),t.config));r==null||r.then(t.resolve),t.setCloseFn(r)});break}case"destroy":zi(()=>{qr==null||qr.instance.destroy(t.key)});break;default:zi(()=>{var r;const i=(r=qr.instance)[e].apply(r,be(t.args));i==null||i.then(t.resolve),t.setCloseFn(i)})}}),kA=[])}function q5(t){UA=Object.assign(Object.assign({},UA),t),zi(()=>{var e;(e=qr==null?void 0:qr.sync)===null||e===void 0||e.call(qr)})}function E5(t){const e=wg(n=>{let r;const i={type:"open",config:t,resolve:n,setCloseFn:o=>{r=o}};return kA.push(i),()=>{r?zi(()=>{r()}):i.skipped=!0}});return ml(),e}function y5(t,e){const n=kd();process.env.NODE_ENV!=="production"&&!n.holderRender&&r0("message");const r=wg(i=>{let o;const A={type:t,args:e,resolve:i,setCloseFn:a=>{o=a}};return kA.push(A),()=>{o?zi(()=>{o()}):A.skipped=!0}});return ml(),r}const w5=t=>{kA.push({type:"destroy",key:t}),ml()},S5=["success","info","warning","error","loading"],I5={open:E5,destroy:w5,config:q5,useMessage:V5,_InternalPanelDoNotUseOrYouWillBeFired:s5},St=I5;S5.forEach(t=>{St[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return y5(t,n)}});process.env.NODE_ENV;process.env.NODE_ENV;const Ms=t=>t?typeof t=="function"?t():t:null;var b5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const iC=t=>{let{title:e,content:n,prefixCls:r}=t;return!e&&!n?null:c.createElement(c.Fragment,null,e&&c.createElement("div",{className:`${r}-title`},e),n&&c.createElement("div",{className:`${r}-inner-content`},n))},M5=t=>{const{hashId:e,prefixCls:n,className:r,style:i,placement:o="top",title:A,content:a,children:s}=t,l=Ms(A),u=Ms(a),d=se(e,n,`${n}-pure`,`${n}-placement-${o}`,r);return c.createElement("div",{className:d,style:i},c.createElement("div",{className:`${n}-arrow`}),c.createElement(Cg,Object.assign({},t,{className:e,prefixCls:n}),s||c.createElement(iC,{prefixCls:n,title:l,content:u})))},R5=t=>{const{prefixCls:e,className:n}=t,r=b5(t,["prefixCls","className"]),{getPrefixCls:i}=c.useContext(Qt),o=i("popover",e),[A,a,s]=Ev(o);return A(c.createElement(M5,Object.assign({},r,{prefixCls:o,hashId:a,className:se(n,s)})))};var x5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const T5=c.forwardRef((t,e)=>{var n,r;const{prefixCls:i,title:o,content:A,overlayClassName:a,placement:s="top",trigger:l="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:g=.1,onOpenChange:p,overlayStyle:V={},styles:v,classNames:m}=t,C=x5(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:w,className:S,style:M,classNames:I,styles:f}=Jr("popover"),R=w("popover",i),[q,E,h]=Ev(R),y=w(),x=se(a,E,h,S,I.root,m==null?void 0:m.root),b=se(I.body,m==null?void 0:m.body),[B,O]=Tn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),N=(L,G)=>{O(L,!0),p==null||p(L,G)},F=L=>{L.keyCode===ot.ESC&&N(!1,L)},j=L=>{N(L)},Y=Ms(o),H=Ms(A);return q(c.createElement(Aa,Object.assign({placement:s,trigger:l,mouseEnterDelay:d,mouseLeaveDelay:g},C,{prefixCls:R,classNames:{root:x,body:b},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},f.root),M),V),v==null?void 0:v.root),body:Object.assign(Object.assign({},f.body),v==null?void 0:v.body)},ref:e,open:B,onOpenChange:j,overlay:Y||H?c.createElement(iC,{prefixCls:R,title:Y,content:H}):null,transitionName:rl(y,"zoom-big",C.transitionName),"data-popover-inject":!0}),Dr(u,{onKeyDown:L=>{var G,_;c.isValidElement(u)&&((_=u==null?void 0:(G=u.props).onKeyDown)===null||_===void 0||_.call(G,L)),F(L)}})))}),Io=T5;Io._InternalPanelDoNotUseOrYouWillBeFired=R5;process.env.NODE_ENV!=="production"&&(Io.displayName="Popover");var Vl=function(e){var n=e.className,r=e.customizeIcon,i=e.customizeIconProps,o=e.children,A=e.onMouseDown,a=e.onClick,s=typeof r=="function"?r(i):r;return c.createElement("span",{className:n,onMouseDown:function(u){u.preventDefault(),A==null||A(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:a,"aria-hidden":!0},s!==void 0?s:c.createElement("span",{className:se(n.split(/\s+/).map(function(l){return"".concat(l,"-icon")}))},o))},B5=function(e,n,r,i,o){var A=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=T.useMemo(function(){if($e(i)==="object")return i.clearIcon;if(o)return o},[i,o]),u=T.useMemo(function(){return!!(!A&&i&&(r.length||a)&&!(s==="combobox"&&a===""))},[i,A,r.length,a,s]);return{allowClear:u,clearIcon:T.createElement(Vl,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:l},"×")}},oC=c.createContext(null);function O5(){return c.useContext(oC)}function D5(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=c.useState(!1),n=$(e,2),r=n[0],i=n[1],o=c.useRef(null),A=function(){window.clearTimeout(o.current)};c.useEffect(function(){return A},[]);var a=function(l,u){A(),o.current=window.setTimeout(function(){i(l),u&&u()},t)};return[r,a,A]}function AC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=c.useRef(null),n=c.useRef(null);c.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||e.current===null)&&(e.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},r]}function N5(t,e,n,r){var i=c.useRef(null);i.current={open:e,triggerOpen:n,customizedTrigger:r},c.useEffect(function(){function o(A){var a;if(!((a=i.current)!==null&&a!==void 0&&a.customizedTrigger)){var s=A.target;s.shadowRoot&&A.composed&&(s=A.composedPath()[0]||s),i.current.open&&t().filter(function(l){return l}).every(function(l){return!l.contains(s)&&l!==s})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function F5(t){return t&&![ot.ESC,ot.SHIFT,ot.BACKSPACE,ot.TAB,ot.WIN_KEY,ot.ALT,ot.META,ot.WIN_KEY_RIGHT,ot.CTRL,ot.SEMICOLON,ot.EQUALS,ot.CAPS_LOCK,ot.CONTEXT_MENU,ot.F1,ot.F2,ot.F3,ot.F4,ot.F5,ot.F6,ot.F7,ot.F8,ot.F9,ot.F10,ot.F11,ot.F12].includes(t)}function Q5(t,e,n){var r=U(U({},t),e);return Object.keys(e).forEach(function(i){var o=e[i];typeof o=="function"&&(r[i]=function(){for(var A,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return o.apply(void 0,s),(A=t[i])===null||A===void 0?void 0:A.call.apply(A,[t].concat(s))})}),r}var k5=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],U5=function(e,n){var r=e.prefixCls,i=e.id,o=e.inputElement,A=e.autoFocus,a=e.autoComplete,s=e.editable,l=e.activeDescendantId,u=e.value,d=e.open,g=e.attrs,p=qt(e,k5),V=o||c.createElement("input",null),v=V,m=v.ref,C=v.props;return xi(!("maxLength"in V.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),V=c.cloneElement(V,U(U(U({type:"search"},Q5(p,C)),{},{id:i,ref:kr(n,m),autoComplete:a||"off",autoFocus:A,className:se("".concat(r,"-selection-search-input"),C==null?void 0:C.className),role:"combobox","aria-expanded":d||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":d?l:void 0},g),{},{value:s?u:"",readOnly:!s,unselectable:s?null:"on",style:U(U({},C.style),{},{opacity:s?null:0})})),V},Sg=c.forwardRef(U5);process.env.NODE_ENV!=="production"&&(Sg.displayName="Input");function Ig(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}var G5=typeof window<"u"&&window.document&&window.document.documentElement,j5=process.env.NODE_ENV!=="test"&&G5;function P5(t){return t!=null}function L5(t){return!t&&t!==0}function Mm(t){return["string","number"].includes($e(t))}function aC(t){var e=void 0;return t&&(Mm(t.title)?e=t.title.toString():Mm(t.label)&&(e=t.label.toString())),e}function Y5(t,e){j5?c.useLayoutEffect(t,e):c.useEffect(t,e)}function H5(t){var e;return(e=t.key)!==null&&e!==void 0?e:t.value}var Rm=function(e){e.preventDefault(),e.stopPropagation()},K5=function(e){var n=e.id,r=e.prefixCls,i=e.values,o=e.open,A=e.searchValue,a=e.autoClearSearchValue,s=e.inputRef,l=e.placeholder,u=e.disabled,d=e.mode,g=e.showSearch,p=e.autoFocus,V=e.autoComplete,v=e.activeDescendantId,m=e.tabIndex,C=e.removeIcon,w=e.maxTagCount,S=e.maxTagTextLength,M=e.maxTagPlaceholder,I=M===void 0?function(Z){return"+ ".concat(Z.length," ...")}:M,f=e.tagRender,R=e.onToggleOpen,q=e.onRemove,E=e.onInputChange,h=e.onInputPaste,y=e.onInputKeyDown,x=e.onInputMouseDown,b=e.onInputCompositionStart,B=e.onInputCompositionEnd,O=e.onInputBlur,N=c.useRef(null),F=T.useState(0),j=$(F,2),Y=j[0],H=j[1],L=T.useState(!1),G=$(L,2),_=G[0],K=G[1],J="".concat(r,"-selection"),z=o||d==="multiple"&&a===!1||d==="tags"?A:"",te=d==="tags"||d==="multiple"&&a===!1||g&&(o||_);Y5(function(){H(N.current.scrollWidth)},[z]);var X=function(de,ce,ye,Ie,Ve){return c.createElement("span",{title:aC(de),className:se("".concat(J,"-item"),Q({},"".concat(J,"-item-disabled"),ye))},c.createElement("span",{className:"".concat(J,"-item-content")},ce),Ie&&c.createElement(Vl,{className:"".concat(J,"-item-remove"),onMouseDown:Rm,onClick:Ve,customizeIcon:C},"×"))},Ae=function(de,ce,ye,Ie,Ve,Be){var Qe=function(Se){Rm(Se),R(!o)};return c.createElement("span",{onMouseDown:Qe},f({label:ce,value:de,disabled:ye,closable:Ie,onClose:Ve,isMaxTag:!!Be}))},le=function(de){var ce=de.disabled,ye=de.label,Ie=de.value,Ve=!u&&!ce,Be=ye;if(typeof S=="number"&&(typeof ye=="string"||typeof ye=="number")){var Qe=String(Be);Qe.length>S&&(Be="".concat(Qe.slice(0,S),"..."))}var ke=function(pe){pe&&pe.stopPropagation(),q(de)};return typeof f=="function"?Ae(Ie,Be,ce,Ve,ke):X(de,Be,ce,Ve,ke)},ue=function(de){if(!i.length)return null;var ce=typeof I=="function"?I(de):I;return typeof f=="function"?Ae(void 0,ce,!1,!1,void 0,!0):X({title:ce},ce,!1)},ne=c.createElement("div",{className:"".concat(J,"-search"),style:{width:Y},onFocus:function(){K(!0)},onBlur:function(){K(!1)}},c.createElement(Sg,{ref:s,open:o,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:p,autoComplete:V,editable:te,activeDescendantId:v,value:z,onKeyDown:y,onMouseDown:x,onChange:E,onPaste:h,onCompositionStart:b,onCompositionEnd:B,onBlur:O,tabIndex:m,attrs:Oi(e,!0)}),c.createElement("span",{ref:N,className:"".concat(J,"-search-mirror"),"aria-hidden":!0},z," ")),me=c.createElement(Zr,{prefixCls:"".concat(J,"-overflow"),data:i,renderItem:le,renderRest:ue,suffix:ne,itemKey:H5,maxCount:w});return c.createElement("span",{className:"".concat(J,"-wrap")},me,!i.length&&!z&&c.createElement("span",{className:"".concat(J,"-placeholder")},l))},Z5=function(e){var n=e.inputElement,r=e.prefixCls,i=e.id,o=e.inputRef,A=e.disabled,a=e.autoFocus,s=e.autoComplete,l=e.activeDescendantId,u=e.mode,d=e.open,g=e.values,p=e.placeholder,V=e.tabIndex,v=e.showSearch,m=e.searchValue,C=e.activeValue,w=e.maxLength,S=e.onInputKeyDown,M=e.onInputMouseDown,I=e.onInputChange,f=e.onInputPaste,R=e.onInputCompositionStart,q=e.onInputCompositionEnd,E=e.onInputBlur,h=e.title,y=c.useState(!1),x=$(y,2),b=x[0],B=x[1],O=u==="combobox",N=O||v,F=g[0],j=m||"";O&&C&&!b&&(j=C),c.useEffect(function(){O&&B(!1)},[O,C]);var Y=u!=="combobox"&&!d&&!v?!1:!!j,H=h===void 0?aC(F):h,L=c.useMemo(function(){return F?null:c.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:Y?{visibility:"hidden"}:void 0},p)},[F,Y,p,r]);return c.createElement("span",{className:"".concat(r,"-selection-wrap")},c.createElement("span",{className:"".concat(r,"-selection-search")},c.createElement(Sg,{ref:o,prefixCls:r,id:i,open:d,inputElement:n,disabled:A,autoFocus:a,autoComplete:s,editable:N,activeDescendantId:l,value:j,onKeyDown:S,onMouseDown:M,onChange:function(_){B(!0),I(_)},onPaste:f,onCompositionStart:R,onCompositionEnd:q,onBlur:E,tabIndex:V,attrs:Oi(e,!0),maxLength:O?w:void 0})),!O&&F?c.createElement("span",{className:"".concat(r,"-selection-item"),title:H,style:Y?{visibility:"hidden"}:void 0},F.label):null,L)},z5=function(e,n){var r=T.useRef(null),i=T.useRef(!1),o=e.prefixCls,A=e.open,a=e.mode,s=e.showSearch,l=e.tokenWithEnter,u=e.disabled,d=e.prefix,g=e.autoClearSearchValue,p=e.onSearch,V=e.onSearchSubmit,v=e.onToggleOpen,m=e.onInputKeyDown,C=e.onInputBlur,w=e.domRef;c.useImperativeHandle(n,function(){return{focus:function(H){r.current.focus(H)},blur:function(){r.current.blur()}}});var S=AC(0),M=$(S,2),I=M[0],f=M[1],R=function(H){var L=H.which,G=r.current instanceof HTMLTextAreaElement;!G&&A&&(L===ot.UP||L===ot.DOWN)&&H.preventDefault(),m&&m(H),L===ot.ENTER&&a==="tags"&&!i.current&&!A&&(V==null||V(H.target.value)),!(G&&!A&&~[ot.UP,ot.DOWN,ot.LEFT,ot.RIGHT].indexOf(L))&&F5(L)&&v(!0)},q=function(){f(!0)},E=T.useRef(null),h=function(H){p(H,!0,i.current)!==!1&&v(!0)},y=function(){i.current=!0},x=function(H){i.current=!1,a!=="combobox"&&h(H.target.value)},b=function(H){var L=H.target.value;if(l&&E.current&&/[\r\n]/.test(E.current)){var G=E.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");L=L.replace(G,E.current)}E.current=null,h(L)},B=function(H){var L=H.clipboardData,G=L==null?void 0:L.getData("text");E.current=G||""},O=function(H){var L=H.target;if(L!==r.current){var G=document.body.style.msTouchAction!==void 0;G?setTimeout(function(){r.current.focus()}):r.current.focus()}},N=function(H){var L=I();H.target!==r.current&&!L&&!(a==="combobox"&&u)&&H.preventDefault(),(a!=="combobox"&&(!s||!L)||!A)&&(A&&g!==!1&&p("",!0,!1),v())},F={inputRef:r,onInputKeyDown:R,onInputMouseDown:q,onInputChange:b,onInputPaste:B,onInputCompositionStart:y,onInputCompositionEnd:x,onInputBlur:C},j=a==="multiple"||a==="tags"?c.createElement(K5,Fe({},e,F)):c.createElement(Z5,Fe({},e,F));return c.createElement("div",{ref:w,className:"".concat(o,"-selector"),onClick:O,onMouseDown:N},d&&c.createElement("div",{className:"".concat(o,"-prefix")},d),j)},sC=c.forwardRef(z5);process.env.NODE_ENV!=="production"&&(sC.displayName="Selector");var J5=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],W5=function(e){var n=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},X5=function(e,n){var r=e.prefixCls;e.disabled;var i=e.visible,o=e.children,A=e.popupElement,a=e.animation,s=e.transitionName,l=e.dropdownStyle,u=e.dropdownClassName,d=e.direction,g=d===void 0?"ltr":d,p=e.placement,V=e.builtinPlacements,v=e.dropdownMatchSelectWidth,m=e.dropdownRender,C=e.dropdownAlign,w=e.getPopupContainer,S=e.empty,M=e.getTriggerDOMNode,I=e.onPopupVisibleChange,f=e.onPopupMouseEnter,R=qt(e,J5),q="".concat(r,"-dropdown"),E=A;m&&(E=m(A));var h=c.useMemo(function(){return V||W5(v)},[V,v]),y=a?"".concat(q,"-").concat(a):s,x=typeof v=="number",b=c.useMemo(function(){return x?null:v===!1?"minWidth":"width"},[v,x]),B=l;x&&(B=U(U({},B),{},{width:v}));var O=c.useRef(null);return c.useImperativeHandle(n,function(){return{getPopupElement:function(){var F;return(F=O.current)===null||F===void 0?void 0:F.popupElement}}}),c.createElement(ul,Fe({},R,{showAction:I?["click"]:[],hideAction:I?["click"]:[],popupPlacement:p||(g==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:h,prefixCls:q,popupTransitionName:y,popup:c.createElement("div",{onMouseEnter:f},E),ref:O,stretch:b,popupAlign:C,popupVisible:i,getPopupContainer:w,popupClassName:se(u,Q({},"".concat(q,"-empty"),S)),popupStyle:B,getTriggerDOMNode:M,onPopupVisibleChange:I}),o)},lC=c.forwardRef(X5);process.env.NODE_ENV!=="production"&&(lC.displayName="SelectTrigger");function xm(t,e){var n=t.key,r;return"value"in t&&(r=t.value),n??(r!==void 0?r:"rc-index-key-".concat(e))}function qd(t){return typeof t<"u"&&!Number.isNaN(t)}function cC(t,e){var n=t||{},r=n.label,i=n.value,o=n.options,A=n.groupLabel,a=r||(e?"children":"label");return{label:a,value:i||"value",options:o||"options",groupLabel:A||a}}function _5(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,i=[],o=cC(n,!1),A=o.label,a=o.value,s=o.options,l=o.groupLabel;function u(d,g){Array.isArray(d)&&d.forEach(function(p){if(g||!(s in p)){var V=p[a];i.push({key:xm(p,i.length),groupOption:g,data:p,label:p[A],value:V})}else{var v=p[l];v===void 0&&r&&(v=p.label),i.push({key:xm(p,i.length),group:!0,data:p,label:v}),u(p[s],!0)}})}return u(t,!1),i}function Ed(t){var e=U({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return Ct(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var $5=function(e,n,r){if(!n||!n.length)return null;var i=!1,o=function a(s,l){var u=yV(l),d=u[0],g=u.slice(1);if(!d)return[s];var p=s.split(d);return i=i||p.length>1,p.reduce(function(V,v){return[].concat(be(V),be(a(v,g)))},[]).filter(Boolean)},A=o(e,n);return i?typeof r<"u"?A.slice(0,r):A:null},bg=c.createContext(null);function eB(t){var e=t.visible,n=t.values;if(!e)return null;var r=50;return c.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,A=i.value;return["number","string"].includes($e(o))?o:A}).join(", ")),n.length>r?", ...":null)}var tB=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],nB=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Rs=function(e){return e==="tags"||e==="multiple"},uC=c.forwardRef(function(t,e){var n,r=t.id,i=t.prefixCls,o=t.className,A=t.showSearch,a=t.tagRender,s=t.direction,l=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,g=t.emptyOptions,p=t.notFoundContent,V=p===void 0?"Not Found":p,v=t.onClear,m=t.mode,C=t.disabled,w=t.loading,S=t.getInputElement,M=t.getRawInputElement,I=t.open,f=t.defaultOpen,R=t.onDropdownVisibleChange,q=t.activeValue,E=t.onActiveValueChange,h=t.activeDescendantId,y=t.searchValue,x=t.autoClearSearchValue,b=t.onSearch,B=t.onSearchSplit,O=t.tokenSeparators,N=t.allowClear,F=t.prefix,j=t.suffixIcon,Y=t.clearIcon,H=t.OptionList,L=t.animation,G=t.transitionName,_=t.dropdownStyle,K=t.dropdownClassName,J=t.dropdownMatchSelectWidth,z=t.dropdownRender,te=t.dropdownAlign,X=t.placement,Ae=t.builtinPlacements,le=t.getPopupContainer,ue=t.showAction,ne=ue===void 0?[]:ue,me=t.onFocus,Z=t.onBlur,de=t.onKeyUp,ce=t.onKeyDown,ye=t.onMouseDown,Ie=qt(t,tB),Ve=Rs(m),Be=(A!==void 0?A:Ve)||m==="combobox",Qe=U({},Ie);nB.forEach(function(wt){delete Qe[wt]}),l==null||l.forEach(function(wt){delete Qe[wt]});var ke=c.useState(!1),Se=$(ke,2),pe=Se[0],Me=Se[1];c.useEffect(function(){Me(C1())},[]);var Le=c.useRef(null),et=c.useRef(null),nt=c.useRef(null),je=c.useRef(null),Ee=c.useRef(null),We=c.useRef(!1),ct=D5(),_e=$(ct,3),Oe=_e[0],Re=_e[1],At=_e[2];c.useImperativeHandle(e,function(){var wt,Pe;return{focus:(wt=je.current)===null||wt===void 0?void 0:wt.focus,blur:(Pe=je.current)===null||Pe===void 0?void 0:Pe.blur,scrollTo:function(Et){var xt;return(xt=Ee.current)===null||xt===void 0?void 0:xt.scrollTo(Et)},nativeElement:Le.current||et.current}});var at=c.useMemo(function(){var wt;if(m!=="combobox")return y;var Pe=(wt=u[0])===null||wt===void 0?void 0:wt.value;return typeof Pe=="string"||typeof Pe=="number"?String(Pe):""},[y,m,u]),vt=m==="combobox"&&typeof S=="function"&&S()||null,Tt=typeof M=="function"&&M(),Wt=Fi(et,Tt==null||(n=Tt.props)===null||n===void 0?void 0:n.ref),Jt=c.useState(!1),en=$(Jt,2),Xt=en[0],Yt=en[1];$t(function(){Yt(!0)},[]);var Mt=Tn(!1,{defaultValue:f,value:I}),pt=$(Mt,2),He=pt[0],Xe=pt[1],xe=Xt?He:!1,it=!V&&g;(C||it&&xe&&m==="combobox")&&(xe=!1);var mt=it?!1:xe,De=c.useCallback(function(wt){var Pe=wt!==void 0?wt:!xe;C||(Xe(Pe),xe!==Pe&&(R==null||R(Pe)))},[C,xe,Xe,R]),we=c.useMemo(function(){return(O||[]).some(function(wt){return[`
|
|
624
|
+
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ve(v)})`},"&::after":{transform:`rotate(45deg) translateX(${ve(t.calc(v).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${ve(t.calc(V).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ve(t.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ve(v)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},DT=t=>{var e,n,r;const{colorPrimary:i,colorError:o,colorTextDisabled:A,colorErrorBg:a,colorText:s,colorTextDescription:l,colorBgContainer:u,colorFillAlter:d,colorFillContent:g,lineWidth:p,lineWidthBold:V,controlItemBgActive:v,colorBgTextHover:m,controlHeightLG:C,lineHeight:w,colorBgElevated:S,marginXXS:M,padding:I,fontSize:f,controlHeightSM:R,fontSizeLG:q,colorTextLightSolid:E,colorErrorHover:h}=t,y=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,x=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:p,b=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,B=new Pt(E).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:s,itemColor:s,colorItemTextHover:s,itemHoverColor:s,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:l,groupTitleColor:l,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:u,itemBg:u,colorItemBgHover:m,itemHoverBg:m,colorItemBgActive:g,itemActiveBg:v,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:v,itemSelectedBg:v,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:y,colorActiveBarHeight:V,activeBarHeight:V,colorActiveBarBorderSize:p,activeBarBorderWidth:x,colorItemTextDisabled:A,itemDisabledColor:A,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:a,dangerItemActiveBg:a,colorDangerItemBgSelected:a,dangerItemSelectedBg:a,itemMarginInline:b,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:C,groupTitleLineHeight:w,collapsedWidth:C*2,popupBg:S,itemMarginBlock:M,itemPaddingInline:I,horizontalLineHeight:`${C*1.15}px`,iconSize:f,iconMarginInlineEnd:R-f,collapsedIconSize:q,groupTitleFontSize:f,darkItemDisabledColor:new Pt(E).setA(.25).toRgbString(),darkItemColor:B,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:E,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:B,darkItemHoverColor:E,darkDangerItemHoverColor:h,darkDangerItemSelectedColor:E,darkDangerItemActiveBg:o,itemWidth:y?`calc(100% + ${x}px)`:`calc(100% - ${b*2}px)`}},NT=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return bn("Menu",i=>{const{colorBgElevated:o,controlHeightLG:A,fontSize:a,darkItemColor:s,darkDangerItemColor:l,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:g,darkItemSelectedBg:p,darkDangerItemSelectedBg:V,darkItemHoverBg:v,darkGroupTitleColor:m,darkItemHoverColor:C,darkItemDisabledColor:w,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:M,darkDangerItemActiveBg:I,popupBg:f,darkPopupBg:R}=i,q=i.calc(a).div(7).mul(5).equal(),E=Zt(i,{menuArrowSize:q,menuHorizontalHeight:i.calc(A).mul(1.15).equal(),menuArrowOffset:i.calc(q).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:f}),h=Zt(E,{itemColor:s,itemHoverColor:C,groupTitleColor:m,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:u,popupBg:R,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:w,dangerItemColor:l,dangerItemHoverColor:S,dangerItemSelectedColor:M,dangerItemActiveBg:I,dangerItemSelectedBg:V,menuSubMenuBg:d,horizontalItemSelectedColor:g,horizontalItemSelectedBg:p});return[OT(E),xT(E),BT(E),pm(E,"light"),pm(h,"dark"),TT(E),gb(E),Po(E,"slide-up"),Po(E,"slide-down"),zA(E,"zoom-big")]},DT,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(t,e)},z1=t=>{var e;const{popupClassName:n,icon:r,title:i,theme:o}=t,A=c.useContext(Is),{prefixCls:a,inlineCollapsed:s,theme:l}=A,u=Wo();let d;if(!r)d=s&&!u.length&&i&&typeof i=="string"?c.createElement("div",{className:`${a}-inline-collapsed-noicon`},i.charAt(0)):c.createElement("span",{className:`${a}-title-content`},i);else{const V=c.isValidElement(i)&&i.type==="span";d=c.createElement(c.Fragment,null,Dr(r,{className:se(c.isValidElement(r)?(e=r.props)===null||e===void 0?void 0:e.className:"",`${a}-item-icon`)}),V?i:c.createElement("span",{className:`${a}-title-content`},i))}const g=c.useMemo(()=>Object.assign(Object.assign({},A),{firstLevel:!1}),[A]),[p]=WA("Menu");return c.createElement(Is.Provider,{value:g},c.createElement(ia,Object.assign({},$n(t,["icon"]),{title:d,popupClassName:se(a,n,`${a}-${o||l}`),popupStyle:Object.assign({zIndex:p},t.popupStyle)})))};var FT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function dc(t){return t===null||t===!1}const QT={item:Z1,submenu:z1,divider:Y1},kT=T.forwardRef((t,e)=>{var n;const r=c.useContext(bs),i=r||{},{getPrefixCls:o,getPopupContainer:A,direction:a,menu:s}=c.useContext(Qt),l=o(),{prefixCls:u,className:d,style:g,theme:p="light",expandIcon:V,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:m,siderCollapsed:C,rootClassName:w,mode:S,selectable:M,onClick:I,overflowedIndicatorPopupClassName:f}=t,R=FT(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),q=$n(R,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const G=an("Menu");process.env.NODE_ENV!=="production"&&G(!("inlineCollapsed"in t&&S!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),G.deprecated("items"in t&&!t.children,"children","items")}(n=i.validator)===null||n===void 0||n.call(i,{mode:S});const E=nn(function(){var G;I==null||I.apply(void 0,arguments),(G=i.onClick)===null||G===void 0||G.call(i)}),h=i.mode||S,y=M??i.selectable,x=m??C,b={horizontal:{motionName:`${l}-slide-up`},inline:y6(l),other:{motionName:`${l}-zoom-big`}},B=o("menu",u||i.prefixCls),O=Ur(B),[N,F,j]=NT(B,O,!r),Y=se(`${B}-${p}`,s==null?void 0:s.className,d),H=c.useMemo(()=>{var G,_;if(typeof V=="function"||dc(V))return V||null;if(typeof i.expandIcon=="function"||dc(i.expandIcon))return i.expandIcon||null;if(typeof(s==null?void 0:s.expandIcon)=="function"||dc(s==null?void 0:s.expandIcon))return(s==null?void 0:s.expandIcon)||null;const K=(G=V??(i==null?void 0:i.expandIcon))!==null&&G!==void 0?G:s==null?void 0:s.expandIcon;return Dr(K,{className:se(`${B}-submenu-expand-icon`,c.isValidElement(K)?(_=K.props)===null||_===void 0?void 0:_.className:void 0)})},[V,i==null?void 0:i.expandIcon,s==null?void 0:s.expandIcon,B]),L=c.useMemo(()=>({prefixCls:B,inlineCollapsed:x||!1,direction:a,firstLevel:!0,theme:p,mode:h,disableMenuItemTitleTooltip:v}),[B,x,a,v,p]);return N(c.createElement(bs.Provider,{value:null},c.createElement(Is.Provider,{value:L},c.createElement(oa,Object.assign({getPopupContainer:A,overflowedIndicator:c.createElement(vg,null),overflowedIndicatorPopupClassName:se(B,`${B}-${p}`,f),mode:h,selectable:y,onClick:E},q,{inlineCollapsed:x,style:Object.assign(Object.assign({},s==null?void 0:s.style),g),className:Y,prefixCls:B,direction:a,defaultMotions:b,expandIcon:H,ref:e,rootClassName:se(w,F,i.rootClassName,j,O),_internalComponents:QT})))))}),Xo=T.forwardRef((t,e)=>{const n=T.useRef(null),r=c.useContext(Vg);return T.useImperativeHandle(e,()=>({menu:n.current,focus:i=>{var o;(o=n.current)===null||o===void 0||o.focus(i)}})),c.createElement(kT,Object.assign({ref:n},t,r))});Xo.Item=Z1;Xo.SubMenu=z1;Xo.Divider=Y1;Xo.ItemGroup=fl;process.env.NODE_ENV!=="production"&&(Xo.displayName="Menu");const aa=t=>{var e;const{menu:n,arrow:r,prefixCls:i,children:o,trigger:A,disabled:a,dropdownRender:s,getPopupContainer:l,overlayClassName:u,rootClassName:d,overlayStyle:g,open:p,onOpenChange:V,visible:v,onVisibleChange:m,mouseEnterDelay:C=.15,mouseLeaveDelay:w=.1,autoAdjustOverflow:S=!0,placement:M="",overlay:I,transitionName:f}=t,{getPopupContainer:R,getPrefixCls:q,direction:E,dropdown:h}=c.useContext(Qt),y=an("Dropdown");process.env.NODE_ENV!=="production"&&([["visible","open"],["onVisibleChange","onOpenChange"]].forEach(Z=>{let[de,ce]=Z;y.deprecated(!(de in t),de,ce)}),y.deprecated(!("overlay"in t),"overlay","menu"));const x=c.useMemo(()=>{const Z=q();return f!==void 0?f:M.includes("top")?`${Z}-slide-down`:`${Z}-slide-up`},[q,M,f]),b=c.useMemo(()=>M?M.includes("Center")?M.slice(0,M.indexOf("Center")):M:E==="rtl"?"bottomRight":"bottomLeft",[M,E]);if(process.env.NODE_ENV!=="production"){if(M.includes("Center")){const Z=M.slice(0,M.indexOf("Center"));process.env.NODE_ENV!=="production"&&y(!M.includes("Center"),"deprecated",`You are using '${M}' placement in Dropdown, which is deprecated. Try to use '${Z}' instead.`)}[["visible","open"],["onVisibleChange","onOpenChange"]].forEach(Z=>{let[de,ce]=Z;y.deprecated(!(de in t),de,ce)})}const B=q("dropdown",i),O=Ur(B),[N,F,j]=Hb(B,O),[,Y]=lr(),H=c.Children.only(ax(o)?c.createElement("span",null,o):o),L=Dr(H,{className:se(`${B}-trigger`,{[`${B}-rtl`]:E==="rtl"},H.props.className),disabled:(e=H.props.disabled)!==null&&e!==void 0?e:a}),G=a?[]:A,_=!!(G!=null&&G.includes("contextMenu")),[K,W]=Tn(!1,{value:p??v}),z=nn(Z=>{V==null||V(Z,{source:"trigger"}),m==null||m(Z),W(Z)}),te=se(u,d,F,j,O,h==null?void 0:h.className,{[`${B}-rtl`]:E==="rtl"}),X=w1({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:S,offset:Y.marginXXS,arrowWidth:r?Y.sizePopupArrow:0,borderRadius:Y.borderRadius}),Ae=c.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(V==null||V(!1,{source:"menu"}),W(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),le=()=>{let Z;return n!=null&&n.items?Z=c.createElement(Xo,Object.assign({},n)):typeof I=="function"?Z=I():Z=I,s&&(Z=s(Z)),Z=c.Children.only(typeof Z=="string"?c.createElement("span",null,Z):Z),c.createElement(RT,{prefixCls:`${B}-menu`,rootClassName:se(j,O),expandIcon:c.createElement("span",{className:`${B}-menu-submenu-arrow`},c.createElement(qs,{className:`${B}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Ae,validator:de=>{let{mode:ce}=de;process.env.NODE_ENV!=="production"&&y(!ce||ce==="vertical","usage",`mode="${ce}" is not supported for Dropdown's Menu.`)}},Z)},[ue,ne]=WA("Dropdown",g==null?void 0:g.zIndex);let me=c.createElement(Ax,Object.assign({alignPoint:_},$n(t,["rootClassName"]),{mouseEnterDelay:C,mouseLeaveDelay:w,visible:K,builtinPlacements:X,arrow:!!r,overlayClassName:te,prefixCls:B,getPopupContainer:l||R,transitionName:x,trigger:G,overlay:le,placement:b,onVisibleChange:z,overlayStyle:Object.assign(Object.assign(Object.assign({},h==null?void 0:h.style),g),{zIndex:ue})}),L);return ue&&(me=c.createElement(JA.Provider,{value:ne},me)),N(me)},UT=I1(aa,"align",void 0,"dropdown",t=>t),GT=t=>c.createElement(UT,Object.assign({},t),c.createElement("span",null));aa._InternalPanelDoNotUseOrYouWillBeFired=GT;process.env.NODE_ENV!=="production"&&(aa.displayName="Dropdown");function Cm(t){return["small","middle","large"].includes(t)}function qm(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const J1=T.createContext({latestIndex:0}),jT=J1.Provider,PT=t=>{let{className:e,index:n,children:r,split:i,style:o}=t;const{latestIndex:A}=c.useContext(J1);return r==null?null:c.createElement(c.Fragment,null,c.createElement("div",{className:e,style:o},r),n<A&&i&&c.createElement("span",{className:`${e}-split`},i))};var LT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const YT=c.forwardRef((t,e)=>{var n;const{getPrefixCls:r,direction:i,size:o,className:A,style:a,classNames:s,styles:l}=Jr("space"),{size:u=o??"small",align:d,className:g,rootClassName:p,children:V,direction:v="horizontal",prefixCls:m,split:C,style:w,wrap:S=!1,classNames:M,styles:I}=t,f=LT(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[R,q]=Array.isArray(u)?u:[u,u],E=Cm(q),h=Cm(R),y=qm(q),x=qm(R),b=Nr(V,{keepEmpty:!0}),B=d===void 0&&v==="horizontal"?"center":d,O=r("space",m),[N,F,j]=bv(O),Y=se(O,A,F,`${O}-${v}`,{[`${O}-rtl`]:i==="rtl",[`${O}-align-${B}`]:B,[`${O}-gap-row-${q}`]:E,[`${O}-gap-col-${R}`]:h},g,p,j),H=se(`${O}-item`,(n=M==null?void 0:M.item)!==null&&n!==void 0?n:s.item);let L=0;const G=b.map((W,z)=>{var te;W!=null&&(L=z);const X=(W==null?void 0:W.key)||`${H}-${z}`;return c.createElement(PT,{className:H,key:X,index:z,split:C,style:(te=I==null?void 0:I.item)!==null&&te!==void 0?te:l.item},W)}),_=c.useMemo(()=>({latestIndex:L}),[L]);if(b.length===0)return null;const K={};return S&&(K.flexWrap="wrap"),!h&&x&&(K.columnGap=R),!E&&y&&(K.rowGap=q),N(c.createElement("div",Object.assign({ref:e,className:Y,style:Object.assign(Object.assign(Object.assign({},K),a),w)},f),c.createElement(jT,{value:_},G)))}),hl=YT;hl.Compact=V4;process.env.NODE_ENV!=="production"&&(hl.displayName="Space");var HT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const W1=t=>{const{getPopupContainer:e,getPrefixCls:n,direction:r}=c.useContext(Qt),{prefixCls:i,type:o="default",danger:A,disabled:a,loading:s,onClick:l,htmlType:u,children:d,className:g,menu:p,arrow:V,autoFocus:v,overlay:m,trigger:C,align:w,open:S,onOpenChange:M,placement:I,getPopupContainer:f,href:R,icon:q=c.createElement(vg,null),title:E,buttonsRender:h=X=>X,mouseEnterDelay:y,mouseLeaveDelay:x,overlayClassName:b,overlayStyle:B,destroyPopupOnHide:O,dropdownRender:N}=t,F=HT(t,["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","destroyPopupOnHide","dropdownRender"]),j=n("dropdown",i),Y=`${j}-button`,H={menu:p,arrow:V,autoFocus:v,align:w,disabled:a,trigger:a?[]:C,onOpenChange:M,getPopupContainer:f||e,mouseEnterDelay:y,mouseLeaveDelay:x,overlayClassName:b,overlayStyle:B,destroyPopupOnHide:O,dropdownRender:N},{compactSize:L,compactItemClassnames:G}=zo(j,r),_=se(Y,G,g);"overlay"in t&&(H.overlay=m),"open"in t&&(H.open=S),"placement"in t?H.placement=I:H.placement=r==="rtl"?"bottomLeft":"bottomRight";const K=c.createElement(ro,{type:o,danger:A,disabled:a,loading:s,onClick:l,htmlType:u,href:R,title:E},d),W=c.createElement(ro,{type:o,danger:A,icon:q}),[z,te]=h([K,W]);return c.createElement(hl.Compact,Object.assign({className:_,size:L,block:!0},F),z,c.createElement(aa,Object.assign({},H),te))};W1.__ANT_BUTTON=!0;const X1=aa;X1.Button=W1;const KT=T.createContext({});var ZT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},zT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:ZT}))},qg=c.forwardRef(zT);process.env.NODE_ENV!=="production"&&(qg.displayName="CheckCircleFilled");var JT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},WT=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:JT}))},Eg=c.forwardRef(WT);process.env.NODE_ENV!=="production"&&(Eg.displayName="ExclamationCircleFilled");var XT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},_T=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:XT}))},yg=c.forwardRef(_T);process.env.NODE_ENV!=="production"&&(yg.displayName="InfoCircleFilled");var _1=c.forwardRef(function(t,e){var n=t.prefixCls,r=t.style,i=t.className,o=t.duration,A=o===void 0?4.5:o,a=t.showProgress,s=t.pauseOnHover,l=s===void 0?!0:s,u=t.eventKey,d=t.content,g=t.closable,p=t.closeIcon,V=p===void 0?"x":p,v=t.props,m=t.onClick,C=t.onNoticeClose,w=t.times,S=t.hovering,M=c.useState(!1),I=$(M,2),f=I[0],R=I[1],q=c.useState(0),E=$(q,2),h=E[0],y=E[1],x=c.useState(0),b=$(x,2),B=b[0],O=b[1],N=S||f,F=A>0&&a,j=function(){C(u)},Y=function(W){(W.key==="Enter"||W.code==="Enter"||W.keyCode===ot.ENTER)&&j()};c.useEffect(function(){if(!N&&A>0){var K=Date.now()-B,W=setTimeout(function(){j()},A*1e3-B);return function(){l&&clearTimeout(W),O(Date.now()-K)}}},[A,N,w]),c.useEffect(function(){if(!N&&F&&(l||B===0)){var K=performance.now(),W,z=function te(){cancelAnimationFrame(W),W=requestAnimationFrame(function(X){var Ae=X+B-K,le=Math.min(Ae/(A*1e3),1);y(le*100),le<1&&te()})};return z(),function(){l&&cancelAnimationFrame(W)}}},[A,B,N,F,w]);var H=c.useMemo(function(){return $e(g)==="object"&&g!==null?g:g?{closeIcon:V}:{}},[g,V]),L=Oi(H,!0),G=100-(!h||h<0?0:h>100?100:h),_="".concat(n,"-notice");return c.createElement("div",Fe({},v,{ref:e,className:se(_,i,Q({},"".concat(_,"-closable"),g)),style:r,onMouseEnter:function(W){var z;R(!0),v==null||(z=v.onMouseEnter)===null||z===void 0||z.call(v,W)},onMouseLeave:function(W){var z;R(!1),v==null||(z=v.onMouseLeave)===null||z===void 0||z.call(v,W)},onClick:m}),c.createElement("div",{className:"".concat(_,"-content")},d),g&&c.createElement("a",Fe({tabIndex:0,className:"".concat(_,"-close"),onKeyDown:Y,"aria-label":"Close"},L,{onClick:function(W){W.preventDefault(),W.stopPropagation(),j()}}),H.closeIcon),F&&c.createElement("progress",{className:"".concat(_,"-progress"),max:"100",value:G},G+"%"))}),$1=T.createContext({}),$T=function(e){var n=e.children,r=e.classNames;return T.createElement($1.Provider,{value:{classNames:r}},n)},Em=8,ym=3,wm=16,e5=function(e){var n={offset:Em,threshold:ym,gap:wm};if(e&&$e(e)==="object"){var r,i,o;n.offset=(r=e.offset)!==null&&r!==void 0?r:Em,n.threshold=(i=e.threshold)!==null&&i!==void 0?i:ym,n.gap=(o=e.gap)!==null&&o!==void 0?o:wm}return[!!e,n]},t5=["className","style","classNames","styles"],eC=function(e){var n=e.configList,r=e.placement,i=e.prefixCls,o=e.className,A=e.style,a=e.motion,s=e.onAllNoticeRemoved,l=e.onNoticeClose,u=e.stack,d=T.useContext($1),g=d.classNames,p=T.useRef({}),V=T.useState(null),v=$(V,2),m=v[0],C=v[1],w=T.useState([]),S=$(w,2),M=S[0],I=S[1],f=n.map(function(N){return{config:N,key:String(N.key)}}),R=e5(u),q=$(R,2),E=q[0],h=q[1],y=h.offset,x=h.threshold,b=h.gap,B=E&&(M.length>0||f.length<=x),O=typeof a=="function"?a(r):a;return T.useEffect(function(){E&&M.length>1&&I(function(N){return N.filter(function(F){return f.some(function(j){var Y=j.key;return F===Y})})})},[M,f,E]),T.useEffect(function(){var N;if(E&&p.current[(N=f[f.length-1])===null||N===void 0?void 0:N.key]){var F;C(p.current[(F=f[f.length-1])===null||F===void 0?void 0:F.key])}},[f,E]),T.createElement(Sy,Fe({key:r,className:se(i,"".concat(i,"-").concat(r),g==null?void 0:g.list,o,Q(Q({},"".concat(i,"-stack"),!!E),"".concat(i,"-stack-expanded"),B)),style:A,keys:f,motionAppear:!0},O,{onAllRemoved:function(){s(r)}}),function(N,F){var j=N.config,Y=N.className,H=N.style,L=N.index,G=j,_=G.key,K=G.times,W=String(_),z=j,te=z.className,X=z.style,Ae=z.classNames,le=z.styles,ue=qt(z,t5),ne=f.findIndex(function(pe){return pe.key===W}),me={};if(E){var Z=f.length-1-(ne>-1?ne:L-1),de=r==="top"||r==="bottom"?"-50%":"0";if(Z>0){var ce,ye,Ie;me.height=B?(ce=p.current[W])===null||ce===void 0?void 0:ce.offsetHeight:m==null?void 0:m.offsetHeight;for(var Ve=0,Be=0;Be<Z;Be++){var Qe;Ve+=((Qe=p.current[f[f.length-1-Be].key])===null||Qe===void 0?void 0:Qe.offsetHeight)+b}var ke=(B?Ve:Z*y)*(r.startsWith("top")?1:-1),Se=!B&&m!==null&&m!==void 0&&m.offsetWidth&&(ye=p.current[W])!==null&&ye!==void 0&&ye.offsetWidth?((m==null?void 0:m.offsetWidth)-y*2*(Z<3?Z:3))/((Ie=p.current[W])===null||Ie===void 0?void 0:Ie.offsetWidth):1;me.transform="translate3d(".concat(de,", ").concat(ke,"px, 0) scaleX(").concat(Se,")")}else me.transform="translate3d(".concat(de,", 0, 0)")}return T.createElement("div",{ref:F,className:se("".concat(i,"-notice-wrapper"),Y,Ae==null?void 0:Ae.wrapper),style:U(U(U({},H),me),le==null?void 0:le.wrapper),onMouseEnter:function(){return I(function(Me){return Me.includes(W)?Me:[].concat(be(Me),[W])})},onMouseLeave:function(){return I(function(Me){return Me.filter(function(Le){return Le!==W})})}},T.createElement(_1,Fe({},ue,{ref:function(Me){ne>-1?p.current[W]=Me:delete p.current[W]},prefixCls:i,classNames:Ae,styles:le,className:se(te,g==null?void 0:g.notice),style:X,times:K,key:_,eventKey:_,onNoticeClose:l,hovering:E&&M.length>0})))})};process.env.NODE_ENV!=="production"&&(eC.displayName="NoticeList");var tC=c.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-notification":n,i=t.container,o=t.motion,A=t.maxCount,a=t.className,s=t.style,l=t.onAllRemoved,u=t.stack,d=t.renderNotifications,g=c.useState([]),p=$(g,2),V=p[0],v=p[1],m=function(E){var h,y=V.find(function(x){return x.key===E});y==null||(h=y.onClose)===null||h===void 0||h.call(y),v(function(x){return x.filter(function(b){return b.key!==E})})};c.useImperativeHandle(e,function(){return{open:function(E){v(function(h){var y=be(h),x=y.findIndex(function(O){return O.key===E.key}),b=U({},E);if(x>=0){var B;b.times=(((B=h[x])===null||B===void 0?void 0:B.times)||0)+1,y[x]=b}else b.times=0,y.push(b);return A>0&&y.length>A&&(y=y.slice(-A)),y})},close:function(E){m(E)},destroy:function(){v([])}}});var C=c.useState({}),w=$(C,2),S=w[0],M=w[1];c.useEffect(function(){var q={};V.forEach(function(E){var h=E.placement,y=h===void 0?"topRight":h;y&&(q[y]=q[y]||[],q[y].push(E))}),Object.keys(S).forEach(function(E){q[E]=q[E]||[]}),M(q)},[V]);var I=function(E){M(function(h){var y=U({},h),x=y[E]||[];return x.length||delete y[E],y})},f=c.useRef(!1);if(c.useEffect(function(){Object.keys(S).length>0?f.current=!0:f.current&&(l==null||l(),f.current=!1)},[S]),!i)return null;var R=Object.keys(S);return zr.createPortal(c.createElement(c.Fragment,null,R.map(function(q){var E=S[q],h=c.createElement(eC,{key:q,configList:E,placement:q,prefixCls:r,className:a==null?void 0:a(q),style:s==null?void 0:s(q),motion:o,onNoticeClose:m,onAllNoticeRemoved:I,stack:u});return d?d(h,{prefixCls:r,key:q}):h})),i)});process.env.NODE_ENV!=="production"&&(tC.displayName="Notifications");var n5=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],r5=function(){return document.body},Sm=0;function i5(){for(var t={},e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(function(i){i&&Object.keys(i).forEach(function(o){var A=i[o];A!==void 0&&(t[o]=A)})}),t}function o5(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.getContainer,n=e===void 0?r5:e,r=t.motion,i=t.prefixCls,o=t.maxCount,A=t.className,a=t.style,s=t.onAllRemoved,l=t.stack,u=t.renderNotifications,d=qt(t,n5),g=c.useState(),p=$(g,2),V=p[0],v=p[1],m=c.useRef(),C=c.createElement(tC,{container:V,ref:m,prefixCls:i,motion:r,maxCount:o,className:A,style:a,onAllRemoved:s,stack:l,renderNotifications:u}),w=c.useState([]),S=$(w,2),M=S[0],I=S[1],f=nn(function(q){var E=i5(d,q);(E.key===null||E.key===void 0)&&(E.key="rc-notification-".concat(Sm),Sm+=1),I(function(h){return[].concat(be(h),[{type:"open",config:E}])})}),R=c.useMemo(function(){return{open:f,close:function(E){I(function(h){return[].concat(be(h),[{type:"close",key:E}])})},destroy:function(){I(function(E){return[].concat(be(E),[{type:"destroy"}])})}}},[]);return c.useEffect(function(){v(n())}),c.useEffect(function(){if(m.current&&M.length){M.forEach(function(h){switch(h.type){case"open":m.current.open(h.config);break;case"close":m.current.close(h.key);break;case"destroy":m.current.destroy();break}});var q,E;I(function(h){return(q!==h||!E)&&(q=h,E=h.filter(function(y){return!M.includes(y)})),E})}},[M]),[R,C]}var A5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const a5={info:c.createElement(yg,null),success:c.createElement(qg,null),error:c.createElement(ta,null),warning:c.createElement(Eg,null),loading:c.createElement(nl,null)},nC=t=>{let{prefixCls:e,type:n,icon:r,children:i}=t;return c.createElement("div",{className:se(`${e}-custom-content`,`${e}-${n}`)},r||a5[n],c.createElement("span",null,i))},s5=t=>{const{prefixCls:e,className:n,type:r,icon:i,content:o}=t,A=A5(t,["prefixCls","className","type","icon","content"]),{getPrefixCls:a}=c.useContext(Qt),s=e||a("message"),l=Ur(s),[u,d,g]=qv(s,l);return u(c.createElement(_1,Object.assign({},A,{prefixCls:s,className:se(n,d,`${s}-notice-pure-panel`,g,l),eventKey:"pure",duration:null,content:c.createElement(nC,{prefixCls:s,type:r,icon:i},o)})))};var l5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},c5=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:l5}))},pl=c.forwardRef(c5);process.env.NODE_ENV!=="production"&&(pl.displayName="CloseOutlined");function u5(t,e){return{motionName:e??`${t}-move-up`}}function wg(t){let e;const n=new Promise(i=>{e=t(()=>{i(!0)})}),r=()=>{e==null||e()};return r.then=(i,o)=>n.then(i,o),r.promise=n,r}var d5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const g5=8,f5=3,h5=t=>{let{children:e,prefixCls:n}=t;const r=Ur(n),[i,o,A]=qv(n,r);return i(c.createElement($T,{classNames:{list:se(o,A,r)}},e))},p5=(t,e)=>{let{prefixCls:n,key:r}=e;return c.createElement(h5,{prefixCls:n,key:r},t)},m5=c.forwardRef((t,e)=>{const{top:n,prefixCls:r,getContainer:i,maxCount:o,duration:A=f5,rtl:a,transitionName:s,onAllRemoved:l}=t,{getPrefixCls:u,getPopupContainer:d,message:g,direction:p}=c.useContext(Qt),V=r||u("message"),v=()=>({left:"50%",transform:"translateX(-50%)",top:n??g5}),m=()=>se({[`${V}-rtl`]:a??p==="rtl"}),C=()=>u5(V,s),w=c.createElement("span",{className:`${V}-close-x`},c.createElement(pl,{className:`${V}-close-icon`})),[S,M]=o5({prefixCls:V,style:v,className:m,motion:C,closable:!1,closeIcon:w,duration:A,getContainer:()=>(i==null?void 0:i())||(d==null?void 0:d())||document.body,maxCount:o,onAllRemoved:l,renderNotifications:p5});return c.useImperativeHandle(e,()=>Object.assign(Object.assign({},S),{prefixCls:V,message:g})),M});let Im=0;function rC(t){const e=c.useRef(null),n=an("Message");return[c.useMemo(()=>{const i=l=>{var u;(u=e.current)===null||u===void 0||u.close(l)},o=l=>{if(!e.current){process.env.NODE_ENV!=="production"&&n(!1,"usage","You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");const R=()=>{};return R.then=()=>{},R}const{open:u,prefixCls:d,message:g}=e.current,p=`${d}-notice`,{content:V,icon:v,type:m,key:C,className:w,style:S,onClose:M}=l,I=d5(l,["content","icon","type","key","className","style","onClose"]);let f=C;return f==null&&(Im+=1,f=`antd-message-${Im}`),wg(R=>(u(Object.assign(Object.assign({},I),{key:f,content:c.createElement(nC,{prefixCls:d,type:m,icon:v},V),placement:"top",className:se(m&&`${p}-${m}`,w,g==null?void 0:g.className),style:Object.assign(Object.assign({},g==null?void 0:g.style),S),onClose:()=>{M==null||M(),R()}})),()=>{i(f)}))},a={open:o,destroy:l=>{var u;l!==void 0?i(l):(u=e.current)===null||u===void 0||u.destroy()}};return["info","success","warning","error","loading"].forEach(l=>{const u=(d,g,p)=>{let V;d&&typeof d=="object"&&"content"in d?V=d:V={content:d};let v,m;typeof g=="function"?m=g:(v=g,m=p);const C=Object.assign(Object.assign({onClose:m,duration:v},V),{type:l});return o(C)};a[l]=u}),a},[]),c.createElement(m5,Object.assign({key:"message-holder"},t,{ref:e}))]}function V5(t){return rC(t)}let qr=null,zi=t=>t(),kA=[],UA={};function bm(){const{getContainer:t,duration:e,rtl:n,maxCount:r,top:i}=UA,o=(t==null?void 0:t())||document.body;return{getContainer:()=>o,duration:e,rtl:n,maxCount:r,top:i}}const v5=T.forwardRef((t,e)=>{const{messageConfig:n,sync:r}=t,{getPrefixCls:i}=T.useContext(Qt),o=UA.prefixCls||i("message"),A=T.useContext(KT),[a,s]=rC(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),A.message));return T.useImperativeHandle(e,()=>{const l=Object.assign({},a);return Object.keys(l).forEach(u=>{l[u]=function(){return r(),a[u].apply(a,arguments)}}),{instance:l,sync:r}}),s}),C5=T.forwardRef((t,e)=>{const[n,r]=T.useState(bm),i=()=>{r(bm)};T.useEffect(i,[]);const o=kd(),A=o.getRootPrefixCls(),a=o.getIconPrefixCls(),s=o.getTheme(),l=T.createElement(v5,{ref:e,sync:i,messageConfig:n});return T.createElement(Wr,{prefixCls:A,iconPrefixCls:a,theme:s},o.holderRender?o.holderRender(l):l)});function ml(){if(!qr){const t=document.createDocumentFragment(),e={fragment:t};qr=e,zi(()=>{Ag()(T.createElement(C5,{ref:r=>{const{instance:i,sync:o}=r||{};Promise.resolve().then(()=>{!e.instance&&i&&(e.instance=i,e.sync=o,ml())})}}),t)});return}qr.instance&&(kA.forEach(t=>{const{type:e,skipped:n}=t;if(!n)switch(e){case"open":{zi(()=>{const r=qr.instance.open(Object.assign(Object.assign({},UA),t.config));r==null||r.then(t.resolve),t.setCloseFn(r)});break}case"destroy":zi(()=>{qr==null||qr.instance.destroy(t.key)});break;default:zi(()=>{var r;const i=(r=qr.instance)[e].apply(r,be(t.args));i==null||i.then(t.resolve),t.setCloseFn(i)})}}),kA=[])}function q5(t){UA=Object.assign(Object.assign({},UA),t),zi(()=>{var e;(e=qr==null?void 0:qr.sync)===null||e===void 0||e.call(qr)})}function E5(t){const e=wg(n=>{let r;const i={type:"open",config:t,resolve:n,setCloseFn:o=>{r=o}};return kA.push(i),()=>{r?zi(()=>{r()}):i.skipped=!0}});return ml(),e}function y5(t,e){const n=kd();process.env.NODE_ENV!=="production"&&!n.holderRender&&r0("message");const r=wg(i=>{let o;const A={type:t,args:e,resolve:i,setCloseFn:a=>{o=a}};return kA.push(A),()=>{o?zi(()=>{o()}):A.skipped=!0}});return ml(),r}const w5=t=>{kA.push({type:"destroy",key:t}),ml()},S5=["success","info","warning","error","loading"],I5={open:E5,destroy:w5,config:q5,useMessage:V5,_InternalPanelDoNotUseOrYouWillBeFired:s5},St=I5;S5.forEach(t=>{St[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return y5(t,n)}});process.env.NODE_ENV;process.env.NODE_ENV;const Ms=t=>t?typeof t=="function"?t():t:null;var b5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const iC=t=>{let{title:e,content:n,prefixCls:r}=t;return!e&&!n?null:c.createElement(c.Fragment,null,e&&c.createElement("div",{className:`${r}-title`},e),n&&c.createElement("div",{className:`${r}-inner-content`},n))},M5=t=>{const{hashId:e,prefixCls:n,className:r,style:i,placement:o="top",title:A,content:a,children:s}=t,l=Ms(A),u=Ms(a),d=se(e,n,`${n}-pure`,`${n}-placement-${o}`,r);return c.createElement("div",{className:d,style:i},c.createElement("div",{className:`${n}-arrow`}),c.createElement(Cg,Object.assign({},t,{className:e,prefixCls:n}),s||c.createElement(iC,{prefixCls:n,title:l,content:u})))},R5=t=>{const{prefixCls:e,className:n}=t,r=b5(t,["prefixCls","className"]),{getPrefixCls:i}=c.useContext(Qt),o=i("popover",e),[A,a,s]=Ev(o);return A(c.createElement(M5,Object.assign({},r,{prefixCls:o,hashId:a,className:se(n,s)})))};var x5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const T5=c.forwardRef((t,e)=>{var n,r;const{prefixCls:i,title:o,content:A,overlayClassName:a,placement:s="top",trigger:l="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:g=.1,onOpenChange:p,overlayStyle:V={},styles:v,classNames:m}=t,C=x5(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:w,className:S,style:M,classNames:I,styles:f}=Jr("popover"),R=w("popover",i),[q,E,h]=Ev(R),y=w(),x=se(a,E,h,S,I.root,m==null?void 0:m.root),b=se(I.body,m==null?void 0:m.body),[B,O]=Tn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),N=(L,G)=>{O(L,!0),p==null||p(L,G)},F=L=>{L.keyCode===ot.ESC&&N(!1,L)},j=L=>{N(L)},Y=Ms(o),H=Ms(A);return q(c.createElement(Aa,Object.assign({placement:s,trigger:l,mouseEnterDelay:d,mouseLeaveDelay:g},C,{prefixCls:R,classNames:{root:x,body:b},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},f.root),M),V),v==null?void 0:v.root),body:Object.assign(Object.assign({},f.body),v==null?void 0:v.body)},ref:e,open:B,onOpenChange:j,overlay:Y||H?c.createElement(iC,{prefixCls:R,title:Y,content:H}):null,transitionName:rl(y,"zoom-big",C.transitionName),"data-popover-inject":!0}),Dr(u,{onKeyDown:L=>{var G,_;c.isValidElement(u)&&((_=u==null?void 0:(G=u.props).onKeyDown)===null||_===void 0||_.call(G,L)),F(L)}})))}),Io=T5;Io._InternalPanelDoNotUseOrYouWillBeFired=R5;process.env.NODE_ENV!=="production"&&(Io.displayName="Popover");var Vl=function(e){var n=e.className,r=e.customizeIcon,i=e.customizeIconProps,o=e.children,A=e.onMouseDown,a=e.onClick,s=typeof r=="function"?r(i):r;return c.createElement("span",{className:n,onMouseDown:function(u){u.preventDefault(),A==null||A(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:a,"aria-hidden":!0},s!==void 0?s:c.createElement("span",{className:se(n.split(/\s+/).map(function(l){return"".concat(l,"-icon")}))},o))},B5=function(e,n,r,i,o){var A=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=T.useMemo(function(){if($e(i)==="object")return i.clearIcon;if(o)return o},[i,o]),u=T.useMemo(function(){return!!(!A&&i&&(r.length||a)&&!(s==="combobox"&&a===""))},[i,A,r.length,a,s]);return{allowClear:u,clearIcon:T.createElement(Vl,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:l},"×")}},oC=c.createContext(null);function O5(){return c.useContext(oC)}function D5(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=c.useState(!1),n=$(e,2),r=n[0],i=n[1],o=c.useRef(null),A=function(){window.clearTimeout(o.current)};c.useEffect(function(){return A},[]);var a=function(l,u){A(),o.current=window.setTimeout(function(){i(l),u&&u()},t)};return[r,a,A]}function AC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=c.useRef(null),n=c.useRef(null);c.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||e.current===null)&&(e.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},r]}function N5(t,e,n,r){var i=c.useRef(null);i.current={open:e,triggerOpen:n,customizedTrigger:r},c.useEffect(function(){function o(A){var a;if(!((a=i.current)!==null&&a!==void 0&&a.customizedTrigger)){var s=A.target;s.shadowRoot&&A.composed&&(s=A.composedPath()[0]||s),i.current.open&&t().filter(function(l){return l}).every(function(l){return!l.contains(s)&&l!==s})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function F5(t){return t&&![ot.ESC,ot.SHIFT,ot.BACKSPACE,ot.TAB,ot.WIN_KEY,ot.ALT,ot.META,ot.WIN_KEY_RIGHT,ot.CTRL,ot.SEMICOLON,ot.EQUALS,ot.CAPS_LOCK,ot.CONTEXT_MENU,ot.F1,ot.F2,ot.F3,ot.F4,ot.F5,ot.F6,ot.F7,ot.F8,ot.F9,ot.F10,ot.F11,ot.F12].includes(t)}function Q5(t,e,n){var r=U(U({},t),e);return Object.keys(e).forEach(function(i){var o=e[i];typeof o=="function"&&(r[i]=function(){for(var A,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return o.apply(void 0,s),(A=t[i])===null||A===void 0?void 0:A.call.apply(A,[t].concat(s))})}),r}var k5=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],U5=function(e,n){var r=e.prefixCls,i=e.id,o=e.inputElement,A=e.autoFocus,a=e.autoComplete,s=e.editable,l=e.activeDescendantId,u=e.value,d=e.open,g=e.attrs,p=qt(e,k5),V=o||c.createElement("input",null),v=V,m=v.ref,C=v.props;return xi(!("maxLength"in V.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),V=c.cloneElement(V,U(U(U({type:"search"},Q5(p,C)),{},{id:i,ref:kr(n,m),autoComplete:a||"off",autoFocus:A,className:se("".concat(r,"-selection-search-input"),C==null?void 0:C.className),role:"combobox","aria-expanded":d||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":d?l:void 0},g),{},{value:s?u:"",readOnly:!s,unselectable:s?null:"on",style:U(U({},C.style),{},{opacity:s?null:0})})),V},Sg=c.forwardRef(U5);process.env.NODE_ENV!=="production"&&(Sg.displayName="Input");function Ig(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}var G5=typeof window<"u"&&window.document&&window.document.documentElement,j5=process.env.NODE_ENV!=="test"&&G5;function P5(t){return t!=null}function L5(t){return!t&&t!==0}function Mm(t){return["string","number"].includes($e(t))}function aC(t){var e=void 0;return t&&(Mm(t.title)?e=t.title.toString():Mm(t.label)&&(e=t.label.toString())),e}function Y5(t,e){j5?c.useLayoutEffect(t,e):c.useEffect(t,e)}function H5(t){var e;return(e=t.key)!==null&&e!==void 0?e:t.value}var Rm=function(e){e.preventDefault(),e.stopPropagation()},K5=function(e){var n=e.id,r=e.prefixCls,i=e.values,o=e.open,A=e.searchValue,a=e.autoClearSearchValue,s=e.inputRef,l=e.placeholder,u=e.disabled,d=e.mode,g=e.showSearch,p=e.autoFocus,V=e.autoComplete,v=e.activeDescendantId,m=e.tabIndex,C=e.removeIcon,w=e.maxTagCount,S=e.maxTagTextLength,M=e.maxTagPlaceholder,I=M===void 0?function(Z){return"+ ".concat(Z.length," ...")}:M,f=e.tagRender,R=e.onToggleOpen,q=e.onRemove,E=e.onInputChange,h=e.onInputPaste,y=e.onInputKeyDown,x=e.onInputMouseDown,b=e.onInputCompositionStart,B=e.onInputCompositionEnd,O=e.onInputBlur,N=c.useRef(null),F=T.useState(0),j=$(F,2),Y=j[0],H=j[1],L=T.useState(!1),G=$(L,2),_=G[0],K=G[1],W="".concat(r,"-selection"),z=o||d==="multiple"&&a===!1||d==="tags"?A:"",te=d==="tags"||d==="multiple"&&a===!1||g&&(o||_);Y5(function(){H(N.current.scrollWidth)},[z]);var X=function(de,ce,ye,Ie,Ve){return c.createElement("span",{title:aC(de),className:se("".concat(W,"-item"),Q({},"".concat(W,"-item-disabled"),ye))},c.createElement("span",{className:"".concat(W,"-item-content")},ce),Ie&&c.createElement(Vl,{className:"".concat(W,"-item-remove"),onMouseDown:Rm,onClick:Ve,customizeIcon:C},"×"))},Ae=function(de,ce,ye,Ie,Ve,Be){var Qe=function(Se){Rm(Se),R(!o)};return c.createElement("span",{onMouseDown:Qe},f({label:ce,value:de,disabled:ye,closable:Ie,onClose:Ve,isMaxTag:!!Be}))},le=function(de){var ce=de.disabled,ye=de.label,Ie=de.value,Ve=!u&&!ce,Be=ye;if(typeof S=="number"&&(typeof ye=="string"||typeof ye=="number")){var Qe=String(Be);Qe.length>S&&(Be="".concat(Qe.slice(0,S),"..."))}var ke=function(pe){pe&&pe.stopPropagation(),q(de)};return typeof f=="function"?Ae(Ie,Be,ce,Ve,ke):X(de,Be,ce,Ve,ke)},ue=function(de){if(!i.length)return null;var ce=typeof I=="function"?I(de):I;return typeof f=="function"?Ae(void 0,ce,!1,!1,void 0,!0):X({title:ce},ce,!1)},ne=c.createElement("div",{className:"".concat(W,"-search"),style:{width:Y},onFocus:function(){K(!0)},onBlur:function(){K(!1)}},c.createElement(Sg,{ref:s,open:o,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:p,autoComplete:V,editable:te,activeDescendantId:v,value:z,onKeyDown:y,onMouseDown:x,onChange:E,onPaste:h,onCompositionStart:b,onCompositionEnd:B,onBlur:O,tabIndex:m,attrs:Oi(e,!0)}),c.createElement("span",{ref:N,className:"".concat(W,"-search-mirror"),"aria-hidden":!0},z," ")),me=c.createElement(Zr,{prefixCls:"".concat(W,"-overflow"),data:i,renderItem:le,renderRest:ue,suffix:ne,itemKey:H5,maxCount:w});return c.createElement("span",{className:"".concat(W,"-wrap")},me,!i.length&&!z&&c.createElement("span",{className:"".concat(W,"-placeholder")},l))},Z5=function(e){var n=e.inputElement,r=e.prefixCls,i=e.id,o=e.inputRef,A=e.disabled,a=e.autoFocus,s=e.autoComplete,l=e.activeDescendantId,u=e.mode,d=e.open,g=e.values,p=e.placeholder,V=e.tabIndex,v=e.showSearch,m=e.searchValue,C=e.activeValue,w=e.maxLength,S=e.onInputKeyDown,M=e.onInputMouseDown,I=e.onInputChange,f=e.onInputPaste,R=e.onInputCompositionStart,q=e.onInputCompositionEnd,E=e.onInputBlur,h=e.title,y=c.useState(!1),x=$(y,2),b=x[0],B=x[1],O=u==="combobox",N=O||v,F=g[0],j=m||"";O&&C&&!b&&(j=C),c.useEffect(function(){O&&B(!1)},[O,C]);var Y=u!=="combobox"&&!d&&!v?!1:!!j,H=h===void 0?aC(F):h,L=c.useMemo(function(){return F?null:c.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:Y?{visibility:"hidden"}:void 0},p)},[F,Y,p,r]);return c.createElement("span",{className:"".concat(r,"-selection-wrap")},c.createElement("span",{className:"".concat(r,"-selection-search")},c.createElement(Sg,{ref:o,prefixCls:r,id:i,open:d,inputElement:n,disabled:A,autoFocus:a,autoComplete:s,editable:N,activeDescendantId:l,value:j,onKeyDown:S,onMouseDown:M,onChange:function(_){B(!0),I(_)},onPaste:f,onCompositionStart:R,onCompositionEnd:q,onBlur:E,tabIndex:V,attrs:Oi(e,!0),maxLength:O?w:void 0})),!O&&F?c.createElement("span",{className:"".concat(r,"-selection-item"),title:H,style:Y?{visibility:"hidden"}:void 0},F.label):null,L)},z5=function(e,n){var r=T.useRef(null),i=T.useRef(!1),o=e.prefixCls,A=e.open,a=e.mode,s=e.showSearch,l=e.tokenWithEnter,u=e.disabled,d=e.prefix,g=e.autoClearSearchValue,p=e.onSearch,V=e.onSearchSubmit,v=e.onToggleOpen,m=e.onInputKeyDown,C=e.onInputBlur,w=e.domRef;c.useImperativeHandle(n,function(){return{focus:function(H){r.current.focus(H)},blur:function(){r.current.blur()}}});var S=AC(0),M=$(S,2),I=M[0],f=M[1],R=function(H){var L=H.which,G=r.current instanceof HTMLTextAreaElement;!G&&A&&(L===ot.UP||L===ot.DOWN)&&H.preventDefault(),m&&m(H),L===ot.ENTER&&a==="tags"&&!i.current&&!A&&(V==null||V(H.target.value)),!(G&&!A&&~[ot.UP,ot.DOWN,ot.LEFT,ot.RIGHT].indexOf(L))&&F5(L)&&v(!0)},q=function(){f(!0)},E=T.useRef(null),h=function(H){p(H,!0,i.current)!==!1&&v(!0)},y=function(){i.current=!0},x=function(H){i.current=!1,a!=="combobox"&&h(H.target.value)},b=function(H){var L=H.target.value;if(l&&E.current&&/[\r\n]/.test(E.current)){var G=E.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");L=L.replace(G,E.current)}E.current=null,h(L)},B=function(H){var L=H.clipboardData,G=L==null?void 0:L.getData("text");E.current=G||""},O=function(H){var L=H.target;if(L!==r.current){var G=document.body.style.msTouchAction!==void 0;G?setTimeout(function(){r.current.focus()}):r.current.focus()}},N=function(H){var L=I();H.target!==r.current&&!L&&!(a==="combobox"&&u)&&H.preventDefault(),(a!=="combobox"&&(!s||!L)||!A)&&(A&&g!==!1&&p("",!0,!1),v())},F={inputRef:r,onInputKeyDown:R,onInputMouseDown:q,onInputChange:b,onInputPaste:B,onInputCompositionStart:y,onInputCompositionEnd:x,onInputBlur:C},j=a==="multiple"||a==="tags"?c.createElement(K5,Fe({},e,F)):c.createElement(Z5,Fe({},e,F));return c.createElement("div",{ref:w,className:"".concat(o,"-selector"),onClick:O,onMouseDown:N},d&&c.createElement("div",{className:"".concat(o,"-prefix")},d),j)},sC=c.forwardRef(z5);process.env.NODE_ENV!=="production"&&(sC.displayName="Selector");var J5=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],W5=function(e){var n=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},X5=function(e,n){var r=e.prefixCls;e.disabled;var i=e.visible,o=e.children,A=e.popupElement,a=e.animation,s=e.transitionName,l=e.dropdownStyle,u=e.dropdownClassName,d=e.direction,g=d===void 0?"ltr":d,p=e.placement,V=e.builtinPlacements,v=e.dropdownMatchSelectWidth,m=e.dropdownRender,C=e.dropdownAlign,w=e.getPopupContainer,S=e.empty,M=e.getTriggerDOMNode,I=e.onPopupVisibleChange,f=e.onPopupMouseEnter,R=qt(e,J5),q="".concat(r,"-dropdown"),E=A;m&&(E=m(A));var h=c.useMemo(function(){return V||W5(v)},[V,v]),y=a?"".concat(q,"-").concat(a):s,x=typeof v=="number",b=c.useMemo(function(){return x?null:v===!1?"minWidth":"width"},[v,x]),B=l;x&&(B=U(U({},B),{},{width:v}));var O=c.useRef(null);return c.useImperativeHandle(n,function(){return{getPopupElement:function(){var F;return(F=O.current)===null||F===void 0?void 0:F.popupElement}}}),c.createElement(ul,Fe({},R,{showAction:I?["click"]:[],hideAction:I?["click"]:[],popupPlacement:p||(g==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:h,prefixCls:q,popupTransitionName:y,popup:c.createElement("div",{onMouseEnter:f},E),ref:O,stretch:b,popupAlign:C,popupVisible:i,getPopupContainer:w,popupClassName:se(u,Q({},"".concat(q,"-empty"),S)),popupStyle:B,getTriggerDOMNode:M,onPopupVisibleChange:I}),o)},lC=c.forwardRef(X5);process.env.NODE_ENV!=="production"&&(lC.displayName="SelectTrigger");function xm(t,e){var n=t.key,r;return"value"in t&&(r=t.value),n??(r!==void 0?r:"rc-index-key-".concat(e))}function qd(t){return typeof t<"u"&&!Number.isNaN(t)}function cC(t,e){var n=t||{},r=n.label,i=n.value,o=n.options,A=n.groupLabel,a=r||(e?"children":"label");return{label:a,value:i||"value",options:o||"options",groupLabel:A||a}}function _5(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,i=[],o=cC(n,!1),A=o.label,a=o.value,s=o.options,l=o.groupLabel;function u(d,g){Array.isArray(d)&&d.forEach(function(p){if(g||!(s in p)){var V=p[a];i.push({key:xm(p,i.length),groupOption:g,data:p,label:p[A],value:V})}else{var v=p[l];v===void 0&&r&&(v=p.label),i.push({key:xm(p,i.length),group:!0,data:p,label:v}),u(p[s],!0)}})}return u(t,!1),i}function Ed(t){var e=U({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return Ct(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var $5=function(e,n,r){if(!n||!n.length)return null;var i=!1,o=function a(s,l){var u=yV(l),d=u[0],g=u.slice(1);if(!d)return[s];var p=s.split(d);return i=i||p.length>1,p.reduce(function(V,v){return[].concat(be(V),be(a(v,g)))},[]).filter(Boolean)},A=o(e,n);return i?typeof r<"u"?A.slice(0,r):A:null},bg=c.createContext(null);function eB(t){var e=t.visible,n=t.values;if(!e)return null;var r=50;return c.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,A=i.value;return["number","string"].includes($e(o))?o:A}).join(", ")),n.length>r?", ...":null)}var tB=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],nB=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Rs=function(e){return e==="tags"||e==="multiple"},uC=c.forwardRef(function(t,e){var n,r=t.id,i=t.prefixCls,o=t.className,A=t.showSearch,a=t.tagRender,s=t.direction,l=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,g=t.emptyOptions,p=t.notFoundContent,V=p===void 0?"Not Found":p,v=t.onClear,m=t.mode,C=t.disabled,w=t.loading,S=t.getInputElement,M=t.getRawInputElement,I=t.open,f=t.defaultOpen,R=t.onDropdownVisibleChange,q=t.activeValue,E=t.onActiveValueChange,h=t.activeDescendantId,y=t.searchValue,x=t.autoClearSearchValue,b=t.onSearch,B=t.onSearchSplit,O=t.tokenSeparators,N=t.allowClear,F=t.prefix,j=t.suffixIcon,Y=t.clearIcon,H=t.OptionList,L=t.animation,G=t.transitionName,_=t.dropdownStyle,K=t.dropdownClassName,W=t.dropdownMatchSelectWidth,z=t.dropdownRender,te=t.dropdownAlign,X=t.placement,Ae=t.builtinPlacements,le=t.getPopupContainer,ue=t.showAction,ne=ue===void 0?[]:ue,me=t.onFocus,Z=t.onBlur,de=t.onKeyUp,ce=t.onKeyDown,ye=t.onMouseDown,Ie=qt(t,tB),Ve=Rs(m),Be=(A!==void 0?A:Ve)||m==="combobox",Qe=U({},Ie);nB.forEach(function(wt){delete Qe[wt]}),l==null||l.forEach(function(wt){delete Qe[wt]});var ke=c.useState(!1),Se=$(ke,2),pe=Se[0],Me=Se[1];c.useEffect(function(){Me(C1())},[]);var Le=c.useRef(null),et=c.useRef(null),nt=c.useRef(null),je=c.useRef(null),Ee=c.useRef(null),We=c.useRef(!1),ct=D5(),_e=$(ct,3),Oe=_e[0],Re=_e[1],At=_e[2];c.useImperativeHandle(e,function(){var wt,Pe;return{focus:(wt=je.current)===null||wt===void 0?void 0:wt.focus,blur:(Pe=je.current)===null||Pe===void 0?void 0:Pe.blur,scrollTo:function(Et){var xt;return(xt=Ee.current)===null||xt===void 0?void 0:xt.scrollTo(Et)},nativeElement:Le.current||et.current}});var at=c.useMemo(function(){var wt;if(m!=="combobox")return y;var Pe=(wt=u[0])===null||wt===void 0?void 0:wt.value;return typeof Pe=="string"||typeof Pe=="number"?String(Pe):""},[y,m,u]),vt=m==="combobox"&&typeof S=="function"&&S()||null,Tt=typeof M=="function"&&M(),Wt=Fi(et,Tt==null||(n=Tt.props)===null||n===void 0?void 0:n.ref),Jt=c.useState(!1),en=$(Jt,2),Xt=en[0],Yt=en[1];$t(function(){Yt(!0)},[]);var Mt=Tn(!1,{defaultValue:f,value:I}),pt=$(Mt,2),He=pt[0],Xe=pt[1],xe=Xt?He:!1,it=!V&&g;(C||it&&xe&&m==="combobox")&&(xe=!1);var mt=it?!1:xe,De=c.useCallback(function(wt){var Pe=wt!==void 0?wt:!xe;C||(Xe(Pe),xe!==Pe&&(R==null||R(Pe)))},[C,xe,Xe,R]),we=c.useMemo(function(){return(O||[]).some(function(wt){return[`
|
|
625
625
|
`,`\r
|
|
626
|
-
`].includes(wt)})},[O]),Ye=c.useContext(bg)||{},Ke=Ye.maxCount,Ue=Ye.rawValues,D=function(Pe,ft,Et){if(!(Ve&&qd(Ke)&&(Ue==null?void 0:Ue.size)>=Ke)){var xt=!0,Ot=Pe;E==null||E(null);var Cn=$5(Pe,O,qd(Ke)?Ke-Ue.size:void 0),qn=Et?null:Cn;return m!=="combobox"&&qn&&(Ot="",B==null||B(qn),De(!1),xt=!1),b&&at!==Ot&&b(Ot,{source:ft?"typing":"effect"}),xt}},fe=function(Pe){!Pe||!Pe.trim()||b(Pe,{source:"submit"})};c.useEffect(function(){!xe&&!Ve&&m!=="combobox"&&D("",!1,!1)},[xe]),c.useEffect(function(){He&&C&&Xe(!1),C&&!We.current&&Re(!1)},[C]);var k=AC(),ae=$(k,2),ee=ae[0],Ce=ae[1],ze=c.useRef(!1),tt=function(Pe){var ft=ee(),Et=Pe.key,xt=Et==="Enter";if(xt&&(m!=="combobox"&&Pe.preventDefault(),xe||De(!0)),Ce(!!at),Et==="Backspace"&&!ft&&Ve&&!at&&u.length){for(var Ot=be(u),Cn=null,qn=Ot.length-1;qn>=0;qn-=1){var Zn=Ot[qn];if(!Zn.disabled){Ot.splice(qn,1),Cn=Zn;break}}Cn&&d(Ot,{type:"remove",values:[Cn]})}for(var tr=arguments.length,zn=new Array(tr>1?tr-1:0),Jn=1;Jn<tr;Jn++)zn[Jn-1]=arguments[Jn];if(xe&&(!xt||!ze.current)){var pn;xt&&(ze.current=!0),(pn=Ee.current)===null||pn===void 0||pn.onKeyDown.apply(pn,[Pe].concat(zn))}ce==null||ce.apply(void 0,[Pe].concat(zn))},Dt=function(Pe){for(var ft=arguments.length,Et=new Array(ft>1?ft-1:0),xt=1;xt<ft;xt++)Et[xt-1]=arguments[xt];if(xe){var Ot;(Ot=Ee.current)===null||Ot===void 0||Ot.onKeyUp.apply(Ot,[Pe].concat(Et))}Pe.key==="Enter"&&(ze.current=!1),de==null||de.apply(void 0,[Pe].concat(Et))},gt=function(Pe){var ft=u.filter(function(Et){return Et!==Pe});d(ft,{type:"remove",values:[Pe]})},yt=function(){ze.current=!1},qe=c.useRef(!1),Te=function(){Re(!0),C||(me&&!qe.current&&me.apply(void 0,arguments),ne.includes("focus")&&De(!0)),qe.current=!0},st=function(){We.current=!0,Re(!1,function(){qe.current=!1,We.current=!1,De(!1)}),!C&&(at&&(m==="tags"?b(at,{source:"submit"}):m==="multiple"&&b("",{source:"blur"})),Z&&Z.apply(void 0,arguments))},ut=[];c.useEffect(function(){return function(){ut.forEach(function(wt){return clearTimeout(wt)}),ut.splice(0,ut.length)}},[]);var Nt=function(Pe){var ft,Et=Pe.target,xt=(ft=nt.current)===null||ft===void 0?void 0:ft.getPopupElement();if(xt&&xt.contains(Et)){var Ot=setTimeout(function(){var tr=ut.indexOf(Ot);if(tr!==-1&&ut.splice(tr,1),At(),!pe&&!xt.contains(document.activeElement)){var zn;(zn=je.current)===null||zn===void 0||zn.focus()}});ut.push(Ot)}for(var Cn=arguments.length,qn=new Array(Cn>1?Cn-1:0),Zn=1;Zn<Cn;Zn++)qn[Zn-1]=arguments[Zn];ye==null||ye.apply(void 0,[Pe].concat(qn))},On=c.useState({}),sn=$(On,2),Kn=sn[1];function Gr(){Kn({})}var Un;Tt&&(Un=function(Pe){De(Pe)}),N5(function(){var wt;return[Le.current,(wt=nt.current)===null||wt===void 0?void 0:wt.getPopupElement()]},mt,De,!!Tt);var Gn=c.useMemo(function(){return U(U({},t),{},{notFoundContent:V,open:xe,triggerOpen:mt,id:r,showSearch:Be,multiple:Ve,toggleOpen:De})},[t,V,mt,xe,r,Be,Ve,De]),Sr=!!j||w,jn;Sr&&(jn=c.createElement(Vl,{className:se("".concat(i,"-arrow"),Q({},"".concat(i,"-arrow-loading"),w)),customizeIcon:j,customizeIconProps:{loading:w,searchValue:at,open:xe,focused:Oe,showSearch:Be}}));var _r=function(){var Pe;v==null||v(),(Pe=je.current)===null||Pe===void 0||Pe.focus(),d([],{type:"clear",values:u}),D("",!1,!1)},Ir=B5(i,_r,u,N,Y,C,at,m),Pn=Ir.allowClear,er=Ir.clearIcon,ur=c.createElement(H,{ref:Ee}),dr=se(i,o,Q(Q(Q(Q(Q(Q(Q(Q(Q(Q({},"".concat(i,"-focused"),Oe),"".concat(i,"-multiple"),Ve),"".concat(i,"-single"),!Ve),"".concat(i,"-allow-clear"),N),"".concat(i,"-show-arrow"),Sr),"".concat(i,"-disabled"),C),"".concat(i,"-loading"),w),"".concat(i,"-open"),xe),"".concat(i,"-customize-input"),vt),"".concat(i,"-show-search"),Be)),jr=c.createElement(lC,{ref:nt,disabled:C,prefixCls:i,visible:mt,popupElement:ur,animation:L,transitionName:G,dropdownStyle:_,dropdownClassName:K,direction:s,dropdownMatchSelectWidth:J,dropdownRender:z,dropdownAlign:te,placement:X,builtinPlacements:Ae,getPopupContainer:le,empty:g,getTriggerDOMNode:function(Pe){return et.current||Pe},onPopupVisibleChange:Un,onPopupMouseEnter:Gr},Tt?c.cloneElement(Tt,{ref:Wt}):c.createElement(sC,Fe({},t,{domRef:et,prefixCls:i,inputElement:vt,ref:je,id:r,prefix:F,showSearch:Be,autoClearSearchValue:x,mode:m,activeDescendantId:h,tagRender:a,values:u,open:xe,onToggleOpen:De,activeValue:q,searchValue:at,onSearch:D,onSearchSubmit:fe,onRemove:gt,tokenWithEnter:we,onInputBlur:yt}))),$r;return Tt?$r=jr:$r=c.createElement("div",Fe({className:dr},Qe,{ref:Le,onMouseDown:Nt,onKeyDown:tt,onKeyUp:Dt,onFocus:Te,onBlur:st}),c.createElement(eB,{visible:Oe&&!xe,values:u}),jr,jn,Pn&&er),c.createElement(oC.Provider,{value:Gn},$r)});process.env.NODE_ENV!=="production"&&(uC.displayName="BaseSelect");var Mg=function(){return null};Mg.isSelectOptGroup=!0;var Rg=function(){return null};Rg.isSelectOption=!0;var dC=c.forwardRef(function(t,e){var n=t.height,r=t.offsetY,i=t.offsetX,o=t.children,A=t.prefixCls,a=t.onInnerResize,s=t.innerProps,l=t.rtl,u=t.extra,d={},g={display:"flex",flexDirection:"column"};return r!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},g=U(U({},g),{},Q(Q(Q(Q(Q({transform:"translateY(".concat(r,"px)")},l?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),c.createElement("div",{style:d},c.createElement(fi,{onResize:function(V){var v=V.offsetHeight;v&&a&&a()}},c.createElement("div",Fe({style:g,className:se(Q({},"".concat(A,"-holder-inner"),A)),ref:e},s),o,u)))});dC.displayName="Filler";function rB(t){var e=t.children,n=t.setRef,r=c.useCallback(function(i){n(i)},[]);return c.cloneElement(e,{ref:r})}function iB(t,e,n,r,i,o,A,a){var s=a.getKey;return t.slice(e,n+1).map(function(l,u){var d=e+u,g=A(l,d,{style:{width:r},offsetX:i}),p=s(l);return c.createElement(rB,{key:p,setRef:function(v){return o(l,v)}},g)})}function oB(t,e,n){var r=t.length,i=e.length,o,A;if(r===0&&i===0)return null;r<i?(o=t,A=e):(o=e,A=t);var a={__EMPTY_ITEM__:!0};function s(V){return V!==void 0?n(V):a}for(var l=null,u=Math.abs(r-i)!==1,d=0;d<A.length;d+=1){var g=s(o[d]),p=s(A[d]);if(g!==p){l=d,u=u||g!==s(A[d+1]);break}}return l===null?null:{index:l,multiple:u}}function AB(t,e,n){var r=c.useState(t),i=$(r,2),o=i[0],A=i[1],a=c.useState(null),s=$(a,2),l=s[0],u=s[1];return c.useEffect(function(){var d=oB(o||[],t||[],e);(d==null?void 0:d.index)!==void 0&&u(t[d.index]),A(t)},[t]),[l]}var Tm=(typeof navigator>"u"?"undefined":$e(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const gC=function(t,e,n,r){var i=T.useRef(!1),o=T.useRef(null);function A(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var a=T.useRef({top:t,bottom:e,left:n,right:r});return a.current.top=t,a.current.bottom=e,a.current.left=n,a.current.right=r,function(s,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=s?l<0&&a.current.left||l>0&&a.current.right:l<0&&a.current.top||l>0&&a.current.bottom;return u&&d?(clearTimeout(o.current),i.current=!1):(!d||i.current)&&A(),!i.current&&d}};function aB(t,e,n,r,i,o,A){var a=T.useRef(0),s=T.useRef(null),l=T.useRef(null),u=T.useRef(!1),d=gC(e,n,r,i);function g(w,S){if(Lt.cancel(s.current),!d(!1,S)){var M=w;if(!M._virtualHandled)M._virtualHandled=!0;else return;a.current+=S,l.current=S,Tm||M.preventDefault(),s.current=Lt(function(){var I=u.current?10:1;A(a.current*I,!1),a.current=0})}}function p(w,S){A(S,!0),Tm||w.preventDefault()}var V=T.useRef(null),v=T.useRef(null);function m(w){if(t){Lt.cancel(v.current),v.current=Lt(function(){V.current=null},2);var S=w.deltaX,M=w.deltaY,I=w.shiftKey,f=S,R=M;(V.current==="sx"||!V.current&&I&&M&&!S)&&(f=M,R=0,V.current="sx");var q=Math.abs(f),E=Math.abs(R);V.current===null&&(V.current=o&&q>E?"x":"y"),V.current==="y"?g(w,R):p(w,f)}}function C(w){t&&(u.current=w.detail===l.current)}return[m,C]}function sB(t,e,n,r){var i=c.useMemo(function(){return[new Map,[]]},[t,n.id,r]),o=$(i,2),A=o[0],a=o[1],s=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,g=A.get(u),p=A.get(d);if(g===void 0||p===void 0)for(var V=t.length,v=a.length;v<V;v+=1){var m,C=t[v],w=e(C);A.set(w,v);var S=(m=n.get(w))!==null&&m!==void 0?m:r;if(a[v]=(a[v-1]||0)+S,w===u&&(g=v),w===d&&(p=v),g!==void 0&&p!==void 0)break}return{top:a[g-1]||0,bottom:a[p]}};return s}var lB=function(){function t(){fn(this,t),Q(this,"maps",void 0),Q(this,"id",0),Q(this,"diffRecords",new Map),this.maps=Object.create(null)}return hn(t,[{key:"set",value:function(n,r){this.diffRecords.set(n,this.maps[n]),this.maps[n]=r,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),t}();function Bm(t){var e=parseFloat(t);return isNaN(e)?0:e}function cB(t,e,n){var r=c.useState(0),i=$(r,2),o=i[0],A=i[1],a=T.useRef(new Map),s=T.useRef(new lB),l=T.useRef(0);function u(){l.current+=1}function d(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;u();var V=function(){var C=!1;a.current.forEach(function(w,S){if(w&&w.offsetParent){var M=w.offsetHeight,I=getComputedStyle(w),f=I.marginTop,R=I.marginBottom,q=Bm(f),E=Bm(R),h=M+q+E;s.current.get(S)!==h&&(s.current.set(S,h),C=!0)}}),C&&A(function(w){return w+1})};if(p)V();else{l.current+=1;var v=l.current;Promise.resolve().then(function(){v===l.current&&V()})}}function g(p,V){var v=t(p);a.current.get(v),V?(a.current.set(v,V),d()):a.current.delete(v)}return T.useEffect(function(){return u},[]),[g,d,s.current,o]}var Om=14/15;function uB(t,e,n){var r=T.useRef(!1),i=T.useRef(0),o=T.useRef(0),A=T.useRef(null),a=T.useRef(null),s,l=function(p){if(r.current){var V=Math.ceil(p.touches[0].pageX),v=Math.ceil(p.touches[0].pageY),m=i.current-V,C=o.current-v,w=Math.abs(m)>Math.abs(C);w?i.current=V:o.current=v;var S=n(w,w?m:C,!1,p);S&&p.preventDefault(),clearInterval(a.current),S&&(a.current=setInterval(function(){w?m*=Om:C*=Om;var M=Math.floor(w?m:C);(!n(w,M,!0)||Math.abs(M)<=.1)&&clearInterval(a.current)},16))}},u=function(){r.current=!1,s()},d=function(p){s(),p.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(p.touches[0].pageX),o.current=Math.ceil(p.touches[0].pageY),A.current=p.target,A.current.addEventListener("touchmove",l,{passive:!1}),A.current.addEventListener("touchend",u,{passive:!0}))};s=function(){A.current&&(A.current.removeEventListener("touchmove",l),A.current.removeEventListener("touchend",u))},$t(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var g;(g=e.current)===null||g===void 0||g.removeEventListener("touchstart",d),s(),clearInterval(a.current)}},[t])}function Dm(t){return Math.floor(Math.pow(t,.5))}function yd(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function dB(t,e,n){c.useEffect(function(){var r=e.current;if(t&&r){var i=!1,o,A,a=function(){Lt.cancel(o)},s=function g(){a(),o=Lt(function(){n(A),g()})},l=function(p){if(!(p.target.draggable||p.button!==0)){var V=p;V._virtualHandled||(V._virtualHandled=!0,i=!0)}},u=function(){i=!1,a()},d=function(p){if(i){var V=yd(p,!1),v=r.getBoundingClientRect(),m=v.top,C=v.bottom;if(V<=m){var w=m-V;A=-Dm(w),s()}else if(V>=C){var S=V-C;A=Dm(S),s()}else a()}};return r.addEventListener("mousedown",l),r.ownerDocument.addEventListener("mouseup",u),r.ownerDocument.addEventListener("mousemove",d),function(){r.removeEventListener("mousedown",l),r.ownerDocument.removeEventListener("mouseup",u),r.ownerDocument.removeEventListener("mousemove",d),a()}}},[t])}var Nm=10;function gB(t,e,n,r,i,o,A,a){var s=c.useRef(),l=c.useState(null),u=$(l,2),d=u[0],g=u[1];return $t(function(){if(d&&d.times<Nm){if(!t.current){g(function(Y){return U({},Y)});return}o();var p=d.targetAlign,V=d.originAlign,v=d.index,m=d.offset,C=t.current.clientHeight,w=!1,S=p,M=null;if(C){for(var I=p||V,f=0,R=0,q=0,E=Math.min(e.length-1,v),h=0;h<=E;h+=1){var y=i(e[h]);R=f;var x=n.get(y);q=R+(x===void 0?r:x),f=q}for(var b=I==="top"?m:C-m,B=E;B>=0;B-=1){var O=i(e[B]),N=n.get(O);if(N===void 0){w=!0;break}if(b-=N,b<=0)break}switch(I){case"top":M=R-m;break;case"bottom":M=q-C+m;break;default:{var F=t.current.scrollTop,j=F+C;R<F?S="top":q>j&&(S="bottom")}}M!==null&&A(M),M!==d.lastTop&&(w=!0)}w&&g(U(U({},d),{},{times:d.times+1,targetAlign:S,lastTop:M}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===Nm&&Ct(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,t.current]),function(p){if(p==null){a();return}if(Lt.cancel(s.current),typeof p=="number")A(p);else if(p&&$e(p)==="object"){var V,v=p.align;"index"in p?V=p.index:V=e.findIndex(function(w){return i(w)===p.key});var m=p.offset,C=m===void 0?0:m;g({times:0,index:V,offset:C,originAlign:v})}}}var wd=c.forwardRef(function(t,e){var n=t.prefixCls,r=t.rtl,i=t.scrollOffset,o=t.scrollRange,A=t.onStartMove,a=t.onStopMove,s=t.onScroll,l=t.horizontal,u=t.spinSize,d=t.containerSize,g=t.style,p=t.thumbStyle,V=t.showScrollBar,v=c.useState(!1),m=$(v,2),C=m[0],w=m[1],S=c.useState(null),M=$(S,2),I=M[0],f=M[1],R=c.useState(null),q=$(R,2),E=q[0],h=q[1],y=!r,x=c.useRef(),b=c.useRef(),B=c.useState(V),O=$(B,2),N=O[0],F=O[1],j=c.useRef(),Y=function(){V===!0||V===!1||(clearTimeout(j.current),F(!0),j.current=setTimeout(function(){F(!1)},3e3))},H=o-d||0,L=d-u||0,G=c.useMemo(function(){if(i===0||H===0)return 0;var ue=i/H;return ue*L},[i,H,L]),_=function(ne){ne.stopPropagation(),ne.preventDefault()},K=c.useRef({top:G,dragging:C,pageY:I,startTop:E});K.current={top:G,dragging:C,pageY:I,startTop:E};var J=function(ne){w(!0),f(yd(ne,l)),h(K.current.top),A(),ne.stopPropagation(),ne.preventDefault()};c.useEffect(function(){var ue=function(de){de.preventDefault()},ne=x.current,me=b.current;return ne.addEventListener("touchstart",ue,{passive:!1}),me.addEventListener("touchstart",J,{passive:!1}),function(){ne.removeEventListener("touchstart",ue),me.removeEventListener("touchstart",J)}},[]);var z=c.useRef();z.current=H;var te=c.useRef();te.current=L,c.useEffect(function(){if(C){var ue,ne=function(de){var ce=K.current,ye=ce.dragging,Ie=ce.pageY,Ve=ce.startTop;Lt.cancel(ue);var Be=x.current.getBoundingClientRect(),Qe=d/(l?Be.width:Be.height);if(ye){var ke=(yd(de,l)-Ie)*Qe,Se=Ve;!y&&l?Se-=ke:Se+=ke;var pe=z.current,Me=te.current,Le=Me?Se/Me:0,et=Math.ceil(Le*pe);et=Math.max(et,0),et=Math.min(et,pe),ue=Lt(function(){s(et,l)})}},me=function(){w(!1),a()};return window.addEventListener("mousemove",ne,{passive:!0}),window.addEventListener("touchmove",ne,{passive:!0}),window.addEventListener("mouseup",me,{passive:!0}),window.addEventListener("touchend",me,{passive:!0}),function(){window.removeEventListener("mousemove",ne),window.removeEventListener("touchmove",ne),window.removeEventListener("mouseup",me),window.removeEventListener("touchend",me),Lt.cancel(ue)}}},[C]),c.useEffect(function(){return Y(),function(){clearTimeout(j.current)}},[i]),c.useImperativeHandle(e,function(){return{delayHidden:Y}});var X="".concat(n,"-scrollbar"),Ae={position:"absolute",visibility:N?null:"hidden"},le={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return l?(Object.assign(Ae,{height:8,left:0,right:0,bottom:0}),Object.assign(le,Q({height:"100%",width:u},y?"left":"right",G))):(Object.assign(Ae,Q({width:8,top:0,bottom:0},y?"right":"left",0)),Object.assign(le,{width:"100%",height:u,top:G})),c.createElement("div",{ref:x,className:se(X,Q(Q(Q({},"".concat(X,"-horizontal"),l),"".concat(X,"-vertical"),!l),"".concat(X,"-visible"),N)),style:U(U({},Ae),g),onMouseDown:_,onMouseMove:Y},c.createElement("div",{ref:b,className:se("".concat(X,"-thumb"),Q({},"".concat(X,"-thumb-moving"),C)),style:U(U({},le),p),onMouseDown:J}))});process.env.NODE_ENV!=="production"&&(wd.displayName="ScrollBar");var fB=20;function Fm(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,fB),Math.floor(n)}var hB=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],pB=[],mB={overflowY:"auto",overflowAnchor:"none"};function VB(t,e){var n=t.prefixCls,r=n===void 0?"rc-virtual-list":n,i=t.className,o=t.height,A=t.itemHeight,a=t.fullHeight,s=a===void 0?!0:a,l=t.style,u=t.data,d=t.children,g=t.itemKey,p=t.virtual,V=t.direction,v=t.scrollWidth,m=t.component,C=m===void 0?"div":m,w=t.onScroll,S=t.onVirtualScroll,M=t.onVisibleChange,I=t.innerProps,f=t.extraRender,R=t.styles,q=t.showScrollBar,E=q===void 0?"optional":q,h=qt(t,hB),y=c.useCallback(function(qe){return typeof g=="function"?g(qe):qe==null?void 0:qe[g]},[g]),x=cB(y),b=$(x,4),B=b[0],O=b[1],N=b[2],F=b[3],j=!!(p!==!1&&o&&A),Y=c.useMemo(function(){return Object.values(N.maps).reduce(function(qe,Te){return qe+Te},0)},[N.id,N.maps]),H=j&&u&&(Math.max(A*u.length,Y)>o||!!v),L=V==="rtl",G=se(r,Q({},"".concat(r,"-rtl"),L),i),_=u||pB,K=T.useRef(),J=T.useRef(),z=T.useRef(),te=T.useState(0),X=$(te,2),Ae=X[0],le=X[1],ue=T.useState(0),ne=$(ue,2),me=ne[0],Z=ne[1],de=T.useState(!1),ce=$(de,2),ye=ce[0],Ie=ce[1],Ve=function(){Ie(!0)},Be=function(){Ie(!1)},Qe={getKey:y};function ke(qe){le(function(Te){var st;typeof qe=="function"?st=qe(Te):st=qe;var ut=Yt(st);return K.current.scrollTop=ut,ut})}var Se=T.useRef({start:0,end:_.length}),pe=T.useRef(),Me=AB(_,y),Le=$(Me,1),et=Le[0];pe.current=et;var nt=c.useMemo(function(){if(!j)return{scrollHeight:void 0,start:0,end:_.length-1,offset:void 0};if(!H){var qe;return{scrollHeight:((qe=J.current)===null||qe===void 0?void 0:qe.offsetHeight)||0,start:0,end:_.length-1,offset:void 0}}for(var Te=0,st,ut,Nt,On=_.length,sn=0;sn<On;sn+=1){var Kn=_[sn],Gr=y(Kn),Un=N.get(Gr),Gn=Te+(Un===void 0?A:Un);Gn>=Ae&&st===void 0&&(st=sn,ut=Te),Gn>Ae+o&&Nt===void 0&&(Nt=sn),Te=Gn}return st===void 0&&(st=0,ut=0,Nt=Math.ceil(o/A)),Nt===void 0&&(Nt=_.length-1),Nt=Math.min(Nt+1,_.length-1),{scrollHeight:Te,start:st,end:Nt,offset:ut}},[H,j,Ae,_,F,o]),je=nt.scrollHeight,Ee=nt.start,We=nt.end,ct=nt.offset;Se.current.start=Ee,Se.current.end=We,c.useLayoutEffect(function(){var qe=N.getRecord();if(qe.size===1){var Te=Array.from(qe.keys())[0],st=qe.get(Te),ut=_[Ee];if(ut&&st===void 0){var Nt=y(ut);if(Nt===Te){var On=N.get(Te),sn=On-A;ke(function(Kn){return Kn+sn})}}}N.resetRecord()},[je]);var _e=c.useState({width:0,height:o}),Oe=$(_e,2),Re=Oe[0],At=Oe[1],at=function(Te){At({width:Te.offsetWidth,height:Te.offsetHeight})},vt=T.useRef(),Tt=T.useRef(),Wt=c.useMemo(function(){return Fm(Re.width,v)},[Re.width,v]),Jt=c.useMemo(function(){return Fm(Re.height,je)},[Re.height,je]),en=je-o,Xt=T.useRef(en);Xt.current=en;function Yt(qe){var Te=qe;return Number.isNaN(Xt.current)||(Te=Math.min(Te,Xt.current)),Te=Math.max(Te,0),Te}var Mt=Ae<=0,pt=Ae>=en,He=me<=0,Xe=me>=v,xe=gC(Mt,pt,He,Xe),it=function(){return{x:L?-me:me,y:Ae}},mt=T.useRef(it()),De=nn(function(qe){if(S){var Te=U(U({},it()),qe);(mt.current.x!==Te.x||mt.current.y!==Te.y)&&(S(Te),mt.current=Te)}});function we(qe,Te){var st=qe;Te?(zr.flushSync(function(){Z(st)}),De()):ke(st)}function Ye(qe){var Te=qe.currentTarget.scrollTop;Te!==Ae&&ke(Te),w==null||w(qe),De()}var Ke=function(Te){var st=Te,ut=v?v-Re.width:0;return st=Math.max(st,0),st=Math.min(st,ut),st},Ue=nn(function(qe,Te){Te?(zr.flushSync(function(){Z(function(st){var ut=st+(L?-qe:qe);return Ke(ut)})}),De()):ke(function(st){var ut=st+qe;return ut})}),D=aB(j,Mt,pt,He,Xe,!!v,Ue),fe=$(D,2),k=fe[0],ae=fe[1];uB(j,K,function(qe,Te,st,ut){var Nt=ut;return xe(qe,Te,st)?!1:!Nt||!Nt._virtualHandled?(Nt&&(Nt._virtualHandled=!0),k({preventDefault:function(){},deltaX:qe?Te:0,deltaY:qe?0:Te}),!0):!1}),dB(H,K,function(qe){ke(function(Te){return Te+qe})}),$t(function(){function qe(st){var ut=Mt&&st.detail<0,Nt=pt&&st.detail>0;j&&!ut&&!Nt&&st.preventDefault()}var Te=K.current;return Te.addEventListener("wheel",k,{passive:!1}),Te.addEventListener("DOMMouseScroll",ae,{passive:!0}),Te.addEventListener("MozMousePixelScroll",qe,{passive:!1}),function(){Te.removeEventListener("wheel",k),Te.removeEventListener("DOMMouseScroll",ae),Te.removeEventListener("MozMousePixelScroll",qe)}},[j,Mt,pt]),$t(function(){if(v){var qe=Ke(me);Z(qe),De({x:qe})}},[Re.width,v]);var ee=function(){var Te,st;(Te=vt.current)===null||Te===void 0||Te.delayHidden(),(st=Tt.current)===null||st===void 0||st.delayHidden()},Ce=gB(K,_,N,A,y,function(){return O(!0)},ke,ee);c.useImperativeHandle(e,function(){return{nativeElement:z.current,getScrollInfo:it,scrollTo:function(Te){function st(ut){return ut&&$e(ut)==="object"&&("left"in ut||"top"in ut)}st(Te)?(Te.left!==void 0&&Z(Ke(Te.left)),Ce(Te.top)):Ce(Te)}}}),$t(function(){if(M){var qe=_.slice(Ee,We+1);M(qe,_)}},[Ee,We,_]);var ze=sB(_,y,N,A),tt=f==null?void 0:f({start:Ee,end:We,virtual:H,offsetX:me,offsetY:ct,rtl:L,getSize:ze}),Dt=iB(_,Ee,We,v,me,B,d,Qe),gt=null;o&&(gt=U(Q({},s?"height":"maxHeight",o),mB),j&&(gt.overflowY="hidden",v&&(gt.overflowX="hidden"),ye&&(gt.pointerEvents="none")));var yt={};return L&&(yt.dir="rtl"),c.createElement("div",Fe({ref:z,style:U(U({},l),{},{position:"relative"}),className:G},yt,h),c.createElement(fi,{onResize:at},c.createElement(C,{className:"".concat(r,"-holder"),style:gt,ref:K,onScroll:Ye,onMouseEnter:ee},c.createElement(dC,{prefixCls:r,height:je,offsetX:me,offsetY:ct,scrollWidth:v,onInnerResize:O,ref:J,innerProps:I,rtl:L,extra:tt},Dt))),H&&je>o&&c.createElement(wd,{ref:vt,prefixCls:r,scrollOffset:Ae,scrollRange:je,rtl:L,onScroll:we,onStartMove:Ve,onStopMove:Be,spinSize:Jt,containerSize:Re.height,style:R==null?void 0:R.verticalScrollBar,thumbStyle:R==null?void 0:R.verticalScrollBarThumb,showScrollBar:E}),H&&v>Re.width&&c.createElement(wd,{ref:Tt,prefixCls:r,scrollOffset:me,scrollRange:v,rtl:L,onScroll:we,onStartMove:Ve,onStopMove:Be,spinSize:Wt,containerSize:Re.width,horizontal:!0,style:R==null?void 0:R.horizontalScrollBar,thumbStyle:R==null?void 0:R.horizontalScrollBarThumb,showScrollBar:E}))}var fC=c.forwardRef(VB);fC.displayName="List";function vB(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var CB=["disabled","title","children","style","className"];function Qm(t){return typeof t=="string"||typeof t=="number"}var qB=function(e,n){var r=O5(),i=r.prefixCls,o=r.id,A=r.open,a=r.multiple,s=r.mode,l=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,g=r.onPopupScroll,p=c.useContext(bg),V=p.maxCount,v=p.flattenOptions,m=p.onActiveValue,C=p.defaultActiveFirstOption,w=p.onSelect,S=p.menuItemSelectedIcon,M=p.rawValues,I=p.fieldNames,f=p.virtual,R=p.direction,q=p.listHeight,E=p.listItemHeight,h=p.optionRender,y="".concat(i,"-item"),x=HA(function(){return v},[A,v],function(ue,ne){return ne[0]&&ue[1]!==ne[1]}),b=c.useRef(null),B=c.useMemo(function(){return a&&qd(V)&&(M==null?void 0:M.size)>=V},[a,V,M==null?void 0:M.size]),O=function(ne){ne.preventDefault()},N=function(ne){var me;(me=b.current)===null||me===void 0||me.scrollTo(typeof ne=="number"?{index:ne}:ne)},F=c.useCallback(function(ue){return s==="combobox"?!1:M.has(ue)},[s,be(M).toString(),M.size]),j=function(ne){for(var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Z=x.length,de=0;de<Z;de+=1){var ce=(ne+de*me+Z)%Z,ye=x[ce]||{},Ie=ye.group,Ve=ye.data;if(!Ie&&!(Ve!=null&&Ve.disabled)&&(F(Ve.value)||!B))return ce}return-1},Y=c.useState(function(){return j(0)}),H=$(Y,2),L=H[0],G=H[1],_=function(ne){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;G(ne);var Z={source:me?"keyboard":"mouse"},de=x[ne];if(!de){m(null,-1,Z);return}m(de.value,ne,Z)};T.useEffect(function(){_(C!==!1?j(0):-1)},[x.length,l]);var K=c.useCallback(function(ue){return s==="combobox"?String(ue).toLowerCase()===l.toLowerCase():M.has(ue)},[s,l,be(M).toString(),M.size]);T.useEffect(function(){var ue=setTimeout(function(){if(!a&&A&&M.size===1){var me=Array.from(M)[0],Z=x.findIndex(function(de){var ce=de.data;return l?String(ce.value).startsWith(l):ce.value===me});Z!==-1&&(_(Z),N(Z))}});if(A){var ne;(ne=b.current)===null||ne===void 0||ne.scrollTo(void 0)}return function(){return clearTimeout(ue)}},[A,l]);var J=function(ne){ne!==void 0&&w(ne,{selected:!M.has(ne)}),a||u(!1)};if(c.useImperativeHandle(n,function(){return{onKeyDown:function(ne){var me=ne.which,Z=ne.ctrlKey;switch(me){case ot.N:case ot.P:case ot.UP:case ot.DOWN:{var de=0;if(me===ot.UP?de=-1:me===ot.DOWN?de=1:vB()&&Z&&(me===ot.N?de=1:me===ot.P&&(de=-1)),de!==0){var ce=j(L+de,de);N(ce),_(ce,!0)}break}case ot.TAB:case ot.ENTER:{var ye,Ie=x[L];Ie&&!(Ie!=null&&(ye=Ie.data)!==null&&ye!==void 0&&ye.disabled)&&!B?J(Ie.value):J(void 0),A&&ne.preventDefault();break}case ot.ESC:u(!1),A&&ne.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ne){N(ne)}}}),x.length===0)return c.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(y,"-empty"),onMouseDown:O},d);var z=Object.keys(I).map(function(ue){return I[ue]}),te=function(ne){return ne.label};function X(ue,ne){var me=ue.group;return{role:me?"presentation":"option",id:"".concat(o,"_list_").concat(ne)}}var Ae=function(ne){var me=x[ne];if(!me)return null;var Z=me.data||{},de=Z.value,ce=me.group,ye=Oi(Z,!0),Ie=te(me);return me?c.createElement("div",Fe({"aria-label":typeof Ie=="string"&&!ce?Ie:null},ye,{key:ne},X(me,ne),{"aria-selected":K(de)}),de):null},le={role:"listbox",id:"".concat(o,"_list")};return c.createElement(c.Fragment,null,f&&c.createElement("div",Fe({},le,{style:{height:0,width:0,overflow:"hidden"}}),Ae(L-1),Ae(L),Ae(L+1)),c.createElement(fC,{itemKey:"key",ref:b,data:x,height:q,itemHeight:E,fullHeight:!1,onMouseDown:O,onScroll:g,virtual:f,direction:R,innerProps:f?null:le},function(ue,ne){var me=ue.group,Z=ue.groupOption,de=ue.data,ce=ue.label,ye=ue.value,Ie=de.key;if(me){var Ve,Be=(Ve=de.title)!==null&&Ve!==void 0?Ve:Qm(ce)?ce.toString():void 0;return c.createElement("div",{className:se(y,"".concat(y,"-group"),de.className),title:Be},ce!==void 0?ce:Ie)}var Qe=de.disabled,ke=de.title;de.children;var Se=de.style,pe=de.className,Me=qt(de,CB),Le=$n(Me,z),et=F(ye),nt=Qe||!et&&B,je="".concat(y,"-option"),Ee=se(y,je,pe,Q(Q(Q(Q({},"".concat(je,"-grouped"),Z),"".concat(je,"-active"),L===ne&&!nt),"".concat(je,"-disabled"),nt),"".concat(je,"-selected"),et)),We=te(ue),ct=!S||typeof S=="function"||et,_e=typeof We=="number"?We:We||ye,Oe=Qm(_e)?_e.toString():void 0;return ke!==void 0&&(Oe=ke),c.createElement("div",Fe({},Oi(Le),f?{}:X(ue,ne),{"aria-selected":K(ye),className:Ee,title:Oe,onMouseMove:function(){L===ne||nt||_(ne)},onClick:function(){nt||J(ye)},style:Se}),c.createElement("div",{className:"".concat(je,"-content")},typeof h=="function"?h(ue,{index:ne}):_e),c.isValidElement(S)||et,ct&&c.createElement(Vl,{className:"".concat(y,"-option-state"),customizeIcon:S,customizeIconProps:{value:ye,disabled:nt,isSelected:et}},et?"✓":null))}))},hC=c.forwardRef(qB);process.env.NODE_ENV!=="production"&&(hC.displayName="OptionList");const EB=function(t,e){var n=c.useRef({values:new Map,options:new Map}),r=c.useMemo(function(){var o=n.current,A=o.values,a=o.options,s=t.map(function(d){if(d.label===void 0){var g;return U(U({},d),{},{label:(g=A.get(d.value))===null||g===void 0?void 0:g.label})}return d}),l=new Map,u=new Map;return s.forEach(function(d){l.set(d.value,d),u.set(d.value,e.get(d.value)||a.get(d.value))}),n.current.values=l,n.current.options=u,s},[t,e]),i=c.useCallback(function(o){return e.get(o)||n.current.options.get(o)},[e]);return[r,i]};function gc(t,e){return Ig(t).join("").toUpperCase().includes(e)}const yB=function(t,e,n,r,i){return c.useMemo(function(){if(!n||r===!1)return t;var o=e.options,A=e.label,a=e.value,s=[],l=typeof r=="function",u=n.toUpperCase(),d=l?r:function(p,V){return i?gc(V[i],u):V[o]?gc(V[A!=="children"?A:"label"],u):gc(V[a],u)},g=l?function(p){return Ed(p)}:function(p){return p};return t.forEach(function(p){if(p[o]){var V=d(n,g(p));if(V)s.push(p);else{var v=p[o].filter(function(m){return d(n,g(m))});v.length&&s.push(U(U({},p),{},Q({},o,v)))}return}d(n,g(p))&&s.push(p)}),s},[t,r,i,n,e])};var km=0,wB=process.env.NODE_ENV!=="test"&&Qn();function SB(){var t;return wB?(t=km,km+=1):t="TEST_OR_SSR",t}function IB(t){var e=c.useState(),n=$(e,2),r=n[0],i=n[1];return c.useEffect(function(){i("rc_select_".concat(SB()))},[]),t||r}var bB=["children","value"],MB=["children"];function RB(t){var e=t,n=e.key,r=e.props,i=r.children,o=r.value,A=qt(r,bB);return U({key:n,value:o!==void 0?o:n,children:i},A)}function xg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Nr(t).map(function(n,r){if(!c.isValidElement(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,A=i.key,a=i.props,s=a.children,l=qt(a,MB);return e||!o?RB(n):U(U({key:"__RC_SELECT_GRP__".concat(A===null?r:A,"__"),label:A},l),{},{options:xg(s)})}).filter(function(n){return n})}var xB=function(e,n,r,i,o){return c.useMemo(function(){var A=e,a=!e;a&&(A=xg(n));var s=new Map,l=new Map,u=function(p,V,v){v&&typeof v=="string"&&p.set(V[v],V)},d=function g(p){for(var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<p.length;v+=1){var m=p[v];!m[r.options]||V?(s.set(m[r.value],m),u(l,m,r.label),u(l,m,i),u(l,m,o)):g(m[r.options],!0)}};return d(A),{options:A,valueOptions:s,labelOptions:l}},[e,n,r,i,o])};function Um(t){var e=c.useRef();e.current=t;var n=c.useCallback(function(){return e.current.apply(e,arguments)},[]);return n}function TB(t){var e=t.mode,n=t.options,r=t.children,i=t.backfill,o=t.allowClear,A=t.placeholder,a=t.getInputElement,s=t.showSearch,l=t.onSearch,u=t.defaultOpen,d=t.autoFocus,g=t.labelInValue,p=t.value,V=t.inputValue,v=t.optionLabelProp,m=Rs(e),C=s!==void 0?s:m||e==="combobox",w=n||xg(r);if(Ct(e!=="tags"||w.every(function(f){return!f.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),e==="tags"||e==="combobox"){var S=w.some(function(f){return f.options?f.options.some(function(R){return typeof("value"in R?R.value:R.key)=="number"}):typeof("value"in f?f.value:f.key)=="number"});Ct(!S,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Ct(e!=="combobox"||!v,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Ct(e==="combobox"||!i,"`backfill` only works with `combobox` mode."),Ct(e==="combobox"||!a,"`getInputElement` only work with `combobox` mode."),vc(e!=="combobox"||!a||!o||!A,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),l&&!C&&e!=="combobox"&&e!=="tags"&&Ct(!1,"`onSearch` should work with `showSearch` instead of use alone."),vc(!u||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),p!=null){var M=Ig(p);Ct(!g||M.every(function(f){return $e(f)==="object"&&("key"in f||"value"in f)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Ct(!m||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var I=null;Nr(r).some(function(f){if(!c.isValidElement(f)||!f.type)return!1;var R=f,q=R.type;if(q.isSelectOption)return!1;if(q.isSelectOptGroup){var E=Nr(f.props.children).every(function(h){return!c.isValidElement(h)||!f.type||h.type.isSelectOption?!0:(I=h.type,!1)});return!E}return I=q,!0}),I&&Ct(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(I.displayName||I.name||I,"`.")),Ct(V===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function BB(t,e){if(t){var n=function r(i){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=0;A<i.length;A++){var a=i[A];if(a[e==null?void 0:e.value]===null)return Ct(!1,"`value` in Select options should not be `null`."),!0;if(!o&&Array.isArray(a[e==null?void 0:e.options])&&r(a[e==null?void 0:e.options],!0))break}};n(t)}}var OB=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],DB=["inputValue"];function NB(t){return!t||$e(t)!=="object"}var pC=c.forwardRef(function(t,e){var n=t.id,r=t.mode,i=t.prefixCls,o=i===void 0?"rc-select":i,A=t.backfill,a=t.fieldNames,s=t.inputValue,l=t.searchValue,u=t.onSearch,d=t.autoClearSearchValue,g=d===void 0?!0:d,p=t.onSelect,V=t.onDeselect,v=t.dropdownMatchSelectWidth,m=v===void 0?!0:v,C=t.filterOption,w=t.filterSort,S=t.optionFilterProp,M=t.optionLabelProp,I=t.options,f=t.optionRender,R=t.children,q=t.defaultActiveFirstOption,E=t.menuItemSelectedIcon,h=t.virtual,y=t.direction,x=t.listHeight,b=x===void 0?200:x,B=t.listItemHeight,O=B===void 0?20:B,N=t.labelRender,F=t.value,j=t.defaultValue,Y=t.labelInValue,H=t.onChange,L=t.maxCount,G=qt(t,OB),_=IB(n),K=Rs(r),J=!!(!I&&R),z=c.useMemo(function(){return C===void 0&&r==="combobox"?!1:C},[C,r]),te=c.useMemo(function(){return cC(a,J)},[JSON.stringify(a),J]),X=Tn("",{value:l!==void 0?l:s,postState:function(we){return we||""}}),Ae=$(X,2),le=Ae[0],ue=Ae[1],ne=xB(I,R,te,S,M),me=ne.valueOptions,Z=ne.labelOptions,de=ne.options,ce=c.useCallback(function(De){var we=Ig(De);return we.map(function(Ye){var Ke,Ue,D,fe,k;if(NB(Ye))Ke=Ye;else{var ae;D=Ye.key,Ue=Ye.label,Ke=(ae=Ye.value)!==null&&ae!==void 0?ae:D}var ee=me.get(Ke);if(ee){var Ce;if(Ue===void 0&&(Ue=ee==null?void 0:ee[M||te.label]),D===void 0&&(D=(Ce=ee==null?void 0:ee.key)!==null&&Ce!==void 0?Ce:Ke),fe=ee==null?void 0:ee.disabled,k=ee==null?void 0:ee.title,process.env.NODE_ENV!=="production"&&!M){var ze=ee==null?void 0:ee[te.label];ze!==void 0&&!c.isValidElement(ze)&&!c.isValidElement(Ue)&&ze!==Ue&&Ct(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:Ue,value:Ke,key:D,disabled:fe,title:k}})},[te,M,me]),ye=Tn(j,{value:F}),Ie=$(ye,2),Ve=Ie[0],Be=Ie[1],Qe=c.useMemo(function(){var De,we=K&&Ve===null?[]:Ve,Ye=ce(we);return r==="combobox"&&L5((De=Ye[0])===null||De===void 0?void 0:De.value)?[]:Ye},[Ve,ce,r,K]),ke=EB(Qe,me),Se=$(ke,2),pe=Se[0],Me=Se[1],Le=c.useMemo(function(){if(!r&&pe.length===1){var De=pe[0];if(De.value===null&&(De.label===null||De.label===void 0))return[]}return pe.map(function(we){var Ye;return U(U({},we),{},{label:(Ye=typeof N=="function"?N(we):we.label)!==null&&Ye!==void 0?Ye:we.value})})},[r,pe,N]),et=c.useMemo(function(){return new Set(pe.map(function(De){return De.value}))},[pe]);c.useEffect(function(){if(r==="combobox"){var De,we=(De=pe[0])===null||De===void 0?void 0:De.value;ue(P5(we)?String(we):"")}},[pe]);var nt=Um(function(De,we){var Ye=we??De;return Q(Q({},te.value,De),te.label,Ye)}),je=c.useMemo(function(){if(r!=="tags")return de;var De=be(de),we=function(Ke){return me.has(Ke)};return be(pe).sort(function(Ye,Ke){return Ye.value<Ke.value?-1:1}).forEach(function(Ye){var Ke=Ye.value;we(Ke)||De.push(nt(Ke,Ye.label))}),De},[nt,de,me,pe,r]),Ee=yB(je,te,le,z,S),We=c.useMemo(function(){return r!=="tags"||!le||Ee.some(function(De){return De[S||"value"]===le})||Ee.some(function(De){return De[te.value]===le})?Ee:[nt(le)].concat(be(Ee))},[nt,S,r,Ee,le,te]),ct=function De(we){var Ye=be(we).sort(function(Ke,Ue){return w(Ke,Ue,{searchValue:le})});return Ye.map(function(Ke){return Array.isArray(Ke.options)?U(U({},Ke),{},{options:Ke.options.length>0?De(Ke.options):Ke.options}):Ke})},_e=c.useMemo(function(){return w?ct(We):We},[We,w,le]),Oe=c.useMemo(function(){return _5(_e,{fieldNames:te,childrenAsData:J})},[_e,te,J]),Re=function(we){var Ye=ce(we);if(Be(Ye),H&&(Ye.length!==pe.length||Ye.some(function(D,fe){var k;return((k=pe[fe])===null||k===void 0?void 0:k.value)!==(D==null?void 0:D.value)}))){var Ke=Y?Ye:Ye.map(function(D){return D.value}),Ue=Ye.map(function(D){return Ed(Me(D.value))});H(K?Ke:Ke[0],K?Ue:Ue[0])}},At=c.useState(null),at=$(At,2),vt=at[0],Tt=at[1],Wt=c.useState(0),Jt=$(Wt,2),en=Jt[0],Xt=Jt[1],Yt=q!==void 0?q:r!=="combobox",Mt=c.useCallback(function(De,we){var Ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ke=Ye.source,Ue=Ke===void 0?"keyboard":Ke;Xt(we),A&&r==="combobox"&&De!==null&&Ue==="keyboard"&&Tt(String(De))},[A,r]),pt=function(we,Ye,Ke){var Ue=function(){var gt,yt=Me(we);return[Y?{label:yt==null?void 0:yt[te.label],value:we,key:(gt=yt==null?void 0:yt.key)!==null&>!==void 0?gt:we}:we,Ed(yt)]};if(Ye&&p){var D=Ue(),fe=$(D,2),k=fe[0],ae=fe[1];p(k,ae)}else if(!Ye&&V&&Ke!=="clear"){var ee=Ue(),Ce=$(ee,2),ze=Ce[0],tt=Ce[1];V(ze,tt)}},He=Um(function(De,we){var Ye,Ke=K?we.selected:!0;Ke?Ye=K?[].concat(be(pe),[De]):[De]:Ye=pe.filter(function(Ue){return Ue.value!==De}),Re(Ye),pt(De,Ke),r==="combobox"?Tt(""):(!Rs||g)&&(ue(""),Tt(""))}),Xe=function(we,Ye){Re(we);var Ke=Ye.type,Ue=Ye.values;(Ke==="remove"||Ke==="clear")&&Ue.forEach(function(D){pt(D.value,!1,Ke)})},xe=function(we,Ye){if(ue(we),Tt(null),Ye.source==="submit"){var Ke=(we||"").trim();if(Ke){var Ue=Array.from(new Set([].concat(be(et),[Ke])));Re(Ue),pt(Ke,!0),ue("")}return}Ye.source!=="blur"&&(r==="combobox"&&Re(we),u==null||u(we))},it=function(we){var Ye=we;r!=="tags"&&(Ye=we.map(function(Ue){var D=Z.get(Ue);return D==null?void 0:D.value}).filter(function(Ue){return Ue!==void 0}));var Ke=Array.from(new Set([].concat(be(et),be(Ye))));Re(Ke),Ke.forEach(function(Ue){pt(Ue,!0)})},mt=c.useMemo(function(){var De=h!==!1&&m!==!1;return U(U({},ne),{},{flattenOptions:Oe,onActiveValue:Mt,defaultActiveFirstOption:Yt,onSelect:He,menuItemSelectedIcon:E,rawValues:et,fieldNames:te,virtual:De,direction:y,listHeight:b,listItemHeight:O,childrenAsData:J,maxCount:L,optionRender:f})},[L,ne,Oe,Mt,Yt,He,E,et,te,h,m,y,b,O,J,f]);return process.env.NODE_ENV!=="production"&&(TB(t),BB(de,te)),c.createElement(bg.Provider,{value:mt},c.createElement(uC,Fe({},G,{id:_,prefixCls:o,ref:e,omitDomProps:DB,mode:r,displayValues:Le,onDisplayValuesChange:Xe,direction:y,searchValue:le,onSearch:xe,autoClearSearchValue:g,onSearchSplit:it,dropdownMatchSelectWidth:m,OptionList:hC,emptyOptions:!Oe.length,activeValue:vt,activeDescendantId:"".concat(_,"_list_").concat(en)})))});process.env.NODE_ENV!=="production"&&(pC.displayName="Select");var Tg=pC;Tg.Option=Rg;Tg.OptGroup=Mg;const mC=()=>{const[,t]=lr(),[e]=Qs("Empty"),r=new Pt(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return c.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},c.createElement("title",null,(e==null?void 0:e.description)||"Empty"),c.createElement("g",{fill:"none",fillRule:"evenodd"},c.createElement("g",{transform:"translate(24 31.67)"},c.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),c.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),c.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),c.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),c.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),c.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),c.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},c.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),c.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};process.env.NODE_ENV!=="production"&&(mC.displayName="EmptyImage");const VC=()=>{const[,t]=lr(),[e]=Qs("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=t,{borderColor:A,shadowColor:a,contentColor:s}=T.useMemo(()=>({borderColor:new Pt(n).onBackground(o).toHexString(),shadowColor:new Pt(r).onBackground(o).toHexString(),contentColor:new Pt(i).onBackground(o).toHexString()}),[n,r,i,o]);return c.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},c.createElement("title",null,(e==null?void 0:e.description)||"Empty"),c.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},c.createElement("ellipse",{fill:a,cx:"32",cy:"33",rx:"32",ry:"7"}),c.createElement("g",{fillRule:"nonzero",stroke:A},c.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),c.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:s}))))};process.env.NODE_ENV!=="production"&&(VC.displayName="SimpleImage");var FB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const vC=c.createElement(mC,null),CC=c.createElement(VC,null),Ai=t=>{const{className:e,rootClassName:n,prefixCls:r,image:i=vC,description:o,children:A,imageStyle:a,style:s,classNames:l,styles:u}=t,d=FB(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:g,direction:p,className:V,style:v,classNames:m,styles:C}=Jr("empty"),w=g("empty",r),[S,M,I]=b2(w),[f]=Qs("Empty"),R=typeof o<"u"?o:f==null?void 0:f.description,q=typeof R=="string"?R:"empty";let E=null;if(typeof i=="string"?E=c.createElement("img",{alt:q,src:i}):E=i,process.env.NODE_ENV!=="production"){const h=an("Empty");[["imageStyle","styles: { image: {} }"]].forEach(y=>{let[x,b]=y;h.deprecated(!(x in t),x,b)})}return S(c.createElement("div",Object.assign({className:se(M,I,w,V,{[`${w}-normal`]:i===CC,[`${w}-rtl`]:p==="rtl"},e,n,m.root,l==null?void 0:l.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},C.root),v),u==null?void 0:u.root),s)},d),c.createElement("div",{className:se(`${w}-image`,m.image,l==null?void 0:l.image),style:Object.assign(Object.assign(Object.assign({},a),C.image),u==null?void 0:u.image)},E),R&&c.createElement("div",{className:se(`${w}-description`,m.description,l==null?void 0:l.description),style:Object.assign(Object.assign({},C.description),u==null?void 0:u.description)},R),A&&c.createElement("div",{className:se(`${w}-footer`,m.footer,l==null?void 0:l.footer),style:Object.assign(Object.assign({},C.footer),u==null?void 0:u.footer)},A)))};Ai.PRESENTED_IMAGE_DEFAULT=vC;Ai.PRESENTED_IMAGE_SIMPLE=CC;process.env.NODE_ENV!=="production"&&(Ai.displayName="Empty");const QB=t=>{const{componentName:e}=t,{getPrefixCls:n}=T.useContext(Qt),r=n("empty");switch(e){case"Table":case"List":return T.createElement(Ai,{image:Ai.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return T.createElement(Ai,{image:Ai.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return T.createElement(Ai,null)}},kB=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function UB(t,e){return t||kB(e)}var GB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},jB=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:GB}))},qC=c.forwardRef(jB);process.env.NODE_ENV!=="production"&&(qC.displayName="CheckOutlined");var PB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},LB=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:PB}))},EC=c.forwardRef(LB);process.env.NODE_ENV!=="production"&&(EC.displayName="DownOutlined");function YB(t){let{suffixIcon:e,clearIcon:n,menuItemSelectedIcon:r,removeIcon:i,loading:o,multiple:A,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:u,showArrow:d,componentName:g}=t;process.env.NODE_ENV!=="production"&&an(g).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const p=n??c.createElement(ta,null),V=w=>e===null&&!a&&!d?null:c.createElement(c.Fragment,null,l!==!1&&w,a&&u);let v=null;if(e!==void 0)v=V(e);else if(o)v=V(c.createElement(nl,{spin:!0}));else{const w=`${s}-suffix`;v=S=>{let{open:M,showSearch:I}=S;return V(M&&I?c.createElement(lg,{className:w}):c.createElement(EC,{className:w}))}}let m=null;r!==void 0?m=r:A?m=c.createElement(qC,null):m=null;let C=null;return i!==void 0?C=i:C=c.createElement(pl,null),{clearIcon:p,suffixIcon:v,itemIcon:m,removeIcon:C}}function HB(t,e){return e!==void 0?e:t!==null}var KB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const yC="SECRET_COMBOBOX_MODE_DO_NOT_USE",wC=(t,e)=>{var n;const{prefixCls:r,bordered:i,className:o,rootClassName:A,getPopupContainer:a,popupClassName:s,dropdownClassName:l,listHeight:u=256,placement:d,listItemHeight:g,size:p,disabled:V,notFoundContent:v,status:m,builtinPlacements:C,dropdownMatchSelectWidth:w,popupMatchSelectWidth:S,direction:M,style:I,allowClear:f,variant:R,dropdownStyle:q,transitionName:E,tagRender:h,maxCount:y,prefix:x}=t,b=KB(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:B,getPrefixCls:O,renderEmpty:N,direction:F,virtual:j,popupMatchSelectWidth:Y,popupOverflow:H}=c.useContext(Qt),L=Jr("select"),[,G]=lr(),_=g??(G==null?void 0:G.controlHeight),K=O("select",r),J=O(),z=M??F,{compactSize:te,compactItemClassnames:X}=zo(K,z),[Ae,le]=sg("select",R,i),ue=Ur(K),[ne,me,Z]=V2(K,ue),de=c.useMemo(()=>{const{mode:vt}=t;if(vt!=="combobox")return vt===yC?"combobox":vt},[t.mode]),ce=de==="multiple"||de==="tags",ye=HB(t.suffixIcon,t.showArrow),Ie=(n=S??w)!==null&&n!==void 0?n:Y,{status:Ve,hasFeedback:Be,isFormItemInput:Qe,feedbackIcon:ke}=c.useContext(Fr),Se=tl(Ve,m);let pe;v!==void 0?pe=v:de==="combobox"?pe=null:pe=(N==null?void 0:N("Select"))||c.createElement(QB,{componentName:"Select"});const{suffixIcon:Me,itemIcon:Le,removeIcon:et,clearIcon:nt}=YB(Object.assign(Object.assign({},b),{multiple:ce,hasFeedback:Be,feedbackIcon:ke,showSuffixIcon:ye,prefixCls:K,componentName:"Select"})),je=f===!0?{clearIcon:nt}:f,Ee=$n(b,["suffixIcon","itemIcon"]),We=se(s||l,{[`${K}-dropdown-${z}`]:z==="rtl"},A,Z,ue,me),ct=ki(vt=>{var Tt;return(Tt=p??te)!==null&&Tt!==void 0?Tt:vt}),_e=c.useContext(li),Oe=V??_e,Re=se({[`${K}-lg`]:ct==="large",[`${K}-sm`]:ct==="small",[`${K}-rtl`]:z==="rtl",[`${K}-${Ae}`]:le,[`${K}-in-form-item`]:Qe},Cs(K,Se,Be),X,L.className,o,A,Z,ue,me),At=c.useMemo(()=>d!==void 0?d:z==="rtl"?"bottomRight":"bottomLeft",[d,z]);if(process.env.NODE_ENV!=="production"){const vt=an("Select");vt.deprecated(!l,"dropdownClassName","popupClassName"),vt.deprecated(w===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),process.env.NODE_ENV!=="production"&&vt(!("showArrow"in t),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),vt.deprecated(!("bordered"in t),"bordered","variant"),process.env.NODE_ENV!=="production"&&vt(!(typeof y<"u"&&!ce),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[at]=WA("SelectLike",q==null?void 0:q.zIndex);return ne(c.createElement(Tg,Object.assign({ref:e,virtual:j,showSearch:L.showSearch},Ee,{style:Object.assign(Object.assign({},L.style),I),dropdownMatchSelectWidth:Ie,transitionName:rl(J,"slide-up",E),builtinPlacements:UB(C,H),listHeight:u,listItemHeight:_,mode:de,prefixCls:K,placement:At,direction:z,prefix:x,suffixIcon:Me,menuItemSelectedIcon:Le,removeIcon:et,allowClear:je,notFoundContent:pe,className:Re,getPopupContainer:a||B,dropdownClassName:We,disabled:Oe,dropdownStyle:Object.assign(Object.assign({},q),{zIndex:at}),maxCount:ce?y:void 0,tagRender:ce?h:void 0})))};process.env.NODE_ENV!=="production"&&(wC.displayName="Select");const so=c.forwardRef(wC),ZB=I1(so,"dropdownAlign");so.SECRET_COMBOBOX_MODE_DO_NOT_USE=yC;so.Option=Rg;so.OptGroup=Mg;so._InternalPanelDoNotUseOrYouWillBeFired=ZB;process.env.NODE_ENV!=="production"&&(so.displayName="Select");function zB(t,e,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,A=r.noLeading,a=A===void 0?!1:A,s=r.debounceMode,l=s===void 0?void 0:s,u,d=!1,g=0;function p(){u&&clearTimeout(u)}function V(m){var C=m||{},w=C.upcomingOnly,S=w===void 0?!1:w;p(),d=!S}function v(){for(var m=arguments.length,C=new Array(m),w=0;w<m;w++)C[w]=arguments[w];var S=this,M=Date.now()-g;if(d)return;function I(){g=Date.now(),e.apply(S,C)}function f(){u=void 0}!a&&l&&!u&&I(),p(),l===void 0&&M>t?a?(g=Date.now(),o||(u=setTimeout(l?f:I,t))):I():o!==!0&&(u=setTimeout(l?f:I,l===void 0?t-M:t))}return v.cancel=V,v}function JB(t,e,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return zB(t,e,{debounceMode:o!==!1})}const xs=100,SC=xs/5,IC=xs/2-SC/2,fc=IC*2*Math.PI,Gm=50,jm=t=>{const{dotClassName:e,style:n,hasCircleCls:r}=t;return c.createElement("circle",{className:se(`${e}-circle`,{[`${e}-circle-bg`]:r}),r:IC,cx:Gm,cy:Gm,strokeWidth:SC,style:n})},WB=t=>{let{percent:e,prefixCls:n}=t;const r=`${n}-dot`,i=`${r}-holder`,o=`${i}-hidden`,[A,a]=c.useState(!1);$t(()=>{e!==0&&a(!0)},[e!==0]);const s=Math.max(Math.min(e,100),0);if(!A)return null;const l={strokeDashoffset:`${fc/4}`,strokeDasharray:`${fc*s/100} ${fc*(100-s)/100}`};return c.createElement("span",{className:se(i,`${r}-progress`,s<=0&&o)},c.createElement("svg",{viewBox:`0 0 ${xs} ${xs}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},c.createElement(jm,{dotClassName:r,hasCircleCls:!0}),c.createElement(jm,{dotClassName:r,style:l})))};function XB(t){const{prefixCls:e,percent:n=0}=t,r=`${e}-dot`,i=`${r}-holder`,o=`${i}-hidden`;return c.createElement(c.Fragment,null,c.createElement("span",{className:se(i,n>0&&o)},c.createElement("span",{className:se(r,`${e}-dot-spin`)},[1,2,3,4].map(A=>c.createElement("i",{className:`${e}-dot-item`,key:A})))),c.createElement(WB,{prefixCls:e,percent:n}))}function _B(t){const{prefixCls:e,indicator:n,percent:r}=t,i=`${e}-dot`;return n&&c.isValidElement(n)?Dr(n,{className:se(n.props.className,i),percent:r}):c.createElement(XB,{prefixCls:e,percent:r})}const $B=200,Pm=[[30,.05],[70,.03],[96,.01]];function eO(t,e){const[n,r]=c.useState(0),i=c.useRef(null),o=e==="auto";return c.useEffect(()=>(o&&t&&(r(0),i.current=setInterval(()=>{r(A=>{const a=100-A;for(let s=0;s<Pm.length;s+=1){const[l,u]=Pm[s];if(A<=l)return A+a*u}return A})},$B)),()=>{clearInterval(i.current)}),[o,t]),o?n:e}var tO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bC;function nO(t,e){return!!t&&!!e&&!Number.isNaN(Number(e))}const vl=t=>{var e;const{prefixCls:n,spinning:r=!0,delay:i=0,className:o,rootClassName:A,size:a="default",tip:s,wrapperClassName:l,style:u,children:d,fullscreen:g=!1,indicator:p,percent:V}=t,v=tO(t,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:m,direction:C,className:w,style:S,indicator:M}=Jr("spin"),I=m("spin",n),[f,R,q]=y2(I),[E,h]=c.useState(()=>r&&!nO(r,i)),y=eO(E,V);c.useEffect(()=>{if(r){const j=JB(i,()=>{h(!0)});return j(),()=>{var Y;(Y=j==null?void 0:j.cancel)===null||Y===void 0||Y.call(j)}}h(!1)},[i,r]);const x=c.useMemo(()=>typeof d<"u"&&!g,[d,g]);if(process.env.NODE_ENV!=="production"){const j=an("Spin");process.env.NODE_ENV!=="production"&&j(!s||x||g,"usage","`tip` only work in nest or fullscreen pattern.")}const b=se(I,w,{[`${I}-sm`]:a==="small",[`${I}-lg`]:a==="large",[`${I}-spinning`]:E,[`${I}-show-text`]:!!s,[`${I}-rtl`]:C==="rtl"},o,!g&&A,R,q),B=se(`${I}-container`,{[`${I}-blur`]:E}),O=(e=p??M)!==null&&e!==void 0?e:bC,N=Object.assign(Object.assign({},S),u),F=c.createElement("div",Object.assign({},v,{style:N,className:b,"aria-live":"polite","aria-busy":E}),c.createElement(_B,{prefixCls:I,indicator:O,percent:y}),s&&(x||g)?c.createElement("div",{className:`${I}-text`},s):null);return f(x?c.createElement("div",Object.assign({},v,{className:se(`${I}-nested-loading`,l,R,q)}),E&&c.createElement("div",{key:"loading"},F),c.createElement("div",{className:B,key:"container"},d)):g?c.createElement("div",{className:se(`${I}-fullscreen`,{[`${I}-fullscreen-show`]:E},A,R,q)},F):F)};vl.setDefaultIndicator=t=>{bC=t};process.env.NODE_ENV!=="production"&&(vl.displayName="Spin");const rO=["1","2","3","4","5","6","7","8","9","*","0","#"],MC=({onCallBack:t})=>ie.jsx(iO,{children:rO.map(e=>ie.jsx("div",{className:"ysyt-key-item",onClick:()=>t(e),children:e},e))}),iO=rn.div`
|
|
626
|
+
`].includes(wt)})},[O]),Ye=c.useContext(bg)||{},Ke=Ye.maxCount,Ue=Ye.rawValues,D=function(Pe,ft,Et){if(!(Ve&&qd(Ke)&&(Ue==null?void 0:Ue.size)>=Ke)){var xt=!0,Ot=Pe;E==null||E(null);var Cn=$5(Pe,O,qd(Ke)?Ke-Ue.size:void 0),qn=Et?null:Cn;return m!=="combobox"&&qn&&(Ot="",B==null||B(qn),De(!1),xt=!1),b&&at!==Ot&&b(Ot,{source:ft?"typing":"effect"}),xt}},fe=function(Pe){!Pe||!Pe.trim()||b(Pe,{source:"submit"})};c.useEffect(function(){!xe&&!Ve&&m!=="combobox"&&D("",!1,!1)},[xe]),c.useEffect(function(){He&&C&&Xe(!1),C&&!We.current&&Re(!1)},[C]);var k=AC(),ae=$(k,2),ee=ae[0],Ce=ae[1],ze=c.useRef(!1),tt=function(Pe){var ft=ee(),Et=Pe.key,xt=Et==="Enter";if(xt&&(m!=="combobox"&&Pe.preventDefault(),xe||De(!0)),Ce(!!at),Et==="Backspace"&&!ft&&Ve&&!at&&u.length){for(var Ot=be(u),Cn=null,qn=Ot.length-1;qn>=0;qn-=1){var Zn=Ot[qn];if(!Zn.disabled){Ot.splice(qn,1),Cn=Zn;break}}Cn&&d(Ot,{type:"remove",values:[Cn]})}for(var tr=arguments.length,zn=new Array(tr>1?tr-1:0),Jn=1;Jn<tr;Jn++)zn[Jn-1]=arguments[Jn];if(xe&&(!xt||!ze.current)){var pn;xt&&(ze.current=!0),(pn=Ee.current)===null||pn===void 0||pn.onKeyDown.apply(pn,[Pe].concat(zn))}ce==null||ce.apply(void 0,[Pe].concat(zn))},Dt=function(Pe){for(var ft=arguments.length,Et=new Array(ft>1?ft-1:0),xt=1;xt<ft;xt++)Et[xt-1]=arguments[xt];if(xe){var Ot;(Ot=Ee.current)===null||Ot===void 0||Ot.onKeyUp.apply(Ot,[Pe].concat(Et))}Pe.key==="Enter"&&(ze.current=!1),de==null||de.apply(void 0,[Pe].concat(Et))},gt=function(Pe){var ft=u.filter(function(Et){return Et!==Pe});d(ft,{type:"remove",values:[Pe]})},yt=function(){ze.current=!1},qe=c.useRef(!1),Te=function(){Re(!0),C||(me&&!qe.current&&me.apply(void 0,arguments),ne.includes("focus")&&De(!0)),qe.current=!0},st=function(){We.current=!0,Re(!1,function(){qe.current=!1,We.current=!1,De(!1)}),!C&&(at&&(m==="tags"?b(at,{source:"submit"}):m==="multiple"&&b("",{source:"blur"})),Z&&Z.apply(void 0,arguments))},ut=[];c.useEffect(function(){return function(){ut.forEach(function(wt){return clearTimeout(wt)}),ut.splice(0,ut.length)}},[]);var Nt=function(Pe){var ft,Et=Pe.target,xt=(ft=nt.current)===null||ft===void 0?void 0:ft.getPopupElement();if(xt&&xt.contains(Et)){var Ot=setTimeout(function(){var tr=ut.indexOf(Ot);if(tr!==-1&&ut.splice(tr,1),At(),!pe&&!xt.contains(document.activeElement)){var zn;(zn=je.current)===null||zn===void 0||zn.focus()}});ut.push(Ot)}for(var Cn=arguments.length,qn=new Array(Cn>1?Cn-1:0),Zn=1;Zn<Cn;Zn++)qn[Zn-1]=arguments[Zn];ye==null||ye.apply(void 0,[Pe].concat(qn))},On=c.useState({}),sn=$(On,2),Kn=sn[1];function Gr(){Kn({})}var Un;Tt&&(Un=function(Pe){De(Pe)}),N5(function(){var wt;return[Le.current,(wt=nt.current)===null||wt===void 0?void 0:wt.getPopupElement()]},mt,De,!!Tt);var Gn=c.useMemo(function(){return U(U({},t),{},{notFoundContent:V,open:xe,triggerOpen:mt,id:r,showSearch:Be,multiple:Ve,toggleOpen:De})},[t,V,mt,xe,r,Be,Ve,De]),Sr=!!j||w,jn;Sr&&(jn=c.createElement(Vl,{className:se("".concat(i,"-arrow"),Q({},"".concat(i,"-arrow-loading"),w)),customizeIcon:j,customizeIconProps:{loading:w,searchValue:at,open:xe,focused:Oe,showSearch:Be}}));var _r=function(){var Pe;v==null||v(),(Pe=je.current)===null||Pe===void 0||Pe.focus(),d([],{type:"clear",values:u}),D("",!1,!1)},Ir=B5(i,_r,u,N,Y,C,at,m),Pn=Ir.allowClear,er=Ir.clearIcon,ur=c.createElement(H,{ref:Ee}),dr=se(i,o,Q(Q(Q(Q(Q(Q(Q(Q(Q(Q({},"".concat(i,"-focused"),Oe),"".concat(i,"-multiple"),Ve),"".concat(i,"-single"),!Ve),"".concat(i,"-allow-clear"),N),"".concat(i,"-show-arrow"),Sr),"".concat(i,"-disabled"),C),"".concat(i,"-loading"),w),"".concat(i,"-open"),xe),"".concat(i,"-customize-input"),vt),"".concat(i,"-show-search"),Be)),jr=c.createElement(lC,{ref:nt,disabled:C,prefixCls:i,visible:mt,popupElement:ur,animation:L,transitionName:G,dropdownStyle:_,dropdownClassName:K,direction:s,dropdownMatchSelectWidth:W,dropdownRender:z,dropdownAlign:te,placement:X,builtinPlacements:Ae,getPopupContainer:le,empty:g,getTriggerDOMNode:function(Pe){return et.current||Pe},onPopupVisibleChange:Un,onPopupMouseEnter:Gr},Tt?c.cloneElement(Tt,{ref:Wt}):c.createElement(sC,Fe({},t,{domRef:et,prefixCls:i,inputElement:vt,ref:je,id:r,prefix:F,showSearch:Be,autoClearSearchValue:x,mode:m,activeDescendantId:h,tagRender:a,values:u,open:xe,onToggleOpen:De,activeValue:q,searchValue:at,onSearch:D,onSearchSubmit:fe,onRemove:gt,tokenWithEnter:we,onInputBlur:yt}))),$r;return Tt?$r=jr:$r=c.createElement("div",Fe({className:dr},Qe,{ref:Le,onMouseDown:Nt,onKeyDown:tt,onKeyUp:Dt,onFocus:Te,onBlur:st}),c.createElement(eB,{visible:Oe&&!xe,values:u}),jr,jn,Pn&&er),c.createElement(oC.Provider,{value:Gn},$r)});process.env.NODE_ENV!=="production"&&(uC.displayName="BaseSelect");var Mg=function(){return null};Mg.isSelectOptGroup=!0;var Rg=function(){return null};Rg.isSelectOption=!0;var dC=c.forwardRef(function(t,e){var n=t.height,r=t.offsetY,i=t.offsetX,o=t.children,A=t.prefixCls,a=t.onInnerResize,s=t.innerProps,l=t.rtl,u=t.extra,d={},g={display:"flex",flexDirection:"column"};return r!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},g=U(U({},g),{},Q(Q(Q(Q(Q({transform:"translateY(".concat(r,"px)")},l?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),c.createElement("div",{style:d},c.createElement(fi,{onResize:function(V){var v=V.offsetHeight;v&&a&&a()}},c.createElement("div",Fe({style:g,className:se(Q({},"".concat(A,"-holder-inner"),A)),ref:e},s),o,u)))});dC.displayName="Filler";function rB(t){var e=t.children,n=t.setRef,r=c.useCallback(function(i){n(i)},[]);return c.cloneElement(e,{ref:r})}function iB(t,e,n,r,i,o,A,a){var s=a.getKey;return t.slice(e,n+1).map(function(l,u){var d=e+u,g=A(l,d,{style:{width:r},offsetX:i}),p=s(l);return c.createElement(rB,{key:p,setRef:function(v){return o(l,v)}},g)})}function oB(t,e,n){var r=t.length,i=e.length,o,A;if(r===0&&i===0)return null;r<i?(o=t,A=e):(o=e,A=t);var a={__EMPTY_ITEM__:!0};function s(V){return V!==void 0?n(V):a}for(var l=null,u=Math.abs(r-i)!==1,d=0;d<A.length;d+=1){var g=s(o[d]),p=s(A[d]);if(g!==p){l=d,u=u||g!==s(A[d+1]);break}}return l===null?null:{index:l,multiple:u}}function AB(t,e,n){var r=c.useState(t),i=$(r,2),o=i[0],A=i[1],a=c.useState(null),s=$(a,2),l=s[0],u=s[1];return c.useEffect(function(){var d=oB(o||[],t||[],e);(d==null?void 0:d.index)!==void 0&&u(t[d.index]),A(t)},[t]),[l]}var Tm=(typeof navigator>"u"?"undefined":$e(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const gC=function(t,e,n,r){var i=T.useRef(!1),o=T.useRef(null);function A(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var a=T.useRef({top:t,bottom:e,left:n,right:r});return a.current.top=t,a.current.bottom=e,a.current.left=n,a.current.right=r,function(s,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=s?l<0&&a.current.left||l>0&&a.current.right:l<0&&a.current.top||l>0&&a.current.bottom;return u&&d?(clearTimeout(o.current),i.current=!1):(!d||i.current)&&A(),!i.current&&d}};function aB(t,e,n,r,i,o,A){var a=T.useRef(0),s=T.useRef(null),l=T.useRef(null),u=T.useRef(!1),d=gC(e,n,r,i);function g(w,S){if(Lt.cancel(s.current),!d(!1,S)){var M=w;if(!M._virtualHandled)M._virtualHandled=!0;else return;a.current+=S,l.current=S,Tm||M.preventDefault(),s.current=Lt(function(){var I=u.current?10:1;A(a.current*I,!1),a.current=0})}}function p(w,S){A(S,!0),Tm||w.preventDefault()}var V=T.useRef(null),v=T.useRef(null);function m(w){if(t){Lt.cancel(v.current),v.current=Lt(function(){V.current=null},2);var S=w.deltaX,M=w.deltaY,I=w.shiftKey,f=S,R=M;(V.current==="sx"||!V.current&&I&&M&&!S)&&(f=M,R=0,V.current="sx");var q=Math.abs(f),E=Math.abs(R);V.current===null&&(V.current=o&&q>E?"x":"y"),V.current==="y"?g(w,R):p(w,f)}}function C(w){t&&(u.current=w.detail===l.current)}return[m,C]}function sB(t,e,n,r){var i=c.useMemo(function(){return[new Map,[]]},[t,n.id,r]),o=$(i,2),A=o[0],a=o[1],s=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,g=A.get(u),p=A.get(d);if(g===void 0||p===void 0)for(var V=t.length,v=a.length;v<V;v+=1){var m,C=t[v],w=e(C);A.set(w,v);var S=(m=n.get(w))!==null&&m!==void 0?m:r;if(a[v]=(a[v-1]||0)+S,w===u&&(g=v),w===d&&(p=v),g!==void 0&&p!==void 0)break}return{top:a[g-1]||0,bottom:a[p]}};return s}var lB=function(){function t(){fn(this,t),Q(this,"maps",void 0),Q(this,"id",0),Q(this,"diffRecords",new Map),this.maps=Object.create(null)}return hn(t,[{key:"set",value:function(n,r){this.diffRecords.set(n,this.maps[n]),this.maps[n]=r,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),t}();function Bm(t){var e=parseFloat(t);return isNaN(e)?0:e}function cB(t,e,n){var r=c.useState(0),i=$(r,2),o=i[0],A=i[1],a=T.useRef(new Map),s=T.useRef(new lB),l=T.useRef(0);function u(){l.current+=1}function d(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;u();var V=function(){var C=!1;a.current.forEach(function(w,S){if(w&&w.offsetParent){var M=w.offsetHeight,I=getComputedStyle(w),f=I.marginTop,R=I.marginBottom,q=Bm(f),E=Bm(R),h=M+q+E;s.current.get(S)!==h&&(s.current.set(S,h),C=!0)}}),C&&A(function(w){return w+1})};if(p)V();else{l.current+=1;var v=l.current;Promise.resolve().then(function(){v===l.current&&V()})}}function g(p,V){var v=t(p);a.current.get(v),V?(a.current.set(v,V),d()):a.current.delete(v)}return T.useEffect(function(){return u},[]),[g,d,s.current,o]}var Om=14/15;function uB(t,e,n){var r=T.useRef(!1),i=T.useRef(0),o=T.useRef(0),A=T.useRef(null),a=T.useRef(null),s,l=function(p){if(r.current){var V=Math.ceil(p.touches[0].pageX),v=Math.ceil(p.touches[0].pageY),m=i.current-V,C=o.current-v,w=Math.abs(m)>Math.abs(C);w?i.current=V:o.current=v;var S=n(w,w?m:C,!1,p);S&&p.preventDefault(),clearInterval(a.current),S&&(a.current=setInterval(function(){w?m*=Om:C*=Om;var M=Math.floor(w?m:C);(!n(w,M,!0)||Math.abs(M)<=.1)&&clearInterval(a.current)},16))}},u=function(){r.current=!1,s()},d=function(p){s(),p.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(p.touches[0].pageX),o.current=Math.ceil(p.touches[0].pageY),A.current=p.target,A.current.addEventListener("touchmove",l,{passive:!1}),A.current.addEventListener("touchend",u,{passive:!0}))};s=function(){A.current&&(A.current.removeEventListener("touchmove",l),A.current.removeEventListener("touchend",u))},$t(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var g;(g=e.current)===null||g===void 0||g.removeEventListener("touchstart",d),s(),clearInterval(a.current)}},[t])}function Dm(t){return Math.floor(Math.pow(t,.5))}function yd(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function dB(t,e,n){c.useEffect(function(){var r=e.current;if(t&&r){var i=!1,o,A,a=function(){Lt.cancel(o)},s=function g(){a(),o=Lt(function(){n(A),g()})},l=function(p){if(!(p.target.draggable||p.button!==0)){var V=p;V._virtualHandled||(V._virtualHandled=!0,i=!0)}},u=function(){i=!1,a()},d=function(p){if(i){var V=yd(p,!1),v=r.getBoundingClientRect(),m=v.top,C=v.bottom;if(V<=m){var w=m-V;A=-Dm(w),s()}else if(V>=C){var S=V-C;A=Dm(S),s()}else a()}};return r.addEventListener("mousedown",l),r.ownerDocument.addEventListener("mouseup",u),r.ownerDocument.addEventListener("mousemove",d),function(){r.removeEventListener("mousedown",l),r.ownerDocument.removeEventListener("mouseup",u),r.ownerDocument.removeEventListener("mousemove",d),a()}}},[t])}var Nm=10;function gB(t,e,n,r,i,o,A,a){var s=c.useRef(),l=c.useState(null),u=$(l,2),d=u[0],g=u[1];return $t(function(){if(d&&d.times<Nm){if(!t.current){g(function(Y){return U({},Y)});return}o();var p=d.targetAlign,V=d.originAlign,v=d.index,m=d.offset,C=t.current.clientHeight,w=!1,S=p,M=null;if(C){for(var I=p||V,f=0,R=0,q=0,E=Math.min(e.length-1,v),h=0;h<=E;h+=1){var y=i(e[h]);R=f;var x=n.get(y);q=R+(x===void 0?r:x),f=q}for(var b=I==="top"?m:C-m,B=E;B>=0;B-=1){var O=i(e[B]),N=n.get(O);if(N===void 0){w=!0;break}if(b-=N,b<=0)break}switch(I){case"top":M=R-m;break;case"bottom":M=q-C+m;break;default:{var F=t.current.scrollTop,j=F+C;R<F?S="top":q>j&&(S="bottom")}}M!==null&&A(M),M!==d.lastTop&&(w=!0)}w&&g(U(U({},d),{},{times:d.times+1,targetAlign:S,lastTop:M}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===Nm&&Ct(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,t.current]),function(p){if(p==null){a();return}if(Lt.cancel(s.current),typeof p=="number")A(p);else if(p&&$e(p)==="object"){var V,v=p.align;"index"in p?V=p.index:V=e.findIndex(function(w){return i(w)===p.key});var m=p.offset,C=m===void 0?0:m;g({times:0,index:V,offset:C,originAlign:v})}}}var wd=c.forwardRef(function(t,e){var n=t.prefixCls,r=t.rtl,i=t.scrollOffset,o=t.scrollRange,A=t.onStartMove,a=t.onStopMove,s=t.onScroll,l=t.horizontal,u=t.spinSize,d=t.containerSize,g=t.style,p=t.thumbStyle,V=t.showScrollBar,v=c.useState(!1),m=$(v,2),C=m[0],w=m[1],S=c.useState(null),M=$(S,2),I=M[0],f=M[1],R=c.useState(null),q=$(R,2),E=q[0],h=q[1],y=!r,x=c.useRef(),b=c.useRef(),B=c.useState(V),O=$(B,2),N=O[0],F=O[1],j=c.useRef(),Y=function(){V===!0||V===!1||(clearTimeout(j.current),F(!0),j.current=setTimeout(function(){F(!1)},3e3))},H=o-d||0,L=d-u||0,G=c.useMemo(function(){if(i===0||H===0)return 0;var ue=i/H;return ue*L},[i,H,L]),_=function(ne){ne.stopPropagation(),ne.preventDefault()},K=c.useRef({top:G,dragging:C,pageY:I,startTop:E});K.current={top:G,dragging:C,pageY:I,startTop:E};var W=function(ne){w(!0),f(yd(ne,l)),h(K.current.top),A(),ne.stopPropagation(),ne.preventDefault()};c.useEffect(function(){var ue=function(de){de.preventDefault()},ne=x.current,me=b.current;return ne.addEventListener("touchstart",ue,{passive:!1}),me.addEventListener("touchstart",W,{passive:!1}),function(){ne.removeEventListener("touchstart",ue),me.removeEventListener("touchstart",W)}},[]);var z=c.useRef();z.current=H;var te=c.useRef();te.current=L,c.useEffect(function(){if(C){var ue,ne=function(de){var ce=K.current,ye=ce.dragging,Ie=ce.pageY,Ve=ce.startTop;Lt.cancel(ue);var Be=x.current.getBoundingClientRect(),Qe=d/(l?Be.width:Be.height);if(ye){var ke=(yd(de,l)-Ie)*Qe,Se=Ve;!y&&l?Se-=ke:Se+=ke;var pe=z.current,Me=te.current,Le=Me?Se/Me:0,et=Math.ceil(Le*pe);et=Math.max(et,0),et=Math.min(et,pe),ue=Lt(function(){s(et,l)})}},me=function(){w(!1),a()};return window.addEventListener("mousemove",ne,{passive:!0}),window.addEventListener("touchmove",ne,{passive:!0}),window.addEventListener("mouseup",me,{passive:!0}),window.addEventListener("touchend",me,{passive:!0}),function(){window.removeEventListener("mousemove",ne),window.removeEventListener("touchmove",ne),window.removeEventListener("mouseup",me),window.removeEventListener("touchend",me),Lt.cancel(ue)}}},[C]),c.useEffect(function(){return Y(),function(){clearTimeout(j.current)}},[i]),c.useImperativeHandle(e,function(){return{delayHidden:Y}});var X="".concat(n,"-scrollbar"),Ae={position:"absolute",visibility:N?null:"hidden"},le={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return l?(Object.assign(Ae,{height:8,left:0,right:0,bottom:0}),Object.assign(le,Q({height:"100%",width:u},y?"left":"right",G))):(Object.assign(Ae,Q({width:8,top:0,bottom:0},y?"right":"left",0)),Object.assign(le,{width:"100%",height:u,top:G})),c.createElement("div",{ref:x,className:se(X,Q(Q(Q({},"".concat(X,"-horizontal"),l),"".concat(X,"-vertical"),!l),"".concat(X,"-visible"),N)),style:U(U({},Ae),g),onMouseDown:_,onMouseMove:Y},c.createElement("div",{ref:b,className:se("".concat(X,"-thumb"),Q({},"".concat(X,"-thumb-moving"),C)),style:U(U({},le),p),onMouseDown:W}))});process.env.NODE_ENV!=="production"&&(wd.displayName="ScrollBar");var fB=20;function Fm(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,fB),Math.floor(n)}var hB=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],pB=[],mB={overflowY:"auto",overflowAnchor:"none"};function VB(t,e){var n=t.prefixCls,r=n===void 0?"rc-virtual-list":n,i=t.className,o=t.height,A=t.itemHeight,a=t.fullHeight,s=a===void 0?!0:a,l=t.style,u=t.data,d=t.children,g=t.itemKey,p=t.virtual,V=t.direction,v=t.scrollWidth,m=t.component,C=m===void 0?"div":m,w=t.onScroll,S=t.onVirtualScroll,M=t.onVisibleChange,I=t.innerProps,f=t.extraRender,R=t.styles,q=t.showScrollBar,E=q===void 0?"optional":q,h=qt(t,hB),y=c.useCallback(function(qe){return typeof g=="function"?g(qe):qe==null?void 0:qe[g]},[g]),x=cB(y),b=$(x,4),B=b[0],O=b[1],N=b[2],F=b[3],j=!!(p!==!1&&o&&A),Y=c.useMemo(function(){return Object.values(N.maps).reduce(function(qe,Te){return qe+Te},0)},[N.id,N.maps]),H=j&&u&&(Math.max(A*u.length,Y)>o||!!v),L=V==="rtl",G=se(r,Q({},"".concat(r,"-rtl"),L),i),_=u||pB,K=T.useRef(),W=T.useRef(),z=T.useRef(),te=T.useState(0),X=$(te,2),Ae=X[0],le=X[1],ue=T.useState(0),ne=$(ue,2),me=ne[0],Z=ne[1],de=T.useState(!1),ce=$(de,2),ye=ce[0],Ie=ce[1],Ve=function(){Ie(!0)},Be=function(){Ie(!1)},Qe={getKey:y};function ke(qe){le(function(Te){var st;typeof qe=="function"?st=qe(Te):st=qe;var ut=Yt(st);return K.current.scrollTop=ut,ut})}var Se=T.useRef({start:0,end:_.length}),pe=T.useRef(),Me=AB(_,y),Le=$(Me,1),et=Le[0];pe.current=et;var nt=c.useMemo(function(){if(!j)return{scrollHeight:void 0,start:0,end:_.length-1,offset:void 0};if(!H){var qe;return{scrollHeight:((qe=W.current)===null||qe===void 0?void 0:qe.offsetHeight)||0,start:0,end:_.length-1,offset:void 0}}for(var Te=0,st,ut,Nt,On=_.length,sn=0;sn<On;sn+=1){var Kn=_[sn],Gr=y(Kn),Un=N.get(Gr),Gn=Te+(Un===void 0?A:Un);Gn>=Ae&&st===void 0&&(st=sn,ut=Te),Gn>Ae+o&&Nt===void 0&&(Nt=sn),Te=Gn}return st===void 0&&(st=0,ut=0,Nt=Math.ceil(o/A)),Nt===void 0&&(Nt=_.length-1),Nt=Math.min(Nt+1,_.length-1),{scrollHeight:Te,start:st,end:Nt,offset:ut}},[H,j,Ae,_,F,o]),je=nt.scrollHeight,Ee=nt.start,We=nt.end,ct=nt.offset;Se.current.start=Ee,Se.current.end=We,c.useLayoutEffect(function(){var qe=N.getRecord();if(qe.size===1){var Te=Array.from(qe.keys())[0],st=qe.get(Te),ut=_[Ee];if(ut&&st===void 0){var Nt=y(ut);if(Nt===Te){var On=N.get(Te),sn=On-A;ke(function(Kn){return Kn+sn})}}}N.resetRecord()},[je]);var _e=c.useState({width:0,height:o}),Oe=$(_e,2),Re=Oe[0],At=Oe[1],at=function(Te){At({width:Te.offsetWidth,height:Te.offsetHeight})},vt=T.useRef(),Tt=T.useRef(),Wt=c.useMemo(function(){return Fm(Re.width,v)},[Re.width,v]),Jt=c.useMemo(function(){return Fm(Re.height,je)},[Re.height,je]),en=je-o,Xt=T.useRef(en);Xt.current=en;function Yt(qe){var Te=qe;return Number.isNaN(Xt.current)||(Te=Math.min(Te,Xt.current)),Te=Math.max(Te,0),Te}var Mt=Ae<=0,pt=Ae>=en,He=me<=0,Xe=me>=v,xe=gC(Mt,pt,He,Xe),it=function(){return{x:L?-me:me,y:Ae}},mt=T.useRef(it()),De=nn(function(qe){if(S){var Te=U(U({},it()),qe);(mt.current.x!==Te.x||mt.current.y!==Te.y)&&(S(Te),mt.current=Te)}});function we(qe,Te){var st=qe;Te?(zr.flushSync(function(){Z(st)}),De()):ke(st)}function Ye(qe){var Te=qe.currentTarget.scrollTop;Te!==Ae&&ke(Te),w==null||w(qe),De()}var Ke=function(Te){var st=Te,ut=v?v-Re.width:0;return st=Math.max(st,0),st=Math.min(st,ut),st},Ue=nn(function(qe,Te){Te?(zr.flushSync(function(){Z(function(st){var ut=st+(L?-qe:qe);return Ke(ut)})}),De()):ke(function(st){var ut=st+qe;return ut})}),D=aB(j,Mt,pt,He,Xe,!!v,Ue),fe=$(D,2),k=fe[0],ae=fe[1];uB(j,K,function(qe,Te,st,ut){var Nt=ut;return xe(qe,Te,st)?!1:!Nt||!Nt._virtualHandled?(Nt&&(Nt._virtualHandled=!0),k({preventDefault:function(){},deltaX:qe?Te:0,deltaY:qe?0:Te}),!0):!1}),dB(H,K,function(qe){ke(function(Te){return Te+qe})}),$t(function(){function qe(st){var ut=Mt&&st.detail<0,Nt=pt&&st.detail>0;j&&!ut&&!Nt&&st.preventDefault()}var Te=K.current;return Te.addEventListener("wheel",k,{passive:!1}),Te.addEventListener("DOMMouseScroll",ae,{passive:!0}),Te.addEventListener("MozMousePixelScroll",qe,{passive:!1}),function(){Te.removeEventListener("wheel",k),Te.removeEventListener("DOMMouseScroll",ae),Te.removeEventListener("MozMousePixelScroll",qe)}},[j,Mt,pt]),$t(function(){if(v){var qe=Ke(me);Z(qe),De({x:qe})}},[Re.width,v]);var ee=function(){var Te,st;(Te=vt.current)===null||Te===void 0||Te.delayHidden(),(st=Tt.current)===null||st===void 0||st.delayHidden()},Ce=gB(K,_,N,A,y,function(){return O(!0)},ke,ee);c.useImperativeHandle(e,function(){return{nativeElement:z.current,getScrollInfo:it,scrollTo:function(Te){function st(ut){return ut&&$e(ut)==="object"&&("left"in ut||"top"in ut)}st(Te)?(Te.left!==void 0&&Z(Ke(Te.left)),Ce(Te.top)):Ce(Te)}}}),$t(function(){if(M){var qe=_.slice(Ee,We+1);M(qe,_)}},[Ee,We,_]);var ze=sB(_,y,N,A),tt=f==null?void 0:f({start:Ee,end:We,virtual:H,offsetX:me,offsetY:ct,rtl:L,getSize:ze}),Dt=iB(_,Ee,We,v,me,B,d,Qe),gt=null;o&&(gt=U(Q({},s?"height":"maxHeight",o),mB),j&&(gt.overflowY="hidden",v&&(gt.overflowX="hidden"),ye&&(gt.pointerEvents="none")));var yt={};return L&&(yt.dir="rtl"),c.createElement("div",Fe({ref:z,style:U(U({},l),{},{position:"relative"}),className:G},yt,h),c.createElement(fi,{onResize:at},c.createElement(C,{className:"".concat(r,"-holder"),style:gt,ref:K,onScroll:Ye,onMouseEnter:ee},c.createElement(dC,{prefixCls:r,height:je,offsetX:me,offsetY:ct,scrollWidth:v,onInnerResize:O,ref:W,innerProps:I,rtl:L,extra:tt},Dt))),H&&je>o&&c.createElement(wd,{ref:vt,prefixCls:r,scrollOffset:Ae,scrollRange:je,rtl:L,onScroll:we,onStartMove:Ve,onStopMove:Be,spinSize:Jt,containerSize:Re.height,style:R==null?void 0:R.verticalScrollBar,thumbStyle:R==null?void 0:R.verticalScrollBarThumb,showScrollBar:E}),H&&v>Re.width&&c.createElement(wd,{ref:Tt,prefixCls:r,scrollOffset:me,scrollRange:v,rtl:L,onScroll:we,onStartMove:Ve,onStopMove:Be,spinSize:Wt,containerSize:Re.width,horizontal:!0,style:R==null?void 0:R.horizontalScrollBar,thumbStyle:R==null?void 0:R.horizontalScrollBarThumb,showScrollBar:E}))}var fC=c.forwardRef(VB);fC.displayName="List";function vB(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var CB=["disabled","title","children","style","className"];function Qm(t){return typeof t=="string"||typeof t=="number"}var qB=function(e,n){var r=O5(),i=r.prefixCls,o=r.id,A=r.open,a=r.multiple,s=r.mode,l=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,g=r.onPopupScroll,p=c.useContext(bg),V=p.maxCount,v=p.flattenOptions,m=p.onActiveValue,C=p.defaultActiveFirstOption,w=p.onSelect,S=p.menuItemSelectedIcon,M=p.rawValues,I=p.fieldNames,f=p.virtual,R=p.direction,q=p.listHeight,E=p.listItemHeight,h=p.optionRender,y="".concat(i,"-item"),x=HA(function(){return v},[A,v],function(ue,ne){return ne[0]&&ue[1]!==ne[1]}),b=c.useRef(null),B=c.useMemo(function(){return a&&qd(V)&&(M==null?void 0:M.size)>=V},[a,V,M==null?void 0:M.size]),O=function(ne){ne.preventDefault()},N=function(ne){var me;(me=b.current)===null||me===void 0||me.scrollTo(typeof ne=="number"?{index:ne}:ne)},F=c.useCallback(function(ue){return s==="combobox"?!1:M.has(ue)},[s,be(M).toString(),M.size]),j=function(ne){for(var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Z=x.length,de=0;de<Z;de+=1){var ce=(ne+de*me+Z)%Z,ye=x[ce]||{},Ie=ye.group,Ve=ye.data;if(!Ie&&!(Ve!=null&&Ve.disabled)&&(F(Ve.value)||!B))return ce}return-1},Y=c.useState(function(){return j(0)}),H=$(Y,2),L=H[0],G=H[1],_=function(ne){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;G(ne);var Z={source:me?"keyboard":"mouse"},de=x[ne];if(!de){m(null,-1,Z);return}m(de.value,ne,Z)};T.useEffect(function(){_(C!==!1?j(0):-1)},[x.length,l]);var K=c.useCallback(function(ue){return s==="combobox"?String(ue).toLowerCase()===l.toLowerCase():M.has(ue)},[s,l,be(M).toString(),M.size]);T.useEffect(function(){var ue=setTimeout(function(){if(!a&&A&&M.size===1){var me=Array.from(M)[0],Z=x.findIndex(function(de){var ce=de.data;return l?String(ce.value).startsWith(l):ce.value===me});Z!==-1&&(_(Z),N(Z))}});if(A){var ne;(ne=b.current)===null||ne===void 0||ne.scrollTo(void 0)}return function(){return clearTimeout(ue)}},[A,l]);var W=function(ne){ne!==void 0&&w(ne,{selected:!M.has(ne)}),a||u(!1)};if(c.useImperativeHandle(n,function(){return{onKeyDown:function(ne){var me=ne.which,Z=ne.ctrlKey;switch(me){case ot.N:case ot.P:case ot.UP:case ot.DOWN:{var de=0;if(me===ot.UP?de=-1:me===ot.DOWN?de=1:vB()&&Z&&(me===ot.N?de=1:me===ot.P&&(de=-1)),de!==0){var ce=j(L+de,de);N(ce),_(ce,!0)}break}case ot.TAB:case ot.ENTER:{var ye,Ie=x[L];Ie&&!(Ie!=null&&(ye=Ie.data)!==null&&ye!==void 0&&ye.disabled)&&!B?W(Ie.value):W(void 0),A&&ne.preventDefault();break}case ot.ESC:u(!1),A&&ne.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ne){N(ne)}}}),x.length===0)return c.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(y,"-empty"),onMouseDown:O},d);var z=Object.keys(I).map(function(ue){return I[ue]}),te=function(ne){return ne.label};function X(ue,ne){var me=ue.group;return{role:me?"presentation":"option",id:"".concat(o,"_list_").concat(ne)}}var Ae=function(ne){var me=x[ne];if(!me)return null;var Z=me.data||{},de=Z.value,ce=me.group,ye=Oi(Z,!0),Ie=te(me);return me?c.createElement("div",Fe({"aria-label":typeof Ie=="string"&&!ce?Ie:null},ye,{key:ne},X(me,ne),{"aria-selected":K(de)}),de):null},le={role:"listbox",id:"".concat(o,"_list")};return c.createElement(c.Fragment,null,f&&c.createElement("div",Fe({},le,{style:{height:0,width:0,overflow:"hidden"}}),Ae(L-1),Ae(L),Ae(L+1)),c.createElement(fC,{itemKey:"key",ref:b,data:x,height:q,itemHeight:E,fullHeight:!1,onMouseDown:O,onScroll:g,virtual:f,direction:R,innerProps:f?null:le},function(ue,ne){var me=ue.group,Z=ue.groupOption,de=ue.data,ce=ue.label,ye=ue.value,Ie=de.key;if(me){var Ve,Be=(Ve=de.title)!==null&&Ve!==void 0?Ve:Qm(ce)?ce.toString():void 0;return c.createElement("div",{className:se(y,"".concat(y,"-group"),de.className),title:Be},ce!==void 0?ce:Ie)}var Qe=de.disabled,ke=de.title;de.children;var Se=de.style,pe=de.className,Me=qt(de,CB),Le=$n(Me,z),et=F(ye),nt=Qe||!et&&B,je="".concat(y,"-option"),Ee=se(y,je,pe,Q(Q(Q(Q({},"".concat(je,"-grouped"),Z),"".concat(je,"-active"),L===ne&&!nt),"".concat(je,"-disabled"),nt),"".concat(je,"-selected"),et)),We=te(ue),ct=!S||typeof S=="function"||et,_e=typeof We=="number"?We:We||ye,Oe=Qm(_e)?_e.toString():void 0;return ke!==void 0&&(Oe=ke),c.createElement("div",Fe({},Oi(Le),f?{}:X(ue,ne),{"aria-selected":K(ye),className:Ee,title:Oe,onMouseMove:function(){L===ne||nt||_(ne)},onClick:function(){nt||W(ye)},style:Se}),c.createElement("div",{className:"".concat(je,"-content")},typeof h=="function"?h(ue,{index:ne}):_e),c.isValidElement(S)||et,ct&&c.createElement(Vl,{className:"".concat(y,"-option-state"),customizeIcon:S,customizeIconProps:{value:ye,disabled:nt,isSelected:et}},et?"✓":null))}))},hC=c.forwardRef(qB);process.env.NODE_ENV!=="production"&&(hC.displayName="OptionList");const EB=function(t,e){var n=c.useRef({values:new Map,options:new Map}),r=c.useMemo(function(){var o=n.current,A=o.values,a=o.options,s=t.map(function(d){if(d.label===void 0){var g;return U(U({},d),{},{label:(g=A.get(d.value))===null||g===void 0?void 0:g.label})}return d}),l=new Map,u=new Map;return s.forEach(function(d){l.set(d.value,d),u.set(d.value,e.get(d.value)||a.get(d.value))}),n.current.values=l,n.current.options=u,s},[t,e]),i=c.useCallback(function(o){return e.get(o)||n.current.options.get(o)},[e]);return[r,i]};function gc(t,e){return Ig(t).join("").toUpperCase().includes(e)}const yB=function(t,e,n,r,i){return c.useMemo(function(){if(!n||r===!1)return t;var o=e.options,A=e.label,a=e.value,s=[],l=typeof r=="function",u=n.toUpperCase(),d=l?r:function(p,V){return i?gc(V[i],u):V[o]?gc(V[A!=="children"?A:"label"],u):gc(V[a],u)},g=l?function(p){return Ed(p)}:function(p){return p};return t.forEach(function(p){if(p[o]){var V=d(n,g(p));if(V)s.push(p);else{var v=p[o].filter(function(m){return d(n,g(m))});v.length&&s.push(U(U({},p),{},Q({},o,v)))}return}d(n,g(p))&&s.push(p)}),s},[t,r,i,n,e])};var km=0,wB=process.env.NODE_ENV!=="test"&&Qn();function SB(){var t;return wB?(t=km,km+=1):t="TEST_OR_SSR",t}function IB(t){var e=c.useState(),n=$(e,2),r=n[0],i=n[1];return c.useEffect(function(){i("rc_select_".concat(SB()))},[]),t||r}var bB=["children","value"],MB=["children"];function RB(t){var e=t,n=e.key,r=e.props,i=r.children,o=r.value,A=qt(r,bB);return U({key:n,value:o!==void 0?o:n,children:i},A)}function xg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Nr(t).map(function(n,r){if(!c.isValidElement(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,A=i.key,a=i.props,s=a.children,l=qt(a,MB);return e||!o?RB(n):U(U({key:"__RC_SELECT_GRP__".concat(A===null?r:A,"__"),label:A},l),{},{options:xg(s)})}).filter(function(n){return n})}var xB=function(e,n,r,i,o){return c.useMemo(function(){var A=e,a=!e;a&&(A=xg(n));var s=new Map,l=new Map,u=function(p,V,v){v&&typeof v=="string"&&p.set(V[v],V)},d=function g(p){for(var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<p.length;v+=1){var m=p[v];!m[r.options]||V?(s.set(m[r.value],m),u(l,m,r.label),u(l,m,i),u(l,m,o)):g(m[r.options],!0)}};return d(A),{options:A,valueOptions:s,labelOptions:l}},[e,n,r,i,o])};function Um(t){var e=c.useRef();e.current=t;var n=c.useCallback(function(){return e.current.apply(e,arguments)},[]);return n}function TB(t){var e=t.mode,n=t.options,r=t.children,i=t.backfill,o=t.allowClear,A=t.placeholder,a=t.getInputElement,s=t.showSearch,l=t.onSearch,u=t.defaultOpen,d=t.autoFocus,g=t.labelInValue,p=t.value,V=t.inputValue,v=t.optionLabelProp,m=Rs(e),C=s!==void 0?s:m||e==="combobox",w=n||xg(r);if(Ct(e!=="tags"||w.every(function(f){return!f.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),e==="tags"||e==="combobox"){var S=w.some(function(f){return f.options?f.options.some(function(R){return typeof("value"in R?R.value:R.key)=="number"}):typeof("value"in f?f.value:f.key)=="number"});Ct(!S,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Ct(e!=="combobox"||!v,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Ct(e==="combobox"||!i,"`backfill` only works with `combobox` mode."),Ct(e==="combobox"||!a,"`getInputElement` only work with `combobox` mode."),vc(e!=="combobox"||!a||!o||!A,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),l&&!C&&e!=="combobox"&&e!=="tags"&&Ct(!1,"`onSearch` should work with `showSearch` instead of use alone."),vc(!u||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),p!=null){var M=Ig(p);Ct(!g||M.every(function(f){return $e(f)==="object"&&("key"in f||"value"in f)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Ct(!m||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var I=null;Nr(r).some(function(f){if(!c.isValidElement(f)||!f.type)return!1;var R=f,q=R.type;if(q.isSelectOption)return!1;if(q.isSelectOptGroup){var E=Nr(f.props.children).every(function(h){return!c.isValidElement(h)||!f.type||h.type.isSelectOption?!0:(I=h.type,!1)});return!E}return I=q,!0}),I&&Ct(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(I.displayName||I.name||I,"`.")),Ct(V===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function BB(t,e){if(t){var n=function r(i){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=0;A<i.length;A++){var a=i[A];if(a[e==null?void 0:e.value]===null)return Ct(!1,"`value` in Select options should not be `null`."),!0;if(!o&&Array.isArray(a[e==null?void 0:e.options])&&r(a[e==null?void 0:e.options],!0))break}};n(t)}}var OB=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],DB=["inputValue"];function NB(t){return!t||$e(t)!=="object"}var pC=c.forwardRef(function(t,e){var n=t.id,r=t.mode,i=t.prefixCls,o=i===void 0?"rc-select":i,A=t.backfill,a=t.fieldNames,s=t.inputValue,l=t.searchValue,u=t.onSearch,d=t.autoClearSearchValue,g=d===void 0?!0:d,p=t.onSelect,V=t.onDeselect,v=t.dropdownMatchSelectWidth,m=v===void 0?!0:v,C=t.filterOption,w=t.filterSort,S=t.optionFilterProp,M=t.optionLabelProp,I=t.options,f=t.optionRender,R=t.children,q=t.defaultActiveFirstOption,E=t.menuItemSelectedIcon,h=t.virtual,y=t.direction,x=t.listHeight,b=x===void 0?200:x,B=t.listItemHeight,O=B===void 0?20:B,N=t.labelRender,F=t.value,j=t.defaultValue,Y=t.labelInValue,H=t.onChange,L=t.maxCount,G=qt(t,OB),_=IB(n),K=Rs(r),W=!!(!I&&R),z=c.useMemo(function(){return C===void 0&&r==="combobox"?!1:C},[C,r]),te=c.useMemo(function(){return cC(a,W)},[JSON.stringify(a),W]),X=Tn("",{value:l!==void 0?l:s,postState:function(we){return we||""}}),Ae=$(X,2),le=Ae[0],ue=Ae[1],ne=xB(I,R,te,S,M),me=ne.valueOptions,Z=ne.labelOptions,de=ne.options,ce=c.useCallback(function(De){var we=Ig(De);return we.map(function(Ye){var Ke,Ue,D,fe,k;if(NB(Ye))Ke=Ye;else{var ae;D=Ye.key,Ue=Ye.label,Ke=(ae=Ye.value)!==null&&ae!==void 0?ae:D}var ee=me.get(Ke);if(ee){var Ce;if(Ue===void 0&&(Ue=ee==null?void 0:ee[M||te.label]),D===void 0&&(D=(Ce=ee==null?void 0:ee.key)!==null&&Ce!==void 0?Ce:Ke),fe=ee==null?void 0:ee.disabled,k=ee==null?void 0:ee.title,process.env.NODE_ENV!=="production"&&!M){var ze=ee==null?void 0:ee[te.label];ze!==void 0&&!c.isValidElement(ze)&&!c.isValidElement(Ue)&&ze!==Ue&&Ct(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:Ue,value:Ke,key:D,disabled:fe,title:k}})},[te,M,me]),ye=Tn(j,{value:F}),Ie=$(ye,2),Ve=Ie[0],Be=Ie[1],Qe=c.useMemo(function(){var De,we=K&&Ve===null?[]:Ve,Ye=ce(we);return r==="combobox"&&L5((De=Ye[0])===null||De===void 0?void 0:De.value)?[]:Ye},[Ve,ce,r,K]),ke=EB(Qe,me),Se=$(ke,2),pe=Se[0],Me=Se[1],Le=c.useMemo(function(){if(!r&&pe.length===1){var De=pe[0];if(De.value===null&&(De.label===null||De.label===void 0))return[]}return pe.map(function(we){var Ye;return U(U({},we),{},{label:(Ye=typeof N=="function"?N(we):we.label)!==null&&Ye!==void 0?Ye:we.value})})},[r,pe,N]),et=c.useMemo(function(){return new Set(pe.map(function(De){return De.value}))},[pe]);c.useEffect(function(){if(r==="combobox"){var De,we=(De=pe[0])===null||De===void 0?void 0:De.value;ue(P5(we)?String(we):"")}},[pe]);var nt=Um(function(De,we){var Ye=we??De;return Q(Q({},te.value,De),te.label,Ye)}),je=c.useMemo(function(){if(r!=="tags")return de;var De=be(de),we=function(Ke){return me.has(Ke)};return be(pe).sort(function(Ye,Ke){return Ye.value<Ke.value?-1:1}).forEach(function(Ye){var Ke=Ye.value;we(Ke)||De.push(nt(Ke,Ye.label))}),De},[nt,de,me,pe,r]),Ee=yB(je,te,le,z,S),We=c.useMemo(function(){return r!=="tags"||!le||Ee.some(function(De){return De[S||"value"]===le})||Ee.some(function(De){return De[te.value]===le})?Ee:[nt(le)].concat(be(Ee))},[nt,S,r,Ee,le,te]),ct=function De(we){var Ye=be(we).sort(function(Ke,Ue){return w(Ke,Ue,{searchValue:le})});return Ye.map(function(Ke){return Array.isArray(Ke.options)?U(U({},Ke),{},{options:Ke.options.length>0?De(Ke.options):Ke.options}):Ke})},_e=c.useMemo(function(){return w?ct(We):We},[We,w,le]),Oe=c.useMemo(function(){return _5(_e,{fieldNames:te,childrenAsData:W})},[_e,te,W]),Re=function(we){var Ye=ce(we);if(Be(Ye),H&&(Ye.length!==pe.length||Ye.some(function(D,fe){var k;return((k=pe[fe])===null||k===void 0?void 0:k.value)!==(D==null?void 0:D.value)}))){var Ke=Y?Ye:Ye.map(function(D){return D.value}),Ue=Ye.map(function(D){return Ed(Me(D.value))});H(K?Ke:Ke[0],K?Ue:Ue[0])}},At=c.useState(null),at=$(At,2),vt=at[0],Tt=at[1],Wt=c.useState(0),Jt=$(Wt,2),en=Jt[0],Xt=Jt[1],Yt=q!==void 0?q:r!=="combobox",Mt=c.useCallback(function(De,we){var Ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ke=Ye.source,Ue=Ke===void 0?"keyboard":Ke;Xt(we),A&&r==="combobox"&&De!==null&&Ue==="keyboard"&&Tt(String(De))},[A,r]),pt=function(we,Ye,Ke){var Ue=function(){var gt,yt=Me(we);return[Y?{label:yt==null?void 0:yt[te.label],value:we,key:(gt=yt==null?void 0:yt.key)!==null&>!==void 0?gt:we}:we,Ed(yt)]};if(Ye&&p){var D=Ue(),fe=$(D,2),k=fe[0],ae=fe[1];p(k,ae)}else if(!Ye&&V&&Ke!=="clear"){var ee=Ue(),Ce=$(ee,2),ze=Ce[0],tt=Ce[1];V(ze,tt)}},He=Um(function(De,we){var Ye,Ke=K?we.selected:!0;Ke?Ye=K?[].concat(be(pe),[De]):[De]:Ye=pe.filter(function(Ue){return Ue.value!==De}),Re(Ye),pt(De,Ke),r==="combobox"?Tt(""):(!Rs||g)&&(ue(""),Tt(""))}),Xe=function(we,Ye){Re(we);var Ke=Ye.type,Ue=Ye.values;(Ke==="remove"||Ke==="clear")&&Ue.forEach(function(D){pt(D.value,!1,Ke)})},xe=function(we,Ye){if(ue(we),Tt(null),Ye.source==="submit"){var Ke=(we||"").trim();if(Ke){var Ue=Array.from(new Set([].concat(be(et),[Ke])));Re(Ue),pt(Ke,!0),ue("")}return}Ye.source!=="blur"&&(r==="combobox"&&Re(we),u==null||u(we))},it=function(we){var Ye=we;r!=="tags"&&(Ye=we.map(function(Ue){var D=Z.get(Ue);return D==null?void 0:D.value}).filter(function(Ue){return Ue!==void 0}));var Ke=Array.from(new Set([].concat(be(et),be(Ye))));Re(Ke),Ke.forEach(function(Ue){pt(Ue,!0)})},mt=c.useMemo(function(){var De=h!==!1&&m!==!1;return U(U({},ne),{},{flattenOptions:Oe,onActiveValue:Mt,defaultActiveFirstOption:Yt,onSelect:He,menuItemSelectedIcon:E,rawValues:et,fieldNames:te,virtual:De,direction:y,listHeight:b,listItemHeight:O,childrenAsData:W,maxCount:L,optionRender:f})},[L,ne,Oe,Mt,Yt,He,E,et,te,h,m,y,b,O,W,f]);return process.env.NODE_ENV!=="production"&&(TB(t),BB(de,te)),c.createElement(bg.Provider,{value:mt},c.createElement(uC,Fe({},G,{id:_,prefixCls:o,ref:e,omitDomProps:DB,mode:r,displayValues:Le,onDisplayValuesChange:Xe,direction:y,searchValue:le,onSearch:xe,autoClearSearchValue:g,onSearchSplit:it,dropdownMatchSelectWidth:m,OptionList:hC,emptyOptions:!Oe.length,activeValue:vt,activeDescendantId:"".concat(_,"_list_").concat(en)})))});process.env.NODE_ENV!=="production"&&(pC.displayName="Select");var Tg=pC;Tg.Option=Rg;Tg.OptGroup=Mg;const mC=()=>{const[,t]=lr(),[e]=Qs("Empty"),r=new Pt(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return c.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},c.createElement("title",null,(e==null?void 0:e.description)||"Empty"),c.createElement("g",{fill:"none",fillRule:"evenodd"},c.createElement("g",{transform:"translate(24 31.67)"},c.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),c.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),c.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),c.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),c.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),c.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),c.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},c.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),c.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};process.env.NODE_ENV!=="production"&&(mC.displayName="EmptyImage");const VC=()=>{const[,t]=lr(),[e]=Qs("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=t,{borderColor:A,shadowColor:a,contentColor:s}=T.useMemo(()=>({borderColor:new Pt(n).onBackground(o).toHexString(),shadowColor:new Pt(r).onBackground(o).toHexString(),contentColor:new Pt(i).onBackground(o).toHexString()}),[n,r,i,o]);return c.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},c.createElement("title",null,(e==null?void 0:e.description)||"Empty"),c.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},c.createElement("ellipse",{fill:a,cx:"32",cy:"33",rx:"32",ry:"7"}),c.createElement("g",{fillRule:"nonzero",stroke:A},c.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),c.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:s}))))};process.env.NODE_ENV!=="production"&&(VC.displayName="SimpleImage");var FB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const vC=c.createElement(mC,null),CC=c.createElement(VC,null),Ai=t=>{const{className:e,rootClassName:n,prefixCls:r,image:i=vC,description:o,children:A,imageStyle:a,style:s,classNames:l,styles:u}=t,d=FB(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:g,direction:p,className:V,style:v,classNames:m,styles:C}=Jr("empty"),w=g("empty",r),[S,M,I]=b2(w),[f]=Qs("Empty"),R=typeof o<"u"?o:f==null?void 0:f.description,q=typeof R=="string"?R:"empty";let E=null;if(typeof i=="string"?E=c.createElement("img",{alt:q,src:i}):E=i,process.env.NODE_ENV!=="production"){const h=an("Empty");[["imageStyle","styles: { image: {} }"]].forEach(y=>{let[x,b]=y;h.deprecated(!(x in t),x,b)})}return S(c.createElement("div",Object.assign({className:se(M,I,w,V,{[`${w}-normal`]:i===CC,[`${w}-rtl`]:p==="rtl"},e,n,m.root,l==null?void 0:l.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},C.root),v),u==null?void 0:u.root),s)},d),c.createElement("div",{className:se(`${w}-image`,m.image,l==null?void 0:l.image),style:Object.assign(Object.assign(Object.assign({},a),C.image),u==null?void 0:u.image)},E),R&&c.createElement("div",{className:se(`${w}-description`,m.description,l==null?void 0:l.description),style:Object.assign(Object.assign({},C.description),u==null?void 0:u.description)},R),A&&c.createElement("div",{className:se(`${w}-footer`,m.footer,l==null?void 0:l.footer),style:Object.assign(Object.assign({},C.footer),u==null?void 0:u.footer)},A)))};Ai.PRESENTED_IMAGE_DEFAULT=vC;Ai.PRESENTED_IMAGE_SIMPLE=CC;process.env.NODE_ENV!=="production"&&(Ai.displayName="Empty");const QB=t=>{const{componentName:e}=t,{getPrefixCls:n}=T.useContext(Qt),r=n("empty");switch(e){case"Table":case"List":return T.createElement(Ai,{image:Ai.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return T.createElement(Ai,{image:Ai.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return T.createElement(Ai,null)}},kB=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function UB(t,e){return t||kB(e)}var GB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},jB=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:GB}))},qC=c.forwardRef(jB);process.env.NODE_ENV!=="production"&&(qC.displayName="CheckOutlined");var PB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},LB=function(e,n){return c.createElement(Mn,Fe({},e,{ref:n,icon:PB}))},EC=c.forwardRef(LB);process.env.NODE_ENV!=="production"&&(EC.displayName="DownOutlined");function YB(t){let{suffixIcon:e,clearIcon:n,menuItemSelectedIcon:r,removeIcon:i,loading:o,multiple:A,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:u,showArrow:d,componentName:g}=t;process.env.NODE_ENV!=="production"&&an(g).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const p=n??c.createElement(ta,null),V=w=>e===null&&!a&&!d?null:c.createElement(c.Fragment,null,l!==!1&&w,a&&u);let v=null;if(e!==void 0)v=V(e);else if(o)v=V(c.createElement(nl,{spin:!0}));else{const w=`${s}-suffix`;v=S=>{let{open:M,showSearch:I}=S;return V(M&&I?c.createElement(lg,{className:w}):c.createElement(EC,{className:w}))}}let m=null;r!==void 0?m=r:A?m=c.createElement(qC,null):m=null;let C=null;return i!==void 0?C=i:C=c.createElement(pl,null),{clearIcon:p,suffixIcon:v,itemIcon:m,removeIcon:C}}function HB(t,e){return e!==void 0?e:t!==null}var KB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const yC="SECRET_COMBOBOX_MODE_DO_NOT_USE",wC=(t,e)=>{var n;const{prefixCls:r,bordered:i,className:o,rootClassName:A,getPopupContainer:a,popupClassName:s,dropdownClassName:l,listHeight:u=256,placement:d,listItemHeight:g,size:p,disabled:V,notFoundContent:v,status:m,builtinPlacements:C,dropdownMatchSelectWidth:w,popupMatchSelectWidth:S,direction:M,style:I,allowClear:f,variant:R,dropdownStyle:q,transitionName:E,tagRender:h,maxCount:y,prefix:x}=t,b=KB(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:B,getPrefixCls:O,renderEmpty:N,direction:F,virtual:j,popupMatchSelectWidth:Y,popupOverflow:H}=c.useContext(Qt),L=Jr("select"),[,G]=lr(),_=g??(G==null?void 0:G.controlHeight),K=O("select",r),W=O(),z=M??F,{compactSize:te,compactItemClassnames:X}=zo(K,z),[Ae,le]=sg("select",R,i),ue=Ur(K),[ne,me,Z]=V2(K,ue),de=c.useMemo(()=>{const{mode:vt}=t;if(vt!=="combobox")return vt===yC?"combobox":vt},[t.mode]),ce=de==="multiple"||de==="tags",ye=HB(t.suffixIcon,t.showArrow),Ie=(n=S??w)!==null&&n!==void 0?n:Y,{status:Ve,hasFeedback:Be,isFormItemInput:Qe,feedbackIcon:ke}=c.useContext(Fr),Se=tl(Ve,m);let pe;v!==void 0?pe=v:de==="combobox"?pe=null:pe=(N==null?void 0:N("Select"))||c.createElement(QB,{componentName:"Select"});const{suffixIcon:Me,itemIcon:Le,removeIcon:et,clearIcon:nt}=YB(Object.assign(Object.assign({},b),{multiple:ce,hasFeedback:Be,feedbackIcon:ke,showSuffixIcon:ye,prefixCls:K,componentName:"Select"})),je=f===!0?{clearIcon:nt}:f,Ee=$n(b,["suffixIcon","itemIcon"]),We=se(s||l,{[`${K}-dropdown-${z}`]:z==="rtl"},A,Z,ue,me),ct=ki(vt=>{var Tt;return(Tt=p??te)!==null&&Tt!==void 0?Tt:vt}),_e=c.useContext(li),Oe=V??_e,Re=se({[`${K}-lg`]:ct==="large",[`${K}-sm`]:ct==="small",[`${K}-rtl`]:z==="rtl",[`${K}-${Ae}`]:le,[`${K}-in-form-item`]:Qe},Cs(K,Se,Be),X,L.className,o,A,Z,ue,me),At=c.useMemo(()=>d!==void 0?d:z==="rtl"?"bottomRight":"bottomLeft",[d,z]);if(process.env.NODE_ENV!=="production"){const vt=an("Select");vt.deprecated(!l,"dropdownClassName","popupClassName"),vt.deprecated(w===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),process.env.NODE_ENV!=="production"&&vt(!("showArrow"in t),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),vt.deprecated(!("bordered"in t),"bordered","variant"),process.env.NODE_ENV!=="production"&&vt(!(typeof y<"u"&&!ce),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[at]=WA("SelectLike",q==null?void 0:q.zIndex);return ne(c.createElement(Tg,Object.assign({ref:e,virtual:j,showSearch:L.showSearch},Ee,{style:Object.assign(Object.assign({},L.style),I),dropdownMatchSelectWidth:Ie,transitionName:rl(W,"slide-up",E),builtinPlacements:UB(C,H),listHeight:u,listItemHeight:_,mode:de,prefixCls:K,placement:At,direction:z,prefix:x,suffixIcon:Me,menuItemSelectedIcon:Le,removeIcon:et,allowClear:je,notFoundContent:pe,className:Re,getPopupContainer:a||B,dropdownClassName:We,disabled:Oe,dropdownStyle:Object.assign(Object.assign({},q),{zIndex:at}),maxCount:ce?y:void 0,tagRender:ce?h:void 0})))};process.env.NODE_ENV!=="production"&&(wC.displayName="Select");const so=c.forwardRef(wC),ZB=I1(so,"dropdownAlign");so.SECRET_COMBOBOX_MODE_DO_NOT_USE=yC;so.Option=Rg;so.OptGroup=Mg;so._InternalPanelDoNotUseOrYouWillBeFired=ZB;process.env.NODE_ENV!=="production"&&(so.displayName="Select");function zB(t,e,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,A=r.noLeading,a=A===void 0?!1:A,s=r.debounceMode,l=s===void 0?void 0:s,u,d=!1,g=0;function p(){u&&clearTimeout(u)}function V(m){var C=m||{},w=C.upcomingOnly,S=w===void 0?!1:w;p(),d=!S}function v(){for(var m=arguments.length,C=new Array(m),w=0;w<m;w++)C[w]=arguments[w];var S=this,M=Date.now()-g;if(d)return;function I(){g=Date.now(),e.apply(S,C)}function f(){u=void 0}!a&&l&&!u&&I(),p(),l===void 0&&M>t?a?(g=Date.now(),o||(u=setTimeout(l?f:I,t))):I():o!==!0&&(u=setTimeout(l?f:I,l===void 0?t-M:t))}return v.cancel=V,v}function JB(t,e,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return zB(t,e,{debounceMode:o!==!1})}const xs=100,SC=xs/5,IC=xs/2-SC/2,fc=IC*2*Math.PI,Gm=50,jm=t=>{const{dotClassName:e,style:n,hasCircleCls:r}=t;return c.createElement("circle",{className:se(`${e}-circle`,{[`${e}-circle-bg`]:r}),r:IC,cx:Gm,cy:Gm,strokeWidth:SC,style:n})},WB=t=>{let{percent:e,prefixCls:n}=t;const r=`${n}-dot`,i=`${r}-holder`,o=`${i}-hidden`,[A,a]=c.useState(!1);$t(()=>{e!==0&&a(!0)},[e!==0]);const s=Math.max(Math.min(e,100),0);if(!A)return null;const l={strokeDashoffset:`${fc/4}`,strokeDasharray:`${fc*s/100} ${fc*(100-s)/100}`};return c.createElement("span",{className:se(i,`${r}-progress`,s<=0&&o)},c.createElement("svg",{viewBox:`0 0 ${xs} ${xs}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},c.createElement(jm,{dotClassName:r,hasCircleCls:!0}),c.createElement(jm,{dotClassName:r,style:l})))};function XB(t){const{prefixCls:e,percent:n=0}=t,r=`${e}-dot`,i=`${r}-holder`,o=`${i}-hidden`;return c.createElement(c.Fragment,null,c.createElement("span",{className:se(i,n>0&&o)},c.createElement("span",{className:se(r,`${e}-dot-spin`)},[1,2,3,4].map(A=>c.createElement("i",{className:`${e}-dot-item`,key:A})))),c.createElement(WB,{prefixCls:e,percent:n}))}function _B(t){const{prefixCls:e,indicator:n,percent:r}=t,i=`${e}-dot`;return n&&c.isValidElement(n)?Dr(n,{className:se(n.props.className,i),percent:r}):c.createElement(XB,{prefixCls:e,percent:r})}const $B=200,Pm=[[30,.05],[70,.03],[96,.01]];function eO(t,e){const[n,r]=c.useState(0),i=c.useRef(null),o=e==="auto";return c.useEffect(()=>(o&&t&&(r(0),i.current=setInterval(()=>{r(A=>{const a=100-A;for(let s=0;s<Pm.length;s+=1){const[l,u]=Pm[s];if(A<=l)return A+a*u}return A})},$B)),()=>{clearInterval(i.current)}),[o,t]),o?n:e}var tO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bC;function nO(t,e){return!!t&&!!e&&!Number.isNaN(Number(e))}const vl=t=>{var e;const{prefixCls:n,spinning:r=!0,delay:i=0,className:o,rootClassName:A,size:a="default",tip:s,wrapperClassName:l,style:u,children:d,fullscreen:g=!1,indicator:p,percent:V}=t,v=tO(t,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:m,direction:C,className:w,style:S,indicator:M}=Jr("spin"),I=m("spin",n),[f,R,q]=y2(I),[E,h]=c.useState(()=>r&&!nO(r,i)),y=eO(E,V);c.useEffect(()=>{if(r){const j=JB(i,()=>{h(!0)});return j(),()=>{var Y;(Y=j==null?void 0:j.cancel)===null||Y===void 0||Y.call(j)}}h(!1)},[i,r]);const x=c.useMemo(()=>typeof d<"u"&&!g,[d,g]);if(process.env.NODE_ENV!=="production"){const j=an("Spin");process.env.NODE_ENV!=="production"&&j(!s||x||g,"usage","`tip` only work in nest or fullscreen pattern.")}const b=se(I,w,{[`${I}-sm`]:a==="small",[`${I}-lg`]:a==="large",[`${I}-spinning`]:E,[`${I}-show-text`]:!!s,[`${I}-rtl`]:C==="rtl"},o,!g&&A,R,q),B=se(`${I}-container`,{[`${I}-blur`]:E}),O=(e=p??M)!==null&&e!==void 0?e:bC,N=Object.assign(Object.assign({},S),u),F=c.createElement("div",Object.assign({},v,{style:N,className:b,"aria-live":"polite","aria-busy":E}),c.createElement(_B,{prefixCls:I,indicator:O,percent:y}),s&&(x||g)?c.createElement("div",{className:`${I}-text`},s):null);return f(x?c.createElement("div",Object.assign({},v,{className:se(`${I}-nested-loading`,l,R,q)}),E&&c.createElement("div",{key:"loading"},F),c.createElement("div",{className:B,key:"container"},d)):g?c.createElement("div",{className:se(`${I}-fullscreen`,{[`${I}-fullscreen-show`]:E},A,R,q)},F):F)};vl.setDefaultIndicator=t=>{bC=t};process.env.NODE_ENV!=="production"&&(vl.displayName="Spin");const rO=["1","2","3","4","5","6","7","8","9","*","0","#"],MC=({onCallBack:t})=>ie.jsx(iO,{children:rO.map(e=>ie.jsx("div",{className:"ysyt-key-item",onClick:()=>t(e),children:e},e))}),iO=rn.div`
|
|
627
627
|
margin-top: 10px;
|
|
628
628
|
display: grid;
|
|
629
629
|
grid-template-columns: repeat(3, 1fr);
|
|
@@ -683,7 +683,7 @@ html body {
|
|
|
683
683
|
&:hover {
|
|
684
684
|
opacity: 0.9;
|
|
685
685
|
}
|
|
686
|
-
`;function vO({title:t,content:e,icon:n,onOk:r,onCancel:i}){const o=document.createElement("div");document.body.appendChild(o);const A=dO.createRoot(o),a=()=>{A.unmount(),o.remove()},s=async()=>{r&&await r(),a()},l=()=>{i==null||i(),a()};A.render(ie.jsx(gO,{children:ie.jsxs(fO,{children:[ie.jsxs(hO,{children:[n&&ie.jsx(pO,{children:n}),t]}),ie.jsx(mO,{children:e}),ie.jsxs(VO,{children:[ie.jsx(Ym,{onClick:l,children:"取消"}),ie.jsx(Ym,{primary:!0,onClick:s,children:"确定"})]})]})}))}const CO={1:ie.jsx(Vt,{name:"ruandianhua"}),2:ie.jsx(Vt,{name:"pnhone"}),3:ie.jsx(Vt,{name:"sip-phone"})},qO={call_number:"",answer:"接听",reject:"拒接",hangup:"挂机",dtmf:"DTMF",unhold:"取消保持",hold:"保持",mute:"静音",unmute:"取消静音",satisfaction:"满意度",consult:"咨询",consult_transfer:"咨询转接",consult_retrieve:"取回通话",conference:"三方会议",whisper:"耳语",cancel_whisper:"取消耳语",force_insert:"强插",force_disconnect:"强拆"},EO={空闲:1,离线:0,未注册:4},yO=T.lazy(()=>Promise.resolve().then(()=>require("./ConsultModel-
|
|
686
|
+
`;function vO({title:t,content:e,icon:n,onOk:r,onCancel:i}){const o=document.createElement("div");document.body.appendChild(o);const A=dO.createRoot(o),a=()=>{A.unmount(),o.remove()},s=async()=>{r&&await r(),a()},l=()=>{i==null||i(),a()};A.render(ie.jsx(gO,{children:ie.jsxs(fO,{children:[ie.jsxs(hO,{children:[n&&ie.jsx(pO,{children:n}),t]}),ie.jsx(mO,{children:e}),ie.jsxs(VO,{children:[ie.jsx(Ym,{onClick:l,children:"取消"}),ie.jsx(Ym,{primary:!0,onClick:s,children:"确定"})]})]})}))}const CO={1:ie.jsx(Vt,{name:"ruandianhua"}),2:ie.jsx(Vt,{name:"pnhone"}),3:ie.jsx(Vt,{name:"sip-phone"})},qO={call_number:"",answer:"接听",reject:"拒接",hangup:"挂机",dtmf:"DTMF",unhold:"取消保持",hold:"保持",mute:"静音",unmute:"取消静音",satisfaction:"满意度",consult:"咨询",consult_transfer:"咨询转接",consult_retrieve:"取回通话",conference:"三方会议",whisper:"耳语",cancel_whisper:"取消耳语",force_insert:"强插",force_disconnect:"强拆"},EO={空闲:1,离线:0,未注册:4},yO=T.lazy(()=>Promise.resolve().then(()=>require("./ConsultModel-oPMIoo5r.js"))),wO=T.lazy(()=>Promise.resolve().then(()=>require("./TransferModel-1zcxBpkk.js"))),hc=rn.div`
|
|
687
687
|
width: 25px;
|
|
688
688
|
height: 25px;
|
|
689
689
|
background: ${({bg:t})=>t};
|
|
@@ -691,4 +691,4 @@ html body {
|
|
|
691
691
|
display: flex;
|
|
692
692
|
justify-content: center;
|
|
693
693
|
align-items: center;
|
|
694
|
-
`,SO=t=>{var Ue,D,fe;const{style:e,logBuiltinEnabled:n,browserAlertTime:r,enableBrowserAlert:i,agentNo:o,appKey:A,appSecret:a,url:s,onCallBack:l,ringingCardShow:u=!0,onLoginCancel:d,isCheckLogin:g,...p}=t,{height:V,busy:v,idle:m,unavailable:C,selectOutNumberColor:w}=e||{},S=T.useRef(),M=T.useRef(),[I,f]=T.useState(new Audio(lO)),[R,q]=T.useState(new Audio(cO)),[E,h]=T.useState(),[y,x]=T.useState(),[b,B]=T.useState(!1),[O,N]=T.useState(new Date().getTime()),[F,j]=T.useState(),[Y,H]=T.useState(),[L,G]=T.useState([]),[_,K]=T.useState([]),[J,z]=T.useState(""),[te,X]=T.useState(!1),[Ae,le]=T.useState([]),[ue,ne]=T.useState(""),[me,Z]=T.useState(""),[de,ce]=T.useState(!1),[ye,Ie]=T.useState(!1),[Ve,Be]=T.useState(),[Qe,ke]=T.useState(new Date().getTime()),[Se,pe]=T.useState(!0),[Me,Le]=T.useState(""),et=k=>{switch(k){case bt.IDLE:return m||"#1D92E9";case bt.BUSY:return v||"#F5212D";case bt.UNREGISTERED:return C||"#faad14";case bt.OFFLINE:return C||"#8c8c8c";default:return"#1D92E9"}};T.useEffect(()=>((async()=>(B(!0),S.current=Bn.getInstance({agentNo:o,appKey:A,appSecret:a,url:s}),nt(),S.current.on(Ge.PHONE_BAR_OPERATION,k=>{console.log(k),G(k)}),g?await S.current.agent_api.checkAgentLogin({data:{agent_no:o},success:async k=>{k.data.is_login?vO({title:"当前账号已登录!",icon:ie.jsx(Vt,{name:"wing",size:20}),content:"是否继续登录",onOk:async()=>{await S.current.init({...p,logBuiltinEnabled:n,browserAlertTime:r,enableBrowserAlert:i}),M.current=S.current.getAgentData()},onCancel:()=>{d==null||d()}}):(await S.current.init({...p,logBuiltinEnabled:n,browserAlertTime:r,enableBrowserAlert:i}),M.current=S.current.getAgentData())}}):(await S.current.init({...p,logBuiltinEnabled:n,browserAlertTime:r,enableBrowserAlert:i}),M.current=S.current.getAgentData()),N(new Date().getTime()),B(!1)))(),()=>{var k;Ee(I),Ee(R),(k=S.current)==null||k.destroy()}),[]);const nt=()=>{var k,ae;(k=S.current)==null||k.on(Ge.EVENT_ALL,({event:ee,data:Ce})=>{switch(ee){case oe.OUT_SUCCESS:case oe.CONSULT_RINGING:{je(I),Be("out");return}case oe.OUT_INCOMING_CALL:case oe.INTERNAL_OUT_INCOMING_CALL:{l==null||l(ee,{customer_phone:Ce.customer_phone,session_id:Ce.session_id});return}case oe.PREVIEW_OUT_INCOMING_CALL:{l==null||l(oe.PREVIEW_OUT_INCOMING_CALL,{customer_phone:Ce.customer_phone,session_id:Ce.session_id,preview_task_id:Ce.preview_task_id});return}case oe.OUT_OFF_ANSWER:case oe.INTERNAL_OUT_OFF_ANSWER:case oe.OUT_FAILED:case oe.CONSULT_FAILED:case oe.OUT_RINGING:case oe.CONSULT_OFF_HOOK:{ee===oe.OUT_OFF_ANSWER&&(l==null||l(ee,{session_id:Ce.session_id})),Ee(I);return}case oe.CONSULT_INCOMING:case oe.TRANSFER_INCOMING_CALL:case oe.LISTEN_INCOMING_CALL:case oe.INCOMING_CALL_IN:case oe.INCOMING_CALL:{Be("in"),(ee===oe.CONSULT_INCOMING||ee===oe.TRANSFER_INCOMING_CALL)&&(l==null||l(ee,{agent_no:Ce.agent_no,agent_name:Ce.agent_name,session_id:Ce.session_id})),ee===oe.INCOMING_CALL?l==null||l(oe.INCOMING_CALL,{customer_phone:Ce.customer_phone,session_id:Ce.session_id}):ee===oe.INCOMING_CALL_IN?l==null||l(oe.INCOMING_CALL_IN,{customer_phone:Ce.customer_phone,session_id:Ce.session_id}):ee===oe.LISTEN_INCOMING_CALL&&(l==null||l(oe.LISTEN_INCOMING_CALL,{session_id:Ce.session_id})),je(R);return}case oe.PREDICT_INCOMING_CALL:{Be("out"),ee===oe.PREDICT_INCOMING_CALL&&(l==null||l(oe.PREDICT_INCOMING_CALL,{customer_phone:Ce.customer_phone,session_id:Ce.session_id})),je(R);return}case oe.DUAL_CALL_INCOMING_CALL:{Be("out"),ee===oe.DUAL_CALL_INCOMING_CALL&&(l==null||l(oe.DUAL_CALL_INCOMING_CALL,{customer_phone:Ce.customer_phone,session_id:Ce.session_id})),je(R);return}case oe.TRANSFER_OFF_HOOK:case oe.LISTEN_INCOMING_CALL_OFF_HOOK:case oe.CONSULT_CALL_IN_SUCCESS:case oe.INCOMING_CALL_IN_OFF_HOOK:case oe.INCOMING_CALL_OFF_HOOK:{ee===oe.LISTEN_INCOMING_CALL_OFF_HOOK?l==null||l(ee,{session_id:Ce.session_id,monitored_agent_no:Ce.monitored_agent_no}):l==null||l(ee,{session_id:Ce.session_id}),Ee(R);return}case oe.OUT_HANGUP:case oe.LISTEN_HANGUP:case oe.LISTEN_CALL_FAILED:case oe.TRANSFER_END:case oe.THREE_WAY_OUR_SIDE_HANGUP:case oe.OUR_SIDE_CONSULT_HANGUP:case oe.OTHER_SIDE_CONSULT_HANGUP:case oe.INCOMING_CALL_END:{l==null||l(ee,{session_id:Ce.session_id}),Ee(R),Ee(I),Be(void 0),ce(!1),Ie(!1);return}case oe.REJECT:l==null||l(ee,{session_id:Ce.session_id});return;default:return null}}),(ae=S.current)==null||ae.on(oe.AGENT_STATE,ee=>{H(ee.state_name),N(new Date().getTime()),l==null||l(oe.AGENT_STATE,ee),ee.state===bt.UNREGISTERED&&(St.warning("当前已掉线,自动重连中,请检查网络"),Ee(I),Ee(R))}).on(oe.CALL_PROGRESS,ee=>{z(ee)}).on(Ge.WEBSITE_DELAY,ee=>{h(ee)}).on(oe.CUSTOMER_INFO,ee=>{x(ee),ee&&pe(!0)}).on(Ge.AGENT_INIT_STATUS,ee=>{if(ee){const{default_device:Ce,init_state:ze,out_display_select_switch:tt,out_display_data:Dt,stateObject:{state_name:gt}}=S.current.getAgentData();X(tt===1),tt===1&&le((Dt||"").split("#")),j(Ce),H(gt),Oe()}}).on(Ge.SELECT_EXTERNAL_NUMBER,ee=>{ne(ee)}).on(Ge.FAIL_NOTIFICATION,ee=>{Ee(I),Ee(R),St.error(ee)}).on(Ge.KICK_OFF,()=>{Ee(I),Ee(R),l?l==null||l(Ge.KICK_OFF):St.warning("您的座席账号已在别处登录,请重新登录。如非您本人操作,请及时修改密码。"),H("")}).on(Ge.DESTROY,()=>{l==null||l(Ge.DESTROY),St.success("已离线"),Ee(I),Ee(R)}).on(Ge.NETWORK_OFFLINE,()=>{St.warning("网络已断开,请检查网络设置。"),Ee(I),Ee(R)}).on(Ge.NETWORK_ONLINE,()=>{St.success("网络已恢复")}).on(Ge.SIGN_OUT,()=>{l==null||l(Ge.SIGN_OUT),St.success("已被签出"),Ee(I),Ee(R)}).on(oe.LISTEN_CALL_FAILED,()=>{l==null||l(oe.LISTEN_CALL_FAILED),St.error("监听失败")}).on(oe.EAR_SPEECH_SUCCESS,({monitored_agent_no:ee})=>{l==null||l(oe.EAR_SPEECH_SUCCESS,{monitored_agent_no:ee}),St.success("正在耳语")}).on(oe.EAR_SPEECH_BE_SUCCESS,({monitor_agent_no:ee})=>{l==null||l(oe.EAR_SPEECH_BE_SUCCESS,{monitor_agent_no:ee}),St.success(`${ee}正在与你耳语`)}).on(oe.EAR_SPEECH_FAILED,()=>{l==null||l(oe.EAR_SPEECH_FAILED),St.error("耳语失败")}).on(oe.STOP_EAR_SPEECH_SUCCESS,()=>{l==null||l(oe.STOP_EAR_SPEECH_SUCCESS),St.success("停止耳语")}).on(oe.CALL_FORCE_INSERT_SUCCESS,({monitored_agent_no:ee,monitor_agent_no:Ce})=>{l==null||l(oe.CALL_FORCE_INSERT_SUCCESS,{monitored_agent_no:ee,monitor_agent_no:Ce}),St.success("强插成功")}).on(oe.CALL_FORCE_INSERT_SUCCESS_LISTENER,({monitored_agent_no:ee,monitor_agent_no:Ce})=>{l==null||l(oe.CALL_FORCE_INSERT_SUCCESS_LISTENER,{monitored_agent_no:ee,monitor_agent_no:Ce}),St.success(`${Ce}强插`)}).on(Ge.SIGN_IN_SWITCH_DEVICE,ee=>{l==null||l(Ge.SIGN_IN_SWITCH_DEVICE),St.success(`已被切换${ee.answer_device===2?"手机模式":"SIP 话机"}设备`)}).on(oe.CALL_SIP_INCOMING_CALL,()=>{St.success("SIP话机有新的呼入")})};T.useEffect(()=>{var k;(k=S.current)==null||k.setBrowserAlertTime(r||3)},[r]),T.useEffect(()=>{var k;(k=S.current)==null||k.setBrowserAlert(i||!1)},[i]);const je=k=>{k.currentTime=0,k.loop=!0,k.play()},Ee=k=>{k.pause()},We=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.agent_api.changeDevice({data:{device:k},success:()=>{j(k),St.success("切换设备成功")}}))}catch{}},ct=async(k,ae)=>{var ee;try{await((ee=S.current)==null?void 0:ee.agent_api.changeState({data:{state:k,state_name:ae},success:()=>{H(ae),St.success("切换状态成功")}}))}catch{}},_e=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.agent_api.setAgentExplicit({data:{number:k},success:()=>{St.success(`切换[${k}]外显号码成功`)}}))}catch{}},Oe=async()=>{var k;try{await((k=S.current)==null?void 0:k.agent_api.getAgentState({success:ae=>{K(ae.data)}}))}catch{}},Re=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.call_api.makeCall(k))}catch(ee){const{msg:Ce}=JSON.parse(ee.message);St.warning(Ce)}},At=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.answerCall())}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},at=async()=>{var k;try{(k=S.current)==null||k.call_api.cancelCall()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},vt=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.hangup())}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Tt=async()=>{var k;try{(k=S.current)==null||k.call_api.holdCall()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Wt=()=>{var k;(k=S.current)==null||k.call_api.unholdCall()},Jt=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.call_api.consultCall(k))}catch(ee){const{msg:Ce}=JSON.parse(ee.message);St.warning(Ce)}},en=async()=>{var k;try{(k=S.current)==null||k.call_api.consultRetrieve()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Xt=async()=>{var k;try{(k=S.current)==null||k.call_api.consultTransfer()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Yt=()=>{var k;try{(k=S.current)==null||k.call_api.mute()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Mt=()=>{var k;try{(k=S.current)==null||k.call_api.unmute()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},pt=()=>{var k;try{(k=S.current)==null||k.call_api.satisfactionEvaluation()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},He=()=>{var k;try{(k=S.current)==null||k.call_api.startConference()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Xe=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.call_api.transferAgent(k))}catch(ee){const{msg:Ce}=JSON.parse(ee.message);St.warning(Ce)}},xe=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.call_api.transferOutline(k))}catch(ee){const{msg:Ce}=JSON.parse(ee.message);St.warning(Ce)}},it=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.earSpeakStart({success:()=>{}}))}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},mt=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.earSpeakStop({success:()=>{}}))}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},De=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.forceInsert({}))}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},we=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.forceDisconnect({}))}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Ye=ie.jsx(oO,{onPressEnter:k=>{k&&Re(k)}},Qe),Ke=T.useMemo(()=>[{name:"call_number",icon:ie.jsx(Io,{trigger:"click",rootClassName:"call-number-popover",destroyTooltipOnHide:!0,onOpenChange:ae=>{ke(new Date().getTime())},content:Ye,children:ie.jsx(Vt,{name:"boda",color:"#48D866",size:25})})},{name:"answer",icon:ie.jsx(Vt,{name:"jieting",onClick:At,size:25})},{name:"hold",icon:ie.jsx(Vt,{name:"baochi",color:"#1D92E9",onClick:Tt,size:25})},{name:"unhold",icon:ie.jsx(Vt,{name:"quxiaobaochi",color:"#1D92E9",onClick:Wt,size:25})},{name:"mute",icon:ie.jsx(Vt,{name:"mk",onClick:Yt,color:"#1D92E9",size:25})},{name:"unmute",icon:ie.jsx(Vt,{name:"guanbimk",onClick:Mt,color:"#1D92E9",size:25})},{name:"satisfaction",icon:ie.jsx(Vt,{name:"manyidu",onClick:pt,size:25})},{name:"consult",icon:ie.jsx(Vt,{name:"zixun",onClick:()=>{ce(!0)},size:25})},{name:"consult_transfer",icon:ie.jsx(Vt,{name:"zhuanjie",onClick:Xt,size:25})},{name:"transfer",icon:ie.jsx(Vt,{size:25,name:"zhuanjie",onClick:()=>{Ie(!0)}})},{name:"consult_retrieve",icon:ie.jsx(Vt,{name:"fanhui",color:"#ffc53d",size:25,onClick:en})},{name:"conference",icon:ie.jsx(Vt,{name:"huiyi",onClick:He,size:25})},{name:"whisper",icon:ie.jsx(hc,{bg:"#1D92E9",children:ie.jsx(Vt,{name:"whisper",size:15,color:"#fff",onClick:it})})},{name:"cancel_whisper",icon:ie.jsx(hc,{bg:"red",children:ie.jsx(Vt,{name:"cancel_whisper",size:15,color:"#fff",onClick:mt})})},{name:"force_insert",icon:ie.jsx(hc,{bg:"#1D92E9",children:ie.jsx(Vt,{name:"force_insert",size:15,color:"#fff",onClick:De})})},{name:"force_disconnect",icon:ie.jsx(Vt,{name:"force_disconnect",onClick:we,size:25})},{name:"reject",icon:ie.jsx(Vt,{name:"jujie",color:"red",onClick:at,size:25})},{name:"hangup",icon:ie.jsx(Vt,{name:"guaji",color:"red",onClick:vt,size:25})},{name:"dtmf",icon:ie.jsx(Io,{trigger:"click",onOpenChange:()=>{Le("")},title:ie.jsx(ui,{style:{borderRadius:20,textAlign:"center"},placeholder:"点击进行发送按键",value:Me}),content:ie.jsx("div",{style:{width:300},children:ie.jsx(MC,{onCallBack:ae=>{var Ce;const ee=Me+ae;Le(ee),(Ce=S.current)==null||Ce.call_api.sendDTMF(ae)}})}),children:ie.jsx(Vt,{name:"dtmf",size:25})})}].filter(({name:ae})=>L.includes(ae)),[L,Me]);return ie.jsx(ie.Fragment,{children:ie.jsxs(Wr,{prefixCls:"ysyt",theme:{components:{Select:{selectorBg:"none"}}},children:[Y?ie.jsx(vl,{spinning:b,children:ie.jsxs(HS,{height:V,children:[ie.jsx(KS,{children:ie.jsx(so,{variant:"underlined",value:F,onChange:k=>{We(k)},options:(((Ue=S.current.getAgentData())==null?void 0:Ue.answer_devices)||[]).map(k=>({...k,label:ie.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[CO[k.value],ie.jsx("span",{style:{marginLeft:5},children:k.label})]})})),style:{width:140}})}),ie.jsxs(ZS,{background:et(EO[Y]??2),children:[ie.jsxs("div",{className:"ysyt-strip",children:[ie.jsx("div",{children:J?ie.jsx("span",{className:"ysyt-strip-state-name",children:J}):ie.jsx(X1,{trigger:["click"],menu:{items:_.map(k=>({label:ie.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[k.state===1?ie.jsx(Vt,{name:"kongxian",color:"#7cb305",size:16}):ie.jsx(Vt,{name:"manglu",color:"#f5222d",size:16}),ie.jsx("span",{style:{marginLeft:10},children:k.state_name})]}),key:k.state_name,onClick:()=>{ct(k.state,k.state_name)}}))},children:ie.jsxs("div",{style:{color:"#fff",cursor:"pointer",display:"flex",alignItems:"center"},children:[Y==="空闲"?ie.jsx(Vt,{name:"kongxian",color:"#fff",size:20}):ie.jsx(ie.Fragment,{children:Y==="未注册"?ie.jsx(Vt,{name:"unregistered",size:20}):ie.jsx(Vt,{name:"manglu2",size:20})}),ie.jsx("span",{style:{margin:"0 10px"},children:Y}),ie.jsx(Vt,{name:"xia",color:"#fff"})]})})}),ie.jsx("div",{className:"ysyt-strip-time",children:ie.jsx(sO,{},O)}),u&&y&&ie.jsx("div",{className:"ysyt-strip-call-card",onClick:()=>pe(!Se),children:Se?ie.jsx(Vt,{name:"unopen",color:"#fff"}):ie.jsx(Vt,{name:"open",color:"#fff"})})]}),ie.jsx("div",{className:"ysyt-action",children:Ke.map(({name:k,icon:ae})=>ie.jsx(Aa,{title:qO[k],children:ae},k))}),te&&ie.jsx(rI,{children:ie.jsx("div",{children:ie.jsx(Io,{trigger:"click",title:"外显号码池",onOpenChange:k=>{k||Z("")},content:ie.jsxs(iI,{children:[ie.jsx("div",{children:ie.jsx(ui,{value:me,placeholder:"请输入外显号码",onChange:k=>Z(k.target.value)})}),ie.jsx("div",{className:"ysyt-number-content",children:ie.jsx(ea.Group,{value:ue,onChange:k=>{_e(k.target.value)},options:Ae.filter(k=>k.includes(me)).map(k=>({label:ie.jsx(oI,{style:{color:ue===k?"#1D92E9":""},children:k},k),value:k}))})})]}),children:ie.jsxs("div",{style:{fontSize:14,cursor:"pointer",color:w||"#333",display:"flex",alignItems:"center"},children:[ie.jsx(Vt,{name:"external",color:w||"#333"}),ie.jsx("span",{style:{margin:"0 5px"},children:"外显号码"}),ie.jsx(Vt,{name:"xia",color:w||"#333"})]})})})})]}),ie.jsx($S,{children:E&&E.rtt&&ie.jsx("div",{children:ie.jsx(Io,{content:ie.jsxs("div",{children:[ie.jsxs("div",{children:["延迟: ",E.rtt,"ms"]}),E.jitter&&ie.jsxs("div",{children:["抖动: ",E.jitter,"ms"]}),ie.jsxs("div",{children:["丢包: ",E.packetsLost||0]}),E.packetsReceived?ie.jsxs("div",{children:["接收: ",E.packetsReceived]}):null,E.packetsSent?ie.jsxs("div",{children:["发送: ",E.packetsSent]}):null,E.sendBitrate?ie.jsxs("div",{children:["发送码率: ",E.sendBitrate,"KB/s"]}):null,E.recvBitrate?ie.jsxs("div",{children:["接收码率: ",E.recvBitrate,"KB/s"]}):null]}),placement:"bottomLeft",children:ie.jsxs("div",{style:{padding:"0 10px"},children:[E.rtt>=250?ie.jsx(Vt,{name:"wifi1"}):"",E.rtt>=121&&E.rtt<250?ie.jsx(Vt,{name:"wifi2"}):"",E.rtt<=120?ie.jsx(Vt,{name:"wifi3"}):""]})})})}),u&&ie.jsxs(nI,{height:V,show:!!y&&Se,children:[ie.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:10},children:[ie.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[(y==null?void 0:y.is_vip)===1&&ie.jsx(Vt,{name:"vip"}),ie.jsx("span",{style:{marginLeft:5},children:y==null?void 0:y.customer_name})]}),ie.jsx("b",{children:y==null?void 0:y.phone})]}),ie.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[ie.jsxs("span",{children:[y==null?void 0:y.province,"-",y==null?void 0:y.city]}),Ve&&ie.jsxs("span",{children:["当月",Ve==="out"?"呼出次数:":"呼入次数:",ie.jsx("span",{style:{color:"#1D92E9"},children:Ve==="out"?y==null?void 0:y.contact_count_month:y==null?void 0:y.in_contact_count_month})]})]}),ie.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:Ve&&ie.jsxs("span",{children:["总",Ve==="out"?"呼出次数:":"呼入次数:",ie.jsx("span",{style:{color:"#1D92E9"},children:Ve==="out"?(y==null?void 0:y.contact_count)||0:(y==null?void 0:y.in_contact_count)||0})]})})]})]})}):ie.jsx(ie.Fragment,{}),ie.jsx(T.Suspense,{children:de&&((D=S.current)==null?void 0:D.agent_api)&&ie.jsx(yO,{open:de,queryFetch:S.current.agent_api.getIdleAgentList,onCallBack:k=>{ce(!1),k&&Jt(k)}})}),ie.jsx(T.Suspense,{children:ye&&((fe=S.current)==null?void 0:fe.agent_api)&&ie.jsx(wO,{open:ye,queryFetch:S.current.agent_api.getIdleAgentList,onCallBack:(k,ae)=>{Ie(!1),k&&(ae===0?Xe(k):ae===1&&xe(k))}})})]})})},IO=t=>{var e;return(e=Bn.getInstance())==null?void 0:e.call_api.makeCall(t)},bO=()=>{var t;return(t=Bn.getInstance())==null?void 0:t.getRealTimeCustomerInfo()},MO=async t=>{var e,n;if(t!==bt.IDLE&&t!==bt.BUSY)throw new Error("Invalid agent state");try{await((n=(e=Bn.getInstance())==null?void 0:e.agent_api)==null?void 0:n.changeState({data:{state:t,state_name:t===bt.IDLE?"空闲":"忙碌"}}))}catch(r){console.error(r)}},RO=async t=>{var e,n;try{await((n=(e=Bn.getInstance())==null?void 0:e.agent_api)==null?void 0:n.changeDevice({data:{device:t}}))}catch(r){console.error(r)}},xO=async(t=!1,e)=>{var n,r;try{await((r=(n=Bn.getInstance())==null?void 0:n.agent_api)==null?void 0:r.agentLogout({data:{offline_answer:t},success:()=>{e==null||e()}}))}catch(i){console.log(i)}},TO=async(t,e)=>{var n,r;(r=(n=Bn.getInstance())==null?void 0:n.call_api)==null||r.previewMakeCall(t,e)},BO=async t=>{var e,n;try{await((n=(e=Bn.getInstance())==null?void 0:e.agent_api)==null?void 0:n.listenAgentCall({data:{monitored_agent_no:t},success:()=>{St.success("监听坐席通话成功")}}))}catch(r){console.error(r)}},OO=async()=>{var t,e;try{await((e=(t=Bn.getInstance())==null?void 0:t.call_api)==null?void 0:e.earSpeakStart({}))}catch(n){console.log(n)}},DO=async()=>{var t,e;try{await((e=(t=Bn.getInstance())==null?void 0:t.call_api)==null?void 0:e.earSpeakStop({}))}catch(n){console.log(n)}},NO=async()=>{var t,e;try{await((e=(t=Bn.getInstance())==null?void 0:t.call_api)==null?void 0:e.forceInsert({}))}catch(n){console.log(n)}},FO=async()=>{var t,e;try{await((e=(t=Bn.getInstance())==null?void 0:t.call_api)==null?void 0:e.forceDisconnect({}))}catch(n){console.log(n)}};exports.Button=ro;exports.CONTAINER_MAX_OFFSET=ng;exports.CSSMotion=oo;exports.ConfigContext=Qt;exports.ConfigProvider=Wr;exports.ContextIsolator=NA;exports.DisabledContextProvider=PV;exports.Empty=Ai;exports.FastColor=Pt;exports.Input=ui;exports.KeyCode=ot;exports.Keyframe=Ft;exports.ModelBody=_S;exports.Portal=cl;exports.Radio=ea;exports.RefIcon=pl;exports.RefIcon$1=Eg;exports.RefIcon$2=ta;exports.RefIcon$3=qg;exports.RefIcon$4=yg;exports.Space=hl;exports.Spin=vl;exports.Wave=_s;exports.YsytBarPhone=SO;exports.YsytIconSvg=Vt;exports._extends=Fe;exports._objectSpread2=U;exports._slicedToArray=$;exports._toConsumableArray=be;exports._typeof=$e;exports.agentLogout=xO;exports.callForceInsert=NO;exports.callForceSplit=FO;exports.canUseDom=Qn;exports.classNames=se;exports.clearFix=rs;exports.contains=Xm;exports.convertLegacyProps=W4;exports.devUseWarning=an;exports.genFocusStyle=is;exports.genPresetColor=FV;exports.genStyleHooks=bn;exports.genSubStyleComponent=NV;exports.getConfirmLocale=HE;exports.getCustomerInfo=bO;exports.getReactRender=Ag;exports.getTransitionName=rl;exports.globalConfig=kd;exports.initMotion=Js;exports.initZoomMotion=zA;exports.isPresetColor=H1;exports.isPresetStatusColor=wT;exports.jsxRuntimeExports=ie;exports.listenCall=BO;exports.localeValues=eo;exports.makeCall=IO;exports.merge=Zt;exports.omit=$n;exports.pickAttrs=Oi;exports.previewMakeCall=TO;exports.replaceElement=Tv;exports.resetComponent=Hn;exports.setAgentDevice=RO;exports.setAgentInitState=MO;exports.startEarSpeak=OO;exports.stopEarSpeak=DO;exports.unit=ve;exports.useCSSVarCls=Ur;exports.useComponentConfig=Jr;exports.useComposeRef=Fi;exports.useEvent=nn;exports.useId=$s;exports.useLocale=Qs;exports.useSafeState=Do;exports.useToken=lr;exports.useZIndex=WA;exports.warnContext=r0;exports.warning=xi;exports.withPureRenderTheme=S1;exports.zIndexContext=JA;
|
|
694
|
+
`,SO=t=>{var Ue,D,fe;const{style:e,logBuiltinEnabled:n,browserAlertTime:r,enableBrowserAlert:i,agentNo:o,appKey:A,appSecret:a,url:s,onCallBack:l,ringingCardShow:u=!0,onLoginCancel:d,isCheckLogin:g,...p}=t,{height:V,busy:v,idle:m,unavailable:C,selectOutNumberColor:w}=e||{},S=T.useRef(),M=T.useRef(),[I,f]=T.useState(new Audio(lO)),[R,q]=T.useState(new Audio(cO)),[E,h]=T.useState(),[y,x]=T.useState(),[b,B]=T.useState(!1),[O,N]=T.useState(new Date().getTime()),[F,j]=T.useState(),[Y,H]=T.useState(),[L,G]=T.useState([]),[_,K]=T.useState([]),[W,z]=T.useState(""),[te,X]=T.useState(!1),[Ae,le]=T.useState([]),[ue,ne]=T.useState(""),[me,Z]=T.useState(""),[de,ce]=T.useState(!1),[ye,Ie]=T.useState(!1),[Ve,Be]=T.useState(),[Qe,ke]=T.useState(new Date().getTime()),[Se,pe]=T.useState(!0),[Me,Le]=T.useState(""),et=k=>{switch(k){case bt.IDLE:return m||"#1D92E9";case bt.BUSY:return v||"#F5212D";case bt.UNREGISTERED:return C||"#faad14";case bt.OFFLINE:return C||"#8c8c8c";default:return"#1D92E9"}};T.useEffect(()=>((async()=>(B(!0),S.current=Bn.getInstance({agentNo:o,appKey:A,appSecret:a,url:s}),nt(),S.current.on(Ge.PHONE_BAR_OPERATION,k=>{console.log(k),G(k)}),g?await S.current.agent_api.checkAgentLogin({data:{agent_no:o},success:async k=>{k.data.is_login?vO({title:"当前账号已登录!",icon:ie.jsx(Vt,{name:"wing",size:20}),content:"是否继续登录",onOk:async()=>{await S.current.init({...p,logBuiltinEnabled:n,browserAlertTime:r,enableBrowserAlert:i}),M.current=S.current.getAgentData()},onCancel:()=>{d==null||d()}}):(await S.current.init({...p,logBuiltinEnabled:n,browserAlertTime:r,enableBrowserAlert:i}),M.current=S.current.getAgentData())}}):(await S.current.init({...p,logBuiltinEnabled:n,browserAlertTime:r,enableBrowserAlert:i}),M.current=S.current.getAgentData()),N(new Date().getTime()),B(!1)))(),()=>{var k;Ee(I),Ee(R),(k=S.current)==null||k.destroy()}),[]);const nt=()=>{var k,ae;(k=S.current)==null||k.on(Ge.EVENT_ALL,({event:ee,data:Ce})=>{switch(ee){case oe.OUT_SUCCESS:case oe.CONSULT_RINGING:{je(I),Be("out");return}case oe.OUT_INCOMING_CALL:case oe.INTERNAL_OUT_INCOMING_CALL:{l==null||l(ee,{customer_phone:Ce.customer_phone,session_id:Ce.session_id});return}case oe.PREVIEW_OUT_INCOMING_CALL:{l==null||l(oe.PREVIEW_OUT_INCOMING_CALL,{customer_phone:Ce.customer_phone,session_id:Ce.session_id,preview_task_id:Ce.preview_task_id});return}case oe.OUT_OFF_ANSWER:case oe.INTERNAL_OUT_OFF_ANSWER:case oe.OUT_FAILED:case oe.CONSULT_FAILED:case oe.OUT_RINGING:case oe.CONSULT_OFF_HOOK:{ee===oe.OUT_OFF_ANSWER&&(l==null||l(ee,{session_id:Ce.session_id})),Ee(I);return}case oe.CONSULT_INCOMING:case oe.TRANSFER_INCOMING_CALL:case oe.LISTEN_INCOMING_CALL:case oe.INCOMING_CALL_IN:case oe.INCOMING_CALL:{Be("in"),(ee===oe.CONSULT_INCOMING||ee===oe.TRANSFER_INCOMING_CALL)&&(l==null||l(ee,{agent_no:Ce.agent_no,agent_name:Ce.agent_name,session_id:Ce.session_id})),ee===oe.INCOMING_CALL?l==null||l(oe.INCOMING_CALL,{customer_phone:Ce.customer_phone,session_id:Ce.session_id}):ee===oe.INCOMING_CALL_IN?l==null||l(oe.INCOMING_CALL_IN,{customer_phone:Ce.customer_phone,session_id:Ce.session_id}):ee===oe.LISTEN_INCOMING_CALL&&(l==null||l(oe.LISTEN_INCOMING_CALL,{session_id:Ce.session_id})),je(R);return}case oe.PREDICT_INCOMING_CALL:{Be("out"),ee===oe.PREDICT_INCOMING_CALL&&(l==null||l(oe.PREDICT_INCOMING_CALL,{customer_phone:Ce.customer_phone,session_id:Ce.session_id})),je(R);return}case oe.DUAL_CALL_INCOMING_CALL:{Be("out"),ee===oe.DUAL_CALL_INCOMING_CALL&&(l==null||l(oe.DUAL_CALL_INCOMING_CALL,{customer_phone:Ce.customer_phone,session_id:Ce.session_id})),je(R);return}case oe.TRANSFER_OFF_HOOK:case oe.LISTEN_INCOMING_CALL_OFF_HOOK:case oe.CONSULT_CALL_IN_SUCCESS:case oe.INCOMING_CALL_IN_OFF_HOOK:case oe.INCOMING_CALL_OFF_HOOK:{ee===oe.LISTEN_INCOMING_CALL_OFF_HOOK?l==null||l(ee,{session_id:Ce.session_id,monitored_agent_no:Ce.monitored_agent_no}):l==null||l(ee,{session_id:Ce.session_id}),Ee(R);return}case oe.OUT_HANGUP:case oe.LISTEN_HANGUP:case oe.LISTEN_CALL_FAILED:case oe.TRANSFER_END:case oe.THREE_WAY_OUR_SIDE_HANGUP:case oe.OUR_SIDE_CONSULT_HANGUP:case oe.OTHER_SIDE_CONSULT_HANGUP:case oe.INCOMING_CALL_END:{l==null||l(ee,{session_id:Ce.session_id}),Ee(R),Ee(I),Be(void 0),ce(!1),Ie(!1);return}case oe.REJECT:l==null||l(ee,{session_id:Ce.session_id});return;default:return null}}),(ae=S.current)==null||ae.on(oe.AGENT_STATE,ee=>{H(ee.state_name),N(new Date().getTime()),l==null||l(oe.AGENT_STATE,ee),ee.state===bt.UNREGISTERED&&(St.warning("当前已掉线,自动重连中,请检查网络"),Ee(I),Ee(R))}).on(oe.CALL_PROGRESS,ee=>{z(ee)}).on(Ge.WEBSITE_DELAY,ee=>{h(ee)}).on(oe.CUSTOMER_INFO,ee=>{x(ee),ee&&pe(!0)}).on(Ge.AGENT_INIT_STATUS,ee=>{if(ee){const{default_device:Ce,init_state:ze,out_display_select_switch:tt,out_display_data:Dt,stateObject:{state_name:gt}}=S.current.getAgentData();X(tt===1),tt===1&&le((Dt||"").split("#")),j(Ce),H(gt),Oe()}}).on(Ge.SELECT_EXTERNAL_NUMBER,ee=>{ne(ee)}).on(Ge.FAIL_NOTIFICATION,ee=>{Ee(I),Ee(R),St.error(ee)}).on(Ge.KICK_OFF,()=>{Ee(I),Ee(R),l?l==null||l(Ge.KICK_OFF):St.warning("您的座席账号已在别处登录,请重新登录。如非您本人操作,请及时修改密码。"),H("")}).on(Ge.DESTROY,()=>{l==null||l(Ge.DESTROY),St.success("已离线"),Ee(I),Ee(R)}).on(Ge.NETWORK_OFFLINE,()=>{St.warning("网络已断开,请检查网络设置。"),Ee(I),Ee(R)}).on(Ge.NETWORK_ONLINE,()=>{St.success("网络已恢复")}).on(Ge.SIGN_OUT,()=>{l==null||l(Ge.SIGN_OUT),St.success("已被签出"),Ee(I),Ee(R)}).on(oe.LISTEN_CALL_FAILED,()=>{l==null||l(oe.LISTEN_CALL_FAILED),St.error("监听失败")}).on(oe.EAR_SPEECH_SUCCESS,({monitored_agent_no:ee})=>{l==null||l(oe.EAR_SPEECH_SUCCESS,{monitored_agent_no:ee}),St.success("正在耳语")}).on(oe.EAR_SPEECH_BE_SUCCESS,({monitor_agent_no:ee})=>{l==null||l(oe.EAR_SPEECH_BE_SUCCESS,{monitor_agent_no:ee}),St.success(`${ee}正在与你耳语`)}).on(oe.EAR_SPEECH_FAILED,()=>{l==null||l(oe.EAR_SPEECH_FAILED),St.error("耳语失败")}).on(oe.STOP_EAR_SPEECH_SUCCESS,()=>{l==null||l(oe.STOP_EAR_SPEECH_SUCCESS),St.success("停止耳语")}).on(oe.CALL_FORCE_INSERT_SUCCESS,({monitored_agent_no:ee,monitor_agent_no:Ce})=>{l==null||l(oe.CALL_FORCE_INSERT_SUCCESS,{monitored_agent_no:ee,monitor_agent_no:Ce}),St.success("强插成功")}).on(oe.CALL_FORCE_INSERT_SUCCESS_LISTENER,({monitored_agent_no:ee,monitor_agent_no:Ce})=>{l==null||l(oe.CALL_FORCE_INSERT_SUCCESS_LISTENER,{monitored_agent_no:ee,monitor_agent_no:Ce}),St.success(`${Ce}强插`)}).on(Ge.SIGN_IN_SWITCH_DEVICE,ee=>{l==null||l(Ge.SIGN_IN_SWITCH_DEVICE),St.success(`已被切换${ee.answer_device===2?"手机模式":"SIP 话机"}设备`)}).on(oe.CALL_SIP_INCOMING_CALL,()=>{St.success("SIP话机有新的呼入")})};T.useEffect(()=>{var k;(k=S.current)==null||k.setBrowserAlertTime(r||3)},[r]),T.useEffect(()=>{var k;(k=S.current)==null||k.setBrowserAlert(i||!1)},[i]);const je=k=>{k.currentTime=0,k.loop=!0,k.play()},Ee=k=>{k.pause()},We=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.agent_api.changeDevice({data:{device:k},success:()=>{j(k),St.success("切换设备成功")}}))}catch{}},ct=async(k,ae)=>{var ee;try{await((ee=S.current)==null?void 0:ee.agent_api.changeState({data:{state:k,state_name:ae},success:()=>{H(ae),St.success("切换状态成功")}}))}catch{}},_e=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.agent_api.setAgentExplicit({data:{number:k},success:()=>{St.success(`切换[${k}]外显号码成功`)}}))}catch{}},Oe=async()=>{var k;try{await((k=S.current)==null?void 0:k.agent_api.getAgentState({success:ae=>{K(ae.data)}}))}catch{}},Re=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.call_api.makeCall(k))}catch(ee){const{msg:Ce}=JSON.parse(ee.message);St.warning(Ce)}},At=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.answerCall())}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},at=async()=>{var k;try{(k=S.current)==null||k.call_api.cancelCall()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},vt=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.hangup())}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Tt=async()=>{var k;try{(k=S.current)==null||k.call_api.holdCall()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Wt=()=>{var k;(k=S.current)==null||k.call_api.unholdCall()},Jt=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.call_api.consultCall(k))}catch(ee){const{msg:Ce}=JSON.parse(ee.message);St.warning(Ce)}},en=async()=>{var k;try{(k=S.current)==null||k.call_api.consultRetrieve()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Xt=async()=>{var k;try{(k=S.current)==null||k.call_api.consultTransfer()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Yt=()=>{var k;try{(k=S.current)==null||k.call_api.mute()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Mt=()=>{var k;try{(k=S.current)==null||k.call_api.unmute()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},pt=()=>{var k;try{(k=S.current)==null||k.call_api.satisfactionEvaluation()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},He=()=>{var k;try{(k=S.current)==null||k.call_api.startConference()}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Xe=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.call_api.transferAgent(k))}catch(ee){const{msg:Ce}=JSON.parse(ee.message);St.warning(Ce)}},xe=async k=>{var ae;try{await((ae=S.current)==null?void 0:ae.call_api.transferOutline(k))}catch(ee){const{msg:Ce}=JSON.parse(ee.message);St.warning(Ce)}},it=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.earSpeakStart({success:()=>{}}))}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},mt=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.earSpeakStop({success:()=>{}}))}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},De=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.forceInsert({}))}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},we=async()=>{var k;try{await((k=S.current)==null?void 0:k.call_api.forceDisconnect({}))}catch(ae){const{msg:ee}=JSON.parse(ae.message);St.warning(ee)}},Ye=ie.jsx(oO,{onPressEnter:k=>{k&&Re(k)}},Qe),Ke=T.useMemo(()=>[{name:"call_number",icon:ie.jsx(Io,{trigger:"click",rootClassName:"call-number-popover",destroyTooltipOnHide:!0,onOpenChange:ae=>{ke(new Date().getTime())},content:Ye,children:ie.jsx(Vt,{name:"boda",color:"#48D866",size:25})})},{name:"answer",icon:ie.jsx(Vt,{name:"jieting",onClick:At,size:25})},{name:"hold",icon:ie.jsx(Vt,{name:"baochi",color:"#1D92E9",onClick:Tt,size:25})},{name:"unhold",icon:ie.jsx(Vt,{name:"quxiaobaochi",color:"#1D92E9",onClick:Wt,size:25})},{name:"mute",icon:ie.jsx(Vt,{name:"mk",onClick:Yt,color:"#1D92E9",size:25})},{name:"unmute",icon:ie.jsx(Vt,{name:"guanbimk",onClick:Mt,color:"#1D92E9",size:25})},{name:"satisfaction",icon:ie.jsx(Vt,{name:"manyidu",onClick:pt,size:25})},{name:"consult",icon:ie.jsx(Vt,{name:"zixun",onClick:()=>{ce(!0)},size:25})},{name:"consult_transfer",icon:ie.jsx(Vt,{name:"zhuanjie",onClick:Xt,size:25})},{name:"transfer",icon:ie.jsx(Vt,{size:25,name:"zhuanjie",onClick:()=>{Ie(!0)}})},{name:"consult_retrieve",icon:ie.jsx(Vt,{name:"fanhui",color:"#ffc53d",size:25,onClick:en})},{name:"conference",icon:ie.jsx(Vt,{name:"huiyi",onClick:He,size:25})},{name:"whisper",icon:ie.jsx(hc,{bg:"#1D92E9",children:ie.jsx(Vt,{name:"whisper",size:15,color:"#fff",onClick:it})})},{name:"cancel_whisper",icon:ie.jsx(hc,{bg:"red",children:ie.jsx(Vt,{name:"cancel_whisper",size:15,color:"#fff",onClick:mt})})},{name:"force_insert",icon:ie.jsx(hc,{bg:"#1D92E9",children:ie.jsx(Vt,{name:"force_insert",size:15,color:"#fff",onClick:De})})},{name:"force_disconnect",icon:ie.jsx(Vt,{name:"force_disconnect",onClick:we,size:25})},{name:"reject",icon:ie.jsx(Vt,{name:"jujie",color:"red",onClick:at,size:25})},{name:"hangup",icon:ie.jsx(Vt,{name:"guaji",color:"red",onClick:vt,size:25})},{name:"dtmf",icon:ie.jsx(Io,{trigger:"click",onOpenChange:()=>{Le("")},title:ie.jsx(ui,{style:{borderRadius:20,textAlign:"center"},placeholder:"点击进行发送按键",value:Me}),content:ie.jsx("div",{style:{width:300},children:ie.jsx(MC,{onCallBack:ae=>{var Ce;const ee=Me+ae;Le(ee),(Ce=S.current)==null||Ce.call_api.sendDTMF(ae)}})}),children:ie.jsx(Vt,{name:"dtmf",size:25})})}].filter(({name:ae})=>L.includes(ae)),[L,Me]);return ie.jsx(ie.Fragment,{children:ie.jsxs(Wr,{prefixCls:"ysyt",theme:{components:{Select:{selectorBg:"none"}}},children:[Y?ie.jsx(vl,{spinning:b,children:ie.jsxs(HS,{height:V,children:[ie.jsx(KS,{children:ie.jsx(so,{variant:"underlined",value:F,onChange:k=>{We(k)},options:(((Ue=S.current.getAgentData())==null?void 0:Ue.answer_devices)||[]).map(k=>({...k,label:ie.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[CO[k.value],ie.jsx("span",{style:{marginLeft:5},children:k.label})]})})),style:{width:140}})}),ie.jsxs(ZS,{background:et(EO[Y]??2),children:[ie.jsxs("div",{className:"ysyt-strip",children:[ie.jsx("div",{children:W?ie.jsx("span",{className:"ysyt-strip-state-name",children:W}):ie.jsx(X1,{trigger:["click"],menu:{items:_.map(k=>({label:ie.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[k.state===1?ie.jsx(Vt,{name:"kongxian",color:"#7cb305",size:16}):ie.jsx(Vt,{name:"manglu",color:"#f5222d",size:16}),ie.jsx("span",{style:{marginLeft:10},children:k.state_name})]}),key:k.state_name,onClick:()=>{ct(k.state,k.state_name)}}))},children:ie.jsxs("div",{style:{color:"#fff",cursor:"pointer",display:"flex",alignItems:"center"},children:[Y==="空闲"?ie.jsx(Vt,{name:"kongxian",color:"#fff",size:20}):ie.jsx(ie.Fragment,{children:Y==="未注册"?ie.jsx(Vt,{name:"unregistered",size:20}):ie.jsx(Vt,{name:"manglu2",size:20})}),ie.jsx("span",{style:{margin:"0 10px"},children:Y}),ie.jsx(Vt,{name:"xia",color:"#fff"})]})})}),ie.jsx("div",{className:"ysyt-strip-time",children:ie.jsx(sO,{},O)}),u&&y&&ie.jsx("div",{className:"ysyt-strip-call-card",onClick:()=>pe(!Se),children:Se?ie.jsx(Vt,{name:"unopen",color:"#fff"}):ie.jsx(Vt,{name:"open",color:"#fff"})})]}),ie.jsx("div",{className:"ysyt-action",children:Ke.map(({name:k,icon:ae})=>ie.jsx(Aa,{title:qO[k],children:ae},k))}),te&&ie.jsx(rI,{children:ie.jsx("div",{children:ie.jsx(Io,{trigger:"click",title:"外显号码池",onOpenChange:k=>{k||Z("")},content:ie.jsxs(iI,{children:[ie.jsx("div",{children:ie.jsx(ui,{value:me,placeholder:"请输入外显号码",onChange:k=>Z(k.target.value)})}),ie.jsx("div",{className:"ysyt-number-content",children:ie.jsx(ea.Group,{value:ue,onChange:k=>{_e(k.target.value)},options:Ae.filter(k=>k.includes(me)).map(k=>({label:ie.jsx(oI,{style:{color:ue===k?"#1D92E9":""},children:k},k),value:k}))})})]}),children:ie.jsxs("div",{style:{fontSize:14,cursor:"pointer",color:w||"#333",display:"flex",alignItems:"center"},children:[ie.jsx(Vt,{name:"external",color:w||"#333"}),ie.jsx("span",{style:{margin:"0 5px"},children:"外显号码"}),ie.jsx(Vt,{name:"xia",color:w||"#333"})]})})})})]}),ie.jsx($S,{children:E&&E.rtt&&ie.jsx("div",{children:ie.jsx(Io,{content:ie.jsxs("div",{children:[ie.jsxs("div",{children:["延迟: ",E.rtt,"ms"]}),E.jitter&&ie.jsxs("div",{children:["抖动: ",E.jitter,"ms"]}),ie.jsxs("div",{children:["丢包: ",E.packetsLost||0]}),E.packetsReceived?ie.jsxs("div",{children:["接收: ",E.packetsReceived]}):null,E.packetsSent?ie.jsxs("div",{children:["发送: ",E.packetsSent]}):null,E.sendBitrate?ie.jsxs("div",{children:["发送码率: ",E.sendBitrate,"KB/s"]}):null,E.recvBitrate?ie.jsxs("div",{children:["接收码率: ",E.recvBitrate,"KB/s"]}):null]}),placement:"bottomLeft",children:ie.jsxs("div",{style:{padding:"0 10px"},children:[E.rtt>=250?ie.jsx(Vt,{name:"wifi1"}):"",E.rtt>=121&&E.rtt<250?ie.jsx(Vt,{name:"wifi2"}):"",E.rtt<=120?ie.jsx(Vt,{name:"wifi3"}):""]})})})}),u&&ie.jsxs(nI,{height:V,show:!!y&&Se,children:[ie.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:10},children:[ie.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[(y==null?void 0:y.is_vip)===1&&ie.jsx(Vt,{name:"vip"}),ie.jsx("span",{style:{marginLeft:5},children:y==null?void 0:y.customer_name})]}),ie.jsx("b",{children:y==null?void 0:y.phone})]}),ie.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[ie.jsxs("span",{children:[y==null?void 0:y.province,"-",y==null?void 0:y.city]}),Ve&&ie.jsxs("span",{children:["当月",Ve==="out"?"呼出次数:":"呼入次数:",ie.jsx("span",{style:{color:"#1D92E9"},children:Ve==="out"?y==null?void 0:y.contact_count_month:y==null?void 0:y.in_contact_count_month})]})]}),ie.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:Ve&&ie.jsxs("span",{children:["总",Ve==="out"?"呼出次数:":"呼入次数:",ie.jsx("span",{style:{color:"#1D92E9"},children:Ve==="out"?(y==null?void 0:y.contact_count)||0:(y==null?void 0:y.in_contact_count)||0})]})})]})]})}):ie.jsx(ie.Fragment,{}),ie.jsx(T.Suspense,{children:de&&((D=S.current)==null?void 0:D.agent_api)&&ie.jsx(yO,{open:de,queryFetch:S.current.agent_api.getIdleAgentList,onCallBack:k=>{ce(!1),k&&Jt(k)}})}),ie.jsx(T.Suspense,{children:ye&&((fe=S.current)==null?void 0:fe.agent_api)&&ie.jsx(wO,{open:ye,queryFetch:S.current.agent_api.getIdleAgentList,onCallBack:(k,ae)=>{Ie(!1),k&&(ae===0?Xe(k):ae===1&&xe(k))}})})]})})},IO=t=>{var e;return(e=Bn.getInstance())==null?void 0:e.call_api.makeCall(t)},bO=()=>{var t;return(t=Bn.getInstance())==null?void 0:t.getRealTimeCustomerInfo()},MO=async t=>{var e,n;if(t!==bt.IDLE&&t!==bt.BUSY)throw new Error("Invalid agent state");try{await((n=(e=Bn.getInstance())==null?void 0:e.agent_api)==null?void 0:n.changeState({data:{state:t,state_name:t===bt.IDLE?"空闲":"忙碌"}}))}catch(r){console.error(r)}},RO=async t=>{var e,n;try{await((n=(e=Bn.getInstance())==null?void 0:e.agent_api)==null?void 0:n.changeDevice({data:{device:t}}))}catch(r){console.error(r)}},xO=async(t=!1,e)=>{var n,r;try{await((r=(n=Bn.getInstance())==null?void 0:n.agent_api)==null?void 0:r.agentLogout({data:{offline_answer:t},success:()=>{e==null||e()}}))}catch(i){console.log(i)}},TO=async(t,e)=>{var n,r;(r=(n=Bn.getInstance())==null?void 0:n.call_api)==null||r.previewMakeCall(t,e)},BO=async t=>{var e,n;try{await((n=(e=Bn.getInstance())==null?void 0:e.agent_api)==null?void 0:n.listenAgentCall({data:{monitored_agent_no:t},success:()=>{St.success("监听坐席通话成功")}}))}catch(r){console.error(r)}},OO=async()=>{var t,e;try{await((e=(t=Bn.getInstance())==null?void 0:t.call_api)==null?void 0:e.earSpeakStart({}))}catch(n){console.log(n)}},DO=async()=>{var t,e;try{await((e=(t=Bn.getInstance())==null?void 0:t.call_api)==null?void 0:e.earSpeakStop({}))}catch(n){console.log(n)}},NO=async()=>{var t,e;try{await((e=(t=Bn.getInstance())==null?void 0:t.call_api)==null?void 0:e.forceInsert({}))}catch(n){console.log(n)}},FO=async()=>{var t,e;try{await((e=(t=Bn.getInstance())==null?void 0:t.call_api)==null?void 0:e.forceDisconnect({}))}catch(n){console.log(n)}};exports.Button=ro;exports.CONTAINER_MAX_OFFSET=ng;exports.CSSMotion=oo;exports.ConfigContext=Qt;exports.ConfigProvider=Wr;exports.ContextIsolator=NA;exports.DisabledContextProvider=PV;exports.Empty=Ai;exports.FastColor=Pt;exports.Input=ui;exports.KeyCode=ot;exports.Keyframe=Ft;exports.ModelBody=_S;exports.Portal=cl;exports.Radio=ea;exports.RefIcon=pl;exports.RefIcon$1=Eg;exports.RefIcon$2=ta;exports.RefIcon$3=qg;exports.RefIcon$4=yg;exports.Space=hl;exports.Spin=vl;exports.Wave=_s;exports.YsytBarPhone=SO;exports.YsytIconSvg=Vt;exports._extends=Fe;exports._objectSpread2=U;exports._slicedToArray=$;exports._toConsumableArray=be;exports._typeof=$e;exports.agentLogout=xO;exports.callForceInsert=NO;exports.callForceSplit=FO;exports.canUseDom=Qn;exports.classNames=se;exports.clearFix=rs;exports.contains=Xm;exports.convertLegacyProps=W4;exports.devUseWarning=an;exports.genFocusStyle=is;exports.genPresetColor=FV;exports.genStyleHooks=bn;exports.genSubStyleComponent=NV;exports.getConfirmLocale=HE;exports.getCustomerInfo=bO;exports.getReactRender=Ag;exports.getTransitionName=rl;exports.globalConfig=kd;exports.initMotion=Js;exports.initZoomMotion=zA;exports.isPresetColor=H1;exports.isPresetStatusColor=wT;exports.jsxRuntimeExports=ie;exports.listenCall=BO;exports.localeValues=eo;exports.makeCall=IO;exports.merge=Zt;exports.omit=$n;exports.pickAttrs=Oi;exports.previewMakeCall=TO;exports.replaceElement=Tv;exports.resetComponent=Hn;exports.setAgentDevice=RO;exports.setAgentInitState=MO;exports.startEarSpeak=OO;exports.stopEarSpeak=DO;exports.unit=ve;exports.useCSSVarCls=Ur;exports.useComponentConfig=Jr;exports.useComposeRef=Fi;exports.useEvent=nn;exports.useId=$s;exports.useLocale=Qs;exports.useSafeState=Do;exports.useToken=lr;exports.useZIndex=WA;exports.warnContext=r0;exports.warning=xi;exports.withPureRenderTheme=S1;exports.zIndexContext=JA;
|