@gientech/modual 1.2.1 → 1.2.3

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.
@@ -0,0 +1,1230 @@
1
+ import*as d from"react";import Q,{forwardRef as dn,useState as xt,useRef as Ve,useCallback as mt,useEffect as Ot,version as _w,createElement as xs,useContext as Rr,createContext as Fn,useMemo as wt,Children as Lw,useImperativeHandle as ei,useLayoutEffect as Fb,isValidElement as Hw,cloneElement as Ww,useReducer as Kw,Component as qw,memo as Vw}from"react";import*as Uw from"react-dom";import Hi,{flushSync as ud,unstable_batchedUpdates as Pb,createPortal as Nb}from"react-dom";import{s as Qs,I as Pl}from"./index--DG-fVvc.js";var gn={},Xw=Object.defineProperty,Gw=(e,t,r)=>t in e?Xw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rr=(e,t,r)=>Gw(e,typeof t!="symbol"?t+"":t,r),Nl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nm={exports:{}},mi={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var jm;function Yw(){if(jm)return mi;jm=1;var e=Q,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(l,s,u){var c,f={},p=null,h=null;u!==void 0&&(p=""+u),s.key!==void 0&&(p=""+s.key),s.ref!==void 0&&(h=s.ref);for(c in s)n.call(s,c)&&!a.hasOwnProperty(c)&&(f[c]=s[c]);if(l&&l.defaultProps)for(c in s=l.defaultProps,s)f[c]===void 0&&(f[c]=s[c]);return{$$typeof:t,type:l,key:p,ref:h,props:f,_owner:o.current}}return mi.Fragment=r,mi.jsx=i,mi.jsxs=i,mi}var Im;function Zw(){return Im||(Im=1,Nm.exports=Yw()),Nm.exports}var ae=Zw();/*!
10
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
11
+ *
12
+ * Copyright (c) 2014-2017, Jon Schlinkert.
13
+ * Released under the MIT License.
14
+ */function Rm(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vr(e){var t,r;return Rm(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Rm(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var jb=Symbol.for("immer-nothing"),Tm=Symbol.for("immer-draftable"),yn=Symbol.for("immer-state");function Rn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ra=Object.getPrototypeOf;function Jo(e){return!!e&&!!e[yn]}function Qo(e){var t;return e?Ib(e)||Array.isArray(e)||!!e[Tm]||!!((t=e.constructor)!=null&&t[Tm])||tu(e)||ru(e):!1}var Jw=Object.prototype.constructor.toString();function Ib(e){if(!e||typeof e!="object")return!1;const t=Ra(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Jw}function ws(e,t){eu(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function eu(e){const t=e[yn];return t?t.type_:Array.isArray(e)?1:tu(e)?2:ru(e)?3:0}function cd(e,t){return eu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Rb(e,t,r){const n=eu(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Qw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function tu(e){return e instanceof Map}function ru(e){return e instanceof Set}function _o(e){return e.copy_||e.base_}function dd(e,t){if(tu(e))return new Map(e);if(ru(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=Ib(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[yn];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const i=o[a],l=n[i];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[i]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[i]})}return Object.create(Ra(e),n)}else{const n=Ra(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function ep(e,t=!1){return nu(e)||Jo(e)||!Qo(e)||(eu(e)>1&&(e.set=e.add=e.clear=e.delete=eE),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>ep(n,!0))),e}function eE(){Rn(2)}function nu(e){return Object.isFrozen(e)}var tE={};function ea(e){const t=tE[e];return t||Rn(0,e),t}var Wi;function Tb(){return Wi}function rE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Mm(e,t){t&&(ea("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fd(e){pd(e),e.drafts_.forEach(nE),e.drafts_=null}function pd(e){e===Wi&&(Wi=e.parent_)}function zm(e){return Wi=rE(Wi,e)}function nE(e){const t=e[yn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function _m(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[yn].modified_&&(fd(t),Rn(4)),Qo(e)&&(e=Es(t,e),t.parent_||ks(t,e)),t.patches_&&ea("Patches").generateReplacementPatches_(r[yn].base_,e,t.patches_,t.inversePatches_)):e=Es(t,r,[]),fd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==jb?e:void 0}function Es(e,t,r){if(nu(t))return t;const n=t[yn];if(!n)return ws(t,(o,a)=>Lm(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return ks(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),ws(a,(l,s)=>Lm(e,n,o,l,s,r,i)),ks(e,o,!1),r&&e.patches_&&ea("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Lm(e,t,r,n,o,a,i){if(Jo(o)){const l=a&&t&&t.type_!==3&&!cd(t.assigned_,n)?a.concat(n):void 0,s=Es(e,o,l);if(Rb(r,n,s),Jo(s))e.canAutoFreeze_=!1;else return}else i&&r.add(o);if(Qo(o)&&!nu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Es(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&ks(e,o)}}function ks(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ep(t,r)}function oE(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Tb(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=tp;r&&(o=[n],a=Ki);const{revoke:i,proxy:l}=Proxy.revocable(o,a);return n.draft_=l,n.revoke_=i,l}var tp={get(e,t){if(t===yn)return e;const r=_o(e);if(!cd(r,t))return aE(e,r,t);const n=r[t];return e.finalized_||!Qo(n)?n:n===Vu(e.base_,t)?(Uu(e),e.copy_[t]=hd(n,e)):n},has(e,t){return t in _o(e)},ownKeys(e){return Reflect.ownKeys(_o(e))},set(e,t,r){const n=Mb(_o(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Vu(_o(e),t),a=o==null?void 0:o[yn];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Qw(r,o)&&(r!==void 0||cd(e.base_,t)))return!0;Uu(e),md(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Vu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Uu(e),md(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=_o(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Rn(11)},getPrototypeOf(e){return Ra(e.base_)},setPrototypeOf(){Rn(12)}},Ki={};ws(tp,(e,t)=>{Ki[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ki.deleteProperty=function(e,t){return Ki.set.call(this,e,t,void 0)};Ki.set=function(e,t,r){return tp.set.call(this,e[0],t,r,e[0])};function Vu(e,t){const r=e[yn];return(r?_o(r):e)[t]}function aE(e,t,r){var o;const n=Mb(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Mb(e,t){if(!(t in e))return;let r=Ra(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ra(r)}}function md(e){e.modified_||(e.modified_=!0,e.parent_&&md(e.parent_))}function Uu(e){e.copy_||(e.copy_=dd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var iE=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const i=this;return function(l=a,...s){return i.produce(l,u=>r.call(this,u,...s))}}typeof r!="function"&&Rn(6),n!==void 0&&typeof n!="function"&&Rn(7);let o;if(Qo(t)){const a=zm(this),i=hd(t,void 0);let l=!0;try{o=r(i),l=!1}finally{l?fd(a):pd(a)}return Mm(a,n),_m(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===jb&&(o=void 0),this.autoFreeze_&&ep(o,!0),n){const a=[],i=[];ea("Patches").generateReplacementPatches_(t,o,a,i),n(a,i)}return o}else Rn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...i)=>this.produceWithPatches(a,l=>t(l,...i));let n,o;return[this.produce(t,r,(a,i)=>{n=a,o=i}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Qo(e)||Rn(8),Jo(e)&&(e=lE(e));const t=zm(this),r=hd(e,void 0);return r[yn].isManual_=!0,pd(t),r}finishDraft(e,t){const r=e&&e[yn];(!r||!r.isManual_)&&Rn(9);const{scope_:n}=r;return Mm(n,t),_m(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=ea("Patches").applyPatches_;return Jo(e)?n(e,t):this.produce(e,o=>n(o,t))}};function hd(e,t){const r=tu(e)?ea("MapSet").proxyMap_(e,t):ru(e)?ea("MapSet").proxySet_(e,t):oE(e,t);return(t?t.scope_:Tb()).drafts_.push(r),r}function lE(e){return Jo(e)||Rn(10,e),zb(e)}function zb(e){if(!Qo(e)||nu(e))return e;const t=e[yn];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=dd(e,t.scope_.immer_.useStrictShallowCopy_)}else r=dd(e,!0);return ws(r,(n,o)=>{Rb(r,n,zb(o))}),t&&(t.finalized_=!1),r}var Cn=new iE,rp=Cn.produce;Cn.produceWithPatches.bind(Cn);Cn.setAutoFreeze.bind(Cn);Cn.setUseStrictShallowCopy.bind(Cn);Cn.applyPatches.bind(Cn);var Hm=Cn.createDraft.bind(Cn),Wm=Cn.finishDraft.bind(Cn),sE={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=ne.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},uE={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Rt.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},cE={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=De.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Ds=new WeakMap,Ss=new WeakMap,Ai=new WeakMap,_b=new WeakMap,Km=new WeakMap,qm=new WeakMap,Vm=new WeakMap,ne={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=ne.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n],a=t[n];if(o!==a)break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],i=t[r];return ne.equals(n,o)&&a>i},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return ne.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],i=t[r];return ne.equals(n,o)&&a<i},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return ne.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&ne.compare(e,t)===0},isBefore(e,t){return ne.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&ne.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&ne.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&ne.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&ne.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1),o=e[e.length-1],a=t[t.length-1];return o!==a&&ne.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!ne.isAncestor(t,e)&&!ne.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:a}=t;(ne.equals(a,n)||ne.endsBefore(a,n)||ne.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:i}=t;if(ne.equals(i,n)||ne.isAncestor(i,n))return null;ne.endsBefore(i,n)&&(n[i.length-1]-=1);break}case"merge_node":{var{path:l,position:s}=t;ne.equals(l,n)||ne.endsBefore(l,n)?n[l.length-1]-=1:ne.isAncestor(l,n)&&(n[l.length-1]-=1,n[l.length]+=s);break}case"split_node":{var{path:u,position:c}=t;if(ne.equals(u,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else ne.endsBefore(u,n)?n[u.length-1]+=1:ne.isAncestor(u,n)&&e[u.length]>=c&&(n[u.length-1]+=1,n[u.length]-=c);break}case"move_node":{var{path:f,newPath:p}=t;if(ne.equals(f,p))return n;if(ne.isAncestor(f,n)||ne.equals(f,n)){var h=p.slice();return ne.endsBefore(f,p)&&f.length<p.length&&(h[f.length-1]-=1),h.concat(n.slice(f.length))}else ne.isSibling(f,p)&&(ne.isAncestor(p,n)||ne.equals(p,n))?ne.endsBefore(f,n)?n[f.length-1]-=1:n[f.length-1]+=1:ne.endsBefore(p,n)||ne.equals(p,n)||ne.isAncestor(p,n)?(ne.endsBefore(f,n)&&(n[f.length-1]-=1),n[p.length-1]+=1):ne.endsBefore(f,n)&&(ne.equals(p,n)&&(n[p.length-1]+=1),n[f.length-1]-=1);break}}return n}};function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function dE(e,t){if(qi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fE(e){var t=dE(e,"string");return qi(t)==="symbol"?t:String(t)}function rn(e,t,r){return t=fE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Um(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Um(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pE=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=Ue.parent(e,n),i=n[n.length-1];if(i>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(a.children.splice(i,0,o),t)for(var[l,s]of De.points(t))t[s]=Rt.transform(l,r);break}case"insert_text":{var{path:u,offset:c,text:f}=r;if(f.length===0)break;var p=Ue.leaf(e,u),h=p.text.slice(0,c),v=p.text.slice(c);if(p.text=h+f+v,t)for(var[g,m]of De.points(t))t[m]=Rt.transform(g,r);break}case"merge_node":{var{path:b}=r,y=Ue.get(e,b),C=ne.previous(b),D=Ue.get(e,C),w=Ue.parent(e,b),k=b[b.length-1];if(it.isText(y)&&it.isText(D))D.text+=y.text;else if(!it.isText(y)&&!it.isText(D))D.children.push(...y.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(b,"] to nodes of different interfaces: ").concat(Ir.stringify(y)," ").concat(Ir.stringify(D)));if(w.children.splice(k,1),t)for(var[E,x]of De.points(t))t[x]=Rt.transform(E,r);break}case"move_node":{var{path:A,newPath:N}=r;if(ne.isAncestor(A,N))throw new Error("Cannot move a path [".concat(A,"] to new path [").concat(N,"] because the destination is inside itself."));var $=Ue.get(e,A),j=Ue.parent(e,A),F=A[A.length-1];j.children.splice(F,1);var B=ne.transform(A,r),S=Ue.get(e,ne.parent(B)),O=B[B.length-1];if(S.children.splice(O,0,$),t)for(var[I,P]of De.points(t))t[P]=Rt.transform(I,r);break}case"remove_node":{var{path:T}=r,_=T[T.length-1],X=Ue.parent(e,T);if(X.children.splice(_,1),t)for(var[L,q]of De.points(t)){var J=Rt.transform(L,r);if(t!=null&&J!=null)t[q]=J;else{var ee=void 0,z=void 0;for(var[Y,V]of Ue.texts(e))if(ne.compare(V,T)===-1)ee=[Y,V];else{z=[Y,V];break}var G=!1;ee&&z&&(ne.equals(z[1],T)?G=!ne.hasPrevious(z[1]):G=ne.common(ee[1],T).length<ne.common(z[1],T).length),ee&&!G?(L.path=ee[1],L.offset=ee[0].text.length):z?(L.path=z[1],L.offset=0):t=null}}break}case"remove_text":{var{path:K,offset:W,text:te}=r;if(te.length===0)break;var U=Ue.leaf(e,K),Z=U.text.slice(0,W),re=U.text.slice(W+te.length);if(U.text=Z+re,t)for(var[ue,he]of De.points(t))t[he]=Rt.transform(ue,r);break}case"set_node":{var{path:we,properties:Ne,newProperties:me}=r;if(we.length===0)throw new Error("Cannot set properties on the root node!");var ge=Ue.get(e,we);for(var ye in me){if(ye==="children"||ye==="text")throw new Error('Cannot set the "'.concat(ye,'" property of nodes!'));var Ce=me[ye];Ce==null?delete ge[ye]:ge[ye]=Ce}for(var xe in Ne)me.hasOwnProperty(xe)||delete ge[xe];break}case"set_selection":{var{newProperties:Ae}=r;if(Ae==null)t=Ae;else{if(t==null){if(!De.isRange(Ae))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ir.stringify(Ae)," when there is no current selection."));t=hi({},Ae)}for(var ke in Ae){var We=Ae[ke];if(We==null){if(ke==="anchor"||ke==="focus")throw new Error('Cannot remove the "'.concat(ke,'" selection property'));delete t[ke]}else t[ke]=We}}break}case"split_node":{var{path:_e,position:Pe,properties:ve}=r;if(_e.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(_e,"] because the root node cannot be split."));var Se=Ue.get(e,_e),qe=Ue.parent(e,_e),Ge=_e[_e.length-1],Xe;if(it.isText(Se)){var Ie=Se.text.slice(0,Pe),at=Se.text.slice(Pe);Se.text=Ie,Xe=hi(hi({},ve),{},{text:at})}else{var He=Se.children.slice(0,Pe),nt=Se.children.slice(Pe);Se.children=He,Xe=hi(hi({},ve),{},{children:nt})}if(qe.children.splice(Ge+1,0,Xe),t)for(var[ht,At]of De.points(t))t[At]=Rt.transform(ht,r);break}}return t},mE={transform(e,t){e.children=Hm(e.children);var r=e.selection&&Hm(e.selection);try{r=pE(e,r,t)}finally{e.children=Wm(e.children),r?e.selection=Jo(r)?Wm(r):r:e.selection=null}}},hE={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},gE={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},Lb=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Vr(n)&&Vr(o)){if(!Lb(n,o))return!1}else if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(n[a]!==o[a])return!1}else if(n!==o)return!1}for(var i in t)if(e[i]===void 0&&t[i]!==void 0)return!1;return!0};function vE(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function vo(e,t){if(e==null)return{};var r=vE(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var bE=["anchor","focus"];function Xm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function yE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xm(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var De={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return De.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=De.edges(e);return t},equals(e,t){return Rt.equals(e.anchor,t.anchor)&&Rt.equals(e.focus,t.focus)},includes(e,t){if(De.isRange(t)){if(De.includes(e,t.anchor)||De.includes(e,t.focus))return!0;var[r,n]=De.edges(e),[o,a]=De.edges(t);return Rt.isBefore(r,o)&&Rt.isAfter(n,a)}var[i,l]=De.edges(e),s=!1,u=!1;return Rt.isPoint(t)?(s=Rt.compare(t,i)>=0,u=Rt.compare(t,l)<=0):(s=ne.compare(t,i.path)>=0,u=ne.compare(t,l.path)<=0),s&&u},intersection(e,t){var r=vo(e,bE),[n,o]=De.edges(e),[a,i]=De.edges(t),l=Rt.isBefore(n,a)?a:n,s=Rt.isBefore(o,i)?o:i;return Rt.isBefore(s,l)?null:yE({anchor:l,focus:s},r)},isBackward(e){var{anchor:t,focus:r}=e;return Rt.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Rt.equals(t,r)},isExpanded(e){return!De.isCollapsed(e)},isForward(e){return!De.isBackward(e)},isRange(e){return Vr(e)&&Rt.isPoint(e.anchor)&&Rt.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=De.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return rp(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,a,i;if(o==="inward"){var l=De.isCollapsed(n);De.isForward(n)?(a="forward",i=l?a:"backward"):(a="backward",i=l?a:"forward")}else o==="outward"?De.isForward(n)?(a="backward",i="forward"):(a="forward",i="backward"):(a=o,i=o);var s=Rt.transform(n.anchor,t,{affinity:a}),u=Rt.transform(n.focus,t,{affinity:i});if(!s||!u)return null;n.anchor=s,n.focus=u})}},Gm=e=>Vr(e)&&Ue.isNodeList(e.children)&&!R.isEditor(e),ut={isAncestor(e){return Vr(e)&&Ue.isNodeList(e.children)},isElement:Gm,isElementList(e){return Array.isArray(e)&&e.every(t=>ut.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Gm(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},CE=["children"],xE=["text"],Ym=new WeakMap,Ue={ancestor(e,t){var r=Ue.get(e,t);if(it.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Ir.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ne.ancestors(t,r)){var o=Ue.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(it.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Ir.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Ir.stringify(e)));return r},children(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var{reverse:n=!1}=r,o=Ue.ancestor(e,t),{children:a}=o,i=n?a.length-1:0;n?i>=0:i<a.length;){var l=Ue.child(o,i),s=t.concat(i);yield[l,s],i=n?i-1:i+1}})()},common(e,t,r){var n=ne.common(t,r),o=Ue.get(e,n);return[o,n]},descendant(e,t){var r=Ue.get(e,t);if(R.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Ir.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ue.nodes(e,t))n.length!==0&&(yield[r,n])})()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ue.nodes(e,t))ut.isElement(r)&&(yield[r,n])})()},extractProps(e){if(ut.isAncestor(e)){var t=vo(e,CE);return t}else{var t=vo(e,xE);return t}},first(e,t){for(var r=t.slice(),n=Ue.get(e,r);n&&!(it.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(it.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ir.stringify(e)));var r=rp({children:e.children},n=>{var[o,a]=De.edges(t),i=Ue.nodes(n,{reverse:!0,pass:p=>{var[,h]=p;return!De.includes(t,h)}});for(var[,l]of i){if(!De.includes(t,l)){var s=Ue.parent(n,l),u=l[l.length-1];s.children.splice(u,1)}if(ne.equals(l,a.path)){var c=Ue.leaf(n,l);c.text=c.text.slice(0,a.offset)}if(ne.equals(l,o.path)){var f=Ue.leaf(n,l);f.text=f.text.slice(o.offset)}}R.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(it.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Ir.stringify(e)));r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(it.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return it.isText(e)||ut.isElement(e)||R.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Ym.get(e);if(t!==void 0)return t;var r=e.every(n=>Ue.isNode(n));return Ym.set(e,r),r},last(e,t){for(var r=t.slice(),n=Ue.get(e,r);n&&!(it.isText(n)||n.children.length===0);){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=Ue.get(e,t);if(!it.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ir.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ne.levels(t,r)){var o=Ue.get(e,n);yield[o,n]}})()},matches(e,t){return ut.isElement(e)&&ut.isElementProps(t)&&ut.matches(e,t)||it.isText(e)&&it.isTextProps(t)&&it.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:a}=t,i=new Set,l=[],s=e;!(a&&(n?ne.isBefore(l,a):ne.isAfter(l,a)));){if(i.has(s)||(yield[s,l]),!i.has(s)&&!it.isText(s)&&s.children.length!==0&&(r==null||r([s,l])===!1)){i.add(s);var u=n?s.children.length-1:0;ne.isAncestor(l,o)&&(u=o[l.length]),l=l.concat(u),s=Ue.get(e,l);continue}if(l.length===0)break;if(!n){var c=ne.next(l);if(Ue.has(e,c)){l=c,s=Ue.get(e,l);continue}}if(n&&l[l.length-1]!==0){var f=ne.previous(l);l=f,s=Ue.get(e,l);continue}l=ne.parent(l),s=Ue.get(e,l),i.add(s)}})()},parent(e,t){var r=ne.parent(t),n=Ue.get(e,r);if(it.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return it.isText(e)?e.text:e.children.map(Ue.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ue.nodes(e,t))it.isText(r)&&(yield[r,n])})()}};function Zm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zm(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Di={isNodeOperation(e){return Di.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Vr(e))return!1;switch(e.type){case"insert_node":return ne.isPath(e.path)&&Ue.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ne.isPath(e.path);case"merge_node":return typeof e.position=="number"&&ne.isPath(e.path)&&Vr(e.properties);case"move_node":return ne.isPath(e.path)&&ne.isPath(e.newPath);case"remove_node":return ne.isPath(e.path)&&Ue.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ne.isPath(e.path);case"set_node":return ne.isPath(e.path)&&Vr(e.properties)&&Vr(e.newProperties);case"set_selection":return e.properties===null&&De.isRange(e.newProperties)||e.newProperties===null&&De.isRange(e.properties)||Vr(e.properties)&&Vr(e.newProperties);case"split_node":return ne.isPath(e.path)&&typeof e.position=="number"&&Vr(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Di.isOperation(t))},isSelectionOperation(e){return Di.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Di.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return ar(ar({},e),{},{type:"remove_node"});case"insert_text":return ar(ar({},e),{},{type:"remove_text"});case"merge_node":return ar(ar({},e),{},{type:"split_node",path:ne.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(ne.equals(t,r))return e;if(ne.isSibling(r,t))return ar(ar({},e),{},{path:t,newPath:r});var n=ne.transform(r,e),o=ne.transform(ne.next(r),e);return ar(ar({},e),{},{path:n,newPath:o})}case"remove_node":return ar(ar({},e),{},{type:"insert_node"});case"remove_text":return ar(ar({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:i}=e;return ar(ar({},e),{},{properties:i,newProperties:a})}case"set_selection":{var{properties:l,newProperties:s}=e;return l==null?ar(ar({},e),{},{properties:s,newProperties:null}):s==null?ar(ar({},e),{},{properties:null,newProperties:l}):ar(ar({},e),{},{properties:s,newProperties:l})}case"split_node":return ar(ar({},e),{},{type:"merge_node",path:ne.next(e.path)})}}},Jm=new WeakMap,wE=e=>{var t=Jm.get(e);if(t!==void 0)return t;if(!Vr(e))return!1;var r=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||Vr(e.marks))&&(e.selection===null||De.isRange(e.selection))&&Ue.isNodeList(e.children)&&Di.isOperationList(e.operations);return Jm.set(e,r),r},R={above(e,t){return e.above(t)},addMark(e,t,r){e.addMark(t,r)},after(e,t,r){return e.after(t,r)},before(e,t,r){return e.before(t,r)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,r){return e.isEdge(t,r)},isEditor(e){return wE(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,r){return e.isEnd(t,r)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,r){return e.isStart(t,r)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,r){return e.leaf(t,r)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,r){return e.node(t,r)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,r){return e.parent(t,r)},path(e,t,r){return e.path(t,r)},pathRef(e,t,r){return e.pathRef(t,r)},pathRefs(e){return e.pathRefs()},point(e,t,r){return e.point(t,r)},pointRef(e,t,r){return e.pointRef(t,r)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,r){return e.range(t,r)},rangeRef(e,t,r){return e.rangeRef(t,r)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,r){return e.string(t,r)},unhangRange(e,t,r){return e.unhangRange(t,r)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)},EE={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(ne.isPath)}};function Qm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function eh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qm(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Rt={compare(e,t){var r=ne.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Rt.compare(e,t)===1},isBefore(e,t){return Rt.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&ne.equals(e.path,t.path)},isPoint(e){return Vr(e)&&typeof e.offset=="number"&&ne.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return rp(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:a,offset:i}=n;switch(t.type){case"insert_node":case"move_node":{n.path=ne.transform(a,t,r);break}case"insert_text":{ne.equals(t.path,a)&&(t.offset<i||t.offset===i&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{ne.equals(t.path,a)&&(n.offset+=t.position),n.path=ne.transform(a,t,r);break}case"remove_text":{ne.equals(t.path,a)&&t.offset<=i&&(n.offset-=Math.min(i-t.offset,t.text.length));break}case"remove_node":{if(ne.equals(t.path,a)||ne.isAncestor(t.path,a))return null;n.path=ne.transform(a,t,r);break}case"split_node":{if(ne.equals(t.path,a)){if(t.position===i&&o==null)return null;(t.position<i||t.position===i&&o==="forward")&&(n.offset-=t.position,n.path=ne.transform(a,t,eh(eh({},r),{},{affinity:"forward"})))}else n.path=ne.transform(a,t,r);break}}})}},th=void 0,Ir={setScrubber(e){th=e},stringify(e){return JSON.stringify(e,th)}},kE=["text"],DE=["anchor","focus"];function rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function lo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var it={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var i=vo(a,kE);return i}return Lb(n?o(e):e,n?o(t):t)},isText(e){return Vr(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>it.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[lo({},e)];for(var n of t){var o=vo(n,DE),[a,i]=De.edges(n),l=[],s=0,u=a.offset,c=i.offset;for(var f of r){var{length:p}=f.text,h=s;if(s+=p,u<=h&&s<=c){Object.assign(f,o),l.push(f);continue}if(u!==c&&(u===s||c===h)||u>s||c<h||c===h&&h!==0){l.push(f);continue}var v=f,g=void 0,m=void 0;if(c<s){var b=c-h;m=lo(lo({},v),{},{text:v.text.slice(b)}),v=lo(lo({},v),{},{text:v.text.slice(0,b)})}if(u>h){var y=u-h;g=lo(lo({},v),{},{text:v.text.slice(0,y)}),v=lo(lo({},v),{},{text:v.text.slice(y)})}Object.assign(v,o),g&&l.push(g),l.push(v),m&&l.push(m)}r=l}return r}},np=e=>e.selection?e.selection:e.children.length>0?R.end(e,[]):[0],ti=(e,t)=>{var[r]=R.node(e,t);return n=>n===r},op=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?FE(e):e,o=St.None,a=St.None,i=0,l=null,s=null;for(var u of n){var c=u.codePointAt(0);if(!c)break;var f=WE(u,c);if([o,a]=r?[a,f]:[f,o],ka(o,St.ZWJ)&&ka(a,St.ExtPict)&&(r?l=nh(e.substring(0,i)):l=nh(e.substring(0,e.length-i)),!l)||ka(o,St.RI)&&ka(a,St.RI)&&(s!==null?s=!s:r?s=!0:s=XE(e.substring(0,e.length-i)),!s)||o!==St.None&&a!==St.None&&qE(o,a))break;i+=u.length}return i||1},SE=/\s/,$E=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,BE=/['\u2018\u2019]/,OE=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=op(e,t),[a,i]=ap(e,o,t);if(AE(a,i,t))n=!0,r+=o;else if(!n)r+=o;else break;e=i}return r},ap=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},AE=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(SE.test(t))return!1;if(BE.test(t)){var o=op(r,n),[a,i]=ap(r,o,n);if(e(a,i,n))return!0}return!$E.test(t)},FE=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(NE(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(PE(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},PE=e=>e>=55296&&e<=56319,NE=e=>e>=56320&&e<=57343,St;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(St||(St={}));var jE=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,IE=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,RE=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,TE=/^[\u1100-\u115F\uA960-\uA97C]$/,ME=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,zE=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,_E=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,LE=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,HE=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,WE=(e,t)=>{var r=St.Any;return e.search(jE)!==-1&&(r|=St.Extend),t===8205&&(r|=St.ZWJ),t>=127462&&t<=127487&&(r|=St.RI),e.search(IE)!==-1&&(r|=St.Prepend),e.search(RE)!==-1&&(r|=St.SpacingMark),e.search(TE)!==-1&&(r|=St.L),e.search(ME)!==-1&&(r|=St.V),e.search(zE)!==-1&&(r|=St.T),e.search(_E)!==-1&&(r|=St.LV),e.search(LE)!==-1&&(r|=St.LVT),e.search(HE)!==-1&&(r|=St.ExtPict),r};function ka(e,t){return(e&t)!==0}var KE=[[St.L,St.L|St.V|St.LV|St.LVT],[St.LV|St.V,St.V|St.T],[St.LVT|St.T,St.T],[St.Any,St.Extend|St.ZWJ],[St.Any,St.SpacingMark],[St.Prepend,St.Any],[St.ZWJ,St.ExtPict],[St.RI,St.RI]];function qE(e,t){return KE.findIndex(r=>ka(e,r[0])&&ka(t,r[1]))===-1}var VE=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,nh=e=>e.search(VE)!==-1,UE=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,XE=e=>{var t=e.match(UE);if(t===null)return!1;var r=t[0].length/2;return r%2===1},GE={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=np(e)}=r;if(ne.isPath(o)&&(o=R.range(e,o)),De.isRange(o))if(De.isCollapsed(o))o=o.anchor;else{var a=De.end(o);if(!n&&R.void(e,{at:a}))return;var i=De.start(o),l=R.pointRef(e,i),s=R.pointRef(e,a);Re.delete(e,{at:o,voids:n});var u=l.unref(),c=s.unref();o=u||c,Re.setSelection(e,{anchor:o,focus:o})}if(!(!n&&R.void(e,{at:o})||R.elementReadOnly(e,{at:o}))){var{path:f,offset:p}=o;t.length>0&&e.apply({type:"insert_text",path:f,offset:p,text:t})}})}};function oh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function jl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Re=jl(jl(jl(jl({},mE),hE),gE),GE),Ql=new WeakMap,YE=e=>Ql.get(e)||!1,ZE=(e,t,r)=>{var n=Ql.get(e)||!1;Ql.set(e,!0);try{t(),r()}finally{Ql.set(e,n)}};function Hb(e,t,r){var n=Ds.get(e)||[],o=Ss.get(e)||new Set,a,i,l=f=>{if(f){var p=f.join(",");i.has(p)||(i.add(p),a.push(f))}};if(r){a=[],i=new Set;for(var s of n){var u=r(s);l(u)}}else a=n,i=o;for(var c of t)l(c);Ds.set(e,a),Ss.set(e,i)}var JE=(e,t)=>{for(var r of R.pathRefs(e))sE.transform(r,t);for(var n of R.pointRefs(e))uE.transform(n,t);for(var o of R.rangeRefs(e))cE.transform(o,t);if(!YE(e)){var a=ne.operationCanTransformPath(t)?i=>ne.transform(i,t):void 0;Hb(e,e.getDirtyPaths(t),a)}Re.transform(e,t),e.operations.push(t),R.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Ai.get(e)||(Ai.set(e,!0),Promise.resolve().then(()=>{Ai.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},QE=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return ne.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=ne.levels(o),i=it.isText(n)?[]:Array.from(Ue.nodes(n),N=>{var[,$]=N;return o.concat($)});return[...a,...i]}case"merge_node":{var{path:l}=t,s=ne.ancestors(l),u=ne.previous(l);return[...s,u]}case"move_node":{var{path:c,newPath:f}=t;if(ne.equals(c,f))return[];var p=[],h=[];for(var v of ne.ancestors(c)){var g=ne.transform(v,t);p.push(g)}for(var m of ne.ancestors(f)){var b=ne.transform(m,t);h.push(b)}var y=h[h.length-1],C=f[f.length-1],D=y.concat(C);return[...p,...h,D]}case"remove_node":{var{path:w}=t,k=ne.ancestors(w);return[...k]}case"split_node":{var{path:E}=t,x=ne.levels(E),A=ne.next(E);return[...x,A]}default:return[]}},ek=e=>{var{selection:t}=e;return t?Ue.fragment(e,t):[]},tk=(e,t)=>{var[r,n]=t;if(!it.isText(r)){if(ut.isElement(r)&&r.children.length===0){var o={text:""};Re.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=R.isEditor(r)?!1:ut.isElement(r)&&(e.isInline(r)||r.children.length===0||it.isText(r.children[0])||e.isInline(r.children[0])),i=0,l=0;l<r.children.length;l++,i++){var s=Ue.get(e,n);if(!it.isText(s)){var u=s.children[i],c=s.children[i-1],f=l===r.children.length-1,p=it.isText(u)||ut.isElement(u)&&e.isInline(u);if(p!==a)Re.removeNodes(e,{at:n.concat(i),voids:!0}),i--;else if(ut.isElement(u)){if(e.isInline(u)){if(c==null||!it.isText(c)){var h={text:""};Re.insertNodes(e,h,{at:n.concat(i),voids:!0}),i++}else if(f){var v={text:""};Re.insertNodes(e,v,{at:n.concat(i+1),voids:!0}),i++}}}else{if(!it.isText(u)&&!("children"in u)){var g=u;g.children=[]}c!=null&&it.isText(c)&&(it.equals(u,c,{loose:!0})?(Re.mergeNodes(e,{at:n.concat(i),voids:!0}),i--):c.text===""?(Re.removeNodes(e,{at:n.concat(i-1),voids:!0}),i--):u.text===""&&(Re.removeNodes(e,{at:n.concat(i),voids:!0}),i--))}}}}},rk=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,o=n*42;if(r>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},nk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:o=e.selection,match:a}=t;if(o){var i=R.path(e,o),l=n==="lowest";for(var[s,u]of R.levels(e,{at:i,voids:r,match:a,reverse:l}))if(!it.isText(s)){if(De.isRange(o)){if(ne.isAncestor(u,o.anchor.path)&&ne.isAncestor(u,o.focus.path))return[s,u]}else if(!ne.equals(i,u))return[s,u]}}};function ah(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ih(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ah(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ok=(e,t,r)=>{var{selection:n}=e;if(n){var o=(f,p)=>{if(!it.isText(f))return!1;var[h,v]=R.parent(e,p);return!e.isVoid(h)||e.markableVoid(h)},a=De.isExpanded(n),i=!1;if(!a){var[l,s]=R.node(e,n);if(l&&o(l,s)){var[u]=R.parent(e,s);i=u&&e.markableVoid(u)}}if(a||i)Re.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var c=ih(ih({},R.marks(e)||{}),{},{[t]:r});e.marks=c,Ai.get(e)||e.onChange()}}};function lh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function sh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ak=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.point(e,t,{edge:"end"}),o=R.end(e,[]),a={anchor:n,focus:o},{distance:i=1}=r,l=0,s;for(var u of R.positions(e,sh(sh({},r),{},{at:a}))){if(l>i)break;l!==0&&(s=u),l++}return s};function uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ik=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.start(e,[]),o=R.point(e,t,{edge:"start"}),a={anchor:n,focus:o},{distance:i=1}=r,l=0,s;for(var u of R.positions(e,ch(ch({},r),{},{at:a,reverse:!0}))){if(l>i)break;l!==0&&(s=u),l++}return s},lk=(e,t)=>{var{selection:r}=e;r&&De.isCollapsed(r)&&Re.delete(e,{unit:t,reverse:!0})},sk=(e,t)=>{var{selection:r}=e;r&&De.isCollapsed(r)&&Re.delete(e,{unit:t})},uk=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&De.isExpanded(r)&&Re.delete(e,{reverse:t==="backward"})},ck=(e,t)=>[R.start(e,t),R.end(e,t)];function dh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var dk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return R.above(e,fh(fh({},t),{},{match:r=>ut.isElement(r)&&R.isElementReadOnly(e,r)}))},fk=(e,t)=>R.point(e,t,{edge:"end"}),pk=(e,t)=>{var r=R.path(e,t,{edge:"start"});return R.node(e,r)},mk=(e,t)=>{var r=R.range(e,t);return Ue.fragment(e,r)};function ph(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function mh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return R.above(e,mh(mh({},t),{},{match:r=>ut.isElement(r)&&R.isVoid(e,r)}))},gk=(e,t)=>t.children.some(r=>ut.isElement(r)&&R.isBlock(e,r)),vk=(e,t)=>t.children.some(r=>it.isText(r)||R.isInline(e,r)),bk=(e,t)=>Ue.has(e,t),yk=(e,t)=>t.children.every(r=>it.isText(r)),Ck=e=>{Re.splitNodes(e,{always:!0})},xk=(e,t,r)=>{Re.insertNodes(e,t,r)},wk=e=>{Re.splitNodes(e,{always:!0})};function hh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ek(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var kk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n,marks:o}=e;if(n){if(o){var a=Ek({text:t},o);Re.insertNodes(e,a,{at:r.at,voids:r.voids})}else Re.insertText(e,t,r);e.marks=null}},Dk=(e,t)=>!e.isInline(t),Sk=(e,t,r)=>R.isStart(e,t,r)||R.isEnd(e,t,r),$k=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&it.isText(n)&&n.text===""&&!e.isVoid(t)},Bk=(e,t,r)=>{var n=R.end(e,r);return Rt.equals(t,n)},Ok=e=>{var t=_b.get(e);return t===void 0?!0:t},Ak=(e,t,r)=>{if(t.offset!==0)return!1;var n=R.start(e,r);return Rt.equals(t,n)},Fk=(e,t)=>{var r=R.path(e,t,{edge:"end"});return R.node(e,r)},Pk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),o=Ue.leaf(e,n);return[o,n]};function Nk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:o=!1}=t,{match:a}=t;if(a==null&&(a=()=>!0),!!r){var i=[],l=R.path(e,r);for(var[s,u]of Ue.levels(e,l))if(a(s,u)&&(i.push([s,u]),!o&&ut.isElement(s)&&R.isVoid(e,s)))break;n&&i.reverse(),yield*i}})()}var jk=["text"],Ik=["text"],Rk=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:o}=r;if(t)return t;if(De.isExpanded(r)){var a=R.isEnd(e,n,n.path);if(a){var i=R.after(e,n);i&&(n=i)}var[l]=R.nodes(e,{match:it.isText,at:{anchor:n,focus:o}});if(l){var[s]=l,u=vo(s,jk);return u}else return{}}var{path:c}=n,[f]=R.leaf(e,c);if(n.offset===0){var p=R.previous(e,{at:c,match:it.isText}),h=R.above(e,{match:C=>ut.isElement(C)&&R.isVoid(e,C)&&e.markableVoid(C)});if(!h){var v=R.above(e,{match:C=>ut.isElement(C)&&R.isBlock(e,C)});if(p&&v){var[g,m]=p,[,b]=v;ne.isAncestor(b,m)&&(f=g)}}}var y=vo(f,Ik);return y},Tk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var i=R.after(e,a,{voids:n});if(i){var[,l]=R.last(e,[]),s=[i.path,l];if(ne.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(ne.isPath(a)){var[u]=R.parent(e,a);o=f=>u.children.includes(f)}else o=()=>!0;var[c]=R.nodes(e,{at:s,match:o,mode:r,voids:n});return c}}},Mk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),o=Ue.get(e,n);return[o,n]};function zk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:o=!1,reverse:a=!1,voids:i=!1,ignoreNonSelectable:l=!1}=t,{match:s}=t;if(s||(s=()=>!0),!!r){var u,c;if(EE.isSpan(r))u=r[0],c=r[1];else{var f=R.path(e,r,{edge:"start"}),p=R.path(e,r,{edge:"end"});u=a?p:f,c=a?f:p}var h=Ue.nodes(e,{reverse:a,from:u,to:c,pass:D=>{var[w]=D;return ut.isElement(w)?!!(!i&&(R.isVoid(e,w)||R.isElementReadOnly(e,w))||l&&!R.isSelectable(e,w)):!1}}),v=[],g;for(var[m,b]of h)if(!(l&&ut.isElement(m)&&!R.isSelectable(e,m))){var y=g&&ne.compare(b,g[1])===0;if(!(n==="highest"&&y)){if(!s(m,b)){if(o&&!y&&it.isText(m))return;continue}if(n==="lowest"&&y){g=[m,b];continue}var C=n==="lowest"?g:[m,b];C&&(o?v.push(C):yield C),g=[m,b]}}n==="lowest"&&g&&(o?v.push(g):yield g),o&&(yield*v)}})()}var _k=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=u=>Ds.get(u)||[],a=u=>Ss.get(u)||new Set,i=u=>{var c=o(u).pop(),f=c.join(",");return a(u).delete(f),c};if(R.isNormalizing(e)){if(r){var l=Array.from(Ue.nodes(e),u=>{var[,c]=u;return c}),s=new Set(l.map(u=>u.join(",")));Ds.set(e,l),Ss.set(e,s)}o(e).length!==0&&R.withoutNormalizing(e,()=>{for(var u of o(e))if(Ue.has(e,u)){var c=R.node(e,u),[f,p]=c;ut.isElement(f)&&f.children.length===0&&e.normalizeNode(c,{operation:n})}for(var h=o(e),v=h.length,g=0;h.length!==0;){if(!e.shouldNormalize({dirtyPaths:h,iteration:g,initialDirtyPathsLength:v,operation:n}))return;var m=i(e);if(Ue.has(e,m)){var b=R.node(e,m);e.normalizeNode(b,{operation:n})}g++,h=o(e)}})}},Lk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),o=ne.parent(n),a=R.node(e,o);return a},Hk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:i}=o,l=R.pathRefs(e);return l.delete(o),o.current=null,i}},a=R.pathRefs(e);return a.add(o),o},Wk=e=>{var t=Km.get(e);return t||(t=new Set,Km.set(e,t)),t},Kk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(ne.isPath(t)){if(o==="start"){var[,a]=Ue.first(e,t);t=a}else if(o==="end"){var[,i]=Ue.last(e,t);t=i}}return De.isRange(t)&&(o==="start"?t=De.start(t):o==="end"?t=De.end(t):t=ne.common(t.anchor.path,t.focus.path)),Rt.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},qk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:i}=o,l=R.pointRefs(e);return l.delete(o),o.current=null,i}},a=R.pointRefs(e);return a.add(o),o},Vk=e=>{var t=qm.get(e);return t||(t=new Set,qm.set(e,t)),t},Uk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(ne.isPath(t)){var o;if(n==="end"){var[,a]=Ue.last(e,t);o=a}else{var[,i]=Ue.first(e,t);o=i}var l=Ue.get(e,o);if(!it.isText(l))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:o,offset:n==="end"?l.text.length:0}}if(De.isRange(t)){var[s,u]=De.edges(t);return n==="start"?s:u}return t};function Xk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:o=!1,voids:a=!1,ignoreNonSelectable:i=!1}=t;if(!r)return;var l=R.range(e,r),[s,u]=De.edges(l),c=o?u:s,f=!1,p="",h=0,v=0,g=0;for(var[m,b]of R.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:i})){if(ut.isElement(m)){if(!a&&(e.isVoid(m)||e.isElementReadOnly(m))){yield R.start(e,b);continue}if(e.isInline(m))continue;if(R.hasInlines(e,m)){var y=ne.isAncestor(b,u.path)?u:R.end(e,b),C=ne.isAncestor(b,s.path)?s:R.start(e,b);p=R.string(e,{anchor:C,focus:y},{voids:a}),f=!0}}if(it.isText(m)){var D=ne.equals(b,c.path);for(D?(v=o?c.offset:m.text.length-c.offset,g=c.offset):(v=m.text.length,g=o?v:0),(D||f||n==="offset")&&(yield{path:b,offset:g},f=!1);;){if(h===0){if(p==="")break;h=w(p,n,o),p=ap(p,h,o)[1]}if(g=o?g-h:g+h,v=v-h,v<0){h=-v;break}h=0,yield{path:b,offset:g}}}}function w(k,E,x){return E==="character"?op(k,x):E==="word"?OE(k,x):E==="line"||E==="block"?k.length:1}})()}var Gk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var i=R.before(e,a,{voids:n});if(i){var[,l]=R.first(e,[]),s=[i.path,l];if(ne.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(ne.isPath(a)){var[u]=R.parent(e,a);o=f=>u.children.includes(f)}else o=()=>!0;var[c]=R.nodes(e,{reverse:!0,at:s,match:o,mode:r,voids:n});return c}}},Yk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:i}=o,l=R.rangeRefs(e);return l.delete(o),o.current=null,i}},a=R.rangeRefs(e);return a.add(o),o},Zk=e=>{var t=Vm.get(e);return t||(t=new Set,Vm.set(e,t)),t},Jk=(e,t,r)=>{if(De.isRange(t)&&!r)return t;var n=R.start(e,t),o=R.end(e,r||t);return{anchor:n,focus:o}};function gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Qk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var eD=(e,t)=>{var{selection:r}=e;if(r){var n=(c,f)=>{if(!it.isText(c))return!1;var[p,h]=R.parent(e,f);return!e.isVoid(p)||e.markableVoid(p)},o=De.isExpanded(r),a=!1;if(!o){var[i,l]=R.node(e,r);if(i&&n(i,l)){var[s]=R.parent(e,l);a=s&&e.markableVoid(s)}}if(o||a)Re.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var u=Qk({},R.marks(e)||{});delete u[t],e.marks=u,Ai.get(e)||e.onChange()}}},tD=(e,t)=>{_b.set(e,t)},rD=(e,t)=>R.point(e,t,{edge:"start"}),nD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=R.range(e,t),[a,i]=De.edges(o),l="";for(var[s,u]of R.nodes(e,{at:o,match:it.isText,voids:n})){var c=s.text;ne.equals(u,i.path)&&(c=c.slice(0,i.offset)),ne.equals(u,a.path)&&(c=c.slice(a.offset)),l+=c}return l},oD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[o,a]=De.edges(t);if(o.offset!==0||a.offset!==0||De.isCollapsed(t)||ne.hasPrevious(a.path))return t;var i=R.above(e,{at:a,match:h=>ut.isElement(h)&&R.isBlock(e,h),voids:n}),l=i?i[1]:[],s=R.start(e,o),u={anchor:s,focus:a},c=!0;for(var[f,p]of R.nodes(e,{at:u,match:it.isText,reverse:!0,voids:n})){if(c){c=!1;continue}if(f.text!==""||ne.isBefore(p,l)){a={path:p,offset:f.text.length};break}}return{anchor:o,focus:a}},aD=(e,t)=>{var r=R.isNormalizing(e);R.setNormalizing(e,!1);try{t()}finally{R.setNormalizing(e,r)}R.normalize(e)},iD=(e,t,r)=>{var[n,o]=t;return ut.isElement(n)&&R.isEmpty(e,n)||it.isText(n)&&n.text===""&&o[o.length-1]!==0},lD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:a="character",distance:i=1,voids:l=!1}=t,{at:s=e.selection,hanging:u=!1}=t;if(s){var c=!1;if(De.isRange(s)&&De.isCollapsed(s)&&(c=!0,s=s.anchor),Rt.isPoint(s)){var f=R.void(e,{at:s,mode:"highest"});if(!l&&f){var[,p]=f;s=p}else{var h={unit:a,distance:i},v=o?R.before(e,s,h)||R.start(e,[]):R.after(e,s,h)||R.end(e,[]);s={anchor:s,focus:v},u=!0}}if(ne.isPath(s)){Re.removeNodes(e,{at:s,voids:l});return}if(!De.isCollapsed(s)){if(!u){var[,g]=De.edges(s),m=R.end(e,[]);Rt.equals(g,m)||(s=R.unhangRange(e,s,{voids:l}))}var[b,y]=De.edges(s),C=R.above(e,{match:U=>ut.isElement(U)&&R.isBlock(e,U),at:b,voids:l}),D=R.above(e,{match:U=>ut.isElement(U)&&R.isBlock(e,U),at:y,voids:l}),w=C&&D&&!ne.equals(C[1],D[1]),k=ne.equals(b.path,y.path),E=l?null:(r=R.void(e,{at:b,mode:"highest"}))!==null&&r!==void 0?r:R.elementReadOnly(e,{at:b,mode:"highest"}),x=l?null:(n=R.void(e,{at:y,mode:"highest"}))!==null&&n!==void 0?n:R.elementReadOnly(e,{at:y,mode:"highest"});if(E){var A=R.before(e,b);A&&C&&ne.isAncestor(C[1],A.path)&&(b=A)}if(x){var N=R.after(e,y);N&&D&&ne.isAncestor(D[1],N.path)&&(y=N)}var $=[],j;for(var F of R.nodes(e,{at:s,voids:l})){var[B,S]=F;j&&ne.compare(S,j)===0||(!l&&ut.isElement(B)&&(R.isVoid(e,B)||R.isElementReadOnly(e,B))||!ne.isCommon(S,b.path)&&!ne.isCommon(S,y.path))&&($.push(F),j=S)}var O=Array.from($,U=>{var[,Z]=U;return R.pathRef(e,Z)}),I=R.pointRef(e,b),P=R.pointRef(e,y),T="";if(!k&&!E){var _=I.current,[X]=R.leaf(e,_),{path:L}=_,{offset:q}=b,J=X.text.slice(q);J.length>0&&(e.apply({type:"remove_text",path:L,offset:q,text:J}),T=J)}if(O.reverse().map(U=>U.unref()).filter(U=>U!==null).forEach(U=>Re.removeNodes(e,{at:U,voids:l})),!x){var ee=P.current,[z]=R.leaf(e,ee),{path:Y}=ee,V=k?b.offset:0,G=z.text.slice(V,y.offset);G.length>0&&(e.apply({type:"remove_text",path:Y,offset:V,text:G}),T=G)}!k&&w&&P.current&&I.current&&Re.mergeNodes(e,{at:P.current,hanging:!0,voids:l}),c&&o&&a==="character"&&T.length>1&&T.match(/[\u0E00-\u0E7F]+/)&&Re.insertText(e,T.slice(0,T.length-i));var K=I.unref(),W=P.unref(),te=o?K||W:W||K;t.at==null&&te&&Re.select(e,te)}}})},sD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:a=np(e),batchDirty:i=!0}=r;if(t.length){if(De.isRange(a))if(n||(a=R.unhangRange(e,a,{voids:o})),De.isCollapsed(a))a=a.anchor;else{var[,l]=De.edges(a);if(!o&&R.void(e,{at:l}))return;var s=R.pointRef(e,l);Re.delete(e,{at:a}),a=s.unref()}else ne.isPath(a)&&(a=R.start(e,a));if(!(!o&&R.void(e,{at:a}))){var u=R.above(e,{at:a,match:J=>ut.isElement(J)&&R.isInline(e,J),mode:"highest",voids:o});if(u){var[,c]=u;if(R.isEnd(e,a,c)){var f=R.after(e,c);a=f}else if(R.isStart(e,a,c)){var p=R.before(e,c);a=p}}var h=R.above(e,{match:J=>ut.isElement(J)&&R.isBlock(e,J),at:a,voids:o}),[,v]=h,g=R.isStart(e,a,v),m=R.isEnd(e,a,v),b=g&&m,y=!g||g&&m,C=!m,[,D]=Ue.first({children:t},[]),[,w]=Ue.last({children:t},[]),k=[],E=J=>{var[ee,z]=J,Y=z.length===0;return Y?!1:b?!0:!(y&&ne.isAncestor(z,D)&&ut.isElement(ee)&&!e.isVoid(ee)&&!e.isInline(ee)||C&&ne.isAncestor(z,w)&&ut.isElement(ee)&&!e.isVoid(ee)&&!e.isInline(ee))};for(var x of Ue.nodes({children:t},{pass:E}))E(x)&&k.push(x);var A=[],N=[],$=[],j=!0,F=!1;for(var[B]of k)ut.isElement(B)&&!e.isInline(B)?(j=!1,F=!0,N.push(B)):j?A.push(B):$.push(B);var[S]=R.nodes(e,{at:a,match:J=>it.isText(J)||R.isInline(e,J),mode:"highest",voids:o}),[,O]=S,I=R.isStart(e,a,O),P=R.isEnd(e,a,O),T=R.pathRef(e,m&&!$.length?ne.next(v):v),_=R.pathRef(e,P?ne.next(O):O);Re.splitNodes(e,{at:a,match:J=>F?ut.isElement(J)&&R.isBlock(e,J):it.isText(J)||R.isInline(e,J),mode:F?"lowest":"highest",always:F&&(!g||A.length>0)&&(!m||$.length>0),voids:o});var X=R.pathRef(e,!I||I&&P?ne.next(O):O);if(Re.insertNodes(e,A,{at:X.current,match:J=>it.isText(J)||R.isInline(e,J),mode:"highest",voids:o,batchDirty:i}),b&&!A.length&&N.length&&!$.length&&Re.delete(e,{at:v,voids:o}),Re.insertNodes(e,N,{at:T.current,match:J=>ut.isElement(J)&&R.isBlock(e,J),mode:"lowest",voids:o,batchDirty:i}),Re.insertNodes(e,$,{at:_.current,match:J=>it.isText(J)||R.isInline(e,J),mode:"highest",voids:o,batchDirty:i}),!r.at){var L;if($.length>0&&_.current?L=ne.previous(_.current):N.length>0&&T.current?L=ne.previous(T.current):X.current&&(L=ne.previous(X.current)),L){var q=R.end(e,L);Re.select(e,q)}}X.unref(),T.unref(),_.unref()}}})},uD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")Re.select(e,n.anchor);else if(r==="focus")Re.select(e,n.focus);else if(r==="start"){var[o]=De.edges(n);Re.select(e,o)}else if(r==="end"){var[,a]=De.edges(n);Re.select(e,a)}}else return},cD=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},dD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:o="character",reverse:a=!1}=t,{edge:i=null}=t;if(r){i==="start"&&(i=De.isBackward(r)?"focus":"anchor"),i==="end"&&(i=De.isBackward(r)?"anchor":"focus");var{anchor:l,focus:s}=r,u={distance:n,unit:o,ignoreNonSelectable:!0},c={};if(i==null||i==="anchor"){var f=a?R.before(e,l,u):R.after(e,l,u);f&&(c.anchor=f)}if(i==null||i==="focus"){var p=a?R.before(e,s,u):R.after(e,s,u);p&&(c.focus=p)}Re.setSelection(e,c)}},fD=(e,t)=>{var{selection:r}=e;if(t=R.range(e,t),r){Re.setSelection(e,t);return}if(!De.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Ir.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function vh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:o="both"}=r;if(n){o==="start"&&(o=De.isBackward(n)?"focus":"anchor"),o==="end"&&(o=De.isBackward(n)?"anchor":"focus");var{anchor:a,focus:i}=n,l=o==="anchor"?a:i;Re.setSelection(e,{[o==="anchor"?"anchor":"focus"]:bh(bh({},l),t)})}},mD=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!Rt.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!Rt.equals(t.focus,r.focus)||a!=="anchor"&&a!=="focus"&&t[a]!==r[a])&&(n[a]=r[a],o[a]=t[a]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}},hD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:a="lowest",batchDirty:i=!0}=r,{at:l,match:s,select:u}=r;if(Ue.isNode(t)&&(t=[t]),t.length!==0){var[c]=t;if(l||(l=np(e),u!==!1&&(u=!0)),u==null&&(u=!1),De.isRange(l))if(n||(l=R.unhangRange(e,l,{voids:o})),De.isCollapsed(l))l=l.anchor;else{var[,f]=De.edges(l),p=R.pointRef(e,f);Re.delete(e,{at:l}),l=p.unref()}if(Rt.isPoint(l)){s==null&&(it.isText(c)?s=A=>it.isText(A):e.isInline(c)?s=A=>it.isText(A)||R.isInline(e,A):s=A=>ut.isElement(A)&&R.isBlock(e,A));var[h]=R.nodes(e,{at:l.path,match:s,mode:a,voids:o});if(h){var[,v]=h,g=R.pathRef(e,v),m=R.isEnd(e,l,v);Re.splitNodes(e,{at:l,match:s,mode:a,voids:o});var b=g.unref();l=m?ne.next(b):b}else return}var y=ne.parent(l),C=l[l.length-1];if(!(!o&&R.void(e,{at:y}))){if(i){var D=[],w=ne.levels(y);ZE(e,()=>{var A=function(){var $=y.concat(C);C++;var j={type:"insert_node",path:$,node:N};e.apply(j),l=ne.next(l),D.push(j),it.isText?w.push(...Array.from(Ue.nodes(N),F=>{var[,B]=F;return $.concat(B)})):w.push($)};for(var N of t)A()},()=>{Hb(e,w,A=>{var N=A;for(var $ of D)if(ne.operationCanTransformPath($)&&(N=ne.transform(N,$),!N))return null;return N})})}else for(var k of t){var E=y.concat(C);C++,e.apply({type:"insert_node",path:E,node:k}),l=ne.next(l)}if(l=ne.previous(l),u){var x=R.end(e,l);x&&Re.select(e,x)}}}})},gD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:a}=t;if(a==null&&(a=ne.isPath(r)?ti(e,r):C=>ut.isElement(C)&&R.isBlock(e,C)),!!r){var i=R.nodes(e,{at:r,match:a,mode:n,voids:o}),l=Array.from(i,C=>{var[,D]=C;return R.pathRef(e,D)});for(var s of l){var u=s.unref();if(u.length<2)throw new Error("Cannot lift node at a path [".concat(u,"] because it has a depth of less than `2`."));var c=R.node(e,ne.parent(u)),[f,p]=c,h=u[u.length-1],{length:v}=f.children;if(v===1){var g=ne.next(p);Re.moveNodes(e,{at:u,to:g,voids:o}),Re.removeNodes(e,{at:p,voids:o})}else if(h===0)Re.moveNodes(e,{at:u,to:p,voids:o});else if(h===v-1){var m=ne.next(p);Re.moveNodes(e,{at:u,to:m,voids:o})}else{var b=ne.next(u),y=ne.next(p);Re.splitNodes(e,{at:b,voids:o}),Re.moveNodes(e,{at:u,to:y,voids:o})}}}})},vD=["text"],bD=["children"],Wb=(e,t)=>{if(ut.isElement(t)){var r=t;return R.isVoid(e,t)?!0:r.children.length===1?Wb(e,r.children[0]):!1}else return!R.isEditor(t)},yD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:a=!1,mode:i="lowest"}=t;if(n){if(r==null)if(ne.isPath(n)){var[l]=R.parent(e,n);r=A=>l.children.includes(A)}else r=A=>ut.isElement(A)&&R.isBlock(e,A);if(!o&&De.isRange(n)&&(n=R.unhangRange(e,n,{voids:a})),De.isRange(n))if(De.isCollapsed(n))n=n.anchor;else{var[,s]=De.edges(n),u=R.pointRef(e,s);Re.delete(e,{at:n}),n=u.unref(),t.at==null&&Re.select(e,n)}var[c]=R.nodes(e,{at:n,match:r,voids:a,mode:i}),f=R.previous(e,{at:n,match:r,voids:a,mode:i});if(!(!c||!f)){var[p,h]=c,[v,g]=f;if(!(h.length===0||g.length===0)){var m=ne.next(g),b=ne.common(h,g),y=ne.isSibling(h,g),C=Array.from(R.levels(e,{at:h}),A=>{var[N]=A;return N}).slice(b.length).slice(0,-1),D=R.above(e,{at:h,mode:"highest",match:A=>C.includes(A)&&Wb(e,A)}),w=D&&R.pathRef(e,D[1]),k,E;if(it.isText(p)&&it.isText(v)){var x=vo(p,vD);E=v.text.length,k=x}else if(ut.isElement(p)&&ut.isElement(v)){var x=vo(p,bD);E=v.children.length,k=x}else throw new Error("Cannot merge the node at path [".concat(h,"] with the previous sibling because it is not the same kind: ").concat(Ir.stringify(p)," ").concat(Ir.stringify(v)));y||Re.moveNodes(e,{at:h,to:m,voids:a}),w&&Re.removeNodes(e,{at:w.current,voids:a}),R.shouldMergeNodesRemovePrevNode(e,f,c)?Re.removeNodes(e,{at:g,voids:a}):e.apply({type:"merge_node",path:m,position:E,properties:k}),w&&w.unref()}}}})},CD=(e,t)=>{R.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:a=!1}=t,{match:i}=t;if(n){i==null&&(i=ne.isPath(n)?ti(e,n):h=>ut.isElement(h)&&R.isBlock(e,h));var l=R.pathRef(e,r),s=R.nodes(e,{at:n,match:i,mode:o,voids:a}),u=Array.from(s,h=>{var[,v]=h;return R.pathRef(e,v)});for(var c of u){var f=c.unref(),p=l.current;f.length!==0&&e.apply({type:"move_node",path:f,newPath:p}),l.current&&ne.isSibling(p,f)&&ne.isAfter(p,f)&&(l.current=ne.next(l.current))}l.unref()}})},xD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:a=e.selection,match:i}=t;if(a){i==null&&(i=ne.isPath(a)?ti(e,a):p=>ut.isElement(p)&&R.isBlock(e,p)),!r&&De.isRange(a)&&(a=R.unhangRange(e,a,{voids:n}));var l=R.nodes(e,{at:a,match:i,mode:o,voids:n}),s=Array.from(l,p=>{var[,h]=p;return R.pathRef(e,h)});for(var u of s){var c=u.unref();if(c){var[f]=R.node(e,c);e.apply({type:"remove_node",path:c,node:f})}}}})},wD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:a,merge:i}=r,{hanging:l=!1,mode:s="lowest",split:u=!1,voids:c=!1}=r;if(o){if(n==null&&(n=ne.isPath(o)?ti(e,o):E=>ut.isElement(E)&&R.isBlock(e,E)),!l&&De.isRange(o)&&(o=R.unhangRange(e,o,{voids:c})),u&&De.isRange(o)){if(De.isCollapsed(o)&&R.leaf(e,o.anchor)[0].text.length>0)return;var f=R.rangeRef(e,o,{affinity:"inward"}),[p,h]=De.edges(o),v=s==="lowest"?"lowest":"highest",g=R.isEnd(e,h,h.path);Re.splitNodes(e,{at:h,match:n,mode:v,voids:c,always:!g});var m=R.isStart(e,p,p.path);Re.splitNodes(e,{at:p,match:n,mode:v,voids:c,always:!m}),o=f.unref(),r.at==null&&Re.select(e,o)}a||(a=(E,x)=>E!==x);for(var[b,y]of R.nodes(e,{at:o,match:n,mode:s,voids:c})){var C={},D={};if(y.length!==0){var w=!1;for(var k in t)k==="children"||k==="text"||a(t[k],b[k])&&(w=!0,b.hasOwnProperty(k)&&(C[k]=b[k]),i?t[k]!=null&&(D[k]=i(b[k],t[k])):t[k]!=null&&(D[k]=t[k]));w&&e.apply({type:"set_node",path:y,properties:C,newProperties:D})}}}})},ED=(e,t)=>{if(De.isCollapsed(t))return t.anchor;var[,r]=De.edges(t),n=R.pointRef(e,r);return Re.delete(e,{at:t}),n.unref()},kD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection,height:i=0,always:l=!1}=t;if(o==null&&(o=P=>ut.isElement(P)&&R.isBlock(e,P)),De.isRange(a)&&(a=ED(e,a)),ne.isPath(a)){var s=a,u=R.point(e,s),[c]=R.parent(e,s);o=P=>P===c,i=u.path.length-s.length+1,a=u,l=!0}if(a){var f=R.pointRef(e,a,{affinity:"backward"}),p;try{var[h]=R.nodes(e,{at:a,match:o,mode:r,voids:n});if(!h)return;var v=R.void(e,{at:a,mode:"highest"}),g=0;if(!n&&v){var[m,b]=v;if(ut.isElement(m)&&e.isInline(m)){var y=R.after(e,b);if(!y){var C={text:""},D=ne.next(b);Re.insertNodes(e,C,{at:D,voids:n}),y=R.point(e,D)}a=y,l=!0}var w=a.path.length-b.length;i=w+1,l=!0}p=R.pointRef(e,a);var k=a.path.length-i,[,E]=h,x=a.path.slice(0,k),A=i===0?a.offset:a.path[k]+g;for(var[N,$]of R.levels(e,{at:x,reverse:!0,voids:n})){var j=!1;if($.length<E.length||$.length===0||!n&&ut.isElement(N)&&R.isVoid(e,N))break;var F=f.current,B=R.isEnd(e,F,$);if(l||!f||!R.isEdge(e,F,$)){j=!0;var S=Ue.extractProps(N);e.apply({type:"split_node",path:$,position:A,properties:S})}A=$[$.length-1]+(j||B?1:0)}if(t.at==null){var O=p.current||R.end(e,[]);Re.select(e,O)}}finally{var I;f.unref(),(I=p)===null||I===void 0||I.unref()}}})},DD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var o of t)n[o]=null;Re.setNodes(e,n,r)},SD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:a=e.selection,match:i}=t;if(a){i==null&&(i=ne.isPath(a)?ti(e,a):p=>ut.isElement(p)&&R.isBlock(e,p)),ne.isPath(a)&&(a=R.range(e,a));var l=De.isRange(a)?R.rangeRef(e,a):null,s=R.nodes(e,{at:a,match:i,mode:r,voids:o}),u=Array.from(s,p=>{var[,h]=p;return R.pathRef(e,h)}).reverse(),c=function(){var p=f.unref(),[h]=R.node(e,p),v=R.range(e,p);n&&l&&(v=De.intersection(l.current,v)),Re.liftNodes(e,{at:v,match:g=>ut.isAncestor(h)&&h.children.includes(g),voids:o})};for(var f of u)c();l&&l.unref()}})};function yh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $D=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:a=!1}=r,{match:i,at:l=e.selection}=r;if(l){if(i==null&&(ne.isPath(l)?i=ti(e,l):e.isInline(t)?i=v=>ut.isElement(v)&&R.isInline(e,v)||it.isText(v):i=v=>ut.isElement(v)&&R.isBlock(e,v)),o&&De.isRange(l)){var[s,u]=De.edges(l),c=R.rangeRef(e,l,{affinity:"inward"});Re.splitNodes(e,{at:u,match:i,voids:a}),Re.splitNodes(e,{at:s,match:i,voids:a}),l=c.unref(),r.at==null&&Re.select(e,l)}var f=Array.from(R.nodes(e,{at:l,match:e.isInline(t)?v=>ut.isElement(v)&&R.isBlock(e,v):v=>R.isEditor(v),mode:"lowest",voids:a})),p=function(){var v=De.isRange(l)?De.intersection(l,R.range(e,h)):l;if(!v)return 0;var g=Array.from(R.nodes(e,{at:v,match:i,mode:n,voids:a}));if(g.length>0){var[m]=g,b=g[g.length-1],[,y]=m,[,C]=b;if(y.length===0&&C.length===0)return 0;var D=ne.equals(y,C)?ne.parent(y):ne.common(y,C),w=R.range(e,y,C),k=R.node(e,D),[E]=k,x=D.length+1,A=ne.next(C.slice(0,x)),N=Ch(Ch({},t),{},{children:[]});Re.insertNodes(e,N,{at:A,voids:a}),Re.moveNodes(e,{at:w,match:$=>ut.isAncestor(E)&&E.children.includes($),to:A.concat(0),voids:a})}};for(var[,h]of f)p()}})},BD=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return JE(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ok(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lk(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sk(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uk(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ek(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ck(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wk(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sD(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xk(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kk(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tk(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return eD(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return QE(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rk(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nk(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ak(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ik(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uD(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lD(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cD(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ck(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dk(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fk(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pk(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mk(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Rk(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gk(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vk(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bk(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yk(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hD(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dk(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sk(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $k(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Bk(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ok(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ak(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fk(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Pk(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Nk(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gD(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yD(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dD(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return CD(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tk(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mk(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zk(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _k(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lk(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kk(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hk(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wk(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Uk(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qk(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vk(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xk(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gk(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Jk(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yk(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zk(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xD(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fD(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wD(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tD(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pD(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mD(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kD(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rD(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nD(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return oD(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return DD(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return SD(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hk(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return aD(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $D(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return iD(e,...r)}};return e},Xu,xh;function OD(){if(xh)return Xu;xh=1,Xu=o;var e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",t="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",r=new RegExp("^[^"+t+"]*["+e+"]"),n=new RegExp("^[^"+e+"]*["+t+"]");function o(a){return a=String(a||""),r.test(a)?"rtl":n.test(a)?"ltr":"neutral"}return Xu}var AD=OD();const Kb=gl(AD);var Gu,wh;function ip(){if(wh)return Gu;wh=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Gu=e,Gu}var Yu,Eh;function FD(){if(Eh)return Yu;Eh=1;var e=typeof Nl=="object"&&Nl&&Nl.Object===Object&&Nl;return Yu=e,Yu}var Zu,kh;function qb(){if(kh)return Zu;kh=1;var e=FD(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Zu=r,Zu}var Ju,Dh;function PD(){if(Dh)return Ju;Dh=1;var e=qb(),t=function(){return e.Date.now()};return Ju=t,Ju}var Qu,Sh;function ND(){if(Sh)return Qu;Sh=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Qu=t,Qu}var ec,$h;function jD(){if($h)return ec;$h=1;var e=ND(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return ec=r,ec}var tc,Bh;function Vb(){if(Bh)return tc;Bh=1;var e=qb(),t=e.Symbol;return tc=t,tc}var rc,Oh;function ID(){if(Oh)return rc;Oh=1;var e=Vb(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(i){var l=r.call(i,o),s=i[o];try{i[o]=void 0;var u=!0}catch{}var c=n.call(i);return u&&(l?i[o]=s:delete i[o]),c}return rc=a,rc}var nc,Ah;function RD(){if(Ah)return nc;Ah=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return nc=r,nc}var oc,Fh;function TD(){if(Fh)return oc;Fh=1;var e=Vb(),t=ID(),r=RD(),n="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function i(l){return l==null?l===void 0?o:n:a&&a in Object(l)?t(l):r(l)}return oc=i,oc}var ac,Ph;function MD(){if(Ph)return ac;Ph=1;function e(t){return t!=null&&typeof t=="object"}return ac=e,ac}var ic,Nh;function zD(){if(Nh)return ic;Nh=1;var e=TD(),t=MD(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return ic=n,ic}var lc,jh;function _D(){if(jh)return lc;jh=1;var e=jD(),t=ip(),r=zD(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,l=parseInt;function s(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=a.test(u);return f||i.test(u)?l(u.slice(2),f?2:8):o.test(u)?n:+u}return lc=s,lc}var sc,Ih;function Ub(){if(Ih)return sc;Ih=1;var e=ip(),t=PD(),r=_D(),n="Expected a function",o=Math.max,a=Math.min;function i(l,s,u){var c,f,p,h,v,g,m=0,b=!1,y=!1,C=!0;if(typeof l!="function")throw new TypeError(n);s=r(s)||0,e(u)&&(b=!!u.leading,y="maxWait"in u,p=y?o(r(u.maxWait)||0,s):p,C="trailing"in u?!!u.trailing:C);function D(F){var B=c,S=f;return c=f=void 0,m=F,h=l.apply(S,B),h}function w(F){return m=F,v=setTimeout(x,s),b?D(F):h}function k(F){var B=F-g,S=F-m,O=s-B;return y?a(O,p-S):O}function E(F){var B=F-g,S=F-m;return g===void 0||B>=s||B<0||y&&S>=p}function x(){var F=t();if(E(F))return A(F);v=setTimeout(x,k(F))}function A(F){return v=void 0,C&&c?D(F):(c=f=void 0,h)}function N(){v!==void 0&&clearTimeout(v),m=0,c=g=f=v=void 0}function $(){return v===void 0?h:A(t())}function j(){var F=t(),B=E(F);if(c=arguments,f=this,g=F,B){if(v===void 0)return w(g);if(y)return clearTimeout(v),v=setTimeout(x,s),D(g)}return v===void 0&&(v=setTimeout(x,s)),h}return j.cancel=N,j.flush=$,j}return sc=i,sc}var LD=Ub();const HD=gl(LD);var uc,Rh;function WD(){if(Rh)return uc;Rh=1;var e=Ub(),t=ip(),r="Expected a function";function n(o,a,i){var l=!0,s=!0;if(typeof o!="function")throw new TypeError(r);return t(i)&&(l="leading"in i?!!i.leading:l,s="trailing"in i?!!i.trailing:s),e(o,a,{leading:l,maxWait:a,trailing:s})}return uc=n,uc}var KD=WD();const qD=gl(KD),Th=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Mh=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Il=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return Mh(r.overflowY,t)||Mh(r.overflowX,t)||(n=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},Rl=(e,t,r,n,o,a,i,l)=>a<e&&i>t||a>e&&i<t?0:a<=e&&l<=r||i>=t&&l>=r?a-e-n:i>t&&l<r||a<e&&l>r?i-t+o:0,VD=e=>e.parentElement??(e.getRootNode().host||null),zh=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:i,block:l,inline:s,boundary:u,skipOverflowHiddenElements:c}=t,f=typeof u=="function"?u:O=>O!==u;if(!Th(e))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,h=[];let v=e;for(;Th(v)&&f(v);){if(v=VD(v),v===p){h.push(v);break}v!=null&&v===document.body&&Il(v)&&!Il(document.documentElement)||v!=null&&Il(v,c)&&h.push(v)}const g=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,m=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:b,scrollY:y}=window,{height:C,width:D,top:w,right:k,bottom:E,left:x}=e.getBoundingClientRect(),{top:A,right:N,bottom:$,left:j}=(O=>{const I=window.getComputedStyle(O);return{top:parseFloat(I.scrollMarginTop)||0,right:parseFloat(I.scrollMarginRight)||0,bottom:parseFloat(I.scrollMarginBottom)||0,left:parseFloat(I.scrollMarginLeft)||0}})(e);let F=l==="start"||l==="nearest"?w-A:l==="end"?E+$:w+C/2-A+$,B=s==="center"?x+D/2-j+N:s==="end"?k+N:x-j;const S=[];for(let O=0;O<h.length;O++){const I=h[O],{height:P,width:T,top:_,right:X,bottom:L,left:q}=I.getBoundingClientRect();if(i==="if-needed"&&w>=0&&x>=0&&E<=m&&k<=g&&(I===p&&!Il(I)||w>=_&&E<=L&&x>=q&&k<=X))return S;const J=getComputedStyle(I),ee=parseInt(J.borderLeftWidth,10),z=parseInt(J.borderTopWidth,10),Y=parseInt(J.borderRightWidth,10),V=parseInt(J.borderBottomWidth,10);let G=0,K=0;const W="offsetWidth"in I?I.offsetWidth-I.clientWidth-ee-Y:0,te="offsetHeight"in I?I.offsetHeight-I.clientHeight-z-V:0,U="offsetWidth"in I?I.offsetWidth===0?0:T/I.offsetWidth:0,Z="offsetHeight"in I?I.offsetHeight===0?0:P/I.offsetHeight:0;if(p===I)G=l==="start"?F:l==="end"?F-m:l==="nearest"?Rl(y,y+m,m,z,V,y+F,y+F+C,C):F-m/2,K=s==="start"?B:s==="center"?B-g/2:s==="end"?B-g:Rl(b,b+g,g,ee,Y,b+B,b+B+D,D),G=Math.max(0,G+y),K=Math.max(0,K+b);else{G=l==="start"?F-_-z:l==="end"?F-L+V+te:l==="nearest"?Rl(_,L,P,z,V+te,F,F+C,C):F-(_+P/2)+te/2,K=s==="start"?B-q-ee:s==="center"?B-(q+T/2)+W/2:s==="end"?B-X+Y+W:Rl(q,X,T,ee,Y+W,B,B+D,D);const{scrollLeft:re,scrollTop:ue}=I;G=Z===0?0:Math.max(0,Math.min(ue+G/Z,I.scrollHeight-P/Z+te)),K=U===0?0:Math.max(0,Math.min(re+K/U,I.scrollWidth-T/U+W)),F+=ue-G,B+=re-K}S.push({el:I,top:G,left:K})}return S},UD=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function XD(e,t){if(!e.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(e))return;const r=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(zh(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:i}of zh(e,UD(t))){const l=a-r.top+r.bottom,s=i-r.left+r.right;o.scroll({top:l,left:s,behavior:n})}}var Vo=[],GD=function(){return Vo.some(function(e){return e.activeTargets.length>0})},YD=function(){return Vo.some(function(e){return e.skippedTargets.length>0})},_h="ResizeObserver loop completed with undelivered notifications.",ZD=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:_h}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=_h),window.dispatchEvent(e)},Vi;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Vi||(Vi={}));var Uo=function(e){return Object.freeze(e)},JD=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Uo(this)}return e})(),Xb=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Uo(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,a=t.right,i=t.bottom,l=t.left,s=t.width,u=t.height;return{x:r,y:n,top:o,right:a,bottom:i,left:l,width:s,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),lp=function(e){return e instanceof SVGElement&&"getBBox"in e},Gb=function(e){if(lp(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,a=o.offsetWidth,i=o.offsetHeight;return!(a||i||e.getClientRects().length)},Lh=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},QD=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Fi=typeof window<"u"?window:{},Tl=new WeakMap,Hh=/auto|scroll/,eS=/^tb|vertical/,tS=/msie|trident/i.test(Fi.navigator&&Fi.navigator.userAgent),Kn=function(e){return parseFloat(e||"0")},Aa=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new JD((r?t:e)||0,(r?e:t)||0)},Wh=Uo({devicePixelContentBoxSize:Aa(),borderBoxSize:Aa(),contentBoxSize:Aa(),contentRect:new Xb(0,0,0,0)}),Yb=function(e,t){if(t===void 0&&(t=!1),Tl.has(e)&&!t)return Tl.get(e);if(Gb(e))return Tl.set(e,Wh),Wh;var r=getComputedStyle(e),n=lp(e)&&e.ownerSVGElement&&e.getBBox(),o=!tS&&r.boxSizing==="border-box",a=eS.test(r.writingMode||""),i=!n&&Hh.test(r.overflowY||""),l=!n&&Hh.test(r.overflowX||""),s=n?0:Kn(r.paddingTop),u=n?0:Kn(r.paddingRight),c=n?0:Kn(r.paddingBottom),f=n?0:Kn(r.paddingLeft),p=n?0:Kn(r.borderTopWidth),h=n?0:Kn(r.borderRightWidth),v=n?0:Kn(r.borderBottomWidth),g=n?0:Kn(r.borderLeftWidth),m=f+u,b=s+c,y=g+h,C=p+v,D=l?e.offsetHeight-C-e.clientHeight:0,w=i?e.offsetWidth-y-e.clientWidth:0,k=o?m+y:0,E=o?b+C:0,x=n?n.width:Kn(r.width)-k-w,A=n?n.height:Kn(r.height)-E-D,N=x+m+w+y,$=A+b+D+C,j=Uo({devicePixelContentBoxSize:Aa(Math.round(x*devicePixelRatio),Math.round(A*devicePixelRatio),a),borderBoxSize:Aa(N,$,a),contentBoxSize:Aa(x,A,a),contentRect:new Xb(f,s,x,A)});return Tl.set(e,j),j},Zb=function(e,t,r){var n=Yb(e,r),o=n.borderBoxSize,a=n.contentBoxSize,i=n.devicePixelContentBoxSize;switch(t){case Vi.DEVICE_PIXEL_CONTENT_BOX:return i;case Vi.BORDER_BOX:return o;default:return a}},rS=(function(){function e(t){var r=Yb(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Uo([r.borderBoxSize]),this.contentBoxSize=Uo([r.contentBoxSize]),this.devicePixelContentBoxSize=Uo([r.devicePixelContentBoxSize])}return e})(),Jb=function(e){if(Gb(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},nS=function(){var e=1/0,t=[];Vo.forEach(function(a){if(a.activeTargets.length!==0){var i=[];a.activeTargets.forEach(function(l){var s=new rS(l.target),u=Jb(l.target);i.push(s),l.lastReportedSize=Zb(l.target,l.observedBox),u<e&&(e=u)}),t.push(function(){a.callback.call(a.observer,i,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},Kh=function(e){Vo.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(Jb(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},oS=function(){var e=0;for(Kh(e);GD();)e=nS(),Kh(e);return YD()&&ZD(),e>0},cc,Qb=[],aS=function(){return Qb.splice(0).forEach(function(e){return e()})},iS=function(e){if(!cc){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return aS()}).observe(r,n),cc=function(){r.textContent="".concat(t?t--:t++)}}Qb.push(e),cc()},lS=function(e){iS(function(){requestAnimationFrame(e)})},es=0,sS=function(){return!!es},uS=250,cS={attributes:!0,characterData:!0,childList:!0,subtree:!0},qh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Vh=function(e){return e===void 0&&(e=0),Date.now()+e},dc=!1,dS=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=uS),!dc){dc=!0;var n=Vh(t);lS(function(){var o=!1;try{o=oS()}finally{if(dc=!1,t=n-Vh(),!sS())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,cS)};document.body?r():Fi.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),qh.forEach(function(r){return Fi.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),qh.forEach(function(r){return Fi.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),gd=new dS,Uh=function(e){!es&&e>0&&gd.start(),es+=e,!es&&gd.stop()},fS=function(e){return!lp(e)&&!QD(e)&&getComputedStyle(e).display==="inline"},pS=(function(){function e(t,r){this.target=t,this.observedBox=r||Vi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Zb(this.target,this.observedBox,!0);return fS(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),mS=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ml=new WeakMap,Xh=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},zl=(function(){function e(){}return e.connect=function(t,r){var n=new mS(t,r);Ml.set(t,n)},e.observe=function(t,r,n){var o=Ml.get(t),a=o.observationTargets.length===0;Xh(o.observationTargets,r)<0&&(a&&Vo.push(o),o.observationTargets.push(new pS(r,n&&n.box)),Uh(1),gd.schedule())},e.unobserve=function(t,r){var n=Ml.get(t),o=Xh(n.observationTargets,r),a=n.observationTargets.length===1;o>=0&&(a&&Vo.splice(Vo.indexOf(n),1),n.observationTargets.splice(o,1),Uh(-1))},e.disconnect=function(t){var r=this,n=Ml.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),hS=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");zl.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Lh(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zl.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Lh(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zl.unobserve(this,t)},e.prototype.disconnect=function(){zl.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Nn={},Gh;function gS(){if(Gh)return Nn;Gh=1,Object.defineProperty(Nn,"__esModule",{value:!0});for(var e=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},n={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)n["f"+o]=111+o;function a(p,h,v){h&&!("byKey"in h)&&(v=h,h=null),Array.isArray(p)||(p=[p]);var g=p.map(function(y){return s(y,h)}),m=function(y){return g.some(function(C){return u(C,y)})},b=v==null?m:m(v);return b}function i(p,h){return a(p,h)}function l(p,h){return a(p,{byKey:!0},h)}function s(p,h){var v=h&&h.byKey,g={};p=p.replace("++","+add");var m=p.split("+"),b=m.length;for(var y in t)g[t[y]]=!1;var C=!0,D=!1,w=void 0;try{for(var k=m[Symbol.iterator](),E;!(C=(E=k.next()).done);C=!0){var x=E.value,A=x.endsWith("?")&&x.length>1;A&&(x=x.slice(0,-1));var N=f(x),$=t[N];if(x.length>1&&!$&&!r[x]&&!n[N])throw new TypeError('Unknown modifier: "'+x+'"');(b===1||!$)&&(v?g.key=N:g.which=c(x)),$&&(g[$]=A?null:!0)}}catch(j){D=!0,w=j}finally{try{!C&&k.return&&k.return()}finally{if(D)throw w}}return g}function u(p,h){for(var v in p){var g=p[v],m=void 0;if(g!=null&&(v==="key"&&h.key!=null?m=h.key.toLowerCase():v==="which"?m=g===91&&h.which===93?91:h.which:m=h[v],!(m==null&&g===!1)&&m!==g))return!1}return!0}function c(p){p=f(p);var h=n[p]||p.toUpperCase().charCodeAt(0);return h}function f(p){return p=p.toLowerCase(),p=r[p]||p,p}return Nn.default=a,Nn.isHotkey=a,Nn.isCodeHotkey=i,Nn.isKeyHotkey=l,Nn.parseHotkey=s,Nn.compareHotkey=u,Nn.toKeyCode=c,Nn.toKeyName=f,Nn}var fc=gS();function vS(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Ta(e,t){if(e==null)return{};var r=vS(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ui(e){"@babel/helpers - typeof";return Ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ui(e)}function bS(e,t){if(Ui(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ui(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yS(e){var t=bS(e,"string");return Ui(t)==="symbol"?t:String(t)}function Bn(e,t,r){return t=yS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var sp=Fn(null),Io=()=>{var e=Rr(sp);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},pc,mc,ey=parseInt(Q.version.split(".")[0],10),ty=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Yh=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),en=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Da=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Lo=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),CS=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),ry=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),xS=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),wS=en&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),ES=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),kS=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),DS=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),ts=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(pc=navigator.userAgent.match(/Version\/(\d+)/))!==null&&pc!==void 0&&pc[1]&&parseInt((mc=navigator.userAgent.match(/Version\/(\d+)/))===null||mc===void 0?void 0:mc[1],10)<17;var Co=(!xS||!wS)&&!CS&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Fa=new WeakMap,up=new WeakMap,cp=new WeakMap,ny=new WeakMap,rs=new WeakMap,vd=new WeakMap,Xi=new WeakMap,Xo=new WeakMap,$s=new WeakMap,ou=new WeakMap,bd=new WeakMap,$o=new WeakMap,Wo=new WeakMap,Pi=new WeakMap,yd=new WeakMap,dp=new WeakMap,Tn=new WeakMap,po=new WeakMap,sn=new WeakMap,Do=new WeakMap,So=new WeakMap,oy=new WeakMap,Ma=Symbol("placeholder"),ay=Symbol("mark-placeholder"),iy=globalThis.Node,SS=globalThis.Text,fp=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,$S=e=>Fo(e)&&e.nodeType===8,$n=e=>Fo(e)&&e.nodeType===1,Fo=e=>{var t=fp(e);return!!t&&e instanceof t.Node},Cd=e=>{var t=e&&e.anchorNode&&fp(e.anchorNode);return!!t&&e instanceof t.Selection},ly=e=>Fo(e)&&e.nodeType===3,BS=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,OS=e=>{var[t,r]=e;if($n(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=sy(t,o,n?"backward":"forward"),n=o<r;$n(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=FS(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},AS=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},sy=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,i=!1,l=!1;($S(o)||$n(o)&&o.childNodes.length===0||$n(o)&&o.getAttribute("contenteditable")==="false")&&!(i&&l);){if(a>=n.length){i=!0,a=t-1,r="backward";continue}if(a<0){l=!0,a=t+1,r="forward";continue}o=n[a],t=a,a+=r==="forward"?1:-1}return[o,t]},FS=(e,t,r)=>{var[n]=sy(e,t,r);return n},uy=e=>{var t="";if(ly(e)&&e.nodeValue)return e.nodeValue;if($n(e)){for(var r of Array.from(e.childNodes))t+=uy(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
15
+ `)}return t},PS=/data-slate-fragment="(.+?)"/m,NS=e=>{var t=e.getData("text/html"),[,r]=t.match(PS)||[];return r},Ni=e=>e.getSelection!=null?e.getSelection():document.getSelection(),pp=(e,t,r)=>{var{target:n}=t;if($n(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=$e.getWindow(e);if(o.contains(n))return $e.hasDOMNode(e,n,{editable:!0});var a=r.find(i=>{var{addedNodes:l,removedNodes:s}=i;for(var u of l)if(u===n||u.contains(n))return!0;for(var c of s)if(c===n||c.contains(n))return!0});return!a||a===t?!1:pp(e,a,r)},jS=()=>{for(var e=document.activeElement;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(r=e.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var t,r,n;e=(n=e)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return e},Zh=(e,t)=>!!(e.compareDocumentPosition(t)&iy.DOCUMENT_POSITION_PRECEDING),IS=(e,t)=>!!(e.compareDocumentPosition(t)&iy.DOCUMENT_POSITION_FOLLOWING),RS=0;class TS{constructor(){Bn(this,"id",void 0),this.id="".concat(RS++)}}var $e={androidPendingDiffs:e=>sn.get(e),androidScheduleFlush:e=>{var t;(t=dp.get(e))===null||t===void 0||t()},blur:e=>{var t=$e.toDOMNode(e,e),r=$e.findDocumentOrShadowRoot(e);$o.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=$e.findDocumentOrShadowRoot(e),n=Ni(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&Re.deselect(e)},findDocumentOrShadowRoot:e=>{var t=$e.toDOMNode(e,e),r=t.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:r,clientY:n,target:o}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var a=$e.toSlateNode(e,t.target),i=$e.findPath(e,a);if(ut.isElement(a)&&R.isVoid(e,a)){var l=o.getBoundingClientRect(),s=e.isInline(a)?r-l.left<l.left+l.width-r:n-l.top<l.top+l.height-n,u=R.point(e,i,{edge:s?"start":"end"}),c=s?R.before(e,u):R.after(e,u);if(c){var f=R.range(e,c);return f}}var p,{document:h}=$e.getWindow(e);if(h.caretRangeFromPoint)p=h.caretRangeFromPoint(r,n);else{var v=h.caretPositionFromPoint(r,n);v&&(p=h.createRange(),p.setStart(v.offsetNode,v.offset),p.setEnd(v.offsetNode,v.offset))}if(!p)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var g=$e.toSlateRange(e,p,{exactMatch:!1,suppressThrow:!1});return g},findKey:(e,t)=>{var r=$s.get(t);return r||(r=new TS,$s.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=cp.get(n);if(o==null){if(R.isEditor(n))return r;break}var a=up.get(n);if(a==null)break;r.unshift(a),n=o}throw new Error("Unable to find the path for Slate node: ".concat(Ir.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!$o.get(e)){if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{$e.focus(e,{retries:t.retries-1})},10);return}var r=$e.toDOMNode(e,e),n=$e.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Ni(n),a=$e.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||Re.select(e,R.start(e,[])),$o.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=ny.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:n=!1}=r,o=$e.toDOMNode(e,e),a;try{a=$n(t)?t:t.parentElement}catch(i){if(i instanceof Error&&!i.message.includes('Permission denied to access property "nodeType"'))throw i}return a?a.closest("[data-slate-editor]")===o&&(!n||a.isContentEditable?!0:typeof a.isContentEditable=="boolean"&&a.closest('[contenteditable="false"]')===o||!!a.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>Fo(t)&&$e.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return R.hasPath(e,r.path)&&R.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>$e.hasEditableTarget(e,t)||$e.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Fo(t)&&$e.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Wo.get(e),isFocused:e=>!!$o.get(e),isReadOnly:e=>!!bd.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(bd.get(e))return!1;var r=$e.hasTarget(e,t)&&$e.toSlateNode(e,t);return ut.isElement(r)&&R.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=ou.get(e),n=R.isEditor(t)?rs.get(e):r==null?void 0:r.get($e.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Ir.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=R.node(e,t.path),n=$e.toDOMNode(e,r),o;R.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",i=Array.from(n.querySelectorAll(a)),l=0,s=0;s<i.length;s++){var u=i[s],c=u.childNodes[0];if(!(c==null||c.textContent==null)){var{length:f}=c.textContent,p=u.getAttribute("data-slate-length"),h=p==null?f:parseInt(p,10),v=l+h,g=i[s+1];if(t.offset===v&&g!==null&&g!==void 0&&g.hasAttribute("data-slate-mark-placeholder")){var m,b=g.childNodes[0];o=[b instanceof SS?b:g,(m=g.textContent)!==null&&m!==void 0&&m.startsWith("\uFEFF")?1:0];break}if(t.offset<=v){var y=Math.min(f,Math.max(0,t.offset-l));o=[c,y];break}l=v}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Ir.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=De.isBackward(t),a=$e.toDOMPoint(e,r),i=De.isCollapsed(t)?a:$e.toDOMPoint(e,n),l=$e.getWindow(e),s=l.document.createRange(),[u,c]=o?i:a,[f,p]=o?a:i,h=$n(u)?u:u.parentElement,v=!!h.getAttribute("data-slate-zero-width"),g=$n(f)?f:f.parentElement,m=!!g.getAttribute("data-slate-zero-width");return s.setStart(u,v?1:c),s.setEnd(f,m?1:p),s},toSlateNode:(e,t)=>{var r=$n(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Xi.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(e,t,r)=>{var{exactMatch:n,suppressThrow:o,searchDirection:a="backward"}=r,[i,l]=n?t:OS(t),s=i.parentNode,u=null,c=0;if(s){var f,p,h=$e.toDOMNode(e,e),v=s.closest('[data-slate-void="true"]'),g=v&&h.contains(v)?v:null,m=s.closest('[contenteditable="false"]'),b=m&&h.contains(m)?m:null,y=s.closest("[data-slate-leaf]"),C=null;if(y){if(u=y.closest('[data-slate-node="text"]'),u){var D=$e.getWindow(e),w=D.document.createRange();w.setStart(u,0),w.setEnd(i,l);var k=w.cloneContents(),E=[...Array.prototype.slice.call(k.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(k.querySelectorAll("[contenteditable=false]"))];E.forEach(q=>{if(en&&!n&&q.hasAttribute("data-slate-zero-width")&&q.textContent.length>0&&q.textContext!=="\uFEFF"){q.textContent.startsWith("\uFEFF")&&(q.textContent=q.textContent.slice(1));return}q.parentNode.removeChild(q)}),c=k.textContent.length,C=u}}else if(g){for(var x=g.querySelectorAll("[data-slate-leaf]"),A=0;A<x.length;A++){var N=x[A];if($e.hasDOMNode(e,N)){y=N;break}}y?(u=y.closest('[data-slate-node="text"]'),C=y,c=C.textContent.length,C.querySelectorAll("[data-slate-zero-width]").forEach(q=>{c-=q.textContent.length})):c=1}else if(b){var $=q=>q?q.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],j=b.closest('[data-slate-node="element"]');if(a==="forward"){var F,B=[...$(j),...$(j==null?void 0:j.nextElementSibling)];y=(F=B.find(q=>IS(b,q)))!==null&&F!==void 0?F:null}else{var S,O=[...$(j==null?void 0:j.previousElementSibling),...$(j)];y=(S=O.findLast(q=>Zh(b,q)))!==null&&S!==void 0?S:null}y&&(u=y.closest('[data-slate-node="text"]'),C=y,a==="forward"?c=0:(c=C.textContent.length,C.querySelectorAll("[data-slate-zero-width]").forEach(q=>{c-=q.textContent.length})))}C&&c===C.textContent.length&&en&&C.getAttribute("data-slate-zero-width")==="z"&&(f=C.textContent)!==null&&f!==void 0&&f.startsWith("\uFEFF")&&(s.hasAttribute("data-slate-zero-width")||Da&&(p=C.textContent)!==null&&p!==void 0&&p.endsWith(`
16
+
17
+ `))&&c--}if(en&&!u&&!n){var I=s.hasAttribute("data-slate-node")?s:s.closest("[data-slate-node]");if(I&&$e.hasDOMNode(e,I,{editable:!0})){var P=$e.toSlateNode(e,I),{path:T,offset:_}=R.start(e,$e.findPath(e,P));return I.querySelector("[data-slate-leaf]")||(_=l),{path:T,offset:_}}}if(!u){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var X=$e.toSlateNode(e,u),L=$e.findPath(e,X);return{path:L,offset:c}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,i=Cd(t)?t.anchorNode:t.startContainer,l,s,u,c,f;if(i)if(Cd(t)){if(Da&&t.rangeCount>1){u=t.focusNode;var p=t.getRangeAt(0),h=t.getRangeAt(t.rangeCount-1);if(u instanceof HTMLTableRowElement&&p.startContainer instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement){let k=function(E){return E.childElementCount>0?k(E.children[0]):E};var v=p.startContainer,g=h.startContainer,m=k(v.children[p.startOffset]),b=k(g.children[h.startOffset]);c=0,b.childNodes.length>0?l=b.childNodes[0]:l=b,m.childNodes.length>0?u=m.childNodes[0]:u=m,b instanceof HTMLElement?s=b.innerHTML.length:s=0}else p.startContainer===u?(l=h.endContainer,s=h.endOffset,c=p.startOffset):(l=p.startContainer,s=p.endOffset,c=h.startOffset)}else l=t.anchorNode,s=t.anchorOffset,u=t.focusNode,c=t.focusOffset;ry&&AS(l)||Da?f=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:f=t.isCollapsed}else l=t.startContainer,s=t.startOffset,u=t.endContainer,c=t.endOffset,f=t.collapsed;if(l==null||u==null||s==null||c==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Da&&(n=u.textContent)!==null&&n!==void 0&&n.endsWith(`
18
+
19
+ `)&&c===u.textContent.length&&c--;var y=$e.toSlatePoint(e,[l,s],{exactMatch:o,suppressThrow:a});if(!y)return null;var C=Zh(l,u)||l===u&&c<s,D=f?y:$e.toSlatePoint(e,[u,c],{exactMatch:o,suppressThrow:a,searchDirection:C?"forward":"backward"});if(!D)return null;var w={anchor:y,focus:D};return De.isExpanded(w)&&De.isForward(w)&&$n(u)&&R.void(e,{at:w.focus,mode:"highest"})&&(w=R.unhangRange(e,w,{voids:!0})),w}};function MS(e,t){var{path:r,diff:n}=t;if(!R.hasPath(e,r))return!1;var o=Ue.get(e,r);if(!it.isText(o))return!1;if(n.start!==o.text.length||n.text.length===0)return o.text.slice(n.start,n.start+n.text.length)===n.text;var a=ne.next(r);if(!R.hasPath(e,a))return!1;var i=Ue.get(e,a);return it.isText(i)&&i.text.startsWith(n.text)}function cy(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((o,a)=>o.slice(0,a.start)+a.text+o.slice(a.end),e)}function zS(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n))return n;return r}function _S(e,t,r){for(var n=Math.min(e.length,t.length,r),o=0;o<n;o++)if(e.charAt(e.length-o-1)!==t.charAt(t.length-o-1))return o;return n}function dy(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),i=zS(a,o),l=Math.min(a.length-i,o.length-i),s=_S(a,o,l),u={start:r+i,end:n-s,text:o.slice(i,o.length-s)};return u.start===u.end&&u.text.length===0?null:u}function LS(e,t,r){var n=Math.min(t.start,r.start),o=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),a=cy(e,t,r),i=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),l=a.slice(n,i),s=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return dy(e,{start:n,end:s,text:l})}function HS(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function xd(e,t){var{path:r,offset:n}=t;if(!R.hasPath(e,r))return null;var o=Ue.get(e,r);if(!it.isText(o))return null;var a=R.above(e,{match:l=>ut.isElement(l)&&R.isBlock(e,l),at:r});if(!a)return null;for(;n>o.text.length;){var i=R.next(e,{at:r,match:it.isText});if(!i||!ne.isDescendant(i[1],a[1]))return null;n-=o.text.length,o=i[0],r=i[1]}return{path:r,offset:n}}function Jh(e,t){var r=xd(e,t.anchor);if(!r)return null;if(De.isCollapsed(t))return{anchor:r,focus:r};var n=xd(e,t.focus);return n?{anchor:r,focus:n}:null}function wd(e,t,r){var n=sn.get(e),o=n==null?void 0:n.find(c=>{var{path:f}=c;return ne.equals(f,t.path)});if(!o||t.offset<=o.diff.start)return Rt.transform(t,r,{affinity:"backward"});var{diff:a}=o;if(t.offset<=a.start+a.text.length){var i={path:t.path,offset:a.start},l=Rt.transform(i,r,{affinity:"backward"});return l?{path:l.path,offset:l.offset+t.offset-a.start}:null}var s={path:t.path,offset:t.offset-a.text.length+a.end-a.start},u=Rt.transform(s,r,{affinity:"backward"});return u?r.type==="split_node"&&ne.equals(r.path,t.path)&&s.offset<r.position&&a.start<r.position?u:{path:u.path,offset:u.offset+a.text.length-a.end+a.start}:null}function Qh(e,t,r){var n=wd(e,t.anchor,r);if(!n)return null;if(De.isCollapsed(t))return{anchor:n,focus:n};var o=wd(e,t.focus,r);return o?{anchor:n,focus:o}:null}function WS(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!ne.equals(t.path,r)||t.offset>=n.end?e:t.offset<=n.start?{diff:{start:t.text.length+n.start,end:t.text.length+n.end,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:o,path:r};case"remove_text":return!ne.equals(t.path,r)||t.offset>=n.end?e:t.offset+t.text.length<=n.start?{diff:{start:n.start-t.text.length,end:n.end-t.text.length,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:o,path:r};case"split_node":return!ne.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:ne.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:o,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:o,path:ne.transform(r,t,{affinity:"forward"})};case"merge_node":return ne.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:ne.transform(r,t)}:{diff:n,id:o,path:ne.transform(r,t)}}var a=ne.transform(r,t);return a?{diff:n,path:a,id:o}:null}function eg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function _l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var KS=25,qS=200,VS=function(){},US=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function XS(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,i=null,l=null,s=0,u=!1,c=()=>{var j=So.get(t);if(So.delete(t),j){var{selection:F}=t,B=Jh(t,j);B&&(!F||!De.equals(B,F))&&Re.select(t,B)}},f=()=>{var j=Do.get(t);if(Do.delete(t),!!j){if(j.at){var F=Rt.isPoint(j.at)?xd(t,j.at):Jh(t,j.at);if(!F)return;var B=R.range(t,F);(!t.selection||!De.equals(t.selection,B))&&Re.select(t,F)}j.run()}},p=()=>{if(i&&(clearTimeout(i),i=null),l&&(clearTimeout(l),l=null),!D()&&!C()){c();return}o||(o=!0,setTimeout(()=>o=!1)),C()&&(o="action");var j=t.selection&&R.rangeRef(t,t.selection,{affinity:"forward"});po.set(t,t.marks),VS("flush",Do.get(t),sn.get(t));for(var F=D(),B;B=(S=sn.get(t))===null||S===void 0?void 0:S[0];){var S,O,I=Tn.get(t);I!==void 0&&(Tn.delete(t),t.marks=I),I&&u===!1&&(u=null);var P=HS(B);(!t.selection||!De.equals(t.selection,P))&&Re.select(t,P),B.diff.text?R.insertText(t,B.diff.text):R.deleteFragment(t),sn.set(t,(O=sn.get(t))===null||O===void 0?void 0:O.filter(X=>{var{id:L}=X;return L!==B.id})),MS(t,B)||(F=!1,Do.delete(t),po.delete(t),o="action",So.delete(t),r.cancel(),n.cancel(),j==null||j.unref())}var T=j==null?void 0:j.unref();if(T&&!So.get(t)&&(!t.selection||!De.equals(T,t.selection))&&Re.select(t,T),C()){f();return}F&&r(),r.flush(),n.flush(),c();var _=po.get(t);po.delete(t),_!==void 0&&(t.marks=_,t.onChange())},h=j=>{a&&clearTimeout(a),a=setTimeout(()=>{Wo.set(t,!1),p()},KS)},v=j=>{Wo.set(t,!0),a&&(clearTimeout(a),a=null)},g=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,F=vd.get(t);if(F){if(D()||j){F.style.display="none";return}F.style.removeProperty("display")}},m=(j,F)=>{var B,S=(B=sn.get(t))!==null&&B!==void 0?B:[];sn.set(t,S);var O=Ue.leaf(t,j),I=S.findIndex(_=>ne.equals(_.path,j));if(I<0){var P=dy(O.text,F);P&&S.push({path:j,diff:F,id:s++}),g();return}var T=LS(O.text,S[I].diff,F);if(!T){S.splice(I,1),g();return}S[I]=_l(_l({},S[I]),{},{diff:T})},b=function(j){var{at:F}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};u=!1,So.delete(t),r.cancel(),n.cancel(),C()&&p(),Do.set(t,{at:F,run:j}),l=setTimeout(p)},y=j=>{var F;if(i&&(clearTimeout(i),i=null),!Fa.get(t)){var{inputType:B}=j,S=null,O=j.dataTransfer||j.data||void 0;u!==!1&&B!=="insertText"&&B!=="insertCompositionText"&&(u=!1);var[I]=j.getTargetRanges();I&&(S=$e.toSlateRange(t,I,{exactMatch:!1,suppressThrow:!0}));var P=$e.getWindow(t),T=P.getSelection();if(!S&&T&&(I=T,S=$e.toSlateRange(t,T,{exactMatch:!1,suppressThrow:!0})),S=(F=S)!==null&&F!==void 0?F:t.selection,!!S){var _=!0;if(B.startsWith("delete")){if(De.isExpanded(S)){var[X,L]=De.edges(S),q=Ue.leaf(t,X.path);if(q.text.length===X.offset&&L.offset===0){var J=R.next(t,{at:X.path,match:it.isText});J&&ne.equals(J[1],L.path)&&(S={anchor:L,focus:L})}}var ee=B.endsWith("Backward")?"backward":"forward",[z,Y]=De.edges(S),[V,G]=R.leaf(t,z.path),K={text:"",start:z.offset,end:Y.offset},W=sn.get(t),te=W==null?void 0:W.find(_e=>ne.equals(_e.path,G)),U=te?[te.diff,K]:[K],Z=cy(V.text,...U);if(Z.length===0&&(_=!1),De.isExpanded(S)){if(_&&ne.equals(S.anchor.path,S.focus.path)){var re={path:S.anchor.path,offset:z.offset},ue=R.range(t,re,re);return E(ue),m(S.anchor.path,{text:"",end:Y.offset,start:z.offset})}return b(()=>R.deleteFragment(t,{direction:ee}),{at:S})}}switch(B){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return b(()=>R.deleteFragment(t),{at:S});case"deleteContent":case"deleteContentForward":{var{anchor:he}=S;if(_&&De.isCollapsed(S)){var we=Ue.leaf(t,he.path);if(he.offset<we.text.length)return m(he.path,{text:"",start:he.offset,end:he.offset+1})}return b(()=>R.deleteForward(t),{at:S})}case"deleteContentBackward":{var Ne,{anchor:me}=S,ge=Cd(I)?I.isCollapsed:!!((Ne=I)!==null&&Ne!==void 0&&Ne.collapsed);return _&&ge&&De.isCollapsed(S)&&me.offset>0?m(me.path,{text:"",start:me.offset-1,end:me.offset}):b(()=>R.deleteBackward(t),{at:S})}case"deleteEntireSoftLine":return b(()=>{R.deleteBackward(t,{unit:"line"}),R.deleteForward(t,{unit:"line"})},{at:S});case"deleteHardLineBackward":return b(()=>R.deleteBackward(t,{unit:"block"}),{at:S});case"deleteSoftLineBackward":return b(()=>R.deleteBackward(t,{unit:"line"}),{at:S});case"deleteHardLineForward":return b(()=>R.deleteForward(t,{unit:"block"}),{at:S});case"deleteSoftLineForward":return b(()=>R.deleteForward(t,{unit:"line"}),{at:S});case"deleteWordBackward":return b(()=>R.deleteBackward(t,{unit:"word"}),{at:S});case"deleteWordForward":return b(()=>R.deleteForward(t,{unit:"word"}),{at:S});case"insertLineBreak":return b(()=>R.insertSoftBreak(t),{at:S});case"insertParagraph":return b(()=>R.insertBreak(t),{at:S});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(US(O))return b(()=>$e.insertData(t,O),{at:S});var ye=O??"";if(Tn.get(t)&&(ye=ye.replace("\uFEFF","")),B==="insertText"&&/.*\n.*\n$/.test(ye)&&(ye=ye.slice(0,-1)),ye.includes(`
20
+ `))return b(()=>{var _e=ye.split(`
21
+ `);_e.forEach((Pe,ve)=>{Pe&&R.insertText(t,Pe),ve!==_e.length-1&&R.insertSoftBreak(t)})},{at:S});if(ne.equals(S.anchor.path,S.focus.path)){var[Ce,xe]=De.edges(S),Ae={start:Ce.offset,end:xe.offset,text:ye};if(ye&&u&&B==="insertCompositionText"){var ke=u.start+u.text.search(/\S|$/),We=Ae.start+Ae.text.search(/\S|$/);We===ke+1&&Ae.end===u.start+u.text.length?(Ae.start-=1,u=null,N()):u=!1}else B==="insertText"?u===null?u=Ae:u&&De.isCollapsed(S)&&u.end+u.text.length===Ce.offset?u=_l(_l({},u),{},{text:u.text+ye}):u=!1:u=!1;if(_){m(Ce.path,Ae);return}}return b(()=>R.insertText(t,ye),{at:S})}}}}},C=()=>!!Do.get(t),D=()=>{var j;return!!((j=sn.get(t))!==null&&j!==void 0&&j.length)},w=()=>C()||D(),k=()=>o,E=j=>{So.set(t,j),i&&(clearTimeout(i),i=null);var{selection:F}=t;if(j){var B=!F||!ne.equals(F.anchor.path,j.anchor.path),S=!F||!ne.equals(F.anchor.path.slice(0,-1),j.anchor.path.slice(0,-1));(B&&u||S)&&(u=!1),(B||D())&&(i=setTimeout(p,qS))}},x=()=>{(C()||!D())&&p()},A=j=>{D()||(g(!0),setTimeout(g))},N=()=>{C()||(l=setTimeout(p))},$=j=>{if(!(D()||C())&&j.some(B=>pp(t,B,j))){var F;(F=oy.get(t))===null||F===void 0||F()}};return{flush:p,scheduleFlush:N,hasPendingDiffs:D,hasPendingAction:C,hasPendingChanges:w,isFlushing:k,handleUserSelect:E,handleCompositionEnd:h,handleCompositionStart:v,handleDOMBeforeInput:y,handleKeyDown:A,handleDomMutations:$,handleInput:x}}function GS(){var e=Ve(!1);return Ot(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var Gi=ts?Fb:Ot;function YS(e,t,r){var[n]=xt(()=>new MutationObserver(t));Gi(()=>{n.takeRecords()}),Ot(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(e.current,r),()=>n.disconnect()},[n,e,r])}var ZS=["node"];function tg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function JS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var QS={subtree:!0,childList:!0,characterData:!0},e$=en?e=>{var{node:t}=e,r=Ta(e,ZS);if(!en)return null;var n=Io(),o=GS(),[a]=xt(()=>XS(JS({editor:n},r)));return YS(t,a.handleDomMutations,QS),dp.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,t$=["anchor","focus"],r$=["anchor","focus"],n$=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),fy=(e,t)=>{var r=Ta(e,t$),n=Ta(t,r$);return e[Ma]===t[Ma]&&n$(r,n)},o$=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(!De.equals(n,o)||!fy(n,o))return!1}return!0},a$=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(n.anchor.offset!==o.anchor.offset||n.focus.offset!==o.focus.offset||!fy(n,o))return!1}return!0};function rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function i$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var l$=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=Io(),i=$e.findPath(a,o),l=ne.parent(i),s=!!r[ay];return a.isVoid(n)?Q.createElement(hc,{length:Ue.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&R.string(a,l)===""?Q.createElement(hc,{isLineBreak:!0,isMarkPlaceholder:s}):r.text===""?Q.createElement(hc,{isMarkPlaceholder:s}):t&&r.text.slice(-1)===`
22
+ `?Q.createElement(ng,{isTrailing:!0,text:r.text}):Q.createElement(ng,{text:r.text})},ng=e=>{var{text:t,isTrailing:r=!1}=e,n=Ve(null),o=()=>"".concat(t??"").concat(r?`
23
+ `:""),[a]=xt(o);return Gi(()=>{var i=o();n.current&&n.current.textContent!==i&&(n.current.textContent=i)}),Q.createElement(s$,{ref:n},a)},s$=Vw(dn((e,t)=>Q.createElement("span",{"data-slate-string":!0,ref:t},e.children))),hc=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,o={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(o["data-slate-mark-placeholder"]=!0),Q.createElement("span",i$({},o),!(en||ty)||!r?"\uFEFF":null,r?Q.createElement("br",null):null)};function og(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function py(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?og(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):og(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var u$=en?300:0;function c$(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function ag(e){e.current&&(clearTimeout(e.current),e.current=null)}var d$=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:i=y=>Q.createElement(p$,py({},y))}=e,l=Io(),s=Ve(null),u=Ve(null),[c,f]=xt(!1),p=Ve(null),h=mt(y=>{if(c$(s,y==null),y==null){var C;vd.delete(l),(C=t.onPlaceholderResize)===null||C===void 0||C.call(t,null)}else{if(vd.set(l,y),!s.current){var D=window.ResizeObserver||hS;s.current=new D(()=>{var w;(w=t.onPlaceholderResize)===null||w===void 0||w.call(t,y)})}s.current.observe(y),u.current=y}},[u,t,l]),v=Q.createElement(l$,{isLast:r,leaf:t,parent:o,text:n}),g=!!t[Ma];if(Ot(()=>(g?p.current||(p.current=setTimeout(()=>{f(!0),p.current=null},u$)):(ag(p),f(!1)),()=>ag(p)),[g,f]),g&&c){var m={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Lo?"inherit":void 0},contentEditable:!1,ref:h}};v=Q.createElement(Q.Fragment,null,a(m),v)}var b={"data-slate-leaf":!0};return i({attributes:b,children:v,leaf:t,text:n})},f$=Q.memo(d$,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&it.equals(t.leaf,e.leaf)&&t.leaf[Ma]===e.leaf[Ma]),p$=e=>{var{attributes:t,children:r}=e;return Q.createElement("span",py({},t),r)},m$=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:i}=e,l=Io(),s=Ve(null),u=it.decorations(i,t),c=$e.findKey(l,i),f=[],p=0;p<u.length;p++){var h=u[p];f.push(Q.createElement(f$,{isLast:r&&p===u.length-1,key:"".concat(c.id,"-").concat(p),renderPlaceholder:o,leaf:h,text:i,parent:n,renderLeaf:a}))}var v=mt(g=>{var m=ou.get(l);g?(m==null||m.set(c,g),Xo.set(i,g),Xi.set(g,i)):(m==null||m.delete(c),Xo.delete(i),s.current&&Xi.delete(s.current)),s.current=g},[s,l,c,i]);return Q.createElement("span",{"data-slate-node":"text",ref:v},f)},my=Q.memo(m$,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&a$(t.decorations,e.decorations));function ig(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ed(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ig(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var h$=e=>{var{decorations:t,element:r,renderElement:n=y=>Q.createElement(v$,Ed({},y)),renderPlaceholder:o,renderLeaf:a,selection:i}=e,l=Io(),s=C$(),u=l.isInline(r),c=$e.findKey(l,r),f=mt(y=>{var C=ou.get(l);y?(C==null||C.set(c,y),Xo.set(r,y),Xi.set(y,r)):(C==null||C.delete(c),Xo.delete(r))},[l,c,r]),p=gy({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:i}),h={"data-slate-node":"element",ref:f};if(u&&(h["data-slate-inline"]=!0),!u&&R.hasInlines(l,r)){var v=Ue.string(r),g=Kb(v);g==="rtl"&&(h.dir=g)}if(R.isVoid(l,r)){h["data-slate-void"]=!0,!s&&u&&(h.contentEditable=!1);var m=u?"span":"div",[[b]]=Ue.texts(r);p=Q.createElement(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Q.createElement(my,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:b})),up.set(b,0),cp.set(b,r)}return n({attributes:h,children:p,element:r})},g$=Q.memo(h$,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&o$(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&De.equals(e.selection,t.selection))),v$=e=>{var{attributes:t,children:r,element:n}=e,o=Io(),a=o.isInline(n)?"span":"div";return Q.createElement(a,Ed(Ed({},t),{},{style:{position:"relative"}}),r)},hy=Fn(()=>[]),b$=()=>Rr(hy),y$=Fn(!1),gy=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:i}=e,l=b$(),s=Io();Fa.set(s,!1);for(var u=$e.findPath(s,r),c=[],f=ut.isElement(r)&&!s.isInline(r)&&R.hasInlines(s,r),p=0;p<r.children.length;p++){var h=u.concat(p),v=r.children[p],g=$e.findKey(s,v),m=R.range(s,h),b=i&&De.intersection(m,i),y=l([v,h]);for(var C of t){var D=De.intersection(C,m);D&&y.push(D)}ut.isElement(v)?c.push(Q.createElement(y$.Provider,{key:"provider-".concat(g.id),value:!!b},Q.createElement(g$,{decorations:y,element:v,key:g.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:b}))):c.push(Q.createElement(my,{decorations:y,key:g.id,isLast:f&&p===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:v})),up.set(v,p),cp.set(v,r)}return c},vy=Fn(!1),C$=()=>Rr(vy),by=Fn(null),yy=()=>{var e=Rr(by);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function x$(){var e=Io(),t=Ve(!1),r=Ve(0),n=mt(()=>{if(!t.current){t.current=!0;var o=$e.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return Ot(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var w$=3,E$={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},k$={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},D$={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},ir=e=>{var t=E$[e],r=k$[e],n=D$[e],o=t&&fc.isHotkey(t),a=r&&fc.isHotkey(r),i=n&&fc.isHotkey(n);return l=>!!(o&&o(l)||Yh&&a&&a(l)||!Yh&&i&&i(l))},cr={isBold:ir("bold"),isCompose:ir("compose"),isMoveBackward:ir("moveBackward"),isMoveForward:ir("moveForward"),isDeleteBackward:ir("deleteBackward"),isDeleteForward:ir("deleteForward"),isDeleteLineBackward:ir("deleteLineBackward"),isDeleteLineForward:ir("deleteLineForward"),isDeleteWordBackward:ir("deleteWordBackward"),isDeleteWordForward:ir("deleteWordForward"),isExtendBackward:ir("extendBackward"),isExtendForward:ir("extendForward"),isExtendLineBackward:ir("extendLineBackward"),isExtendLineForward:ir("extendLineForward"),isItalic:ir("italic"),isMoveLineBackward:ir("moveLineBackward"),isMoveLineForward:ir("moveLineForward"),isMoveWordBackward:ir("moveWordBackward"),isMoveWordForward:ir("moveWordForward"),isRedo:ir("redo"),isSoftBreak:ir("insertSoftBreak"),isSplitBlock:ir("splitBlock"),isTransposeCharacter:ir("transposeCharacter"),isUndo:ir("undo")},S$=(e,t)=>{var r=[],n=()=>{r=[]},o=i=>{if(t.current){var l=i.filter(s=>pp(e,s,i));r.push(...l)}};function a(){r.length>0&&(r.reverse().forEach(i=>{i.type!=="characterData"&&(i.removedNodes.forEach(l=>{i.target.insertBefore(l,i.nextSibling)}),i.addedNodes.forEach(l=>{i.target.removeChild(l)}))}),n())}return{registerMutations:o,restoreDOM:a,clear:n}},$$={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class Cy extends qw{constructor(){super(...arguments),Bn(this,"context",null),Bn(this,"manager",null),Bn(this,"mutationObserver",null)}observe(){var t,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(r.current,$$)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=S$(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(o)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}Bn(Cy,"contextType",sp);var B$=en?Cy:e=>{var{children:t}=e;return Q.createElement(Q.Fragment,null,t)},O$=Fn(!1),A$=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],F$=["text"];function lg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var P$=e=>Q.createElement(Q.Fragment,null,gy(e)),gc=dn((e,t)=>{var r=mt(z=>Q.createElement(N$,qn({},z)),[]),{autoFocus:n,decorate:o=j$,onDOMBeforeInput:a,placeholder:i,readOnly:l=!1,renderElement:s,renderLeaf:u,renderPlaceholder:c=r,scrollSelectionIntoView:f=I$,style:p={},as:h="div",disableDefaultStyles:v=!1}=e,g=Ta(e,A$),m=yy(),[b,y]=xt(!1),C=Ve(null),D=Ve([]),[w,k]=xt(),E=Ve(!1),{onUserInput:x,receivedUserInput:A}=x$(),[,N]=Kw(z=>z+1,0);oy.set(m,N),bd.set(m,l);var $=wt(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Ot(()=>{C.current&&n&&C.current.focus()},[n]);var j=Ve(),F=wt(()=>qD(()=>{if(Fa.get(m)){F();return}var z=$e.toDOMNode(m,m),Y=z.getRootNode();if(!E.current&&Lo&&Y instanceof ShadowRoot){E.current=!0;var V=jS();V?document.execCommand("indent"):Re.deselect(m),E.current=!1;return}var G=j.current;if((en||!$e.isComposing(m))&&(!$.isUpdatingSelection||G!=null&&G.isFlushing())&&!$.isDraggingInternally){var K=$e.findDocumentOrShadowRoot(m),{activeElement:W}=K,te=$e.toDOMNode(m,m),U=Ni(K);if(W===te?($.latestElement=W,$o.set(m,!0)):$o.delete(m),!U)return Re.deselect(m);var{anchorNode:Z,focusNode:re}=U,ue=$e.hasEditableTarget(m,Z)||$e.isTargetInsideNonReadonlyVoid(m,Z),he=$e.hasTarget(m,re);if(ue&&he){var we=$e.toSlateRange(m,U,{exactMatch:!1,suppressThrow:!0});we&&(!$e.isComposing(m)&&!(G!=null&&G.hasPendingChanges())&&!(G!=null&&G.isFlushing())?Re.select(m,we):G==null||G.handleUserSelect(we))}l&&(!ue||!he)&&Re.deselect(m)}},100),[m,l,$]),B=wt(()=>HD(F,0),[F]);j.current=e$({node:C,onDOMSelectionChange:F,scheduleOnDOMSelectionChange:B}),Gi(()=>{var z,Y,V;C.current&&(V=fp(C.current))?(ny.set(m,V),rs.set(m,C.current),Xo.set(m,C.current),Xi.set(C.current,m)):Xo.delete(m);var{selection:G}=m,K=$e.findDocumentOrShadowRoot(m),W=Ni(K);if(!(!W||!$e.isFocused(m)||(z=j.current)!==null&&z!==void 0&&z.hasPendingAction())){var te=ue=>{var he=W.type!=="None";if(!(!G&&!he)){var we=W.focusNode,Ne;if(Da&&W.rangeCount>1){var me=W.getRangeAt(0),ge=W.getRangeAt(W.rangeCount-1);me.startContainer===we?Ne=ge.endContainer:Ne=me.startContainer}else Ne=W.anchorNode;var ye=rs.get(m),Ce=!1;if(ye.contains(Ne)&&ye.contains(we)&&(Ce=!0),he&&Ce&&G&&!ue){var xe=$e.toSlateRange(m,W,{exactMatch:!0,suppressThrow:!0});if(xe&&De.equals(xe,G)){var Ae;if(!$.hasMarkPlaceholder||(Ae=Ne)!==null&&Ae!==void 0&&(Ae=Ae.parentElement)!==null&&Ae!==void 0&&Ae.hasAttribute("data-slate-mark-placeholder"))return}}if(G&&!$e.hasRange(m,G)){m.selection=$e.toSlateRange(m,W,{exactMatch:!1,suppressThrow:!0});return}$.isUpdatingSelection=!0;var ke=G&&$e.toDOMRange(m,G);return ke?($e.isComposing(m)&&!en?W.collapseToEnd():De.isBackward(G)?W.setBaseAndExtent(ke.endContainer,ke.endOffset,ke.startContainer,ke.startOffset):W.setBaseAndExtent(ke.startContainer,ke.startOffset,ke.endContainer,ke.endOffset),f(m,ke)):W.removeAllRanges(),ke}};W.rangeCount<=1&&te();var U=((Y=j.current)===null||Y===void 0?void 0:Y.isFlushing())==="action";if(!en||!U){setTimeout(()=>{$.isUpdatingSelection=!1});return}var Z=null,re=requestAnimationFrame(()=>{if(U){var ue=he=>{try{var we=$e.toDOMNode(m,m);we.focus(),te(he)}catch{}};ue(),Z=setTimeout(()=>{ue(!0),$.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(re),Z&&clearTimeout(Z)}}});var S=mt(z=>{var Y=$e.toDOMNode(m,m),V=Y.getRootNode();if(E!=null&&E.current&&Lo&&V instanceof ShadowRoot){var G=z.getTargetRanges(),K=G[0],W=new window.Range;W.setStart(K.startContainer,K.startOffset),W.setEnd(K.endContainer,K.endOffset);var te=$e.toSlateRange(m,W,{exactMatch:!1,suppressThrow:!1});Re.select(m,te),z.preventDefault(),z.stopImmediatePropagation();return}if(x(),!l&&$e.hasEditableTarget(m,z.target)&&!R$(z,a)){var U;if(j.current)return j.current.handleDOMBeforeInput(z);B.flush(),F.flush();var{selection:Z}=m,{inputType:re}=z,ue=z.dataTransfer||z.data||void 0,he=re==="insertCompositionText"||re==="deleteCompositionText";if(he&&$e.isComposing(m))return;var we=!1;if(re==="insertText"&&Z&&De.isCollapsed(Z)&&z.data&&z.data.length===1&&/[a-z ]/i.test(z.data)&&Z.anchor.offset!==0&&(we=!0,m.marks&&(we=!1),!Fa.get(m))){var Ne,me,{anchor:ge}=Z,[ye,Ce]=$e.toDOMPoint(m,ge),xe=(Ne=ye.parentElement)===null||Ne===void 0?void 0:Ne.closest("a"),Ae=$e.getWindow(m);if(we&&xe&&$e.hasDOMNode(m,xe)){var ke,We=Ae==null?void 0:Ae.document.createTreeWalker(xe,NodeFilter.SHOW_TEXT).lastChild();We===ye&&((ke=We.textContent)===null||ke===void 0?void 0:ke.length)===Ce&&(we=!1)}if(we&&ye.parentElement&&(Ae==null||(me=Ae.getComputedStyle(ye.parentElement))===null||me===void 0?void 0:me.whiteSpace)==="pre"){var _e=R.above(m,{at:ge.path,match:Xe=>ut.isElement(Xe)&&R.isBlock(m,Xe)});_e&&Ue.string(_e[0]).includes(" ")&&(we=!1)}}if((!re.startsWith("delete")||re.startsWith("deleteBy"))&&!Fa.get(m)){var[Pe]=z.getTargetRanges();if(Pe){var ve=$e.toSlateRange(m,Pe,{exactMatch:!1,suppressThrow:!1});if(!Z||!De.equals(Z,ve)){we=!1;var Se=!he&&m.selection&&R.rangeRef(m,m.selection);Re.select(m,ve),Se&&Pi.set(m,Se)}}}if(he)return;if(we||z.preventDefault(),Z&&De.isExpanded(Z)&&re.startsWith("delete")){var qe=re.endsWith("Backward")?"backward":"forward";R.deleteFragment(m,{direction:qe});return}switch(re){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{R.deleteFragment(m);break}case"deleteContent":case"deleteContentForward":{R.deleteForward(m);break}case"deleteContentBackward":{R.deleteBackward(m);break}case"deleteEntireSoftLine":{R.deleteBackward(m,{unit:"line"}),R.deleteForward(m,{unit:"line"});break}case"deleteHardLineBackward":{R.deleteBackward(m,{unit:"block"});break}case"deleteSoftLineBackward":{R.deleteBackward(m,{unit:"line"});break}case"deleteHardLineForward":{R.deleteForward(m,{unit:"block"});break}case"deleteSoftLineForward":{R.deleteForward(m,{unit:"line"});break}case"deleteWordBackward":{R.deleteBackward(m,{unit:"word"});break}case"deleteWordForward":{R.deleteForward(m,{unit:"word"});break}case"insertLineBreak":R.insertSoftBreak(m);break;case"insertParagraph":{R.insertBreak(m);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{re==="insertFromComposition"&&$e.isComposing(m)&&(y(!1),Wo.set(m,!1)),(ue==null?void 0:ue.constructor.name)==="DataTransfer"?$e.insertData(m,ue):typeof ue=="string"&&(we?D.current.push(()=>R.insertText(m,ue)):R.insertText(m,ue));break}}var Ge=(U=Pi.get(m))===null||U===void 0?void 0:U.unref();Pi.delete(m),Ge&&(!m.selection||!De.equals(m.selection,Ge))&&Re.select(m,Ge)}},[m,F,x,a,l,B]),O=mt(z=>{z==null?(F.cancel(),B.cancel(),rs.delete(m),Xo.delete(m),C.current&&Co&&C.current.removeEventListener("beforeinput",S)):Co&&z.addEventListener("beforeinput",S),C.current=z,typeof t=="function"?t(z):t&&(t.current=z)},[F,B,m,S,t]);Gi(()=>{var z=$e.getWindow(m);z.document.addEventListener("selectionchange",B);var Y=()=>{$.isDraggingInternally=!1};return z.document.addEventListener("dragend",Y),z.document.addEventListener("drop",Y),()=>{z.document.removeEventListener("selectionchange",B),z.document.removeEventListener("dragend",Y),z.document.removeEventListener("drop",Y)}},[B,$]);var I=o([m,[]]),P=i&&m.children.length===1&&Array.from(Ue.texts(m)).length===1&&Ue.string(m)===""&&!b,T=mt(z=>{if(z&&P){var Y;k((Y=z.getBoundingClientRect())===null||Y===void 0?void 0:Y.height)}else k(void 0)},[P]);if(P){var _=R.start(m,[]);I.push({[Ma]:!0,placeholder:i,onPlaceholderResize:T,anchor:_,focus:_})}var{marks:X}=m;if($.hasMarkPlaceholder=!1,m.selection&&De.isCollapsed(m.selection)&&X){var{anchor:L}=m.selection,q=Ue.leaf(m,L.path),J=Ta(q,F$);if(!it.equals(q,X,{loose:!0})){$.hasMarkPlaceholder=!0;var ee=Object.fromEntries(Object.keys(J).map(z=>[z,null]));I.push(qn(qn(qn({[ay]:!0},ee),X),{},{anchor:L,focus:L}))}}return Ot(()=>{setTimeout(()=>{var{selection:z}=m;if(z){var{anchor:Y}=z,V=Ue.leaf(m,Y.path);if(X&&!it.equals(V,X,{loose:!0})){Tn.set(m,X);return}}Tn.delete(m)})}),Q.createElement(vy.Provider,{value:l},Q.createElement(O$.Provider,{value:b},Q.createElement(hy.Provider,{value:o},Q.createElement(B$,{node:C,receivedUserInput:A},Q.createElement(h,qn(qn({role:l?void 0:"textbox","aria-multiline":l?void 0:!0},g),{},{spellCheck:Co||!ts?g.spellCheck:!1,autoCorrect:Co||!ts?g.autoCorrect:"false",autoCapitalize:Co||!ts?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!l,zindex:-1,suppressContentEditableWarning:!0,ref:O,style:qn(qn({},v?{}:qn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},w?{minHeight:w}:{})),p),onBeforeInput:mt(z=>{if(!Co&&!l&&!Qr(z,g.onBeforeInput)&&$e.hasSelectableTarget(m,z.target)&&(z.preventDefault(),!$e.isComposing(m))){var Y=z.data;R.insertText(m,Y)}},[g.onBeforeInput,m,l]),onInput:mt(z=>{if(!Qr(z,g.onInput)){if(j.current){j.current.handleInput();return}for(var Y of D.current)Y();if(D.current=[],!$e.isFocused(m)){var V=z.nativeEvent,G=m;if(V.inputType==="historyUndo"&&typeof G.undo=="function"){G.undo();return}if(V.inputType==="historyRedo"&&typeof G.redo=="function"){G.redo();return}}}},[g.onInput,m]),onBlur:mt(z=>{if(!(l||$.isUpdatingSelection||!$e.hasSelectableTarget(m,z.target)||Qr(z,g.onBlur))){var Y=$e.findDocumentOrShadowRoot(m);if($.latestElement!==Y.activeElement){var{relatedTarget:V}=z,G=$e.toDOMNode(m,m);if(V!==G&&!($n(V)&&V.hasAttribute("data-slate-spacer"))){if(V!=null&&Fo(V)&&$e.hasDOMNode(m,V)){var K=$e.toSlateNode(m,V);if(ut.isElement(K)&&!m.isVoid(K))return}if(Lo){var W=Ni(Y);W==null||W.removeAllRanges()}$o.delete(m)}}}},[l,$.isUpdatingSelection,$.latestElement,m,g.onBlur]),onClick:mt(z=>{if($e.hasTarget(m,z.target)&&!Qr(z,g.onClick)&&Fo(z.target)){var Y=$e.toSlateNode(m,z.target),V=$e.findPath(m,Y);if(!R.hasPath(m,V)||Ue.get(m,V)!==Y)return;if(z.detail===w$&&V.length>=1){var G=V;if(!(ut.isElement(Y)&&R.isBlock(m,Y))){var K,W=R.above(m,{match:we=>ut.isElement(we)&&R.isBlock(m,we),at:V});G=(K=W==null?void 0:W[1])!==null&&K!==void 0?K:V.slice(0,1)}var te=R.range(m,G);Re.select(m,te);return}if(l)return;var U=R.start(m,V),Z=R.end(m,V),re=R.void(m,{at:U}),ue=R.void(m,{at:Z});if(re&&ue&&ne.equals(re[1],ue[1])){var he=R.range(m,U);Re.select(m,he)}}},[m,g.onClick,l]),onCompositionEnd:mt(z=>{if($e.hasSelectableTarget(m,z.target)){var Y;if($e.isComposing(m)&&Promise.resolve().then(()=>{y(!1),Wo.set(m,!1)}),(Y=j.current)===null||Y===void 0||Y.handleCompositionEnd(z),Qr(z,g.onCompositionEnd)||en)return;if(!Lo&&!ES&&!ty&&!DS&&!kS&&z.data){var V=Tn.get(m);Tn.delete(m),V!==void 0&&(po.set(m,m.marks),m.marks=V),R.insertText(m,z.data);var G=po.get(m);po.delete(m),G!==void 0&&(m.marks=G)}}},[g.onCompositionEnd,m]),onCompositionUpdate:mt(z=>{$e.hasSelectableTarget(m,z.target)&&!Qr(z,g.onCompositionUpdate)&&($e.isComposing(m)||(y(!0),Wo.set(m,!0)))},[g.onCompositionUpdate,m]),onCompositionStart:mt(z=>{if($e.hasSelectableTarget(m,z.target)){var Y;if((Y=j.current)===null||Y===void 0||Y.handleCompositionStart(z),Qr(z,g.onCompositionStart)||en)return;y(!0);var{selection:V}=m;if(V&&De.isExpanded(V)){R.deleteFragment(m);return}}},[g.onCompositionStart,m]),onCopy:mt(z=>{$e.hasSelectableTarget(m,z.target)&&!Qr(z,g.onCopy)&&!sg(z)&&(z.preventDefault(),$e.setFragmentData(m,z.clipboardData,"copy"))},[g.onCopy,m]),onCut:mt(z=>{if(!l&&$e.hasSelectableTarget(m,z.target)&&!Qr(z,g.onCut)&&!sg(z)){z.preventDefault(),$e.setFragmentData(m,z.clipboardData,"cut");var{selection:Y}=m;if(Y)if(De.isExpanded(Y))R.deleteFragment(m);else{var V=Ue.parent(m,Y.anchor.path);R.isVoid(m,V)&&Re.delete(m)}}},[l,m,g.onCut]),onDragOver:mt(z=>{if($e.hasTarget(m,z.target)&&!Qr(z,g.onDragOver)){var Y=$e.toSlateNode(m,z.target);ut.isElement(Y)&&R.isVoid(m,Y)&&z.preventDefault()}},[g.onDragOver,m]),onDragStart:mt(z=>{if(!l&&$e.hasTarget(m,z.target)&&!Qr(z,g.onDragStart)){var Y=$e.toSlateNode(m,z.target),V=$e.findPath(m,Y),G=ut.isElement(Y)&&R.isVoid(m,Y)||R.void(m,{at:V,voids:!0});if(G){var K=R.range(m,V);Re.select(m,K)}$.isDraggingInternally=!0,$e.setFragmentData(m,z.dataTransfer,"drag")}},[l,m,g.onDragStart,$]),onDrop:mt(z=>{if(!l&&$e.hasTarget(m,z.target)&&!Qr(z,g.onDrop)){z.preventDefault();var Y=m.selection,V=$e.findEventRange(m,z),G=z.dataTransfer;Re.select(m,V),$.isDraggingInternally&&Y&&!De.equals(Y,V)&&!R.void(m,{at:V,voids:!0})&&Re.delete(m,{at:Y}),$e.insertData(m,G),$e.isFocused(m)||$e.focus(m)}},[l,m,g.onDrop,$]),onDragEnd:mt(z=>{!l&&$.isDraggingInternally&&g.onDragEnd&&$e.hasTarget(m,z.target)&&g.onDragEnd(z)},[l,$,g,m]),onFocus:mt(z=>{if(!l&&!$.isUpdatingSelection&&$e.hasEditableTarget(m,z.target)&&!Qr(z,g.onFocus)){var Y=$e.toDOMNode(m,m),V=$e.findDocumentOrShadowRoot(m);if($.latestElement=V.activeElement,Da&&z.target!==Y){Y.focus();return}$o.set(m,!0)}},[l,$,m,g.onFocus]),onKeyDown:mt(z=>{if(!l&&$e.hasEditableTarget(m,z.target)){var Y;(Y=j.current)===null||Y===void 0||Y.handleKeyDown(z);var{nativeEvent:V}=z;if($e.isComposing(m)&&V.isComposing===!1&&(Wo.set(m,!1),y(!1)),Qr(z,g.onKeyDown)||$e.isComposing(m))return;var{selection:G}=m,K=m.children[G!==null?G.focus.path[0]:0],W=Kb(Ue.string(K))==="rtl";if(cr.isRedo(V)){z.preventDefault();var te=m;typeof te.redo=="function"&&te.redo();return}if(cr.isUndo(V)){z.preventDefault();var U=m;typeof U.undo=="function"&&U.undo();return}if(cr.isMoveLineBackward(V)){z.preventDefault(),Re.move(m,{unit:"line",reverse:!0});return}if(cr.isMoveLineForward(V)){z.preventDefault(),Re.move(m,{unit:"line"});return}if(cr.isExtendLineBackward(V)){z.preventDefault(),Re.move(m,{unit:"line",edge:"focus",reverse:!0});return}if(cr.isExtendLineForward(V)){z.preventDefault(),Re.move(m,{unit:"line",edge:"focus"});return}if(cr.isMoveBackward(V)){z.preventDefault(),G&&De.isCollapsed(G)?Re.move(m,{reverse:!W}):Re.collapse(m,{edge:W?"end":"start"});return}if(cr.isMoveForward(V)){z.preventDefault(),G&&De.isCollapsed(G)?Re.move(m,{reverse:W}):Re.collapse(m,{edge:W?"start":"end"});return}if(cr.isMoveWordBackward(V)){z.preventDefault(),G&&De.isExpanded(G)&&Re.collapse(m,{edge:"focus"}),Re.move(m,{unit:"word",reverse:!W});return}if(cr.isMoveWordForward(V)){z.preventDefault(),G&&De.isExpanded(G)&&Re.collapse(m,{edge:"focus"}),Re.move(m,{unit:"word",reverse:W});return}if(Co){if((ry||Lo)&&G&&(cr.isDeleteBackward(V)||cr.isDeleteForward(V))&&De.isCollapsed(G)){var Z=Ue.parent(m,G.anchor.path);if(ut.isElement(Z)&&R.isVoid(m,Z)&&(R.isInline(m,Z)||R.isBlock(m,Z))){z.preventDefault(),R.deleteBackward(m,{unit:"block"});return}}}else{if(cr.isBold(V)||cr.isItalic(V)||cr.isTransposeCharacter(V)){z.preventDefault();return}if(cr.isSoftBreak(V)){z.preventDefault(),R.insertSoftBreak(m);return}if(cr.isSplitBlock(V)){z.preventDefault(),R.insertBreak(m);return}if(cr.isDeleteBackward(V)){z.preventDefault(),G&&De.isExpanded(G)?R.deleteFragment(m,{direction:"backward"}):R.deleteBackward(m);return}if(cr.isDeleteForward(V)){z.preventDefault(),G&&De.isExpanded(G)?R.deleteFragment(m,{direction:"forward"}):R.deleteForward(m);return}if(cr.isDeleteLineBackward(V)){z.preventDefault(),G&&De.isExpanded(G)?R.deleteFragment(m,{direction:"backward"}):R.deleteBackward(m,{unit:"line"});return}if(cr.isDeleteLineForward(V)){z.preventDefault(),G&&De.isExpanded(G)?R.deleteFragment(m,{direction:"forward"}):R.deleteForward(m,{unit:"line"});return}if(cr.isDeleteWordBackward(V)){z.preventDefault(),G&&De.isExpanded(G)?R.deleteFragment(m,{direction:"backward"}):R.deleteBackward(m,{unit:"word"});return}if(cr.isDeleteWordForward(V)){z.preventDefault(),G&&De.isExpanded(G)?R.deleteFragment(m,{direction:"forward"}):R.deleteForward(m,{unit:"word"});return}}}},[l,m,g.onKeyDown]),onPaste:mt(z=>{!l&&$e.hasEditableTarget(m,z.target)&&!Qr(z,g.onPaste)&&(!Co||BS(z.nativeEvent)||Lo)&&(z.preventDefault(),$e.insertData(m,z.clipboardData))},[l,m,g.onPaste])}),Q.createElement(P$,{decorations:I,node:m,renderElement:s,renderPlaceholder:c,renderLeaf:u,selection:m.selection}))))))}),N$=e=>{var{attributes:t,children:r}=e;return Q.createElement("span",qn({},t),r,en&&Q.createElement("br",null))},j$=()=>[],I$=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&De.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),XD(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},Qr=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},sg=e=>Fo(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),R$=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},T$=Fn(!1),M$=Fn({});function z$(e){var t=Ve([]).current,r=Ve({editor:e}).current,n=mt(a=>{r.editor=a,t.forEach(i=>i(a))},[t,r]),o=wt(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var _$=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],vc=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:i}=e,l=Ta(e,_$),[s,u]=Q.useState(()=>{if(!Ue.isNodeList(i))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Ir.stringify(i)));if(!R.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Ir.stringify(t)));return t.children=i,Object.assign(t,l),{v:0,editor:t}}),{selectorContext:c,onChange:f}=z$(t),p=mt(g=>{var m;switch(n&&n(t.children),g==null||(m=g.operation)===null||m===void 0?void 0:m.type){case"set_selection":o==null||o(t.selection);break;default:a==null||a(t.children)}u(b=>({v:b.v+1,editor:t})),f(t)},[t,f,n,o,a]);Ot(()=>(yd.set(t,p),()=>{yd.set(t,()=>{})}),[t,p]);var[h,v]=xt($e.isFocused(t));return Ot(()=>{v($e.isFocused(t))},[t]),Gi(()=>{var g=()=>v($e.isFocused(t));return ey>=17?(document.addEventListener("focusin",g),document.addEventListener("focusout",g),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",g)}):(document.addEventListener("focus",g,!0),document.addEventListener("blur",g,!0),()=>{document.removeEventListener("focus",g,!0),document.removeEventListener("blur",g,!0)})},[]),Q.createElement(M$.Provider,{value:c},Q.createElement(by.Provider,{value:s},Q.createElement(sp.Provider,{value:s.editor},Q.createElement(T$.Provider,{value:h},r))))},ug=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},cg=(e,t,r)=>{var n=$e.toDOMRange(e,t).getBoundingClientRect(),o=$e.toDOMRange(e,r).getBoundingClientRect();return ug(n,o)&&ug(o,n)},L$=(e,t)=>{var r=R.range(e,De.end(t)),n=Array.from(R.positions(e,{at:t})),o=0,a=n.length,i=Math.floor(a/2);if(cg(e,R.range(e,n[o]),r))return R.range(e,n[o],r);if(n.length<2)return R.range(e,n[n.length-1],r);for(;i!==n.length&&i!==o;)cg(e,R.range(e,n[i]),r)?a=i:o=i,i=Math.floor((o+a)/2);return R.range(e,n[a],r)};function dg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var H$=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:n,onChange:o,deleteBackward:a,addMark:i,removeMark:l}=r;return ou.set(r,new WeakMap),r.addMark=(s,u)=>{var c,f;(c=dp.get(r))===null||c===void 0||c(),!Tn.get(r)&&(f=sn.get(r))!==null&&f!==void 0&&f.length&&Tn.set(r,null),po.delete(r),i(s,u)},r.removeMark=s=>{var u;!Tn.get(r)&&(u=sn.get(r))!==null&&u!==void 0&&u.length&&Tn.set(r,null),po.delete(r),l(s)},r.deleteBackward=s=>{if(s!=="line")return a(s);if(r.selection&&De.isCollapsed(r.selection)){var u=R.above(r,{match:h=>ut.isElement(h)&&R.isBlock(r,h),at:r.selection});if(u){var[,c]=u,f=R.range(r,c,r.selection.anchor),p=L$(r,f);De.isCollapsed(p)||Re.delete(r,{at:p})}}},r.apply=s=>{var u=[],c=[],f=sn.get(r);if(f!=null&&f.length){var p=f.map(F=>WS(F,s)).filter(Boolean);sn.set(r,p)}var h=So.get(r);h&&So.set(r,Qh(r,h,s));var v=Do.get(r);if(v!=null&&v.at){var g=Rt.isPoint(v==null?void 0:v.at)?wd(r,v.at,s):Qh(r,v.at,s);Do.set(r,g?fg(fg({},v),{},{at:g}):null)}switch(s.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{u.push(...pa(r,s.path));break}case"set_selection":{var m;(m=Pi.get(r))===null||m===void 0||m.unref(),Pi.delete(r);break}case"insert_node":case"remove_node":{u.push(...pa(r,ne.parent(s.path)));break}case"merge_node":{var b=ne.previous(s.path);u.push(...pa(r,b));break}case"move_node":{var y=ne.common(ne.parent(s.path),ne.parent(s.newPath));u.push(...pa(r,y));var C;ne.isBefore(s.path,s.newPath)?(u.push(...pa(r,ne.parent(s.path))),C=s.newPath):(u.push(...pa(r,ne.parent(s.newPath))),C=s.path);var D=Ue.get(e,ne.parent(C)),w=$e.findKey(r,D),k=R.pathRef(r,ne.parent(C));c.push([k,w]);break}}switch(n(s),s.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":Fa.set(r,!0)}for(var[E,x]of u){var[A]=R.node(r,E);$s.set(A,x)}for(var[N,$]of c){if(N.current){var[j]=R.node(r,N.current);$s.set(j,$)}N.unref()}},r.setFragmentData=s=>{var{selection:u}=r;if(u){var[c,f]=De.edges(u),p=R.void(r,{at:c.path}),h=R.void(r,{at:f.path});if(!(De.isCollapsed(u)&&!p)){var v=$e.toDOMRange(r,u),g=v.cloneContents(),m=g.childNodes[0];if(g.childNodes.forEach(A=>{A.textContent&&A.textContent.trim()!==""&&(m=A)}),h){var[b]=h,y=v.cloneRange(),C=$e.toDOMNode(r,b);y.setEndAfter(C),g=y.cloneContents()}if(p&&(m=g.querySelector("[data-slate-spacer]")),Array.from(g.querySelectorAll("[data-slate-zero-width]")).forEach(A=>{var N=A.getAttribute("data-slate-zero-width")==="n";A.textContent=N?`
24
+ `:""}),ly(m)){var D=m.ownerDocument.createElement("span");D.style.whiteSpace="pre",D.appendChild(m),g.appendChild(D),m=D}var w=r.getFragment(),k=JSON.stringify(w),E=window.btoa(encodeURIComponent(k));m.setAttribute("data-slate-fragment",E),s.setData("application/".concat(t),E);var x=g.ownerDocument.createElement("div");return x.appendChild(g),x.setAttribute("hidden","true"),g.ownerDocument.body.appendChild(x),s.setData("text/html",x.innerHTML),s.setData("text/plain",uy(x)),g.ownerDocument.body.removeChild(x),s}}},r.insertData=s=>{r.insertFragmentData(s)||r.insertTextData(s)},r.insertFragmentData=s=>{var u=s.getData("application/".concat(t))||NS(s);if(u){var c=decodeURIComponent(window.atob(u)),f=JSON.parse(c);return r.insertFragment(f),!0}return!1},r.insertTextData=s=>{var u=s.getData("text/plain");if(u){var c=u.split(/\r\n|\r|\n/),f=!1;for(var p of c)f&&Re.splitNodes(r,{always:!0}),r.insertText(p),f=!0;return!0}return!1},r.onChange=s=>{var u=ey<18?Hi.unstable_batchedUpdates:c=>c();u(()=>{var c=yd.get(r);c&&c(s),o(s)})},r},pa=(e,t)=>{var r=[];for(var[n,o]of R.levels(e,{at:t})){var a=$e.findKey(e,n);r.push([o,a])}return r};function mp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ia=mp();function xy(e){ia=e}var ji={exec:()=>null};function Yt(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(tn.caret,"$1"),r=r.replace(o,i),n},getRegex:()=>new RegExp(r,t)};return n}var tn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},W$=/^(?:[ \t]*(?:\n|$))+/,K$=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,q$=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,V$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hp=/(?:[*+-]|\d{1,9}[.)])/,wy=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ey=Yt(wy).replace(/bull/g,hp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),U$=Yt(wy).replace(/bull/g,hp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),gp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,X$=/^[^\n]+/,vp=/(?!\s*\])(?:\\.|[^\[\]\\])+/,G$=Yt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vp).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Y$=Yt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hp).getRegex(),au="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",bp=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Z$=Yt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",bp).replace("tag",au).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ky=Yt(gp).replace("hr",vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",au).getRegex(),J$=Yt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ky).getRegex(),yp={blockquote:J$,code:K$,def:G$,fences:q$,heading:V$,hr:vl,html:Z$,lheading:Ey,list:Y$,newline:W$,paragraph:ky,table:ji,text:X$},pg=Yt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",au).getRegex(),Q$={...yp,lheading:U$,table:pg,paragraph:Yt(gp).replace("hr",vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pg).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",au).getRegex()},e2={...yp,html:Yt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bp).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ji,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Yt(gp).replace("hr",vl).replace("heading",` *#{1,6} *[^
25
+ ]`).replace("lheading",Ey).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},t2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,r2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dy=/^( {2,}|\\)\n(?!\s*$)/,n2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,iu=/[\p{P}\p{S}]/u,Cp=/[\s\p{P}\p{S}]/u,Sy=/[^\s\p{P}\p{S}]/u,o2=Yt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Cp).getRegex(),$y=/(?!~)[\p{P}\p{S}]/u,a2=/(?!~)[\s\p{P}\p{S}]/u,i2=/(?:[^\s\p{P}\p{S}]|~)/u,l2=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,By=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,s2=Yt(By,"u").replace(/punct/g,iu).getRegex(),u2=Yt(By,"u").replace(/punct/g,$y).getRegex(),Oy="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",c2=Yt(Oy,"gu").replace(/notPunctSpace/g,Sy).replace(/punctSpace/g,Cp).replace(/punct/g,iu).getRegex(),d2=Yt(Oy,"gu").replace(/notPunctSpace/g,i2).replace(/punctSpace/g,a2).replace(/punct/g,$y).getRegex(),f2=Yt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Sy).replace(/punctSpace/g,Cp).replace(/punct/g,iu).getRegex(),p2=Yt(/\\(punct)/,"gu").replace(/punct/g,iu).getRegex(),m2=Yt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),h2=Yt(bp).replace("(?:-->|$)","-->").getRegex(),g2=Yt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",h2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bs=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,v2=Yt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Bs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ay=Yt(/^!?\[(label)\]\[(ref)\]/).replace("label",Bs).replace("ref",vp).getRegex(),Fy=Yt(/^!?\[(ref)\](?:\[\])?/).replace("ref",vp).getRegex(),b2=Yt("reflink|nolink(?!\\()","g").replace("reflink",Ay).replace("nolink",Fy).getRegex(),xp={_backpedal:ji,anyPunctuation:p2,autolink:m2,blockSkip:l2,br:Dy,code:r2,del:ji,emStrongLDelim:s2,emStrongRDelimAst:c2,emStrongRDelimUnd:f2,escape:t2,link:v2,nolink:Fy,punctuation:o2,reflink:Ay,reflinkSearch:b2,tag:g2,text:n2,url:ji},y2={...xp,link:Yt(/^!?\[(label)\]\((.*?)\)/).replace("label",Bs).getRegex(),reflink:Yt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bs).getRegex()},kd={...xp,emStrongRDelimAst:d2,emStrongLDelim:u2,url:Yt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},C2={...kd,br:Yt(Dy).replace("{2,}","*").getRegex(),text:Yt(kd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ll={normal:yp,gfm:Q$,pedantic:e2},gi={normal:xp,gfm:kd,breaks:C2,pedantic:y2},x2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mg=e=>x2[e];function Vn(e,t){if(t){if(tn.escapeTest.test(e))return e.replace(tn.escapeReplace,mg)}else if(tn.escapeTestNoEncode.test(e))return e.replace(tn.escapeReplaceNoEncode,mg);return e}function hg(e){try{e=encodeURI(e).replace(tn.percentDecode,"%")}catch{return null}return e}function gg(e,t){var a;const r=e.replace(tn.findPipe,(i,l,s)=>{let u=!1,c=l;for(;--c>=0&&s[c]==="\\";)u=!u;return u?"|":" |"}),n=r.split(tn.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(tn.slashPipe,"|");return n}function vi(e,t,r){const n=e.length;if(n===0)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function w2(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function vg(e,t,r,n,o){const a=t.href,i=t.title||null,l=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const s={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:i,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,s}function E2(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const o=n[1];return t.split(`
26
+ `).map(a=>{const i=a.match(r.other.beginningSpace);if(i===null)return a;const[l]=i;return l.length>=o.length?a.slice(o.length):a}).join(`
27
+ `)}var Os=class{constructor(e){rr(this,"options"),rr(this,"rules"),rr(this,"lexer"),this.options=e||ia}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:vi(r,`
28
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=E2(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const n=vi(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:vi(t[0],`
29
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=vi(t[0],`
30
+ `).split(`
31
+ `),n="",o="";const a=[];for(;r.length>0;){let i=!1;const l=[];let s;for(s=0;s<r.length;s++)if(this.rules.other.blockquoteStart.test(r[s]))l.push(r[s]),i=!0;else if(!i)l.push(r[s]);else break;r=r.slice(s);const u=l.join(`
32
+ `),c=u.replace(this.rules.other.blockquoteSetextReplace,`
33
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
34
+ ${u}`:u,o=o?`${o}
35
+ ${c}`:c;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=f,r.length===0)break;const p=a.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const h=p,v=h.raw+`
36
+ `+r.join(`
37
+ `),g=this.blockquote(v);a[a.length-1]=g,n=n.substring(0,n.length-h.raw.length)+g.raw,o=o.substring(0,o.length-h.text.length)+g.text;break}else if((p==null?void 0:p.type)==="list"){const h=p,v=h.raw+`
38
+ `+r.join(`
39
+ `),g=this.list(v);a[a.length-1]=g,n=n.substring(0,n.length-p.raw.length)+g.raw,o=o.substring(0,o.length-h.raw.length)+g.raw,r=v.substring(a.at(-1).raw.length).split(`
40
+ `);continue}}return{type:"blockquote",raw:n,tokens:a,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let i=!1;for(;e;){let s=!1,u="",c="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let f=t[2].split(`
41
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),p=e.split(`
42
+ `,1)[0],h=!f.trim(),v=0;if(this.options.pedantic?(v=2,c=f.trimStart()):h?v=t[1].length+1:(v=t[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,c=f.slice(v),v+=t[1].length),h&&this.rules.other.blankLine.test(p)&&(u+=p+`
43
+ `,e=e.substring(p.length+1),s=!0),!s){const b=this.rules.other.nextBulletRegex(v),y=this.rules.other.hrRegex(v),C=this.rules.other.fencesBeginRegex(v),D=this.rules.other.headingBeginRegex(v),w=this.rules.other.htmlBeginRegex(v);for(;e;){const k=e.split(`
44
+ `,1)[0];let E;if(p=k,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),E=p):E=p.replace(this.rules.other.tabCharGlobal," "),C.test(p)||D.test(p)||w.test(p)||b.test(p)||y.test(p))break;if(E.search(this.rules.other.nonSpaceChar)>=v||!p.trim())c+=`
45
+ `+E.slice(v);else{if(h||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(f)||D.test(f)||y.test(f))break;c+=`
46
+ `+p}!h&&!p.trim()&&(h=!0),u+=k+`
47
+ `,e=e.substring(k.length+1),f=E.slice(v)}}o.loose||(i?o.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(i=!0));let g=null,m;this.options.gfm&&(g=this.rules.other.listIsTask.exec(c),g&&(m=g[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:u,task:!!g,checked:m,loose:!1,text:c,tokens:[]}),o.raw+=u}const l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let s=0;s<o.items.length;s++)if(this.lexer.state.top=!1,o.items[s].tokens=this.lexer.blockTokens(o.items[s].text,[]),!o.loose){const u=o.items[s].tokens.filter(f=>f.type==="space"),c=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=c}if(o.loose)for(let s=0;s<o.items.length;s++)o.items[s].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:o}}}table(e){var i;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=gg(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(i=t[3])!=null&&i.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
48
+ `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const l of n)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<r.length;l++)a.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:a.align[l]});for(const l of o)a.rows.push(gg(l,a.header.length).map((s,u)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:a.align[u]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
49
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=vi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=w2(t[2],"()");if(a===-2)return;if(a>-1){const i=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),vg(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[n.toLowerCase()];if(!o){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return vg(r,o,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){const o=[...n[0]].length-1;let a,i,l=o,s=0;const u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);(n=u.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(i=[...a].length,n[3]||n[4]){l+=i;continue}else if((n[5]||n[6])&&o%3&&!((o+i)%3)){s+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+s);const c=[...n[0]][0].length,f=e.slice(0,o+n.index+c+i);if(Math.min(o,i)%2){const h=f.slice(1,-1);return{type:"em",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let a;do a=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(a!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},mo=class Dd{constructor(t){rr(this,"tokens"),rr(this,"options"),rr(this,"state"),rr(this,"tokenizer"),rr(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ia,this.options.tokenizer=this.options.tokenizer||new Os,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:tn,block:Ll.normal,inline:gi.normal};this.options.pedantic?(r.block=Ll.pedantic,r.inline=gi.pedantic):this.options.gfm&&(r.block=Ll.gfm,this.options.breaks?r.inline=gi.breaks:r.inline=gi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ll,inline:gi}}static lex(t,r){return new Dd(r).lex(t)}static lexInline(t,r){return new Dd(r).inlineTokens(t)}lex(t){t=t.replace(tn.carriageReturn,`
50
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var o,a,i;for(this.options.pedantic&&(t=t.replace(tn.tabCharGlobal," ").replace(tn.spaceLine,""));t;){let l;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(u=>(l=u.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const u=r.at(-1);l.raw.length===1&&u!==void 0?u.raw+=`
51
+ `:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const u=r.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
52
+ `+l.raw,u.text+=`
53
+ `+l.text,this.inlineQueue.at(-1).src=u.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);const u=r.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
54
+ `+l.raw,u.text+=`
55
+ `+l.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let s=t;if((i=this.options.extensions)!=null&&i.startBlock){let u=1/0;const c=t.slice(1);let f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},c),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(s=t.substring(0,u+1))}if(this.state.top&&(l=this.tokenizer.paragraph(s))){const u=r.at(-1);n&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=`
56
+ `+l.raw,u.text+=`
57
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):r.push(l),n=s.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const u=r.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=`
58
+ `+l.raw,u.text+=`
59
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):r.push(l);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,s,u;let n=t,o=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,i="";for(;t;){a||(i=""),a=!1;let c;if((s=(l=this.options.extensions)==null?void 0:l.inline)!=null&&s.some(p=>(c=p.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);const p=r.at(-1);c.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=c.raw,p.text+=c.text):r.push(c);continue}if(c=this.tokenizer.emStrong(t,n,i)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.del(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),r.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),r.push(c);continue}let f=t;if((u=this.options.extensions)!=null&&u.startInline){let p=1/0;const h=t.slice(1);let v;this.options.extensions.startInline.forEach(g=>{v=g.call({lexer:this},h),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(f=t.substring(0,p+1))}if(c=this.tokenizer.inlineText(f)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(i=c.raw.slice(-1)),a=!0;const p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=c.raw,p.text+=c.text):r.push(c);continue}if(t){const p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},As=class{constructor(e){rr(this,"options"),rr(this,"parser"),this.options=e||ia}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(tn.notSpaceStart))==null?void 0:a[0],o=e.replace(tn.endingNewline,"")+`
60
+ `;return n?'<pre><code class="language-'+Vn(n)+'">'+(r?o:Vn(o,!0))+`</code></pre>
61
+ `:"<pre><code>"+(r?o:Vn(o,!0))+`</code></pre>
62
+ `}blockquote({tokens:e}){return`<blockquote>
63
+ ${this.parser.parse(e)}</blockquote>
64
+ `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
65
+ `}hr(e){return`<hr>
66
+ `}list(e){const t=e.ordered,r=e.start;let n="";for(let i=0;i<e.items.length;i++){const l=e.items[i];n+=this.listitem(l)}const o=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+o+a+`>
67
+ `+n+"</"+o+`>
68
+ `}listitem(e){var r;let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+Vn(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
69
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
70
+ `}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let n="";for(let o=0;o<e.rows.length;o++){const a=e.rows[o];r="";for(let i=0;i<a.length;i++)r+=this.tablecell(a[i]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
71
+ <thead>
72
+ `+t+`</thead>
73
+ `+n+`</table>
74
+ `}tablerow({text:e}){return`<tr>
75
+ ${e}</tr>
76
+ `}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
77
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Vn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const n=this.parser.parseInline(r),o=hg(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+Vn(t)+'"'),a+=">"+n+"</a>",a}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const o=hg(e);if(o===null)return Vn(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Vn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Vn(e.text)}},wp=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ho=class Sd{constructor(t){rr(this,"options"),rr(this,"renderer"),rr(this,"textRenderer"),this.options=t||ia,this.options.renderer=this.options.renderer||new As,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wp}static parse(t,r){return new Sd(r).parse(t)}static parseInline(t,r){return new Sd(r).parseInline(t)}parse(t,r=!0){var o,a;let n="";for(let i=0;i<t.length;i++){const l=t[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const u=l,c=this.options.extensions.renderers[u.type].call({parser:this},u);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){n+=c||"";continue}}const s=l;switch(s.type){case"space":{n+=this.renderer.space(s);continue}case"hr":{n+=this.renderer.hr(s);continue}case"heading":{n+=this.renderer.heading(s);continue}case"code":{n+=this.renderer.code(s);continue}case"table":{n+=this.renderer.table(s);continue}case"blockquote":{n+=this.renderer.blockquote(s);continue}case"list":{n+=this.renderer.list(s);continue}case"html":{n+=this.renderer.html(s);continue}case"paragraph":{n+=this.renderer.paragraph(s);continue}case"text":{let u=s,c=this.renderer.text(u);for(;i+1<t.length&&t[i+1].type==="text";)u=t[++i],c+=`
78
+ `+this.renderer.text(u);r?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,r=this.renderer){var o,a;let n="";for(let i=0;i<t.length;i++){const l=t[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){n+=u||"";continue}}const s=l;switch(s.type){case"escape":{n+=r.text(s);break}case"html":{n+=r.html(s);break}case"link":{n+=r.link(s);break}case"image":{n+=r.image(s);break}case"strong":{n+=r.strong(s);break}case"em":{n+=r.em(s);break}case"codespan":{n+=r.codespan(s);break}case"br":{n+=r.br(s);break}case"del":{n+=r.del(s);break}case"text":{n+=r.text(s);break}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}},bc,ns=(bc=class{constructor(e){rr(this,"options"),rr(this,"block"),this.options=e||ia}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?mo.lex:mo.lexInline}provideParser(){return this.block?ho.parse:ho.parseInline}},rr(bc,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),bc),k2=class{constructor(...e){rr(this,"defaults",mp()),rr(this,"options",this.setOptions),rr(this,"parse",this.parseMarkdown(!0)),rr(this,"parseInline",this.parseMarkdown(!1)),rr(this,"Parser",ho),rr(this,"Renderer",As),rr(this,"TextRenderer",wp),rr(this,"Lexer",mo),rr(this,"Tokenizer",Os),rr(this,"Hooks",ns),this.use(...e)}walkTokens(e,t){var n,o;let r=[];for(const a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":{const i=a;for(const l of i.header)r=r.concat(this.walkTokens(l.tokens,t));for(const l of i.rows)for(const s of l)r=r.concat(this.walkTokens(s.tokens,t));break}case"list":{const i=a;r=r.concat(this.walkTokens(i.items,t));break}default:{const i=a;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[i.type]?this.defaults.extensions.childTokens[i.type].forEach(l=>{const s=i[l].flat(1/0);r=r.concat(this.walkTokens(s,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const a=t.renderers[o.name];a?t.renderers[o.name]=function(...i){let l=o.renderer.apply(this,i);return l===!1&&(l=a.apply(this,i)),l}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=this.defaults.renderer||new As(this.defaults);for(const a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const i=a,l=r.renderer[i],s=o[i];o[i]=(...u)=>{let c=l.apply(o,u);return c===!1&&(c=s.apply(o,u)),c||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new Os(this.defaults);for(const a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const i=a,l=r.tokenizer[i],s=o[i];o[i]=(...u)=>{let c=l.apply(o,u);return c===!1&&(c=s.apply(o,u)),c}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new ns;for(const a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const i=a,l=r.hooks[i],s=o[i];ns.passThroughHooks.has(a)?o[i]=u=>{if(this.defaults.async)return Promise.resolve(l.call(o,u)).then(f=>s.call(o,f));const c=l.call(o,u);return s.call(o,c)}:o[i]=(...u)=>{let c=l.apply(o,u);return c===!1&&(c=s.apply(o,u)),c}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(i){let l=[];return l.push(a.call(this,i)),o&&(l=l.concat(o.call(this,i))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return mo.lex(e,t??this.defaults)}parser(e,t){return ho.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},o={...this.defaults,...n},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?mo.lex:mo.lexInline,l=o.hooks?o.hooks.provideParser():e?ho.parse:ho.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(s=>i(s,o)).then(s=>o.hooks?o.hooks.processAllTokens(s):s).then(s=>o.walkTokens?Promise.all(this.walkTokens(s,o.walkTokens)).then(()=>s):s).then(s=>l(s,o)).then(s=>o.hooks?o.hooks.postprocess(s):s).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let s=i(t,o);o.hooks&&(s=o.hooks.processAllTokens(s)),o.walkTokens&&this.walkTokens(s,o.walkTokens);let u=l(s,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(s){return a(s)}}}onError(e,t){return r=>{if(r.message+=`
79
+ Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+Vn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},ta=new k2;function Kt(e,t){return ta.parse(e,t)}Kt.options=Kt.setOptions=function(e){return ta.setOptions(e),Kt.defaults=ta.defaults,xy(Kt.defaults),Kt};Kt.getDefaults=mp;Kt.defaults=ia;Kt.use=function(...e){return ta.use(...e),Kt.defaults=ta.defaults,xy(Kt.defaults),Kt};Kt.walkTokens=function(e,t){return ta.walkTokens(e,t)};Kt.parseInline=ta.parseInline;Kt.Parser=ho;Kt.parser=ho.parse;Kt.Renderer=As;Kt.TextRenderer=wp;Kt.Lexer=mo;Kt.lexer=mo.lex;Kt.Tokenizer=Os;Kt.Hooks=ns;Kt.parse=Kt;Kt.options;Kt.setOptions;Kt.use;Kt.walkTokens;Kt.parseInline;ho.parse;mo.lex;var cn=function(){return cn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},cn.apply(this,arguments)};function Fs(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var or="-ms-",Ii="-moz-",Gt="-webkit-",Py="comm",lu="rule",Ep="decl",D2="@import",Ny="@keyframes",S2="@layer",jy=Math.abs,kp=String.fromCharCode,$d=Object.assign;function $2(e,t){return jr(e,0)^45?(((t<<2^jr(e,0))<<2^jr(e,1))<<2^jr(e,2))<<2^jr(e,3):0}function Iy(e){return e.trim()}function uo(e,t){return(e=t.exec(e))?e[0]:e}function Pt(e,t,r){return e.replace(t,r)}function os(e,t,r){return e.indexOf(t,r)}function jr(e,t){return e.charCodeAt(t)|0}function za(e,t,r){return e.slice(t,r)}function Gn(e){return e.length}function Ry(e){return e.length}function Si(e,t){return t.push(e),e}function B2(e,t){return e.map(t).join("")}function bg(e,t){return e.filter(function(r){return!uo(r,t)})}var su=1,_a=1,Ty=0,On=0,Er=0,ri="";function uu(e,t,r,n,o,a,i,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:su,column:_a,length:i,return:"",siblings:l}}function wo(e,t){return $d(uu("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ma(e){for(;e.root;)e=wo(e.root,{children:[e]});Si(e,e.siblings)}function O2(){return Er}function A2(){return Er=On>0?jr(ri,--On):0,_a--,Er===10&&(_a=1,su--),Er}function Mn(){return Er=On<Ty?jr(ri,On++):0,_a++,Er===10&&(_a=1,su++),Er}function Go(){return jr(ri,On)}function as(){return On}function cu(e,t){return za(ri,e,t)}function Bd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function F2(e){return su=_a=1,Ty=Gn(ri=e),On=0,[]}function P2(e){return ri="",e}function yc(e){return Iy(cu(On-1,Od(e===91?e+2:e===40?e+1:e)))}function N2(e){for(;(Er=Go())&&Er<33;)Mn();return Bd(e)>2||Bd(Er)>3?"":" "}function j2(e,t){for(;--t&&Mn()&&!(Er<48||Er>102||Er>57&&Er<65||Er>70&&Er<97););return cu(e,as()+(t<6&&Go()==32&&Mn()==32))}function Od(e){for(;Mn();)switch(Er){case e:return On;case 34:case 39:e!==34&&e!==39&&Od(Er);break;case 40:e===41&&Od(e);break;case 92:Mn();break}return On}function I2(e,t){for(;Mn()&&e+Er!==57&&!(e+Er===84&&Go()===47););return"/*"+cu(t,On-1)+"*"+kp(e===47?e:Mn())}function R2(e){for(;!Bd(Go());)Mn();return cu(e,On)}function T2(e){return P2(is("",null,null,null,[""],e=F2(e),0,[0],e))}function is(e,t,r,n,o,a,i,l,s){for(var u=0,c=0,f=i,p=0,h=0,v=0,g=1,m=1,b=1,y=0,C="",D=o,w=a,k=n,E=C;m;)switch(v=y,y=Mn()){case 40:if(v!=108&&jr(E,f-1)==58){os(E+=Pt(yc(y),"&","&\f"),"&\f",jy(u?l[u-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:E+=yc(y);break;case 9:case 10:case 13:case 32:E+=N2(v);break;case 92:E+=j2(as()-1,7);continue;case 47:switch(Go()){case 42:case 47:Si(M2(I2(Mn(),as()),t,r,s),s);break;default:E+="/"}break;case 123*g:l[u++]=Gn(E)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:b==-1&&(E=Pt(E,/\f/g,"")),h>0&&Gn(E)-f&&Si(h>32?Cg(E+";",n,r,f-1,s):Cg(Pt(E," ","")+";",n,r,f-2,s),s);break;case 59:E+=";";default:if(Si(k=yg(E,t,r,u,c,o,l,C,D=[],w=[],f,a),a),y===123)if(c===0)is(E,t,k,k,D,a,f,l,w);else switch(p===99&&jr(E,3)===110?100:p){case 100:case 108:case 109:case 115:is(e,k,k,n&&Si(yg(e,k,k,0,0,o,l,C,o,D=[],f,w),w),o,w,f,l,n?D:w);break;default:is(E,k,k,k,[""],w,0,l,w)}}u=c=h=0,g=b=1,C=E="",f=i;break;case 58:f=1+Gn(E),h=v;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&A2()==125)continue}switch(E+=kp(y),y*g){case 38:b=c>0?1:(E+="\f",-1);break;case 44:l[u++]=(Gn(E)-1)*b,b=1;break;case 64:Go()===45&&(E+=yc(Mn())),p=Go(),c=f=Gn(C=E+=R2(as())),y++;break;case 45:v===45&&Gn(E)==2&&(g=0)}}return a}function yg(e,t,r,n,o,a,i,l,s,u,c,f){for(var p=o-1,h=o===0?a:[""],v=Ry(h),g=0,m=0,b=0;g<n;++g)for(var y=0,C=za(e,p+1,p=jy(m=i[g])),D=e;y<v;++y)(D=Iy(m>0?h[y]+" "+C:Pt(C,/&\f/g,h[y])))&&(s[b++]=D);return uu(e,t,r,o===0?lu:l,s,u,c,f)}function M2(e,t,r,n){return uu(e,t,r,Py,kp(O2()),za(e,2,-2),0,n)}function Cg(e,t,r,n,o){return uu(e,t,r,Ep,za(e,0,n),za(e,n+1,-1),n,o)}function My(e,t,r){switch($2(e,t)){case 5103:return Gt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Gt+e+e;case 4789:return Ii+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Gt+e+Ii+e+or+e+e;case 5936:switch(jr(e,t+11)){case 114:return Gt+e+or+Pt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Gt+e+or+Pt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Gt+e+or+Pt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Gt+e+or+e+e;case 6165:return Gt+e+or+"flex-"+e+e;case 5187:return Gt+e+Pt(e,/(\w+).+(:[^]+)/,Gt+"box-$1$2"+or+"flex-$1$2")+e;case 5443:return Gt+e+or+"flex-item-"+Pt(e,/flex-|-self/g,"")+(uo(e,/flex-|baseline/)?"":or+"grid-row-"+Pt(e,/flex-|-self/g,""))+e;case 4675:return Gt+e+or+"flex-line-pack"+Pt(e,/align-content|flex-|-self/g,"")+e;case 5548:return Gt+e+or+Pt(e,"shrink","negative")+e;case 5292:return Gt+e+or+Pt(e,"basis","preferred-size")+e;case 6060:return Gt+"box-"+Pt(e,"-grow","")+Gt+e+or+Pt(e,"grow","positive")+e;case 4554:return Gt+Pt(e,/([^-])(transform)/g,"$1"+Gt+"$2")+e;case 6187:return Pt(Pt(Pt(e,/(zoom-|grab)/,Gt+"$1"),/(image-set)/,Gt+"$1"),e,"")+e;case 5495:case 3959:return Pt(e,/(image-set\([^]*)/,Gt+"$1$`$1");case 4968:return Pt(Pt(e,/(.+:)(flex-)?(.*)/,Gt+"box-pack:$3"+or+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Gt+e+e;case 4200:if(!uo(e,/flex-|baseline/))return or+"grid-column-align"+za(e,t)+e;break;case 2592:case 3360:return or+Pt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,uo(n.props,/grid-\w+-end/)})?~os(e+(r=r[t].value),"span",0)?e:or+Pt(e,"-start","")+e+or+"grid-row-span:"+(~os(r,"span",0)?uo(r,/\d+/):+uo(r,/\d+/)-+uo(e,/\d+/))+";":or+Pt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return uo(n.props,/grid-\w+-start/)})?e:or+Pt(Pt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Pt(e,/(.+)-inline(.+)/,Gt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Gn(e)-1-t>6)switch(jr(e,t+1)){case 109:if(jr(e,t+4)!==45)break;case 102:return Pt(e,/(.+:)(.+)-([^]+)/,"$1"+Gt+"$2-$3$1"+Ii+(jr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~os(e,"stretch",0)?My(Pt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Pt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,i,l,s,u){return or+o+":"+a+u+(i?or+o+"-span:"+(l?s:+s-+a)+u:"")+e});case 4949:if(jr(e,t+6)===121)return Pt(e,":",":"+Gt)+e;break;case 6444:switch(jr(e,jr(e,14)===45?18:11)){case 120:return Pt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Gt+(jr(e,14)===45?"inline-":"")+"box$3$1"+Gt+"$2$3$1"+or+"$2box$3")+e;case 100:return Pt(e,":",":"+or)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Pt(e,"scroll-","scroll-snap-")+e}return e}function Ps(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function z2(e,t,r,n){switch(e.type){case S2:if(e.children.length)break;case D2:case Ep:return e.return=e.return||e.value;case Py:return"";case Ny:return e.return=e.value+"{"+Ps(e.children,n)+"}";case lu:if(!Gn(e.value=e.props.join(",")))return""}return Gn(r=Ps(e.children,n))?e.return=e.value+"{"+r+"}":""}function _2(e){var t=Ry(e);return function(r,n,o,a){for(var i="",l=0;l<t;l++)i+=e[l](r,n,o,a)||"";return i}}function L2(e){return function(t){t.root||(t=t.return)&&e(t)}}function H2(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Ep:e.return=My(e.value,e.length,r);return;case Ny:return Ps([wo(e,{value:Pt(e.value,"@","@"+Gt)})],n);case lu:if(e.length)return B2(r=e.props,function(o){switch(uo(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ma(wo(e,{props:[Pt(o,/:(read-\w+)/,":"+Ii+"$1")]})),ma(wo(e,{props:[o]})),$d(e,{props:bg(r,n)});break;case"::placeholder":ma(wo(e,{props:[Pt(o,/:(plac\w+)/,":"+Gt+"input-$1")]})),ma(wo(e,{props:[Pt(o,/:(plac\w+)/,":"+Ii+"$1")]})),ma(wo(e,{props:[Pt(o,/:(plac\w+)/,or+"input-$1")]})),ma(wo(e,{props:[o]})),$d(e,{props:bg(r,n)});break}return""})}}var W2={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},La=typeof process<"u"&&gn!==void 0&&(gn.REACT_APP_SC_ATTR||gn.SC_ATTR)||"data-styled",zy="active",_y="data-styled-version",du="6.1.19",Dp=`/*!sc*/
80
+ `,Ns=typeof window<"u"&&typeof document<"u",K2=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&gn!==void 0&&gn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&gn.REACT_APP_SC_DISABLE_SPEEDY!==""?gn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&gn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&gn!==void 0&&gn.SC_DISABLE_SPEEDY!==void 0&&gn.SC_DISABLE_SPEEDY!==""&&gn.SC_DISABLE_SPEEDY!=="false"&&gn.SC_DISABLE_SPEEDY),fu=Object.freeze([]),Ha=Object.freeze({});function q2(e,t,r){return r===void 0&&(r=Ha),e.theme!==r.theme&&e.theme||t||r.theme}var Ly=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),V2=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,U2=/(^-|-$)/g;function xg(e){return e.replace(V2,"-").replace(U2,"")}var X2=/(a)(d)/gi,Hl=52,wg=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ad(e){var t,r="";for(t=Math.abs(e);t>Hl;t=t/Hl|0)r=wg(t%Hl)+r;return(wg(t%Hl)+r).replace(X2,"$1-$2")}var Cc,Hy=5381,Sa=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Wy=function(e){return Sa(Hy,e)};function G2(e){return Ad(Wy(e)>>>0)}function Y2(e){return e.displayName||e.name||"Component"}function xc(e){return typeof e=="string"&&!0}var Ky=typeof Symbol=="function"&&Symbol.for,qy=Ky?Symbol.for("react.memo"):60115,Z2=Ky?Symbol.for("react.forward_ref"):60112,J2={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Q2={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eB=((Cc={})[Z2]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Cc[qy]=Vy,Cc);function Eg(e){return("type"in(t=e)&&t.type.$$typeof)===qy?Vy:"$$typeof"in e?eB[e.$$typeof]:J2;var t}var tB=Object.defineProperty,rB=Object.getOwnPropertyNames,kg=Object.getOwnPropertySymbols,nB=Object.getOwnPropertyDescriptor,oB=Object.getPrototypeOf,Dg=Object.prototype;function Uy(e,t,r){if(typeof t!="string"){if(Dg){var n=oB(t);n&&n!==Dg&&Uy(e,n,r)}var o=rB(t);kg&&(o=o.concat(kg(t)));for(var a=Eg(e),i=Eg(t),l=0;l<o.length;++l){var s=o[l];if(!(s in Q2||r&&r[s]||i&&s in i||a&&s in a)){var u=nB(t,s);try{tB(e,s,u)}catch{}}}}return e}function Wa(e){return typeof e=="function"}function Sp(e){return typeof e=="object"&&"styledComponentId"in e}function Ko(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Sg(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Yi(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Fd(e,t,r){if(r===void 0&&(r=!1),!r&&!Yi(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Fd(e[n],t[n]);else if(Yi(t))for(var n in t)e[n]=Fd(e[n],t[n]);return e}function $p(e,t){Object.defineProperty(e,"toString",{value:t})}function bl(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var aB=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,a=o;t>=a;)if((a<<=1)<0)throw bl(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var i=o;i<a;i++)this.groupSizes[i]=0}for(var l=this.indexOfGroup(t+1),s=(i=0,r.length);i<s;i++)this.tag.insertRule(l,r[i])&&(this.groupSizes[t]++,l++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),o=n+r;this.groupSizes[t]=0;for(var a=n;a<o;a++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),a=o+n,i=o;i<a;i++)r+="".concat(this.tag.getRule(i)).concat(Dp);return r},e})(),ls=new Map,js=new Map,ss=1,Wl=function(e){if(ls.has(e))return ls.get(e);for(;js.has(ss);)ss++;var t=ss++;return ls.set(e,t),js.set(t,e),t},iB=function(e,t){ss=t+1,ls.set(e,t),js.set(t,e)},lB="style[".concat(La,"][").concat(_y,'="').concat(du,'"]'),sB=new RegExp("^".concat(La,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),uB=function(e,t,r){for(var n,o=r.split(","),a=0,i=o.length;a<i;a++)(n=o[a])&&e.registerName(t,n)},cB=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(Dp),o=[],a=0,i=n.length;a<i;a++){var l=n[a].trim();if(l){var s=l.match(sB);if(s){var u=0|parseInt(s[1],10),c=s[2];u!==0&&(iB(c,u),uB(e,c,s[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(l)}}},$g=function(e){for(var t=document.querySelectorAll(lB),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(La)!==zy&&(cB(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function dB(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Xy=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(l){var s=Array.from(l.querySelectorAll("style[".concat(La,"]")));return s[s.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(La,zy),n.setAttribute(_y,du);var i=dB();return i&&n.setAttribute("nonce",i),r.insertBefore(n,a),n},fB=(function(){function e(t){this.element=Xy(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,o=0,a=n.length;o<a;o++){var i=n[o];if(i.ownerNode===r)return i}throw bl(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e})(),pB=(function(){function e(t){this.element=Xy(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),mB=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),Bg=Ns,hB={isServer:!Ns,useCSSOMInjection:!K2},Gy=(function(){function e(t,r,n){t===void 0&&(t=Ha),r===void 0&&(r={});var o=this;this.options=cn(cn({},hB),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&Ns&&Bg&&(Bg=!1,$g(this)),$p(this,function(){return(function(a){for(var i=a.getTag(),l=i.length,s="",u=function(f){var p=(function(b){return js.get(b)})(f);if(p===void 0)return"continue";var h=a.names.get(p),v=i.getGroup(f);if(h===void 0||!h.size||v.length===0)return"continue";var g="".concat(La,".g").concat(f,'[id="').concat(p,'"]'),m="";h!==void 0&&h.forEach(function(b){b.length>0&&(m+="".concat(b,","))}),s+="".concat(v).concat(g,'{content:"').concat(m,'"}').concat(Dp)},c=0;c<l;c++)u(c);return s})(o)})}return e.registerId=function(t){return Wl(t)},e.prototype.rehydrate=function(){!this.server&&Ns&&$g(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(cn(cn({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(r){var n=r.useCSSOMInjection,o=r.target;return r.isServer?new mB(o):n?new fB(o):new pB(o)})(this.options),new aB(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(Wl(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(Wl(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Wl(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),gB=/&/g,vB=/^\s*\/\/.*$/gm;function Yy(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=Yy(r.children,t)),r})}function bB(e){var t,r,n,o=Ha,a=o.options,i=a===void 0?Ha:a,l=o.plugins,s=l===void 0?fu:l,u=function(p,h,v){return v.startsWith(r)&&v.endsWith(r)&&v.replaceAll(r,"").length>0?".".concat(t):p},c=s.slice();c.push(function(p){p.type===lu&&p.value.includes("&")&&(p.props[0]=p.props[0].replace(gB,r).replace(n,u))}),i.prefix&&c.push(H2),c.push(z2);var f=function(p,h,v,g){h===void 0&&(h=""),v===void 0&&(v=""),g===void 0&&(g="&"),t=g,r=h,n=new RegExp("\\".concat(r,"\\b"),"g");var m=p.replace(vB,""),b=T2(v||h?"".concat(v," ").concat(h," { ").concat(m," }"):m);i.namespace&&(b=Yy(b,i.namespace));var y=[];return Ps(b,_2(c.concat(L2(function(C){return y.push(C)})))),y};return f.hash=s.length?s.reduce(function(p,h){return h.name||bl(15),Sa(p,h.name)},Hy).toString():"",f}var yB=new Gy,Pd=bB(),Zy=Q.createContext({shouldForwardProp:void 0,styleSheet:yB,stylis:Pd});Zy.Consumer;Q.createContext(void 0);function Og(){return Rr(Zy)}var CB=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=Pd);var i=n.name+a.hash;o.hasNameForId(n.id,i)||o.insertRules(n.id,i,a(n.rules,i,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,$p(this,function(){throw bl(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=Pd),this.name+t.hash},e})(),xB=function(e){return e>="A"&&e<="Z"};function Ag(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;xB(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Jy=function(e){return e==null||e===!1||e===""},Qy=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!Jy(a)&&(Array.isArray(a)&&a.isCss||Wa(a)?n.push("".concat(Ag(o),":"),a,";"):Yi(a)?n.push.apply(n,Fs(Fs(["".concat(o," {")],Qy(a),!1),["}"],!1)):n.push("".concat(Ag(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in W2||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function Yo(e,t,r,n){if(Jy(e))return[];if(Sp(e))return[".".concat(e.styledComponentId)];if(Wa(e)){if(!Wa(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return Yo(o,t,r,n)}var a;return e instanceof CB?r?(e.inject(r,n),[e.getName(n)]):[e]:Yi(e)?Qy(e):Array.isArray(e)?Array.prototype.concat.apply(fu,e.map(function(i){return Yo(i,t,r,n)})):[e.toString()]}function wB(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Wa(r)&&!Sp(r))return!1}return!0}var EB=Wy(du),kB=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&wB(t),this.componentId=r,this.baseHash=Sa(EB,r),this.baseStyle=n,Gy.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))o=Ko(o,this.staticRulesId);else{var a=Sg(Yo(this.rules,t,r,n)),i=Ad(Sa(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,i)){var l=n(a,".".concat(i),void 0,this.componentId);r.insertRules(this.componentId,i,l)}o=Ko(o,i),this.staticRulesId=i}else{for(var s=Sa(this.baseHash,n.hash),u="",c=0;c<this.rules.length;c++){var f=this.rules[c];if(typeof f=="string")u+=f;else if(f){var p=Sg(Yo(f,t,r,n));s=Sa(s,p+c),u+=p}}if(u){var h=Ad(s>>>0);r.hasNameForId(this.componentId,h)||r.insertRules(this.componentId,h,n(u,".".concat(h),void 0,this.componentId)),o=Ko(o,h)}}return o},e})(),e1=Q.createContext(void 0);e1.Consumer;var wc={};function DB(e,t,r){var n=Sp(e),o=e,a=!xc(e),i=t.attrs,l=i===void 0?fu:i,s=t.componentId,u=s===void 0?(function(D,w){var k=typeof D!="string"?"sc":xg(D);wc[k]=(wc[k]||0)+1;var E="".concat(k,"-").concat(G2(du+k+wc[k]));return w?"".concat(w,"-").concat(E):E})(t.displayName,t.parentComponentId):s,c=t.displayName,f=c===void 0?(function(D){return xc(D)?"styled.".concat(D):"Styled(".concat(Y2(D),")")})(e):c,p=t.displayName&&t.componentId?"".concat(xg(t.displayName),"-").concat(t.componentId):t.componentId||u,h=n&&o.attrs?o.attrs.concat(l).filter(Boolean):l,v=t.shouldForwardProp;if(n&&o.shouldForwardProp){var g=o.shouldForwardProp;if(t.shouldForwardProp){var m=t.shouldForwardProp;v=function(D,w){return g(D,w)&&m(D,w)}}else v=g}var b=new kB(r,p,n?o.componentStyle:void 0);function y(D,w){return(function(k,E,x){var A=k.attrs,N=k.componentStyle,$=k.defaultProps,j=k.foldedComponentIds,F=k.styledComponentId,B=k.target,S=Q.useContext(e1),O=Og(),I=k.shouldForwardProp||O.shouldForwardProp,P=q2(E,S,$)||Ha,T=(function(ee,z,Y){for(var V,G=cn(cn({},z),{className:void 0,theme:Y}),K=0;K<ee.length;K+=1){var W=Wa(V=ee[K])?V(G):V;for(var te in W)G[te]=te==="className"?Ko(G[te],W[te]):te==="style"?cn(cn({},G[te]),W[te]):W[te]}return z.className&&(G.className=Ko(G.className,z.className)),G})(A,E,P),_=T.as||B,X={};for(var L in T)T[L]===void 0||L[0]==="$"||L==="as"||L==="theme"&&T.theme===P||(L==="forwardedAs"?X.as=T.forwardedAs:I&&!I(L,_)||(X[L]=T[L]));var q=(function(ee,z){var Y=Og(),V=ee.generateAndInjectStyles(z,Y.styleSheet,Y.stylis);return V})(N,T),J=Ko(j,F);return q&&(J+=" "+q),T.className&&(J+=" "+T.className),X[xc(_)&&!Ly.has(_)?"class":"className"]=J,x&&(X.ref=x),xs(_,X)})(C,D,w)}y.displayName=f;var C=Q.forwardRef(y);return C.attrs=h,C.componentStyle=b,C.displayName=f,C.shouldForwardProp=v,C.foldedComponentIds=n?Ko(o.foldedComponentIds,o.styledComponentId):"",C.styledComponentId=p,C.target=n?o.target:e,Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(D){this._foldedDefaultProps=n?(function(w){for(var k=[],E=1;E<arguments.length;E++)k[E-1]=arguments[E];for(var x=0,A=k;x<A.length;x++)Fd(w,A[x],!0);return w})({},o.defaultProps,D):D}}),$p(C,function(){return".".concat(C.styledComponentId)}),a&&Uy(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function Fg(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var Pg=function(e){return Object.assign(e,{isCss:!0})};function SB(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Wa(e)||Yi(e))return Pg(Yo(Fg(fu,Fs([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?Yo(n):Pg(Yo(Fg(n,t)))}function Nd(e,t,r){if(r===void 0&&(r=Ha),!t)throw bl(1,t);var n=function(o){for(var a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];return e(t,r,SB.apply(void 0,Fs([o],a,!1)))};return n.attrs=function(o){return Nd(e,t,cn(cn({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return Nd(e,t,cn(cn({},r),o))},n}var t1=function(e){return Nd(DB,e)},fr=t1;Ly.forEach(function(e){fr[e]=t1(e)});const $B=fr.span`
81
+ display: inline-block;
82
+ min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
83
+ padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
84
+ margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
85
+ border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
86
+ border: none !important;
87
+ cursor: pointer;
88
+ transition: all 0.2s;
89
+ font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
90
+ user-select: none;
91
+ font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
92
+ line-height: 2;
93
+ width: auto; /* 让宽度根据内容自动调整 */
94
+ min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
95
+ min-height: ${e=>{var i,l,s,u;const t=((l=(i=e.$styles)==null?void 0:i.templateField)==null?void 0:l.padding)||"2px 6px",r=((u=(s=e.$styles)==null?void 0:s.templateField)==null?void 0:u.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
96
+
97
+ /* 高度自适应 */
98
+ height: auto; /* 允许高度根据内容自动调整 */
99
+ white-space: normal; /* 允许换行 */
100
+ box-sizing: border-box; /* 确保padding和border包含在宽度内 */
101
+ overflow: visible; /* 确保内容不被隐藏 */
102
+ word-wrap: break-word; /* 允许长单词换行 */
103
+ max-width: 100%; /* 限制在容器宽度内 */
104
+
105
+ /* 使用传入的样式配置 */
106
+ background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
107
+ color: #055AFF;
108
+ border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
109
+
110
+ ${e=>{var t,r;return e.$isEditing&&`
111
+ background-color: white !important;
112
+ color: #055AFF !important;
113
+ border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
114
+ outline: none;
115
+ min-width: 30px;
116
+ `}}
117
+
118
+ &:hover {
119
+ opacity: 0.8;
120
+ }
121
+ `,BB=fr.input`
122
+ background: white;
123
+ border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
124
+ border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
125
+ padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
126
+ margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
127
+ min-width: ${"30px"};
128
+ width: ${e=>{var u,c,f,p;const t=e.$value.length;if(t===0)return((c=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:c.minWidth)||"120px";const r=((p=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:p.padding)||"2px 6.2px",n=r.split(" ").map(h=>parseInt(h)),o=n.length===2?n[1]:n[0],a=12.5,i=20,l=t*a+o*2+i,s=Math.min(Math.max(l,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:o,charWidth:a,bufferSpace:i,calculatedWidth:l,maxWidth:e.$maxWidth,finalWidth:s,inputValue:e.$value}),s+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
129
+ height: ${e=>{var i,l,s,u;const t=((l=(i=e.$styles)==null?void 0:i.templateField)==null?void 0:l.padding)||"2px 6px",r=((u=(s=e.$styles)==null?void 0:s.templateField)==null?void 0:u.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
130
+ font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
131
+ font-family: inherit;
132
+ outline: none;
133
+ color: #055AFF;
134
+ line-height: 2;
135
+ box-sizing: border-box;
136
+ white-space: nowrap; /* 防止内部换行 */
137
+ overflow: hidden; /* 隐藏超出部分 */
138
+ text-overflow: ellipsis; /* 超出部分显示省略号 */
139
+
140
+ &:focus {
141
+ border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
142
+ box-shadow: 0 0 0 3px ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}}20;
143
+ }
144
+ `,r1=dn(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var k,E,x,A,N,$,j,F,B,S,O,I;const i=yy(),[l,s]=xt(!1),[u,c]=xt(e.value||""),[f,p]=xt(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[h,v]=xt(600),g=Ve(null),m=mt(()=>{try{const P=document.querySelector('[data-slate-editor="true"]');if(P){const T=P.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||P.parentElement;if(T){const _=T.clientWidth,X=_-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",_,"\u53EF\u7528\u5BBD\u5EA6:",X),Math.max(X,200)}}return 600}catch(P){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",P),600}},[]);Ot(()=>{p(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const P=m();v(P)},[e.value,e.placeholder,m]);const b=mt(()=>{s(!0),c(e.value||""),setTimeout(()=>{g.current&&(g.current.focus(),g.current.select())},0)},[e.value]),y=mt(P=>{const T=P.target.value;c(T)},[]),C=mt(()=>{const P=$e.findPath(i,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",P),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",u),Re.setNodes(i,{value:u},{at:P});const T=u.trim()!==""?u:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";p(T);const _=i.children[P[0]];if(_&&"children"in _){const X=_.children[P[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",X)}s(!1)},[i,e,u]),D=mt(()=>{C()},[C]),w=mt(P=>{P.key==="Enter"?(P.preventDefault(),C()):P.key==="Escape"&&(P.preventDefault(),c(e.value||""),s(!1))},[C,e.value]);return l?ae.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[ae.jsx(BB,{ref:g,value:u,onChange:y,onBlur:D,onKeyDown:w,placeholder:"",$styles:n,$value:u,$maxWidth:h,style:{backgroundColor:"white",color:((k=n==null?void 0:n.templateField)==null?void 0:k.textColor)||"#055AFF",border:`2px solid ${((E=n==null?void 0:n.templateField)==null?void 0:E.borderColor)||"#84ADFF"}`,minWidth:((x=n==null?void 0:n.templateField)==null?void 0:x.minWidth)||"120px"}}),r]}):ae.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[ae.jsxs($B,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:f.length,onClick:b,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(A=n==null?void 0:n.templateField)==null?void 0:A.backgroundColor,borderColor:(N=n==null?void 0:n.templateField)==null?void 0:N.borderColor,borderRadius:($=n==null?void 0:n.templateField)==null?void 0:$.borderRadius,padding:(j=n==null?void 0:n.templateField)==null?void 0:j.padding,margin:(F=n==null?void 0:n.templateField)==null?void 0:F.margin,fontSize:(B=n==null?void 0:n.templateField)==null?void 0:B.fontSize,fontWeight:(S=n==null?void 0:n.templateField)==null?void 0:S.fontWeight,minWidth:(O=n==null?void 0:n.templateField)==null?void 0:O.minWidth,color:(I=n==null?void 0:n.templateField)==null?void 0:I.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:f,displayValueLength:f.length,contentLength:f.length}),null),f]}),ae.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});r1.displayName="TemplateField";const OB=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return ae.jsxs("div",{...t,className:"think-container",children:[ae.jsx("div",{className:"think-indicator"}),ae.jsx("div",{className:"think-content",children:ae.jsx("div",{className:"think-text text-[#86909C] pl-5 my-3 border border-[#ECECEE] border-solid border-l-3 border-t-0 border-b-0 border-r-0",style:{color:`${(a=r==null?void 0:r.text)==null?void 0:a.color} !important`,display:o?"none":"block"},children:e})})]})};var Ng={exports:{}};/*!
145
+ Copyright (c) 2018 Jed Watson.
146
+ Licensed under the MIT License (MIT), see
147
+ http://jedwatson.github.io/classnames
148
+ */var jg;function AB(){return jg||(jg=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(a=o(a,n(l)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var l in a)t.call(a,l)&&a[l]&&(i=o(i,l));return i}function o(a,i){return i?a?a+" "+i:a+i:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ng)),Ng.exports}var FB=AB();const de=gl(FB);function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Te.apply(null,arguments)}function lt(e){"@babel/helpers - typeof";return lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(e)}var PB=Symbol.for("react.element"),NB=Symbol.for("react.transitional.element"),jB=Symbol.for("react.fragment");function n1(e){return e&&lt(e)==="object"&&(e.$$typeof===PB||e.$$typeof===NB)&&e.type===jB}function Ln(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return Q.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(Ln(n)):n1(n)&&n.props?r=r.concat(Ln(n.props.children,t)):r.push(n))}),r}var jd={},IB=function(e){};function RB(e,t){}function TB(e,t){}function MB(){jd={}}function o1(e,t,r){!t&&!jd[r]&&(e(!1,r),jd[r]=!0)}function lr(e,t){o1(RB,e,t)}function zB(e,t){o1(TB,e,t)}lr.preMessage=IB;lr.resetWarned=MB;lr.noteOnce=zB;function _B(e,t){if(lt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a1(e){var t=_B(e,"string");return lt(t)=="symbol"?t:t+""}function M(e,t,r){return(t=a1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ig(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ig(Object(r),!0).forEach(function(n){M(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ig(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zi(e){return e instanceof HTMLElement||e instanceof SVGElement}function pu(e){return e&&lt(e)==="object"&&Zi(e.nativeElement)?e.nativeElement:Zi(e)?e:null}function us(e){var t=pu(e);if(t)return t;if(e instanceof Q.Component){var r;return(r=Hi.findDOMNode)===null||r===void 0?void 0:r.call(Hi,e)}return null}var Rg={exports:{}},Xt={};/**
149
+ * @license React
150
+ * react-is.production.min.js
151
+ *
152
+ * Copyright (c) Facebook, Inc. and its affiliates.
153
+ *
154
+ * This source code is licensed under the MIT license found in the
155
+ * LICENSE file in the root directory of this source tree.
156
+ */var Tg;function LB(){if(Tg)return Xt;Tg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function g(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case r:case o:case n:case u:case c:return m;default:switch(m=m&&m.$$typeof,m){case l:case i:case s:case p:case f:case a:return m;default:return b}}case t:return b}}}return Xt.ContextConsumer=i,Xt.ContextProvider=a,Xt.Element=e,Xt.ForwardRef=s,Xt.Fragment=r,Xt.Lazy=p,Xt.Memo=f,Xt.Portal=t,Xt.Profiler=o,Xt.StrictMode=n,Xt.Suspense=u,Xt.SuspenseList=c,Xt.isAsyncMode=function(){return!1},Xt.isConcurrentMode=function(){return!1},Xt.isContextConsumer=function(m){return g(m)===i},Xt.isContextProvider=function(m){return g(m)===a},Xt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Xt.isForwardRef=function(m){return g(m)===s},Xt.isFragment=function(m){return g(m)===r},Xt.isLazy=function(m){return g(m)===p},Xt.isMemo=function(m){return g(m)===f},Xt.isPortal=function(m){return g(m)===t},Xt.isProfiler=function(m){return g(m)===o},Xt.isStrictMode=function(m){return g(m)===n},Xt.isSuspense=function(m){return g(m)===u},Xt.isSuspenseList=function(m){return g(m)===c},Xt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===o||m===n||m===u||m===c||m===h||typeof m=="object"&&m!==null&&(m.$$typeof===p||m.$$typeof===f||m.$$typeof===a||m.$$typeof===i||m.$$typeof===s||m.$$typeof===v||m.getModuleId!==void 0)},Xt.typeOf=g,Xt}var Mg;function HB(){return Mg||(Mg=1,Rg.exports=LB()),Rg.exports}var Ec=HB();function la(e,t,r){var n=d.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var WB=Number(_w.split(".")[0]),Ji=function(e,t){typeof e=="function"?e(t):lt(e)==="object"&&e&&"current"in e&&(e.current=t)},ro=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);return n.length<=1?n[0]:function(o){t.forEach(function(a){Ji(a,o)})}},sa=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return la(function(){return ro.apply(void 0,t)},t,function(n,o){return n.length!==o.length||n.every(function(a,i){return a!==o[i]})})},Zn=function(e){var t,r;if(!e)return!1;if(Bp(e)&&WB>=19)return!0;var n=Ec.isMemo(e)?e.type.type:e.type;return!(typeof n=="function"&&!((t=n.prototype)!==null&&t!==void 0&&t.render)&&n.$$typeof!==Ec.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==Ec.ForwardRef)};function Bp(e){return Hw(e)&&!n1(e)}var KB=function(e){return Bp(e)&&Zn(e)},ua=function(e){if(e&&Bp(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null},Id=d.createContext(null);function qB(e){var t=e.children,r=e.onBatchResize,n=d.useRef(0),o=d.useRef([]),a=d.useContext(Id),i=d.useCallback(function(l,s,u){n.current+=1;var c=n.current;o.current.push({size:l,element:s,data:u}),Promise.resolve().then(function(){c===n.current&&(r==null||r(o.current),o.current=[])}),a==null||a(l,s,u)},[r,a]);return d.createElement(Id.Provider,{value:i},t)}var i1=(function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,a){return o[0]===r?(n=a,!0):!1}),n}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,a=this.__entries__;o<a.length;o++){var i=a[o];r.call(n,i[1],i[0])}},t})()})(),Rd=typeof window<"u"&&typeof document<"u"&&window.document===document,Is=(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")()})(),VB=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Is):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),UB=2;function XB(e,t){var r=!1,n=!1,o=0;function a(){r&&(r=!1,e()),n&&l()}function i(){VB(a)}function l(){var s=Date.now();if(r){if(s-o<UB)return;n=!0}else r=!0,n=!1,setTimeout(i,t);o=s}return l}var GB=20,YB=["top","right","bottom","left","width","height","size","weight"],ZB=typeof MutationObserver<"u",JB=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=XB(this.refresh.bind(this),GB)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Rd||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ZB?(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)},e.prototype.disconnect_=function(){!Rd||!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)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=YB.some(function(a){return!!~n.indexOf(a)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),l1=(function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e}),Ka=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Is}),s1=mu(0,0,0,0);function Rs(e){return parseFloat(e)||0}function zg(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,o){var a=e["border-"+o+"-width"];return n+Rs(a)},0)}function QB(e){for(var t=["top","right","bottom","left"],r={},n=0,o=t;n<o.length;n++){var a=o[n],i=e["padding-"+a];r[a]=Rs(i)}return r}function eO(e){var t=e.getBBox();return mu(0,0,t.width,t.height)}function tO(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return s1;var n=Ka(e).getComputedStyle(e),o=QB(n),a=o.left+o.right,i=o.top+o.bottom,l=Rs(n.width),s=Rs(n.height);if(n.boxSizing==="border-box"&&(Math.round(l+a)!==t&&(l-=zg(n,"left","right")+a),Math.round(s+i)!==r&&(s-=zg(n,"top","bottom")+i)),!nO(e)){var u=Math.round(l+a)-t,c=Math.round(s+i)-r;Math.abs(u)!==1&&(l-=u),Math.abs(c)!==1&&(s-=c)}return mu(o.left,o.top,l,s)}var rO=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Ka(e).SVGGraphicsElement}:function(e){return e instanceof Ka(e).SVGElement&&typeof e.getBBox=="function"}})();function nO(e){return e===Ka(e).document.documentElement}function oO(e){return Rd?rO(e)?eO(e):tO(e):s1}function aO(e){var t=e.x,r=e.y,n=e.width,o=e.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,i=Object.create(a.prototype);return l1(i,{x:t,y:r,width:n,height:o,top:r,right:t+n,bottom:o+r,left:t}),i}function mu(e,t,r,n){return{x:e,y:t,width:r,height:n}}var iO=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=mu(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=oO(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),lO=(function(){function e(t,r){var n=aO(r);l1(this,{target:t,contentRect:n})}return e})(),sO=(function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new i1,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Ka(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new iO(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Ka(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new lO(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),u1=typeof WeakMap<"u"?new WeakMap:new i1,c1=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=JB.getInstance(),n=new sO(t,r,this);u1.set(this,n)}return e})();["observe","unobserve","disconnect"].forEach(function(e){c1.prototype[e]=function(){var t;return(t=u1.get(this))[e].apply(t,arguments)}});var uO=(function(){return typeof Is.ResizeObserver<"u"?Is.ResizeObserver:c1})(),Bo=new Map;function cO(e){e.forEach(function(t){var r,n=t.target;(r=Bo.get(n))===null||r===void 0||r.forEach(function(o){return o(n)})})}var d1=new uO(cO);function dO(e,t){Bo.has(e)||(Bo.set(e,new Set),d1.observe(e)),Bo.get(e).add(t)}function fO(e,t){Bo.has(e)&&(Bo.get(e).delete(t),Bo.get(e).size||(d1.unobserve(e),Bo.delete(e)))}function vr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a1(n.key),n)}}function br(e,t,r){return t&&_g(e.prototype,t),r&&_g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qi(e,t){return Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Qi(e,t)}function no(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qi(e,t)}function el(e){return el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},el(e)}function Op(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Op=function(){return!!e})()}function et(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pO(e,t){if(t&&(lt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return et(e)}function oo(e){var t=Op();return function(){var r,n=el(e);if(t){var o=el(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pO(this,r)}}var mO=(function(e){no(r,e);var t=oo(r);function r(){return vr(this,r),t.apply(this,arguments)}return br(r,[{key:"render",value:function(){return this.props.children}}]),r})(d.Component);function hO(e,t){var r=e.children,n=e.disabled,o=d.useRef(null),a=d.useRef(null),i=d.useContext(Id),l=typeof r=="function",s=l?r(o):r,u=d.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),c=!l&&d.isValidElement(s)&&Zn(s),f=c?ua(s):null,p=sa(f,o),h=function(){var m;return us(o.current)||(o.current&&lt(o.current)==="object"?us((m=o.current)===null||m===void 0?void 0:m.nativeElement):null)||us(a.current)};d.useImperativeHandle(t,function(){return h()});var v=d.useRef(e);v.current=e;var g=d.useCallback(function(m){var b=v.current,y=b.onResize,C=b.data,D=m.getBoundingClientRect(),w=D.width,k=D.height,E=m.offsetWidth,x=m.offsetHeight,A=Math.floor(w),N=Math.floor(k);if(u.current.width!==A||u.current.height!==N||u.current.offsetWidth!==E||u.current.offsetHeight!==x){var $={width:A,height:N,offsetWidth:E,offsetHeight:x};u.current=$;var j=E===Math.round(w)?w:E,F=x===Math.round(k)?k:x,B=H(H({},$),{},{offsetWidth:j,offsetHeight:F});i==null||i(B,m,C),y&&Promise.resolve().then(function(){y(B,m)})}},[]);return d.useEffect(function(){var m=h();return m&&!n&&dO(m,g),function(){return fO(m,g)}},[o.current,n]),d.createElement(mO,{ref:a},c?d.cloneElement(s,{ref:p}):s)}var gO=d.forwardRef(hO),vO="rc-observer-key";function bO(e,t){var r=e.children,n=typeof r=="function"?[r]:Ln(r);return n.map(function(o,a){var i=(o==null?void 0:o.key)||"".concat(vO,"-").concat(a);return d.createElement(gO,Te({},e,{key:i,ref:a===0?t:void 0}),o)})}var ao=d.forwardRef(bO);ao.Collection=qB;function Td(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function yO(e){if(Array.isArray(e))return Td(e)}function f1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ap(e,t){if(e){if(typeof e=="string")return Td(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Td(e,t):void 0}}function CO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
157
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function je(e){return yO(e)||f1(e)||Ap(e)||CO()}var p1=function(e){return+setTimeout(e,16)},m1=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(p1=function(e){return window.requestAnimationFrame(e)},m1=function(e){return window.cancelAnimationFrame(e)});var Lg=0,Fp=new Map;function h1(e){Fp.delete(e)}var qt=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Lg+=1;var r=Lg;function n(o){if(o===0)h1(r),e();else{var a=p1(function(){n(o-1)});Fp.set(r,a)}}return n(t),r};qt.cancel=function(e){var t=Fp.get(e);return h1(e),m1(t)};function g1(e){if(Array.isArray(e))return e}function xO(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,a,i,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(c){u=!0,o=c}finally{try{if(!s&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function v1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
158
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){return g1(e)||xO(e,t)||Ap(e,t)||v1()}function tl(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Xr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function wO(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var Hg="data-rc-order",Wg="data-rc-priority",EO="rc-util-key",Md=new Map;function b1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):EO}function hu(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function kO(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Pp(e){return Array.from((Md.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function y1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Xr())return null;var r=t.csp,n=t.prepend,o=t.priority,a=o===void 0?0:o,i=kO(n),l=i==="prependQueue",s=document.createElement("style");s.setAttribute(Hg,i),l&&a&&s.setAttribute(Wg,"".concat(a)),r!=null&&r.nonce&&(s.nonce=r==null?void 0:r.nonce),s.innerHTML=e;var u=hu(t),c=u.firstChild;if(n){if(l){var f=(t.styles||Pp(u)).filter(function(p){if(!["prepend","prependQueue"].includes(p.getAttribute(Hg)))return!1;var h=Number(p.getAttribute(Wg)||0);return a>=h});if(f.length)return u.insertBefore(s,f[f.length-1].nextSibling),s}u.insertBefore(s,c)}else u.appendChild(s);return s}function C1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=hu(t);return(t.styles||Pp(r)).find(function(n){return n.getAttribute(b1(t))===e})}function rl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=C1(e,t);if(r){var n=hu(t);n.removeChild(r)}}function DO(e,t){var r=Md.get(e);if(!r||!wO(document,r)){var n=y1("",t),o=n.parentNode;Md.set(e,o),e.removeChild(n)}}function go(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=hu(r),o=Pp(n),a=H(H({},r),{},{styles:o});DO(n,a);var i=C1(t,a);if(i){var l,s;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&i.nonce!==((s=a.csp)===null||s===void 0?void 0:s.nonce)){var u;i.nonce=(u=a.csp)===null||u===void 0?void 0:u.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var c=y1(e,a);return c.setAttribute(b1(a),t),c}function SO(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function yt(e,t){if(e==null)return{};var r,n,o=SO(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Jn(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function o(a,i){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,s=n.has(a);if(lr(!s,"Warning: There may be circular references"),s)return!1;if(a===i)return!0;if(r&&l>1)return!1;n.add(a);var u=l+1;if(Array.isArray(a)){if(!Array.isArray(i)||a.length!==i.length)return!1;for(var c=0;c<a.length;c++)if(!o(a[c],i[c],u))return!1;return!0}if(a&&i&&lt(a)==="object"&&lt(i)==="object"){var f=Object.keys(a);return f.length!==Object.keys(i).length?!1:f.every(function(p){return o(a[p],i[p],u)})}return!1}return o(e,t)}var $O="%";function zd(e){return e.join($O)}var BO=(function(){function e(t){vr(this,e),M(this,"instanceId",void 0),M(this,"cache",new Map),M(this,"extracted",new Set),this.instanceId=t}return br(e,[{key:"get",value:function(t){return this.opGet(zd(t))}},{key:"opGet",value:function(t){return this.cache.get(t)||null}},{key:"update",value:function(t,r){return this.opUpdate(zd(t),r)}},{key:"opUpdate",value:function(t,r){var n=this.cache.get(t),o=r(n);o===null?this.cache.delete(t):this.cache.set(t,o)}}]),e})(),qa="data-token-hash",zn="data-css-hash",Oo="__cssinjs_instance__";function OO(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(zn,"]"))||[],r=document.head.firstChild;Array.from(t).forEach(function(o){o[Oo]=o[Oo]||e,o[Oo]===e&&document.head.insertBefore(o,r)});var n={};Array.from(document.querySelectorAll("style[".concat(zn,"]"))).forEach(function(o){var a=o.getAttribute(zn);if(n[a]){if(o[Oo]===e){var i;(i=o.parentNode)===null||i===void 0||i.removeChild(o)}}else n[a]=!0})}return new BO(e)}var yl=d.createContext({hashPriority:"low",cache:OO(),defaultCache:!0});function AO(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var Np=(function(){function e(){vr(this,e),M(this,"cache",void 0),M(this,"keys",void 0),M(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return br(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(t){var r,n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return t.forEach(function(i){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(i)}}),(r=a)!==null&&r!==void 0&&r.value&&o&&(a.value[1]=this.cacheCallTimes++),(n=a)===null||n===void 0?void 0:n.value}},{key:"get",value:function(t){var r;return(r=this.internalGet(t,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(t){return!!this.internalGet(t)}},{key:"set",value:function(t,r){var n=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(s,u){var c=ce(s,2),f=c[1];return n.internalGet(u)[1]<f?[u,n.internalGet(u)[1]]:s},[this.keys[0],this.cacheCallTimes]),a=ce(o,1),i=a[0];this.delete(i)}this.keys.push(t)}var l=this.cache;t.forEach(function(s,u){if(u===t.length-1)l.set(s,{value:[r,n.cacheCallTimes++]});else{var c=l.get(s);c?c.map||(c.map=new Map):l.set(s,{map:new Map}),l=l.get(s).map}})}},{key:"deleteByPath",value:function(t,r){var n=t.get(r[0]);if(r.length===1){var o;return n.map?t.set(r[0],{map:n.map}):t.delete(r[0]),(o=n.value)===null||o===void 0?void 0:o[0]}var a=this.deleteByPath(n.map,r.slice(1));return(!n.map||n.map.size===0)&&!n.value&&t.delete(r[0]),a}},{key:"delete",value:function(t){if(this.has(t))return this.keys=this.keys.filter(function(r){return!AO(r,t)}),this.deleteByPath(this.cache,t)}}]),e})();M(Np,"MAX_CACHE_SIZE",20);M(Np,"MAX_CACHE_OFFSET",5);var Kg=0,x1=(function(){function e(t){vr(this,e),M(this,"derivatives",void 0),M(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Kg,t.length===0&&(t.length>0,void 0),Kg+=1}return br(e,[{key:"getDerivativeToken",value:function(t){return this.derivatives.reduce(function(r,n){return n(t,r)},void 0)}}]),e})(),kc=new Np;function _d(e){var t=Array.isArray(e)?e:[e];return kc.has(t)||kc.set(t,new x1(t)),kc.get(t)}var FO=new WeakMap,Dc={};function PO(e,t){for(var r=FO,n=0;n<t.length;n+=1){var o=t[n];r.has(o)||r.set(o,new WeakMap),r=r.get(o)}return r.has(Dc)||r.set(Dc,e()),r.get(Dc)}var qg=new WeakMap;function Ri(e){var t=qg.get(e)||"";return t||(Object.keys(e).forEach(function(r){var n=e[r];t+=r,n instanceof x1?t+=n.id:n&&lt(n)==="object"?t+=Ri(n):t+=n}),t=tl(t),qg.set(e,t)),t}function Vg(e,t){return tl("".concat(t,"_").concat(Ri(e)))}var Ld=Xr();function se(e){return typeof e=="number"?"".concat(e,"px"):e}function Ts(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(o)return e;var a=H(H({},n),{},M(M({},qa,t),zn,r)),i=Object.keys(a).map(function(l){var s=a[l];return s?"".concat(l,'="').concat(s,'"'):null}).filter(function(l){return l}).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}var cs=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},NO=function(e,t,r){return Object.keys(e).length?".".concat(t).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(e).map(function(n){var o=ce(n,2),a=o[0],i=o[1];return"".concat(a,":").concat(i,";")}).join(""),"}"):""},w1=function(e,t,r){var n={},o={};return Object.entries(e).forEach(function(a){var i,l,s=ce(a,2),u=s[0],c=s[1];if(r!=null&&(i=r.preserve)!==null&&i!==void 0&&i[u])o[u]=c;else if((typeof c=="string"||typeof c=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[u])){var f,p=cs(u,r==null?void 0:r.prefix);n[p]=typeof c=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(c,"px"):String(c),o[u]="var(".concat(p,")")}}),[o,NO(n,t,{scope:r==null?void 0:r.scope})]},Ug=Xr()?d.useLayoutEffect:d.useEffect,Wt=function(e,t){var r=d.useRef(!0);Ug(function(){return e(r.current)},t),Ug(function(){return r.current=!1,function(){r.current=!0}},[])},Xg=function(e,t){Wt(function(r){if(!r)return e()},t)},jO=H({},d),Gg=jO.useInsertionEffect,IO=function(e,t,r){d.useMemo(e,r),Wt(function(){return t(!0)},r)},RO=Gg?function(e,t,r){return Gg(function(){return e(),t()},r)}:IO,TO=H({},d),MO=TO.useInsertionEffect,zO=function(e){var t=[],r=!1;function n(o){r||t.push(o)}return d.useEffect(function(){return r=!1,function(){r=!0,t.length&&t.forEach(function(o){return o()})}},e),n},_O=function(){return function(e){e()}},LO=typeof MO<"u"?zO:_O;function jp(e,t,r,n,o){var a=d.useContext(yl),i=a.cache,l=[e].concat(je(t)),s=zd(l),u=LO([s]),c=function(h){i.opUpdate(s,function(v){var g=v||[void 0,void 0],m=ce(g,2),b=m[0],y=b===void 0?0:b,C=m[1],D=C,w=D||r(),k=[y,w];return h?h(k):k})};d.useMemo(function(){c()},[s]);var f=i.opGet(s),p=f[1];return RO(function(){o==null||o(p)},function(h){return c(function(v){var g=ce(v,2),m=g[0],b=g[1];return h&&m===0&&(o==null||o(p)),[m+1,b]}),function(){i.opUpdate(s,function(v){var g=v||[],m=ce(g,2),b=m[0],y=b===void 0?0:b,C=m[1],D=y-1;return D===0?(u(function(){(h||!i.opGet(s))&&(n==null||n(C,!1))}),null):[y-1,C]})}},[s]),p}var HO={},WO="css",Ho=new Map;function KO(e){Ho.set(e,(Ho.get(e)||0)+1)}function qO(e,t){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat(qa,'="').concat(e,'"]'));r.forEach(function(n){if(n[Oo]===t){var o;(o=n.parentNode)===null||o===void 0||o.removeChild(n)}})}}var VO=0;function UO(e,t){Ho.set(e,(Ho.get(e)||0)-1);var r=new Set;Ho.forEach(function(n,o){n<=0&&r.add(o)}),Ho.size-r.size>VO&&r.forEach(function(n){qO(n,t),Ho.delete(n)})}var XO=function(e,t,r,n){var o=r.getDerivativeToken(e),a=H(H({},o),t);return n&&(a=n(a)),a},E1="token";function GO(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Rr(yl),o=n.cache.instanceId,a=n.container,i=r.salt,l=i===void 0?"":i,s=r.override,u=s===void 0?HO:s,c=r.formatToken,f=r.getComputedToken,p=r.cssVar,h=PO(function(){return Object.assign.apply(Object,[{}].concat(je(t)))},t),v=Ri(h),g=Ri(u),m=p?Ri(p):"",b=jp(E1,[l,e.id,v,g,m],function(){var y,C=f?f(h,u,e):XO(h,u,e,c),D=H({},C),w="";if(p){var k=w1(C,p.key,{prefix:p.prefix,ignore:p.ignore,unitless:p.unitless,preserve:p.preserve}),E=ce(k,2);C=E[0],w=E[1]}var x=Vg(C,l);C._tokenKey=x,D._tokenKey=Vg(D,l);var A=(y=p==null?void 0:p.key)!==null&&y!==void 0?y:x;C._themeKey=A,KO(A);var N="".concat(WO,"-").concat(tl(x));return C._hashId=N,[C,N,D,w,(p==null?void 0:p.key)||""]},function(y){UO(y[0]._themeKey,o)},function(y){var C=ce(y,4),D=C[0],w=C[3];if(p&&w){var k=go(w,tl("css-variables-".concat(D._themeKey)),{mark:zn,prepend:"queue",attachTo:a,priority:-999});k[Oo]=o,k.setAttribute(qa,D._themeKey)}});return b}var YO=function(e,t,r){var n=ce(e,5),o=n[2],a=n[3],i=n[4],l=r||{},s=l.plain;if(!a)return null;var u=o._tokenKey,c=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)},p=Ts(a,i,u,f,s);return[c,u,p]},ZO={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k1="comm",D1="rule",S1="decl",JO="@import",QO="@namespace",eA="@keyframes",tA="@layer",$1=Math.abs,Ip=String.fromCharCode;function B1(e){return e.trim()}function ds(e,t,r){return e.replace(t,r)}function rA(e,t,r){return e.indexOf(t,r)}function Pa(e,t){return e.charCodeAt(t)|0}function Va(e,t,r){return e.slice(t,r)}function Xn(e){return e.length}function nA(e){return e.length}function Kl(e,t){return t.push(e),e}var gu=1,Ua=1,O1=0,An=0,kr=0,ni="";function Rp(e,t,r,n,o,a,i,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:gu,column:Ua,length:i,return:"",siblings:l}}function oA(){return kr}function aA(){return kr=An>0?Pa(ni,--An):0,Ua--,kr===10&&(Ua=1,gu--),kr}function _n(){return kr=An<O1?Pa(ni,An++):0,Ua++,kr===10&&(Ua=1,gu++),kr}function Ao(){return Pa(ni,An)}function fs(){return An}function vu(e,t){return Va(ni,e,t)}function nl(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function iA(e){return gu=Ua=1,O1=Xn(ni=e),An=0,[]}function lA(e){return ni="",e}function Sc(e){return B1(vu(An-1,Hd(e===91?e+2:e===40?e+1:e)))}function sA(e){for(;(kr=Ao())&&kr<33;)_n();return nl(e)>2||nl(kr)>3?"":" "}function uA(e,t){for(;--t&&_n()&&!(kr<48||kr>102||kr>57&&kr<65||kr>70&&kr<97););return vu(e,fs()+(t<6&&Ao()==32&&_n()==32))}function Hd(e){for(;_n();)switch(kr){case e:return An;case 34:case 39:e!==34&&e!==39&&Hd(kr);break;case 40:e===41&&Hd(e);break;case 92:_n();break}return An}function cA(e,t){for(;_n()&&e+kr!==57&&!(e+kr===84&&Ao()===47););return"/*"+vu(t,An-1)+"*"+Ip(e===47?e:_n())}function dA(e){for(;!nl(Ao());)_n();return vu(e,An)}function fA(e){return lA(ps("",null,null,null,[""],e=iA(e),0,[0],e))}function ps(e,t,r,n,o,a,i,l,s){for(var u=0,c=0,f=i,p=0,h=0,v=0,g=1,m=1,b=1,y=0,C="",D=o,w=a,k=n,E=C;m;)switch(v=y,y=_n()){case 40:if(v!=108&&Pa(E,f-1)==58){rA(E+=ds(Sc(y),"&","&\f"),"&\f",$1(u?l[u-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:E+=Sc(y);break;case 9:case 10:case 13:case 32:E+=sA(v);break;case 92:E+=uA(fs()-1,7);continue;case 47:switch(Ao()){case 42:case 47:Kl(pA(cA(_n(),fs()),t,r,s),s),(nl(v||1)==5||nl(Ao()||1)==5)&&Xn(E)&&Va(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*g:l[u++]=Xn(E)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:b==-1&&(E=ds(E,/\f/g,"")),h>0&&(Xn(E)-f||g===0&&v===47)&&Kl(h>32?Zg(E+";",n,r,f-1,s):Zg(ds(E," ","")+";",n,r,f-2,s),s);break;case 59:E+=";";default:if(Kl(k=Yg(E,t,r,u,c,o,l,C,D=[],w=[],f,a),a),y===123)if(c===0)ps(E,t,k,k,D,a,f,l,w);else{switch(p){case 99:if(Pa(E,3)===110)break;case 108:if(Pa(E,2)===97)break;default:c=0;case 100:case 109:case 115:}c?ps(e,k,k,n&&Kl(Yg(e,k,k,0,0,o,l,C,o,D=[],f,w),w),o,w,f,l,n?D:w):ps(E,k,k,k,[""],w,0,l,w)}}u=c=h=0,g=b=1,C=E="",f=i;break;case 58:f=1+Xn(E),h=v;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&aA()==125)continue}switch(E+=Ip(y),y*g){case 38:b=c>0?1:(E+="\f",-1);break;case 44:l[u++]=(Xn(E)-1)*b,b=1;break;case 64:Ao()===45&&(E+=Sc(_n())),p=Ao(),c=f=Xn(C=E+=dA(fs())),y++;break;case 45:v===45&&Xn(E)==2&&(g=0)}}return a}function Yg(e,t,r,n,o,a,i,l,s,u,c,f){for(var p=o-1,h=o===0?a:[""],v=nA(h),g=0,m=0,b=0;g<n;++g)for(var y=0,C=Va(e,p+1,p=$1(m=i[g])),D=e;y<v;++y)(D=B1(m>0?h[y]+" "+C:ds(C,/&\f/g,h[y])))&&(s[b++]=D);return Rp(e,t,r,o===0?D1:l,s,u,c,f)}function pA(e,t,r,n){return Rp(e,t,r,k1,Ip(oA()),Va(e,2,-2),0,n)}function Zg(e,t,r,n,o){return Rp(e,t,r,S1,Va(e,0,n),Va(e,n+1,-1),n,o)}function Wd(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function mA(e,t,r,n){switch(e.type){case tA:if(e.children.length)break;case JO:case QO:case S1:return e.return=e.return||e.value;case k1:return"";case eA:return e.return=e.value+"{"+Wd(e.children,n)+"}";case D1:if(!Xn(e.value=e.props.join(",")))return""}return Xn(r=Wd(e.children,n))?e.return=e.value+"{"+r+"}":""}var Jg="data-ant-cssinjs-cache-path",A1="_FILE_STYLE__",Zo,F1=!0;function hA(){if(!Zo&&(Zo={},Xr())){var e=document.createElement("div");e.className=Jg,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var a=o.split(":"),i=ce(a,2),l=i[0],s=i[1];Zo[l]=s});var r=document.querySelector("style[".concat(Jg,"]"));if(r){var n;F1=!1,(n=r.parentNode)===null||n===void 0||n.removeChild(r)}document.body.removeChild(e)}}function gA(e){return hA(),!!Zo[e]}function vA(e){var t=Zo[e],r=null;if(t&&Xr())if(F1)r=A1;else{var n=document.querySelector("style[".concat(zn,'="').concat(Zo[e],'"]'));n?r=n.innerHTML:delete Zo[e]}return[r,t]}var bA="_skip_check_",P1="_multi_value_";function ms(e){var t=Wd(fA(e),mA);return t.replace(/\{%%%\:[^;];}/g,";")}function yA(e){return lt(e)==="object"&&e&&(bA in e||P1 in e)}function Qg(e,t,r){if(!t)return e;var n=".".concat(t),o=r==="low"?":where(".concat(n,")"):n,a=e.split(",").map(function(i){var l,s=i.trim().split(/\s+/),u=s[0]||"",c=((l=u.match(/^\w+/))===null||l===void 0?void 0:l[0])||"";return u="".concat(c).concat(o).concat(u.slice(c.length)),[u].concat(je(s.slice(1))).join(" ")});return a.join(",")}var CA=function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=n.root,a=n.injectHash,i=n.parentSelectors,l=r.hashId,s=r.layer;r.path;var u=r.hashPriority,c=r.transformers,f=c===void 0?[]:c;r.linters;var p="",h={};function v(b){var y=b.getName(l);if(!h[y]){var C=e(b.style,r,{root:!1,parentSelectors:i}),D=ce(C,1),w=D[0];h[y]="@keyframes ".concat(b.getName(l)).concat(w)}}function g(b){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return b.forEach(function(C){Array.isArray(C)?g(C,y):C&&y.push(C)}),y}var m=g(Array.isArray(t)?t:[t]);return m.forEach(function(b){var y=typeof b=="string"&&!o?{}:b;if(typeof y=="string")p+="".concat(y,`
159
+ `);else if(y._keyframe)v(y);else{var C=f.reduce(function(D,w){var k;return(w==null||(k=w.visit)===null||k===void 0?void 0:k.call(w,D))||D},y);Object.keys(C).forEach(function(D){var w=C[D];if(lt(w)==="object"&&w&&(D!=="animationName"||!w._keyframe)&&!yA(w)){var k=!1,E=D.trim(),x=!1;(o||a)&&l?E.startsWith("@")?k=!0:E==="&"?E=Qg("",l,u):E=Qg(D,l,u):o&&!l&&(E==="&"||E==="")&&(E="",x=!0);var A=e(w,r,{root:x,injectHash:k,parentSelectors:[].concat(je(i),[E])}),N=ce(A,2),$=N[0],j=N[1];h=H(H({},h),j),p+="".concat(E).concat($)}else{let S=function(O,I){var P=O.replace(/[A-Z]/g,function(_){return"-".concat(_.toLowerCase())}),T=I;!ZO[O]&&typeof T=="number"&&T!==0&&(T="".concat(T,"px")),O==="animationName"&&I!==null&&I!==void 0&&I._keyframe&&(v(I),T=I.getName(l)),p+="".concat(P,":").concat(T,";")};var F,B=(F=w==null?void 0:w.value)!==null&&F!==void 0?F:w;lt(w)==="object"&&w!==null&&w!==void 0&&w[P1]&&Array.isArray(B)?B.forEach(function(O){S(D,O)}):S(D,B)}})}}),o?s&&(p&&(p="@layer ".concat(s.name," {").concat(p,"}")),s.dependencies&&(h["@layer ".concat(s.name)]=s.dependencies.map(function(b){return"@layer ".concat(b,", ").concat(s.name,";")}).join(`
160
+ `))):p="{".concat(p,"}"),[p,h]};function N1(e,t){return tl("".concat(e.join("%")).concat(t))}function xA(){return null}var j1="style";function Kd(e,t){var r=e.token,n=e.path,o=e.hashId,a=e.layer,i=e.nonce,l=e.clientOnly,s=e.order,u=s===void 0?0:s,c=d.useContext(yl),f=c.autoClear;c.mock;var p=c.defaultCache,h=c.hashPriority,v=c.container,g=c.ssrInline,m=c.transformers,b=c.linters,y=c.cache,C=c.layer,D=r._tokenKey,w=[D];C&&w.push("layer"),w.push.apply(w,je(n));var k=Ld,E=jp(j1,w,function(){var j=w.join("|");if(gA(j)){var F=vA(j),B=ce(F,2),S=B[0],O=B[1];if(S)return[S,D,O,{},l,u]}var I=t(),P=CA(I,{hashId:o,hashPriority:h,layer:C?a:void 0,path:n.join("-"),transformers:m,linters:b}),T=ce(P,2),_=T[0],X=T[1],L=ms(_),q=N1(w,L);return[L,D,q,X,l,u]},function(j,F){var B=ce(j,3),S=B[2];(F||f)&&Ld&&rl(S,{mark:zn,attachTo:v})},function(j){var F=ce(j,4),B=F[0];F[1];var S=F[2],O=F[3];if(k&&B!==A1){var I={mark:zn,prepend:C?!1:"queue",attachTo:v,priority:u},P=typeof i=="function"?i():i;P&&(I.csp={nonce:P});var T=[],_=[];Object.keys(O).forEach(function(L){L.startsWith("@layer")?T.push(L):_.push(L)}),T.forEach(function(L){go(ms(O[L]),"_layer-".concat(L),H(H({},I),{},{prepend:!0}))});var X=go(B,S,I);X[Oo]=y.instanceId,X.setAttribute(qa,D),_.forEach(function(L){go(ms(O[L]),"_effect-".concat(L),I)})}}),x=ce(E,3),A=x[0],N=x[1],$=x[2];return function(j){var F;return!g||k||!p?F=d.createElement(xA,null):F=d.createElement("style",Te({},M(M({},qa,N),zn,$),{dangerouslySetInnerHTML:{__html:A}})),d.createElement(d.Fragment,null,F,j)}}var wA=function(e,t,r){var n=ce(e,6),o=n[0],a=n[1],i=n[2],l=n[3],s=n[4],u=n[5],c=r||{},f=c.plain;if(s)return null;var p=o,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return p=Ts(o,a,i,h,f),l&&Object.keys(l).forEach(function(v){if(!t[v]){t[v]=!0;var g=ms(l[v]),m=Ts(g,a,"_effect-".concat(v),h,f);v.startsWith("@layer")?p=m+p:p+=m}}),[u,i,p]},I1="cssVar",EA=function(e,t){var r=e.key,n=e.prefix,o=e.unitless,a=e.ignore,i=e.token,l=e.scope,s=l===void 0?"":l,u=Rr(yl),c=u.cache.instanceId,f=u.container,p=i._tokenKey,h=[].concat(je(e.path),[r,s,p]),v=jp(I1,h,function(){var g=t(),m=w1(g,r,{prefix:n,unitless:o,ignore:a,scope:s}),b=ce(m,2),y=b[0],C=b[1],D=N1(h,C);return[y,C,D,r]},function(g){var m=ce(g,3),b=m[2];Ld&&rl(b,{mark:zn,attachTo:f})},function(g){var m=ce(g,3),b=m[1],y=m[2];if(b){var C=go(b,y,{mark:zn,prepend:"queue",attachTo:f,priority:-999});C[Oo]=c,C.setAttribute(qa,r)}});return v},kA=function(e,t,r){var n=ce(e,4),o=n[1],a=n[2],i=n[3],l=r||{},s=l.plain;if(!o)return null;var u=-999,c={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=Ts(o,i,a,c,s);return[u,a,f]};M(M(M({},j1,wA),E1,YO),I1,kA);var Vt=(function(){function e(t,r){vr(this,e),M(this,"name",void 0),M(this,"style",void 0),M(this,"_keyframe",!0),this.name=t,this.style=r}return br(e,[{key:"getName",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?"".concat(t,"-").concat(this.name):this.name}}]),e})();function ha(e){return e.notSplit=!0,e}ha(["borderTop","borderBottom"]),ha(["borderTop"]),ha(["borderBottom"]),ha(["borderLeft","borderRight"]),ha(["borderLeft"]),ha(["borderRight"]);var Tp=Fn({});function R1(e){return g1(e)||f1(e)||Ap(e)||v1()}function vn(e,t){for(var r=e,n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function T1(e,t,r,n){if(!t.length)return r;var o=R1(t),a=o[0],i=o.slice(1),l;return!e&&typeof a=="number"?l=[]:Array.isArray(e)?l=je(e):l=H({},e),n&&r===void 0&&i.length===1?delete l[a][i[0]]:l[a]=T1(l[a],i,r,n),l}function jn(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!vn(e,t.slice(0,-1))?e:T1(e,t,r,n)}function DA(e){return lt(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function ev(e){return Array.isArray(e)?[]:{}}var SA=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function $a(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=ev(t[0]);return t.forEach(function(o){function a(i,l){var s=new Set(l),u=vn(o,i),c=Array.isArray(u);if(c||DA(u)){if(!s.has(u)){s.add(u);var f=vn(n,i);c?n=jn(n,i,[]):(!f||lt(f)!=="object")&&(n=jn(n,i,ev(u))),SA(u).forEach(function(p){a([].concat(je(i),[p]),s)})}}else n=jn(n,i,u)}a([])}),n}function $A(){}const BA=d.createContext({}),oi=()=>{const e=()=>{};return e.deprecated=$A,e},OA=Fn(void 0);var M1={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},AA={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},FA=H(H({},AA),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const z1={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},tv={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},FA),timePickerLocale:Object.assign({},z1)},mn="${label} is not a valid ${type}",ra={locale:"en",Pagination:M1,DatePicker:tv,TimePicker:z1,Calendar:tv,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:mn,method:mn,array:mn,object:mn,number:mn,date:mn,boolean:mn,integer:mn,float:mn,regexp:mn,email:mn,url:mn,hex:mn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};Object.assign({},ra.Modal);let hs=[];const rv=()=>hs.reduce((e,t)=>Object.assign(Object.assign({},e),t),ra.Modal);function PA(e){if(e){const t=Object.assign({},e);return hs.push(t),rv(),()=>{hs=hs.filter(r=>r!==t),rv()}}Object.assign({},ra.Modal)}const Mp=Fn(void 0),bu=(e,t)=>{const r=d.useContext(Mp),n=d.useMemo(()=>{var a;const i=t||ra[e],l=(a=r==null?void 0:r[e])!==null&&a!==void 0?a:{};return Object.assign(Object.assign({},typeof i=="function"?i():i),l||{})},[e,t,r]),o=d.useMemo(()=>{const a=r==null?void 0:r.locale;return r!=null&&r.exist&&!a?ra.locale:a},[r]);return[n,o]},NA="internalMark",jA=e=>{const{locale:t={},children:r,_ANT_MARK__:n}=e;d.useEffect(()=>PA(t==null?void 0:t.Modal),[t]);const o=d.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return d.createElement(Mp.Provider,{value:o},r)},_1={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"},ol=Object.assign(Object.assign({},_1),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
161
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
162
+ '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}),Pr=Math.round;function $c(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)n[o]=t(n[o]||0,r[o]||"",o);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const nv=(e,t,r)=>r===0?e:e/100;function bi(e,t){const r=t||255;return e>r?r:e<0?0:e}class Ht{constructor(t){M(this,"isValid",!0),M(this,"r",0),M(this,"g",0),M(this,"b",0),M(this,"a",1),M(this,"_h",void 0),M(this,"_s",void 0),M(this,"_l",void 0),M(this,"_v",void 0),M(this,"_max",void 0),M(this,"_min",void 0),M(this,"_brightness",void 0);function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let n=function(a){return o.startsWith(a)};const o=t.trim();/^#?[A-F\d]{3,8}$/i.test(o)?this.fromHexString(o):n("rgb")?this.fromRgbString(o):n("hsl")?this.fromHslString(o):(n("hsv")||n("hsb"))&&this.fromHsvString(o)}else if(t instanceof Ht)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=bi(t.r),this.g=bi(t.g),this.b=bi(t.b),this.a=typeof t.a=="number"?bi(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(a){const i=a/255;return i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),o=t(this.b);return .2126*r+.7152*n+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Pr(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/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(t=10){const r=this.getHue(),n=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:r,s:n,l:o,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:r,s:n,l:o,a:this.a})}mix(t,r=50){const n=this._c(t),o=r/100,a=l=>(n[l]-this[l])*o+this[l],i={r:Pr(a("r")),g:Pr(a("g")),b:Pr(a("b")),a:Pr(a("a")*100)/100};return this._c(i)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),o=a=>Pr((this[a]*this.a+r[a]*r.a*(1-this.a))/n);return this._c({r:o("r"),g:o("g"),b:o("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=Pr(this.a*255).toString(16);t+=a.length===2?a:"0"+a}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=Pr(this.getSaturation()*100),n=Pr(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}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(t,r,n){const o=this.clone();return o[t]=bi(r,n),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(o,a){return parseInt(r[o]+r[a||o],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:o}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof o=="number"?o:1,r<=0){const p=Pr(n*255);this.r=p,this.g=p,this.b=p}let a=0,i=0,l=0;const s=t/60,u=(1-Math.abs(2*n-1))*r,c=u*(1-Math.abs(s%2-1));s>=0&&s<1?(a=u,i=c):s>=1&&s<2?(a=c,i=u):s>=2&&s<3?(i=u,l=c):s>=3&&s<4?(i=c,l=u):s>=4&&s<5?(a=c,l=u):s>=5&&s<6&&(a=u,l=c);const f=n-u/2;this.r=Pr((a+f)*255),this.g=Pr((i+f)*255),this.b=Pr((l+f)*255)}fromHsv({h:t,s:r,v:n,a:o}){this._h=t%360,this._s=r,this._v=n,this.a=typeof o=="number"?o:1;const a=Pr(n*255);if(this.r=a,this.g=a,this.b=a,r<=0)return;const i=t/60,l=Math.floor(i),s=i-l,u=Pr(n*(1-r)*255),c=Pr(n*(1-r*s)*255),f=Pr(n*(1-r*(1-s))*255);switch(l){case 0:this.g=f,this.b=u;break;case 1:this.r=c,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=c;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=c;break}}fromHsvString(t){const r=$c(t,nv);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=$c(t,nv);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=$c(t,(n,o)=>o.includes("%")?Pr(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var ql=2,ov=.16,IA=.05,RA=.05,TA=.15,L1=5,H1=4,MA=[{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 av(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-ql*t:Math.round(e.h)+ql*t:n=r?Math.round(e.h)+ql*t:Math.round(e.h)-ql*t,n<0?n+=360:n>=360&&(n-=360),n}function iv(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-ov*t:t===H1?n=e.s+ov:n=e.s+IA*t,n>1&&(n=1),r&&t===L1&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function lv(e,t,r){var n;return r?n=e.v+RA*t:n=e.v-TA*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function al(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new Ht(e),o=n.toHsv(),a=L1;a>0;a-=1){var i=new Ht({h:av(o,a,!0),s:iv(o,a,!0),v:lv(o,a,!0)});r.push(i)}r.push(n);for(var l=1;l<=H1;l+=1){var s=new Ht({h:av(o,l),s:iv(o,l),v:lv(o,l)});r.push(s)}return t.theme==="dark"?MA.map(function(u){var c=u.index,f=u.amount;return new Ht(t.backgroundColor||"#141414").mix(r[c],f).toHexString()}):r.map(function(u){return u.toHexString()})}var Bc={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"},qd=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];qd.primary=qd[5];var Vd=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Vd.primary=Vd[5];var Ud=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Ud.primary=Ud[5];var Xd=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Xd.primary=Xd[5];var Gd=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Gd.primary=Gd[5];var Yd=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Yd.primary=Yd[5];var Zd=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Zd.primary=Zd[5];var Jd=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Jd.primary=Jd[5];var Ms=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ms.primary=Ms[5];var Qd=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Qd.primary=Qd[5];var ef=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];ef.primary=ef[5];var tf=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];tf.primary=tf[5];var rf=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];rf.primary=rf[5];var Oc={red:qd,volcano:Vd,orange:Ud,gold:Xd,yellow:Gd,lime:Yd,green:Zd,cyan:Jd,blue:Ms,geekblue:Qd,purple:ef,magenta:tf,grey:rf};function zA(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){const{colorSuccess:n,colorWarning:o,colorError:a,colorInfo:i,colorPrimary:l,colorBgBase:s,colorTextBase:u}=e,c=t(l),f=t(n),p=t(o),h=t(a),v=t(i),g=r(s,u),m=e.colorLink||e.colorInfo,b=t(m),y=new Ht(h[1]).mix(new Ht(h[3]),50).toHexString();return Object.assign(Object.assign({},g),{colorPrimaryBg:c[1],colorPrimaryBgHover:c[2],colorPrimaryBorder:c[3],colorPrimaryBorderHover:c[4],colorPrimaryHover:c[5],colorPrimary:c[6],colorPrimaryActive:c[7],colorPrimaryTextHover:c[8],colorPrimaryText:c[9],colorPrimaryTextActive:c[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBgFilledHover:y,colorErrorBgActive:h[3],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[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:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new Ht("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const _A=e=>{let t=e,r=e,n=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:o}};function LA(e){const{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:o+1},_A(n))}const HA=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function gs(e){return(e+8)/e}function WA(e){const t=Array.from({length:10}).map((r,n)=>{const o=n-1,a=e*Math.pow(Math.E,o/5),i=n>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:gs(r)}))}const KA=e=>{const t=WA(e),r=t.map(c=>c.size),n=t.map(c=>c.lineHeight),o=r[1],a=r[0],i=r[2],l=n[1],s=n[0],u=n[2];return{fontSizeSM:a,fontSize:o,fontSizeLG:i,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:l,lineHeightLG:u,lineHeightSM:s,fontHeight:Math.round(l*o),fontHeightLG:Math.round(u*i),fontHeightSM:Math.round(s*a),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function qA(e){const{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}const kn=(e,t)=>new Ht(e).setA(t).toRgbString(),yi=(e,t)=>new Ht(e).darken(t).toHexString(),VA=e=>{const t=al(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},UA=(e,t)=>{const r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:kn(n,.88),colorTextSecondary:kn(n,.65),colorTextTertiary:kn(n,.45),colorTextQuaternary:kn(n,.25),colorFill:kn(n,.15),colorFillSecondary:kn(n,.06),colorFillTertiary:kn(n,.04),colorFillQuaternary:kn(n,.02),colorBgSolid:kn(n,1),colorBgSolidHover:kn(n,.75),colorBgSolidActive:kn(n,.95),colorBgLayout:yi(r,4),colorBgContainer:yi(r,0),colorBgElevated:yi(r,0),colorBgSpotlight:kn(n,.85),colorBgBlur:"transparent",colorBorder:yi(r,15),colorBorderSecondary:yi(r,6)}};function XA(e){Bc.pink=Bc.magenta,Oc.pink=Oc.magenta;const t=Object.keys(_1).map(r=>{const n=e[r]===Bc[r]?Oc[r]:al(e[r]);return Array.from({length:10},()=>1).reduce((o,a,i)=>(o[`${r}-${i+1}`]=n[i],o[`${r}${i+1}`]=n[i],o),{})}).reduce((r,n)=>(r=Object.assign(Object.assign({},r),n),r),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),zA(e,{generateColorPalettes:VA,generateNeutralColorPalettes:UA})),KA(e.fontSize)),qA(e)),HA(e)),LA(e))}const W1=_d(XA),nf={token:ol,override:{override:ol},hashed:!0},K1=Q.createContext(nf),il="ant",zp="anticon",GA=["outlined","borderless","filled","underlined"],YA=(e,t)=>t||(e?`${il}-${e}`:il),Zt=d.createContext({getPrefixCls:YA,iconPrefixCls:zp}),{Consumer:iz}=Zt,sv={};function Ro(e){const t=d.useContext(Zt),{getPrefixCls:r,direction:n,getPopupContainer:o}=t,a=t[e];return Object.assign(Object.assign({classNames:sv,styles:sv},a),{getPrefixCls:r,direction:n,getPopupContainer:o})}const ZA=`-ant-${Date.now()}-${Math.random()}`;function JA(e,t){const r={},n=(a,i)=>{let l=a.clone();return l=(i==null?void 0:i(l))||l,l.toRgbString()},o=(a,i)=>{const l=new Ht(a),s=al(l.toRgbString());r[`${i}-color`]=n(l),r[`${i}-color-disabled`]=s[1],r[`${i}-color-hover`]=s[4],r[`${i}-color-active`]=s[6],r[`${i}-color-outline`]=l.clone().setA(.2).toRgbString(),r[`${i}-color-deprecated-bg`]=s[0],r[`${i}-color-deprecated-border`]=s[2]};if(t.primaryColor){o(t.primaryColor,"primary");const a=new Ht(t.primaryColor),i=al(a.toRgbString());i.forEach((s,u)=>{r[`primary-${u+1}`]=s}),r["primary-color-deprecated-l-35"]=n(a,s=>s.lighten(35)),r["primary-color-deprecated-l-20"]=n(a,s=>s.lighten(20)),r["primary-color-deprecated-t-20"]=n(a,s=>s.tint(20)),r["primary-color-deprecated-t-50"]=n(a,s=>s.tint(50)),r["primary-color-deprecated-f-12"]=n(a,s=>s.setA(s.a*.12));const l=new Ht(i[0]);r["primary-color-active-deprecated-f-30"]=n(l,s=>s.setA(s.a*.3)),r["primary-color-active-deprecated-d-02"]=n(l,s=>s.darken(2))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`
163
+ :root {
164
+ ${Object.keys(r).map(a=>`--${e}-${a}: ${r[a]};`).join(`
165
+ `)}
166
+ }
167
+ `.trim()}function QA(e,t){const r=JA(e,t);Xr()&&go(r,`${ZA}-dynamic-theme`)}const Po=d.createContext(!1),eF=({children:e,disabled:t})=>{const r=d.useContext(Po);return d.createElement(Po.Provider,{value:t??r},e)},Xa=d.createContext(void 0),tF=({children:e,size:t})=>{const r=d.useContext(Xa);return d.createElement(Xa.Provider,{value:t||r},e)};function rF(){const e=Rr(Po),t=Rr(Xa);return{componentDisabled:e,componentSize:t}}var q1=br(function e(){vr(this,e)}),V1="CALC_UNIT",nF=new RegExp(V1,"g");function Ac(e){return typeof e=="number"?"".concat(e).concat(V1):e}var oF=(function(e){no(r,e);var t=oo(r);function r(n,o){var a;vr(this,r),a=t.call(this),M(et(a),"result",""),M(et(a),"unitlessCssVar",void 0),M(et(a),"lowPriority",void 0);var i=lt(n);return a.unitlessCssVar=o,n instanceof r?a.result="(".concat(n.result,")"):i==="number"?a.result=Ac(n):i==="string"&&(a.result=n),a}return br(r,[{key:"add",value:function(n){return n instanceof r?this.result="".concat(this.result," + ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," + ").concat(Ac(n))),this.lowPriority=!0,this}},{key:"sub",value:function(n){return n instanceof r?this.result="".concat(this.result," - ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," - ").concat(Ac(n))),this.lowPriority=!0,this}},{key:"mul",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," * ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," * ").concat(n)),this.lowPriority=!1,this}},{key:"div",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," / ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," / ").concat(n)),this.lowPriority=!1,this}},{key:"getResult",value:function(n){return this.lowPriority||n?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(n){var o=this,a=n||{},i=a.unit,l=!0;return typeof i=="boolean"?l=i:Array.from(this.unitlessCssVar).some(function(s){return o.result.includes(s)})&&(l=!1),this.result=this.result.replace(nF,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r})(q1),aF=(function(e){no(r,e);var t=oo(r);function r(n){var o;return vr(this,r),o=t.call(this),M(et(o),"result",0),n instanceof r?o.result=n.result:typeof n=="number"&&(o.result=n),o}return br(r,[{key:"add",value:function(n){return n instanceof r?this.result+=n.result:typeof n=="number"&&(this.result+=n),this}},{key:"sub",value:function(n){return n instanceof r?this.result-=n.result:typeof n=="number"&&(this.result-=n),this}},{key:"mul",value:function(n){return n instanceof r?this.result*=n.result:typeof n=="number"&&(this.result*=n),this}},{key:"div",value:function(n){return n instanceof r?this.result/=n.result:typeof n=="number"&&(this.result/=n),this}},{key:"equal",value:function(){return this.result}}]),r})(q1),iF=function(e,t){var r=e==="css"?oF:aF;return function(n){return new r(n,t)}},uv=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function nr(e){var t=d.useRef();t.current=e;var r=d.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return r}function ll(e){var t=d.useRef(!1),r=d.useState(e),n=ce(r,2),o=n[0],a=n[1];d.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(l,s){s&&t.current||a(l)}return[o,i]}function Fc(e){return e!==void 0}function Ur(e,t){var r=t||{},n=r.defaultValue,o=r.value,a=r.onChange,i=r.postState,l=ll(function(){return Fc(o)?o:Fc(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),s=ce(l,2),u=s[0],c=s[1],f=o!==void 0?o:u,p=i?i(f):f,h=nr(a),v=ll([f]),g=ce(v,2),m=g[0],b=g[1];Xg(function(){var C=m[0];u!==C&&h(u,C)},[m]),Xg(function(){Fc(o)||c(o)},[o]);var y=nr(function(C,D){c(C,D),b([f],D)});return[p,y]}function cv(e,t,r,n){var o=H({},t[e]);if(n!=null&&n.deprecatedTokens){var a=n.deprecatedTokens;a.forEach(function(l){var s=ce(l,2),u=s[0],c=s[1];if(o!=null&&o[u]||o!=null&&o[c]){var f;(f=o[c])!==null&&f!==void 0||(o[c]=o==null?void 0:o[u])}})}var i=H(H({},r),o);return Object.keys(i).forEach(function(l){i[l]===t[l]&&delete i[l]}),i}var U1=typeof CSSINJS_STATISTIC<"u",of=!0;function er(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!U1)return Object.assign.apply(Object,[{}].concat(t));of=!1;var n={};return t.forEach(function(o){if(lt(o)==="object"){var a=Object.keys(o);a.forEach(function(i){Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){return o[i]}})})}}),of=!0,n}var dv={};function lF(){}var sF=function(e){var t,r=e,n=lF;return U1&&typeof Proxy<"u"&&(t=new Set,r=new Proxy(e,{get:function(o,a){if(of){var i;(i=t)===null||i===void 0||i.add(a)}return o[a]}}),n=function(o,a){var i;dv[o]={global:Array.from(t),component:H(H({},(i=dv[o])===null||i===void 0?void 0:i.component),a)}}),{token:r,keys:t,flush:n}};function fv(e,t,r){if(typeof r=="function"){var n;return r(er(t,(n=t[e])!==null&&n!==void 0?n:{}))}return r??{}}function uF(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"max(".concat(r.map(function(o){return se(o)}).join(","),")")},min:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"min(".concat(r.map(function(o){return se(o)}).join(","),")")}}}var cF=1e3*60*10,dF=(function(){function e(){vr(this,e),M(this,"map",new Map),M(this,"objectIDMap",new WeakMap),M(this,"nextID",0),M(this,"lastAccessBeat",new Map),M(this,"accessBeat",0)}return br(e,[{key:"set",value:function(t,r){this.clear();var n=this.getCompositeKey(t);this.map.set(n,r),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(t){var r=this.getCompositeKey(t),n=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(t){var r=this,n=t.map(function(o){return o&&lt(o)==="object"?"obj_".concat(r.getObjectID(o)):"".concat(lt(o),"_").concat(o)});return n.join("|")}},{key:"getObjectID",value:function(t){if(this.objectIDMap.has(t))return this.objectIDMap.get(t);var r=this.nextID;return this.objectIDMap.set(t,r),this.nextID+=1,r}},{key:"clear",value:function(){var t=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(n,o){r-n>cF&&(t.map.delete(o),t.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),e})(),pv=new dF;function fF(e,t){return Q.useMemo(function(){var r=pv.get(t);if(r)return r;var n=e();return pv.set(t,n),n},t)}var pF=function(){return{}};function mF(e){var t=e.useCSP,r=t===void 0?pF:t,n=e.useToken,o=e.usePrefix,a=e.getResetStyles,i=e.getCommonStyle,l=e.getCompUnitless;function s(p,h,v,g){var m=Array.isArray(p)?p[0]:p;function b(x){return"".concat(String(m)).concat(x.slice(0,1).toUpperCase()).concat(x.slice(1))}var y=(g==null?void 0:g.unitless)||{},C=typeof l=="function"?l(p):{},D=H(H({},C),{},M({},b("zIndexPopup"),!0));Object.keys(y).forEach(function(x){D[b(x)]=y[x]});var w=H(H({},g),{},{unitless:D,prefixToken:b}),k=c(p,h,v,w),E=u(m,v,w);return function(x){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x,N=k(x,A),$=ce(N,2),j=$[1],F=E(A),B=ce(F,2),S=B[0],O=B[1];return[S,j,O]}}function u(p,h,v){var g=v.unitless,m=v.injectStyle,b=m===void 0?!0:m,y=v.prefixToken,C=v.ignore,D=function(k){var E=k.rootCls,x=k.cssVar,A=x===void 0?{}:x,N=n(),$=N.realToken;return EA({path:[p],prefix:A.prefix,key:A.key,unitless:g,ignore:C,token:$,scope:E},function(){var j=fv(p,$,h),F=cv(p,$,j,{deprecatedTokens:v==null?void 0:v.deprecatedTokens});return Object.keys(j).forEach(function(B){F[y(B)]=F[B],delete F[B]}),F}),null},w=function(k){var E=n(),x=E.cssVar;return[function(A){return b&&x?Q.createElement(Q.Fragment,null,Q.createElement(D,{rootCls:k,cssVar:x,component:p}),A):A},x==null?void 0:x.key]};return w}function c(p,h,v){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=Array.isArray(p)?p:[p,p],b=ce(m,1),y=b[0],C=m.join("-"),D=e.layer||{name:"antd"};return function(w){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,E=n(),x=E.theme,A=E.realToken,N=E.hashId,$=E.token,j=E.cssVar,F=o(),B=F.rootPrefixCls,S=F.iconPrefixCls,O=r(),I=j?"css":"js",P=fF(function(){var J=new Set;return j&&Object.keys(g.unitless||{}).forEach(function(ee){J.add(cs(ee,j.prefix)),J.add(cs(ee,uv(y,j.prefix)))}),iF(I,J)},[I,y,j==null?void 0:j.prefix]),T=uF(I),_=T.max,X=T.min,L={theme:x,token:$,hashId:N,nonce:function(){return O.nonce},clientOnly:g.clientOnly,layer:D,order:g.order||-999};typeof a=="function"&&Kd(H(H({},L),{},{clientOnly:!1,path:["Shared",B]}),function(){return a($,{prefix:{rootPrefixCls:B,iconPrefixCls:S},csp:O})});var q=Kd(H(H({},L),{},{path:[C,w,S]}),function(){if(g.injectStyle===!1)return[];var J=sF($),ee=J.token,z=J.flush,Y=fv(y,A,v),V=".".concat(w),G=cv(y,A,Y,{deprecatedTokens:g.deprecatedTokens});j&&Y&&lt(Y)==="object"&&Object.keys(Y).forEach(function(U){Y[U]="var(".concat(cs(U,uv(y,j.prefix)),")")});var K=er(ee,{componentCls:V,prefixCls:w,iconCls:".".concat(S),antCls:".".concat(B),calc:P,max:_,min:X},j?Y:G),W=h(K,{hashId:N,prefixCls:w,rootPrefixCls:B,iconPrefixCls:S});z(y,G);var te=typeof i=="function"?i(K,w,k,g.resetFont):null;return[g.resetStyle===!1?null:te,W]});return[q,N]}}function f(p,h,v){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=c(p,h,v,H({resetStyle:!1,order:-998},g)),b=function(y){var C=y.prefixCls,D=y.rootCls,w=D===void 0?C:D;return m(C,w),null};return b}return{genStyleHooks:s,genSubStyleComponent:f,genComponentStyleHook:c}}const na=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],hF="5.27.1";function Pc(e){return e>=0&&e<=255}function $i(e,t){const{r,g:n,b:o,a}=new Ht(e).toRgb();if(a<1)return e;const{r:i,g:l,b:s}=new Ht(t).toRgb();for(let u=.01;u<=1;u+=.01){const c=Math.round((r-i*(1-u))/u),f=Math.round((n-l*(1-u))/u),p=Math.round((o-s*(1-u))/u);if(Pc(c)&&Pc(f)&&Pc(p))return new Ht({r:c,g:f,b:p,a:Math.round(u*100)/100}).toRgbString()}return new Ht({r,g:n,b:o,a:1}).toRgbString()}var gF=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function X1(e){const{override:t}=e,r=gF(e,["override"]),n=Object.assign({},t);Object.keys(ol).forEach(f=>{delete n[f]});const o=Object.assign(Object.assign({},r),n),a=480,i=576,l=768,s=992,u=1200,c=1600;return o.motion===!1&&(o.motionDurationFast="0s",o.motionDurationMid="0s",o.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:$i(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:$i(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:$i(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:$i(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
168
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
169
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
170
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
171
+ `,boxShadowSecondary:`
172
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
173
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
174
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
175
+ `,boxShadowTertiary:`
176
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
177
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
178
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
179
+ `,screenXS:a,screenXSMin:a,screenXSMax:i-1,screenSM:i,screenSMMin:i,screenSMMax:l-1,screenMD:l,screenMDMin:l,screenMDMax:s-1,screenLG:s,screenLGMin:s,screenLGMax:u-1,screenXL:u,screenXLMin:u,screenXLMax:c-1,screenXXL:c,screenXXLMin:c,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
180
+ 0 1px 2px -2px ${new Ht("rgba(0, 0, 0, 0.16)").toRgbString()},
181
+ 0 3px 6px 0 ${new Ht("rgba(0, 0, 0, 0.12)").toRgbString()},
182
+ 0 5px 12px 4px ${new Ht("rgba(0, 0, 0, 0.09)").toRgbString()}
183
+ `,boxShadowDrawerRight:`
184
+ -6px 0 16px 0 rgba(0, 0, 0, 0.08),
185
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
186
+ -9px 0 28px 8px rgba(0, 0, 0, 0.05)
187
+ `,boxShadowDrawerLeft:`
188
+ 6px 0 16px 0 rgba(0, 0, 0, 0.08),
189
+ 3px 0 6px -4px rgba(0, 0, 0, 0.12),
190
+ 9px 0 28px 8px rgba(0, 0, 0, 0.05)
191
+ `,boxShadowDrawerUp:`
192
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
193
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
194
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
195
+ `,boxShadowDrawerDown:`
196
+ 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
197
+ 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
198
+ 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
199
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}var mv=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const G1={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},vF={motionBase:!0,motionUnit:!0},bF={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},Y1=(e,t,r)=>{const n=r.getDerivativeToken(e),{override:o}=t,a=mv(t,["override"]);let i=Object.assign(Object.assign({},n),{override:o});return i=X1(i),a&&Object.entries(a).forEach(([l,s])=>{const{theme:u}=s,c=mv(s,["theme"]);let f=c;u&&(f=Y1(Object.assign(Object.assign({},i),c),{override:c},u)),i[l]=f}),i};function Yr(){const{token:e,hashed:t,theme:r,override:n,cssVar:o}=Q.useContext(K1),a=`${hF}-${t||""}`,i=r||W1,[l,s,u]=GO(i,[ol,e],{salt:a,override:n,getComputedToken:Y1,formatToken:X1,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:G1,ignore:vF,preserve:bF}});return[i,u,t?s:"",l,o]}const sl={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Br=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Cl=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),zs=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),yF=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),CF=(e,t,r,n)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,a=r?`.${r}`:o,i={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let l={};return n!==!1&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[a]:Object.assign(Object.assign(Object.assign({},l),i),{[o]:i})}},No=(e,t)=>({outline:`${se(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),ul=(e,t)=>({"&:focus-visible":No(e)}),Z1=e=>({[`.${e}`]:Object.assign(Object.assign({},Cl()),{[`.${e} .${e}-icon`]:{display:"block"}})}),xF=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},ul(e)),{"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),{genStyleHooks:Hr,genComponentStyleHook:wF,genSubStyleComponent:J1}=mF({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=Rr(Zt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,r,n,o]=Yr();return{theme:e,realToken:t,hashId:r,token:n,cssVar:o}},useCSP:()=>{const{csp:e}=Rr(Zt);return e??{}},getResetStyles:(e,t)=>{var r;const n=yF(e);return[n,{"&":n},Z1((r=t==null?void 0:t.prefix.iconPrefixCls)!==null&&r!==void 0?r:zp)]},getCommonStyle:CF,getCompUnitless:()=>G1});function EF(e,t){return na.reduce((r,n)=>{const o=e[`${n}1`],a=e[`${n}3`],i=e[`${n}6`],l=e[`${n}7`];return Object.assign(Object.assign({},r),t(n,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:l}))},{})}const kF=(e,t)=>{const[r,n]=Yr();return Kd({token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>Z1(e))},DF=Object.assign({},d),{useId:hv}=DF,SF=()=>"",$F=typeof hv>"u"?SF:hv;function BF(e,t,r){var n;oi();const o=e||{},a=o.inherit===!1||!t?Object.assign(Object.assign({},nf),{hashed:(n=t==null?void 0:t.hashed)!==null&&n!==void 0?n:nf.hashed,cssVar:t==null?void 0:t.cssVar}):t,i=$F();return la(()=>{var l,s;if(!e)return t;const u=Object.assign({},a.components);Object.keys(e.components||{}).forEach(p=>{u[p]=Object.assign(Object.assign({},u[p]),e.components[p])});const c=`css-var-${i.replace(/:/g,"")}`,f=((l=o.cssVar)!==null&&l!==void 0?l:a.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:r==null?void 0:r.prefixCls},typeof a.cssVar=="object"?a.cssVar:{}),typeof o.cssVar=="object"?o.cssVar:{}),{key:typeof o.cssVar=="object"&&((s=o.cssVar)===null||s===void 0?void 0:s.key)||c});return Object.assign(Object.assign(Object.assign({},a),o),{token:Object.assign(Object.assign({},a.token),o.token),components:u,cssVar:f})},[o,a],(l,s)=>l.some((u,c)=>{const f=s[c];return!Jn(u,f,!0)}))}var OF=["children"],Q1=d.createContext({});function AF(e){var t=e.children,r=yt(e,OF);return d.createElement(Q1.Provider,{value:r},t)}var FF=(function(e){no(r,e);var t=oo(r);function r(){return vr(this,r),t.apply(this,arguments)}return br(r,[{key:"render",value:function(){return this.props.children}}]),r})(d.Component);function PF(e){var t=d.useReducer(function(l){return l+1},0),r=ce(t,2),n=r[1],o=d.useRef(e),a=nr(function(){return o.current}),i=nr(function(l){o.current=typeof l=="function"?l(o.current):l,n()});return[a,i]}var Eo="none",Vl="appear",Ul="enter",Xl="leave",gv="none",In="prepare",Ba="start",Oa="active",_p="end",eC="prepared";function vv(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}function NF(e,t){var r={animationend:vv("Animation","AnimationEnd"),transitionend:vv("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var jF=NF(Xr(),typeof window<"u"?window:{}),tC={};if(Xr()){var IF=document.createElement("div");tC=IF.style}var Gl={};function rC(e){if(Gl[e])return Gl[e];var t=jF[e];if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o+=1){var a=r[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in tC)return Gl[e]=t[a],Gl[e]}return""}var nC=rC("animationend"),oC=rC("transitionend"),aC=!!(nC&&oC),bv=nC||"animationend",yv=oC||"transitionend";function Cv(e,t){if(!e)return null;if(lt(e)==="object"){var r=t.replace(/-\w/g,function(n){return n[1].toUpperCase()});return e[r]}return"".concat(e,"-").concat(t)}const RF=(function(e){var t=Ve();function r(o){o&&(o.removeEventListener(yv,e),o.removeEventListener(bv,e))}function n(o){t.current&&t.current!==o&&r(t.current),o&&o!==t.current&&(o.addEventListener(yv,e),o.addEventListener(bv,e),t.current=o)}return d.useEffect(function(){return function(){r(t.current)}},[]),[n,r]});var iC=Xr()?Fb:Ot;const TF=(function(){var e=d.useRef(null);function t(){qt.cancel(e.current)}function r(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=qt(function(){o<=1?n({isCanceled:function(){return a!==e.current}}):r(n,o-1)});e.current=a}return d.useEffect(function(){return function(){t()}},[]),[r,t]});var MF=[In,Ba,Oa,_p],zF=[In,eC],lC=!1,_F=!0;function sC(e){return e===Oa||e===_p}const LF=(function(e,t,r){var n=ll(gv),o=ce(n,2),a=o[0],i=o[1],l=TF(),s=ce(l,2),u=s[0],c=s[1];function f(){i(In,!0)}var p=t?zF:MF;return iC(function(){if(a!==gv&&a!==_p){var h=p.indexOf(a),v=p[h+1],g=r(a);g===lC?i(v,!0):v&&u(function(m){function b(){m.isCanceled()||i(v,!0)}g===!0?b():Promise.resolve(g).then(b)})}},[e,a]),d.useEffect(function(){return function(){c()}},[]),[f,a]});function HF(e,t,r,n){var o=n.motionEnter,a=o===void 0?!0:o,i=n.motionAppear,l=i===void 0?!0:i,s=n.motionLeave,u=s===void 0?!0:s,c=n.motionDeadline,f=n.motionLeaveImmediately,p=n.onAppearPrepare,h=n.onEnterPrepare,v=n.onLeavePrepare,g=n.onAppearStart,m=n.onEnterStart,b=n.onLeaveStart,y=n.onAppearActive,C=n.onEnterActive,D=n.onLeaveActive,w=n.onAppearEnd,k=n.onEnterEnd,E=n.onLeaveEnd,x=n.onVisibleChanged,A=ll(),N=ce(A,2),$=N[0],j=N[1],F=PF(Eo),B=ce(F,2),S=B[0],O=B[1],I=ll(null),P=ce(I,2),T=P[0],_=P[1],X=S(),L=Ve(!1),q=Ve(null);function J(){return r()}var ee=Ve(!1);function z(){O(Eo),_(null,!0)}var Y=nr(function(ge){var ye=S();if(ye!==Eo){var Ce=J();if(!(ge&&!ge.deadline&&ge.target!==Ce)){var xe=ee.current,Ae;ye===Vl&&xe?Ae=w==null?void 0:w(Ce,ge):ye===Ul&&xe?Ae=k==null?void 0:k(Ce,ge):ye===Xl&&xe&&(Ae=E==null?void 0:E(Ce,ge)),xe&&Ae!==!1&&z()}}}),V=RF(Y),G=ce(V,1),K=G[0],W=function(ge){switch(ge){case Vl:return M(M(M({},In,p),Ba,g),Oa,y);case Ul:return M(M(M({},In,h),Ba,m),Oa,C);case Xl:return M(M(M({},In,v),Ba,b),Oa,D);default:return{}}},te=d.useMemo(function(){return W(X)},[X]),U=LF(X,!e,function(ge){if(ge===In){var ye=te[In];return ye?ye(J()):lC}if(ue in te){var Ce;_(((Ce=te[ue])===null||Ce===void 0?void 0:Ce.call(te,J(),null))||null)}return ue===Oa&&X!==Eo&&(K(J()),c>0&&(clearTimeout(q.current),q.current=setTimeout(function(){Y({deadline:!0})},c))),ue===eC&&z(),_F}),Z=ce(U,2),re=Z[0],ue=Z[1],he=sC(ue);ee.current=he;var we=Ve(null);iC(function(){if(!(L.current&&we.current===t)){j(t);var ge=L.current;L.current=!0;var ye;!ge&&t&&l&&(ye=Vl),ge&&t&&a&&(ye=Ul),(ge&&!t&&u||!ge&&f&&!t&&u)&&(ye=Xl);var Ce=W(ye);ye&&(e||Ce[In])?(O(ye),re()):O(Eo),we.current=t}},[t]),Ot(function(){(X===Vl&&!l||X===Ul&&!a||X===Xl&&!u)&&O(Eo)},[l,a,u]),Ot(function(){return function(){L.current=!1,clearTimeout(q.current)}},[]);var Ne=d.useRef(!1);Ot(function(){$&&(Ne.current=!0),$!==void 0&&X===Eo&&((Ne.current||$)&&(x==null||x($)),Ne.current=!0)},[$,X]);var me=T;return te[In]&&ue===Ba&&(me=H({transition:"none"},me)),[X,ue,me,$??t]}function WF(e){var t=e;lt(e)==="object"&&(t=e.transitionSupport);function r(o,a){return!!(o.motionName&&t&&a!==!1)}var n=d.forwardRef(function(o,a){var i=o.visible,l=i===void 0?!0:i,s=o.removeOnLeave,u=s===void 0?!0:s,c=o.forceRender,f=o.children,p=o.motionName,h=o.leavedClassName,v=o.eventProps,g=d.useContext(Q1),m=g.motion,b=r(o,m),y=Ve(),C=Ve();function D(){try{return y.current instanceof HTMLElement?y.current:us(C.current)}catch{return null}}var w=HF(b,l,D,o),k=ce(w,4),E=k[0],x=k[1],A=k[2],N=k[3],$=d.useRef(N);N&&($.current=!0);var j=d.useCallback(function(P){y.current=P,Ji(a,P)},[a]),F,B=H(H({},v),{},{visible:l});if(!f)F=null;else if(E===Eo)N?F=f(H({},B),j):!u&&$.current&&h?F=f(H(H({},B),{},{className:h}),j):c||!u&&!h?F=f(H(H({},B),{},{style:{display:"none"}}),j):F=null;else{var S;x===In?S="prepare":sC(x)?S="active":x===Ba&&(S="start");var O=Cv(p,"".concat(E,"-").concat(S));F=f(H(H({},B),{},{className:de(Cv(p,E),M(M({},O,O&&S),p,typeof p=="string")),style:A}),j)}if(d.isValidElement(F)&&Zn(F)){var I=ua(F);I||(F=d.cloneElement(F,{ref:j}))}return d.createElement(FF,{ref:C},F)});return n.displayName="CSSMotion",n}const ca=WF(aC);var af="add",lf="keep",sf="remove",Nc="removed";function KF(e){var t;return e&&lt(e)==="object"&&"key"in e?t=e:t={key:e},H(H({},t),{},{key:String(t.key)})}function uf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(KF)}function qF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[],n=0,o=t.length,a=uf(e),i=uf(t);a.forEach(function(u){for(var c=!1,f=n;f<o;f+=1){var p=i[f];if(p.key===u.key){n<f&&(r=r.concat(i.slice(n,f).map(function(h){return H(H({},h),{},{status:af})})),n=f),r.push(H(H({},p),{},{status:lf})),n+=1,c=!0;break}}c||r.push(H(H({},u),{},{status:sf}))}),n<o&&(r=r.concat(i.slice(n).map(function(u){return H(H({},u),{},{status:af})})));var l={};r.forEach(function(u){var c=u.key;l[c]=(l[c]||0)+1});var s=Object.keys(l).filter(function(u){return l[u]>1});return s.forEach(function(u){r=r.filter(function(c){var f=c.key,p=c.status;return f!==u||p!==sf}),r.forEach(function(c){c.key===u&&(c.status=lf)})}),r}var VF=["component","children","onVisibleChanged","onAllRemoved"],UF=["status"],XF=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function GF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ca,r=(function(n){no(a,n);var o=oo(a);function a(){var i;vr(this,a);for(var l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];return i=o.call.apply(o,[this].concat(s)),M(et(i),"state",{keyEntities:[]}),M(et(i),"removeKey",function(c){i.setState(function(f){var p=f.keyEntities.map(function(h){return h.key!==c?h:H(H({},h),{},{status:Nc})});return{keyEntities:p}},function(){var f=i.state.keyEntities,p=f.filter(function(h){var v=h.status;return v!==Nc}).length;p===0&&i.props.onAllRemoved&&i.props.onAllRemoved()})}),i}return br(a,[{key:"render",value:function(){var i=this,l=this.state.keyEntities,s=this.props,u=s.component,c=s.children,f=s.onVisibleChanged;s.onAllRemoved;var p=yt(s,VF),h=u||d.Fragment,v={};return XF.forEach(function(g){v[g]=p[g],delete p[g]}),delete p.keys,d.createElement(h,p,l.map(function(g,m){var b=g.status,y=yt(g,UF),C=b===af||b===lf;return d.createElement(t,Te({},v,{key:y.key,visible:C,eventProps:y,onVisibleChanged:function(D){f==null||f(D,{key:y.key}),D||i.removeKey(y.key)}}),function(D,w){return c(H(H({},D),{},{index:m}),w)})}))}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.keys,u=l.keyEntities,c=uf(s),f=qF(u,c);return{keyEntities:f.filter(function(p){var h=u.find(function(v){var g=v.key;return p.key===g});return!(h&&h.status===Nc&&p.status===sf)})}}}]),a})(d.Component);return M(r,"defaultProps",{component:"div"}),r}GF(aC);const xv=d.createContext(!0);function YF(e){const t=d.useContext(xv),{children:r}=e,[,n]=Yr(),{motion:o}=n,a=d.useRef(!1);return a.current||(a.current=t!==o),a.current?d.createElement(xv.Provider,{value:o},d.createElement(AF,{motion:o},r)):r}const ZF=()=>null;var JF=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const QF=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let uC;function e3(){return uC||il}function t3(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const r3=e=>{const{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:o}=e;t!==void 0&&(uC=t),n&&t3(n)&&QA(e3(),n)},n3=e=>{const{children:t,csp:r,autoInsertSpaceInButton:n,alert:o,anchor:a,form:i,locale:l,componentSize:s,direction:u,space:c,splitter:f,virtual:p,dropdownMatchSelectWidth:h,popupMatchSelectWidth:v,popupOverflow:g,legacyLocale:m,parentContext:b,iconPrefixCls:y,theme:C,componentDisabled:D,segmented:w,statistic:k,spin:E,calendar:x,carousel:A,cascader:N,collapse:$,typography:j,checkbox:F,descriptions:B,divider:S,drawer:O,skeleton:I,steps:P,image:T,layout:_,list:X,mentions:L,modal:q,progress:J,result:ee,slider:z,breadcrumb:Y,menu:V,pagination:G,input:K,textArea:W,empty:te,badge:U,radio:Z,rate:re,switch:ue,transfer:he,avatar:we,message:Ne,tag:me,table:ge,card:ye,tabs:Ce,timeline:xe,timePicker:Ae,upload:ke,notification:We,tree:_e,colorPicker:Pe,datePicker:ve,rangePicker:Se,flex:qe,wave:Ge,dropdown:Xe,warning:Ie,tour:at,tooltip:He,popover:nt,popconfirm:ht,floatButton:At,floatButtonGroup:Et,variant:gt,inputNumber:fe,treeSelect:Oe}=e,Me=d.useCallback((dt,Ye)=>{const{prefixCls:Ze}=e;if(Ye)return Ye;const ot=Ze||b.getPrefixCls("");return dt?`${ot}-${dt}`:ot},[b.getPrefixCls,e.prefixCls]),Fe=y||b.iconPrefixCls||zp,pe=r||b.csp;kF(Fe,pe);const Ee=BF(C,b.theme,{prefixCls:Me("")}),ie={csp:pe,autoInsertSpaceInButton:n,alert:o,anchor:a,locale:l||m,direction:u,space:c,splitter:f,virtual:p,popupMatchSelectWidth:v??h,popupOverflow:g,getPrefixCls:Me,iconPrefixCls:Fe,theme:Ee,segmented:w,statistic:k,spin:E,calendar:x,carousel:A,cascader:N,collapse:$,typography:j,checkbox:F,descriptions:B,divider:S,drawer:O,skeleton:I,steps:P,image:T,input:K,textArea:W,layout:_,list:X,mentions:L,modal:q,progress:J,result:ee,slider:z,breadcrumb:Y,menu:V,pagination:G,empty:te,badge:U,radio:Z,rate:re,switch:ue,transfer:he,avatar:we,message:Ne,tag:me,table:ge,card:ye,tabs:Ce,timeline:xe,timePicker:Ae,upload:ke,notification:We,tree:_e,colorPicker:Pe,datePicker:ve,rangePicker:Se,flex:qe,wave:Ge,dropdown:Xe,warning:Ie,tour:at,tooltip:He,popover:nt,popconfirm:ht,floatButton:At,floatButtonGroup:Et,variant:gt,inputNumber:fe,treeSelect:Oe},oe=Object.assign({},b);Object.keys(ie).forEach(dt=>{ie[dt]!==void 0&&(oe[dt]=ie[dt])}),QF.forEach(dt=>{const Ye=e[dt];Ye&&(oe[dt]=Ye)}),typeof n<"u"&&(oe.button=Object.assign({autoInsertSpace:n},oe.button));const be=la(()=>oe,oe,(dt,Ye)=>{const Ze=Object.keys(dt),ot=Object.keys(Ye);return Ze.length!==ot.length||Ze.some(ft=>dt[ft]!==Ye[ft])}),{layer:le}=d.useContext(yl),ze=d.useMemo(()=>({prefixCls:Fe,csp:pe,layer:le?"antd":void 0}),[Fe,pe,le]);let Be=d.createElement(d.Fragment,null,d.createElement(ZF,{dropdownMatchSelectWidth:h}),t);const Ke=d.useMemo(()=>{var dt,Ye,Ze,ot;return $a(((dt=ra.Form)===null||dt===void 0?void 0:dt.defaultValidateMessages)||{},((Ze=(Ye=be.locale)===null||Ye===void 0?void 0:Ye.Form)===null||Ze===void 0?void 0:Ze.defaultValidateMessages)||{},((ot=be.form)===null||ot===void 0?void 0:ot.validateMessages)||{},(i==null?void 0:i.validateMessages)||{})},[be,i==null?void 0:i.validateMessages]);Object.keys(Ke).length>0&&(Be=d.createElement(OA.Provider,{value:Ke},Be)),l&&(Be=d.createElement(jA,{locale:l,_ANT_MARK__:NA},Be)),Be=d.createElement(Tp.Provider,{value:ze},Be),s&&(Be=d.createElement(tF,{size:s},Be)),Be=d.createElement(YF,null,Be);const st=d.useMemo(()=>{const dt=Ee||{},{algorithm:Ye,token:Ze,components:ot,cssVar:ft}=dt,Nt=JF(dt,["algorithm","token","components","cssVar"]),jt=Ye&&(!Array.isArray(Ye)||Ye.length>0)?_d(Ye):W1,It={};Object.entries(ot||{}).forEach(([Jt,pr])=>{const Le=Object.assign({},pr);"algorithm"in Le&&(Le.algorithm===!0?Le.theme=jt:(Array.isArray(Le.algorithm)||typeof Le.algorithm=="function")&&(Le.theme=_d(Le.algorithm)),delete Le.algorithm),It[Jt]=Le});const kt=Object.assign(Object.assign({},ol),Ze);return Object.assign(Object.assign({},Nt),{theme:jt,token:kt,components:It,override:Object.assign({override:kt},It),cssVar:ft})},[Ee]);return C&&(Be=d.createElement(K1.Provider,{value:st},Be)),be.warning&&(Be=d.createElement(BA.Provider,{value:be.warning},Be)),D!==void 0&&(Be=d.createElement(eF,{disabled:D},Be)),d.createElement(Zt.Provider,{value:be},Be)},ai=e=>{const t=d.useContext(Zt),r=d.useContext(Mp);return d.createElement(n3,Object.assign({parentContext:t,legacyLocale:r},e))};ai.ConfigContext=Zt;ai.SizeContext=Xa;ai.config=r3;ai.useConfig=rF;Object.defineProperty(ai,"SizeContext",{get:()=>Xa});function cC(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function o3(e){return cC(e)instanceof ShadowRoot}function _s(e){return o3(e)?cC(e):null}function a3(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function i3(e,t){lr(e,"[@ant-design/icons] ".concat(t))}function wv(e){return lt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(lt(e.icon)==="object"||typeof e.icon=="function")}function Ev(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[a3(r)]=n}return t},{})}function cf(e,t,r){return r?Q.createElement(e.tag,H(H({key:t},Ev(e.attrs)),r),(e.children||[]).map(function(n,o){return cf(n,"".concat(t,"-").concat(e.tag,"-").concat(o))})):Q.createElement(e.tag,H({key:t},Ev(e.attrs)),(e.children||[]).map(function(n,o){return cf(n,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function dC(e){return al(e)[0]}function fC(e){return e?Array.isArray(e)?e:[e]:[]}var l3=`
200
+ .anticon {
201
+ display: inline-flex;
202
+ align-items: center;
203
+ color: inherit;
204
+ font-style: normal;
205
+ line-height: 0;
206
+ text-align: center;
207
+ text-transform: none;
208
+ vertical-align: -0.125em;
209
+ text-rendering: optimizeLegibility;
210
+ -webkit-font-smoothing: antialiased;
211
+ -moz-osx-font-smoothing: grayscale;
212
+ }
213
+
214
+ .anticon > * {
215
+ line-height: 1;
216
+ }
217
+
218
+ .anticon svg {
219
+ display: inline-block;
220
+ }
221
+
222
+ .anticon::before {
223
+ display: none;
224
+ }
225
+
226
+ .anticon .anticon-icon {
227
+ display: block;
228
+ }
229
+
230
+ .anticon[tabindex] {
231
+ cursor: pointer;
232
+ }
233
+
234
+ .anticon-spin::before,
235
+ .anticon-spin {
236
+ display: inline-block;
237
+ -webkit-animation: loadingCircle 1s infinite linear;
238
+ animation: loadingCircle 1s infinite linear;
239
+ }
240
+
241
+ @-webkit-keyframes loadingCircle {
242
+ 100% {
243
+ -webkit-transform: rotate(360deg);
244
+ transform: rotate(360deg);
245
+ }
246
+ }
247
+
248
+ @keyframes loadingCircle {
249
+ 100% {
250
+ -webkit-transform: rotate(360deg);
251
+ transform: rotate(360deg);
252
+ }
253
+ }
254
+ `,s3=function(e){var t=Rr(Tp),r=t.csp,n=t.prefixCls,o=t.layer,a=l3;n&&(a=a.replace(/anticon/g,n)),o&&(a="@layer ".concat(o,` {
255
+ `).concat(a,`
256
+ }`)),Ot(function(){var i=e.current,l=_s(i);go(a,"@ant-design-icons",{prepend:!o,csp:r,attachTo:l})},[])},u3=["icon","className","onClick","style","primaryColor","secondaryColor"],Ti={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function c3(e){var t=e.primaryColor,r=e.secondaryColor;Ti.primaryColor=t,Ti.secondaryColor=r||dC(t),Ti.calculated=!!r}function d3(){return H({},Ti)}var ii=function(e){var t=e.icon,r=e.className,n=e.onClick,o=e.style,a=e.primaryColor,i=e.secondaryColor,l=yt(e,u3),s=d.useRef(),u=Ti;if(a&&(u={primaryColor:a,secondaryColor:i||dC(a)}),s3(s),i3(wv(t),"icon should be icon definiton, but got ".concat(t)),!wv(t))return null;var c=t;return c&&typeof c.icon=="function"&&(c=H(H({},c),{},{icon:c.icon(u.primaryColor,u.secondaryColor)})),cf(c.icon,"svg-".concat(c.name),H(H({className:r,onClick:n,style:o,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:s}))};ii.displayName="IconReact";ii.getTwoToneColors=d3;ii.setTwoToneColors=c3;function pC(e){var t=fC(e),r=ce(t,2),n=r[0],o=r[1];return ii.setTwoToneColors({primaryColor:n,secondaryColor:o})}function f3(){var e=ii.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var p3=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];pC(Ms.primary);var sr=d.forwardRef(function(e,t){var r=e.className,n=e.icon,o=e.spin,a=e.rotate,i=e.tabIndex,l=e.onClick,s=e.twoToneColor,u=yt(e,p3),c=d.useContext(Tp),f=c.prefixCls,p=f===void 0?"anticon":f,h=c.rootClassName,v=de(h,p,M(M({},"".concat(p,"-").concat(n.name),!!n.name),"".concat(p,"-spin"),!!o||n.name==="loading"),r),g=i;g===void 0&&l&&(g=-1);var m=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,b=fC(s),y=ce(b,2),C=y[0],D=y[1];return d.createElement("span",Te({role:"img","aria-label":n.name},u,{ref:t,tabIndex:g,onClick:l,className:v}),d.createElement(ii,{icon:n,primaryColor:C,secondaryColor:D,style:m}))});sr.displayName="AntdIcon";sr.getTwoToneColor=f3;sr.setTwoToneColor=pC;var m3={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"},h3=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:m3}))},mC=d.forwardRef(h3),g3={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"},v3=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:g3}))},b3=d.forwardRef(v3),y3=`accept acceptCharset accessKey action allowFullScreen allowTransparency
257
+ alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
258
+ charSet checked classID className colSpan cols content contentEditable contextMenu
259
+ controls coords crossOrigin data dateTime default defer dir disabled download draggable
260
+ encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
261
+ headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
262
+ is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
263
+ mediaGroup method min minLength multiple muted name noValidate nonce open
264
+ optimum pattern placeholder poster preload radioGroup readOnly rel required
265
+ reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
266
+ shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
267
+ summary tabIndex target title type useMap value width wmode wrap`,C3=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
268
+ onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
269
+ onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
270
+ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
271
+ onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
272
+ onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
273
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,x3="".concat(y3," ").concat(C3).split(/[\s\n]+/),w3="aria-",E3="data-";function kv(e,t){return e.indexOf(t)===0}function Qn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r=H({},t);var n={};return Object.keys(e).forEach(function(o){(r.aria&&(o==="role"||kv(o,w3))||r.data&&kv(o,E3)||r.attr&&x3.includes(o))&&(n[o]=e[o])}),n}function hC(e){return e&&Q.isValidElement(e)&&e.type===Q.Fragment}const k3=(e,t,r)=>Q.isValidElement(e)?Q.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function eo(e,t){return k3(e,e,t)}function df(e){return e!=null&&e===e.window}const D3=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return df(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!df(e)&&typeof n!="number"&&(n=(r=((t=e.ownerDocument)!==null&&t!==void 0?t:e).documentElement)===null||r===void 0?void 0:r.scrollTop),n};function S3(e,t,r,n){const o=r-t;return e/=n/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function $3(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,a=r(),i=D3(a),l=Date.now(),s=()=>{const u=Date.now()-l,c=S3(u>o?o:u,i,e,o);df(a)?a.scrollTo(window.pageXOffset,c):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=c:a.scrollTop=c,u<o?qt(s):typeof n=="function"&&n()};qt(s)}const bo=e=>{const[,,,,t]=Yr();return t?`${e}-css-var`:""};var rt={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,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},B3={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"},O3=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:B3}))},Lp=d.forwardRef(O3);const Hp=Q.createContext(void 0),To=100,gC={Modal:To,Drawer:To,Popover:To,Popconfirm:To,Tooltip:To,Tour:To,FloatButton:To},A3={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function F3(e){return e in gC}const yu=(e,t)=>{const[,r]=Yr(),n=Q.useContext(Hp),o=F3(e);let a;if(t!==void 0)a=[t,t];else{let i=n??0;o?i+=(n?0:r.zIndexPopupBase)+gC[e]:i+=A3[e],a=[n===void 0?t:i,i]}return a};function vC(e,t){this.v=e,this.k=t}function Kr(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch{o=0}Kr=function(a,i,l,s){function u(c,f){Kr(a,c,function(p){return this._invoke(c,f,p)})}i?o?o(a,i,{value:l,enumerable:!s,configurable:!s,writable:!s}):a[i]=l:(u("next",0),u("throw",1),u("return",2))},Kr(e,t,r,n)}function Wp(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(h,v,g,m){var b=v&&v.prototype instanceof l?v:l,y=Object.create(b.prototype);return Kr(y,"_invoke",(function(C,D,w){var k,E,x,A=0,N=w||[],$=!1,j={p:0,n:0,v:e,a:F,f:F.bind(e,4),d:function(B,S){return k=B,E=0,x=e,j.n=S,i}};function F(B,S){for(E=B,x=S,t=0;!$&&A&&!O&&t<N.length;t++){var O,I=N[t],P=j.p,T=I[2];B>3?(O=T===S)&&(x=I[(E=I[4])?5:(E=3,3)],I[4]=I[5]=e):I[0]<=P&&((O=B<2&&P<I[1])?(E=0,j.v=S,j.n=I[1]):P<T&&(O=B<3||I[0]>S||S>T)&&(I[4]=B,I[5]=S,j.n=T,E=0))}if(O||B>1)return i;throw $=!0,S}return function(B,S,O){if(A>1)throw TypeError("Generator is already running");for($&&S===1&&F(S,O),E=S,x=O;(t=E<2?e:x)||!$;){k||(E?E<3?(E>1&&(j.n=-1),F(E,x)):j.n=x:j.v=x);try{if(A=2,k){if(E||(B="next"),t=k[B]){if(!(t=t.call(k,x)))throw TypeError("iterator result is not an object");if(!t.done)return t;x=t.value,E<2&&(E=0)}else E===1&&(t=k.return)&&t.call(k),E<2&&(x=TypeError("The iterator does not provide a '"+B+"' method"),E=1);k=e}else if((t=($=j.n<0)?x:C.call(D,j))!==i)break}catch(I){k=e,E=1,x=I}finally{A=1}}return{value:t,done:$}}})(h,g,m),!0),y}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(Kr(t={},n,function(){return this}),t),f=u.prototype=l.prototype=Object.create(c);function p(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Kr(h,o,"GeneratorFunction")),h.prototype=Object.create(f),h}return s.prototype=u,Kr(f,"constructor",u),Kr(u,"constructor",s),s.displayName="GeneratorFunction",Kr(u,o,"GeneratorFunction"),Kr(f),Kr(f,o,"Generator"),Kr(f,n,function(){return this}),Kr(f,"toString",function(){return"[object Generator]"}),(Wp=function(){return{w:a,m:p}})()}function Ls(e,t){function r(o,a,i,l){try{var s=e[o](a),u=s.value;return u instanceof vC?t.resolve(u.v).then(function(c){r("next",c,i,l)},function(c){r("throw",c,i,l)}):t.resolve(u).then(function(c){s.value=c,i(s)},function(c){return r("throw",c,i,l)})}catch(c){l(c)}}var n;this.next||(Kr(Ls.prototype),Kr(Ls.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Kr(this,"_invoke",function(o,a,i){function l(){return new t(function(s,u){r(o,i,s,u)})}return n=n?n.then(l,l):l()},!0)}function bC(e,t,r,n,o){return new Ls(Wp().w(e,t,r,n),o||Promise)}function P3(e,t,r,n,o){var a=bC(e,t,r,n,o);return a.next().then(function(i){return i.done?i.value:a.next()})}function N3(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function o(){for(;r.length;)if((n=r.pop())in t)return o.value=n,o.done=!1,o;return o.done=!0,o}}function Dv(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(lt(e)+" is not iterable")}function Gr(){var e=Wp(),t=e.m(Gr),r=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function n(i){var l=typeof i=="function"&&i.constructor;return!!l&&(l===r||(l.displayName||l.name)==="GeneratorFunction")}var o={throw:1,return:2,break:3,continue:3};function a(i){var l,s;return function(u){l||(l={stop:function(){return s(u.a,2)},catch:function(){return u.v},abrupt:function(c,f){return s(u.a,o[c],f)},delegateYield:function(c,f,p){return l.resultName=f,s(u.d,Dv(c),p)},finish:function(c){return s(u.f,c)}},s=function(c,f,p){u.p=l.prev,u.n=l.next;try{return c(f,p)}finally{l.next=u.n}}),l.resultName&&(l[l.resultName]=u.v,l.resultName=void 0),l.sent=u.v,l.next=u.n;try{return i.call(this,l)}finally{u.p=l.prev,u.n=l.next}}}return(Gr=function(){return{wrap:function(i,l,s,u){return e.w(a(i),l,s,u&&u.reverse())},isGeneratorFunction:n,mark:e.m,awrap:function(i,l){return new vC(i,l)},AsyncIterator:Ls,async:function(i,l,s,u,c){return(n(l)?bC:P3)(a(i),l,s,u,c)},keys:N3,values:Dv}})()}function Sv(e,t,r,n,o,a,i){try{var l=e[a](i),s=l.value}catch(u){return void r(u)}l.done?t(s):Promise.resolve(s).then(n,o)}function da(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(s){Sv(a,n,o,i,l,"next",s)}function l(s){Sv(a,n,o,i,l,"throw",s)}i(void 0)})}}var xl=H({},Uw),j3=xl.version,jc=xl.render,I3=xl.unmountComponentAtNode,Cu;try{var R3=Number((j3||"").split(".")[0]);R3>=18&&(Cu=xl.createRoot)}catch{}function $v(e){var t=xl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&lt(t)==="object"&&(t.usingClientEntryPoint=e)}var Hs="__rc_react_root__";function T3(e,t){$v(!0);var r=t[Hs]||Cu(t);$v(!1),r.render(e),t[Hs]=r}function M3(e,t){jc==null||jc(e,t)}function z3(e,t){if(Cu){T3(e,t);return}M3(e,t)}function _3(e){return ff.apply(this,arguments)}function ff(){return ff=da(Gr().mark(function e(t){return Gr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var n;(n=t[Hs])===null||n===void 0||n.unmount(),delete t[Hs]}));case 1:case"end":return r.stop()}},e)})),ff.apply(this,arguments)}function L3(e){I3(e)}function H3(e){return pf.apply(this,arguments)}function pf(){return pf=da(Gr().mark(function e(t){return Gr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Cu===void 0){r.next=2;break}return r.abrupt("return",_3(t));case 2:L3(t);case 3:case"end":return r.stop()}},e)})),pf.apply(this,arguments)}const W3=(e,t)=>(z3(e,t),()=>H3(t));let K3=W3;function q3(e){return K3}const Ic=()=>({height:0,opacity:0}),Bv=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},V3=e=>({height:e?e.offsetHeight:0}),Rc=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",yC=(e=il)=>({motionName:`${e}-motion-collapse`,onAppearStart:Ic,onEnterStart:Ic,onAppearActive:Bv,onEnterActive:Bv,onLeaveStart:V3,onLeaveActive:Ic,onAppearEnd:Rc,onEnterEnd:Rc,onLeaveEnd:Rc,motionDeadline:500}),CC=(e,t,r)=>r!==void 0?r:`${e}-${t}`;function fn(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}const xu=(function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),a=o.width,i=o.height;if(a||i)return!0}}return!1}),U3=e=>{const{componentCls:t,colorPrimary:r}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${r})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},X3=wF("Wave",U3),wu=`${il}-wave-target`;function G3(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"&&e!=="canvastext"}function Y3(e){var t;const{borderTopColor:r,borderColor:n,backgroundColor:o}=getComputedStyle(e);return(t=[r,n,o].find(G3))!==null&&t!==void 0?t:null}function Tc(e){return Number.isNaN(e)?0:e}const Z3=e=>{const{className:t,target:r,component:n,registerUnmount:o}=e,a=d.useRef(null),i=d.useRef(null);d.useEffect(()=>{i.current=o()},[]);const[l,s]=d.useState(null),[u,c]=d.useState([]),[f,p]=d.useState(0),[h,v]=d.useState(0),[g,m]=d.useState(0),[b,y]=d.useState(0),[C,D]=d.useState(!1),w={left:f,top:h,width:g,height:b,borderRadius:u.map(x=>`${x}px`).join(" ")};l&&(w["--wave-color"]=l);function k(){const x=getComputedStyle(r);s(Y3(r));const A=x.position==="static",{borderLeftWidth:N,borderTopWidth:$}=x;p(A?r.offsetLeft:Tc(-parseFloat(N))),v(A?r.offsetTop:Tc(-parseFloat($))),m(r.offsetWidth),y(r.offsetHeight);const{borderTopLeftRadius:j,borderTopRightRadius:F,borderBottomLeftRadius:B,borderBottomRightRadius:S}=x;c([j,F,S,B].map(O=>Tc(parseFloat(O))))}if(d.useEffect(()=>{if(r){const x=qt(()=>{k(),D(!0)});let A;return typeof ResizeObserver<"u"&&(A=new ResizeObserver(k),A.observe(r)),()=>{qt.cancel(x),A==null||A.disconnect()}}},[]),!C)return null;const E=(n==="Checkbox"||n==="Radio")&&(r==null?void 0:r.classList.contains(wu));return d.createElement(ca,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(x,A)=>{var N,$;if(A.deadline||A.propertyName==="opacity"){const j=(N=a.current)===null||N===void 0?void 0:N.parentElement;($=i.current)===null||$===void 0||$.call(i).then(()=>{j==null||j.remove()})}return!1}},({className:x},A)=>d.createElement("div",{ref:ro(a,A),className:de(t,x,{"wave-quick":E}),style:w}))},J3=(e,t)=>{var r;const{component:n}=t;if(n==="Checkbox"&&!(!((r=e.querySelector("input"))===null||r===void 0)&&r.checked))return;const o=document.createElement("div");o.style.position="absolute",o.style.left="0px",o.style.top="0px",e==null||e.insertBefore(o,e==null?void 0:e.firstChild);const a=q3();let i=null;function l(){return i}i=a(d.createElement(Z3,Object.assign({},t,{target:e,registerUnmount:l})),o)},Q3=(e,t,r)=>{const{wave:n}=d.useContext(Zt),[,o,a]=Yr(),i=nr(s=>{const u=e.current;if(n!=null&&n.disabled||!u)return;const c=u.querySelector(`.${wu}`)||u,{showEffect:f}=n||{};(f||J3)(c,{className:t,token:o,component:r,event:s,hashId:a})}),l=d.useRef(null);return s=>{qt.cancel(l.current),l.current=qt(()=>{i(s)})}},Kp=e=>{const{children:t,disabled:r,component:n}=e,{getPrefixCls:o}=Rr(Zt),a=Ve(null),i=o("wave"),[,l]=X3(i),s=Q3(a,de(i,l),n);if(Q.useEffect(()=>{const c=a.current;if(!c||c.nodeType!==1||r)return;const f=p=>{!xu(p.target)||!c.getAttribute||c.getAttribute("disabled")||c.disabled||c.className.includes("disabled")||c.className.includes("-leave")||s(p)};return c.addEventListener("click",f,!0),()=>{c.removeEventListener("click",f,!0)}},[r]),!Q.isValidElement(t))return t??null;const u=Zn(t)?ro(ua(t),a):a;return eo(t,{ref:u})},fa=e=>{const t=Q.useContext(Xa);return Q.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},e5=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},t5=e=>{const{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},r5=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},xC=Hr("Space",e=>{const t=er(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[t5(t),r5(t),e5(t)]},()=>({}),{resetStyle:!1});var wC=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Eu=d.createContext(null),ku=(e,t)=>{const r=d.useContext(Eu),n=d.useMemo(()=>{if(!r)return"";const{compactDirection:o,isFirstItem:a,isLastItem:i}=r,l=o==="vertical"?"-vertical-":"-";return de(`${e}-compact${l}item`,{[`${e}-compact${l}first-item`]:a,[`${e}-compact${l}last-item`]:i,[`${e}-compact${l}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:n}},n5=e=>{const{children:t}=e;return d.createElement(Eu.Provider,{value:null},t)},o5=e=>{const{children:t}=e,r=wC(e,["children"]);return d.createElement(Eu.Provider,{value:d.useMemo(()=>r,[r])},t)},a5=e=>{const{getPrefixCls:t,direction:r}=d.useContext(Zt),{size:n,direction:o,block:a,prefixCls:i,className:l,rootClassName:s,children:u}=e,c=wC(e,["size","direction","block","prefixCls","className","rootClassName","children"]),f=fa(C=>n??C),p=t("space-compact",i),[h,v]=xC(p),g=de(p,v,{[`${p}-rtl`]:r==="rtl",[`${p}-block`]:a,[`${p}-vertical`]:o==="vertical"},l,s),m=d.useContext(Eu),b=Ln(u),y=d.useMemo(()=>b.map((C,D)=>{const w=(C==null?void 0:C.key)||`${p}-item-${D}`;return d.createElement(o5,{key:w,compactSize:f,compactDirection:o,isFirstItem:D===0&&(!m||(m==null?void 0:m.isFirstItem)),isLastItem:D===b.length-1&&(!m||(m==null?void 0:m.isLastItem))},C)}),[n,b,m]);return b.length===0?null:h(d.createElement("div",Object.assign({className:g},c),y))};var i5=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const EC=d.createContext(void 0),l5=e=>{const{getPrefixCls:t,direction:r}=d.useContext(Zt),{prefixCls:n,size:o,className:a}=e,i=i5(e,["prefixCls","size","className"]),l=t("btn-group",n),[,,s]=Yr(),u=d.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]),c=de(l,{[`${l}-${u}`]:u,[`${l}-rtl`]:r==="rtl"},a,s);return d.createElement(EC.Provider,{value:o},d.createElement("div",Object.assign({},i,{className:c})))},Ov=/^[\u4E00-\u9FA5]{2}$/,mf=Ov.test.bind(Ov);function Av(e){return typeof e=="string"}function Mc(e){return e==="text"||e==="link"}function s5(e,t){if(e==null)return;const r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&Av(e.type)&&mf(e.props.children)?eo(e,{children:e.props.children.split("").join(r)}):Av(e)?mf(e)?Q.createElement("span",null,e.split("").join(r)):Q.createElement("span",null,e):hC(e)?Q.createElement("span",null,e):e}function u5(e,t){let r=!1;const n=[];return Q.Children.forEach(e,o=>{const a=typeof o,i=a==="string"||a==="number";if(r&&i){const l=n.length-1,s=n[l];n[l]=`${s}${o}`}else n.push(o);r=i}),Q.Children.map(n,o=>s5(o,t))}["default","primary","danger"].concat(je(na));const hf=dn((e,t)=>{const{className:r,style:n,children:o,prefixCls:a}=e,i=de(`${a}-icon`,r);return Q.createElement("span",{ref:t,className:i,style:n},o)}),Fv=dn((e,t)=>{const{prefixCls:r,className:n,style:o,iconClassName:a}=e,i=de(`${r}-loading-icon`,n);return Q.createElement(hf,{prefixCls:r,className:i,style:o,ref:t},Q.createElement(Lp,{className:a}))}),zc=()=>({width:0,opacity:0,transform:"scale(0)"}),_c=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),c5=e=>{const{prefixCls:t,loading:r,existIcon:n,className:o,style:a,mount:i}=e,l=!!r;return n?Q.createElement(Fv,{prefixCls:t,className:o,style:a}):Q.createElement(ca,{visible:l,motionName:`${t}-loading-icon-motion`,motionAppear:!i,motionEnter:!i,motionLeave:!i,removeOnLeave:!0,onAppearStart:zc,onAppearActive:_c,onEnterStart:zc,onEnterActive:_c,onLeaveStart:_c,onLeaveActive:zc},({className:s,style:u},c)=>{const f=Object.assign(Object.assign({},a),u);return Q.createElement(Fv,{prefixCls:t,className:de(o,s),style:f,ref:c})})},Pv=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),d5=e=>{const{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:o,colorErrorHover:a}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},Pv(`${t}-primary`,o),Pv(`${t}-danger`,a)]}};var f5=["b"],p5=["v"],Lc=function(e){return Math.round(Number(e||0))},m5=function(e){if(e instanceof Ht)return e;if(e&&lt(e)==="object"&&"h"in e&&"b"in e){var t=e,r=t.b,n=yt(t,f5);return H(H({},n),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},cl=(function(e){no(r,e);var t=oo(r);function r(n){return vr(this,r),t.call(this,m5(n))}return br(r,[{key:"toHsbString",value:function(){var n=this.toHsb(),o=Lc(n.s*100),a=Lc(n.b*100),i=Lc(n.h),l=n.a,s="hsb(".concat(i,", ").concat(o,"%, ").concat(a,"%)"),u="hsba(".concat(i,", ").concat(o,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?s:u}},{key:"toHsb",value:function(){var n=this.toHsv(),o=n.v,a=yt(n,p5);return H(H({},a),{},{b:o,a:this.a})}}]),r})(Ht),h5=function(e){return e instanceof cl?e:new cl(e)};h5("#1677ff");const g5=(e,t)=>(e==null?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"",v5=(e,t)=>e?g5(e,t):"";let gf=(function(){function e(t){vr(this,e);var r;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)===null||r===void 0?void 0:r.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:o,percent:a})=>({color:new e(o),percent:a})),this.metaColor=new cl(this.colors[0].color.metaColor)):this.metaColor=new cl(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return br(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return v5(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:t}=this;return t?`linear-gradient(90deg, ${t.map(r=>`${r.color.toRgbString()} ${r.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(t){return!t||this.isGradient()!==t.isGradient()?!1:this.isGradient()?this.colors.length===t.colors.length&&this.colors.every((r,n)=>{const o=t.colors[n];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===t.toHexString()}}])})();var b5={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"},y5=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:b5}))},vf=d.forwardRef(y5);const kC=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
274
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
275
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),C5=e=>({animationDuration:e,animationFillMode:"both"}),x5=e=>({animationDuration:e,animationFillMode:"both"}),qp=(e,t,r,n,o=!1)=>{const a=o?"&":"";return{[`
276
+ ${a}${e}-enter,
277
+ ${a}${e}-appear
278
+ `]:Object.assign(Object.assign({},C5(n)),{animationPlayState:"paused"}),[`${a}${e}-leave`]:Object.assign(Object.assign({},x5(n)),{animationPlayState:"paused"}),[`
279
+ ${a}${e}-enter${e}-enter-active,
280
+ ${a}${e}-appear${e}-appear-active
281
+ `]:{animationName:t,animationPlayState:"running"},[`${a}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},w5=new Vt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),E5=new Vt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),k5=new Vt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),D5=new Vt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),S5=new Vt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),$5=new Vt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),B5=new Vt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),O5=new Vt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),A5={"move-up":{inKeyframes:B5,outKeyframes:O5},"move-down":{inKeyframes:w5,outKeyframes:E5},"move-left":{inKeyframes:k5,outKeyframes:D5},"move-right":{inKeyframes:S5,outKeyframes:$5}},Ws=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:a}=A5[t];return[qp(n,o,a,e.motionDurationMid),{[`
282
+ ${n}-enter,
283
+ ${n}-appear
284
+ `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Vp=new Vt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Up=new Vt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Xp=new Vt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Gp=new Vt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),F5=new Vt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),P5=new Vt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),N5=new Vt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),j5=new Vt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),I5={"slide-up":{inKeyframes:Vp,outKeyframes:Up},"slide-down":{inKeyframes:Xp,outKeyframes:Gp},"slide-left":{inKeyframes:F5,outKeyframes:P5},"slide-right":{inKeyframes:N5,outKeyframes:j5}},Ga=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:a}=I5[t];return[qp(n,o,a,e.motionDurationMid),{[`
285
+ ${n}-enter,
286
+ ${n}-appear
287
+ `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},R5=new Vt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),T5=new Vt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Nv=new Vt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),jv=new Vt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),M5=new Vt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),z5=new Vt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),_5=new Vt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),L5=new Vt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),H5=new Vt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),W5=new Vt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),K5=new Vt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),q5=new Vt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),V5={zoom:{inKeyframes:R5,outKeyframes:T5},"zoom-big":{inKeyframes:Nv,outKeyframes:jv},"zoom-big-fast":{inKeyframes:Nv,outKeyframes:jv},"zoom-left":{inKeyframes:_5,outKeyframes:L5},"zoom-right":{inKeyframes:H5,outKeyframes:W5},"zoom-up":{inKeyframes:M5,outKeyframes:z5},"zoom-down":{inKeyframes:K5,outKeyframes:q5}},Yp=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:a}=V5[t];return[qp(n,o,a,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
288
+ ${n}-enter,
289
+ ${n}-appear
290
+ `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},U5=e=>e instanceof gf?e:new gf(e),X5=(e,t)=>{const{r,g:n,b:o,a}=e.toRgb(),i=new cl(e.toRgbString()).onBackground(t).toHsv();return a<=.5?i.v>.5:r*.299+n*.587+o*.114>192},DC=e=>{const{paddingInline:t,onlyIconSize:r}=e;return er(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r})},SC=e=>{var t,r,n,o,a,i;const l=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,s=(r=e.contentFontSizeSM)!==null&&r!==void 0?r:e.fontSize,u=(n=e.contentFontSizeLG)!==null&&n!==void 0?n:e.fontSizeLG,c=(o=e.contentLineHeight)!==null&&o!==void 0?o:gs(l),f=(a=e.contentLineHeightSM)!==null&&a!==void 0?a:gs(s),p=(i=e.contentLineHeightLG)!==null&&i!==void 0?i:gs(u),h=X5(new gf(e.colorBgSolid),"#fff")?"#000":"#fff",v=na.reduce((g,m)=>Object.assign(Object.assign({},g),{[`${m}ShadowColor`]:`0 ${se(e.controlOutlineWidth)} 0 ${$i(e[`${m}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},v),{fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:h,contentFontSize:l,contentFontSizeSM:s,contentFontSizeLG:u,contentLineHeight:c,contentLineHeightSM:f,contentLineHeightLG:p,paddingBlock:Math.max((e.controlHeight-l*c)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-s*f)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-u*p)/2-e.lineWidth,0)})},G5=e=>{const{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:o,motionDurationSlow:a,motionEaseInOut:i,iconGap:l,calc:s}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:l,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${se(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Cl(),"> a":{color:"currentColor"},"&:not(:disabled)":ul(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"},[`&${t}-round`]:{width:"auto"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(u=>`${u} ${a} ${i}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:s(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:s(l).mul(-1).equal()}}}}}},$C=(e,t,r)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":r}}),Y5=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Z5=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),J5=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),Du=(e,t,r,n,o,a,i,l)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:r||void 0,background:t,borderColor:n||void 0,boxShadow:"none"},$C(e,Object.assign({background:t},i),Object.assign({background:t},l))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:a||void 0}})}),Q5=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},J5(e))}),eP=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Su=(e,t,r,n)=>{const o=n&&["link","text"].includes(n)?eP:Q5;return Object.assign(Object.assign({},o(e)),$C(e.componentCls,t,r))},$u=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:r},Su(e,n,o))}),Bu=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:r},Su(e,n,o))}),Ou=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Au=(e,t,r,n)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},Su(e,r,n))}),to=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-${r}`]:Object.assign({color:t,boxShadow:"none"},Su(e,n,o,r))}),tP=e=>{const{componentCls:t}=e;return na.reduce((r,n)=>{const o=e[`${n}6`],a=e[`${n}1`],i=e[`${n}5`],l=e[`${n}2`],s=e[`${n}3`],u=e[`${n}7`];return Object.assign(Object.assign({},r),{[`&${t}-color-${n}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:o,boxShadow:e[`${n}ShadowColor`]},$u(e,e.colorTextLightSolid,o,{background:i},{background:u})),Bu(e,o,e.colorBgContainer,{color:i,borderColor:i,background:e.colorBgContainer},{color:u,borderColor:u,background:e.colorBgContainer})),Ou(e)),Au(e,a,{color:o,background:l},{color:o,background:s})),to(e,o,"link",{color:i},{color:u})),to(e,o,"text",{color:i,background:a},{color:u,background:s}))})},{})},rP=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},$u(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),Ou(e)),Au(e,e.colorFillTertiary,{color:e.defaultColor,background:e.colorFillSecondary},{color:e.defaultColor,background:e.colorFill})),Du(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),to(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),nP=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Bu(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),Ou(e)),Au(e,e.colorPrimaryBg,{color:e.colorPrimary,background:e.colorPrimaryBgHover},{color:e.colorPrimary,background:e.colorPrimaryBorder})),to(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),to(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),Du(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),oP=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},$u(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Bu(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Ou(e)),Au(e,e.colorErrorBg,{color:e.colorError,background:e.colorErrorBgFilledHover},{color:e.colorError,background:e.colorErrorBgActive})),to(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),to(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),Du(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),aP=e=>Object.assign(Object.assign({},to(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),Du(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),iP=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:rP(e),[`${t}-color-primary`]:nP(e),[`${t}-color-dangerous`]:oP(e),[`${t}-color-link`]:aP(e)},tP(e))},lP=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Bu(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),to(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),$u(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),to(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Zp=(e,t="")=>{const{componentCls:r,controlHeight:n,fontSize:o,borderRadius:a,buttonPaddingHorizontal:i,iconCls:l,buttonPaddingVertical:s,buttonIconOnlyFontSize:u}=e;return[{[t]:{fontSize:o,height:n,padding:`${se(s)} ${se(i)}`,borderRadius:a,[`&${r}-icon-only`]:{width:n,[l]:{fontSize:u}}}},{[`${r}${r}-circle${t}`]:Y5(e)},{[`${r}${r}-round${t}`]:Z5(e)}]},sP=e=>{const t=er(e,{fontSize:e.contentFontSize});return Zp(t,e.componentCls)},uP=e=>{const t=er(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Zp(t,`${e.componentCls}-sm`)},cP=e=>{const t=er(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Zp(t,`${e.componentCls}-lg`)},dP=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},fP=Hr("Button",e=>{const t=DC(e);return[G5(t),sP(t),uP(t),cP(t),dP(t),iP(t),lP(t),d5(t)]},SC,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function pP(e,t,r,n){const{focusElCls:o,focus:a,borderElCls:i}=r,l=i?"> *":"",s=["hover",a?"focus":null,"active"].filter(Boolean).map(u=>`&:${u} ${l}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[s]:{zIndex:3}},o?{[`&${o}`]:{zIndex:3}}:{}),{[`&[disabled] ${l}`]:{zIndex:0}})}}function mP(e,t,r){const{borderElCls:n}=r,o=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Jp(e,t={focus:!0}){const{componentCls:r}=e,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},pP(e,n,t,r)),mP(r,n,t))}}function hP(e,t,r){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function gP(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function vP(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},hP(e,t,e.componentCls)),gP(e.componentCls,t))}}const bP=e=>{const{componentCls:t,colorPrimaryHover:r,lineWidth:n,calc:o}=e,a=o(n).mul(-1).equal(),i=l=>{const s=`${t}-compact${l?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${s} + ${s}::before`]:{position:"absolute",top:l?a:0,insetInlineStart:l?0:a,backgroundColor:r,content:'""',width:l?"100%":n,height:l?n:"100%"}}};return Object.assign(Object.assign({},i()),i(!0))},yP=J1(["Button","compact"],e=>{const t=DC(e);return[Jp(t),vP(t),bP(t)]},SC);var CP=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function xP(e){if(typeof e=="object"&&e){let t=e==null?void 0:e.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const wP={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},EP=Q.forwardRef((e,t)=>{var r,n;const{loading:o=!1,prefixCls:a,color:i,variant:l,type:s,danger:u=!1,shape:c,size:f,styles:p,disabled:h,className:v,rootClassName:g,children:m,icon:b,iconPosition:y="start",ghost:C=!1,block:D=!1,htmlType:w="button",classNames:k,style:E={},autoInsertSpace:x,autoFocus:A}=e,N=CP(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),$=s||"default",{button:j}=Q.useContext(Zt),F=c||(j==null?void 0:j.shape)||"default",[B,S]=wt(()=>{if(i&&l)return[i,l];if(s||u){const at=wP[$]||[];return u?["danger",at[1]]:at}return j!=null&&j.color&&(j!=null&&j.variant)?[j.color,j.variant]:["default","outlined"]},[s,i,l,u,j==null?void 0:j.variant,j==null?void 0:j.color]),O=B==="danger"?"dangerous":B,{getPrefixCls:I,direction:P,autoInsertSpace:T,className:_,style:X,classNames:L,styles:q}=Ro("button"),J=(r=x??T)!==null&&r!==void 0?r:!0,ee=I("btn",a),[z,Y,V]=fP(ee),G=Rr(Po),K=h??G,W=Rr(EC),te=wt(()=>xP(o),[o]),[U,Z]=xt(te.loading),[re,ue]=xt(!1),he=Ve(null),we=sa(t,he),Ne=Lw.count(m)===1&&!b&&!Mc(S),me=Ve(!0);Q.useEffect(()=>(me.current=!1,()=>{me.current=!0}),[]),Wt(()=>{let at=null;te.delay>0?at=setTimeout(()=>{at=null,Z(!0)},te.delay):Z(te.loading);function He(){at&&(clearTimeout(at),at=null)}return He},[te.delay,te.loading]),Ot(()=>{if(!he.current||!J)return;const at=he.current.textContent||"";Ne&&mf(at)?re||ue(!0):re&&ue(!1)}),Ot(()=>{A&&he.current&&he.current.focus()},[]);const ge=Q.useCallback(at=>{var He;if(U||K){at.preventDefault();return}(He=e.onClick)===null||He===void 0||He.call(e,at)},[e.onClick,U,K]),{compactSize:ye,compactItemClassnames:Ce}=ku(ee,P),xe={large:"lg",small:"sm",middle:void 0},Ae=fa(at=>{var He,nt;return(nt=(He=f??ye)!==null&&He!==void 0?He:W)!==null&&nt!==void 0?nt:at}),ke=Ae&&(n=xe[Ae])!==null&&n!==void 0?n:"",We=U?"loading":b,_e=fn(N,["navigate"]),Pe=de(ee,Y,V,{[`${ee}-${F}`]:F!=="default"&&F,[`${ee}-${$}`]:$,[`${ee}-dangerous`]:u,[`${ee}-color-${O}`]:O,[`${ee}-variant-${S}`]:S,[`${ee}-${ke}`]:ke,[`${ee}-icon-only`]:!m&&m!==0&&!!We,[`${ee}-background-ghost`]:C&&!Mc(S),[`${ee}-loading`]:U,[`${ee}-two-chinese-chars`]:re&&J&&!U,[`${ee}-block`]:D,[`${ee}-rtl`]:P==="rtl",[`${ee}-icon-end`]:y==="end"},Ce,v,g,_),ve=Object.assign(Object.assign({},X),E),Se=de(k==null?void 0:k.icon,L.icon),qe=Object.assign(Object.assign({},(p==null?void 0:p.icon)||{}),q.icon||{}),Ge=b&&!U?Q.createElement(hf,{prefixCls:ee,className:Se,style:qe},b):o&&typeof o=="object"&&o.icon?Q.createElement(hf,{prefixCls:ee,className:Se,style:qe},o.icon):Q.createElement(c5,{existIcon:!!b,prefixCls:ee,loading:U,mount:me.current}),Xe=m||m===0?u5(m,Ne&&J):null;if(_e.href!==void 0)return z(Q.createElement("a",Object.assign({},_e,{className:de(Pe,{[`${ee}-disabled`]:K}),href:K?void 0:_e.href,style:ve,onClick:ge,ref:we,tabIndex:K?-1:0}),Ge,Xe));let Ie=Q.createElement("button",Object.assign({},N,{type:w,className:Pe,style:ve,onClick:ge,disabled:K,ref:we}),Ge,Xe,Ce&&Q.createElement(yP,{prefixCls:ee}));return Mc(S)||(Ie=Q.createElement(Kp,{component:"Button",disabled:U},Ie)),z(Ie)}),Ya=EP;Ya.Group=l5;Ya.__ANT_BUTTON=!0;var BC=d.createContext(null),Iv=[];function kP(e,t){var r=d.useState(function(){if(!Xr())return null;var v=document.createElement("div");return v}),n=ce(r,1),o=n[0],a=d.useRef(!1),i=d.useContext(BC),l=d.useState(Iv),s=ce(l,2),u=s[0],c=s[1],f=i||(a.current?void 0:function(v){c(function(g){var m=[v].concat(je(g));return m})});function p(){o.parentElement||document.body.appendChild(o),a.current=!0}function h(){var v;(v=o.parentElement)===null||v===void 0||v.removeChild(o),a.current=!1}return Wt(function(){return e?i?i(p):p():h(),h},[e]),Wt(function(){u.length&&(u.forEach(function(v){return v()}),c(Iv))},[u]),[o,f]}var Hc;function OC(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";var o,a;if(e){var i=getComputedStyle(e);n.scrollbarColor=i.scrollbarColor,n.scrollbarWidth=i.scrollbarWidth;var l=getComputedStyle(e,"::-webkit-scrollbar"),s=parseInt(l.width,10),u=parseInt(l.height,10);try{var c=s?"width: ".concat(l.width,";"):"",f=u?"height: ".concat(l.height,";"):"";go(`
291
+ #`.concat(t,`::-webkit-scrollbar {
292
+ `).concat(c,`
293
+ `).concat(f,`
294
+ }`),t)}catch(v){console.error(v),o=s,a=u}}document.body.appendChild(r);var p=e&&o&&!isNaN(o)?o:r.offsetWidth-r.clientWidth,h=e&&a&&!isNaN(a)?a:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),rl(t),{width:p,height:h}}function Rv(e){return typeof document>"u"?0:(Hc===void 0&&(Hc=OC()),Hc.width)}function bf(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:OC(e)}function DP(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var SP="rc-util-locker-".concat(Date.now()),Tv=0;function $P(e){var t=!!e,r=d.useState(function(){return Tv+=1,"".concat(SP,"_").concat(Tv)}),n=ce(r,1),o=n[0];Wt(function(){if(t){var a=bf(document.body).width,i=DP();go(`
295
+ html body {
296
+ overflow-y: hidden;
297
+ `.concat(i?"width: calc(100% - ".concat(a,"px);"):"",`
298
+ }`),o)}else rl(o);return function(){rl(o)}},[t,o])}var BP=!1;function OP(e){return BP}var Mv=function(e){return e===!1?!1:!Xr()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},AC=d.forwardRef(function(e,t){var r=e.open,n=e.autoLock,o=e.getContainer;e.debug;var a=e.autoDestroy,i=a===void 0?!0:a,l=e.children,s=d.useState(r),u=ce(s,2),c=u[0],f=u[1],p=c||r;d.useEffect(function(){(i||r)&&f(r)},[r,i]);var h=d.useState(function(){return Mv(o)}),v=ce(h,2),g=v[0],m=v[1];d.useEffect(function(){var $=Mv(o);m($??null)});var b=kP(p&&!g),y=ce(b,2),C=y[0],D=y[1],w=g??C;$P(n&&r&&Xr()&&(w===C||w===document.body));var k=null;if(l&&Zn(l)&&t){var E=l;k=E.ref}var x=sa(k,t);if(!p||!Xr()||g===void 0)return null;var A=w===!1||OP(),N=l;return t&&(N=d.cloneElement(l,{ref:x})),d.createElement(BC.Provider,{value:D},A?N:Nb(N,w))});function AP(){var e=H({},d);return e.useId}var zv=0,_v=AP();const Qp=_v?(function(e){var t=_v();return e||t}):(function(e){var t=d.useState("ssr-id"),r=ce(t,2),n=r[0],o=r[1];return d.useEffect(function(){var a=zv;zv+=1,o("rc_unique_".concat(a))},[]),e||n});var qo="RC_FORM_INTERNAL_HOOKS",Qt=function(){lr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Za=d.createContext({getFieldValue:Qt,getFieldsValue:Qt,getFieldError:Qt,getFieldWarning:Qt,getFieldsError:Qt,isFieldsTouched:Qt,isFieldTouched:Qt,isFieldValidating:Qt,isFieldsValidating:Qt,resetFields:Qt,setFields:Qt,setFieldValue:Qt,setFieldsValue:Qt,validateFields:Qt,submit:Qt,getInternalHooks:function(){return Qt(),{dispatch:Qt,initEntityValue:Qt,registerField:Qt,useSubscribe:Qt,setInitialValues:Qt,destroyForm:Qt,setCallbacks:Qt,registerWatch:Qt,getFields:Qt,setValidateMessages:Qt,setPreserve:Qt,getInitialValue:Qt}}}),Ks=d.createContext(null);function yf(e){return e==null?[]:Array.isArray(e)?e:[e]}function FP(e){return e&&!!e._init}function Cf(){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 xf=Cf();function PP(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function NP(e,t,r){if(Op())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&Qi(o,r.prototype),o}function wf(e){var t=typeof Map=="function"?new Map:void 0;return wf=function(r){if(r===null||!PP(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return NP(r,arguments,el(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Qi(n,r)},wf(e)}var jP=/%[sdj%]/g,IP=function(){};function Ef(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function bn(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=0,a=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var i=e.replace(jP,function(l){if(l==="%%")return"%";if(o>=a)return l;switch(l){case"%s":return String(r[o++]);case"%d":return Number(r[o++]);case"%j":try{return JSON.stringify(r[o++])}catch{return"[Circular]"}break;default:return l}});return i}return e}function RP(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Or(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||RP(t)&&typeof e=="string"&&!e)}function TP(e,t,r){var n=[],o=0,a=e.length;function i(l){n.push.apply(n,je(l||[])),o++,o===a&&r(n)}e.forEach(function(l){t(l,i)})}function Lv(e,t,r){var n=0,o=e.length;function a(i){if(i&&i.length){r(i);return}var l=n;n=n+1,l<o?t(e[l],a):r([])}a([])}function MP(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,je(e[r]||[]))}),t}var Hv=(function(e){no(r,e);var t=oo(r);function r(n,o){var a;return vr(this,r),a=t.call(this,"Async Validation Error"),M(et(a),"errors",void 0),M(et(a),"fields",void 0),a.errors=n,a.fields=o,a}return br(r)})(wf(Error));function zP(e,t,r,n,o){if(t.first){var a=new Promise(function(p,h){var v=function(m){return n(m),m.length?h(new Hv(m,Ef(m))):p(o)},g=MP(e);Lv(g,r,v)});return a.catch(function(p){return p}),a}var i=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),s=l.length,u=0,c=[],f=new Promise(function(p,h){var v=function(g){if(c.push.apply(c,g),u++,u===s)return n(c),c.length?h(new Hv(c,Ef(c))):p(o)};l.length||(n(c),p(o)),l.forEach(function(g){var m=e[g];i.indexOf(g)!==-1?Lv(m,r,v):TP(m,r,v)})});return f.catch(function(p){return p}),f}function _P(e){return!!(e&&e.message!==void 0)}function LP(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function Wv(e,t){return function(r){var n;return e.fullFields?n=LP(t,e.fullFields):n=t[r.field||e.fullField],_P(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function Kv(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];lt(n)==="object"&&lt(e[r])==="object"?e[r]=H(H({},e[r]),n):e[r]=n}}return e}var ga="enum",HP=function(e,t,r,n,o){e[ga]=Array.isArray(e[ga])?e[ga]:[],e[ga].indexOf(t)===-1&&n.push(bn(o.messages[ga],e.fullField,e[ga].join(", ")))},WP=function(e,t,r,n,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push(bn(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(t)||n.push(bn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},KP=function(e,t,r,n,o){var a=typeof e.len=="number",i=typeof e.min=="number",l=typeof e.max=="number",s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=t,c=null,f=typeof t=="number",p=typeof t=="string",h=Array.isArray(t);if(f?c="number":p?c="string":h&&(c="array"),!c)return!1;h&&(u=t.length),p&&(u=t.replace(s,"_").length),a?u!==e.len&&n.push(bn(o.messages[c].len,e.fullField,e.len)):i&&!l&&u<e.min?n.push(bn(o.messages[c].min,e.fullField,e.min)):l&&!i&&u>e.max?n.push(bn(o.messages[c].max,e.fullField,e.max)):i&&l&&(u<e.min||u>e.max)&&n.push(bn(o.messages[c].range,e.fullField,e.min,e.max))},FC=function(e,t,r,n,o,a){e.required&&(!r.hasOwnProperty(e.field)||Or(t,a||e.type))&&n.push(bn(o.messages.required,e.fullField))},Yl;const qP=(function(){if(Yl)return Yl;var e="[a-fA-F\\d:]",t=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",o=["(?:".concat(n,":){7}(?:").concat(n,"|:)"),"(?:".concat(n,":){6}(?:").concat(r,"|:").concat(n,"|:)"),"(?:".concat(n,":){5}(?::").concat(r,"|(?::").concat(n,"){1,2}|:)"),"(?:".concat(n,":){4}(?:(?::").concat(n,"){0,1}:").concat(r,"|(?::").concat(n,"){1,3}|:)"),"(?:".concat(n,":){3}(?:(?::").concat(n,"){0,2}:").concat(r,"|(?::").concat(n,"){1,4}|:)"),"(?:".concat(n,":){2}(?:(?::").concat(n,"){0,3}:").concat(r,"|(?::").concat(n,"){1,5}|:)"),"(?:".concat(n,":){1}(?:(?::").concat(n,"){0,4}:").concat(r,"|(?::").concat(n,"){1,6}|:)"),"(?::(?:(?::".concat(n,"){0,5}:").concat(r,"|(?::").concat(n,"){1,7}|:))")],a="(?:%[0-9a-zA-Z]{1,})?",i="(?:".concat(o.join("|"),")").concat(a),l=new RegExp("(?:^".concat(r,"$)|(?:^").concat(i,"$)")),s=new RegExp("^".concat(r,"$")),u=new RegExp("^".concat(i,"$")),c=function(w){return w&&w.exact?l:new RegExp("(?:".concat(t(w)).concat(r).concat(t(w),")|(?:").concat(t(w)).concat(i).concat(t(w),")"),"g")};c.v4=function(w){return w&&w.exact?s:new RegExp("".concat(t(w)).concat(r).concat(t(w)),"g")},c.v6=function(w){return w&&w.exact?u:new RegExp("".concat(t(w)).concat(i).concat(t(w)),"g")};var f="(?:(?:[a-z]+:)?//)",p="(?:\\S+(?::\\S*)?@)?",h=c.v4().source,v=c.v6().source,g="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",b="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",C='(?:[/?#][^\\s"]*)?',D="(?:".concat(f,"|www\\.)").concat(p,"(?:localhost|").concat(h,"|").concat(v,"|").concat(g).concat(m).concat(b,")").concat(y).concat(C);return Yl=new RegExp("(?:^".concat(D,"$)"),"i"),Yl});var qv={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},Bi={integer:function(e){return Bi.number(e)&&parseInt(e,10)===e},float:function(e){return Bi.number(e)&&!Bi.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 lt(e)==="object"&&!Bi.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(qv.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(qP())},hex:function(e){return typeof e=="string"&&!!e.match(qv.hex)}},VP=function(e,t,r,n,o){if(e.required&&t===void 0){FC(e,t,r,n,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],i=e.type;a.indexOf(i)>-1?Bi[i](t)||n.push(bn(o.messages.types[i],e.fullField,e.type)):i&&lt(t)!==e.type&&n.push(bn(o.messages.types[i],e.fullField,e.type))},UP=function(e,t,r,n,o){(/^\s+$/.test(t)||t==="")&&n.push(bn(o.messages.whitespace,e.fullField))};const zt={required:FC,whitespace:UP,type:VP,range:KP,enum:HP,pattern:WP};var XP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o)}r(a)},GP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(t==null&&!e.required)return r();zt.required(e,t,n,a,o,"array"),t!=null&&(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o))}r(a)},YP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&zt.type(e,t,n,a,o)}r(a)},ZP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t,"date")&&!e.required)return r();if(zt.required(e,t,n,a,o),!Or(t,"date")){var l;t instanceof Date?l=t:l=new Date(t),zt.type(e,l,n,a,o),l&&zt.range(e,l.getTime(),n,a,o)}}r(a)},JP="enum",QP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&zt[JP](e,t,n,a,o)}r(a)},eN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o))}r(a)},tN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o))}r(a)},rN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&zt.type(e,t,n,a,o)}r(a)},nN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(t===""&&(t=void 0),Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o))}r(a)},oN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&zt.type(e,t,n,a,o)}r(a)},aN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t,"string")&&!e.required)return r();zt.required(e,t,n,a,o),Or(t,"string")||zt.pattern(e,t,n,a,o)}r(a)},iN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),Or(t)||zt.type(e,t,n,a,o)}r(a)},lN=function(e,t,r,n,o){var a=[],i=Array.isArray(t)?"array":lt(t);zt.required(e,t,n,a,o,i),r(a)},sN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t,"string")&&!e.required)return r();zt.required(e,t,n,a,o,"string"),Or(t,"string")||(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o),zt.pattern(e,t,n,a,o),e.whitespace===!0&&zt.whitespace(e,t,n,a,o))}r(a)},Wc=function(e,t,r,n,o){var a=e.type,i=[],l=e.required||!e.required&&n.hasOwnProperty(e.field);if(l){if(Or(t,a)&&!e.required)return r();zt.required(e,t,n,i,o,a),Or(t,a)||zt.type(e,t,n,i,o)}r(i)};const Mi={string:sN,method:rN,number:nN,boolean:YP,regexp:iN,integer:tN,float:eN,array:GP,object:oN,enum:QP,pattern:aN,date:ZP,url:Wc,hex:Wc,email:Wc,required:lN,any:XP};var wl=(function(){function e(t){vr(this,e),M(this,"rules",null),M(this,"_messages",xf),this.define(t)}return br(e,[{key:"define",value:function(t){var r=this;if(!t)throw new Error("Cannot configure a schema with no rules");if(lt(t)!=="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(function(n){var o=t[n];r.rules[n]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(t){return t&&(this._messages=Kv(Cf(),t)),this._messages}},{key:"validate",value:function(t){var r=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=t,i=n,l=o;if(typeof i=="function"&&(l=i,i={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function s(h){var v=[],g={};function m(y){if(Array.isArray(y)){var C;v=(C=v).concat.apply(C,je(y))}else v.push(y)}for(var b=0;b<h.length;b++)m(h[b]);v.length?(g=Ef(v),l(v,g)):l(null,a)}if(i.messages){var u=this.messages();u===xf&&(u=Cf()),Kv(u,i.messages),i.messages=u}else i.messages=this.messages();var c={},f=i.keys||Object.keys(this.rules);f.forEach(function(h){var v=r.rules[h],g=a[h];v.forEach(function(m){var b=m;typeof b.transform=="function"&&(a===t&&(a=H({},a)),g=a[h]=b.transform(g),g!=null&&(b.type=b.type||(Array.isArray(g)?"array":lt(g)))),typeof b=="function"?b={validator:b}:b=H({},b),b.validator=r.getValidationMethod(b),b.validator&&(b.field=h,b.fullField=b.fullField||h,b.type=r.getType(b),c[h]=c[h]||[],c[h].push({rule:b,value:g,source:a,field:h}))})});var p={};return zP(c,i,function(h,v){var g=h.rule,m=(g.type==="object"||g.type==="array")&&(lt(g.fields)==="object"||lt(g.defaultField)==="object");m=m&&(g.required||!g.required&&h.value),g.field=h.field;function b(k,E){return H(H({},E),{},{fullField:"".concat(g.fullField,".").concat(k),fullFields:g.fullFields?[].concat(je(g.fullFields),[k]):[k]})}function y(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],E=Array.isArray(k)?k:[k];!i.suppressWarning&&E.length&&e.warning("async-validator:",E),E.length&&g.message!==void 0&&(E=[].concat(g.message));var x=E.map(Wv(g,a));if(i.first&&x.length)return p[g.field]=1,v(x);if(!m)v(x);else{if(g.required&&!h.value)return g.message!==void 0?x=[].concat(g.message).map(Wv(g,a)):i.error&&(x=[i.error(g,bn(i.messages.required,g.field))]),v(x);var A={};g.defaultField&&Object.keys(h.value).map(function(j){A[j]=g.defaultField}),A=H(H({},A),h.rule.fields);var N={};Object.keys(A).forEach(function(j){var F=A[j],B=Array.isArray(F)?F:[F];N[j]=B.map(b.bind(null,j))});var $=new e(N);$.messages(i.messages),h.rule.options&&(h.rule.options.messages=i.messages,h.rule.options.error=i.error),$.validate(h.value,h.rule.options||i,function(j){var F=[];x&&x.length&&F.push.apply(F,je(x)),j&&j.length&&F.push.apply(F,je(j)),v(F.length?F:null)})}}var C;if(g.asyncValidator)C=g.asyncValidator(g,h.value,y,h.source,i);else if(g.validator){try{C=g.validator(g,h.value,y,h.source,i)}catch(k){var D,w;(D=(w=console).error)===null||D===void 0||D.call(w,k),i.suppressValidatorError||setTimeout(function(){throw k},0),y(k.message)}C===!0?y():C===!1?y(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):C instanceof Array?y(C):C instanceof Error&&y(C.message)}C&&C.then&&C.then(function(){return y()},function(k){return y(k)})},function(h){s(h)},a)}},{key:"getType",value:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!Mi.hasOwnProperty(t.type))throw new Error(bn("Unknown rule type %s",t.type));return t.type||"string"}},{key:"getValidationMethod",value:function(t){if(typeof t.validator=="function")return t.validator;var r=Object.keys(t),n=r.indexOf("message");return n!==-1&&r.splice(n,1),r.length===1&&r[0]==="required"?Mi.required:Mi[this.getType(t)]||void 0}}]),e})();M(wl,"register",function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");Mi[e]=t});M(wl,"warning",IP);M(wl,"messages",xf);M(wl,"validators",Mi);var hn="'${name}' is not a valid ${type}",PC={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:hn,method:hn,array:hn,object:hn,number:hn,date:hn,boolean:hn,integer:hn,float:hn,regexp:hn,email:hn,url:hn,hex:hn},string:{len:"'${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}"}},Vv=wl;function uN(e,t){return e.replace(/\\?\$\{\w+\}/g,function(r){if(r.startsWith("\\"))return r.slice(1);var n=r.slice(2,-1);return t[n]})}var Uv="CODE_LOGIC_ERROR";function kf(e,t,r,n,o){return Df.apply(this,arguments)}function Df(){return Df=da(Gr().mark(function e(t,r,n,o,a){var i,l,s,u,c,f,p,h,v;return Gr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return i=H({},n),delete i.ruleIndex,Vv.warning=function(){},i.validator&&(l=i.validator,i.validator=function(){try{return l.apply(void 0,arguments)}catch(m){return console.error(m),Promise.reject(Uv)}}),s=null,i&&i.type==="array"&&i.defaultField&&(s=i.defaultField,delete i.defaultField),u=new Vv(M({},t,[i])),c=$a(PC,o.validateMessages),u.messages(c),f=[],g.prev=10,g.next=13,Promise.resolve(u.validate(M({},t,r),H({},o)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(f=g.t0.errors.map(function(m,b){var y=m.message,C=y===Uv?c.default:y;return d.isValidElement(C)?d.cloneElement(C,{key:"error_".concat(b)}):C}));case 18:if(!(!f.length&&s)){g.next=23;break}return g.next=21,Promise.all(r.map(function(m,b){return kf("".concat(t,".").concat(b),m,s,o,a)}));case 21:return p=g.sent,g.abrupt("return",p.reduce(function(m,b){return[].concat(je(m),je(b))},[]));case 23:return h=H(H({},n),{},{name:t,enum:(n.enum||[]).join(", ")},a),v=f.map(function(m){return typeof m=="string"?uN(m,h):m}),g.abrupt("return",v);case 26:case"end":return g.stop()}},e,null,[[10,15]])})),Df.apply(this,arguments)}function cN(e,t,r,n,o,a){var i=e.join("."),l=r.map(function(c,f){var p=c.validator,h=H(H({},c),{},{ruleIndex:f});return p&&(h.validator=function(v,g,m){var b=!1,y=function(){for(var D=arguments.length,w=new Array(D),k=0;k<D;k++)w[k]=arguments[k];Promise.resolve().then(function(){lr(!b,"Your validator function has already return a promise. `callback` will be ignored."),b||m.apply(void 0,w)})},C=p(v,g,y);b=C&&typeof C.then=="function"&&typeof C.catch=="function",lr(b,"`callback` is deprecated. Please return a promise instead."),b&&C.then(function(){m()}).catch(function(D){m(D||" ")})}),h}).sort(function(c,f){var p=c.warningOnly,h=c.ruleIndex,v=f.warningOnly,g=f.ruleIndex;return!!p==!!v?h-g:p?1:-1}),s;if(o===!0)s=new Promise((function(){var c=da(Gr().mark(function f(p,h){var v,g,m;return Gr().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:v=0;case 1:if(!(v<l.length)){b.next=12;break}return g=l[v],b.next=5,kf(i,t,g,n,a);case 5:if(m=b.sent,!m.length){b.next=9;break}return h([{errors:m,rule:g}]),b.abrupt("return");case 9:v+=1,b.next=1;break;case 12:p([]);case 13:case"end":return b.stop()}},f)}));return function(f,p){return c.apply(this,arguments)}})());else{var u=l.map(function(c){return kf(i,t,c,n,a).then(function(f){return{errors:f,rule:c}})});s=(o?fN(u):dN(u)).then(function(c){return Promise.reject(c)})}return s.catch(function(c){return c}),s}function dN(e){return Sf.apply(this,arguments)}function Sf(){return Sf=da(Gr().mark(function e(t){return Gr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(n){var o,a=(o=[]).concat.apply(o,je(n));return a}));case 1:case"end":return r.stop()}},e)})),Sf.apply(this,arguments)}function fN(e){return $f.apply(this,arguments)}function $f(){return $f=da(Gr().mark(function e(t){var r;return Gr().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=0,n.abrupt("return",new Promise(function(o){t.forEach(function(a){a.then(function(i){i.errors.length&&o([i]),r+=1,r===t.length&&o([])})})}));case 2:case"end":return n.stop()}},e)})),$f.apply(this,arguments)}function gr(e){return yf(e)}function Xv(e,t){var r={};return t.forEach(function(n){var o=vn(e,n);r=jn(r,n,o)}),r}function Na(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(n){return NC(t,n,r)})}function NC(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!r&&e.length!==t.length?!1:t.every(function(n,o){return e[o]===n})}function pN(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||lt(e)!=="object"||lt(t)!=="object")return!1;var r=Object.keys(e),n=Object.keys(t),o=new Set([].concat(r,n));return je(o).every(function(a){var i=e[a],l=t[a];return typeof i=="function"&&typeof l=="function"?!0:i===l})}function mN(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&lt(t.target)==="object"&&e in t.target?t.target[e]:t}function Gv(e,t,r){var n=e.length;if(t<0||t>=n||r<0||r>=n)return e;var o=e[t],a=t-r;return a>0?[].concat(je(e.slice(0,r)),[o],je(e.slice(r,t)),je(e.slice(t+1,n))):a<0?[].concat(je(e.slice(0,t)),je(e.slice(t+1,r+1)),[o],je(e.slice(r+1,n))):e}var hN=["name"],Dn=[];function Kc(e,t,r,n,o,a){return typeof e=="function"?e(t,r,"source"in a?{source:a.source}:{}):n!==o}var em=(function(e){no(r,e);var t=oo(r);function r(n){var o;if(vr(this,r),o=t.call(this,n),M(et(o),"state",{resetCount:0}),M(et(o),"cancelRegisterFunc",null),M(et(o),"mounted",!1),M(et(o),"touched",!1),M(et(o),"dirty",!1),M(et(o),"validatePromise",void 0),M(et(o),"prevValidating",void 0),M(et(o),"errors",Dn),M(et(o),"warnings",Dn),M(et(o),"cancelRegister",function(){var s=o.props,u=s.preserve,c=s.isListField,f=s.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(c,u,gr(f)),o.cancelRegisterFunc=null}),M(et(o),"getNamePath",function(){var s=o.props,u=s.name,c=s.fieldContext,f=c.prefixName,p=f===void 0?[]:f;return u!==void 0?[].concat(je(p),je(u)):[]}),M(et(o),"getRules",function(){var s=o.props,u=s.rules,c=u===void 0?[]:u,f=s.fieldContext;return c.map(function(p){return typeof p=="function"?p(f):p})}),M(et(o),"refresh",function(){o.mounted&&o.setState(function(s){var u=s.resetCount;return{resetCount:u+1}})}),M(et(o),"metaCache",null),M(et(o),"triggerMetaEvent",function(s){var u=o.props.onMetaChange;if(u){var c=H(H({},o.getMeta()),{},{destroy:s});Jn(o.metaCache,c)||u(c),o.metaCache=c}else o.metaCache=null}),M(et(o),"onStoreChange",function(s,u,c){var f=o.props,p=f.shouldUpdate,h=f.dependencies,v=h===void 0?[]:h,g=f.onReset,m=c.store,b=o.getNamePath(),y=o.getValue(s),C=o.getValue(m),D=u&&Na(u,b);switch(c.type==="valueUpdate"&&c.source==="external"&&!Jn(y,C)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Dn,o.warnings=Dn,o.triggerMetaEvent()),c.type){case"reset":if(!u||D){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Dn,o.warnings=Dn,o.triggerMetaEvent(),g==null||g(),o.refresh();return}break;case"remove":{if(p&&Kc(p,s,m,y,C,c)){o.reRender();return}break}case"setField":{var w=c.data;if(D){"touched"in w&&(o.touched=w.touched),"validating"in w&&!("originRCField"in w)&&(o.validatePromise=w.validating?Promise.resolve([]):null),"errors"in w&&(o.errors=w.errors||Dn),"warnings"in w&&(o.warnings=w.warnings||Dn),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in w&&Na(u,b,!0)){o.reRender();return}if(p&&!b.length&&Kc(p,s,m,y,C,c)){o.reRender();return}break}case"dependenciesUpdate":{var k=v.map(gr);if(k.some(function(E){return Na(c.relatedFields,E)})){o.reRender();return}break}default:if(D||(!v.length||b.length||p)&&Kc(p,s,m,y,C,c)){o.reRender();return}break}p===!0&&o.reRender()}),M(et(o),"validateRules",function(s){var u=o.getNamePath(),c=o.getValue(),f=s||{},p=f.triggerName,h=f.validateOnly,v=h===void 0?!1:h,g=Promise.resolve().then(da(Gr().mark(function m(){var b,y,C,D,w,k,E;return Gr().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(o.mounted){x.next=2;break}return x.abrupt("return",[]);case 2:if(b=o.props,y=b.validateFirst,C=y===void 0?!1:y,D=b.messageVariables,w=b.validateDebounce,k=o.getRules(),p&&(k=k.filter(function(A){return A}).filter(function(A){var N=A.validateTrigger;if(!N)return!0;var $=yf(N);return $.includes(p)})),!(w&&p)){x.next=10;break}return x.next=8,new Promise(function(A){setTimeout(A,w)});case 8:if(o.validatePromise===g){x.next=10;break}return x.abrupt("return",[]);case 10:return E=cN(u,c,k,s,C,D),E.catch(function(A){return A}).then(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dn;if(o.validatePromise===g){var N;o.validatePromise=null;var $=[],j=[];(N=A.forEach)===null||N===void 0||N.call(A,function(F){var B=F.rule.warningOnly,S=F.errors,O=S===void 0?Dn:S;B?j.push.apply(j,je(O)):$.push.apply($,je(O))}),o.errors=$,o.warnings=j,o.triggerMetaEvent(),o.reRender()}}),x.abrupt("return",E);case 13:case"end":return x.stop()}},m)})));return v||(o.validatePromise=g,o.dirty=!0,o.errors=Dn,o.warnings=Dn,o.triggerMetaEvent(),o.reRender()),g}),M(et(o),"isFieldValidating",function(){return!!o.validatePromise}),M(et(o),"isFieldTouched",function(){return o.touched}),M(et(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var s=o.props.fieldContext,u=s.getInternalHooks(qo),c=u.getInitialValue;return c(o.getNamePath())!==void 0}),M(et(o),"getErrors",function(){return o.errors}),M(et(o),"getWarnings",function(){return o.warnings}),M(et(o),"isListField",function(){return o.props.isListField}),M(et(o),"isList",function(){return o.props.isList}),M(et(o),"isPreserve",function(){return o.props.preserve}),M(et(o),"getMeta",function(){o.prevValidating=o.isFieldValidating();var s={touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:o.validatePromise===null};return s}),M(et(o),"getOnlyChild",function(s){if(typeof s=="function"){var u=o.getMeta();return H(H({},o.getOnlyChild(s(o.getControlled(),u,o.props.fieldContext))),{},{isFunction:!0})}var c=Ln(s);return c.length!==1||!d.isValidElement(c[0])?{child:c,isFunction:!1}:{child:c[0],isFunction:!1}}),M(et(o),"getValue",function(s){var u=o.props.fieldContext.getFieldsValue,c=o.getNamePath();return vn(s||u(!0),c)}),M(et(o),"getControlled",function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=o.props,c=u.name,f=u.trigger,p=u.validateTrigger,h=u.getValueFromEvent,v=u.normalize,g=u.valuePropName,m=u.getValueProps,b=u.fieldContext,y=p!==void 0?p:b.validateTrigger,C=o.getNamePath(),D=b.getInternalHooks,w=b.getFieldsValue,k=D(qo),E=k.dispatch,x=o.getValue(),A=m||function(B){return M({},g,B)},N=s[f],$=c!==void 0?A(x):{},j=H(H({},s),$);j[f]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var B,S=arguments.length,O=new Array(S),I=0;I<S;I++)O[I]=arguments[I];h?B=h.apply(void 0,O):B=mN.apply(void 0,[g].concat(O)),v&&(B=v(B,x,w(!0))),B!==x&&E({type:"updateValue",namePath:C,value:B}),N&&N.apply(void 0,O)};var F=yf(y||[]);return F.forEach(function(B){var S=j[B];j[B]=function(){S&&S.apply(void 0,arguments);var O=o.props.rules;O&&O.length&&E({type:"validateField",namePath:C,triggerName:B})}}),j}),n.fieldContext){var a=n.fieldContext.getInternalHooks,i=a(qo),l=i.initEntityValue;l(et(o))}return o}return br(r,[{key:"componentDidMount",value:function(){var n=this.props,o=n.shouldUpdate,a=n.fieldContext;if(this.mounted=!0,a){var i=a.getInternalHooks,l=i(qo),s=l.registerField;this.cancelRegisterFunc=s(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 n=this.state.resetCount,o=this.props.children,a=this.getOnlyChild(o),i=a.child,l=a.isFunction,s;return l?s=i:d.isValidElement(i)?s=d.cloneElement(i,this.getControlled(i.props)):(lr(!i,"`children` of Field is not validate ReactElement."),s=i),d.createElement(d.Fragment,{key:n},s)}}]),r})(d.Component);M(em,"contextType",Za);M(em,"defaultProps",{trigger:"onChange",valuePropName:"value"});function jC(e){var t,r=e.name,n=yt(e,hN),o=d.useContext(Za),a=d.useContext(Ks),i=r!==void 0?gr(r):void 0,l=(t=n.isListField)!==null&&t!==void 0?t:!!a,s="keep";return l||(s="_".concat((i||[]).join("_"))),d.createElement(em,Te({key:s,name:i,isListField:l},n,{fieldContext:o}))}function gN(e){var t=e.name,r=e.initialValue,n=e.children,o=e.rules,a=e.validateTrigger,i=e.isListField,l=d.useContext(Za),s=d.useContext(Ks),u=d.useRef({keys:[],id:0}),c=u.current,f=d.useMemo(function(){var g=gr(l.prefixName)||[];return[].concat(je(g),je(gr(t)))},[l.prefixName,t]),p=d.useMemo(function(){return H(H({},l),{},{prefixName:f})},[l,f]),h=d.useMemo(function(){return{getKey:function(g){var m=f.length,b=g[m];return[c.keys[b],g.slice(m+1)]}}},[f]);if(typeof n!="function")return lr(!1,"Form.List only accepts function as children."),null;var v=function(g,m,b){var y=b.source;return y==="internal"?!1:g!==m};return d.createElement(Ks.Provider,{value:h},d.createElement(Za.Provider,{value:p},d.createElement(jC,{name:[],shouldUpdate:v,rules:o,validateTrigger:a,initialValue:r,isList:!0,isListField:i??!!s},function(g,m){var b=g.value,y=b===void 0?[]:b,C=g.onChange,D=l.getFieldValue,w=function(){var x=D(f||[]);return x||[]},k={add:function(x,A){var N=w();A>=0&&A<=N.length?(c.keys=[].concat(je(c.keys.slice(0,A)),[c.id],je(c.keys.slice(A))),C([].concat(je(N.slice(0,A)),[x],je(N.slice(A))))):(c.keys=[].concat(je(c.keys),[c.id]),C([].concat(je(N),[x]))),c.id+=1},remove:function(x){var A=w(),N=new Set(Array.isArray(x)?x:[x]);N.size<=0||(c.keys=c.keys.filter(function($,j){return!N.has(j)}),C(A.filter(function($,j){return!N.has(j)})))},move:function(x,A){if(x!==A){var N=w();x<0||x>=N.length||A<0||A>=N.length||(c.keys=Gv(c.keys,x,A),C(Gv(N,x,A)))}}},E=y||[];return Array.isArray(E)||(E=[]),n(E.map(function(x,A){var N=c.keys[A];return N===void 0&&(c.keys[A]=c.id,N=c.keys[A],c.id+=1),{name:A,key:N,isListField:!0}}),k,m)})))}function vN(e){var t=!1,r=e.length,n=[];return e.length?new Promise(function(o,a){e.forEach(function(i,l){i.catch(function(s){return t=!0,s}).then(function(s){r-=1,n[l]=s,!(r>0)&&(t&&a(n),o(n))})})}):Promise.resolve([])}var IC="__@field_split__";function qc(e){return e.map(function(t){return"".concat(lt(t),":").concat(t)}).join(IC)}var va=(function(){function e(){vr(this,e),M(this,"kvs",new Map)}return br(e,[{key:"set",value:function(t,r){this.kvs.set(qc(t),r)}},{key:"get",value:function(t){return this.kvs.get(qc(t))}},{key:"update",value:function(t,r){var n=this.get(t),o=r(n);o?this.set(t,o):this.delete(t)}},{key:"delete",value:function(t){this.kvs.delete(qc(t))}},{key:"map",value:function(t){return je(this.kvs.entries()).map(function(r){var n=ce(r,2),o=n[0],a=n[1],i=o.split(IC);return t({key:i.map(function(l){var s=l.match(/^([^:]*):(.*)$/),u=ce(s,3),c=u[1],f=u[2];return c==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var t={};return this.map(function(r){var n=r.key,o=r.value;return t[n.join(".")]=o,null}),t}}]),e})(),bN=["name"],yN=br(function e(t){var r=this;vr(this,e),M(this,"formHooked",!1),M(this,"forceRootUpdate",void 0),M(this,"subscribable",!0),M(this,"store",{}),M(this,"fieldEntities",[]),M(this,"initialValues",{}),M(this,"callbacks",{}),M(this,"validateMessages",null),M(this,"preserve",null),M(this,"lastValidatePromise",null),M(this,"getForm",function(){return{getFieldValue:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}}),M(this,"getInternalHooks",function(n){return n===qo?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(lr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),M(this,"useSubscribe",function(n){r.subscribable=n}),M(this,"prevWithoutPreserves",null),M(this,"setInitialValues",function(n,o){if(r.initialValues=n||{},o){var a,i=$a(n,r.store);(a=r.prevWithoutPreserves)===null||a===void 0||a.map(function(l){var s=l.key;i=jn(i,s,vn(n,s))}),r.prevWithoutPreserves=null,r.updateStore(i)}}),M(this,"destroyForm",function(n){if(n)r.updateStore({});else{var o=new va;r.getFieldEntities(!0).forEach(function(a){r.isMergedPreserve(a.isPreserve())||o.set(a.getNamePath(),!0)}),r.prevWithoutPreserves=o}}),M(this,"getInitialValue",function(n){var o=vn(r.initialValues,n);return n.length?$a(o):o}),M(this,"setCallbacks",function(n){r.callbacks=n}),M(this,"setValidateMessages",function(n){r.validateMessages=n}),M(this,"setPreserve",function(n){r.preserve=n}),M(this,"watchList",[]),M(this,"registerWatch",function(n){return r.watchList.push(n),function(){r.watchList=r.watchList.filter(function(o){return o!==n})}}),M(this,"notifyWatch",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var o=r.getFieldsValue(),a=r.getFieldsValue(!0);r.watchList.forEach(function(i){i(o,a,n)})}}),M(this,"timeoutId",null),M(this,"warningUnhooked",function(){}),M(this,"updateStore",function(n){r.store=n}),M(this,"getFieldEntities",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?r.fieldEntities.filter(function(o){return o.getNamePath().length}):r.fieldEntities}),M(this,"getFieldsMap",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=new va;return r.getFieldEntities(n).forEach(function(a){var i=a.getNamePath();o.set(i,a)}),o}),M(this,"getFieldEntitiesForNamePathList",function(n){if(!n)return r.getFieldEntities(!0);var o=r.getFieldsMap(!0);return n.map(function(a){var i=gr(a);return o.get(i)||{INVALIDATE_NAME_PATH:gr(a)}})}),M(this,"getFieldsValue",function(n,o){r.warningUnhooked();var a,i,l;if(n===!0||Array.isArray(n)?(a=n,i=o):n&&lt(n)==="object"&&(l=n.strict,i=n.filter),a===!0&&!i)return r.store;var s=r.getFieldEntitiesForNamePathList(Array.isArray(a)?a:null),u=[];return s.forEach(function(c){var f,p,h="INVALIDATE_NAME_PATH"in c?c.INVALIDATE_NAME_PATH:c.getNamePath();if(l){var v,g;if((v=(g=c).isList)!==null&&v!==void 0&&v.call(g))return}else if(!a&&(f=(p=c).isListField)!==null&&f!==void 0&&f.call(p))return;if(!i)u.push(h);else{var m="getMeta"in c?c.getMeta():null;i(m)&&u.push(h)}}),Xv(r.store,u.map(gr))}),M(this,"getFieldValue",function(n){r.warningUnhooked();var o=gr(n);return vn(r.store,o)}),M(this,"getFieldsError",function(n){r.warningUnhooked();var o=r.getFieldEntitiesForNamePathList(n);return o.map(function(a,i){return a&&!("INVALIDATE_NAME_PATH"in a)?{name:a.getNamePath(),errors:a.getErrors(),warnings:a.getWarnings()}:{name:gr(n[i]),errors:[],warnings:[]}})}),M(this,"getFieldError",function(n){r.warningUnhooked();var o=gr(n),a=r.getFieldsError([o])[0];return a.errors}),M(this,"getFieldWarning",function(n){r.warningUnhooked();var o=gr(n),a=r.getFieldsError([o])[0];return a.warnings}),M(this,"isFieldsTouched",function(){r.warningUnhooked();for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];var i=o[0],l=o[1],s,u=!1;o.length===0?s=null:o.length===1?Array.isArray(i)?(s=i.map(gr),u=!1):(s=null,u=i):(s=i.map(gr),u=l);var c=r.getFieldEntities(!0),f=function(g){return g.isFieldTouched()};if(!s)return u?c.every(function(g){return f(g)||g.isList()}):c.some(f);var p=new va;s.forEach(function(g){p.set(g,[])}),c.forEach(function(g){var m=g.getNamePath();s.forEach(function(b){b.every(function(y,C){return m[C]===y})&&p.update(b,function(y){return[].concat(je(y),[g])})})});var h=function(g){return g.some(f)},v=p.map(function(g){var m=g.value;return m});return u?v.every(h):v.some(h)}),M(this,"isFieldTouched",function(n){return r.warningUnhooked(),r.isFieldsTouched([n])}),M(this,"isFieldsValidating",function(n){r.warningUnhooked();var o=r.getFieldEntities();if(!n)return o.some(function(i){return i.isFieldValidating()});var a=n.map(gr);return o.some(function(i){var l=i.getNamePath();return Na(a,l)&&i.isFieldValidating()})}),M(this,"isFieldValidating",function(n){return r.warningUnhooked(),r.isFieldsValidating([n])}),M(this,"resetWithFieldInitialValue",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=new va,a=r.getFieldEntities(!0);a.forEach(function(s){var u=s.props.initialValue,c=s.getNamePath();if(u!==void 0){var f=o.get(c)||new Set;f.add({entity:s,value:u}),o.set(c,f)}});var i=function(s){s.forEach(function(u){var c=u.props.initialValue;if(c!==void 0){var f=u.getNamePath(),p=r.getInitialValue(f);if(p!==void 0)lr(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var h=o.get(f);if(h&&h.size>1)lr(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var v=r.getFieldValue(f),g=u.isListField();!g&&(!n.skipExist||v===void 0)&&r.updateStore(jn(r.store,f,je(h)[0].value))}}}})},l;n.entities?l=n.entities:n.namePathList?(l=[],n.namePathList.forEach(function(s){var u=o.get(s);if(u){var c;(c=l).push.apply(c,je(je(u).map(function(f){return f.entity})))}})):l=a,i(l)}),M(this,"resetFields",function(n){r.warningUnhooked();var o=r.store;if(!n){r.updateStore($a(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(o,null,{type:"reset"}),r.notifyWatch();return}var a=n.map(gr);a.forEach(function(i){var l=r.getInitialValue(i);r.updateStore(jn(r.store,i,l))}),r.resetWithFieldInitialValue({namePathList:a}),r.notifyObservers(o,a,{type:"reset"}),r.notifyWatch(a)}),M(this,"setFields",function(n){r.warningUnhooked();var o=r.store,a=[];n.forEach(function(i){var l=i.name,s=yt(i,bN),u=gr(l);a.push(u),"value"in s&&r.updateStore(jn(r.store,u,s.value)),r.notifyObservers(o,[u],{type:"setField",data:i})}),r.notifyWatch(a)}),M(this,"getFields",function(){var n=r.getFieldEntities(!0),o=n.map(function(a){var i=a.getNamePath(),l=a.getMeta(),s=H(H({},l),{},{name:i,value:r.getFieldValue(i)});return Object.defineProperty(s,"originRCField",{value:!0}),s});return o}),M(this,"initEntityValue",function(n){var o=n.props.initialValue;if(o!==void 0){var a=n.getNamePath(),i=vn(r.store,a);i===void 0&&r.updateStore(jn(r.store,a,o))}}),M(this,"isMergedPreserve",function(n){var o=n!==void 0?n:r.preserve;return o??!0}),M(this,"registerField",function(n){r.fieldEntities.push(n);var o=n.getNamePath();if(r.notifyWatch([o]),n.props.initialValue!==void 0){var a=r.store;r.resetWithFieldInitialValue({entities:[n],skipExist:!0}),r.notifyObservers(a,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(i,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(f){return f!==n}),!r.isMergedPreserve(l)&&(!i||s.length>1)){var u=i?void 0:r.getInitialValue(o);if(o.length&&r.getFieldValue(o)!==u&&r.fieldEntities.every(function(f){return!NC(f.getNamePath(),o)})){var c=r.store;r.updateStore(jn(c,o,u,!0)),r.notifyObservers(c,[o],{type:"remove"}),r.triggerDependenciesUpdate(c,o)}}r.notifyWatch([o])}}),M(this,"dispatch",function(n){switch(n.type){case"updateValue":{var o=n.namePath,a=n.value;r.updateValue(o,a);break}case"validateField":{var i=n.namePath,l=n.triggerName;r.validateFields([i],{triggerName:l});break}}}),M(this,"notifyObservers",function(n,o,a){if(r.subscribable){var i=H(H({},a),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(l){var s=l.onStoreChange;s(n,o,i)})}else r.forceRootUpdate()}),M(this,"triggerDependenciesUpdate",function(n,o){var a=r.getDependencyChildrenFields(o);return a.length&&r.validateFields(a),r.notifyObservers(n,a,{type:"dependenciesUpdate",relatedFields:[o].concat(je(a))}),a}),M(this,"updateValue",function(n,o){var a=gr(n),i=r.store;r.updateStore(jn(r.store,a,o)),r.notifyObservers(i,[a],{type:"valueUpdate",source:"internal"}),r.notifyWatch([a]);var l=r.triggerDependenciesUpdate(i,a),s=r.callbacks.onValuesChange;if(s){var u=Xv(r.store,[a]);s(u,r.getFieldsValue())}r.triggerOnFieldsChange([a].concat(je(l)))}),M(this,"setFieldsValue",function(n){r.warningUnhooked();var o=r.store;if(n){var a=$a(r.store,n);r.updateStore(a)}r.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()}),M(this,"setFieldValue",function(n,o){r.setFields([{name:n,value:o,errors:[],warnings:[]}])}),M(this,"getDependencyChildrenFields",function(n){var o=new Set,a=[],i=new va;r.getFieldEntities().forEach(function(s){var u=s.props.dependencies;(u||[]).forEach(function(c){var f=gr(c);i.update(f,function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return p.add(s),p})})});var l=function s(u){var c=i.get(u)||new Set;c.forEach(function(f){if(!o.has(f)){o.add(f);var p=f.getNamePath();f.isFieldDirty()&&p.length&&(a.push(p),s(p))}})};return l(n),a}),M(this,"triggerOnFieldsChange",function(n,o){var a=r.callbacks.onFieldsChange;if(a){var i=r.getFields();if(o){var l=new va;o.forEach(function(u){var c=u.name,f=u.errors;l.set(c,f)}),i.forEach(function(u){u.errors=l.get(u.name)||u.errors})}var s=i.filter(function(u){var c=u.name;return Na(n,c)});s.length&&a(s,i)}}),M(this,"validateFields",function(n,o){r.warningUnhooked();var a,i;Array.isArray(n)||typeof n=="string"||typeof o=="string"?(a=n,i=o):i=n;var l=!!a,s=l?a.map(gr):[],u=[],c=String(Date.now()),f=new Set,p=i||{},h=p.recursive,v=p.dirty;r.getFieldEntities(!0).forEach(function(y){if(l||s.push(y.getNamePath()),!(!y.props.rules||!y.props.rules.length)&&!(v&&!y.isFieldDirty())){var C=y.getNamePath();if(f.add(C.join(c)),!l||Na(s,C,h)){var D=y.validateRules(H({validateMessages:H(H({},PC),r.validateMessages)},i));u.push(D.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(w){var k,E=[],x=[];return(k=w.forEach)===null||k===void 0||k.call(w,function(A){var N=A.rule.warningOnly,$=A.errors;N?x.push.apply(x,je($)):E.push.apply(E,je($))}),E.length?Promise.reject({name:C,errors:E,warnings:x}):{name:C,errors:E,warnings:x}}))}}});var g=vN(u);r.lastValidatePromise=g,g.catch(function(y){return y}).then(function(y){var C=y.map(function(D){var w=D.name;return w});r.notifyObservers(r.store,C,{type:"validateFinish"}),r.triggerOnFieldsChange(C,y)});var m=g.then(function(){return r.lastValidatePromise===g?Promise.resolve(r.getFieldsValue(s)):Promise.reject([])}).catch(function(y){var C=y.filter(function(D){return D&&D.errors.length});return Promise.reject({values:r.getFieldsValue(s),errorFields:C,outOfDate:r.lastValidatePromise!==g})});m.catch(function(y){return y});var b=s.filter(function(y){return f.has(y.join(c))});return r.triggerOnFieldsChange(b),m}),M(this,"submit",function(){r.warningUnhooked(),r.validateFields().then(function(n){var o=r.callbacks.onFinish;if(o)try{o(n)}catch(a){console.error(a)}}).catch(function(n){var o=r.callbacks.onFinishFailed;o&&o(n)})}),this.forceRootUpdate=t});function RC(e){var t=d.useRef(),r=d.useState({}),n=ce(r,2),o=n[1];if(!t.current)if(e)t.current=e;else{var a=function(){o({})},i=new yN(a);t.current=i.getForm()}return[t.current]}var Bf=d.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),CN=function(e){var t=e.validateMessages,r=e.onFormChange,n=e.onFormFinish,o=e.children,a=d.useContext(Bf),i=d.useRef({});return d.createElement(Bf.Provider,{value:H(H({},a),{},{validateMessages:H(H({},a.validateMessages),t),triggerFormChange:function(l,s){r&&r(l,{changedFields:s,forms:i.current}),a.triggerFormChange(l,s)},triggerFormFinish:function(l,s){n&&n(l,{values:s,forms:i.current}),a.triggerFormFinish(l,s)},registerForm:function(l,s){l&&(i.current=H(H({},i.current),{},M({},l,s))),a.registerForm(l,s)},unregisterForm:function(l){var s=H({},i.current);delete s[l],i.current=s,a.unregisterForm(l)}})},o)},xN=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],wN=function(e,t){var r=e.name,n=e.initialValues,o=e.fields,a=e.form,i=e.preserve,l=e.children,s=e.component,u=s===void 0?"form":s,c=e.validateMessages,f=e.validateTrigger,p=f===void 0?"onChange":f,h=e.onValuesChange,v=e.onFieldsChange,g=e.onFinish,m=e.onFinishFailed,b=e.clearOnDestroy,y=yt(e,xN),C=d.useRef(null),D=d.useContext(Bf),w=RC(a),k=ce(w,1),E=k[0],x=E.getInternalHooks(qo),A=x.useSubscribe,N=x.setInitialValues,$=x.setCallbacks,j=x.setValidateMessages,F=x.setPreserve,B=x.destroyForm;d.useImperativeHandle(t,function(){return H(H({},E),{},{nativeElement:C.current})}),d.useEffect(function(){return D.registerForm(r,E),function(){D.unregisterForm(r)}},[D,E,r]),j(H(H({},D.validateMessages),c)),$({onValuesChange:h,onFieldsChange:function(L){if(D.triggerFormChange(r,L),v){for(var q=arguments.length,J=new Array(q>1?q-1:0),ee=1;ee<q;ee++)J[ee-1]=arguments[ee];v.apply(void 0,[L].concat(J))}},onFinish:function(L){D.triggerFormFinish(r,L),g&&g(L)},onFinishFailed:m}),F(i);var S=d.useRef(null);N(n,!S.current),S.current||(S.current=!0),d.useEffect(function(){return function(){return B(b)}},[]);var O,I=typeof l=="function";if(I){var P=E.getFieldsValue(!0);O=l(P,E)}else O=l;A(!I);var T=d.useRef();d.useEffect(function(){pN(T.current||[],o||[])||E.setFields(o||[]),T.current=o},[o,E]);var _=d.useMemo(function(){return H(H({},E),{},{validateTrigger:p})},[E,p]),X=d.createElement(Ks.Provider,{value:null},d.createElement(Za.Provider,{value:_},O));return u===!1?X:d.createElement(u,Te({},y,{ref:C,onSubmit:function(L){L.preventDefault(),L.stopPropagation(),E.submit()},onReset:function(L){var q;L.preventDefault(),E.resetFields(),(q=y.onReset)===null||q===void 0||q.call(y,L)}}),X)};function Yv(e){try{return JSON.stringify(e)}catch{return Math.random()}}function EN(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],o=t[1],a=o===void 0?{}:o,i=FP(a)?{form:a}:a,l=i.form,s=xt(),u=ce(s,2),c=u[0],f=u[1],p=wt(function(){return Yv(c)},[c]),h=Ve(p);h.current=p;var v=Rr(Za),g=l||v,m=g&&g._init,b=gr(n),y=Ve(b);return y.current=b,Ot(function(){if(m){var C=g.getFieldsValue,D=g.getInternalHooks,w=D(qo),k=w.registerWatch,E=function(N,$){var j=i.preserve?$:N;return typeof n=="function"?n(j):vn(j,y.current)},x=k(function(N,$){var j=E(N,$),F=Yv(j);h.current!==F&&(h.current=F,f(j))}),A=E(C(),C(!0));return c!==A&&f(A),x}},[m]),c}var kN=d.forwardRef(wN),El=kN;El.FormProvider=CN;El.Field=jC;El.List=gN;El.useForm=RC;El.useWatch=EN;const oa=d.createContext({}),DN=({children:e,status:t,override:r})=>{const n=d.useContext(oa),o=d.useMemo(()=>{const a=Object.assign({},n);return r&&delete a.isFormItemInput,t&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[t,r,n]);return d.createElement(oa.Provider,{value:o},e)},SN=d.createContext(void 0),dl=e=>{const{space:t,form:r,children:n}=e;if(n==null)return null;let o=n;return r&&(o=Q.createElement(DN,{override:!0,status:!0},o)),t&&(o=Q.createElement(n5,null,o)),o};function TC(...e){const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{r[n]!==void 0&&(t[n]=r[n])})}),t}var MC=function(e){if(Xr()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],r=window.document.documentElement;return t.some(function(n){return n in r.style})}return!1},$N=function(e,t){if(!MC(e))return!1;var r=document.createElement("div"),n=r.style[e];return r.style[e]=t,r.style[e]!==n};function BN(e,t){return!Array.isArray(e)&&t!==void 0?$N(e,t):MC(e)}function ON(e){return t=>d.createElement(ai,{theme:{token:{motion:!1,zIndexPopupBase:0}}},d.createElement(e,Object.assign({},t)))}const zC=(e,t,r,n,o)=>ON(a=>{const{prefixCls:i,style:l}=a,s=d.useRef(null),[u,c]=d.useState(0),[f,p]=d.useState(0),[h,v]=Ur(!1,{value:a.open}),{getPrefixCls:g}=d.useContext(Zt),m=g(n||"select",i);d.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const C=new ResizeObserver(w=>{const k=w[0].target;c(k.offsetHeight+8),p(k.offsetWidth)}),D=setInterval(()=>{var w;const k=o?`.${o(m)}`:`.${m}-dropdown`,E=(w=s.current)===null||w===void 0?void 0:w.querySelector(k);E&&(clearInterval(D),C.observe(E))},10);return()=>{clearInterval(D),C.disconnect()}}},[]);let b=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:h,visible:h,getPopupContainer:()=>s.current});t&&Object.assign(b,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const y={paddingBottom:u,position:"relative",minWidth:f};return d.createElement("div",{ref:s,style:y},d.createElement(e,Object.assign({},b)))}),_C=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=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(e)||/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(e==null?void 0:e.substr(0,4))});var Fu=function(e){var t=e.className,r=e.customizeIcon,n=e.customizeIconProps,o=e.children,a=e.onMouseDown,i=e.onClick,l=typeof r=="function"?r(n):r;return d.createElement("span",{className:t,onMouseDown:function(s){s.preventDefault(),a==null||a(s)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:i,"aria-hidden":!0},l!==void 0?l:d.createElement("span",{className:de(t.split(/\s+/).map(function(s){return"".concat(s,"-icon")}))},o))},AN=function(e,t,r,n,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,i=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=Q.useMemo(function(){if(lt(n)==="object")return n.clearIcon;if(o)return o},[n,o]),u=Q.useMemo(function(){return!!(!a&&n&&(r.length||i)&&!(l==="combobox"&&i===""))},[n,a,r.length,i,l]);return{allowClear:u,clearIcon:Q.createElement(Fu,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:s},"\xD7")}},LC=d.createContext(null);function FN(){return d.useContext(LC)}function PN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=d.useState(!1),r=ce(t,2),n=r[0],o=r[1],a=d.useRef(null),i=function(){window.clearTimeout(a.current)};d.useEffect(function(){return i},[]);var l=function(s,u){i(),a.current=window.setTimeout(function(){o(s),u&&u()},e)};return[n,l,i]}function HC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=d.useRef(null),r=d.useRef(null);d.useEffect(function(){return function(){window.clearTimeout(r.current)}},[]);function n(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(r.current),r.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},n]}function NN(e,t,r,n){var o=d.useRef(null);o.current={open:t,triggerOpen:r,customizedTrigger:n},d.useEffect(function(){function a(i){var l;if(!((l=o.current)!==null&&l!==void 0&&l.customizedTrigger)){var s=i.target;s.shadowRoot&&i.composed&&(s=i.composedPath()[0]||s),o.current.open&&e().filter(function(u){return u}).every(function(u){return!u.contains(s)&&u!==s})&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",a),function(){return window.removeEventListener("mousedown",a)}},[])}function jN(e){return e&&![rt.ESC,rt.SHIFT,rt.BACKSPACE,rt.TAB,rt.WIN_KEY,rt.ALT,rt.META,rt.WIN_KEY_RIGHT,rt.CTRL,rt.SEMICOLON,rt.EQUALS,rt.CAPS_LOCK,rt.CONTEXT_MENU,rt.F1,rt.F2,rt.F3,rt.F4,rt.F5,rt.F6,rt.F7,rt.F8,rt.F9,rt.F10,rt.F11,rt.F12].includes(e)}var IN=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ba=void 0;function RN(e,t){var r=e.prefixCls,n=e.invalidate,o=e.item,a=e.renderItem,i=e.responsive,l=e.responsiveDisabled,s=e.registerSize,u=e.itemKey,c=e.className,f=e.style,p=e.children,h=e.display,v=e.order,g=e.component,m=g===void 0?"div":g,b=yt(e,IN),y=i&&!h;function C(x){s(u,x)}d.useEffect(function(){return function(){C(null)}},[]);var D=a&&o!==ba?a(o,{index:v}):p,w;n||(w={opacity:y?0:1,height:y?0:ba,overflowY:y?"hidden":ba,order:i?v:ba,pointerEvents:y?"none":ba,position:y?"absolute":ba});var k={};y&&(k["aria-hidden"]=!0);var E=d.createElement(m,Te({className:de(!n&&r,c),style:H(H({},w),f)},k,b,{ref:t}),D);return i&&(E=d.createElement(ao,{onResize:function(x){var A=x.offsetWidth;C(A)},disabled:l},E)),E}var zi=d.forwardRef(RN);zi.displayName="Item";function TN(e){if(typeof MessageChannel>"u")qt(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function MN(){var e=d.useRef(null),t=function(r){e.current||(e.current=[],TN(function(){Pb(function(){e.current.forEach(function(n){n()}),e.current=null})})),e.current.push(r)};return t}function Ci(e,t){var r=d.useState(t),n=ce(r,2),o=n[0],a=n[1],i=nr(function(l){e(function(){a(l)})});return[o,i]}var qs=Q.createContext(null),zN=["component"],_N=["className"],LN=["className"],HN=function(e,t){var r=d.useContext(qs);if(!r){var n=e.component,o=n===void 0?"div":n,a=yt(e,zN);return d.createElement(o,Te({},a,{ref:t}))}var i=r.className,l=yt(r,_N),s=e.className,u=yt(e,LN);return d.createElement(qs.Provider,{value:null},d.createElement(zi,Te({ref:t,className:de(i,s)},l,u)))},WC=d.forwardRef(HN);WC.displayName="RawItem";var WN=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],KC="responsive",qC="invalidate";function KN(e){return"+ ".concat(e.length," ...")}function qN(e,t){var r=e.prefixCls,n=r===void 0?"rc-overflow":r,o=e.data,a=o===void 0?[]:o,i=e.renderItem,l=e.renderRawItem,s=e.itemKey,u=e.itemWidth,c=u===void 0?10:u,f=e.ssr,p=e.style,h=e.className,v=e.maxCount,g=e.renderRest,m=e.renderRawRest,b=e.suffix,y=e.component,C=y===void 0?"div":y,D=e.itemComponent,w=e.onVisibleChange,k=yt(e,WN),E=f==="full",x=MN(),A=Ci(x,null),N=ce(A,2),$=N[0],j=N[1],F=$||0,B=Ci(x,new Map),S=ce(B,2),O=S[0],I=S[1],P=Ci(x,0),T=ce(P,2),_=T[0],X=T[1],L=Ci(x,0),q=ce(L,2),J=q[0],ee=q[1],z=Ci(x,0),Y=ce(z,2),V=Y[0],G=Y[1],K=xt(null),W=ce(K,2),te=W[0],U=W[1],Z=xt(null),re=ce(Z,2),ue=re[0],he=re[1],we=d.useMemo(function(){return ue===null&&E?Number.MAX_SAFE_INTEGER:ue||0},[ue,$]),Ne=xt(!1),me=ce(Ne,2),ge=me[0],ye=me[1],Ce="".concat(n,"-item"),xe=Math.max(_,J),Ae=v===KC,ke=a.length&&Ae,We=v===qC,_e=ke||typeof v=="number"&&a.length>v,Pe=wt(function(){var pe=a;return ke?$===null&&E?pe=a:pe=a.slice(0,Math.min(a.length,F/c)):typeof v=="number"&&(pe=a.slice(0,v)),pe},[a,c,$,v,ke]),ve=wt(function(){return ke?a.slice(we+1):a.slice(Pe.length)},[a,Pe,ke,we]),Se=mt(function(pe,Ee){var ie;return typeof s=="function"?s(pe):(ie=s&&(pe==null?void 0:pe[s]))!==null&&ie!==void 0?ie:Ee},[s]),qe=mt(i||function(pe){return pe},[i]);function Ge(pe,Ee,ie){ue===pe&&(Ee===void 0||Ee===te)||(he(pe),ie||(ye(pe<a.length-1),w==null||w(pe)),Ee!==void 0&&U(Ee))}function Xe(pe,Ee){j(Ee.clientWidth)}function Ie(pe,Ee){I(function(ie){var oe=new Map(ie);return Ee===null?oe.delete(pe):oe.set(pe,Ee),oe})}function at(pe,Ee){ee(Ee),X(J)}function He(pe,Ee){G(Ee)}function nt(pe){return O.get(Se(Pe[pe],pe))}Wt(function(){if(F&&typeof xe=="number"&&Pe){var pe=V,Ee=Pe.length,ie=Ee-1;if(!Ee){Ge(0,null);return}for(var oe=0;oe<Ee;oe+=1){var be=nt(oe);if(E&&(be=be||0),be===void 0){Ge(oe-1,void 0,!0);break}if(pe+=be,ie===0&&pe<=F||oe===ie-1&&pe+nt(ie)<=F){Ge(ie,null);break}else if(pe+xe>F){Ge(oe-1,pe-be-V+J);break}}b&&nt(0)+V>F&&U(null)}},[F,O,J,V,Se,Pe]);var ht=ge&&!!ve.length,At={};te!==null&&ke&&(At={position:"absolute",left:te,top:0});var Et={prefixCls:Ce,responsive:ke,component:D,invalidate:We},gt=l?function(pe,Ee){var ie=Se(pe,Ee);return d.createElement(qs.Provider,{key:ie,value:H(H({},Et),{},{order:Ee,item:pe,itemKey:ie,registerSize:Ie,display:Ee<=we})},l(pe,Ee))}:function(pe,Ee){var ie=Se(pe,Ee);return d.createElement(zi,Te({},Et,{order:Ee,key:ie,item:pe,renderItem:qe,itemKey:ie,registerSize:Ie,display:Ee<=we}))},fe={order:ht?we:Number.MAX_SAFE_INTEGER,className:"".concat(Ce,"-rest"),registerSize:at,display:ht},Oe=g||KN,Me=m?d.createElement(qs.Provider,{value:H(H({},Et),fe)},m(ve)):d.createElement(zi,Te({},Et,fe),typeof Oe=="function"?Oe(ve):Oe),Fe=d.createElement(C,Te({className:de(!We&&n,h),style:p,ref:t},k),Pe.map(gt),_e?Me:null,b&&d.createElement(zi,Te({},Et,{responsive:Ae,responsiveDisabled:!ke,order:we,className:"".concat(Ce,"-suffix"),registerSize:He,display:!0,style:At}),b));return Ae?d.createElement(ao,{onResize:Xe,disabled:!ke},Fe):Fe}var Yn=d.forwardRef(qN);Yn.displayName="Overflow";Yn.Item=WC;Yn.RESPONSIVE=KC;Yn.INVALIDATE=qC;function VN(e,t,r){var n=H(H({},e),t);return Object.keys(t).forEach(function(o){var a=t[o];typeof a=="function"&&(n[o]=function(){for(var i,l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];return a.apply(void 0,s),(i=e[o])===null||i===void 0?void 0:i.call.apply(i,[e].concat(s))})}),n}var UN=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],XN=function(e,t){var r=e.prefixCls,n=e.id,o=e.inputElement,a=e.autoFocus,i=e.autoComplete,l=e.editable,s=e.activeDescendantId,u=e.value,c=e.open,f=e.attrs,p=yt(e,UN),h=o||d.createElement("input",null),v=h,g=v.ref,m=v.props;return"maxLength"in h.props,h=d.cloneElement(h,H(H(H({type:"search"},VN(p,m)),{},{id:n,ref:ro(t,g),autoComplete:i||"off",autoFocus:a,className:de("".concat(r,"-selection-search-input"),m==null?void 0:m.className),role:"combobox","aria-expanded":c||!1,"aria-haspopup":"listbox","aria-owns":"".concat(n,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(n,"_list"),"aria-activedescendant":c?s:void 0},f),{},{value:l?u:"",readOnly:!l,unselectable:l?null:"on",style:H(H({},m.style),{},{opacity:l?null:0})})),h},VC=d.forwardRef(XN);function UC(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var GN=typeof window<"u"&&window.document&&window.document.documentElement,YN=GN;function ZN(e){return e!=null}function JN(e){return!e&&e!==0}function Zv(e){return["string","number"].includes(lt(e))}function XC(e){var t=void 0;return e&&(Zv(e.title)?t=e.title.toString():Zv(e.label)&&(t=e.label.toString())),t}function QN(e,t){YN?d.useLayoutEffect(e,t):d.useEffect(e,t)}function e6(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var Jv=function(e){e.preventDefault(),e.stopPropagation()},t6=function(e){var t=e.id,r=e.prefixCls,n=e.values,o=e.open,a=e.searchValue,i=e.autoClearSearchValue,l=e.inputRef,s=e.placeholder,u=e.disabled,c=e.mode,f=e.showSearch,p=e.autoFocus,h=e.autoComplete,v=e.activeDescendantId,g=e.tabIndex,m=e.removeIcon,b=e.maxTagCount,y=e.maxTagTextLength,C=e.maxTagPlaceholder,D=C===void 0?function(U){return"+ ".concat(U.length," ...")}:C,w=e.tagRender,k=e.onToggleOpen,E=e.onRemove,x=e.onInputChange,A=e.onInputPaste,N=e.onInputKeyDown,$=e.onInputMouseDown,j=e.onInputCompositionStart,F=e.onInputCompositionEnd,B=e.onInputBlur,S=d.useRef(null),O=xt(0),I=ce(O,2),P=I[0],T=I[1],_=xt(!1),X=ce(_,2),L=X[0],q=X[1],J="".concat(r,"-selection"),ee=o||c==="multiple"&&i===!1||c==="tags"?a:"",z=c==="tags"||c==="multiple"&&i===!1||f&&(o||L);QN(function(){T(S.current.scrollWidth)},[ee]);var Y=function(U,Z,re,ue,he){return d.createElement("span",{title:XC(U),className:de("".concat(J,"-item"),M({},"".concat(J,"-item-disabled"),re))},d.createElement("span",{className:"".concat(J,"-item-content")},Z),ue&&d.createElement(Fu,{className:"".concat(J,"-item-remove"),onMouseDown:Jv,onClick:he,customizeIcon:m},"\xD7"))},V=function(U,Z,re,ue,he,we){var Ne=function(me){Jv(me),k(!o)};return d.createElement("span",{onMouseDown:Ne},w({label:Z,value:U,disabled:re,closable:ue,onClose:he,isMaxTag:!!we}))},G=function(U){var Z=U.disabled,re=U.label,ue=U.value,he=!u&&!Z,we=re;if(typeof y=="number"&&(typeof re=="string"||typeof re=="number")){var Ne=String(we);Ne.length>y&&(we="".concat(Ne.slice(0,y),"..."))}var me=function(ge){ge&&ge.stopPropagation(),E(U)};return typeof w=="function"?V(ue,we,Z,he,me):Y(U,we,Z,he,me)},K=function(U){if(!n.length)return null;var Z=typeof D=="function"?D(U):D;return typeof w=="function"?V(void 0,Z,!1,!1,void 0,!0):Y({title:Z},Z,!1)},W=d.createElement("div",{className:"".concat(J,"-search"),style:{width:P},onFocus:function(){q(!0)},onBlur:function(){q(!1)}},d.createElement(VC,{ref:l,open:o,prefixCls:r,id:t,inputElement:null,disabled:u,autoFocus:p,autoComplete:h,editable:z,activeDescendantId:v,value:ee,onKeyDown:N,onMouseDown:$,onChange:x,onPaste:A,onCompositionStart:j,onCompositionEnd:F,onBlur:B,tabIndex:g,attrs:Qn(e,!0)}),d.createElement("span",{ref:S,className:"".concat(J,"-search-mirror"),"aria-hidden":!0},ee,"\xA0")),te=d.createElement(Yn,{prefixCls:"".concat(J,"-overflow"),data:n,renderItem:G,renderRest:K,suffix:W,itemKey:e6,maxCount:b});return d.createElement("span",{className:"".concat(J,"-wrap")},te,!n.length&&!ee&&d.createElement("span",{className:"".concat(J,"-placeholder")},s))},r6=function(e){var t=e.inputElement,r=e.prefixCls,n=e.id,o=e.inputRef,a=e.disabled,i=e.autoFocus,l=e.autoComplete,s=e.activeDescendantId,u=e.mode,c=e.open,f=e.values,p=e.placeholder,h=e.tabIndex,v=e.showSearch,g=e.searchValue,m=e.activeValue,b=e.maxLength,y=e.onInputKeyDown,C=e.onInputMouseDown,D=e.onInputChange,w=e.onInputPaste,k=e.onInputCompositionStart,E=e.onInputCompositionEnd,x=e.onInputBlur,A=e.title,N=d.useState(!1),$=ce(N,2),j=$[0],F=$[1],B=u==="combobox",S=B||v,O=f[0],I=g||"";B&&m&&!j&&(I=m),d.useEffect(function(){B&&F(!1)},[B,m]);var P=u!=="combobox"&&!c&&!v?!1:!!I,T=A===void 0?XC(O):A,_=d.useMemo(function(){return O?null:d.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:P?{visibility:"hidden"}:void 0},p)},[O,P,p,r]);return d.createElement("span",{className:"".concat(r,"-selection-wrap")},d.createElement("span",{className:"".concat(r,"-selection-search")},d.createElement(VC,{ref:o,prefixCls:r,id:n,open:c,inputElement:t,disabled:a,autoFocus:i,autoComplete:l,editable:S,activeDescendantId:s,value:I,onKeyDown:y,onMouseDown:C,onChange:function(X){F(!0),D(X)},onPaste:w,onCompositionStart:k,onCompositionEnd:E,onBlur:x,tabIndex:h,attrs:Qn(e,!0),maxLength:B?b:void 0})),!B&&O?d.createElement("span",{className:"".concat(r,"-selection-item"),title:T,style:P?{visibility:"hidden"}:void 0},O.label):null,_)},n6=function(e,t){var r=Ve(null),n=Ve(!1),o=e.prefixCls,a=e.open,i=e.mode,l=e.showSearch,s=e.tokenWithEnter,u=e.disabled,c=e.prefix,f=e.autoClearSearchValue,p=e.onSearch,h=e.onSearchSubmit,v=e.onToggleOpen,g=e.onInputKeyDown,m=e.onInputBlur,b=e.domRef;d.useImperativeHandle(t,function(){return{focus:function(P){r.current.focus(P)},blur:function(){r.current.blur()}}});var y=HC(0),C=ce(y,2),D=C[0],w=C[1],k=function(P){var T=P.which,_=r.current instanceof HTMLTextAreaElement;!_&&a&&(T===rt.UP||T===rt.DOWN)&&P.preventDefault(),g&&g(P),T===rt.ENTER&&i==="tags"&&!n.current&&!a&&(h==null||h(P.target.value)),!(_&&!a&&~[rt.UP,rt.DOWN,rt.LEFT,rt.RIGHT].indexOf(T))&&jN(T)&&v(!0)},E=function(){w(!0)},x=Ve(null),A=function(P){p(P,!0,n.current)!==!1&&v(!0)},N=function(){n.current=!0},$=function(P){n.current=!1,i!=="combobox"&&A(P.target.value)},j=function(P){var T=P.target.value;if(s&&x.current&&/[\r\n]/.test(x.current)){var _=x.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");T=T.replace(_,x.current)}x.current=null,A(T)},F=function(P){var T=P.clipboardData,_=T==null?void 0:T.getData("text");x.current=_||""},B=function(P){var T=P.target;if(T!==r.current){var _=document.body.style.msTouchAction!==void 0;_?setTimeout(function(){r.current.focus()}):r.current.focus()}},S=function(P){var T=D();P.target!==r.current&&!T&&!(i==="combobox"&&u)&&P.preventDefault(),(i!=="combobox"&&(!l||!T)||!a)&&(a&&f!==!1&&p("",!0,!1),v())},O={inputRef:r,onInputKeyDown:k,onInputMouseDown:E,onInputChange:j,onInputPaste:F,onInputCompositionStart:N,onInputCompositionEnd:$,onInputBlur:m},I=i==="multiple"||i==="tags"?d.createElement(t6,Te({},e,O)):d.createElement(r6,Te({},e,O));return d.createElement("div",{ref:b,className:"".concat(o,"-selector"),onClick:B,onMouseDown:S},c&&d.createElement("div",{className:"".concat(o,"-prefix")},c),I)},o6=d.forwardRef(n6);function a6(e){var t=e.prefixCls,r=e.align,n=e.arrow,o=e.arrowPos,a=n||{},i=a.className,l=a.content,s=o.x,u=s===void 0?0:s,c=o.y,f=c===void 0?0:c,p=d.useRef();if(!r||!r.points)return null;var h={position:"absolute"};if(r.autoArrow!==!1){var v=r.points[0],g=r.points[1],m=v[0],b=v[1],y=g[0],C=g[1];m===y||!["t","b"].includes(m)?h.top=f:m==="t"?h.top=0:h.bottom=0,b===C||!["l","r"].includes(b)?h.left=u:b==="l"?h.left=0:h.right=0}return d.createElement("div",{ref:p,className:de("".concat(t,"-arrow"),i),style:h},l)}function i6(e){var t=e.prefixCls,r=e.open,n=e.zIndex,o=e.mask,a=e.motion;return o?d.createElement(ca,Te({},a,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(i){var l=i.className;return d.createElement("div",{style:{zIndex:n},className:de("".concat(t,"-mask"),l)})}):null}var l6=d.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),s6=d.forwardRef(function(e,t){var r=e.popup,n=e.className,o=e.prefixCls,a=e.style,i=e.target,l=e.onVisibleChanged,s=e.open,u=e.keepDom,c=e.fresh,f=e.onClick,p=e.mask,h=e.arrow,v=e.arrowPos,g=e.align,m=e.motion,b=e.maskMotion,y=e.forceRender,C=e.getPopupContainer,D=e.autoDestroy,w=e.portal,k=e.zIndex,E=e.onMouseEnter,x=e.onMouseLeave,A=e.onPointerEnter,N=e.onPointerDownCapture,$=e.ready,j=e.offsetX,F=e.offsetY,B=e.offsetR,S=e.offsetB,O=e.onAlign,I=e.onPrepare,P=e.stretch,T=e.targetWidth,_=e.targetHeight,X=typeof r=="function"?r():r,L=s||u,q=(C==null?void 0:C.length)>0,J=d.useState(!C||!q),ee=ce(J,2),z=ee[0],Y=ee[1];if(Wt(function(){!z&&q&&i&&Y(!0)},[z,q,i]),!z)return null;var V="auto",G={left:"-1000vw",top:"-1000vh",right:V,bottom:V};if($||!s){var K,W=g.points,te=g.dynamicInset||((K=g._experimental)===null||K===void 0?void 0:K.dynamicInset),U=te&&W[0][1]==="r",Z=te&&W[0][0]==="b";U?(G.right=B,G.left=V):(G.left=j,G.right=V),Z?(G.bottom=S,G.top=V):(G.top=F,G.bottom=V)}var re={};return P&&(P.includes("height")&&_?re.height=_:P.includes("minHeight")&&_&&(re.minHeight=_),P.includes("width")&&T?re.width=T:P.includes("minWidth")&&T&&(re.minWidth=T)),s||(re.pointerEvents="none"),d.createElement(w,{open:y||L,getContainer:C&&function(){return C(i)},autoDestroy:D},d.createElement(i6,{prefixCls:o,open:s,zIndex:k,mask:p,motion:b}),d.createElement(ao,{onResize:O,disabled:!s},function(ue){return d.createElement(ca,Te({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:y,leavedClassName:"".concat(o,"-hidden")},m,{onAppearPrepare:I,onEnterPrepare:I,visible:s,onVisibleChanged:function(he){var we;m==null||(we=m.onVisibleChanged)===null||we===void 0||we.call(m,he),l(he)}}),function(he,we){var Ne=he.className,me=he.style,ge=de(o,Ne,n);return d.createElement("div",{ref:ro(ue,t,we),className:ge,style:H(H(H(H({"--arrow-x":"".concat(v.x||0,"px"),"--arrow-y":"".concat(v.y||0,"px")},G),re),me),{},{boxSizing:"border-box",zIndex:k},a),onMouseEnter:E,onMouseLeave:x,onPointerEnter:A,onClick:f,onPointerDownCapture:N},h&&d.createElement(a6,{prefixCls:o,arrow:h,arrowPos:v,align:g}),d.createElement(l6,{cache:!s&&!c},X))})}))}),u6=d.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,o=Zn(r),a=d.useCallback(function(l){Ji(t,n?n(l):l)},[n]),i=sa(a,ua(r));return o?d.cloneElement(r,{ref:i}):r}),Qv=d.createContext(null);function e0(e){return e?Array.isArray(e)?e:[e]:[]}function c6(e,t,r,n){return d.useMemo(function(){var o=e0(r??t),a=e0(n??t),i=new Set(o),l=new Set(a);return e&&(i.has("hover")&&(i.delete("hover"),i.add("click")),l.has("hover")&&(l.delete("hover"),l.add("click"))),[i,l]},[e,t,r,n])}function d6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function f6(e,t,r,n){for(var o=r.points,a=Object.keys(e),i=0;i<a.length;i+=1){var l,s=a[i];if(d6((l=e[s])===null||l===void 0?void 0:l.points,o,n))return"".concat(t,"-placement-").concat(s)}return""}function t0(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function kl(e){return e.ownerDocument.defaultView}function Of(e){for(var t=[],r=e==null?void 0:e.parentElement,n=["hidden","scroll","clip","auto"];r;){var o=kl(r).getComputedStyle(r),a=o.overflowX,i=o.overflowY,l=o.overflow;[a,i,l].some(function(s){return n.includes(s)})&&t.push(r),r=r.parentElement}return t}function fl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function xi(e){return fl(parseFloat(e),0)}function r0(e,t){var r=H({},e);return(t||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var o=kl(n).getComputedStyle(n),a=o.overflow,i=o.overflowClipMargin,l=o.borderTopWidth,s=o.borderBottomWidth,u=o.borderLeftWidth,c=o.borderRightWidth,f=n.getBoundingClientRect(),p=n.offsetHeight,h=n.clientHeight,v=n.offsetWidth,g=n.clientWidth,m=xi(l),b=xi(s),y=xi(u),C=xi(c),D=fl(Math.round(f.width/v*1e3)/1e3),w=fl(Math.round(f.height/p*1e3)/1e3),k=(v-g-y-C)*D,E=(p-h-m-b)*w,x=m*w,A=b*w,N=y*D,$=C*D,j=0,F=0;if(a==="clip"){var B=xi(i);j=B*D,F=B*w}var S=f.x+N-j,O=f.y+x-F,I=S+f.width+2*j-N-$-k,P=O+f.height+2*F-x-A-E;r.left=Math.max(r.left,S),r.top=Math.max(r.top,O),r.right=Math.min(r.right,I),r.bottom=Math.min(r.bottom,P)}}),r}function n0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r="".concat(t),n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function o0(e,t){var r=t||[],n=ce(r,2),o=n[0],a=n[1];return[n0(e.width,o),n0(e.height,a)]}function a0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function ya(e,t){var r=t[0],n=t[1],o,a;return r==="t"?a=e.y:r==="b"?a=e.y+e.height:a=e.y+e.height/2,n==="l"?o=e.x:n==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:a}}function xo(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(n,o){return o===t?r[n]||"c":n}).join("")}function p6(e,t,r,n,o,a,i){var l=d.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[n]||{}}),s=ce(l,2),u=s[0],c=s[1],f=d.useRef(0),p=d.useMemo(function(){return t?Of(t):[]},[t]),h=d.useRef({}),v=function(){h.current={}};e||v();var g=nr(function(){if(t&&r&&e){let ur=function(Wr,Pn){var En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ae,io=L.x+Wr,Ol=L.y+Pn,Hu=io+Z,Wu=Ol+U,Ku=Math.max(io,En.left),tt=Math.max(Ol,En.top),Mt=Math.min(Hu,En.right),Fr=Math.min(Wu,En.bottom);return Math.max(0,(Mt-Ku)*(Fr-tt))},pn=function(){jt=L.y+oe,It=jt+U,kt=L.x+ie,Jt=kt+Z};var y,C,D,w,k=t,E=k.ownerDocument,x=kl(k),A=x.getComputedStyle(k),N=A.position,$=k.style.left,j=k.style.top,F=k.style.right,B=k.style.bottom,S=k.style.overflow,O=H(H({},o[n]),a),I=E.createElement("div");(y=k.parentElement)===null||y===void 0||y.appendChild(I),I.style.left="".concat(k.offsetLeft,"px"),I.style.top="".concat(k.offsetTop,"px"),I.style.position=N,I.style.height="".concat(k.offsetHeight,"px"),I.style.width="".concat(k.offsetWidth,"px"),k.style.left="0",k.style.top="0",k.style.right="auto",k.style.bottom="auto",k.style.overflow="hidden";var P;if(Array.isArray(r))P={x:r[0],y:r[1],width:0,height:0};else{var T,_,X=r.getBoundingClientRect();X.x=(T=X.x)!==null&&T!==void 0?T:X.left,X.y=(_=X.y)!==null&&_!==void 0?_:X.top,P={x:X.x,y:X.y,width:X.width,height:X.height}}var L=k.getBoundingClientRect(),q=x.getComputedStyle(k),J=q.height,ee=q.width;L.x=(C=L.x)!==null&&C!==void 0?C:L.left,L.y=(D=L.y)!==null&&D!==void 0?D:L.top;var z=E.documentElement,Y=z.clientWidth,V=z.clientHeight,G=z.scrollWidth,K=z.scrollHeight,W=z.scrollTop,te=z.scrollLeft,U=L.height,Z=L.width,re=P.height,ue=P.width,he={left:0,top:0,right:Y,bottom:V},we={left:-te,top:-W,right:G-te,bottom:K-W},Ne=O.htmlRegion,me="visible",ge="visibleFirst";Ne!=="scroll"&&Ne!==ge&&(Ne=me);var ye=Ne===ge,Ce=r0(we,p),xe=r0(he,p),Ae=Ne===me?xe:Ce,ke=ye?xe:Ae;k.style.left="auto",k.style.top="auto",k.style.right="0",k.style.bottom="0";var We=k.getBoundingClientRect();k.style.left=$,k.style.top=j,k.style.right=F,k.style.bottom=B,k.style.overflow=S,(w=k.parentElement)===null||w===void 0||w.removeChild(I);var _e=fl(Math.round(Z/parseFloat(ee)*1e3)/1e3),Pe=fl(Math.round(U/parseFloat(J)*1e3)/1e3);if(_e===0||Pe===0||Zi(r)&&!xu(r))return;var ve=O.offset,Se=O.targetOffset,qe=o0(L,ve),Ge=ce(qe,2),Xe=Ge[0],Ie=Ge[1],at=o0(P,Se),He=ce(at,2),nt=He[0],ht=He[1];P.x-=nt,P.y-=ht;var At=O.points||[],Et=ce(At,2),gt=Et[0],fe=Et[1],Oe=a0(fe),Me=a0(gt),Fe=ya(P,Oe),pe=ya(L,Me),Ee=H({},O),ie=Fe.x-pe.x+Xe,oe=Fe.y-pe.y+Ie,be=ur(ie,oe),le=ur(ie,oe,xe),ze=ya(P,["t","l"]),Be=ya(L,["t","l"]),Ke=ya(P,["b","r"]),st=ya(L,["b","r"]),dt=O.overflow||{},Ye=dt.adjustX,Ze=dt.adjustY,ot=dt.shiftX,ft=dt.shiftY,Nt=function(Wr){return typeof Wr=="boolean"?Wr:Wr>=0},jt,It,kt,Jt;pn();var pr=Nt(Ze),Le=Me[0]===Oe[0];if(pr&&Me[0]==="t"&&(It>ke.bottom||h.current.bt)){var Qe=oe;Le?Qe-=U-re:Qe=ze.y-st.y-Ie;var vt=ur(ie,Qe),Tt=ur(ie,Qe,xe);vt>be||vt===be&&(!ye||Tt>=le)?(h.current.bt=!0,oe=Qe,Ie=-Ie,Ee.points=[xo(Me,0),xo(Oe,0)]):h.current.bt=!1}if(pr&&Me[0]==="b"&&(jt<ke.top||h.current.tb)){var Ft=oe;Le?Ft+=U-re:Ft=Ke.y-Be.y-Ie;var yr=ur(ie,Ft),Cr=ur(ie,Ft,xe);yr>be||yr===be&&(!ye||Cr>=le)?(h.current.tb=!0,oe=Ft,Ie=-Ie,Ee.points=[xo(Me,0),xo(Oe,0)]):h.current.tb=!1}var ct=Nt(Ye),$t=Me[1]===Oe[1];if(ct&&Me[1]==="l"&&(Jt>ke.right||h.current.rl)){var Bt=ie;$t?Bt-=Z-ue:Bt=ze.x-st.x-Xe;var Ut=ur(Bt,oe),Tr=ur(Bt,oe,xe);Ut>be||Ut===be&&(!ye||Tr>=le)?(h.current.rl=!0,ie=Bt,Xe=-Xe,Ee.points=[xo(Me,1),xo(Oe,1)]):h.current.rl=!1}if(ct&&Me[1]==="r"&&(kt<ke.left||h.current.lr)){var Zr=ie;$t?Zr+=Z-ue:Zr=Ke.x-Be.x-Xe;var xn=ur(Zr,oe),on=ur(Zr,oe,xe);xn>be||xn===be&&(!ye||on>=le)?(h.current.lr=!0,ie=Zr,Xe=-Xe,Ee.points=[xo(Me,1),xo(Oe,1)]):h.current.lr=!1}pn();var Mr=ot===!0?0:ot;typeof Mr=="number"&&(kt<xe.left&&(ie-=kt-xe.left-Xe,P.x+ue<xe.left+Mr&&(ie+=P.x-xe.left+ue-Mr)),Jt>xe.right&&(ie-=Jt-xe.right-Xe,P.x>xe.right-Mr&&(ie+=P.x-xe.right+Mr)));var an=ft===!0?0:ft;typeof an=="number"&&(jt<xe.top&&(oe-=jt-xe.top-Ie,P.y+re<xe.top+an&&(oe+=P.y-xe.top+re-an)),It>xe.bottom&&(oe-=It-xe.bottom-Ie,P.y>xe.bottom-an&&(oe+=P.y-xe.bottom+an)));var Jr=L.x+ie,zr=Jr+Z,ln=L.y+oe,Ct=ln+U,Je=P.x,bt=Je+ue,Lt=P.y,_t=Lt+re,tr=Math.max(Jr,Je),Dr=Math.min(zr,bt),mr=(tr+Dr)/2,_r=mr-Jr,xr=Math.max(ln,Lt),Ar=Math.min(Ct,_t),wn=(xr+Ar)/2,pt=wn-ln;i==null||i(t,Ee);var Dt=We.right-L.x-(ie+L.width),Sr=We.bottom-L.y-(oe+L.height);_e===1&&(ie=Math.round(ie),Dt=Math.round(Dt)),Pe===1&&(oe=Math.round(oe),Sr=Math.round(Sr));var hr={ready:!0,offsetX:ie/_e,offsetY:oe/Pe,offsetR:Dt/_e,offsetB:Sr/Pe,arrowX:_r/_e,arrowY:pt/Pe,scaleX:_e,scaleY:Pe,align:Ee};c(hr)}}),m=function(){f.current+=1;var y=f.current;Promise.resolve().then(function(){f.current===y&&g()})},b=function(){c(function(y){return H(H({},y),{},{ready:!1})})};return Wt(b,[n]),Wt(function(){e||b()},[e]),[u.ready,u.offsetX,u.offsetY,u.offsetR,u.offsetB,u.arrowX,u.arrowY,u.scaleX,u.scaleY,u.align,m]}function m6(e,t,r,n,o){Wt(function(){if(e&&t&&r){let f=function(){n(),o()};var a=t,i=r,l=Of(a),s=Of(i),u=kl(i),c=new Set([u].concat(je(l),je(s)));return c.forEach(function(p){p.addEventListener("scroll",f,{passive:!0})}),u.addEventListener("resize",f,{passive:!0}),n(),function(){c.forEach(function(p){p.removeEventListener("scroll",f),u.removeEventListener("resize",f)})}}},[e,t,r])}function h6(e,t,r,n,o,a,i,l){var s=d.useRef(e);s.current=e;var u=d.useRef(!1);d.useEffect(function(){if(t&&n&&(!o||a)){var f=function(){u.current=!1},p=function(g){var m;s.current&&!i(((m=g.composedPath)===null||m===void 0||(m=m.call(g))===null||m===void 0?void 0:m[0])||g.target)&&!u.current&&l(!1)},h=kl(n);h.addEventListener("pointerdown",f,!0),h.addEventListener("mousedown",p,!0),h.addEventListener("contextmenu",p,!0);var v=_s(r);return v&&(v.addEventListener("mousedown",p,!0),v.addEventListener("contextmenu",p,!0)),function(){h.removeEventListener("pointerdown",f,!0),h.removeEventListener("mousedown",p,!0),h.removeEventListener("contextmenu",p,!0),v&&(v.removeEventListener("mousedown",p,!0),v.removeEventListener("contextmenu",p,!0))}}},[t,r,n,o,a]);function c(){u.current=!0}return c}var g6=["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 v6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:AC,t=d.forwardRef(function(r,n){var o=r.prefixCls,a=o===void 0?"rc-trigger-popup":o,i=r.children,l=r.action,s=l===void 0?"hover":l,u=r.showAction,c=r.hideAction,f=r.popupVisible,p=r.defaultPopupVisible,h=r.onPopupVisibleChange,v=r.afterPopupVisibleChange,g=r.mouseEnterDelay,m=r.mouseLeaveDelay,b=m===void 0?.1:m,y=r.focusDelay,C=r.blurDelay,D=r.mask,w=r.maskClosable,k=w===void 0?!0:w,E=r.getPopupContainer,x=r.forceRender,A=r.autoDestroy,N=r.destroyPopupOnHide,$=r.popup,j=r.popupClassName,F=r.popupStyle,B=r.popupPlacement,S=r.builtinPlacements,O=S===void 0?{}:S,I=r.popupAlign,P=r.zIndex,T=r.stretch,_=r.getPopupClassNameFromAlign,X=r.fresh,L=r.alignPoint,q=r.onPopupClick,J=r.onPopupAlign,ee=r.arrow,z=r.popupMotion,Y=r.maskMotion,V=r.popupTransitionName,G=r.popupAnimation,K=r.maskTransitionName,W=r.maskAnimation,te=r.className,U=r.getTriggerDOMNode,Z=yt(r,g6),re=A||N||!1,ue=d.useState(!1),he=ce(ue,2),we=he[0],Ne=he[1];Wt(function(){Ne(_C())},[]);var me=d.useRef({}),ge=d.useContext(Qv),ye=d.useMemo(function(){return{registerSubPopup:function(tt,Mt){me.current[tt]=Mt,ge==null||ge.registerSubPopup(tt,Mt)}}},[ge]),Ce=Qp(),xe=d.useState(null),Ae=ce(xe,2),ke=Ae[0],We=Ae[1],_e=d.useRef(null),Pe=nr(function(tt){_e.current=tt,Zi(tt)&&ke!==tt&&We(tt),ge==null||ge.registerSubPopup(Ce,tt)}),ve=d.useState(null),Se=ce(ve,2),qe=Se[0],Ge=Se[1],Xe=d.useRef(null),Ie=nr(function(tt){Zi(tt)&&qe!==tt&&(Ge(tt),Xe.current=tt)}),at=d.Children.only(i),He=(at==null?void 0:at.props)||{},nt={},ht=nr(function(tt){var Mt,Fr,$r=qe;return($r==null?void 0:$r.contains(tt))||((Mt=_s($r))===null||Mt===void 0?void 0:Mt.host)===tt||tt===$r||(ke==null?void 0:ke.contains(tt))||((Fr=_s(ke))===null||Fr===void 0?void 0:Fr.host)===tt||tt===ke||Object.values(me.current).some(function(dr){return(dr==null?void 0:dr.contains(tt))||tt===dr})}),At=t0(a,z,G,V),Et=t0(a,Y,W,K),gt=d.useState(p||!1),fe=ce(gt,2),Oe=fe[0],Me=fe[1],Fe=f??Oe,pe=nr(function(tt){f===void 0&&Me(tt)});Wt(function(){Me(f||!1)},[f]);var Ee=d.useRef(Fe);Ee.current=Fe;var ie=d.useRef([]);ie.current=[];var oe=nr(function(tt){var Mt;pe(tt),((Mt=ie.current[ie.current.length-1])!==null&&Mt!==void 0?Mt:Fe)!==tt&&(ie.current.push(tt),h==null||h(tt))}),be=d.useRef(),le=function(){clearTimeout(be.current)},ze=function(tt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;le(),Mt===0?oe(tt):be.current=setTimeout(function(){oe(tt)},Mt*1e3)};d.useEffect(function(){return le},[]);var Be=d.useState(!1),Ke=ce(Be,2),st=Ke[0],dt=Ke[1];Wt(function(tt){(!tt||Fe)&&dt(!0)},[Fe]);var Ye=d.useState(null),Ze=ce(Ye,2),ot=Ze[0],ft=Ze[1],Nt=d.useState(null),jt=ce(Nt,2),It=jt[0],kt=jt[1],Jt=function(tt){kt([tt.clientX,tt.clientY])},pr=p6(Fe,ke,L&&It!==null?It:qe,B,O,I,J),Le=ce(pr,11),Qe=Le[0],vt=Le[1],Tt=Le[2],Ft=Le[3],yr=Le[4],Cr=Le[5],ct=Le[6],$t=Le[7],Bt=Le[8],Ut=Le[9],Tr=Le[10],Zr=c6(we,s,u,c),xn=ce(Zr,2),on=xn[0],Mr=xn[1],an=on.has("click"),Jr=Mr.has("click")||Mr.has("contextMenu"),zr=nr(function(){st||Tr()}),ln=function(){Ee.current&&L&&Jr&&ze(!1)};m6(Fe,qe,ke,zr,ln),Wt(function(){zr()},[It,B]),Wt(function(){Fe&&!(O!=null&&O[B])&&zr()},[JSON.stringify(I)]);var Ct=d.useMemo(function(){var tt=f6(O,a,Ut,L);return de(tt,_==null?void 0:_(Ut))},[Ut,_,O,a,L]);d.useImperativeHandle(n,function(){return{nativeElement:Xe.current,popupElement:_e.current,forceAlign:zr}});var Je=d.useState(0),bt=ce(Je,2),Lt=bt[0],_t=bt[1],tr=d.useState(0),Dr=ce(tr,2),mr=Dr[0],_r=Dr[1],xr=function(){if(T&&qe){var tt=qe.getBoundingClientRect();_t(tt.width),_r(tt.height)}},Ar=function(){xr(),zr()},wn=function(tt){dt(!1),Tr(),v==null||v(tt)},pt=function(){return new Promise(function(tt){xr(),ft(function(){return tt})})};Wt(function(){ot&&(Tr(),ot(),ft(null))},[ot]);function Dt(tt,Mt,Fr,$r){nt[tt]=function(dr){var Al;$r==null||$r(dr),ze(Mt,Fr);for(var qu=arguments.length,Pm=new Array(qu>1?qu-1:0),Fl=1;Fl<qu;Fl++)Pm[Fl-1]=arguments[Fl];(Al=He[tt])===null||Al===void 0||Al.call.apply(Al,[He,dr].concat(Pm))}}(an||Jr)&&(nt.onClick=function(tt){var Mt;Ee.current&&Jr?ze(!1):!Ee.current&&an&&(Jt(tt),ze(!0));for(var Fr=arguments.length,$r=new Array(Fr>1?Fr-1:0),dr=1;dr<Fr;dr++)$r[dr-1]=arguments[dr];(Mt=He.onClick)===null||Mt===void 0||Mt.call.apply(Mt,[He,tt].concat($r))});var Sr=h6(Fe,Jr,qe,ke,D,k,ht,ze),hr=on.has("hover"),ur=Mr.has("hover"),pn,Wr;hr&&(Dt("onMouseEnter",!0,g,function(tt){Jt(tt)}),Dt("onPointerEnter",!0,g,function(tt){Jt(tt)}),pn=function(tt){(Fe||st)&&ke!==null&&ke!==void 0&&ke.contains(tt.target)&&ze(!0,g)},L&&(nt.onMouseMove=function(tt){var Mt;(Mt=He.onMouseMove)===null||Mt===void 0||Mt.call(He,tt)})),ur&&(Dt("onMouseLeave",!1,b),Dt("onPointerLeave",!1,b),Wr=function(){ze(!1,b)}),on.has("focus")&&Dt("onFocus",!0,y),Mr.has("focus")&&Dt("onBlur",!1,C),on.has("contextMenu")&&(nt.onContextMenu=function(tt){var Mt;Ee.current&&Mr.has("contextMenu")?ze(!1):(Jt(tt),ze(!0)),tt.preventDefault();for(var Fr=arguments.length,$r=new Array(Fr>1?Fr-1:0),dr=1;dr<Fr;dr++)$r[dr-1]=arguments[dr];(Mt=He.onContextMenu)===null||Mt===void 0||Mt.call.apply(Mt,[He,tt].concat($r))}),te&&(nt.className=de(He.className,te));var Pn=d.useRef(!1);Pn.current||(Pn.current=x||Fe||st);var En=H(H({},He),nt),io={},Ol=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Ol.forEach(function(tt){Z[tt]&&(io[tt]=function(){for(var Mt,Fr=arguments.length,$r=new Array(Fr),dr=0;dr<Fr;dr++)$r[dr]=arguments[dr];(Mt=En[tt])===null||Mt===void 0||Mt.call.apply(Mt,[En].concat($r)),Z[tt].apply(Z,$r)})});var Hu=d.cloneElement(at,H(H({},En),io)),Wu={x:Cr,y:ct},Ku=ee?H({},ee!==!0?ee:{}):null;return d.createElement(d.Fragment,null,d.createElement(ao,{disabled:!Fe,ref:Ie,onResize:Ar},d.createElement(u6,{getTriggerDOMNode:U},Hu)),Pn.current&&d.createElement(Qv.Provider,{value:ye},d.createElement(s6,{portal:e,ref:Pe,prefixCls:a,popup:$,className:de(j,Ct),style:F,target:qe,onMouseEnter:pn,onMouseLeave:Wr,onPointerEnter:pn,zIndex:P,open:Fe,keepDom:st,fresh:X,onClick:q,onPointerDownCapture:Sr,mask:D,motion:At,maskMotion:Et,onVisibleChanged:wn,onPrepare:pt,forceRender:x,autoDestroy:re,getPopupContainer:E,align:Ut,arrow:Ku,arrowPos:Wu,ready:Qe,offsetX:vt,offsetY:Tt,offsetR:Ft,offsetB:yr,onAlign:zr,stretch:T,targetWidth:Lt/$t,targetHeight:mr/Bt})))});return t}const Pu=v6(AC);var b6=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],y6=function(e){var t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},C6=function(e,t){var r=e.prefixCls;e.disabled;var n=e.visible,o=e.children,a=e.popupElement,i=e.animation,l=e.transitionName,s=e.dropdownStyle,u=e.dropdownClassName,c=e.direction,f=c===void 0?"ltr":c,p=e.placement,h=e.builtinPlacements,v=e.dropdownMatchSelectWidth,g=e.dropdownRender,m=e.dropdownAlign,b=e.getPopupContainer,y=e.empty,C=e.getTriggerDOMNode,D=e.onPopupVisibleChange,w=e.onPopupMouseEnter,k=yt(e,b6),E="".concat(r,"-dropdown"),x=a;g&&(x=g(a));var A=d.useMemo(function(){return h||y6(v)},[h,v]),N=i?"".concat(E,"-").concat(i):l,$=typeof v=="number",j=d.useMemo(function(){return $?null:v===!1?"minWidth":"width"},[v,$]),F=s;$&&(F=H(H({},F),{},{width:v}));var B=d.useRef(null);return d.useImperativeHandle(t,function(){return{getPopupElement:function(){var S;return(S=B.current)===null||S===void 0?void 0:S.popupElement}}}),d.createElement(Pu,Te({},k,{showAction:D?["click"]:[],hideAction:D?["click"]:[],popupPlacement:p||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:A,prefixCls:E,popupTransitionName:N,popup:d.createElement("div",{onMouseEnter:w},x),ref:B,stretch:j,popupAlign:m,popupVisible:n,getPopupContainer:b,popupClassName:de(u,M({},"".concat(E,"-empty"),y)),popupStyle:F,getTriggerDOMNode:C,onPopupVisibleChange:D}),o)},x6=d.forwardRef(C6);function i0(e,t){var r=e.key,n;return"value"in e&&(n=e.value),r??(n!==void 0?n:"rc-index-key-".concat(t))}function Af(e){return typeof e<"u"&&!Number.isNaN(e)}function GC(e,t){var r=e||{},n=r.label,o=r.value,a=r.options,i=r.groupLabel,l=n||(t?"children":"label");return{label:l,value:o||"value",options:a||"options",groupLabel:i||l}}function w6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.fieldNames,n=t.childrenAsData,o=[],a=GC(r,!1),i=a.label,l=a.value,s=a.options,u=a.groupLabel;function c(f,p){Array.isArray(f)&&f.forEach(function(h){if(p||!(s in h)){var v=h[l];o.push({key:i0(h,o.length),groupOption:p,data:h,label:h[i],value:v})}else{var g=h[u];g===void 0&&n&&(g=h.label),o.push({key:i0(h,o.length),group:!0,data:h,label:g}),c(h[s],!0)}})}return c(e,!1),o}function Ff(e){var t=H({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return lr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var E6=function(e,t,r){if(!t||!t.length)return null;var n=!1,o=function i(l,s){var u=R1(s),c=u[0],f=u.slice(1);if(!c)return[l];var p=l.split(c);return n=n||p.length>1,p.reduce(function(h,v){return[].concat(je(h),je(i(v,f)))},[]).filter(Boolean)},a=o(e,t);return n?typeof r<"u"?a.slice(0,r):a:null},tm=d.createContext(null);function k6(e){var t=e.visible,r=e.values;if(!t)return null;var n=50;return d.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(r.slice(0,n).map(function(o){var a=o.label,i=o.value;return["number","string"].includes(lt(a))?a:i}).join(", ")),r.length>n?", ...":null)}var D6=["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"],S6=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Pf=function(e){return e==="tags"||e==="multiple"},$6=d.forwardRef(function(e,t){var r,n=e.id,o=e.prefixCls,a=e.className,i=e.showSearch,l=e.tagRender,s=e.direction,u=e.omitDomProps,c=e.displayValues,f=e.onDisplayValuesChange,p=e.emptyOptions,h=e.notFoundContent,v=h===void 0?"Not Found":h,g=e.onClear,m=e.mode,b=e.disabled,y=e.loading,C=e.getInputElement,D=e.getRawInputElement,w=e.open,k=e.defaultOpen,E=e.onDropdownVisibleChange,x=e.activeValue,A=e.onActiveValueChange,N=e.activeDescendantId,$=e.searchValue,j=e.autoClearSearchValue,F=e.onSearch,B=e.onSearchSplit,S=e.tokenSeparators,O=e.allowClear,I=e.prefix,P=e.suffixIcon,T=e.clearIcon,_=e.OptionList,X=e.animation,L=e.transitionName,q=e.dropdownStyle,J=e.dropdownClassName,ee=e.dropdownMatchSelectWidth,z=e.dropdownRender,Y=e.dropdownAlign,V=e.placement,G=e.builtinPlacements,K=e.getPopupContainer,W=e.showAction,te=W===void 0?[]:W,U=e.onFocus,Z=e.onBlur,re=e.onKeyUp,ue=e.onKeyDown,he=e.onMouseDown,we=yt(e,D6),Ne=Pf(m),me=(i!==void 0?i:Ne)||m==="combobox",ge=H({},we);S6.forEach(function(Je){delete ge[Je]}),u==null||u.forEach(function(Je){delete ge[Je]});var ye=d.useState(!1),Ce=ce(ye,2),xe=Ce[0],Ae=Ce[1];d.useEffect(function(){Ae(_C())},[]);var ke=d.useRef(null),We=d.useRef(null),_e=d.useRef(null),Pe=d.useRef(null),ve=d.useRef(null),Se=d.useRef(!1),qe=PN(),Ge=ce(qe,3),Xe=Ge[0],Ie=Ge[1],at=Ge[2];d.useImperativeHandle(t,function(){var Je,bt;return{focus:(Je=Pe.current)===null||Je===void 0?void 0:Je.focus,blur:(bt=Pe.current)===null||bt===void 0?void 0:bt.blur,scrollTo:function(Lt){var _t;return(_t=ve.current)===null||_t===void 0?void 0:_t.scrollTo(Lt)},nativeElement:ke.current||We.current}});var He=d.useMemo(function(){var Je;if(m!=="combobox")return $;var bt=(Je=c[0])===null||Je===void 0?void 0:Je.value;return typeof bt=="string"||typeof bt=="number"?String(bt):""},[$,m,c]),nt=m==="combobox"&&typeof C=="function"&&C()||null,ht=typeof D=="function"&&D(),At=sa(We,ht==null||(r=ht.props)===null||r===void 0?void 0:r.ref),Et=d.useState(!1),gt=ce(Et,2),fe=gt[0],Oe=gt[1];Wt(function(){Oe(!0)},[]);var Me=Ur(!1,{defaultValue:k,value:w}),Fe=ce(Me,2),pe=Fe[0],Ee=Fe[1],ie=fe?pe:!1,oe=!v&&p;(b||oe&&ie&&m==="combobox")&&(ie=!1);var be=oe?!1:ie,le=d.useCallback(function(Je){var bt=Je!==void 0?Je:!ie;b||(Ee(bt),ie!==bt&&(E==null||E(bt)))},[b,ie,Ee,E]),ze=d.useMemo(function(){return(S||[]).some(function(Je){return[`
299
+ `,`\r
300
+ `].includes(Je)})},[S]),Be=d.useContext(tm)||{},Ke=Be.maxCount,st=Be.rawValues,dt=function(Je,bt,Lt){if(!(Ne&&Af(Ke)&&(st==null?void 0:st.size)>=Ke)){var _t=!0,tr=Je;A==null||A(null);var Dr=E6(Je,S,Af(Ke)?Ke-st.size:void 0),mr=Lt?null:Dr;return m!=="combobox"&&mr&&(tr="",B==null||B(mr),le(!1),_t=!1),F&&He!==tr&&F(tr,{source:bt?"typing":"effect"}),_t}},Ye=function(Je){!Je||!Je.trim()||F(Je,{source:"submit"})};d.useEffect(function(){!ie&&!Ne&&m!=="combobox"&&dt("",!1,!1)},[ie]),d.useEffect(function(){pe&&b&&Ee(!1),b&&!Se.current&&Ie(!1)},[b]);var Ze=HC(),ot=ce(Ze,2),ft=ot[0],Nt=ot[1],jt=d.useRef(!1),It=function(Je){var bt=ft(),Lt=Je.key,_t=Lt==="Enter";if(_t&&(m!=="combobox"&&Je.preventDefault(),ie||le(!0)),Nt(!!He),Lt==="Backspace"&&!bt&&Ne&&!He&&c.length){for(var tr=je(c),Dr=null,mr=tr.length-1;mr>=0;mr-=1){var _r=tr[mr];if(!_r.disabled){tr.splice(mr,1),Dr=_r;break}}Dr&&f(tr,{type:"remove",values:[Dr]})}for(var xr=arguments.length,Ar=new Array(xr>1?xr-1:0),wn=1;wn<xr;wn++)Ar[wn-1]=arguments[wn];if(ie&&(!_t||!jt.current)){var pt;_t&&(jt.current=!0),(pt=ve.current)===null||pt===void 0||pt.onKeyDown.apply(pt,[Je].concat(Ar))}ue==null||ue.apply(void 0,[Je].concat(Ar))},kt=function(Je){for(var bt=arguments.length,Lt=new Array(bt>1?bt-1:0),_t=1;_t<bt;_t++)Lt[_t-1]=arguments[_t];if(ie){var tr;(tr=ve.current)===null||tr===void 0||tr.onKeyUp.apply(tr,[Je].concat(Lt))}Je.key==="Enter"&&(jt.current=!1),re==null||re.apply(void 0,[Je].concat(Lt))},Jt=function(Je){var bt=c.filter(function(Lt){return Lt!==Je});f(bt,{type:"remove",values:[Je]})},pr=function(){jt.current=!1},Le=d.useRef(!1),Qe=function(){Ie(!0),b||(U&&!Le.current&&U.apply(void 0,arguments),te.includes("focus")&&le(!0)),Le.current=!0},vt=function(){Se.current=!0,Ie(!1,function(){Le.current=!1,Se.current=!1,le(!1)}),!b&&(He&&(m==="tags"?F(He,{source:"submit"}):m==="multiple"&&F("",{source:"blur"})),Z&&Z.apply(void 0,arguments))},Tt=[];d.useEffect(function(){return function(){Tt.forEach(function(Je){return clearTimeout(Je)}),Tt.splice(0,Tt.length)}},[]);var Ft=function(Je){var bt,Lt=Je.target,_t=(bt=_e.current)===null||bt===void 0?void 0:bt.getPopupElement();if(_t&&_t.contains(Lt)){var tr=setTimeout(function(){var xr=Tt.indexOf(tr);if(xr!==-1&&Tt.splice(xr,1),at(),!xe&&!_t.contains(document.activeElement)){var Ar;(Ar=Pe.current)===null||Ar===void 0||Ar.focus()}});Tt.push(tr)}for(var Dr=arguments.length,mr=new Array(Dr>1?Dr-1:0),_r=1;_r<Dr;_r++)mr[_r-1]=arguments[_r];he==null||he.apply(void 0,[Je].concat(mr))},yr=d.useState({}),Cr=ce(yr,2),ct=Cr[1];function $t(){ct({})}var Bt;ht&&(Bt=function(Je){le(Je)}),NN(function(){var Je;return[ke.current,(Je=_e.current)===null||Je===void 0?void 0:Je.getPopupElement()]},be,le,!!ht);var Ut=d.useMemo(function(){return H(H({},e),{},{notFoundContent:v,open:ie,triggerOpen:be,id:n,showSearch:me,multiple:Ne,toggleOpen:le})},[e,v,be,ie,n,me,Ne,le]),Tr=!!P||y,Zr;Tr&&(Zr=d.createElement(Fu,{className:de("".concat(o,"-arrow"),M({},"".concat(o,"-arrow-loading"),y)),customizeIcon:P,customizeIconProps:{loading:y,searchValue:He,open:ie,focused:Xe,showSearch:me}}));var xn=function(){var Je;g==null||g(),(Je=Pe.current)===null||Je===void 0||Je.focus(),f([],{type:"clear",values:c}),dt("",!1,!1)},on=AN(o,xn,c,O,T,b,He,m),Mr=on.allowClear,an=on.clearIcon,Jr=d.createElement(_,{ref:ve}),zr=de(o,a,M(M(M(M(M(M(M(M(M(M({},"".concat(o,"-focused"),Xe),"".concat(o,"-multiple"),Ne),"".concat(o,"-single"),!Ne),"".concat(o,"-allow-clear"),O),"".concat(o,"-show-arrow"),Tr),"".concat(o,"-disabled"),b),"".concat(o,"-loading"),y),"".concat(o,"-open"),ie),"".concat(o,"-customize-input"),nt),"".concat(o,"-show-search"),me)),ln=d.createElement(x6,{ref:_e,disabled:b,prefixCls:o,visible:be,popupElement:Jr,animation:X,transitionName:L,dropdownStyle:q,dropdownClassName:J,direction:s,dropdownMatchSelectWidth:ee,dropdownRender:z,dropdownAlign:Y,placement:V,builtinPlacements:G,getPopupContainer:K,empty:p,getTriggerDOMNode:function(Je){return We.current||Je},onPopupVisibleChange:Bt,onPopupMouseEnter:$t},ht?d.cloneElement(ht,{ref:At}):d.createElement(o6,Te({},e,{domRef:We,prefixCls:o,inputElement:nt,ref:Pe,id:n,prefix:I,showSearch:me,autoClearSearchValue:j,mode:m,activeDescendantId:N,tagRender:l,values:c,open:ie,onToggleOpen:le,activeValue:x,searchValue:He,onSearch:dt,onSearchSubmit:Ye,onRemove:Jt,tokenWithEnter:ze,onInputBlur:pr}))),Ct;return ht?Ct=ln:Ct=d.createElement("div",Te({className:zr},ge,{ref:ke,onMouseDown:Ft,onKeyDown:It,onKeyUp:kt,onFocus:Qe,onBlur:vt}),d.createElement(k6,{visible:Xe&&!ie,values:c}),ln,Zr,Mr&&an),d.createElement(LC.Provider,{value:Ut},Ct)}),rm=function(){return null};rm.isSelectOptGroup=!0;var nm=function(){return null};nm.isSelectOption=!0;var YC=d.forwardRef(function(e,t){var r=e.height,n=e.offsetY,o=e.offsetX,a=e.children,i=e.prefixCls,l=e.onInnerResize,s=e.innerProps,u=e.rtl,c=e.extra,f={},p={display:"flex",flexDirection:"column"};return n!==void 0&&(f={height:r,position:"relative",overflow:"hidden"},p=H(H({},p),{},M(M(M(M(M({transform:"translateY(".concat(n,"px)")},u?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),d.createElement("div",{style:f},d.createElement(ao,{onResize:function(h){var v=h.offsetHeight;v&&l&&l()}},d.createElement("div",Te({style:p,className:de(M({},"".concat(i,"-holder-inner"),i)),ref:t},s),a,c)))});YC.displayName="Filler";function B6(e){var t=e.children,r=e.setRef,n=d.useCallback(function(o){r(o)},[]);return d.cloneElement(t,{ref:n})}function O6(e,t,r,n,o,a,i,l){var s=l.getKey;return e.slice(t,r+1).map(function(u,c){var f=t+c,p=i(u,f,{style:{width:n},offsetX:o}),h=s(u);return d.createElement(B6,{key:h,setRef:function(v){return a(u,v)}},p)})}function A6(e,t,r){var n=e.length,o=t.length,a,i;if(n===0&&o===0)return null;n<o?(a=e,i=t):(a=t,i=e);var l={__EMPTY_ITEM__:!0};function s(v){return v!==void 0?r(v):l}for(var u=null,c=Math.abs(n-o)!==1,f=0;f<i.length;f+=1){var p=s(a[f]),h=s(i[f]);if(p!==h){u=f,c=c||p!==s(i[f+1]);break}}return u===null?null:{index:u,multiple:c}}function F6(e,t,r){var n=d.useState(e),o=ce(n,2),a=o[0],i=o[1],l=d.useState(null),s=ce(l,2),u=s[0],c=s[1];return d.useEffect(function(){var f=A6(a||[],e||[],t);(f==null?void 0:f.index)!==void 0&&c(e[f.index]),i(e)},[e]),[u]}var l0=(typeof navigator>"u"?"undefined":lt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const ZC=(function(e,t,r,n){var o=Ve(!1),a=Ve(null);function i(){clearTimeout(a.current),o.current=!0,a.current=setTimeout(function(){o.current=!1},50)}var l=Ve({top:e,bottom:t,left:r,right:n});return l.current.top=e,l.current.bottom=t,l.current.left=r,l.current.right=n,function(s,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=s?u<0&&l.current.left||u>0&&l.current.right:u<0&&l.current.top||u>0&&l.current.bottom;return c&&f?(clearTimeout(a.current),o.current=!1):(!f||o.current)&&i(),!o.current&&f}});function P6(e,t,r,n,o,a,i){var l=Ve(0),s=Ve(null),u=Ve(null),c=Ve(!1),f=ZC(t,r,n,o);function p(y,C){if(qt.cancel(s.current),!f(!1,C)){var D=y;if(!D._virtualHandled)D._virtualHandled=!0;else return;l.current+=C,u.current=C,l0||D.preventDefault(),s.current=qt(function(){var w=c.current?10:1;i(l.current*w,!1),l.current=0})}}function h(y,C){i(C,!0),l0||y.preventDefault()}var v=Ve(null),g=Ve(null);function m(y){if(e){qt.cancel(g.current),g.current=qt(function(){v.current=null},2);var C=y.deltaX,D=y.deltaY,w=y.shiftKey,k=C,E=D;(v.current==="sx"||!v.current&&w&&D&&!C)&&(k=D,E=0,v.current="sx");var x=Math.abs(k),A=Math.abs(E);v.current===null&&(v.current=a&&x>A?"x":"y"),v.current==="y"?p(y,E):h(y,k)}}function b(y){e&&(c.current=y.detail===u.current)}return[m,b]}function N6(e,t,r,n){var o=d.useMemo(function(){return[new Map,[]]},[e,r.id,n]),a=ce(o,2),i=a[0],l=a[1],s=function(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=i.get(u),p=i.get(c);if(f===void 0||p===void 0)for(var h=e.length,v=l.length;v<h;v+=1){var g,m=e[v],b=t(m);i.set(b,v);var y=(g=r.get(b))!==null&&g!==void 0?g:n;if(l[v]=(l[v-1]||0)+y,b===u&&(f=v),b===c&&(p=v),f!==void 0&&p!==void 0)break}return{top:l[f-1]||0,bottom:l[p]}};return s}var j6=(function(){function e(){vr(this,e),M(this,"maps",void 0),M(this,"id",0),M(this,"diffRecords",new Map),this.maps=Object.create(null)}return br(e,[{key:"set",value:function(t,r){this.diffRecords.set(t,this.maps[t]),this.maps[t]=r,this.id+=1}},{key:"get",value:function(t){return this.maps[t]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e})();function s0(e){var t=parseFloat(e);return isNaN(t)?0:t}function I6(e,t,r){var n=d.useState(0),o=ce(n,2),a=o[0],i=o[1],l=Ve(new Map),s=Ve(new j6),u=Ve(0);function c(){u.current+=1}function f(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;c();var v=function(){var m=!1;l.current.forEach(function(b,y){if(b&&b.offsetParent){var C=b.offsetHeight,D=getComputedStyle(b),w=D.marginTop,k=D.marginBottom,E=s0(w),x=s0(k),A=C+E+x;s.current.get(y)!==A&&(s.current.set(y,A),m=!0)}}),m&&i(function(b){return b+1})};if(h)v();else{u.current+=1;var g=u.current;Promise.resolve().then(function(){g===u.current&&v()})}}function p(h,v){var g=e(h);l.current.get(g),v?(l.current.set(g,v),f()):l.current.delete(g)}return Ot(function(){return c},[]),[p,f,s.current,a]}var u0=14/15;function R6(e,t,r){var n=Ve(!1),o=Ve(0),a=Ve(0),i=Ve(null),l=Ve(null),s,u=function(p){if(n.current){var h=Math.ceil(p.touches[0].pageX),v=Math.ceil(p.touches[0].pageY),g=o.current-h,m=a.current-v,b=Math.abs(g)>Math.abs(m);b?o.current=h:a.current=v;var y=r(b,b?g:m,!1,p);y&&p.preventDefault(),clearInterval(l.current),y&&(l.current=setInterval(function(){b?g*=u0:m*=u0;var C=Math.floor(b?g:m);(!r(b,C,!0)||Math.abs(C)<=.1)&&clearInterval(l.current)},16))}},c=function(){n.current=!1,s()},f=function(p){s(),p.touches.length===1&&!n.current&&(n.current=!0,o.current=Math.ceil(p.touches[0].pageX),a.current=Math.ceil(p.touches[0].pageY),i.current=p.target,i.current.addEventListener("touchmove",u,{passive:!1}),i.current.addEventListener("touchend",c,{passive:!0}))};s=function(){i.current&&(i.current.removeEventListener("touchmove",u),i.current.removeEventListener("touchend",c))},Wt(function(){return e&&t.current.addEventListener("touchstart",f,{passive:!0}),function(){var p;(p=t.current)===null||p===void 0||p.removeEventListener("touchstart",f),s(),clearInterval(l.current)}},[e])}function c0(e){return Math.floor(Math.pow(e,.5))}function Nf(e,t){var r="touches"in e?e.touches[0]:e;return r[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function T6(e,t,r){d.useEffect(function(){var n=t.current;if(e&&n){var o=!1,a,i,l=function(){qt.cancel(a)},s=function p(){l(),a=qt(function(){r(i),p()})},u=function(p){if(!(p.target.draggable||p.button!==0)){var h=p;h._virtualHandled||(h._virtualHandled=!0,o=!0)}},c=function(){o=!1,l()},f=function(p){if(o){var h=Nf(p,!1),v=n.getBoundingClientRect(),g=v.top,m=v.bottom;if(h<=g){var b=g-h;i=-c0(b),s()}else if(h>=m){var y=h-m;i=c0(y),s()}else l()}};return n.addEventListener("mousedown",u),n.ownerDocument.addEventListener("mouseup",c),n.ownerDocument.addEventListener("mousemove",f),function(){n.removeEventListener("mousedown",u),n.ownerDocument.removeEventListener("mouseup",c),n.ownerDocument.removeEventListener("mousemove",f),l()}}},[e])}var M6=10;function z6(e,t,r,n,o,a,i,l){var s=d.useRef(),u=d.useState(null),c=ce(u,2),f=c[0],p=c[1];return Wt(function(){if(f&&f.times<M6){if(!e.current){p(function(T){return H({},T)});return}a();var h=f.targetAlign,v=f.originAlign,g=f.index,m=f.offset,b=e.current.clientHeight,y=!1,C=h,D=null;if(b){for(var w=h||v,k=0,E=0,x=0,A=Math.min(t.length-1,g),N=0;N<=A;N+=1){var $=o(t[N]);E=k;var j=r.get($);x=E+(j===void 0?n:j),k=x}for(var F=w==="top"?m:b-m,B=A;B>=0;B-=1){var S=o(t[B]),O=r.get(S);if(O===void 0){y=!0;break}if(F-=O,F<=0)break}switch(w){case"top":D=E-m;break;case"bottom":D=x-b+m;break;default:{var I=e.current.scrollTop,P=I+b;E<I?C="top":x>P&&(C="bottom")}}D!==null&&i(D),D!==f.lastTop&&(y=!0)}y&&p(H(H({},f),{},{times:f.times+1,targetAlign:C,lastTop:D}))}},[f,e.current]),function(h){if(h==null){l();return}if(qt.cancel(s.current),typeof h=="number")i(h);else if(h&&lt(h)==="object"){var v,g=h.align;"index"in h?v=h.index:v=t.findIndex(function(y){return o(y)===h.key});var m=h.offset,b=m===void 0?0:m;p({times:0,index:v,offset:b,originAlign:g})}}}var d0=d.forwardRef(function(e,t){var r=e.prefixCls,n=e.rtl,o=e.scrollOffset,a=e.scrollRange,i=e.onStartMove,l=e.onStopMove,s=e.onScroll,u=e.horizontal,c=e.spinSize,f=e.containerSize,p=e.style,h=e.thumbStyle,v=e.showScrollBar,g=d.useState(!1),m=ce(g,2),b=m[0],y=m[1],C=d.useState(null),D=ce(C,2),w=D[0],k=D[1],E=d.useState(null),x=ce(E,2),A=x[0],N=x[1],$=!n,j=d.useRef(),F=d.useRef(),B=d.useState(v),S=ce(B,2),O=S[0],I=S[1],P=d.useRef(),T=function(){v===!0||v===!1||(clearTimeout(P.current),I(!0),P.current=setTimeout(function(){I(!1)},3e3))},_=a-f||0,X=f-c||0,L=d.useMemo(function(){if(o===0||_===0)return 0;var W=o/_;return W*X},[o,_,X]),q=function(W){W.stopPropagation(),W.preventDefault()},J=d.useRef({top:L,dragging:b,pageY:w,startTop:A});J.current={top:L,dragging:b,pageY:w,startTop:A};var ee=function(W){y(!0),k(Nf(W,u)),N(J.current.top),i(),W.stopPropagation(),W.preventDefault()};d.useEffect(function(){var W=function(Z){Z.preventDefault()},te=j.current,U=F.current;return te.addEventListener("touchstart",W,{passive:!1}),U.addEventListener("touchstart",ee,{passive:!1}),function(){te.removeEventListener("touchstart",W),U.removeEventListener("touchstart",ee)}},[]);var z=d.useRef();z.current=_;var Y=d.useRef();Y.current=X,d.useEffect(function(){if(b){var W,te=function(Z){var re=J.current,ue=re.dragging,he=re.pageY,we=re.startTop;qt.cancel(W);var Ne=j.current.getBoundingClientRect(),me=f/(u?Ne.width:Ne.height);if(ue){var ge=(Nf(Z,u)-he)*me,ye=we;!$&&u?ye-=ge:ye+=ge;var Ce=z.current,xe=Y.current,Ae=xe?ye/xe:0,ke=Math.ceil(Ae*Ce);ke=Math.max(ke,0),ke=Math.min(ke,Ce),W=qt(function(){s(ke,u)})}},U=function(){y(!1),l()};return window.addEventListener("mousemove",te,{passive:!0}),window.addEventListener("touchmove",te,{passive:!0}),window.addEventListener("mouseup",U,{passive:!0}),window.addEventListener("touchend",U,{passive:!0}),function(){window.removeEventListener("mousemove",te),window.removeEventListener("touchmove",te),window.removeEventListener("mouseup",U),window.removeEventListener("touchend",U),qt.cancel(W)}}},[b]),d.useEffect(function(){return T(),function(){clearTimeout(P.current)}},[o]),d.useImperativeHandle(t,function(){return{delayHidden:T}});var V="".concat(r,"-scrollbar"),G={position:"absolute",visibility:O?null:"hidden"},K={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return u?(Object.assign(G,{height:8,left:0,right:0,bottom:0}),Object.assign(K,M({height:"100%",width:c},$?"left":"right",L))):(Object.assign(G,M({width:8,top:0,bottom:0},$?"right":"left",0)),Object.assign(K,{width:"100%",height:c,top:L})),d.createElement("div",{ref:j,className:de(V,M(M(M({},"".concat(V,"-horizontal"),u),"".concat(V,"-vertical"),!u),"".concat(V,"-visible"),O)),style:H(H({},G),p),onMouseDown:q,onMouseMove:T},d.createElement("div",{ref:F,className:de("".concat(V,"-thumb"),M({},"".concat(V,"-thumb-moving"),b)),style:H(H({},K),h),onMouseDown:ee}))}),_6=20;function f0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=e/t*e;return isNaN(r)&&(r=0),r=Math.max(r,_6),Math.floor(r)}var L6=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],H6=[],W6={overflowY:"auto",overflowAnchor:"none"};function K6(e,t){var r=e.prefixCls,n=r===void 0?"rc-virtual-list":r,o=e.className,a=e.height,i=e.itemHeight,l=e.fullHeight,s=l===void 0?!0:l,u=e.style,c=e.data,f=e.children,p=e.itemKey,h=e.virtual,v=e.direction,g=e.scrollWidth,m=e.component,b=m===void 0?"div":m,y=e.onScroll,C=e.onVirtualScroll,D=e.onVisibleChange,w=e.innerProps,k=e.extraRender,E=e.styles,x=e.showScrollBar,A=x===void 0?"optional":x,N=yt(e,L6),$=d.useCallback(function(Le){return typeof p=="function"?p(Le):Le==null?void 0:Le[p]},[p]),j=I6($),F=ce(j,4),B=F[0],S=F[1],O=F[2],I=F[3],P=!!(h!==!1&&a&&i),T=d.useMemo(function(){return Object.values(O.maps).reduce(function(Le,Qe){return Le+Qe},0)},[O.id,O.maps]),_=P&&c&&(Math.max(i*c.length,T)>a||!!g),X=v==="rtl",L=de(n,M({},"".concat(n,"-rtl"),X),o),q=c||H6,J=Ve(),ee=Ve(),z=Ve(),Y=xt(0),V=ce(Y,2),G=V[0],K=V[1],W=xt(0),te=ce(W,2),U=te[0],Z=te[1],re=xt(!1),ue=ce(re,2),he=ue[0],we=ue[1],Ne=function(){we(!0)},me=function(){we(!1)},ge={getKey:$};function ye(Le){K(function(Qe){var vt;typeof Le=="function"?vt=Le(Qe):vt=Le;var Tt=Oe(vt);return J.current.scrollTop=Tt,Tt})}var Ce=Ve({start:0,end:q.length}),xe=Ve(),Ae=F6(q,$),ke=ce(Ae,1),We=ke[0];xe.current=We;var _e=d.useMemo(function(){if(!P)return{scrollHeight:void 0,start:0,end:q.length-1,offset:void 0};if(!_){var Le;return{scrollHeight:((Le=ee.current)===null||Le===void 0?void 0:Le.offsetHeight)||0,start:0,end:q.length-1,offset:void 0}}for(var Qe=0,vt,Tt,Ft,yr=q.length,Cr=0;Cr<yr;Cr+=1){var ct=q[Cr],$t=$(ct),Bt=O.get($t),Ut=Qe+(Bt===void 0?i:Bt);Ut>=G&&vt===void 0&&(vt=Cr,Tt=Qe),Ut>G+a&&Ft===void 0&&(Ft=Cr),Qe=Ut}return vt===void 0&&(vt=0,Tt=0,Ft=Math.ceil(a/i)),Ft===void 0&&(Ft=q.length-1),Ft=Math.min(Ft+1,q.length-1),{scrollHeight:Qe,start:vt,end:Ft,offset:Tt}},[_,P,G,q,I,a]),Pe=_e.scrollHeight,ve=_e.start,Se=_e.end,qe=_e.offset;Ce.current.start=ve,Ce.current.end=Se,d.useLayoutEffect(function(){var Le=O.getRecord();if(Le.size===1){var Qe=Array.from(Le.keys())[0],vt=Le.get(Qe),Tt=q[ve];if(Tt&&vt===void 0){var Ft=$(Tt);if(Ft===Qe){var yr=O.get(Qe),Cr=yr-i;ye(function(ct){return ct+Cr})}}}O.resetRecord()},[Pe]);var Ge=d.useState({width:0,height:a}),Xe=ce(Ge,2),Ie=Xe[0],at=Xe[1],He=function(Le){at({width:Le.offsetWidth,height:Le.offsetHeight})},nt=Ve(),ht=Ve(),At=d.useMemo(function(){return f0(Ie.width,g)},[Ie.width,g]),Et=d.useMemo(function(){return f0(Ie.height,Pe)},[Ie.height,Pe]),gt=Pe-a,fe=Ve(gt);fe.current=gt;function Oe(Le){var Qe=Le;return Number.isNaN(fe.current)||(Qe=Math.min(Qe,fe.current)),Qe=Math.max(Qe,0),Qe}var Me=G<=0,Fe=G>=gt,pe=U<=0,Ee=U>=g,ie=ZC(Me,Fe,pe,Ee),oe=function(){return{x:X?-U:U,y:G}},be=Ve(oe()),le=nr(function(Le){if(C){var Qe=H(H({},oe()),Le);(be.current.x!==Qe.x||be.current.y!==Qe.y)&&(C(Qe),be.current=Qe)}});function ze(Le,Qe){var vt=Le;Qe?(ud(function(){Z(vt)}),le()):ye(vt)}function Be(Le){var Qe=Le.currentTarget.scrollTop;Qe!==G&&ye(Qe),y==null||y(Le),le()}var Ke=function(Le){var Qe=Le,vt=g?g-Ie.width:0;return Qe=Math.max(Qe,0),Qe=Math.min(Qe,vt),Qe},st=nr(function(Le,Qe){Qe?(ud(function(){Z(function(vt){var Tt=vt+(X?-Le:Le);return Ke(Tt)})}),le()):ye(function(vt){var Tt=vt+Le;return Tt})}),dt=P6(P,Me,Fe,pe,Ee,!!g,st),Ye=ce(dt,2),Ze=Ye[0],ot=Ye[1];R6(P,J,function(Le,Qe,vt,Tt){var Ft=Tt;return ie(Le,Qe,vt)?!1:!Ft||!Ft._virtualHandled?(Ft&&(Ft._virtualHandled=!0),Ze({preventDefault:function(){},deltaX:Le?Qe:0,deltaY:Le?0:Qe}),!0):!1}),T6(_,J,function(Le){ye(function(Qe){return Qe+Le})}),Wt(function(){function Le(vt){var Tt=Me&&vt.detail<0,Ft=Fe&&vt.detail>0;P&&!Tt&&!Ft&&vt.preventDefault()}var Qe=J.current;return Qe.addEventListener("wheel",Ze,{passive:!1}),Qe.addEventListener("DOMMouseScroll",ot,{passive:!0}),Qe.addEventListener("MozMousePixelScroll",Le,{passive:!1}),function(){Qe.removeEventListener("wheel",Ze),Qe.removeEventListener("DOMMouseScroll",ot),Qe.removeEventListener("MozMousePixelScroll",Le)}},[P,Me,Fe]),Wt(function(){if(g){var Le=Ke(U);Z(Le),le({x:Le})}},[Ie.width,g]);var ft=function(){var Le,Qe;(Le=nt.current)===null||Le===void 0||Le.delayHidden(),(Qe=ht.current)===null||Qe===void 0||Qe.delayHidden()},Nt=z6(J,q,O,i,$,function(){return S(!0)},ye,ft);d.useImperativeHandle(t,function(){return{nativeElement:z.current,getScrollInfo:oe,scrollTo:function(Le){function Qe(vt){return vt&&lt(vt)==="object"&&("left"in vt||"top"in vt)}Qe(Le)?(Le.left!==void 0&&Z(Ke(Le.left)),Nt(Le.top)):Nt(Le)}}}),Wt(function(){if(D){var Le=q.slice(ve,Se+1);D(Le,q)}},[ve,Se,q]);var jt=N6(q,$,O,i),It=k==null?void 0:k({start:ve,end:Se,virtual:_,offsetX:U,offsetY:qe,rtl:X,getSize:jt}),kt=O6(q,ve,Se,g,U,B,f,ge),Jt=null;a&&(Jt=H(M({},s?"height":"maxHeight",a),W6),P&&(Jt.overflowY="hidden",g&&(Jt.overflowX="hidden"),he&&(Jt.pointerEvents="none")));var pr={};return X&&(pr.dir="rtl"),d.createElement("div",Te({ref:z,style:H(H({},u),{},{position:"relative"}),className:L},pr,N),d.createElement(ao,{onResize:He},d.createElement(b,{className:"".concat(n,"-holder"),style:Jt,ref:J,onScroll:Be,onMouseEnter:ft},d.createElement(YC,{prefixCls:n,height:Pe,offsetX:U,offsetY:qe,scrollWidth:g,onInnerResize:S,ref:ee,innerProps:w,rtl:X,extra:It},kt))),_&&Pe>a&&d.createElement(d0,{ref:nt,prefixCls:n,scrollOffset:G,scrollRange:Pe,rtl:X,onScroll:ze,onStartMove:Ne,onStopMove:me,spinSize:Et,containerSize:Ie.height,style:E==null?void 0:E.verticalScrollBar,thumbStyle:E==null?void 0:E.verticalScrollBarThumb,showScrollBar:A}),_&&g>Ie.width&&d.createElement(d0,{ref:ht,prefixCls:n,scrollOffset:U,scrollRange:g,rtl:X,onScroll:ze,onStartMove:Ne,onStopMove:me,spinSize:At,containerSize:Ie.width,horizontal:!0,style:E==null?void 0:E.horizontalScrollBar,thumbStyle:E==null?void 0:E.horizontalScrollBarThumb,showScrollBar:A}))}var Nu=d.forwardRef(K6);Nu.displayName="List";function q6(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var V6=["disabled","title","children","style","className"];function p0(e){return typeof e=="string"||typeof e=="number"}var U6=function(e,t){var r=FN(),n=r.prefixCls,o=r.id,a=r.open,i=r.multiple,l=r.mode,s=r.searchValue,u=r.toggleOpen,c=r.notFoundContent,f=r.onPopupScroll,p=d.useContext(tm),h=p.maxCount,v=p.flattenOptions,g=p.onActiveValue,m=p.defaultActiveFirstOption,b=p.onSelect,y=p.menuItemSelectedIcon,C=p.rawValues,D=p.fieldNames,w=p.virtual,k=p.direction,E=p.listHeight,x=p.listItemHeight,A=p.optionRender,N="".concat(n,"-item"),$=la(function(){return v},[a,v],function(K,W){return W[0]&&K[1]!==W[1]}),j=d.useRef(null),F=d.useMemo(function(){return i&&Af(h)&&(C==null?void 0:C.size)>=h},[i,h,C==null?void 0:C.size]),B=function(K){K.preventDefault()},S=function(K){var W;(W=j.current)===null||W===void 0||W.scrollTo(typeof K=="number"?{index:K}:K)},O=d.useCallback(function(K){return l==="combobox"?!1:C.has(K)},[l,je(C).toString(),C.size]),I=function(K){for(var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,te=$.length,U=0;U<te;U+=1){var Z=(K+U*W+te)%te,re=$[Z]||{},ue=re.group,he=re.data;if(!ue&&!(he!=null&&he.disabled)&&(O(he.value)||!F))return Z}return-1},P=d.useState(function(){return I(0)}),T=ce(P,2),_=T[0],X=T[1],L=function(K){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;X(K);var te={source:W?"keyboard":"mouse"},U=$[K];if(!U){g(null,-1,te);return}g(U.value,K,te)};Ot(function(){L(m!==!1?I(0):-1)},[$.length,s]);var q=d.useCallback(function(K){return l==="combobox"?String(K).toLowerCase()===s.toLowerCase():C.has(K)},[l,s,je(C).toString(),C.size]);Ot(function(){var K=setTimeout(function(){if(!i&&a&&C.size===1){var te=Array.from(C)[0],U=$.findIndex(function(Z){var re=Z.data;return s?String(re.value).startsWith(s):re.value===te});U!==-1&&(L(U),S(U))}});if(a){var W;(W=j.current)===null||W===void 0||W.scrollTo(void 0)}return function(){return clearTimeout(K)}},[a,s]);var J=function(K){K!==void 0&&b(K,{selected:!C.has(K)}),i||u(!1)};if(d.useImperativeHandle(t,function(){return{onKeyDown:function(K){var W=K.which,te=K.ctrlKey;switch(W){case rt.N:case rt.P:case rt.UP:case rt.DOWN:{var U=0;if(W===rt.UP?U=-1:W===rt.DOWN?U=1:q6()&&te&&(W===rt.N?U=1:W===rt.P&&(U=-1)),U!==0){var Z=I(_+U,U);S(Z),L(Z,!0)}break}case rt.TAB:case rt.ENTER:{var re,ue=$[_];ue&&!(ue!=null&&(re=ue.data)!==null&&re!==void 0&&re.disabled)&&!F?J(ue.value):J(void 0),a&&K.preventDefault();break}case rt.ESC:u(!1),a&&K.stopPropagation()}},onKeyUp:function(){},scrollTo:function(K){S(K)}}}),$.length===0)return d.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(N,"-empty"),onMouseDown:B},c);var ee=Object.keys(D).map(function(K){return D[K]}),z=function(K){return K.label};function Y(K,W){var te=K.group;return{role:te?"presentation":"option",id:"".concat(o,"_list_").concat(W)}}var V=function(K){var W=$[K];if(!W)return null;var te=W.data||{},U=te.value,Z=W.group,re=Qn(te,!0),ue=z(W);return W?d.createElement("div",Te({"aria-label":typeof ue=="string"&&!Z?ue:null},re,{key:K},Y(W,K),{"aria-selected":q(U)}),U):null},G={role:"listbox",id:"".concat(o,"_list")};return d.createElement(d.Fragment,null,w&&d.createElement("div",Te({},G,{style:{height:0,width:0,overflow:"hidden"}}),V(_-1),V(_),V(_+1)),d.createElement(Nu,{itemKey:"key",ref:j,data:$,height:E,itemHeight:x,fullHeight:!1,onMouseDown:B,onScroll:f,virtual:w,direction:k,innerProps:w?null:G},function(K,W){var te=K.group,U=K.groupOption,Z=K.data,re=K.label,ue=K.value,he=Z.key;if(te){var we,Ne=(we=Z.title)!==null&&we!==void 0?we:p0(re)?re.toString():void 0;return d.createElement("div",{className:de(N,"".concat(N,"-group"),Z.className),title:Ne},re!==void 0?re:he)}var me=Z.disabled,ge=Z.title;Z.children;var ye=Z.style,Ce=Z.className,xe=yt(Z,V6),Ae=fn(xe,ee),ke=O(ue),We=me||!ke&&F,_e="".concat(N,"-option"),Pe=de(N,_e,Ce,M(M(M(M({},"".concat(_e,"-grouped"),U),"".concat(_e,"-active"),_===W&&!We),"".concat(_e,"-disabled"),We),"".concat(_e,"-selected"),ke)),ve=z(K),Se=!y||typeof y=="function"||ke,qe=typeof ve=="number"?ve:ve||ue,Ge=p0(qe)?qe.toString():void 0;return ge!==void 0&&(Ge=ge),d.createElement("div",Te({},Qn(Ae),w?{}:Y(K,W),{"aria-selected":q(ue),className:Pe,title:Ge,onMouseMove:function(){_===W||We||L(W)},onClick:function(){We||J(ue)},style:ye}),d.createElement("div",{className:"".concat(_e,"-content")},typeof A=="function"?A(K,{index:W}):qe),d.isValidElement(y)||ke,Se&&d.createElement(Fu,{className:"".concat(N,"-option-state"),customizeIcon:y,customizeIconProps:{value:ue,disabled:We,isSelected:ke}},ke?"\u2713":null))}))},X6=d.forwardRef(U6);const G6=(function(e,t){var r=d.useRef({values:new Map,options:new Map}),n=d.useMemo(function(){var a=r.current,i=a.values,l=a.options,s=e.map(function(f){if(f.label===void 0){var p;return H(H({},f),{},{label:(p=i.get(f.value))===null||p===void 0?void 0:p.label})}return f}),u=new Map,c=new Map;return s.forEach(function(f){u.set(f.value,f),c.set(f.value,t.get(f.value)||l.get(f.value))}),r.current.values=u,r.current.options=c,s},[e,t]),o=d.useCallback(function(a){return t.get(a)||r.current.options.get(a)},[t]);return[n,o]});function Vc(e,t){return UC(e).join("").toUpperCase().includes(t)}const Y6=(function(e,t,r,n,o){return d.useMemo(function(){if(!r||n===!1)return e;var a=t.options,i=t.label,l=t.value,s=[],u=typeof n=="function",c=r.toUpperCase(),f=u?n:function(h,v){return o?Vc(v[o],c):v[a]?Vc(v[i!=="children"?i:"label"],c):Vc(v[l],c)},p=u?function(h){return Ff(h)}:function(h){return h};return e.forEach(function(h){if(h[a]){var v=f(r,p(h));if(v)s.push(h);else{var g=h[a].filter(function(m){return f(r,p(m))});g.length&&s.push(H(H({},h),{},M({},a,g)))}return}f(r,p(h))&&s.push(h)}),s},[e,n,o,r,t])});var m0=0,Z6=Xr();function J6(){var e;return Z6?(e=m0,m0+=1):e="TEST_OR_SSR",e}function Q6(e){var t=d.useState(),r=ce(t,2),n=r[0],o=r[1];return d.useEffect(function(){o("rc_select_".concat(J6()))},[]),e||n}var ej=["children","value"],tj=["children"];function rj(e){var t=e,r=t.key,n=t.props,o=n.children,a=n.value,i=yt(n,ej);return H({key:r,value:a!==void 0?a:r,children:o},i)}function JC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ln(e).map(function(r,n){if(!d.isValidElement(r)||!r.type)return null;var o=r,a=o.type.isSelectOptGroup,i=o.key,l=o.props,s=l.children,u=yt(l,tj);return t||!a?rj(r):H(H({key:"__RC_SELECT_GRP__".concat(i===null?n:i,"__"),label:i},u),{},{options:JC(s)})}).filter(function(r){return r})}var nj=function(e,t,r,n,o){return d.useMemo(function(){var a=e,i=!e;i&&(a=JC(t));var l=new Map,s=new Map,u=function(f,p,h){h&&typeof h=="string"&&f.set(p[h],p)},c=function f(p){for(var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<p.length;v+=1){var g=p[v];!g[r.options]||h?(l.set(g[r.value],g),u(s,g,r.label),u(s,g,n),u(s,g,o)):f(g[r.options],!0)}};return c(a),{options:a,valueOptions:l,labelOptions:s}},[e,t,r,n,o])};function h0(e){var t=d.useRef();t.current=e;var r=d.useCallback(function(){return t.current.apply(t,arguments)},[]);return r}var oj=["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"],aj=["inputValue"];function ij(e){return!e||lt(e)!=="object"}var lj=d.forwardRef(function(e,t){var r=e.id,n=e.mode,o=e.prefixCls,a=o===void 0?"rc-select":o,i=e.backfill,l=e.fieldNames,s=e.inputValue,u=e.searchValue,c=e.onSearch,f=e.autoClearSearchValue,p=f===void 0?!0:f,h=e.onSelect,v=e.onDeselect,g=e.dropdownMatchSelectWidth,m=g===void 0?!0:g,b=e.filterOption,y=e.filterSort,C=e.optionFilterProp,D=e.optionLabelProp,w=e.options,k=e.optionRender,E=e.children,x=e.defaultActiveFirstOption,A=e.menuItemSelectedIcon,N=e.virtual,$=e.direction,j=e.listHeight,F=j===void 0?200:j,B=e.listItemHeight,S=B===void 0?20:B,O=e.labelRender,I=e.value,P=e.defaultValue,T=e.labelInValue,_=e.onChange,X=e.maxCount,L=yt(e,oj),q=Q6(r),J=Pf(n),ee=!!(!w&&E),z=d.useMemo(function(){return b===void 0&&n==="combobox"?!1:b},[b,n]),Y=d.useMemo(function(){return GC(l,ee)},[JSON.stringify(l),ee]),V=Ur("",{value:u!==void 0?u:s,postState:function(le){return le||""}}),G=ce(V,2),K=G[0],W=G[1],te=nj(w,E,Y,C,D),U=te.valueOptions,Z=te.labelOptions,re=te.options,ue=d.useCallback(function(le){var ze=UC(le);return ze.map(function(Be){var Ke,st,dt,Ye,Ze;if(ij(Be))Ke=Be;else{var ot;dt=Be.key,st=Be.label,Ke=(ot=Be.value)!==null&&ot!==void 0?ot:dt}var ft=U.get(Ke);if(ft){var Nt;st===void 0&&(st=ft==null?void 0:ft[D||Y.label]),dt===void 0&&(dt=(Nt=ft==null?void 0:ft.key)!==null&&Nt!==void 0?Nt:Ke),Ye=ft==null?void 0:ft.disabled,Ze=ft==null?void 0:ft.title}return{label:st,value:Ke,key:dt,disabled:Ye,title:Ze}})},[Y,D,U]),he=Ur(P,{value:I}),we=ce(he,2),Ne=we[0],me=we[1],ge=d.useMemo(function(){var le,ze=J&&Ne===null?[]:Ne,Be=ue(ze);return n==="combobox"&&JN((le=Be[0])===null||le===void 0?void 0:le.value)?[]:Be},[Ne,ue,n,J]),ye=G6(ge,U),Ce=ce(ye,2),xe=Ce[0],Ae=Ce[1],ke=d.useMemo(function(){if(!n&&xe.length===1){var le=xe[0];if(le.value===null&&(le.label===null||le.label===void 0))return[]}return xe.map(function(ze){var Be;return H(H({},ze),{},{label:(Be=typeof O=="function"?O(ze):ze.label)!==null&&Be!==void 0?Be:ze.value})})},[n,xe,O]),We=d.useMemo(function(){return new Set(xe.map(function(le){return le.value}))},[xe]);d.useEffect(function(){if(n==="combobox"){var le,ze=(le=xe[0])===null||le===void 0?void 0:le.value;W(ZN(ze)?String(ze):"")}},[xe]);var _e=h0(function(le,ze){var Be=ze??le;return M(M({},Y.value,le),Y.label,Be)}),Pe=d.useMemo(function(){if(n!=="tags")return re;var le=je(re),ze=function(Be){return U.has(Be)};return je(xe).sort(function(Be,Ke){return Be.value<Ke.value?-1:1}).forEach(function(Be){var Ke=Be.value;ze(Ke)||le.push(_e(Ke,Be.label))}),le},[_e,re,U,xe,n]),ve=Y6(Pe,Y,K,z,C),Se=d.useMemo(function(){return n!=="tags"||!K||ve.some(function(le){return le[C||"value"]===K})||ve.some(function(le){return le[Y.value]===K})?ve:[_e(K)].concat(je(ve))},[_e,C,n,ve,K,Y]),qe=function le(ze){var Be=je(ze).sort(function(Ke,st){return y(Ke,st,{searchValue:K})});return Be.map(function(Ke){return Array.isArray(Ke.options)?H(H({},Ke),{},{options:Ke.options.length>0?le(Ke.options):Ke.options}):Ke})},Ge=d.useMemo(function(){return y?qe(Se):Se},[Se,y,K]),Xe=d.useMemo(function(){return w6(Ge,{fieldNames:Y,childrenAsData:ee})},[Ge,Y,ee]),Ie=function(le){var ze=ue(le);if(me(ze),_&&(ze.length!==xe.length||ze.some(function(st,dt){var Ye;return((Ye=xe[dt])===null||Ye===void 0?void 0:Ye.value)!==(st==null?void 0:st.value)}))){var Be=T?ze:ze.map(function(st){return st.value}),Ke=ze.map(function(st){return Ff(Ae(st.value))});_(J?Be:Be[0],J?Ke:Ke[0])}},at=d.useState(null),He=ce(at,2),nt=He[0],ht=He[1],At=d.useState(0),Et=ce(At,2),gt=Et[0],fe=Et[1],Oe=x!==void 0?x:n!=="combobox",Me=d.useCallback(function(le,ze){var Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ke=Be.source,st=Ke===void 0?"keyboard":Ke;fe(ze),i&&n==="combobox"&&le!==null&&st==="keyboard"&&ht(String(le))},[i,n]),Fe=function(le,ze,Be){var Ke=function(){var It,kt=Ae(le);return[T?{label:kt==null?void 0:kt[Y.label],value:le,key:(It=kt==null?void 0:kt.key)!==null&&It!==void 0?It:le}:le,Ff(kt)]};if(ze&&h){var st=Ke(),dt=ce(st,2),Ye=dt[0],Ze=dt[1];h(Ye,Ze)}else if(!ze&&v&&Be!=="clear"){var ot=Ke(),ft=ce(ot,2),Nt=ft[0],jt=ft[1];v(Nt,jt)}},pe=h0(function(le,ze){var Be,Ke=J?ze.selected:!0;Ke?Be=J?[].concat(je(xe),[le]):[le]:Be=xe.filter(function(st){return st.value!==le}),Ie(Be),Fe(le,Ke),n==="combobox"?ht(""):(!Pf||p)&&(W(""),ht(""))}),Ee=function(le,ze){Ie(le);var Be=ze.type,Ke=ze.values;(Be==="remove"||Be==="clear")&&Ke.forEach(function(st){Fe(st.value,!1,Be)})},ie=function(le,ze){if(W(le),ht(null),ze.source==="submit"){var Be=(le||"").trim();if(Be){var Ke=Array.from(new Set([].concat(je(We),[Be])));Ie(Ke),Fe(Be,!0),W("")}return}ze.source!=="blur"&&(n==="combobox"&&Ie(le),c==null||c(le))},oe=function(le){var ze=le;n!=="tags"&&(ze=le.map(function(Ke){var st=Z.get(Ke);return st==null?void 0:st.value}).filter(function(Ke){return Ke!==void 0}));var Be=Array.from(new Set([].concat(je(We),je(ze))));Ie(Be),Be.forEach(function(Ke){Fe(Ke,!0)})},be=d.useMemo(function(){var le=N!==!1&&m!==!1;return H(H({},te),{},{flattenOptions:Xe,onActiveValue:Me,defaultActiveFirstOption:Oe,onSelect:pe,menuItemSelectedIcon:A,rawValues:We,fieldNames:Y,virtual:le,direction:$,listHeight:F,listItemHeight:S,childrenAsData:ee,maxCount:X,optionRender:k})},[X,te,Xe,Me,Oe,pe,A,We,Y,N,m,$,F,S,ee,k]);return d.createElement(tm.Provider,{value:be},d.createElement($6,Te({},L,{id:q,prefixCls:a,ref:t,omitDomProps:aj,mode:n,displayValues:ke,onDisplayValuesChange:Ee,direction:$,searchValue:K,onSearch:ie,autoClearSearchValue:p,onSearchSplit:oe,dropdownMatchSelectWidth:m,OptionList:X6,emptyOptions:!Xe.length,activeValue:nt,activeDescendantId:"".concat(q,"_list_").concat(gt)})))}),om=lj;om.Option=nm;om.OptGroup=rm;function jf(e,t,r){return de({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r})}const QC=(e,t)=>t||e,sj=()=>{const[,e]=Yr(),[t]=bu("Empty"),r=new Ht(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return d.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},d.createElement("title",null,(t==null?void 0:t.description)||"Empty"),d.createElement("g",{fill:"none",fillRule:"evenodd"},d.createElement("g",{transform:"translate(24 31.67)"},d.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),d.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"}),d.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)"}),d.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"}),d.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"})),d.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"}),d.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},d.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),d.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},uj=()=>{const[,e]=Yr(),[t]=bu("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:o,colorBgContainer:a}=e,{borderColor:i,shadowColor:l,contentColor:s}=wt(()=>({borderColor:new Ht(r).onBackground(a).toHexString(),shadowColor:new Ht(n).onBackground(a).toHexString(),contentColor:new Ht(o).onBackground(a).toHexString()}),[r,n,o,a]);return d.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},d.createElement("title",null,(t==null?void 0:t.description)||"Empty"),d.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},d.createElement("ellipse",{fill:l,cx:"32",cy:"33",rx:"32",ry:"7"}),d.createElement("g",{fillRule:"nonzero",stroke:i},d.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"}),d.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}))))},cj=e=>{const{componentCls:t,margin:r,marginXS:n,marginXL:o,fontSize:a,lineHeight:i}=e;return{[t]:{marginInline:n,fontSize:a,lineHeight:i,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:n,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:r},"&-normal":{marginBlock:o,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:n,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},dj=Hr("Empty",e=>{const{componentCls:t,controlHeightLG:r,calc:n}=e,o=er(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:n(r).mul(.875).equal()});return cj(o)});var fj=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const ex=d.createElement(sj,null),tx=d.createElement(uj,null),fo=e=>{var t;const{className:r,rootClassName:n,prefixCls:o,image:a,description:i,children:l,imageStyle:s,style:u,classNames:c,styles:f}=e,p=fj(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:h,direction:v,className:g,style:m,classNames:b,styles:y,image:C}=Ro("empty"),D=h("empty",o),[w,k,E]=dj(D),[x]=bu("Empty"),A=typeof i<"u"?i:x==null?void 0:x.description,N=typeof A=="string"?A:"empty",$=(t=a??C)!==null&&t!==void 0?t:ex;let j=null;return typeof $=="string"?j=d.createElement("img",{alt:N,src:$}):j=$,w(d.createElement("div",Object.assign({className:de(k,E,D,g,{[`${D}-normal`]:$===tx,[`${D}-rtl`]:v==="rtl"},r,n,b.root,c==null?void 0:c.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},y.root),m),f==null?void 0:f.root),u)},p),d.createElement("div",{className:de(`${D}-image`,b.image,c==null?void 0:c.image),style:Object.assign(Object.assign(Object.assign({},s),y.image),f==null?void 0:f.image)},j),A&&d.createElement("div",{className:de(`${D}-description`,b.description,c==null?void 0:c.description),style:Object.assign(Object.assign({},y.description),f==null?void 0:f.description)},A),l&&d.createElement("div",{className:de(`${D}-footer`,b.footer,c==null?void 0:c.footer),style:Object.assign(Object.assign({},y.footer),f==null?void 0:f.footer)},l)))};fo.PRESENTED_IMAGE_DEFAULT=ex;fo.PRESENTED_IMAGE_SIMPLE=tx;const rx=e=>{const{componentName:t}=e,{getPrefixCls:r}=Rr(Zt),n=r("empty");switch(t){case"Table":case"List":return Q.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Q.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return Q.createElement(fo,null)}},nx=(e,t,r=void 0)=>{var n,o;const{variant:a,[e]:i}=d.useContext(Zt),l=d.useContext(SN),s=i==null?void 0:i.variant;let u;typeof t<"u"?u=t:r===!1?u="borderless":u=(o=(n=l??s)!==null&&n!==void 0?n:a)!==null&&o!==void 0?o:"outlined";const c=GA.includes(u);return[u,c]},pj=e=>{const t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},t),{points:["br","tr"],offset:[0,-4]})}};function mj(e,t){return e||pj(t)}const g0=e=>{const{optionHeight:t,optionFontSize:r,optionLineHeight:n,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:r,lineHeight:n,boxSizing:"border-box"}},hj=e=>{const{antCls:t,componentCls:r}=e,n=`${r}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,a=`&${t}-slide-up-appear${t}-slide-up-appear-active`,i=`&${t}-slide-up-leave${t}-slide-up-leave-active`,l=`${r}-dropdown-placement-`,s=`${n}-option-selected`;return[{[`${r}-dropdown`]:Object.assign(Object.assign({},Br(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
301
+ ${o}${l}bottomLeft,
302
+ ${a}${l}bottomLeft
303
+ `]:{animationName:Vp},[`
304
+ ${o}${l}topLeft,
305
+ ${a}${l}topLeft,
306
+ ${o}${l}topRight,
307
+ ${a}${l}topRight
308
+ `]:{animationName:Xp},[`${i}${l}bottomLeft`]:{animationName:Up},[`
309
+ ${i}${l}topLeft,
310
+ ${i}${l}topRight
311
+ `]:{animationName:Gp},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},g0(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},sl),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},g0(e)),{color:e.colorTextDisabled})}),[`${s}:has(+ ${s})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${s}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Ga(e,"slide-up"),Ga(e,"slide-down"),Ws(e,"move-up"),Ws(e,"move-down")]},gj=e=>{const{multipleSelectItemHeight:t,paddingXXS:r,lineWidth:n,INTERNAL_FIXED_ITEM_MARGIN:o}=e,a=e.max(e.calc(r).sub(n).equal(),0),i=e.max(e.calc(a).sub(o).equal(),0);return{basePadding:a,containerPadding:i,itemHeight:se(t),itemLineHeight:se(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},vj=e=>{const{multipleSelectItemHeight:t,selectHeight:r,lineWidth:n}=e;return e.calc(r).sub(t).div(2).sub(n).equal()},bj=e=>{const{componentCls:t,iconCls:r,borderRadiusSM:n,motionDurationSlow:o,paddingXS:a,multipleItemColorDisabled:i,multipleItemBorderColorDisabled:l,colorIcon:s,colorIconHover:u,INTERNAL_FIXED_ITEM_MARGIN:c}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:c,borderRadius:n,cursor:"default",transition:`font-size ${o}, line-height ${o}, height ${o}`,marginInlineEnd:e.calc(c).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:i,borderColor:l,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(a).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},Cl()),{display:"inline-flex",alignItems:"center",color:s,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:u}})}}}},yj=(e,t)=>{const{componentCls:r,INTERNAL_FIXED_ITEM_MARGIN:n}=e,o=`${r}-selection-overflow`,a=e.multipleSelectItemHeight,i=vj(e),l=t?`${r}-${t}`:"",s=gj(e);return{[`${r}-multiple${l}`]:Object.assign(Object.assign({},bj(e)),{[`${r}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:s.basePadding,paddingBlock:s.containerPadding,borderRadius:e.borderRadius,[`${r}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${se(n)} 0`,lineHeight:se(a),visibility:"hidden",content:'"\\a0"'}},[`${r}-selection-item`]:{height:s.itemHeight,lineHeight:se(s.itemLineHeight)},[`${r}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:se(a),marginBlock:n}},[`${r}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(s.basePadding).equal()},[`${o}-item + ${o}-item,
312
+ ${r}-prefix + ${r}-selection-wrap
313
+ `]:{[`${r}-selection-search`]:{marginInlineStart:0},[`${r}-selection-placeholder`]:{insetInlineStart:0}},[`${o}-item-suffix`]:{minHeight:s.itemHeight,marginBlock:n},[`${r}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(i).equal(),"\n &-input,\n &-mirror\n ":{height:a,fontFamily:e.fontFamily,lineHeight:se(a),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${r}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(s.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function Uc(e,t){const{componentCls:r}=e,n=t?`${r}-${t}`:"",o={[`${r}-multiple${n}`]:{fontSize:e.fontSize,[`${r}-selector`]:{[`${r}-show-search&`]:{cursor:"text"}},[`
314
+ &${r}-show-arrow ${r}-selector,
315
+ &${r}-allow-clear ${r}-selector
316
+ `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[yj(e,t),o]}const Cj=e=>{const{componentCls:t}=e,r=er(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),n=er(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[Uc(e),Uc(r,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},Uc(n,"lg")]};function Xc(e,t){const{componentCls:r,inputPaddingHorizontalBase:n,borderRadius:o}=e,a=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),i=t?`${r}-${t}`:"";return{[`${r}-single${i}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${r}-selector`]:Object.assign(Object.assign({},Br(e,!0)),{display:"flex",borderRadius:o,flex:"1 1 auto",[`${r}-selection-wrap:after`]:{lineHeight:se(a)},[`${r}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
317
+ ${r}-selection-item,
318
+ ${r}-selection-placeholder
319
+ `]:{display:"block",padding:0,lineHeight:se(a),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${r}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${r}-selection-item:empty:after`,`${r}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
320
+ &${r}-show-arrow ${r}-selection-item,
321
+ &${r}-show-arrow ${r}-selection-search,
322
+ &${r}-show-arrow ${r}-selection-placeholder
323
+ `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${r}-open ${r}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${r}-customize-input)`]:{[`${r}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${se(n)}`,[`${r}-selection-search-input`]:{height:a,fontSize:e.fontSize},"&:after":{lineHeight:se(a)}}},[`&${r}-customize-input`]:{[`${r}-selector`]:{"&:after":{display:"none"},[`${r}-selection-search`]:{position:"static",width:"100%"},[`${r}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${se(n)}`,"&:after":{display:"none"}}}}}}}function xj(e){const{componentCls:t}=e,r=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Xc(e),Xc(er(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${se(r)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(r).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
324
+ &${t}-show-arrow ${t}-selection-item,
325
+ &${t}-show-arrow ${t}-selection-placeholder
326
+ `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Xc(er(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const wj=e=>{const{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:o,controlHeightSM:a,controlHeightLG:i,paddingXXS:l,controlPaddingHorizontal:s,zIndexPopupBase:u,colorText:c,fontWeightStrong:f,controlItemBgActive:p,controlItemBgHover:h,colorBgContainer:v,colorFillSecondary:g,colorBgContainerDisabled:m,colorTextDisabled:b,colorPrimaryHover:y,colorPrimary:C,controlOutline:D}=e,w=l*2,k=n*2,E=Math.min(o-w,o-k),x=Math.min(a-w,a-k),A=Math.min(i-w,i-k);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:u+50,optionSelectedColor:c,optionSelectedFontWeight:f,optionSelectedBg:p,optionActiveBg:h,optionPadding:`${(o-t*r)/2}px ${s}px`,optionFontSize:t,optionLineHeight:r,optionHeight:o,selectorBg:v,clearBg:v,singleItemHeightLG:i,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:x,multipleItemHeightLG:A,multipleSelectorBgDisabled:m,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:y,activeBorderColor:C,activeOutlineColor:D,selectAffixPadding:l}},ox=(e,t)=>{const{componentCls:r,antCls:n,controlOutlineWidth:o}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{border:`${se(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:t.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${se(o)} ${t.activeOutlineColor}`,outline:0},[`${r}-prefix`]:{color:t.color}}}},v0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},ox(e,t))}),Ej=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},ox(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),v0(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),v0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),ax=(e,t)=>{const{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{background:t.bg,border:`${se(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{background:t.hoverBg},[`${r}-focused& ${r}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},b0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},ax(e,t))}),kj=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},ax(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),b0(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),b0(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Dj=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${se(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),ix=(e,t)=>{const{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{borderWidth:`0 0 ${se(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:t.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${r}-prefix`]:{color:t.color}}}},y0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},ix(e,t))}),Sj=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},ix(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),y0(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),y0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),$j=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Ej(e)),kj(e)),Dj(e)),Sj(e))}),Bj=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Oj=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},Aj=e=>{const{antCls:t,componentCls:r,inputPaddingHorizontalBase:n,iconCls:o}=e,a={[`${r}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[r]:Object.assign(Object.assign({},Br(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${r}-customize-input) ${r}-selector`]:Object.assign(Object.assign({},Bj(e)),Oj(e)),[`${r}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},sl),{[`> ${t}-typography`]:{display:"inline"}}),[`${r}-selection-placeholder`]:Object.assign(Object.assign({},sl),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${r}-arrow`]:Object.assign(Object.assign({},Cl()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[o]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${r}-suffix)`]:{pointerEvents:"auto"}},[`${r}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${r}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${r}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":a,"&:hover":a}),[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:e.calc(n).add(e.fontSize).add(e.paddingXS).equal()}}}}}},Fj=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Aj(e),xj(e),Cj(e),hj(e),{[`${t}-rtl`]:{direction:"rtl"}},Jp(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},Pj=Hr("Select",(e,{rootPrefixCls:t})=>{const r=er(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Fj(r),$j(r)]},wj,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Nj={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"},jj=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:Nj}))},Ij=d.forwardRef(jj),Rj={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"},Tj=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:Rj}))},lx=d.forwardRef(Tj),Mj={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"},zj=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:Mj}))},sx=d.forwardRef(zj);function _j({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:r,removeIcon:n,loading:o,multiple:a,hasFeedback:i,prefixCls:l,showSuffixIcon:s,feedbackIcon:u,showArrow:c,componentName:f}){const p=t??d.createElement(mC,null),h=b=>e===null&&!i&&!c?null:d.createElement(d.Fragment,null,s!==!1&&b,i&&u);let v=null;if(e!==void 0)v=h(e);else if(o)v=h(d.createElement(Lp,{spin:!0}));else{const b=`${l}-suffix`;v=({open:y,showSearch:C})=>h(y&&C?d.createElement(sx,{className:b}):d.createElement(lx,{className:b}))}let g=null;r!==void 0?g=r:a?g=d.createElement(Ij,null):g=null;let m=null;return n!==void 0?m=n:m=d.createElement(b3,null),{clearIcon:p,suffixIcon:v,itemIcon:g,removeIcon:m}}function Lj(e){return Q.useMemo(()=>{if(e)return(...t)=>Q.createElement(dl,{space:!0},e.apply(void 0,t))},[e])}function Hj(e,t){return t!==void 0?t:e!==null}var Wj=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const ux="SECRET_COMBOBOX_MODE_DO_NOT_USE",Kj=(e,t)=>{var r,n,o,a,i;const{prefixCls:l,bordered:s,className:u,rootClassName:c,getPopupContainer:f,popupClassName:p,dropdownClassName:h,listHeight:v=256,placement:g,listItemHeight:m,size:b,disabled:y,notFoundContent:C,status:D,builtinPlacements:w,dropdownMatchSelectWidth:k,popupMatchSelectWidth:E,direction:x,style:A,allowClear:N,variant:$,dropdownStyle:j,transitionName:F,tagRender:B,maxCount:S,prefix:O,dropdownRender:I,popupRender:P,onDropdownVisibleChange:T,onOpenChange:_,styles:X,classNames:L}=e,q=Wj(e,["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","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:J,getPrefixCls:ee,renderEmpty:z,direction:Y,virtual:V,popupMatchSelectWidth:G,popupOverflow:K}=d.useContext(Zt),{showSearch:W,style:te,styles:U,className:Z,classNames:re}=Ro("select"),[,ue]=Yr(),he=m??(ue==null?void 0:ue.controlHeight),we=ee("select",l),Ne=ee(),me=x??Y,{compactSize:ge,compactItemClassnames:ye}=ku(we,me),[Ce,xe]=nx("select",$,s),Ae=bo(we),[ke,We,_e]=Pj(we,Ae),Pe=d.useMemo(()=>{const{mode:Ke}=e;if(Ke!=="combobox")return Ke===ux?"combobox":Ke},[e.mode]),ve=Pe==="multiple"||Pe==="tags",Se=Hj(e.suffixIcon,e.showArrow),qe=(r=E??k)!==null&&r!==void 0?r:G,Ge=((n=X==null?void 0:X.popup)===null||n===void 0?void 0:n.root)||((o=U.popup)===null||o===void 0?void 0:o.root)||j,Xe=Lj(P||I),Ie=_||T,{status:at,hasFeedback:He,isFormItemInput:nt,feedbackIcon:ht}=d.useContext(oa),At=QC(at,D);let Et;C!==void 0?Et=C:Pe==="combobox"?Et=null:Et=(z==null?void 0:z("Select"))||d.createElement(rx,{componentName:"Select"});const{suffixIcon:gt,itemIcon:fe,removeIcon:Oe,clearIcon:Me}=_j(Object.assign(Object.assign({},q),{multiple:ve,hasFeedback:He,feedbackIcon:ht,showSuffixIcon:Se,prefixCls:we,componentName:"Select"})),Fe=N===!0?{clearIcon:Me}:N,pe=fn(q,["suffixIcon","itemIcon"]),Ee=de(((a=L==null?void 0:L.popup)===null||a===void 0?void 0:a.root)||((i=re==null?void 0:re.popup)===null||i===void 0?void 0:i.root)||p||h,{[`${we}-dropdown-${me}`]:me==="rtl"},c,re.root,L==null?void 0:L.root,_e,Ae,We),ie=fa(Ke=>{var st;return(st=b??ge)!==null&&st!==void 0?st:Ke}),oe=d.useContext(Po),be=y??oe,le=de({[`${we}-lg`]:ie==="large",[`${we}-sm`]:ie==="small",[`${we}-rtl`]:me==="rtl",[`${we}-${Ce}`]:xe,[`${we}-in-form-item`]:nt},jf(we,At,He),ye,Z,u,re.root,L==null?void 0:L.root,c,_e,Ae,We),ze=d.useMemo(()=>g!==void 0?g:me==="rtl"?"bottomRight":"bottomLeft",[g,me]),[Be]=yu("SelectLike",Ge==null?void 0:Ge.zIndex);return ke(d.createElement(om,Object.assign({ref:t,virtual:V,showSearch:W},pe,{style:Object.assign(Object.assign(Object.assign(Object.assign({},U.root),X==null?void 0:X.root),te),A),dropdownMatchSelectWidth:qe,transitionName:CC(Ne,"slide-up",F),builtinPlacements:mj(w,K),listHeight:v,listItemHeight:he,mode:Pe,prefixCls:we,placement:ze,direction:me,prefix:O,suffixIcon:gt,menuItemSelectedIcon:fe,removeIcon:Oe,allowClear:Fe,notFoundContent:Et,className:le,getPopupContainer:f||J,dropdownClassName:Ee,disabled:be,dropdownStyle:Object.assign(Object.assign({},Ge),{zIndex:Be}),maxCount:ve?S:void 0,tagRender:ve?B:void 0,dropdownRender:Xe,onDropdownVisibleChange:Ie})))},li=d.forwardRef(Kj),qj=zC(li,"dropdownAlign");li.SECRET_COMBOBOX_MODE_DO_NOT_USE=ux;li.Option=nm;li.OptGroup=rm;li._InternalPanelDoNotUseOrYouWillBeFired=qj;const Vj=(e,t)=>{typeof(e==null?void 0:e.addEventListener)<"u"?e.addEventListener("change",t):typeof(e==null?void 0:e.addListener)<"u"&&e.addListener(t)},Uj=(e,t)=>{typeof(e==null?void 0:e.removeEventListener)<"u"?e.removeEventListener("change",t):typeof(e==null?void 0:e.removeListener)<"u"&&e.removeListener(t)},Xj=["xxl","xl","lg","md","sm","xs"],Gj=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),Yj=e=>{const t=e,r=[].concat(Xj).reverse();return r.forEach((n,o)=>{const a=n.toUpperCase(),i=`screen${a}Min`,l=`screen${a}`;if(!(t[i]<=t[l]))throw new Error(`${i}<=${l} fails : !(${t[i]}<=${t[l]})`);if(o<r.length-1){const s=`screen${a}Max`;if(!(t[l]<=t[s]))throw new Error(`${l}<=${s} fails : !(${t[l]}<=${t[s]})`);const u=`screen${r[o+1].toUpperCase()}Min`;if(!(t[s]<=t[u]))throw new Error(`${s}<=${u} fails : !(${t[s]}<=${t[u]})`)}}),e},Zj=()=>{const[,e]=Yr(),t=Gj(Yj(e));return Q.useMemo(()=>{const r=new Map;let n=-1,o={};return{responsiveMap:t,matchHandlers:{},dispatch(a){return o=a,r.forEach(i=>i(o)),r.size>=1},subscribe(a){return r.size||this.register(),n+=1,r.set(n,a),a(o),n},unsubscribe(a){r.delete(a),r.size||this.unregister()},register(){Object.entries(t).forEach(([a,i])=>{const l=({matches:u})=>{this.dispatch(Object.assign(Object.assign({},o),{[a]:u}))},s=window.matchMedia(i);Vj(s,l),this.matchHandlers[i]={mql:s,listener:l},l(s)})},unregister(){Object.values(t).forEach(a=>{const i=this.matchHandlers[a];Uj(i==null?void 0:i.mql,i==null?void 0:i.listener)}),r.clear()}}},[e])};function cx(){const[,e]=d.useReducer(t=>t+1,0);return e}function dx(e=!0,t={}){const r=Ve(t),n=cx(),o=Zj();return Wt(()=>{const a=o.subscribe(i=>{r.current=i,e&&n()});return()=>o.unsubscribe(a)},[]),r.current}function fx(e){var t=e.children,r=e.prefixCls,n=e.id,o=e.overlayInnerStyle,a=e.bodyClassName,i=e.className,l=e.style;return d.createElement("div",{className:de("".concat(r,"-content"),i),style:l},d.createElement("div",{className:de("".concat(r,"-inner"),a),id:n,role:"tooltip",style:o},typeof t=="function"?t():t))}var Ca={shiftX:64,adjustY:1},xa={adjustX:1,shiftY:!0},Sn=[0,0],Jj={left:{points:["cr","cl"],overflow:xa,offset:[-4,0],targetOffset:Sn},right:{points:["cl","cr"],overflow:xa,offset:[4,0],targetOffset:Sn},top:{points:["bc","tc"],overflow:Ca,offset:[0,-4],targetOffset:Sn},bottom:{points:["tc","bc"],overflow:Ca,offset:[0,4],targetOffset:Sn},topLeft:{points:["bl","tl"],overflow:Ca,offset:[0,-4],targetOffset:Sn},leftTop:{points:["tr","tl"],overflow:xa,offset:[-4,0],targetOffset:Sn},topRight:{points:["br","tr"],overflow:Ca,offset:[0,-4],targetOffset:Sn},rightTop:{points:["tl","tr"],overflow:xa,offset:[4,0],targetOffset:Sn},bottomRight:{points:["tr","br"],overflow:Ca,offset:[0,4],targetOffset:Sn},rightBottom:{points:["bl","br"],overflow:xa,offset:[4,0],targetOffset:Sn},bottomLeft:{points:["tl","bl"],overflow:Ca,offset:[0,4],targetOffset:Sn},leftBottom:{points:["br","bl"],overflow:xa,offset:[-4,0],targetOffset:Sn}},Qj=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],e4=function(e,t){var r=e.overlayClassName,n=e.trigger,o=n===void 0?["hover"]:n,a=e.mouseEnterDelay,i=a===void 0?0:a,l=e.mouseLeaveDelay,s=l===void 0?.1:l,u=e.overlayStyle,c=e.prefixCls,f=c===void 0?"rc-tooltip":c,p=e.children,h=e.onVisibleChange,v=e.afterVisibleChange,g=e.transitionName,m=e.animation,b=e.motion,y=e.placement,C=y===void 0?"right":y,D=e.align,w=D===void 0?{}:D,k=e.destroyTooltipOnHide,E=k===void 0?!1:k,x=e.defaultVisible,A=e.getTooltipContainer,N=e.overlayInnerStyle;e.arrowContent;var $=e.overlay,j=e.id,F=e.showArrow,B=F===void 0?!0:F,S=e.classNames,O=e.styles,I=yt(e,Qj),P=Qp(j),T=Ve(null);ei(t,function(){return T.current});var _=H({},I);"visible"in e&&(_.popupVisible=e.visible);var X=function(){return d.createElement(fx,{key:"content",prefixCls:f,id:P,bodyClassName:S==null?void 0:S.body,overlayInnerStyle:H(H({},N),O==null?void 0:O.body)},$)},L=function(){var q=d.Children.only(p),J=(q==null?void 0:q.props)||{},ee=H(H({},J),{},{"aria-describedby":$?P:null});return d.cloneElement(p,ee)};return d.createElement(Pu,Te({popupClassName:de(r,S==null?void 0:S.root),prefixCls:f,popup:X,action:o,builtinPlacements:Jj,popupPlacement:C,ref:T,popupAlign:w,getPopupContainer:A,onPopupVisibleChange:h,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:m,popupMotion:b,defaultPopupVisible:x,autoDestroy:E,mouseLeaveDelay:s,popupStyle:H(H({},u),O==null?void 0:O.root),mouseEnterDelay:i,arrow:B},_),L())};const t4=dn(e4);function px(e){const{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,o=t/2,a=0,i=o,l=n*1/Math.sqrt(2),s=o-n*(1-1/Math.sqrt(2)),u=o-r*(1/Math.sqrt(2)),c=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),f=2*o-u,p=c,h=2*o-l,v=s,g=2*o-a,m=i,b=o*Math.sqrt(2)+n*(Math.sqrt(2)-2),y=n*(Math.sqrt(2)-1),C=`polygon(${y}px 100%, 50% ${y}px, ${2*o-y}px 100%, ${y}px 100%)`,D=`path('M ${a} ${i} A ${n} ${n} 0 0 0 ${l} ${s} L ${u} ${c} A ${r} ${r} 0 0 1 ${f} ${p} L ${h} ${v} A ${n} ${n} 0 0 0 ${g} ${m} Z')`;return{arrowShadowWidth:b,arrowPath:D,arrowPolygon:C}}const r4=(e,t,r)=>{const{sizePopupArrow:n,arrowPolygon:o,arrowPath:a,arrowShadowWidth:i,borderRadiusXS:l,calc:s}=e;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:s(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,a]},content:'""'},"&::after":{content:'""',position:"absolute",width:i,height:i,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${se(l)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},mx=8;function am(e){const{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?mx:n}}function Zl(e,t){return e?t:{}}function hx(e,t,r){const{componentCls:n,boxShadowPopoverArrow:o,arrowOffsetVertical:a,arrowOffsetHorizontal:i}=e,{arrowDistance:l=0,arrowPlacement:s={left:!0,right:!0,top:!0,bottom:!0}}=r||{};return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({[`${n}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},r4(e,t,o)),{"&:before":{background:t}})]},Zl(!!s.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:l,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":i,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:i}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${se(i)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:i}}}})),Zl(!!s.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:l,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":i,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:i}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${se(i)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:i}}}})),Zl(!!s.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:l},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:a},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:a}})),Zl(!!s.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:l},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:a},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:a}}))}}function n4(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};const o=n&&typeof n=="object"?n:{},a={};switch(e){case"top":case"bottom":a.shiftX=t.arrowOffsetHorizontal*2+r,a.shiftY=!0,a.adjustY=!0;break;case"left":case"right":a.shiftY=t.arrowOffsetVertical*2+r,a.shiftX=!0,a.adjustX=!0;break}const i=Object.assign(Object.assign({},a),o);return i.shiftX||(i.adjustX=!0),i.shiftY||(i.adjustY=!0),i}const C0={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"]}},o4={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"]}},a4=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function gx(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:o,borderRadius:a,visibleFirst:i}=e,l=t/2,s={},u=am({contentRadius:a,limitVerticalRadius:!0});return Object.keys(C0).forEach(c=>{const f=n&&o4[c]||C0[c],p=Object.assign(Object.assign({},f),{offset:[0,0],dynamicInset:!0});switch(s[c]=p,a4.has(c)&&(p.autoArrow=!1),c){case"top":case"topLeft":case"topRight":p.offset[1]=-l-o;break;case"bottom":case"bottomLeft":case"bottomRight":p.offset[1]=l+o;break;case"left":case"leftTop":case"leftBottom":p.offset[0]=-l-o;break;case"right":case"rightTop":case"rightBottom":p.offset[0]=l+o;break}if(n)switch(c){case"topLeft":case"bottomLeft":p.offset[0]=-u.arrowOffsetHorizontal-l;break;case"topRight":case"bottomRight":p.offset[0]=u.arrowOffsetHorizontal+l;break;case"leftTop":case"rightTop":p.offset[1]=-u.arrowOffsetHorizontal*2+l;break;case"leftBottom":case"rightBottom":p.offset[1]=u.arrowOffsetHorizontal*2-l;break}p.overflow=n4(c,u,t,r),i&&(p.htmlRegion="visibleFirst")}),s}const i4=e=>{const{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:a,tooltipBorderRadius:i,zIndexPopup:l,controlHeight:s,boxShadowSecondary:u,paddingSM:c,paddingXS:f,arrowOffsetHorizontal:p,sizePopupArrow:h}=e,v=t(i).add(h).add(p).equal(),g=t(i).mul(2).add(h).equal();return[{[r]:Object.assign(Object.assign(Object.assign(Object.assign({},Br(e)),{position:"absolute",zIndex:l,display:"block",width:"max-content",maxWidth:n,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":a,[`${r}-inner`]:{minWidth:g,minHeight:s,padding:`${se(e.calc(c).div(2).equal())} ${se(f)}`,color:`var(--ant-tooltip-color, ${o})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:a,borderRadius:i,boxShadow:u,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:v},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(i,mx)}},[`${r}-content`]:{position:"relative"}}),EF(e,(m,{darkColor:b})=>({[`&${r}-${m}`]:{[`${r}-inner`]:{backgroundColor:b},[`${r}-arrow`]:{"--antd-arrow-background-color":b}}}))),{"&-rtl":{direction:"rtl"}})},hx(e,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},l4=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},am({contentRadius:e.borderRadius,limitVerticalRadius:!0})),px(er(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),vx=(e,t=!0)=>Hr("Tooltip",r=>{const{borderRadius:n,colorTextLightSolid:o,colorBgSpotlight:a}=r,i=er(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:n,tooltipBg:a});return[i4(i),Yp(r,"zoom-big-fast")]},l4,{resetStyle:!1,injectStyle:t})(e),s4=na.map(e=>`${e}-inverse`);function u4(e,t=!0){return t?[].concat(je(s4),je(na)).includes(e):na.includes(e)}function bx(e,t){const r=u4(t),n=de({[`${e}-${t}`]:t&&r}),o={},a={},i=U5(t).toRgb(),l=(.299*i.r+.587*i.g+.114*i.b)/255<.5?"#FFF":"#000";return t&&!r&&(o.background=t,o["--ant-tooltip-color"]=l,a["--antd-arrow-background-color"]=t),{className:n,overlayStyle:o,arrowStyle:a}}const c4=e=>{const{prefixCls:t,className:r,placement:n="top",title:o,color:a,overlayInnerStyle:i}=e,{getPrefixCls:l}=d.useContext(Zt),s=l("tooltip",t),[u,c,f]=vx(s),p=bx(s,a),h=p.arrowStyle,v=Object.assign(Object.assign({},i),p.overlayStyle),g=de(c,f,s,`${s}-pure`,`${s}-placement-${n}`,r,p.className);return u(d.createElement("div",{className:g,style:h},d.createElement("div",{className:`${s}-arrow`}),d.createElement(fx,Object.assign({},e,{className:c,prefixCls:s,overlayInnerStyle:v}),o)))};var d4=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const f4=d.forwardRef((e,t)=>{var r,n;const{prefixCls:o,openClassName:a,getTooltipContainer:i,color:l,overlayInnerStyle:s,children:u,afterOpenChange:c,afterVisibleChange:f,destroyTooltipOnHide:p,destroyOnHidden:h,arrow:v=!0,title:g,overlay:m,builtinPlacements:b,arrowPointAtCenter:y=!1,autoAdjustOverflow:C=!0,motion:D,getPopupContainer:w,placement:k="top",mouseEnterDelay:E=.1,mouseLeaveDelay:x=.1,overlayStyle:A,rootClassName:N,overlayClassName:$,styles:j,classNames:F}=e,B=d4(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),S=!!v,[,O]=Yr(),{getPopupContainer:I,getPrefixCls:P,direction:T,className:_,style:X,classNames:L,styles:q}=Ro("tooltip"),J=oi(),ee=d.useRef(null),z=()=>{var Se;(Se=ee.current)===null||Se===void 0||Se.forceAlign()};d.useImperativeHandle(t,()=>{var Se,qe;return{forceAlign:z,forcePopupAlign:()=>{J.deprecated(!1,"forcePopupAlign","forceAlign"),z()},nativeElement:(Se=ee.current)===null||Se===void 0?void 0:Se.nativeElement,popupElement:(qe=ee.current)===null||qe===void 0?void 0:qe.popupElement}});const[Y,V]=Ur(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),G=!g&&!m&&g!==0,K=Se=>{var qe,Ge;V(G?!1:Se),G||((qe=e.onOpenChange)===null||qe===void 0||qe.call(e,Se),(Ge=e.onVisibleChange)===null||Ge===void 0||Ge.call(e,Se))},W=d.useMemo(()=>{var Se,qe;let Ge=y;return typeof v=="object"&&(Ge=(qe=(Se=v.pointAtCenter)!==null&&Se!==void 0?Se:v.arrowPointAtCenter)!==null&&qe!==void 0?qe:y),b||gx({arrowPointAtCenter:Ge,autoAdjustOverflow:C,arrowWidth:S?O.sizePopupArrow:0,borderRadius:O.borderRadius,offset:O.marginXXS,visibleFirst:!0})},[y,v,b,O]),te=d.useMemo(()=>g===0?g:m||g||"",[m,g]),U=d.createElement(dl,{space:!0},typeof te=="function"?te():te),Z=P("tooltip",o),re=P(),ue=e["data-popover-inject"];let he=Y;!("open"in e)&&!("visible"in e)&&G&&(he=!1);const we=d.isValidElement(u)&&!hC(u)?u:d.createElement("span",null,u),Ne=we.props,me=!Ne.className||typeof Ne.className=="string"?de(Ne.className,a||`${Z}-open`):Ne.className,[ge,ye,Ce]=vx(Z,!ue),xe=bx(Z,l),Ae=xe.arrowStyle,ke=de($,{[`${Z}-rtl`]:T==="rtl"},xe.className,N,ye,Ce,_,L.root,F==null?void 0:F.root),We=de(L.body,F==null?void 0:F.body),[_e,Pe]=yu("Tooltip",B.zIndex),ve=d.createElement(t4,Object.assign({},B,{zIndex:_e,showArrow:S,placement:k,mouseEnterDelay:E,mouseLeaveDelay:x,prefixCls:Z,classNames:{root:ke,body:We},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ae),q.root),X),A),j==null?void 0:j.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},q.body),s),j==null?void 0:j.body),xe.overlayStyle)},getTooltipContainer:w||i||I,ref:ee,builtinPlacements:W,overlay:U,visible:he,onVisibleChange:K,afterVisibleChange:c??f,arrowContent:d.createElement("span",{className:`${Z}-arrow-content`}),motion:{motionName:CC(re,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!p}),he?eo(we,{className:me}):we);return ge(d.createElement(Hp.Provider,{value:Pe},ve))}),pl=f4;pl._InternalPanelDoNotUseOrYouWillBeFired=c4;var p4={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"},m4=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:p4}))},If=d.forwardRef(m4),h4=rt.ESC,g4=rt.TAB;function v4(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,o=e.autoFocus,a=e.overlayRef,i=d.useRef(!1),l=function(){if(t){var c,f;(c=r.current)===null||c===void 0||(f=c.focus)===null||f===void 0||f.call(c),n==null||n(!1)}},s=function(){var c;return(c=a.current)!==null&&c!==void 0&&c.focus?(a.current.focus(),i.current=!0,!0):!1},u=function(c){switch(c.keyCode){case h4:l();break;case g4:{var f=!1;i.current||(f=s()),f?c.preventDefault():l();break}}};d.useEffect(function(){return t?(window.addEventListener("keydown",u),o&&qt(s,3),function(){window.removeEventListener("keydown",u),i.current=!1}):function(){i.current=!1}},[t])}var b4=dn(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=wt(function(){var l;return typeof r=="function"?l=r():l=r,l},[r]),i=ro(t,ua(a));return Q.createElement(Q.Fragment,null,n&&Q.createElement("div",{className:"".concat(o,"-arrow")}),Q.cloneElement(a,{ref:Zn(a)?i:void 0}))}),wa={adjustX:1,adjustY:1},Ea=[0,0],y4={topLeft:{points:["bl","tl"],overflow:wa,offset:[0,-4],targetOffset:Ea},top:{points:["bc","tc"],overflow:wa,offset:[0,-4],targetOffset:Ea},topRight:{points:["br","tr"],overflow:wa,offset:[0,-4],targetOffset:Ea},bottomLeft:{points:["tl","bl"],overflow:wa,offset:[0,4],targetOffset:Ea},bottom:{points:["tc","bc"],overflow:wa,offset:[0,4],targetOffset:Ea},bottomRight:{points:["tr","br"],overflow:wa,offset:[0,4],targetOffset:Ea}},C4=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function x4(e,t){var r,n=e.arrow,o=n===void 0?!1:n,a=e.prefixCls,i=a===void 0?"rc-dropdown":a,l=e.transitionName,s=e.animation,u=e.align,c=e.placement,f=c===void 0?"bottomLeft":c,p=e.placements,h=p===void 0?y4:p,v=e.getPopupContainer,g=e.showAction,m=e.hideAction,b=e.overlayClassName,y=e.overlayStyle,C=e.visible,D=e.trigger,w=D===void 0?["hover"]:D,k=e.autoFocus,E=e.overlay,x=e.children,A=e.onVisibleChange,N=yt(e,C4),$=Q.useState(),j=ce($,2),F=j[0],B=j[1],S="visible"in e?C:F,O=Q.useRef(null),I=Q.useRef(null),P=Q.useRef(null);Q.useImperativeHandle(t,function(){return O.current});var T=function(Y){B(Y),A==null||A(Y)};v4({visible:S,triggerRef:P,onVisibleChange:T,autoFocus:k,overlayRef:I});var _=function(Y){var V=e.onOverlayClick;B(!1),V&&V(Y)},X=function(){return Q.createElement(b4,{ref:I,overlay:E,prefixCls:i,arrow:o})},L=function(){return typeof E=="function"?X:X()},q=function(){var Y=e.minOverlayWidthMatchTrigger,V=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?Y:!V},J=function(){var Y=e.openClassName;return Y!==void 0?Y:"".concat(i,"-open")},ee=Q.cloneElement(x,{className:de((r=x.props)===null||r===void 0?void 0:r.className,S&&J()),ref:Zn(x)?ro(P,ua(x)):void 0}),z=m;return!z&&w.indexOf("contextMenu")!==-1&&(z=["click"]),Q.createElement(Pu,Te({builtinPlacements:h},N,{prefixCls:i,ref:O,popupClassName:de(b,M({},"".concat(i,"-show-arrow"),o)),popupStyle:y,action:w,showAction:g,hideAction:z,popupPlacement:f,popupAlign:u,popupTransitionName:l,popupAnimation:s,popupVisible:S,stretch:q()?"minWidth":"",popup:L(),onPopupVisibleChange:T,onPopupClick:_,getPopupContainer:v}),ee)}const w4=Q.forwardRef(x4),E4=e=>typeof e!="object"&&typeof e!="function"||e===null;var yx=d.createContext(null);function Cx(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function xx(e){var t=d.useContext(yx);return Cx(t,e)}var k4=["children","locked"],Hn=d.createContext(null);function D4(e,t){var r=H({},e);return Object.keys(t).forEach(function(n){var o=t[n];o!==void 0&&(r[n]=o)}),r}function ml(e){var t=e.children,r=e.locked,n=yt(e,k4),o=d.useContext(Hn),a=la(function(){return D4(o,n)},[o,n],function(i,l){return!r&&(i[0]!==l[0]||!Jn(i[1],l[1],!0))});return d.createElement(Hn.Provider,{value:a},t)}var S4=[],wx=d.createContext(null);function ju(){return d.useContext(wx)}var Ex=d.createContext(S4);function si(e){var t=d.useContext(Ex);return d.useMemo(function(){return e!==void 0?[].concat(je(t),[e]):t},[t,e])}var kx=d.createContext(null),im=d.createContext({});function x0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(xu(e)){var r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),i=null;return o&&!Number.isNaN(a)?i=a:n&&i===null&&(i=0),n&&e.disabled&&(i=null),i!==null&&(i>=0||t&&i<0)}return!1}function $4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=je(e.querySelectorAll("*")).filter(function(n){return x0(n,t)});return x0(e,t)&&r.unshift(e),r}var Rf=rt.LEFT,Tf=rt.RIGHT,Mf=rt.UP,vs=rt.DOWN,bs=rt.ENTER,Dx=rt.ESC,wi=rt.HOME,Ei=rt.END,w0=[Mf,vs,Rf,Tf];function B4(e,t,r,n){var o,a="prev",i="next",l="children",s="parent";if(e==="inline"&&n===bs)return{inlineTrigger:!0};var u=M(M({},Mf,a),vs,i),c=M(M(M(M({},Rf,r?i:a),Tf,r?a:i),vs,l),bs,l),f=M(M(M(M(M(M({},Mf,a),vs,i),bs,l),Dx,s),Rf,r?l:s),Tf,r?s:l),p={inline:u,horizontal:c,vertical:f,inlineSub:u,horizontalSub:f,verticalSub:f},h=(o=p["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[n];switch(h){case a:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function O4(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function A4(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function lm(e,t){var r=$4(e,!0);return r.filter(function(n){return t.has(n)})}function E0(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=lm(e,t),a=o.length,i=o.findIndex(function(l){return r===l});return n<0?i===-1?i=a-1:i-=1:n>0&&(i+=1),i=(i+a)%a,o[i]}var zf=function(e,t){var r=new Set,n=new Map,o=new Map;return e.forEach(function(a){var i=document.querySelector("[data-menu-id='".concat(Cx(t,a),"']"));i&&(r.add(i),o.set(i,a),n.set(a,i))}),{elements:r,key2element:n,element2key:o}};function F4(e,t,r,n,o,a,i,l,s,u){var c=d.useRef(),f=d.useRef();f.current=t;var p=function(){qt.cancel(c.current)};return d.useEffect(function(){return function(){p()}},[]),function(h){var v=h.which;if([].concat(w0,[bs,Dx,wi,Ei]).includes(v)){var g=a(),m=zf(g,n),b=m,y=b.elements,C=b.key2element,D=b.element2key,w=C.get(t),k=A4(w,y),E=D.get(k),x=B4(e,i(E,!0).length===1,r,v);if(!x&&v!==wi&&v!==Ei)return;(w0.includes(v)||[wi,Ei].includes(v))&&h.preventDefault();var A=function(O){if(O){var I=O,P=O.querySelector("a");P!=null&&P.getAttribute("href")&&(I=P);var T=D.get(O);l(T),p(),c.current=qt(function(){f.current===T&&I.focus()})}};if([wi,Ei].includes(v)||x.sibling||!k){var N;!k||e==="inline"?N=o.current:N=O4(k);var $,j=lm(N,y);v===wi?$=j[0]:v===Ei?$=j[j.length-1]:$=E0(N,y,k,x.offset),A($)}else if(x.inlineTrigger)s(E);else if(x.offset>0)s(E,!0),p(),c.current=qt(function(){m=zf(g,n);var O=k.getAttribute("aria-controls"),I=document.getElementById(O),P=E0(I,m.elements);A(P)},5);else if(x.offset<0){var F=i(E,!0),B=F[F.length-2],S=C.get(B);s(B,!1),A(S)}}u==null||u(h)}}function P4(e){Promise.resolve().then(e)}var sm="__RC_UTIL_PATH_SPLIT__",k0=function(e){return e.join(sm)},N4=function(e){return e.split(sm)},_f="rc-menu-more";function j4(){var e=d.useState({}),t=ce(e,2),r=t[1],n=Ve(new Map),o=Ve(new Map),a=d.useState([]),i=ce(a,2),l=i[0],s=i[1],u=Ve(0),c=Ve(!1),f=function(){c.current||r({})},p=mt(function(C,D){var w=k0(D);o.current.set(w,C),n.current.set(C,w),u.current+=1;var k=u.current;P4(function(){k===u.current&&f()})},[]),h=mt(function(C,D){var w=k0(D);o.current.delete(w),n.current.delete(C)},[]),v=mt(function(C){s(C)},[]),g=mt(function(C,D){var w=n.current.get(C)||"",k=N4(w);return D&&l.includes(k[0])&&k.unshift(_f),k},[l]),m=mt(function(C,D){return C.filter(function(w){return w!==void 0}).some(function(w){var k=g(w,!0);return k.includes(D)})},[g]),b=function(){var C=je(n.current.keys());return l.length&&C.push(_f),C},y=mt(function(C){var D="".concat(n.current.get(C)).concat(sm),w=new Set;return je(o.current.keys()).forEach(function(k){k.startsWith(D)&&w.add(o.current.get(k))}),w},[]);return d.useEffect(function(){return function(){c.current=!0}},[]),{registerPath:p,unregisterPath:h,refreshOverflowKeys:v,isSubPathKey:m,getKeyPath:g,getKeys:b,getSubPathKeys:y}}function Oi(e){var t=d.useRef(e);t.current=e;var r=d.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return e?r:void 0}var I4=Math.random().toFixed(5).toString().slice(2),D0=0;function R4(e){var t=Ur(e,{value:e}),r=ce(t,2),n=r[0],o=r[1];return d.useEffect(function(){D0+=1;var a="".concat(I4,"-").concat(D0);o("rc-menu-uuid-".concat(a))},[]),n}function Sx(e,t,r,n){var o=d.useContext(Hn),a=o.activeKey,i=o.onActive,l=o.onInactive,s={active:a===e};return t||(s.onMouseEnter=function(u){r==null||r({key:e,domEvent:u}),i(e)},s.onMouseLeave=function(u){n==null||n({key:e,domEvent:u}),l(e)}),s}function $x(e){var t=d.useContext(Hn),r=t.mode,n=t.rtl,o=t.inlineIndent;if(r!=="inline")return null;var a=e;return n?{paddingRight:a*o}:{paddingLeft:a*o}}function Bx(e){var t=e.icon,r=e.props,n=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=d.createElement(t,H({},r)):typeof t!="boolean"&&(o=t),o||n||null)}var T4=["item"];function Vs(e){var t=e.item,r=yt(e,T4);return Object.defineProperty(r,"item",{get:function(){return lr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var M4=["title","attribute","elementRef"],z4=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],_4=["active"],L4=(function(e){no(r,e);var t=oo(r);function r(){return vr(this,r),t.apply(this,arguments)}return br(r,[{key:"render",value:function(){var n=this.props,o=n.title,a=n.attribute,i=n.elementRef,l=yt(n,M4),s=fn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return lr(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),d.createElement(Yn.Item,Te({},a,{title:typeof o=="string"?o:void 0},s,{ref:i}))}}]),r})(d.Component),H4=d.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.eventKey;e.warnKey;var a=e.disabled,i=e.itemIcon,l=e.children,s=e.role,u=e.onMouseEnter,c=e.onMouseLeave,f=e.onClick,p=e.onKeyDown,h=e.onFocus,v=yt(e,z4),g=xx(o),m=d.useContext(Hn),b=m.prefixCls,y=m.onItemClick,C=m.disabled,D=m.overflowDisabled,w=m.itemIcon,k=m.selectedKeys,E=m.onActive,x=d.useContext(im),A=x._internalRenderMenuItem,N="".concat(b,"-item"),$=d.useRef(),j=d.useRef(),F=C||a,B=sa(t,j),S=si(o),O=function(V){return{key:o,keyPath:je(S).reverse(),item:$.current,domEvent:V}},I=i||w,P=Sx(o,F,u,c),T=P.active,_=yt(P,_4),X=k.includes(o),L=$x(S.length),q=function(V){if(!F){var G=O(V);f==null||f(Vs(G)),y(G)}},J=function(V){if(p==null||p(V),V.which===rt.ENTER){var G=O(V);f==null||f(Vs(G)),y(G)}},ee=function(V){E(o),h==null||h(V)},z={};e.role==="option"&&(z["aria-selected"]=X);var Y=d.createElement(L4,Te({ref:$,elementRef:B,role:s===null?"none":s||"menuitem",tabIndex:a?null:-1,"data-menu-id":D&&g?null:g},fn(v,["extra"]),_,z,{component:"li","aria-disabled":a,style:H(H({},L),r),className:de(N,M(M(M({},"".concat(N,"-active"),T),"".concat(N,"-selected"),X),"".concat(N,"-disabled"),F),n),onClick:q,onKeyDown:J,onFocus:ee}),l,d.createElement(Bx,{props:H(H({},e),{},{isSelected:X}),icon:I}));return A&&(Y=A(Y,e,{selected:X})),Y});function W4(e,t){var r=e.eventKey,n=ju(),o=si(r);return d.useEffect(function(){if(n)return n.registerPath(r,o),function(){n.unregisterPath(r,o)}},[o]),n?null:d.createElement(H4,Te({},e,{ref:t}))}const Iu=d.forwardRef(W4);var K4=["className","children"],q4=function(e,t){var r=e.className,n=e.children,o=yt(e,K4),a=d.useContext(Hn),i=a.prefixCls,l=a.mode,s=a.rtl;return d.createElement("ul",Te({className:de(i,s&&"".concat(i,"-rtl"),"".concat(i,"-sub"),"".concat(i,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:t}),n)},um=d.forwardRef(q4);um.displayName="SubMenuList";function cm(e,t){return Ln(e).map(function(r,n){if(d.isValidElement(r)){var o,a,i=r.key,l=(o=(a=r.props)===null||a===void 0?void 0:a.eventKey)!==null&&o!==void 0?o:i,s=l==null;s&&(l="tmp_key-".concat([].concat(je(t),[n]).join("-")));var u={key:l,eventKey:l};return d.cloneElement(r,u)}return r})}var qr={adjustX:1,adjustY:1},V4={topLeft:{points:["bl","tl"],overflow:qr},topRight:{points:["br","tr"],overflow:qr},bottomLeft:{points:["tl","bl"],overflow:qr},bottomRight:{points:["tr","br"],overflow:qr},leftTop:{points:["tr","tl"],overflow:qr},leftBottom:{points:["br","bl"],overflow:qr},rightTop:{points:["tl","tr"],overflow:qr},rightBottom:{points:["bl","br"],overflow:qr}},U4={topLeft:{points:["bl","tl"],overflow:qr},topRight:{points:["br","tr"],overflow:qr},bottomLeft:{points:["tl","bl"],overflow:qr},bottomRight:{points:["tr","br"],overflow:qr},rightTop:{points:["tr","tl"],overflow:qr},rightBottom:{points:["br","bl"],overflow:qr},leftTop:{points:["tl","tr"],overflow:qr},leftBottom:{points:["bl","br"],overflow:qr}};function Ox(e,t,r){if(t)return t;if(r)return r[e]||r.other}var X4={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function G4(e){var t=e.prefixCls,r=e.visible,n=e.children,o=e.popup,a=e.popupStyle,i=e.popupClassName,l=e.popupOffset,s=e.disabled,u=e.mode,c=e.onVisibleChange,f=d.useContext(Hn),p=f.getPopupContainer,h=f.rtl,v=f.subMenuOpenDelay,g=f.subMenuCloseDelay,m=f.builtinPlacements,b=f.triggerSubMenuAction,y=f.forceSubMenuRender,C=f.rootClassName,D=f.motion,w=f.defaultMotions,k=d.useState(!1),E=ce(k,2),x=E[0],A=E[1],N=H(h?H({},U4):H({},V4),m),$=X4[u],j=Ox(u,D,w),F=d.useRef(j);u!=="inline"&&(F.current=j);var B=H(H({},F.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),S=d.useRef();return d.useEffect(function(){return S.current=qt(function(){A(r)}),function(){qt.cancel(S.current)}},[r]),d.createElement(Pu,{prefixCls:t,popupClassName:de("".concat(t,"-popup"),M({},"".concat(t,"-rtl"),h),i,C),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:p,builtinPlacements:N,popupPlacement:$,popupVisible:x,popup:o,popupStyle:a,popupAlign:l&&{offset:l},action:s?[]:[b],mouseEnterDelay:v,mouseLeaveDelay:g,onPopupVisibleChange:c,forceRender:y,popupMotion:B,fresh:!0},n)}function Y4(e){var t=e.id,r=e.open,n=e.keyPath,o=e.children,a="inline",i=d.useContext(Hn),l=i.prefixCls,s=i.forceSubMenuRender,u=i.motion,c=i.defaultMotions,f=i.mode,p=d.useRef(!1);p.current=f===a;var h=d.useState(!p.current),v=ce(h,2),g=v[0],m=v[1],b=p.current?r:!1;d.useEffect(function(){p.current&&m(!1)},[f]);var y=H({},Ox(a,u,c));n.length>1&&(y.motionAppear=!1);var C=y.onVisibleChanged;return y.onVisibleChanged=function(D){return!p.current&&!D&&m(!0),C==null?void 0:C(D)},g?null:d.createElement(ml,{mode:a,locked:!p.current},d.createElement(ca,Te({visible:b},y,{forceRender:s,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),function(D){var w=D.className,k=D.style;return d.createElement(um,{id:t,className:w,style:k},o)}))}var Z4=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],J4=["active"],Q4=d.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.title,a=e.eventKey;e.warnKey;var i=e.disabled,l=e.internalPopupClose,s=e.children,u=e.itemIcon,c=e.expandIcon,f=e.popupClassName,p=e.popupOffset,h=e.popupStyle,v=e.onClick,g=e.onMouseEnter,m=e.onMouseLeave,b=e.onTitleClick,y=e.onTitleMouseEnter,C=e.onTitleMouseLeave,D=yt(e,Z4),w=xx(a),k=d.useContext(Hn),E=k.prefixCls,x=k.mode,A=k.openKeys,N=k.disabled,$=k.overflowDisabled,j=k.activeKey,F=k.selectedKeys,B=k.itemIcon,S=k.expandIcon,O=k.onItemClick,I=k.onOpenChange,P=k.onActive,T=d.useContext(im),_=T._internalRenderSubMenuItem,X=d.useContext(kx),L=X.isSubPathKey,q=si(),J="".concat(E,"-submenu"),ee=N||i,z=d.useRef(),Y=d.useRef(),V=u??B,G=c??S,K=A.includes(a),W=!$&&K,te=L(F,a),U=Sx(a,ee,y,C),Z=U.active,re=yt(U,J4),ue=d.useState(!1),he=ce(ue,2),we=he[0],Ne=he[1],me=function(Ie){ee||Ne(Ie)},ge=function(Ie){me(!0),g==null||g({key:a,domEvent:Ie})},ye=function(Ie){me(!1),m==null||m({key:a,domEvent:Ie})},Ce=d.useMemo(function(){return Z||(x!=="inline"?we||L([j],a):!1)},[x,Z,j,we,a,L]),xe=$x(q.length),Ae=function(Ie){ee||(b==null||b({key:a,domEvent:Ie}),x==="inline"&&I(a,!K))},ke=Oi(function(Ie){v==null||v(Vs(Ie)),O(Ie)}),We=function(Ie){x!=="inline"&&I(a,Ie)},_e=function(){P(a)},Pe=w&&"".concat(w,"-popup"),ve=d.useMemo(function(){return d.createElement(Bx,{icon:x!=="horizontal"?G:void 0,props:H(H({},e),{},{isOpen:W,isSubMenu:!0})},d.createElement("i",{className:"".concat(J,"-arrow")}))},[x,G,e,W,J]),Se=d.createElement("div",Te({role:"menuitem",style:xe,className:"".concat(J,"-title"),tabIndex:ee?null:-1,ref:z,title:typeof o=="string"?o:null,"data-menu-id":$&&w?null:w,"aria-expanded":W,"aria-haspopup":!0,"aria-controls":Pe,"aria-disabled":ee,onClick:Ae,onFocus:_e},re),o,ve),qe=d.useRef(x);if(x!=="inline"&&q.length>1?qe.current="vertical":qe.current=x,!$){var Ge=qe.current;Se=d.createElement(G4,{mode:Ge,prefixCls:J,visible:!l&&W&&x!=="inline",popupClassName:f,popupOffset:p,popupStyle:h,popup:d.createElement(ml,{mode:Ge==="horizontal"?"vertical":Ge},d.createElement(um,{id:Pe,ref:Y},s)),disabled:ee,onVisibleChange:We},Se)}var Xe=d.createElement(Yn.Item,Te({ref:t,role:"none"},D,{component:"li",style:r,className:de(J,"".concat(J,"-").concat(x),n,M(M(M(M({},"".concat(J,"-open"),W),"".concat(J,"-active"),Ce),"".concat(J,"-selected"),te),"".concat(J,"-disabled"),ee)),onMouseEnter:ge,onMouseLeave:ye}),Se,!$&&d.createElement(Y4,{id:Pe,open:W,keyPath:q},s));return _&&(Xe=_(Xe,e,{selected:te,active:Ce,open:W,disabled:ee})),d.createElement(ml,{onItemClick:ke,mode:x==="horizontal"?"vertical":x,itemIcon:V,expandIcon:G},Xe)}),Ru=d.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=si(r),a=cm(n,o),i=ju();d.useEffect(function(){if(i)return i.registerPath(r,o),function(){i.unregisterPath(r,o)}},[o]);var l;return i?l=a:l=d.createElement(Q4,Te({ref:t},e),a),d.createElement(Ex.Provider,{value:o},l)});function dm(e){var t=e.className,r=e.style,n=d.useContext(Hn),o=n.prefixCls,a=ju();return a?null:d.createElement("li",{role:"separator",className:de("".concat(o,"-item-divider"),t),style:r})}var eI=["className","title","eventKey","children"],tI=d.forwardRef(function(e,t){var r=e.className,n=e.title;e.eventKey;var o=e.children,a=yt(e,eI),i=d.useContext(Hn),l=i.prefixCls,s="".concat(l,"-item-group");return d.createElement("li",Te({ref:t,role:"presentation"},a,{onClick:function(u){return u.stopPropagation()},className:de(s,r)}),d.createElement("div",{role:"presentation",className:"".concat(s,"-title"),title:typeof n=="string"?n:void 0},n),d.createElement("ul",{role:"group",className:"".concat(s,"-list")},o))}),fm=d.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=si(r),a=cm(n,o),i=ju();return i?a:d.createElement(tI,Te({ref:t},fn(e,["warnKey"])),a)}),rI=["label","children","key","type","extra"];function Lf(e,t,r){var n=t.item,o=t.group,a=t.submenu,i=t.divider;return(e||[]).map(function(l,s){if(l&&lt(l)==="object"){var u=l,c=u.label,f=u.children,p=u.key,h=u.type,v=u.extra,g=yt(u,rI),m=p??"tmp-".concat(s);return f||h==="group"?h==="group"?d.createElement(o,Te({key:m},g,{title:c}),Lf(f,t,r)):d.createElement(a,Te({key:m},g,{title:c}),Lf(f,t,r)):h==="divider"?d.createElement(i,Te({key:m},g)):d.createElement(n,Te({key:m},g,{extra:v}),c,(!!v||v===0)&&d.createElement("span",{className:"".concat(r,"-item-extra")},v))}return null}).filter(function(l){return l})}function S0(e,t,r,n,o){var a=e,i=H({divider:dm,item:Iu,group:fm,submenu:Ru},n);return t&&(a=Lf(t,i,o)),cm(a,r)}var nI=["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"],Mo=[],oI=d.forwardRef(function(e,t){var r,n=e,o=n.prefixCls,a=o===void 0?"rc-menu":o,i=n.rootClassName,l=n.style,s=n.className,u=n.tabIndex,c=u===void 0?0:u,f=n.items,p=n.children,h=n.direction,v=n.id,g=n.mode,m=g===void 0?"vertical":g,b=n.inlineCollapsed,y=n.disabled,C=n.disabledOverflow,D=n.subMenuOpenDelay,w=D===void 0?.1:D,k=n.subMenuCloseDelay,E=k===void 0?.1:k,x=n.forceSubMenuRender,A=n.defaultOpenKeys,N=n.openKeys,$=n.activeKey,j=n.defaultActiveFirst,F=n.selectable,B=F===void 0?!0:F,S=n.multiple,O=S===void 0?!1:S,I=n.defaultSelectedKeys,P=n.selectedKeys,T=n.onSelect,_=n.onDeselect,X=n.inlineIndent,L=X===void 0?24:X,q=n.motion,J=n.defaultMotions,ee=n.triggerSubMenuAction,z=ee===void 0?"hover":ee,Y=n.builtinPlacements,V=n.itemIcon,G=n.expandIcon,K=n.overflowedIndicator,W=K===void 0?"...":K,te=n.overflowedIndicatorPopupClassName,U=n.getPopupContainer,Z=n.onClick,re=n.onOpenChange,ue=n.onKeyDown;n.openAnimation,n.openTransitionName;var he=n._internalRenderMenuItem,we=n._internalRenderSubMenuItem,Ne=n._internalComponents,me=yt(n,nI),ge=d.useMemo(function(){return[S0(p,f,Mo,Ne,a),S0(p,f,Mo,{},a)]},[p,f,Ne]),ye=ce(ge,2),Ce=ye[0],xe=ye[1],Ae=d.useState(!1),ke=ce(Ae,2),We=ke[0],_e=ke[1],Pe=d.useRef(),ve=R4(v),Se=h==="rtl",qe=Ur(A,{value:N,postState:function(Ct){return Ct||Mo}}),Ge=ce(qe,2),Xe=Ge[0],Ie=Ge[1],at=function(Ct){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function bt(){Ie(Ct),re==null||re(Ct)}Je?ud(bt):bt()},He=d.useState(Xe),nt=ce(He,2),ht=nt[0],At=nt[1],Et=d.useRef(!1),gt=d.useMemo(function(){return(m==="inline"||m==="vertical")&&b?["vertical",b]:[m,!1]},[m,b]),fe=ce(gt,2),Oe=fe[0],Me=fe[1],Fe=Oe==="inline",pe=d.useState(Oe),Ee=ce(pe,2),ie=Ee[0],oe=Ee[1],be=d.useState(Me),le=ce(be,2),ze=le[0],Be=le[1];d.useEffect(function(){oe(Oe),Be(Me),Et.current&&(Fe?Ie(ht):at(Mo))},[Oe,Me]);var Ke=d.useState(0),st=ce(Ke,2),dt=st[0],Ye=st[1],Ze=dt>=Ce.length-1||ie!=="horizontal"||C;d.useEffect(function(){Fe&&At(Xe)},[Xe]),d.useEffect(function(){return Et.current=!0,function(){Et.current=!1}},[]);var ot=j4(),ft=ot.registerPath,Nt=ot.unregisterPath,jt=ot.refreshOverflowKeys,It=ot.isSubPathKey,kt=ot.getKeyPath,Jt=ot.getKeys,pr=ot.getSubPathKeys,Le=d.useMemo(function(){return{registerPath:ft,unregisterPath:Nt}},[ft,Nt]),Qe=d.useMemo(function(){return{isSubPathKey:It}},[It]);d.useEffect(function(){jt(Ze?Mo:Ce.slice(dt+1).map(function(Ct){return Ct.key}))},[dt,Ze]);var vt=Ur($||j&&((r=Ce[0])===null||r===void 0?void 0:r.key),{value:$}),Tt=ce(vt,2),Ft=Tt[0],yr=Tt[1],Cr=Oi(function(Ct){yr(Ct)}),ct=Oi(function(){yr(void 0)});ei(t,function(){return{list:Pe.current,focus:function(Ct){var Je,bt=Jt(),Lt=zf(bt,ve),_t=Lt.elements,tr=Lt.key2element,Dr=Lt.element2key,mr=lm(Pe.current,_t),_r=Ft??(mr[0]?Dr.get(mr[0]):(Je=Ce.find(function(wn){return!wn.props.disabled}))===null||Je===void 0?void 0:Je.key),xr=tr.get(_r);if(_r&&xr){var Ar;xr==null||(Ar=xr.focus)===null||Ar===void 0||Ar.call(xr,Ct)}}}});var $t=Ur(I||[],{value:P,postState:function(Ct){return Array.isArray(Ct)?Ct:Ct==null?Mo:[Ct]}}),Bt=ce($t,2),Ut=Bt[0],Tr=Bt[1],Zr=function(Ct){if(B){var Je=Ct.key,bt=Ut.includes(Je),Lt;O?bt?Lt=Ut.filter(function(tr){return tr!==Je}):Lt=[].concat(je(Ut),[Je]):Lt=[Je],Tr(Lt);var _t=H(H({},Ct),{},{selectedKeys:Lt});bt?_==null||_(_t):T==null||T(_t)}!O&&Xe.length&&ie!=="inline"&&at(Mo)},xn=Oi(function(Ct){Z==null||Z(Vs(Ct)),Zr(Ct)}),on=Oi(function(Ct,Je){var bt=Xe.filter(function(_t){return _t!==Ct});if(Je)bt.push(Ct);else if(ie!=="inline"){var Lt=pr(Ct);bt=bt.filter(function(_t){return!Lt.has(_t)})}Jn(Xe,bt,!0)||at(bt,!0)}),Mr=function(Ct,Je){var bt=Je??!Xe.includes(Ct);on(Ct,bt)},an=F4(ie,Ft,Se,ve,Pe,Jt,kt,yr,Mr,ue);d.useEffect(function(){_e(!0)},[]);var Jr=d.useMemo(function(){return{_internalRenderMenuItem:he,_internalRenderSubMenuItem:we}},[he,we]),zr=ie!=="horizontal"||C?Ce:Ce.map(function(Ct,Je){return d.createElement(ml,{key:Ct.key,overflowDisabled:Je>dt},Ct)}),ln=d.createElement(Yn,Te({id:v,ref:Pe,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:Iu,className:de(a,"".concat(a,"-root"),"".concat(a,"-").concat(ie),s,M(M({},"".concat(a,"-inline-collapsed"),ze),"".concat(a,"-rtl"),Se),i),dir:h,style:l,role:"menu",tabIndex:c,data:zr,renderRawItem:function(Ct){return Ct},renderRawRest:function(Ct){var Je=Ct.length,bt=Je?Ce.slice(-Je):null;return d.createElement(Ru,{eventKey:_f,title:W,disabled:Ze,internalPopupClose:Je===0,popupClassName:te},bt)},maxCount:ie!=="horizontal"||C?Yn.INVALIDATE:Yn.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ct){Ye(Ct)},onKeyDown:an},me));return d.createElement(im.Provider,{value:Jr},d.createElement(yx.Provider,{value:ve},d.createElement(ml,{prefixCls:a,rootClassName:i,mode:ie,openKeys:Xe,rtl:Se,disabled:y,motion:We?q:null,defaultMotions:We?J:null,activeKey:Ft,onActive:Cr,onInactive:ct,selectedKeys:Ut,inlineIndent:L,subMenuOpenDelay:w,subMenuCloseDelay:E,forceSubMenuRender:x,builtinPlacements:Y,triggerSubMenuAction:z,getPopupContainer:U,itemIcon:V,expandIcon:G,onItemClick:xn,onOpenChange:on},d.createElement(kx.Provider,{value:Qe},ln),d.createElement("div",{style:{display:"none"},"aria-hidden":!0},d.createElement(wx.Provider,{value:Le},xe)))))}),Dl=oI;Dl.Item=Iu;Dl.SubMenu=Ru;Dl.ItemGroup=fm;Dl.Divider=dm;const aI=e=>{const{antCls:t,componentCls:r,colorText:n,footerBg:o,headerHeight:a,headerPadding:i,headerColor:l,footerPadding:s,fontSize:u,bodyBg:c,headerBg:f}=e;return{[r]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:c,"&, *":{boxSizing:"border-box"},[`&${r}-has-sider`]:{flexDirection:"row",[`> ${r}, > ${r}-content`]:{width:0}},[`${r}-header, &${r}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${r}-header`]:{height:a,padding:i,color:l,lineHeight:se(a),background:f,[`${t}-menu`]:{lineHeight:"inherit"}},[`${r}-footer`]:{padding:s,color:n,fontSize:u,background:o},[`${r}-content`]:{flex:"auto",color:n,minHeight:0}}},Ax=e=>{const{colorBgLayout:t,controlHeight:r,controlHeightLG:n,colorText:o,controlHeightSM:a,marginXXS:i,colorTextLightSolid:l,colorBgContainer:s}=e,u=n*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:r*2,headerPadding:`0 ${u}px`,headerColor:o,footerPadding:`${a}px ${u}px`,footerBg:t,siderBg:"#001529",triggerHeight:n+i*2,triggerBg:"#002140",triggerColor:l,zeroTriggerWidth:n,zeroTriggerHeight:n,lightSiderBg:s,lightTriggerBg:s,lightTriggerColor:o}},Fx=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];Hr("Layout",aI,Ax,{deprecatedTokens:Fx});const iI=e=>{const{componentCls:t,siderBg:r,motionDurationMid:n,motionDurationSlow:o,antCls:a,triggerHeight:i,triggerColor:l,triggerBg:s,headerHeight:u,zeroTriggerWidth:c,zeroTriggerHeight:f,borderRadiusLG:p,lightSiderBg:h,lightTriggerColor:v,lightTriggerBg:g,bodyBg:m}=e;return{[t]:{position:"relative",minWidth:0,background:r,transition:`all ${n}, background 0s`,"&-has-trigger":{paddingBottom:i},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${a}-menu${a}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:i,color:l,lineHeight:se(i),textAlign:"center",background:s,cursor:"pointer",transition:`all ${n}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:u,insetInlineEnd:e.calc(c).mul(-1).equal(),zIndex:1,width:c,height:f,color:l,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:r,borderRadius:`0 ${se(p)} ${se(p)} 0`,cursor:"pointer",transition:`background ${o} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${o}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(c).mul(-1).equal(),borderRadius:`${se(p)} 0 0 ${se(p)}`}},"&-light":{background:h,[`${t}-trigger`]:{color:v,background:g},[`${t}-zero-width-trigger`]:{color:v,background:g,border:`1px solid ${m}`,borderInlineStart:0}}}}};Hr(["Layout","Sider"],iI,Ax,{deprecatedTokens:Fx});const Px=d.createContext({});var lI={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"},sI=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:lI}))},Nx=d.forwardRef(sI);const Us=Fn({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var uI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const jx=e=>{const{prefixCls:t,className:r,dashed:n}=e,o=uI(e,["prefixCls","className","dashed"]),{getPrefixCls:a}=d.useContext(Zt),i=a("menu",t),l=de({[`${i}-item-divider-dashed`]:!!n},r);return d.createElement(dm,Object.assign({className:l},o))},Ix=e=>{var t;const{className:r,children:n,icon:o,title:a,danger:i,extra:l}=e,{prefixCls:s,firstLevel:u,direction:c,disableMenuItemTitleTooltip:f,inlineCollapsed:p}=d.useContext(Us),h=C=>{const D=n==null?void 0:n[0],w=d.createElement("span",{className:de(`${s}-title-content`,{[`${s}-title-content-with-extra`]:!!l||l===0})},n);return(!o||d.isValidElement(n)&&n.type==="span")&&n&&C&&u&&typeof D=="string"?d.createElement("div",{className:`${s}-inline-collapsed-noicon`},D.charAt(0)):w},{siderCollapsed:v}=d.useContext(Px);let g=a;typeof a>"u"?g=u?n:"":a===!1&&(g="");const m={title:g};!v&&!p&&(m.title=null,m.open=!1);const b=Ln(n).length;let y=d.createElement(Iu,Object.assign({},fn(e,["title","icon","danger"]),{className:de({[`${s}-item-danger`]:i,[`${s}-item-only-child`]:(o?b+1:b)===1},r),title:typeof a=="string"?a:void 0}),eo(o,{className:de(d.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:void 0,`${s}-item-icon`)}),h(p));return f||(y=d.createElement(pl,Object.assign({},m,{placement:c==="rtl"?"left":"right",classNames:{root:`${s}-inline-collapsed-tooltip`}}),y)),y};var cI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Xs=d.createContext(null),Rx=d.forwardRef((e,t)=>{const{children:r}=e,n=cI(e,["children"]),o=d.useContext(Xs),a=d.useMemo(()=>Object.assign(Object.assign({},o),n),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),i=KB(r),l=sa(t,i?ua(r):null);return d.createElement(Xs.Provider,{value:a},d.createElement(dl,{space:!0},i?d.cloneElement(r,{ref:l}):r))}),dI=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:a,lineType:i,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${se(a)} ${i} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover,
327
+ > ${t}-item-active,
328
+ > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${r}`,`background ${r}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},fI=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
329
+ ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${se(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${se(t)})`}}}}),$0=e=>No(e),B0=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:a,groupTitleColor:i,itemBg:l,subMenuItemBg:s,itemSelectedBg:u,activeBarHeight:c,activeBarWidth:f,activeBarBorderWidth:p,motionDurationSlow:h,motionEaseInOut:v,motionEaseOut:g,itemPaddingInline:m,motionDurationMid:b,itemHoverColor:y,lineType:C,colorSplit:D,itemDisabledColor:w,dangerItemColor:k,dangerItemHoverColor:E,dangerItemSelectedColor:x,dangerItemActiveBg:A,dangerItemSelectedBg:N,popupBg:$,itemHoverBg:j,itemActiveBg:F,menuSubMenuBg:B,horizontalItemSelectedColor:S,horizontalItemSelectedBg:O,horizontalItemBorderRadius:I,horizontalItemHoverBg:P}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:l,[`&${r}-root:focus-visible`]:Object.assign({},$0(e)),[`${r}-item`]:{"&-group-title, &-extra":{color:i}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:a},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},$0(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${w} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:y}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:j},"&:active":{backgroundColor:F}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:j},"&:active":{backgroundColor:F}}},[`${r}-item-danger`]:{color:k,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:E}},[`&${r}-item:active`]:{background:A}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:x},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:u,[`&${r}-item-danger`]:{backgroundColor:N}},[`&${r}-submenu > ${r}`]:{backgroundColor:B},[`&${r}-popup > ${r}`]:{backgroundColor:$},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:$},[`&${r}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:p,marginTop:e.calc(p).mul(-1).equal(),marginBottom:0,borderRadius:I,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:`${se(c)} solid transparent`,transition:`border-color ${h} ${v}`,content:'""'},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:c,borderBottomColor:S}},"&-selected":{color:S,backgroundColor:O,"&:hover":{backgroundColor:O},"&::after":{borderBottomWidth:c,borderBottomColor:S}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${se(p)} ${C} ${D}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:s},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${se(f)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${b} ${g}`,`opacity ${b} ${g}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:x}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${b} ${v}`,`opacity ${b} ${v}`].join(",")}}}}}},O0=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:a,marginXS:i,itemMarginBlock:l,itemWidth:s,itemPaddingInline:u}=e,c=e.calc(a).add(o).add(i).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:se(r),paddingInline:u,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:l,width:s},[`> ${t}-item,
330
+ > ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:se(r)},[`${t}-item-group-list ${t}-submenu-title,
331
+ ${t}-submenu-title`]:{paddingInlineEnd:c}}},pI=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:i,motionEaseOut:l,paddingXL:s,itemMarginInline:u,fontSizeLG:c,motionDurationFast:f,motionDurationSlow:p,paddingXS:h,boxShadowSecondary:v,collapsedWidth:g,collapsedIconSize:m}=e,b={height:n,lineHeight:se(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},O0(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},O0(e)),{boxShadow:v})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${se(e.calc(i).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${p}`,`background ${p}`,`padding ${f} ${l}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:b,[`& ${t}-item-group-title`]:{paddingInlineStart:s}},[`${t}-item`]:b}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:c,textAlign:"center"}}},[`> ${t}-item,
332
+ > ${t}-item-group > ${t}-item-group-list > ${t}-item,
333
+ > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
334
+ > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${se(e.calc(m).div(2).equal())} - ${se(u)})`,textOverflow:"clip",[`
335
+ ${t}-submenu-arrow,
336
+ ${t}-submenu-expand-icon
337
+ `]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:m,lineHeight:se(n),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:Object.assign(Object.assign({},sl),{paddingInline:h})}}]},A0=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:a,iconCls:i,iconSize:l,iconMarginInlineEnd:s}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background ${r}`,`padding calc(${r} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${i}`]:{minWidth:l,fontSize:l,transition:[`font-size ${n} ${a}`,`margin ${r} ${o}`,`color ${r}`].join(","),"+ span":{marginInlineStart:s,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:Object.assign({},Cl()),[`&${t}-item-only-child`]:{[`> ${i}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},F0=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:a,menuArrowOffset:i}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${r} ${n}, opacity ${r}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${r} ${n}`,`transform ${r} ${n}`,`top ${r} ${n}`,`color ${r} ${n}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${se(e.calc(i).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${se(i)})`}}}}},mI=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:i,paddingXS:l,padding:s,colorSplit:u,lineWidth:c,zIndexPopup:f,borderRadiusLG:p,subMenuItemBorderRadius:h,menuArrowSize:v,menuArrowOffset:g,lineType:m,groupTitleLineHeight:b,groupTitleFontSize:y}=e;return[{"":{[r]:Object.assign(Object.assign({},zs()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Br(e)),zs()),{marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${se(l)} ${se(s)}`,fontSize:y,lineHeight:b,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${o} ${i}`,`background ${o} ${i}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o} ${i}`,`background ${o} ${i}`,`padding ${a} ${i}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${o} ${i}`,`padding ${o} ${i}`].join(",")},[`${r}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:u,borderStyle:m,borderWidth:0,borderTopWidth:c,marginBlock:c,padding:0,"&-dashed":{borderStyle:"dashed"}}}),A0(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${se(e.calc(n).mul(2).equal())} ${se(s)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,borderRadius:p,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:Object.assign(Object.assign(Object.assign({borderRadius:p},A0(e)),F0(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:h},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${i}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),F0(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
338
+ &-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${se(g)})`},"&::after":{transform:`rotate(45deg) translateX(${se(e.calc(g).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${se(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${se(e.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${se(g)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},hI=e=>{var t,r,n;const{colorPrimary:o,colorError:a,colorTextDisabled:i,colorErrorBg:l,colorText:s,colorTextDescription:u,colorBgContainer:c,colorFillAlter:f,colorFillContent:p,lineWidth:h,lineWidthBold:v,controlItemBgActive:g,colorBgTextHover:m,controlHeightLG:b,lineHeight:y,colorBgElevated:C,marginXXS:D,padding:w,fontSize:k,controlHeightSM:E,fontSizeLG:x,colorTextLightSolid:A,colorErrorHover:N}=e,$=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,j=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:h,F=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,B=new Ht(A).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:s,itemColor:s,colorItemTextHover:s,itemHoverColor:s,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:u,groupTitleColor:u,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:c,itemBg:c,colorItemBgHover:m,itemHoverBg:m,colorItemBgActive:p,itemActiveBg:g,colorSubItemBg:f,subMenuItemBg:f,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:$,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:h,activeBarBorderWidth:j,colorItemTextDisabled:i,itemDisabledColor:i,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:F,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:y,collapsedWidth:b*2,popupBg:C,itemMarginBlock:D,itemPaddingInline:w,horizontalLineHeight:`${b*1.15}px`,iconSize:k,iconMarginInlineEnd:E-k,collapsedIconSize:x,groupTitleFontSize:k,darkItemDisabledColor:new Ht(A).setA(.25).toRgbString(),darkItemColor:B,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:A,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:B,darkItemHoverColor:A,darkDangerItemHoverColor:N,darkDangerItemSelectedColor:A,darkDangerItemActiveBg:a,itemWidth:$?`calc(100% + ${j}px)`:`calc(100% - ${F*2}px)`}},gI=(e,t=e,r=!0)=>Hr("Menu",n=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:i,darkItemColor:l,darkDangerItemColor:s,darkItemBg:u,darkSubMenuItemBg:c,darkItemSelectedColor:f,darkItemSelectedBg:p,darkDangerItemSelectedBg:h,darkItemHoverBg:v,darkGroupTitleColor:g,darkItemHoverColor:m,darkItemDisabledColor:b,darkDangerItemHoverColor:y,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:D,popupBg:w,darkPopupBg:k}=n,E=n.calc(i).div(7).mul(5).equal(),x=er(n,{menuArrowSize:E,menuHorizontalHeight:n.calc(a).mul(1.15).equal(),menuArrowOffset:n.calc(E).mul(.25).equal(),menuSubMenuBg:o,calc:n.calc,popupBg:w}),A=er(x,{itemColor:l,itemHoverColor:m,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:k,subMenuItemBg:c,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:b,dangerItemColor:s,dangerItemHoverColor:y,dangerItemSelectedColor:C,dangerItemActiveBg:D,dangerItemSelectedBg:h,menuSubMenuBg:c,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[mI(x),dI(x),pI(x),B0(x,"light"),B0(A,"dark"),fI(x),kC(x),Ga(x,"slide-up"),Ga(x,"slide-down"),Yp(x,"zoom-big")]},hI,{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:r,unitless:{groupTitleLineHeight:!0}})(e,t),Tx=e=>{var t;const{popupClassName:r,icon:n,title:o,theme:a}=e,i=d.useContext(Us),{prefixCls:l,inlineCollapsed:s,theme:u}=i,c=si();let f;if(!n)f=s&&!c.length&&o&&typeof o=="string"?d.createElement("div",{className:`${l}-inline-collapsed-noicon`},o.charAt(0)):d.createElement("span",{className:`${l}-title-content`},o);else{const v=d.isValidElement(o)&&o.type==="span";f=d.createElement(d.Fragment,null,eo(n,{className:de(d.isValidElement(n)?(t=n.props)===null||t===void 0?void 0:t.className:void 0,`${l}-item-icon`)}),v?o:d.createElement("span",{className:`${l}-title-content`},o))}const p=d.useMemo(()=>Object.assign(Object.assign({},i),{firstLevel:!1}),[i]),[h]=yu("Menu");return d.createElement(Us.Provider,{value:p},d.createElement(Ru,Object.assign({},fn(e,["icon"]),{title:f,popupClassName:de(l,r,`${l}-${a||u}`),popupStyle:Object.assign({zIndex:h},e.popupStyle)})))};var vI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function Gc(e){return e===null||e===!1}const bI={item:Ix,submenu:Tx,divider:jx},yI=dn((e,t)=>{var r;const n=d.useContext(Xs),o=n||{},{getPrefixCls:a,getPopupContainer:i,direction:l,menu:s}=d.useContext(Zt),u=a(),{prefixCls:c,className:f,style:p,theme:h="light",expandIcon:v,_internalDisableMenuItemTitleTooltip:g,inlineCollapsed:m,siderCollapsed:b,rootClassName:y,mode:C,selectable:D,onClick:w,overflowedIndicatorPopupClassName:k}=e,E=vI(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),x=fn(E,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:C});const A=nr((...L)=>{var q;w==null||w.apply(void 0,L),(q=o.onClick)===null||q===void 0||q.call(o)}),N=o.mode||C,$=D??o.selectable,j=m??b,F={horizontal:{motionName:`${u}-slide-up`},inline:yC(u),other:{motionName:`${u}-zoom-big`}},B=a("menu",c||o.prefixCls),S=bo(B),[O,I,P]=gI(B,S,!n),T=de(`${B}-${h}`,s==null?void 0:s.className,f),_=d.useMemo(()=>{var L,q;if(typeof v=="function"||Gc(v))return v||null;if(typeof o.expandIcon=="function"||Gc(o.expandIcon))return o.expandIcon||null;if(typeof(s==null?void 0:s.expandIcon)=="function"||Gc(s==null?void 0:s.expandIcon))return(s==null?void 0:s.expandIcon)||null;const J=(L=v??(o==null?void 0:o.expandIcon))!==null&&L!==void 0?L:s==null?void 0:s.expandIcon;return eo(J,{className:de(`${B}-submenu-expand-icon`,d.isValidElement(J)?(q=J.props)===null||q===void 0?void 0:q.className:void 0)})},[v,o==null?void 0:o.expandIcon,s==null?void 0:s.expandIcon,B]),X=d.useMemo(()=>({prefixCls:B,inlineCollapsed:j||!1,direction:l,firstLevel:!0,theme:h,mode:N,disableMenuItemTitleTooltip:g}),[B,j,l,g,h]);return O(d.createElement(Xs.Provider,{value:null},d.createElement(Us.Provider,{value:X},d.createElement(Dl,Object.assign({getPopupContainer:i,overflowedIndicator:d.createElement(Nx,null),overflowedIndicatorPopupClassName:de(B,`${B}-${h}`,k),mode:N,selectable:$,onClick:A},x,{inlineCollapsed:j,style:Object.assign(Object.assign({},s==null?void 0:s.style),p),className:T,prefixCls:B,direction:l,defaultMotions:F,expandIcon:_,ref:t,rootClassName:de(y,I,o.rootClassName,P,S),_internalComponents:bI})))))}),ui=dn((e,t)=>{const r=Ve(null),n=d.useContext(Px);return ei(t,()=>({menu:r.current,focus:o=>{var a;(a=r.current)===null||a===void 0||a.focus(o)}})),d.createElement(yI,Object.assign({ref:r},e,n))});ui.Item=Ix;ui.SubMenu=Tx;ui.Divider=jx;ui.ItemGroup=fm;const CI=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:o}=e,a=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:n,"&:hover":{color:o,backgroundColor:n}}}}}},xI=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:a,antCls:i,iconCls:l,motionDurationMid:s,paddingBlock:u,fontSize:c,dropdownEdgeChildPadding:f,colorTextDisabled:p,fontSizeIcon:h,controlPaddingHorizontal:v,colorBgElevated:g}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(a).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${i}-btn`]:{[`& > ${l}-down, & > ${i}-btn-icon > ${l}-down`]:{fontSize:h}},[`${t}-wrap`]:{position:"relative",[`${i}-btn > ${l}-down`]:{fontSize:h},[`${l}-down::before`]:{transition:`transform ${s}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomLeft,
339
+ &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomLeft,
340
+ &${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottom,
341
+ &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottom,
342
+ &${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomRight,
343
+ &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Vp},[`&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topLeft,
344
+ &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topLeft,
345
+ &${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-top,
346
+ &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-top,
347
+ &${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topRight,
348
+ &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Xp},[`&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomLeft,
349
+ &${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottom,
350
+ &${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Up},[`&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topLeft,
351
+ &${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-top,
352
+ &${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Gp}}},hx(e,g,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},Br(e)),{[r]:Object.assign(Object.assign({padding:f,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},ul(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${se(u)} ${se(v)}`,color:e.colorTextDescription,transition:`all ${s}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:c,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${s}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${se(u)} ${se(v)}`,color:e.colorText,fontWeight:"normal",fontSize:c,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${s}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},ul(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:p,cursor:"not-allowed","&:hover":{color:p,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${se(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:h,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${se(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(v).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:p,backgroundColor:g,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Ga(e,"slide-up"),Ga(e,"slide-down"),Ws(e,"move-up"),Ws(e,"move-down"),Yp(e,"zoom-big")]]},wI=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},am({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),px(e)),EI=Hr("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,a=er(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[xI(a),CI(a)]},wI,{resetStyle:!1}),Tu=e=>{var t;const{menu:r,arrow:n,prefixCls:o,children:a,trigger:i,disabled:l,dropdownRender:s,popupRender:u,getPopupContainer:c,overlayClassName:f,rootClassName:p,overlayStyle:h,open:v,onOpenChange:g,visible:m,onVisibleChange:b,mouseEnterDelay:y=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:D=!0,placement:w="",overlay:k,transitionName:E,destroyOnHidden:x,destroyPopupOnHide:A}=e,{getPopupContainer:N,getPrefixCls:$,direction:j,dropdown:F}=d.useContext(Zt),B=u||s;oi();const S=d.useMemo(()=>{const he=$();return E!==void 0?E:w.includes("top")?`${he}-slide-down`:`${he}-slide-up`},[$,w,E]),O=d.useMemo(()=>w?w.includes("Center")?w.slice(0,w.indexOf("Center")):w:j==="rtl"?"bottomRight":"bottomLeft",[w,j]),I=$("dropdown",o),P=bo(I),[T,_,X]=EI(I,P),[,L]=Yr(),q=d.Children.only(E4(a)?d.createElement("span",null,a):a),J=eo(q,{className:de(`${I}-trigger`,{[`${I}-rtl`]:j==="rtl"},q.props.className),disabled:(t=q.props.disabled)!==null&&t!==void 0?t:l}),ee=l?[]:i,z=!!(ee!=null&&ee.includes("contextMenu")),[Y,V]=Ur(!1,{value:v??m}),G=nr(he=>{g==null||g(he,{source:"trigger"}),b==null||b(he),V(he)}),K=de(f,p,_,X,P,F==null?void 0:F.className,{[`${I}-rtl`]:j==="rtl"}),W=gx({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:D,offset:L.marginXXS,arrowWidth:n?L.sizePopupArrow:0,borderRadius:L.borderRadius}),te=d.useCallback(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(g==null||g(!1,{source:"menu"}),V(!1))},[r==null?void 0:r.selectable,r==null?void 0:r.multiple]),U=()=>{let he;return r!=null&&r.items?he=d.createElement(ui,Object.assign({},r)):typeof k=="function"?he=k():he=k,B&&(he=B(he)),he=d.Children.only(typeof he=="string"?d.createElement("span",null,he):he),d.createElement(Rx,{prefixCls:`${I}-menu`,rootClassName:de(X,P),expandIcon:d.createElement("span",{className:`${I}-menu-submenu-arrow`},j==="rtl"?d.createElement(If,{className:`${I}-menu-submenu-arrow-icon`}):d.createElement(vf,{className:`${I}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:te,validator:({mode:we})=>{}},he)},[Z,re]=yu("Dropdown",h==null?void 0:h.zIndex);let ue=d.createElement(w4,Object.assign({alignPoint:z},fn(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:C,visible:Y,builtinPlacements:W,arrow:!!n,overlayClassName:K,prefixCls:I,getPopupContainer:c||N,transitionName:S,trigger:ee,overlay:U,placement:O,onVisibleChange:G,overlayStyle:Object.assign(Object.assign(Object.assign({},F==null?void 0:F.style),h),{zIndex:Z}),autoDestroy:x??A}),J);return Z&&(ue=d.createElement(Hp.Provider,{value:re},ue)),T(ue)},kI=zC(Tu,"align",void 0,"dropdown",e=>e),DI=e=>d.createElement(kI,Object.assign({},e),d.createElement("span",null));Tu._InternalPanelDoNotUseOrYouWillBeFired=DI;var Hf={exports:{}},SI=Hf.exports,P0;function $I(){return P0||(P0=1,(function(e,t){(function(r,n){e.exports=n()})(SI,(function(){var r=1e3,n=6e4,o=36e5,a="millisecond",i="second",l="minute",s="hour",u="day",c="week",f="month",p="quarter",h="year",v="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var S=["th","st","nd","rd"],O=B%100;return"["+B+(S[(O-20)%10]||S[O]||S[0])+"]"}},C=function(B,S,O){var I=String(B);return!I||I.length>=S?B:""+Array(S+1-I.length).join(O)+B},D={s:C,z:function(B){var S=-B.utcOffset(),O=Math.abs(S),I=Math.floor(O/60),P=O%60;return(S<=0?"+":"-")+C(I,2,"0")+":"+C(P,2,"0")},m:function B(S,O){if(S.date()<O.date())return-B(O,S);var I=12*(O.year()-S.year())+(O.month()-S.month()),P=S.clone().add(I,f),T=O-P<0,_=S.clone().add(I+(T?-1:1),f);return+(-(I+(O-P)/(T?P-_:_-P))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:f,y:h,w:c,d:u,D:v,h:s,m:l,s:i,ms:a,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},w="en",k={};k[w]=y;var E="$isDayjsObject",x=function(B){return B instanceof j||!(!B||!B[E])},A=function B(S,O,I){var P;if(!S)return w;if(typeof S=="string"){var T=S.toLowerCase();k[T]&&(P=T),O&&(k[T]=O,P=T);var _=S.split("-");if(!P&&_.length>1)return B(_[0])}else{var X=S.name;k[X]=S,P=X}return!I&&P&&(w=P),P||!I&&w},N=function(B,S){if(x(B))return B.clone();var O=typeof S=="object"?S:{};return O.date=B,O.args=arguments,new j(O)},$=D;$.l=A,$.i=x,$.w=function(B,S){return N(B,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var j=(function(){function B(O){this.$L=A(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[E]=!0}var S=B.prototype;return S.parse=function(O){this.$d=(function(I){var P=I.date,T=I.utc;if(P===null)return new Date(NaN);if($.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var _=P.match(m);if(_){var X=_[2]-1||0,L=(_[7]||"0").substring(0,3);return T?new Date(Date.UTC(_[1],X,_[3]||1,_[4]||0,_[5]||0,_[6]||0,L)):new Date(_[1],X,_[3]||1,_[4]||0,_[5]||0,_[6]||0,L)}}return new Date(P)})(O),this.init()},S.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},S.$utils=function(){return $},S.isValid=function(){return this.$d.toString()!==g},S.isSame=function(O,I){var P=N(O);return this.startOf(I)<=P&&P<=this.endOf(I)},S.isAfter=function(O,I){return N(O)<this.startOf(I)},S.isBefore=function(O,I){return this.endOf(I)<N(O)},S.$g=function(O,I,P){return $.u(O)?this[I]:this.set(P,O)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(O,I){var P=this,T=!!$.u(I)||I,_=$.p(O),X=function(G,K){var W=$.w(P.$u?Date.UTC(P.$y,K,G):new Date(P.$y,K,G),P);return T?W:W.endOf(u)},L=function(G,K){return $.w(P.toDate()[G].apply(P.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(K)),P)},q=this.$W,J=this.$M,ee=this.$D,z="set"+(this.$u?"UTC":"");switch(_){case h:return T?X(1,0):X(31,11);case f:return T?X(1,J):X(0,J+1);case c:var Y=this.$locale().weekStart||0,V=(q<Y?q+7:q)-Y;return X(T?ee-V:ee+(6-V),J);case u:case v:return L(z+"Hours",0);case s:return L(z+"Minutes",1);case l:return L(z+"Seconds",2);case i:return L(z+"Milliseconds",3);default:return this.clone()}},S.endOf=function(O){return this.startOf(O,!1)},S.$set=function(O,I){var P,T=$.p(O),_="set"+(this.$u?"UTC":""),X=(P={},P[u]=_+"Date",P[v]=_+"Date",P[f]=_+"Month",P[h]=_+"FullYear",P[s]=_+"Hours",P[l]=_+"Minutes",P[i]=_+"Seconds",P[a]=_+"Milliseconds",P)[T],L=T===u?this.$D+(I-this.$W):I;if(T===f||T===h){var q=this.clone().set(v,1);q.$d[X](L),q.init(),this.$d=q.set(v,Math.min(this.$D,q.daysInMonth())).$d}else X&&this.$d[X](L);return this.init(),this},S.set=function(O,I){return this.clone().$set(O,I)},S.get=function(O){return this[$.p(O)]()},S.add=function(O,I){var P,T=this;O=Number(O);var _=$.p(I),X=function(J){var ee=N(T);return $.w(ee.date(ee.date()+Math.round(J*O)),T)};if(_===f)return this.set(f,this.$M+O);if(_===h)return this.set(h,this.$y+O);if(_===u)return X(1);if(_===c)return X(7);var L=(P={},P[l]=n,P[s]=o,P[i]=r,P)[_]||1,q=this.$d.getTime()+O*L;return $.w(q,this)},S.subtract=function(O,I){return this.add(-1*O,I)},S.format=function(O){var I=this,P=this.$locale();if(!this.isValid())return P.invalidDate||g;var T=O||"YYYY-MM-DDTHH:mm:ssZ",_=$.z(this),X=this.$H,L=this.$m,q=this.$M,J=P.weekdays,ee=P.months,z=P.meridiem,Y=function(K,W,te,U){return K&&(K[W]||K(I,T))||te[W].slice(0,U)},V=function(K){return $.s(X%12||12,K,"0")},G=z||function(K,W,te){var U=K<12?"AM":"PM";return te?U.toLowerCase():U};return T.replace(b,(function(K,W){return W||(function(te){switch(te){case"YY":return String(I.$y).slice(-2);case"YYYY":return $.s(I.$y,4,"0");case"M":return q+1;case"MM":return $.s(q+1,2,"0");case"MMM":return Y(P.monthsShort,q,ee,3);case"MMMM":return Y(ee,q);case"D":return I.$D;case"DD":return $.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return Y(P.weekdaysMin,I.$W,J,2);case"ddd":return Y(P.weekdaysShort,I.$W,J,3);case"dddd":return J[I.$W];case"H":return String(X);case"HH":return $.s(X,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return G(X,L,!0);case"A":return G(X,L,!1);case"m":return String(L);case"mm":return $.s(L,2,"0");case"s":return String(I.$s);case"ss":return $.s(I.$s,2,"0");case"SSS":return $.s(I.$ms,3,"0");case"Z":return _}return null})(K)||_.replace(":","")}))},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(O,I,P){var T,_=this,X=$.p(I),L=N(O),q=(L.utcOffset()-this.utcOffset())*n,J=this-L,ee=function(){return $.m(_,L)};switch(X){case h:T=ee()/12;break;case f:T=ee();break;case p:T=ee()/3;break;case c:T=(J-q)/6048e5;break;case u:T=(J-q)/864e5;break;case s:T=J/o;break;case l:T=J/n;break;case i:T=J/r;break;default:T=J}return P?T:$.a(T)},S.daysInMonth=function(){return this.endOf(f).$D},S.$locale=function(){return k[this.$L]},S.locale=function(O,I){if(!O)return this.$L;var P=this.clone(),T=A(O,I,!0);return T&&(P.$L=T),P},S.clone=function(){return $.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},B})(),F=j.prototype;return N.prototype=F,[["$ms",a],["$s",i],["$m",l],["$H",s],["$W",u],["$M",f],["$y",h],["$D",v]].forEach((function(B){F[B[1]]=function(S){return this.$g(S,B[0],B[1])}})),N.extend=function(B,S){return B.$i||(B(S,j,N),B.$i=!0),N},N.locale=A,N.isDayjs=x,N.unix=function(B){return N(1e3*B)},N.en=k[w],N.Ls=k,N.p={},N}))})(Hf)),Hf.exports}var BI=$I();const OI=gl(BI),Mx=d.createContext(null),AI=Mx.Provider,zx=d.createContext(null),FI=zx.Provider;var PI=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],_x=dn(function(e,t){var r=e.prefixCls,n=r===void 0?"rc-checkbox":r,o=e.className,a=e.style,i=e.checked,l=e.disabled,s=e.defaultChecked,u=s===void 0?!1:s,c=e.type,f=c===void 0?"checkbox":c,p=e.title,h=e.onChange,v=yt(e,PI),g=Ve(null),m=Ve(null),b=Ur(u,{value:i}),y=ce(b,2),C=y[0],D=y[1];ei(t,function(){return{focus:function(E){var x;(x=g.current)===null||x===void 0||x.focus(E)},blur:function(){var E;(E=g.current)===null||E===void 0||E.blur()},input:g.current,nativeElement:m.current}});var w=de(n,o,M(M({},"".concat(n,"-checked"),C),"".concat(n,"-disabled"),l)),k=function(E){l||("checked"in e||D(E.target.checked),h==null||h({target:H(H({},e),{},{type:f,checked:E.target.checked}),stopPropagation:function(){E.stopPropagation()},preventDefault:function(){E.preventDefault()},nativeEvent:E.nativeEvent}))};return d.createElement("span",{className:w,title:p,style:a,ref:m},d.createElement("input",Te({},v,{className:"".concat(n,"-input"),ref:g,onChange:k,disabled:l,checked:!!C,type:f})),d.createElement("span",{className:"".concat(n,"-inner")}))});function Lx(e){const t=Q.useRef(null),r=()=>{qt.cancel(t.current),t.current=null};return[()=>{r(),t.current=qt(()=>{t.current=null})},n=>{t.current&&(n.stopPropagation(),r()),e==null||e(n)}]}const NI=e=>{const{componentCls:t,antCls:r}=e,n=`${t}-group`;return{[n]:Object.assign(Object.assign({},Br(e)),{display:"inline-block",fontSize:0,[`&${n}-rtl`]:{direction:"rtl"},[`&${n}-block`]:{display:"flex"},[`${r}-badge ${r}-badge-count`]:{zIndex:1},[`> ${r}-badge:not(:first-child) > ${r}-button-wrapper`]:{borderInlineStart:"none"}})}},jI=e=>{const{componentCls:t,wrapperMarginInlineEnd:r,colorPrimary:n,radioSize:o,motionDurationSlow:a,motionDurationMid:i,motionEaseInOutCirc:l,colorBgContainer:s,colorBorder:u,lineWidth:c,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:h,dotColorDisabled:v,lineType:g,radioColor:m,radioBgColor:b,calc:y}=e,C=`${t}-inner`,D=y(o).sub(y(4).mul(2)),w=y(1).mul(o).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},Br(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:r,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${se(c)} ${g} ${n}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},Br(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,
353
+ &:hover ${C}`]:{borderColor:n},[`${t}-input:focus-visible + ${C}`]:No(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:w,height:w,marginBlockStart:y(1).mul(o).div(-2).equal({unit:!0}),marginInlineStart:y(1).mul(o).div(-2).equal({unit:!0}),backgroundColor:m,borderBlockStart:0,borderInlineStart:0,borderRadius:w,transform:"scale(0)",opacity:0,transition:`all ${a} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:w,height:w,backgroundColor:s,borderColor:u,borderStyle:"solid",borderWidth:c,borderRadius:"50%",transition:`all ${i}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[C]:{borderColor:n,backgroundColor:b,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${a} ${l}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[C]:{backgroundColor:f,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:v}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:p,cursor:"not-allowed"},[`&${t}-checked`]:{[C]:{"&::after":{transform:`scale(${y(D).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},II=e=>{const{buttonColor:t,controlHeight:r,componentCls:n,lineWidth:o,lineType:a,colorBorder:i,motionDurationSlow:l,motionDurationMid:s,buttonPaddingInline:u,fontSize:c,buttonBg:f,fontSizeLG:p,controlHeightLG:h,controlHeightSM:v,paddingXS:g,borderRadius:m,borderRadiusSM:b,borderRadiusLG:y,buttonCheckedBg:C,buttonSolidCheckedColor:D,colorTextDisabled:w,colorBgContainerDisabled:k,buttonCheckedBgDisabled:E,buttonCheckedColorDisabled:x,colorPrimary:A,colorPrimaryHover:N,colorPrimaryActive:$,buttonSolidCheckedBg:j,buttonSolidCheckedHoverBg:F,buttonSolidCheckedActiveBg:B,calc:S}=e;return{[`${n}-button-wrapper`]:{position:"relative",display:"inline-block",height:r,margin:0,paddingInline:u,paddingBlock:0,color:t,fontSize:c,lineHeight:se(S(r).sub(S(o).mul(2)).equal()),background:f,border:`${se(o)} ${a} ${i}`,borderBlockStartWidth:S(o).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${s}`,`background ${s}`,`box-shadow ${s}`].join(","),a:{color:t},[`> ${n}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:S(o).mul(-1).equal(),insetInlineStart:S(o).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:i,transition:`background-color ${l}`,content:'""'}},"&:first-child":{borderInlineStart:`${se(o)} ${a} ${i}`,borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m},"&:first-child:last-child":{borderRadius:m},[`${n}-group-large &`]:{height:h,fontSize:p,lineHeight:se(S(h).sub(S(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},[`${n}-group-small &`]:{height:v,paddingInline:S(g).sub(o).equal(),paddingBlock:0,lineHeight:se(S(v).sub(S(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:A},"&:has(:focus-visible)":No(e),[`${n}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${n}-button-wrapper-disabled)`]:{zIndex:1,color:A,background:C,borderColor:A,"&::before":{backgroundColor:A},"&:first-child":{borderColor:A},"&:hover":{color:N,borderColor:N,"&::before":{backgroundColor:N}},"&:active":{color:$,borderColor:$,"&::before":{backgroundColor:$}}},[`${n}-group-solid &-checked:not(${n}-button-wrapper-disabled)`]:{color:D,background:j,borderColor:j,"&:hover":{color:D,background:F,borderColor:F},"&:active":{color:D,background:B,borderColor:B}},"&-disabled":{color:w,backgroundColor:k,borderColor:i,cursor:"not-allowed","&:first-child, &:hover":{color:w,backgroundColor:k,borderColor:i}},[`&-disabled${n}-button-wrapper-checked`]:{color:x,backgroundColor:E,borderColor:i,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},RI=e=>{const{wireframe:t,padding:r,marginXS:n,lineWidth:o,fontSizeLG:a,colorText:i,colorBgContainer:l,colorTextDisabled:s,controlItemBgActiveDisabled:u,colorTextLightSolid:c,colorPrimary:f,colorPrimaryHover:p,colorPrimaryActive:h,colorWhite:v}=e,g=4,m=a,b=t?m-g*2:m-(g+o)*2;return{radioSize:m,dotSize:b,dotColorDisabled:s,buttonSolidCheckedColor:c,buttonSolidCheckedBg:f,buttonSolidCheckedHoverBg:p,buttonSolidCheckedActiveBg:h,buttonBg:l,buttonCheckedBg:l,buttonColor:i,buttonCheckedBgDisabled:u,buttonCheckedColorDisabled:s,buttonPaddingInline:r-o,wrapperMarginInlineEnd:n,radioColor:t?f:v,radioBgColor:t?l:f}},Hx=Hr("Radio",e=>{const{controlOutline:t,controlOutlineWidth:r}=e,n=`0 0 0 ${se(r)} ${t}`,o=er(e,{radioFocusShadow:n,radioButtonFocusShadow:n});return[NI(o),jI(o),II(o)]},RI,{unitless:{radioSize:!0,dotSize:!0}});var TI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const MI=(e,t)=>{var r,n;const o=d.useContext(Mx),a=d.useContext(zx),{getPrefixCls:i,direction:l,radio:s}=d.useContext(Zt),u=d.useRef(null),c=ro(t,u),{isFormItemInput:f}=d.useContext(oa),p=O=>{var I,P;(I=e.onChange)===null||I===void 0||I.call(e,O),(P=o==null?void 0:o.onChange)===null||P===void 0||P.call(o,O)},{prefixCls:h,className:v,rootClassName:g,children:m,style:b,title:y}=e,C=TI(e,["prefixCls","className","rootClassName","children","style","title"]),D=i("radio",h),w=((o==null?void 0:o.optionType)||a)==="button",k=w?`${D}-button`:D,E=bo(D),[x,A,N]=Hx(D,E),$=Object.assign({},C),j=d.useContext(Po);o&&($.name=o.name,$.onChange=p,$.checked=e.value===o.value,$.disabled=(r=$.disabled)!==null&&r!==void 0?r:o.disabled),$.disabled=(n=$.disabled)!==null&&n!==void 0?n:j;const F=de(`${k}-wrapper`,{[`${k}-wrapper-checked`]:$.checked,[`${k}-wrapper-disabled`]:$.disabled,[`${k}-wrapper-rtl`]:l==="rtl",[`${k}-wrapper-in-form-item`]:f,[`${k}-wrapper-block`]:!!(o!=null&&o.block)},s==null?void 0:s.className,v,g,A,N,E),[B,S]=Lx($.onClick);return x(d.createElement(Kp,{component:"Radio",disabled:$.disabled},d.createElement("label",{className:F,style:Object.assign(Object.assign({},s==null?void 0:s.style),b),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:y,onClick:B},d.createElement(_x,Object.assign({},$,{className:de($.className,{[wu]:!w}),type:"radio",prefixCls:k,ref:c,onClick:S})),m!==void 0?d.createElement("span",{className:`${k}-label`},m):null)))},Gs=d.forwardRef(MI);function zI(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function _I(e){return zI(e).join("_")}const LI=d.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n}=d.useContext(Zt),{name:o}=d.useContext(oa),a=Qp(_I(o)),{prefixCls:i,className:l,rootClassName:s,options:u,buttonStyle:c="outline",disabled:f,children:p,size:h,style:v,id:g,optionType:m,name:b=a,defaultValue:y,value:C,block:D=!1,onChange:w,onMouseEnter:k,onMouseLeave:E,onFocus:x,onBlur:A}=e,[N,$]=Ur(y,{value:C}),j=d.useCallback(q=>{const J=N,ee=q.target.value;"value"in e||$(ee),ee!==J&&(w==null||w(q))},[N,$,w]),F=r("radio",i),B=`${F}-group`,S=bo(F),[O,I,P]=Hx(F,S);let T=p;u&&u.length>0&&(T=u.map(q=>typeof q=="string"||typeof q=="number"?d.createElement(Gs,{key:q.toString(),prefixCls:F,disabled:f,value:q,checked:N===q},q):d.createElement(Gs,{key:`radio-group-value-options-${q.value}`,prefixCls:F,disabled:q.disabled||f,value:q.value,checked:N===q.value,title:q.title,style:q.style,className:q.className,id:q.id,required:q.required},q.label)));const _=fa(h),X=de(B,`${B}-${c}`,{[`${B}-${_}`]:_,[`${B}-rtl`]:n==="rtl",[`${B}-block`]:D},l,s,I,P,S),L=d.useMemo(()=>({onChange:j,value:N,disabled:f,name:b,optionType:m,block:D}),[j,N,f,b,m,D]);return O(d.createElement("div",Object.assign({},Qn(e,{aria:!0,data:!0}),{className:X,style:v,onMouseEnter:k,onMouseLeave:E,onFocus:x,onBlur:A,id:g,ref:t}),d.createElement(AI,{value:L},T)))}),HI=d.memo(LI);var WI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const KI=(e,t)=>{const{getPrefixCls:r}=d.useContext(Zt),{prefixCls:n}=e,o=WI(e,["prefixCls"]),a=r("radio",n);return d.createElement(FI,{value:"button"},d.createElement(Gs,Object.assign({prefixCls:a},o,{type:"radio",ref:t})))},qI=d.forwardRef(KI),Sl=Gs;Sl.Button=qI;Sl.Group=HI;Sl.__ANT_RADIO=!0;function pm(e){return er(e,{inputAffixPadding:e.paddingXXS})}const mm=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:o,controlHeightSM:a,controlHeightLG:i,fontSizeLG:l,lineHeightLG:s,paddingSM:u,controlPaddingHorizontalSM:c,controlPaddingHorizontal:f,colorFillAlter:p,colorPrimaryHover:h,colorPrimary:v,controlOutlineWidth:g,controlOutline:m,colorErrorOutline:b,colorWarningOutline:y,colorBgContainer:C,inputFontSize:D,inputFontSizeLG:w,inputFontSizeSM:k}=e,E=D||r,x=k||E,A=w||l,N=Math.round((t-E*n)/2*10)/10-o,$=Math.round((a-x*n)/2*10)/10-o,j=Math.ceil((i-A*s)/2*10)/10-o;return{paddingBlock:Math.max(N,0),paddingBlockSM:Math.max($,0),paddingBlockLG:Math.max(j,0),paddingInline:u-o,paddingInlineSM:c-o,paddingInlineLG:f-o,addonBg:p,activeBorderColor:v,hoverBorderColor:h,activeShadow:`0 0 0 ${g}px ${m}`,errorActiveShadow:`0 0 0 ${g}px ${b}`,warningActiveShadow:`0 0 0 ${g}px ${y}`,hoverBg:C,activeBg:C,inputFontSize:E,inputFontSizeLG:A,inputFontSizeSM:x}},VI=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),Mu=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},VI(er(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),hm=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),N0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},hm(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),UI=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},hm(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Mu(e))}),N0(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),N0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),j0=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),XI=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},j0(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),j0(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},Mu(e))}})}),GI=(e,t)=>{const{componentCls:r}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},Wx=(e,t)=>{var r;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(r=t==null?void 0:t.inputColor)!==null&&r!==void 0?r:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},I0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Wx(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),YI=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Wx(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Mu(e))}),I0(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),I0(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),R0=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),ZI=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},R0(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),R0(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),Kx=(e,t)=>({background:e.colorBgContainer,borderWidth:`${se(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),T0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Kx(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),JI=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kx(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),T0(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),T0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),QI=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),qx=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:o}=e;return{padding:`${se(t)} ${se(o)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},gm=e=>({padding:`${se(e.paddingBlockSM)} ${se(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vm=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${se(e.paddingBlock)} ${se(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},QI(e.colorTextPlaceholder)),{"&-lg":Object.assign({},qx(e)),"&-sm":Object.assign({},gm(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),eR=e=>{const{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},qx(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},gm(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${se(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${se(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${se(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${se(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${r}-cascader-picker`]:{margin:`-9px ${se(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},zs()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
354
+ & > ${t}-affix-wrapper,
355
+ & > ${t}-number-affix-wrapper,
356
+ & > ${r}-picker-range
357
+ `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select > ${r}-select-selector,
358
+ & > ${r}-select-auto-complete ${t},
359
+ & > ${r}-cascader-picker ${t},
360
+ & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
361
+ & > ${r}-select:first-child > ${r}-select-selector,
362
+ & > ${r}-select-auto-complete:first-child ${t},
363
+ & > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
364
+ & > ${r}-select:last-child > ${r}-select-selector,
365
+ & > ${r}-cascader-picker:last-child ${t},
366
+ & > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},tR=e=>{const{componentCls:t,controlHeightSM:r,lineWidth:n,calc:o}=e,a=o(r).sub(o(n).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Br(e)),vm(e)),UI(e)),YI(e)),GI(e)),JI(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},rR=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${se(e.inputAffixPadding)}`}}}},nR=e=>{const{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:o,colorIcon:a,colorIconHover:i,iconCls:l}=e,s=`${t}-affix-wrapper`,u=`${t}-affix-wrapper-disabled`;return{[s]:Object.assign(Object.assign(Object.assign(Object.assign({},vm(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}}}),rR(e)),{[`${l}${t}-password-icon`]:{color:a,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:i}}}),[`${t}-underlined`]:{borderRadius:0},[u]:{[`${l}${t}-password-icon`]:{color:a,cursor:"not-allowed","&:hover":{color:a}}}}},oR=e=>{const{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Br(e)),eR(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}}},XI(e)),ZI(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},aR=e=>{const{componentCls:t,antCls:r}=e,n=`${t}-search`;return{[n]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${n}-button:not(${r}-btn-color-primary):not(${r}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${n}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${n}-button:not(${r}-btn-color-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${r}-btn-loading::before`]:{inset:0}}}},[`${n}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
367
+ > ${t},
368
+ ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},iR=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},lR=Hr(["Input","Shared"],e=>{const t=er(e,pm(e));return[tR(t),nR(t)]},mm,{resetFont:!1}),sR=Hr(["Input","Component"],e=>{const t=er(e,pm(e));return[oR(t),aR(t),iR(t),Jp(t)]},mm,{resetFont:!1});function uR(e,t,r){var n=r||{},o=n.noTrailing,a=o===void 0?!1:o,i=n.noLeading,l=i===void 0?!1:i,s=n.debounceMode,u=s===void 0?void 0:s,c,f=!1,p=0;function h(){c&&clearTimeout(c)}function v(m){var b=m||{},y=b.upcomingOnly,C=y===void 0?!1:y;h(),f=!C}function g(){for(var m=arguments.length,b=new Array(m),y=0;y<m;y++)b[y]=arguments[y];var C=this,D=Date.now()-p;if(f)return;function w(){p=Date.now(),t.apply(C,b)}function k(){c=void 0}!l&&u&&!c&&w(),h(),u===void 0&&D>e?l?(p=Date.now(),a||(c=setTimeout(u?k:w,e))):w():a!==!0&&(c=setTimeout(u?k:w,u===void 0?e-D:e))}return g.cancel=v,g}function cR(e,t,r){var n={},o=n.atBegin,a=o===void 0?!1:o;return uR(e,t,{debounceMode:a!==!1})}function un(e,t){return e[t]}var dR=["children"];function Vx(e,t){return"".concat(e,"-").concat(t)}function fR(e){return e&&e.type&&e.type.isTreeNode}function $l(e,t){return e??t}function Ja(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,i=r||"title";return{title:i,_title:n||[i],key:o||"key",children:a||"children"}}function Ux(e){function t(r){var n=Ln(r);return n.map(function(o){if(!fR(o))return lr(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,i=o.props,l=i.children,s=yt(i,dR),u=H({key:a},s),c=t(l);return c.length&&(u.children=c),u}).filter(function(o){return o})}return t(e)}function Yc(e,t,r){var n=Ja(r),o=n._title,a=n.key,i=n.children,l=new Set(t===!0?[]:t),s=[];function u(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(p,h){for(var v=Vx(f?f.pos:"0",h),g=$l(p[a],v),m,b=0;b<o.length;b+=1){var y=o[b];if(p[y]!==void 0){m=p[y];break}}var C=Object.assign(fn(p,[].concat(je(o),[a,i])),{title:m,key:g,parent:f,pos:v,children:null,data:p,isStart:[].concat(je(f?f.isStart:[]),[h===0]),isEnd:[].concat(je(f?f.isEnd:[]),[h===c.length-1])});return s.push(C),t===!0||l.has(g)?C.children=u(p[i]||[],C):C.children=[],C})}return u(e),s}function pR(e,t,r){var n={};lt(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,i=o.externalGetKey,l=o.fieldNames,s=Ja(l),u=s.key,c=s.children,f=a||c,p;i?typeof i=="string"?p=function(v){return v[i]}:typeof i=="function"&&(p=function(v){return i(v)}):p=function(v,g){return $l(v[u],g)};function h(v,g,m,b){var y=v?v[f]:e,C=v?Vx(m.pos,g):"0",D=v?[].concat(je(b),[v]):[];if(v){var w=p(v,C),k={node:v,index:g,pos:C,key:w,parentPos:m.node?m.pos:null,level:m.level+1,nodes:D};t(k)}y&&y.forEach(function(E,x){h(E,x,{node:v,pos:C,level:m?m.level+1:-1},D)})}h(null)}function bm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,i=t.childrenPropName,l=t.fieldNames,s=arguments.length>2?arguments[2]:void 0,u=a||s,c={},f={},p={posEntities:c,keyEntities:f};return r&&(p=r(p)||p),pR(e,function(h){var v=h.node,g=h.index,m=h.pos,b=h.key,y=h.parentPos,C=h.level,D=h.nodes,w={node:v,nodes:D,index:g,key:b,pos:m,level:C},k=$l(b,m);c[m]=w,f[k]=w,w.parent=c[y],w.parent&&(w.parent.children=w.parent.children||[],w.parent.children.push(w)),n&&n(w,p)},{externalGetKey:u,childrenPropName:i,fieldNames:l}),o&&o(p),p}function _i(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,i=t.checkedKeys,l=t.halfCheckedKeys,s=t.dragOverNodeKey,u=t.dropPosition,c=t.keyEntities,f=un(c,e),p={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:i.indexOf(e)!==-1,halfChecked:l.indexOf(e)!==-1,pos:String(f?f.pos:""),dragOver:s===e&&u===0,dragOverGapTop:s===e&&u===-1,dragOverGapBottom:s===e&&u===1};return p}function wr(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,i=e.loading,l=e.halfChecked,s=e.dragOver,u=e.dragOverGapTop,c=e.dragOverGapBottom,f=e.pos,p=e.active,h=e.eventKey,v=H(H({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:i,halfChecked:l,dragOver:s,dragOverGapTop:u,dragOverGapBottom:c,pos:f,active:p,key:h});return"props"in v||Object.defineProperty(v,"props",{get:function(){return lr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),v}function Xx(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function mR(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function hR(e,t,r,n){for(var o=new Set(e),a=new Set,i=0;i<=r;i+=1){var l=t.get(i)||new Set;l.forEach(function(f){var p=f.key,h=f.node,v=f.children,g=v===void 0?[]:v;o.has(p)&&!n(h)&&g.filter(function(m){return!n(m.node)}).forEach(function(m){o.add(m.key)})})}for(var s=new Set,u=r;u>=0;u-=1){var c=t.get(u)||new Set;c.forEach(function(f){var p=f.parent,h=f.node;if(!(n(h)||!f.parent||s.has(f.parent.key))){if(n(f.parent.node)){s.add(p.key);return}var v=!0,g=!1;(p.children||[]).filter(function(m){return!n(m.node)}).forEach(function(m){var b=m.key,y=o.has(b);v&&!y&&(v=!1),!g&&(y||a.has(b))&&(g=!0)}),v&&o.add(p.key),g&&a.add(p.key),s.add(p.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(Xx(a,o))}}function gR(e,t,r,n,o){for(var a=new Set(e),i=new Set(t),l=0;l<=n;l+=1){var s=r.get(l)||new Set;s.forEach(function(p){var h=p.key,v=p.node,g=p.children,m=g===void 0?[]:g;!a.has(h)&&!i.has(h)&&!o(v)&&m.filter(function(b){return!o(b.node)}).forEach(function(b){a.delete(b.key)})})}i=new Set;for(var u=new Set,c=n;c>=0;c-=1){var f=r.get(c)||new Set;f.forEach(function(p){var h=p.parent,v=p.node;if(!(o(v)||!p.parent||u.has(p.parent.key))){if(o(p.parent.node)){u.add(h.key);return}var g=!0,m=!1;(h.children||[]).filter(function(b){return!o(b.node)}).forEach(function(b){var y=b.key,C=a.has(y);g&&!C&&(g=!1),!m&&(C||i.has(y))&&(m=!0)}),g||a.delete(h.key),m&&i.add(h.key),u.add(h.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(Xx(i,a))}}function ja(e,t,r,n){var o=[],a;n?a=n:a=mR;var i=new Set(e.filter(function(c){var f=!!un(r,c);return f||o.push(c),f})),l=new Map,s=0;Object.keys(r).forEach(function(c){var f=r[c],p=f.level,h=l.get(p);h||(h=new Set,l.set(p,h)),h.add(f),s=Math.max(s,p)}),lr(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var u;return t===!0?u=hR(i,l,s,a):u=gR(i,t.halfCheckedKeys,l,s,a),u}const vR=e=>{const{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},Br(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},Br(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},Br(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:No(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${se(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
369
+ ${r}:not(${r}-disabled),
370
+ ${t}:not(${t}-disabled)
371
+ `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
372
+ ${r}-checked:not(${r}-disabled),
373
+ ${t}-checked:not(${t}-disabled)
374
+ `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function Gx(e,t){const r=er(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return vR(r)}const Yx=Hr("Checkbox",(e,{prefixCls:t})=>[Gx(t,e)]),Zx=Q.createContext(null);var bR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const yR=(e,t)=>{var r;const{prefixCls:n,className:o,rootClassName:a,children:i,indeterminate:l=!1,style:s,onMouseEnter:u,onMouseLeave:c,skipGroup:f=!1,disabled:p}=e,h=bR(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:v,direction:g,checkbox:m}=d.useContext(Zt),b=d.useContext(Zx),{isFormItemInput:y}=d.useContext(oa),C=d.useContext(Po),D=(r=(b==null?void 0:b.disabled)||p)!==null&&r!==void 0?r:C,w=d.useRef(h.value),k=d.useRef(null),E=ro(t,k);d.useEffect(()=>{b==null||b.registerValue(h.value)},[]),d.useEffect(()=>{if(!f)return h.value!==w.current&&(b==null||b.cancelValue(w.current),b==null||b.registerValue(h.value),w.current=h.value),()=>b==null?void 0:b.cancelValue(h.value)},[h.value]),d.useEffect(()=>{var P;!((P=k.current)===null||P===void 0)&&P.input&&(k.current.input.indeterminate=l)},[l]);const x=v("checkbox",n),A=bo(x),[N,$,j]=Yx(x,A),F=Object.assign({},h);b&&!f&&(F.onChange=(...P)=>{h.onChange&&h.onChange.apply(h,P),b.toggleOption&&b.toggleOption({label:i,value:h.value})},F.name=b.name,F.checked=b.value.includes(h.value));const B=de(`${x}-wrapper`,{[`${x}-rtl`]:g==="rtl",[`${x}-wrapper-checked`]:F.checked,[`${x}-wrapper-disabled`]:D,[`${x}-wrapper-in-form-item`]:y},m==null?void 0:m.className,o,a,j,A,$),S=de({[`${x}-indeterminate`]:l},wu,$),[O,I]=Lx(F.onClick);return N(d.createElement(Kp,{component:"Checkbox",disabled:D},d.createElement("label",{className:B,style:Object.assign(Object.assign({},m==null?void 0:m.style),s),onMouseEnter:u,onMouseLeave:c,onClick:O},d.createElement(_x,Object.assign({},F,{onClick:I,prefixCls:x,className:S,disabled:D,ref:E})),i!=null&&d.createElement("span",{className:`${x}-label`},i))))},Jx=d.forwardRef(yR);var CR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const xR=d.forwardRef((e,t)=>{const{defaultValue:r,children:n,options:o=[],prefixCls:a,className:i,rootClassName:l,style:s,onChange:u}=e,c=CR(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:f,direction:p}=d.useContext(Zt),[h,v]=d.useState(c.value||r||[]),[g,m]=d.useState([]);d.useEffect(()=>{"value"in c&&v(c.value||[])},[c.value]);const b=d.useMemo(()=>o.map(S=>typeof S=="string"||typeof S=="number"?{label:S,value:S}:S),[o]),y=S=>{m(O=>O.filter(I=>I!==S))},C=S=>{m(O=>[].concat(je(O),[S]))},D=S=>{const O=h.indexOf(S.value),I=je(h);O===-1?I.push(S.value):I.splice(O,1),"value"in c||v(I),u==null||u(I.filter(P=>g.includes(P)).sort((P,T)=>{const _=b.findIndex(L=>L.value===P),X=b.findIndex(L=>L.value===T);return _-X}))},w=f("checkbox",a),k=`${w}-group`,E=bo(w),[x,A,N]=Yx(w,E),$=fn(c,["value","disabled"]),j=o.length?b.map(S=>d.createElement(Jx,{prefixCls:w,key:S.value.toString(),disabled:"disabled"in S?S.disabled:c.disabled,value:S.value,checked:h.includes(S.value),onChange:S.onChange,className:de(`${k}-item`,S.className),style:S.style,title:S.title,id:S.id,required:S.required},S.label)):n,F=d.useMemo(()=>({toggleOption:D,value:h,disabled:c.disabled,name:c.name,registerValue:C,cancelValue:y}),[D,h,c.disabled,c.name,C,y]),B=de(k,{[`${k}-rtl`]:p==="rtl"},i,l,N,E,A);return x(d.createElement("div",Object.assign({className:B,style:s},$,{ref:t}),d.createElement(Zx.Provider,{value:F},j)))}),Qa=Jx;Qa.Group=xR;Qa.__ANT_CHECKBOX=!0;function wR(e){return!!(e.addonBefore||e.addonAfter)}function ER(e){return!!(e.prefix||e.suffix||e.allowClear)}function M0(e,t,r){var n=t.cloneNode(!0),o=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},o}function z0(e,t,r,n){if(r){var o=t;if(t.type==="click"){o=M0(t,e,""),r(o);return}if(e.type!=="file"&&n!==void 0){o=M0(t,e,n),r(o);return}r(o)}}function kR(e,t){if(e){e.focus(t);var r=t||{},n=r.cursor;if(n){var o=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}}var DR=Q.forwardRef(function(e,t){var r,n,o,a=e.inputElement,i=e.children,l=e.prefixCls,s=e.prefix,u=e.suffix,c=e.addonBefore,f=e.addonAfter,p=e.className,h=e.style,v=e.disabled,g=e.readOnly,m=e.focused,b=e.triggerFocus,y=e.allowClear,C=e.value,D=e.handleReset,w=e.hidden,k=e.classes,E=e.classNames,x=e.dataAttrs,A=e.styles,N=e.components,$=e.onClear,j=i??a,F=(N==null?void 0:N.affixWrapper)||"span",B=(N==null?void 0:N.groupWrapper)||"span",S=(N==null?void 0:N.wrapper)||"span",O=(N==null?void 0:N.groupAddon)||"span",I=Ve(null),P=function(Z){var re;(re=I.current)!==null&&re!==void 0&&re.contains(Z.target)&&(b==null||b())},T=ER(e),_=Ww(j,{value:C,className:de((r=j.props)===null||r===void 0?void 0:r.className,!T&&(E==null?void 0:E.variant))||null}),X=Ve(null);if(Q.useImperativeHandle(t,function(){return{nativeElement:X.current||I.current}}),T){var L=null;if(y){var q=!v&&!g&&C,J="".concat(l,"-clear-icon"),ee=lt(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"\u2716";L=Q.createElement("button",{type:"button",tabIndex:-1,onClick:function(Z){D==null||D(Z),$==null||$()},onMouseDown:function(Z){return Z.preventDefault()},className:de(J,M(M({},"".concat(J,"-hidden"),!q),"".concat(J,"-has-suffix"),!!u))},ee)}var z="".concat(l,"-affix-wrapper"),Y=de(z,M(M(M(M(M({},"".concat(l,"-disabled"),v),"".concat(z,"-disabled"),v),"".concat(z,"-focused"),m),"".concat(z,"-readonly"),g),"".concat(z,"-input-with-clear-btn"),u&&y&&C),k==null?void 0:k.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),V=(u||y)&&Q.createElement("span",{className:de("".concat(l,"-suffix"),E==null?void 0:E.suffix),style:A==null?void 0:A.suffix},L,u);_=Q.createElement(F,Te({className:Y,style:A==null?void 0:A.affixWrapper,onClick:P},x==null?void 0:x.affixWrapper,{ref:I}),s&&Q.createElement("span",{className:de("".concat(l,"-prefix"),E==null?void 0:E.prefix),style:A==null?void 0:A.prefix},s),_,V)}if(wR(e)){var G="".concat(l,"-group"),K="".concat(G,"-addon"),W="".concat(G,"-wrapper"),te=de("".concat(l,"-wrapper"),G,k==null?void 0:k.wrapper,E==null?void 0:E.wrapper),U=de(W,M({},"".concat(W,"-disabled"),v),k==null?void 0:k.group,E==null?void 0:E.groupWrapper);_=Q.createElement(B,{className:U,ref:X},Q.createElement(S,{className:te},c&&Q.createElement(O,{className:K},c),_,f&&Q.createElement(O,{className:K},f)))}return Q.cloneElement(_,{className:de((n=_.props)===null||n===void 0?void 0:n.className,p)||null,style:H(H({},(o=_.props)===null||o===void 0?void 0:o.style),h),hidden:w})}),SR=["show"];function $R(e,t){return d.useMemo(function(){var r={};t&&(r.show=lt(t)==="object"&&t.formatter?t.formatter:!!t),r=H(H({},r),e);var n=r,o=n.show,a=yt(n,SR);return H(H({},a),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:a.strategy||function(i){return i.length}})},[e,t])}var BR=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],OR=dn(function(e,t){var r=e.autoComplete,n=e.onChange,o=e.onFocus,a=e.onBlur,i=e.onPressEnter,l=e.onKeyDown,s=e.onKeyUp,u=e.prefixCls,c=u===void 0?"rc-input":u,f=e.disabled,p=e.htmlSize,h=e.className,v=e.maxLength,g=e.suffix,m=e.showCount,b=e.count,y=e.type,C=y===void 0?"text":y,D=e.classes,w=e.classNames,k=e.styles,E=e.onCompositionStart,x=e.onCompositionEnd,A=yt(e,BR),N=xt(!1),$=ce(N,2),j=$[0],F=$[1],B=Ve(!1),S=Ve(!1),O=Ve(null),I=Ve(null),P=function(Ce){O.current&&kR(O.current,Ce)},T=Ur(e.defaultValue,{value:e.value}),_=ce(T,2),X=_[0],L=_[1],q=X==null?"":String(X),J=xt(null),ee=ce(J,2),z=ee[0],Y=ee[1],V=$R(b,m),G=V.max||v,K=V.strategy(q),W=!!G&&K>G;ei(t,function(){var Ce;return{focus:P,blur:function(){var xe;(xe=O.current)===null||xe===void 0||xe.blur()},setSelectionRange:function(xe,Ae,ke){var We;(We=O.current)===null||We===void 0||We.setSelectionRange(xe,Ae,ke)},select:function(){var xe;(xe=O.current)===null||xe===void 0||xe.select()},input:O.current,nativeElement:((Ce=I.current)===null||Ce===void 0?void 0:Ce.nativeElement)||O.current}}),Ot(function(){S.current&&(S.current=!1),F(function(Ce){return Ce&&f?!1:Ce})},[f]);var te=function(Ce,xe,Ae){var ke=xe;if(!B.current&&V.exceedFormatter&&V.max&&V.strategy(xe)>V.max){if(ke=V.exceedFormatter(xe,{max:V.max}),xe!==ke){var We,_e;Y([((We=O.current)===null||We===void 0?void 0:We.selectionStart)||0,((_e=O.current)===null||_e===void 0?void 0:_e.selectionEnd)||0])}}else if(Ae.source==="compositionEnd")return;L(ke),O.current&&z0(O.current,Ce,n,ke)};Ot(function(){if(z){var Ce;(Ce=O.current)===null||Ce===void 0||Ce.setSelectionRange.apply(Ce,je(z))}},[z]);var U=function(Ce){te(Ce,Ce.target.value,{source:"change"})},Z=function(Ce){B.current=!1,te(Ce,Ce.currentTarget.value,{source:"compositionEnd"}),x==null||x(Ce)},re=function(Ce){i&&Ce.key==="Enter"&&!S.current&&(S.current=!0,i(Ce)),l==null||l(Ce)},ue=function(Ce){Ce.key==="Enter"&&(S.current=!1),s==null||s(Ce)},he=function(Ce){F(!0),o==null||o(Ce)},we=function(Ce){S.current&&(S.current=!1),F(!1),a==null||a(Ce)},Ne=function(Ce){L(""),P(),O.current&&z0(O.current,Ce,n)},me=W&&"".concat(c,"-out-of-range"),ge=function(){var Ce=fn(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Q.createElement("input",Te({autoComplete:r},Ce,{onChange:U,onFocus:he,onBlur:we,onKeyDown:re,onKeyUp:ue,className:de(c,M({},"".concat(c,"-disabled"),f),w==null?void 0:w.input),style:k==null?void 0:k.input,ref:O,size:p,type:C,onCompositionStart:function(xe){B.current=!0,E==null||E(xe)},onCompositionEnd:Z}))},ye=function(){var Ce=Number(G)>0;if(g||V.show){var xe=V.showFormatter?V.showFormatter({value:q,count:K,maxLength:G}):"".concat(K).concat(Ce?" / ".concat(G):"");return Q.createElement(Q.Fragment,null,V.show&&Q.createElement("span",{className:de("".concat(c,"-show-count-suffix"),M({},"".concat(c,"-show-count-has-suffix"),!!g),w==null?void 0:w.count),style:H({},k==null?void 0:k.count)},xe),g)}return null};return Q.createElement(DR,Te({},A,{prefixCls:c,className:de(h,me),handleReset:Ne,value:q,focused:j,triggerFocus:P,suffix:ye(),disabled:f,classes:D,classNames:w,styles:k,ref:I}),ge())});const AR=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:Q.createElement(mC,null)}),t};function FR(e,t){const r=Ve([]),n=()=>{r.current.push(setTimeout(()=>{var o,a,i,l;!((o=e.current)===null||o===void 0)&&o.input&&((a=e.current)===null||a===void 0?void 0:a.input.getAttribute("type"))==="password"&&!((i=e.current)===null||i===void 0)&&i.input.hasAttribute("value")&&((l=e.current)===null||l===void 0||l.input.removeAttribute("value"))}))};return Ot(()=>(n(),()=>r.current.forEach(o=>{o&&clearTimeout(o)})),[]),n}function PR(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var NR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const jR=dn((e,t)=>{const{prefixCls:r,bordered:n=!0,status:o,size:a,disabled:i,onBlur:l,onFocus:s,suffix:u,allowClear:c,addonAfter:f,addonBefore:p,className:h,style:v,styles:g,rootClassName:m,onChange:b,classNames:y,variant:C}=e,D=NR(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:w,direction:k,allowClear:E,autoComplete:x,className:A,style:N,classNames:$,styles:j}=Ro("input"),F=w("input",r),B=Ve(null),S=bo(F),[O,I,P]=lR(F,m),[T]=sR(F,S),{compactSize:_,compactItemClassnames:X}=ku(F,k),L=fa(we=>{var Ne;return(Ne=a??_)!==null&&Ne!==void 0?Ne:we}),q=Q.useContext(Po),J=i??q,{status:ee,hasFeedback:z,feedbackIcon:Y}=Rr(oa),V=QC(ee,o),G=PR(e)||!!z;Ve(G);const K=FR(B),W=we=>{K(),l==null||l(we)},te=we=>{K(),s==null||s(we)},U=we=>{K(),b==null||b(we)},Z=(z||u)&&Q.createElement(Q.Fragment,null,u,z&&Y),re=AR(c??E),[ue,he]=nx("input",C,n);return O(T(Q.createElement(OR,Object.assign({ref:ro(t,B),prefixCls:F,autoComplete:x},D,{disabled:J,onBlur:W,onFocus:te,style:Object.assign(Object.assign({},N),v),styles:Object.assign(Object.assign({},j),g),suffix:Z,allowClear:re,className:de(h,m,P,S,X,A),onChange:U,addonBefore:p&&Q.createElement(dl,{form:!0,space:!0},p),addonAfter:f&&Q.createElement(dl,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},y),$),{input:de({[`${F}-sm`]:L==="small",[`${F}-lg`]:L==="large",[`${F}-rtl`]:k==="rtl"},y==null?void 0:y.input,$.input,I),variant:de({[`${F}-${ue}`]:he},jf(F,V)),affixWrapper:de({[`${F}-affix-wrapper-sm`]:L==="small",[`${F}-affix-wrapper-lg`]:L==="large",[`${F}-affix-wrapper-rtl`]:k==="rtl"},I),wrapper:de({[`${F}-group-rtl`]:k==="rtl"},I),groupWrapper:de({[`${F}-group-wrapper-sm`]:L==="small",[`${F}-group-wrapper-lg`]:L==="large",[`${F}-group-wrapper-rtl`]:k==="rtl",[`${F}-group-wrapper-${ue}`]:he},jf(`${F}-group-wrapper`,V,z),I)})}))))});function _0(e){return["small","middle","large"].includes(e)}function L0(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const Qx=Q.createContext({latestIndex:0}),IR=Qx.Provider,RR=({className:e,index:t,children:r,split:n,style:o})=>{const{latestIndex:a}=d.useContext(Qx);return r==null?null:d.createElement(d.Fragment,null,d.createElement("div",{className:e,style:o},r),t<a&&n&&d.createElement("span",{className:`${e}-split`},n))};var TR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const MR=d.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,size:a,className:i,style:l,classNames:s,styles:u}=Ro("space"),{size:c=a??"small",align:f,className:p,rootClassName:h,children:v,direction:g="horizontal",prefixCls:m,split:b,style:y,wrap:C=!1,classNames:D,styles:w}=e,k=TR(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,x]=Array.isArray(c)?c:[c,c],A=_0(x),N=_0(E),$=L0(x),j=L0(E),F=Ln(v,{keepEmpty:!0}),B=f===void 0&&g==="horizontal"?"center":f,S=n("space",m),[O,I,P]=xC(S),T=de(S,i,I,`${S}-${g}`,{[`${S}-rtl`]:o==="rtl",[`${S}-align-${B}`]:B,[`${S}-gap-row-${x}`]:A,[`${S}-gap-col-${E}`]:N},p,h,P),_=de(`${S}-item`,(r=D==null?void 0:D.item)!==null&&r!==void 0?r:s.item);let X=0;const L=F.map((ee,z)=>{var Y;ee!=null&&(X=z);const V=(ee==null?void 0:ee.key)||`${_}-${z}`;return d.createElement(RR,{className:_,key:V,index:z,split:b,style:(Y=w==null?void 0:w.item)!==null&&Y!==void 0?Y:u.item},ee)}),q=d.useMemo(()=>({latestIndex:X}),[X]);if(F.length===0)return null;const J={};return C&&(J.flexWrap="wrap"),!N&&j&&(J.columnGap=E),!A&&$&&(J.rowGap=x),O(d.createElement("div",Object.assign({ref:t,className:T,style:Object.assign(Object.assign(Object.assign({},J),l),y)},k),d.createElement(IR,{value:q},L)))}),ew=MR;ew.Compact=a5;var zR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const tw=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=d.useContext(Zt),{prefixCls:o,type:a="default",danger:i,disabled:l,loading:s,onClick:u,htmlType:c,children:f,className:p,menu:h,arrow:v,autoFocus:g,overlay:m,trigger:b,align:y,open:C,onOpenChange:D,placement:w,getPopupContainer:k,href:E,icon:x=d.createElement(Nx,null),title:A,buttonsRender:N=K=>K,mouseEnterDelay:$,mouseLeaveDelay:j,overlayClassName:F,overlayStyle:B,destroyOnHidden:S,destroyPopupOnHide:O,dropdownRender:I,popupRender:P}=e,T=zR(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),_=r("dropdown",o),X=`${_}-button`,L={menu:h,arrow:v,autoFocus:g,align:y,disabled:l,trigger:l?[]:b,onOpenChange:D,getPopupContainer:k||t,mouseEnterDelay:$,mouseLeaveDelay:j,overlayClassName:F,overlayStyle:B,destroyOnHidden:S,popupRender:P||I},{compactSize:q,compactItemClassnames:J}=ku(_,n),ee=de(X,J,p);"destroyPopupOnHide"in e&&(L.destroyPopupOnHide=O),"overlay"in e&&(L.overlay=m),"open"in e&&(L.open=C),"placement"in e?L.placement=w:L.placement=n==="rtl"?"bottomLeft":"bottomRight";const z=d.createElement(Ya,{type:a,danger:i,disabled:l,loading:s,onClick:u,htmlType:c,href:E,title:A},f),Y=d.createElement(Ya,{type:a,danger:i,icon:x}),[V,G]=N([z,Y]);return d.createElement(ew.Compact,Object.assign({className:ee,size:q,block:!0},T),V,d.createElement(Tu,Object.assign({},L),G))};tw.__ANT_BUTTON=!0;const ym=Tu;ym.Button=tw;function H0(e,t,r,n){var o=Hi.unstable_batchedUpdates?function(a){Hi.unstable_batchedUpdates(r,a)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var _R={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},LR=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:_R}))},W0=d.forwardRef(LR),HR={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},WR=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:HR}))},K0=d.forwardRef(WR),KR={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},qR=[10,20,50,100],VR=function(e){var t=e.pageSizeOptions,r=t===void 0?qR:t,n=e.locale,o=e.changeSize,a=e.pageSize,i=e.goButton,l=e.quickGo,s=e.rootPrefixCls,u=e.disabled,c=e.buildOptionText,f=e.showSizeChanger,p=e.sizeChangerRender,h=Q.useState(""),v=ce(h,2),g=v[0],m=v[1],b=function(){return!g||Number.isNaN(g)?void 0:Number(g)},y=typeof c=="function"?c:function($){return"".concat($," ").concat(n.items_per_page)},C=function($){m($.target.value)},D=function($){i||g===""||(m(""),!($.relatedTarget&&($.relatedTarget.className.indexOf("".concat(s,"-item-link"))>=0||$.relatedTarget.className.indexOf("".concat(s,"-item"))>=0))&&(l==null||l(b())))},w=function($){g!==""&&($.keyCode===rt.ENTER||$.type==="click")&&(m(""),l==null||l(b()))},k=function(){return r.some(function($){return $.toString()===a.toString()})?r:r.concat([a]).sort(function($,j){var F=Number.isNaN(Number($))?0:Number($),B=Number.isNaN(Number(j))?0:Number(j);return F-B})},E="".concat(s,"-options");if(!f&&!l)return null;var x=null,A=null,N=null;return f&&p&&(x=p({disabled:u,size:a,onSizeChange:function($){o==null||o(Number($))},"aria-label":n.page_size,className:"".concat(E,"-size-changer"),options:k().map(function($){return{label:y($),value:$}})})),l&&(i&&(N=typeof i=="boolean"?Q.createElement("button",{type:"button",onClick:w,onKeyUp:w,disabled:u,className:"".concat(E,"-quick-jumper-button")},n.jump_to_confirm):Q.createElement("span",{onClick:w,onKeyUp:w},i)),A=Q.createElement("div",{className:"".concat(E,"-quick-jumper")},n.jump_to,Q.createElement("input",{disabled:u,type:"text",value:g,onChange:C,onKeyUp:w,onBlur:D,"aria-label":n.page}),n.page,N)),Q.createElement("li",{className:E},x,A)},ki=function(e){var t=e.rootPrefixCls,r=e.page,n=e.active,o=e.className,a=e.showTitle,i=e.onClick,l=e.onKeyPress,s=e.itemRender,u="".concat(t,"-item"),c=de(u,"".concat(u,"-").concat(r),M(M({},"".concat(u,"-active"),n),"".concat(u,"-disabled"),!r),o),f=function(){i(r)},p=function(v){l(v,i,r)},h=s(r,"page",Q.createElement("a",{rel:"nofollow"},r));return h?Q.createElement("li",{title:a?String(r):null,className:c,onClick:f,onKeyDown:p,tabIndex:0},h):null},UR=function(e,t,r){return r};function q0(){}function V0(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function zo(e,t,r){var n=typeof e>"u"?t:e;return Math.floor((r-1)/n)+1}var XR=function(e){var t=e.prefixCls,r=t===void 0?"rc-pagination":t,n=e.selectPrefixCls,o=n===void 0?"rc-select":n,a=e.className,i=e.current,l=e.defaultCurrent,s=l===void 0?1:l,u=e.total,c=u===void 0?0:u,f=e.pageSize,p=e.defaultPageSize,h=p===void 0?10:p,v=e.onChange,g=v===void 0?q0:v,m=e.hideOnSinglePage,b=e.align,y=e.showPrevNextJumpers,C=y===void 0?!0:y,D=e.showQuickJumper,w=e.showLessItems,k=e.showTitle,E=k===void 0?!0:k,x=e.onShowSizeChange,A=x===void 0?q0:x,N=e.locale,$=N===void 0?KR:N,j=e.style,F=e.totalBoundaryShowSizeChanger,B=F===void 0?50:F,S=e.disabled,O=e.simple,I=e.showTotal,P=e.showSizeChanger,T=P===void 0?c>B:P,_=e.sizeChangerRender,X=e.pageSizeOptions,L=e.itemRender,q=L===void 0?UR:L,J=e.jumpPrevIcon,ee=e.jumpNextIcon,z=e.prevIcon,Y=e.nextIcon,V=Q.useRef(null),G=Ur(10,{value:f,defaultValue:h}),K=ce(G,2),W=K[0],te=K[1],U=Ur(1,{value:i,defaultValue:s,postState:function(ct){return Math.max(1,Math.min(ct,zo(void 0,W,c)))}}),Z=ce(U,2),re=Z[0],ue=Z[1],he=Q.useState(re),we=ce(he,2),Ne=we[0],me=we[1];Ot(function(){me(re)},[re]);var ge=Math.max(1,re-(w?3:5)),ye=Math.min(zo(void 0,W,c),re+(w?3:5));function Ce(ct,$t){var Bt=ct||Q.createElement("button",{type:"button","aria-label":$t,className:"".concat(r,"-item-link")});return typeof ct=="function"&&(Bt=Q.createElement(ct,H({},e))),Bt}function xe(ct){var $t=ct.target.value,Bt=zo(void 0,W,c),Ut;return $t===""?Ut=$t:Number.isNaN(Number($t))?Ut=Ne:$t>=Bt?Ut=Bt:Ut=Number($t),Ut}function Ae(ct){return V0(ct)&&ct!==re&&V0(c)&&c>0}var ke=c>W?D:!1;function We(ct){(ct.keyCode===rt.UP||ct.keyCode===rt.DOWN)&&ct.preventDefault()}function _e(ct){var $t=xe(ct);switch($t!==Ne&&me($t),ct.keyCode){case rt.ENTER:Se($t);break;case rt.UP:Se($t-1);break;case rt.DOWN:Se($t+1);break}}function Pe(ct){Se(xe(ct))}function ve(ct){var $t=zo(ct,W,c),Bt=re>$t&&$t!==0?$t:re;te(ct),me(Bt),A==null||A(re,ct),ue(Bt),g==null||g(Bt,ct)}function Se(ct){if(Ae(ct)&&!S){var $t=zo(void 0,W,c),Bt=ct;return ct>$t?Bt=$t:ct<1&&(Bt=1),Bt!==Ne&&me(Bt),ue(Bt),g==null||g(Bt,W),Bt}return re}var qe=re>1,Ge=re<zo(void 0,W,c);function Xe(){qe&&Se(re-1)}function Ie(){Ge&&Se(re+1)}function at(){Se(ge)}function He(){Se(ye)}function nt(ct,$t){if(ct.key==="Enter"||ct.charCode===rt.ENTER||ct.keyCode===rt.ENTER){for(var Bt=arguments.length,Ut=new Array(Bt>2?Bt-2:0),Tr=2;Tr<Bt;Tr++)Ut[Tr-2]=arguments[Tr];$t.apply(void 0,Ut)}}function ht(ct){nt(ct,Xe)}function At(ct){nt(ct,Ie)}function Et(ct){nt(ct,at)}function gt(ct){nt(ct,He)}function fe(ct){var $t=q(ct,"prev",Ce(z,"prev page"));return Q.isValidElement($t)?Q.cloneElement($t,{disabled:!qe}):$t}function Oe(ct){var $t=q(ct,"next",Ce(Y,"next page"));return Q.isValidElement($t)?Q.cloneElement($t,{disabled:!Ge}):$t}function Me(ct){(ct.type==="click"||ct.keyCode===rt.ENTER)&&Se(Ne)}var Fe=null,pe=Qn(e,{aria:!0,data:!0}),Ee=I&&Q.createElement("li",{className:"".concat(r,"-total-text")},I(c,[c===0?0:(re-1)*W+1,re*W>c?c:re*W])),ie=null,oe=zo(void 0,W,c);if(m&&c<=W)return null;var be=[],le={rootPrefixCls:r,onClick:Se,onKeyPress:nt,showTitle:E,itemRender:q,page:-1},ze=re-1>0?re-1:0,Be=re+1<oe?re+1:oe,Ke=D&&D.goButton,st=lt(O)==="object"?O.readOnly:!O,dt=Ke,Ye=null;O&&(Ke&&(typeof Ke=="boolean"?dt=Q.createElement("button",{type:"button",onClick:Me,onKeyUp:Me},$.jump_to_confirm):dt=Q.createElement("span",{onClick:Me,onKeyUp:Me},Ke),dt=Q.createElement("li",{title:E?"".concat($.jump_to).concat(re,"/").concat(oe):null,className:"".concat(r,"-simple-pager")},dt)),Ye=Q.createElement("li",{title:E?"".concat(re,"/").concat(oe):null,className:"".concat(r,"-simple-pager")},st?Ne:Q.createElement("input",{type:"text","aria-label":$.jump_to,value:Ne,disabled:S,onKeyDown:We,onKeyUp:_e,onChange:_e,onBlur:Pe,size:3}),Q.createElement("span",{className:"".concat(r,"-slash")},"/"),oe));var Ze=w?1:2;if(oe<=3+Ze*2){oe||be.push(Q.createElement(ki,Te({},le,{key:"noPager",page:1,className:"".concat(r,"-item-disabled")})));for(var ot=1;ot<=oe;ot+=1)be.push(Q.createElement(ki,Te({},le,{key:ot,page:ot,active:re===ot})))}else{var ft=w?$.prev_3:$.prev_5,Nt=w?$.next_3:$.next_5,jt=q(ge,"jump-prev",Ce(J,"prev page")),It=q(ye,"jump-next",Ce(ee,"next page"));C&&(Fe=jt?Q.createElement("li",{title:E?ft:null,key:"prev",onClick:at,tabIndex:0,onKeyDown:Et,className:de("".concat(r,"-jump-prev"),M({},"".concat(r,"-jump-prev-custom-icon"),!!J))},jt):null,ie=It?Q.createElement("li",{title:E?Nt:null,key:"next",onClick:He,tabIndex:0,onKeyDown:gt,className:de("".concat(r,"-jump-next"),M({},"".concat(r,"-jump-next-custom-icon"),!!ee))},It):null);var kt=Math.max(1,re-Ze),Jt=Math.min(re+Ze,oe);re-1<=Ze&&(Jt=1+Ze*2),oe-re<=Ze&&(kt=oe-Ze*2);for(var pr=kt;pr<=Jt;pr+=1)be.push(Q.createElement(ki,Te({},le,{key:pr,page:pr,active:re===pr})));if(re-1>=Ze*2&&re!==3&&(be[0]=Q.cloneElement(be[0],{className:de("".concat(r,"-item-after-jump-prev"),be[0].props.className)}),be.unshift(Fe)),oe-re>=Ze*2&&re!==oe-2){var Le=be[be.length-1];be[be.length-1]=Q.cloneElement(Le,{className:de("".concat(r,"-item-before-jump-next"),Le.props.className)}),be.push(ie)}kt!==1&&be.unshift(Q.createElement(ki,Te({},le,{key:1,page:1}))),Jt!==oe&&be.push(Q.createElement(ki,Te({},le,{key:oe,page:oe})))}var Qe=fe(ze);if(Qe){var vt=!qe||!oe;Qe=Q.createElement("li",{title:E?$.prev_page:null,onClick:Xe,tabIndex:vt?null:0,onKeyDown:ht,className:de("".concat(r,"-prev"),M({},"".concat(r,"-disabled"),vt)),"aria-disabled":vt},Qe)}var Tt=Oe(Be);if(Tt){var Ft,yr;O?(Ft=!Ge,yr=qe?0:null):(Ft=!Ge||!oe,yr=Ft?null:0),Tt=Q.createElement("li",{title:E?$.next_page:null,onClick:Ie,tabIndex:yr,onKeyDown:At,className:de("".concat(r,"-next"),M({},"".concat(r,"-disabled"),Ft)),"aria-disabled":Ft},Tt)}var Cr=de(r,a,M(M(M(M(M({},"".concat(r,"-start"),b==="start"),"".concat(r,"-center"),b==="center"),"".concat(r,"-end"),b==="end"),"".concat(r,"-simple"),O),"".concat(r,"-disabled"),S));return Q.createElement("ul",Te({className:Cr,style:j,ref:V},pe),Ee,Qe,O?Ye:be,Tt,Q.createElement(VR,{locale:$,rootPrefixCls:r,disabled:S,selectPrefixCls:o,changeSize:ve,pageSize:W,pageSizeOptions:X,quickGo:ke?Se:null,goButton:dt,showSizeChanger:T,sizeChangerRender:_}))};const GR=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},YR=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:se(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:se(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
375
+ &${t}-mini ${t}-prev ${t}-item-link,
376
+ &${t}-mini ${t}-next ${t}-item-link
377
+ `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:se(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM),input:Object.assign(Object.assign({},gm(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},ZR=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:se(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:se(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${se(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${se(e.inputOutlineOffset)} 0 ${se(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,width:e.paginationMiniQuickJumperInputWidth}}}}},JR=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
378
+ ${t}-prev,
379
+ ${t}-jump-prev,
380
+ ${t}-jump-next
381
+ `]:{marginInlineEnd:e.marginXS},[`
382
+ ${t}-prev,
383
+ ${t}-next,
384
+ ${t}-jump-prev,
385
+ ${t}-jump-next
386
+ `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:se(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${se(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:se(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},vm(e)),hm(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},Mu(e)),width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},QR=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:se(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${se(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${se(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}}}},eT=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Br(e)),{display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:se(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),QR(e)),JR(e)),ZR(e)),YR(e)),GR(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},tT=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},ul(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},No(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:No(e)}}}},rw=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},mm(e)),nw=e=>er(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},pm(e)),rT=Hr("Pagination",e=>{const t=nw(e);return[eT(t),tT(t)]},rw),nT=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},oT=J1(["Pagination","bordered"],e=>{const t=nw(e);return nT(t)},rw);function U0(e){return wt(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}var aT=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const ow=e=>{const{align:t,prefixCls:r,selectPrefixCls:n,className:o,rootClassName:a,style:i,size:l,locale:s,responsive:u,showSizeChanger:c,selectComponentClass:f,pageSizeOptions:p}=e,h=aT(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:v}=dx(u),[,g]=Yr(),{getPrefixCls:m,direction:b,showSizeChanger:y,className:C,style:D}=Ro("pagination"),w=m("pagination",r),[k,E,x]=rT(w),A=fa(l),N=A==="small"||!!(v&&!A&&u),[$]=bu("Pagination",M1),j=Object.assign(Object.assign({},$),s),[F,B]=U0(c),[S,O]=U0(y),I=F??S,P=B??O,T=f||li,_=d.useMemo(()=>p?p.map(z=>Number(z)):void 0,[p]),X=z=>{var Y;const{disabled:V,size:G,onSizeChange:K,"aria-label":W,className:te,options:U}=z,{className:Z,onChange:re}=P||{},ue=(Y=U.find(he=>String(he.value)===String(G)))===null||Y===void 0?void 0:Y.value;return d.createElement(T,Object.assign({disabled:V,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:he=>he.parentNode,"aria-label":W,options:U},P,{value:ue,onChange:(he,we)=>{K==null||K(he),re==null||re(he,we)},size:N?"small":"middle",className:de(te,Z)}))},L=d.useMemo(()=>{const z=d.createElement("span",{className:`${w}-item-ellipsis`},"\u2022\u2022\u2022"),Y=d.createElement("button",{className:`${w}-item-link`,type:"button",tabIndex:-1},b==="rtl"?d.createElement(vf,null):d.createElement(If,null)),V=d.createElement("button",{className:`${w}-item-link`,type:"button",tabIndex:-1},b==="rtl"?d.createElement(If,null):d.createElement(vf,null)),G=d.createElement("a",{className:`${w}-item-link`},d.createElement("div",{className:`${w}-item-container`},b==="rtl"?d.createElement(K0,{className:`${w}-item-link-icon`}):d.createElement(W0,{className:`${w}-item-link-icon`}),z)),K=d.createElement("a",{className:`${w}-item-link`},d.createElement("div",{className:`${w}-item-container`},b==="rtl"?d.createElement(W0,{className:`${w}-item-link-icon`}):d.createElement(K0,{className:`${w}-item-link-icon`}),z));return{prevIcon:Y,nextIcon:V,jumpPrevIcon:G,jumpNextIcon:K}},[b,w]),q=m("select",n),J=de({[`${w}-${t}`]:!!t,[`${w}-mini`]:N,[`${w}-rtl`]:b==="rtl",[`${w}-bordered`]:g.wireframe},C,o,a,E,x),ee=Object.assign(Object.assign({},D),i);return k(d.createElement(d.Fragment,null,g.wireframe&&d.createElement(oT,{prefixCls:w}),d.createElement(XR,Object.assign({},L,h,{style:ee,prefixCls:w,selectPrefixCls:q,className:J,locale:j,pageSizeOptions:_,showSizeChanger:I,sizeChangerRender:X}))))},Ys=100,aw=Ys/5,iw=Ys/2-aw/2,Zc=iw*2*Math.PI,X0=50,G0=e=>{const{dotClassName:t,style:r,hasCircleCls:n}=e;return d.createElement("circle",{className:de(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:iw,cx:X0,cy:X0,strokeWidth:aw,style:r})},iT=({percent:e,prefixCls:t})=>{const r=`${t}-dot`,n=`${r}-holder`,o=`${n}-hidden`,[a,i]=d.useState(!1);Wt(()=>{e!==0&&i(!0)},[e!==0]);const l=Math.max(Math.min(e,100),0);if(!a)return null;const s={strokeDashoffset:`${Zc/4}`,strokeDasharray:`${Zc*l/100} ${Zc*(100-l)/100}`};return d.createElement("span",{className:de(n,`${r}-progress`,l<=0&&o)},d.createElement("svg",{viewBox:`0 0 ${Ys} ${Ys}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},d.createElement(G0,{dotClassName:r,hasCircleCls:!0}),d.createElement(G0,{dotClassName:r,style:s})))};function lT(e){const{prefixCls:t,percent:r=0}=e,n=`${t}-dot`,o=`${n}-holder`,a=`${o}-hidden`;return d.createElement(d.Fragment,null,d.createElement("span",{className:de(o,r>0&&a)},d.createElement("span",{className:de(n,`${t}-dot-spin`)},[1,2,3,4].map(i=>d.createElement("i",{className:`${t}-dot-item`,key:i})))),d.createElement(iT,{prefixCls:t,percent:r}))}function sT(e){var t;const{prefixCls:r,indicator:n,percent:o}=e,a=`${r}-dot`;return n&&d.isValidElement(n)?eo(n,{className:de((t=n.props)===null||t===void 0?void 0:t.className,a),percent:o}):d.createElement(lT,{prefixCls:r,percent:o})}const uT=new Vt("antSpinMove",{to:{opacity:1}}),cT=new Vt("antRotate",{to:{transform:"rotate(405deg)"}}),dT=e=>{const{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},Br(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:r(r(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:r(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:r(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:r(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),height:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:uT,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:cT,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(n=>`${n} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal(),height:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}},fT=e=>{const{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},pT=Hr("Spin",e=>{const t=er(e,{spinDotDefault:e.colorTextDescription});return dT(t)},fT),mT=200,Y0=[[30,.05],[70,.03],[96,.01]];function hT(e,t){const[r,n]=d.useState(0),o=d.useRef(null),a=t==="auto";return d.useEffect(()=>(a&&e&&(n(0),o.current=setInterval(()=>{n(i=>{const l=100-i;for(let s=0;s<Y0.length;s+=1){const[u,c]=Y0[s];if(i<=u)return i+l*c}return i})},mT)),()=>{clearInterval(o.current)}),[a,e]),a?r:t}var gT=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let lw;function vT(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const Cm=e=>{var t;const{prefixCls:r,spinning:n=!0,delay:o=0,className:a,rootClassName:i,size:l="default",tip:s,wrapperClassName:u,style:c,children:f,fullscreen:p=!1,indicator:h,percent:v}=e,g=gT(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:m,direction:b,className:y,style:C,indicator:D}=Ro("spin"),w=m("spin",r),[k,E,x]=pT(w),[A,N]=d.useState(()=>n&&!vT(n,o)),$=hT(A,v);d.useEffect(()=>{if(n){const P=cR(o,()=>{N(!0)});return P(),()=>{var T;(T=P==null?void 0:P.cancel)===null||T===void 0||T.call(P)}}N(!1)},[o,n]);const j=d.useMemo(()=>typeof f<"u"&&!p,[f,p]),F=de(w,y,{[`${w}-sm`]:l==="small",[`${w}-lg`]:l==="large",[`${w}-spinning`]:A,[`${w}-show-text`]:!!s,[`${w}-rtl`]:b==="rtl"},a,!p&&i,E,x),B=de(`${w}-container`,{[`${w}-blur`]:A}),S=(t=h??D)!==null&&t!==void 0?t:lw,O=Object.assign(Object.assign({},C),c),I=d.createElement("div",Object.assign({},g,{style:O,className:F,"aria-live":"polite","aria-busy":A}),d.createElement(sT,{prefixCls:w,indicator:S,percent:$}),s&&(j||p)?d.createElement("div",{className:`${w}-text`},s):null);return k(j?d.createElement("div",Object.assign({},g,{className:de(`${w}-nested-loading`,u,E,x)}),A&&d.createElement("div",{key:"loading"},I),d.createElement("div",{className:B,key:"container"},f)):p?d.createElement("div",{className:de(`${w}-fullscreen`,{[`${w}-fullscreen-show`]:A},i,E,x)},I):I)};Cm.setDefaultIndicator=e=>{lw=e};var bT={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},yT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:bT}))},CT=d.forwardRef(yT),xT={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},wT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:xT}))},ET=d.forwardRef(wT),kT={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},DT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:kT}))},ST=d.forwardRef(DT),$T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},BT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:$T}))},sw=d.forwardRef(BT),OT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},AT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:OT}))},FT=d.forwardRef(AT),PT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},NT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:PT}))},jT=d.forwardRef(NT),IT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},RT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:IT}))},TT=d.forwardRef(RT),MT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},zT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:MT}))},_T=d.forwardRef(zT),LT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},HT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:LT}))},WT=d.forwardRef(HT),KT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},qT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:KT}))},VT=d.forwardRef(qT),co={},Bl="rc-table-internal-hook";function xm(e){var t=d.createContext(void 0),r=function(n){var o=n.value,a=n.children,i=d.useRef(o);i.current=o;var l=d.useState(function(){return{getValue:function(){return i.current},listeners:new Set}}),s=ce(l,1),u=s[0];return Wt(function(){Pb(function(){u.listeners.forEach(function(c){c(o)})})},[o]),d.createElement(t.Provider,{value:u},a)};return{Context:t,Provider:r,defaultValue:e}}function Lr(e,t){var r=nr(typeof t=="function"?t:function(f){if(t===void 0)return f;if(!Array.isArray(t))return f[t];var p={};return t.forEach(function(h){p[h]=f[h]}),p}),n=d.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,i=o.getValue,l=d.useRef();l.current=r(n?i():e==null?void 0:e.defaultValue);var s=d.useState({}),u=ce(s,2),c=u[1];return Wt(function(){if(!n)return;function f(p){var h=r(p);Jn(l.current,h,!0)||c({})}return a.add(f),function(){a.delete(f)}},[n]),l.current}function UT(){var e=d.createContext(null);function t(){return d.useContext(e)}function r(o,a){var i=Zn(o),l=function(s,u){var c=i?{ref:u}:{},f=d.useRef(0),p=d.useRef(s),h=t();return h!==null?d.createElement(o,Te({},s,c)):((!a||a(p.current,s))&&(f.current+=1),p.current=s,d.createElement(e.Provider,{value:f.current},d.createElement(o,Te({},s,c))))};return i?d.forwardRef(l):l}function n(o,a){var i=Zn(o),l=function(s,u){var c=i?{ref:u}:{};return t(),d.createElement(o,Te({},s,c))};return i?d.memo(d.forwardRef(l),a):d.memo(l,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var wm=UT(),uw=wm.makeImmutable,ci=wm.responseImmutable,XT=wm.useImmutableMark,nn=xm(),cw=d.createContext({renderWithProps:!1}),GT="RC_TABLE_KEY";function YT(e){return e==null?[]:Array.isArray(e)?e:[e]}function zu(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,i=o.dataIndex,l=a||YT(i).join("-")||GT;r[l];)l="".concat(l,"_next");r[l]=!0,t.push(l)}),t}function Wf(e){return e!=null}function ZT(e){return typeof e=="number"&&!Number.isNaN(e)}function JT(e){return e&&lt(e)==="object"&&!Array.isArray(e)&&!d.isValidElement(e)}function QT(e,t,r,n,o,a){var i=d.useContext(cw),l=XT(),s=la(function(){if(Wf(n))return[n];var u=t==null||t===""?[]:Array.isArray(t)?t:[t],c=vn(e,u),f=c,p=void 0;if(o){var h=o(c,e,r);JT(h)?(f=h.children,p=h.props,i.renderWithProps=!0):f=h}return[f,p]},[l,e,n,t,o,r],function(u,c){if(a){var f=ce(u,2),p=f[1],h=ce(c,2),v=h[1];return a(v,p)}return i.renderWithProps?!0:!Jn(u,c,!0)});return s}function e8(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function t8(e,t){return Lr(nn,function(r){var n=e8(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var r8=function(e){var t=e.ellipsis,r=e.rowType,n=e.children,o,a=t===!0?{showTitle:!0}:t;return a&&(a.showTitle||r==="header")&&(typeof n=="string"||typeof n=="number"?o=n.toString():d.isValidElement(n)&&typeof n.props.children=="string"&&(o=n.props.children)),o};function n8(e){var t,r,n,o,a,i,l,s,u=e.component,c=e.children,f=e.ellipsis,p=e.scope,h=e.prefixCls,v=e.className,g=e.align,m=e.record,b=e.render,y=e.dataIndex,C=e.renderIndex,D=e.shouldCellUpdate,w=e.index,k=e.rowType,E=e.colSpan,x=e.rowSpan,A=e.fixLeft,N=e.fixRight,$=e.firstFixLeft,j=e.lastFixLeft,F=e.firstFixRight,B=e.lastFixRight,S=e.appendNode,O=e.additionalProps,I=O===void 0?{}:O,P=e.isSticky,T="".concat(h,"-cell"),_=Lr(nn,["supportSticky","allColumnsFixedLeft","rowHoverable"]),X=_.supportSticky,L=_.allColumnsFixedLeft,q=_.rowHoverable,J=QT(m,y,C,c,b,D),ee=ce(J,2),z=ee[0],Y=ee[1],V={},G=typeof A=="number"&&X,K=typeof N=="number"&&X;G&&(V.position="sticky",V.left=A),K&&(V.position="sticky",V.right=N);var W=(t=(r=(n=Y==null?void 0:Y.colSpan)!==null&&n!==void 0?n:I.colSpan)!==null&&r!==void 0?r:E)!==null&&t!==void 0?t:1,te=(o=(a=(i=Y==null?void 0:Y.rowSpan)!==null&&i!==void 0?i:I.rowSpan)!==null&&a!==void 0?a:x)!==null&&o!==void 0?o:1,U=t8(w,te),Z=ce(U,2),re=Z[0],ue=Z[1],he=nr(function(xe){var Ae;m&&ue(w,w+te-1),I==null||(Ae=I.onMouseEnter)===null||Ae===void 0||Ae.call(I,xe)}),we=nr(function(xe){var Ae;m&&ue(-1,-1),I==null||(Ae=I.onMouseLeave)===null||Ae===void 0||Ae.call(I,xe)});if(W===0||te===0)return null;var Ne=(l=I.title)!==null&&l!==void 0?l:r8({rowType:k,ellipsis:f,children:z}),me=de(T,v,(s={},M(M(M(M(M(M(M(M(M(M(s,"".concat(T,"-fix-left"),G&&X),"".concat(T,"-fix-left-first"),$&&X),"".concat(T,"-fix-left-last"),j&&X),"".concat(T,"-fix-left-all"),j&&L&&X),"".concat(T,"-fix-right"),K&&X),"".concat(T,"-fix-right-first"),F&&X),"".concat(T,"-fix-right-last"),B&&X),"".concat(T,"-ellipsis"),f),"".concat(T,"-with-append"),S),"".concat(T,"-fix-sticky"),(G||K)&&P&&X),M(s,"".concat(T,"-row-hover"),!Y&&re)),I.className,Y==null?void 0:Y.className),ge={};g&&(ge.textAlign=g);var ye=H(H(H(H({},Y==null?void 0:Y.style),V),ge),I.style),Ce=z;return lt(Ce)==="object"&&!Array.isArray(Ce)&&!d.isValidElement(Ce)&&(Ce=null),f&&(j||F)&&(Ce=d.createElement("span",{className:"".concat(T,"-content")},Ce)),d.createElement(u,Te({},Y,I,{className:me,style:ye,title:Ne,scope:p,onMouseEnter:q?he:void 0,onMouseLeave:q?we:void 0,colSpan:W!==1?W:null,rowSpan:te!==1?te:null}),S,Ce)}const di=d.memo(n8);function Em(e,t,r,n,o){var a=r[e]||{},i=r[t]||{},l,s;a.fixed==="left"?l=n.left[o==="rtl"?t:e]:i.fixed==="right"&&(s=n.right[o==="rtl"?e:t]);var u=!1,c=!1,f=!1,p=!1,h=r[t+1],v=r[e-1],g=h&&!h.fixed||v&&!v.fixed||r.every(function(D){return D.fixed==="left"});if(o==="rtl"){if(l!==void 0){var m=v&&v.fixed==="left";p=!m&&g}else if(s!==void 0){var b=h&&h.fixed==="right";f=!b&&g}}else if(l!==void 0){var y=h&&h.fixed==="left";u=!y&&g}else if(s!==void 0){var C=v&&v.fixed==="right";c=!C&&g}return{fixLeft:l,fixRight:s,lastFixLeft:u,firstFixRight:c,lastFixRight:f,firstFixLeft:p,isSticky:n.isSticky}}var dw=d.createContext({});function o8(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,i=e.rowSpan,l=e.align,s=Lr(nn,["prefixCls","direction"]),u=s.prefixCls,c=s.direction,f=d.useContext(dw),p=f.scrollColumnIndex,h=f.stickyOffsets,v=f.flattenColumns,g=r+a-1,m=g+1===p?a+1:a,b=Em(r,r+m-1,v,h,c);return d.createElement(di,Te({className:t,index:r,component:"td",prefixCls:u,record:null,dataIndex:null,align:l,colSpan:m,rowSpan:i,render:function(){return n}},b))}var a8=["children"];function i8(e){var t=e.children,r=yt(e,a8);return d.createElement("tr",r,t)}function _u(e){var t=e.children;return t}_u.Row=i8;_u.Cell=o8;function l8(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=Lr(nn,"prefixCls"),a=n.length-1,i=n[a],l=d.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:i!=null&&i.scrollbar?a:null}},[i,n,a,r]);return d.createElement(dw.Provider,{value:l},d.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const Jl=ci(l8);var fw=_u;function s8(e){return null}function u8(e){return null}function pw(e,t,r,n,o,a,i){var l=a(t,i);e.push({record:t,indent:r,index:i,rowKey:l});var s=o==null?void 0:o.has(l);if(t&&Array.isArray(t[n])&&s)for(var u=0;u<t[n].length;u+=1)pw(e,t[n][u],r+1,n,o,a,u)}function mw(e,t,r,n){var o=d.useMemo(function(){if(r!=null&&r.size){for(var a=[],i=0;i<(e==null?void 0:e.length);i+=1){var l=e[i];pw(a,l,0,t,r,n,i)}return a}return e==null?void 0:e.map(function(s,u){return{record:s,indent:0,index:u,rowKey:n(s,u)}})},[e,t,r,n]);return o}function hw(e,t,r,n){var o=Lr(nn,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,i=o.expandableType,l=o.expandedKeys,s=o.childrenColumnName,u=o.onTriggerExpand,c=o.rowExpandable,f=o.onRow,p=o.expandRowByClick,h=o.rowClassName,v=i==="nest",g=i==="row"&&(!c||c(e)),m=g||v,b=l&&l.has(t),y=s&&e&&e[s],C=nr(u),D=f==null?void 0:f(e,r),w=D==null?void 0:D.onClick,k=function(A){p&&m&&u(e,A);for(var N=arguments.length,$=new Array(N>1?N-1:0),j=1;j<N;j++)$[j-1]=arguments[j];w==null||w.apply(void 0,[A].concat($))},E;typeof h=="string"?E=h:typeof h=="function"&&(E=h(e,r,n));var x=zu(a);return H(H({},o),{},{columnsKey:x,nestExpandable:v,expanded:b,hasNestChildren:y,record:e,onTriggerExpand:C,rowSupportExpand:g,expandable:m,rowProps:H(H({},D),{},{className:de(E,D==null?void 0:D.className),onClick:k})})}function gw(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,i=e.expanded,l=e.colSpan,s=e.isEmpty,u=e.stickyOffset,c=u===void 0?0:u,f=Lr(nn,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),p=f.scrollbarSize,h=f.fixHeader,v=f.fixColumn,g=f.componentWidth,m=f.horizonScroll,b=r;return(s?m&&g:v)&&(b=d.createElement("div",{style:{width:g-c-(h&&!s?p:0),position:"sticky",left:c,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},b)),d.createElement(n,{className:a,style:{display:i?null:"none"}},d.createElement(di,{component:o,prefixCls:t,colSpan:l},b))}function c8(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,a=e.expandable,i="".concat(t,"-row-expand-icon");if(!a)return d.createElement("span",{className:de(i,"".concat(t,"-row-spaced"))});var l=function(s){n(r,s),s.stopPropagation()};return d.createElement("span",{className:de(i,M(M({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:l})}function d8(e,t,r){var n=[];function o(a){(a||[]).forEach(function(i,l){n.push(t(i,l)),o(i[r])})}return o(e),n}function vw(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function bw(e,t,r,n,o){var a,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,s=e.record,u=e.prefixCls,c=e.columnsKey,f=e.fixedInfoList,p=e.expandIconColumnIndex,h=e.nestExpandable,v=e.indentSize,g=e.expandIcon,m=e.expanded,b=e.hasNestChildren,y=e.onTriggerExpand,C=e.expandable,D=e.expandedKeys,w=c[r],k=f[r],E;r===(p||0)&&h&&(E=d.createElement(d.Fragment,null,d.createElement("span",{style:{paddingLeft:"".concat(v*n,"px")},className:"".concat(u,"-row-indent indent-level-").concat(n)}),g({prefixCls:u,expanded:m,expandable:b,record:s,onExpand:y})));var x=((a=t.onCell)===null||a===void 0?void 0:a.call(t,s,o))||{};if(l){var A=x.rowSpan,N=A===void 0?1:A;if(C&&N&&r<l){for(var $=N,j=o;j<o+N;j+=1){var F=i[j];D.has(F)&&($+=1)}x.rowSpan=$}}return{key:w,fixedInfo:k,appendCellNode:E,additionalCellProps:x}}function f8(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,i=e.rowKey,l=e.rowKeys,s=e.indent,u=s===void 0?0:s,c=e.rowComponent,f=e.cellComponent,p=e.scopeCellComponent,h=e.expandedRowInfo,v=hw(n,i,o,u),g=v.prefixCls,m=v.flattenColumns,b=v.expandedRowClassName,y=v.expandedRowRender,C=v.rowProps,D=v.expanded,w=v.rowSupportExpand,k=d.useRef(!1);k.current||(k.current=D);var E=vw(b,n,o,u),x=d.createElement(c,Te({},C,{"data-row-key":i,className:de(t,"".concat(g,"-row"),"".concat(g,"-row-level-").concat(u),C==null?void 0:C.className,M({},E,u>=1)),style:H(H({},r),C==null?void 0:C.style)}),m.map(function($,j){var F=$.render,B=$.dataIndex,S=$.className,O=bw(v,$,j,u,o,l,h==null?void 0:h.offset),I=O.key,P=O.fixedInfo,T=O.appendCellNode,_=O.additionalCellProps;return d.createElement(di,Te({className:S,ellipsis:$.ellipsis,align:$.align,scope:$.rowScope,component:$.rowScope?p:f,prefixCls:g,key:I,record:n,index:o,renderIndex:a,dataIndex:B,render:F,shouldCellUpdate:$.shouldCellUpdate},P,{appendNode:T,additionalProps:_}))})),A;if(w&&(k.current||D)){var N=y(n,o,u+1,D);A=d.createElement(gw,{expanded:D,className:de("".concat(g,"-expanded-row"),"".concat(g,"-expanded-row-level-").concat(u+1),E),prefixCls:g,component:c,cellComponent:f,colSpan:h?h.colSpan:m.length,stickyOffset:h==null?void 0:h.sticky,isEmpty:!1},N)}return d.createElement(d.Fragment,null,x,A)}const p8=ci(f8);function m8(e){var t=e.columnKey,r=e.onColumnResize,n=d.useRef();return Wt(function(){n.current&&r(t,n.current.offsetWidth)},[]),d.createElement(ao,{data:t},d.createElement("td",{ref:n,style:{padding:0,border:0,height:0}},d.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function h8(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=d.useRef(null);return d.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},ref:o},d.createElement(ao.Collection,{onBatchResize:function(a){xu(o.current)&&a.forEach(function(i){var l=i.data,s=i.size;n(l,s.offsetWidth)})}},r.map(function(a){return d.createElement(m8,{key:a,columnKey:a,onColumnResize:n})})))}function g8(e){var t=e.data,r=e.measureColumnWidth,n=Lr(nn,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,i=n.onColumnResize,l=n.flattenColumns,s=n.getRowKey,u=n.expandedKeys,c=n.childrenColumnName,f=n.emptyNode,p=n.expandedRowOffset,h=p===void 0?0:p,v=n.colWidths,g=mw(t,c,u,s),m=d.useMemo(function(){return g.map(function(A){return A.rowKey})},[g]),b=d.useRef({renderWithProps:!1}),y=d.useMemo(function(){for(var A=l.length-h,N=0,$=0;$<h;$+=1)N+=v[$]||0;return{offset:h,colSpan:A,sticky:N}},[l.length,h,v]),C=a(["body","wrapper"],"tbody"),D=a(["body","row"],"tr"),w=a(["body","cell"],"td"),k=a(["body","cell"],"th"),E;t.length?E=g.map(function(A,N){var $=A.record,j=A.indent,F=A.index,B=A.rowKey;return d.createElement(p8,{key:B,rowKey:B,rowKeys:m,record:$,index:N,renderIndex:F,rowComponent:D,cellComponent:w,scopeCellComponent:k,indent:j,expandedRowInfo:y})}):E=d.createElement(gw,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:D,cellComponent:w,colSpan:l.length,isEmpty:!0},f);var x=zu(l);return d.createElement(cw.Provider,{value:b.current},d.createElement(C,{className:"".concat(o,"-tbody")},r&&d.createElement(h8,{prefixCls:o,columnsKey:x,onColumnResize:i}),E))}const v8=ci(g8);var b8=["expandable"],Li="RC_TABLE_INTERNAL_COL_DEFINE";function y8(e){var t=e.expandable,r=yt(e,b8),n;return"expandable"in e?n=H(H({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var C8=["columnType"];function yw(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=Lr(nn,["tableLayout"]),a=o.tableLayout,i=[],l=n||r.length,s=!1,u=l-1;u>=0;u-=1){var c=t[u],f=r&&r[u],p=void 0,h=void 0;if(f&&(p=f[Li],a==="auto"&&(h=f.minWidth)),c||h||p||s){var v=p||{};v.columnType;var g=yt(v,C8);i.unshift(d.createElement("col",Te({key:u,style:{width:c,minWidth:h}},g))),s=!0}}return d.createElement("colgroup",null,i)}var x8=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function w8(e,t){return wt(function(){for(var r=[],n=0;n<t;n+=1){var o=e[n];if(o!==void 0)r[n]=o;else return null}return r},[e.join("_"),t])}var E8=d.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,i=e.colWidths,l=e.columCount,s=e.stickyOffsets,u=e.direction,c=e.fixHeader,f=e.stickyTopOffset,p=e.stickyBottomOffset,h=e.stickyClassName,v=e.onScroll,g=e.maxContentScroll,m=e.children,b=yt(e,x8),y=Lr(nn,["prefixCls","scrollbarSize","isSticky","getComponent"]),C=y.prefixCls,D=y.scrollbarSize,w=y.isSticky,k=y.getComponent,E=k(["header","table"],"table"),x=w&&!c?0:D,A=d.useRef(null),N=d.useCallback(function(P){Ji(t,P),Ji(A,P)},[]);d.useEffect(function(){function P(_){var X=_,L=X.currentTarget,q=X.deltaX;q&&(v({currentTarget:L,scrollLeft:L.scrollLeft+q}),_.preventDefault())}var T=A.current;return T==null||T.addEventListener("wheel",P,{passive:!1}),function(){T==null||T.removeEventListener("wheel",P)}},[]);var $=d.useMemo(function(){return a.every(function(P){return P.width})},[a]),j=a[a.length-1],F={fixed:j?j.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(C,"-cell-scrollbar")}}},B=wt(function(){return x?[].concat(je(o),[F]):o},[x,o]),S=wt(function(){return x?[].concat(je(a),[F]):a},[x,a]),O=wt(function(){var P=s.right,T=s.left;return H(H({},s),{},{left:u==="rtl"?[].concat(je(T.map(function(_){return _+x})),[0]):T,right:u==="rtl"?P:[].concat(je(P.map(function(_){return _+x})),[0]),isSticky:w})},[x,s,w]),I=w8(i,l);return d.createElement("div",{style:H({overflow:"hidden"},w?{top:f,bottom:p}:{}),ref:N,className:de(r,M({},h,!!h))},d.createElement(E,{style:{tableLayout:"fixed",visibility:n||I?null:"hidden"}},(!n||!g||$)&&d.createElement(yw,{colWidths:I?[].concat(je(I),[x]):[],columCount:l+1,columns:S}),m(H(H({},b),{},{stickyOffsets:O,columns:B,flattenColumns:S}))))});const Z0=d.memo(E8);var k8=function(e){var t=e.cells,r=e.stickyOffsets,n=e.flattenColumns,o=e.rowComponent,a=e.cellComponent,i=e.onHeaderRow,l=e.index,s=Lr(nn,["prefixCls","direction"]),u=s.prefixCls,c=s.direction,f;i&&(f=i(t.map(function(h){return h.column}),l));var p=zu(t.map(function(h){return h.column}));return d.createElement(o,f,t.map(function(h,v){var g=h.column,m=Em(h.colStart,h.colEnd,n,r,c),b;return g&&g.onHeaderCell&&(b=h.column.onHeaderCell(g)),d.createElement(di,Te({},h,{scope:g.title?h.colSpan>1?"colgroup":"col":null,ellipsis:g.ellipsis,align:g.align,component:a,prefixCls:u,key:p[v]},m,{additionalProps:b,rowType:"header"}))}))};function D8(e){var t=[];function r(i,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[s]=t[s]||[];var u=l,c=i.filter(Boolean).map(function(f){var p={key:f.key,className:f.className||"",children:f.title,column:f,colStart:u},h=1,v=f.children;return v&&v.length>0&&(h=r(v,u,s+1).reduce(function(g,m){return g+m},0),p.hasSubColumns=!0),"colSpan"in f&&(h=f.colSpan),"rowSpan"in f&&(p.rowSpan=f.rowSpan),p.colSpan=h,p.colEnd=p.colStart+h-1,t[s].push(p),u+=h,h});return c}r(e,0);for(var n=t.length,o=function(i){t[i].forEach(function(l){!("rowSpan"in l)&&!l.hasSubColumns&&(l.rowSpan=n-i)})},a=0;a<n;a+=1)o(a);return t}var S8=function(e){var t=e.stickyOffsets,r=e.columns,n=e.flattenColumns,o=e.onHeaderRow,a=Lr(nn,["prefixCls","getComponent"]),i=a.prefixCls,l=a.getComponent,s=d.useMemo(function(){return D8(r)},[r]),u=l(["header","wrapper"],"thead"),c=l(["header","row"],"tr"),f=l(["header","cell"],"th");return d.createElement(u,{className:"".concat(i,"-thead")},s.map(function(p,h){var v=d.createElement(k8,{key:h,flattenColumns:n,cells:p,stickyOffsets:t,rowComponent:c,cellComponent:f,onHeaderRow:o,index:h});return v}))};const J0=ci(S8);function Q0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function $8(e,t,r){return d.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(p){var h=Q0(t,p.width);h?n+=h:o+=1});var a=Math.max(t,r),i=Math.max(a-n,o),l=o,s=i/o,u=0,c=e.map(function(p){var h=H({},p),v=Q0(t,h.width);if(v)h.width=v;else{var g=Math.floor(s);h.width=l===1?i:g,i-=g,l-=1}return u+=h.width,h});if(u<a){var f=a/u;i=a,c.forEach(function(p,h){var v=Math.floor(p.width*f);p.width=h===c.length-1?i:v,i-=v})}return[c,Math.max(u,a)]}return[e,t]},[e,t,r])}var B8=["children"],O8=["fixed"];function km(e){return Ln(e).filter(function(t){return d.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=yt(n,B8),i=H({key:r},a);return o&&(i.children=km(o)),i})}function Cw(e){return e.filter(function(t){return t&&lt(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?H(H({},t),{},{children:Cw(r)}):t})}function Kf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&lt(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,i=a===!0?"left":a,l="".concat(t,"-").concat(o),s=n.children;return s&&s.length>0?[].concat(je(r),je(Kf(s,l).map(function(u){return H({fixed:i},u)}))):[].concat(je(r),[H(H({key:l},n),{},{fixed:i})])},[])}function A8(e){return e.map(function(t){var r=t.fixed,n=yt(t,O8),o=r;return r==="left"?o="right":r==="right"&&(o="left"),H({fixed:o},n)})}function F8(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,i=e.expandedKeys,l=e.columnTitle,s=e.getRowKey,u=e.onTriggerExpand,c=e.expandIcon,f=e.rowExpandable,p=e.expandIconColumnIndex,h=e.expandedRowOffset,v=h===void 0?0:h,g=e.direction,m=e.expandRowByClick,b=e.columnWidth,y=e.fixed,C=e.scrollWidth,D=e.clientWidth,w=d.useMemo(function(){var B=n||km(o)||[];return Cw(B.slice())},[n,o]),k=d.useMemo(function(){if(a){var B=w.slice();if(!B.includes(co)){var S=p||0;S>=0&&(S||y==="left"||!y)&&B.splice(S,0,co),y==="right"&&B.splice(w.length,0,co)}var O=B.indexOf(co);B=B.filter(function(_,X){return _!==co||X===O});var I=w[O],P;y?P=y:P=I?I.fixed:null;var T=M(M(M(M(M(M({},Li,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",l),"fixed",P),"className","".concat(r,"-row-expand-icon-cell")),"width",b),"render",function(_,X,L){var q=s(X,L),J=i.has(q),ee=f?f(X):!0,z=c({prefixCls:r,expanded:J,expandable:ee,record:X,onExpand:u});return m?d.createElement("span",{onClick:function(Y){return Y.stopPropagation()}},z):z});return B.map(function(_,X){var L=_===co?T:_;return X<v?H(H({},L),{},{fixed:L.fixed||"left"}):L})}return w.filter(function(_){return _!==co})},[a,w,s,i,c,g,v]),E=d.useMemo(function(){var B=k;return t&&(B=t(B)),B.length||(B=[{render:function(){return null}}]),B},[t,k,g]),x=d.useMemo(function(){return g==="rtl"?A8(Kf(E)):Kf(E)},[E,g,C]),A=d.useMemo(function(){for(var B=-1,S=x.length-1;S>=0;S-=1){var O=x[S].fixed;if(O==="left"||O===!0){B=S;break}}if(B>=0)for(var I=0;I<=B;I+=1){var P=x[I].fixed;if(P!=="left"&&P!==!0)return!0}var T=x.findIndex(function(L){var q=L.fixed;return q==="right"});if(T>=0)for(var _=T;_<x.length;_+=1){var X=x[_].fixed;if(X!=="right")return!0}return!1},[x]),N=$8(x,C,D),$=ce(N,2),j=$[0],F=$[1];return[E,j,F,A]}function P8(e,t,r){var n=y8(e),o=n.expandIcon,a=n.expandedRowKeys,i=n.defaultExpandedRowKeys,l=n.defaultExpandAllRows,s=n.expandedRowRender,u=n.onExpand,c=n.onExpandedRowsChange,f=n.childrenColumnName,p=o||c8,h=f||"children",v=d.useMemo(function(){return s?"row":e.expandable&&e.internalHooks===Bl&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(w){return w&&lt(w)==="object"&&w[h]})?"nest":!1},[!!s,t]),g=d.useState(function(){return i||(l?d8(t,r,h):[])}),m=ce(g,2),b=m[0],y=m[1],C=d.useMemo(function(){return new Set(a||b||[])},[a,b]),D=d.useCallback(function(w){var k=r(w,t.indexOf(w)),E,x=C.has(k);x?(C.delete(k),E=je(C)):E=[].concat(je(C),[k]),y(E),u&&u(!x,w),c&&c(E)},[r,C,t,u,c]);return[n,v,C,p,h,D]}function N8(e,t,r){var n=e.map(function(o,a){return Em(a,a,e,t,r)});return la(function(){return n},[n],function(o,a){return!Jn(o,a)})}function j8(e){var t=Ve(e),r=xt({}),n=ce(r,2),o=n[1],a=Ve(null),i=Ve([]);function l(s){i.current.push(s);var u=Promise.resolve();a.current=u,u.then(function(){if(a.current===u){var c=i.current,f=t.current;i.current=[],c.forEach(function(p){t.current=p(t.current)}),a.current=null,f!==t.current&&o({})}})}return Ot(function(){return function(){a.current=null}},[]),[t.current,l]}function I8(e){var t=Ve(null),r=Ve();function n(){window.clearTimeout(r.current)}function o(i){t.current=i,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return Ot(function(){return n},[]),[o,a]}function R8(){var e=d.useState(-1),t=ce(e,2),r=t[0],n=t[1],o=d.useState(-1),a=ce(o,2),i=a[0],l=a[1],s=d.useCallback(function(u,c){n(u),l(c)},[]);return[r,i,s]}var eb=Xr()?window:null;function T8(e,t){var r=lt(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,i=a===void 0?0:a,l=r.offsetScroll,s=l===void 0?0:l,u=r.getContainer,c=u===void 0?function(){return eb}:u,f=c()||eb,p=!!e;return d.useMemo(function(){return{isSticky:p,stickyClassName:p?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:i,offsetScroll:s,container:f}},[p,s,o,i,t,f])}function M8(e,t,r){var n=wt(function(){var o=t.length,a=function(s,u,c){for(var f=[],p=0,h=s;h!==u;h+=c)f.push(p),t[h].fixed&&(p+=e[h]||0);return f},i=a(0,o,1),l=a(o-1,-1,-1).reverse();return r==="rtl"?{left:l,right:i}:{left:i,right:l}},[e,t,r]);return n}function tb(e){var t=e.className,r=e.children;return d.createElement("div",{className:t},r)}function rb(e){var t=pu(e),r=t.getBoundingClientRect(),n=document.documentElement;return{left:r.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var z8=function(e,t){var r,n,o=e.scrollBodyRef,a=e.onScroll,i=e.offsetScroll,l=e.container,s=e.direction,u=Lr(nn,"prefixCls"),c=((r=o.current)===null||r===void 0?void 0:r.scrollWidth)||0,f=((n=o.current)===null||n===void 0?void 0:n.clientWidth)||0,p=c&&f*(f/c),h=d.useRef(),v=j8({scrollLeft:0,isHiddenScrollBar:!0}),g=ce(v,2),m=g[0],b=g[1],y=d.useRef({delta:0,x:0}),C=d.useState(!1),D=ce(C,2),w=D[0],k=D[1],E=d.useRef(null);d.useEffect(function(){return function(){qt.cancel(E.current)}},[]);var x=function(){k(!1)},A=function(F){F.persist(),y.current.delta=F.pageX-m.scrollLeft,y.current.x=0,k(!0),F.preventDefault()},N=function(F){var B,S=F||((B=window)===null||B===void 0?void 0:B.event),O=S.buttons;if(!w||O===0){w&&k(!1);return}var I=y.current.x+F.pageX-y.current.x-y.current.delta,P=s==="rtl";I=Math.max(P?p-f:0,Math.min(P?0:f-p,I));var T=!P||Math.abs(I)+Math.abs(p)<f;T&&(a({scrollLeft:I/f*(c+2)}),y.current.x=F.pageX)},$=function(){qt.cancel(E.current),E.current=qt(function(){if(o.current){var F=rb(o.current).top,B=F+o.current.offsetHeight,S=l===window?document.documentElement.scrollTop+window.innerHeight:rb(l).top+l.clientHeight;B-Rv()<=S||F>=S-i?b(function(O){return H(H({},O),{},{isHiddenScrollBar:!0})}):b(function(O){return H(H({},O),{},{isHiddenScrollBar:!1})})}})},j=function(F){b(function(B){return H(H({},B),{},{scrollLeft:F/c*f||0})})};return d.useImperativeHandle(t,function(){return{setScrollLeft:j,checkScrollBarVisible:$}}),d.useEffect(function(){var F=H0(document.body,"mouseup",x,!1),B=H0(document.body,"mousemove",N,!1);return $(),function(){F.remove(),B.remove()}},[p,w]),d.useEffect(function(){if(o.current){for(var F=[],B=pu(o.current);B;)F.push(B),B=B.parentElement;return F.forEach(function(S){return S.addEventListener("scroll",$,!1)}),window.addEventListener("resize",$,!1),window.addEventListener("scroll",$,!1),l.addEventListener("scroll",$,!1),function(){F.forEach(function(S){return S.removeEventListener("scroll",$)}),window.removeEventListener("resize",$),window.removeEventListener("scroll",$),l.removeEventListener("scroll",$)}}},[l]),d.useEffect(function(){m.isHiddenScrollBar||b(function(F){var B=o.current;return B?H(H({},F),{},{scrollLeft:B.scrollLeft/B.scrollWidth*B.clientWidth}):F})},[m.isHiddenScrollBar]),c<=f||!p||m.isHiddenScrollBar?null:d.createElement("div",{style:{height:Rv(),width:f,bottom:i},className:"".concat(u,"-sticky-scroll")},d.createElement("div",{onMouseDown:A,ref:h,className:de("".concat(u,"-sticky-scroll-bar"),M({},"".concat(u,"-sticky-scroll-bar-active"),w)),style:{width:"".concat(p,"px"),transform:"translate3d(".concat(m.scrollLeft,"px, 0, 0)")}}))};const _8=d.forwardRef(z8);var xw="rc-table",L8=[],H8={};function W8(){return"No Data"}function K8(e,t){var r=H({rowKey:"key",prefixCls:xw,emptyText:W8},e),n=r.prefixCls,o=r.className,a=r.rowClassName,i=r.style,l=r.data,s=r.rowKey,u=r.scroll,c=r.tableLayout,f=r.direction,p=r.title,h=r.footer,v=r.summary,g=r.caption,m=r.id,b=r.showHeader,y=r.components,C=r.emptyText,D=r.onRow,w=r.onHeaderRow,k=r.onScroll,E=r.internalHooks,x=r.transformColumns,A=r.internalRefs,N=r.tailor,$=r.getContainerWidth,j=r.sticky,F=r.rowHoverable,B=F===void 0?!0:F,S=l||L8,O=!!S.length,I=E===Bl,P=d.useCallback(function(pt,Dt){return vn(y,pt)||Dt},[y]),T=d.useMemo(function(){return typeof s=="function"?s:function(pt){var Dt=pt&&pt[s];return Dt}},[s]),_=P(["body"]),X=R8(),L=ce(X,3),q=L[0],J=L[1],ee=L[2],z=P8(r,S,T),Y=ce(z,6),V=Y[0],G=Y[1],K=Y[2],W=Y[3],te=Y[4],U=Y[5],Z=u==null?void 0:u.x,re=d.useState(0),ue=ce(re,2),he=ue[0],we=ue[1],Ne=F8(H(H(H({},r),V),{},{expandable:!!V.expandedRowRender,columnTitle:V.columnTitle,expandedKeys:K,getRowKey:T,onTriggerExpand:U,expandIcon:W,expandIconColumnIndex:V.expandIconColumnIndex,direction:f,scrollWidth:I&&N&&typeof Z=="number"?Z:null,clientWidth:he}),I?x:null),me=ce(Ne,4),ge=me[0],ye=me[1],Ce=me[2],xe=me[3],Ae=Ce??Z,ke=d.useMemo(function(){return{columns:ge,flattenColumns:ye}},[ge,ye]),We=d.useRef(),_e=d.useRef(),Pe=d.useRef(),ve=d.useRef();d.useImperativeHandle(t,function(){return{nativeElement:We.current,scrollTo:function(pt){var Dt;if(Pe.current instanceof HTMLElement){var Sr=pt.index,hr=pt.top,ur=pt.key;if(ZT(hr)){var pn;(pn=Pe.current)===null||pn===void 0||pn.scrollTo({top:hr})}else{var Wr,Pn=ur??T(S[Sr]);(Wr=Pe.current.querySelector('[data-row-key="'.concat(Pn,'"]')))===null||Wr===void 0||Wr.scrollIntoView()}}else(Dt=Pe.current)!==null&&Dt!==void 0&&Dt.scrollTo&&Pe.current.scrollTo(pt)}}});var Se=d.useRef(),qe=d.useState(!1),Ge=ce(qe,2),Xe=Ge[0],Ie=Ge[1],at=d.useState(!1),He=ce(at,2),nt=He[0],ht=He[1],At=d.useState(new Map),Et=ce(At,2),gt=Et[0],fe=Et[1],Oe=zu(ye),Me=Oe.map(function(pt){return gt.get(pt)}),Fe=d.useMemo(function(){return Me},[Me.join("_")]),pe=M8(Fe,ye,f),Ee=u&&Wf(u.y),ie=u&&Wf(Ae)||!!V.fixed,oe=ie&&ye.some(function(pt){var Dt=pt.fixed;return Dt}),be=d.useRef(),le=T8(j,n),ze=le.isSticky,Be=le.offsetHeader,Ke=le.offsetSummary,st=le.offsetScroll,dt=le.stickyClassName,Ye=le.container,Ze=d.useMemo(function(){return v==null?void 0:v(S)},[v,S]),ot=(Ee||ze)&&d.isValidElement(Ze)&&Ze.type===_u&&Ze.props.fixed,ft,Nt,jt;Ee&&(Nt={overflowY:O?"scroll":"auto",maxHeight:u.y}),ie&&(ft={overflowX:"auto"},Ee||(Nt={overflowY:"hidden"}),jt={width:Ae===!0?"auto":Ae,minWidth:"100%"});var It=d.useCallback(function(pt,Dt){fe(function(Sr){if(Sr.get(pt)!==Dt){var hr=new Map(Sr);return hr.set(pt,Dt),hr}return Sr})},[]),kt=I8(),Jt=ce(kt,2),pr=Jt[0],Le=Jt[1];function Qe(pt,Dt){Dt&&(typeof Dt=="function"?Dt(pt):Dt.scrollLeft!==pt&&(Dt.scrollLeft=pt,Dt.scrollLeft!==pt&&setTimeout(function(){Dt.scrollLeft=pt},0)))}var vt=nr(function(pt){var Dt=pt.currentTarget,Sr=pt.scrollLeft,hr=f==="rtl",ur=typeof Sr=="number"?Sr:Dt.scrollLeft,pn=Dt||H8;if(!Le()||Le()===pn){var Wr;pr(pn),Qe(ur,_e.current),Qe(ur,Pe.current),Qe(ur,Se.current),Qe(ur,(Wr=be.current)===null||Wr===void 0?void 0:Wr.setScrollLeft)}var Pn=Dt||_e.current;if(Pn){var En=I&&N&&typeof Ae=="number"?Ae:Pn.scrollWidth,io=Pn.clientWidth;if(En===io){Ie(!1),ht(!1);return}hr?(Ie(-ur<En-io),ht(-ur>0)):(Ie(ur>0),ht(ur<En-io))}}),Tt=nr(function(pt){vt(pt),k==null||k(pt)}),Ft=function(){if(ie&&Pe.current){var pt;vt({currentTarget:pu(Pe.current),scrollLeft:(pt=Pe.current)===null||pt===void 0?void 0:pt.scrollLeft})}else Ie(!1),ht(!1)},yr=function(pt){var Dt,Sr=pt.width;(Dt=be.current)===null||Dt===void 0||Dt.checkScrollBarVisible();var hr=We.current?We.current.offsetWidth:Sr;I&&$&&We.current&&(hr=$(We.current,hr)||hr),hr!==he&&(Ft(),we(hr))},Cr=d.useRef(!1);d.useEffect(function(){Cr.current&&Ft()},[ie,l,ge.length]),d.useEffect(function(){Cr.current=!0},[]);var ct=d.useState(0),$t=ce(ct,2),Bt=$t[0],Ut=$t[1],Tr=d.useState(!0),Zr=ce(Tr,2),xn=Zr[0],on=Zr[1];Wt(function(){(!N||!I)&&(Pe.current instanceof Element?Ut(bf(Pe.current).width):Ut(bf(ve.current).width)),on(BN("position","sticky"))},[]),d.useEffect(function(){I&&A&&(A.body.current=Pe.current)});var Mr=d.useCallback(function(pt){return d.createElement(d.Fragment,null,d.createElement(J0,pt),ot==="top"&&d.createElement(Jl,pt,Ze))},[ot,Ze]),an=d.useCallback(function(pt){return d.createElement(Jl,pt,Ze)},[Ze]),Jr=P(["table"],"table"),zr=d.useMemo(function(){return c||(oe?Ae==="max-content"?"auto":"fixed":Ee||ze||ye.some(function(pt){var Dt=pt.ellipsis;return Dt})?"fixed":"auto")},[Ee,oe,ye,c,ze]),ln,Ct={colWidths:Fe,columCount:ye.length,stickyOffsets:pe,onHeaderRow:w,fixHeader:Ee,scroll:u},Je=d.useMemo(function(){return O?null:typeof C=="function"?C():C},[O,C]),bt=d.createElement(v8,{data:S,measureColumnWidth:Ee||ie||ze}),Lt=d.createElement(yw,{colWidths:ye.map(function(pt){var Dt=pt.width;return Dt}),columns:ye}),_t=g!=null?d.createElement("caption",{className:"".concat(n,"-caption")},g):void 0,tr=Qn(r,{data:!0}),Dr=Qn(r,{aria:!0});if(Ee||ze){var mr;typeof _=="function"?(mr=_(S,{scrollbarSize:Bt,ref:Pe,onScroll:vt}),Ct.colWidths=ye.map(function(pt,Dt){var Sr=pt.width,hr=Dt===ye.length-1?Sr-Bt:Sr;return typeof hr=="number"&&!Number.isNaN(hr)?hr:0})):mr=d.createElement("div",{style:H(H({},ft),Nt),onScroll:Tt,ref:Pe,className:de("".concat(n,"-body"))},d.createElement(Jr,Te({style:H(H({},jt),{},{tableLayout:zr})},Dr),_t,Lt,bt,!ot&&Ze&&d.createElement(Jl,{stickyOffsets:pe,flattenColumns:ye},Ze)));var _r=H(H(H({noData:!S.length,maxContentScroll:ie&&Ae==="max-content"},Ct),ke),{},{direction:f,stickyClassName:dt,onScroll:vt});ln=d.createElement(d.Fragment,null,b!==!1&&d.createElement(Z0,Te({},_r,{stickyTopOffset:Be,className:"".concat(n,"-header"),ref:_e}),Mr),mr,ot&&ot!=="top"&&d.createElement(Z0,Te({},_r,{stickyBottomOffset:Ke,className:"".concat(n,"-summary"),ref:Se}),an),ze&&Pe.current&&Pe.current instanceof Element&&d.createElement(_8,{ref:be,offsetScroll:st,scrollBodyRef:Pe,onScroll:vt,container:Ye,direction:f}))}else ln=d.createElement("div",{style:H(H({},ft),Nt),className:de("".concat(n,"-content")),onScroll:vt,ref:Pe},d.createElement(Jr,Te({style:H(H({},jt),{},{tableLayout:zr})},Dr),_t,Lt,b!==!1&&d.createElement(J0,Te({},Ct,ke)),bt,Ze&&d.createElement(Jl,{stickyOffsets:pe,flattenColumns:ye},Ze)));var xr=d.createElement("div",Te({className:de(n,o,M(M(M(M(M(M(M(M(M(M({},"".concat(n,"-rtl"),f==="rtl"),"".concat(n,"-ping-left"),Xe),"".concat(n,"-ping-right"),nt),"".concat(n,"-layout-fixed"),c==="fixed"),"".concat(n,"-fixed-header"),Ee),"".concat(n,"-fixed-column"),oe),"".concat(n,"-fixed-column-gapped"),oe&&xe),"".concat(n,"-scroll-horizontal"),ie),"".concat(n,"-has-fix-left"),ye[0]&&ye[0].fixed),"".concat(n,"-has-fix-right"),ye[ye.length-1]&&ye[ye.length-1].fixed==="right")),style:i,id:m,ref:We},tr),p&&d.createElement(tb,{className:"".concat(n,"-title")},p(S)),d.createElement("div",{ref:ve,className:"".concat(n,"-container")},ln),h&&d.createElement(tb,{className:"".concat(n,"-footer")},h(S)));ie&&(xr=d.createElement(ao,{onResize:yr},xr));var Ar=N8(ye,pe,f),wn=d.useMemo(function(){return{scrollX:Ae,prefixCls:n,getComponent:P,scrollbarSize:Bt,direction:f,fixedInfoList:Ar,isSticky:ze,supportSticky:xn,componentWidth:he,fixHeader:Ee,fixColumn:oe,horizonScroll:ie,tableLayout:zr,rowClassName:a,expandedRowClassName:V.expandedRowClassName,expandIcon:W,expandableType:G,expandRowByClick:V.expandRowByClick,expandedRowRender:V.expandedRowRender,expandedRowOffset:V.expandedRowOffset,onTriggerExpand:U,expandIconColumnIndex:V.expandIconColumnIndex,indentSize:V.indentSize,allColumnsFixedLeft:ye.every(function(pt){return pt.fixed==="left"}),emptyNode:Je,columns:ge,flattenColumns:ye,onColumnResize:It,colWidths:Fe,hoverStartRow:q,hoverEndRow:J,onHover:ee,rowExpandable:V.rowExpandable,onRow:D,getRowKey:T,expandedKeys:K,childrenColumnName:te,rowHoverable:B}},[Ae,n,P,Bt,f,Ar,ze,xn,he,Ee,oe,ie,zr,a,V.expandedRowClassName,W,G,V.expandRowByClick,V.expandedRowRender,V.expandedRowOffset,U,V.expandIconColumnIndex,V.indentSize,Je,ge,ye,It,Fe,q,J,ee,V.rowExpandable,D,T,K,te,B]);return d.createElement(nn.Provider,{value:wn},xr)}var q8=d.forwardRef(K8);function ww(e){return uw(q8,e)}var fi=ww();fi.EXPAND_COLUMN=co;fi.INTERNAL_HOOKS=Bl;fi.Column=s8;fi.ColumnGroup=u8;fi.Summary=fw;var Dm=xm(null),Ew=xm(null);function V8(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function U8(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,i=e.component,l=e.renderIndex,s=e.record,u=e.style,c=e.className,f=e.inverse,p=e.getHeight,h=r.render,v=r.dataIndex,g=r.className,m=r.width,b=Lr(Ew,["columnsOffset"]),y=b.columnsOffset,C=bw(t,r,n,o,a),D=C.key,w=C.fixedInfo,k=C.appendCellNode,E=C.additionalCellProps,x=E.style,A=E.colSpan,N=A===void 0?1:A,$=E.rowSpan,j=$===void 0?1:$,F=n-1,B=V8(F,N,y),S=N>1?m-B:0,O=H(H(H({},x),u),{},{flex:"0 0 ".concat(B,"px"),width:"".concat(B,"px"),marginRight:S,pointerEvents:"auto"}),I=d.useMemo(function(){return f?j<=1:N===0||j===0||j>1},[j,N,f]);I?O.visibility="hidden":f&&(O.height=p==null?void 0:p(j));var P=I?function(){return null}:h,T={};return(j===0||N===0)&&(T.rowSpan=1,T.colSpan=1),d.createElement(di,Te({className:de(g,c),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:i,prefixCls:t.prefixCls,key:D,record:s,index:a,renderIndex:l,dataIndex:v,render:P,shouldCellUpdate:r.shouldCellUpdate},w,{appendNode:k,additionalProps:H(H({},E),{},{style:O},T)}))}var X8=["data","index","className","rowKey","style","extra","getHeight"],G8=d.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,i=e.style,l=e.extra,s=e.getHeight,u=yt(e,X8),c=r.record,f=r.indent,p=r.index,h=Lr(nn,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),v=h.scrollX,g=h.flattenColumns,m=h.prefixCls,b=h.fixColumn,y=h.componentWidth,C=Lr(Dm,["getComponent"]),D=C.getComponent,w=hw(c,a,n,f),k=D(["body","row"],"div"),E=D(["body","cell"],"div"),x=w.rowSupportExpand,A=w.expanded,N=w.rowProps,$=w.expandedRowRender,j=w.expandedRowClassName,F;if(x&&A){var B=$(c,n,f+1,A),S=vw(j,c,n,f),O={};b&&(O={style:M({},"--virtual-width","".concat(y,"px"))});var I="".concat(m,"-expanded-row-cell");F=d.createElement(k,{className:de("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(f+1),S)},d.createElement(di,{component:E,prefixCls:m,className:de(I,M({},"".concat(I,"-fixed"),b)),additionalProps:O},B))}var P=H(H({},i),{},{width:v});l&&(P.position="absolute",P.pointerEvents="none");var T=d.createElement(k,Te({},N,u,{"data-row-key":a,ref:x?null:t,className:de(o,"".concat(m,"-row"),N==null?void 0:N.className,M({},"".concat(m,"-row-extra"),l)),style:H(H({},P),N==null?void 0:N.style)}),g.map(function(_,X){return d.createElement(U8,{key:X,component:E,rowInfo:w,column:_,colIndex:X,indent:f,index:n,renderIndex:p,record:c,inverse:l,getHeight:s})}));return x?d.createElement("div",{ref:t},T,F):T}),nb=ci(G8),Y8=d.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Lr(nn,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,i=o.onColumnResize,l=o.getRowKey,s=o.expandedKeys,u=o.prefixCls,c=o.childrenColumnName,f=o.scrollX,p=o.direction,h=Lr(Dm),v=h.sticky,g=h.scrollY,m=h.listItemHeight,b=h.getComponent,y=h.onScroll,C=d.useRef(),D=mw(r,c,s,l),w=d.useMemo(function(){var F=0;return a.map(function(B){var S=B.width,O=B.key;return F+=S,[O,S,F]})},[a]),k=d.useMemo(function(){return w.map(function(F){return F[2]})},[w]);d.useEffect(function(){w.forEach(function(F){var B=ce(F,2),S=B[0],O=B[1];i(S,O)})},[w]),d.useImperativeHandle(t,function(){var F,B={scrollTo:function(S){var O;(O=C.current)===null||O===void 0||O.scrollTo(S)},nativeElement:(F=C.current)===null||F===void 0?void 0:F.nativeElement};return Object.defineProperty(B,"scrollLeft",{get:function(){var S;return((S=C.current)===null||S===void 0?void 0:S.getScrollInfo().x)||0},set:function(S){var O;(O=C.current)===null||O===void 0||O.scrollTo({left:S})}}),B});var E=function(F,B){var S,O=(S=D[B])===null||S===void 0?void 0:S.record,I=F.onCell;if(I){var P,T=I(O,B);return(P=T==null?void 0:T.rowSpan)!==null&&P!==void 0?P:1}return 1},x=function(F){var B=F.start,S=F.end,O=F.getSize,I=F.offsetY;if(S<0)return null;for(var P=a.filter(function(K){return E(K,B)===0}),T=B,_=function(K){if(P=P.filter(function(W){return E(W,K)===0}),!P.length)return T=K,1},X=B;X>=0&&!_(X);X-=1);for(var L=a.filter(function(K){return E(K,S)!==1}),q=S,J=function(K){if(L=L.filter(function(W){return E(W,K)!==1}),!L.length)return q=Math.max(K-1,S),1},ee=S;ee<D.length&&!J(ee);ee+=1);for(var z=[],Y=function(K){var W=D[K];if(!W)return 1;a.some(function(te){return E(te,K)>1})&&z.push(K)},V=T;V<=q;V+=1)Y(V);var G=z.map(function(K){var W=D[K],te=l(W.record,K),U=function(re){var ue=K+re-1,he=l(D[ue].record,ue),we=O(te,he);return we.bottom-we.top},Z=O(te);return d.createElement(nb,{key:K,data:W,rowKey:te,index:K,style:{top:-I+Z.top},extra:!0,getHeight:U})});return G},A=d.useMemo(function(){return{columnsOffset:k}},[k]),N="".concat(u,"-tbody"),$=b(["body","wrapper"]),j={};return v&&(j.position="sticky",j.bottom=0,lt(v)==="object"&&v.offsetScroll&&(j.bottom=v.offsetScroll)),d.createElement(Ew.Provider,{value:A},d.createElement(Nu,{fullHeight:!1,ref:C,prefixCls:"".concat(N,"-virtual"),styles:{horizontalScrollBar:j},className:N,height:g,itemHeight:m||24,data:D,itemKey:function(F){return l(F.record)},component:$,scrollWidth:f,direction:p,onVirtualScroll:function(F){var B,S=F.x;n({currentTarget:(B=C.current)===null||B===void 0?void 0:B.nativeElement,scrollLeft:S})},onScroll:y,extraRender:x},function(F,B,S){var O=l(F.record,B);return d.createElement(nb,{data:F,rowKey:O,index:B,style:S.style})}))}),Z8=ci(Y8),J8=function(e,t){var r=t.ref,n=t.onScroll;return d.createElement(Z8,{ref:r,data:e,onScroll:n})};function Q8(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,i=e.prefixCls,l=i===void 0?xw:i,s=e.className,u=e.listItemHeight,c=e.components,f=e.onScroll,p=o||{},h=p.x,v=p.y;typeof h!="number"&&(h=1),typeof v!="number"&&(v=500);var g=nr(function(y,C){return vn(c,y)||C}),m=nr(f),b=d.useMemo(function(){return{sticky:a,scrollY:v,listItemHeight:u,getComponent:g,onScroll:m}},[a,v,u,g,m]);return d.createElement(Dm.Provider,{value:b},d.createElement(fi,Te({},e,{className:de(s,"".concat(l,"-virtual")),scroll:H(H({},o),{},{x:h}),components:H(H({},c),{},{body:r!=null&&r.length?J8:void 0}),columns:n,internalHooks:Bl,tailor:!0,ref:t})))}var eM=d.forwardRef(Q8);function kw(e){return uw(eM,e)}kw();const tM=e=>null,rM=e=>null;var Sm=d.createContext(null),nM=d.createContext({}),oM=function(e){for(var t=e.prefixCls,r=e.level,n=e.isStart,o=e.isEnd,a="".concat(t,"-indent-unit"),i=[],l=0;l<r;l+=1)i.push(d.createElement("span",{key:l,className:de(a,M(M({},"".concat(a,"-start"),n[l]),"".concat(a,"-end"),o[l]))}));return d.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},i)};const aM=d.memo(oM);var iM=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ob="open",ab="close",lM="---",hl=function(e){var t,r,n,o=e.eventKey,a=e.className,i=e.style,l=e.dragOver,s=e.dragOverGapTop,u=e.dragOverGapBottom,c=e.isLeaf,f=e.isStart,p=e.isEnd,h=e.expanded,v=e.selected,g=e.checked,m=e.halfChecked,b=e.loading,y=e.domRef,C=e.active,D=e.data,w=e.onMouseMove,k=e.selectable,E=yt(e,iM),x=Q.useContext(Sm),A=Q.useContext(nM),N=Q.useRef(null),$=Q.useState(!1),j=ce($,2),F=j[0],B=j[1],S=!!(x.disabled||e.disabled||(t=A.nodeDisabled)!==null&&t!==void 0&&t.call(A,D)),O=Q.useMemo(function(){return!x.checkable||e.checkable===!1?!1:x.checkable},[x.checkable,e.checkable]),I=function(ve){S||x.onNodeSelect(ve,wr(e))},P=function(ve){S||!O||e.disableCheckbox||x.onNodeCheck(ve,wr(e),!g)},T=Q.useMemo(function(){return typeof k=="boolean"?k:x.selectable},[k,x.selectable]),_=function(ve){x.onNodeClick(ve,wr(e)),T?I(ve):P(ve)},X=function(ve){x.onNodeDoubleClick(ve,wr(e))},L=function(ve){x.onNodeMouseEnter(ve,wr(e))},q=function(ve){x.onNodeMouseLeave(ve,wr(e))},J=function(ve){x.onNodeContextMenu(ve,wr(e))},ee=Q.useMemo(function(){return!!(x.draggable&&(!x.draggable.nodeDraggable||x.draggable.nodeDraggable(D)))},[x.draggable,D]),z=function(ve){ve.stopPropagation(),B(!0),x.onNodeDragStart(ve,e);try{ve.dataTransfer.setData("text/plain","")}catch{}},Y=function(ve){ve.preventDefault(),ve.stopPropagation(),x.onNodeDragEnter(ve,e)},V=function(ve){ve.preventDefault(),ve.stopPropagation(),x.onNodeDragOver(ve,e)},G=function(ve){ve.stopPropagation(),x.onNodeDragLeave(ve,e)},K=function(ve){ve.stopPropagation(),B(!1),x.onNodeDragEnd(ve,e)},W=function(ve){ve.preventDefault(),ve.stopPropagation(),B(!1),x.onNodeDrop(ve,e)},te=function(ve){b||x.onNodeExpand(ve,wr(e))},U=Q.useMemo(function(){var ve=un(x.keyEntities,o)||{},Se=ve.children;return!!(Se||[]).length},[x.keyEntities,o]),Z=Q.useMemo(function(){return c===!1?!1:c||!x.loadData&&!U||x.loadData&&e.loaded&&!U},[c,x.loadData,U,e.loaded]);Q.useEffect(function(){b||typeof x.loadData=="function"&&h&&!Z&&!e.loaded&&x.onNodeLoad(wr(e))},[b,x.loadData,x.onNodeLoad,h,Z,e]);var re=Q.useMemo(function(){var ve;return(ve=x.draggable)!==null&&ve!==void 0&&ve.icon?Q.createElement("span",{className:"".concat(x.prefixCls,"-draggable-icon")},x.draggable.icon):null},[x.draggable]),ue=function(ve){var Se=e.switcherIcon||x.switcherIcon;return typeof Se=="function"?Se(H(H({},e),{},{isLeaf:ve})):Se},he=function(){if(Z){var ve=ue(!0);return ve!==!1?Q.createElement("span",{className:de("".concat(x.prefixCls,"-switcher"),"".concat(x.prefixCls,"-switcher-noop"))},ve):null}var Se=ue(!1);return Se!==!1?Q.createElement("span",{onClick:te,className:de("".concat(x.prefixCls,"-switcher"),"".concat(x.prefixCls,"-switcher_").concat(h?ob:ab))},Se):null},we=Q.useMemo(function(){if(!O)return null;var ve=typeof O!="boolean"?O:null;return Q.createElement("span",{className:de("".concat(x.prefixCls,"-checkbox"),M(M(M({},"".concat(x.prefixCls,"-checkbox-checked"),g),"".concat(x.prefixCls,"-checkbox-indeterminate"),!g&&m),"".concat(x.prefixCls,"-checkbox-disabled"),S||e.disableCheckbox)),onClick:P,role:"checkbox","aria-checked":m?"mixed":g,"aria-disabled":S||e.disableCheckbox,"aria-label":"Select ".concat(typeof e.title=="string"?e.title:"tree node")},ve)},[O,g,m,S,e.disableCheckbox,e.title]),Ne=Q.useMemo(function(){return Z?null:h?ob:ab},[Z,h]),me=Q.useMemo(function(){return Q.createElement("span",{className:de("".concat(x.prefixCls,"-iconEle"),"".concat(x.prefixCls,"-icon__").concat(Ne||"docu"),M({},"".concat(x.prefixCls,"-icon_loading"),b))})},[x.prefixCls,Ne,b]),ge=Q.useMemo(function(){var ve=!!x.draggable,Se=!e.disabled&&ve&&x.dragOverNodeKey===o;return Se?x.dropIndicatorRender({dropPosition:x.dropPosition,dropLevelOffset:x.dropLevelOffset,indent:x.indent,prefixCls:x.prefixCls,direction:x.direction}):null},[x.dropPosition,x.dropLevelOffset,x.indent,x.prefixCls,x.direction,x.draggable,x.dragOverNodeKey,x.dropIndicatorRender]),ye=Q.useMemo(function(){var ve=e.title,Se=ve===void 0?lM:ve,qe="".concat(x.prefixCls,"-node-content-wrapper"),Ge;if(x.showIcon){var Xe=e.icon||x.icon;Ge=Xe?Q.createElement("span",{className:de("".concat(x.prefixCls,"-iconEle"),"".concat(x.prefixCls,"-icon__customize"))},typeof Xe=="function"?Xe(e):Xe):me}else x.loadData&&b&&(Ge=me);var Ie;return typeof Se=="function"?Ie=Se(D):x.titleRender?Ie=x.titleRender(D):Ie=Se,Q.createElement("span",{ref:N,title:typeof Se=="string"?Se:"",className:de(qe,"".concat(qe,"-").concat(Ne||"normal"),M({},"".concat(x.prefixCls,"-node-selected"),!S&&(v||F))),onMouseEnter:L,onMouseLeave:q,onContextMenu:J,onClick:_,onDoubleClick:X},Ge,Q.createElement("span",{className:"".concat(x.prefixCls,"-title")},Ie),ge)},[x.prefixCls,x.showIcon,e,x.icon,me,x.titleRender,D,Ne,L,q,J,_,X]),Ce=Qn(E,{aria:!0,data:!0}),xe=un(x.keyEntities,o)||{},Ae=xe.level,ke=p[p.length-1],We=!S&&ee,_e=x.draggingNodeKey===o,Pe=k!==void 0?{"aria-selected":!!k}:void 0;return Q.createElement("div",Te({ref:y,role:"treeitem","aria-expanded":c?void 0:h,className:de(a,"".concat(x.prefixCls,"-treenode"),(n={},M(M(M(M(M(M(M(M(M(M(n,"".concat(x.prefixCls,"-treenode-disabled"),S),"".concat(x.prefixCls,"-treenode-switcher-").concat(h?"open":"close"),!c),"".concat(x.prefixCls,"-treenode-checkbox-checked"),g),"".concat(x.prefixCls,"-treenode-checkbox-indeterminate"),m),"".concat(x.prefixCls,"-treenode-selected"),v),"".concat(x.prefixCls,"-treenode-loading"),b),"".concat(x.prefixCls,"-treenode-active"),C),"".concat(x.prefixCls,"-treenode-leaf-last"),ke),"".concat(x.prefixCls,"-treenode-draggable"),ee),"dragging",_e),M(M(M(M(M(M(M(n,"drop-target",x.dropTargetKey===o),"drop-container",x.dropContainerKey===o),"drag-over",!S&&l),"drag-over-gap-top",!S&&s),"drag-over-gap-bottom",!S&&u),"filter-node",(r=x.filterTreeNode)===null||r===void 0?void 0:r.call(x,wr(e))),"".concat(x.prefixCls,"-treenode-leaf"),Z))),style:i,draggable:We,onDragStart:We?z:void 0,onDragEnter:ee?Y:void 0,onDragOver:ee?V:void 0,onDragLeave:ee?G:void 0,onDrop:ee?W:void 0,onDragEnd:ee?K:void 0,onMouseMove:w},Pe,Ce),Q.createElement(aM,{prefixCls:x.prefixCls,level:Ae,isStart:f,isEnd:p}),re,he(),we,ye)};hl.isTreeNode=1;function Un(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function so(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function $m(e){return e.split("-")}function sM(e,t){var r=[],n=un(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(i){var l=i.key,s=i.children;r.push(l),o(s)})}return o(n.children),r}function uM(e){if(e.parent){var t=$m(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function cM(e){var t=$m(e.pos);return Number(t[t.length-1])===0}function ib(e,t,r,n,o,a,i,l,s,u){var c,f=e.clientX,p=e.clientY,h=e.target.getBoundingClientRect(),v=h.top,g=h.height,m=(u==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-f),b=(m-12)/n,y=s.filter(function(O){var I;return(I=l[O])===null||I===void 0||(I=I.children)===null||I===void 0?void 0:I.length}),C=un(l,r.eventKey);if(p<v+g/2){var D=i.findIndex(function(O){return O.key===C.key}),w=D<=0?0:D-1,k=i[w].key;C=un(l,k)}var E=C.key,x=C,A=C.key,N=0,$=0;if(!y.includes(E))for(var j=0;j<b&&uM(C);j+=1)C=C.parent,$+=1;var F=t.data,B=C.node,S=!0;return cM(C)&&C.level===0&&p<v+g/2&&a({dragNode:F,dropNode:B,dropPosition:-1})&&C.key===r.eventKey?N=-1:(x.children||[]).length&&y.includes(A)?a({dragNode:F,dropNode:B,dropPosition:0})?N=0:S=!1:$===0?b>-1.5?a({dragNode:F,dropNode:B,dropPosition:1})?N=1:S=!1:a({dragNode:F,dropNode:B,dropPosition:0})?N=0:a({dragNode:F,dropNode:B,dropPosition:1})?N=1:S=!1:a({dragNode:F,dropNode:B,dropPosition:1})?N=1:S=!1,{dropPosition:N,dropLevelOffset:$,dropTargetKey:C.key,dropTargetPos:C.pos,dragOverNodeKey:A,dropContainerKey:N===0?null:((c=C.parent)===null||c===void 0?void 0:c.key)||null,dropAllowed:S}}function lb(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function Jc(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(lt(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return lr(!1,"`checkedKeys` is not an array or an object"),null;return t}function qf(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=un(t,o);if(a){r.add(o);var i=a.parent,l=a.node;l.disabled||i&&n(i.key)}}}return(e||[]).forEach(function(o){n(o)}),je(r)}function dM(e){const[t,r]=xt(null);return[mt((n,o,a)=>{const i=t??n,l=Math.min(i||0,n),s=Math.max(i||0,n),u=o.slice(l,s+1).map(p=>e(p)),c=u.some(p=>!a.has(p)),f=[];return u.forEach(p=>{c?(a.has(p)||f.push(p),a.add(p)):(a.delete(p),f.push(p))}),r(c?s:null),f},[t]),n=>{r(n)}]}const ko={},Vf="SELECT_ALL",Uf="SELECT_INVERT",Xf="SELECT_NONE",sb=[],Dw=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&Dw(e,n[e],r)}),r),fM=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:i,onChange:l,onSelect:s,onSelectAll:u,onSelectInvert:c,onSelectNone:f,onSelectMultiple:p,columnWidth:h,type:v,selections:g,fixed:m,renderCell:b,hideSelectAll:y,checkStrictly:C=!0}=t||{},{prefixCls:D,data:w,pageData:k,getRecordByKey:E,getRowKey:x,expandType:A,childrenColumnName:N,locale:$,getPopupContainer:j}=e,F=oi(),[B,S]=dM(W=>W),[O,I]=Ur(n||o||sb,{value:n}),P=d.useRef(new Map),T=mt(W=>{if(r){const te=new Map;W.forEach(U=>{let Z=E(U);!Z&&P.current.has(U)&&(Z=P.current.get(U)),te.set(U,Z)}),P.current=te}},[E,r]);d.useEffect(()=>{T(O)},[O]);const _=wt(()=>Dw(N,k),[N,k]),{keyEntities:X}=wt(()=>{if(C)return{keyEntities:null};let W=w;if(r){const te=new Set(_.map((Z,re)=>x(Z,re))),U=Array.from(P.current).reduce((Z,[re,ue])=>te.has(re)?Z:Z.concat(ue),[]);W=[].concat(je(W),je(U))}return bm(W,{externalGetKey:x,childrenPropName:N})},[w,x,C,N,r,_]),L=wt(()=>{const W=new Map;return _.forEach((te,U)=>{const Z=x(te,U),re=(a?a(te):null)||{};W.set(Z,re)}),W},[_,x,a]),q=mt(W=>{const te=x(W);let U;return L.has(te)?U=L.get(x(W)):U=a?a(W):void 0,!!(U!=null&&U.disabled)},[L,x]),[J,ee]=wt(()=>{if(C)return[O||[],[]];const{checkedKeys:W,halfCheckedKeys:te}=ja(O,!0,X,q);return[W||[],te]},[O,C,X,q]),z=wt(()=>{const W=v==="radio"?J.slice(0,1):J;return new Set(W)},[J,v]),Y=wt(()=>v==="radio"?new Set:new Set(ee),[ee,v]);d.useEffect(()=>{t||I(sb)},[!!t]);const V=mt((W,te)=>{let U,Z;T(W),r?(U=W,Z=W.map(re=>P.current.get(re))):(U=[],Z=[],W.forEach(re=>{const ue=E(re);ue!==void 0&&(U.push(re),Z.push(ue))})),I(U),l==null||l(U,Z,{type:te})},[I,E,l,r]),G=mt((W,te,U,Z)=>{if(s){const re=U.map(ue=>E(ue));s(E(W),te,re,Z)}V(U,"single")},[s,E,V]),K=wt(()=>!g||y?null:(g===!0?[Vf,Uf,Xf]:g).map(W=>W===Vf?{key:"all",text:$.selectionAll,onSelect(){V(w.map((te,U)=>x(te,U)).filter(te=>{const U=L.get(te);return!(U!=null&&U.disabled)||z.has(te)}),"all")}}:W===Uf?{key:"invert",text:$.selectInvert,onSelect(){const te=new Set(z);k.forEach((Z,re)=>{const ue=x(Z,re),he=L.get(ue);he!=null&&he.disabled||(te.has(ue)?te.delete(ue):te.add(ue))});const U=Array.from(te);c&&(F.deprecated(!1,"onSelectInvert","onChange"),c(U)),V(U,"invert")}}:W===Xf?{key:"none",text:$.selectNone,onSelect(){f==null||f(),V(Array.from(z).filter(te=>{const U=L.get(te);return U==null?void 0:U.disabled}),"none")}}:W).map(W=>Object.assign(Object.assign({},W),{onSelect:(...te)=>{var U,Z;(Z=W.onSelect)===null||Z===void 0||(U=Z).call.apply(U,[W].concat(te)),S(null)}})),[g,z,k,x,c,V]);return[mt(W=>{var te;if(!t)return W.filter(ve=>ve!==ko);let U=je(W);const Z=new Set(z),re=_.map(x).filter(ve=>!L.get(ve).disabled),ue=re.every(ve=>Z.has(ve)),he=re.some(ve=>Z.has(ve)),we=()=>{const ve=[];ue?re.forEach(qe=>{Z.delete(qe),ve.push(qe)}):re.forEach(qe=>{Z.has(qe)||(Z.add(qe),ve.push(qe))});const Se=Array.from(Z);u==null||u(!ue,Se.map(qe=>E(qe)),ve.map(qe=>E(qe))),V(Se,"all"),S(null)};let Ne,me;if(v!=="radio"){let ve;if(K){const nt={getPopupContainer:j,items:K.map((ht,At)=>{const{key:Et,text:gt,onSelect:fe}=ht;return{key:Et??At,onClick:()=>{fe==null||fe(re)},label:gt}})};ve=d.createElement("div",{className:`${D}-selection-extra`},d.createElement(ym,{menu:nt,getPopupContainer:j},d.createElement("span",null,d.createElement(lx,null))))}const Se=_.map((nt,ht)=>{const At=x(nt,ht),Et=L.get(At)||{};return Object.assign({checked:Z.has(At)},Et)}).filter(({disabled:nt})=>nt),qe=!!Se.length&&Se.length===_.length,Ge=qe&&Se.every(({checked:nt})=>nt),Xe=qe&&Se.some(({checked:nt})=>nt),Ie=(i==null?void 0:i())||{},{onChange:at,disabled:He}=Ie;me=d.createElement(Qa,Object.assign({"aria-label":ve?"Custom selection":"Select all"},Ie,{checked:qe?Ge:!!_.length&&ue,indeterminate:qe?!Ge&&Xe:!ue&&he,onChange:nt=>{we(),at==null||at(nt)},disabled:He??(_.length===0||qe),skipGroup:!0})),Ne=!y&&d.createElement("div",{className:`${D}-selection`},me,ve)}let ge;v==="radio"?ge=(ve,Se,qe)=>{const Ge=x(Se,qe),Xe=Z.has(Ge),Ie=L.get(Ge);return{node:d.createElement(Sl,Object.assign({},Ie,{checked:Xe,onClick:at=>{var He;at.stopPropagation(),(He=Ie==null?void 0:Ie.onClick)===null||He===void 0||He.call(Ie,at)},onChange:at=>{var He;Z.has(Ge)||G(Ge,!0,[Ge],at.nativeEvent),(He=Ie==null?void 0:Ie.onChange)===null||He===void 0||He.call(Ie,at)}})),checked:Xe}}:ge=(ve,Se,qe)=>{var Ge;const Xe=x(Se,qe),Ie=Z.has(Xe),at=Y.has(Xe),He=L.get(Xe);let nt;return A==="nest"?nt=at:nt=(Ge=He==null?void 0:He.indeterminate)!==null&&Ge!==void 0?Ge:at,{node:d.createElement(Qa,Object.assign({},He,{indeterminate:nt,checked:Ie,skipGroup:!0,onClick:ht=>{var At;ht.stopPropagation(),(At=He==null?void 0:He.onClick)===null||At===void 0||At.call(He,ht)},onChange:ht=>{var At;const{nativeEvent:Et}=ht,{shiftKey:gt}=Et,fe=re.findIndex(Me=>Me===Xe),Oe=J.some(Me=>re.includes(Me));if(gt&&C&&Oe){const Me=B(fe,re,Z),Fe=Array.from(Z);p==null||p(!Ie,Fe.map(pe=>E(pe)),Me.map(pe=>E(pe))),V(Fe,"multiple")}else{const Me=J;if(C){const Fe=Ie?Un(Me,Xe):so(Me,Xe);G(Xe,!Ie,Fe,Et)}else{const Fe=ja([].concat(je(Me),[Xe]),!0,X,q),{checkedKeys:pe,halfCheckedKeys:Ee}=Fe;let ie=pe;if(Ie){const oe=new Set(pe);oe.delete(Xe),ie=ja(Array.from(oe),{halfCheckedKeys:Ee},X,q).checkedKeys}G(Xe,!Ie,ie,Et)}}S(Ie?null:fe),(At=He==null?void 0:He.onChange)===null||At===void 0||At.call(He,ht)}})),checked:Ie}};const ye=(ve,Se,qe)=>{const{node:Ge,checked:Xe}=ge(ve,Se,qe);return b?b(Xe,Se,qe,Ge):Ge};if(!U.includes(ko))if(U.findIndex(ve=>{var Se;return((Se=ve[Li])===null||Se===void 0?void 0:Se.columnType)==="EXPAND_COLUMN"})===0){const[ve,...Se]=U;U=[ve,ko].concat(je(Se))}else U=[ko].concat(je(U));const Ce=U.indexOf(ko);U=U.filter((ve,Se)=>ve!==ko||Se===Ce);const xe=U[Ce-1],Ae=U[Ce+1];let ke=m;ke===void 0&&((Ae==null?void 0:Ae.fixed)!==void 0?ke=Ae.fixed:(xe==null?void 0:xe.fixed)!==void 0&&(ke=xe.fixed)),ke&&xe&&((te=xe[Li])===null||te===void 0?void 0:te.columnType)==="EXPAND_COLUMN"&&xe.fixed===void 0&&(xe.fixed=ke);const We=de(`${D}-selection-col`,{[`${D}-selection-col-with-dropdown`]:g&&v==="checkbox"}),_e=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(me):t.columnTitle:Ne,Pe={fixed:ke,width:h,className:`${D}-selection-column`,title:_e(),render:ye,onCell:t.onCell,align:t.align,[Li]:{className:We}};return U.map(ve=>ve===ko?Pe:ve)},[x,_,t,J,z,Y,h,K,A,L,p,G,q]),z]};function pM(e,t){return e._antProxy=e._antProxy||{},Object.keys(t).forEach(r=>{if(!(r in e._antProxy)){const n=e[r];e._antProxy[r]=n,e[r]=t[r]}}),e}function mM(e,t){return ei(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(o,a){return r[a]?r[a]:Reflect.get(o,a)}}):pM(n,r)})}function hM(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:a,expandable:i}=t,l=`${r}-row-expand-icon`;return d.createElement("button",{type:"button",onClick:s=>{n(o,s),s.stopPropagation()},className:de(l,{[`${l}-spaced`]:!i,[`${l}-expanded`]:i&&a,[`${l}-collapsed`]:i&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function gM(e){return(t,r)=>{const n=t.querySelector(`.${e}-container`);let o=r;if(n){const a=getComputedStyle(n),i=parseInt(a.borderLeftWidth,10),l=parseInt(a.borderRightWidth,10);o=r-i-l}return o}}const jo=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function pi(e,t){return t?`${t}-${e}`:`${e}`}const Lu=(e,t)=>typeof e=="function"?e(t):e,vM=(e,t)=>{const r=Lu(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};function bM(e){const t=d.useRef(e),r=cx();return[()=>t.current,n=>{t.current=n,r()}]}var yM=function(e){var t=e.dropPosition,r=e.dropLevelOffset,n=e.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:o.top=0,o.left=-r*n;break;case 1:o.bottom=0,o.left=-r*n;break;case 0:o.bottom=0,o.left=n;break}return Q.createElement("div",{style:o})};function Sw(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function CM(e,t){var r=d.useState(!1),n=ce(r,2),o=n[0],a=n[1];Wt(function(){if(o)return e(),function(){t()}},[o]),Wt(function(){return a(!0),function(){a(!1)}},[])}var xM=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],wM=d.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,i=e.motionType,l=e.onMotionStart,s=e.onMotionEnd,u=e.active,c=e.treeNodeRequiredProps,f=yt(e,xM),p=d.useState(!0),h=ce(p,2),v=h[0],g=h[1],m=d.useContext(Sm),b=m.prefixCls,y=a&&i!=="hide";Wt(function(){a&&y!==v&&g(y)},[a]);var C=function(){a&&l()},D=d.useRef(!1),w=function(){a&&!D.current&&(D.current=!0,s())};CM(C,w);var k=function(E){y===E&&w()};return a?d.createElement(ca,Te({ref:t,visible:v},o,{motionAppear:i==="show",onVisibleChanged:k}),function(E,x){var A=E.className,N=E.style;return d.createElement("div",{ref:x,className:de("".concat(b,"-treenode-motion"),A),style:N},a.map(function($){var j=Object.assign({},(Sw($.data),$.data)),F=$.title,B=$.key,S=$.isStart,O=$.isEnd;delete j.children;var I=_i(B,c);return d.createElement(hl,Te({},j,I,{title:F,active:u,data:$.data,key:B,isStart:S,isEnd:O}))}))}):d.createElement(hl,Te({domRef:t,className:r,style:n},f,{active:u}))});function EM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function o(a,i){var l=new Map;a.forEach(function(u){l.set(u,!0)});var s=i.filter(function(u){return!l.has(u)});return s.length===1?s[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function ub(e,t,r){var n=e.findIndex(function(l){return l.key===r}),o=e[n+1],a=t.findIndex(function(l){return l.key===r});if(o){var i=t.findIndex(function(l){return l.key===o.key});return t.slice(a+1,i)}return t.slice(a+1)}var kM=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],cb={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},DM=function(){},aa="RC_TREE_MOTION_".concat(Math.random()),Gf={key:aa},$w={key:aa,level:0,index:0,pos:"0",node:Gf,nodes:[Gf]},db={parent:null,children:[],pos:$w.pos,data:Gf,title:null,key:aa,isStart:[],isEnd:[]};function fb(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function pb(e){var t=e.key,r=e.pos;return $l(t,r)}function SM(e){for(var t=String(e.data.key),r=e;r.parent;)r=r.parent,t="".concat(r.data.key," > ").concat(t);return t}var $M=d.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,i=e.checkedKeys,l=e.loadedKeys,s=e.loadingKeys,u=e.halfCheckedKeys,c=e.keyEntities,f=e.disabled,p=e.dragging,h=e.dragOverNodeKey,v=e.dropPosition,g=e.motion,m=e.height,b=e.itemHeight,y=e.virtual,C=e.scrollWidth,D=e.focusable,w=e.activeItem,k=e.focused,E=e.tabIndex,x=e.onKeyDown,A=e.onFocus,N=e.onBlur,$=e.onActiveChange,j=e.onListChangeStart,F=e.onListChangeEnd,B=yt(e,kM),S=d.useRef(null),O=d.useRef(null);d.useImperativeHandle(t,function(){return{scrollTo:function(ge){S.current.scrollTo(ge)},getIndentWidth:function(){return O.current.offsetWidth}}});var I=d.useState(o),P=ce(I,2),T=P[0],_=P[1],X=d.useState(n),L=ce(X,2),q=L[0],J=L[1],ee=d.useState(n),z=ce(ee,2),Y=z[0],V=z[1],G=d.useState([]),K=ce(G,2),W=K[0],te=K[1],U=d.useState(null),Z=ce(U,2),re=Z[0],ue=Z[1],he=d.useRef(n);he.current=n;function we(){var ge=he.current;J(ge),V(ge),te([]),ue(null),F()}Wt(function(){_(o);var ge=EM(T,o);if(ge.key!==null)if(ge.add){var ye=q.findIndex(function(_e){var Pe=_e.key;return Pe===ge.key}),Ce=fb(ub(q,n,ge.key),y,m,b),xe=q.slice();xe.splice(ye+1,0,db),V(xe),te(Ce),ue("show")}else{var Ae=n.findIndex(function(_e){var Pe=_e.key;return Pe===ge.key}),ke=fb(ub(n,q,ge.key),y,m,b),We=n.slice();We.splice(Ae+1,0,db),V(We),te(ke),ue("hide")}else q!==n&&(J(n),V(n))},[o,n]),d.useEffect(function(){p||we()},[p]);var Ne=g?Y:n,me={expandedKeys:o,selectedKeys:a,loadedKeys:l,loadingKeys:s,checkedKeys:i,halfCheckedKeys:u,dragOverNodeKey:h,dropPosition:v,keyEntities:c};return d.createElement(d.Fragment,null,k&&w&&d.createElement("span",{style:cb,"aria-live":"assertive"},SM(w)),d.createElement("div",null,d.createElement("input",{style:cb,disabled:D===!1||f,tabIndex:D!==!1?E:null,onKeyDown:x,onFocus:A,onBlur:N,value:"",onChange:DM,"aria-label":"for screen reader"})),d.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},d.createElement("div",{className:"".concat(r,"-indent")},d.createElement("div",{ref:O,className:"".concat(r,"-indent-unit")}))),d.createElement(Nu,Te({},B,{data:Ne,itemKey:pb,height:m,fullHeight:!1,virtual:y,itemHeight:b,scrollWidth:C,prefixCls:"".concat(r,"-list"),ref:S,role:"tree",onVisibleChange:function(ge){ge.every(function(ye){return pb(ye)!==aa})&&we()}}),function(ge){var ye=ge.pos,Ce=Object.assign({},(Sw(ge.data),ge.data)),xe=ge.title,Ae=ge.key,ke=ge.isStart,We=ge.isEnd,_e=$l(Ae,ye);delete Ce.key,delete Ce.children;var Pe=_i(_e,me);return d.createElement(wM,Te({},Ce,Pe,{title:xe,active:!!w&&Ae===w.key,pos:ye,data:ge.data,isStart:ke,isEnd:We,motion:g,motionNodes:Ae===aa?W:null,motionType:re,onMotionStart:j,onMotionEnd:we,treeNodeRequiredProps:me,onMouseMove:function(){$(null)}}))}))}),BM=10,Bm=(function(e){no(r,e);var t=oo(r);function r(){var n;vr(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=t.call.apply(t,[this].concat(a)),M(et(n),"destroyed",!1),M(et(n),"delayedDragEnterLogic",void 0),M(et(n),"loadingRetryTimes",{}),M(et(n),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Ja()}),M(et(n),"dragStartMousePosition",null),M(et(n),"dragNodeProps",null),M(et(n),"currentMouseOverDroppableNodeKey",null),M(et(n),"listRef",d.createRef()),M(et(n),"onNodeDragStart",function(l,s){var u=n.state,c=u.expandedKeys,f=u.keyEntities,p=n.props.onDragStart,h=s.eventKey;n.dragNodeProps=s,n.dragStartMousePosition={x:l.clientX,y:l.clientY};var v=Un(c,h);n.setState({draggingNodeKey:h,dragChildrenKeys:sM(h,f),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(v),window.addEventListener("dragend",n.onWindowDragEnd),p==null||p({event:l,node:wr(s)})}),M(et(n),"onNodeDragEnter",function(l,s){var u=n.state,c=u.expandedKeys,f=u.keyEntities,p=u.dragChildrenKeys,h=u.flattenNodes,v=u.indent,g=n.props,m=g.onDragEnter,b=g.onExpand,y=g.allowDrop,C=g.direction,D=s.pos,w=s.eventKey;if(n.currentMouseOverDroppableNodeKey!==w&&(n.currentMouseOverDroppableNodeKey=w),!n.dragNodeProps){n.resetDragState();return}var k=ib(l,n.dragNodeProps,s,v,n.dragStartMousePosition,y,h,f,c,C),E=k.dropPosition,x=k.dropLevelOffset,A=k.dropTargetKey,N=k.dropContainerKey,$=k.dropTargetPos,j=k.dropAllowed,F=k.dragOverNodeKey;if(p.includes(A)||!j){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(B){clearTimeout(n.delayedDragEnterLogic[B])}),n.dragNodeProps.eventKey!==s.eventKey&&(l.persist(),n.delayedDragEnterLogic[D]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var B=je(c),S=un(f,s.eventKey);S&&(S.children||[]).length&&(B=so(c,s.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(B),b==null||b(B,{node:wr(s),expanded:!0,nativeEvent:l.nativeEvent})}},800)),n.dragNodeProps.eventKey===A&&x===0){n.resetDragState();return}n.setState({dragOverNodeKey:F,dropPosition:E,dropLevelOffset:x,dropTargetKey:A,dropContainerKey:N,dropTargetPos:$,dropAllowed:j}),m==null||m({event:l,node:wr(s),expandedKeys:c})}),M(et(n),"onNodeDragOver",function(l,s){var u=n.state,c=u.dragChildrenKeys,f=u.flattenNodes,p=u.keyEntities,h=u.expandedKeys,v=u.indent,g=n.props,m=g.onDragOver,b=g.allowDrop,y=g.direction;if(n.dragNodeProps){var C=ib(l,n.dragNodeProps,s,v,n.dragStartMousePosition,b,f,p,h,y),D=C.dropPosition,w=C.dropLevelOffset,k=C.dropTargetKey,E=C.dropContainerKey,x=C.dropTargetPos,A=C.dropAllowed,N=C.dragOverNodeKey;c.includes(k)||!A||(n.dragNodeProps.eventKey===k&&w===0?n.state.dropPosition===null&&n.state.dropLevelOffset===null&&n.state.dropTargetKey===null&&n.state.dropContainerKey===null&&n.state.dropTargetPos===null&&n.state.dropAllowed===!1&&n.state.dragOverNodeKey===null||n.resetDragState():D===n.state.dropPosition&&w===n.state.dropLevelOffset&&k===n.state.dropTargetKey&&E===n.state.dropContainerKey&&x===n.state.dropTargetPos&&A===n.state.dropAllowed&&N===n.state.dragOverNodeKey||n.setState({dropPosition:D,dropLevelOffset:w,dropTargetKey:k,dropContainerKey:E,dropTargetPos:x,dropAllowed:A,dragOverNodeKey:N}),m==null||m({event:l,node:wr(s)}))}}),M(et(n),"onNodeDragLeave",function(l,s){n.currentMouseOverDroppableNodeKey===s.eventKey&&!l.currentTarget.contains(l.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var u=n.props.onDragLeave;u==null||u({event:l,node:wr(s)})}),M(et(n),"onWindowDragEnd",function(l){n.onNodeDragEnd(l,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),M(et(n),"onNodeDragEnd",function(l,s){var u=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),u==null||u({event:l,node:wr(s)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),M(et(n),"onNodeDrop",function(l,s){var u,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=n.state,p=f.dragChildrenKeys,h=f.dropPosition,v=f.dropTargetKey,g=f.dropTargetPos,m=f.dropAllowed;if(m){var b=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),v!==null){var y=H(H({},_i(v,n.getTreeNodeRequiredProps())),{},{active:((u=n.getActiveItem())===null||u===void 0?void 0:u.key)===v,data:un(n.state.keyEntities,v).node}),C=p.includes(v);lr(!C,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var D=$m(g),w={event:l,node:wr(y),dragNode:n.dragNodeProps?wr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(p),dropToGap:h!==0,dropPosition:h+Number(D[D.length-1])};c||(b==null||b(w)),n.dragNodeProps=null}}}),M(et(n),"cleanDragState",function(){var l=n.state.draggingNodeKey;l!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),M(et(n),"triggerExpandActionExpand",function(l,s){var u=n.state,c=u.expandedKeys,f=u.flattenNodes,p=s.expanded,h=s.key,v=s.isLeaf;if(!(v||l.shiftKey||l.metaKey||l.ctrlKey)){var g=f.filter(function(b){return b.key===h})[0],m=wr(H(H({},_i(h,n.getTreeNodeRequiredProps())),{},{data:g.data}));n.setExpandedKeys(p?Un(c,h):so(c,h)),n.onNodeExpand(l,m)}}),M(et(n),"onNodeClick",function(l,s){var u=n.props,c=u.onClick,f=u.expandAction;f==="click"&&n.triggerExpandActionExpand(l,s),c==null||c(l,s)}),M(et(n),"onNodeDoubleClick",function(l,s){var u=n.props,c=u.onDoubleClick,f=u.expandAction;f==="doubleClick"&&n.triggerExpandActionExpand(l,s),c==null||c(l,s)}),M(et(n),"onNodeSelect",function(l,s){var u=n.state.selectedKeys,c=n.state,f=c.keyEntities,p=c.fieldNames,h=n.props,v=h.onSelect,g=h.multiple,m=s.selected,b=s[p.key],y=!m;y?g?u=so(u,b):u=[b]:u=Un(u,b);var C=u.map(function(D){var w=un(f,D);return w?w.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:u}),v==null||v(u,{event:"select",selected:y,node:s,selectedNodes:C,nativeEvent:l.nativeEvent})}),M(et(n),"onNodeCheck",function(l,s,u){var c=n.state,f=c.keyEntities,p=c.checkedKeys,h=c.halfCheckedKeys,v=n.props,g=v.checkStrictly,m=v.onCheck,b=s.key,y,C={event:"check",node:s,checked:u,nativeEvent:l.nativeEvent};if(g){var D=u?so(p,b):Un(p,b),w=Un(h,b);y={checked:D,halfChecked:w},C.checkedNodes=D.map(function($){return un(f,$)}).filter(Boolean).map(function($){return $.node}),n.setUncontrolledState({checkedKeys:D})}else{var k=ja([].concat(je(p),[b]),!0,f),E=k.checkedKeys,x=k.halfCheckedKeys;if(!u){var A=new Set(E);A.delete(b);var N=ja(Array.from(A),{halfCheckedKeys:x},f);E=N.checkedKeys,x=N.halfCheckedKeys}y=E,C.checkedNodes=[],C.checkedNodesPositions=[],C.halfCheckedKeys=x,E.forEach(function($){var j=un(f,$);if(j){var F=j.node,B=j.pos;C.checkedNodes.push(F),C.checkedNodesPositions.push({node:F,pos:B})}}),n.setUncontrolledState({checkedKeys:E},!1,{halfCheckedKeys:x})}m==null||m(y,C)}),M(et(n),"onNodeLoad",function(l){var s,u=l.key,c=n.state.keyEntities,f=un(c,u);if(!(f!=null&&(s=f.children)!==null&&s!==void 0&&s.length)){var p=new Promise(function(h,v){n.setState(function(g){var m=g.loadedKeys,b=m===void 0?[]:m,y=g.loadingKeys,C=y===void 0?[]:y,D=n.props,w=D.loadData,k=D.onLoad;if(!w||b.includes(u)||C.includes(u))return null;var E=w(l);return E.then(function(){var x=n.state.loadedKeys,A=so(x,u);k==null||k(A,{event:"load",node:l}),n.setUncontrolledState({loadedKeys:A}),n.setState(function(N){return{loadingKeys:Un(N.loadingKeys,u)}}),h()}).catch(function(x){if(n.setState(function(N){return{loadingKeys:Un(N.loadingKeys,u)}}),n.loadingRetryTimes[u]=(n.loadingRetryTimes[u]||0)+1,n.loadingRetryTimes[u]>=BM){var A=n.state.loadedKeys;lr(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:so(A,u)}),h()}v(x)}),{loadingKeys:so(C,u)}})});return p.catch(function(){}),p}}),M(et(n),"onNodeMouseEnter",function(l,s){var u=n.props.onMouseEnter;u==null||u({event:l,node:s})}),M(et(n),"onNodeMouseLeave",function(l,s){var u=n.props.onMouseLeave;u==null||u({event:l,node:s})}),M(et(n),"onNodeContextMenu",function(l,s){var u=n.props.onRightClick;u&&(l.preventDefault(),u({event:l,node:s}))}),M(et(n),"onFocus",function(){var l=n.props.onFocus;n.setState({focused:!0});for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];l==null||l.apply(void 0,u)}),M(et(n),"onBlur",function(){var l=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];l==null||l.apply(void 0,u)}),M(et(n),"getTreeNodeRequiredProps",function(){var l=n.state,s=l.expandedKeys,u=l.selectedKeys,c=l.loadedKeys,f=l.loadingKeys,p=l.checkedKeys,h=l.halfCheckedKeys,v=l.dragOverNodeKey,g=l.dropPosition,m=l.keyEntities;return{expandedKeys:s||[],selectedKeys:u||[],loadedKeys:c||[],loadingKeys:f||[],checkedKeys:p||[],halfCheckedKeys:h||[],dragOverNodeKey:v,dropPosition:g,keyEntities:m}}),M(et(n),"setExpandedKeys",function(l){var s=n.state,u=s.treeData,c=s.fieldNames,f=Yc(u,l,c);n.setUncontrolledState({expandedKeys:l,flattenNodes:f},!0)}),M(et(n),"onNodeExpand",function(l,s){var u=n.state.expandedKeys,c=n.state,f=c.listChanging,p=c.fieldNames,h=n.props,v=h.onExpand,g=h.loadData,m=s.expanded,b=s[p.key];if(!f){var y=u.includes(b),C=!m;if(lr(m&&y||!m&&!y,"Expand state not sync with index check"),u=C?so(u,b):Un(u,b),n.setExpandedKeys(u),v==null||v(u,{node:s,expanded:C,nativeEvent:l.nativeEvent}),C&&g){var D=n.onNodeLoad(s);D&&D.then(function(){var w=Yc(n.state.treeData,u,p);n.setUncontrolledState({flattenNodes:w})}).catch(function(){var w=n.state.expandedKeys,k=Un(w,b);n.setExpandedKeys(k)})}}}),M(et(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),M(et(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),M(et(n),"onActiveChange",function(l){var s=n.state.activeKey,u=n.props,c=u.onActiveChange,f=u.itemScrollOffset,p=f===void 0?0:f;s!==l&&(n.setState({activeKey:l}),l!==null&&n.scrollTo({key:l,offset:p}),c==null||c(l))}),M(et(n),"getActiveItem",function(){var l=n.state,s=l.activeKey,u=l.flattenNodes;return s===null?null:u.find(function(c){var f=c.key;return f===s})||null}),M(et(n),"offsetActiveKey",function(l){var s=n.state,u=s.flattenNodes,c=s.activeKey,f=u.findIndex(function(v){var g=v.key;return g===c});f===-1&&l<0&&(f=u.length),f=(f+l+u.length)%u.length;var p=u[f];if(p){var h=p.key;n.onActiveChange(h)}else n.onActiveChange(null)}),M(et(n),"onKeyDown",function(l){var s=n.state,u=s.activeKey,c=s.expandedKeys,f=s.checkedKeys,p=s.fieldNames,h=n.props,v=h.onKeyDown,g=h.checkable,m=h.selectable;switch(l.which){case rt.UP:{n.offsetActiveKey(-1),l.preventDefault();break}case rt.DOWN:{n.offsetActiveKey(1),l.preventDefault();break}}var b=n.getActiveItem();if(b&&b.data){var y=n.getTreeNodeRequiredProps(),C=b.data.isLeaf===!1||!!(b.data[p.children]||[]).length,D=wr(H(H({},_i(u,y)),{},{data:b.data,active:!0}));switch(l.which){case rt.LEFT:{C&&c.includes(u)?n.onNodeExpand({},D):b.parent&&n.onActiveChange(b.parent.key),l.preventDefault();break}case rt.RIGHT:{C&&!c.includes(u)?n.onNodeExpand({},D):b.children&&b.children.length&&n.onActiveChange(b.children[0].key),l.preventDefault();break}case rt.ENTER:case rt.SPACE:{g&&!D.disabled&&D.checkable!==!1&&!D.disableCheckbox?n.onNodeCheck({},D,!f.includes(u)):!g&&m&&!D.disabled&&D.selectable!==!1&&n.onNodeSelect({},D);break}}}v==null||v(l)}),M(et(n),"setUncontrolledState",function(l){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var c=!1,f=!0,p={};Object.keys(l).forEach(function(h){if(n.props.hasOwnProperty(h)){f=!1;return}c=!0,p[h]=l[h]}),c&&(!s||f)&&n.setState(H(H({},p),u))}}),M(et(n),"scrollTo",function(l){n.listRef.current.scrollTo(l)}),n}return br(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var n=this.props,o=n.activeKey,a=n.itemScrollOffset,i=a===void 0?0:a;o!==void 0&&o!==this.state.activeKey&&(this.setState({activeKey:o}),o!==null&&this.scrollTo({key:o,offset:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var n=this.state,o=n.focused,a=n.flattenNodes,i=n.keyEntities,l=n.draggingNodeKey,s=n.activeKey,u=n.dropLevelOffset,c=n.dropContainerKey,f=n.dropTargetKey,p=n.dropPosition,h=n.dragOverNodeKey,v=n.indent,g=this.props,m=g.prefixCls,b=g.className,y=g.style,C=g.showLine,D=g.focusable,w=g.tabIndex,k=w===void 0?0:w,E=g.selectable,x=g.showIcon,A=g.icon,N=g.switcherIcon,$=g.draggable,j=g.checkable,F=g.checkStrictly,B=g.disabled,S=g.motion,O=g.loadData,I=g.filterTreeNode,P=g.height,T=g.itemHeight,_=g.scrollWidth,X=g.virtual,L=g.titleRender,q=g.dropIndicatorRender,J=g.onContextMenu,ee=g.onScroll,z=g.direction,Y=g.rootClassName,V=g.rootStyle,G=Qn(this.props,{aria:!0,data:!0}),K;$&&(lt($)==="object"?K=$:typeof $=="function"?K={nodeDraggable:$}:K={});var W={prefixCls:m,selectable:E,showIcon:x,icon:A,switcherIcon:N,draggable:K,draggingNodeKey:l,checkable:j,checkStrictly:F,disabled:B,keyEntities:i,dropLevelOffset:u,dropContainerKey:c,dropTargetKey:f,dropPosition:p,dragOverNodeKey:h,indent:v,direction:z,dropIndicatorRender:q,loadData:O,filterTreeNode:I,titleRender:L,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return d.createElement(Sm.Provider,{value:W},d.createElement("div",{className:de(m,b,Y,M(M(M({},"".concat(m,"-show-line"),C),"".concat(m,"-focused"),o),"".concat(m,"-active-focused"),s!==null)),style:V},d.createElement($M,Te({ref:this.listRef,prefixCls:m,style:y,data:a,disabled:B,selectable:E,checkable:!!j,motion:S,dragging:l!==null,height:P,itemHeight:T,virtual:X,focusable:D,focused:o,tabIndex:k,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:J,onScroll:ee,scrollWidth:_},this.getTreeNodeRequiredProps(),G))))}}],[{key:"getDerivedStateFromProps",value:function(n,o){var a=o.prevProps,i={prevProps:n};function l(k){return!a&&n.hasOwnProperty(k)||a&&a[k]!==n[k]}var s,u=o.fieldNames;if(l("fieldNames")&&(u=Ja(n.fieldNames),i.fieldNames=u),l("treeData")?s=n.treeData:l("children")&&(lr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),s=Ux(n.children)),s){i.treeData=s;var c=bm(s,{fieldNames:u});i.keyEntities=H(M({},aa,$w),c.keyEntities)}var f=i.keyEntities||o.keyEntities;if(l("expandedKeys")||a&&l("autoExpandParent"))i.expandedKeys=n.autoExpandParent||!a&&n.defaultExpandParent?qf(n.expandedKeys,f):n.expandedKeys;else if(!a&&n.defaultExpandAll){var p=H({},f);delete p[aa];var h=[];Object.keys(p).forEach(function(k){var E=p[k];E.children&&E.children.length&&h.push(E.key)}),i.expandedKeys=h}else!a&&n.defaultExpandedKeys&&(i.expandedKeys=n.autoExpandParent||n.defaultExpandParent?qf(n.defaultExpandedKeys,f):n.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,s||i.expandedKeys){var v=Yc(s||o.treeData,i.expandedKeys||o.expandedKeys,u);i.flattenNodes=v}if(n.selectable&&(l("selectedKeys")?i.selectedKeys=lb(n.selectedKeys,n):!a&&n.defaultSelectedKeys&&(i.selectedKeys=lb(n.defaultSelectedKeys,n))),n.checkable){var g;if(l("checkedKeys")?g=Jc(n.checkedKeys)||{}:!a&&n.defaultCheckedKeys?g=Jc(n.defaultCheckedKeys)||{}:s&&(g=Jc(n.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),g){var m=g,b=m.checkedKeys,y=b===void 0?[]:b,C=m.halfCheckedKeys,D=C===void 0?[]:C;if(!n.checkStrictly){var w=ja(y,!0,f);y=w.checkedKeys,D=w.halfCheckedKeys}i.checkedKeys=y,i.halfCheckedKeys=D}}return l("loadedKeys")&&(i.loadedKeys=n.loadedKeys),i}}]),r})(d.Component);M(Bm,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:yM,allowDrop:function(){return!0},expandAction:!1});M(Bm,"TreeNode",hl);const OM=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:a,controlItemBgHover:i})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${o}`,content:'""',borderRadius:a},"&:hover:before":{background:i}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&:before, &:hover:before":{background:r}}}}}),AM=new Vt("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),FM=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),PM=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${se(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),NM=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:i,nodeSelectedBg:l,nodeHoverBg:s,colorTextQuaternary:u,controlItemBgActiveDisabled:c}=t;return{[r]:Object.assign(Object.assign({},Br(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${r}-rtl ${r}-switcher_close ${r}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${r}-active-focused)`]:No(t),[`${r}-list-holder-inner`]:{alignItems:"flex-start"},[`&${r}-block-node`]:{[`${r}-list-holder-inner`]:{alignItems:"stretch",[`${r}-node-content-wrapper`]:{flex:"auto"},[`${n}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:AM,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:se(a),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:o},[`&-disabled ${r}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${r}-checkbox-disabled + ${r}-node-selected,&${n}-disabled${n}-selected ${r}-node-content-wrapper`]:{backgroundColor:c},[`${r}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${n}-disabled)`]:{[`${r}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${r}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${n}-disabled).filter-node ${r}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${r}-draggable-icon`]:{flexShrink:0,width:a,textAlign:"center",visibility:"visible",color:u},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},[`${r}-draggable-icon`]:{visibility:"hidden"},[`${r}-switcher, ${r}-checkbox`]:{marginInlineEnd:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},FM(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:a,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:a,height:a,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${r}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${r}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},PM(e,t)),{"&:hover":{backgroundColor:s},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${r}-iconEle`]:{display:"inline-block",width:a,height:a,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${r}-unselectable ${r}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${r}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${r}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${n}-leaf-last ${r}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${se(t.calc(a).div(2).equal())} !important`}})}},jM=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),i=er(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[NM(e,i),r&&OM(i)].filter(Boolean)},IM=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,o=t;return{titleHeight:o,indentSize:o,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},RM=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},IM(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},TM=Hr("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:Gx(`${t}-checkbox`,e)},jM(t,e),kC(e)],RM),mb=4;function MM(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,i=a==="ltr"?"left":"right",l=a==="ltr"?"right":"left",s={[i]:-r*o+mb,[l]:0};switch(t){case-1:s.top=-3;break;case 1:s.bottom=-3;break;default:s.bottom=-3,s[i]=o+mb;break}return Q.createElement("div",{style:s,className:`${n}-drop-indicator`})}const zM=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:i,switcherLoadingIcon:l}=e,{isLeaf:s,expanded:u,loading:c}=a;if(c)return d.isValidElement(l)?l:d.createElement(Lp,{className:`${n}-switcher-loading-icon`});let f;if(i&&typeof i=="object"&&(f=i.showLeafIcon),s){if(!i)return null;if(typeof f!="boolean"&&f){const v=typeof f=="function"?f(a):f,g=`${n}-switcher-line-custom-icon`;return d.isValidElement(v)?eo(v,{className:de((t=v.props)===null||t===void 0?void 0:t.className,g)}):v}return f?d.createElement(sw,{className:`${n}-switcher-line-icon`}):d.createElement("span",{className:`${n}-switcher-leaf-line`})}const p=`${n}-switcher-icon`,h=typeof o=="function"?o(a):o;return d.isValidElement(h)?eo(h,{className:de((r=h.props)===null||r===void 0?void 0:r.className,p)}):h!==void 0?h:i?u?d.createElement(WT,{className:`${n}-switcher-line-icon`}):d.createElement(VT,{className:`${n}-switcher-line-icon`}):d.createElement(CT,{className:p})},Bw=Q.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:i}=Q.useContext(Zt),{prefixCls:l,className:s,showIcon:u=!1,showLine:c,switcherIcon:f,switcherLoadingIcon:p,blockNode:h=!1,children:v,checkable:g=!1,selectable:m=!0,draggable:b,motion:y,style:C}=e,D=n("tree",l),w=n(),k=y??Object.assign(Object.assign({},yC(w)),{motionAppear:!1}),E=Object.assign(Object.assign({},e),{checkable:g,selectable:m,showIcon:u,motion:k,blockNode:h,showLine:!!c,dropIndicatorRender:MM}),[x,A,N]=TM(D),[,$]=Yr(),j=$.paddingXS/2+(((r=$.Tree)===null||r===void 0?void 0:r.titleHeight)||$.controlHeightSM),F=Q.useMemo(()=>{if(!b)return!1;let S={};switch(typeof b){case"function":S.nodeDraggable=b;break;case"object":S=Object.assign({},b);break}return S.icon!==!1&&(S.icon=S.icon||Q.createElement(_T,null)),S},[b]),B=S=>Q.createElement(zM,{prefixCls:D,switcherIcon:f,switcherLoadingIcon:p,treeNodeProps:S,showLine:c});return x(Q.createElement(Bm,Object.assign({itemHeight:j,ref:t,virtual:a},E,{style:Object.assign(Object.assign({},i==null?void 0:i.style),C),prefixCls:D,className:de({[`${D}-icon-hide`]:!u,[`${D}-block-node`]:h,[`${D}-unselectable`]:!m,[`${D}-rtl`]:o==="rtl"},i==null?void 0:i.className,s,A,N),direction:o,checkable:g&&Q.createElement("span",{className:`${D}-checkbox-inner`}),selectable:m,switcherIcon:B,draggable:F}),v))}),hb=0,Qc=1,gb=2;function Om(e,t,r){const{key:n,children:o}=r;function a(i){const l=i[n],s=i[o];t(l,i)!==!1&&Om(s||[],t,r)}e.forEach(a)}function _M({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let i=hb;if(r&&r===n)return[r];if(!r||!n)return[];function l(s){return s===r||s===n}return Om(e,s=>{if(i===gb)return!1;if(l(s)){if(a.push(s),i===hb)i=Qc;else if(i===Qc)return i=gb,!1}else i===Qc&&a.push(s);return t.includes(s)},Ja(o)),a}function ed(e,t,r){const n=je(t),o=[];return Om(e,(a,i)=>{const l=n.indexOf(a);return l!==-1&&(o.push(i),n.splice(l,1)),!!n.length},Ja(r)),o}var vb=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function LM(e){const{isLeaf:t,expanded:r}=e;return t?d.createElement(sw,null):r?d.createElement(jT,null):d.createElement(TT,null)}function bb({treeData:e,children:t}){return e||Ux(t)}const HM=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=vb(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const i=d.useRef(null),l=d.useRef(null),s=()=>{const{keyEntities:x}=bm(bb(a));let A;return r?A=Object.keys(x):n?A=qf(a.expandedKeys||o||[],x):A=a.expandedKeys||o||[],A},[u,c]=d.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[f,p]=d.useState(()=>s());d.useEffect(()=>{"selectedKeys"in a&&c(a.selectedKeys)},[a.selectedKeys]),d.useEffect(()=>{"expandedKeys"in a&&p(a.expandedKeys)},[a.expandedKeys]);const h=(x,A)=>{var N;return"expandedKeys"in a||p(x),(N=a.onExpand)===null||N===void 0?void 0:N.call(a,x,A)},v=(x,A)=>{var N;const{multiple:$,fieldNames:j}=a,{node:F,nativeEvent:B}=A,{key:S=""}=F,O=bb(a),I=Object.assign(Object.assign({},A),{selected:!0}),P=(B==null?void 0:B.ctrlKey)||(B==null?void 0:B.metaKey),T=B==null?void 0:B.shiftKey;let _;$&&P?(_=x,i.current=S,l.current=_,I.selectedNodes=ed(O,_,j)):$&&T?(_=Array.from(new Set([].concat(je(l.current||[]),je(_M({treeData:O,expandedKeys:f,startKey:S,endKey:i.current,fieldNames:j}))))),I.selectedNodes=ed(O,_,j)):(_=[S],i.current=S,l.current=_,I.selectedNodes=ed(O,_,j)),(N=a.onSelect)===null||N===void 0||N.call(a,_,I),"selectedKeys"in a||c(_)},{getPrefixCls:g,direction:m}=d.useContext(Zt),{prefixCls:b,className:y,showIcon:C=!0,expandAction:D="click"}=a,w=vb(a,["prefixCls","className","showIcon","expandAction"]),k=g("tree",b),E=de(`${k}-directory`,{[`${k}-directory-rtl`]:m==="rtl"},y);return d.createElement(Bw,Object.assign({icon:LM,ref:t,blockNode:!0},w,{showIcon:C,expandAction:D,prefixCls:k,className:E,expandedKeys:f,selectedKeys:u,onSelect:v,onExpand:h}))},WM=d.forwardRef(HM),Am=Bw;Am.DirectoryTree=WM;Am.TreeNode=hl;const yb=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:a}=e;return r?d.createElement("div",{className:`${n}-filter-dropdown-search`},d.createElement(jR,{prefix:d.createElement(sx,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},KM=e=>{const{keyCode:t}=e;t===rt.ENTER&&e.stopPropagation()},qM=d.forwardRef((e,t)=>d.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:KM,ref:t},e.children));function Ia(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(je(t),je(Ia(n))))}),t}function VM(e){return e.some(({children:t})=>t)}function Ow(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function Aw({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((i,l)=>{const s=String(i.value);if(i.children)return{key:s||l,label:i.text,popupClassName:`${t}-dropdown-submenu`,children:Aw({filters:i.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const u=n?Qa:Sl,c={key:i.value!==void 0?s:l,label:d.createElement(d.Fragment,null,d.createElement(u,{checked:r.includes(s)}),d.createElement("span",null,i.text))};return o.trim()?typeof a=="function"?a(o,i)?c:null:Ow(o,i.text)?c:null:c})}function td(e){return e||[]}const UM=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:i,column:l,dropdownPrefixCls:s,columnKey:u,filterOnClose:c,filterMultiple:f,filterMode:p="menu",filterSearch:h=!1,filterState:v,triggerFilter:g,locale:m,children:b,getPopupContainer:y,rootClassName:C}=e,{filterResetToDefaultFilteredValue:D,defaultFilteredValue:w,filterDropdownProps:k={},filterDropdownOpen:E,filterDropdownVisible:x,onFilterDropdownVisibleChange:A,onFilterDropdownOpenChange:N}=l,[$,j]=d.useState(!1),F=!!(v&&(!((t=v.filteredKeys)===null||t===void 0)&&t.length||v.forceFiltered)),B=me=>{var ge;j(me),(ge=k.onOpenChange)===null||ge===void 0||ge.call(k,me),N==null||N(me),A==null||A(me)},S=(o=(n=(r=k.open)!==null&&r!==void 0?r:E)!==null&&n!==void 0?n:x)!==null&&o!==void 0?o:$,O=v==null?void 0:v.filteredKeys,[I,P]=bM(td(O)),T=({selectedKeys:me})=>{P(me)},_=(me,{node:ge,checked:ye})=>{T(f?{selectedKeys:me}:{selectedKeys:ye&&ge.key?[ge.key]:[]})};d.useEffect(()=>{$&&T({selectedKeys:td(O)})},[O]);const[X,L]=d.useState([]),q=me=>{L(me)},[J,ee]=d.useState(""),z=me=>{const{value:ge}=me.target;ee(ge)};d.useEffect(()=>{$||ee("")},[$]);const Y=me=>{const ge=me!=null&&me.length?me:null;if(ge===null&&(!v||!v.filteredKeys)||Jn(ge,v==null?void 0:v.filteredKeys,!0))return null;g({column:l,key:u,filteredKeys:ge})},V=()=>{B(!1),Y(I())},G=({confirm:me,closeDropdown:ge}={confirm:!1,closeDropdown:!1})=>{me&&Y([]),ge&&B(!1),ee(""),P(D?(w||[]).map(ye=>String(ye)):[])},K=({closeDropdown:me}={closeDropdown:!0})=>{me&&B(!1),Y(I())},W=(me,ge)=>{ge.source==="trigger"&&(me&&O!==void 0&&P(td(O)),B(me),!me&&!l.filterDropdown&&c&&V())},te=de({[`${s}-menu-without-submenu`]:!VM(l.filters||[])}),U=me=>{if(me.target.checked){const ge=Ia(l==null?void 0:l.filters).map(ye=>String(ye));P(ge)}else P([])},Z=({filters:me})=>(me||[]).map((ge,ye)=>{const Ce=String(ge.value),xe={title:ge.text,key:ge.value!==void 0?Ce:String(ye)};return ge.children&&(xe.children=Z({filters:ge.children})),xe}),re=me=>{var ge;return Object.assign(Object.assign({},me),{text:me.title,value:me.key,children:((ge=me.children)===null||ge===void 0?void 0:ge.map(ye=>re(ye)))||[]})};let ue;const{direction:he,renderEmpty:we}=d.useContext(Zt);if(typeof l.filterDropdown=="function")ue=l.filterDropdown({prefixCls:`${s}-custom`,setSelectedKeys:me=>T({selectedKeys:me}),selectedKeys:I(),confirm:K,clearFilters:G,filters:l.filters,visible:S,close:()=>{B(!1)}});else if(l.filterDropdown)ue=l.filterDropdown;else{const me=I()||[],ge=()=>{var Ce,xe;const Ae=(Ce=we==null?void 0:we("Table.filter"))!==null&&Ce!==void 0?Ce:d.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE,description:m.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((l.filters||[]).length===0)return Ae;if(p==="tree")return d.createElement(d.Fragment,null,d.createElement(yb,{filterSearch:h,value:J,onChange:z,tablePrefixCls:a,locale:m}),d.createElement("div",{className:`${a}-filter-dropdown-tree`},f?d.createElement(Qa,{checked:me.length===Ia(l.filters).length,indeterminate:me.length>0&&me.length<Ia(l.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:U},(xe=m==null?void 0:m.filterCheckall)!==null&&xe!==void 0?xe:m==null?void 0:m.filterCheckAll):null,d.createElement(Am,{checkable:!0,selectable:!1,blockNode:!0,multiple:f,checkStrictly:!f,className:`${s}-menu`,onCheck:_,checkedKeys:me,selectedKeys:me,showIcon:!1,treeData:Z({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:J.trim()?_e=>typeof h=="function"?h(J,re(_e)):Ow(J,_e.title):void 0})));const ke=Aw({filters:l.filters||[],filterSearch:h,prefixCls:i,filteredKeys:I(),filterMultiple:f,searchValue:J}),We=ke.every(_e=>_e===null);return d.createElement(d.Fragment,null,d.createElement(yb,{filterSearch:h,value:J,onChange:z,tablePrefixCls:a,locale:m}),We?Ae:d.createElement(ui,{selectable:!0,multiple:f,prefixCls:`${s}-menu`,className:te,onSelect:T,onDeselect:T,selectedKeys:me,getPopupContainer:y,openKeys:X,onOpenChange:q,items:ke}))},ye=()=>D?Jn((w||[]).map(Ce=>String(Ce)),me,!0):me.length===0;ue=d.createElement(d.Fragment,null,ge(),d.createElement("div",{className:`${i}-dropdown-btns`},d.createElement(Ya,{type:"link",size:"small",disabled:ye(),onClick:()=>G()},m.filterReset),d.createElement(Ya,{type:"primary",size:"small",onClick:V},m.filterConfirm)))}l.filterDropdown&&(ue=d.createElement(Rx,{selectable:void 0},ue)),ue=d.createElement(qM,{className:`${i}-dropdown`},ue);const Ne=TC({trigger:["click"],placement:he==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let me;return typeof l.filterIcon=="function"?me=l.filterIcon(F):l.filterIcon?me=l.filterIcon:me=d.createElement(FT,null),d.createElement("span",{role:"button",tabIndex:-1,className:de(`${i}-trigger`,{active:F}),onClick:ge=>{ge.stopPropagation()}},me)})(),getPopupContainer:y},Object.assign(Object.assign({},k),{rootClassName:de(C,k.rootClassName),open:S,onOpenChange:W,popupRender:()=>typeof(k==null?void 0:k.dropdownRender)=="function"?k.dropdownRender(ue):ue}));return d.createElement("div",{className:`${i}-column`},d.createElement("span",{className:`${a}-column-title`},b),d.createElement(ym,Object.assign({},Ne)))},Yf=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var i;const l=pi(a,r),s=o.filterDropdown!==void 0;if(o.filters||s||"onFilter"in o)if("filteredValue"in o){let u=o.filteredValue;s||(u=(i=u==null?void 0:u.map(String))!==null&&i!==void 0?i:u),n.push({column:o,key:jo(o,l),filteredKeys:u,forceFiltered:o.filtered})}else n.push({column:o,key:jo(o,l),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(je(n),je(Yf(o.children,t,l))))}),n};function Fw(e,t,r,n,o,a,i,l,s){return r.map((u,c)=>{const f=pi(c,l),{filterOnClose:p=!0,filterMultiple:h=!0,filterMode:v,filterSearch:g}=u;let m=u;if(m.filters||m.filterDropdown){const b=jo(m,f),y=n.find(({key:C})=>b===C);m=Object.assign(Object.assign({},m),{title:C=>d.createElement(UM,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:m,columnKey:b,filterState:y,filterOnClose:p,filterMultiple:h,filterMode:v,filterSearch:g,triggerFilter:a,locale:o,getPopupContainer:i,rootClassName:s},Lu(u.title,C))})}return"children"in m&&(m=Object.assign(Object.assign({},m),{children:Fw(e,t,m.children,n,o,a,i,f,s)})),m})}const Cb=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const a=r,{filters:i,filterDropdown:l}=o;if(l)t[a]=n||null;else if(Array.isArray(n)){const s=Ia(i);t[a]=s.filter(u=>n.includes(String(u)))}else t[a]=null}),t},Zf=(e,t,r)=>t.reduce((n,o)=>{const{column:{onFilter:a,filters:i},filteredKeys:l}=o;return a&&l&&l.length?n.map(s=>Object.assign({},s)).filter(s=>l.some(u=>{const c=Ia(i),f=c.findIndex(h=>String(h)===String(u)),p=f!==-1?c[f]:u;return s[r]&&(s[r]=Zf(s[r],t,r)),a(p,s)})):n},e),Pw=e=>e.flatMap(t=>"children"in t?[t].concat(je(Pw(t.children||[]))):[t]),XM=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:i,rootClassName:l}=e;oi();const s=d.useMemo(()=>Pw(n||[]),[n]),[u,c]=d.useState(()=>Yf(s,!0)),f=d.useMemo(()=>{const v=Yf(s,!1);if(v.length===0)return v;let g=!0;if(v.forEach(({filteredKeys:m})=>{m!==void 0&&(g=!1)}),g){const m=(s||[]).map((b,y)=>jo(b,pi(y)));return u.filter(({key:b})=>m.includes(b)).map(b=>{const y=s[m.findIndex(C=>C===b.key)];return Object.assign(Object.assign({},b),{column:Object.assign(Object.assign({},b.column),y),forceFiltered:y.filtered})})}return v},[s,u]),p=d.useMemo(()=>Cb(f),[f]),h=v=>{const g=f.filter(({key:m})=>m!==v.key);g.push(v),c(g),o(Cb(g),g)};return[v=>Fw(t,r,v,f,i,h,a,void 0,l),f,p]},GM=(e,t,r)=>{const n=d.useRef({});function o(a){var i;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let l=function(u){u.forEach((c,f)=>{const p=r(c,f);s.set(p,c),c&&typeof c=="object"&&t in c&&l(c[t]||[])})};const s=new Map;l(e),n.current={data:e,childrenColumnName:t,kvMap:s,getRowKey:r}}return(i=n.current.kvMap)===null||i===void 0?void 0:i.get(a)}return[o]};var YM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Nw=10;function ZM(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(n=>{const o=e[n];typeof o!="function"&&(r[n]=o)}),r}function JM(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=YM(n,["total"]),[i,l]=xt(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:Nw})),s=TC(i,a,{total:o>0?o:e}),u=Math.ceil((o||e)/s.pageSize);s.current>u&&(s.current=u||1);const c=(p,h)=>{l({current:p??1,pageSize:h||s.pageSize})},f=(p,h)=>{var v;r&&((v=r.onChange)===null||v===void 0||v.call(r,p,h)),c(p,h),t(p,h||(s==null?void 0:s.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},s),{onChange:f}),c]}const ys="ascend",rd="descend",Zs=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,xb=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,QM=(e,t)=>t?e[e.indexOf(t)+1]:e[0],Jf=(e,t,r)=>{let n=[];const o=(a,i)=>{n.push({column:a,key:jo(a,i),multiplePriority:Zs(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,i)=>{const l=pi(i,r);a.children?("sortOrder"in a&&o(a,l),n=[].concat(je(n),je(Jf(a.children,t,l)))):a.sorter&&("sortOrder"in a?o(a,l):t&&a.defaultSortOrder&&n.push({column:a,key:jo(a,l),multiplePriority:Zs(a),sortOrder:a.defaultSortOrder}))}),n},jw=(e,t,r,n,o,a,i,l)=>(t||[]).map((s,u)=>{const c=pi(u,l);let f=s;if(f.sorter){const p=f.sortDirections||o,h=f.showSorterTooltip===void 0?i:f.showSorterTooltip,v=jo(f,c),g=r.find(({key:x})=>x===v),m=g?g.sortOrder:null,b=QM(p,m);let y;if(s.sortIcon)y=s.sortIcon({sortOrder:m});else{const x=p.includes(ys)&&d.createElement(ST,{className:de(`${e}-column-sorter-up`,{active:m===ys})}),A=p.includes(rd)&&d.createElement(ET,{className:de(`${e}-column-sorter-down`,{active:m===rd})});y=d.createElement("span",{className:de(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(x&&A)})},d.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},x,A))}const{cancelSort:C,triggerAsc:D,triggerDesc:w}=a||{};let k=C;b===rd?k=w:b===ys&&(k=D);const E=typeof h=="object"?Object.assign({title:k},h):{title:k};f=Object.assign(Object.assign({},f),{className:de(f.className,{[`${e}-column-sort`]:m}),title:x=>{const A=`${e}-column-sorters`,N=d.createElement("span",{className:`${e}-column-title`},Lu(s.title,x)),$=d.createElement("div",{className:A},N,y);return h?typeof h!="boolean"&&(h==null?void 0:h.target)==="sorter-icon"?d.createElement("div",{className:`${A} ${e}-column-sorters-tooltip-target-sorter`},N,d.createElement(pl,Object.assign({},E),y)):d.createElement(pl,Object.assign({},E),$):$},onHeaderCell:x=>{var A;const N=((A=s.onHeaderCell)===null||A===void 0?void 0:A.call(s,x))||{},$=N.onClick,j=N.onKeyDown;N.onClick=S=>{n({column:s,key:v,sortOrder:b,multiplePriority:Zs(s)}),$==null||$(S)},N.onKeyDown=S=>{S.keyCode===rt.ENTER&&(n({column:s,key:v,sortOrder:b,multiplePriority:Zs(s)}),j==null||j(S))};const F=vM(s.title,{}),B=F==null?void 0:F.toString();return m&&(N["aria-sort"]=m==="ascend"?"ascending":"descending"),N["aria-label"]=B||"",N.className=de(N.className,`${e}-column-has-sorters`),N.tabIndex=0,s.ellipsis&&(N.title=(F??"").toString()),N}})}return"children"in f&&(f=Object.assign(Object.assign({},f),{children:jw(e,f.children,r,n,o,a,i,c)})),f}),wb=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},Eb=e=>{const t=e.filter(({sortOrder:r})=>r).map(wb);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},wb(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},Qf=(e,t,r)=>{const n=t.slice().sort((i,l)=>l.multiplePriority-i.multiplePriority),o=e.slice(),a=n.filter(({column:{sorter:i},sortOrder:l})=>xb(i)&&l);return a.length?o.sort((i,l)=>{for(let s=0;s<a.length;s+=1){const u=a[s],{column:{sorter:c},sortOrder:f}=u,p=xb(c);if(p&&f){const h=p(i,l,f);if(h!==0)return f===ys?h:-h}}return 0}).map(i=>{const l=i[r];return l?Object.assign(Object.assign({},i),{[r]:Qf(l,t,r)}):i}):o},e9=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:i}=e,[l,s]=d.useState(()=>Jf(r,!0)),u=(h,v)=>{const g=[];return h.forEach((m,b)=>{const y=pi(b,v);if(g.push(jo(m,y)),Array.isArray(m.children)){const C=u(m.children,y);g.push.apply(g,je(C))}}),g},c=d.useMemo(()=>{let h=!0;const v=Jf(r,!1);if(!v.length){const y=u(r);return l.filter(({key:C})=>y.includes(C))}const g=[];function m(y){h?g.push(y):g.push(Object.assign(Object.assign({},y),{sortOrder:null}))}let b=null;return v.forEach(y=>{b===null?(m(y),y.sortOrder&&(y.multiplePriority===!1?h=!1:b=!0)):(b&&y.multiplePriority!==!1||(h=!1),m(y))}),g},[r,l]),f=d.useMemo(()=>{var h,v;const g=c.map(({column:m,sortOrder:b})=>({column:m,order:b}));return{sortColumns:g,sortColumn:(h=g[0])===null||h===void 0?void 0:h.column,sortOrder:(v=g[0])===null||v===void 0?void 0:v.order}},[c]),p=h=>{let v;h.multiplePriority===!1||!c.length||c[0].multiplePriority===!1?v=[h]:v=[].concat(je(c.filter(({key:g})=>g!==h.key)),[h]),s(v),i(Eb(v),v)};return[h=>jw(t,h,c,p,n,o,a),c,f,()=>Eb(c)]},Iw=(e,t)=>e.map(r=>{const n=Object.assign({},r);return n.title=Lu(r.title,t),"children"in n&&(n.children=Iw(n.children,t)),n}),t9=e=>[d.useCallback(t=>Iw(t,e),[e])],r9=ww((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),n9=kw((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),o9=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:i,tablePaddingHorizontal:l,calc:s}=e,u=`${se(r)} ${n} ${o}`,c=(f,p,h)=>({[`&${t}-${f}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${se(s(p).mul(-1).equal())}
387
+ ${se(s(s(h).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:u,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:u,borderTop:u,[`
388
+ > ${t}-content,
389
+ > ${t}-header,
390
+ > ${t}-body,
391
+ > ${t}-summary
392
+ `]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:u},"> thead":{"> tr:not(:last-child) > th":{borderBottom:u},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:u}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${se(s(i).mul(-1).equal())} ${se(s(s(l).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:u,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`
393
+ > tr${t}-expanded-row,
394
+ > tr${t}-placeholder
395
+ `]:{"> th, > td":{borderInlineEnd:0}}}}}},c("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),c("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:u,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${se(r)} 0 ${se(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:u}}}},a9=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},sl),{wordBreak:"keep-all",[`
396
+ &${t}-cell-fix-left-last,
397
+ &${t}-cell-fix-right-first
398
+ `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},i9=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},l9=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:a,lineType:i,tableBorderColor:l,tableExpandIconBg:s,tableExpandColumnWidth:u,borderRadius:c,tablePaddingVertical:f,tablePaddingHorizontal:p,tableExpandedRowBg:h,paddingXXS:v,expandIconMarginTop:g,expandIconSize:m,expandIconHalfInner:b,expandIconScale:y,calc:C}=e,D=`${se(o)} ${i} ${l}`,w=C(v).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:u},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},xF(e)),{position:"relative",float:"left",width:m,height:m,color:"inherit",lineHeight:se(m),background:s,border:D,borderRadius:c,transform:`scale(${y})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:b,insetInlineEnd:w,insetInlineStart:w,height:o},"&::after":{top:w,bottom:w,insetInlineStart:b,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:g,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:h}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${se(C(f).mul(-1).equal())} ${se(C(p).mul(-1).equal())}`,padding:`${se(f)} ${se(p)}`}}}},s9=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:i,paddingXS:l,colorText:s,lineWidth:u,lineType:c,tableBorderColor:f,headerIconColor:p,fontSizeSM:h,tablePaddingHorizontal:v,borderRadius:g,motionDurationSlow:m,colorIcon:b,colorPrimary:y,tableHeaderFilterActiveBg:C,colorTextDisabled:D,tableFilterDropdownBg:w,tableFilterDropdownHeight:k,controlItemBgHover:E,controlItemBgActive:x,boxShadowSecondary:A,filterDropdownMenuBg:N,calc:$}=e,j=`${r}-dropdown`,F=`${t}-filter-dropdown`,B=`${r}-tree`,S=`${se(u)} ${c} ${f}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:$(i).mul(-1).equal(),marginInline:`${se(i)} ${se($(v).div(2).mul(-1).equal())}`,padding:`0 ${se(i)}`,color:p,fontSize:h,borderRadius:g,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:b,background:C},"&.active":{color:y}}}},{[`${r}-dropdown`]:{[F]:Object.assign(Object.assign({},Br(e)),{minWidth:o,backgroundColor:w,borderRadius:g,boxShadow:A,overflow:"hidden",[`${j}-menu`]:{maxHeight:k,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:N,"&:empty::after":{display:"block",padding:`${se(l)} 0`,color:D,fontSize:h,textAlign:"center",content:'"Not Found"'}},[`${F}-tree`]:{paddingBlock:`${se(l)} 0`,paddingInline:l,[B]:{padding:0},[`${B}-treenode ${B}-node-content-wrapper:hover`]:{backgroundColor:E},[`${B}-treenode-checkbox-checked ${B}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:x}}},[`${F}-search`]:{padding:l,borderBottom:S,"&-input":{input:{minWidth:a},[n]:{color:D}}},[`${F}-checkall`]:{width:"100%",marginBottom:i,marginInlineStart:i},[`${F}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${se($(l).sub(u).equal())} ${se(l)}`,overflow:"hidden",borderTop:S}})}},{[`${r}-dropdown ${F}, ${F}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:s},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},u9=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:a,tableBg:i,zIndexTableSticky:l,calc:s}=e,u=n;return{[`${t}-wrapper`]:{[`
399
+ ${t}-cell-fix-left,
400
+ ${t}-cell-fix-right
401
+ `]:{position:"sticky !important",zIndex:a,background:i},[`
402
+ ${t}-cell-fix-left-first::after,
403
+ ${t}-cell-fix-left-last::after
404
+ `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:s(r).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none",willChange:"transform"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`
405
+ ${t}-cell-fix-right-first::after,
406
+ ${t}-cell-fix-right-last::after
407
+ `]:{position:"absolute",top:0,bottom:s(r).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:s(l).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${u}`},[`
408
+ ${t}-cell-fix-left-first::after,
409
+ ${t}-cell-fix-left-last::after
410
+ `]:{boxShadow:`inset 10px 0 8px -8px ${u}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${u}`},[`
411
+ ${t}-cell-fix-right-first::after,
412
+ ${t}-cell-fix-right-last::after
413
+ `]:{boxShadow:`inset -10px 0 8px -8px ${u}`}},[`${t}-fixed-column-gapped`]:{[`
414
+ ${t}-cell-fix-left-first::after,
415
+ ${t}-cell-fix-left-last::after,
416
+ ${t}-cell-fix-right-first::after,
417
+ ${t}-cell-fix-right-last::after
418
+ `]:{boxShadow:"none"}}}}},c9=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${r}-pagination`]:{margin:`${se(n)} 0`},[`${t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},d9=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${se(r)} ${se(r)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:r,borderStartEndRadius:r,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:r},"> *:last-child":{borderStartEndRadius:r}}},"&-footer":{borderRadius:`0 0 ${se(r)} ${se(r)}`}}}}},f9=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},p9=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:a,paddingXS:i,headerIconColor:l,headerIconHoverColor:s,tableSelectionColumnWidth:u,tableSelectedRowBg:c,tableSelectedRowHoverBg:f,tableRowHoverBg:p,tablePaddingHorizontal:h,calc:v}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:u,[`&${t}-selection-col-with-dropdown`]:{width:v(u).add(o).add(v(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:v(u).add(v(i).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:v(u).add(o).add(v(a).div(4)).add(v(i).mul(2)).equal()}},[`
419
+ table tr th${t}-selection-column,
420
+ table tr td${t}-selection-column,
421
+ ${t}-selection-column
422
+ `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:v(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:se(v(h).div(4).equal()),[n]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:s}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:c,"&-row-hover":{background:f}}},[`> ${t}-cell-row-hover`]:{background:p}}}}}},m9=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,i,l,s)=>({[`${t}${t}-${a}`]:{fontSize:s,[`
423
+ ${t}-title,
424
+ ${t}-footer,
425
+ ${t}-cell,
426
+ ${t}-thead > tr > th,
427
+ ${t}-tbody > tr > th,
428
+ ${t}-tbody > tr > td,
429
+ tfoot > tr > th,
430
+ tfoot > tr > td
431
+ `]:{padding:`${se(i)} ${se(l)}`},[`${t}-filter-trigger`]:{marginInlineEnd:se(n(l).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${se(n(i).mul(-1).equal())} ${se(n(l).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:se(n(i).mul(-1).equal()),marginInline:`${se(n(r).sub(l).equal())} ${se(n(l).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:se(n(l).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},h9=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:o,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[`
432
+ &${t}-cell-fix-left:hover,
433
+ &${t}-cell-fix-right:hover
434
+ `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:r,color:o,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:n,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},g9=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:i,zIndexTableSticky:l,stickyScrollBarBorderRadius:s,lineWidth:u,lineType:c,tableBorderColor:f}=e,p=`${se(u)} ${c} ${f}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${se(a)} !important`,zIndex:l,display:"flex",alignItems:"center",background:i,borderTop:p,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:n,borderRadius:s,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},kb=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${se(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${se(o(r).mul(-1).equal())} 0 ${n}`}}}},v9=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:i}=e,l=`${se(n)} ${o} ${a}`,s=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`
435
+ & > ${t}-row,
436
+ & > div:not(${t}-row) > ${t}-row
437
+ `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:l,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${s}${s}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${se(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:l,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:l,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:i(n).mul(-1).equal(),borderInlineStart:l}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:l,borderBottom:l}}}}}},b9=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:i,lineType:l,tableBorderColor:s,tableFontSize:u,tableBg:c,tableRadius:f,tableHeaderTextColor:p,motionDurationMid:h,tableHeaderBg:v,tableHeaderCellSplitColor:g,tableFooterTextColor:m,tableFooterBg:b,calc:y}=e,C=`${se(i)} ${l} ${s}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},zs()),{[t]:Object.assign(Object.assign({},Br(e)),{fontSize:u,background:c,borderRadius:`${se(f)} ${se(f)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${se(f)} ${se(f)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
438
+ ${t}-cell,
439
+ ${t}-thead > tr > th,
440
+ ${t}-tbody > tr > th,
441
+ ${t}-tbody > tr > td,
442
+ tfoot > tr > th,
443
+ tfoot > tr > td
444
+ `]:{position:"relative",padding:`${se(n)} ${se(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${se(n)} ${se(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:p,fontWeight:r,textAlign:"start",background:v,borderBottom:C,transition:`background ${h} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:g,transform:"translateY(-50%)",transition:`background-color ${h}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${h}, border-color ${h}`,borderBottom:C,[`
445
+ > ${t}-wrapper:only-child,
446
+ > ${t}-expanded-row-fixed > ${t}-wrapper:only-child
447
+ `]:{[t]:{marginBlock:se(y(n).mul(-1).equal()),marginInline:`${se(y(a).sub(o).equal())}
448
+ ${se(y(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:p,fontWeight:r,textAlign:"start",background:v,borderBottom:C,transition:`background ${h} ease`}}},[`${t}-footer`]:{padding:`${se(n)} ${se(o)}`,color:m,background:b}})}},y9=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:i,controlItemBgActiveHover:l,padding:s,paddingSM:u,paddingXS:c,colorBorderSecondary:f,borderRadiusLG:p,controlHeight:h,colorTextPlaceholder:v,fontSize:g,fontSizeSM:m,lineHeight:b,lineWidth:y,colorIcon:C,colorIconHover:D,opacityLoading:w,controlInteractiveSize:k}=e,E=new Ht(o).onBackground(r).toHexString(),x=new Ht(a).onBackground(r).toHexString(),A=new Ht(t).onBackground(r).toHexString(),N=new Ht(C),$=new Ht(D),j=k/2-y,F=j*2+y*3;return{headerBg:A,headerColor:n,headerSortActiveBg:E,headerSortHoverBg:x,bodySortBg:A,rowHoverBg:A,rowSelectedBg:i,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:s,cellPaddingInline:s,cellPaddingBlockMD:u,cellPaddingInlineMD:c,cellPaddingBlockSM:c,cellPaddingInlineSM:c,borderColor:f,headerBorderRadius:p,footerBg:A,footerColor:n,cellFontSize:g,cellFontSizeMD:g,cellFontSizeSM:g,headerSplitColor:f,fixedHeaderSortActiveBg:E,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:h,stickyScrollBarBg:v,stickyScrollBarBorderRadius:100,expandIconMarginTop:(g*b-y*3)/2-Math.ceil((m*1.4-y*3)/2),headerIconColor:N.clone().setA(N.a*w).toRgbString(),headerIconHoverColor:$.clone().setA($.a*w).toRgbString(),expandIconHalfInner:j,expandIconSize:F,expandIconScale:k/F}},Db=2,C9=Hr("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:i,headerSortActiveBg:l,headerSortHoverBg:s,bodySortBg:u,rowHoverBg:c,rowSelectedBg:f,rowSelectedHoverBg:p,rowExpandedBg:h,cellPaddingBlock:v,cellPaddingInline:g,cellPaddingBlockMD:m,cellPaddingInlineMD:b,cellPaddingBlockSM:y,cellPaddingInlineSM:C,borderColor:D,footerBg:w,footerColor:k,headerBorderRadius:E,cellFontSize:x,cellFontSizeMD:A,cellFontSizeSM:N,headerSplitColor:$,fixedHeaderSortActiveBg:j,headerFilterHoverBg:F,filterDropdownBg:B,expandIconBg:S,selectionColumnWidth:O,stickyScrollBarBg:I,calc:P}=e,T=er(e,{tableFontSize:x,tableBg:n,tableRadius:E,tablePaddingVertical:v,tablePaddingHorizontal:g,tablePaddingVerticalMiddle:m,tablePaddingHorizontalMiddle:b,tablePaddingVerticalSmall:y,tablePaddingHorizontalSmall:C,tableBorderColor:D,tableHeaderTextColor:i,tableHeaderBg:a,tableFooterTextColor:k,tableFooterBg:w,tableHeaderCellSplitColor:$,tableHeaderSortBg:l,tableHeaderSortHoverBg:s,tableBodySortBg:u,tableFixedHeaderSortActiveBg:j,tableHeaderFilterActiveBg:F,tableFilterDropdownBg:B,tableRowHoverBg:c,tableSelectedRowBg:f,tableSelectedRowHoverBg:p,zIndexTableFixed:Db,zIndexTableSticky:P(Db).add(1).equal({unit:!1}),tableFontSizeMiddle:A,tableFontSizeSmall:N,tableSelectionColumnWidth:O,tableExpandIconBg:S,tableExpandColumnWidth:P(o).add(P(e.padding).mul(2)).equal(),tableExpandedRowBg:h,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:I,tableScrollThumbBgHover:t,tableScrollBg:r});return[b9(T),c9(T),kb(T),h9(T),s9(T),o9(T),d9(T),l9(T),kb(T),i9(T),p9(T),u9(T),g9(T),a9(T),m9(T),f9(T),v9(T)]},y9,{unitless:{expandIconScale:!0}}),x9=[],w9=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:i,style:l,size:s,bordered:u,dropdownPrefixCls:c,dataSource:f,pagination:p,rowSelection:h,rowKey:v="key",rowClassName:g,columns:m,children:b,childrenColumnName:y,onChange:C,getPopupContainer:D,loading:w,expandIcon:k,expandable:E,expandedRowRender:x,expandIconColumnIndex:A,indentSize:N,scroll:$,sortDirections:j,locale:F,showSorterTooltip:B={target:"full-header"},virtual:S}=e;oi();const O=d.useMemo(()=>m||km(b),[m,b]),I=d.useMemo(()=>O.some(Ye=>Ye.responsive),[O]),P=dx(I),T=d.useMemo(()=>{const Ye=new Set(Object.keys(P).filter(Ze=>P[Ze]));return O.filter(Ze=>!Ze.responsive||Ze.responsive.some(ot=>Ye.has(ot)))},[O,P]),_=fn(e,["className","style","columns"]),{locale:X=ra,direction:L,table:q,renderEmpty:J,getPrefixCls:ee,getPopupContainer:z}=d.useContext(Zt),Y=fa(s),V=Object.assign(Object.assign({},X.Table),F),G=f||x9,K=ee("table",o),W=ee("dropdown",c),[,te]=Yr(),U=bo(K),[Z,re,ue]=C9(K,U),he=Object.assign(Object.assign({childrenColumnName:y,expandIconColumnIndex:A},E),{expandIcon:(r=E==null?void 0:E.expandIcon)!==null&&r!==void 0?r:(n=q==null?void 0:q.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:we="children"}=he,Ne=d.useMemo(()=>G.some(Ye=>Ye==null?void 0:Ye[we])?"nest":x||E!=null&&E.expandedRowRender?"row":null,[G]),me={body:d.useRef(null)},ge=gM(K),ye=d.useRef(null),Ce=d.useRef(null);mM(t,()=>Object.assign(Object.assign({},Ce.current),{nativeElement:ye.current}));const xe=d.useMemo(()=>typeof v=="function"?v:Ye=>Ye==null?void 0:Ye[v],[v]),[Ae]=GM(G,we,xe),ke={},We=(Ye,Ze,ot=!1)=>{var ft,Nt,jt,It;const kt=Object.assign(Object.assign({},ke),Ye);ot&&((ft=ke.resetPagination)===null||ft===void 0||ft.call(ke),!((Nt=kt.pagination)===null||Nt===void 0)&&Nt.current&&(kt.pagination.current=1),p&&((jt=p.onChange)===null||jt===void 0||jt.call(p,1,(It=kt.pagination)===null||It===void 0?void 0:It.pageSize))),$&&$.scrollToFirstRowOnChange!==!1&&me.body.current&&$3(0,{getContainer:()=>me.body.current}),C==null||C(kt.pagination,kt.filters,kt.sorter,{currentDataSource:Zf(Qf(G,kt.sorterStates,we),kt.filterStates,we),action:Ze})},_e=(Ye,Ze)=>{We({sorter:Ye,sorterStates:Ze},"sort",!1)},[Pe,ve,Se,qe]=e9({prefixCls:K,mergedColumns:T,onSorterChange:_e,sortDirections:j||["ascend","descend"],tableLocale:V,showSorterTooltip:B}),Ge=d.useMemo(()=>Qf(G,ve,we),[G,ve]);ke.sorter=qe(),ke.sorterStates=ve;const Xe=(Ye,Ze)=>{We({filters:Ye,filterStates:Ze},"filter",!0)},[Ie,at,He]=XM({prefixCls:K,locale:V,dropdownPrefixCls:W,mergedColumns:T,onFilterChange:Xe,getPopupContainer:D||z,rootClassName:de(i,U)}),nt=Zf(Ge,at,we);ke.filters=He,ke.filterStates=at;const ht=d.useMemo(()=>{const Ye={};return Object.keys(He).forEach(Ze=>{He[Ze]!==null&&(Ye[Ze]=He[Ze])}),Object.assign(Object.assign({},Se),{filters:Ye})},[Se,He]),[At]=t9(ht),Et=(Ye,Ze)=>{We({pagination:Object.assign(Object.assign({},ke.pagination),{current:Ye,pageSize:Ze})},"paginate")},[gt,fe]=JM(nt.length,Et,p);ke.pagination=p===!1?{}:ZM(gt,p),ke.resetPagination=fe;const Oe=d.useMemo(()=>{if(p===!1||!gt.pageSize)return nt;const{current:Ye=1,total:Ze,pageSize:ot=Nw}=gt;return nt.length<Ze?nt.length>ot?nt.slice((Ye-1)*ot,Ye*ot):nt:nt.slice((Ye-1)*ot,Ye*ot)},[!!p,nt,gt==null?void 0:gt.current,gt==null?void 0:gt.pageSize,gt==null?void 0:gt.total]),[Me,Fe]=fM({prefixCls:K,data:nt,pageData:Oe,getRowKey:xe,getRecordByKey:Ae,expandType:Ne,childrenColumnName:we,locale:V,getPopupContainer:D||z},h),pe=(Ye,Ze,ot)=>{let ft;return typeof g=="function"?ft=de(g(Ye,Ze,ot)):ft=de(g),de({[`${K}-row-selected`]:Fe.has(xe(Ye,Ze))},ft)};he.__PARENT_RENDER_ICON__=he.expandIcon,he.expandIcon=he.expandIcon||k||hM(V),Ne==="nest"&&he.expandIconColumnIndex===void 0?he.expandIconColumnIndex=h?1:0:he.expandIconColumnIndex>0&&h&&(he.expandIconColumnIndex-=1),typeof he.indentSize!="number"&&(he.indentSize=typeof N=="number"?N:15);const Ee=d.useCallback(Ye=>At(Me(Ie(Pe(Ye)))),[Pe,Ie,Me]);let ie,oe;if(p!==!1&&(gt!=null&&gt.total)){let Ye;gt.size?Ye=gt.size:Ye=Y==="small"||Y==="middle"?"small":void 0;const Ze=Nt=>d.createElement(ow,Object.assign({},gt,{className:de(`${K}-pagination ${K}-pagination-${Nt}`,gt.className),size:Ye})),ot=L==="rtl"?"left":"right",{position:ft}=gt;if(ft!==null&&Array.isArray(ft)){const Nt=ft.find(kt=>kt.includes("top")),jt=ft.find(kt=>kt.includes("bottom")),It=ft.every(kt=>`${kt}`=="none");!Nt&&!jt&&!It&&(oe=Ze(ot)),Nt&&(ie=Ze(Nt.toLowerCase().replace("top",""))),jt&&(oe=Ze(jt.toLowerCase().replace("bottom","")))}else oe=Ze(ot)}let be;typeof w=="boolean"?be={spinning:w}:typeof w=="object"&&(be=Object.assign({spinning:!0},w));const le=de(ue,U,`${K}-wrapper`,q==null?void 0:q.className,{[`${K}-wrapper-rtl`]:L==="rtl"},a,i,re),ze=Object.assign(Object.assign({},q==null?void 0:q.style),l),Be=typeof(F==null?void 0:F.emptyText)<"u"?F.emptyText:(J==null?void 0:J("Table"))||d.createElement(rx,{componentName:"Table"}),Ke=S?n9:r9,st={},dt=d.useMemo(()=>{const{fontSize:Ye,lineHeight:Ze,lineWidth:ot,padding:ft,paddingXS:Nt,paddingSM:jt}=te,It=Math.floor(Ye*Ze);switch(Y){case"middle":return jt*2+It+ot;case"small":return Nt*2+It+ot;default:return ft*2+It+ot}},[te,Y]);return S&&(st.listItemHeight=dt),Z(d.createElement("div",{ref:ye,className:le,style:ze},d.createElement(Cm,Object.assign({spinning:!1},be),ie,d.createElement(Ke,Object.assign({},st,_,{ref:Ce,columns:T,direction:L,expandable:he,prefixCls:K,className:de({[`${K}-middle`]:Y==="middle",[`${K}-small`]:Y==="small",[`${K}-bordered`]:u,[`${K}-empty`]:G.length===0},ue,U,re),data:Oe,rowKey:xe,rowClassName:pe,emptyText:Be,internalHooks:Bl,internalRefs:me,transformColumns:Ee,getContainerWidth:ge})),oe)))},E9=d.forwardRef(w9),k9=(e,t)=>{const r=d.useRef(0);return r.current+=1,d.createElement(E9,Object.assign({},e,{ref:t,_renderTimes:r.current}))},yo=d.forwardRef(k9);yo.SELECTION_COLUMN=ko;yo.EXPAND_COLUMN=co;yo.SELECTION_ALL=Vf;yo.SELECTION_INVERT=Uf;yo.SELECTION_NONE=Xf;yo.Column=tM;yo.ColumnGroup=rM;yo.Summary=fw;const Rw=Q.forwardRef(({attributes:e,element:t,eventsEmit:r,onDataUpdate:n,dataSource:o,tagIndex:a},i)=>{var w;const[l,s]=xt(null),[u,c]=xt(!0),[f,p]=xt(1),[h,v]=xt(10);Ot(()=>{if(!l){if(!o){c(!0);try{const k=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(k)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const k=(o==null?void 0:o.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",k);let E=null,x=null,A;for(const j of k){const F=j==null?void 0:j.reply;if(!(F!=null&&F.databaseReference))continue;const B=F.databaseReference;console.log(B,"123123123jk123lk12j3l12jl3"),B!=null&&B.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",B.retrieveSqlData.filePath),A=B.retrieveSqlData.filePath);let S=B;if(typeof B=="string")try{S=JSON.parse(B)}catch{}if(!S)continue;const O=Array.isArray(S)?S:[S],I=O.findIndex(_=>(_==null?void 0:_.id)===t.id),P=I>=0?O[I]:null;if(console.log("~~~~~~~~~~~~~~~",P),P){E=P,x=P.retrieveSqlData||P.retrieve_table_data||P.retrieveTableData;break}const T=O.find(_=>{var X,L;return(((L=(X=_==null?void 0:_.retrieveSqlData)==null?void 0:X.preData)==null?void 0:L.length)||0)>0});!E&&T&&(E=T,x=T.retrieveSqlData||T.retrieve_table_data||T.retrieveTableData)}if(!E||!x){console.warn("No databaseReference with preData found for id:",t.id),c(!1);return}const N=Array.isArray(x==null?void 0:x.preData)?x.preData[0]:null;if(!N){console.warn("Matched item has no preData"),c(!1);return}const $={columns:(N.columns||[]).map(j=>({key:j.key,title:j.title})),rows:N.data||N.rows||[],total:(x==null?void 0:x.total)||0,fetchUrl:(x==null?void 0:x.fetchUrl)||"/index/knowledgeBase/file/stream",source:A||(x==null?void 0:x.source)||(E==null?void 0:E.source)};s($),c(!1)}catch(k){console.error("Init preData parsing failed:",k),c(!1)}}},[t.id,l,o]),Ot(()=>{const k=E=>{try{const x=(E==null?void 0:E.detail)||{},A=x==null?void 0:x.id;if(!A||String(A)!==String(t.id))return;const N=x.databaseReference;if(!N)return;let $=N;if(typeof N=="string")try{$=JSON.parse(N)}catch{}if(!$)return;const j=Array.isArray($)?$:[$],F=j.findIndex(P=>String(P==null?void 0:P.id)===String(t.id)),B=F>=0?j[F]:null;if(!B)return;const S=(B==null?void 0:B.retrieveSqlData)||(B==null?void 0:B.retrieve_table_data)||(B==null?void 0:B.retrieveTableData),O=Array.isArray(S==null?void 0:S.preData)?S.preData[0]:null;if(!O)return;const I={columns:(O.columns||[]).map(P=>({key:P.key,title:P.title})),rows:O.data||O.rows||[],total:(S==null?void 0:S.total)||0,fetchUrl:(S==null?void 0:S.fetchUrl)||"/index/knowledgeBase/file/stream",source:(B==null?void 0:B.source)||(S==null?void 0:S.source)};s(I),c(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",k),()=>{window.removeEventListener("retrieve-sql-data:data-response",k)}},[t.id]),Ot(()=>{n&&l&&n(l)},[l,n]);const g=k=>{if(!k||k.length===0)return[];const E=k.find(x=>x&&typeof x=="object")||{};return Object.keys(E).map(x=>({key:x,title:x}))},m=(k,E)=>{p(k),E&&v(E);const x=A=>{let N=null;if(A&&Array.isArray(A.columns)&&Array.isArray(A.rows))N={columns:A.columns,rows:A.rows,total:Number(A.total)||0,fetchUrl:A.fetchUrl||(l==null?void 0:l.fetchUrl)||"",source:A.source||(l==null?void 0:l.source)};else if(A&&Array.isArray(A.data)){const $=A.data;N={columns:l!=null&&l.columns&&l.columns.length>0?l.columns:g($),rows:$,total:Number(A.totalCount??A.total??(l==null?void 0:l.total)??$.length)||0,fetchUrl:(l==null?void 0:l.fetchUrl)||"",source:l==null?void 0:l.source},typeof A.currentPage=="number"&&p(A.currentPage),typeof A.pageSize=="number"&&v(A.pageSize)}else if(Array.isArray(A)){const $=A;N={columns:l!=null&&l.columns&&l.columns.length>0?l.columns:g($),rows:$,total:Number((l==null?void 0:l.total)??$.length)||0,fetchUrl:(l==null?void 0:l.fetchUrl)||"",source:l==null?void 0:l.source}}if(!N){console.warn("replacePredataFunction received unsupported data format:",A);return}console.log("Replacing table data with:",N),s(N)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:k,pageSize:E||h,fetchUrl:l==null?void 0:l.fetchUrl,total:l==null?void 0:l.total,source:l==null?void 0:l.source,replacePredataFunction:x})},b=k=>l!=null&&l.rows?Math.max(...l.rows.map(E=>{const x=E[k];return x?String(x).length:0})):0,y=(((w=l==null?void 0:l.columns)==null?void 0:w.length)||0)===1,C=(l==null?void 0:l.columns.map((k,E)=>({title:k.title||k.key,dataIndex:k.key,key:k.key,render:x=>{const A=x==null||x===""?"-":x;return y?ae.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(A)}):A},...y?{width:void 0}:{}})))||[],D=(l==null?void 0:l.rows.map((k,E)=>({key:E,...k})))||[];return ae.jsx("div",{...e,ref:i,className:"retrieve-sql-data-container my-4",children:u?ae.jsxs("div",{className:"flex items-center justify-center py-8",children:[ae.jsx(Cm,{size:"large"}),ae.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):l?ae.jsxs("div",{className:"retrieve-sql-data-content",children:[a!==null&&ae.jsxs("div",{className:"mb-2 flex items-center",children:[ae.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center",children:a}),ae.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]}),ae.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:ae.jsx(yo,{columns:C.map((k,E)=>({...k,...y?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:E===0?160:void 0,minWidth:120,maxWidth:E===0?180:300,fixed:E===0?"left":void 0,ellipsis:{showTitle:!0}},render:x=>{if(x==null)return"-";const A=String(x);if(y)return ae.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:A,children:A});const N=b(k.key);let $="200px";return E===0?$="80px":N<=8?$="100px":N<=15?$="150px":N<=25?$="200px":N<=40?$="250px":$="300px",ae.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:$,display:"inline-block",cursor:"default"},title:A,children:A})}})),dataSource:D,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:y?"100%":"1000px"},scroll:{x:y?void 0:"max-content",y:400}})}),l.total>h&&ae.jsx("div",{className:"flex justify-center mt-3",children:ae.jsx(ow,{current:f,pageSize:h,total:l.total,onChange:m,onShowSizeChange:m,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):ae.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});Rw.displayName="RetrieveSqlDataElement";const D9=e=>{var a,i,l,s,u,c,f,p;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return ae.jsx("div",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(a=t==null?void 0:t.text)==null?void 0:a.color} !important`,margin:"0 0 0.75rem 0"},children:n});case"heading-one":return ae.jsx("h1",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(i=t==null?void 0:t.text)==null?void 0:i.color} !important`},children:n});case"heading-two":return ae.jsx("h2",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(l=t==null?void 0:t.text)==null?void 0:l.color} !important`},children:n});case"heading-three":return ae.jsx("h3",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(s=t==null?void 0:t.text)==null?void 0:s.color} !important`},children:n});case"bulleted-list":return ae.jsx("ul",{...o,children:n});case"numbered-list":return ae.jsx("ol",{...o,children:n});case"list-item":return ae.jsx("li",{...o,children:n});case"table":return ae.jsx("div",{className:"table-container",children:ae.jsx("table",{...o,children:ae.jsx("tbody",{children:n})})});case"table-row":return ae.jsx("tr",{...o,children:n});case"table-cell":return r.header?ae.jsx("th",{...o,children:n}):ae.jsx("td",{...o,children:n});case"block-quote":return ae.jsx("blockquote",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(u=t==null?void 0:t.text)==null?void 0:u.color} !important`},children:n});case"code-block":return ae.jsx("pre",{...o,children:ae.jsx("code",{style:{color:`${(c=t==null?void 0:t.text)==null?void 0:c.color} !important`},children:n})});case"think":const h=e.extraProps||{},v=h.isCollapsed!==void 0?h.isCollapsed:Object.values(h)[1]===!0,g={...h,isCollapsed:v};return console.log("renderElement think case - fixed extraProps:",g),ae.jsx(OB,{attributes:o,styles:t,extraProps:g,children:n});case"template":return ae.jsx(r1,{...o,element:r,children:n,styles:t});case"retrieve-sql-data":const m=(b=>{if(!b)return null;try{const y=typeof b=="string"?JSON.parse(b):b;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(y)?y[0]:y}}]}}catch(y){return console.error("Failed to parse databaseReference:",y),null}})(((f=e.extraProps)==null?void 0:f.databaseReference)||e.databaseReference);return ae.jsx(Rw,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:m||void 0,tagIndex:1,onDataUpdate:b=>{var y;(y=e.eventsEmit)==null||y.call(e,"rtext_table_data_updated",{id:r.id,data:b})}});default:return ae.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(p=t==null?void 0:t.text)==null?void 0:p.color} !important`},children:n})}},S9=e=>{var i,l,s,u,c,f;const{attributes:t,children:r,leaf:n,styles:o}=e;(i=o==null?void 0:o.text)!=null&&i.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",o.text.color);let a=r;if(n.retrive){const p=n.fromtype==="0",h=n.fromtype==="1",v=n.text||"";let g=v,m="#e6f7ff",b="#1890ff",y="#bae7ff";return p?(g=`${v}`,m="#e6f7ff",b="#1890ff",y="#bae7ff"):h&&(g=`${v}`,m="#f6ffed",b="#52c41a",y="#d9f7be"),a=ae.jsx("span",{...t,style:{display:"inline-block",background:m,color:b,height:24,width:24,borderRadius:3,padding:"1px 9px",margin:"0 2px",fontWeight:600,fontSize:10,lineHeight:"22px",cursor:"pointer",verticalAlign:"middle"},onClick:()=>{e.onRetriveTagClick&&e.onRetriveTagClick(n,t)},onMouseEnter:C=>C.currentTarget.style.background=y,onMouseLeave:C=>C.currentTarget.style.background=m,children:g}),a}if(n.code)a=ae.jsx("code",{...t,style:{color:`${(l=o==null?void 0:o.text)==null?void 0:l.color} !important`},children:a});else{const p=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),h={color:`${(s=o==null?void 0:o.text)==null?void 0:s.color} !important`,fontSize:(u=o==null?void 0:o.text)==null?void 0:u.fontSize,lineHeight:(c=o==null?void 0:o.text)==null?void 0:c.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};a=ae.jsx("span",{...t,className:p,style:h,children:a})}return n.link&&(a=ae.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(f=o==null?void 0:o.text)==null?void 0:f.color} !important`},children:a})),a},nd=fr.div`
449
+
450
+
451
+ & > * + * {
452
+ margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
453
+ }
454
+
455
+ /* 标题样式 */
456
+ & h1 {
457
+ font-size: ${e=>e.$size==="sm"?"20px":"32px"};
458
+ font-weight: 600;
459
+ margin: 24px 0 16px 0;
460
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
461
+ border-bottom: 1px solid #d0d7de;
462
+ padding-bottom: 8px;
463
+ }
464
+
465
+ & h2 {
466
+ font-size: ${e=>e.$size==="sm"?"18px":"24px"};
467
+ font-weight: 600;
468
+ margin: 24px 0 16px 0;
469
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
470
+ border-bottom: 1px solid #d0d7de;
471
+ padding-bottom: 6px;
472
+ }
473
+
474
+ & h3 {
475
+ font-size: ${e=>e.$size==="sm"?"16px":"20px"};
476
+ font-weight: 600;
477
+ margin: 24px 0 16px 0;
478
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
479
+ }
480
+
481
+ /* 段落样式 */
482
+ & p {
483
+ font-size: ${e=>e.$size==="sm"?"14px":"16px"};
484
+ margin: 16px 0;
485
+ line-height: 1.6;
486
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
487
+ }
488
+
489
+ /* 列表样式 - GitHub 风格简约设计 */
490
+ & ul, & ol {
491
+ margin: 16px 0;
492
+ padding-left: 24px;
493
+ line-height: 1.6;
494
+ }
495
+
496
+ & ul {
497
+ list-style-type: disc;
498
+ }
499
+
500
+ & ol {
501
+ list-style-type: decimal;
502
+ }
503
+
504
+ & li {
505
+ margin: 4px 0;
506
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
507
+ }
508
+
509
+ /* 嵌套列表 */
510
+ & ul ul, & ol ol, & ul ol, & ol ul {
511
+ margin: 8px 0;
512
+ }
513
+
514
+ /* 引用块样式 */
515
+ & blockquote {
516
+ font-size: ${e=>e.$size==="sm"?"14px":"16px"};
517
+ border-left: 4px solid #d0d7de;
518
+ padding: 0 16px;
519
+ margin: 16px 0;
520
+ color: #656d76;
521
+ background-color: #f6f8fa;
522
+ }
523
+
524
+ /* 行内代码样式 */
525
+ & code {
526
+ font-size: 0.875em;
527
+ background-color: #f6f8fa;
528
+ padding: 0.125em 0.25em;
529
+ border-radius: 6px;
530
+ font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
531
+ color: #d73a49;
532
+ }
533
+
534
+ /* 代码块样式 */
535
+ & pre {
536
+ background-color: #f6f8fa;
537
+ padding: 16px;
538
+ border-radius: 6px;
539
+ overflow-x: auto;
540
+ margin: 16px 0;
541
+ border: 1px solid #d0d7de;
542
+ }
543
+
544
+ & pre code {
545
+ background-color: transparent;
546
+ padding: 0;
547
+ color: #24292f;
548
+ }
549
+
550
+ /* 表格样式 */
551
+ & table {
552
+ width: 100%;
553
+ border-collapse: collapse;
554
+ border: 1px solid #d0d7de;
555
+ margin: 16px 0;
556
+ }
557
+
558
+ & th, & td {
559
+ border: 1px solid #d0d7de;
560
+ padding: 8px 12px;
561
+ text-align: left;
562
+ }
563
+
564
+ & th {
565
+ background-color: #f6f8fa;
566
+ font-weight: 600;
567
+ }
568
+
569
+ & tr:nth-child(even) {
570
+ background-color: #f6f8fa;
571
+ }
572
+
573
+ /* 图片样式 */
574
+ & img {
575
+ max-width: 100%;
576
+ height: auto;
577
+ border-radius: 6px;
578
+ margin: 16px 0;
579
+ }
580
+
581
+ /* 链接样式 */
582
+ & a {
583
+ color: #0969da;
584
+ text-decoration: none;
585
+
586
+ &:hover {
587
+ text-decoration: underline;
588
+ }
589
+ }
590
+
591
+ /* 文本样式 */
592
+ & strong {
593
+ font-weight: 600;
594
+ }
595
+
596
+ & em {
597
+ font-style: italic;
598
+ }
599
+
600
+ & u {
601
+ text-decoration: underline;
602
+ }
603
+
604
+ & s {
605
+ text-decoration: line-through;
606
+ }
607
+
608
+ /* 分割线样式 */
609
+ & hr {
610
+ border: none;
611
+ border-top: 1px solid #d0d7de;
612
+ margin: 24px 0;
613
+ }
614
+
615
+ /* 思考容器样式 */
616
+ & .think-container {
617
+
618
+
619
+ }
620
+
621
+ & .think-header {
622
+
623
+ }
624
+
625
+ & .think-icon {
626
+
627
+ }
628
+
629
+ & .think-title {
630
+ font-weight: 600;
631
+ color: #24292f;
632
+ font-size: 14px;
633
+ }
634
+
635
+ & .think-text {
636
+ color: #86909C;
637
+ font-size: 14px;
638
+ line-height: 1.6;
639
+ }
640
+
641
+ /* 召回标签样式 */
642
+ & .retrive-tag {
643
+ display: inline-block;
644
+ background: #e6f7ff;
645
+ color: #1890ff;
646
+ border: 1px solid rgba(114, 187, 255, 0.3);
647
+ border-radius: 6px;
648
+ padding: 2px 6px;
649
+ margin: 0 2px;
650
+ font-weight: 500;
651
+ font-size: 12px;
652
+ line-height: 1.4;
653
+ cursor: pointer;
654
+ vertical-align: middle;
655
+ transition: background-color 0.2s ease;
656
+ }
657
+
658
+ & .retrive-tag:hover {
659
+ background: #bae7ff;
660
+ }
661
+ `;function Tw(e){return e.map(t=>!t.children||t.children.length===0?{...t,children:[{text:""}]}:{...t,children:t.children.map(r=>typeof r=="object"&&"type"in r?Tw([r])[0]:r)})}function Mw(e,t){const r=[];function n(u){var c;if(u.indexOf("<think>")>-1)if(u.indexOf("</think>")>-1){const f=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,p=u.match(f);return p?{thinkContent:p[1],content:p[2],finish:!0}:{thinkContent:"",content:u,finish:!0}}else{const f=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((c=u.match(f))==null?void 0:c[1])||"",content:""}}else return{thinkContent:"",content:u}}const{thinkContent:o,content:a,finish:i}=n(e||"");let l=[],s=0;if(!r.includes("think")&&o){const u=o.split(/\n+/).map(c=>c.trim()).filter(Boolean).flatMap(c=>{if(/<retrive-tag/i.test(c)){const f=document.createElement("div");return f.innerHTML=c,Sb(f)}else return[{type:"paragraph",children:[{text:c}]}]});l.push({type:"think",id:`think-${s++}`,thinkContent:o,finish:i,children:u})}if(a){let u=a;r.includes("retrive")||(u=u.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(f,p,h)=>`<retrive-tag${p?" "+p.trim():""}>${h}</retrive-tag>`)),r.includes("retrieve-sql-data")||(u=u.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(f,p)=>`<retrieve-sql-data id="${p}"></retrieve-sql-data>`)),Kt.setOptions({gfm:!0,breaks:!0,pedantic:!1});const c=Kt(u);if(typeof c=="string"){const f=document.createElement("div");f.innerHTML=c;const p=Sb(f);p&&p.length>0&&(l=l.concat(p))}}return!l||l.length===0?[{type:"paragraph",children:[{text:""}]}]:Tw(l)}function Sb(e){const t=[];return((r,n)=>(n.forEach(o=>{var a;if(o.nodeType===Node.ELEMENT_NODE){const i=o;switch(i.tagName.toLowerCase()){case"p":r.push({type:"paragraph",children:Nr(i)});break;case"h1":r.push({type:"heading-one",children:Nr(i)});break;case"h2":r.push({type:"heading-two",children:Nr(i)});break;case"h3":r.push({type:"heading-three",children:Nr(i)});break;case"ul":r.push({type:"bulleted-list",children:Array.from(i.children).map(s=>({type:"list-item",children:Nr(s)}))});break;case"ol":const l={type:"numbered-list",children:Array.from(i.children).map(s=>({type:"list-item",children:Nr(s)}))};r.push(l);break;case"li":r.push({type:"list-item",children:Nr(i)});break;case"pre":{const s=i.querySelector("code");s?r.push({type:"code-block",children:Nr(s)}):r.push({type:"code-block",children:Nr(i)});break}case"code":{i.closest("pre")||r.push({type:"paragraph",children:Nr(i)});break}case"retrive-tag":{const s=Nr(i);s.length>0&&r.push({type:"paragraph",children:s});break}case"retrieve-sql-data":{const s=i.getAttribute("id")||"";r.push({type:"retrieve-sql-data",id:s,children:[{text:""}]});break}case"blockquote":r.push({type:"block-quote",children:Nr(i)});break;case"table":r.push($9(i));break;case"think-block":r.push({type:"think",children:Nr(i)});break;default:r.push({type:"paragraph",children:Nr(i)});break}}else o.nodeType===Node.TEXT_NODE&&((a=o.textContent)!=null&&a.trim())&&r.push({type:"paragraph",children:[{text:o.textContent}]})}),r))(t,e.childNodes),t}function Nr(e){const t=[];function r(o){const a=[];let i="",l=!1,s=!1,u=0;for(;u<o.length;)o.startsWith("**",u)?(i&&(a.push({text:i,code:!0,bold:l,italic:s}),i=""),l=!l,u+=2):o.startsWith("*",u)?(i&&(a.push({text:i,code:!0,bold:l,italic:s}),i=""),s=!s,u+=1):(i+=o[u],u+=1);return i&&a.push({text:i,code:!0,bold:l,italic:s}),a}function n(o,a={}){var i,l;if(o.nodeType===Node.TEXT_NODE){const s=(i=o.textContent)==null?void 0:i.trim();return s?a.code?r(s):[{text:s,...a}]:[]}if(o.nodeType===Node.ELEMENT_NODE){const s=o,u={...a};switch(s.tagName.toLowerCase()){case"em":case"i":u.italic=!0;break;case"strong":case"b":u.bold=!0;break;case"code":s.closest("pre")||(u.code=!0);break;case"del":case"s":u.strikethrough=!0;break;case"u":u.underline=!0;break;case"a":u.link=s.getAttribute("href")||void 0;break;case"retrive-tag":{const f={};for(const{name:p,value:h}of Array.from(s.attributes))f[p]=h;return[{text:s.textContent||""||"[0]",retrive:!0,...f}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:s.getAttribute("id")||"",children:[{text:""}]}]}if(s.childNodes.length===0&&((l=s.textContent)!=null&&l.trim()))return u.code?r(s.textContent):[{text:s.textContent,...u}];let c=[];for(const f of Array.from(s.childNodes))c=c.concat(n(f,u));return c}return[]}for(const o of Array.from(e.childNodes))t.push(...n(o));return t}function $9(e){const t=[],r=e.querySelector("thead"),n=e.querySelector("tbody");if(!r&&!n){const o=Array.from(e.querySelectorAll("tr"));o.length>0&&(t.push({type:"table-row",children:Array.from(o[0].children).map(a=>({type:"table-cell",header:!0,children:Nr(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(i=>({type:"table-cell",header:!1,children:Nr(i)}))})}))}else{if(r){const o=r.querySelector("tr");o&&t.push({type:"table-row",children:Array.from(o.querySelectorAll("th")).map(a=>({type:"table-cell",header:!0,children:Nr(a)}))})}n&&Array.from(n.querySelectorAll("tr")).forEach(o=>{t.push({type:"table-row",children:Array.from(o.querySelectorAll("td")).map(a=>({type:"table-cell",header:!1,children:Nr(a)}))})})}return{type:"table",children:t}}const B9=fr.div`
662
+ border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
663
+ border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
664
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
665
+ min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
666
+ overflow: hidden;
667
+ transition: all 0.2s ease-in-out;
668
+
669
+ ${e=>{var t,r;return e.$isEditing&&`
670
+ &:focus-within {
671
+ border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
672
+ box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
673
+ }
674
+ `}}
675
+ `,od=fr.div`
676
+ padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
677
+ min-height: inherit;
678
+ outline: none;
679
+
680
+ & > * + * {
681
+ margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
682
+ }
683
+ `;var Js=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(Js||{});const Fm=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",size:n="sm",theme:o={},onChange:a,onFocus:i,onBlur:l,renderElement:s,renderLeaf:u,onRetriveTagClick:c,eventsEmit:f,extraProps:p={},className:h,style:v,styles:g,enableTemplateInput:m=!1,disabledTags:b=[]})=>{const y=Qs(),C=wt(()=>{var P,T,_,X,L,q,J,ee,z;return{primaryColor:((P=y==null?void 0:y.colors)==null?void 0:P.primary)||(o==null?void 0:o.primaryColor)||"#007bff",secondaryColor:((T=y==null?void 0:y.colors)==null?void 0:T.secondary)||(o==null?void 0:o.secondaryColor)||"#6c757d",backgroundColor:((_=y==null?void 0:y.colors)==null?void 0:_.background)||(o==null?void 0:o.backgroundColor)||"transparent",textColor:((X=y==null?void 0:y.colors)==null?void 0:X.text)||(o==null?void 0:o.textColor)||"#24292f",borderColor:((L=y==null?void 0:y.colors)==null?void 0:L.border)||(o==null?void 0:o.borderColor)||"#dee2e6",disabledBackground:((q=y==null?void 0:y.colors)==null?void 0:q.disabledBackground)||(o==null?void 0:o.disabledBackground)||"#f8f9fa",borderRadius:((J=y==null?void 0:y.space)==null?void 0:J.radius)||(o==null?void 0:o.borderRadius)||"4px",padding:((ee=y==null?void 0:y.space)==null?void 0:ee.padding)||(o==null?void 0:o.padding)||"0rem 1rem",margin:((z=y==null?void 0:y.space)==null?void 0:z.margin)||(o==null?void 0:o.margin)||"0.5rem",minHeight:(o==null?void 0:o.minHeight)||"200px",baseFontSize:(o==null?void 0:o.baseFontSize)||(n==="md"?14:12),...o}},[y,o,n]),D=Ve();if(!D.current){const P=BD(),T=H$(P),{isInline:_}=T;T.isInline=q=>!b.includes("template")&&q.type==="template"?!0:_(q);const{isVoid:X}=T;T.isVoid=q=>!b.includes("template")&&q.type==="template"?!0:X(q);const L=q=>{if(!(m&&!b.includes("template")))return q;const{insertText:J,insertData:ee}=q,z=()=>{const Y=/<template>([^<]*)<\/template>/g,V=Array.from(R.nodes(q,{match:G=>it.isText(G)&&Y.test(G.text)}));if(V.length!==0)for(const G of V){const[K,W]=G,te=K.text||"",U=[];let Z=0,re;for(Y.lastIndex=0;(re=Y.exec(te))!==null;){if(re.index>Z){const ue=te.slice(Z,re.index);ue&&U.push({text:ue})}U.push({type:"template",placeholder:(re[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),Z=re.index+re[0].length}if(Z<te.length){const ue=te.slice(Z);ue&&U.push({text:ue})}Re.removeNodes(q,{at:W}),Re.insertNodes(q,U,{at:W})}};return q.insertText=Y=>{J(Y),z()},q.insertData=Y=>{const V=Y.getData("text/plain");if(V&&/<template>[\s\S]*?<\/template>/.test(V)){J(V),z();return}return ee(Y)},q};D.current=L(T)}const w=D.current,[k,E]=xt(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[x,A]=xt(0);Ot(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const P=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",P),E(P),A(T=>T+1)}},[e.type,e.content]),Ot(()=>{e.type==="markdown"&&A(P=>P+1)},[e.type,e.content]),Ot(()=>{e.type==="markdown"&&A(P=>P+1)},[p]);const N=mt(P=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",P),P&&Array.isArray(P)?(E(P),a==null||a(P,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",P)},[a]),$=wt(()=>{const P=C==null?void 0:C.baseFontSize;return typeof P=="number"&&!Number.isNaN(P)?P:n==="md"?14:12},[C,n]),j=mt(P=>{const T={...P,size:n,styles:g,eventsEmit:f,extraProps:p};return s?s(T):D9(T)},[s,n,g,f,p]),F=mt(P=>{const T={...P,styles:g,onRetriveTagClick:c};return u?u(T):S9(T)},[u,g,c]);Ot(()=>(window.copyCodeFromData=P=>{const T=P.getAttribute("data-code");if(!T){console.error("No code content found");return}const _=T.replace(/\\n/g,`
684
+ `).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/&quot;/g,'"');navigator.clipboard.writeText(_).then(()=>{const X=P.innerHTML;P.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#2da44e" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20,6 9,17 4,12"></polyline></svg>',P.classList.add("copied"),setTimeout(()=>{P.innerHTML=X,P.classList.remove("copied")},2e3)}).catch(X=>{console.error("\u590D\u5236\u5931\u8D25:",X);const L=P.innerHTML;P.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',P.style.background="#d73a49",P.style.borderColor="#d73a49",P.style.color="white",setTimeout(()=>{P.innerHTML=L,P.style.background="",P.style.borderColor="",P.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const B=wt(()=>{if(e.type!=="markdown")return null;try{const P=Mw(e.content||"");if(P&&P.length>0)return ae.jsx(nd,{theme:C,$size:n,children:ae.jsx(vc,{editor:w,initialValue:P,onChange:()=>{},children:ae.jsx(od,{theme:C,children:ae.jsx(gc,{renderElement:j,renderLeaf:F,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${$}px`}})})},x)});const T={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let _=Kt(e.content||"",T);return _=_.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),_=_.replace(/<\/table>/g,"</table></div>"),_=_.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(X,L,q)=>{const J=q.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,"&quot;");return`<pre><code${L}>${q}</code><button class="code-copy-btn" data-code="${J}" onclick="copyCodeFromData(this)" title="\u590D\u5236\u4EE3\u7801"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></pre>`}),ae.jsx("div",{style:{padding:(C==null?void 0:C.padding)||"1rem",fontSize:`${$}px`,lineHeight:1.6,color:(C==null?void 0:C.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:_}})}catch(P){return console.error("Markdown parsing error:",P),ae.jsx("div",{children:e.content})}},[e,C,w,x,j,F,$]),S=wt(()=>e.type!=="html"?null:ae.jsx("div",{style:{padding:(C==null?void 0:C.padding)||"1rem",fontSize:`${$}px`,lineHeight:1.6,color:(C==null?void 0:C.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,C,$]),O=wt(()=>e.type!=="text"?null:ae.jsx("div",{style:{padding:(C==null?void 0:C.padding)||"1rem",fontSize:`${$}px`,lineHeight:1.6,color:(C==null?void 0:C.textColor)||"#24292f"},children:ae.jsx("span",{children:e.content||""})}),[e,C,$]),I=()=>{switch(e.type){case"markdown":return B;case"html":return S;case"text":return O;case"slate":default:return t?ae.jsx(nd,{theme:C,$size:n,children:ae.jsx(vc,{editor:w,initialValue:k,onChange:N,children:ae.jsx(od,{theme:C,children:ae.jsx(gc,{renderElement:j,renderLeaf:F,placeholder:r,readOnly:!1,onFocus:i,onBlur:l,style:{minHeight:"inherit",outline:"none",fontSize:`${$}px`}})})},x)}):ae.jsx(nd,{theme:C,$size:n,children:ae.jsx(vc,{editor:w,initialValue:k,onChange:()=>{},children:ae.jsx(od,{theme:C,children:ae.jsx(gc,{renderElement:j,renderLeaf:F,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${$}px`}})})},x)})}};return ae.jsx(B9,{theme:C,$isEditing:t,className:h,style:v,children:I()})};/**
685
+ * @license lucide-react v0.456.0 - ISC
686
+ *
687
+ * This source code is licensed under the ISC license.
688
+ * See the LICENSE file in the root directory of this source tree.
689
+ */const O9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zw=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
690
+ * @license lucide-react v0.456.0 - ISC
691
+ *
692
+ * This source code is licensed under the ISC license.
693
+ * See the LICENSE file in the root directory of this source tree.
694
+ */var A9={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
695
+ * @license lucide-react v0.456.0 - ISC
696
+ *
697
+ * This source code is licensed under the ISC license.
698
+ * See the LICENSE file in the root directory of this source tree.
699
+ */const F9=dn(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},s)=>xs("svg",{ref:s,...A9,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:zw("lucide",o),...l},[...i.map(([u,c])=>xs(u,c)),...Array.isArray(a)?a:[a]]));/**
700
+ * @license lucide-react v0.456.0 - ISC
701
+ *
702
+ * This source code is licensed under the ISC license.
703
+ * See the LICENSE file in the root directory of this source tree.
704
+ */const Wn=(e,t)=>{const r=dn(({className:n,...o},a)=>xs(F9,{ref:a,iconNode:t,className:zw(`lucide-${O9(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
705
+ * @license lucide-react v0.456.0 - ISC
706
+ *
707
+ * This source code is licensed under the ISC license.
708
+ * See the LICENSE file in the root directory of this source tree.
709
+ */const ad=Wn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
710
+ * @license lucide-react v0.456.0 - ISC
711
+ *
712
+ * This source code is licensed under the ISC license.
713
+ * See the LICENSE file in the root directory of this source tree.
714
+ */const id=Wn("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
715
+ * @license lucide-react v0.456.0 - ISC
716
+ *
717
+ * This source code is licensed under the ISC license.
718
+ * See the LICENSE file in the root directory of this source tree.
719
+ */const P9=Wn("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
720
+ * @license lucide-react v0.456.0 - ISC
721
+ *
722
+ * This source code is licensed under the ISC license.
723
+ * See the LICENSE file in the root directory of this source tree.
724
+ */const N9=Wn("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
725
+ * @license lucide-react v0.456.0 - ISC
726
+ *
727
+ * This source code is licensed under the ISC license.
728
+ * See the LICENSE file in the root directory of this source tree.
729
+ */const j9=Wn("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
730
+ * @license lucide-react v0.456.0 - ISC
731
+ *
732
+ * This source code is licensed under the ISC license.
733
+ * See the LICENSE file in the root directory of this source tree.
734
+ */const I9=Wn("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
735
+ * @license lucide-react v0.456.0 - ISC
736
+ *
737
+ * This source code is licensed under the ISC license.
738
+ * See the LICENSE file in the root directory of this source tree.
739
+ */const R9=Wn("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
740
+ * @license lucide-react v0.456.0 - ISC
741
+ *
742
+ * This source code is licensed under the ISC license.
743
+ * See the LICENSE file in the root directory of this source tree.
744
+ */const T9=Wn("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
745
+ * @license lucide-react v0.456.0 - ISC
746
+ *
747
+ * This source code is licensed under the ISC license.
748
+ * See the LICENSE file in the root directory of this source tree.
749
+ */const M9=Wn("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
750
+ * @license lucide-react v0.456.0 - ISC
751
+ *
752
+ * This source code is licensed under the ISC license.
753
+ * See the LICENSE file in the root directory of this source tree.
754
+ */const z9=Wn("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
755
+ * @license lucide-react v0.456.0 - ISC
756
+ *
757
+ * This source code is licensed under the ISC license.
758
+ * See the LICENSE file in the root directory of this source tree.
759
+ */const _9=Wn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function $b(e){const t=(e||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(t)?"rag/pic":t==="pdf"?"rag/pdf":["doc","docx"].includes(t)?"rag/word":["xls","xlsx"].includes(t)?"rag/excel":["ppt","pptx"].includes(t)?"rag/ppt":t==="txt"||t==="md"?"rag/txt":t==="csv"?"rag/csv":t==="json"?"rag/json":["zip","rar","7z"].includes(t)?"rag/zip":["odt","ods","odp","odf"].includes(t)?"rag/odf":t==="wps"?"rag/wps":["html","htm","url"].includes(t)?"rag/url":"rag/file"}function Cs(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(Cs(r.children)));return t}function L9(e){const t=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g,r=[];let n;for(;n=t.exec(e);){const o=n[1].split(";").map(a=>a.trim()).filter(Boolean);r.push(...o)}return Array.from(new Set(r))}const H9=fr.div`
760
+ display: flex;
761
+ flex-direction: column;
762
+ margin-bottom: 0.5rem;
763
+ animation: fadeIn 0.3s ease-in-out;
764
+ width: 100%;
765
+ text-wrap: wrap;
766
+
767
+ ${e=>e.$align==="right"&&`
768
+ align-items: flex-end;
769
+ `}
770
+
771
+ ${e=>e.$align==="center"&&`
772
+ align-items: center;
773
+ `}
774
+
775
+ @keyframes fadeIn {
776
+ from { opacity: 0; transform: translateY(10px); }
777
+ to { opacity: 1; transform: translateY(0); }
778
+ }
779
+ `,W9=fr.div`
780
+ display: flex;
781
+ align-items: center;
782
+ gap: 0.5rem;
783
+ margin-bottom: 0.5rem;
784
+ width: 100%;
785
+
786
+ ${e=>e.$isUser&&`
787
+ flex-direction: row-reverse;
788
+ justify-content: end;
789
+ `}
790
+ `,K9=fr.div`
791
+ background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
792
+ border-radius: 50%;
793
+ width: 2rem;
794
+ height: 2rem;
795
+
796
+ flex-shrink: 0;
797
+ display: flex;
798
+ align-items: center;
799
+ justify-content: center;
800
+ font-size: 1rem;
801
+ `,q9=fr.div`
802
+ width: 100%;
803
+ margin-top: 0.5rem;
804
+ .message-time {
805
+ font-size: 0.75rem;
806
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
807
+ }
808
+
809
+ .message-card {
810
+ background: ${e=>e.$isUser?"#E3ECFF":"#ffffff"};
811
+ border: 1px solid ${e=>(e.$isUser,"transparent")};
812
+ border-radius: 0.5rem;
813
+
814
+ overflow: hidden;
815
+ max-width: ${e=>e.$isUser?"fit-content":"100%"};
816
+ margin-left: ${e=>e.$isUser?"auto":"0"};
817
+
818
+ .message-text {
819
+ width: 100%;
820
+ line-height: 1.6;
821
+ padding: 0.75rem 1rem;
822
+ border-radius: 0.5rem;
823
+ min-height: ${e=>e.$isUser?"auto":"40px"};
824
+ font-size: 0.875rem;
825
+ }
826
+ }
827
+ `,V9=fr.div`
828
+ margin-top: 0.5rem;
829
+ display: flex;
830
+ padding: 0.5rem;
831
+ align-items: center;
832
+
833
+ gap: 0.75rem;
834
+
835
+ button {
836
+ display: flex;
837
+ align-items: center;
838
+ gap: 0.25rem;
839
+ font-size: 0.875rem;
840
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
841
+ background: none;
842
+ border: none;
843
+ cursor: pointer;
844
+ transition: color 0.2s;
845
+
846
+ &:hover {
847
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
848
+ }
849
+
850
+ &.active {
851
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
852
+ }
853
+ }
854
+ `,U9=fr.div`
855
+ margin-top: 1rem;
856
+ padding: 1rem;
857
+
858
+ border-radius: 0.5rem;
859
+
860
+ @keyframes followUpIn {
861
+ from {
862
+ opacity: 0;
863
+ transform: translateY(6px);
864
+ }
865
+ to {
866
+ opacity: 1;
867
+ transform: translateY(0);
868
+ }
869
+ }
870
+
871
+ .follow-up-title {
872
+ font-size: 0.875rem;
873
+ font-weight: 600;
874
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
875
+ margin-bottom: 0.75rem;
876
+ }
877
+
878
+ .follow-up-list {
879
+ display: flex;
880
+ flex-direction: column;
881
+ gap: 0.5rem;
882
+ }
883
+
884
+ .follow-up-item {
885
+ width: fit-content;
886
+ background: #ffffff;
887
+ border: 1px solid #e5e7eb;
888
+ border-radius: 0.375rem;
889
+ padding: 0.75rem 1rem;
890
+ cursor: pointer;
891
+ transition: all 0.2s ease;
892
+ text-align: left;
893
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
894
+ font-size: 0.875rem;
895
+ line-height: 1.4;
896
+ opacity: 0;
897
+ transform: translateY(6px);
898
+ animation: followUpIn 280ms ease forwards;
899
+ animation-play-state: running;
900
+
901
+ &:hover {
902
+ background: #e5e7eb;
903
+ border-color: #d1d5db;
904
+ }
905
+
906
+ &:active {
907
+ transform: translateY(1px);
908
+ }
909
+ }
910
+ `,ld=fr.div`
911
+
912
+ padding: 1rem;
913
+ background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
914
+
915
+ border-radius: 0.5rem;
916
+
917
+
918
+ .reference-title {
919
+ font-size: 0.875rem;
920
+ font-weight: 600;
921
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
922
+ margin-bottom: 0.75rem;
923
+ }
924
+
925
+ .reference-list {
926
+ display: flex;
927
+ flex-direction: column;
928
+ gap: 0.5rem;
929
+ }
930
+
931
+ .reference-item {
932
+ background: #ffffff;
933
+
934
+ border-radius: 0.375rem;
935
+ padding: 0.75rem 0;
936
+ display: flex;
937
+ align-items: center;
938
+ gap: 0.5rem;
939
+
940
+ .file-icon {
941
+ width: 2rem;
942
+ height: 2rem;
943
+ background: #e2e8f0;
944
+ border-radius: 0.25rem;
945
+ display: flex;
946
+ align-items: center;
947
+ justify-content: center;
948
+ font-size: 0.75rem;
949
+ color: #64748b;
950
+ }
951
+
952
+ .file-info {
953
+ flex: 1;
954
+
955
+ .file-name {
956
+ font-size: 0.875rem;
957
+ font-weight: 500;
958
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
959
+ margin-bottom: 0.25rem;
960
+ }
961
+
962
+ .file-meta {
963
+ font-size: 0.75rem;
964
+ color: #64748b;
965
+ }
966
+ }
967
+
968
+ .file-score {
969
+ font-size: 0.75rem;
970
+ color: #059669;
971
+ font-weight: 500;
972
+ }
973
+ }
974
+ `,X9=fr.div`
975
+ position: fixed;
976
+ top: 0;
977
+ left: 0;
978
+ right: 0;
979
+ bottom: 0;
980
+ background: rgba(0, 0, 0, 0.8);
981
+ display: ${e=>e.$show?"flex":"none"};
982
+ align-items: center;
983
+ justify-content: center;
984
+ z-index: 1000;
985
+ cursor: pointer;
986
+
987
+ .modal-content {
988
+ max-width: 90vw;
989
+ max-height: 90vh;
990
+ position: relative;
991
+ cursor: default;
992
+ display: flex;
993
+ flex-direction: column;
994
+ align-items: center;
995
+ }
996
+
997
+ .modal-image {
998
+ max-width: 100%;
999
+ max-height: calc(90vh - 60px);
1000
+ object-fit: contain;
1001
+ border-radius: 8px;
1002
+ }
1003
+
1004
+ .modal-close {
1005
+ margin-top: 16px;
1006
+ background: rgba(255, 255, 255, 0.3);
1007
+ border: none;
1008
+ border-radius: 20px;
1009
+ padding: 8px 20px;
1010
+ display: flex;
1011
+ align-items: center;
1012
+ justify-content: center;
1013
+ cursor: pointer;
1014
+ font-size: 14px;
1015
+ color: #333;
1016
+ font-weight: 500;
1017
+ transition: all 0.2s ease;
1018
+
1019
+ &:hover {
1020
+ background: rgba(255, 255, 255, 1);
1021
+ transform: translateY(-1px);
1022
+ }
1023
+ }
1024
+ `,Bb=fr.div`
1025
+
1026
+ padding:0rem 1rem;
1027
+ background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
1028
+
1029
+ .gallery-grid {
1030
+ display: grid;
1031
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
1032
+ gap: 0.75rem;
1033
+ }
1034
+
1035
+ .gallery-item {
1036
+ position: relative;
1037
+ aspect-ratio: 1;
1038
+ border-radius: 0.375rem;
1039
+ overflow: hidden;
1040
+ cursor: pointer;
1041
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
1042
+ border: 2px solid transparent;
1043
+
1044
+ &:hover {
1045
+ transform: translateY(-2px);
1046
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1047
+ border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
1048
+ }
1049
+
1050
+ .gallery-image {
1051
+ width: 100%;
1052
+ height: 100%;
1053
+ object-fit: cover;
1054
+ background: #f3f4f6;
1055
+ }
1056
+
1057
+ .gallery-overlay {
1058
+ position: absolute;
1059
+ bottom: 0;
1060
+ left: 0;
1061
+ right: 0;
1062
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
1063
+ color: white;
1064
+ padding: 0.5rem;
1065
+ font-size: 0.75rem;
1066
+ text-align: center;
1067
+ opacity: 0;
1068
+ transition: opacity 0.2s ease;
1069
+ }
1070
+
1071
+ &:hover .gallery-overlay {
1072
+ opacity: 1;
1073
+ }
1074
+ }
1075
+ `,lz=({is_download:e,content:t,contentType:r="plainText",align:n="left",displayStatus:o="ready",avatar:a,isUser:i=!1,userAvatar:l,aiAvatar:s,date:u,time:c,timestamp:f,showTime:p=!0,errorMessage:h,styles:v,reference:g,webReference:m,databaseReference:b,filePaths:y,currentFiles:C,fileManagerData:D,audioUrl:w,feedbackResult:k,queryId:E,defaultAnswer:x,isWelcome:A=!1,isLast:N=!1,respTime:$,tokens:j,resultType:F,followUpQuestions:B=[],tools:S={},eventsEmit:O})=>{Ot(()=>{console.log("isUser",i),console.log("isLast",N)},[N,i]);const I=Qs(),P=wt(()=>{var fe,Oe,Me,Fe,pe,Ee,ie,oe,be,le,ze;return{colors:{primary:((fe=I==null?void 0:I.colors)==null?void 0:fe.primary)||"#3b82f6",background:((Oe=I==null?void 0:I.colors)==null?void 0:Oe.background)||"#ffffff",userBackground:((Me=I==null?void 0:I.colors)==null?void 0:Me.primary)||"#3b82f6",border:((Fe=I==null?void 0:I.colors)==null?void 0:Fe.border)||"#e5e7eb",text:((pe=I==null?void 0:I.colors)==null?void 0:pe.text)||"#374151",disabled:((Ee=I==null?void 0:I.colors)==null?void 0:Ee.disabled)||"#6b7280",info:((ie=I==null?void 0:I.colors)==null?void 0:ie.info)||"#3b82f6",warning:((oe=I==null?void 0:I.colors)==null?void 0:oe.warning)||"#f59e0b",error:((be=I==null?void 0:I.colors)==null?void 0:be.error)||"#ef4444",...(le=v==null?void 0:v.theme)==null?void 0:le.colors},icons:{aiAvatar:s||"/vite.svg",userAvatar:l||"/default-user-avatar.png",...(ze=v==null?void 0:v.theme)==null?void 0:ze.icons}}},[I,v,s,l]),T=wt(()=>{const fe=c||u||f;return!fe||!p?null:OI(fe).format("YY-MM-DD HH:mm:ss")},[c,u,f,p]),[_,X]=xt([]),[L,q]=xt(null),[J,ee]=xt(!1),[z,Y]=xt(!1),[V,G]=xt(!1),[K,W]=xt(!1),te=()=>{const fe={processing:{text:"AI \u6B63\u5728\u601D\u8003...",icon:"\u{1F4AD}"},thinking:{text:"\u6DF1\u5EA6\u601D\u8003\u4E2D",icon:"\u{1F4AD}"},uploading:{text:"\u6587\u4EF6\u4E0A\u4F20\u4E2D...",icon:"\u{1F4E4}"},analyzing:{text:"\u77E5\u8BC6\u89E3\u6790\u4E2D...",icon:"\u{1F50D}"},error:{text:h||"\u62B1\u6B49\uFF0C\u672C\u6B21\u8BF7\u6C42\u51FA\u9519\u4E86\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5",icon:"\u274C"},initializing:{text:"\u6B63\u5728\u521D\u59CB\u5316...",icon:"\u2699\uFE0F"},ready:{text:"\u601D\u8003\u5B8C\u6210",icon:ae.jsx(Pl,{type:"rag/think",size:16})}}[o]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},Oe=$?`(\u7528\u65F6 ${Math.round($/1e3)} \u79D2)`:"";return ae.jsx("div",{className:"think-header",children:ae.jsx("div",{className:"think-header-left ml-[16px]",children:ae.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-fit",children:[ae.jsx("div",{className:"think-icon",children:fe.icon}),ae.jsx("div",{className:"think-title",children:fe.text}),Oe&&ae.jsx("div",{className:"think-time",children:Oe}),_e&&ae.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{W(!K)},children:ae.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:K?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:ae.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},[U,Z]=xt([]),[re,ue]=xt(null),he=wt(()=>{try{if(!g)return[];const fe=JSON.parse(g);return Array.isArray(fe)?fe:[]}catch{return[]}},[g]),we=(fe,Oe)=>{var ie,oe,be;const Me=((ie=fe==null?void 0:fe.metadata)==null?void 0:ie.source)||(fe==null?void 0:fe.file_path)||(fe==null?void 0:fe.path)||(fe==null?void 0:fe.convertedFilePath)||(fe==null?void 0:fe.parsedFilePath)||"",Fe=((oe=fe==null?void 0:fe.metadata)==null?void 0:oe.title)||(fe==null?void 0:fe.file_name)||"",pe=((be=fe==null?void 0:fe.metadata)==null?void 0:be.id)||(fe==null?void 0:fe.id)||(fe==null?void 0:fe.file_id)||"",Ee=he.find(le=>{var st,dt,Ye;const ze=((st=le==null?void 0:le.metadata)==null?void 0:st.source)||(le==null?void 0:le.file_path)||(le==null?void 0:le.path)||(le==null?void 0:le.convertedFilePath)||(le==null?void 0:le.parsedFilePath)||"",Be=((dt=le==null?void 0:le.metadata)==null?void 0:dt.title)||(le==null?void 0:le.file_name)||"",Ke=((Ye=le==null?void 0:le.metadata)==null?void 0:Ye.id)||(le==null?void 0:le.id)||"";return pe&&Ke&&String(pe)===String(Ke)||Me&&ze&&ze===Me||Fe&&Be&&Be===Fe});if(Ee){const le=(Ee!=null&&Ee.references&&Array.isArray(Ee.references)?Ee.references:[Ee]).find(ze=>String(ze.order_num)===String(Oe)||String(ze.id)===String(Oe));if(le)return le}for(const le of he){if(le!=null&&le.references&&Array.isArray(le.references)){const ze=le.references.find(Be=>String(Be.order_num)===String(Oe)||String(Be.id)===String(Oe));if(ze)return ze}if(String(le.order_num)===String(Oe)||String(le.id)===String(Oe))return le}return null},Ne=(fe,Oe)=>{function Me(Ee,ie){for(const oe of Ee){if(oe.references&&Array.isArray(oe.references)){const be=oe.references.find(le=>String(le.order_num)===String(ie)||String(le.id)===String(ie));if(be)return be}if(String(oe.order_num)===String(ie)||String(oe.id)===String(ie))return oe}return null}let Fe=[];try{g&&(Fe=JSON.parse(g))}catch(Ee){console.error("Failed to parse reference:",Ee)}const pe=Me(Fe,fe.id);O==null||O("action_retrive_tag",{tagInfo:pe,fromtype:fe.fromtype,leaf:fe,attributes:Oe})},me=fe=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",fe),console.log("databaseReference available:",!!b),fe.id&&b){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",b);const Oe=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:fe.id,databaseReference:b}});console.log("Dispatching event:",Oe),window.dispatchEvent(Oe)}else console.log("Cannot send response - missing id or databaseReference")};Q.useEffect(()=>{const fe=Oe=>{me(Oe.detail)};return window.addEventListener("retrieve-sql-data:request-data",fe),()=>{window.removeEventListener("retrieve-sql-data:request-data",fe)}},[b]),Q.useEffect(()=>{const fe=Oe=>{ge(Oe.detail)};return window.addEventListener("rtext_pagination_click",fe),()=>{window.removeEventListener("rtext_pagination_click",fe)}},[re]);const ge=fe=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",fe),fe.replacePredataFunction&&re){const Oe={...re,rows:re.rows};fe.replacePredataFunction(Oe)}O==null||O("rtext_pagination_click",fe)},ye=Ve(new Map),Ce=Ve(1),xe=Ve(""),Ae=Ve({0:1,1:1}),ke=wt(()=>{if(r==="stream"&&typeof t=="string"){let fe=t;const Oe=[];return E&&E!==xe.current&&(ye.current.clear(),Ce.current=1,Ae.current={0:1,1:1},xe.current=E),fe=fe.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(Me,Fe)=>{const pe=Fe.match(/id=['"]([^'"]+)['"]/),Ee=Fe.match(/fromType=['"]([^'"]+)['"]/);if(pe){const ie=pe[1],oe=Ee?Ee[1]:"0";if(!ye.current.has(ie)){const le=Ae.current,ze=oe==="1"?"1":"0",Be=le[ze]??1;ye.current.set(ie,Be),le[ze]=Be+1,Ae.current=le}const be=ye.current.get(ie);return`[retrive-tag${Fe}][${be}][/retrive-tag]`}return Me}),fe=fe.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,Me=>{const Fe=Me.match(/image_urls=['"]([^'"]+)['"]/);if(Fe){const pe=Fe[1].split(";").map(Ee=>Ee.trim()).filter(Boolean);Oe.push(...pe)}return Me}),X(Oe),fe}return t},[t,r,E]),We=wt(()=>{if(r==="stream"&&typeof ke=="string")try{return Mw(ke)}catch(fe){return console.error("Failed to deserialize markdown:",fe),[]}return[]},[ke,r]);Ot(()=>{try{r==="stream"&&b&&(fe=>{try{const Oe=typeof fe=="string"?JSON.parse(fe):fe;return Oe?Array.isArray(Oe)?Oe:[Oe]:[]}catch{return[]}})(b).forEach(fe=>{const Oe=fe==null?void 0:fe.id;if(!Oe)return;const Me=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Oe,databaseReference:fe}});window.dispatchEvent(Me)})}catch{}},[r,b]);const _e=wt(()=>{if(!Array.isArray(We))return!1;const fe=Me=>{for(const Fe of Me)if(Fe.type==="think"||Array.isArray(Fe.children)&&fe(Fe.children))return!0;return!1},Oe=fe(We);return console.log("Think detection:",{slateContent:We,hasThinkElement:Oe,displayStatus:o,isUser:i}),Oe},[We,o,i]),Pe=wt(()=>({databaseReference:b,..._e&&{isThinkCollapsed:K}}),[b,_e,K]),ve=wt(()=>a||(i?P.icons.userAvatar:P.icons.aiAvatar),[a,i,P.icons]),Se=wt(()=>typeof t=="string"?t:Array.isArray(t)?t.map(fe=>typeof fe=="string"?fe:fe.text||"").join(""):x||"",[t,x]),qe=()=>{if(A)return null;const fe=[{key:"copy",show:S.copy!==!1,icon:P9,label:"\u590D\u5236",onClick:()=>O==null?void 0:O("chatbox:copy",{content:Se})},{key:"like",show:S.like!==!1,icon:z9,label:"\u8D5E",onClick:()=>O==null?void 0:O("chatbox:like",{result:k,queryId:E}),active:k===1},{key:"dislike",show:S.dislike!==!1,icon:M9,label:"\u8E29",onClick:()=>O==null?void 0:O("chatbox:dislike",{result:k,queryId:E}),active:k===0},{key:"repeat",show:!i&&N,icon:R9,label:"\u91CD\u590D",onClick:()=>O==null?void 0:O("chatbox:repeat",{content:t,queryId:E,filePaths:y,audioUrl:w})},{key:"forward",show:S.forward,icon:T9,label:"\u8F6C\u53D1",onClick:()=>O==null?void 0:O("chatbox:forward",{content:Se,queryId:E})},{key:"delete",show:S.delete,icon:_9,label:"\u5220\u9664",onClick:()=>O==null?void 0:O("chatbox:delete",{queryId:E})},{key:"edit",show:S.edit,icon:I9,label:"\u7F16\u8F91",onClick:()=>O==null?void 0:O("chatbox:edit",{content:Se,queryId:E})}];return ae.jsxs("div",{className:"flex justify-between items-center px-6",children:[ae.jsx(V9,{$theme:P,children:fe.filter(Oe=>Oe.show).map(Oe=>{const Me=Oe.icon;return ae.jsx(pl,{title:Oe.label,placement:"top",children:ae.jsx("button",{className:Oe.active?"active":"",onClick:Oe.onClick,children:ae.jsx(Me,{size:18})})},Oe.key)})}),!i&&o=="ready"&&!A&&ae.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017"," ",ae.jsx("span",{style:{color:P.colors.primary},children:j||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",ae.jsx("span",{style:{color:P.colors.primary},children:Math.round(($||0)/1e3)}),"\u79D2"]})]})},Ge=wt(()=>{if(!g)return[];let fe=[];try{const pe=JSON.parse(g);fe=Array.isArray(pe)?pe:[]}catch{return[]}let Oe=fe.map(pe=>{try{const Ee=pe.metadata||{};let ie="";pe.name&&typeof pe.name=="string"?ie=pe.name:pe.file_name&&typeof pe.file_name=="string"?ie=pe.file_name:Ee.source&&typeof Ee.source=="string"?ie=Ee.source.split("/").pop()||"":pe.order_num?ie=String(pe.order_num):ie="\u672A\u77E5\u6587\u6863";let oe="pdf";if(pe.name&&typeof pe.name=="string"){const le=pe.name.split(".").pop();le&&(oe=le.toLowerCase())}else if(Ee.source&&typeof Ee.source=="string"){const le=Ee.source.split(".").pop();le&&(oe=le.toLowerCase())}else if(pe.file_path&&typeof pe.file_path=="string"){const le=pe.file_path.split(".").pop();le&&(oe=le.toLowerCase())}const be=pe.parsedFilePath||Ee.file_path||pe.file_path||pe.convertedFilePath||"";return{file_id:Ee.id||pe.uid||"",file_name:ie,file_type:oe,path:be,score:Number(pe.score)||0,tags:[],parsedFilePath:pe.parsedFilePath,...pe}}catch(Ee){return console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Ee,pe),{file_id:pe.uid||"",file_name:pe.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:pe.convertedFilePath||pe.file_path||"",score:0,tags:[],parsedFilePath:pe.parsedFilePath,...pe}}});const Me=Cs(We||[]);if(Me&&Me.length){const pe=Me.filter(Ee=>Ee.fromtype==="0");Oe=Oe.map(Ee=>{const ie=pe.filter(oe=>{var le,ze;const be=fe.find(Be=>String(Be.order_num)===String(oe.id));return((le=be==null?void 0:be.metadata)==null?void 0:le.source)&&((ze=Ee==null?void 0:Ee.metadata)==null?void 0:ze.source)&&be.metadata.source===Ee.metadata.source}).map(oe=>({id:oe.id||"",index:oe.indexId||"",image_urls:oe.imageUrls?Array.isArray(oe.imageUrls)?oe.imageUrls:[oe.imageUrls]:oe.image_urls?oe.image_urls.split(";").map(be=>be.trim()).filter(Boolean):[]}));return{...Ee,tags:ie}})}const Fe=new Map;return Oe.filter(pe=>{var ie;const Ee=((ie=pe==null?void 0:pe.metadata)==null?void 0:ie.source)||pe.file_name;return Ee?Fe.has(Ee)?!1:(Fe.set(Ee,!0),!0):!0}).sort((pe,Ee)=>((Ee==null?void 0:Ee.score)||0)-((pe==null?void 0:pe.score)||0))},[g,We]),Xe=wt(()=>{if(!m)return[];let fe=[];try{const Fe=JSON.parse(m);fe=Array.isArray(Fe)?Fe:[]}catch{return[]}if(!(fe!=null&&fe.length))return[];let Oe=fe.map(Fe=>{var pe,Ee,ie;return{link:(pe=Fe==null?void 0:Fe.metadata)==null?void 0:pe.link,file_name:(Ee=Fe==null?void 0:Fe.metadata)==null?void 0:Ee.title,score:(ie=Fe==null?void 0:Fe.metadata)==null?void 0:ie.score,tags:[]}});const Me=Cs(We||[]);if(Me&&Me.length){const Fe=Me.filter(pe=>pe.fromtype==="1");Oe=Oe.map(pe=>{const Ee=Fe.filter(ie=>{var be;const oe=fe.find(le=>String(le.order_num)===String(ie.id));return((be=oe==null?void 0:oe.metadata)==null?void 0:be.title)&&oe.metadata.title===pe.file_name}).map(ie=>({id:ie.id||"",index:ie.indexId||"",image_urls:ie.imageUrls?Array.isArray(ie.imageUrls)?ie.imageUrls:[ie.imageUrls]:ie.image_urls?ie.image_urls.split(";").map(oe=>oe.trim()).filter(Boolean):[]}));return{...pe,tags:Ee}})}return Oe.sort((Fe,pe)=>((pe==null?void 0:pe.score)||0)-((Fe==null?void 0:Fe.score)||0))},[m,We]),Ie=wt(()=>{const fe=[...Cs(We||[]).filter(Oe=>Oe.imageUrls&&Array.isArray(Oe.imageUrls)).flatMap(Oe=>Oe.imageUrls),..._];return Array.from(new Set(fe))},[We,_]),at=wt(()=>typeof t!="string"?[]:L9(t),[t]),He=wt(()=>{var fe,Oe,Me,Fe,pe,Ee,ie,oe;if(!b)return null;try{const be=typeof b=="string"?JSON.parse(b):b;if(Array.isArray(be)&&be.length>0){const le=be[0];if(le.retrieveSqlData)return{dataFetchUrl:le.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:le.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:le.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:le.retrieveSqlData.total||0,type:le.retrieveSqlData.type||"COLLECTION",preData:{columns:((Oe=(fe=le.retrieveSqlData.preData)==null?void 0:fe[0])==null?void 0:Oe.columns)||[],rows:((Fe=(Me=le.retrieveSqlData.preData)==null?void 0:Me[0])==null?void 0:Fe.data)||[]}}}return be.retrieveSqlData?{dataFetchUrl:be.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:be.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:be.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:be.retrieveSqlData.total||0,type:be.retrieveSqlData.type||"COLLECTION",preData:{columns:((Ee=(pe=be.retrieveSqlData.preData)==null?void 0:pe[0])==null?void 0:Ee.columns)||[],rows:((oe=(ie=be.retrieveSqlData.preData)==null?void 0:ie[0])==null?void 0:oe.data)||[]}}:{dataFetchUrl:be.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:be.databaseName||"\u6570\u636E\u5E93",tableName:be.tableName||"\u6570\u636E\u8868",total:be.total||0,type:be.type||"COLLECTION",preData:be.preData||{columns:[],rows:[]}}}catch(be){return console.error("Failed to parse databaseReference:",be),null}},[b]),nt=fe=>{const{dataSourceType:Oe,databaseName:Me,businessTableName:Fe,tableName:pe}=fe;return Oe==="DataTable"?`${Me||"\u6570\u636E\u5E93"} - ${Fe||"\u6570\u636E\u8868"}`:Oe==="DirectDB"?`${Me||"\u6570\u636E\u5E93"} - ${pe||"\u6570\u636E\u8868"}`:Me||Fe||pe||"\u6570\u636E\u5E93"};Q.useEffect(()=>{var fe,Oe,Me,Fe,pe,Ee,ie,oe;if(b)try{const be=typeof b=="string"?JSON.parse(b):b;if(Array.isArray(be)&&be.length>0){const le=be[0];if(le.retrieveTableDataList&&Array.isArray(le.retrieveTableDataList)){Z(le.retrieveTableDataList);return}if((Me=(Oe=(fe=le.retrieveSqlData)==null?void 0:fe.preData)==null?void 0:Oe[0])!=null&&Me.data&&Array.isArray(le.retrieveSqlData.preData[0].data)){Z(le.retrieveSqlData.preData[0].data);return}}if(be.retrieveTableDataList&&Array.isArray(be.retrieveTableDataList)){Z(be.retrieveTableDataList);return}if((Ee=(pe=(Fe=be.retrieveSqlData)==null?void 0:Fe.preData)==null?void 0:pe[0])!=null&&Ee.data&&Array.isArray(be.retrieveSqlData.preData[0].data)){Z(be.retrieveSqlData.preData[0].data);return}(ie=He==null?void 0:He.preData)!=null&&ie.rows&&Z(He.preData.rows)}catch(be){console.error("Failed to parse databaseReference for retrieveTableDataList:",be),(oe=He==null?void 0:He.preData)!=null&&oe.rows&&Z(He.preData.rows)}},[b,He]);const ht=wt(()=>{if(!i)return[];if(Array.isArray(C))return C;if(typeof C=="string"&&C)try{return JSON.parse(C)}catch{return[]}return[]},[i,C]),At=()=>{if(!i||ht.length===0)return null;const fe=oe=>oe!=null&&oe.status&&(String(oe.status).toLowerCase()==="uploading"||String(oe.status).toLowerCase()==="parsing")?!1:!!(oe!=null&&oe.url||oe!=null&&oe.filePath||oe!=null&&oe.convertedFilePath),Oe=ht.filter(oe=>{const be=(oe.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(be.toLowerCase())}),Me=ht.filter(oe=>{const be=(oe.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(be.toLowerCase())}),Fe=Oe.filter(fe),pe=Oe.filter(oe=>!fe(oe)),Ee=Me.filter(fe),ie=Me.filter(oe=>!fe(oe));return ae.jsxs("div",{className:"w-full mt-4",children:[(Fe.length>0||pe.length>0)&&ae.jsx(Bb,{$theme:P,children:ae.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[pe.map((oe,be)=>{var le;return ae.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:ae.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((le=P.colors)==null?void 0:le.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${be}`)}),Fe.map(oe=>ae.jsxs("div",{className:"gallery-item",onClick:()=>{q(oe.url||oe.filePath||null),O==null||O("reference_file:click",{file:oe.name,file_type:"image",url:oe.url||oe.filePath,parse_url:oe.parseUrl||oe.convertedFilePath,retrieve_tags:oe.retrieveTags||[],file_id:oe.uid,parsed_file_type:"image",references:oe,type:"image",isUploadFile:!0,pdfPages:oe.pdfPages||0})},children:[ae.jsx("img",{src:oe.url||oe.filePath,alt:oe.name,className:"gallery-image",onError:be=>{const le=be.target;le.style.display="none"}}),ae.jsx("div",{className:"gallery-overlay",children:oe.name})]},oe.uid||oe.name))]})}),(Ee.length>0||ie.length>0)&&ae.jsxs("div",{className:"w-full",children:[ae.jsxs("div",{className:"text-sm font-semibold text-gray-700 mb-3 px-4",children:["\u4E0A\u4F20\u6587\u6863 (",Ee.length,")"]}),ae.jsxs("div",{className:"flex flex-col gap-2 px-4",style:{direction:"ltr"},children:[ie.map((oe,be)=>{var le;return ae.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 bg-gray-50/40",children:[ae.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded bg-gray-200"}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"h-3 rounded bg-gray-200 w-[60%]"})}),ae.jsx("div",{className:"w-6 h-6",children:ae.jsx("div",{className:"animate-spin",style:{width:18,height:18,border:"2px solid #d1d5db",borderTopColor:((le=P.colors)==null?void 0:le.primary)||"#3b82f6",borderRadius:"9999px"}})})]},`pending-doc-${be}`)}),Ee.map(oe=>{const be=(oe.name||"").split(".").pop()||"";return ae.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 hover:border-blue-300 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>{O==null||O("reference_file:click",{file:oe.name,file_type:be,url:oe.url||oe.filePath,parse_url:oe.parseUrl||oe.convertedFilePath,retrieve_tags:oe.retrieveTags||[],file_id:oe.uid,parsed_file_type:be,references:oe,type:"file",isUploadFile:!0,pdfPages:oe.pdfPages||0})},children:[ae.jsx("div",{className:"flex-shrink-0",children:ae.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center ",children:ae.jsx(Pl,{type:$b(be),size:16})})}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"text-sm font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:le=>{le.stopPropagation(),O==null||O("referenceFile_question",{data:{...oe,file_type:be,file_name:oe.name,metadata:oe,parsedFilePath:oe.url||oe.filePath}})},children:oe.name})}),oe.size&&ae.jsx("div",{className:"text-sm text-gray-600",children:oe.size})]},oe.uid||oe.name)})]})]})]})},Et=()=>{if(i)return null;const fe=Array.isArray(Ge)?Ge:[],Oe=Array.isArray(Xe)?Xe:[],Me=fe.length>0&&F!==5,Fe=Oe.length>0,pe=((Ie==null?void 0:Ie.length)||0)>0||((at==null?void 0:at.length)||0)>0,Ee=U&&U.length>0;return!Me&&!Fe&&!pe&&!Ee?null:ae.jsxs(ae.Fragment,{children:[pe&&ae.jsx(Bb,{$theme:P,children:ae.jsx("div",{className:"gallery-grid",children:[...Ie,...at].map((ie,oe)=>ae.jsxs("div",{className:"gallery-item",onClick:()=>{q(ie),O==null||O("reference_file:click",{file:`\u56FE${oe+1}`,file_type:"image",url:ie,parse_url:ie,retrieve_tags:[],references:{url:ie},type:"image",isUploadFile:!1})},children:[ae.jsx("img",{src:ie,alt:`\u56FE${oe+1}`,className:"gallery-image",onError:be=>{const le=be.target;le.style.display="none"}}),ae.jsxs("div",{className:"gallery-overlay",children:["\u56FE",oe+1]})]},ie+oe))})}),Me&&ae.jsxs(ld,{$theme:P,children:[ae.jsx("div",{className:"reference-title justify-between items-center flex",children:ae.jsxs("div",{className:"flex items-center gap-2",children:[ae.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),ae.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${fe.length})`}),fe.length>2&&ae.jsx("div",{onClick:()=>ee(!J),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:J?ae.jsx(id,{size:16,className:"text-[#b4b4b4]"}):ae.jsx(ad,{size:16,className:"text-[#b4b4b4]"})})]})}),ae.jsx("div",{className:"reference-list",children:(J?fe:fe.slice(0,2)).map((ie,oe)=>ie&&ae.jsx("div",{className:"reference-item",children:ae.jsxs("div",{className:"file-info flex items-end gap-2",children:[ae.jsx("div",{className:"flex-shrink-0",children:(()=>{(ie.file_name||"").split(".").pop();const be=(ie.file_name||"").split(".").pop()||"file";return ae.jsx("div",{className:"w-6 h-6 rounded flex items-end-safe justify-center",children:ae.jsx(Pl,{type:$b(be),size:32})})})()}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:be=>{be.stopPropagation(),O==null||O("knowledge_referenceFile_title:click",{data:{...ie,file_type:ie.file_type,file_name:ie.file_name,metadata:ie.metadata,parsedFilePath:ie.parsedFilePath}})},children:ie.file_name})}),ae.jsx("div",{className:"flex items-center gap-1",children:(()=>{const be=new Set,le=(ie.tags||[]).filter(Be=>be.has(Be.id)?!1:(be.add(Be.id),!0)).sort((Be,Ke)=>Number(Be.index)-Number(Ke.index)),ze=Be=>{if(typeof ke!="string")return Be;const Ke=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Be}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(ke);return Ke?Ke[1]:Be};return le.slice(0,10).map(Be=>ae.jsx("span",{className:"w-6 h-6 bg-[#e6f7ff] text-[#1890ff] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:Ke=>{Ke.stopPropagation();const st=we(ie,Be.id);O==null||O("retrive_tag:click",{tagInfo:st||ie,fromtype:"0",leaf:{id:Be.id,fromtype:"0"},attributes:{}})},children:ze(Be.id)},Be.id))})()}),ae.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",(ie.score*100).toFixed(0)]}),ae.jsx("div",{className:"flex items-center gap-2",children:ae.jsx(j9,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:e?"pointer":"not-allowed"},onClick:be=>{e&&(be.stopPropagation(),O==null||O("referenceFile_download",{data:{...ie,file_type:ie.file_type,file_name:ie.file_name,metadata:ie.metadata,parsedFilePath:ie.parsedFilePath}}))}})})]})},ie.file_id||oe))})]}),Ee&&ae.jsxs(ld,{$theme:P,children:[ae.jsx("div",{className:"reference-title justify-between items-center flex",children:ae.jsxs("div",{className:"flex items-center gap-2",children:[ae.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),ae.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${U.length||0})`}),U.length>2&&ae.jsx("div",{onClick:()=>G(!V),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:V?ae.jsx(id,{size:16,className:"text-[#b4b4b4]"}):ae.jsx(ad,{size:16,className:"text-[#b4b4b4]"})})]})}),ae.jsx("div",{className:"reference-list",children:(V?U:U.slice(0,2)).map((ie,oe)=>ae.jsx("div",{className:"reference-item",children:ae.jsxs("div",{className:"file-info flex items-end gap-2",children:[ae.jsx("div",{className:"flex-shrink-0",children:ae.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:ae.jsx(N9,{size:20,className:"text-blue-600"})})}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:be=>{be.stopPropagation(),O==null||O("database_referenceFile_title:click",{data:{...ie,file_type:"database",file_name:nt(ie),metadata:ie,parsedFilePath:ie.fetchUrl||(He==null?void 0:He.dataFetchUrl)||""}})},children:nt(ie)})}),ae.jsx("div",{className:"flex items-center gap-1",children:ae.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",children:oe+1})})]})},ie.tableName||oe))})]}),Fe&&ae.jsxs(ld,{$theme:P,children:[ae.jsx("div",{className:"reference-title justify-between items-center flex",children:ae.jsxs("div",{className:"flex items-center gap-2",children:[ae.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),ae.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Oe.length})`}),Oe.length>2&&ae.jsx("div",{onClick:()=>Y(!z),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:z?ae.jsx(id,{size:16,className:"text-[#b4b4b4]"}):ae.jsx(ad,{size:16,className:"text-[#b4b4b4]"})})]})}),ae.jsx("div",{className:"reference-list",children:(z?Oe:Oe.slice(0,2)).map((ie,oe)=>ae.jsx("div",{className:"reference-item",children:ae.jsxs("div",{className:"file-info flex items-end gap-2",children:[ae.jsx("div",{className:"flex-shrink-0",children:ae.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:ae.jsx(Pl,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:be=>{be.stopPropagation(),O==null||O("web_referenceFile_title:click",{data:{...ie,file_type:ie.file_type,file_name:ie.file_name,metadata:ie.metadata,parsedFilePath:ie.parsedFilePath}})},children:ie.file_name})}),ae.jsx("div",{className:"flex items-center gap-1",children:(()=>{const be=new Set,le=(ie.tags||[]).filter(Be=>be.has(Be.id)?!1:(be.add(Be.id),!0)).sort((Be,Ke)=>Number(Be.index)-Number(Ke.index)),ze=Be=>{if(typeof ke!="string")return Be;const Ke=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Be}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(ke);return Ke?Ke[1]:Be};return le.slice(0,1).map(Be=>ae.jsx("span",{className:"w-6 h-6 bg-[#f6ffed] text-[#52c41a] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:Ke=>{Ke.stopPropagation();const st=we(ie,Be.id);O==null||O("retrive_tag:click",{tagInfo:st||ie,fromtype:"1",leaf:{id:Be.id,fromtype:"1"},attributes:{}})},children:ze(Be.id)},Be.id))})()}),ae.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",ie.score?(ie.score*100).toFixed(0):"N/A"]})]})},(ie.link||"")+oe))})]})]})},gt=()=>i||!N||!B||B.length===0?null:ae.jsx(U9,{$theme:P,children:ae.jsx("div",{className:"follow-up-list",children:B.map((fe,Oe)=>ae.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Oe*260}ms`},onClick:()=>{O==null||O("chatbox:follow_up_question_click",{question:fe,queryId:E})},children:fe},`${String(fe)}-${Oe}`))})});return ae.jsxs(H9,{$align:n,$isUser:i,children:[ae.jsxs(W9,{$isUser:i,children:[ae.jsx(K9,{$src:ve,$isUser:i}),T&&ae.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:T})]}),ae.jsx(q9,{$isUser:i,$theme:P,children:ae.jsx("div",{className:"message-card",children:ae.jsx("div",{className:"message-text",children:r==="stream"?ae.jsxs(ae.Fragment,{children:[!i&&te(),ae.jsx(Fm,{dataSource:{type:Js.MARKDOWN,content:ke},styles:{letterSpacing:v==null?void 0:v.letterSpacing,lineHeight:v==null?void 0:v.lineHeight,templateField:v==null?void 0:v.templateField,text:v==null?void 0:v.text},theme:{...v==null?void 0:v.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:Ne,eventsEmit:O,extraProps:Pe},`md-${(ke||"").length}-think-${K}`)]}):ae.jsx("div",{children:Se})})})}),At(),Et(),!i&&qe(),gt(),typeof document<"u"&&Nb(ae.jsx(X9,{$show:L!==null,onClick:()=>q(null),children:L&&ae.jsxs("div",{className:"modal-content",onClick:fe=>fe.stopPropagation(),children:[ae.jsx("img",{src:L,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),ae.jsx("button",{className:"modal-close",onClick:()=>q(null),children:"\u5173\u95ED"})]})}),document.body)]})},G9=fr.div`
1076
+ position: relative;
1077
+ width: 100%;
1078
+ height: 100%;
1079
+ overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
1080
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
1081
+ border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
1082
+
1083
+ /* 自定义滚动条 */
1084
+ &::-webkit-scrollbar {
1085
+ width: 8px;
1086
+ }
1087
+
1088
+ &::-webkit-scrollbar-track {
1089
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
1090
+ border-radius: 4px;
1091
+ }
1092
+
1093
+ &::-webkit-scrollbar-thumb {
1094
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
1095
+ border-radius: 4px;
1096
+
1097
+ &:hover {
1098
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
1099
+ }
1100
+ }
1101
+ `,Y9=fr.div`
1102
+ position: relative;
1103
+ width: 100%;
1104
+ height: 100%;
1105
+ overflow: auto;
1106
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
1107
+
1108
+ /* 自定义滚动条 */
1109
+ &::-webkit-scrollbar {
1110
+ width: 8px;
1111
+ }
1112
+
1113
+ &::-webkit-scrollbar-track {
1114
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
1115
+ border-radius: 4px;
1116
+ }
1117
+
1118
+ &::-webkit-scrollbar-thumb {
1119
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
1120
+ border-radius: 4px;
1121
+
1122
+ &:hover {
1123
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
1124
+ }
1125
+ }
1126
+ `,Ob=fr.div`
1127
+ padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
1128
+ min-height: ${e=>e.height||"auto"};
1129
+
1130
+ /* 富文本内容样式增强 */
1131
+ & h1, & h2, & h3, & h4, & h5, & h6 {
1132
+ scroll-margin-top: 2rem;
1133
+ }
1134
+
1135
+ & img {
1136
+ max-width: 100%;
1137
+ height: auto;
1138
+ border-radius: 0.5rem;
1139
+ margin: 1rem 0;
1140
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
1141
+ transition: transform 0.2s ease-in-out;
1142
+
1143
+ &:hover {
1144
+ transform: scale(1.02);
1145
+ }
1146
+ }
1147
+
1148
+ & pre {
1149
+ position: relative;
1150
+
1151
+ &::before {
1152
+ content: '';
1153
+ position: absolute;
1154
+ top: 0;
1155
+ left: 0;
1156
+ right: 0;
1157
+ height: 2px;
1158
+ background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
1159
+ border-radius: 2px 2px 0 0;
1160
+ }
1161
+ }
1162
+
1163
+ & blockquote {
1164
+ position: relative;
1165
+
1166
+ &::before {
1167
+ content: '"';
1168
+ position: absolute;
1169
+ top: -0.5rem;
1170
+ left: -1rem;
1171
+ font-size: 3rem;
1172
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
1173
+ opacity: 0.3;
1174
+ }
1175
+ }
1176
+
1177
+
1178
+ `,Z9=fr.div`
1179
+ display: flex;
1180
+ align-items: center;
1181
+ justify-content: center;
1182
+ padding: 2rem;
1183
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
1184
+ font-size: 0.875rem;
1185
+
1186
+ &::before {
1187
+ content: '';
1188
+ width: 20px;
1189
+ height: 20px;
1190
+ border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
1191
+ border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
1192
+ border-radius: 50%;
1193
+ animation: spin 1s linear infinite;
1194
+ margin-right: 0.5rem;
1195
+ }
1196
+
1197
+ @keyframes spin {
1198
+ 0% { transform: rotate(0deg); }
1199
+ 100% { transform: rotate(360deg); }
1200
+ }
1201
+ `,J9=fr.div`
1202
+ display: flex;
1203
+ flex-direction: column;
1204
+ align-items: center;
1205
+ justify-content: center;
1206
+ padding: 3rem;
1207
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
1208
+ text-align: center;
1209
+
1210
+ &::before {
1211
+ content: '📄';
1212
+ font-size: 3rem;
1213
+ margin-bottom: 1rem;
1214
+ }
1215
+ `,Q9=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:i=!1,size:l="sm",theme:s={},onChange:u,onScroll:c,onScrollToTop:f,onScrollToBottom:p,onSegmentClick:h,className:v,style:g,height:m="100%"})=>{const b=Qs(),y=wt(()=>{var G,K,W,te,U,Z,re,ue,he;return{primaryColor:((G=b==null?void 0:b.colors)==null?void 0:G.primary)||(s==null?void 0:s.primaryColor)||"#007bff",secondaryColor:((K=b==null?void 0:b.colors)==null?void 0:K.secondary)||(s==null?void 0:s.secondaryColor)||"#6c757d",backgroundColor:((W=b==null?void 0:b.colors)==null?void 0:W.background)||(s==null?void 0:s.backgroundColor)||"#ffffff",textColor:((te=b==null?void 0:b.colors)==null?void 0:te.text)||(s==null?void 0:s.textColor)||"#24292f",borderColor:((U=b==null?void 0:b.colors)==null?void 0:U.border)||(s==null?void 0:s.borderColor)||"#dee2e6",disabledBackground:((Z=b==null?void 0:b.colors)==null?void 0:Z.disabledBackground)||(s==null?void 0:s.disabledBackground)||"#f8f9fa",hoverBackground:((re=b==null?void 0:b.colors)==null?void 0:re.hoverBackground)||(s==null?void 0:s.hoverBackground)||"#e9ecef",borderRadius:((ue=b==null?void 0:b.space)==null?void 0:ue.radius)||(s==null?void 0:s.borderRadius)||"8px",padding:((he=b==null?void 0:b.space)==null?void 0:he.padding)||(s==null?void 0:s.padding)||"1rem",scrollbarTrack:(s==null?void 0:s.scrollbarTrack)||"#f1f1f1",scrollbarThumb:(s==null?void 0:s.scrollbarThumb)||"#c1c1c1",scrollbarThumbHover:(s==null?void 0:s.scrollbarThumbHover)||"#a8a8a8",...s}},[b,s]),C=Ve(0);C.current+=1,console.log("[Markdownit] render count:",C.current);const[D,w]=xt([]),[k,E]=xt({start:0,end:10}),[x,A]=xt(0),[N,$]=xt(0),[j,F]=xt(!1),[B,S]=xt(!1),[O,I]=xt(!1),P=Ve(null),T=Ve(null),_=Ve(null),X=wt(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);Ot(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(X)?X.length:"n/a"),w(X)},[X]);const L=wt(()=>t?`${D.length*r}px`:"auto",[D.length,r,t]),q=wt(()=>{if(!t)return D;const G=Math.max(0,k.start-n),K=Math.min(D.length,k.end+n);return D.slice(G,K).map((W,te)=>({...W,virtualIndex:G+te}))},[D,k,t,n]),J=mt(G=>{const{scrollTop:K,scrollHeight:W,clientHeight:te}=G.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:K,scrollHeight:W,clientHeight:te});const U=!t&&!c&&!f&&!p&&!o;if(console.log("[Markdownit] passiveOnly:",U),U||A(Z=>Z!==K?(console.log("[Markdownit] setScrollTop:",K),K):Z),t&&!U){const Z=Math.floor(K/r),re=Math.min(D.length,Z+Math.ceil(N/r)+1);E(ue=>ue.start!==Z||ue.end!==re?(console.log("[Markdownit] setVisibleRange:",{start:Z,end:re}),{start:Z,end:re}):ue)}if(!U){const Z=K<=10;Z!==B&&(console.log("[Markdownit] isAtTop ->",Z),S(Z),Z&&f&&(console.log("[Markdownit] onScrollToTop callback"),f()))}if(!U){const Z=K+te>=W-10;Z!==O&&(console.log("[Markdownit] isAtBottom ->",Z),I(Z),Z&&p&&(console.log("[Markdownit] onScrollToBottom callback"),p()))}c&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:K,scrollHeight:W}),c(K,W)),o&&a&&!j&&!i&&W-K-N<100&&ee()},[t,r,D.length,N,o,a,j,i,B,O,f,p,c]),ee=mt(async()=>{if(!(!a||j||i)){F(!0);try{const G=D[D.length-1],K=await a(G.id);w(W=>[...W,...K])}catch(G){console.error("Failed to load more segments:",G)}finally{F(!1)}}},[a,D,j,i]);Ot(()=>{const G=()=>{P.current&&$(P.current.clientHeight)};return G(),window.addEventListener("resize",G),()=>window.removeEventListener("resize",G)},[]);const z=mt((G,K)=>{const W={type:G.type,content:G.content},te=t?{position:"absolute",top:`${(G.virtualIndex||K)*r}px`,left:0,right:0,height:`${r}px`}:{};return ae.jsx("div",{style:te,onClick:()=>h==null?void 0:h(G.id,G),className:h?"cursor-pointer hover:bg-gray-50":"",children:ae.jsx(Fm,{dataSource:W,isEditing:!1,size:l,theme:y,onChange:u,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},G.id)},[t,r,y,u,h]),Y=()=>(console.log("[Markdownit] renderContent segments.len:",D.length,"enableVirtualScroll:",t),D.length===0?ae.jsxs(J9,{theme:y,children:[ae.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),ae.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?ae.jsx("div",{ref:_,style:{height:L,position:"relative"},children:q.map(z)}):ae.jsx("div",{ref:_,children:D.map(z)})),V=()=>!j&&!i?null:ae.jsx(Z9,{theme:y,children:i?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return ae.jsx(G9,{ref:P,theme:y,$isVirtualized:t,className:v,style:{height:m,...g},children:t?ae.jsx(Y9,{ref:T,theme:y,onScroll:J,children:ae.jsx(Ob,{theme:y,height:L,children:Y()})}):ae.jsxs(Ob,{theme:y,onScroll:J,children:[Y(),V()]})})},sz=e=>{const{onRendered:t}=e;return Ot(()=>{if(!t)return;const r=requestAnimationFrame(()=>{const n=document.querySelector('[data-markdownit-root="1"]');n&&(console.log("[Markdownit _onRendered] fired"),t(n))});return()=>cancelAnimationFrame(r)},[e.dataSource,e.enableVirtualScroll,t]),ae.jsx("div",{"data-markdownit-root":"1",children:ae.jsx(Q9,{...e})})};fr.div`
1216
+ background: #f6f8fa;
1217
+ border: 1px solid #d0d7de;
1218
+ border-radius: 6px;
1219
+ padding: 16px;
1220
+ margin-bottom: 20px;
1221
+ `;fr.p`
1222
+ margin: 0 0 16px 0;
1223
+ color: #656d76;
1224
+ font-size: 14px;
1225
+ line-height: 1.5;
1226
+ `;const Ab=e=>{if(!e||e.trim()==="")return[{type:"paragraph",children:[{text:""}]}];const t=/<template\b([^>]*)>([\s\S]*?)<\/template>/g,r=[];let n=0,o,a=0;for(console.log("\u5F00\u59CB\u89E3\u6790\u6A21\u677F\u5B57\u7B26\u4E32:",e);(o=t.exec(e))!==null;){const i=o[0],l=o[1]||"",s=(o[2]||"").trim(),u=o.index,c=u+i.length;if(u>n){const b=e.slice(n,u);b.trim()!==""&&(r.push({text:b}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:b}))}const f=b=>{const y=new RegExp(`${b}\\s*=\\s*(["'])((?:\\\\.|[^\\
1227
+ ])*?)\\1`,"i"),C=l.match(y);return C?C[2]:void 0},p=/\S/.test(l),h=f("key"),v=f("placeholder"),g=h||`template-${Date.now()}-${a++}`,m={type:"template",key:g,placeholder:p?v||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":s||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:p?s:"",style:"blue",fieldId:g,children:[{text:""}],inline:!0};r.push(m),console.log("\u6DFB\u52A0template\u5143\u7D20:",m),n=c}if(n<e.length){const i=e.slice(n);i.trim()!==""&&(r.push({text:i}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:i}))}return r.length===0&&(e.trim()===""?r.push({text:""}):r.push({text:e}),console.log("\u6CA1\u6709\u627E\u5230template\u6807\u7B7E\uFF0C\u8FD4\u56DE\u539F\u59CB\u6587\u672C")),r.length>0&&r[0].type!=="paragraph"?[{type:"paragraph",children:r}]:(console.log("\u89E3\u6790\u5B8C\u6210\uFF0C\u7ED3\u679C:",r),r)},sd=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="",n="";return console.log("\u8F6C\u6362Slate\u6570\u636E:",JSON.stringify(e,null,2)),t.children.forEach(o=>{if(console.log("\u5904\u7406\u5B50\u5143\u7D20:",o),o.type==="template"){const a=o.key||o.fieldId||"",i=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",l=o.value||"",s=` key="${String(a)}" placeholder="${String(i)}"`;r+=`<template${s}>${l}</template>`,n=l||i}else if(o.text!==void 0){const a=o.text||"";a.trim()!==""?a!==n?(console.log(`\u627E\u5230\u6587\u672C\u5143\u7D20: ${a}`),r+=a,n=a):console.log("\u8DF3\u8FC7\u91CD\u590D\u6587\u672C\u5143\u7D20"):console.log("\u8DF3\u8FC7\u7A7A\u6587\u672C\u5143\u7D20")}else{console.log("\u672A\u77E5\u5143\u7D20\u7C7B\u578B:",o);const a=o.text||"";a.trim()!==""&&a!==n&&(r+=a,n=a)}}),console.log("\u8F6C\u6362\u7ED3\u679C:",r),r},ez=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=n.value||n.placeholder||"")}),r},tz=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=`\`\`\`template\`\`\`
1228
+ ${n.value||n.placeholder}\`\`\`
1229
+ \`\`\`
1230
+ `)}),r},rz=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{if(n.text!==void 0)r+=n.text;else if(n.type==="template"){const o=n.key||n.fieldId||"",a=n.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",i=n.value||"",l=` key="${String(o)}" placeholder="${String(a)}"`;r+=`<template${l}>${i}</template>`}}),r},uz=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var h,v,g,m,b,y,C,D,w,k,E,x,A,N,$,j,F,B,S,O,I,P,T,_,X,L,q,J,ee,z,Y,V,G,K,W,te,U,Z,re,ue,he,we,Ne,me,ge,ye,Ce,xe,Ae,ke,We,_e;const a=Qs(),i={theme:{colors:{primary:((h=a==null?void 0:a.colors)==null?void 0:h.primary)||"#055AFF",secondary:((v=a==null?void 0:a.colors)==null?void 0:v.secondary)||"#84ADFF",background:((g=a==null?void 0:a.colors)==null?void 0:g.background)||"#E5EEFF",text:((m=a==null?void 0:a.colors)==null?void 0:m.text)||"#055AFF",border:((b=a==null?void 0:a.colors)==null?void 0:b.border)||"#84ADFF",success:((y=a==null?void 0:a.colors)==null?void 0:y.success)||"#008000",warning:((C=a==null?void 0:a.colors)==null?void 0:C.warning)||"#FFA500",error:((D=a==null?void 0:a.colors)==null?void 0:D.error)||"#FF0000",info:((w=a==null?void 0:a.colors)==null?void 0:w.info)||"#0000FF",disabled:((k=a==null?void 0:a.colors)==null?void 0:k.disabled)||"#808080",disabledBackground:((E=a==null?void 0:a.colors)==null?void 0:E.disabledBackground)||"#F5F5F5",disabledText:((x=a==null?void 0:a.colors)==null?void 0:x.disabledText)||"#808080",shadow:((A=a==null?void 0:a.colors)==null?void 0:A.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((N=a==null?void 0:a.colors)==null?void 0:N.appBackground)||"transparent",listBackground:(($=a==null?void 0:a.colors)==null?void 0:$.listBackground)||"#f9f9f9",dashboardBackground:((j=a==null?void 0:a.colors)==null?void 0:j.dashboardBackground)||"#ffffff",textSecondary:((F=a==null?void 0:a.colors)==null?void 0:F.textSecondary)||"#6b7280"},space:{sidebar:((B=a==null?void 0:a.space)==null?void 0:B.sidebar)||"260px",size:((S=a==null?void 0:a.space)==null?void 0:S.size)||"12px",radius:((O=a==null?void 0:a.space)==null?void 0:O.radius)||"6px",padding:((I=a==null?void 0:a.space)==null?void 0:I.padding)||"16px",margin:((P=a==null?void 0:a.space)==null?void 0:P.margin)||"20px",shadow:((T=a==null?void 0:a.space)==null?void 0:T.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((_=a==null?void 0:a.space)==null?void 0:_.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((L=(X=a==null?void 0:a.fonts)==null?void 0:X.body)==null?void 0:L.size)||"14px",weight:((J=(q=a==null?void 0:a.fonts)==null?void 0:q.body)==null?void 0:J.weight)||"normal",family:((z=(ee=a==null?void 0:a.fonts)==null?void 0:ee.body)==null?void 0:z.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((V=(Y=a==null?void 0:a.fonts)==null?void 0:Y.heading)==null?void 0:V.size)||"16px",weight:((K=(G=a==null?void 0:a.fonts)==null?void 0:G.heading)==null?void 0:K.weight)||"600",family:((te=(W=a==null?void 0:a.fonts)==null?void 0:W.heading)==null?void 0:te.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((U=a==null?void 0:a.others)==null?void 0:U.baseFontWeight)||"normal"}},mode:(a==null?void 0:a.mode)||"light"},l={backgroundColor:((Z=a==null?void 0:a.colors)==null?void 0:Z.background)||"#E5EEFF",borderColor:((re=a==null?void 0:a.colors)==null?void 0:re.border)||"#84ADFF",borderRadius:((ue=a==null?void 0:a.space)==null?void 0:ue.radius)||"6px",padding:((he=a==null?void 0:a.space)==null?void 0:he.padding)||"8px 12px",margin:"2px",fontSize:((Ne=(we=a==null?void 0:a.fonts)==null?void 0:we.body)==null?void 0:Ne.size)||"14px",fontWeight:((ge=(me=a==null?void 0:a.fonts)==null?void 0:me.body)==null?void 0:ge.weight)||"500",minWidth:"30px",textColor:((ye=a==null?void 0:a.colors)==null?void 0:ye.text)||"#84ADFF"},s={...i,...n,theme:{...i.theme,...n==null?void 0:n.theme,colors:{...(Ce=i.theme)==null?void 0:Ce.colors,...(xe=n==null?void 0:n.theme)==null?void 0:xe.colors},space:{...(Ae=i.theme)==null?void 0:Ae.space,...(ke=n==null?void 0:n.theme)==null?void 0:ke.space},fonts:{...(We=i.theme)==null?void 0:We.fonts,...(_e=n==null?void 0:n.theme)==null?void 0:_e.fonts}},templateField:{...l,...n==null?void 0:n.templateField}},[u,c]=xt(()=>Ab(e));Ot(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const Pe=Ab(e);console.log("\u65B0\u7684Slate\u6570\u636E:",Pe),c(Pe)},[e]),Ot(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",u)},[u]);const f=mt((Pe,ve)=>{if(ve===Js.SLATE&&Pe){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",Pe),c(Pe);const Se=sd(Pe);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",Se),t==null||t(Se)}},[t]),p=mt(Pe=>{if(!u||u.length===0)return"";switch(Pe){case"pure_string":return ez(u);case"string":return sd(u);case"markdown":return tz(u);case"html":return rz(u);default:return sd(u)}},[u]);return Ot(()=>{o==null||o(p)},[p,o]),ae.jsx(Fm,{dataSource:{type:Js.SLATE,content:u},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:f,size:"md",styles:s,enableTemplateInput:!0})};export{lz as A,sz as I,uz as T,Js as b};